@lemoncat7/dsh-partner 2.8.0 → 2.8.2
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 +11 -0
- package/docs/releases/2.8.1.md +11 -0
- package/docs/releases/2.8.2.md +7 -0
- package/lib/agent-runtime.d.ts +7 -0
- package/lib/agent-runtime.d.ts.map +1 -1
- package/lib/agent-runtime.js +110 -32
- package/lib/agent-runtime.js.map +1 -1
- package/lib/api.js +28 -6
- package/lib/api.js.map +1 -1
- package/lib/autonomy.d.ts.map +1 -1
- package/lib/autonomy.js +5 -0
- 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/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 +7 -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 +2115 -1884
- package/lib/client.js.map +4 -4
- 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 +7 -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 +30 -0
- package/lib/concern-execution.d.ts.map +1 -0
- package/lib/concern-execution.js +86 -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 +9 -1
- package/lib/concern-store.d.ts.map +1 -1
- package/lib/concern-store.js +111 -34
- 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 +54 -26
- package/lib/heartbeat.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- 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 +17 -1
- package/lib/observation-executor.js.map +1 -1
- package/lib/observation-loop.d.ts +5 -0
- package/lib/observation-loop.d.ts.map +1 -1
- package/lib/observation-loop.js +36 -3
- package/lib/observation-loop.js.map +1 -1
- 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/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 +12 -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-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 +6 -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-assemble/scripts/media.py
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"""Media probing and source-clip provenance for video-assemble."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import os
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from artifacts import _explicit_source_video
|
|
8
|
+
from lib import log, run_cmd
|
|
9
|
+
|
|
10
|
+
def _load_cut_timeline_plan(work_dir):
|
|
11
|
+
"""The cut plan, preferring clip_plan_validated.json unless the raw plan is newer; None in full mode."""
|
|
12
|
+
raw_plan_path = Path(work_dir) / "clip_plan.json"
|
|
13
|
+
validated_plan_path = Path(work_dir) / "clip_plan_validated.json"
|
|
14
|
+
if not validated_plan_path.exists():
|
|
15
|
+
return json.loads(raw_plan_path.read_text(encoding="utf-8")) if raw_plan_path.exists() else None
|
|
16
|
+
if not raw_plan_path.exists():
|
|
17
|
+
return json.loads(validated_plan_path.read_text(encoding="utf-8"))
|
|
18
|
+
if validated_plan_path.stat().st_mtime_ns >= raw_plan_path.stat().st_mtime_ns:
|
|
19
|
+
return json.loads(validated_plan_path.read_text(encoding="utf-8"))
|
|
20
|
+
return json.loads(raw_plan_path.read_text(encoding="utf-8"))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _plan_clip_spans(work_dir):
|
|
24
|
+
"""Cut-mode clip spans [{source_start, source_end, output_start, output_end, entry}], or None.
|
|
25
|
+
|
|
26
|
+
clip_plan.json is either a bare list or {"clips": [...]}; a clip names its source range as
|
|
27
|
+
source_start/source_end or start/end. Clips without explicit output_start/output_end are laid
|
|
28
|
+
out back to back on the output timeline.
|
|
29
|
+
"""
|
|
30
|
+
plan = _load_cut_timeline_plan(work_dir)
|
|
31
|
+
if plan is None:
|
|
32
|
+
return None
|
|
33
|
+
entries = plan["clips"] if isinstance(plan, dict) else plan
|
|
34
|
+
spans, cursor = [], 0.0
|
|
35
|
+
for entry in entries:
|
|
36
|
+
ss = float(entry.get("source_start", entry.get("start")))
|
|
37
|
+
se = float(entry.get("source_end", entry.get("end")))
|
|
38
|
+
if "output_start" in entry:
|
|
39
|
+
out_s, out_e = float(entry["output_start"]), float(entry["output_end"])
|
|
40
|
+
cursor = max(cursor, out_e)
|
|
41
|
+
else:
|
|
42
|
+
out_s, out_e = cursor, cursor + (se - ss)
|
|
43
|
+
cursor = out_e
|
|
44
|
+
spans.append({
|
|
45
|
+
"source_start": ss, "source_end": se,
|
|
46
|
+
"output_start": out_s, "output_end": out_e,
|
|
47
|
+
"entry": entry,
|
|
48
|
+
})
|
|
49
|
+
return spans
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _ratio_to_float(value, default=1.0):
|
|
53
|
+
"""Parse an ffprobe ratio ("4:3", "16/9" or a bare number); unknown ratios yield `default`."""
|
|
54
|
+
value = value.strip()
|
|
55
|
+
if value in {"", "0:1", "0/1", "N/A"}:
|
|
56
|
+
return default
|
|
57
|
+
if ":" in value:
|
|
58
|
+
num, den = value.split(":", 1)
|
|
59
|
+
elif "/" in value:
|
|
60
|
+
num, den = value.split("/", 1)
|
|
61
|
+
else:
|
|
62
|
+
return float(value)
|
|
63
|
+
return float(num) / float(den) if float(den) else default
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _fps_from_rate(value, default=30.0):
|
|
67
|
+
"""Parse an ffprobe frame rate ("30000/1001" or a bare number); a 0/0 rate yields `default`."""
|
|
68
|
+
if "/" in value:
|
|
69
|
+
num, den = value.split("/", 1)
|
|
70
|
+
return round(float(num) / float(den), 3) if float(den) else default
|
|
71
|
+
return round(float(value), 3)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def _stream_rotation(stream):
|
|
75
|
+
"""Extract rotation from tags or side_data_list in ffprobe JSON."""
|
|
76
|
+
for source in (stream.get("tags", {}).get("rotate"), stream.get("rotation")):
|
|
77
|
+
if source not in (None, ""):
|
|
78
|
+
return int(round(float(source))) % 360
|
|
79
|
+
for item in stream.get("side_data_list", []):
|
|
80
|
+
if item.get("rotation") not in (None, ""):
|
|
81
|
+
return int(round(float(item["rotation"]))) % 360
|
|
82
|
+
return 0
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _canvas_from_stream(stream):
|
|
86
|
+
storage_w = stream["width"]
|
|
87
|
+
storage_h = stream["height"]
|
|
88
|
+
fps = _fps_from_rate(stream["r_frame_rate"])
|
|
89
|
+
sar_text = stream.get("sample_aspect_ratio", "1:1")
|
|
90
|
+
dar_text = stream.get("display_aspect_ratio", "")
|
|
91
|
+
sar = _ratio_to_float(sar_text, 1.0)
|
|
92
|
+
rotation = _stream_rotation(stream)
|
|
93
|
+
|
|
94
|
+
display_w = max(1, int(round(storage_w * sar)))
|
|
95
|
+
display_h = max(1, storage_h)
|
|
96
|
+
if dar_text and dar_text not in {"0:1", "N/A"}:
|
|
97
|
+
dar = _ratio_to_float(dar_text, 0.0)
|
|
98
|
+
# ffprobe sources are not consistent: some report DAR before rotation
|
|
99
|
+
# (landscape value > 1 for a 90° stream), while some containers report the
|
|
100
|
+
# already-rotated portrait DAR (< 1). Only apply DAR before swapping when it
|
|
101
|
+
# describes the stored orientation.
|
|
102
|
+
if dar > 0 and not (rotation in {90, 270} and dar < 1.0):
|
|
103
|
+
# Preserve height and adjust width. This keeps legacy square-pixel landscape
|
|
104
|
+
# byte-identical while honoring non-square pixel DAR metadata.
|
|
105
|
+
display_w = max(1, int(round(display_h * dar)))
|
|
106
|
+
if rotation in {90, 270}:
|
|
107
|
+
display_w, display_h = display_h, display_w
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
"width": display_w,
|
|
111
|
+
"height": display_h,
|
|
112
|
+
"fps": fps,
|
|
113
|
+
"storage_width": storage_w,
|
|
114
|
+
"storage_height": storage_h,
|
|
115
|
+
"rotation": rotation,
|
|
116
|
+
"sample_aspect_ratio": sar_text,
|
|
117
|
+
"display_aspect_ratio": dar_text or f"{display_w}:{display_h}",
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def _probe_canvas(video_path):
|
|
122
|
+
"""Return rotation/SAR/DAR-aware canvas facts for a video.
|
|
123
|
+
|
|
124
|
+
``width``/``height`` are the display canvas used by subtitle/overlay geometry.
|
|
125
|
+
For legacy square-pixel landscape sources, these remain the raw storage dimensions.
|
|
126
|
+
"""
|
|
127
|
+
res = run_cmd([
|
|
128
|
+
"ffprobe", "-v", "error", "-select_streams", "v:0",
|
|
129
|
+
"-show_entries",
|
|
130
|
+
"stream=width,height,r_frame_rate,avg_frame_rate,sample_aspect_ratio,display_aspect_ratio:stream_tags=rotate:stream_side_data=rotation",
|
|
131
|
+
"-of", "json", str(video_path),
|
|
132
|
+
])
|
|
133
|
+
if res.returncode != 0:
|
|
134
|
+
raise RuntimeError(f"ffprobe 无法读取视频流 {video_path}: {res.stderr}")
|
|
135
|
+
streams = json.loads(res.stdout)["streams"]
|
|
136
|
+
if not streams:
|
|
137
|
+
raise RuntimeError(f"{video_path} 没有视频流")
|
|
138
|
+
return _canvas_from_stream(streams[0])
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
def _has_audio_stream(video_path):
|
|
142
|
+
"""Return True when the input has an audio stream usable as [0:a]."""
|
|
143
|
+
result = run_cmd([
|
|
144
|
+
"ffprobe", "-v", "error", "-select_streams", "a:0",
|
|
145
|
+
"-show_entries", "stream=index", "-of", "csv=p=0", str(video_path),
|
|
146
|
+
])
|
|
147
|
+
return result.returncode == 0 and bool(result.stdout.strip())
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def _build_video_clips(input_video, work_dir, duration_s):
|
|
151
|
+
"""Video-track clips for the timeline.
|
|
152
|
+
|
|
153
|
+
In cut mode each plan entry becomes a clip referencing the ORIGINAL source
|
|
154
|
+
range. Multi-source validated plans carry per-clip source_path and do not
|
|
155
|
+
require an explicit ambient --source-video. Without any declared source (full
|
|
156
|
+
mode, or cut mode rendered without --source-video) the rendered input is one clip.
|
|
157
|
+
"""
|
|
158
|
+
explicit_source_video = _explicit_source_video()
|
|
159
|
+
spans = _plan_clip_spans(work_dir)
|
|
160
|
+
multi_source = spans is not None and any(span["entry"].get("source_path") for span in spans)
|
|
161
|
+
if spans is None or not (explicit_source_video or multi_source):
|
|
162
|
+
return [{"source_path": str(input_video), "source_start": 0.0,
|
|
163
|
+
"source_end": float(duration_s), "timeline_start": 0.0,
|
|
164
|
+
"timeline_end": float(duration_s)}]
|
|
165
|
+
clips = []
|
|
166
|
+
for span in spans:
|
|
167
|
+
entry = span["entry"]
|
|
168
|
+
source_path = entry.get("source_path") or explicit_source_video
|
|
169
|
+
timeline_start, timeline_end = span["output_start"], span["output_end"]
|
|
170
|
+
if not source_path or not os.path.exists(source_path):
|
|
171
|
+
# Degrade ONLY this clip — point it at the rendered cut for its own output
|
|
172
|
+
# window — and keep real provenance for every present source, instead of
|
|
173
|
+
# collapsing the whole multi-source timeline.
|
|
174
|
+
log(f" 时间线: source_path 不存在,该片段降级为剪后成片片段: {source_path or '(unset)'}")
|
|
175
|
+
clips.append({"source_id": entry.get("source_id"),
|
|
176
|
+
"source_path": str(input_video),
|
|
177
|
+
"source_start": timeline_start,
|
|
178
|
+
"source_end": timeline_end,
|
|
179
|
+
"timeline_start": timeline_start,
|
|
180
|
+
"timeline_end": timeline_end,
|
|
181
|
+
"provenance_degraded": True,
|
|
182
|
+
"provenance_reason": f"missing_source_path:{source_path or 'unset'}"})
|
|
183
|
+
continue
|
|
184
|
+
clips.append({"source_id": entry.get("source_id"),
|
|
185
|
+
"source_path": source_path,
|
|
186
|
+
"source_start": span["source_start"],
|
|
187
|
+
"source_end": span["source_end"],
|
|
188
|
+
"timeline_start": timeline_start,
|
|
189
|
+
"timeline_end": timeline_end})
|
|
190
|
+
return clips
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
"""Narration tempo fitting and sample-accurate timeline WAV placement."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import wave
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from lib import CONFIG, get_video_duration, log, narration_tempo_budget, run_cmd
|
|
8
|
+
|
|
9
|
+
def _apply_narration_speed(
|
|
10
|
+
tts_segments,
|
|
11
|
+
work_dir,
|
|
12
|
+
*,
|
|
13
|
+
tempo_policy=None,
|
|
14
|
+
):
|
|
15
|
+
"""Globally speed up narration audio via atempo (CONFIG['narration_speed']).
|
|
16
|
+
|
|
17
|
+
MiMo TTS reads a touch slowly for short-form recaps; a 1.1-1.2x bump makes it
|
|
18
|
+
snappier without the chipmunk effect. Rewrites each segment's audio_path/duration
|
|
19
|
+
to the sped copy so the rest of assembly is unchanged. No-op at speed 1.0.
|
|
20
|
+
"""
|
|
21
|
+
speed = tempo_policy["global_atempo"] if tempo_policy else CONFIG["narration_speed"]
|
|
22
|
+
if abs(speed - 1.0) <= 1e-3:
|
|
23
|
+
return
|
|
24
|
+
done = 0
|
|
25
|
+
for seg in tts_segments:
|
|
26
|
+
src = seg["audio_path"]
|
|
27
|
+
if not os.path.exists(src):
|
|
28
|
+
continue # reported as a skipped segment during placement
|
|
29
|
+
out = str(Path(work_dir) / f"_spd_{seg['index']}.wav")
|
|
30
|
+
res = run_cmd(["ffmpeg", "-y", "-i", src, "-filter:a", f"atempo={speed:.3f}",
|
|
31
|
+
"-ar", "44100", "-ac", "1", "-acodec", "pcm_s16le", out])
|
|
32
|
+
if res.returncode != 0:
|
|
33
|
+
raise RuntimeError(f"解说提速失败 {src}: {res.stderr}")
|
|
34
|
+
seg["audio_path"] = out
|
|
35
|
+
seg["narration_conversion_path"] = out
|
|
36
|
+
seg["audio_duration"] = get_video_duration(out)
|
|
37
|
+
done += 1
|
|
38
|
+
log(f"解说整体提速: atempo={speed:.2f} ({done} 段)")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _adjust_tts_speed(
|
|
42
|
+
audio_path,
|
|
43
|
+
target_duration,
|
|
44
|
+
tts_rate_offset=0.0,
|
|
45
|
+
*,
|
|
46
|
+
tempo_policy=None,
|
|
47
|
+
):
|
|
48
|
+
"""Fit overlong TTS with bounded atempo; never time-trim speech in assemble.
|
|
49
|
+
|
|
50
|
+
Assemble has no word/sentence timestamps, so if bounded atempo cannot make the
|
|
51
|
+
audio fit, it returns `fit_status=no_safe_fit` and leaves the original audio
|
|
52
|
+
untouched for QC to block instead of guessing a spoken_text truncation.
|
|
53
|
+
"""
|
|
54
|
+
audio_path = Path(audio_path)
|
|
55
|
+
current_dur = get_video_duration(audio_path)
|
|
56
|
+
budget = narration_tempo_budget(tts_rate_offset)
|
|
57
|
+
if tempo_policy:
|
|
58
|
+
budget.update({
|
|
59
|
+
"global_narration_speed": tempo_policy["global_atempo"],
|
|
60
|
+
"tts_rate_factor": 1.0,
|
|
61
|
+
"segment_tempo_max": tempo_policy["segment_tempo_max"],
|
|
62
|
+
"cumulative_tempo_max": tempo_policy["cumulative_tempo_max"],
|
|
63
|
+
"cumulative_tempo_hard_max": tempo_policy["cumulative_tempo_hard_max"],
|
|
64
|
+
})
|
|
65
|
+
meta = {
|
|
66
|
+
"fit_status": "fits",
|
|
67
|
+
"blocking": False,
|
|
68
|
+
"tempo_factor": 1.0,
|
|
69
|
+
"segment_tempo_factor": 1.0,
|
|
70
|
+
"truncated": False,
|
|
71
|
+
"truncate_reason": "none",
|
|
72
|
+
"tts_rate_offset": float(tts_rate_offset),
|
|
73
|
+
"audio_duration": current_dur,
|
|
74
|
+
"placed_audio_duration": current_dur,
|
|
75
|
+
"global_narration_speed": budget["global_narration_speed"],
|
|
76
|
+
"effective_tempo": budget["global_narration_speed"] * budget["tts_rate_factor"],
|
|
77
|
+
"cumulative_tempo_max": budget["cumulative_tempo_max"],
|
|
78
|
+
"cumulative_tempo_hard_max": budget["cumulative_tempo_hard_max"],
|
|
79
|
+
}
|
|
80
|
+
if current_dur <= target_duration:
|
|
81
|
+
return (str(audio_path), current_dur, meta)
|
|
82
|
+
|
|
83
|
+
if tempo_policy and not tempo_policy["bounded_segment_fit"]:
|
|
84
|
+
meta.update({
|
|
85
|
+
"fit_status": "no_safe_fit", "blocking": True,
|
|
86
|
+
"truncate_reason": "no_safe_boundary", "placed_audio_duration": 0.0,
|
|
87
|
+
"needed_tempo_factor": current_dur / target_duration,
|
|
88
|
+
})
|
|
89
|
+
return (str(audio_path), current_dur, meta)
|
|
90
|
+
|
|
91
|
+
ratio = current_dur / target_duration
|
|
92
|
+
effective_max = budget["segment_tempo_max"]
|
|
93
|
+
if ratio > effective_max:
|
|
94
|
+
meta.update({
|
|
95
|
+
"fit_status": "no_safe_fit",
|
|
96
|
+
"blocking": True,
|
|
97
|
+
"truncate_reason": "no_safe_boundary",
|
|
98
|
+
"placed_audio_duration": 0.0,
|
|
99
|
+
"needed_tempo_factor": ratio,
|
|
100
|
+
})
|
|
101
|
+
log(
|
|
102
|
+
f" TTS 无安全放置: {current_dur:.1f}s 需 x{ratio:.2f},"
|
|
103
|
+
f"超过段内预算 x{effective_max:.2f}(assemble 不按时间硬切)"
|
|
104
|
+
)
|
|
105
|
+
return (str(audio_path), current_dur, meta)
|
|
106
|
+
|
|
107
|
+
# 温和加速。给 atempo/容器时长舍入留出 0.2% 安全余量;宁可极轻微
|
|
108
|
+
# 多加速,也不能在写入时间线时裁掉最后一个音节。
|
|
109
|
+
tempo = min(ratio * 1.002, effective_max)
|
|
110
|
+
adjusted_path = audio_path.with_name(f"{audio_path.stem}_adj{audio_path.suffix}")
|
|
111
|
+
cmd = ["ffmpeg", "-y", "-i", str(audio_path),
|
|
112
|
+
"-filter:a", f"atempo={tempo:.6f}",
|
|
113
|
+
"-ar", "44100", "-ac", "1", str(adjusted_path)]
|
|
114
|
+
result = run_cmd(cmd)
|
|
115
|
+
if result.returncode != 0:
|
|
116
|
+
raise RuntimeError(f"TTS 加速失败 {audio_path}: {result.stderr}")
|
|
117
|
+
new_dur = get_video_duration(adjusted_path)
|
|
118
|
+
if new_dur > target_duration + (1.0 / 44100.0):
|
|
119
|
+
adjusted_path.unlink(missing_ok=True)
|
|
120
|
+
meta.update({
|
|
121
|
+
"fit_status": "no_safe_fit",
|
|
122
|
+
"blocking": True,
|
|
123
|
+
"truncate_reason": "no_safe_boundary",
|
|
124
|
+
"placed_audio_duration": 0.0,
|
|
125
|
+
"needed_tempo_factor": new_dur / target_duration,
|
|
126
|
+
})
|
|
127
|
+
log(
|
|
128
|
+
f" TTS 加速后仍超出安全窗口 {new_dur - target_duration:.3f}s;"
|
|
129
|
+
"禁止裁尾,交由 Agent 缩短/移动文本"
|
|
130
|
+
)
|
|
131
|
+
return (str(audio_path), current_dur, meta)
|
|
132
|
+
meta.update({
|
|
133
|
+
"fit_status": "tempo_adjusted",
|
|
134
|
+
"tempo_factor": tempo,
|
|
135
|
+
"segment_tempo_factor": tempo,
|
|
136
|
+
"placed_audio_duration": new_dur,
|
|
137
|
+
"effective_tempo": budget["global_narration_speed"] * budget["tts_rate_factor"] * tempo,
|
|
138
|
+
})
|
|
139
|
+
log(f" TTS 温和加速: {current_dur:.1f}s → {new_dur:.1f}s (x{tempo:.2f})")
|
|
140
|
+
return (str(adjusted_path), new_dur, meta)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def _edge_quiet_samples(pcm16_mono, sample_count, *, from_start, threshold=260):
|
|
144
|
+
"""Count near-silent PCM16 samples at one edge of a mono buffer."""
|
|
145
|
+
indices = range(sample_count) if from_start else range(sample_count - 1, -1, -1)
|
|
146
|
+
quiet = 0
|
|
147
|
+
for index in indices:
|
|
148
|
+
offset = index * 2
|
|
149
|
+
value = int.from_bytes(pcm16_mono[offset:offset + 2], "little", signed=True)
|
|
150
|
+
if abs(value) > threshold:
|
|
151
|
+
break
|
|
152
|
+
quiet += 1
|
|
153
|
+
return quiet
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def _speech_safe_fade_lengths(pcm16_mono, sample_count, sample_rate, configured_ms):
|
|
157
|
+
"""Limit fades to edge silence so first/last syllables are never attenuated.
|
|
158
|
+
|
|
159
|
+
When TTS has no measurable edge silence, retain only a 5ms anti-click ramp.
|
|
160
|
+
"""
|
|
161
|
+
configured = min(int(max(0.0, float(configured_ms)) * sample_rate / 1000), sample_count // 4)
|
|
162
|
+
if configured <= 0:
|
|
163
|
+
return 0, 0
|
|
164
|
+
anti_click = min(int(0.005 * sample_rate), configured)
|
|
165
|
+
leading = _edge_quiet_samples(pcm16_mono, sample_count, from_start=True)
|
|
166
|
+
trailing = _edge_quiet_samples(pcm16_mono, sample_count, from_start=False)
|
|
167
|
+
return min(configured, max(anti_click, leading)), min(configured, max(anti_click, trailing))
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def _unplaced(seg, at, fit_status, reason, *, blocking=False):
|
|
171
|
+
"""Record a segment that contributes no audio: a zero-width window at `at` seconds."""
|
|
172
|
+
seg["actual_place_start"] = at
|
|
173
|
+
seg["actual_place_end"] = at
|
|
174
|
+
seg["placed_audio_duration"] = 0.0
|
|
175
|
+
seg["fit_status"] = fit_status
|
|
176
|
+
seg["truncate_reason"] = reason
|
|
177
|
+
seg["blocking"] = blocking
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def _build_timed_narration(
|
|
181
|
+
tts_segments,
|
|
182
|
+
output_wav,
|
|
183
|
+
video_duration,
|
|
184
|
+
work_dir,
|
|
185
|
+
*,
|
|
186
|
+
tempo_policy=None,
|
|
187
|
+
):
|
|
188
|
+
"""将 TTS 片段按时间轴放置到一条与视频等长的音轨上"""
|
|
189
|
+
sample_rate = 44100
|
|
190
|
+
total_samples = int(video_duration * sample_rate)
|
|
191
|
+
buffer = bytearray(total_samples * 2)
|
|
192
|
+
last_written_end = 0 # 追踪已写入位置,防止重叠
|
|
193
|
+
prev_pause_samples = 0 # 前一段的 pause_after_ms,控制段间间隔
|
|
194
|
+
skipped_count = 0 # 因 WAV 缺失或无安全放置而被跳过的段数
|
|
195
|
+
placed_count = 0 # 真正写入音频的段数;防止"成功"生成全静音旁白
|
|
196
|
+
no_safe_fit_count = 0 # 超预算但不能安全截断;交由 QC/manifest 阻断
|
|
197
|
+
prev_authored_end = None # 上一段作者标注的结束时间,用于判断"段落"边界
|
|
198
|
+
run_gap = CONFIG["narration_run_gap_seconds"] # 作者留白 > 此值 = 新段落
|
|
199
|
+
tighten = CONFIG["narration_tighten"]
|
|
200
|
+
tight_pause_samples = int(CONFIG["narration_tight_pause_seconds"] * sample_rate)
|
|
201
|
+
# 漂移上限:收紧时一句最多比作者标注的时间提前 max_pull 秒,避免整段解说被全部压到前面、与画面脱节
|
|
202
|
+
max_pull_samples = int(CONFIG["narration_max_pull_seconds"] * sample_rate)
|
|
203
|
+
configured_delay = CONFIG["narration_delay_seconds"]
|
|
204
|
+
tail_pad = CONFIG["narration_tail_pad_seconds"]
|
|
205
|
+
|
|
206
|
+
for seg in tts_segments:
|
|
207
|
+
wav_path = seg["audio_path"]
|
|
208
|
+
pause_samples = int(seg["pause_after_ms"] * sample_rate / 1000)
|
|
209
|
+
# 段落收紧:同一段落内(与上一句作者留白 <= run_gap)把这一句紧贴上一句的实际收尾播放,
|
|
210
|
+
# 句间间隔固定为 tight_pause,不受 slot 内居中延迟 / TTS 时长波动影响。段落之间(作者特意留
|
|
211
|
+
# 的大留白,让精彩原声透出)才放回原声。这样句间间隔稳定、不会出现"一句解说一段空白"。
|
|
212
|
+
cur_authored_start = float(seg["start"])
|
|
213
|
+
is_run_start = (placed_count == 0 or prev_authored_end is None
|
|
214
|
+
or cur_authored_start - prev_authored_end > run_gap)
|
|
215
|
+
prev_authored_end = float(seg["end"])
|
|
216
|
+
|
|
217
|
+
if not os.path.exists(wav_path):
|
|
218
|
+
_unplaced(seg, seg["start"], "skipped", "missing_wav")
|
|
219
|
+
prev_pause_samples = pause_samples
|
|
220
|
+
skipped_count += 1
|
|
221
|
+
continue
|
|
222
|
+
|
|
223
|
+
original_wav_path = wav_path
|
|
224
|
+
try:
|
|
225
|
+
with wave.open(wav_path, "rb") as wf_check:
|
|
226
|
+
needs_resample = (
|
|
227
|
+
wf_check.getnchannels(), wf_check.getsampwidth(), wf_check.getframerate()
|
|
228
|
+
) != (1, 2, sample_rate)
|
|
229
|
+
except (wave.Error, EOFError):
|
|
230
|
+
# Valid post-processed WAV may use IEEE float, which Python's wave
|
|
231
|
+
# reader does not support. FFmpeg performs the explicit PCM conversion.
|
|
232
|
+
needs_resample = True
|
|
233
|
+
|
|
234
|
+
tts_rate_offset = seg["tts_rate_offset"]
|
|
235
|
+
tts_dur = seg["audio_duration"]
|
|
236
|
+
|
|
237
|
+
slot_duration = max(0.0, float(seg["end"]) - float(seg["start"]))
|
|
238
|
+
max_delay = max(0.0, slot_duration - tts_dur - tail_pad)
|
|
239
|
+
narration_delay = min(configured_delay, max_delay)
|
|
240
|
+
start_sample = int((seg["start"] + narration_delay) * sample_rate)
|
|
241
|
+
end_boundary = int(min(seg["end"], video_duration) * sample_rate)
|
|
242
|
+
|
|
243
|
+
# 段间间隔:使用前一段的 pause_after_ms(来自 narration.json)
|
|
244
|
+
min_start_with_pause = last_written_end + prev_pause_samples
|
|
245
|
+
if tighten and not is_run_start:
|
|
246
|
+
# 段落内:紧贴上一句的实际收尾播放,句间间隔固定为 tight_pause(不被 slot 内居中延迟撑大),
|
|
247
|
+
# 但不早于"作者标注起始 - max_pull",防止整段被压到前面与画面脱节。
|
|
248
|
+
drift_floor = int(cur_authored_start * sample_rate) - max_pull_samples
|
|
249
|
+
actual_start = max(last_written_end + tight_pause_samples, drift_floor)
|
|
250
|
+
else:
|
|
251
|
+
# 段落起点(或关闭收紧):尊重作者标注的起始 + 入场延迟,让画面/原声先立住
|
|
252
|
+
actual_start = max(start_sample, min_start_with_pause)
|
|
253
|
+
actual_start = min(actual_start, end_boundary) # 不超出 slot 边界
|
|
254
|
+
|
|
255
|
+
# 根据实际可用空间决定是否加速
|
|
256
|
+
available_samples = end_boundary - actual_start
|
|
257
|
+
available_duration = max(available_samples / sample_rate, 0)
|
|
258
|
+
if tts_dur > available_duration > 0:
|
|
259
|
+
if tempo_policy:
|
|
260
|
+
wav_path, _actual_dur, fit_meta = _adjust_tts_speed(
|
|
261
|
+
wav_path, available_duration, tts_rate_offset,
|
|
262
|
+
tempo_policy=tempo_policy,
|
|
263
|
+
)
|
|
264
|
+
else:
|
|
265
|
+
wav_path, _actual_dur, fit_meta = _adjust_tts_speed(
|
|
266
|
+
wav_path, available_duration, tts_rate_offset
|
|
267
|
+
)
|
|
268
|
+
seg.update({
|
|
269
|
+
"fit_status": fit_meta["fit_status"],
|
|
270
|
+
"segment_tempo_factor": fit_meta["segment_tempo_factor"],
|
|
271
|
+
"effective_tempo": fit_meta["effective_tempo"],
|
|
272
|
+
"global_narration_speed": fit_meta["global_narration_speed"],
|
|
273
|
+
"blocking": fit_meta["blocking"],
|
|
274
|
+
})
|
|
275
|
+
if fit_meta["fit_status"] == "no_safe_fit":
|
|
276
|
+
_unplaced(seg, actual_start / sample_rate, "no_safe_fit",
|
|
277
|
+
fit_meta["truncate_reason"], blocking=True)
|
|
278
|
+
prev_pause_samples = pause_samples
|
|
279
|
+
skipped_count += 1
|
|
280
|
+
no_safe_fit_count += 1
|
|
281
|
+
continue
|
|
282
|
+
else:
|
|
283
|
+
budget = narration_tempo_budget(tts_rate_offset)
|
|
284
|
+
if tempo_policy:
|
|
285
|
+
budget.update({
|
|
286
|
+
"global_narration_speed": tempo_policy["global_atempo"],
|
|
287
|
+
"tts_rate_factor": 1.0,
|
|
288
|
+
})
|
|
289
|
+
seg.update({
|
|
290
|
+
"fit_status": "fits",
|
|
291
|
+
"segment_tempo_factor": 1.0,
|
|
292
|
+
"global_narration_speed": budget["global_narration_speed"],
|
|
293
|
+
"effective_tempo": budget["global_narration_speed"] * budget["tts_rate_factor"],
|
|
294
|
+
"blocking": False,
|
|
295
|
+
})
|
|
296
|
+
|
|
297
|
+
# _adjust_tts_speed 输出固定 44100Hz mono 16bit,若文件被替换则无需 resample
|
|
298
|
+
if wav_path != original_wav_path:
|
|
299
|
+
needs_resample = False
|
|
300
|
+
if needs_resample:
|
|
301
|
+
tmp_path = str(Path(work_dir) / f"_rs_{seg['index']}.wav")
|
|
302
|
+
rs_result = run_cmd(["ffmpeg", "-y", "-i", wav_path,
|
|
303
|
+
"-ar", str(sample_rate), "-ac", "1",
|
|
304
|
+
"-acodec", "pcm_s16le", tmp_path])
|
|
305
|
+
if rs_result.returncode != 0:
|
|
306
|
+
log(f" 跳过: 重采样失败 {wav_path}: {rs_result.stderr}")
|
|
307
|
+
_unplaced(seg, seg["start"], "skipped", "resample_failed")
|
|
308
|
+
prev_pause_samples = pause_samples
|
|
309
|
+
skipped_count += 1
|
|
310
|
+
continue
|
|
311
|
+
wav_path = tmp_path
|
|
312
|
+
seg["narration_conversion_path"] = tmp_path
|
|
313
|
+
|
|
314
|
+
with wave.open(wav_path, "rb") as wf:
|
|
315
|
+
wf_data = bytearray(wf.readframes(wf.getnframes()))
|
|
316
|
+
|
|
317
|
+
# 按场景边界裁剪
|
|
318
|
+
audio_samples = len(wf_data) // 2
|
|
319
|
+
available = end_boundary - actual_start
|
|
320
|
+
write_samples = audio_samples
|
|
321
|
+
|
|
322
|
+
if write_samples <= 0 or available <= 0:
|
|
323
|
+
log(f" 跳过: {seg['start']:.1f}s-{seg['end']:.1f}s (无空间)")
|
|
324
|
+
_unplaced(seg, seg["start"], "no_safe_fit", "no_room", blocking=True)
|
|
325
|
+
prev_pause_samples = pause_samples
|
|
326
|
+
no_safe_fit_count += 1
|
|
327
|
+
continue
|
|
328
|
+
|
|
329
|
+
if audio_samples > available:
|
|
330
|
+
# No tolerance-based trimming: even a few milliseconds may contain a
|
|
331
|
+
# consonant/vowel release. _adjust_tts_speed must produce a complete file
|
|
332
|
+
# that fits; otherwise block and ask the Agent to shorten/move the block.
|
|
333
|
+
over = (audio_samples - available) / sample_rate
|
|
334
|
+
log(f" TTS 无安全放置: 段 {seg['index']} 超出可用窗口 {over:.3f}s;禁止裁尾,交由 QC 阻断")
|
|
335
|
+
_unplaced(seg, actual_start / sample_rate, "no_safe_fit", "no_safe_boundary", blocking=True)
|
|
336
|
+
prev_pause_samples = pause_samples
|
|
337
|
+
skipped_count += 1
|
|
338
|
+
no_safe_fit_count += 1
|
|
339
|
+
continue
|
|
340
|
+
|
|
341
|
+
# 重叠检测:跳过与前段重叠的部分(在 fade 之前,避免截断后丢失 fade-in)
|
|
342
|
+
if actual_start < last_written_end:
|
|
343
|
+
overlap_ms = (last_written_end - actual_start) * 1000 / sample_rate
|
|
344
|
+
if last_written_end >= actual_start + write_samples:
|
|
345
|
+
log(f" 跳过重叠段: {actual_start/sample_rate:.1f}s "
|
|
346
|
+
f"(与前段重叠 {overlap_ms:.0f}ms)")
|
|
347
|
+
_unplaced(seg, seg["start"], "no_safe_fit", "no_room", blocking=True)
|
|
348
|
+
prev_pause_samples = pause_samples
|
|
349
|
+
no_safe_fit_count += 1
|
|
350
|
+
continue
|
|
351
|
+
actual_start = last_written_end
|
|
352
|
+
available = end_boundary - actual_start
|
|
353
|
+
if write_samples > available:
|
|
354
|
+
log(f" 重叠 {overlap_ms:.0f}ms 后无安全完整窗口,跳过")
|
|
355
|
+
_unplaced(seg, actual_start / sample_rate, "no_safe_fit", "no_safe_boundary", blocking=True)
|
|
356
|
+
prev_pause_samples = pause_samples
|
|
357
|
+
skipped_count += 1
|
|
358
|
+
no_safe_fit_count += 1
|
|
359
|
+
continue
|
|
360
|
+
|
|
361
|
+
# fade-in / fade-out(在 overlap 裁剪之后应用,确保正确的音频包络)
|
|
362
|
+
fade_in_len, fade_out_len = _speech_safe_fade_lengths(
|
|
363
|
+
wf_data, write_samples, sample_rate, CONFIG["fade_ms"]
|
|
364
|
+
)
|
|
365
|
+
for i in range(fade_in_len):
|
|
366
|
+
gain = i / fade_in_len
|
|
367
|
+
s = i * 2
|
|
368
|
+
sample = int.from_bytes(wf_data[s:s+2], 'little', signed=True)
|
|
369
|
+
sample = int(sample * gain)
|
|
370
|
+
wf_data[s:s+2] = sample.to_bytes(2, 'little', signed=True)
|
|
371
|
+
for i in range(fade_out_len):
|
|
372
|
+
gain = 1.0 - i / fade_out_len
|
|
373
|
+
s = (write_samples - 1 - i) * 2
|
|
374
|
+
if s < 0:
|
|
375
|
+
break
|
|
376
|
+
sample = int.from_bytes(wf_data[s:s+2], 'little', signed=True)
|
|
377
|
+
sample = int(sample * gain)
|
|
378
|
+
wf_data[s:s+2] = sample.to_bytes(2, 'little', signed=True)
|
|
379
|
+
|
|
380
|
+
# Persist the exact complete per-beat PCM used by the canonical mix. Editable
|
|
381
|
+
# exports must reference this file, not the longer pre-fit TTS input; otherwise
|
|
382
|
+
# their timeline_end silently chops the final word even when ffmpeg is correct.
|
|
383
|
+
placed_path = Path(work_dir) / f"_placed_{seg['index']:04d}.wav"
|
|
384
|
+
with wave.open(str(placed_path), "wb") as placed_wav:
|
|
385
|
+
placed_wav.setnchannels(1)
|
|
386
|
+
placed_wav.setsampwidth(2)
|
|
387
|
+
placed_wav.setframerate(sample_rate)
|
|
388
|
+
placed_wav.writeframes(bytes(wf_data))
|
|
389
|
+
seg["placed_audio_path"] = str(placed_path)
|
|
390
|
+
|
|
391
|
+
buffer[actual_start * 2: actual_start * 2 + write_samples * 2] = wf_data
|
|
392
|
+
seg["actual_place_start"] = actual_start / sample_rate
|
|
393
|
+
seg["actual_place_end"] = (actual_start + write_samples) / sample_rate
|
|
394
|
+
seg["placed_audio_duration"] = write_samples / sample_rate
|
|
395
|
+
last_written_end = actual_start + write_samples
|
|
396
|
+
prev_pause_samples = pause_samples
|
|
397
|
+
placed_count += 1
|
|
398
|
+
|
|
399
|
+
with wave.open(str(output_wav), "wb") as wf:
|
|
400
|
+
wf.setnchannels(1)
|
|
401
|
+
wf.setsampwidth(2)
|
|
402
|
+
wf.setframerate(sample_rate)
|
|
403
|
+
wf.writeframes(bytes(buffer))
|
|
404
|
+
|
|
405
|
+
if tts_segments and placed_count == 0 and no_safe_fit_count == 0:
|
|
406
|
+
output_wav.unlink(missing_ok=True)
|
|
407
|
+
raise RuntimeError(
|
|
408
|
+
f"全部 {len(tts_segments)} 段解说均被跳过或未能写入"
|
|
409
|
+
f"(WAV 缺失或无可用时间;跳过 {skipped_count} 段),"
|
|
410
|
+
"已中止以避免生成无解说视频"
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
log(f"解说音轨: {video_duration:.1f}s, {len(tts_segments)} 段")
|