@prestyj/cli 5.28.0 → 5.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/assets/motion/THIRD-PARTY.md +14 -19
- package/assets/motion/bin/contact-sheet.mjs +9 -3
- package/assets/motion/bin/cues.mjs +337 -0
- package/assets/motion/bin/flash-check.mjs +314 -0
- package/assets/motion/bin/fonts.mjs +17 -13
- package/assets/motion/bin/library.mjs +61 -18
- package/assets/motion/bin/motion-blur.mjs +943 -0
- package/assets/motion/bin/motion-check.mjs +366 -9
- package/assets/motion/bin/music-fit.mjs +436 -0
- package/assets/motion/bin/pdf-extract.mjs +22 -10
- package/assets/motion/bin/reference-study.mjs +346 -0
- package/assets/motion/bin/score-synth.mjs +1052 -93
- package/assets/motion/fonts/finger-paint/OFL.txt +93 -0
- package/assets/motion/fonts/finger-paint/finger-paint-normal.woff2 +0 -0
- package/assets/motion/fonts/fonts.json +56 -0
- package/assets/motion/fonts/short-stack/OFL.txt +94 -0
- package/assets/motion/fonts/short-stack/short-stack-normal.woff2 +0 -0
- package/assets/motion/fonts/sora/OFL.txt +93 -0
- package/assets/motion/fonts/sora/sora-normal.woff2 +0 -0
- package/assets/motion/fonts/specimen.jpg +0 -0
- package/assets/motion/fonts/unbounded/OFL.txt +93 -0
- package/assets/motion/fonts/unbounded/unbounded-normal.woff2 +0 -0
- package/assets/motion/library/README.md +52 -14
- package/assets/motion/library/kit/moves.js +1981 -0
- package/assets/motion/library/library.json +232 -0
- package/assets/motion/library/pieces/camera-rig/meta.json +13 -0
- package/assets/motion/library/pieces/camera-rig/piece.html +153 -0
- package/assets/motion/library/pieces/camera-rig/preview.jpg +0 -0
- package/assets/motion/library/pieces/chain-knock/meta.json +13 -0
- package/assets/motion/library/pieces/chain-knock/piece.html +195 -0
- package/assets/motion/library/pieces/chain-knock/preview.jpg +0 -0
- package/assets/motion/library/pieces/gather-to-logo/meta.json +13 -0
- package/assets/motion/library/pieces/gather-to-logo/piece.html +159 -0
- package/assets/motion/library/pieces/gather-to-logo/preview.jpg +0 -0
- package/assets/motion/library/pieces/morph-carry/meta.json +13 -0
- package/assets/motion/library/pieces/morph-carry/piece.html +173 -0
- package/assets/motion/library/pieces/morph-carry/preview.jpg +0 -0
- package/assets/motion/library/pieces/one-shape-journey/meta.json +13 -0
- package/assets/motion/library/pieces/one-shape-journey/piece.html +195 -0
- package/assets/motion/library/pieces/one-shape-journey/preview.jpg +0 -0
- package/assets/motion/library/pieces/open-from-subject/meta.json +13 -0
- package/assets/motion/library/pieces/open-from-subject/piece.html +168 -0
- package/assets/motion/library/pieces/open-from-subject/preview.jpg +0 -0
- package/assets/motion/library/pieces/request-to-result/meta.json +13 -0
- package/assets/motion/library/pieces/request-to-result/piece.html +212 -0
- package/assets/motion/library/pieces/request-to-result/preview.jpg +0 -0
- package/assets/motion/library/pieces/scale-dive/meta.json +13 -0
- package/assets/motion/library/pieces/scale-dive/piece.html +321 -0
- package/assets/motion/library/pieces/scale-dive/preview.jpg +0 -0
- package/assets/motion/library/pieces/screen-replica-steps/meta.json +13 -0
- package/assets/motion/library/pieces/screen-replica-steps/piece.html +366 -0
- package/assets/motion/library/pieces/screen-replica-steps/preview.jpg +0 -0
- package/assets/motion/library/pieces/zoom-into-card/meta.json +13 -0
- package/assets/motion/library/pieces/zoom-into-card/piece.html +179 -0
- package/assets/motion/library/pieces/zoom-into-card/preview.jpg +0 -0
- package/assets/motion/library/sheets/diagram.jpg +0 -0
- package/assets/motion/library/sheets/frame.jpg +0 -0
- package/assets/motion/library/sheets/transition.jpg +0 -0
- package/assets/motion/library/sheets/ui.jpg +0 -0
- package/assets/motion/plugin.json +1 -1
- package/assets/motion/references/build-sheet.md +206 -0
- package/assets/motion/references/runtime/determinism-rules.md +3 -3
- package/assets/motion/references/runtime/gsap-easing-and-stagger.md +28 -28
- package/assets/motion/references/runtime/gsap.md +3 -3
- package/assets/motion/references/runtime/inputs-and-assets.md +21 -16
- package/assets/motion/references/runtime/lint-validate-inspect.md +3 -3
- package/assets/motion/references/runtime/minimal-composition.md +6 -0
- package/assets/motion/references/runtime/preview-render.md +3 -3
- package/assets/motion/skills/app-walkthrough/SKILL.md +66 -0
- package/assets/motion/skills/before-after/SKILL.md +53 -0
- package/assets/motion/skills/brand-kit/SKILL.md +17 -16
- package/assets/motion/skills/dev-tool-video/SKILL.md +57 -0
- package/assets/motion/skills/launch-video/SKILL.md +62 -0
- package/assets/motion/skills/match-reference/SKILL.md +58 -0
- package/assets/motion/skills/motion/SKILL.md +167 -98
- package/assets/motion/skills/source-ingest/SKILL.md +23 -15
- package/assets/motion/skills/website-video/SKILL.md +59 -0
- package/assets/skills/bulletproof/SKILL.md +36 -11
- package/assets/skills/bulletproof/references/agent-surface.md +19 -9
- package/assets/skills/bulletproof/references/audit-protocol.md +20 -5
- package/assets/skills/bulletproof/references/platform-playbooks.md +5 -4
- package/assets/skills/bulletproof/references/provenance.md +26 -1
- package/assets/skills/bulletproof/references/secure-defaults.md +6 -5
- package/assets/skills/bulletproof/references/supply-chain.md +21 -17
- package/assets/skills/bulletproof/references/threat-landscape.md +28 -26
- package/assets/skills/bulletproof/references/verification.md +2 -0
- package/assets/skills/clarify/SKILL.md +25 -16
- package/assets/skills/code-review/SKILL.md +71 -13
- package/assets/skills/code-review/references/agent-diffs.md +27 -0
- package/assets/skills/code-review/references/tests.md +19 -0
- package/assets/skills/compliance-guard/SKILL.md +20 -5
- package/assets/skills/compliance-guard/references/artifacts.md +1 -1
- package/assets/skills/compliance-guard/references/eu-uk.md +16 -16
- package/assets/skills/compliance-guard/references/lawsuit-vectors.md +5 -5
- package/assets/skills/compliance-guard/references/provenance.md +41 -2
- package/assets/skills/compliance-guard/references/sector-gates.md +3 -3
- package/assets/skills/compliance-guard/references/security-baseline.md +2 -2
- package/assets/skills/compliance-guard/references/trigger-map.md +5 -5
- package/assets/skills/compliance-guard/references/us.md +27 -21
- package/assets/skills/durable/SKILL.md +87 -79
- package/assets/skills/durable/references/agent-db-safety.md +69 -0
- package/assets/skills/durable/references/backups-and-runtime.md +19 -12
- package/assets/skills/durable/references/migrations-and-schema.md +13 -6
- package/assets/skills/evidence-led-ui/SKILL.md +69 -127
- package/assets/skills/evidence-led-ui/references/anti-defaults.md +107 -208
- package/assets/skills/evidence-led-ui/references/direction.md +124 -0
- package/assets/skills/evidence-led-ui/references/production-contract.md +8 -0
- package/assets/skills/evidence-led-ui/references/provenance.md +24 -1
- package/assets/skills/lean/SKILL.md +90 -71
- package/assets/skills/lean/references/memory-and-processes.md +3 -2
- package/assets/skills/lean/references/playbooks.md +37 -12
- package/assets/skills/refactoring/SKILL.md +24 -3
- package/assets/skills/refactoring/references/agent-pitfalls.md +4 -1
- package/assets/skills/refactoring/references/legacy.md +21 -0
- package/assets/skills/root-cause/SKILL.md +20 -10
- package/assets/skills/shared-language/SKILL.md +16 -14
- package/assets/skills/tdd/SKILL.md +27 -15
- package/dist/app-sidecar.js +203 -47
- package/dist/app-sidecar.js.map +1 -1
- package/dist/cli.js +20 -28
- package/dist/cli.js.map +1 -1
- package/dist/core/acceptance-checks.d.ts +48 -0
- package/dist/core/acceptance-checks.js +144 -0
- package/dist/core/acceptance-checks.js.map +1 -0
- package/dist/core/agent-session.d.ts +119 -75
- package/dist/core/agent-session.js +561 -395
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agents.d.ts +6 -5
- package/dist/core/agents.js +12 -3
- package/dist/core/agents.js.map +1 -1
- package/dist/core/ask-user.d.ts +90 -8
- package/dist/core/ask-user.js +124 -13
- package/dist/core/ask-user.js.map +1 -1
- package/dist/core/auth-providers.js +1 -1
- package/dist/core/auth-providers.js.map +1 -1
- package/dist/core/autopilot-verdict.d.ts +5 -1
- package/dist/core/autopilot-verdict.js +30 -13
- package/dist/core/autopilot-verdict.js.map +1 -1
- package/dist/core/bundled-agents.js +1 -3
- package/dist/core/bundled-agents.js.map +1 -1
- package/dist/core/cache-diagnostics.d.ts +68 -0
- package/dist/core/cache-diagnostics.js +196 -0
- package/dist/core/cache-diagnostics.js.map +1 -0
- package/dist/core/cache-expiry.d.ts +87 -0
- package/dist/core/cache-expiry.js +111 -0
- package/dist/core/cache-expiry.js.map +1 -0
- package/dist/core/compaction/compactor.js +78 -48
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/plan-step-policy.d.ts +46 -0
- package/dist/core/compaction/plan-step-policy.js +57 -0
- package/dist/core/compaction/plan-step-policy.js.map +1 -0
- package/dist/core/destructive-git-guard.d.ts +90 -0
- package/dist/core/destructive-git-guard.js +871 -0
- package/dist/core/destructive-git-guard.js.map +1 -0
- package/dist/core/event-bus.d.ts +3 -0
- package/dist/core/event-bus.js +5 -0
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/fast-apply-benchmark.d.ts +1 -1
- package/dist/core/fast-apply-benchmark.js +2 -2
- package/dist/core/fast-apply-benchmark.js.map +1 -1
- package/dist/core/injection-detect.d.ts +38 -0
- package/dist/core/injection-detect.js +232 -0
- package/dist/core/injection-detect.js.map +1 -0
- package/dist/core/keep-awake.d.ts +88 -0
- package/dist/core/keep-awake.js +251 -0
- package/dist/core/keep-awake.js.map +1 -0
- package/dist/core/mcp/client.d.ts +72 -0
- package/dist/core/mcp/client.js +264 -41
- package/dist/core/mcp/client.js.map +1 -1
- package/dist/core/mcp/content.js +6 -2
- package/dist/core/mcp/content.js.map +1 -1
- package/dist/core/mcp/store.d.ts +6 -1
- package/dist/core/mcp/store.js +12 -1
- package/dist/core/mcp/store.js.map +1 -1
- package/dist/core/mcp/types.d.ts +18 -0
- package/dist/core/model-unavailable.d.ts +14 -0
- package/dist/core/model-unavailable.js +23 -0
- package/dist/core/model-unavailable.js.map +1 -0
- package/dist/core/node-debugger.d.ts +148 -0
- package/dist/core/node-debugger.js +642 -0
- package/dist/core/node-debugger.js.map +1 -0
- package/dist/core/nolan-context.d.ts +7 -5
- package/dist/core/nolan-context.js +106 -16
- package/dist/core/nolan-context.js.map +1 -1
- package/dist/core/nolan-prompt.js +24 -21
- package/dist/core/nolan-prompt.js.map +1 -1
- package/dist/core/package-threats.d.ts +18 -0
- package/dist/core/package-threats.js +168 -0
- package/dist/core/package-threats.js.map +1 -0
- package/dist/core/persistent-shell.d.ts +58 -6
- package/dist/core/persistent-shell.js +331 -49
- package/dist/core/persistent-shell.js.map +1 -1
- package/dist/core/process-manager.d.ts +14 -0
- package/dist/core/process-manager.js +61 -0
- package/dist/core/process-manager.js.map +1 -1
- package/dist/core/progress/git-xp.js +8 -14
- package/dist/core/progress/git-xp.js.map +1 -1
- package/dist/core/project-discovery.js +77 -26
- package/dist/core/project-discovery.js.map +1 -1
- package/dist/core/semantic-search-benchmark.d.ts +1 -1
- package/dist/core/semantic-search-benchmark.js +2 -2
- package/dist/core/semantic-search-benchmark.js.map +1 -1
- package/dist/core/session-history.d.ts +12 -0
- package/dist/core/session-history.js +27 -0
- package/dist/core/session-history.js.map +1 -1
- package/dist/core/session-manager.d.ts +13 -1
- package/dist/core/session-manager.js +38 -18
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-summary-index.d.ts +37 -0
- package/dist/core/session-summary-index.js +172 -0
- package/dist/core/session-summary-index.js.map +1 -0
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.js +10 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/shell-threats-popular-packages.d.ts +11 -0
- package/dist/core/shell-threats-popular-packages.js +675 -0
- package/dist/core/shell-threats-popular-packages.js.map +1 -0
- package/dist/core/shell-threats.d.ts +8 -0
- package/dist/core/shell-threats.js +186 -0
- package/dist/core/shell-threats.js.map +1 -0
- package/dist/core/skills.js +16 -4
- package/dist/core/skills.js.map +1 -1
- package/dist/core/stream-rules.d.ts +30 -0
- package/dist/core/stream-rules.js +151 -0
- package/dist/core/stream-rules.js.map +1 -0
- package/dist/core/subagent-manager.d.ts +23 -6
- package/dist/core/subagent-manager.js +25 -9
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/core/subagent-policy.js +1 -1
- package/dist/core/subagent-policy.js.map +1 -1
- package/dist/core/subagent-receipt.d.ts +54 -0
- package/dist/core/subagent-receipt.js +276 -0
- package/dist/core/subagent-receipt.js.map +1 -0
- package/dist/core/subagent-turn-record.d.ts +2 -0
- package/dist/core/subagent-turn-record.js.map +1 -1
- package/dist/core/test-impact.d.ts +73 -0
- package/dist/core/test-impact.js +467 -0
- package/dist/core/test-impact.js.map +1 -0
- package/dist/core/thinking-level.d.ts +1 -1
- package/dist/core/thinking-level.js +1 -1
- package/dist/core/thinking-level.js.map +1 -1
- package/dist/core/verification-gate.d.ts +2 -0
- package/dist/core/verification-gate.js +4 -0
- package/dist/core/verification-gate.js.map +1 -1
- package/dist/core/verification-snapshot.js +3 -5
- package/dist/core/verification-snapshot.js.map +1 -1
- package/dist/core/workspace-guard.d.ts +18 -7
- package/dist/core/workspace-guard.js +227 -60
- package/dist/core/workspace-guard.js.map +1 -1
- package/dist/core/worktree-setup.d.ts +23 -0
- package/dist/core/worktree-setup.js +128 -9
- package/dist/core/worktree-setup.js.map +1 -1
- package/dist/core/worktree.d.ts +20 -2
- package/dist/core/worktree.js +74 -31
- package/dist/core/worktree.js.map +1 -1
- package/dist/interactive.js +2 -1
- package/dist/interactive.js.map +1 -1
- package/dist/modes/json-mode.js +11 -2
- package/dist/modes/json-mode.js.map +1 -1
- package/dist/modes/subagent-worker-mode.d.ts +36 -1
- package/dist/modes/subagent-worker-mode.js +100 -42
- package/dist/modes/subagent-worker-mode.js.map +1 -1
- package/dist/motion-agent/motion-agent.d.ts +7 -3
- package/dist/motion-agent/motion-agent.js +6 -8
- package/dist/motion-agent/motion-agent.js.map +1 -1
- package/dist/motion-agent/motion-prompt.d.ts +1 -1
- package/dist/motion-agent/motion-prompt.js +16 -25
- package/dist/motion-agent/motion-prompt.js.map +1 -1
- package/dist/motion-agent/motion-review-session.js +1 -1
- package/dist/motion-agent/motion-review-session.js.map +1 -1
- package/dist/motion-agent/motion-review.d.ts +10 -3
- package/dist/motion-agent/motion-review.js +15 -7
- package/dist/motion-agent/motion-review.js.map +1 -1
- package/dist/motion-agent/motion-studio-context.js +1 -1
- package/dist/motion-agent/motion-studio-context.js.map +1 -1
- package/dist/system-prompt.d.ts +2 -1
- package/dist/system-prompt.js +15 -4
- package/dist/system-prompt.js.map +1 -1
- package/dist/test-support/keep-alive.d.ts +14 -0
- package/dist/test-support/keep-alive.js +17 -0
- package/dist/test-support/keep-alive.js.map +1 -0
- package/dist/tools/ask-user.js +3 -3
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/bash-read-evidence.d.ts +10 -0
- package/dist/tools/bash-read-evidence.js +133 -0
- package/dist/tools/bash-read-evidence.js.map +1 -0
- package/dist/tools/bash.d.ts +10 -1
- package/dist/tools/bash.js +179 -7
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/debug.d.ts +54 -0
- package/dist/tools/debug.js +233 -0
- package/dist/tools/debug.js.map +1 -0
- package/dist/tools/edit.js +13 -5
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/goals.d.ts +1 -1
- package/dist/tools/index.d.ts +25 -2
- package/dist/tools/index.js +48 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.js +2 -0
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read-tracker.d.ts +35 -2
- package/dist/tools/read-tracker.js +108 -11
- package/dist/tools/read-tracker.js.map +1 -1
- package/dist/tools/read.js +39 -7
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/skill.js +5 -0
- package/dist/tools/skill.js.map +1 -1
- package/dist/tools/subagent-control.js +44 -8
- package/dist/tools/subagent-control.js.map +1 -1
- package/dist/tools/subagent-shared.d.ts +48 -8
- package/dist/tools/subagent-shared.js +75 -14
- package/dist/tools/subagent-shared.js.map +1 -1
- package/dist/tools/subagent.d.ts +8 -2
- package/dist/tools/subagent.js +28 -10
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/task-output.js +3 -2
- package/dist/tools/task-output.js.map +1 -1
- package/dist/tools/task-send.d.ts +1 -1
- package/dist/tools/task-send.js +15 -1
- package/dist/tools/task-send.js.map +1 -1
- package/dist/tools/tool-tiers.d.ts +2 -2
- package/dist/tools/tool-tiers.js +3 -2
- package/dist/tools/tool-tiers.js.map +1 -1
- package/dist/tools/truncate.d.ts +21 -0
- package/dist/tools/truncate.js +187 -0
- package/dist/tools/truncate.js.map +1 -1
- package/dist/tools/ui-adopt.js +2 -0
- package/dist/tools/ui-adopt.js.map +1 -1
- package/dist/tools/write.js +4 -3
- package/dist/tools/write.js.map +1 -1
- package/dist/ui/App.d.ts +0 -4
- package/dist/ui/App.js +5 -28
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/components/ActivityIndicator.js +1 -0
- package/dist/ui/components/ActivityIndicator.js.map +1 -1
- package/dist/ui/components/Footer.js +1 -1
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +1 -8
- package/dist/ui/hooks/useAgentLoop.js +1 -119
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/render.d.ts +2 -4
- package/dist/ui/render.js +3 -2
- package/dist/ui/render.js.map +1 -1
- package/dist/utils/git.d.ts +77 -0
- package/dist/utils/git.js +285 -21
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/github-ci.js +2 -1
- package/dist/utils/github-ci.js.map +1 -1
- package/dist/utils/github.js +11 -9
- package/dist/utils/github.js.map +1 -1
- package/dist/utils/image.d.ts +14 -0
- package/dist/utils/image.js +16 -0
- package/dist/utils/image.js.map +1 -1
- package/dist/utils/process.d.ts +20 -0
- package/dist/utils/process.js +98 -0
- package/dist/utils/process.js.map +1 -1
- package/dist/utils/text.d.ts +12 -0
- package/dist/utils/text.js +11 -0
- package/dist/utils/text.js.map +1 -1
- package/package.json +6 -6
- package/assets/motion/skills/mixkit-split-text-617/SKILL.md +0 -115
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-480.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-494.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-5.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-508.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6525.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6539.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6647.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6663.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6677.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6691.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6706.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6722.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6736.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6750.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6764.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6780.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6794.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6810.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6823.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6872.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-6936.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/compositions/comp-76.json +0 -1
- package/assets/motion/skills/mixkit-split-text-617/data/manifest.json +0 -495
- package/assets/motion/skills/mixkit-split-text-617/references/RECONSTRUCTION.md +0 -201
- package/assets/motion/skills/mixkit-split-text-617/references/VERIFICATION.md +0 -107
- package/assets/motion/skills/mixkit-split-text-617/tools/inspect_motion.py +0 -130
- package/assets/motion/skills/video-qa/SKILL.md +0 -66
- package/dist/core/ideal-review-subagent.d.ts +0 -42
- package/dist/core/ideal-review-subagent.js +0 -95
- package/dist/core/ideal-review-subagent.js.map +0 -1
- package/dist/core/ideal-review.d.ts +0 -82
- package/dist/core/ideal-review.js +0 -242
- package/dist/core/ideal-review.js.map +0 -1
- package/dist/motion-agent/motion-check-tool.d.ts +0 -21
- package/dist/motion-agent/motion-check-tool.js +0 -206
- package/dist/motion-agent/motion-check-tool.js.map +0 -1
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { toPosixPath } from "../tools/path-utils.js";
|
|
4
|
-
/**
|
|
5
|
-
* Harness-owned proof that every successfully changed file was opened with the
|
|
6
|
-
* read tool after Ideal review began. Model-authored claims never enter it.
|
|
7
|
-
*/
|
|
8
|
-
export class ReviewCoverageTracker {
|
|
9
|
-
cwd;
|
|
10
|
-
fileExists;
|
|
11
|
-
expected = new Set();
|
|
12
|
-
covered = new Set();
|
|
13
|
-
active = false;
|
|
14
|
-
/**
|
|
15
|
-
* `fileExists` is injectable for tests and defaults to the real filesystem.
|
|
16
|
-
* A file the run created and then deleted can never be re-read, so without
|
|
17
|
-
* this check it stayed in `missing` forever and the coverage gate re-injected
|
|
18
|
-
* the same follow-up on every turn.
|
|
19
|
-
*/
|
|
20
|
-
constructor(cwd, fileExists = existsSync) {
|
|
21
|
-
this.cwd = cwd;
|
|
22
|
-
this.fileExists = fileExists;
|
|
23
|
-
}
|
|
24
|
-
reset() {
|
|
25
|
-
this.expected.clear();
|
|
26
|
-
this.covered.clear();
|
|
27
|
-
this.active = false;
|
|
28
|
-
}
|
|
29
|
-
/** Successful mutations are retained before and during review. */
|
|
30
|
-
recordChanged(filePath) {
|
|
31
|
-
const normalized = this.normalize(filePath);
|
|
32
|
-
this.expected.add(normalized);
|
|
33
|
-
this.covered.delete(normalized);
|
|
34
|
-
}
|
|
35
|
-
/** Start the evidence window; reads observed before this call never count. */
|
|
36
|
-
start(changedFiles = []) {
|
|
37
|
-
for (const filePath of changedFiles)
|
|
38
|
-
this.recordChanged(filePath);
|
|
39
|
-
this.covered.clear();
|
|
40
|
-
this.active = true;
|
|
41
|
-
}
|
|
42
|
-
/** Called only by the successful read-tool callback. */
|
|
43
|
-
recordRead(filePath) {
|
|
44
|
-
if (!this.active)
|
|
45
|
-
return;
|
|
46
|
-
const normalized = this.normalize(filePath);
|
|
47
|
-
if (this.expected.has(normalized))
|
|
48
|
-
this.covered.add(normalized);
|
|
49
|
-
}
|
|
50
|
-
evidence() {
|
|
51
|
-
// Deleted files are dropped, not reported unread: review evidence can only
|
|
52
|
-
// come from reading a file that is still on disk.
|
|
53
|
-
const expected = [...this.expected].filter((filePath) => this.fileExists(filePath)).sort();
|
|
54
|
-
const covered = expected.filter((filePath) => this.covered.has(filePath));
|
|
55
|
-
const missing = expected.filter((filePath) => !this.covered.has(filePath));
|
|
56
|
-
return {
|
|
57
|
-
expected: expected.map((filePath) => this.display(filePath)),
|
|
58
|
-
covered: covered.map((filePath) => this.display(filePath)),
|
|
59
|
-
missing: missing.map((filePath) => this.display(filePath)),
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
normalize(filePath) {
|
|
63
|
-
return path.normalize(path.resolve(this.cwd, filePath));
|
|
64
|
-
}
|
|
65
|
-
display(filePath) {
|
|
66
|
-
const relative = path.relative(this.cwd, filePath);
|
|
67
|
-
// Forward-slashed: this string is shown to the model and matched against
|
|
68
|
-
// the paths it echoes back, which are always forward-slashed. A native
|
|
69
|
-
// `src\a.ts` on Windows never matched the model's `src/a.ts`, so review
|
|
70
|
-
// coverage counted every changed file as unread.
|
|
71
|
-
return relative && !relative.startsWith(`..${path.sep}`) && relative !== ".."
|
|
72
|
-
? toPosixPath(relative)
|
|
73
|
-
: filePath;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export function buildReviewCoverageMessage(missingFiles) {
|
|
77
|
-
return {
|
|
78
|
-
role: "user",
|
|
79
|
-
provenance: { source: "runtime", kind: "review_follow_up", visibility: "hidden" },
|
|
80
|
-
content: "Ideal review coverage is incomplete. Open every changed file below with the read tool " +
|
|
81
|
-
"before finalizing; model-authored claims do not count as evidence:\n" +
|
|
82
|
-
missingFiles.map((filePath) => `- ${filePath}`).join("\n"),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Coverage follow-ups spent before the gate gives up. The gate is fail-closed,
|
|
87
|
-
* but a file the agent genuinely cannot read (permissions, a path outside the
|
|
88
|
-
* workspace, a race with an external delete) must not cost an unbounded number
|
|
89
|
-
* of identical turns — it escalates once and lets the run finish.
|
|
90
|
-
*/
|
|
91
|
-
export const MAX_REVIEW_COVERAGE_INJECTIONS = 2;
|
|
92
|
-
/**
|
|
93
|
-
* Terminal coverage message: stop demanding reads, require an honest statement
|
|
94
|
-
* of what went unverified in the final answer.
|
|
95
|
-
*/
|
|
96
|
-
export function buildReviewCoverageEscalationMessage(missingFiles) {
|
|
97
|
-
return {
|
|
98
|
-
role: "user",
|
|
99
|
-
provenance: { source: "runtime", kind: "review_follow_up", visibility: "hidden" },
|
|
100
|
-
content: `Ideal review coverage is still incomplete after ${MAX_REVIEW_COVERAGE_INJECTIONS} attempts. ` +
|
|
101
|
-
"Stop trying to read these files and do not repeat your previous answer:\n" +
|
|
102
|
-
missingFiles.map((filePath) => `- ${filePath}`).join("\n") +
|
|
103
|
-
"\n\nGive your final response now, and state plainly in it that you could not verify the " +
|
|
104
|
-
"files above (say why if you know) so the user can check them.",
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Put the harness-owned read checklist on the first Ideal review turn. The
|
|
109
|
-
* fail-closed follow-up remains as a fallback, but compliant reviews can now
|
|
110
|
-
* gather all evidence before emitting their single user-facing final answer.
|
|
111
|
-
*/
|
|
112
|
-
export function withReviewCoverageRequirements(message, missingFiles) {
|
|
113
|
-
if (missingFiles.length === 0)
|
|
114
|
-
return message;
|
|
115
|
-
const requirement = buildReviewCoverageMessage(missingFiles);
|
|
116
|
-
return {
|
|
117
|
-
role: "user",
|
|
118
|
-
provenance: message.provenance,
|
|
119
|
-
content: `${String(message.content)}\n\n${String(requirement.content)}`,
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
export const IDEAL_REVIEW_PROMPT = "Ideal? Review the actual work against the user's request before the final response. " +
|
|
123
|
-
"Is it simple, focused, correct, and aligned? Did you over-edit, leave TODOs, miss an obvious " +
|
|
124
|
-
"case the request called for, or introduce risk? For substantial implementations, use Steroids " +
|
|
125
|
-
"when available to compare the finished work against comparable real-world code for architecture, " +
|
|
126
|
-
"simplicity, completeness, edge cases, error handling, security, and performance. Reuse samples " +
|
|
127
|
-
"already examined; search and read further where evidence is missing. Fix concrete gaps relevant " +
|
|
128
|
-
"to the user's request and project constraints, not differences in taste. Examples inform judgment; " +
|
|
129
|
-
"they do not replace tests or prove correctness. Empty corpus or no hits: discover suitable repos, " +
|
|
130
|
-
"propose them via ask_user, add only on approval, then search and read again. If Steroids is " +
|
|
131
|
-
"unavailable, discovery finds nothing suitable, or the user declines, use installed source and " +
|
|
132
|
-
"official docs and state that the work was not cross-checked against real-world implementations. " +
|
|
133
|
-
"Judge this by reading the code you changed \u2014 " +
|
|
134
|
-
"reuse completed checks while code is unchanged. If anything is wrong, fix it now; rerun the affected " +
|
|
135
|
-
"checks and reread those changes before finishing; earlier results do not verify later edits. " +
|
|
136
|
-
"Do not claim coverage without corresponding assertions. Before calling the task complete, reconcile " +
|
|
137
|
-
"each requirement in the original request with the delivered behavior, including applicable failure, " +
|
|
138
|
-
"cancellation, retry, and handoff paths. Passing tests alone do not establish that the request is complete. " +
|
|
139
|
-
"Fix known in-scope gaps now rather than leaving the user to discover them by asking whether it is done. " +
|
|
140
|
-
"Do not expand this into unrelated improvements. If blocked, lead with the incomplete outcome and list " +
|
|
141
|
-
"what remains unverified; otherwise clearly separate what was implemented, verified, and committed or released. " +
|
|
142
|
-
"If everything is good, respond with the final " +
|
|
143
|
-
"answer only; do not mention this ideal review unless it changed the work or a required " +
|
|
144
|
-
"cross-check could not be completed.";
|
|
145
|
-
const RISKY_TOOL_NAMES = new Set(["bash", "write", "edit"]);
|
|
146
|
-
export function evaluateIdealReview(stats) {
|
|
147
|
-
const reasons = [];
|
|
148
|
-
let score = 0;
|
|
149
|
-
if (stats.changedLines >= 120) {
|
|
150
|
-
score += 2;
|
|
151
|
-
reasons.push(`${stats.changedLines} changed lines`);
|
|
152
|
-
}
|
|
153
|
-
else if (stats.changedLines >= 60) {
|
|
154
|
-
score += 1;
|
|
155
|
-
reasons.push(`${stats.changedLines} changed lines`);
|
|
156
|
-
}
|
|
157
|
-
if (stats.toolCalls >= 8) {
|
|
158
|
-
score += 1;
|
|
159
|
-
reasons.push(`${stats.toolCalls} tool calls`);
|
|
160
|
-
}
|
|
161
|
-
if (stats.writeCalls + stats.editCalls >= 4) {
|
|
162
|
-
score += 2;
|
|
163
|
-
reasons.push(`${stats.writeCalls + stats.editCalls} file mutation calls`);
|
|
164
|
-
}
|
|
165
|
-
else if (stats.writeCalls + stats.editCalls >= 2) {
|
|
166
|
-
score += 1;
|
|
167
|
-
reasons.push(`${stats.writeCalls + stats.editCalls} file mutation calls`);
|
|
168
|
-
}
|
|
169
|
-
if (stats.bashCalls > 0 && stats.writeCalls + stats.editCalls > 0) {
|
|
170
|
-
score += 1;
|
|
171
|
-
reasons.push("shell command plus file mutation");
|
|
172
|
-
}
|
|
173
|
-
if (stats.toolFailures > 0) {
|
|
174
|
-
score += 2;
|
|
175
|
-
reasons.push(`${stats.toolFailures} failed tool calls`);
|
|
176
|
-
}
|
|
177
|
-
if (stats.turns >= 6) {
|
|
178
|
-
score += 1;
|
|
179
|
-
reasons.push(`${stats.turns} agent turns`);
|
|
180
|
-
}
|
|
181
|
-
return { shouldReview: score >= 4, score, reasons };
|
|
182
|
-
}
|
|
183
|
-
export function buildIdealReviewMessage(reasons, driftedFiles = []) {
|
|
184
|
-
const reasonText = reasons.length > 0 ? ` Triggered because: ${reasons.join(", ")}.` : "";
|
|
185
|
-
const driftText = driftedFiles.length > 0
|
|
186
|
-
? ` Also: you changed ${driftedFiles.join(", ")} but the matching test file was not updated. ` +
|
|
187
|
-
`Update the test to match the new behavior, or state plainly why the existing test is still valid. ` +
|
|
188
|
-
`Edit the test only \u2014 do not run the suite now.`
|
|
189
|
-
: "";
|
|
190
|
-
return {
|
|
191
|
-
role: "user",
|
|
192
|
-
provenance: { source: "runtime", kind: "review_follow_up", visibility: "hidden" },
|
|
193
|
-
content: `${IDEAL_REVIEW_PROMPT}${reasonText}${driftText}`,
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
// A test file: foo.test.ts, foo.spec.tsx, foo.test.mjs, etc.
|
|
197
|
-
const TEST_FILE_RE = /\.(test|spec)\.[cm]?[jt]sx?$/;
|
|
198
|
-
// A source code file we can pair with a sibling test.
|
|
199
|
-
const CODE_EXT_RE = /\.([cm]?[jt]sx?)$/;
|
|
200
|
-
/**
|
|
201
|
-
* Test-drift detector \u2014 the one stranding signal a typechecker is blind to.
|
|
202
|
-
* Given the set of files the run mutated, return the source files whose sibling
|
|
203
|
-
* test exists on disk but was NOT touched this run (a green-but-stale test).
|
|
204
|
-
*
|
|
205
|
-
* Pure structural check: no sibling test on disk \u2192 no signal, so it stays
|
|
206
|
-
* silent on projects (or files) without co-located tests. `fileExists` is
|
|
207
|
-
* injectable for tests; paths are resolved against `cwd` so relative tool paths
|
|
208
|
-
* and absolute ones compare consistently.
|
|
209
|
-
*/
|
|
210
|
-
export function detectTestDrift(touchedFiles, cwd, fileExists = existsSync) {
|
|
211
|
-
const resolved = new Map(); // absolute -> original (as the model wrote it)
|
|
212
|
-
for (const f of touchedFiles)
|
|
213
|
-
resolved.set(path.resolve(cwd, f), f);
|
|
214
|
-
const touchedSet = new Set(resolved.keys());
|
|
215
|
-
const drifted = [];
|
|
216
|
-
for (const [abs, original] of resolved) {
|
|
217
|
-
const base = path.basename(abs);
|
|
218
|
-
if (TEST_FILE_RE.test(base))
|
|
219
|
-
continue; // the file itself is a test
|
|
220
|
-
const match = base.match(CODE_EXT_RE);
|
|
221
|
-
if (!match)
|
|
222
|
-
continue; // not a code file
|
|
223
|
-
const ext = match[1];
|
|
224
|
-
const dir = path.dirname(abs);
|
|
225
|
-
const stem = base.slice(0, base.length - ext.length - 1);
|
|
226
|
-
// Tests commonly drop the JSX `x` (Button.tsx -> Button.test.ts), so try the
|
|
227
|
-
// source ext and its non-JSX variant against both .test and .spec.
|
|
228
|
-
const testExts = ext.endsWith("x") ? [ext, ext.slice(0, -1)] : [ext];
|
|
229
|
-
const candidates = testExts
|
|
230
|
-
.flatMap((e) => [`${stem}.test.${e}`, `${stem}.spec.${e}`])
|
|
231
|
-
.map((c) => path.join(dir, c));
|
|
232
|
-
if (candidates.some((c) => touchedSet.has(c)))
|
|
233
|
-
continue; // sibling test was updated
|
|
234
|
-
if (candidates.some((c) => fileExists(c)))
|
|
235
|
-
drifted.push(original);
|
|
236
|
-
}
|
|
237
|
-
return drifted;
|
|
238
|
-
}
|
|
239
|
-
export function shouldCountAsRiskyTool(toolName) {
|
|
240
|
-
return RISKY_TOOL_NAMES.has(toolName);
|
|
241
|
-
}
|
|
242
|
-
//# sourceMappingURL=ideal-review.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ideal-review.js","sourceRoot":"","sources":["../../src/core/ideal-review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAwBrD;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAYb;IACA;IAZF,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAC7B,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IACrC,MAA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
-
import type { AgentTool } from "@prestyj/agent";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import type { MotionBundle } from "../core/skills.js";
|
|
4
|
-
declare const parameters: z.ZodObject<{
|
|
5
|
-
project: z.ZodString;
|
|
6
|
-
output: z.ZodString;
|
|
7
|
-
range: z.ZodOptional<z.ZodObject<{
|
|
8
|
-
start: z.ZodNumber;
|
|
9
|
-
end: z.ZodNumber;
|
|
10
|
-
}, z.core.$strict>>;
|
|
11
|
-
windows: z.ZodArray<z.ZodObject<{
|
|
12
|
-
label: z.ZodString;
|
|
13
|
-
start: z.ZodNumber;
|
|
14
|
-
end: z.ZodNumber;
|
|
15
|
-
}, z.core.$strict>>;
|
|
16
|
-
holds: z.ZodOptional<z.ZodString>;
|
|
17
|
-
slideshowRequested: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
}, z.core.$strict>;
|
|
19
|
-
/** One explicit check; the working agent sees the frames, with no separate model or approval loop. */
|
|
20
|
-
export declare function createMotionCheckTool(cwd: string, bundle: MotionBundle): AgentTool<typeof parameters>;
|
|
21
|
-
export {};
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
|
-
import fs from "node:fs/promises";
|
|
4
|
-
import os from "node:os";
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
import { promisify } from "node:util";
|
|
7
|
-
import { z } from "zod";
|
|
8
|
-
import { log } from "../core/logger.js";
|
|
9
|
-
import { isMotionTechnicalReport, motionPath, motionRegistrationSchema, validateMotionManifest, } from "./motion-review.js";
|
|
10
|
-
const exec = promisify(execFile);
|
|
11
|
-
const parameters = motionRegistrationSchema.omit({ depth: true, references: true });
|
|
12
|
-
const binariesSchema = z.object({
|
|
13
|
-
ffmpeg: z.string().refine(path.isAbsolute),
|
|
14
|
-
ffprobe: z.string().refine(path.isAbsolute),
|
|
15
|
-
});
|
|
16
|
-
const audioSchema = z.object({ streams: z.array(z.object({ codec_type: z.literal("audio") })) });
|
|
17
|
-
const levelsSchema = z.object({ input_i: z.string(), input_tp: z.string() });
|
|
18
|
-
const pixelsSchema = z.object({
|
|
19
|
-
ok: z.literal(true),
|
|
20
|
-
videoSha256: z.string().regex(/^[a-f0-9]{64}$/),
|
|
21
|
-
});
|
|
22
|
-
/** One explicit check; the working agent sees the frames, with no separate model or approval loop. */
|
|
23
|
-
export function createMotionCheckTool(cwd, bundle) {
|
|
24
|
-
return {
|
|
25
|
-
name: "motion_check",
|
|
26
|
-
description: "Check a current rendered Motion video once: source lint/runtime/layout/contrast, decoded pixels, " +
|
|
27
|
-
"and audio levels when present. Returns technical findings plus actual rendered images for YOU " +
|
|
28
|
-
"to inspect against the selected template/component and inputs. Supply representative action " +
|
|
29
|
-
"windows (start/end seconds); for videos over 180 seconds select a range to inspect. " +
|
|
30
|
-
"This does not approve creative quality or watch/listen to the full video. Do not repeat the " +
|
|
31
|
-
"same checks manually or recheck an unchanged export. All paths must stay inside the workspace.",
|
|
32
|
-
parameters,
|
|
33
|
-
executionMode: "sequential",
|
|
34
|
-
async execute(args, context) {
|
|
35
|
-
const started = Date.now();
|
|
36
|
-
const signal = AbortSignal.any([context.signal, AbortSignal.timeout(240_000)]);
|
|
37
|
-
const checks = [];
|
|
38
|
-
let config;
|
|
39
|
-
let technical = false;
|
|
40
|
-
try {
|
|
41
|
-
const input = parameters.parse(args);
|
|
42
|
-
signal.throwIfAborted();
|
|
43
|
-
const project = await motionPath(cwd, input.project);
|
|
44
|
-
const output = await motionPath(cwd, input.output);
|
|
45
|
-
const holds = input.holds ? await motionPath(cwd, input.holds) : undefined;
|
|
46
|
-
if (!(await fs.stat(project)).isDirectory())
|
|
47
|
-
throw new Error("Expected a project folder");
|
|
48
|
-
const outputInfo = await fs.stat(output);
|
|
49
|
-
if (!outputInfo.isFile() || outputInfo.size > 2 * 1024 ** 3)
|
|
50
|
-
throw new Error("Expected a rendered video file under 2 GiB");
|
|
51
|
-
const run = async (name, binary, argv) => {
|
|
52
|
-
try {
|
|
53
|
-
const result = await exec(binary, argv, {
|
|
54
|
-
signal,
|
|
55
|
-
timeout: 120_000,
|
|
56
|
-
maxBuffer: 1024 * 1024,
|
|
57
|
-
windowsHide: true,
|
|
58
|
-
});
|
|
59
|
-
checks.push({
|
|
60
|
-
name,
|
|
61
|
-
ok: true,
|
|
62
|
-
details: `${result.stdout}\n${result.stderr}`.slice(0, 12_000),
|
|
63
|
-
});
|
|
64
|
-
return result;
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
signal.throwIfAborted();
|
|
68
|
-
checks.push({ name, ok: false, details: String(error).slice(0, 12_000) });
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const validate = (name, ok) => {
|
|
73
|
-
checks.push({ name, ok, details: ok ? "passed" : "Missing or failed check evidence" });
|
|
74
|
-
};
|
|
75
|
-
// HyperFrames check includes lint; running `hf lint` separately duplicates that work.
|
|
76
|
-
const runtime = await run("Runtime/layout/contrast (includes lint)", process.execPath, [
|
|
77
|
-
bundle.launcher,
|
|
78
|
-
"check",
|
|
79
|
-
project,
|
|
80
|
-
"--json",
|
|
81
|
-
"--contrast",
|
|
82
|
-
"--at-transitions",
|
|
83
|
-
]);
|
|
84
|
-
validate("Structured runtime report", runtime !== null && isMotionTechnicalReport(runtime.stdout));
|
|
85
|
-
const pixels = await run("Decoded pixel motion", process.execPath, [
|
|
86
|
-
path.join(bundle.root, "bin", "motion-check.mjs"),
|
|
87
|
-
output,
|
|
88
|
-
...(holds ? ["--holds", holds] : []),
|
|
89
|
-
...(input.slideshowRequested ? ["--slideshow-requested"] : []),
|
|
90
|
-
]);
|
|
91
|
-
const pixelReport = pixels ? pixelsSchema.safeParse(JSON.parse(pixels.stdout)) : null;
|
|
92
|
-
validate("Structured pixel report", pixelReport?.success === true);
|
|
93
|
-
const binaries = await exec(process.execPath, [path.join(bundle.root, "bin", "media-binaries.mjs")], {
|
|
94
|
-
signal,
|
|
95
|
-
timeout: 10_000,
|
|
96
|
-
maxBuffer: 64 * 1024,
|
|
97
|
-
windowsHide: true,
|
|
98
|
-
});
|
|
99
|
-
const { ffmpeg, ffprobe } = binariesSchema.parse(JSON.parse(binaries.stdout));
|
|
100
|
-
const audio = await run("Audio metadata", ffprobe, [
|
|
101
|
-
"-v",
|
|
102
|
-
"error",
|
|
103
|
-
"-protocol_whitelist",
|
|
104
|
-
"file,pipe",
|
|
105
|
-
"-select_streams",
|
|
106
|
-
"a",
|
|
107
|
-
"-show_entries",
|
|
108
|
-
"stream=codec_type",
|
|
109
|
-
"-of",
|
|
110
|
-
"json",
|
|
111
|
-
output,
|
|
112
|
-
]);
|
|
113
|
-
const streams = audio ? audioSchema.safeParse(JSON.parse(audio.stdout)) : null;
|
|
114
|
-
validate("Structured audio report", streams?.success === true);
|
|
115
|
-
if (streams?.success && streams.data.streams.length > 0) {
|
|
116
|
-
const levels = await run("Audio levels", ffmpeg, [
|
|
117
|
-
"-hide_banner",
|
|
118
|
-
"-nostdin",
|
|
119
|
-
"-xerror",
|
|
120
|
-
"-protocol_whitelist",
|
|
121
|
-
"file,pipe",
|
|
122
|
-
"-i",
|
|
123
|
-
output,
|
|
124
|
-
"-vn",
|
|
125
|
-
"-af",
|
|
126
|
-
"loudnorm=I=-14:TP=-1:LRA=11:print_format=json",
|
|
127
|
-
"-f",
|
|
128
|
-
"null",
|
|
129
|
-
"-",
|
|
130
|
-
]);
|
|
131
|
-
if (levels) {
|
|
132
|
-
const start = levels.stderr.lastIndexOf("\n{");
|
|
133
|
-
const end = levels.stderr.indexOf("\n}", start);
|
|
134
|
-
if (start < 0 || end < 0)
|
|
135
|
-
throw new Error("Missing structured audio measurements");
|
|
136
|
-
const measured = levelsSchema.parse(JSON.parse(levels.stderr.slice(start, end + 2)));
|
|
137
|
-
const loudness = Number(measured.input_i);
|
|
138
|
-
const peak = Number(measured.input_tp);
|
|
139
|
-
// Measure, don't impose a new mix on a source-backed recipe. Clipping is a failure;
|
|
140
|
-
// distribution-specific loudness targets remain the recipe/user's contract.
|
|
141
|
-
validate("Audio is finite and not clipping", Number.isFinite(loudness) && Number.isFinite(peak) && peak <= 0);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
const id = randomUUID();
|
|
145
|
-
const directory = path.join(path.dirname(output), `.motion-review-${id}`);
|
|
146
|
-
config = path.join(os.tmpdir(), `ez-motion-check-${id}.json`);
|
|
147
|
-
await fs.writeFile(config, JSON.stringify({ windows: input.windows, range: input.range }), {
|
|
148
|
-
flag: "wx",
|
|
149
|
-
signal,
|
|
150
|
-
});
|
|
151
|
-
const frames = await run("Rendered frames", process.execPath, [
|
|
152
|
-
path.join(bundle.root, "bin", "review-frames.mjs"),
|
|
153
|
-
output,
|
|
154
|
-
directory,
|
|
155
|
-
config,
|
|
156
|
-
]);
|
|
157
|
-
if (!frames)
|
|
158
|
-
return JSON.stringify({ technical: false, output, checks, visual: "not inspected" });
|
|
159
|
-
const evidence = await validateMotionManifest(directory, output, input.windows, signal, input.range);
|
|
160
|
-
validate("Pixel report matches rendered frames", pixelReport?.success === true &&
|
|
161
|
-
pixelReport.data.videoSha256 === evidence.manifest.video.sha256);
|
|
162
|
-
technical = checks.every((check) => check.ok);
|
|
163
|
-
return {
|
|
164
|
-
content: [
|
|
165
|
-
{
|
|
166
|
-
type: "text",
|
|
167
|
-
text: JSON.stringify({
|
|
168
|
-
technical,
|
|
169
|
-
output,
|
|
170
|
-
checks,
|
|
171
|
-
coverage: evidence.manifest.range,
|
|
172
|
-
visual: "Inspect the attached rendered frames against the selected recipe and inputs. These are samples, not playback or audio listening. No creative approval has been granted.",
|
|
173
|
-
}),
|
|
174
|
-
},
|
|
175
|
-
...evidence.images.map((image) => ({
|
|
176
|
-
type: "image",
|
|
177
|
-
mediaType: "image/jpeg",
|
|
178
|
-
data: image.toString("base64"),
|
|
179
|
-
})),
|
|
180
|
-
],
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
catch (error) {
|
|
184
|
-
if (context.signal.aborted)
|
|
185
|
-
throw context.signal.reason;
|
|
186
|
-
return JSON.stringify({
|
|
187
|
-
technical: false,
|
|
188
|
-
checks,
|
|
189
|
-
error: String(error).slice(0, 4000),
|
|
190
|
-
visual: "unverified",
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
finally {
|
|
194
|
-
if (config)
|
|
195
|
-
await fs.rm(config, { force: true });
|
|
196
|
-
log("INFO", "motion-check", "Output check finished", {
|
|
197
|
-
project: args.project,
|
|
198
|
-
output: args.output,
|
|
199
|
-
elapsedMs: Date.now() - started,
|
|
200
|
-
technical,
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
//# sourceMappingURL=motion-check-tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"motion-check-tool.js","sourceRoot":"","sources":["../../src/motion-agent/motion-check-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,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