@lemoncat7/dsh-partner 2.8.1 → 2.8.3
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/docs/THIRD_PARTY_LICENSES.md +10 -0
- package/docs/blocked-delivery-recovery.md +7 -0
- package/docs/concern-attention.md +19 -0
- package/docs/observation-contract.md +21 -0
- package/docs/pendant-loading.md +30 -0
- package/docs/releases/2.8.2.md +7 -0
- package/docs/releases/2.8.3.md +20 -0
- package/lib/agent-runtime.d.ts +7 -0
- package/lib/agent-runtime.d.ts.map +1 -1
- package/lib/agent-runtime.js +119 -35
- package/lib/agent-runtime.js.map +1 -1
- package/lib/api/features/pendant-api.d.ts.map +1 -1
- package/lib/api/features/pendant-api.js +11 -2
- package/lib/api/features/pendant-api.js.map +1 -1
- package/lib/api.d.ts +1 -0
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +41 -6
- package/lib/api.js.map +1 -1
- package/lib/autonomy.d.ts.map +1 -1
- package/lib/autonomy.js +9 -2
- package/lib/autonomy.js.map +1 -1
- package/lib/channel-message.d.ts +2 -0
- package/lib/channel-message.d.ts.map +1 -1
- package/lib/channel-message.js.map +1 -1
- package/lib/channels/direct/message-format.js +127 -127
- package/lib/channels/direct/message-format.js.map +1 -1
- package/lib/channels/manager.d.ts.map +1 -1
- package/lib/channels/manager.js +4 -3
- package/lib/channels/manager.js.map +1 -1
- package/lib/channels/notification-delivery.d.ts.map +1 -1
- package/lib/channels/notification-delivery.js +10 -0
- package/lib/channels/notification-delivery.js.map +1 -1
- package/lib/channels/weixin/connect.d.ts.map +1 -1
- package/lib/client-api.d.ts +17 -2
- package/lib/client-api.d.ts.map +1 -1
- package/lib/client-api.js +8 -1
- package/lib/client-api.js.map +1 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +2398 -1970
- package/lib/client.js.map +4 -4
- package/lib/client.pendant.js +4157 -0
- package/lib/collaboration/composition.js +1 -1
- package/lib/collaboration/composition.js.map +1 -1
- package/lib/concern-attention.d.ts +19 -0
- package/lib/concern-attention.d.ts.map +1 -0
- package/lib/concern-attention.js +36 -0
- package/lib/concern-attention.js.map +1 -0
- package/lib/concern-domain.d.ts +10 -1
- package/lib/concern-domain.d.ts.map +1 -1
- package/lib/concern-domain.js +4 -0
- package/lib/concern-domain.js.map +1 -1
- package/lib/concern-execution-notes.d.ts +18 -0
- package/lib/concern-execution-notes.d.ts.map +1 -0
- package/lib/concern-execution-notes.js +41 -0
- package/lib/concern-execution-notes.js.map +1 -0
- package/lib/concern-execution-receipt.d.ts +4 -0
- package/lib/concern-execution-receipt.d.ts.map +1 -0
- package/lib/concern-execution-receipt.js +28 -0
- package/lib/concern-execution-receipt.js.map +1 -0
- package/lib/concern-execution.d.ts +32 -0
- package/lib/concern-execution.d.ts.map +1 -0
- package/lib/concern-execution.js +112 -0
- package/lib/concern-execution.js.map +1 -0
- package/lib/concern-management-tool.d.ts.map +1 -1
- package/lib/concern-management-tool.js +21 -19
- package/lib/concern-management-tool.js.map +1 -1
- package/lib/concern-note-source.d.ts +7 -0
- package/lib/concern-note-source.d.ts.map +1 -0
- package/lib/concern-note-source.js +25 -0
- package/lib/concern-note-source.js.map +1 -0
- package/lib/concern-resources.d.ts +27 -0
- package/lib/concern-resources.d.ts.map +1 -0
- package/lib/concern-resources.js +36 -0
- package/lib/concern-resources.js.map +1 -0
- package/lib/concern-sources.d.ts +1 -1
- package/lib/concern-sources.d.ts.map +1 -1
- package/lib/concern-store.d.ts +10 -1
- package/lib/concern-store.d.ts.map +1 -1
- package/lib/concern-store.js +135 -36
- package/lib/concern-store.js.map +1 -1
- package/lib/concern-tool.d.ts +1 -0
- package/lib/concern-tool.d.ts.map +1 -1
- package/lib/concern-tool.js +8 -4
- package/lib/concern-tool.js.map +1 -1
- package/lib/decision/conversation.d.ts +11 -0
- package/lib/decision/conversation.d.ts.map +1 -0
- package/lib/decision/conversation.js +52 -0
- package/lib/decision/conversation.js.map +1 -0
- package/lib/decision/events.d.ts +16 -0
- package/lib/decision/events.d.ts.map +1 -0
- package/lib/decision/events.js +9 -0
- package/lib/decision/events.js.map +1 -0
- package/lib/domain.d.ts +2 -0
- package/lib/domain.d.ts.map +1 -1
- package/lib/domain.js.map +1 -1
- package/lib/heartbeat.d.ts +12 -10
- package/lib/heartbeat.d.ts.map +1 -1
- package/lib/heartbeat.js +55 -26
- package/lib/heartbeat.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/lib/memory-prompt-context.js +1 -0
- package/lib/memory-prompt-context.js.map +1 -1
- package/lib/memory-reflection.js +1 -1
- package/lib/observation-contract.d.ts +9 -0
- package/lib/observation-contract.d.ts.map +1 -0
- package/lib/observation-contract.js +19 -0
- package/lib/observation-contract.js.map +1 -0
- package/lib/observation-executor.d.ts +5 -0
- package/lib/observation-executor.d.ts.map +1 -1
- package/lib/observation-executor.js +23 -1
- package/lib/observation-executor.js.map +1 -1
- package/lib/observation-loop.d.ts +7 -0
- package/lib/observation-loop.d.ts.map +1 -1
- package/lib/observation-loop.js +65 -4
- package/lib/observation-loop.js.map +1 -1
- package/lib/observation-progress.d.ts +18 -0
- package/lib/observation-progress.d.ts.map +1 -0
- package/lib/observation-progress.js +57 -0
- package/lib/observation-progress.js.map +1 -0
- package/lib/observation-sources.d.ts +14 -0
- package/lib/observation-sources.d.ts.map +1 -0
- package/lib/observation-sources.js +12 -0
- package/lib/observation-sources.js.map +1 -0
- package/lib/pendant/badge-art.d.ts +9 -0
- package/lib/pendant/badge-art.d.ts.map +1 -0
- package/lib/pendant/badge-art.js +68 -0
- package/lib/pendant/badge-art.js.map +1 -0
- package/lib/pendant/card-image.d.ts.map +1 -1
- package/lib/pendant/card-image.js +11 -9
- package/lib/pendant/card-image.js.map +1 -1
- package/lib/pendant/renderer-loader.d.ts +9 -0
- package/lib/pendant/renderer-loader.d.ts.map +1 -0
- package/lib/pendant/renderer-loader.js +12 -0
- package/lib/pendant/renderer-loader.js.map +1 -0
- package/lib/pendant/renderer.d.ts +2 -6
- package/lib/pendant/renderer.d.ts.map +1 -1
- package/lib/pendant/renderer.js +1 -67
- package/lib/pendant/renderer.js.map +1 -1
- package/lib/pendant/static-card.d.ts +20 -0
- package/lib/pendant/static-card.d.ts.map +1 -0
- package/lib/pendant/static-card.js +55 -0
- package/lib/pendant/static-card.js.map +1 -0
- package/lib/pendant/widget.d.ts.map +1 -1
- package/lib/pendant/widget.js +9 -5
- package/lib/pendant/widget.js.map +1 -1
- package/lib/pendant-renderer.js +14 -14
- package/lib/requirements/service.d.ts.map +1 -1
- package/lib/requirements/service.js +2 -0
- package/lib/requirements/service.js.map +1 -1
- package/lib/requirements/worker.d.ts.map +1 -1
- package/lib/requirements/worker.js +1 -0
- package/lib/requirements/worker.js.map +1 -1
- package/lib/scheduler/continuations.d.ts.map +1 -1
- package/lib/scheduler/continuations.js +17 -3
- package/lib/scheduler/continuations.js.map +1 -1
- package/lib/skills/builtin.d.ts.map +1 -1
- package/lib/skills/builtin.js +2 -0
- package/lib/skills/builtin.js.map +1 -1
- package/lib/skills/drama-builtin.d.ts.map +1 -1
- package/lib/skills/drama-builtin.js +13 -1
- package/lib/skills/drama-builtin.js.map +1 -1
- package/lib/skills/story-builtins.d.ts +3 -0
- package/lib/skills/story-builtins.d.ts.map +1 -0
- package/lib/skills/story-builtins.js +72 -0
- package/lib/skills/story-builtins.js.map +1 -0
- package/lib/skills/viora-canvas-builtin.d.ts.map +1 -1
- package/lib/skills/viora-canvas-builtin.js +12 -1
- package/lib/skills/viora-canvas-builtin.js.map +1 -1
- package/lib/snapshot-cache.d.ts +7 -0
- package/lib/snapshot-cache.d.ts.map +1 -0
- package/lib/snapshot-cache.js +26 -0
- package/lib/snapshot-cache.js.map +1 -0
- package/lib/tasks/result.js +1 -1
- package/lib/tasks/result.js.map +1 -1
- package/lib/ui/memory/concern-board.d.ts +1 -1
- package/lib/ui/memory/concern-board.d.ts.map +1 -1
- package/lib/ui/memory/concern-board.js +14 -6
- package/lib/ui/memory/concern-board.js.map +1 -1
- package/lib/ui/memory/concern-deletion.d.ts.map +1 -1
- package/lib/ui/memory/concern-deletion.js +2 -1
- package/lib/ui/memory/concern-deletion.js.map +1 -1
- package/lib/ui/memory/concern-editor.d.ts.map +1 -1
- package/lib/ui/memory/concern-editor.js +5 -3
- package/lib/ui/memory/concern-editor.js.map +1 -1
- package/lib/ui/memory/concern-execution-fields.d.ts +7 -0
- package/lib/ui/memory/concern-execution-fields.d.ts.map +1 -0
- package/lib/ui/memory/concern-execution-fields.js +8 -0
- package/lib/ui/memory/concern-execution-fields.js.map +1 -0
- package/lib/ui/memory/concern-execution-status.d.ts +8 -0
- package/lib/ui/memory/concern-execution-status.d.ts.map +1 -0
- package/lib/ui/memory/concern-execution-status.js +31 -0
- package/lib/ui/memory/concern-execution-status.js.map +1 -0
- package/lib/ui/memory/concern-feedback.d.ts +15 -0
- package/lib/ui/memory/concern-feedback.d.ts.map +1 -0
- package/lib/ui/memory/concern-feedback.js +13 -0
- package/lib/ui/memory/concern-feedback.js.map +1 -0
- package/lib/ui/memory/concern-panel.d.ts.map +1 -1
- package/lib/ui/memory/concern-panel.js +11 -3
- package/lib/ui/memory/concern-panel.js.map +1 -1
- package/package.json +7 -1
- package/resources/skills/novel-game-creation/manifest.json +393 -0
- package/resources/skills/novel-game-creation/upstream/LICENSE +21 -0
- package/resources/skills/novel-game-creation/upstream/README.md +420 -0
- package/resources/skills/novel-game-creation/upstream/README_ZH.md +421 -0
- package/resources/skills/novel-game-creation/upstream/VERSION +1 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/BUILD_BRIEF.md +219 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/.vercelignore +3 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/RUN.md +138 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/bg/compound_new_guofeng.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/fate_coda.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/meng.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/pan.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/pinger.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/xuee.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/finale/yue.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_accord_five.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_afterglow_five.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/inner_court_alliance.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day10.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day15.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/public_day5.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/group/title_new_guofeng.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/pan_pinger.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/pan_xuee.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_meng.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_pan.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/joint/yue_pinger.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/meng/explicit.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/meng/prelude.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/meng.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/pan.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/pinger.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/xuee.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/milestone/yue.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pan/explicit.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pan/prelude.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pinger/explicit.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/pinger/prelude.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/xuee/explicit.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/xuee/prelude.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/yue/explicit.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/cg/yue/prelude.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/meng/night.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/pan/night.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/pinger/night.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/xuee/night.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/heroine/yue/night.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/household/li_jiaoer.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/assets/scene/gate_collector.webp +0 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/css/new-guofeng.css +1494 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/css/style.css +2508 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/index.html +18 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/assets.js +147 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/audio.js +332 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/data.js +7470 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/engine.js +13066 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/main.js +3051 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/js/text.js +32 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/package.json +11 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/app/vercel.json +23 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/build/art/generated-art.json +161 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/example.json +12 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/README.md +26 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/playable-model.json +99 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/verification.json +41 -0
- package/resources/skills/novel-game-creation/upstream/examples/jin-ping-mei/qa/verify_playable_model.mjs +152 -0
- package/resources/skills/novel-game-creation/upstream/manifest.json +498 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/SKILL.md +47 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/agents/openai.yaml +4 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-art-direction/references/art-direction-method.md +40 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-build/SKILL.md +66 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-build/agents/openai.yaml +4 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-build/references/blender-asset-workflow.md +24 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-build/references/build-brief-contract.md +72 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-build/references/generative-media-pipeline.md +25 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-build/references/playable-model-contract.md +46 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-build/references/tts-production-contract.md +23 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-concept/SKILL.md +54 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-concept/agents/openai.yaml +4 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-concept/references/concept-method.md +47 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-qa/SKILL.md +39 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-qa/agents/openai.yaml +4 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-qa/references/qa-contract.md +66 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-qa/references/test-design-method.md +49 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-world-design/SKILL.md +50 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-world-design/agents/openai.yaml +4 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/narrative-design-method.md +35 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/numeric-design-method.md +22 -0
- package/resources/skills/novel-game-creation/upstream/skills/game-world-design/references/world-design-method.md +57 -0
- package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/SKILL.md +68 -0
- package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/agents/openai.yaml +4 -0
- package/resources/skills/novel-game-creation/upstream/skills/novel-game-analyze/references/gameability-protocol.md +65 -0
- package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/SKILL.md +54 -0
- package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/agents/openai.yaml +4 -0
- package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/references/intake-method.md +50 -0
- package/resources/skills/novel-game-creation/upstream/skills/novel-to-game/references/pipeline-contract.md +60 -0
- package/resources/skills/story-creation/manifest.json +1477 -0
- package/resources/skills/story-creation/upstream/LICENSE.upstream +21 -0
- package/resources/skills/story-creation/upstream/manifest.json +1861 -0
- package/resources/skills/story-creation/upstream/roles/chapter-extractor.md +254 -0
- package/resources/skills/story-creation/upstream/roles/character-designer.md +168 -0
- package/resources/skills/story-creation/upstream/roles/consistency-checker.md +192 -0
- package/resources/skills/story-creation/upstream/roles/narrative-writer.md +105 -0
- package/resources/skills/story-creation/upstream/roles/story-architect.md +139 -0
- package/resources/skills/story-creation/upstream/roles/story-explorer.md +262 -0
- package/resources/skills/story-creation/upstream/roles/story-researcher.md +303 -0
- package/resources/skills/story-creation/upstream/skills/browser-cdp/SKILL.md +175 -0
- package/resources/skills/story-creation/upstream/skills/story/SKILL.md +129 -0
- package/resources/skills/story-creation/upstream/skills/story/VERSION +1 -0
- package/resources/skills/story-creation/upstream/skills/story/references/author-memory-maintenance.md +75 -0
- package/resources/skills/story-creation/upstream/skills/story/references/author-memory.md +117 -0
- package/resources/skills/story-creation/upstream/skills/story/scripts/author_memory_commit.py +1635 -0
- package/resources/skills/story-creation/upstream/skills/story-cover/SKILL.md +336 -0
- package/resources/skills/story-creation/upstream/skills/story-cover/references/cover-styles.md +210 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/SKILL.md +274 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/references/agent-calls.md +5 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/references/anti-ai-writing.md +556 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/references/author-memory-maintenance.md +75 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/references/author-memory.md +117 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/references/banned-words.md +151 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/references/deslop-gates.md +171 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/references/style-resolution.md +27 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/author_memory_commit.py +1635 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/check-ai-patterns.js +1586 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/check-degeneration.js +349 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/normalize-punctuation.js +415 -0
- package/resources/skills/story-creation/upstream/skills/story-deslop/scripts/style-whitelist.js +39 -0
- package/resources/skills/story-creation/upstream/skills/story-import/SKILL.md +127 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/character-state-reverse.md +82 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/deep-analysis.md +47 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/format-and-structure.md +168 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/import-report.md +64 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/import-special-cases.md +34 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/import-tracking.md +95 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/length-routing.md +134 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/outline-reverse-rules.md +79 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/outline-reverse.md +24 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/state-tracking.md +43 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/structure-mapping-long.md +448 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/structure-mapping-short.md +187 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/tracking-initialization.md +31 -0
- package/resources/skills/story-creation/upstream/skills/story-import/references/tracking-transaction.md +146 -0
- package/resources/skills/story-creation/upstream/skills/story-import/scripts/build_outline_brief.py +332 -0
- package/resources/skills/story-creation/upstream/skills/story-import/scripts/check-outline-contract.js +520 -0
- package/resources/skills/story-creation/upstream/skills/story-import/scripts/tracking_commit.py +1691 -0
- package/resources/skills/story-creation/upstream/skills/story-import/scripts/wordcount_core.py +405 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/SKILL.md +140 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/author-facing.md +252 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/deconstruction-notes.md +270 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/final-checks.md +19 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/index-rebuild.md +11 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/inspiration-library.md +105 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/pipeline-ops.md +154 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/semantic-acceptance-fixtures.md +84 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage1-golden-chapters.md +128 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage2-extraction.md +229 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage3-plot-rhythm.md +480 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage4-characters-settings.md +195 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/stage5-report.md +33 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/style-profile-generator.md +76 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/style-profile-protocol.md +133 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/references/synthesis-inputs.md +39 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/build_chapter_index.py +466 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/inspect_existing_assets.py +702 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/inspiration_index.py +864 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/manage_analysis_run.py +1145 -0
- package/resources/skills/story-creation/upstream/skills/story-long-analyze/scripts/render_relation_chart.py +425 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/SKILL.md +193 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/genre-trends.md +197 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-ciweimao.md +19 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-fanqie.md +45 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-jjwxc.md +28 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-qidian.md +35 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/platform-qimao.md +27 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/publishing-guide.md +114 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/reader-profiling.md +105 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/references/topic-decision.md +82 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/aggregate-rank.js +682 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/cdp-utils.js +242 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/ciweimao-rank-scraper.js +240 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/fanqie-rank-scraper.js +658 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/jjwxc-rank-scraper.js +400 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/qidian-rank-scraper.js +592 -0
- package/resources/skills/story-creation/upstream/skills/story-long-scan/scripts/qimao-rank-scraper.js +435 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/SKILL.md +136 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/agent-calls.md +47 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/anti-ai-writing.md +556 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/artifact-protocols.md +183 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/author-memory-maintenance.md +75 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/author-memory.md +117 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/banned-words.md +151 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/benchmark-recall.md +16 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-basics.md +445 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-design-methods.md +428 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/character-relations.md +433 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/commercial-core-methods.md +502 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/cross-book-recall.md +88 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/deslop-gates.md +171 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/dialogue-mastery.md +288 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotion-on-page.md +116 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotional-arc-design.md +313 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/emotional-methods.md +209 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/female-audience-writing.md +188 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//344/270/234/346/226/271/344/273/231/344/276/240.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//344/274/240/347/273/237/347/216/204/345/271/273.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/345/217/244/344/273/243.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/244/350/250/200/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/217/244/351/243/216/344/270/226/346/203/205.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/346/202/254/347/226/221.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/347/247/215/347/224/260.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/256/253/346/226/227/345/256/205/346/226/227.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/347/201/265/345/274/202.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/210/230/347/245/236/350/265/230/345/251/277.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/212/227/346/210/230/350/260/215/346/210/230.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/230/237/345/205/211/347/222/200/347/222/250.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/260/221/345/233/275/350/250/200/346/203/205.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//346/270/270/346/210/217/344/275/223/350/202/262.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/204/221/346/264/236.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/250/200/346/203/205.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/216/260/350/250/200/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//347/247/221/345/271/273/346/234/253/344/270/226.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/201/214/345/234/272/345/251/232/346/201/213.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/245/277/346/226/271/345/245/207/345/271/273.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//350/261/252/351/227/250/346/200/273/350/243/201.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/344/277/256/347/234/237.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/346/227/245/345/270/270.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/347/247/215/347/224/260.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/350/204/221/346/264/236.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/351/253/230/346/255/246.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards//351/235/222/346/230/245/347/224/234/345/256/240.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-prose-cards.md +91 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/genre-readers.md +235 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-chapter-hooks.md +225 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-chapter-quality.md +177 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-format.md +36 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-genre-catalog.md +394 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-genre-mechanics.md +415 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-reversal.md +335 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/long-suspense.md +352 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/opening-design.md +349 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-conflict.md +457 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-methods.md +287 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-rhythm.md +389 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/outline-structure-theory.md +273 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-core-methods.md +522 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-emotion-system.md +354 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-frameworks.md +711 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/plot-special-topics.md +622 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/project-files.md +114 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/reader-contract-and-progression.md +117 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/reference-index.md +86 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/stop-and-fix.md +9 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-combat-face.md +352 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-craft.md +327 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-genre-modules.md +510 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/style-resolution.md +27 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/tracking-initialization.md +31 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/tracking-transaction.md +146 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-chapter.md +104 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-daily.md +75 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-outline.md +157 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-revision.md +89 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-setup.md +170 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/workflow-volume.md +142 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/writer-prompt-fallback.md +24 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/references/writing-craft.md +442 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/author_memory_commit.py +1635 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/build_architect_brief.py +260 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/build_writer_prompt.py +611 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-ai-patterns.js +1586 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-degeneration.js +349 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-outline-contract.js +520 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/check-outline-copy.js +313 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/normalize-punctuation.js +415 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/outline_view.py +286 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/storyctl.py +561 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/style-whitelist.js +39 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/tracking_commit.py +1691 -0
- package/resources/skills/story-creation/upstream/skills/story-long-write/scripts/wordcount_core.py +405 -0
- package/resources/skills/story-creation/upstream/skills/story-review/SKILL.md +231 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/agent-prompts.md +184 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/anti-ai-writing.md +556 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/author-memory-maintenance.md +75 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/author-memory.md +117 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/banned-words.md +151 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/batch-review.md +19 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/character-relations.md +433 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/dialogue-mastery.md +288 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/plot-core-methods.md +522 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/quality-rubric.md +55 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/review-quality.md +246 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/review-tracking.md +10 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/fanqie.md +18 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/qidian.md +19 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/rubrics/zhihu.md +20 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/solo.md +52 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/style-resolution.md +27 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/tracking-initialization.md +31 -0
- package/resources/skills/story-creation/upstream/skills/story-review/references/tracking-transaction.md +146 -0
- package/resources/skills/story-creation/upstream/skills/story-review/scripts/author_memory_commit.py +1635 -0
- package/resources/skills/story-creation/upstream/skills/story-review/scripts/check-ai-patterns.js +1586 -0
- package/resources/skills/story-creation/upstream/skills/story-review/scripts/check-degeneration.js +349 -0
- package/resources/skills/story-creation/upstream/skills/story-review/scripts/normalize-punctuation.js +415 -0
- package/resources/skills/story-creation/upstream/skills/story-review/scripts/style-whitelist.js +39 -0
- package/resources/skills/story-creation/upstream/skills/story-review/scripts/tracking_commit.py +1691 -0
- package/resources/skills/story-creation/upstream/skills/story-review/scripts/wordcount_core.py +405 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/SKILL.md +165 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/agent-quality.md +72 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/agent-reference-profiles.md +55 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/anti-ai-writing.md +556 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/banned-words.md +151 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/benchmark-style-load.md +107 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-basics.md +445 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-design-methods.md +428 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/character-relations.md +433 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/deslop-gates.md +171 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/dialogue-mastery.md +288 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/emotion-on-page.md +116 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/emotional-arc-design.md +313 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/format-and-structure.md +168 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//344/270/234/346/226/271/344/273/231/344/276/240.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//344/274/240/347/273/237/347/216/204/345/271/273.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/216/206/345/217/262/345/217/244/344/273/243.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/216/206/345/217/262/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/244/350/250/200/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/217/244/351/243/216/344/270/226/346/203/205.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/245/263/351/242/221/346/202/254/347/226/221.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/245/263/351/242/221/347/247/215/347/224/260.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/256/253/346/226/227/345/256/205/346/226/227.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/202/254/347/226/221/347/201/265/345/274/202.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/202/254/347/226/221/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/210/230/347/245/236/350/265/230/345/251/277.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/212/227/346/210/230/350/260/215/346/210/230.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/230/237/345/205/211/347/222/200/347/222/250.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/260/221/345/233/275/350/250/200/346/203/205.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//346/270/270/346/210/217/344/275/223/350/202/262.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/204/345/271/273/350/204/221/346/264/236.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/204/345/271/273/350/250/200/346/203/205.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/216/260/350/250/200/350/204/221/346/264/236.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//347/247/221/345/271/273/346/234/253/344/270/226.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/201/214/345/234/272/345/251/232/346/201/213.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/245/277/346/226/271/345/245/207/345/271/273.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//350/261/252/351/227/250/346/200/273/350/243/201.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/344/277/256/347/234/237.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/346/227/245/345/270/270.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/347/247/215/347/224/260.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/350/204/221/346/264/236.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/203/275/345/270/202/351/253/230/346/255/246.md +53 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards//351/235/222/346/230/245/347/224/234/345/256/240.md +51 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-prose-cards.md +91 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/genre-readers.md +235 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-chapter-hooks.md +225 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-emotional-methods.md +209 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-genre-catalog.md +394 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-genre-mechanics.md +415 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-quality.md +42 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-reversal.md +335 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/long-suspense.md +352 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/opening-design.md +349 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-conflict.md +457 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-methods.md +287 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/outline-rhythm.md +389 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/plot-core-methods.md +522 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-chapter-hooks.md +225 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-emotional-methods.md +179 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-genre-formulas.md +417 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-paragraph-hooks.md +146 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-quality.md +39 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-reversal.md +355 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/short-suspense.md +352 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-combat-face.md +352 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-genre-modules.md +510 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/style-resolution.md +27 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/agent-references/writing-craft.md +442 -0
- package/resources/skills/story-creation/upstream/skills/story-setup/references/diagnostics.md +38 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/SKILL.md +224 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-basics.md +453 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-design.md +438 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-character-relations.md +395 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-method.md +42 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-paragraph-hooks.md +146 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-reader-profile.md +245 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-report-style.md +45 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-genres.md +65 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-hooks.md +77 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-mechanics.md +82 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-patterns.md +50 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-short-suspense.md +98 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/analysis-writing-techniques.md +477 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/deconstruction-examples.md +79 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/optional-modules.md +97 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/output-contract.md +127 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/quality-checklist.md +80 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/real-market-data.md +90 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/source-story-quality.md +221 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/stage2-3-structure-emotion.md +308 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/stage4-6-reversal-summary.md +611 -0
- package/resources/skills/story-creation/upstream/skills/story-short-analyze/references/zhihu-style.md +54 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/SKILL.md +182 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/references/manual-rank-input.md +36 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/references/platform-dianzhong.md +24 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/references/platform-heiyan.md +21 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/references/real-market-data.md +90 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/references/topic-match.md +38 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/aggregate-rank.js +682 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/cdp-utils.js +242 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/dz-browse-scraper.js +232 -0
- package/resources/skills/story-creation/upstream/skills/story-short-scan/scripts/heiyan-booklist-scraper.js +345 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/SKILL.md +136 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/agent-calls.md +13 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/author-memory-maintenance.md +75 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/author-memory.md +117 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/banned-words.md +151 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/benchmark-recall.md +40 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/cross-book-recall.md +62 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/dialogue-mastery.md +288 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/emotional-methods.md +179 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//344/270/226/346/203/205/346/211/223/350/204/270.md +159 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/217/214/347/224/267/344/270/273.md +156 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/244/215/344/273/207/346/211/223/350/204/270.md +163 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//345/256/205/346/226/227/345/256/253/346/226/227.md +167 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/200/273/350/243/201/350/261/252/351/227/250.md +178 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/202/254/347/226/221.md +166 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/260/221/344/277/227/346/200/252/350/260/210.md +159 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//346/262/231/351/233/225/350/204/221/346/264/236.md +151 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//347/224/234/345/256/240.md +153 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-styles//350/277/275/345/246/273/347/201/253/350/221/254/345/234/272.md +210 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-writing-formulas.md +417 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/genre-writing-techniques.md +490 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/hooks-chapter.md +225 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/hooks-paragraph.md +146 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/output-contract.md +127 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/reference-index.md +23 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/scene-craft.md +40 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-craft.md +147 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-deslop.md +133 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-format.md +199 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-prose-quality.md +224 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-reversal.md +355 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/short-suspense.md +352 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/style-resolution.md +27 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/submission-craft.md +35 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/villain-and-reveal.md +153 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-design.md +85 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-draft.md +116 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/workflow-revision.md +99 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/references/writing-workflow.md +50 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/author_memory_commit.py +1635 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-ai-patterns.js +1586 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-degeneration.js +349 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-delivery-contract.js +241 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-outline-copy.js +313 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/check-phase2-contract.js +363 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/normalize-punctuation.js +415 -0
- package/resources/skills/story-creation/upstream/skills/story-short-write/scripts/style-whitelist.js +39 -0
- package/resources/skills/video-recap-production/manifest.json +673 -0
- package/resources/skills/video-recap-production/upstream/CHANGELOG.md +371 -0
- package/resources/skills/video-recap-production/upstream/LICENSE +21 -0
- package/resources/skills/video-recap-production/upstream/README.en.md +468 -0
- package/resources/skills/video-recap-production/upstream/README.md +459 -0
- package/resources/skills/video-recap-production/upstream/manifest.json +839 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/SKILL.md +112 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/audio-modes.md +63 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/explicit-audio-mix.md +75 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/foreground-compose.md +118 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/LICENSE.duo-video +21 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/SOURCE.md +15 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_draft_meta_info.json +69 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_combination_segment.json +84 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_combination_video_material.json +98 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_draft.json +204 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_material_video.json +83 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_meta_material_value.json +23 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_project_info.json +133 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_segment.json +70 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_jy_text_styles.json +30 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_yj_material_audio.json +41 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/jianying/empty_yj_material_text.json +109 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/narration-adoption.md +103 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/packaging.md +45 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/pair-media.md +74 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/source-score.md +147 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/references/subtitle-track.md +202 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/__init__.py +1 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/audio_mix_binding.py +279 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/frozen_audio.py +187 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/narration_binding.py +323 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/strict_inputs.py +109 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/adoption/strict_publish.py +130 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/artifacts.py +47 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assemble.py +591 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assemble_constants.py +51 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assembly_contract.py +318 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/assembly_settings.py +138 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/audio_automation.py +195 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/audio_mix.py +465 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/compose_foreground.py +293 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/export_jianying.py +254 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/__init__.py +1 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/builders.py +718 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/model.py +105 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/optional.py +23 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/schema.py +53 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/templates.py +37 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/timeline_contract.py +223 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/tracks.py +72 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/jianying/writer.py +383 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/lib.py +218 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/media.py +190 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/narration_audio.py +413 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/packaging.py +122 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/pair_media.py +216 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/render_preflight.py +33 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/source_score.py +469 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/source_subtitles.py +423 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/__init__.py +1 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/core.py +330 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/render.py +82 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/track.py +324 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/subtitles/track_binding.py +200 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/timeline.py +217 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/timeline_emit.py +167 -0
- package/resources/skills/video-recap-production/upstream/skills/video-assemble/scripts/visual_render.py +448 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/SKILL.md +108 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/references/shot-review.md +50 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut.py +41 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_cli.py +308 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_contract.py +424 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/cut_render.py +304 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/lib.py +114 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/media_geometry.py +238 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/narration_mapping.py +71 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/narrative_selection.py +244 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/sentence_boundaries.py +585 -0
- package/resources/skills/video-recap-production/upstream/skills/video-cut/scripts/shot_review.py +357 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/SKILL.md +260 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/references/audio-routing.md +126 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/references/config-playbook.md +65 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/references/data-schema.md +545 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/references/resource-library.md +151 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/references/shift-left-qc-schema.md +23 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/doctor.py +556 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/final_qc.py +527 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/lib.py +220 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/library.py +509 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/materials.py +406 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/mimo_qc.py +33 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/project_binding.py +286 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/__init__.py +1 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_client.py +13 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_contract.py +9 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_evidence.py +287 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_observations.py +175 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_payload.py +206 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_report.py +318 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc/mimo_runner.py +130 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/qc_contract.py +320 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap.py +9 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_cli.py +209 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_inspect.py +452 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_review.py +70 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_runner.py +696 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_runtime.py +260 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_source.py +278 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_stage_qc.py +160 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/recap_timeline.py +621 -0
- package/resources/skills/video-recap-production/upstream/skills/video-recap/scripts/resource_lock.py +162 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/SKILL.md +251 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/references/creative-editing-playbook.md +229 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/references/promotional-copy.md +68 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/references/research-guide.md +75 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/agent_text.py +301 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/deslop_qc.py +211 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/evidence_bundle.py +440 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/lib.py +254 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/narration_lint.py +707 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review.py +40 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_grounding.py +238 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_response.py +669 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/review_runner.py +186 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/speech_ownership.py +143 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/timeline_fusion.py +108 -0
- package/resources/skills/video-recap-production/upstream/skills/video-script/scripts/validate.py +175 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/SKILL.md +77 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/data-schema.md +193 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/prompt-templates.md +37 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/references/research-guide.md +74 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/agent_text.py +301 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/asr.py +279 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/asr_timing_evidence.py +270 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/brief.py +9 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/__init__.py +1 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/builder.py +402 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/context.py +317 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/inputs.py +268 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/briefing/timeline.py +326 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/consolidate.py +596 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/deslop_qc.py +211 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/detect.py +504 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/extract.py +62 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/lib.py +419 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/narration_lint.py +707 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/speech_ownership.py +143 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/storyboard.py +445 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/timeline_fusion.py +108 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understand.py +9 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_brief.py +190 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_cache.py +345 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_runner.py +387 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/understanding_storyboard.py +167 -0
- package/resources/skills/video-recap-production/upstream/skills/video-understanding/scripts/vlm.py +674 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/SKILL.md +91 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/references/index-tts.md +31 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/approved_text_policy.py +123 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/dub.py +623 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/lib.py +352 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/__init__.py +1 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/fish_audio.py +91 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/providers/index_tts.py +184 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/tts_audio.py +102 -0
- package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/voiceover.py +771 -0
- package/resources/skills/viora-canvas-production/manifest.json +5 -1
- package/resources/skills/viora-canvas-production/references/story-handoff.md +49 -0
package/resources/skills/video-recap-production/upstream/skills/video-voiceover/scripts/dub.py
ADDED
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
"""English→Chinese dubbing — the render engine behind `recap.py --edit-mode dub`.
|
|
2
|
+
|
|
3
|
+
Invoked by the orchestrator (NOT run by hand). It replaces the original English speech with a
|
|
4
|
+
faithful Chinese translation spoken in the ORIGINAL speaker's cloned voice
|
|
5
|
+
(`mimo-v2.5-tts-voiceclone`, same MIMO_API_KEY, pure stdlib + ffmpeg, no GPU). This differs
|
|
6
|
+
from recap/解说, which overlays Chinese commentary on ducked original audio.
|
|
7
|
+
|
|
8
|
+
Division of labour (the same as recap): CODE does only the mechanical parts; the AGENT does all
|
|
9
|
+
the judgment. So there are NO text heuristics here (no sentence-splitting, hook-dedup, or junk
|
|
10
|
+
filters) — those are exactly the things an LLM does better, and trying to do them in code is
|
|
11
|
+
brittle and case-by-case. Two stages around an agent-authored pause:
|
|
12
|
+
|
|
13
|
+
--stage prepare : extract audio → English ASR (timed windows) → pull one reference clip →
|
|
14
|
+
write dub_transcript.json + dub_brief.md, then stop.
|
|
15
|
+
--stage render : read the agent's dub_script.json ([{"start", "zh"}] on the source timeline)
|
|
16
|
+
→ clone the original voice per line → time-fit each to its slot (anchored at
|
|
17
|
+
its start; only compress when it would overrun the next line — never a global
|
|
18
|
+
speed-up, so the voice never finishes ahead of the picture) → full-replace
|
|
19
|
+
the audio track → mux → dub_<name>.mp4.
|
|
20
|
+
"""
|
|
21
|
+
import argparse
|
|
22
|
+
import base64
|
|
23
|
+
import json
|
|
24
|
+
import re
|
|
25
|
+
import unicodedata
|
|
26
|
+
import wave
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
|
|
29
|
+
from lib import (
|
|
30
|
+
file_identity,
|
|
31
|
+
CONFIG,
|
|
32
|
+
get_video_duration,
|
|
33
|
+
log,
|
|
34
|
+
mimo_asr_api_call,
|
|
35
|
+
mimo_tts_api_call,
|
|
36
|
+
run_cmd,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
CLONE_MODEL = "mimo-v2.5-tts-voiceclone"
|
|
40
|
+
CLONE_SR = 24000 # mimo voiceclone returns 24kHz mono PCM16 wav
|
|
41
|
+
DUB_DELIVERY_SR = 48000 # explicit delivery rate; loudnorm otherwise exposes its 96kHz internal rate
|
|
42
|
+
ASR_MIME = "audio/wav"
|
|
43
|
+
ATEMPO_CAP = 2.0 # max compression before we trim instead (atempo>2 also sounds rushed)
|
|
44
|
+
DUB_FAST_SPEECH_CPS = 7.0
|
|
45
|
+
DUB_TRIM_RISK_CPS = 7.0
|
|
46
|
+
DUB_MIN_ASR_WINDOW_SECONDS = 0.5
|
|
47
|
+
DUB_TTS_STYLE_PROMPT = "自然、清晰,保持原说话人的音色与节奏,语气平稳。"
|
|
48
|
+
|
|
49
|
+
DUB_SCHEMA_VERSION = 1
|
|
50
|
+
# Tolerate ~1-frame rounding in agent-estimated timings so the gate blocks only GENUINE
|
|
51
|
+
# errors, not rounding noise (the old render clamped such cases via min(slot_end, nxt)).
|
|
52
|
+
DUB_TIMING_EPS = 0.05
|
|
53
|
+
DUB_LINT_SCHEMA = {
|
|
54
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
55
|
+
"artifact": "dub_lint.json",
|
|
56
|
+
"fields": {
|
|
57
|
+
"verdict": "PASS|FAIL",
|
|
58
|
+
"issues": "[{severity, code, line, message, start, end}]",
|
|
59
|
+
"summary": "{lines, errors, warnings, max_chars_per_second, trim_risk_lines}",
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
DUB_REVIEW_SCHEMA = {
|
|
63
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
64
|
+
"artifact": "dub_review.json",
|
|
65
|
+
"fields": {
|
|
66
|
+
"verdict": "PASS|REVISE|FAIL",
|
|
67
|
+
"checks": "{faithful_to_source, spoken_chinese, speaker_tone, timing_fit, platform_fit}",
|
|
68
|
+
"highest_return_edits": "[{line, start, issue, suggestion}]",
|
|
69
|
+
"notes": "human/agent review notes; script-level output is deterministic pre-review guidance",
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
DUB_ARTIFACT_SCHEMAS = {
|
|
73
|
+
"dub_transcript.json": {
|
|
74
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
75
|
+
"shape": {"video": "path", "duration": "seconds", "windows": [{"start": 0.0, "end": 6.0, "text": "English ASR"}]},
|
|
76
|
+
},
|
|
77
|
+
"dub_script.json": {
|
|
78
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
79
|
+
"shape": [{"start": 0.0, "end": 2.4, "zh": "中文台词"}],
|
|
80
|
+
},
|
|
81
|
+
"dub_manifest.json": {
|
|
82
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
83
|
+
"shape": {"video": "path", "duration": "seconds", "lines": [{"start": 0.0, "end": 2.4, "zh": "中文台词", "tts_cache": "hit|miss", "fitted_wav": "path", "fitted_dur": 1.8, "room": 2.4}]},
|
|
84
|
+
},
|
|
85
|
+
"dub_lint.json": DUB_LINT_SCHEMA,
|
|
86
|
+
"dub_review.json": DUB_REVIEW_SCHEMA,
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _chars_per_second(text, room):
|
|
91
|
+
room = max(room, 0.001)
|
|
92
|
+
effective = 0
|
|
93
|
+
for ch in text:
|
|
94
|
+
if ch.isspace():
|
|
95
|
+
continue
|
|
96
|
+
cat = unicodedata.category(ch)
|
|
97
|
+
if cat.startswith(("P", "S")):
|
|
98
|
+
continue
|
|
99
|
+
effective += 1
|
|
100
|
+
return effective / room
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def _issue(severity, code, line, message, start=None, end=None):
|
|
104
|
+
item = {"severity": severity, "code": code, "line": line, "message": message}
|
|
105
|
+
if start is not None:
|
|
106
|
+
item["start"] = round(start, 3)
|
|
107
|
+
if end is not None:
|
|
108
|
+
item["end"] = round(end, 3)
|
|
109
|
+
return item
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _normalize_dub_script(script):
|
|
113
|
+
lines = []
|
|
114
|
+
for i, item in enumerate(script):
|
|
115
|
+
if not isinstance(item, dict):
|
|
116
|
+
lines.append({"_input_index": i, "start": None, "end": None, "zh": ""})
|
|
117
|
+
continue
|
|
118
|
+
start = item.get("start")
|
|
119
|
+
end = item.get("end")
|
|
120
|
+
try:
|
|
121
|
+
start = float(start)
|
|
122
|
+
except (TypeError, ValueError):
|
|
123
|
+
start = None
|
|
124
|
+
try:
|
|
125
|
+
end = float(end) if end is not None else None
|
|
126
|
+
except (TypeError, ValueError):
|
|
127
|
+
end = None
|
|
128
|
+
lines.append({"_input_index": i, "start": start, "end": end,
|
|
129
|
+
"zh": str(item.get("zh", "")).strip()})
|
|
130
|
+
return sorted(lines, key=lambda x: (float("inf") if x["start"] is None else x["start"], x["_input_index"]))
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def lint_dub_script(script, duration, work_dir=None):
|
|
134
|
+
"""Deterministic hard gate for dub_script.json before expensive voiceclone render."""
|
|
135
|
+
duration = float(duration)
|
|
136
|
+
issues = []
|
|
137
|
+
if not isinstance(script, list):
|
|
138
|
+
# A malformed (non-list) script is a hard FAIL, not a crash: keep the "fail fast,
|
|
139
|
+
# see dub_lint.json" promise so the agent gets a clean message instead of a traceback.
|
|
140
|
+
bad = _issue("error", "script_not_a_list", None, "dub_script.json must be a JSON array of {start,end,zh}")
|
|
141
|
+
report = {
|
|
142
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
143
|
+
"verdict": "FAIL",
|
|
144
|
+
"blocking": True,
|
|
145
|
+
"errors": [bad],
|
|
146
|
+
"issues": [bad],
|
|
147
|
+
"summary": {"lines": 0, "errors": 1, "warnings": 0, "max_chars_per_second": 0.0, "trim_risk_lines": []},
|
|
148
|
+
}
|
|
149
|
+
if work_dir is not None:
|
|
150
|
+
_write_json(Path(work_dir) / "dub_lint.json", report)
|
|
151
|
+
return report
|
|
152
|
+
lines = _normalize_dub_script(script)
|
|
153
|
+
max_cps = 0.0
|
|
154
|
+
trim_risk = []
|
|
155
|
+
for i, ln in enumerate(lines):
|
|
156
|
+
start, end, zh = ln["start"], ln["end"], ln["zh"]
|
|
157
|
+
line_no = ln["_input_index"]
|
|
158
|
+
nxt = lines[i + 1]["start"] if i + 1 < len(lines) else duration
|
|
159
|
+
if start is None:
|
|
160
|
+
issues.append(_issue("error", "missing_start", line_no, "line start must be a number"))
|
|
161
|
+
continue
|
|
162
|
+
out_of_range = start < -DUB_TIMING_EPS or start > duration + DUB_TIMING_EPS
|
|
163
|
+
if end is not None and (end <= start or end > duration + DUB_TIMING_EPS):
|
|
164
|
+
out_of_range = True
|
|
165
|
+
timing_valid = not out_of_range
|
|
166
|
+
if out_of_range:
|
|
167
|
+
issues.append(_issue("error", "time_out_of_range", line_no, "line timing must be within video duration and end must be > start", start, end))
|
|
168
|
+
if not zh:
|
|
169
|
+
issues.append(_issue("error", "empty_translation", line_no, "zh must not be empty", start, end))
|
|
170
|
+
if (i + 1 < len(lines) and end is not None and lines[i + 1]["start"] is not None
|
|
171
|
+
and end > lines[i + 1]["start"] + DUB_TIMING_EPS):
|
|
172
|
+
issues.append(_issue("error", "overlap", line_no, "line end overlaps the next line start", start, end))
|
|
173
|
+
slot_end = end if end is not None else nxt
|
|
174
|
+
if timing_valid and start is not None and slot_end is not None:
|
|
175
|
+
room = max(0.0, min(slot_end, nxt if nxt is not None else slot_end) - start)
|
|
176
|
+
cps = _chars_per_second(zh, room)
|
|
177
|
+
max_cps = max(max_cps, cps)
|
|
178
|
+
if room < 0.4:
|
|
179
|
+
issues.append(_issue("error", "room_too_short", line_no, "line has less than 0.4s room for speech", start, end))
|
|
180
|
+
elif zh and cps >= DUB_FAST_SPEECH_CPS:
|
|
181
|
+
issues.append(_issue("warning", "fast_speech", line_no, f"translation is dense ({cps:.1f} chars/s)", start, end))
|
|
182
|
+
if zh and cps >= DUB_TRIM_RISK_CPS:
|
|
183
|
+
trim_risk.append(line_no)
|
|
184
|
+
issues.append(_issue("warning", "trim_risk", line_no, "likely to be compressed hard or trimmed by render", start, end))
|
|
185
|
+
error_items = [x for x in issues if x["severity"] == "error"]
|
|
186
|
+
priority = {"empty_translation": 0, "overlap": 1, "time_out_of_range": 2}
|
|
187
|
+
error_items = sorted(error_items, key=lambda x: (priority.get(x["code"], 99), x.get("line", 0)))
|
|
188
|
+
warnings = sum(1 for x in issues if x["severity"] == "warning")
|
|
189
|
+
report = {
|
|
190
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
191
|
+
"verdict": "FAIL" if error_items else "PASS",
|
|
192
|
+
"blocking": bool(error_items),
|
|
193
|
+
"errors": error_items,
|
|
194
|
+
"issues": issues,
|
|
195
|
+
"summary": {
|
|
196
|
+
"lines": len(lines),
|
|
197
|
+
"errors": len(error_items),
|
|
198
|
+
"warnings": warnings,
|
|
199
|
+
"max_chars_per_second": round(max_cps, 2),
|
|
200
|
+
"trim_risk_lines": trim_risk,
|
|
201
|
+
},
|
|
202
|
+
}
|
|
203
|
+
if work_dir is not None:
|
|
204
|
+
_write_json(Path(work_dir) / "dub_lint.json", report)
|
|
205
|
+
return report
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def build_dub_review(script, transcript, lint=None):
|
|
209
|
+
"""Script-level review scaffold: deterministic timing/naturalness signals for agent review."""
|
|
210
|
+
duration = float(transcript["duration"])
|
|
211
|
+
lint = lint or lint_dub_script(script, duration)
|
|
212
|
+
lines = _normalize_dub_script(script) if isinstance(script, list) else []
|
|
213
|
+
edits = []
|
|
214
|
+
for issue in lint["issues"]:
|
|
215
|
+
if issue["severity"] in {"error", "warning"}:
|
|
216
|
+
edits.append({
|
|
217
|
+
"line": issue["line"],
|
|
218
|
+
"start": issue.get("start"), # _issue only records start when the line had one
|
|
219
|
+
"issue": f"{issue['code']}: {issue['message']}",
|
|
220
|
+
"suggestion": "缩短译文、调整 start/end,或回到 transcript 核对原句边界。",
|
|
221
|
+
})
|
|
222
|
+
verdict = "FAIL" if lint["verdict"] == "FAIL" else ("REVISE" if edits else "PASS")
|
|
223
|
+
return {
|
|
224
|
+
"schema_version": DUB_SCHEMA_VERSION,
|
|
225
|
+
"verdict": verdict,
|
|
226
|
+
"checks": {
|
|
227
|
+
"faithful_to_source": "needs_agent_review",
|
|
228
|
+
"spoken_chinese": "REVISE" if any(i["code"] == "fast_speech" for i in lint["issues"]) else "PASS",
|
|
229
|
+
"speaker_tone": "needs_agent_review",
|
|
230
|
+
"timing_fit": verdict,
|
|
231
|
+
"platform_fit": "needs_agent_review",
|
|
232
|
+
},
|
|
233
|
+
"highest_return_edits": edits[:8],
|
|
234
|
+
"notes": "Deterministic script-level review; an agent/human should fill semantic fidelity and tone judgments against dub_transcript.json.",
|
|
235
|
+
"coverage": {"transcript_windows": len(transcript["windows"]), "script_lines": len(lines)},
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def _write_json(path, payload):
|
|
240
|
+
Path(path).write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
|
|
241
|
+
return path
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
# ── ffmpeg / wav helpers ─────────────────────────────────────────────
|
|
245
|
+
|
|
246
|
+
def _ffmpeg(args):
|
|
247
|
+
"""Run one ffmpeg command; a non-zero exit raises instead of leaving a silent gap."""
|
|
248
|
+
result = run_cmd(["ffmpeg", "-y", *args])
|
|
249
|
+
if result.returncode != 0:
|
|
250
|
+
raise RuntimeError(f"ffmpeg 失败 ({args[-1]}): {result.stderr.strip()[-2000:]}")
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def _ffmpeg_extract_wav(video, out_wav, sr=16000):
|
|
254
|
+
_ffmpeg(["-i", str(video), "-vn", "-ar", str(sr), "-ac", "1", str(out_wav)])
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _cut_wav(src_wav, out_wav, start, dur, sr=16000):
|
|
258
|
+
_ffmpeg(["-i", str(src_wav), "-ss", str(start), "-t", str(dur),
|
|
259
|
+
"-ar", str(sr), "-ac", "1", str(out_wav)])
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def _atempo_chain(factor):
|
|
263
|
+
"""ffmpeg atempo only accepts 0.5–2.0 per stage; chain for larger factors."""
|
|
264
|
+
factor = max(0.5, factor)
|
|
265
|
+
stages, remaining = [], factor
|
|
266
|
+
while remaining > 2.0:
|
|
267
|
+
stages.append("atempo=2.0")
|
|
268
|
+
remaining /= 2.0
|
|
269
|
+
stages.append(f"atempo={remaining:.4f}")
|
|
270
|
+
return ",".join(stages)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def _wav_frames(path):
|
|
274
|
+
with wave.open(str(path), "rb") as w:
|
|
275
|
+
return w.getframerate(), w.getnchannels(), w.readframes(w.getnframes())
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
# ── ASR (timed windows) ──────────────────────────────────────────────
|
|
279
|
+
|
|
280
|
+
def _strip_reasoning_residue(text):
|
|
281
|
+
"""Remove MiMo reasoning-model <think>…</think> leakage from ASR content.
|
|
282
|
+
|
|
283
|
+
Thinking-disable is not applied to -asr models (lib._prepare_api_payload), so a reasoning
|
|
284
|
+
model can leak a <think> block — full, truncated/unclosed, or a leading orphan/residual tag
|
|
285
|
+
(observed as a bare "think>" prefix) — into the transcript. Strip all shapes; the generic
|
|
286
|
+
marker strip in _run_asr then handles the remaining "<chinese>"-style tags.
|
|
287
|
+
"""
|
|
288
|
+
text = re.sub(r"(?is)<think\b.*?</think\s*>", "", text) # full <think>…</think> block
|
|
289
|
+
text = re.sub(r"(?is)<think\b.*\Z", "", text) # unclosed/truncated <think tail
|
|
290
|
+
return re.sub(r"(?i)^\s*<?/?think\s*>\s*", "", text) # leading orphan/residual think tag
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
def _run_asr(wav_path, lang="en"):
|
|
294
|
+
# The WAV was just cut by ffmpeg (which raised on failure); an unreadable file is a bug,
|
|
295
|
+
# not "no speech". A zero-frame window (audio shorter than the picture) is skipped.
|
|
296
|
+
with wave.open(str(wav_path), "rb") as source:
|
|
297
|
+
if source.getnframes() <= 0:
|
|
298
|
+
return ""
|
|
299
|
+
b64 = base64.b64encode(Path(wav_path).read_bytes()).decode("ascii")
|
|
300
|
+
payload = {
|
|
301
|
+
"model": CONFIG["mimo_asr_model"],
|
|
302
|
+
"messages": [{"role": "user", "content": [
|
|
303
|
+
{"type": "input_audio", "input_audio": {"data": f"data:{ASR_MIME};base64,{b64}"}},
|
|
304
|
+
]}],
|
|
305
|
+
"asr_options": {"language": lang},
|
|
306
|
+
}
|
|
307
|
+
resp = mimo_asr_api_call(payload)
|
|
308
|
+
try:
|
|
309
|
+
text = str(resp["choices"][0]["message"]["content"] or "").strip()
|
|
310
|
+
except (KeyError, IndexError, TypeError) as exc:
|
|
311
|
+
raise RuntimeError("MiMo-ASR 响应缺少 choices[0].message.content") from exc
|
|
312
|
+
return re.sub(r"<[^>]{1,20}>", "", _strip_reasoning_residue(text)).strip() # strip reasoning + ASR markers like "<chinese>"
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def _asr_windows(audio_wav, segs_dir, duration, window):
|
|
316
|
+
"""Transcribe fixed-time windows → [{start, end, text}]. Coarse timing anchors for the agent;
|
|
317
|
+
the agent does the sentence/segment judgment, not this code."""
|
|
318
|
+
windows = []
|
|
319
|
+
start, idx = 0.0, 0
|
|
320
|
+
while start < duration:
|
|
321
|
+
end = min(start + window, duration)
|
|
322
|
+
if end - start < DUB_MIN_ASR_WINDOW_SECONDS:
|
|
323
|
+
log(f" ASR {start:.0f}-{end:.0f}s: 跳过不足 {DUB_MIN_ASR_WINDOW_SECONDS:.1f}s 的编码尾巴")
|
|
324
|
+
break
|
|
325
|
+
seg_wav = segs_dir / f"asr_{idx:03d}.wav"
|
|
326
|
+
_cut_wav(audio_wav, seg_wav, start, end - start)
|
|
327
|
+
text = _run_asr(seg_wav)
|
|
328
|
+
if text:
|
|
329
|
+
windows.append({"start": round(start, 2), "end": round(end, 2), "text": text})
|
|
330
|
+
log(f" ASR {start:.0f}-{end:.0f}s: {len(text)} chars")
|
|
331
|
+
start, idx = end, idx + 1
|
|
332
|
+
return windows
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
# ── clone TTS + time-fit + mix ───────────────────────────────────────
|
|
336
|
+
|
|
337
|
+
def _clone_tts(text, ref_b64, out_wav):
|
|
338
|
+
payload = {
|
|
339
|
+
"model": CLONE_MODEL,
|
|
340
|
+
"messages": [
|
|
341
|
+
{"role": "user", "content": DUB_TTS_STYLE_PROMPT},
|
|
342
|
+
{"role": "assistant", "content": text},
|
|
343
|
+
],
|
|
344
|
+
"audio": {"format": "wav", "voice": f"data:audio/wav;base64,{ref_b64}"},
|
|
345
|
+
}
|
|
346
|
+
resp = mimo_tts_api_call(payload)
|
|
347
|
+
data = resp["choices"][0]["message"]["audio"]["data"]
|
|
348
|
+
Path(out_wav).write_bytes(base64.b64decode(data))
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
def _clone_cache_inputs(text, ref_identity):
|
|
352
|
+
return {
|
|
353
|
+
"model": CLONE_MODEL,
|
|
354
|
+
"style_prompt": DUB_TTS_STYLE_PROMPT,
|
|
355
|
+
"text": str(text),
|
|
356
|
+
"reference": ref_identity,
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
def _clone_cache_meta_path(raw_wav):
|
|
361
|
+
raw_wav = Path(raw_wav)
|
|
362
|
+
return raw_wav.with_name(f"{raw_wav.name}.meta.json")
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
def _usable_clone_wav(path):
|
|
366
|
+
try:
|
|
367
|
+
sample_rate, channels, frames = _wav_frames(path)
|
|
368
|
+
except (FileNotFoundError, OSError, EOFError, wave.Error):
|
|
369
|
+
return False
|
|
370
|
+
return sample_rate > 0 and channels > 0 and bool(frames)
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
def _write_clone_cache_meta(raw_wav, text, ref_identity):
|
|
374
|
+
meta = {"inputs": _clone_cache_inputs(text, ref_identity)}
|
|
375
|
+
return _write_json(_clone_cache_meta_path(raw_wav), meta)
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
def _ensure_clone_tts(text, ref_b64, ref_identity, raw_wav):
|
|
379
|
+
raw_wav = Path(raw_wav)
|
|
380
|
+
expected = _clone_cache_inputs(text, ref_identity)
|
|
381
|
+
meta_path = _clone_cache_meta_path(raw_wav)
|
|
382
|
+
# Missing sidecar = never synthesized; a sidecar this skill wrote but cannot parse is a
|
|
383
|
+
# bug, not a reason to silently pay for re-synthesis.
|
|
384
|
+
if meta_path.exists():
|
|
385
|
+
meta = json.loads(meta_path.read_text(encoding="utf-8"))
|
|
386
|
+
# A meta from the content-hash schema has no "inputs" and is simply a miss.
|
|
387
|
+
if meta.get("inputs") == expected and _usable_clone_wav(raw_wav):
|
|
388
|
+
return True
|
|
389
|
+
|
|
390
|
+
_clone_tts(text, ref_b64, raw_wav)
|
|
391
|
+
if not _usable_clone_wav(raw_wav):
|
|
392
|
+
raise RuntimeError(f"MiMo voiceclone returned an invalid WAV: {raw_wav}")
|
|
393
|
+
_write_clone_cache_meta(raw_wav, text, ref_identity)
|
|
394
|
+
return False
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
def _time_fit(raw_wav, fitted_wav, room_seconds):
|
|
398
|
+
"""Anchor-at-start fit: only compress when the dub would overrun `room_seconds` (the gap until
|
|
399
|
+
the next line). Never globally speed up; a short dub keeps the natural pause. Returns the
|
|
400
|
+
fitted duration."""
|
|
401
|
+
dur = get_video_duration(raw_wav)
|
|
402
|
+
if dur <= room_seconds + 0.05:
|
|
403
|
+
_ffmpeg(["-i", str(raw_wav), "-ar", str(CLONE_SR), "-ac", "1", str(fitted_wav)])
|
|
404
|
+
return dur
|
|
405
|
+
factor = dur / room_seconds
|
|
406
|
+
if factor <= ATEMPO_CAP:
|
|
407
|
+
_ffmpeg(["-i", str(raw_wav), "-filter:a", _atempo_chain(factor),
|
|
408
|
+
"-ar", str(CLONE_SR), "-ac", "1", str(fitted_wav)])
|
|
409
|
+
return get_video_duration(fitted_wav)
|
|
410
|
+
_ffmpeg(["-i", str(raw_wav),
|
|
411
|
+
"-filter:a", f"{_atempo_chain(ATEMPO_CAP)},atrim=0:{room_seconds:.3f},"
|
|
412
|
+
f"afade=t=out:st={max(0, room_seconds - 0.15):.3f}:d=0.15",
|
|
413
|
+
"-ar", str(CLONE_SR), "-ac", "1", str(fitted_wav)])
|
|
414
|
+
return get_video_duration(fitted_wav)
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
def _build_dub_track(lines, duration, out_wav):
|
|
418
|
+
canvas = bytearray(int(duration * CLONE_SR) * 2) # 16-bit mono silence
|
|
419
|
+
for ln in lines:
|
|
420
|
+
# _time_fit always writes fitted_wav at CLONE_SR mono (and raised if ffmpeg failed).
|
|
421
|
+
sr, ch, frames = _wav_frames(ln["fitted_wav"])
|
|
422
|
+
if sr != CLONE_SR or ch != 1:
|
|
423
|
+
raise RuntimeError(f"fitted WAV {ln['fitted_wav']} is {sr}Hz/{ch}ch, expected {CLONE_SR}Hz mono")
|
|
424
|
+
off = int(ln["start"] * CLONE_SR) * 2
|
|
425
|
+
end = min(off + len(frames), len(canvas))
|
|
426
|
+
canvas[off:end] = frames[: end - off]
|
|
427
|
+
with wave.open(str(out_wav), "wb") as w:
|
|
428
|
+
w.setnchannels(1)
|
|
429
|
+
w.setsampwidth(2)
|
|
430
|
+
w.setframerate(CLONE_SR)
|
|
431
|
+
w.writeframes(bytes(canvas))
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
def _mux(video, dub_wav, out_video):
|
|
435
|
+
_ffmpeg(["-i", str(video), "-i", str(dub_wav),
|
|
436
|
+
"-map", "0:v:0", "-map", "1:a:0", "-c:v", "copy",
|
|
437
|
+
"-af", "loudnorm=I=-16:TP=-1.5:LRA=11", "-c:a", "aac", "-b:a", "192k",
|
|
438
|
+
"-ar", str(DUB_DELIVERY_SR),
|
|
439
|
+
"-shortest", str(out_video)])
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
# ── stages ───────────────────────────────────────────────────────────
|
|
443
|
+
|
|
444
|
+
def _ref_window(duration, ref_start, ref_dur):
|
|
445
|
+
start = max(0.0, min(ref_start, max(0.0, duration - 2.0)))
|
|
446
|
+
return start, max(2.0, min(ref_dur, duration - start))
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
def stage_prepare(video, work, asr_window, ref_start, ref_dur):
|
|
450
|
+
work.mkdir(parents=True, exist_ok=True)
|
|
451
|
+
segs_dir = work / "dub_asr"
|
|
452
|
+
segs_dir.mkdir(exist_ok=True)
|
|
453
|
+
duration = get_video_duration(video)
|
|
454
|
+
log(f"[dub:prepare] video {duration:.1f}s")
|
|
455
|
+
|
|
456
|
+
audio_wav = work / "dub_source.wav"
|
|
457
|
+
_ffmpeg_extract_wav(video, audio_wav)
|
|
458
|
+
windows = _asr_windows(audio_wav, segs_dir, duration, asr_window)
|
|
459
|
+
if not windows:
|
|
460
|
+
raise SystemExit("[dub] no speech transcribed")
|
|
461
|
+
log(f"[dub:prepare] {len(windows)} ASR windows")
|
|
462
|
+
|
|
463
|
+
rs, rd = _ref_window(duration, ref_start, ref_dur)
|
|
464
|
+
_cut_wav(audio_wav, work / "dub_reference.wav", rs, rd)
|
|
465
|
+
|
|
466
|
+
(work / "dub_transcript.json").write_text(
|
|
467
|
+
json.dumps({"video": str(video), "duration": duration, "windows": windows},
|
|
468
|
+
ensure_ascii=False, indent=2), encoding="utf-8")
|
|
469
|
+
(work / "dub_brief.md").write_text(_brief_md(windows, duration), encoding="utf-8")
|
|
470
|
+
print(json.dumps({"status": "dub_prepared", "windows": len(windows),
|
|
471
|
+
"brief": str(work / "dub_brief.md")}, ensure_ascii=False))
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
def _brief_md(windows, duration):
|
|
475
|
+
lines = [
|
|
476
|
+
"# 配音翻译任务(dub)",
|
|
477
|
+
"",
|
|
478
|
+
f"视频时长 {duration:.1f}s。下面是英文原声的分窗转写(时间戳偏粗,仅作锚点)。",
|
|
479
|
+
"把它**忠实翻译并配音**,写入 `dub_script.json`——核心是**和原视频节奏一致**,不是做解说、"
|
|
480
|
+
"也不是做精简版。",
|
|
481
|
+
"",
|
|
482
|
+
"要点:",
|
|
483
|
+
"1. 逐句忠实翻译,原声说什么就配什么;**不要删内容、不要合并、不要自作主张去掉开场 hook**;"
|
|
484
|
+
"原声重复,配音也跟着重复。",
|
|
485
|
+
"2. 每句放在它在原声里被说出的时间,`start`/`end` 取那句话的起止——这样配音才跟着原声节奏走"
|
|
486
|
+
"(该停顿处自然留白)。",
|
|
487
|
+
"3. 译文忠实精简,能在自己的 `start`→`end` 区间内用正常语速说完(约 5 字/秒)。",
|
|
488
|
+
"4. 只有完全被截断、没法说完整的残句,才取其中说得完整的部分。",
|
|
489
|
+
"",
|
|
490
|
+
"输出 `dub_script.json` = `[{\"start\": 起秒, \"end\": 止秒, \"zh\": \"中文台词\"}, ...]`,按 start "
|
|
491
|
+
"升序,[start,end] 是该句在原声里的时间区间,相邻句不要重叠。",
|
|
492
|
+
"",
|
|
493
|
+
"## 英文原声转写(按时间窗)",
|
|
494
|
+
"",
|
|
495
|
+
"| 起–止 | 英文 |",
|
|
496
|
+
"|---|---|",
|
|
497
|
+
]
|
|
498
|
+
for w in windows:
|
|
499
|
+
lines.append(f"| {w['start']}–{w['end']}s | {w['text'].replace('|', '/')} |")
|
|
500
|
+
return "\n".join(lines) + "\n"
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
def stage_render(video, work, ref_start, ref_dur):
|
|
504
|
+
transcript = json.loads((work / "dub_transcript.json").read_text(encoding="utf-8"))
|
|
505
|
+
duration = transcript["duration"]
|
|
506
|
+
script = json.loads((work / "dub_script.json").read_text(encoding="utf-8"))
|
|
507
|
+
# Mechanical hard gate BEFORE any voiceclone spend: empty/overlapping/out-of-range lines
|
|
508
|
+
# cannot produce a publishable dub, so fail fast instead of paying for a broken render.
|
|
509
|
+
lint = lint_dub_script(script, duration)
|
|
510
|
+
_write_json(work / "dub_lint.json", lint)
|
|
511
|
+
review = build_dub_review(script, transcript, lint)
|
|
512
|
+
_write_json(work / "dub_review.json", review)
|
|
513
|
+
if lint["verdict"] != "PASS":
|
|
514
|
+
raise SystemExit(f"[dub] dub_script.json failed lint; see {work / 'dub_lint.json'}")
|
|
515
|
+
lines = [{"start": ln["start"], "end": ln["end"], "zh": ln["zh"]}
|
|
516
|
+
for ln in _normalize_dub_script(script) if ln["zh"]]
|
|
517
|
+
if not lines:
|
|
518
|
+
raise SystemExit("[dub] dub_script.json has no lines")
|
|
519
|
+
|
|
520
|
+
ref_wav = work / "dub_reference.wav"
|
|
521
|
+
if not ref_wav.exists():
|
|
522
|
+
rs, rd = _ref_window(duration, ref_start, ref_dur)
|
|
523
|
+
_cut_wav(work / "dub_source.wav", ref_wav, rs, rd)
|
|
524
|
+
ref_identity = file_identity(ref_wav)
|
|
525
|
+
ref_b64 = base64.b64encode(ref_wav.read_bytes()).decode("ascii")
|
|
526
|
+
|
|
527
|
+
tts_dir = work / "dub_tts"
|
|
528
|
+
tts_dir.mkdir(exist_ok=True)
|
|
529
|
+
log("[dub:render] clone-TTS + time-fit per line…")
|
|
530
|
+
for i, ln in enumerate(lines):
|
|
531
|
+
nxt = lines[i + 1]["start"] if i + 1 < len(lines) else duration
|
|
532
|
+
slot_end = ln["end"] if ln["end"] is not None else nxt
|
|
533
|
+
# fit to the original utterance's span (rhythm-faithful), but never overrun the next line
|
|
534
|
+
room = max(0.4, min(slot_end, nxt) - ln["start"])
|
|
535
|
+
raw = tts_dir / f"line_{i:03d}_raw.wav"
|
|
536
|
+
fitted = tts_dir / f"line_{i:03d}.wav"
|
|
537
|
+
cache_hit = _ensure_clone_tts(ln["zh"], ref_b64, ref_identity, raw)
|
|
538
|
+
ln["tts_cache"] = "hit" if cache_hit else "miss"
|
|
539
|
+
ln["fitted_wav"] = str(fitted)
|
|
540
|
+
ln["fitted_dur"] = round(_time_fit(raw, fitted, room), 2)
|
|
541
|
+
ln["room"] = round(room, 2)
|
|
542
|
+
log(
|
|
543
|
+
f" line {i}: {ln['start']:.1f}s fit={ln['fitted_dur']}s/room {ln['room']}s "
|
|
544
|
+
f"cache={ln['tts_cache']} «{ln['zh'][:18]}»"
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
dub_wav = work / "dub_track.wav"
|
|
548
|
+
_build_dub_track(lines, duration, dub_wav)
|
|
549
|
+
out_video = work / f"dub_{Path(video).stem}.mp4"
|
|
550
|
+
_mux(video, dub_wav, out_video)
|
|
551
|
+
(work / "dub_manifest.json").write_text(
|
|
552
|
+
json.dumps({"schema_version": DUB_SCHEMA_VERSION, "video": str(video), "duration": duration, "lines": lines},
|
|
553
|
+
ensure_ascii=False, indent=2), encoding="utf-8")
|
|
554
|
+
log(f"[dub:render] done → {out_video}")
|
|
555
|
+
print(json.dumps({"status": "dubbed", "output": str(out_video), "lines": len(lines)},
|
|
556
|
+
ensure_ascii=False))
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
def stage_lint(work):
|
|
560
|
+
transcript = json.loads((work / "dub_transcript.json").read_text(encoding="utf-8"))
|
|
561
|
+
script = json.loads((work / "dub_script.json").read_text(encoding="utf-8"))
|
|
562
|
+
lint = lint_dub_script(script, transcript["duration"])
|
|
563
|
+
path = _write_json(work / "dub_lint.json", lint)
|
|
564
|
+
print(json.dumps({"status": "dub_linted", "verdict": lint["verdict"], "issues": len(lint["issues"]), "dub_lint": str(path)}, ensure_ascii=False))
|
|
565
|
+
return lint
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
def stage_review(work):
|
|
569
|
+
transcript = json.loads((work / "dub_transcript.json").read_text(encoding="utf-8"))
|
|
570
|
+
script = json.loads((work / "dub_script.json").read_text(encoding="utf-8"))
|
|
571
|
+
lint = lint_dub_script(script, transcript["duration"])
|
|
572
|
+
_write_json(work / "dub_lint.json", lint)
|
|
573
|
+
review = build_dub_review(script, transcript, lint)
|
|
574
|
+
path = _write_json(work / "dub_review.json", review)
|
|
575
|
+
print(json.dumps({"status": "dub_reviewed", "verdict": review["verdict"], "edits": len(review["highest_return_edits"]), "dub_review": str(path)}, ensure_ascii=False))
|
|
576
|
+
return review
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
def print_schemas():
|
|
580
|
+
print(json.dumps(DUB_ARTIFACT_SCHEMAS, ensure_ascii=False, indent=2))
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
def main():
|
|
584
|
+
ap = argparse.ArgumentParser(
|
|
585
|
+
description=(
|
|
586
|
+
"English→Chinese dub workflow. Artifacts: dub_transcript.json, "
|
|
587
|
+
"agent-authored dub_script.json, dub_lint.json, dub_review.json, dub_manifest.json. "
|
|
588
|
+
"Uses MiMo ASR plus mimo-v2.5-tts-voiceclone; ordinary narration TTS config is separate."
|
|
589
|
+
)
|
|
590
|
+
)
|
|
591
|
+
ap.add_argument("--stage", choices=["prepare", "lint", "review", "render"], required=False,
|
|
592
|
+
help="prepare ASR brief; lint/review dub_script.json; render writes lint/review before voiceclone")
|
|
593
|
+
ap.add_argument("--video", required=False, help="source video (required for prepare/render)")
|
|
594
|
+
ap.add_argument("--work-dir", required=False, help="work directory containing dub artifacts")
|
|
595
|
+
ap.add_argument("--asr-window", type=float, default=6.0)
|
|
596
|
+
ap.add_argument("--ref-start", type=float, default=2.0)
|
|
597
|
+
ap.add_argument("--ref-dur", type=float, default=10.0)
|
|
598
|
+
ap.add_argument("--print-schema", action="store_true",
|
|
599
|
+
help="print JSON schemas for dub_transcript/script/lint/review/manifest and exit")
|
|
600
|
+
args = ap.parse_args()
|
|
601
|
+
if args.print_schema:
|
|
602
|
+
print_schemas()
|
|
603
|
+
return
|
|
604
|
+
if not args.stage:
|
|
605
|
+
ap.error("--stage is required unless --print-schema is used")
|
|
606
|
+
if not args.work_dir:
|
|
607
|
+
ap.error("--work-dir is required")
|
|
608
|
+
work = Path(args.work_dir)
|
|
609
|
+
if args.stage in {"prepare", "render"} and not args.video:
|
|
610
|
+
ap.error("--video is required for prepare/render")
|
|
611
|
+
video = Path(args.video) if args.video else None
|
|
612
|
+
if args.stage == "prepare":
|
|
613
|
+
stage_prepare(video, work, args.asr_window, args.ref_start, args.ref_dur)
|
|
614
|
+
elif args.stage == "lint":
|
|
615
|
+
stage_lint(work)
|
|
616
|
+
elif args.stage == "review":
|
|
617
|
+
stage_review(work)
|
|
618
|
+
else:
|
|
619
|
+
stage_render(video, work, args.ref_start, args.ref_dur)
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
if __name__ == "__main__":
|
|
623
|
+
main()
|