@anvpx/motion-cli 0.1.56 → 0.1.95
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/dist/approval/approval.d.ts +11 -3
- package/dist/approval/approval.js +20 -8
- package/dist/approval/command.js +43 -12
- package/dist/approval/hash.d.ts +6 -1
- package/dist/approval/hash.js +35 -6
- package/dist/captions/command.js +31 -4
- package/dist/captions/cues.d.ts +11 -2
- package/dist/captions/cues.js +13 -4
- package/dist/commands.js +2 -0
- package/dist/contact/argv.js +4 -1
- package/dist/doctor/checks.js +2 -2
- package/dist/doctor/command.js +8 -2
- package/dist/integration/interaction.integration.d.ts +1 -0
- package/dist/integration/interaction.integration.js +95 -0
- package/dist/integration/preview.integration.js +12 -4
- package/dist/interaction/command.d.ts +4 -0
- package/dist/interaction/command.js +219 -0
- package/dist/interaction/document.d.ts +55 -0
- package/dist/interaction/document.js +104 -0
- package/dist/interaction/driver.d.ts +29 -0
- package/dist/interaction/driver.js +278 -0
- package/dist/mcp/server.d.ts +12 -5
- package/dist/mcp/server.js +41 -19
- package/dist/mut-demo/.out/smoke/boot.js +90 -0
- package/dist/mut-demo/.out/smoke/runtime/compose.js +43 -0
- package/dist/mut-demo/.out/smoke/runtime/easing.js +45 -0
- package/dist/mut-demo/.out/smoke/runtime/mount.js +153 -0
- package/dist/mut-demo/.out/smoke/runtime/timeline.js +199 -0
- package/dist/mut-demo/.out/smoke/scenes/count/scene.js +6 -0
- package/dist/mut-demo/.out/smoke/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/.out/smoke/scenes/outro/scene.js +6 -0
- package/dist/mut-demo/.out/smoke/scenes/path/scene.js +6 -0
- package/dist/mut-demo/.out/smoke/scenes/signals/scene.js +6 -0
- package/dist/mut-demo/.out/smoke/shared/format.js +59 -0
- package/dist/mut-demo/.out/smoke/shared/motion.js +117 -0
- package/dist/mut-demo/.out/template-flow/out/project/boot.js +88 -0
- package/dist/mut-demo/.out/template-flow/out/project/runtime/compose.js +43 -0
- package/dist/mut-demo/.out/template-flow/out/project/runtime/easing.js +45 -0
- package/dist/mut-demo/.out/template-flow/out/project/runtime/mount.js +153 -0
- package/dist/mut-demo/.out/template-flow/out/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/.out/template-flow/out/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/project/shared/format.js +59 -0
- package/dist/mut-demo/.out/template-flow/out/project/shared/motion.js +117 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/boot.js +88 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/compose.js +43 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/easing.js +45 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/mount.js +153 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/format.js +59 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/motion.js +117 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/boot.js +88 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/compose.js +43 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/easing.js +45 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/mount.js +153 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/format.js +59 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/motion.js +117 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/boot.js +88 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/compose.js +43 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/easing.js +45 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/mount.js +153 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/format.js +59 -0
- package/dist/mut-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/motion.js +117 -0
- package/dist/mut-demo/analyze/command.d.ts +2 -0
- package/dist/mut-demo/analyze/command.js +190 -0
- package/dist/mut-demo/approval/approval.d.ts +43 -0
- package/dist/mut-demo/approval/approval.js +155 -0
- package/dist/mut-demo/approval/command.d.ts +2 -0
- package/dist/mut-demo/approval/command.js +286 -0
- package/dist/mut-demo/approval/gate.d.ts +7 -0
- package/dist/mut-demo/approval/gate.js +23 -0
- package/dist/mut-demo/approval/hash.d.ts +76 -0
- package/dist/mut-demo/approval/hash.js +493 -0
- package/dist/mut-demo/args.d.ts +30 -0
- package/dist/mut-demo/args.js +53 -0
- package/dist/mut-demo/assets/command.d.ts +2 -0
- package/dist/mut-demo/assets/command.js +165 -0
- package/dist/mut-demo/captions/command.d.ts +16 -0
- package/dist/mut-demo/captions/command.js +462 -0
- package/dist/mut-demo/captions/cues.d.ts +19 -0
- package/dist/mut-demo/captions/cues.js +70 -0
- package/dist/mut-demo/catalog/command.d.ts +2 -0
- package/dist/mut-demo/catalog/command.js +60 -0
- package/dist/mut-demo/catalog/format.d.ts +13 -0
- package/dist/mut-demo/catalog/format.js +54 -0
- package/dist/mut-demo/cli.d.ts +3 -0
- package/dist/mut-demo/cli.js +35 -0
- package/dist/mut-demo/commands.d.ts +3 -0
- package/dist/mut-demo/commands.js +65 -0
- package/dist/mut-demo/compare/command.d.ts +4 -0
- package/dist/mut-demo/compare/command.js +144 -0
- package/dist/mut-demo/contact/argv.d.ts +24 -0
- package/dist/mut-demo/contact/argv.js +45 -0
- package/dist/mut-demo/contact/command.d.ts +2 -0
- package/dist/mut-demo/contact/command.js +79 -0
- package/dist/mut-demo/desktop/command.d.ts +21 -0
- package/dist/mut-demo/desktop/command.js +120 -0
- package/dist/mut-demo/doctor/checks.d.ts +25 -0
- package/dist/mut-demo/doctor/checks.js +584 -0
- package/dist/mut-demo/doctor/command.d.ts +4 -0
- package/dist/mut-demo/doctor/command.js +94 -0
- package/dist/mut-demo/doctor/format.d.ts +7 -0
- package/dist/mut-demo/doctor/format.js +41 -0
- package/dist/mut-demo/doctor/heal.d.ts +14 -0
- package/dist/mut-demo/doctor/heal.js +71 -0
- package/dist/mut-demo/doctor/pins.d.ts +8 -0
- package/dist/mut-demo/doctor/pins.js +28 -0
- package/dist/mut-demo/doctor/skills.d.ts +15 -0
- package/dist/mut-demo/doctor/skills.js +58 -0
- package/dist/mut-demo/doctor/types.d.ts +36 -0
- package/dist/mut-demo/doctor/types.js +1 -0
- package/dist/mut-demo/doctor/vendored.d.ts +15 -0
- package/dist/mut-demo/doctor/vendored.js +90 -0
- package/dist/mut-demo/doctor/version.d.ts +8 -0
- package/dist/mut-demo/doctor/version.js +11 -0
- package/dist/mut-demo/exit-codes.d.ts +16 -0
- package/dist/mut-demo/exit-codes.js +15 -0
- package/dist/mut-demo/fit/command.d.ts +5 -0
- package/dist/mut-demo/fit/command.js +154 -0
- package/dist/mut-demo/fit/solve.d.ts +21 -0
- package/dist/mut-demo/fit/solve.js +80 -0
- package/dist/mut-demo/fit/target.d.ts +18 -0
- package/dist/mut-demo/fit/target.js +47 -0
- package/dist/mut-demo/generate3d/command.d.ts +3 -0
- package/dist/mut-demo/generate3d/command.js +38 -0
- package/dist/mut-demo/generate3d/run.d.ts +39 -0
- package/dist/mut-demo/generate3d/run.js +77 -0
- package/dist/mut-demo/icon/command.d.ts +2 -0
- package/dist/mut-demo/icon/command.js +113 -0
- package/dist/mut-demo/index.d.ts +18 -0
- package/dist/mut-demo/index.js +16 -0
- package/dist/mut-demo/install-mk.d.ts +31 -0
- package/dist/mut-demo/install-mk.js +168 -0
- package/dist/mut-demo/integration/interaction.integration.d.ts +1 -0
- package/dist/mut-demo/integration/interaction.integration.js +95 -0
- package/dist/mut-demo/integration/preview.integration.d.ts +1 -0
- package/dist/mut-demo/integration/preview.integration.js +61 -0
- package/dist/mut-demo/integration/smoke.integration.d.ts +1 -0
- package/dist/mut-demo/integration/smoke.integration.js +91 -0
- package/dist/mut-demo/interaction/command.d.ts +4 -0
- package/dist/mut-demo/interaction/command.js +219 -0
- package/dist/mut-demo/interaction/document.d.ts +55 -0
- package/dist/mut-demo/interaction/document.js +104 -0
- package/dist/mut-demo/interaction/driver.d.ts +29 -0
- package/dist/mut-demo/interaction/driver.js +278 -0
- package/dist/mut-demo/main.d.ts +2 -0
- package/dist/mut-demo/main.js +4 -0
- package/dist/mut-demo/mcp/server.d.ts +89 -0
- package/dist/mut-demo/mcp/server.js +479 -0
- package/dist/mut-demo/node-io.d.ts +14 -0
- package/dist/mut-demo/node-io.js +153 -0
- package/dist/mut-demo/optimize/command.d.ts +12 -0
- package/dist/mut-demo/optimize/command.js +110 -0
- package/dist/mut-demo/packs/command.d.ts +2 -0
- package/dist/mut-demo/packs/command.js +109 -0
- package/dist/mut-demo/parent-demo/.out/smoke/boot.js +90 -0
- package/dist/mut-demo/parent-demo/.out/smoke/runtime/compose.js +43 -0
- package/dist/mut-demo/parent-demo/.out/smoke/runtime/easing.js +45 -0
- package/dist/mut-demo/parent-demo/.out/smoke/runtime/mount.js +153 -0
- package/dist/mut-demo/parent-demo/.out/smoke/runtime/timeline.js +199 -0
- package/dist/mut-demo/parent-demo/.out/smoke/scenes/count/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/smoke/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/smoke/scenes/outro/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/smoke/scenes/path/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/smoke/scenes/signals/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/smoke/shared/format.js +59 -0
- package/dist/mut-demo/parent-demo/.out/smoke/shared/motion.js +117 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/boot.js +88 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/compose.js +43 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/easing.js +45 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/mount.js +153 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/shared/format.js +59 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/project/shared/motion.js +117 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/boot.js +88 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/compose.js +43 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/easing.js +45 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/mount.js +153 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/format.js +59 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/motion.js +117 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/boot.js +88 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/compose.js +43 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/easing.js +45 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/mount.js +153 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/format.js +59 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/motion.js +117 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/boot.js +88 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/compose.js +43 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/easing.js +45 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/mount.js +153 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/timeline.js +199 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/diagram/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/end/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/intro/scene.js +6 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/format.js +59 -0
- package/dist/mut-demo/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/motion.js +117 -0
- package/dist/mut-demo/parent-demo/analyze/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/analyze/command.js +190 -0
- package/dist/mut-demo/parent-demo/approval/approval.d.ts +43 -0
- package/dist/mut-demo/parent-demo/approval/approval.js +155 -0
- package/dist/mut-demo/parent-demo/approval/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/approval/command.js +286 -0
- package/dist/mut-demo/parent-demo/approval/gate.d.ts +7 -0
- package/dist/mut-demo/parent-demo/approval/gate.js +23 -0
- package/dist/mut-demo/parent-demo/approval/hash.d.ts +76 -0
- package/dist/mut-demo/parent-demo/approval/hash.js +493 -0
- package/dist/mut-demo/parent-demo/args.d.ts +30 -0
- package/dist/mut-demo/parent-demo/args.js +53 -0
- package/dist/mut-demo/parent-demo/assets/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/assets/command.js +165 -0
- package/dist/mut-demo/parent-demo/captions/command.d.ts +16 -0
- package/dist/mut-demo/parent-demo/captions/command.js +462 -0
- package/dist/mut-demo/parent-demo/captions/cues.d.ts +19 -0
- package/dist/mut-demo/parent-demo/captions/cues.js +70 -0
- package/dist/mut-demo/parent-demo/catalog/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/catalog/command.js +60 -0
- package/dist/mut-demo/parent-demo/catalog/format.d.ts +13 -0
- package/dist/mut-demo/parent-demo/catalog/format.js +54 -0
- package/dist/mut-demo/parent-demo/cli.d.ts +3 -0
- package/dist/mut-demo/parent-demo/cli.js +35 -0
- package/dist/mut-demo/parent-demo/commands.d.ts +3 -0
- package/dist/mut-demo/parent-demo/commands.js +65 -0
- package/dist/mut-demo/parent-demo/compare/command.d.ts +4 -0
- package/dist/mut-demo/parent-demo/compare/command.js +144 -0
- package/dist/mut-demo/parent-demo/contact/argv.d.ts +24 -0
- package/dist/mut-demo/parent-demo/contact/argv.js +45 -0
- package/dist/mut-demo/parent-demo/contact/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/contact/command.js +79 -0
- package/dist/mut-demo/parent-demo/desktop/command.d.ts +21 -0
- package/dist/mut-demo/parent-demo/desktop/command.js +120 -0
- package/dist/mut-demo/parent-demo/doctor/checks.d.ts +25 -0
- package/dist/mut-demo/parent-demo/doctor/checks.js +584 -0
- package/dist/mut-demo/parent-demo/doctor/command.d.ts +4 -0
- package/dist/mut-demo/parent-demo/doctor/command.js +94 -0
- package/dist/mut-demo/parent-demo/doctor/format.d.ts +7 -0
- package/dist/mut-demo/parent-demo/doctor/format.js +41 -0
- package/dist/mut-demo/parent-demo/doctor/heal.d.ts +14 -0
- package/dist/mut-demo/parent-demo/doctor/heal.js +71 -0
- package/dist/mut-demo/parent-demo/doctor/pins.d.ts +8 -0
- package/dist/mut-demo/parent-demo/doctor/pins.js +28 -0
- package/dist/mut-demo/parent-demo/doctor/skills.d.ts +15 -0
- package/dist/mut-demo/parent-demo/doctor/skills.js +58 -0
- package/dist/mut-demo/parent-demo/doctor/types.d.ts +36 -0
- package/dist/mut-demo/parent-demo/doctor/types.js +1 -0
- package/dist/mut-demo/parent-demo/doctor/vendored.d.ts +15 -0
- package/dist/mut-demo/parent-demo/doctor/vendored.js +90 -0
- package/dist/mut-demo/parent-demo/doctor/version.d.ts +8 -0
- package/dist/mut-demo/parent-demo/doctor/version.js +11 -0
- package/dist/mut-demo/parent-demo/exit-codes.d.ts +16 -0
- package/dist/mut-demo/parent-demo/exit-codes.js +15 -0
- package/dist/mut-demo/parent-demo/fit/command.d.ts +5 -0
- package/dist/mut-demo/parent-demo/fit/command.js +154 -0
- package/dist/mut-demo/parent-demo/fit/solve.d.ts +21 -0
- package/dist/mut-demo/parent-demo/fit/solve.js +80 -0
- package/dist/mut-demo/parent-demo/fit/target.d.ts +18 -0
- package/dist/mut-demo/parent-demo/fit/target.js +47 -0
- package/dist/mut-demo/parent-demo/generate3d/command.d.ts +3 -0
- package/dist/mut-demo/parent-demo/generate3d/command.js +38 -0
- package/dist/mut-demo/parent-demo/generate3d/run.d.ts +39 -0
- package/dist/mut-demo/parent-demo/generate3d/run.js +77 -0
- package/dist/mut-demo/parent-demo/icon/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/icon/command.js +113 -0
- package/dist/mut-demo/parent-demo/index.d.ts +18 -0
- package/dist/mut-demo/parent-demo/index.js +16 -0
- package/dist/mut-demo/parent-demo/install-mk.d.ts +31 -0
- package/dist/mut-demo/parent-demo/install-mk.js +168 -0
- package/dist/mut-demo/parent-demo/integration/interaction.integration.d.ts +1 -0
- package/dist/mut-demo/parent-demo/integration/interaction.integration.js +95 -0
- package/dist/mut-demo/parent-demo/integration/preview.integration.d.ts +1 -0
- package/dist/mut-demo/parent-demo/integration/preview.integration.js +61 -0
- package/dist/mut-demo/parent-demo/integration/smoke.integration.d.ts +1 -0
- package/dist/mut-demo/parent-demo/integration/smoke.integration.js +91 -0
- package/dist/mut-demo/parent-demo/interaction/command.d.ts +4 -0
- package/dist/mut-demo/parent-demo/interaction/command.js +219 -0
- package/dist/mut-demo/parent-demo/interaction/document.d.ts +55 -0
- package/dist/mut-demo/parent-demo/interaction/document.js +104 -0
- package/dist/mut-demo/parent-demo/interaction/driver.d.ts +29 -0
- package/dist/mut-demo/parent-demo/interaction/driver.js +278 -0
- package/dist/mut-demo/parent-demo/main.d.ts +2 -0
- package/dist/mut-demo/parent-demo/main.js +4 -0
- package/dist/mut-demo/parent-demo/mcp/server.d.ts +89 -0
- package/dist/mut-demo/parent-demo/mcp/server.js +479 -0
- package/dist/mut-demo/parent-demo/node-io.d.ts +14 -0
- package/dist/mut-demo/parent-demo/node-io.js +153 -0
- package/dist/mut-demo/parent-demo/optimize/command.d.ts +12 -0
- package/dist/mut-demo/parent-demo/optimize/command.js +110 -0
- package/dist/mut-demo/parent-demo/packs/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/packs/command.js +109 -0
- package/dist/mut-demo/parent-demo/patch/apply.d.ts +36 -0
- package/dist/mut-demo/parent-demo/patch/apply.js +186 -0
- package/dist/mut-demo/parent-demo/patch/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/patch/command.js +92 -0
- package/dist/mut-demo/parent-demo/plugin/install.d.ts +40 -0
- package/dist/mut-demo/parent-demo/plugin/install.js +170 -0
- package/dist/mut-demo/parent-demo/preview/command.d.ts +10 -0
- package/dist/mut-demo/parent-demo/preview/command.js +945 -0
- package/dist/mut-demo/parent-demo/preview/manifest.d.ts +105 -0
- package/dist/mut-demo/parent-demo/preview/manifest.js +19 -0
- package/dist/mut-demo/parent-demo/preview/pack.d.ts +24 -0
- package/dist/mut-demo/parent-demo/preview/pack.js +53 -0
- package/dist/mut-demo/parent-demo/preview/plan.d.ts +61 -0
- package/dist/mut-demo/parent-demo/preview/plan.js +205 -0
- package/dist/mut-demo/parent-demo/preview/provenance.d.ts +23 -0
- package/dist/mut-demo/parent-demo/preview/provenance.js +38 -0
- package/dist/mut-demo/parent-demo/publish/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/publish/command.js +230 -0
- package/dist/mut-demo/parent-demo/publish/player.d.ts +61 -0
- package/dist/mut-demo/parent-demo/publish/player.js +728 -0
- package/dist/mut-demo/parent-demo/publish/static.d.ts +16 -0
- package/dist/mut-demo/parent-demo/publish/static.js +78 -0
- package/dist/mut-demo/parent-demo/qc.d.ts +2 -0
- package/dist/mut-demo/parent-demo/qc.js +192 -0
- package/dist/mut-demo/parent-demo/scene/author.d.ts +16 -0
- package/dist/mut-demo/parent-demo/scene/author.js +519 -0
- package/dist/mut-demo/parent-demo/scene/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/scene/command.js +110 -0
- package/dist/mut-demo/parent-demo/scene/ops.d.ts +23 -0
- package/dist/mut-demo/parent-demo/scene/ops.js +151 -0
- package/dist/mut-demo/parent-demo/state/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/state/command.js +128 -0
- package/dist/mut-demo/parent-demo/state/evidence.d.ts +73 -0
- package/dist/mut-demo/parent-demo/state/evidence.js +1 -0
- package/dist/mut-demo/parent-demo/storyboard/check.d.ts +21 -0
- package/dist/mut-demo/parent-demo/storyboard/check.js +39 -0
- package/dist/mut-demo/parent-demo/storyboard/containment.d.ts +24 -0
- package/dist/mut-demo/parent-demo/storyboard/containment.js +43 -0
- package/dist/mut-demo/parent-demo/storyboard/custom.d.ts +15 -0
- package/dist/mut-demo/parent-demo/storyboard/custom.js +133 -0
- package/dist/mut-demo/parent-demo/storyboard/edit.d.ts +19 -0
- package/dist/mut-demo/parent-demo/storyboard/edit.js +39 -0
- package/dist/mut-demo/parent-demo/storyboard/load.d.ts +11 -0
- package/dist/mut-demo/parent-demo/storyboard/load.js +52 -0
- package/dist/mut-demo/parent-demo/storyboard/report.d.ts +5 -0
- package/dist/mut-demo/parent-demo/storyboard/report.js +8 -0
- package/dist/mut-demo/parent-demo/template/coerce.d.ts +6 -0
- package/dist/mut-demo/parent-demo/template/coerce.js +44 -0
- package/dist/mut-demo/parent-demo/template/command.d.ts +5 -0
- package/dist/mut-demo/parent-demo/template/command.js +163 -0
- package/dist/mut-demo/parent-demo/template/env.d.ts +38 -0
- package/dist/mut-demo/parent-demo/template/env.js +40 -0
- package/dist/mut-demo/parent-demo/template/fork.d.ts +8 -0
- package/dist/mut-demo/parent-demo/template/fork.js +156 -0
- package/dist/mut-demo/parent-demo/template/format.d.ts +21 -0
- package/dist/mut-demo/parent-demo/template/format.js +177 -0
- package/dist/mut-demo/parent-demo/template/list.d.ts +27 -0
- package/dist/mut-demo/parent-demo/template/list.js +171 -0
- package/dist/mut-demo/parent-demo/template/new.d.ts +6 -0
- package/dist/mut-demo/parent-demo/template/new.js +335 -0
- package/dist/mut-demo/parent-demo/testing/env.d.ts +9 -0
- package/dist/mut-demo/parent-demo/testing/env.js +49 -0
- package/dist/mut-demo/parent-demo/testing/fakes.d.ts +39 -0
- package/dist/mut-demo/parent-demo/testing/fakes.js +100 -0
- package/dist/mut-demo/parent-demo/testing/fixtures.d.ts +8 -0
- package/dist/mut-demo/parent-demo/testing/fixtures.js +6 -0
- package/dist/mut-demo/parent-demo/testing/probe.d.ts +15 -0
- package/dist/mut-demo/parent-demo/testing/probe.js +20 -0
- package/dist/mut-demo/parent-demo/testing/project.d.ts +22 -0
- package/dist/mut-demo/parent-demo/testing/project.js +26 -0
- package/dist/mut-demo/parent-demo/tooling/session.d.ts +40 -0
- package/dist/mut-demo/parent-demo/tooling/session.js +106 -0
- package/dist/mut-demo/parent-demo/types.d.ts +64 -0
- package/dist/mut-demo/parent-demo/types.js +1 -0
- package/dist/mut-demo/parent-demo/verify/audio-loudness.d.ts +81 -0
- package/dist/mut-demo/parent-demo/verify/audio-loudness.js +306 -0
- package/dist/mut-demo/parent-demo/verify/caption.d.ts +23 -0
- package/dist/mut-demo/parent-demo/verify/caption.fixtures.d.ts +148 -0
- package/dist/mut-demo/parent-demo/verify/caption.fixtures.js +66 -0
- package/dist/mut-demo/parent-demo/verify/caption.js +105 -0
- package/dist/mut-demo/parent-demo/verify/command.d.ts +2 -0
- package/dist/mut-demo/parent-demo/verify/command.js +190 -0
- package/dist/mut-demo/parent-demo/verify/determinism.d.ts +30 -0
- package/dist/mut-demo/parent-demo/verify/determinism.js +59 -0
- package/dist/mut-demo/parent-demo/verify/expectation.d.ts +15 -0
- package/dist/mut-demo/parent-demo/verify/expectation.js +19 -0
- package/dist/mut-demo/parent-demo/verify/flash.d.ts +55 -0
- package/dist/mut-demo/parent-demo/verify/flash.js +147 -0
- package/dist/mut-demo/parent-demo/verify/media-events.d.ts +61 -0
- package/dist/mut-demo/parent-demo/verify/media-events.js +174 -0
- package/dist/mut-demo/parent-demo/verify/motion-coherence.d.ts +99 -0
- package/dist/mut-demo/parent-demo/verify/motion-coherence.js +274 -0
- package/dist/mut-demo/parent-demo/verify/platform.d.ts +33 -0
- package/dist/mut-demo/parent-demo/verify/platform.js +59 -0
- package/dist/mut-demo/parent-demo/verify/probe.d.ts +14 -0
- package/dist/mut-demo/parent-demo/verify/probe.js +23 -0
- package/dist/mut-demo/parent-demo/verify/report.d.ts +15 -0
- package/dist/mut-demo/parent-demo/verify/report.js +45 -0
- package/dist/mut-demo/parent-demo/verify/run.d.ts +32 -0
- package/dist/mut-demo/parent-demo/verify/run.js +64 -0
- package/dist/mut-demo/parent-demo/version/command.d.ts +5 -0
- package/dist/mut-demo/parent-demo/version/command.js +52 -0
- package/dist/mut-demo/parent-demo/voice/command.d.ts +3 -0
- package/dist/mut-demo/parent-demo/voice/command.js +77 -0
- package/dist/mut-demo/parent-demo/voice/manifest.d.ts +33 -0
- package/dist/mut-demo/parent-demo/voice/manifest.js +69 -0
- package/dist/mut-demo/parent-demo/voice/portability.d.ts +27 -0
- package/dist/mut-demo/parent-demo/voice/portability.js +41 -0
- package/dist/mut-demo/parent-demo/voice/run.d.ts +29 -0
- package/dist/mut-demo/parent-demo/voice/run.js +224 -0
- package/dist/mut-demo/parent-demo/workflow/build.d.ts +2 -0
- package/dist/mut-demo/parent-demo/workflow/build.js +33 -0
- package/dist/mut-demo/parent-demo/workflow/draft.d.ts +9 -0
- package/dist/mut-demo/parent-demo/workflow/draft.js +230 -0
- package/dist/mut-demo/parent-demo/workflow/finish.d.ts +23 -0
- package/dist/mut-demo/parent-demo/workflow/finish.js +28 -0
- package/dist/mut-demo/parent-demo/workflow/project.d.ts +82 -0
- package/dist/mut-demo/parent-demo/workflow/project.js +224 -0
- package/dist/mut-demo/parent-demo/workflow/provenance.d.ts +18 -0
- package/dist/mut-demo/parent-demo/workflow/provenance.js +36 -0
- package/dist/mut-demo/parent-demo/workflow/render.d.ts +78 -0
- package/dist/mut-demo/parent-demo/workflow/render.js +922 -0
- package/dist/mut-demo/parent-demo/workflow/still.d.ts +5 -0
- package/dist/mut-demo/parent-demo/workflow/still.js +79 -0
- package/dist/mut-demo/parent-demo/workflow/validate.d.ts +2 -0
- package/dist/mut-demo/parent-demo/workflow/validate.js +49 -0
- package/dist/mut-demo/patch/apply.d.ts +36 -0
- package/dist/mut-demo/patch/apply.js +186 -0
- package/dist/mut-demo/patch/command.d.ts +2 -0
- package/dist/mut-demo/patch/command.js +92 -0
- package/dist/mut-demo/plugin/install.d.ts +40 -0
- package/dist/mut-demo/plugin/install.js +170 -0
- package/dist/mut-demo/preview/command.d.ts +10 -0
- package/dist/mut-demo/preview/command.js +945 -0
- package/dist/mut-demo/preview/manifest.d.ts +105 -0
- package/dist/mut-demo/preview/manifest.js +19 -0
- package/dist/mut-demo/preview/pack.d.ts +24 -0
- package/dist/mut-demo/preview/pack.js +53 -0
- package/dist/mut-demo/preview/plan.d.ts +61 -0
- package/dist/mut-demo/preview/plan.js +205 -0
- package/dist/mut-demo/preview/provenance.d.ts +23 -0
- package/dist/mut-demo/preview/provenance.js +38 -0
- package/dist/mut-demo/publish/command.d.ts +2 -0
- package/dist/mut-demo/publish/command.js +230 -0
- package/dist/mut-demo/publish/player.d.ts +61 -0
- package/dist/mut-demo/publish/player.js +728 -0
- package/dist/mut-demo/publish/static.d.ts +16 -0
- package/dist/mut-demo/publish/static.js +78 -0
- package/dist/mut-demo/qc.d.ts +2 -0
- package/dist/mut-demo/qc.js +192 -0
- package/dist/mut-demo/scene/author.d.ts +16 -0
- package/dist/mut-demo/scene/author.js +519 -0
- package/dist/mut-demo/scene/command.d.ts +2 -0
- package/dist/mut-demo/scene/command.js +110 -0
- package/dist/mut-demo/scene/ops.d.ts +23 -0
- package/dist/mut-demo/scene/ops.js +151 -0
- package/dist/mut-demo/state/command.d.ts +2 -0
- package/dist/mut-demo/state/command.js +128 -0
- package/dist/mut-demo/state/evidence.d.ts +73 -0
- package/dist/mut-demo/state/evidence.js +1 -0
- package/dist/mut-demo/storyboard/check.d.ts +21 -0
- package/dist/mut-demo/storyboard/check.js +39 -0
- package/dist/mut-demo/storyboard/containment.d.ts +24 -0
- package/dist/mut-demo/storyboard/containment.js +43 -0
- package/dist/mut-demo/storyboard/custom.d.ts +15 -0
- package/dist/mut-demo/storyboard/custom.js +133 -0
- package/dist/mut-demo/storyboard/edit.d.ts +19 -0
- package/dist/mut-demo/storyboard/edit.js +39 -0
- package/dist/mut-demo/storyboard/load.d.ts +11 -0
- package/dist/mut-demo/storyboard/load.js +52 -0
- package/dist/mut-demo/storyboard/report.d.ts +5 -0
- package/dist/mut-demo/storyboard/report.js +8 -0
- package/dist/mut-demo/template/coerce.d.ts +6 -0
- package/dist/mut-demo/template/coerce.js +44 -0
- package/dist/mut-demo/template/command.d.ts +5 -0
- package/dist/mut-demo/template/command.js +163 -0
- package/dist/mut-demo/template/env.d.ts +38 -0
- package/dist/mut-demo/template/env.js +40 -0
- package/dist/mut-demo/template/fork.d.ts +8 -0
- package/dist/mut-demo/template/fork.js +156 -0
- package/dist/mut-demo/template/format.d.ts +21 -0
- package/dist/mut-demo/template/format.js +177 -0
- package/dist/mut-demo/template/list.d.ts +27 -0
- package/dist/mut-demo/template/list.js +171 -0
- package/dist/mut-demo/template/new.d.ts +6 -0
- package/dist/mut-demo/template/new.js +335 -0
- package/dist/mut-demo/testing/env.d.ts +9 -0
- package/dist/mut-demo/testing/env.js +49 -0
- package/dist/mut-demo/testing/fakes.d.ts +39 -0
- package/dist/mut-demo/testing/fakes.js +100 -0
- package/dist/mut-demo/testing/fixtures.d.ts +8 -0
- package/dist/mut-demo/testing/fixtures.js +6 -0
- package/dist/mut-demo/testing/probe.d.ts +15 -0
- package/dist/mut-demo/testing/probe.js +20 -0
- package/dist/mut-demo/testing/project.d.ts +22 -0
- package/dist/mut-demo/testing/project.js +26 -0
- package/dist/mut-demo/tooling/session.d.ts +40 -0
- package/dist/mut-demo/tooling/session.js +106 -0
- package/dist/mut-demo/types.d.ts +64 -0
- package/dist/mut-demo/types.js +1 -0
- package/dist/mut-demo/verify/audio-loudness.d.ts +81 -0
- package/dist/mut-demo/verify/audio-loudness.js +306 -0
- package/dist/mut-demo/verify/caption.d.ts +23 -0
- package/dist/mut-demo/verify/caption.fixtures.d.ts +148 -0
- package/dist/mut-demo/verify/caption.fixtures.js +66 -0
- package/dist/mut-demo/verify/caption.js +105 -0
- package/dist/mut-demo/verify/command.d.ts +2 -0
- package/dist/mut-demo/verify/command.js +190 -0
- package/dist/mut-demo/verify/determinism.d.ts +30 -0
- package/dist/mut-demo/verify/determinism.js +59 -0
- package/dist/mut-demo/verify/expectation.d.ts +15 -0
- package/dist/mut-demo/verify/expectation.js +19 -0
- package/dist/mut-demo/verify/flash.d.ts +55 -0
- package/dist/mut-demo/verify/flash.js +147 -0
- package/dist/mut-demo/verify/media-events.d.ts +61 -0
- package/dist/mut-demo/verify/media-events.js +174 -0
- package/dist/mut-demo/verify/motion-coherence.d.ts +99 -0
- package/dist/mut-demo/verify/motion-coherence.js +274 -0
- package/dist/mut-demo/verify/platform.d.ts +33 -0
- package/dist/mut-demo/verify/platform.js +59 -0
- package/dist/mut-demo/verify/probe.d.ts +14 -0
- package/dist/mut-demo/verify/probe.js +23 -0
- package/dist/mut-demo/verify/report.d.ts +15 -0
- package/dist/mut-demo/verify/report.js +45 -0
- package/dist/mut-demo/verify/run.d.ts +32 -0
- package/dist/mut-demo/verify/run.js +64 -0
- package/dist/mut-demo/version/command.d.ts +5 -0
- package/dist/mut-demo/version/command.js +52 -0
- package/dist/mut-demo/voice/command.d.ts +3 -0
- package/dist/mut-demo/voice/command.js +77 -0
- package/dist/mut-demo/voice/manifest.d.ts +33 -0
- package/dist/mut-demo/voice/manifest.js +69 -0
- package/dist/mut-demo/voice/portability.d.ts +27 -0
- package/dist/mut-demo/voice/portability.js +41 -0
- package/dist/mut-demo/voice/run.d.ts +29 -0
- package/dist/mut-demo/voice/run.js +224 -0
- package/dist/mut-demo/workflow/build.d.ts +2 -0
- package/dist/mut-demo/workflow/build.js +33 -0
- package/dist/mut-demo/workflow/draft.d.ts +9 -0
- package/dist/mut-demo/workflow/draft.js +230 -0
- package/dist/mut-demo/workflow/finish.d.ts +23 -0
- package/dist/mut-demo/workflow/finish.js +28 -0
- package/dist/mut-demo/workflow/project.d.ts +82 -0
- package/dist/mut-demo/workflow/project.js +224 -0
- package/dist/mut-demo/workflow/provenance.d.ts +18 -0
- package/dist/mut-demo/workflow/provenance.js +36 -0
- package/dist/mut-demo/workflow/render.d.ts +78 -0
- package/dist/mut-demo/workflow/render.js +922 -0
- package/dist/mut-demo/workflow/still.d.ts +5 -0
- package/dist/mut-demo/workflow/still.js +79 -0
- package/dist/mut-demo/workflow/validate.d.ts +2 -0
- package/dist/mut-demo/workflow/validate.js +49 -0
- package/dist/node-io.js +1 -0
- package/dist/parent-demo/.out/smoke/boot.js +90 -0
- package/dist/parent-demo/.out/smoke/runtime/compose.js +43 -0
- package/dist/parent-demo/.out/smoke/runtime/easing.js +45 -0
- package/dist/parent-demo/.out/smoke/runtime/mount.js +153 -0
- package/dist/parent-demo/.out/smoke/runtime/timeline.js +199 -0
- package/dist/parent-demo/.out/smoke/scenes/count/scene.js +6 -0
- package/dist/parent-demo/.out/smoke/scenes/intro/scene.js +6 -0
- package/dist/parent-demo/.out/smoke/scenes/outro/scene.js +6 -0
- package/dist/parent-demo/.out/smoke/scenes/path/scene.js +6 -0
- package/dist/parent-demo/.out/smoke/scenes/signals/scene.js +6 -0
- package/dist/parent-demo/.out/smoke/shared/format.js +59 -0
- package/dist/parent-demo/.out/smoke/shared/motion.js +117 -0
- package/dist/parent-demo/.out/template-flow/out/project/boot.js +88 -0
- package/dist/parent-demo/.out/template-flow/out/project/runtime/compose.js +43 -0
- package/dist/parent-demo/.out/template-flow/out/project/runtime/easing.js +45 -0
- package/dist/parent-demo/.out/template-flow/out/project/runtime/mount.js +153 -0
- package/dist/parent-demo/.out/template-flow/out/project/runtime/timeline.js +199 -0
- package/dist/parent-demo/.out/template-flow/out/project/scenes/diagram/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/project/scenes/end/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/project/scenes/intro/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/project/shared/format.js +59 -0
- package/dist/parent-demo/.out/template-flow/out/project/shared/motion.js +117 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/boot.js +88 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/compose.js +43 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/easing.js +45 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/mount.js +153 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/runtime/timeline.js +199 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/diagram/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/end/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/scenes/intro/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/format.js +59 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/clip/project/shared/motion.js +117 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/boot.js +88 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/compose.js +43 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/easing.js +45 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/mount.js +153 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/runtime/timeline.js +199 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/diagram/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/end/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/scenes/intro/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/format.js +59 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/light/project/shared/motion.js +117 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/boot.js +88 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/compose.js +43 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/easing.js +45 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/mount.js +153 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/runtime/timeline.js +199 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/diagram/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/end/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/scenes/intro/scene.js +6 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/format.js +59 -0
- package/dist/parent-demo/.out/template-flow/out/storyboard.preview-work/paired/project/shared/motion.js +117 -0
- package/dist/parent-demo/analyze/command.d.ts +2 -0
- package/dist/parent-demo/analyze/command.js +190 -0
- package/dist/parent-demo/approval/approval.d.ts +43 -0
- package/dist/parent-demo/approval/approval.js +155 -0
- package/dist/parent-demo/approval/command.d.ts +2 -0
- package/dist/parent-demo/approval/command.js +286 -0
- package/dist/parent-demo/approval/gate.d.ts +7 -0
- package/dist/parent-demo/approval/gate.js +23 -0
- package/dist/parent-demo/approval/hash.d.ts +76 -0
- package/dist/parent-demo/approval/hash.js +493 -0
- package/dist/parent-demo/args.d.ts +30 -0
- package/dist/parent-demo/args.js +53 -0
- package/dist/parent-demo/assets/command.d.ts +2 -0
- package/dist/parent-demo/assets/command.js +165 -0
- package/dist/parent-demo/captions/command.d.ts +16 -0
- package/dist/parent-demo/captions/command.js +462 -0
- package/dist/parent-demo/captions/cues.d.ts +19 -0
- package/dist/parent-demo/captions/cues.js +70 -0
- package/dist/parent-demo/catalog/command.d.ts +2 -0
- package/dist/parent-demo/catalog/command.js +60 -0
- package/dist/parent-demo/catalog/format.d.ts +13 -0
- package/dist/parent-demo/catalog/format.js +54 -0
- package/dist/parent-demo/cli.d.ts +3 -0
- package/dist/parent-demo/cli.js +35 -0
- package/dist/parent-demo/commands.d.ts +3 -0
- package/dist/parent-demo/commands.js +65 -0
- package/dist/parent-demo/compare/command.d.ts +4 -0
- package/dist/parent-demo/compare/command.js +144 -0
- package/dist/parent-demo/contact/argv.d.ts +24 -0
- package/dist/parent-demo/contact/argv.js +45 -0
- package/dist/parent-demo/contact/command.d.ts +2 -0
- package/dist/parent-demo/contact/command.js +79 -0
- package/dist/parent-demo/desktop/command.d.ts +21 -0
- package/dist/parent-demo/desktop/command.js +120 -0
- package/dist/parent-demo/doctor/checks.d.ts +25 -0
- package/dist/parent-demo/doctor/checks.js +584 -0
- package/dist/parent-demo/doctor/command.d.ts +4 -0
- package/dist/parent-demo/doctor/command.js +94 -0
- package/dist/parent-demo/doctor/format.d.ts +7 -0
- package/dist/parent-demo/doctor/format.js +41 -0
- package/dist/parent-demo/doctor/heal.d.ts +14 -0
- package/dist/parent-demo/doctor/heal.js +71 -0
- package/dist/parent-demo/doctor/pins.d.ts +8 -0
- package/dist/parent-demo/doctor/pins.js +28 -0
- package/dist/parent-demo/doctor/skills.d.ts +15 -0
- package/dist/parent-demo/doctor/skills.js +58 -0
- package/dist/parent-demo/doctor/types.d.ts +36 -0
- package/dist/parent-demo/doctor/types.js +1 -0
- package/dist/parent-demo/doctor/vendored.d.ts +15 -0
- package/dist/parent-demo/doctor/vendored.js +90 -0
- package/dist/parent-demo/doctor/version.d.ts +8 -0
- package/dist/parent-demo/doctor/version.js +11 -0
- package/dist/parent-demo/exit-codes.d.ts +16 -0
- package/dist/parent-demo/exit-codes.js +15 -0
- package/dist/parent-demo/fit/command.d.ts +5 -0
- package/dist/parent-demo/fit/command.js +154 -0
- package/dist/parent-demo/fit/solve.d.ts +21 -0
- package/dist/parent-demo/fit/solve.js +80 -0
- package/dist/parent-demo/fit/target.d.ts +18 -0
- package/dist/parent-demo/fit/target.js +47 -0
- package/dist/parent-demo/generate3d/command.d.ts +3 -0
- package/dist/parent-demo/generate3d/command.js +38 -0
- package/dist/parent-demo/generate3d/run.d.ts +39 -0
- package/dist/parent-demo/generate3d/run.js +77 -0
- package/dist/parent-demo/icon/command.d.ts +2 -0
- package/dist/parent-demo/icon/command.js +113 -0
- package/dist/parent-demo/index.d.ts +18 -0
- package/dist/parent-demo/index.js +16 -0
- package/dist/parent-demo/install-mk.d.ts +31 -0
- package/dist/parent-demo/install-mk.js +168 -0
- package/dist/parent-demo/integration/interaction.integration.d.ts +1 -0
- package/dist/parent-demo/integration/interaction.integration.js +95 -0
- package/dist/parent-demo/integration/preview.integration.d.ts +1 -0
- package/dist/parent-demo/integration/preview.integration.js +61 -0
- package/dist/parent-demo/integration/smoke.integration.d.ts +1 -0
- package/dist/parent-demo/integration/smoke.integration.js +91 -0
- package/dist/parent-demo/interaction/command.d.ts +4 -0
- package/dist/parent-demo/interaction/command.js +219 -0
- package/dist/parent-demo/interaction/document.d.ts +55 -0
- package/dist/parent-demo/interaction/document.js +104 -0
- package/dist/parent-demo/interaction/driver.d.ts +29 -0
- package/dist/parent-demo/interaction/driver.js +278 -0
- package/dist/parent-demo/main.d.ts +2 -0
- package/dist/parent-demo/main.js +4 -0
- package/dist/parent-demo/mcp/server.d.ts +89 -0
- package/dist/parent-demo/mcp/server.js +479 -0
- package/dist/parent-demo/node-io.d.ts +14 -0
- package/dist/parent-demo/node-io.js +153 -0
- package/dist/parent-demo/optimize/command.d.ts +12 -0
- package/dist/parent-demo/optimize/command.js +110 -0
- package/dist/parent-demo/packs/command.d.ts +2 -0
- package/dist/parent-demo/packs/command.js +109 -0
- package/dist/parent-demo/patch/apply.d.ts +36 -0
- package/dist/parent-demo/patch/apply.js +186 -0
- package/dist/parent-demo/patch/command.d.ts +2 -0
- package/dist/parent-demo/patch/command.js +92 -0
- package/dist/parent-demo/plugin/install.d.ts +40 -0
- package/dist/parent-demo/plugin/install.js +170 -0
- package/dist/parent-demo/preview/command.d.ts +10 -0
- package/dist/parent-demo/preview/command.js +945 -0
- package/dist/parent-demo/preview/manifest.d.ts +105 -0
- package/dist/parent-demo/preview/manifest.js +19 -0
- package/dist/parent-demo/preview/pack.d.ts +24 -0
- package/dist/parent-demo/preview/pack.js +53 -0
- package/dist/parent-demo/preview/plan.d.ts +61 -0
- package/dist/parent-demo/preview/plan.js +205 -0
- package/dist/parent-demo/preview/provenance.d.ts +23 -0
- package/dist/parent-demo/preview/provenance.js +38 -0
- package/dist/parent-demo/publish/command.d.ts +2 -0
- package/dist/parent-demo/publish/command.js +230 -0
- package/dist/parent-demo/publish/player.d.ts +61 -0
- package/dist/parent-demo/publish/player.js +728 -0
- package/dist/parent-demo/publish/static.d.ts +16 -0
- package/dist/parent-demo/publish/static.js +78 -0
- package/dist/parent-demo/qc.d.ts +2 -0
- package/dist/parent-demo/qc.js +192 -0
- package/dist/parent-demo/scene/author.d.ts +16 -0
- package/dist/parent-demo/scene/author.js +519 -0
- package/dist/parent-demo/scene/command.d.ts +2 -0
- package/dist/parent-demo/scene/command.js +110 -0
- package/dist/parent-demo/scene/ops.d.ts +23 -0
- package/dist/parent-demo/scene/ops.js +151 -0
- package/dist/parent-demo/state/command.d.ts +2 -0
- package/dist/parent-demo/state/command.js +128 -0
- package/dist/parent-demo/state/evidence.d.ts +73 -0
- package/dist/parent-demo/state/evidence.js +1 -0
- package/dist/parent-demo/storyboard/check.d.ts +21 -0
- package/dist/parent-demo/storyboard/check.js +39 -0
- package/dist/parent-demo/storyboard/containment.d.ts +24 -0
- package/dist/parent-demo/storyboard/containment.js +43 -0
- package/dist/parent-demo/storyboard/custom.d.ts +15 -0
- package/dist/parent-demo/storyboard/custom.js +133 -0
- package/dist/parent-demo/storyboard/edit.d.ts +19 -0
- package/dist/parent-demo/storyboard/edit.js +39 -0
- package/dist/parent-demo/storyboard/load.d.ts +11 -0
- package/dist/parent-demo/storyboard/load.js +52 -0
- package/dist/parent-demo/storyboard/report.d.ts +5 -0
- package/dist/parent-demo/storyboard/report.js +8 -0
- package/dist/parent-demo/template/coerce.d.ts +6 -0
- package/dist/parent-demo/template/coerce.js +44 -0
- package/dist/parent-demo/template/command.d.ts +5 -0
- package/dist/parent-demo/template/command.js +163 -0
- package/dist/parent-demo/template/env.d.ts +38 -0
- package/dist/parent-demo/template/env.js +40 -0
- package/dist/parent-demo/template/fork.d.ts +8 -0
- package/dist/parent-demo/template/fork.js +156 -0
- package/dist/parent-demo/template/format.d.ts +21 -0
- package/dist/parent-demo/template/format.js +177 -0
- package/dist/parent-demo/template/list.d.ts +27 -0
- package/dist/parent-demo/template/list.js +171 -0
- package/dist/parent-demo/template/new.d.ts +6 -0
- package/dist/parent-demo/template/new.js +335 -0
- package/dist/parent-demo/testing/env.d.ts +9 -0
- package/dist/parent-demo/testing/env.js +49 -0
- package/dist/parent-demo/testing/fakes.d.ts +39 -0
- package/dist/parent-demo/testing/fakes.js +100 -0
- package/dist/parent-demo/testing/fixtures.d.ts +8 -0
- package/dist/parent-demo/testing/fixtures.js +6 -0
- package/dist/parent-demo/testing/probe.d.ts +15 -0
- package/dist/parent-demo/testing/probe.js +20 -0
- package/dist/parent-demo/testing/project.d.ts +22 -0
- package/dist/parent-demo/testing/project.js +26 -0
- package/dist/parent-demo/tooling/session.d.ts +40 -0
- package/dist/parent-demo/tooling/session.js +106 -0
- package/dist/parent-demo/types.d.ts +64 -0
- package/dist/parent-demo/types.js +1 -0
- package/dist/parent-demo/verify/audio-loudness.d.ts +81 -0
- package/dist/parent-demo/verify/audio-loudness.js +306 -0
- package/dist/parent-demo/verify/caption.d.ts +23 -0
- package/dist/parent-demo/verify/caption.fixtures.d.ts +148 -0
- package/dist/parent-demo/verify/caption.fixtures.js +66 -0
- package/dist/parent-demo/verify/caption.js +105 -0
- package/dist/parent-demo/verify/command.d.ts +2 -0
- package/dist/parent-demo/verify/command.js +190 -0
- package/dist/parent-demo/verify/determinism.d.ts +30 -0
- package/dist/parent-demo/verify/determinism.js +59 -0
- package/dist/parent-demo/verify/expectation.d.ts +15 -0
- package/dist/parent-demo/verify/expectation.js +19 -0
- package/dist/parent-demo/verify/flash.d.ts +55 -0
- package/dist/parent-demo/verify/flash.js +147 -0
- package/dist/parent-demo/verify/media-events.d.ts +61 -0
- package/dist/parent-demo/verify/media-events.js +174 -0
- package/dist/parent-demo/verify/motion-coherence.d.ts +99 -0
- package/dist/parent-demo/verify/motion-coherence.js +274 -0
- package/dist/parent-demo/verify/platform.d.ts +33 -0
- package/dist/parent-demo/verify/platform.js +59 -0
- package/dist/parent-demo/verify/probe.d.ts +14 -0
- package/dist/parent-demo/verify/probe.js +23 -0
- package/dist/parent-demo/verify/report.d.ts +15 -0
- package/dist/parent-demo/verify/report.js +45 -0
- package/dist/parent-demo/verify/run.d.ts +32 -0
- package/dist/parent-demo/verify/run.js +64 -0
- package/dist/parent-demo/version/command.d.ts +5 -0
- package/dist/parent-demo/version/command.js +52 -0
- package/dist/parent-demo/voice/command.d.ts +3 -0
- package/dist/parent-demo/voice/command.js +77 -0
- package/dist/parent-demo/voice/manifest.d.ts +33 -0
- package/dist/parent-demo/voice/manifest.js +69 -0
- package/dist/parent-demo/voice/portability.d.ts +27 -0
- package/dist/parent-demo/voice/portability.js +41 -0
- package/dist/parent-demo/voice/run.d.ts +29 -0
- package/dist/parent-demo/voice/run.js +224 -0
- package/dist/parent-demo/workflow/build.d.ts +2 -0
- package/dist/parent-demo/workflow/build.js +33 -0
- package/dist/parent-demo/workflow/draft.d.ts +9 -0
- package/dist/parent-demo/workflow/draft.js +230 -0
- package/dist/parent-demo/workflow/finish.d.ts +23 -0
- package/dist/parent-demo/workflow/finish.js +28 -0
- package/dist/parent-demo/workflow/project.d.ts +82 -0
- package/dist/parent-demo/workflow/project.js +224 -0
- package/dist/parent-demo/workflow/provenance.d.ts +18 -0
- package/dist/parent-demo/workflow/provenance.js +36 -0
- package/dist/parent-demo/workflow/render.d.ts +78 -0
- package/dist/parent-demo/workflow/render.js +922 -0
- package/dist/parent-demo/workflow/still.d.ts +5 -0
- package/dist/parent-demo/workflow/still.js +79 -0
- package/dist/parent-demo/workflow/validate.d.ts +2 -0
- package/dist/parent-demo/workflow/validate.js +49 -0
- package/dist/plugin/install.d.ts +3 -3
- package/dist/plugin/install.js +2 -2
- package/dist/preview/command.js +169 -94
- package/dist/preview/manifest.d.ts +2 -0
- package/dist/preview/plan.js +1 -1
- package/dist/publish/command.js +189 -29
- package/dist/publish/player.d.ts +42 -6
- package/dist/publish/player.js +660 -40
- package/dist/scene/author.d.ts +1 -1
- package/dist/scene/author.js +250 -10
- package/dist/state/evidence.d.ts +4 -2
- package/dist/state/evidence.js +17 -4
- package/dist/template/env.d.ts +4 -0
- package/dist/template/env.js +3 -1
- package/dist/template/format.js +28 -12
- package/dist/template/list.d.ts +13 -1
- package/dist/template/list.js +61 -6
- package/dist/template/new.js +37 -4
- package/dist/testing/env.d.ts +1 -0
- package/dist/testing/env.js +32 -2
- package/dist/testing/fakes.d.ts +7 -1
- package/dist/testing/fakes.js +7 -2
- package/dist/types.d.ts +5 -0
- package/dist/verify/audio-loudness.d.ts +38 -3
- package/dist/verify/audio-loudness.js +123 -3
- package/dist/verify/caption.d.ts +23 -0
- package/dist/verify/caption.fixtures.d.ts +148 -0
- package/dist/verify/caption.fixtures.js +66 -0
- package/dist/verify/caption.js +105 -0
- package/dist/verify/command.js +42 -13
- package/dist/verify/determinism.d.ts +5 -5
- package/dist/verify/determinism.js +6 -6
- package/dist/verify/flash.d.ts +55 -0
- package/dist/verify/flash.js +147 -0
- package/dist/verify/motion-coherence.d.ts +99 -0
- package/dist/verify/motion-coherence.js +274 -0
- package/dist/verify/platform.d.ts +3 -3
- package/dist/verify/platform.js +5 -5
- package/dist/verify/run.d.ts +5 -0
- package/dist/verify/run.js +11 -0
- package/dist/voice/portability.d.ts +27 -0
- package/dist/voice/portability.js +41 -0
- package/dist/voice/run.js +31 -17
- package/dist/workflow/build.js +11 -3
- package/dist/workflow/draft.js +24 -9
- package/dist/workflow/project.d.ts +10 -1
- package/dist/workflow/project.js +29 -3
- package/dist/workflow/render.d.ts +41 -2
- package/dist/workflow/render.js +217 -54
- package/dist/workflow/still.js +30 -13
- package/package.json +6 -5
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { ALIGN_MODEL_ID, alignWords, detectSilence, resolveVenvPython, VOICE_PROVENANCE, } from "@anvpx/motion-audio";
|
|
2
|
+
import { AudioAnalysisSchema } from "@anvpx/motion-schema";
|
|
3
|
+
import { parseFlags, requirePositional, textFlag, usageError } from "../args.js";
|
|
4
|
+
import { EXIT } from "../exit-codes.js";
|
|
5
|
+
import { readJsonFile } from "../storyboard/load.js";
|
|
6
|
+
import { probeMedia } from "../verify/probe.js";
|
|
7
|
+
const USAGE = `mk analyze <audio.wav> [--words <words.json>] [--tokens <text>] [--out <file>] [--python <bin>]
|
|
8
|
+
|
|
9
|
+
Analyze voice audio into AudioAnalysis JSON (words, silences, duration).
|
|
10
|
+
Prints one compact JSON line to stdout, or writes it to --out.
|
|
11
|
+
<audio.wav> audio file to analyze (required)
|
|
12
|
+
--words <file> known word timings JSON [{w,start,end}]; skips the aligner
|
|
13
|
+
--tokens <text> known script text; aligned with the voice venv python
|
|
14
|
+
--out <file> write the JSON to <file> (stdout gets one summary line)
|
|
15
|
+
--python <bin> explicit venv python (skips the probe; only with --tokens)
|
|
16
|
+
Without --words or --tokens there are no word timings: silence intervals and
|
|
17
|
+
duration are still measured and the analysis is UNKNOWN (exit 2), never failed.
|
|
18
|
+
Exit 0 analysis ok; 2 UNKNOWN (could not decide) or bad arguments; 127 ffprobe or python missing.
|
|
19
|
+
`;
|
|
20
|
+
const FLAGS = {
|
|
21
|
+
words: { type: "string" },
|
|
22
|
+
tokens: { type: "string" },
|
|
23
|
+
out: { type: "string" },
|
|
24
|
+
python: { type: "string" },
|
|
25
|
+
};
|
|
26
|
+
const FFMPEG_HINT = "mk: ffprobe not found; install ffmpeg and put it on PATH";
|
|
27
|
+
const DOCTOR_HINT = "Run `mk doctor` for the voice setup steps.";
|
|
28
|
+
const isExit = (value) => typeof value === "object" && value !== null && value.kind === "exit";
|
|
29
|
+
/** One ffprobe duration probe; unreadable audio is UNKNOWN, never failed. */
|
|
30
|
+
async function measureDuration(io, audio) {
|
|
31
|
+
const probed = await probeMedia(io, audio);
|
|
32
|
+
if (!probed.ok && probed.kind === "missing-tool") {
|
|
33
|
+
io.stderr(`${FFMPEG_HINT}\n`);
|
|
34
|
+
return { kind: "exit", code: EXIT.MISSING_TOOL };
|
|
35
|
+
}
|
|
36
|
+
if (!probed.ok) {
|
|
37
|
+
io.stderr(`mk analyze: could not read audio: ${probed.reason}; result is UNKNOWN\n`);
|
|
38
|
+
return { kind: "exit", code: EXIT.USAGE };
|
|
39
|
+
}
|
|
40
|
+
const format = probed.probe.format;
|
|
41
|
+
const duration = Number(format?.duration);
|
|
42
|
+
return Number.isFinite(duration) && duration > 0 ? duration : undefined;
|
|
43
|
+
}
|
|
44
|
+
/** ffprobe silencedetect gate; missing ffprobe is 127, a failed gate is UNKNOWN. */
|
|
45
|
+
async function measureSilence(io, audio) {
|
|
46
|
+
const silence = await detectSilence(io.run, { audioPath: audio });
|
|
47
|
+
if (!silence.ok && silence.status === "missing") {
|
|
48
|
+
io.stderr(`${FFMPEG_HINT}\n`);
|
|
49
|
+
return { kind: "exit", code: EXIT.MISSING_TOOL };
|
|
50
|
+
}
|
|
51
|
+
if (!silence.ok) {
|
|
52
|
+
io.stderr(`mk analyze: silence gate failed: ${silence.hint}; result is UNKNOWN\n`);
|
|
53
|
+
return { kind: "exit", code: EXIT.USAGE };
|
|
54
|
+
}
|
|
55
|
+
return silence.intervals;
|
|
56
|
+
}
|
|
57
|
+
/** Known word timings from a JSON file; invalid content is a usage error. */
|
|
58
|
+
async function wordsFromFile(io, path) {
|
|
59
|
+
const loaded = await readJsonFile(path, io.host);
|
|
60
|
+
if (!loaded.ok) {
|
|
61
|
+
io.stderr(`mk analyze: ${loaded.message}\n`);
|
|
62
|
+
return { kind: "exit", code: EXIT.USAGE };
|
|
63
|
+
}
|
|
64
|
+
if (!Array.isArray(loaded.value)) {
|
|
65
|
+
return usageError("analyze", USAGE, "words file must be a JSON array", io);
|
|
66
|
+
}
|
|
67
|
+
return loaded.value;
|
|
68
|
+
}
|
|
69
|
+
const splitTokens = (text) => text.split(/\s+/).filter((w) => w.length > 0);
|
|
70
|
+
async function pickPython(io, explicit) {
|
|
71
|
+
if (explicit !== undefined)
|
|
72
|
+
return explicit;
|
|
73
|
+
const probe = await resolveVenvPython(io.run);
|
|
74
|
+
if (probe.ok)
|
|
75
|
+
return probe.python;
|
|
76
|
+
io.stderr(`mk analyze: ${probe.hint}\n${DOCTOR_HINT}\n`);
|
|
77
|
+
return { kind: "exit", code: EXIT.MISSING_TOOL };
|
|
78
|
+
}
|
|
79
|
+
/** Align known script text with the voice venv python; failures never fake words. */
|
|
80
|
+
async function wordsFromTokens(io, audio, text, explicitPython) {
|
|
81
|
+
const tokens = splitTokens(text);
|
|
82
|
+
if (tokens.length === 0) {
|
|
83
|
+
return usageError("analyze", USAGE, "--tokens needs at least one token", io);
|
|
84
|
+
}
|
|
85
|
+
const python = await pickPython(io, explicitPython);
|
|
86
|
+
if (isExit(python))
|
|
87
|
+
return python;
|
|
88
|
+
const aligned = await alignWords(io.run, { audioPath: audio, tokens, python });
|
|
89
|
+
if (!aligned.ok && aligned.status === "missing") {
|
|
90
|
+
io.stderr(`mk analyze: ${aligned.hint}\n${DOCTOR_HINT}\n`);
|
|
91
|
+
return { kind: "exit", code: EXIT.MISSING_TOOL };
|
|
92
|
+
}
|
|
93
|
+
if (!aligned.ok) {
|
|
94
|
+
io.stderr(`mk analyze: align failed: ${aligned.hint}; result is UNKNOWN\n`);
|
|
95
|
+
return { kind: "exit", code: EXIT.USAGE };
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
words: aligned.words,
|
|
99
|
+
model: ALIGN_MODEL_ID,
|
|
100
|
+
modelRevision: VOICE_PROVENANCE.alignModelRev,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/** Words plus optional model provenance from --words or --tokens. */
|
|
104
|
+
async function loadWords(io, audio, wordsPath, tokens, python) {
|
|
105
|
+
if (wordsPath === undefined && tokens === undefined) {
|
|
106
|
+
io.stderr("mk analyze: no --words or --tokens; word timings are UNKNOWN\n");
|
|
107
|
+
return { kind: "exit", code: EXIT.USAGE };
|
|
108
|
+
}
|
|
109
|
+
if (wordsPath !== undefined) {
|
|
110
|
+
const words = await wordsFromFile(io, wordsPath);
|
|
111
|
+
if (isExit(words))
|
|
112
|
+
return words;
|
|
113
|
+
return { words };
|
|
114
|
+
}
|
|
115
|
+
return wordsFromTokens(io, audio, tokens, python);
|
|
116
|
+
}
|
|
117
|
+
/** Validate against the schema and emit (stdout JSON, or --out file plus a summary). */
|
|
118
|
+
async function emitAnalysis(io, input, out) {
|
|
119
|
+
const validated = AudioAnalysisSchema.safeParse(input);
|
|
120
|
+
if (!validated.success) {
|
|
121
|
+
const problems = validated.error.issues
|
|
122
|
+
.map((issue) => `${issue.path.join("/")}: ${issue.message}`)
|
|
123
|
+
.join("; ");
|
|
124
|
+
io.stderr(`mk analyze: refusing invalid analysis: ${problems}\n`);
|
|
125
|
+
return EXIT.USAGE;
|
|
126
|
+
}
|
|
127
|
+
const json = `${JSON.stringify(validated.data)}\n`;
|
|
128
|
+
if (out === undefined) {
|
|
129
|
+
io.stdout(json);
|
|
130
|
+
return EXIT.OK;
|
|
131
|
+
}
|
|
132
|
+
await io.host.writeTextAtomic(out, json);
|
|
133
|
+
io.stdout(`analyze ok | ${validated.data.words.length} words -> ${out}\n`);
|
|
134
|
+
return EXIT.OK;
|
|
135
|
+
}
|
|
136
|
+
const silencesOf = (intervals) => intervals.length === 0 ? undefined : intervals.map(([start, end]) => ({ start, end }));
|
|
137
|
+
const analysisOf = (source, intervals, duration) => {
|
|
138
|
+
const silences = silencesOf(intervals);
|
|
139
|
+
return {
|
|
140
|
+
words: source.words,
|
|
141
|
+
...(silences === undefined ? {} : { silences }),
|
|
142
|
+
...(duration === undefined ? {} : { duration }),
|
|
143
|
+
...(source.model === undefined ? {} : { model: source.model }),
|
|
144
|
+
...(source.modelRevision === undefined ? {} : { modelRevision: source.modelRevision }),
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/** Flags plus the positional audio path, or the usage failure to exit with. */
|
|
148
|
+
async function resolveInput(args, io) {
|
|
149
|
+
const parsed = parseFlags("analyze", USAGE, args, FLAGS, io);
|
|
150
|
+
if (parsed.kind === "exit")
|
|
151
|
+
return parsed;
|
|
152
|
+
const audio = requirePositional("analyze", USAGE, parsed.positionals, "<audio.wav>", io);
|
|
153
|
+
if (typeof audio !== "string")
|
|
154
|
+
return audio;
|
|
155
|
+
if (!(await io.host.exists(audio))) {
|
|
156
|
+
io.stderr(`mk analyze: cannot read ${audio}; check the path.\n`);
|
|
157
|
+
return { kind: "exit", code: EXIT.USAGE };
|
|
158
|
+
}
|
|
159
|
+
const wordsPath = textFlag(parsed.flags, "words");
|
|
160
|
+
const tokens = textFlag(parsed.flags, "tokens");
|
|
161
|
+
if (wordsPath !== undefined && tokens !== undefined) {
|
|
162
|
+
return usageError("analyze", USAGE, "use only one of --words or --tokens", io);
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
audio,
|
|
166
|
+
wordsPath,
|
|
167
|
+
tokens,
|
|
168
|
+
python: textFlag(parsed.flags, "python"),
|
|
169
|
+
out: textFlag(parsed.flags, "out"),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
export const analyzeCommand = {
|
|
173
|
+
name: "analyze",
|
|
174
|
+
summary: "analyze voice audio into AudioAnalysis JSON (words, silences, duration)",
|
|
175
|
+
async run(args, io) {
|
|
176
|
+
const input = await resolveInput(args, io);
|
|
177
|
+
if (isExit(input))
|
|
178
|
+
return input.code;
|
|
179
|
+
const duration = await measureDuration(io, input.audio);
|
|
180
|
+
if (isExit(duration))
|
|
181
|
+
return duration.code;
|
|
182
|
+
const intervals = await measureSilence(io, input.audio);
|
|
183
|
+
if (isExit(intervals))
|
|
184
|
+
return intervals.code;
|
|
185
|
+
const source = await loadWords(io, input.audio, input.wordsPath, input.tokens, input.python);
|
|
186
|
+
if (isExit(source))
|
|
187
|
+
return source.code;
|
|
188
|
+
return emitAnalysis(io, analysisOf(source, intervals, duration), input.out);
|
|
189
|
+
},
|
|
190
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Host } from "../types.ts";
|
|
2
|
+
import { type ApprovalBuildOptions, type ApprovalInputManifest } from "./hash.ts";
|
|
3
|
+
export declare const APPROVAL_FILE = "approval.json";
|
|
4
|
+
export declare const approvalPath: (storyboard: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* How the receipt was minted (ADR-0014 option C). `human` is minted only from an
|
|
7
|
+
* interactive terminal with no agent/automation marker; `automated` is the only
|
|
8
|
+
* label `--automation` can write, and it never satisfies `mk render --gated`.
|
|
9
|
+
*/
|
|
10
|
+
export type ApprovalKind = "human" | "automated";
|
|
11
|
+
export interface Approval {
|
|
12
|
+
readonly inputManifest: ApprovalInputManifest;
|
|
13
|
+
readonly inputManifestSha256: string;
|
|
14
|
+
readonly previewManifestSha: string;
|
|
15
|
+
readonly approvedAt: string;
|
|
16
|
+
readonly note: string;
|
|
17
|
+
readonly approvalKind: ApprovalKind;
|
|
18
|
+
}
|
|
19
|
+
export type ApprovalScope = "visual" | "audiovisual";
|
|
20
|
+
export type ApprovalState = {
|
|
21
|
+
state: "approved";
|
|
22
|
+
hash: string;
|
|
23
|
+
scope?: ApprovalScope;
|
|
24
|
+
approvalKind: ApprovalKind;
|
|
25
|
+
} | {
|
|
26
|
+
state: "missing" | "stale";
|
|
27
|
+
hash: string;
|
|
28
|
+
scope?: ApprovalScope;
|
|
29
|
+
};
|
|
30
|
+
/** The stored approval, or undefined when absent, malformed or legacy. */
|
|
31
|
+
export declare function readApproval(host: Host, storyboard: string): Promise<Approval | undefined>;
|
|
32
|
+
export declare function writeApproval(host: Host, storyboard: string, approval: Approval): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Does an approval match the CURRENT inputs (visual, audiovisual, music-only or
|
|
35
|
+
* audiovisual+music)? Fails
|
|
36
|
+
* closed: any legacy receipt is `stale` (re-preview + re-approve), missing
|
|
37
|
+
* file is `missing`. A visual-only receipt never authorizes audio: resolving
|
|
38
|
+
* with --audio or --music recomputes the audiovisual hash, which cannot match.
|
|
39
|
+
* A narration-only receipt never authorizes --music: the music
|
|
40
|
+
* {path,sha256,volume,licenseEvidenceSha256} binding changes the hash.
|
|
41
|
+
* Rejects when inputs are unreadable (missing asset, ledger, wav…).
|
|
42
|
+
*/
|
|
43
|
+
export declare function approvalState(host: Host, storyboard: string, opts?: ApprovalBuildOptions): Promise<ApprovalState>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { buildApprovalInputManifest, hashApprovalInput, mkDir, readSidecar, } from "./hash.js";
|
|
3
|
+
export const APPROVAL_FILE = "approval.json";
|
|
4
|
+
export const approvalPath = (storyboard) => join(mkDir(storyboard), APPROVAL_FILE);
|
|
5
|
+
const HEX64 = /^[a-f0-9]{64}$/;
|
|
6
|
+
const isManifestRef = (value) => {
|
|
7
|
+
const row = value;
|
|
8
|
+
return (typeof row === "object" &&
|
|
9
|
+
row !== null &&
|
|
10
|
+
typeof row.path === "string" &&
|
|
11
|
+
typeof row.sha256 === "string" &&
|
|
12
|
+
row.sha256.length === 64);
|
|
13
|
+
};
|
|
14
|
+
const everyManifestRef = (value) => Array.isArray(value) && value.every(isManifestRef);
|
|
15
|
+
const hasLedger = (value) => value === undefined || (typeof value === "string" && HEX64.test(value));
|
|
16
|
+
const isMixClip = (value) => {
|
|
17
|
+
const row = value;
|
|
18
|
+
return (typeof row === "object" &&
|
|
19
|
+
row !== null &&
|
|
20
|
+
typeof row.id === "string" &&
|
|
21
|
+
typeof row.start === "number" &&
|
|
22
|
+
typeof row.wavSha === "string" &&
|
|
23
|
+
row.wavSha.length === 64);
|
|
24
|
+
};
|
|
25
|
+
const isMix = (value) => {
|
|
26
|
+
const row = value;
|
|
27
|
+
if (typeof row !== "object" || row === null)
|
|
28
|
+
return false;
|
|
29
|
+
if (row.mode !== "single" && row.mode !== "concat" && row.mode !== "adelay")
|
|
30
|
+
return false;
|
|
31
|
+
return Array.isArray(row.clips) && row.clips.every(isMixClip);
|
|
32
|
+
};
|
|
33
|
+
const isMusic = (value) => {
|
|
34
|
+
const row = value;
|
|
35
|
+
if (typeof row !== "object" || row === null)
|
|
36
|
+
return false;
|
|
37
|
+
if (typeof row.path !== "string" || row.path.length === 0)
|
|
38
|
+
return false;
|
|
39
|
+
if (typeof row.sha256 !== "string" || !HEX64.test(row.sha256))
|
|
40
|
+
return false;
|
|
41
|
+
if (typeof row.volume !== "number" ||
|
|
42
|
+
!Number.isFinite(row.volume) ||
|
|
43
|
+
row.volume <= 0 ||
|
|
44
|
+
row.volume > 1)
|
|
45
|
+
return false;
|
|
46
|
+
const lic = row.licenseEvidenceSha256;
|
|
47
|
+
return lic === null || (typeof lic === "string" && HEX64.test(lic));
|
|
48
|
+
};
|
|
49
|
+
const hasMusic = (value) => value === undefined || isMusic(value);
|
|
50
|
+
const isApprovalManifest = (value) => {
|
|
51
|
+
const manifest = value;
|
|
52
|
+
if (typeof manifest !== "object" || manifest === null)
|
|
53
|
+
return false;
|
|
54
|
+
if (manifest.scope !== "visual" && manifest.scope !== "audiovisual")
|
|
55
|
+
return false;
|
|
56
|
+
if (!isManifestRef(manifest.storyboard))
|
|
57
|
+
return false;
|
|
58
|
+
if (!everyManifestRef(manifest.themes))
|
|
59
|
+
return false;
|
|
60
|
+
if (!everyManifestRef(manifest.assets))
|
|
61
|
+
return false;
|
|
62
|
+
if (!everyManifestRef(manifest.audio))
|
|
63
|
+
return false;
|
|
64
|
+
if (!hasLedger(manifest.ledgerSha256))
|
|
65
|
+
return false;
|
|
66
|
+
if (manifest.interaction !== undefined && !isManifestRef(manifest.interaction))
|
|
67
|
+
return false;
|
|
68
|
+
if (manifest.scope === "visual") {
|
|
69
|
+
if ((manifest.audio ?? []).length !== 0)
|
|
70
|
+
return false;
|
|
71
|
+
if (manifest.audioManifest !== undefined || manifest.mix !== undefined)
|
|
72
|
+
return false;
|
|
73
|
+
if (manifest.music !== undefined)
|
|
74
|
+
return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
// Audiovisual covers narration (+ optional bed) and the music-only film where
|
|
78
|
+
// narration is explicitly absent. A music-only receipt has no audio manifest,
|
|
79
|
+
// no mix and no invented speech track: only the bed identity is present.
|
|
80
|
+
if ((manifest.audio ?? []).length === 0) {
|
|
81
|
+
if (manifest.audioManifest !== undefined || manifest.mix !== undefined)
|
|
82
|
+
return false;
|
|
83
|
+
return isMusic(manifest.music);
|
|
84
|
+
}
|
|
85
|
+
if (!isManifestRef(manifest.audioManifest))
|
|
86
|
+
return false;
|
|
87
|
+
if (!isMix(manifest.mix))
|
|
88
|
+
return false;
|
|
89
|
+
return hasMusic(manifest.music);
|
|
90
|
+
};
|
|
91
|
+
const isApprovalKind = (value) => value === "human" || value === "automated";
|
|
92
|
+
const isApprovalReceiptFields = (row) => typeof row.inputManifestSha256 === "string" &&
|
|
93
|
+
HEX64.test(row.inputManifestSha256) &&
|
|
94
|
+
typeof row.previewManifestSha === "string" &&
|
|
95
|
+
typeof row.approvedAt === "string" &&
|
|
96
|
+
typeof row.note === "string" &&
|
|
97
|
+
isApprovalKind(row.approvalKind);
|
|
98
|
+
const isApproval = (value) => {
|
|
99
|
+
const row = value;
|
|
100
|
+
if (typeof row !== "object" || row === null)
|
|
101
|
+
return false;
|
|
102
|
+
if (!isApprovalManifest(row.inputManifest))
|
|
103
|
+
return false;
|
|
104
|
+
return isApprovalReceiptFields(row);
|
|
105
|
+
};
|
|
106
|
+
/** The stored approval, or undefined when absent, malformed or legacy. */
|
|
107
|
+
export async function readApproval(host, storyboard) {
|
|
108
|
+
try {
|
|
109
|
+
const parsed = JSON.parse(await readSidecar(host, storyboard, APPROVAL_FILE));
|
|
110
|
+
return isApproval(parsed) ? parsed : undefined;
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export async function writeApproval(host, storyboard, approval) {
|
|
117
|
+
const path = approvalPath(storyboard);
|
|
118
|
+
await host.writeText(path, `${JSON.stringify(approval, null, 2)}\n`);
|
|
119
|
+
return path;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Does an approval match the CURRENT inputs (visual, audiovisual, music-only or
|
|
123
|
+
* audiovisual+music)? Fails
|
|
124
|
+
* closed: any legacy receipt is `stale` (re-preview + re-approve), missing
|
|
125
|
+
* file is `missing`. A visual-only receipt never authorizes audio: resolving
|
|
126
|
+
* with --audio or --music recomputes the audiovisual hash, which cannot match.
|
|
127
|
+
* A narration-only receipt never authorizes --music: the music
|
|
128
|
+
* {path,sha256,volume,licenseEvidenceSha256} binding changes the hash.
|
|
129
|
+
* Rejects when inputs are unreadable (missing asset, ledger, wav…).
|
|
130
|
+
*/
|
|
131
|
+
export async function approvalState(host, storyboard, opts = {}) {
|
|
132
|
+
const manifest = await buildApprovalInputManifest(host, storyboard, opts);
|
|
133
|
+
const hash = hashApprovalInput(manifest);
|
|
134
|
+
let raw;
|
|
135
|
+
try {
|
|
136
|
+
raw = await readSidecar(host, storyboard, APPROVAL_FILE);
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
return { state: "missing", hash };
|
|
140
|
+
}
|
|
141
|
+
let parsed;
|
|
142
|
+
try {
|
|
143
|
+
parsed = JSON.parse(raw);
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
return { state: "stale", hash };
|
|
147
|
+
}
|
|
148
|
+
if (!isApproval(parsed))
|
|
149
|
+
return { state: "stale", hash };
|
|
150
|
+
// The recorded scope lets a refusal say WHY it differs (silent render, audible approval).
|
|
151
|
+
const scope = parsed.inputManifest.scope === "audiovisual" ? "audiovisual" : "visual";
|
|
152
|
+
return parsed.inputManifestSha256 === hash
|
|
153
|
+
? { state: "approved", hash, scope, approvalKind: parsed.approvalKind }
|
|
154
|
+
: { state: "stale", hash, scope };
|
|
155
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { parseFlags, requireStoryboard, textFlag } from "../args.js";
|
|
4
|
+
import { EXIT } from "../exit-codes.js";
|
|
5
|
+
import { defaultOut, previewManifestPath } from "../preview/manifest.js";
|
|
6
|
+
import { writeApproval } from "./approval.js";
|
|
7
|
+
import { buildApprovalInputManifest, hashApprovalInput, } from "./hash.js";
|
|
8
|
+
const USAGE = `mk approve <storyboard.json> [--note "<user words>"] [--automation] [--out <dir>] [--assets <dir>] [--ledger file] [--audio manifest] [--music <bed.wav>] [--music-volume <n>] [--music-license <file>] [--interaction <interaction.json>]
|
|
9
|
+
|
|
10
|
+
Record the user's approval of the CURRENT inputs (visual, audiovisual, music-only or audiovisual+music) in <storyboard dir>/.mk/<name>/approval.json.
|
|
11
|
+
Run it only after the user has seen the preview pack and said an explicit yes. Opt-in music is covered by the same gate (no parallel gate).
|
|
12
|
+
Refuses (exit 2) when <out>/<name>.preview/preview.json does not exist for the current inputs: run \`mk preview\` first.
|
|
13
|
+
Refuses (exit 2) outside an interactive terminal with no agent/automation marker: only a human can label an approval "human".
|
|
14
|
+
Every preview input (assets, ledger, audio, music, volume, license) is inferred from the pack; an explicit flag
|
|
15
|
+
must match the pack or the command exits 2 naming the difference.
|
|
16
|
+
Any later edit to the storyboard, its themes, its referenced assets or its ledger, or (for audiovisual) its audio manifest, wavs, mix, bed, volume or license receipt re-arms \`mk render --gated\` (exit 4).
|
|
17
|
+
--note the user's words, stored with the approval
|
|
18
|
+
--automation record approvalKind "automated"; this receipt can never satisfy \`mk render --gated\`
|
|
19
|
+
--out d the --out used for \`mk preview\` (default <storyboard dir>/out)
|
|
20
|
+
--assets d the --assets used for \`mk preview\` (default: none)
|
|
21
|
+
--ledger f the --ledger used for preview (default: none)
|
|
22
|
+
--audio manifest the --audio used for preview (default: none; mismatch exits 2)
|
|
23
|
+
--music <bed.wav> the --music bed used for preview (mismatch exits 2); without --audio this is a music-only film
|
|
24
|
+
--music-volume <n> the --music-volume used for preview (within (0, 1])
|
|
25
|
+
--music-license <file> the --music-license used for preview (hash only)
|
|
26
|
+
--interaction <file> the --interaction used for preview (ADR-0013 transcript); it is
|
|
27
|
+
part of the approval hash, so an edit re-arms \`mk render --gated\`
|
|
28
|
+
`;
|
|
29
|
+
/**
|
|
30
|
+
* ADR-0014 option C: the measured agent/automation markers, never `TERM_PROGRAM`
|
|
31
|
+
* (a human terminal exports it into agent tool shells too). The terminal test is
|
|
32
|
+
* load-bearing; markers only make an accidental human label less likely.
|
|
33
|
+
*/
|
|
34
|
+
const AGENT_ENV_MARKERS = ["OPENCODE", "OPENCODE_SESSION_ID", "CLAUDECODE", "CI"];
|
|
35
|
+
/** A human context is an interactive terminal with no agent/automation marker. */
|
|
36
|
+
const isHumanContext = (host) => host.tty === true && !AGENT_ENV_MARKERS.some((marker) => host.env?.[marker] !== undefined);
|
|
37
|
+
const previewed = (text) => {
|
|
38
|
+
try {
|
|
39
|
+
const parsed = JSON.parse(text);
|
|
40
|
+
if (parsed.inputManifest !== undefined && parsed.inputManifestSha256 !== undefined) {
|
|
41
|
+
return {
|
|
42
|
+
inputManifest: parsed.inputManifest,
|
|
43
|
+
inputManifestSha256: parsed.inputManifestSha256,
|
|
44
|
+
audioMix: parsed.audioMix,
|
|
45
|
+
clip: parsed.clip,
|
|
46
|
+
inputs: parsed.inputs,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
56
|
+
/** The pack's recorded invocation inputs; absent only when the pack predates A4. */
|
|
57
|
+
const recordedInputs = (value) => {
|
|
58
|
+
if (!isRecord(value))
|
|
59
|
+
return undefined;
|
|
60
|
+
const path = (key) => typeof value[key] === "string" ? value[key] : null;
|
|
61
|
+
return {
|
|
62
|
+
assetsDir: path("assetsDir"),
|
|
63
|
+
ledger: path("ledger"),
|
|
64
|
+
audioManifest: path("audioManifest"),
|
|
65
|
+
music: path("music"),
|
|
66
|
+
musicVolume: typeof value.musicVolume === "number" ? value.musicVolume : null,
|
|
67
|
+
musicLicense: path("musicLicense"),
|
|
68
|
+
interaction: path("interaction"),
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* A4: an explicit flag must agree with what the pack recorded; when omitted, the
|
|
73
|
+
* recorded input is reused. Returns the value to resolve with (or an exit code).
|
|
74
|
+
*/
|
|
75
|
+
const pickInput = (name, flag, recorded, io) => {
|
|
76
|
+
if (flag === undefined)
|
|
77
|
+
return recorded ?? undefined;
|
|
78
|
+
if (recorded !== null && resolve(flag) !== recorded) {
|
|
79
|
+
io.stderr(`mk approve: --${name} differs from the preview pack (${recorded}); drop the flag to use the previewed input, or run \`mk preview\` again with this value\n`);
|
|
80
|
+
return EXIT.USAGE;
|
|
81
|
+
}
|
|
82
|
+
return flag;
|
|
83
|
+
};
|
|
84
|
+
const pickVolume = (flag, recorded, io) => {
|
|
85
|
+
if (flag === undefined)
|
|
86
|
+
return { ok: true, value: recorded ?? undefined };
|
|
87
|
+
if (recorded !== null && flag !== recorded) {
|
|
88
|
+
io.stderr(`mk approve: --music-volume differs from the preview pack (${recorded}); drop the flag to use the previewed level, or run \`mk preview\` again\n`);
|
|
89
|
+
return { ok: false, code: EXIT.USAGE };
|
|
90
|
+
}
|
|
91
|
+
return { ok: true, value: flag };
|
|
92
|
+
};
|
|
93
|
+
const resolveInputs = async (io, storyboard, assetsDir, ledgerPath, audioManifest, musicPath, musicVolume, musicLicensePath, interactionPath) => {
|
|
94
|
+
try {
|
|
95
|
+
const manifest = await buildApprovalInputManifest(io.host, storyboard, {
|
|
96
|
+
...(assetsDir === undefined ? {} : { assetsDir: resolve(assetsDir) }),
|
|
97
|
+
...(ledgerPath === undefined ? {} : { ledgerPath }),
|
|
98
|
+
...(audioManifest === undefined ? {} : { audioManifest }),
|
|
99
|
+
...(musicPath === undefined ? {} : { music: musicPath }),
|
|
100
|
+
...(musicVolume === undefined ? {} : { musicVolume }),
|
|
101
|
+
...(musicLicensePath === undefined ? {} : { musicLicense: musicLicensePath }),
|
|
102
|
+
...(interactionPath === undefined ? {} : { interaction: interactionPath }),
|
|
103
|
+
});
|
|
104
|
+
return { manifest, hash: hashApprovalInput(manifest) };
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
io.stderr(`mk approve: cannot resolve approval inputs: ${error.message}\n`);
|
|
108
|
+
return EXIT.USAGE;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const stalePreview = (io, storyboard, reason) => {
|
|
112
|
+
io.stderr(`mk approve: ${reason}; run \`mk preview ${storyboard}\` again and show it to the user\n`);
|
|
113
|
+
return EXIT.USAGE;
|
|
114
|
+
};
|
|
115
|
+
/** Verifies a preview binding; returns its sha or an exit code. */
|
|
116
|
+
const verifyBinding = (io, storyboard, inputManifest, inputManifestSha256) => {
|
|
117
|
+
if (typeof inputManifestSha256 !== "string" || !/^[a-f0-9]{64}$/.test(inputManifestSha256)) {
|
|
118
|
+
return stalePreview(io, storyboard, "the preview binding is malformed");
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
const recomputed = hashApprovalInput(inputManifest);
|
|
122
|
+
if (recomputed !== inputManifestSha256) {
|
|
123
|
+
return stalePreview(io, storyboard, "the preview binding is tampered (sha mismatch)");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return stalePreview(io, storyboard, "the preview binding is malformed");
|
|
128
|
+
}
|
|
129
|
+
return inputManifestSha256;
|
|
130
|
+
};
|
|
131
|
+
const approvePreview = async (io, resolved) => {
|
|
132
|
+
const preview = previewed(resolved.manifestText);
|
|
133
|
+
if (preview === undefined) {
|
|
134
|
+
return stalePreview(io, resolved.storyboard, "the preview is missing the visual input binding");
|
|
135
|
+
}
|
|
136
|
+
// RA-02: an audiovisual approval is only valid after the user heard a
|
|
137
|
+
// playable mixed clip. Silent or skipped clips never authorize audio;
|
|
138
|
+
// visual-only approvals are unaffected. AU-01: a music receipt is only valid
|
|
139
|
+
// after an audible clip mixed with the same bed (musicSha/volume/license).
|
|
140
|
+
if (resolved.inputs.manifest.scope === "audiovisual") {
|
|
141
|
+
const mix = preview.audioMix;
|
|
142
|
+
const clip = preview.clip;
|
|
143
|
+
const previewScope = preview.inputManifest?.scope;
|
|
144
|
+
const heard = mix?.audible === true && clip?.status === "ok" && previewScope === "audiovisual";
|
|
145
|
+
const narrated = resolved.inputs.manifest.audio.length > 0;
|
|
146
|
+
const previewFix = narrated || resolved.inputs.manifest.music === undefined
|
|
147
|
+
? `--audio <manifest>${resolved.inputs.manifest.music === undefined ? "" : " --music <bed>"}`
|
|
148
|
+
: "--music <bed>";
|
|
149
|
+
if (!heard) {
|
|
150
|
+
const detail = previewScope !== "audiovisual"
|
|
151
|
+
? "the preview is silent (scope visual)"
|
|
152
|
+
: clip?.status !== "ok"
|
|
153
|
+
? `the preview clip was ${typeof clip?.status === "string" ? clip.status : "missing"}${typeof clip?.reason === "string" ? ` (${clip.reason})` : ""}`
|
|
154
|
+
: "the preview is not audible (audible:false, unheard mix)";
|
|
155
|
+
io.stderr(`mk approve: refusing audiovisual approval: ${detail}; regenerate an audible preview with \`mk preview ${resolved.storyboard} ${previewFix}\` and show clip.mp4 to the user before approving\n`);
|
|
156
|
+
return EXIT.USAGE;
|
|
157
|
+
}
|
|
158
|
+
const wantMusic = resolved.inputs.manifest.music;
|
|
159
|
+
if (wantMusic !== undefined) {
|
|
160
|
+
const heardMusic = mix?.musicSha === wantMusic.sha256 &&
|
|
161
|
+
mix?.musicVolume === wantMusic.volume &&
|
|
162
|
+
mix?.musicLicenseSha === wantMusic.licenseEvidenceSha256;
|
|
163
|
+
if (!heardMusic) {
|
|
164
|
+
io.stderr(`mk approve: refusing music approval: the preview clip was not mixed with this bed/volume/license; regenerate an audible preview with \`mk preview ${resolved.storyboard} ${previewFix}\` and show clip.mp4 to the user before approving\n`);
|
|
165
|
+
return EXIT.USAGE;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
const previewMusic = preview.inputManifest?.music;
|
|
170
|
+
if (previewMusic !== undefined) {
|
|
171
|
+
return stalePreview(io, resolved.storyboard, "the preview is for an older version of the inputs (music mismatch)");
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const verified = verifyBinding(io, resolved.storyboard, preview.inputManifest, preview.inputManifestSha256);
|
|
176
|
+
if (typeof verified === "number")
|
|
177
|
+
return verified;
|
|
178
|
+
if (resolved.inputs.hash !== verified) {
|
|
179
|
+
return stalePreview(io, resolved.storyboard, "the preview is for an older version of the inputs (edited since, or --audio mismatch)");
|
|
180
|
+
}
|
|
181
|
+
await writeApproval(io.host, resolved.storyboard, {
|
|
182
|
+
inputManifest: resolved.inputs.manifest,
|
|
183
|
+
inputManifestSha256: resolved.inputs.hash,
|
|
184
|
+
previewManifestSha: resolved.previewManifestSha,
|
|
185
|
+
approvedAt: new Date().toISOString(),
|
|
186
|
+
note: resolved.note,
|
|
187
|
+
approvalKind: resolved.approvalKind,
|
|
188
|
+
});
|
|
189
|
+
io.stdout(resolved.approvalKind === "human"
|
|
190
|
+
? `approved ${resolved.inputs.hash.slice(0, 12)} | mk render ${resolved.storyboard} --gated\n`
|
|
191
|
+
: `approved ${resolved.inputs.hash.slice(0, 12)} (automated) | mk render --gated refuses an automated receipt; a human must run mk approve in an interactive terminal\n`);
|
|
192
|
+
return EXIT.OK;
|
|
193
|
+
};
|
|
194
|
+
export const approveCommand = {
|
|
195
|
+
name: "approve",
|
|
196
|
+
summary: "record the user's approval of the previewed storyboard",
|
|
197
|
+
async run(args, io) {
|
|
198
|
+
const flags = {
|
|
199
|
+
note: { type: "string" },
|
|
200
|
+
automation: { type: "boolean" },
|
|
201
|
+
out: { type: "string" },
|
|
202
|
+
assets: { type: "string" },
|
|
203
|
+
ledger: { type: "string" },
|
|
204
|
+
audio: { type: "string" },
|
|
205
|
+
music: { type: "string" },
|
|
206
|
+
"music-volume": { type: "string" },
|
|
207
|
+
"music-license": { type: "string" },
|
|
208
|
+
interaction: { type: "string" },
|
|
209
|
+
};
|
|
210
|
+
const parsed = parseFlags("approve", USAGE, args, flags, io);
|
|
211
|
+
if (parsed.kind === "exit")
|
|
212
|
+
return parsed.code;
|
|
213
|
+
const storyboard = requireStoryboard("approve", USAGE, parsed.positionals, io);
|
|
214
|
+
if (typeof storyboard !== "string")
|
|
215
|
+
return storyboard.code;
|
|
216
|
+
// ADR-0014 option C: an agent or non-interactive caller cannot mint a human
|
|
217
|
+
// label. `--automation` leaves a truthful record that never satisfies the gate.
|
|
218
|
+
const automated = parsed.flags.automation === true;
|
|
219
|
+
if (!automated && !isHumanContext(io.host)) {
|
|
220
|
+
io.stderr("mk approve: refusing to label an approval human from this context: a human must run this command in an interactive terminal; --automation records an automated receipt that can never satisfy `mk render --gated`\n");
|
|
221
|
+
return EXIT.USAGE;
|
|
222
|
+
}
|
|
223
|
+
const approvalKind = automated ? "automated" : "human";
|
|
224
|
+
const musicRaw = textFlag(parsed.flags, "music-volume");
|
|
225
|
+
let musicVolume;
|
|
226
|
+
if (musicRaw !== undefined) {
|
|
227
|
+
musicVolume = Number(musicRaw);
|
|
228
|
+
if (!Number.isFinite(musicVolume) || musicVolume <= 0 || musicVolume > 1) {
|
|
229
|
+
io.stderr("mk approve: --music-volume must be within (0, 1]\n");
|
|
230
|
+
return EXIT.USAGE;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const out = resolve(textFlag(parsed.flags, "out") ?? defaultOut(storyboard));
|
|
234
|
+
const manifestFile = previewManifestPath(out, storyboard);
|
|
235
|
+
let manifestText;
|
|
236
|
+
try {
|
|
237
|
+
manifestText = await io.host.readText(manifestFile);
|
|
238
|
+
}
|
|
239
|
+
catch {
|
|
240
|
+
io.stderr(`mk approve: no preview for this storyboard (${manifestFile} is missing); run \`mk preview ${storyboard}\` and show it to the user first\n`);
|
|
241
|
+
return EXIT.USAGE;
|
|
242
|
+
}
|
|
243
|
+
const previewManifestSha = createHash("sha256").update(manifestText).digest("hex");
|
|
244
|
+
// A4: the pack records the inputs it was made with; omitted flags reuse them.
|
|
245
|
+
const recorded = recordedInputs(previewed(manifestText)?.inputs);
|
|
246
|
+
const assetsDir = pickInput("assets", textFlag(parsed.flags, "assets"), recorded?.assetsDir ?? null, io);
|
|
247
|
+
if (typeof assetsDir === "number")
|
|
248
|
+
return assetsDir;
|
|
249
|
+
const ledgerPath = pickInput("ledger", textFlag(parsed.flags, "ledger"), recorded?.ledger ?? null, io);
|
|
250
|
+
if (typeof ledgerPath === "number")
|
|
251
|
+
return ledgerPath;
|
|
252
|
+
const audioFlag = pickInput("audio", textFlag(parsed.flags, "audio"), recorded?.audioManifest ?? null, io);
|
|
253
|
+
if (typeof audioFlag === "number")
|
|
254
|
+
return audioFlag;
|
|
255
|
+
const musicPath = pickInput("music", textFlag(parsed.flags, "music"), recorded?.music ?? null, io);
|
|
256
|
+
if (typeof musicPath === "number")
|
|
257
|
+
return musicPath;
|
|
258
|
+
const mergedVolume = pickVolume(musicVolume, recorded?.musicVolume ?? null, io);
|
|
259
|
+
if (!mergedVolume.ok)
|
|
260
|
+
return mergedVolume.code;
|
|
261
|
+
musicVolume = mergedVolume.value;
|
|
262
|
+
const musicLicensePath = pickInput("music-license", textFlag(parsed.flags, "music-license"), recorded?.musicLicense ?? null, io);
|
|
263
|
+
if (typeof musicLicensePath === "number")
|
|
264
|
+
return musicLicensePath;
|
|
265
|
+
if ((musicVolume !== undefined || musicLicensePath !== undefined) && musicPath === undefined) {
|
|
266
|
+
io.stderr("mk approve: --music-volume/--music-license need --music\n");
|
|
267
|
+
return EXIT.USAGE;
|
|
268
|
+
}
|
|
269
|
+
const interactionPath = pickInput("interaction", textFlag(parsed.flags, "interaction"), recorded?.interaction ?? null, io);
|
|
270
|
+
if (typeof interactionPath === "number")
|
|
271
|
+
return interactionPath;
|
|
272
|
+
const inputs = await resolveInputs(io, storyboard, assetsDir, ledgerPath, audioFlag, musicPath, musicVolume, musicLicensePath, interactionPath);
|
|
273
|
+
if (typeof inputs === "number")
|
|
274
|
+
return inputs;
|
|
275
|
+
const note = textFlag(parsed.flags, "note") ?? "";
|
|
276
|
+
const resolved = {
|
|
277
|
+
storyboard,
|
|
278
|
+
inputs,
|
|
279
|
+
manifestText,
|
|
280
|
+
previewManifestSha,
|
|
281
|
+
note,
|
|
282
|
+
approvalKind,
|
|
283
|
+
};
|
|
284
|
+
return approvePreview(io, resolved);
|
|
285
|
+
},
|
|
286
|
+
};
|