@oh-story/dsh 0.1.10 → 0.1.12
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 +11 -11
- package/lib/client.js +7 -3
- package/lib/client.js.map +2 -2
- package/lib/drama/manifest.json +212 -142
- package/lib/drama/skills/short-drama/SKILL.md +14 -2
- package/lib/drama/skills/short-drama/assets/project-template/short-drama.json +3 -0
- package/lib/drama/skills/short-drama/references/creator-documents.md +3 -0
- package/lib/drama/skills/short-drama/references/knowhow-index.md +15 -0
- package/lib/drama/skills/short-drama/scripts/project_tool.py +131 -0
- package/lib/drama/skills/short-drama-assets/SKILL.md +2 -1
- package/lib/drama/skills/short-drama-assets/references/asset-review-checklist.md +2 -0
- package/lib/drama/skills/short-drama-assets/references/era-anchors.md +37 -0
- package/lib/drama/skills/short-drama-assets/references/stage-contract.md +2 -0
- package/lib/drama/skills/short-drama-develop/SKILL.md +10 -4
- package/lib/drama/skills/short-drama-develop/assets/adaptation-map.example.jsonl +1 -1
- package/lib/drama/skills/short-drama-develop/assets/creative-brief.md +8 -0
- package/lib/drama/skills/short-drama-develop/references/adaptation-craft.md +80 -13
- package/lib/drama/skills/short-drama-develop/references/episode-design.md +95 -12
- package/lib/drama/skills/short-drama-develop/references/genre-and-hook-playbook.md +9 -5
- package/lib/drama/skills/short-drama-develop/references/genre-cards//345/244/215/344/273/207/346/211/223/350/204/270.md +1 -1
- package/lib/drama/skills/short-drama-develop/references/genre-cards//347/263/273/347/273/237/346/265/201.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//351/200/206/350/242/255.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//351/207/215/347/224/237/347/251/277/350/266/212.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards.md +10 -7
- package/lib/drama/skills/short-drama-develop/references/premise-devices.md +15 -9
- package/lib/drama/skills/short-drama-develop/references/serial-character-and-memory.md +3 -2
- package/lib/drama/skills/short-drama-develop/references/stage-contract.md +14 -7
- package/lib/drama/skills/short-drama-develop/references/story-craft.md +7 -3
- package/lib/drama/skills/short-drama-edit/SKILL.md +43 -20
- package/lib/drama/skills/short-drama-edit/assets/remotion/README.md +49 -13
- package/lib/drama/skills/short-drama-edit/assets/remotion/package.json +4 -2
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/Overlay.tsx +31 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/Root.tsx +5 -5
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/Subtitles.tsx +68 -69
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/font.ts +39 -29
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/rules.mjs +188 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/schema.ts +26 -13
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/Card.tsx +72 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/CornerChip.tsx +39 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/ScreenText.tsx +36 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/SystemPanel.tsx +44 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/TaskPanel.tsx +100 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/chrome.tsx +197 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/src/screen/tokens.ts +62 -0
- package/lib/drama/skills/short-drama-edit/assets/remotion/tsconfig.json +1 -0
- package/lib/drama/skills/short-drama-edit/assets//345/211/252/350/276/221/345/215/225.md +4 -2
- package/lib/drama/skills/short-drama-edit/references/cut-craft.md +3 -1
- package/lib/drama/skills/short-drama-edit/references/delivery-verify.md +6 -2
- package/lib/drama/skills/short-drama-edit/references/generated-footage.md +12 -6
- package/lib/drama/skills/short-drama-edit/references/sound-and-subtitles.md +13 -8
- package/lib/drama/skills/short-drama-edit/references/stage-contract.md +2 -0
- package/lib/drama/skills/short-drama-edit/scripts/edit_tool.py +1153 -121
- package/lib/drama/skills/short-drama-edit/scripts/selftest.py +49 -9
- package/lib/drama/skills/short-drama-novel-analyze/SKILL.md +3 -3
- package/lib/drama/skills/short-drama-novel-analyze/assets/episode-candidate.example.jsonl +2 -2
- package/lib/drama/skills/short-drama-novel-analyze/references/adaptation-triage.md +8 -4
- package/lib/drama/skills/short-drama-novel-analyze/references/adaptation-value.md +10 -3
- package/lib/drama/skills/short-drama-novel-analyze/references/aggregation-and-entities.md +25 -1
- package/lib/drama/skills/short-drama-novel-analyze/references/stage-contract.md +1 -0
- package/lib/drama/skills/short-drama-review/SKILL.md +2 -2
- package/lib/drama/skills/short-drama-review/references/review-method.md +6 -1
- package/lib/drama/skills/short-drama-review/references/rubric-assets-prompts.md +11 -0
- package/lib/drama/skills/short-drama-review/references/rubric-story-script.md +77 -3
- package/lib/drama/skills/short-drama-review/references/rubric-visual-motion.md +15 -0
- package/lib/drama/skills/short-drama-review/references/stage-contract.md +3 -0
- package/lib/drama/skills/short-drama-storyboard/SKILL.md +13 -5
- package/lib/drama/skills/short-drama-storyboard/references/blocking-playbooks.md +1 -1
- package/lib/drama/skills/short-drama-storyboard/references/production-shot-grammar.md +2 -2
- package/lib/drama/skills/short-drama-storyboard/references/shot-craft.md +82 -14
- package/lib/drama/skills/short-drama-storyboard/references/stage-contract.md +4 -2
- package/lib/drama/skills/short-drama-video-prompts/SKILL.md +5 -3
- package/lib/drama/skills/short-drama-video-prompts/references/camera-audio-continuity.md +12 -0
- package/lib/drama/skills/short-drama-video-prompts/references/delivery-profile.md +4 -5
- package/lib/drama/skills/short-drama-video-prompts/references/generability.md +4 -2
- package/lib/drama/skills/short-drama-video-prompts/references/minimax-h3.md +40 -1
- package/lib/drama/skills/short-drama-video-prompts/references/motion-recipe.md +20 -14
- package/lib/drama/skills/short-drama-video-prompts/references/performance-action-timing.md +1 -1
- package/lib/drama/skills/short-drama-video-prompts/references/production-prompt-grammar.md +8 -7
- package/lib/drama/skills/short-drama-video-prompts/references/review-and-fixtures.md +1 -1
- package/lib/drama/skills/short-drama-video-prompts/references/stage-contract.md +1 -0
- package/lib/drama/skills/short-drama-video-prompts/references/target-model-profile.md +8 -1
- package/lib/drama/skills/short-drama-video-prompts/references/wan-3.0.md +103 -0
- package/lib/drama/skills/short-drama-video-prompts/scripts/motion_timing_check.py +8 -7
- package/lib/drama/skills/short-drama-write/SKILL.md +8 -3
- package/lib/drama/skills/short-drama-write/references/dialogue-craft.md +1 -1
- package/lib/drama/skills/short-drama-write/references/script-craft.md +56 -3
- package/lib/drama/skills/short-drama-write/references/stage-contract.md +4 -0
- package/lib/drama/skills/short-drama-write/scripts/duration_estimate.py +48 -2
- package/lib/index.js +71 -21
- package/lib/index.js.map +3 -3
- package/lib/oh-story/manifest.json +545 -310
- package/lib/oh-story/roles/chapter-extractor.md +11 -11
- package/lib/oh-story/roles/character-designer.md +1 -2
- package/lib/oh-story/roles/consistency-checker.md +11 -9
- package/lib/oh-story/roles/narrative-writer.md +24 -25
- package/lib/oh-story/roles/story-architect.md +9 -61
- package/lib/oh-story/roles/story-explorer.md +20 -125
- package/lib/oh-story/roles/story-researcher.md +0 -1
- package/lib/oh-story/skills/story/SKILL.md +6 -6
- package/lib/oh-story/skills/story/VERSION +1 -1
- package/lib/oh-story/skills/story/references/author-memory-maintenance.md +75 -0
- package/lib/oh-story/skills/story/references/author-memory.md +40 -118
- package/lib/oh-story/skills/story/scripts/author_memory_commit.py +3 -3
- package/lib/oh-story/skills/story-deslop/SKILL.md +24 -25
- package/lib/oh-story/skills/story-deslop/references/agent-calls.md +5 -0
- package/lib/oh-story/skills/story-deslop/references/anti-ai-writing.md +1 -1
- package/lib/oh-story/skills/story-deslop/references/author-memory-maintenance.md +75 -0
- package/lib/oh-story/skills/story-deslop/references/author-memory.md +40 -118
- package/lib/oh-story/skills/story-deslop/references/banned-words.md +2 -2
- package/lib/oh-story/skills/story-deslop/references/deslop-gates.md +21 -4
- package/lib/oh-story/skills/story-deslop/references/style-resolution.md +4 -4
- package/lib/oh-story/skills/story-deslop/scripts/author_memory_commit.py +3 -3
- package/lib/oh-story/skills/story-deslop/scripts/check-ai-patterns.js +155 -8
- package/lib/oh-story/skills/story-import/SKILL.md +63 -579
- package/lib/oh-story/skills/story-import/references/deep-analysis.md +47 -0
- package/lib/oh-story/skills/story-import/references/format-and-structure.md +1 -1
- package/lib/oh-story/skills/story-import/references/import-report.md +64 -0
- package/lib/oh-story/skills/story-import/references/import-special-cases.md +34 -0
- package/lib/oh-story/skills/story-import/references/import-tracking.md +95 -0
- package/lib/oh-story/skills/story-import/references/length-routing.md +1 -1
- package/lib/oh-story/skills/story-import/references/outline-reverse-rules.md +79 -0
- package/lib/oh-story/skills/story-import/references/outline-reverse.md +24 -0
- package/lib/oh-story/skills/story-import/references/structure-mapping-long.md +95 -91
- package/lib/oh-story/skills/story-import/references/structure-mapping-short.md +24 -12
- package/lib/oh-story/skills/story-import/references/tracking-initialization.md +1 -1
- package/lib/oh-story/skills/story-import/references/tracking-transaction.md +11 -9
- package/lib/oh-story/skills/story-import/scripts/build_outline_brief.py +332 -0
- package/lib/oh-story/skills/story-import/scripts/check-outline-contract.js +101 -14
- package/lib/oh-story/skills/story-import/scripts/tracking_commit.py +278 -23
- package/lib/oh-story/skills/story-import/scripts/wordcount_core.py +179 -23
- package/lib/oh-story/skills/story-long-analyze/SKILL.md +28 -50
- package/lib/oh-story/skills/story-long-analyze/references/author-facing.md +12 -5
- package/lib/oh-story/skills/story-long-analyze/references/deconstruction-notes.md +1 -1
- package/lib/oh-story/skills/story-long-analyze/references/final-checks.md +19 -0
- package/lib/oh-story/skills/story-long-analyze/references/index-rebuild.md +11 -0
- package/lib/oh-story/skills/story-long-analyze/references/pipeline-ops.md +21 -55
- package/lib/oh-story/skills/story-long-analyze/references/stage1-golden-chapters.md +128 -0
- package/lib/oh-story/skills/story-long-analyze/references/stage2-extraction.md +229 -0
- package/lib/oh-story/skills/story-long-analyze/references/stage3-plot-rhythm.md +480 -0
- package/lib/oh-story/skills/story-long-analyze/references/stage4-characters-settings.md +195 -0
- package/lib/oh-story/skills/story-long-analyze/references/stage5-report.md +33 -0
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-generator.md +17 -0
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-protocol.md +1 -1
- package/lib/oh-story/skills/story-long-analyze/references/synthesis-inputs.md +39 -0
- package/lib/oh-story/skills/story-long-analyze/scripts/manage_analysis_run.py +47 -8
- package/lib/oh-story/skills/story-long-scan/SKILL.md +41 -193
- package/lib/oh-story/skills/story-long-scan/references/platform-ciweimao.md +19 -0
- package/lib/oh-story/skills/story-long-scan/references/platform-fanqie.md +45 -0
- package/lib/oh-story/skills/story-long-scan/references/platform-jjwxc.md +28 -0
- package/lib/oh-story/skills/story-long-scan/references/platform-qidian.md +35 -0
- package/lib/oh-story/skills/story-long-scan/references/platform-qimao.md +27 -0
- package/lib/oh-story/skills/story-long-scan/references/topic-decision.md +6 -2
- package/lib/oh-story/skills/story-long-write/SKILL.md +32 -73
- package/lib/oh-story/skills/story-long-write/references/agent-calls.md +47 -0
- package/lib/oh-story/skills/story-long-write/references/anti-ai-writing.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/artifact-protocols.md +18 -201
- package/lib/oh-story/skills/story-long-write/references/author-memory-maintenance.md +75 -0
- package/lib/oh-story/skills/story-long-write/references/author-memory.md +40 -118
- package/lib/oh-story/skills/story-long-write/references/banned-words.md +2 -2
- package/lib/oh-story/skills/story-long-write/references/benchmark-recall.md +6 -10
- package/lib/oh-story/skills/story-long-write/references/character-relations.md +49 -1
- package/lib/oh-story/skills/story-long-write/references/deslop-gates.md +171 -0
- package/lib/oh-story/skills/story-long-write/references/emotion-on-page.md +116 -0
- package/lib/oh-story/skills/story-long-write/references/emotional-arc-design.md +1 -114
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/long-chapter-quality.md +3 -2
- package/lib/oh-story/skills/story-long-write/references/long-format.md +0 -8
- package/lib/oh-story/skills/story-long-write/references/long-genre-catalog.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/long-genre-mechanics.md +3 -3
- package/lib/oh-story/skills/story-long-write/references/opening-design.md +2 -2
- package/lib/oh-story/skills/story-long-write/references/outline-conflict.md +4 -4
- package/lib/oh-story/skills/story-long-write/references/outline-methods.md +7 -7
- package/lib/oh-story/skills/story-long-write/references/outline-rhythm.md +3 -3
- package/lib/oh-story/skills/story-long-write/references/outline-structure-theory.md +14 -69
- package/lib/oh-story/skills/story-long-write/references/plot-frameworks.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/plot-special-topics.md +2 -2
- package/lib/oh-story/skills/story-long-write/references/project-files.md +10 -6
- package/lib/oh-story/skills/story-long-write/references/reader-contract-and-progression.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/reference-index.md +4 -4
- package/lib/oh-story/skills/story-long-write/references/stop-and-fix.md +9 -0
- package/lib/oh-story/skills/story-long-write/references/style-combat-face.md +1 -58
- package/lib/oh-story/skills/story-long-write/references/style-genre-modules.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/style-resolution.md +4 -4
- package/lib/oh-story/skills/story-long-write/references/tracking-initialization.md +1 -1
- package/lib/oh-story/skills/story-long-write/references/tracking-transaction.md +11 -9
- package/lib/oh-story/skills/story-long-write/references/workflow-chapter.md +33 -44
- package/lib/oh-story/skills/story-long-write/references/workflow-daily.md +18 -51
- package/lib/oh-story/skills/story-long-write/references/workflow-outline.md +157 -0
- package/lib/oh-story/skills/story-long-write/references/workflow-revision.md +53 -67
- package/lib/oh-story/skills/story-long-write/references/workflow-setup.md +112 -251
- package/lib/oh-story/skills/story-long-write/references/workflow-volume.md +142 -0
- package/lib/oh-story/skills/story-long-write/references/writer-prompt-fallback.md +5 -3
- package/lib/oh-story/skills/story-long-write/references/writing-craft.md +18 -56
- package/lib/oh-story/skills/story-long-write/scripts/author_memory_commit.py +3 -3
- package/lib/oh-story/skills/story-long-write/scripts/build_architect_brief.py +260 -0
- package/lib/oh-story/skills/story-long-write/scripts/build_writer_prompt.py +96 -16
- package/lib/oh-story/skills/story-long-write/scripts/check-ai-patterns.js +155 -8
- package/lib/oh-story/skills/story-long-write/scripts/check-outline-contract.js +101 -14
- package/lib/oh-story/skills/story-long-write/scripts/check-outline-copy.js +7 -2
- package/lib/oh-story/skills/story-long-write/scripts/outline_view.py +2 -1
- package/lib/oh-story/skills/story-long-write/scripts/storyctl.py +250 -50
- package/lib/oh-story/skills/story-long-write/scripts/tracking_commit.py +278 -23
- package/lib/oh-story/skills/story-long-write/scripts/wordcount_core.py +179 -23
- package/lib/oh-story/skills/story-review/SKILL.md +19 -273
- package/lib/oh-story/skills/story-review/references/agent-prompts.md +184 -0
- package/lib/oh-story/skills/story-review/references/anti-ai-writing.md +1 -1
- package/lib/oh-story/skills/story-review/references/author-memory-maintenance.md +75 -0
- package/lib/oh-story/skills/story-review/references/author-memory.md +40 -118
- package/lib/oh-story/skills/story-review/references/banned-words.md +2 -2
- package/lib/oh-story/skills/story-review/references/batch-review.md +19 -0
- package/lib/oh-story/skills/story-review/references/character-relations.md +49 -1
- package/lib/oh-story/skills/story-review/references/review-quality.md +2 -1
- package/lib/oh-story/skills/story-review/references/review-tracking.md +10 -0
- package/lib/oh-story/skills/story-review/references/solo.md +52 -0
- package/lib/oh-story/skills/story-review/references/style-resolution.md +4 -4
- package/lib/oh-story/skills/story-review/references/tracking-initialization.md +1 -1
- package/lib/oh-story/skills/story-review/references/tracking-transaction.md +11 -9
- package/lib/oh-story/skills/story-review/scripts/author_memory_commit.py +3 -3
- package/lib/oh-story/skills/story-review/scripts/check-ai-patterns.js +155 -8
- package/lib/oh-story/skills/story-review/scripts/tracking_commit.py +278 -23
- package/lib/oh-story/skills/story-review/scripts/wordcount_core.py +179 -23
- package/lib/oh-story/skills/story-setup/SKILL.md +69 -458
- package/lib/oh-story/skills/story-setup/references/agent-references/agent-quality.md +4 -4
- package/lib/oh-story/skills/story-setup/references/agent-references/anti-ai-writing.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/banned-words.md +2 -2
- package/lib/oh-story/skills/story-setup/references/agent-references/benchmark-style-load.md +107 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/character-relations.md +49 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/deslop-gates.md +21 -4
- package/lib/oh-story/skills/story-setup/references/agent-references/emotion-on-page.md +116 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/emotional-arc-design.md +1 -114
- package/lib/oh-story/skills/story-setup/references/agent-references/format-and-structure.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/genre-prose-cards.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/long-genre-catalog.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/long-genre-mechanics.md +3 -3
- package/lib/oh-story/skills/story-setup/references/agent-references/long-quality.md +7 -5
- package/lib/oh-story/skills/story-setup/references/agent-references/opening-design.md +2 -2
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-conflict.md +4 -4
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-methods.md +7 -7
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-rhythm.md +3 -3
- package/lib/oh-story/skills/story-setup/references/agent-references/short-emotional-methods.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/short-genre-formulas.md +0 -15
- package/lib/oh-story/skills/story-setup/references/agent-references/short-reversal.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/style-combat-face.md +1 -58
- package/lib/oh-story/skills/story-setup/references/agent-references/style-genre-modules.md +1 -1
- package/lib/oh-story/skills/story-setup/references/agent-references/style-resolution.md +4 -4
- package/lib/oh-story/skills/story-setup/references/agent-references/writing-craft.md +18 -56
- package/lib/oh-story/skills/story-setup/references/diagnostics.md +3 -3
- package/lib/oh-story/skills/story-short-analyze/SKILL.md +37 -110
- package/lib/oh-story/skills/story-short-analyze/references/analysis-character-relations.md +1 -1
- package/lib/oh-story/skills/story-short-analyze/references/analysis-method.md +42 -0
- package/lib/oh-story/skills/story-short-analyze/references/optional-modules.md +97 -0
- package/lib/oh-story/skills/story-short-analyze/references/output-contract.md +9 -47
- package/lib/oh-story/skills/story-short-analyze/references/quality-checklist.md +80 -0
- package/lib/oh-story/skills/story-short-analyze/references/source-story-quality.md +4 -4
- package/lib/oh-story/skills/story-short-analyze/references/stage2-3-structure-emotion.md +308 -0
- package/lib/oh-story/skills/story-short-analyze/references/{material-decomposition.md → stage4-6-reversal-summary.md} +303 -374
- package/lib/oh-story/skills/story-short-scan/SKILL.md +30 -64
- package/lib/oh-story/skills/story-short-scan/references/manual-rank-input.md +36 -0
- package/lib/oh-story/skills/story-short-scan/references/platform-dianzhong.md +24 -0
- package/lib/oh-story/skills/story-short-scan/references/platform-heiyan.md +21 -0
- package/lib/oh-story/skills/story-short-scan/references/topic-match.md +38 -0
- package/lib/oh-story/skills/story-short-write/SKILL.md +23 -34
- package/lib/oh-story/skills/story-short-write/references/agent-calls.md +13 -0
- package/lib/oh-story/skills/story-short-write/references/author-memory-maintenance.md +75 -0
- package/lib/oh-story/skills/story-short-write/references/author-memory.md +40 -118
- package/lib/oh-story/skills/story-short-write/references/banned-words.md +2 -2
- package/lib/oh-story/skills/story-short-write/references/benchmark-recall.md +1 -21
- package/lib/oh-story/skills/story-short-write/references/emotional-methods.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/genre-writing-formulas.md +0 -15
- package/lib/oh-story/skills/story-short-write/references/output-contract.md +9 -47
- package/lib/oh-story/skills/story-short-write/references/reference-index.md +17 -49
- package/lib/oh-story/skills/story-short-write/references/scene-craft.md +40 -0
- package/lib/oh-story/skills/story-short-write/references/short-craft.md +7 -43
- package/lib/oh-story/skills/story-short-write/references/short-format.md +3 -3
- package/lib/oh-story/skills/story-short-write/references/short-prose-quality.md +2 -1
- package/lib/oh-story/skills/story-short-write/references/short-reversal.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/style-resolution.md +4 -4
- package/lib/oh-story/skills/story-short-write/references/submission-craft.md +1 -1
- package/lib/oh-story/skills/story-short-write/references/villain-and-reveal.md +5 -10
- package/lib/oh-story/skills/story-short-write/references/workflow-design.md +19 -12
- package/lib/oh-story/skills/story-short-write/references/workflow-draft.md +22 -32
- package/lib/oh-story/skills/story-short-write/references/workflow-revision.md +84 -17
- package/lib/oh-story/skills/story-short-write/references/writing-workflow.md +7 -119
- package/lib/oh-story/skills/story-short-write/scripts/author_memory_commit.py +3 -3
- package/lib/oh-story/skills/story-short-write/scripts/check-ai-patterns.js +155 -8
- package/lib/oh-story/skills/story-short-write/scripts/check-outline-copy.js +7 -2
- package/lib/types/client/video-studio.d.ts.map +1 -1
- package/lib/types/native-hooks.d.ts +2 -2
- package/lib/types/native-hooks.d.ts.map +1 -1
- package/lib/types/role-tool.d.ts.map +1 -1
- package/lib/types/skill-provider.d.ts.map +1 -1
- package/lib/types/video-project.d.ts.map +1 -1
- package/lib/types/workspace-route.d.ts.map +1 -1
- package/lib/video-recap/CHANGELOG.md +60 -1
- package/lib/video-recap/README.en.md +348 -137
- package/lib/video-recap/README.md +340 -136
- package/lib/video-recap/manifest.json +406 -251
- package/lib/video-recap/skills/video-assemble/SKILL.md +30 -15
- package/lib/video-recap/skills/video-assemble/references/audio-modes.md +63 -0
- package/lib/video-recap/skills/video-assemble/references/explicit-audio-mix.md +75 -0
- package/lib/video-recap/skills/video-assemble/references/foreground-compose.md +118 -0
- package/lib/video-recap/skills/video-assemble/references/narration-adoption.md +103 -0
- package/lib/video-recap/skills/video-assemble/references/packaging.md +45 -0
- package/lib/video-recap/skills/video-assemble/references/pair-media.md +74 -0
- package/lib/video-recap/skills/video-assemble/references/source-score.md +147 -0
- package/lib/video-recap/skills/video-assemble/references/subtitle-track.md +202 -0
- package/lib/video-recap/skills/video-assemble/scripts/adoption/__init__.py +1 -0
- package/lib/video-recap/skills/video-assemble/scripts/adoption/audio_mix_binding.py +279 -0
- package/lib/video-recap/skills/video-assemble/scripts/adoption/frozen_audio.py +187 -0
- package/lib/video-recap/skills/video-assemble/scripts/adoption/narration_binding.py +323 -0
- package/lib/video-recap/skills/video-assemble/scripts/adoption/strict_inputs.py +109 -0
- package/lib/video-recap/skills/video-assemble/scripts/adoption/strict_publish.py +130 -0
- package/lib/video-recap/skills/video-assemble/scripts/artifacts.py +10 -46
- package/lib/video-recap/skills/video-assemble/scripts/assemble.py +378 -119
- package/lib/video-recap/skills/video-assemble/scripts/assemble_constants.py +29 -12
- package/lib/video-recap/skills/video-assemble/scripts/assembly_contract.py +95 -44
- package/lib/video-recap/skills/video-assemble/scripts/assembly_settings.py +75 -32
- package/lib/video-recap/skills/video-assemble/scripts/audio_mix.py +11 -11
- package/lib/video-recap/skills/video-assemble/scripts/compose_foreground.py +293 -0
- package/lib/video-recap/skills/video-assemble/scripts/export_jianying.py +71 -78
- package/lib/video-recap/skills/video-assemble/scripts/jianying/__init__.py +1 -0
- package/lib/video-recap/skills/video-assemble/scripts/{jianying_builders.py → jianying/builders.py} +39 -67
- package/lib/video-recap/skills/video-assemble/scripts/{jianying_model.py → jianying/model.py} +3 -11
- package/lib/video-recap/skills/video-assemble/scripts/{jianying_optional.py → jianying/optional.py} +1 -1
- package/lib/video-recap/skills/video-assemble/scripts/jianying/schema.py +53 -0
- package/lib/video-recap/skills/video-assemble/scripts/{jianying_templates.py → jianying/templates.py} +1 -1
- package/lib/video-recap/skills/video-assemble/scripts/{jianying_timeline_contract.py → jianying/timeline_contract.py} +34 -13
- package/lib/video-recap/skills/video-assemble/scripts/{jianying_writer.py → jianying/writer.py} +7 -17
- package/lib/video-recap/skills/video-assemble/scripts/lib.py +37 -4
- package/lib/video-recap/skills/video-assemble/scripts/media.py +12 -21
- package/lib/video-recap/skills/video-assemble/scripts/narration_audio.py +64 -34
- package/lib/video-recap/skills/video-assemble/scripts/packaging.py +122 -0
- package/lib/video-recap/skills/video-assemble/scripts/pair_media.py +216 -0
- package/lib/video-recap/skills/video-assemble/scripts/render_preflight.py +1 -3
- package/lib/video-recap/skills/video-assemble/scripts/source_score.py +469 -0
- package/lib/video-recap/skills/video-assemble/scripts/source_subtitles.py +25 -9
- package/lib/video-recap/skills/video-assemble/scripts/subtitles/__init__.py +1 -0
- package/lib/video-recap/skills/video-assemble/scripts/{subtitle_core.py → subtitles/core.py} +13 -6
- package/lib/video-recap/skills/video-assemble/scripts/{subtitle_render.py → subtitles/render.py} +5 -4
- package/lib/video-recap/skills/video-assemble/scripts/subtitles/track.py +324 -0
- package/lib/video-recap/skills/video-assemble/scripts/subtitles/track_binding.py +200 -0
- package/lib/video-recap/skills/video-assemble/scripts/timeline.py +30 -46
- package/lib/video-recap/skills/video-assemble/scripts/timeline_emit.py +91 -7
- package/lib/video-recap/skills/video-assemble/scripts/visual_render.py +22 -8
- package/lib/video-recap/skills/video-cut/SKILL.md +34 -16
- package/lib/video-recap/skills/video-cut/references/shot-review.md +50 -0
- package/lib/video-recap/skills/video-cut/scripts/cut.py +2 -28
- package/lib/video-recap/skills/video-cut/scripts/cut_cli.py +58 -62
- package/lib/video-recap/skills/video-cut/scripts/cut_contract.py +21 -106
- package/lib/video-recap/skills/video-cut/scripts/cut_render.py +14 -9
- package/lib/video-recap/skills/video-cut/scripts/lib.py +39 -0
- package/lib/video-recap/skills/video-cut/scripts/narration_mapping.py +2 -155
- package/lib/video-recap/skills/video-cut/scripts/narrative_selection.py +244 -0
- package/lib/video-recap/skills/video-cut/scripts/shot_review.py +357 -0
- package/lib/video-recap/skills/video-recap/SKILL.md +86 -42
- package/lib/video-recap/skills/video-recap/references/audio-routing.md +126 -0
- package/lib/video-recap/skills/video-recap/references/config-playbook.md +12 -8
- package/lib/video-recap/skills/video-recap/references/data-schema.md +44 -33
- package/lib/video-recap/skills/video-recap/references/resource-library.md +151 -0
- package/lib/video-recap/skills/video-recap/references/shift-left-qc-schema.md +1 -1
- package/lib/video-recap/skills/video-recap/scripts/doctor.py +123 -30
- package/lib/video-recap/skills/video-recap/scripts/final_qc.py +22 -75
- package/lib/video-recap/skills/video-recap/scripts/lib.py +3 -3
- package/lib/video-recap/skills/video-recap/scripts/library.py +509 -0
- package/lib/video-recap/skills/video-recap/scripts/materials.py +63 -91
- package/lib/video-recap/skills/video-recap/scripts/mimo_qc.py +8 -70
- package/lib/video-recap/skills/video-recap/scripts/project_binding.py +286 -0
- package/lib/video-recap/skills/video-recap/scripts/qc/__init__.py +1 -0
- package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_client.py → qc/mimo_client.py} +1 -1
- package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_evidence.py → qc/mimo_evidence.py} +33 -66
- package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_observations.py → qc/mimo_observations.py} +3 -11
- package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_payload.py → qc/mimo_payload.py} +4 -7
- package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_report.py → qc/mimo_report.py} +17 -28
- package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_runner.py → qc/mimo_runner.py} +2 -2
- package/lib/video-recap/skills/video-recap/scripts/qc_contract.py +0 -19
- package/lib/video-recap/skills/video-recap/scripts/recap_cli.py +119 -50
- package/lib/video-recap/skills/video-recap/scripts/recap_inspect.py +32 -114
- package/lib/video-recap/skills/video-recap/scripts/recap_review.py +9 -23
- package/lib/video-recap/skills/video-recap/scripts/recap_runner.py +387 -334
- package/lib/video-recap/skills/video-recap/scripts/recap_runtime.py +23 -23
- package/lib/video-recap/skills/video-recap/scripts/recap_source.py +278 -0
- package/lib/video-recap/skills/video-recap/scripts/recap_stage_qc.py +25 -12
- package/lib/video-recap/skills/video-recap/scripts/recap_timeline.py +59 -52
- package/lib/video-recap/skills/video-recap/scripts/resource_lock.py +162 -0
- package/lib/video-recap/skills/video-script/SKILL.md +16 -13
- package/lib/video-recap/skills/video-script/references/creative-editing-playbook.md +9 -5
- package/lib/video-recap/skills/video-script/references/promotional-copy.md +68 -0
- package/lib/video-recap/skills/video-script/references/research-guide.md +1 -1
- package/lib/video-recap/skills/video-script/scripts/evidence_bundle.py +24 -76
- package/lib/video-recap/skills/video-script/scripts/lib.py +10 -87
- package/lib/video-recap/skills/video-script/scripts/narration_lint.py +63 -39
- package/lib/video-recap/skills/video-script/scripts/review.py +0 -2
- package/lib/video-recap/skills/video-script/scripts/review_grounding.py +35 -59
- package/lib/video-recap/skills/video-script/scripts/review_response.py +66 -128
- package/lib/video-recap/skills/video-script/scripts/review_runner.py +12 -20
- package/lib/video-recap/skills/video-script/scripts/speech_ownership.py +4 -4
- package/lib/video-recap/skills/video-script/scripts/validate.py +53 -42
- package/lib/video-recap/skills/video-understanding/SKILL.md +6 -4
- package/lib/video-recap/skills/video-understanding/references/data-schema.md +50 -156
- package/lib/video-recap/skills/video-understanding/references/research-guide.md +4 -4
- package/lib/video-recap/skills/video-understanding/scripts/asr.py +85 -65
- package/lib/video-recap/skills/video-understanding/scripts/asr_timing_evidence.py +270 -0
- package/lib/video-recap/skills/video-understanding/scripts/brief.py +2 -5
- package/lib/video-recap/skills/video-understanding/scripts/briefing/__init__.py +1 -0
- package/lib/video-recap/skills/video-understanding/scripts/{agent_brief.py → briefing/builder.py} +38 -35
- package/lib/video-recap/skills/{video-script/scripts/brief_context.py → video-understanding/scripts/briefing/context.py} +4 -35
- package/lib/video-recap/skills/{video-script/scripts/brief_inputs.py → video-understanding/scripts/briefing/inputs.py} +9 -31
- package/lib/video-recap/skills/video-understanding/scripts/{brief_timeline.py → briefing/timeline.py} +5 -6
- package/lib/video-recap/skills/video-understanding/scripts/consolidate.py +65 -116
- package/lib/video-recap/skills/video-understanding/scripts/detect.py +31 -40
- package/lib/video-recap/skills/video-understanding/scripts/lib.py +30 -86
- package/lib/video-recap/skills/video-understanding/scripts/narration_lint.py +63 -39
- package/lib/video-recap/skills/video-understanding/scripts/speech_ownership.py +4 -4
- package/lib/video-recap/skills/video-understanding/scripts/storyboard.py +17 -79
- package/lib/video-recap/skills/video-understanding/scripts/understanding_brief.py +14 -40
- package/lib/video-recap/skills/video-understanding/scripts/understanding_cache.py +64 -46
- package/lib/video-recap/skills/video-understanding/scripts/understanding_runner.py +31 -11
- package/lib/video-recap/skills/video-understanding/scripts/understanding_storyboard.py +19 -14
- package/lib/video-recap/skills/video-understanding/scripts/vlm.py +80 -108
- package/lib/video-recap/skills/video-voiceover/SKILL.md +29 -19
- package/lib/video-recap/skills/video-voiceover/references/index-tts.md +31 -0
- package/lib/video-recap/skills/video-voiceover/scripts/approved_text_policy.py +123 -0
- package/lib/video-recap/skills/video-voiceover/scripts/dub.py +51 -59
- package/lib/video-recap/skills/video-voiceover/scripts/lib.py +8 -44
- package/lib/video-recap/skills/video-voiceover/scripts/providers/__init__.py +1 -0
- package/lib/video-recap/skills/video-voiceover/scripts/providers/index_tts.py +184 -0
- package/lib/video-recap/skills/video-voiceover/scripts/voiceover.py +212 -134
- package/package.json +41 -41
- package/lib/oh-story/skills/story-long-analyze/references/material-decomposition.md +0 -538
- package/lib/oh-story/skills/story-long-analyze/references/output-templates.md +0 -603
- package/lib/oh-story/skills/story-long-scan/references/scan-output-format.md +0 -207
- package/lib/oh-story/skills/story-short-analyze/references/output-templates.md +0 -561
- package/lib/video-recap/skills/video-assemble/scripts/jianying_schema.py +0 -98
- package/lib/video-recap/skills/video-recap/references/creative-editing-playbook.md +0 -225
- package/lib/video-recap/skills/video-recap/references/research-guide.md +0 -74
- package/lib/video-recap/skills/video-recap/references/timeline-and-jianying.md +0 -250
- package/lib/video-recap/skills/video-script/scripts/agent_brief.py +0 -399
- package/lib/video-recap/skills/video-script/scripts/brief_timeline.py +0 -327
- package/lib/video-recap/skills/video-script/scripts/narration.py +0 -12
- package/lib/video-recap/skills/video-understanding/scripts/brief_context.py +0 -348
- package/lib/video-recap/skills/video-understanding/scripts/brief_inputs.py +0 -290
- /package/lib/video-recap/skills/video-assemble/scripts/{jianying_tracks.py → jianying/tracks.py} +0 -0
- /package/lib/video-recap/skills/video-recap/scripts/{mimo_qc_contract.py → qc/mimo_contract.py} +0 -0
- /package/lib/video-recap/skills/video-voiceover/scripts/{fish_audio.py → providers/fish_audio.py} +0 -0
|
@@ -6,7 +6,7 @@ probing, no new deps, no cross-skill import). A missing artifact is the legitima
|
|
|
6
6
|
"that stage has not run yet" state and is reported as such.
|
|
7
7
|
|
|
8
8
|
Two subcommands:
|
|
9
|
-
state summarize the work_dir: source video
|
|
9
|
+
state summarize the work_dir: source video, full|cut mode, which stage
|
|
10
10
|
artifacts are present vs missing, which file is the NEXT pause the pipeline waits
|
|
11
11
|
on, stale-manifest risk, and storyboard path(s) if present.
|
|
12
12
|
clip-map read clip_plan_validated.json and map a queried window between the OUTPUT and
|
|
@@ -14,8 +14,8 @@ Two subcommands:
|
|
|
14
14
|
(output = clip.output_start + (src - clip.source_start), clamped to the clip),
|
|
15
15
|
reimplemented locally. Flags cross-clip boundaries and cut-out gaps.
|
|
16
16
|
|
|
17
|
-
Output: markdown by default; --json for machine-readable;
|
|
18
|
-
|
|
17
|
+
Output: markdown by default; --json for machine-readable; long free text is truncated
|
|
18
|
+
unless --full is passed.
|
|
19
19
|
"""
|
|
20
20
|
import argparse
|
|
21
21
|
import json
|
|
@@ -51,7 +51,6 @@ _SCRIPT_ARTIFACTS = [
|
|
|
51
51
|
]
|
|
52
52
|
_RENDER_ARTIFACTS = [
|
|
53
53
|
"tts_meta.json",
|
|
54
|
-
"narration_mapped.json",
|
|
55
54
|
"timeline.json",
|
|
56
55
|
"subtitles.srt",
|
|
57
56
|
"subtitles.ass",
|
|
@@ -61,7 +60,6 @@ _STORYBOARD_ARTIFACTS = [
|
|
|
61
60
|
"storyboard/source_storyboard.json",
|
|
62
61
|
"storyboard/edited_storyboard.json",
|
|
63
62
|
]
|
|
64
|
-
_FORWARD_STATE_FILES = ["manifest.json", "task_state.json"]
|
|
65
63
|
|
|
66
64
|
_COMPACT_TEXT_LIMIT = 80
|
|
67
65
|
|
|
@@ -74,14 +72,12 @@ def _truncate(text, compact):
|
|
|
74
72
|
|
|
75
73
|
|
|
76
74
|
def _load_optional(path):
|
|
77
|
-
"""The artifact's JSON, or None when the stage that writes it has not run yet.
|
|
75
|
+
"""The artifact's JSON, or None when the stage that writes it has not run yet.
|
|
76
|
+
|
|
77
|
+
A present-but-corrupt artifact raises: every file probed here is written by this
|
|
78
|
+
pipeline or a sibling skill under its documented contract."""
|
|
78
79
|
path = Path(path)
|
|
79
|
-
if
|
|
80
|
-
return None
|
|
81
|
-
try:
|
|
82
|
-
return load_json(path)
|
|
83
|
-
except (OSError, ValueError):
|
|
84
|
-
return None
|
|
80
|
+
return load_json(path) if path.exists() else None
|
|
85
81
|
|
|
86
82
|
|
|
87
83
|
def _fmt_seconds(value):
|
|
@@ -93,94 +89,36 @@ def _fmt_seconds(value):
|
|
|
93
89
|
|
|
94
90
|
# --- source video discovery --------------------------------------------------
|
|
95
91
|
def _discover_source(work_dir):
|
|
96
|
-
"""Find the source video path
|
|
97
|
-
|
|
98
|
-
nothing records it."""
|
|
92
|
+
"""Find the source video path by reading recap artifacts, most authoritative first.
|
|
93
|
+
Returns {path, origin} with path=None + origin="unknown" when nothing records it."""
|
|
99
94
|
work_dir = Path(work_dir)
|
|
100
95
|
# 1. recap_run_manifest.json — canonical: written before the first pause with both fields.
|
|
101
96
|
# A multi-source manifest carries `sources` instead of `source_video`.
|
|
102
97
|
data = _load_optional(work_dir / "recap_run_manifest.json")
|
|
103
|
-
if
|
|
104
|
-
return {
|
|
105
|
-
"path": data["source_video"],
|
|
106
|
-
"fingerprint": data.get("source_video_fingerprint"),
|
|
107
|
-
"origin": "recap_run_manifest.json",
|
|
108
|
-
}
|
|
98
|
+
if data is not None and data.get("source_video"):
|
|
99
|
+
return {"path": data["source_video"], "origin": "recap_run_manifest.json"}
|
|
109
100
|
# 2. assembly_manifest.json — late stage; carries input_video (+ source_video in cut mode).
|
|
110
101
|
data = _load_optional(work_dir / "assembly_manifest.json")
|
|
111
|
-
if
|
|
102
|
+
if data is not None:
|
|
112
103
|
return {
|
|
113
104
|
"path": data.get("source_video") or data["input_video"],
|
|
114
|
-
"fingerprint": data.get("source_video_fingerprint"),
|
|
115
105
|
"origin": "assembly_manifest.json",
|
|
116
106
|
}
|
|
117
|
-
# 3. edited_source.mp4.meta.json —
|
|
107
|
+
# 3. edited_source.mp4.meta.json — video-cut records sources: {path: {size, mtime_ns}};
|
|
108
|
+
# a single-source cut has exactly one entry.
|
|
118
109
|
data = _load_optional(work_dir / "edited_source.mp4.meta.json")
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
return {"path": None, "fingerprint": None, "origin": "unknown"}
|
|
110
|
+
sources = data.get("sources") if isinstance(data, dict) else None
|
|
111
|
+
if isinstance(sources, dict) and len(sources) == 1:
|
|
112
|
+
(path,) = sources
|
|
113
|
+
return {"path": path, "origin": "edited_source.mp4.meta.json"}
|
|
114
|
+
return {"path": None, "origin": "unknown"}
|
|
126
115
|
|
|
127
116
|
|
|
128
117
|
def _discover_multi_source(work_dir):
|
|
129
118
|
data = _load_optional(Path(work_dir) / "multi_source_manifest.json")
|
|
130
|
-
if
|
|
119
|
+
if data is None:
|
|
131
120
|
return None
|
|
132
|
-
return {
|
|
133
|
-
"schema_version": data.get("schema_version", 1),
|
|
134
|
-
"sources": [source for source in data["sources"] if isinstance(source, dict)],
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
def _clip_entries(plan):
|
|
139
|
-
if isinstance(plan, dict):
|
|
140
|
-
entries = plan.get("clips")
|
|
141
|
-
elif isinstance(plan, list):
|
|
142
|
-
entries = plan
|
|
143
|
-
else:
|
|
144
|
-
return None
|
|
145
|
-
return entries if isinstance(entries, list) else None
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
def _normalize_clips(entries):
|
|
149
|
-
"""Normalize current and historical validated plans for the advisory mapper."""
|
|
150
|
-
clips, cursor = [], 0.0
|
|
151
|
-
for index, raw in enumerate(entries):
|
|
152
|
-
if not isinstance(raw, dict):
|
|
153
|
-
continue
|
|
154
|
-
try:
|
|
155
|
-
source_start = float(raw.get("source_start", raw.get("start")))
|
|
156
|
-
source_end = float(raw.get("source_end", raw.get("end")))
|
|
157
|
-
except (TypeError, ValueError):
|
|
158
|
-
continue
|
|
159
|
-
if source_end <= source_start:
|
|
160
|
-
continue
|
|
161
|
-
output_start = raw.get("output_start")
|
|
162
|
-
output_end = raw.get("output_end")
|
|
163
|
-
if output_start is None or output_end is None:
|
|
164
|
-
output_start, output_end = cursor, cursor + source_end - source_start
|
|
165
|
-
else:
|
|
166
|
-
try:
|
|
167
|
-
output_start, output_end = float(output_start), float(output_end)
|
|
168
|
-
except (TypeError, ValueError):
|
|
169
|
-
continue
|
|
170
|
-
cursor = output_end
|
|
171
|
-
clips.append(
|
|
172
|
-
{
|
|
173
|
-
"clip_id": raw.get("clip_id", index),
|
|
174
|
-
"source_id": raw.get("source_id"),
|
|
175
|
-
"source_path": raw.get("source_path"),
|
|
176
|
-
"source_start": source_start,
|
|
177
|
-
"source_end": source_end,
|
|
178
|
-
"output_start": output_start,
|
|
179
|
-
"output_end": output_end,
|
|
180
|
-
"reason": str(raw.get("reason", raw.get("note", ""))).strip(),
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
return clips
|
|
121
|
+
return {"schema_version": data["schema_version"], "sources": data["sources"]}
|
|
184
122
|
|
|
185
123
|
|
|
186
124
|
# --- forward affine map --------------------------------------------------------
|
|
@@ -237,8 +175,7 @@ def _next_pause(work_dir, mode):
|
|
|
237
175
|
|
|
238
176
|
|
|
239
177
|
def _stale_manifest_note(work_dir, mode):
|
|
240
|
-
"""Advisory stale-manifest risks read purely from file presence
|
|
241
|
-
that would need the source bytes). Surfaces the two desync traps recap.py guards: a cut
|
|
178
|
+
"""Advisory stale-manifest risks read purely from file presence. Surfaces the two desync traps recap.py guards: a cut
|
|
242
179
|
narration without the phase ledger that ties it to a clip_plan, and a missing run manifest."""
|
|
243
180
|
notes = []
|
|
244
181
|
if not _present(work_dir, "recap_run_manifest.json"):
|
|
@@ -258,7 +195,6 @@ def cmd_state(work_dir, compact=None):
|
|
|
258
195
|
if not work_dir.exists():
|
|
259
196
|
return {"error": f"work_dir 不存在: {work_dir}"}
|
|
260
197
|
|
|
261
|
-
forward = [name for name in _FORWARD_STATE_FILES if _present(work_dir, name)]
|
|
262
198
|
mode = _detect_mode(work_dir)
|
|
263
199
|
groups = {
|
|
264
200
|
"understanding": _UNDERSTANDING_ARTIFACTS,
|
|
@@ -277,7 +213,6 @@ def cmd_state(work_dir, compact=None):
|
|
|
277
213
|
return {
|
|
278
214
|
"work_dir": str(work_dir),
|
|
279
215
|
"mode": mode,
|
|
280
|
-
"forward_state_files": forward,
|
|
281
216
|
"source_video": _discover_source(work_dir),
|
|
282
217
|
"multi_source": _discover_multi_source(work_dir),
|
|
283
218
|
"next_pause": {"artifact": pause[0], "hint": pause[1]} if pause else None,
|
|
@@ -287,29 +222,19 @@ def cmd_state(work_dir, compact=None):
|
|
|
287
222
|
}
|
|
288
223
|
|
|
289
224
|
|
|
290
|
-
def _short_fingerprint(fp):
|
|
291
|
-
return f"{fp[:12]}…" if fp else "unknown"
|
|
292
|
-
|
|
293
|
-
|
|
294
225
|
def _render_state_md(state, compact):
|
|
295
226
|
if "error" in state:
|
|
296
227
|
return state["error"]
|
|
297
228
|
lines = [f"# recap work_dir 状态: {state['work_dir']}", ""]
|
|
298
|
-
if state["forward_state_files"]:
|
|
299
|
-
lines.append(f"状态来源(write-side manifest): {', '.join(state['forward_state_files'])}")
|
|
300
229
|
lines.append(f"模式: **{state['mode']}**")
|
|
301
230
|
src = state["source_video"]
|
|
302
|
-
lines.append(
|
|
303
|
-
f"源视频: {_truncate(src['path'] or 'unknown', compact)} "
|
|
304
|
-
f"(fp {_short_fingerprint(src['fingerprint'])}, 来源 {src['origin']})"
|
|
305
|
-
)
|
|
231
|
+
lines.append(f"源视频: {_truncate(src['path'] or 'unknown', compact)} (来源 {src['origin']})")
|
|
306
232
|
if state["multi_source"]:
|
|
307
233
|
lines.append("多源素材:")
|
|
308
234
|
for s in state["multi_source"]["sources"]:
|
|
309
235
|
lines.append(
|
|
310
236
|
f" - {s['source_id']}: {_truncate(s['source_path'], compact)} "
|
|
311
|
-
f"(
|
|
312
|
-
f"work_dir {s['source_work_dir']}, material {s['material_id']})"
|
|
237
|
+
f"(work_dir {s['source_work_dir']}, material {s['material_id']})"
|
|
313
238
|
)
|
|
314
239
|
lines.append("")
|
|
315
240
|
|
|
@@ -351,14 +276,10 @@ def cmd_clip_map(work_dir, output_start, output_end, source_start, source_end, c
|
|
|
351
276
|
if not validated.exists():
|
|
352
277
|
return {"error": "clip_plan_validated.json 不存在:这不是 cut 运行,或剪辑计划尚未被 cut.py 校验。"
|
|
353
278
|
"(full 模式没有源↔输出映射;cut 模式请先跑 video-cut。)"}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
entries = _clip_entries(plan)
|
|
359
|
-
if entries is None:
|
|
360
|
-
return {"error": "clip_plan_validated.json 结构异常:需要 clips 数组。"}
|
|
361
|
-
clips = _normalize_clips(entries)
|
|
279
|
+
# video-cut writes {"clips": [{clip_id, source_start, source_end, output_start,
|
|
280
|
+
# output_end, duration, reason}]} (cut_contract); source_id/source_path only for
|
|
281
|
+
# multi-source cuts.
|
|
282
|
+
clips = load_json(validated)["clips"]
|
|
362
283
|
if not clips:
|
|
363
284
|
return {"error": "clip_plan_validated.json 没有有效的 clip。"}
|
|
364
285
|
|
|
@@ -391,7 +312,7 @@ def _segment(clip, *, source, output, compact):
|
|
|
391
312
|
"source_path": clip.get("source_path"),
|
|
392
313
|
"output": output,
|
|
393
314
|
"source": source,
|
|
394
|
-
"reason": _truncate(clip
|
|
315
|
+
"reason": _truncate(clip["reason"], compact),
|
|
395
316
|
}
|
|
396
317
|
|
|
397
318
|
|
|
@@ -498,11 +419,8 @@ def main(argv=None):
|
|
|
498
419
|
description="Advisory read-only inspection of a video-recap work_dir (pure JSON).")
|
|
499
420
|
parser.add_argument("--work-dir", required=True, help="recap work_dir to inspect")
|
|
500
421
|
parser.add_argument("--json", action="store_true", help="machine-readable JSON output")
|
|
501
|
-
compact =
|
|
502
|
-
|
|
503
|
-
help="truncate long free text to keep agent context small (default ON)")
|
|
504
|
-
compact.add_argument("--full", dest="compact", action="store_false",
|
|
505
|
-
help="do not truncate long free text")
|
|
422
|
+
parser.add_argument("--full", dest="compact", action="store_false", default=True,
|
|
423
|
+
help="do not truncate long free text (truncated by default)")
|
|
506
424
|
sub = parser.add_subparsers(dest="command", required=True)
|
|
507
425
|
|
|
508
426
|
sub.add_parser("state", help="summarize work_dir + the next pause the pipeline is waiting on")
|
|
@@ -1,43 +1,29 @@
|
|
|
1
1
|
"""Apply the optional or strict narration-review gate before TTS."""
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
-
import os
|
|
5
4
|
from pathlib import Path
|
|
6
5
|
|
|
6
|
+
from lib import env_bool
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
def review_narration_enabled(args):
|
|
9
10
|
if args.review_narration is not None:
|
|
10
11
|
return args.review_narration
|
|
11
|
-
return
|
|
12
|
+
return env_bool("REVIEW_NARRATION", True)
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
def require_narration_review(args):
|
|
15
|
-
return args.require_narration_review or
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def _env_bool(name, default):
|
|
19
|
-
raw = os.environ.get(name)
|
|
20
|
-
return default if not raw else raw.strip().lower() in {"1", "true", "yes", "y", "on"}
|
|
16
|
+
return args.require_narration_review or env_bool("REQUIRE_NARRATION_REVIEW", False)
|
|
21
17
|
|
|
22
18
|
|
|
23
19
|
def review_result_status(work_dir):
|
|
20
|
+
"""Gate on the review video-script wrote (findings: list of {severity in
|
|
21
|
+
error|warning|suggestion}, already normalised by review_response)."""
|
|
24
22
|
path = Path(work_dir) / "narration_review.json"
|
|
25
23
|
if not path.exists():
|
|
26
|
-
return {"ok": False, "reason": "missing
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
except (OSError, json.JSONDecodeError):
|
|
30
|
-
return {"ok": False, "reason": "missing or invalid narration_review.json"}
|
|
31
|
-
if not isinstance(data, dict):
|
|
32
|
-
return {"ok": False, "reason": "missing or invalid narration_review.json"}
|
|
33
|
-
findings = data.get("findings")
|
|
34
|
-
if not isinstance(findings, list) or any(
|
|
35
|
-
not isinstance(finding, dict)
|
|
36
|
-
or not isinstance(finding.get("severity"), str)
|
|
37
|
-
for finding in findings
|
|
38
|
-
):
|
|
39
|
-
return {"ok": False, "reason": "missing or invalid narration_review.json"}
|
|
40
|
-
error_count = sum(1 for finding in findings if finding["severity"] == "error")
|
|
24
|
+
return {"ok": False, "reason": "missing narration_review.json"}
|
|
25
|
+
data = json.loads(path.read_text(encoding="utf-8"))
|
|
26
|
+
error_count = sum(1 for finding in data["findings"] if finding["severity"] == "error")
|
|
41
27
|
if data.get("parse_error"):
|
|
42
28
|
return {"ok": False, "reason": "parse_error", "review": data, "errors": error_count}
|
|
43
29
|
if error_count:
|