@oh-story/dsh 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +38 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +1201 -0
- package/lib/client.js.map +7 -0
- package/lib/drama/LICENSE.upstream +21 -0
- package/lib/drama/manifest.json +1012 -0
- package/lib/drama/skills/short-drama/SKILL.md +153 -0
- package/lib/drama/skills/short-drama/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama/assets/creator-decision.example.jsonl +4 -0
- package/lib/drama/skills/short-drama/assets/production-observation.example.jsonl +2 -0
- package/lib/drama/skills/short-drama/assets/project-template/short-drama.json +36 -0
- package/lib/drama/skills/short-drama/assets/reference-observation.example.jsonl +2 -0
- package/lib/drama/skills/short-drama/references/audience-reveal.md +74 -0
- package/lib/drama/skills/short-drama/references/contract-and-ownership.md +94 -0
- package/lib/drama/skills/short-drama/references/creator-workflow.md +82 -0
- package/lib/drama/skills/short-drama/references/form-cards/Q/347/211/210/350/241/250/350/276/276.md +73 -0
- package/lib/drama/skills/short-drama/references/form-cards//344/272/214/347/273/264/345/212/250/346/200/201/346/274/253.md +74 -0
- package/lib/drama/skills/short-drama/references/form-cards//345/233/275/346/274/253/344/272/214/346/254/241/345/205/203.md +79 -0
- package/lib/drama/skills/short-drama/references/form-cards//345/256/236/346/213/215.md +75 -0
- package/lib/drama/skills/short-drama/references/form-cards//346/260/264/345/242/250/347/254/224/350/247/246.md +85 -0
- package/lib/drama/skills/short-drama/references/form-cards//351/243/216/346/240/274/345/214/226/344/270/211/347/273/264.md +72 -0
- package/lib/drama/skills/short-drama/references/knowhow-index.md +80 -0
- package/lib/drama/skills/short-drama/references/lifecycle-commands.md +130 -0
- package/lib/drama/skills/short-drama/references/look-development.md +52 -0
- package/lib/drama/skills/short-drama/references/pickup-and-alternate.md +58 -0
- package/lib/drama/skills/short-drama/references/production-form-profiles.md +126 -0
- package/lib/drama/skills/short-drama/references/reference-roles.md +142 -0
- package/lib/drama/skills/short-drama/references/runtime-preflight.md +27 -0
- package/lib/drama/skills/short-drama/scripts/project_tool.py +1963 -0
- package/lib/drama/skills/short-drama/scripts/selftest.py +287 -0
- package/lib/drama/skills/short-drama-assets/SKILL.md +187 -0
- package/lib/drama/skills/short-drama-assets/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-assets/assets/character-look.example.jsonl +3 -0
- package/lib/drama/skills/short-drama-assets/assets/continuity.example.jsonl +4 -0
- package/lib/drama/skills/short-drama-assets/assets/decisions.example.jsonl +5 -0
- package/lib/drama/skills/short-drama-assets/assets/location-view.example.jsonl +3 -0
- package/lib/drama/skills/short-drama-assets/assets/occurrences.example.jsonl +5 -0
- package/lib/drama/skills/short-drama-assets/assets/prop-state.example.jsonl +3 -0
- package/lib/drama/skills/short-drama-assets/examples/minimal/characters.jsonl +2 -0
- package/lib/drama/skills/short-drama-assets/examples/minimal/looks.jsonl +2 -0
- package/lib/drama/skills/short-drama-assets/references/asset-review-checklist.md +89 -0
- package/lib/drama/skills/short-drama-assets/references/character-and-look.md +164 -0
- package/lib/drama/skills/short-drama-assets/references/continuity-delta.md +123 -0
- package/lib/drama/skills/short-drama-assets/references/identity-vs-variant.md +146 -0
- package/lib/drama/skills/short-drama-assets/references/location-and-view.md +84 -0
- package/lib/drama/skills/short-drama-assets/references/occurrence-extraction.md +111 -0
- package/lib/drama/skills/short-drama-assets/references/prop-and-state.md +107 -0
- package/lib/drama/skills/short-drama-assets/references/stage-contract.md +136 -0
- package/lib/drama/skills/short-drama-assets/references/voice-direction.md +171 -0
- package/lib/drama/skills/short-drama-assets/scripts/asset_check.py +267 -0
- package/lib/drama/skills/short-drama-assets/scripts/selftest.py +89 -0
- package/lib/drama/skills/short-drama-develop/SKILL.md +157 -0
- package/lib/drama/skills/short-drama-develop/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-develop/assets/adaptation-map.example.jsonl +1 -0
- package/lib/drama/skills/short-drama-develop/assets/creative-brief.md +120 -0
- package/lib/drama/skills/short-drama-develop/assets/episode-map.jsonl +1 -0
- package/lib/drama/skills/short-drama-develop/assets/story-engine.md +181 -0
- package/lib/drama/skills/short-drama-develop/references/adaptation-craft.md +219 -0
- package/lib/drama/skills/short-drama-develop/references/creative-reference-intake.md +57 -0
- package/lib/drama/skills/short-drama-develop/references/director-brief-craft.md +113 -0
- package/lib/drama/skills/short-drama-develop/references/episode-design.md +509 -0
- package/lib/drama/skills/short-drama-develop/references/genre-and-hook-playbook.md +240 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//344/272/262/345/255/220/351/232/220/347/247/230.md +112 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//344/273/231/344/276/240/344/277/256/347/234/237.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//345/212/250/344/275/234/344/273/273/345/212/241.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//345/217/244/350/243/205/346/235/203/350/260/213.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//345/244/215/344/273/207/346/211/223/350/204/270.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//345/256/266/345/272/255/345/205/263/347/263/273.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//346/202/254/347/226/221/350/247/204/345/210/231.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//347/224/237/346/264/273/346/265/201.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//347/240/264/351/225/234/351/207/215/345/234/206.md +109 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//350/201/214/345/234/272/345/226/234/345/211/247.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//350/261/252/351/227/250/345/251/232/346/201/213.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards//350/272/253/344/273/275/351/224/231/344/275/215.md +51 -0
- package/lib/drama/skills/short-drama-develop/references/genre-cards.md +92 -0
- package/lib/drama/skills/short-drama-develop/references/mechanism-loop.md +282 -0
- package/lib/drama/skills/short-drama-develop/references/multi-episode-intake.md +128 -0
- package/lib/drama/skills/short-drama-develop/references/premise-devices.md +211 -0
- package/lib/drama/skills/short-drama-develop/references/reveal-reversal-payoff.md +99 -0
- package/lib/drama/skills/short-drama-develop/references/serial-character-and-memory.md +293 -0
- package/lib/drama/skills/short-drama-develop/references/stage-contract.md +88 -0
- package/lib/drama/skills/short-drama-develop/references/story-craft.md +359 -0
- package/lib/drama/skills/short-drama-develop/scripts/episode_intake.py +699 -0
- package/lib/drama/skills/short-drama-develop/scripts/selftest.py +47 -0
- package/lib/drama/skills/short-drama-image-prompts/SKILL.md +181 -0
- package/lib/drama/skills/short-drama-image-prompts/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-image-prompts/assets/image-prompt-spec.jsonl.md +187 -0
- package/lib/drama/skills/short-drama-image-prompts/assets/image-prompts.md +37 -0
- package/lib/drama/skills/short-drama-image-prompts/assets/lookdev-frame-spec.jsonl.md +128 -0
- package/lib/drama/skills/short-drama-image-prompts/assets/lookdev-prompts.md +31 -0
- package/lib/drama/skills/short-drama-image-prompts/examples/minimal-image-prompt-specs.jsonl +2 -0
- package/lib/drama/skills/short-drama-image-prompts/references/character-and-look.md +154 -0
- package/lib/drama/skills/short-drama-image-prompts/references/common-recipe.md +231 -0
- package/lib/drama/skills/short-drama-image-prompts/references/edit-and-revision.md +122 -0
- package/lib/drama/skills/short-drama-image-prompts/references/location-plate.md +152 -0
- package/lib/drama/skills/short-drama-image-prompts/references/look-and-state-variant.md +96 -0
- package/lib/drama/skills/short-drama-image-prompts/references/lookdev-frame.md +38 -0
- package/lib/drama/skills/short-drama-image-prompts/references/production-sheet-recipes.md +177 -0
- package/lib/drama/skills/short-drama-image-prompts/references/prop-plate.md +140 -0
- package/lib/drama/skills/short-drama-image-prompts/references/review-and-fixtures.md +92 -0
- package/lib/drama/skills/short-drama-image-prompts/references/stage-contract.md +89 -0
- package/lib/drama/skills/short-drama-image-prompts/scripts/image_prompt_check.py +443 -0
- package/lib/drama/skills/short-drama-image-prompts/scripts/selftest.py +93 -0
- package/lib/drama/skills/short-drama-novel-analyze/SKILL.md +245 -0
- package/lib/drama/skills/short-drama-novel-analyze/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-novel-analyze/assets/episode-candidate.example.jsonl +3 -0
- package/lib/drama/skills/short-drama-novel-analyze/references/adaptation-triage.md +116 -0
- package/lib/drama/skills/short-drama-novel-analyze/references/adaptation-value.md +124 -0
- package/lib/drama/skills/short-drama-novel-analyze/references/aggregation-and-entities.md +155 -0
- package/lib/drama/skills/short-drama-novel-analyze/references/chapter-extraction.md +141 -0
- package/lib/drama/skills/short-drama-novel-analyze/references/stage-contract.md +67 -0
- package/lib/drama/skills/short-drama-novel-analyze/scripts/novel_index.py +651 -0
- package/lib/drama/skills/short-drama-novel-analyze/scripts/selftest.py +51 -0
- package/lib/drama/skills/short-drama-produce/SKILL.md +103 -0
- package/lib/drama/skills/short-drama-produce/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-produce/references/adapter-contract.md +140 -0
- package/lib/drama/skills/short-drama-produce/references/providers/gpt-image-2.md +24 -0
- package/lib/drama/skills/short-drama-produce/references/providers/minimax-music.md +25 -0
- package/lib/drama/skills/short-drama-produce/references/providers/seedance.md +40 -0
- package/lib/drama/skills/short-drama-produce/scripts/fixture_adapter.py +60 -0
- package/lib/drama/skills/short-drama-produce/scripts/production_tool.py +1635 -0
- package/lib/drama/skills/short-drama-produce/scripts/provider_adapters.py +964 -0
- package/lib/drama/skills/short-drama-produce/scripts/selftest.py +134 -0
- package/lib/drama/skills/short-drama-review/SKILL.md +178 -0
- package/lib/drama/skills/short-drama-review/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-review/assets/finding-template.jsonl +2 -0
- package/lib/drama/skills/short-drama-review/assets/supersession-decision.example.json +42 -0
- package/lib/drama/skills/short-drama-review/assets/verdict-template.json +32 -0
- package/lib/drama/skills/short-drama-review/examples/minimal-findings.jsonl +2 -0
- package/lib/drama/skills/short-drama-review/examples/minimal-verdict.json +34 -0
- package/lib/drama/skills/short-drama-review/references/anti-template-repair.md +114 -0
- package/lib/drama/skills/short-drama-review/references/production-quality-gates.md +270 -0
- package/lib/drama/skills/short-drama-review/references/project-calibration.md +85 -0
- package/lib/drama/skills/short-drama-review/references/review-method.md +82 -0
- package/lib/drama/skills/short-drama-review/references/rubric-assets-prompts.md +115 -0
- package/lib/drama/skills/short-drama-review/references/rubric-source-analysis.md +108 -0
- package/lib/drama/skills/short-drama-review/references/rubric-story-script.md +164 -0
- package/lib/drama/skills/short-drama-review/references/rubric-visual-motion.md +166 -0
- package/lib/drama/skills/short-drama-review/references/stage-contract.md +87 -0
- package/lib/drama/skills/short-drama-review/scripts/review_check.py +325 -0
- package/lib/drama/skills/short-drama-review/scripts/selftest.py +87 -0
- package/lib/drama/skills/short-drama-storyboard/SKILL.md +264 -0
- package/lib/drama/skills/short-drama-storyboard/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-storyboard/assets/coverage-audition.example.jsonl +2 -0
- package/lib/drama/skills/short-drama-storyboard/assets/coverage-template.json +49 -0
- package/lib/drama/skills/short-drama-storyboard/assets/keyframe-prompts.md +32 -0
- package/lib/drama/skills/short-drama-storyboard/assets/keyframe-template.jsonl +2 -0
- package/lib/drama/skills/short-drama-storyboard/assets/revision-lineage.fragment.json +12 -0
- package/lib/drama/skills/short-drama-storyboard/assets/scene-visual-plan.example.jsonl +2 -0
- package/lib/drama/skills/short-drama-storyboard/assets/shot-template.jsonl +2 -0
- package/lib/drama/skills/short-drama-storyboard/references/blocking-playbooks.md +241 -0
- package/lib/drama/skills/short-drama-storyboard/references/coverage-audition.md +39 -0
- package/lib/drama/skills/short-drama-storyboard/references/keyframe-craft.md +169 -0
- package/lib/drama/skills/short-drama-storyboard/references/production-shot-grammar.md +264 -0
- package/lib/drama/skills/short-drama-storyboard/references/review-and-fixtures.md +70 -0
- package/lib/drama/skills/short-drama-storyboard/references/scene-visual-plan.md +39 -0
- package/lib/drama/skills/short-drama-storyboard/references/screenplay-to-keyframe-example.md +157 -0
- package/lib/drama/skills/short-drama-storyboard/references/shot-craft.md +192 -0
- package/lib/drama/skills/short-drama-storyboard/references/shot-revision-identity.md +29 -0
- package/lib/drama/skills/short-drama-storyboard/references/stage-contract.md +110 -0
- package/lib/drama/skills/short-drama-storyboard/scripts/selftest.py +191 -0
- package/lib/drama/skills/short-drama-storyboard/scripts/storyboard_check.py +824 -0
- package/lib/drama/skills/short-drama-video-prompts/SKILL.md +245 -0
- package/lib/drama/skills/short-drama-video-prompts/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-video-prompts/assets/coverage-scope.fragment.json +21 -0
- package/lib/drama/skills/short-drama-video-prompts/assets/delivery-container.jsonl.md +101 -0
- package/lib/drama/skills/short-drama-video-prompts/assets/motion-spec.jsonl.md +212 -0
- package/lib/drama/skills/short-drama-video-prompts/assets/motion-terminal.example.jsonl +2 -0
- package/lib/drama/skills/short-drama-video-prompts/assets/music-spec.jsonl.md +31 -0
- package/lib/drama/skills/short-drama-video-prompts/assets/performance.fragment.json +38 -0
- package/lib/drama/skills/short-drama-video-prompts/assets/video-prompts.md +46 -0
- package/lib/drama/skills/short-drama-video-prompts/examples/minimal-music-specs.jsonl +2 -0
- package/lib/drama/skills/short-drama-video-prompts/references/camera-audio-continuity.md +240 -0
- package/lib/drama/skills/short-drama-video-prompts/references/delivery-profile.md +255 -0
- package/lib/drama/skills/short-drama-video-prompts/references/generability.md +93 -0
- package/lib/drama/skills/short-drama-video-prompts/references/motion-recipe.md +304 -0
- package/lib/drama/skills/short-drama-video-prompts/references/performance-action-timing.md +191 -0
- package/lib/drama/skills/short-drama-video-prompts/references/production-prompt-grammar.md +312 -0
- package/lib/drama/skills/short-drama-video-prompts/references/review-and-fixtures.md +168 -0
- package/lib/drama/skills/short-drama-video-prompts/references/stage-contract.md +110 -0
- package/lib/drama/skills/short-drama-video-prompts/scripts/container_check.py +329 -0
- package/lib/drama/skills/short-drama-video-prompts/scripts/motion_timing_check.py +450 -0
- package/lib/drama/skills/short-drama-video-prompts/scripts/music_spec_check.py +327 -0
- package/lib/drama/skills/short-drama-video-prompts/scripts/selftest.py +82 -0
- package/lib/drama/skills/short-drama-write/SKILL.md +284 -0
- package/lib/drama/skills/short-drama-write/agents/openai.yaml +4 -0
- package/lib/drama/skills/short-drama-write/assets/beats.jsonl +2 -0
- package/lib/drama/skills/short-drama-write/assets/episode-card-standalone.json +120 -0
- package/lib/drama/skills/short-drama-write/assets/episode-card.json +55 -0
- package/lib/drama/skills/short-drama-write/assets/screenplay.md +36 -0
- package/lib/drama/skills/short-drama-write/assets/voice-record-sheet.jsonl.md +89 -0
- package/lib/drama/skills/short-drama-write/references/dialogue-craft.md +519 -0
- package/lib/drama/skills/short-drama-write/references/production-format-dialect.md +273 -0
- package/lib/drama/skills/short-drama-write/references/scene-handoff-capsule.md +51 -0
- package/lib/drama/skills/short-drama-write/references/scene-sound-dramaturgy.md +43 -0
- package/lib/drama/skills/short-drama-write/references/screenplay-format.md +260 -0
- package/lib/drama/skills/short-drama-write/references/script-craft.md +558 -0
- package/lib/drama/skills/short-drama-write/references/stage-contract.md +94 -0
- package/lib/drama/skills/short-drama-write/references/substitutable-realization.md +107 -0
- package/lib/drama/skills/short-drama-write/scripts/duration_estimate.py +309 -0
- package/lib/drama/skills/short-drama-write/scripts/screenplay_index.py +1091 -0
- package/lib/drama/skills/short-drama-write/scripts/selftest.py +229 -0
- package/lib/drama/skills/short-drama-write/scripts/voice_sheet_check.py +416 -0
- package/lib/index.js +756 -0
- package/lib/index.js.map +7 -0
- package/lib/oh-story/LICENSE.upstream +21 -0
- package/lib/oh-story/manifest.json +1351 -0
- package/lib/oh-story/roles/chapter-extractor.md +314 -0
- package/lib/oh-story/roles/character-designer.md +169 -0
- package/lib/oh-story/roles/consistency-checker.md +190 -0
- package/lib/oh-story/roles/narrative-writer.md +294 -0
- package/lib/oh-story/roles/story-architect.md +195 -0
- package/lib/oh-story/roles/story-explorer.md +364 -0
- package/lib/oh-story/roles/story-researcher.md +304 -0
- package/lib/oh-story/skills/browser-cdp/SKILL.md +175 -0
- package/lib/oh-story/skills/story/SKILL.md +116 -0
- package/lib/oh-story/skills/story/VERSION +1 -0
- package/lib/oh-story/skills/story-cover/SKILL.md +327 -0
- package/lib/oh-story/skills/story-cover/references/cover-styles.md +210 -0
- package/lib/oh-story/skills/story-deslop/SKILL.md +445 -0
- package/lib/oh-story/skills/story-deslop/references/anti-ai-writing.md +582 -0
- package/lib/oh-story/skills/story-deslop/references/banned-words.md +147 -0
- package/lib/oh-story/skills/story-deslop/scripts/check-ai-patterns.js +1371 -0
- package/lib/oh-story/skills/story-deslop/scripts/check-degeneration.js +330 -0
- package/lib/oh-story/skills/story-deslop/scripts/check-outline-copy.js +241 -0
- package/lib/oh-story/skills/story-deslop/scripts/normalize-punctuation.js +410 -0
- package/lib/oh-story/skills/story-import/SKILL.md +634 -0
- package/lib/oh-story/skills/story-import/references/character-state-reverse.md +82 -0
- package/lib/oh-story/skills/story-import/references/format-and-structure.md +169 -0
- package/lib/oh-story/skills/story-import/references/length-routing.md +134 -0
- package/lib/oh-story/skills/story-import/references/state-tracking.md +108 -0
- package/lib/oh-story/skills/story-import/references/structure-mapping-long.md +442 -0
- package/lib/oh-story/skills/story-import/references/structure-mapping-short.md +175 -0
- package/lib/oh-story/skills/story-import/references/tracking-transaction.md +161 -0
- package/lib/oh-story/skills/story-import/scripts/tracking_commit.py +1139 -0
- package/lib/oh-story/skills/story-long-analyze/SKILL.md +329 -0
- package/lib/oh-story/skills/story-long-analyze/references/deconstruction-notes.md +270 -0
- package/lib/oh-story/skills/story-long-analyze/references/material-decomposition.md +530 -0
- package/lib/oh-story/skills/story-long-analyze/references/output-templates.md +559 -0
- package/lib/oh-story/skills/story-long-analyze/references/pipeline-ops.md +80 -0
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-generator.md +149 -0
- package/lib/oh-story/skills/story-long-analyze/references/style-profile-protocol.md +133 -0
- package/lib/oh-story/skills/story-long-scan/SKILL.md +342 -0
- package/lib/oh-story/skills/story-long-scan/references/genre-trends.md +197 -0
- package/lib/oh-story/skills/story-long-scan/references/publishing-guide.md +114 -0
- package/lib/oh-story/skills/story-long-scan/references/reader-profiling.md +105 -0
- package/lib/oh-story/skills/story-long-scan/references/scan-output-format.md +207 -0
- package/lib/oh-story/skills/story-long-scan/references/topic-decision.md +78 -0
- package/lib/oh-story/skills/story-long-write/SKILL.md +327 -0
- package/lib/oh-story/skills/story-long-write/references/anti-ai-writing.md +582 -0
- package/lib/oh-story/skills/story-long-write/references/artifact-protocols.md +302 -0
- package/lib/oh-story/skills/story-long-write/references/banned-words.md +147 -0
- package/lib/oh-story/skills/story-long-write/references/character-basics.md +445 -0
- package/lib/oh-story/skills/story-long-write/references/character-design-methods.md +428 -0
- package/lib/oh-story/skills/story-long-write/references/character-relations.md +385 -0
- package/lib/oh-story/skills/story-long-write/references/commercial-core-methods.md +502 -0
- package/lib/oh-story/skills/story-long-write/references/cross-book-recall.md +62 -0
- package/lib/oh-story/skills/story-long-write/references/dialogue-mastery.md +282 -0
- package/lib/oh-story/skills/story-long-write/references/emotional-arc-design.md +426 -0
- package/lib/oh-story/skills/story-long-write/references/emotional-methods.md +209 -0
- package/lib/oh-story/skills/story-long-write/references/female-audience-writing.md +188 -0
- package/lib/oh-story/skills/story-long-write/references/format-and-structure.md +169 -0
- package/lib/oh-story/skills/story-long-write/references/genre-catalog.md +480 -0
- package/lib/oh-story/skills/story-long-write/references/genre-core-mechanics.md +415 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//344/270/234/346/226/271/344/273/231/344/276/240.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//344/274/240/347/273/237/347/216/204/345/271/273.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/345/217/244/344/273/243.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/216/206/345/217/262/350/204/221/346/264/236.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/217/244/350/250/200/350/204/221/346/264/236.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/217/244/351/243/216/344/270/226/346/203/205.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/346/202/254/347/226/221.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/245/263/351/242/221/347/247/215/347/224/260.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/256/253/346/226/227/345/256/205/346/226/227.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/347/201/265/345/274/202.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//346/202/254/347/226/221/350/204/221/346/264/236.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//346/210/230/347/245/236/350/265/230/345/251/277.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//346/212/227/346/210/230/350/260/215/346/210/230.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//346/230/237/345/205/211/347/222/200/347/222/250.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//346/260/221/345/233/275/350/250/200/346/203/205.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//346/270/270/346/210/217/344/275/223/350/202/262.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/204/221/346/264/236.md +53 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//347/216/204/345/271/273/350/250/200/346/203/205.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//347/216/260/350/250/200/350/204/221/346/264/236.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//347/247/221/345/271/273/346/234/253/344/270/226.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//350/201/214/345/234/272/345/251/232/346/201/213.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//350/245/277/346/226/271/345/245/207/345/271/273.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//350/261/252/351/227/250/346/200/273/350/243/201.md +53 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/344/277/256/347/234/237.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/346/227/245/345/270/270.md +53 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/347/247/215/347/224/260.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/350/204/221/346/264/236.md +53 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//351/203/275/345/270/202/351/253/230/346/255/246.md +53 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards//351/235/222/346/230/245/347/224/234/345/256/240.md +51 -0
- package/lib/oh-story/skills/story-long-write/references/genre-prose-cards.md +91 -0
- package/lib/oh-story/skills/story-long-write/references/genre-readers.md +235 -0
- package/lib/oh-story/skills/story-long-write/references/genre-writing-formulas.md +444 -0
- package/lib/oh-story/skills/story-long-write/references/hooks-chapter.md +225 -0
- package/lib/oh-story/skills/story-long-write/references/hooks-paragraph.md +146 -0
- package/lib/oh-story/skills/story-long-write/references/hooks-suspense.md +352 -0
- package/lib/oh-story/skills/story-long-write/references/opening-design.md +349 -0
- package/lib/oh-story/skills/story-long-write/references/outline-conflict.md +457 -0
- package/lib/oh-story/skills/story-long-write/references/outline-methods.md +287 -0
- package/lib/oh-story/skills/story-long-write/references/outline-rhythm.md +389 -0
- package/lib/oh-story/skills/story-long-write/references/outline-structure-theory.md +326 -0
- package/lib/oh-story/skills/story-long-write/references/plot-core-methods.md +522 -0
- package/lib/oh-story/skills/story-long-write/references/plot-emotion-system.md +354 -0
- package/lib/oh-story/skills/story-long-write/references/plot-frameworks.md +711 -0
- package/lib/oh-story/skills/story-long-write/references/plot-special-topics.md +622 -0
- package/lib/oh-story/skills/story-long-write/references/quality-checklist.md +184 -0
- package/lib/oh-story/skills/story-long-write/references/reader-contract-and-progression.md +109 -0
- package/lib/oh-story/skills/story-long-write/references/reversal-toolkit.md +349 -0
- package/lib/oh-story/skills/story-long-write/references/state-tracking.md +108 -0
- package/lib/oh-story/skills/story-long-write/references/style-combat-face.md +409 -0
- package/lib/oh-story/skills/story-long-write/references/style-craft.md +347 -0
- package/lib/oh-story/skills/story-long-write/references/style-genre-modules.md +510 -0
- package/lib/oh-story/skills/story-long-write/references/tracking-transaction.md +161 -0
- package/lib/oh-story/skills/story-long-write/references/workflow-chapter.md +140 -0
- package/lib/oh-story/skills/story-long-write/references/workflow-daily.md +171 -0
- package/lib/oh-story/skills/story-long-write/references/workflow-revision.md +99 -0
- package/lib/oh-story/skills/story-long-write/references/workflow-setup.md +284 -0
- package/lib/oh-story/skills/story-long-write/references/writing-craft.md +421 -0
- package/lib/oh-story/skills/story-long-write/scripts/check-ai-patterns.js +1371 -0
- package/lib/oh-story/skills/story-long-write/scripts/check-degeneration.js +330 -0
- package/lib/oh-story/skills/story-long-write/scripts/check-outline-copy.js +241 -0
- package/lib/oh-story/skills/story-long-write/scripts/normalize-punctuation.js +410 -0
- package/lib/oh-story/skills/story-long-write/scripts/tracking_commit.py +1139 -0
- package/lib/oh-story/skills/story-review/SKILL.md +483 -0
- package/lib/oh-story/skills/story-review/references/anti-ai-writing.md +582 -0
- package/lib/oh-story/skills/story-review/references/banned-words.md +147 -0
- package/lib/oh-story/skills/story-review/references/character-relations.md +385 -0
- package/lib/oh-story/skills/story-review/references/dialogue-mastery.md +282 -0
- package/lib/oh-story/skills/story-review/references/plot-core-methods.md +522 -0
- package/lib/oh-story/skills/story-review/references/quality-checklist.md +250 -0
- package/lib/oh-story/skills/story-review/references/quality-rubric.md +55 -0
- package/lib/oh-story/skills/story-review/references/rubrics/fanqie.md +18 -0
- package/lib/oh-story/skills/story-review/references/rubrics/qidian.md +19 -0
- package/lib/oh-story/skills/story-review/references/rubrics/zhihu.md +20 -0
- package/lib/oh-story/skills/story-review/references/tracking-transaction.md +161 -0
- package/lib/oh-story/skills/story-review/scripts/check-ai-patterns.js +1371 -0
- package/lib/oh-story/skills/story-review/scripts/check-degeneration.js +330 -0
- package/lib/oh-story/skills/story-review/scripts/normalize-punctuation.js +410 -0
- package/lib/oh-story/skills/story-review/scripts/tracking_commit.py +1139 -0
- package/lib/oh-story/skills/story-setup/SKILL.md +495 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/anti-ai-writing.md +582 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/banned-words.md +147 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/character-basics.md +445 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/character-design-methods.md +428 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/character-relations.md +385 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/dialogue-mastery.md +282 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/emotional-arc-design.md +426 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/emotional-methods.md +179 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/format-and-structure.md +169 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/genre-catalog.md +480 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/genre-core-mechanics.md +415 -0
- package/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/skills/story-setup/references/agent-references/genre-prose-cards//345/217/214/347/224/267/344/270/273.md +53 -0
- package/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/skills/story-setup/references/agent-references/genre-prose-cards//345/271/264/344/273/243.md +53 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/genre-prose-cards//345/277/253/347/251/277.md +51 -0
- package/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/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/lib/oh-story/skills/story-setup/references/agent-references/genre-prose-cards.md +91 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/genre-readers.md +235 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/genre-writing-formulas.md +444 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/hooks-chapter.md +225 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/hooks-suspense.md +352 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/opening-design.md +349 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-conflict.md +457 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-methods.md +287 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/outline-rhythm.md +389 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/plot-core-methods.md +522 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/quality-checklist.md +247 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/reversal-toolkit.md +349 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/style-combat-face.md +409 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/style-genre-modules.md +510 -0
- package/lib/oh-story/skills/story-setup/references/agent-references/writing-craft.md +421 -0
- package/lib/oh-story/skills/story-short-analyze/SKILL.md +278 -0
- package/lib/oh-story/skills/story-short-analyze/references/anti-ai-writing.md +582 -0
- package/lib/oh-story/skills/story-short-analyze/references/banned-words.md +147 -0
- package/lib/oh-story/skills/story-short-analyze/references/character-basics.md +453 -0
- package/lib/oh-story/skills/story-short-analyze/references/character-design-methods.md +438 -0
- package/lib/oh-story/skills/story-short-analyze/references/character-relations.md +395 -0
- package/lib/oh-story/skills/story-short-analyze/references/deconstruction-examples.md +79 -0
- package/lib/oh-story/skills/story-short-analyze/references/genre-catalog.md +490 -0
- package/lib/oh-story/skills/story-short-analyze/references/genre-core-mechanics.md +425 -0
- package/lib/oh-story/skills/story-short-analyze/references/genre-readers.md +245 -0
- package/lib/oh-story/skills/story-short-analyze/references/genre-writing-formulas.md +453 -0
- package/lib/oh-story/skills/story-short-analyze/references/genre-writing-techniques.md +475 -0
- package/lib/oh-story/skills/story-short-analyze/references/hooks-chapter.md +225 -0
- package/lib/oh-story/skills/story-short-analyze/references/hooks-paragraph.md +146 -0
- package/lib/oh-story/skills/story-short-analyze/references/hooks-suspense.md +352 -0
- package/lib/oh-story/skills/story-short-analyze/references/material-decomposition.md +685 -0
- package/lib/oh-story/skills/story-short-analyze/references/output-contract.md +165 -0
- package/lib/oh-story/skills/story-short-analyze/references/output-templates.md +561 -0
- package/lib/oh-story/skills/story-short-analyze/references/quality-checklist.md +242 -0
- package/lib/oh-story/skills/story-short-analyze/references/real-market-data.md +90 -0
- package/lib/oh-story/skills/story-short-analyze/references/zhihu-style.md +54 -0
- package/lib/oh-story/skills/story-short-scan/SKILL.md +212 -0
- package/lib/oh-story/skills/story-short-scan/references/real-market-data.md +90 -0
- package/lib/oh-story/skills/story-short-write/SKILL.md +433 -0
- package/lib/oh-story/skills/story-short-write/references/banned-words.md +147 -0
- package/lib/oh-story/skills/story-short-write/references/cross-book-recall.md +62 -0
- package/lib/oh-story/skills/story-short-write/references/dialogue-mastery.md +282 -0
- package/lib/oh-story/skills/story-short-write/references/emotional-methods.md +179 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//344/270/226/346/203/205/346/211/223/350/204/270.md +159 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/217/214/347/224/267/344/270/273.md +156 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/244/215/344/273/207/346/211/223/350/204/270.md +163 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//345/256/205/346/226/227/345/256/253/346/226/227.md +167 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/200/273/350/243/201/350/261/252/351/227/250.md +178 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/202/254/347/226/221.md +166 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/260/221/344/277/227/346/200/252/350/260/210.md +159 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//346/262/231/351/233/225/350/204/221/346/264/236.md +151 -0
- package/lib/oh-story/skills/story-short-write/references/genre-styles//347/224/234/345/256/240.md +153 -0
- package/lib/oh-story/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/lib/oh-story/skills/story-short-write/references/genre-writing-formulas.md +444 -0
- package/lib/oh-story/skills/story-short-write/references/genre-writing-techniques.md +488 -0
- package/lib/oh-story/skills/story-short-write/references/hooks-chapter.md +225 -0
- package/lib/oh-story/skills/story-short-write/references/hooks-paragraph.md +146 -0
- package/lib/oh-story/skills/story-short-write/references/hooks-suspense.md +352 -0
- package/lib/oh-story/skills/story-short-write/references/output-contract.md +165 -0
- package/lib/oh-story/skills/story-short-write/references/quality-checklist.md +222 -0
- package/lib/oh-story/skills/story-short-write/references/reversal-toolkit.md +349 -0
- package/lib/oh-story/skills/story-short-write/references/short-craft.md +185 -0
- package/lib/oh-story/skills/story-short-write/references/short-deslop.md +133 -0
- package/lib/oh-story/skills/story-short-write/references/short-format.md +167 -0
- package/lib/oh-story/skills/story-short-write/references/submission-craft.md +35 -0
- package/lib/oh-story/skills/story-short-write/references/villain-and-reveal.md +158 -0
- package/lib/oh-story/skills/story-short-write/references/writing-workflow.md +153 -0
- package/lib/oh-story/skills/story-short-write/scripts/check-ai-patterns.js +1371 -0
- package/lib/oh-story/skills/story-short-write/scripts/check-degeneration.js +330 -0
- package/lib/oh-story/skills/story-short-write/scripts/check-outline-copy.js +241 -0
- package/lib/oh-story/skills/story-short-write/scripts/normalize-punctuation.js +410 -0
- package/lib/types/client/file-activity.d.ts +30 -0
- package/lib/types/client/file-activity.d.ts.map +1 -0
- package/lib/types/client/file-tree.d.ts +20 -0
- package/lib/types/client/file-tree.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +12 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/jsonl-preview.d.ts +15 -0
- package/lib/types/client/jsonl-preview.d.ts.map +1 -0
- package/lib/types/client/markdown-preview.d.ts +38 -0
- package/lib/types/client/markdown-preview.d.ts.map +1 -0
- package/lib/types/index.d.ts +25 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/native-hooks.d.ts +16 -0
- package/lib/types/native-hooks.d.ts.map +1 -0
- package/lib/types/role-provider.d.ts +6 -0
- package/lib/types/role-provider.d.ts.map +1 -0
- package/lib/types/role-tool.d.ts +10 -0
- package/lib/types/role-tool.d.ts.map +1 -0
- package/lib/types/skill-provider.d.ts +15 -0
- package/lib/types/skill-provider.d.ts.map +1 -0
- package/lib/types/workspace-request-trust.d.ts +13 -0
- package/lib/types/workspace-request-trust.d.ts.map +1 -0
- package/lib/types/workspace-route.d.ts +10 -0
- package/lib/types/workspace-route.d.ts.map +1 -0
- package/lib/types/workspace-security.d.ts +9 -0
- package/lib/types/workspace-security.d.ts.map +1 -0
- package/package.json +107 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Offline self-test for the standalone novel index."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import json
|
|
7
|
+
import sys
|
|
8
|
+
import tempfile
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
from novel_index import build_index, sample_chapters, verify_index
|
|
12
|
+
|
|
13
|
+
MINIMUM_PYTHON = (3, 9)
|
|
14
|
+
if sys.version_info < MINIMUM_PYTHON:
|
|
15
|
+
raise SystemExit("selftest.py requires Python 3.9 or newer")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def require(condition: bool, message: str) -> None:
|
|
19
|
+
if not condition:
|
|
20
|
+
raise AssertionError(message)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def main() -> int:
|
|
24
|
+
with tempfile.TemporaryDirectory() as directory:
|
|
25
|
+
root = Path(directory)
|
|
26
|
+
source = root / "novel.txt"
|
|
27
|
+
index_path = root / "index.json"
|
|
28
|
+
source.write_text(
|
|
29
|
+
"第一章 起势\n"
|
|
30
|
+
+ "人物做出选择,代价随之发生,旧关系因此失衡,新的目标也被迫提前。" * 4
|
|
31
|
+
+ "\n第二章 反转\n"
|
|
32
|
+
+ "旧承诺被新的证据推翻,人物必须在名誉与家人之间付出不可逆的代价。" * 4
|
|
33
|
+
+ "\n",
|
|
34
|
+
encoding="utf-8",
|
|
35
|
+
)
|
|
36
|
+
index = build_index(source)
|
|
37
|
+
require(index["chapter_count"] == 2, "chapter count")
|
|
38
|
+
require(index["problems"] == [], "valid chapter index")
|
|
39
|
+
index_path.write_text(json.dumps(index, ensure_ascii=False), encoding="utf-8")
|
|
40
|
+
require(verify_index(index_path, source)["verified"] is True, "fresh index")
|
|
41
|
+
require(sample_chapters(index_path, 2)["sampled_count"] == 2, "sample count")
|
|
42
|
+
|
|
43
|
+
source.write_text(source.read_text(encoding="utf-8") + "变化\n", encoding="utf-8")
|
|
44
|
+
require(verify_index(index_path, source)["verified"] is False, "source drift")
|
|
45
|
+
|
|
46
|
+
print("5 self-tests passed")
|
|
47
|
+
return 0
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if __name__ == "__main__":
|
|
51
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: short-drama-produce
|
|
3
|
+
description: 在创作者明确确认后,执行短剧项目的图片、视频、TTS/配音或时间线音乐生产任务,并把结果与精简运行记录落回项目。用户说“生成这张图/这段视频/这句配音/这段配乐”“开始跑图/跑视频/合成语音/生成音乐”“把已确认提示词送去生产”,或要求批量执行已确认媒体任务时使用;不负责创作提示词、镜头、台词、歌词或声音身份,也绝不把预览、继续、预算说明或既有接受状态当作本次付费生产确认。
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 确认后生产
|
|
8
|
+
|
|
9
|
+
本技能只负责把已经写好的生产规格安全送到运行环境配置的 adapter。图片提示词仍归
|
|
10
|
+
`$short-drama-image-prompts`,视频提示词归 `$short-drama-video-prompts`,台词与录音表归
|
|
11
|
+
`$short-drama-write`,声音身份归 `$short-drama-assets`。
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
先离线验证确认闸门、fixture adapter 和供应商 payload 编译,不发起远端请求:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
python3 {技能目录}/scripts/selftest.py
|
|
19
|
+
python3 {技能目录}/scripts/provider_adapters.py --selftest
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 硬闸门
|
|
23
|
+
|
|
24
|
+
每次生产都必须经过以下四步,顺序不可合并:
|
|
25
|
+
|
|
26
|
+
1. 建立一个有边界的 job:一种 modality、明确数量、完整 prompt/spec、参考文件、参数、输出路径和 adapter profile。
|
|
27
|
+
2. 运行 `prepare`,把返回的完整预览展示给创作者,尤其是数量、prompt、references、outputs、
|
|
28
|
+
overwrite 与 adapter。
|
|
29
|
+
3. 等创作者在**看到这份预览之后**明确确认。只有明确同意这项当前任务,才运行 `confirm`;
|
|
30
|
+
“继续”“都做完”“预算没问题”、上游内容已接受或之前确认过另一版,都不算本次生产确认。
|
|
31
|
+
4. 运行 `run`。它会在启动 adapter 前消费一次确认;成功或失败后再次执行都必须重新确认,
|
|
32
|
+
防止失败重试意外产生第二笔费用。
|
|
33
|
+
|
|
34
|
+
job、prompt、参数、输出路径或直接输入任一变化,旧确认立即失效。不得代替创作者填写确认。
|
|
35
|
+
当前已确认 job 是本轮唯一工作单元;运行结束后回报结果并交还控制权,不自动准备下一批或启动审查。
|
|
36
|
+
|
|
37
|
+
## 命令
|
|
38
|
+
|
|
39
|
+
先把待执行任务写成 JSON;格式和 adapter 契约见
|
|
40
|
+
[adapter-contract.md](references/adapter-contract.md)。命令由
|
|
41
|
+
[production_tool.py](scripts/production_tool.py) 提供,然后运行:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
python3 <本技能目录>/scripts/production_tool.py prepare <project> --job <job.json>
|
|
45
|
+
python3 <本技能目录>/scripts/production_tool.py confirm <project> --job-id <id> --confirmation "CONFIRM <id> <code>"
|
|
46
|
+
python3 <本技能目录>/scripts/production_tool.py run <project> --job-id <id> --adapter-config <outside-project-config.json>
|
|
47
|
+
python3 <本技能目录>/scripts/production_tool.py status <project> --job-id <id>
|
|
48
|
+
python3 <本技能目录>/scripts/production_tool.py audit <project>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`prepare` 只验证并预览,不生产。`confirm` 只保存与当前 job 指纹绑定的一次性确认。
|
|
52
|
+
`run` 才启动 adapter。`audit` 只对账本地任务历史、失败后恢复、重复内容尝试和当前输出字节,
|
|
53
|
+
不会调用供应商,也不把技术成功、文件存在或哈希一致写成媒体质量结论。同一 job 存在未决
|
|
54
|
+
`running` attempt 时禁止重新 prepare、confirm 或 run;先等待完成或排查遗留 attempt。
|
|
55
|
+
|
|
56
|
+
## 输入选择
|
|
57
|
+
|
|
58
|
+
- **image**:读取当前图片 prompt/spec、必要参考图和明确的输出尺寸/数量。
|
|
59
|
+
- **video**:读取当前 motion spec、对应 shot/keyframe、必要首尾帧和时长/画幅。
|
|
60
|
+
- **tts**:读取当前录音表中的原句、说话人/声音参考和本句表演要求;不得在生产 job 中改词。
|
|
61
|
+
- **music**:读取已接受的时间线音乐规格;主题曲使用已确认歌词,纯配乐不携带歌词。供应商不能
|
|
62
|
+
精确承诺时长时,生成 source track 后仍由剪辑按 `mix_intent` 完成落点、循环、淡入淡出和对白 ducking。
|
|
63
|
+
|
|
64
|
+
一个 job 不混合 modality。大批量工作拆成创作者能看清数量和成本边界的小 job;不为方便把整季
|
|
65
|
+
隐式塞进一次确认。
|
|
66
|
+
|
|
67
|
+
## Adapter 边界
|
|
68
|
+
|
|
69
|
+
adapter 配置必须在项目外,只包含 argv 命令和超时;凭据由 adapter 自己从进程环境或系统凭据
|
|
70
|
+
存储读取。项目 job、确认记录、运行记录和 Dashboard 都不得保存密钥。
|
|
71
|
+
|
|
72
|
+
脚本以 JSON stdin 调用 argv 数组,不使用 shell,不拼接命令。adapter 返回本地临时文件;工具只
|
|
73
|
+
接受与已确认 targets 完全一致的结果,并把完整文件原子复制到项目的 `production/制作成果`
|
|
74
|
+
目录。项目和上游 Skill 不写死供应商、模型或即将变化的 API。
|
|
75
|
+
|
|
76
|
+
本技能可选提供三个 stdlib adapter,均通过项目外 adapter config 选择,凭据只从运行环境读取:
|
|
77
|
+
|
|
78
|
+
- [Seedance](references/providers/seedance.md):模型/Endpoint ID 必须由账号显式配置;内置 runtime
|
|
79
|
+
只承诺已验证的 text-to-video,未配置可信上传时本地参考图 fail closed。
|
|
80
|
+
- [GPT Image 2](references/providers/gpt-image-2.md):无参考图走 generation,有参考图走 edit;
|
|
81
|
+
固定高保真引用并校验尺寸、格式与透明背景限制。
|
|
82
|
+
- [MiniMax Music](references/providers/minimax-music.md):使用 `music-3.0` 与 hex 结果,区分主题曲
|
|
83
|
+
和纯配乐,不伪造时长请求字段。
|
|
84
|
+
|
|
85
|
+
这些 adapter 是已验证请求契约,不是账号可用性或生成质量保证;正式生产仍必须通过上面的本次
|
|
86
|
+
确认闸门,并由审查 Skill 判断产物质量。
|
|
87
|
+
|
|
88
|
+
仓库自带 `fixture_adapter.py` 只用于离线测试,不代表真实生成质量或默认生产 adapter。
|
|
89
|
+
|
|
90
|
+
## 结果与复核
|
|
91
|
+
|
|
92
|
+
成功后回报实际输出路径、媒体类型和运行状态;不要把“adapter 返回成功”写成质量结论。
|
|
93
|
+
多任务或重试后先运行 `audit`:终态失败按 `retryable` 路由,重试仍须新的明确确认;输出缺失或
|
|
94
|
+
文件的哈希或大小不再等于运行记录时,先复核当前字节或重新生产。`repeated_content` 只是成本与诊断信号,
|
|
95
|
+
不能自动判定同文重试合理或不合理;`running_attempt` 是未决运营状态,audit 必须返回 attention。
|
|
96
|
+
失败按三路走。超时、限流、服务端错误这类技术失败可做有上限重试。失败信息点名了被拒的是哪
|
|
97
|
+
一项输入——提示词文本、参考图或音频——就先改那一项再投:文本被拒改写那一句,把「一拳砸在
|
|
98
|
+
对方脸上,血顺着下巴滴」换成「一拳挥空,对方侧身避开,桌上的杯子被带倒」;参考图被拒换一张
|
|
99
|
+
构图与角色一致、画面本身合规的图;音频被拒重录那句台词。改动写进新的 job 重新 prepare,让创
|
|
100
|
+
作者在预览里看到改的是哪一项再确认;原样重投的那次确认不产生修复,只产生一笔费用。重复内容
|
|
101
|
+
缺陷回到对应 prompt/spec owner。
|
|
102
|
+
如需质量复核,报告可把已有结果另行交给 `$short-drama-review`;不要在生产调用中自动启动复核。
|
|
103
|
+
Dashboard 只负责展示这些文件和运行摘要,不提供 adapter 设置或生产按钮。
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Adapter Contract
|
|
2
|
+
|
|
3
|
+
## Job file
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"schema_version": "1.0",
|
|
8
|
+
"job_id": "EP001-SHOT001-image",
|
|
9
|
+
"modality": "image",
|
|
10
|
+
"adapter": "studio-image",
|
|
11
|
+
"prompt": "the complete prompt sent to production",
|
|
12
|
+
"source": "剧集/EP001/storyboard/keyframe-prompts.md",
|
|
13
|
+
"references": ["输入/approved-character-reference.png"],
|
|
14
|
+
"outputs": ["剧集/EP001/制作成果/images/SHOT001.png"],
|
|
15
|
+
"parameters": {"width": 1080, "height": 1920},
|
|
16
|
+
"overwrite": false
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- `modality`: `image`, `video`, `tts`, or `music`. `tts` is one bounded spoken
|
|
21
|
+
utterance; `music` is a separately accepted timeline-level cue or song and
|
|
22
|
+
must not be smuggled into every shot's video job.
|
|
23
|
+
- `source`: optional current project text/spec that owns the prompt.
|
|
24
|
+
- `references`: zero to sixteen current project files actually sent to production.
|
|
25
|
+
- `outputs`: one to sixteen unique paths rooted at top-level `production/` or
|
|
26
|
+
`剧集|episodes/<EP>/制作成果|production/`; extensions must match the modality.
|
|
27
|
+
A nested directory merely named `production` does not grant write access to
|
|
28
|
+
protected input or delivery trees.
|
|
29
|
+
- `parameters`: provider-neutral public settings only. Secret-like keys are rejected.
|
|
30
|
+
- `overwrite`: must be explicitly true to replace an existing result.
|
|
31
|
+
|
|
32
|
+
`prepare` records internal digests of source/reference bytes and returns the exact confirmation phrase. Callers never
|
|
33
|
+
calculate those digests. A changed input requires prepare and confirmation again.
|
|
34
|
+
|
|
35
|
+
## Adapter config
|
|
36
|
+
|
|
37
|
+
Keep this file outside the project:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"adapters": {
|
|
42
|
+
"studio-image": {
|
|
43
|
+
"command": ["python3", "/opt/studio/image_adapter.py"],
|
|
44
|
+
"timeout_seconds": 600
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`command` is an argv array, never a shell string. Timeout is 1–3600 seconds. Do not put credentials in this file;
|
|
51
|
+
let the adapter read its environment or operating-system credential store.
|
|
52
|
+
|
|
53
|
+
## Adapter stdin
|
|
54
|
+
|
|
55
|
+
The adapter receives one UTF-8 JSON document as raw stdin bytes. Read the
|
|
56
|
+
binary stream (for example `json.load(sys.stdin.buffer)`) rather than relying
|
|
57
|
+
on the machine locale. The document contains the confirmed job plus:
|
|
58
|
+
|
|
59
|
+
- `run_id`: unique attempt ID;
|
|
60
|
+
- `project_root`: local absolute path to a private, run-scoped snapshot containing
|
|
61
|
+
the exact confirmed `source` and `references`. It is not the live creator
|
|
62
|
+
project and is deleted after the attempt.
|
|
63
|
+
- `output_root`: empty private, run-scoped staging directory owned by the
|
|
64
|
+
production tool. Every adapter output source must be a direct regular-file
|
|
65
|
+
child of this directory. The whole directory is deleted after success or
|
|
66
|
+
failure.
|
|
67
|
+
|
|
68
|
+
It may translate provider-neutral parameters into its chosen SDK/API. Optional
|
|
69
|
+
provider adapters under `scripts/` document and implement known translations;
|
|
70
|
+
the project job remains provider-neutral, and adapter selection, model access,
|
|
71
|
+
polling and credentials stay in the external runtime configuration.
|
|
72
|
+
|
|
73
|
+
## Adapter stdout
|
|
74
|
+
|
|
75
|
+
On success, write one bounded UTF-8 JSON object to stdout. Portable adapters
|
|
76
|
+
should ASCII-escape JSON strings so Windows locale settings cannot corrupt
|
|
77
|
+
project paths:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"outputs": [
|
|
82
|
+
{
|
|
83
|
+
"target": "剧集/EP001/制作成果/images/SHOT001.png",
|
|
84
|
+
"source": "/temporary/adapter/result.png"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"provider_job_id": "optional-public-id"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Targets must appear in exactly the confirmed order. Sources must be direct
|
|
92
|
+
regular-file children of `output_root`, not symlinks. The tool opens each source
|
|
93
|
+
without following links, copies the pinned bytes into the project, records
|
|
94
|
+
size/media type/checksum, and removes staging. It never stores adapter
|
|
95
|
+
stdout/stderr or environment values.
|
|
96
|
+
|
|
97
|
+
On a provider failure, an adapter may write only this whitelisted evidence to stdout:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"error": {
|
|
102
|
+
"provider": "studio-image",
|
|
103
|
+
"category": "rate_limit",
|
|
104
|
+
"code": "rate_limit_exceeded",
|
|
105
|
+
"http_status": 429,
|
|
106
|
+
"request_id": "request_safe_123",
|
|
107
|
+
"retryable": true
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Never include provider messages, response bodies, prompts, paths or credentials.
|
|
113
|
+
The production run record keeps only validated fields; malformed failure output
|
|
114
|
+
is replaced with a generic adapter exit code.
|
|
115
|
+
|
|
116
|
+
A nonzero exit, timeout, malformed response or mismatched output marks the run failed. Because the adapter may have
|
|
117
|
+
submitted paid work before failing locally, confirmation is consumed as soon as execution starts; retry only after a
|
|
118
|
+
new creator confirmation. A job with an unresolved `running` attempt cannot be prepared, confirmed, or run again;
|
|
119
|
+
wait for its terminal record or investigate the interrupted attempt first.
|
|
120
|
+
|
|
121
|
+
## Operational reconciliation
|
|
122
|
+
|
|
123
|
+
`production_tool.py audit <project>` reads only local production metadata and the
|
|
124
|
+
current output bytes. It reports terminal failures, retryable failures, recovered
|
|
125
|
+
jobs, unresolved running attempts, repeated content fingerprints, and missing or
|
|
126
|
+
changed outputs. Terminal state, recovery, and repeated output claims are ordered
|
|
127
|
+
by validated completion time rather than start time. For paths written more than
|
|
128
|
+
once, the latest completed successful claim is authoritative for this operational
|
|
129
|
+
check. Only attempts bound to the current stored job fingerprint can claim its
|
|
130
|
+
current outputs; older fingerprints remain visible as `superseded` attempt history.
|
|
131
|
+
A successful record must declare exactly the current job's output set and media
|
|
132
|
+
types before any output claim is trusted. Jobs, confirmations, run records, and the
|
|
133
|
+
production lock use pinned no-follow directories where directory FDs are available,
|
|
134
|
+
and reparse/identity checks on the portable fallback. A linked parent chain fails
|
|
135
|
+
closed instead of redirecting state outside the project.
|
|
136
|
+
|
|
137
|
+
The audit deliberately returns `quality_verdict: not_assessed`. A provider success,
|
|
138
|
+
retry recovery, file presence, size, or checksum proves execution/custody only; it
|
|
139
|
+
does not prove identity, performance, continuity, lip-sync, mix, edit, or audience
|
|
140
|
+
quality. Those claims require an authorized observation and a separate review.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# GPT Image 2 adapter
|
|
2
|
+
|
|
3
|
+
Adapter command:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{"command": ["python3", "/absolute/path/provider_adapters.py", "gpt-image-2"], "timeout_seconds": 600}
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Required environment: `OPENAI_API_KEY`. `OPENAI_BASE_URL` optionally overrides the default
|
|
10
|
+
`https://api.openai.com/v1` and must remain HTTPS.
|
|
11
|
+
|
|
12
|
+
The job must have modality `image` and exactly one output. With no references, the adapter sends JSON to
|
|
13
|
+
`POST /images/generations`. With one to sixteen references, it sends an `image[]` multipart edit to
|
|
14
|
+
`POST /images/edits`. The model is always `gpt-image-2`, `n` is always one, and the single returned `b64_json` image is
|
|
15
|
+
written to a private temporary file.
|
|
16
|
+
|
|
17
|
+
Supported public parameters are `width` plus `height` (compiled to `size`), or `size`, and `quality`, `background`, and
|
|
18
|
+
`moderation`. References use GPT Image 2's high-fidelity behavior without sending the older `input_fidelity` field.
|
|
19
|
+
Transparent backgrounds are rejected because GPT Image 2 does not support them. The output extension selects `png`,
|
|
20
|
+
`jpeg`, or `webp`.
|
|
21
|
+
|
|
22
|
+
Protocol references: [GPT Image 2 model](https://developers.openai.com/api/docs/models/gpt-image-2),
|
|
23
|
+
[image generation](https://developers.openai.com/api/reference/resources/images/methods/generate), and
|
|
24
|
+
[image edits](https://developers.openai.com/api/reference/resources/images/methods/edit).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# MiniMax Music adapter
|
|
2
|
+
|
|
3
|
+
Adapter command:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{"command": ["python3", "/absolute/path/provider_adapters.py", "minimax-music"], "timeout_seconds": 600}
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Required environment: `MINIMAX_API_KEY`. `MINIMAX_BASE_URL` optionally overrides the default
|
|
10
|
+
`https://api.minimax.io/v1` and must remain HTTPS.
|
|
11
|
+
|
|
12
|
+
The job uses the suite's `music` modality and must have exactly one output. The production prompt becomes the
|
|
13
|
+
music style/mood prompt. Supported public parameters are `lyrics`, `is_instrumental`, `sample_rate`,
|
|
14
|
+
`bitrate`, and `format`. Vocal jobs require exact accepted lyrics. The requested format must match the target extension
|
|
15
|
+
and be `mp3` or `wav`.
|
|
16
|
+
|
|
17
|
+
For this confirmed-production profile, `lyrics_optimizer` is rejected even when `true` is requested: supplier-authored lyrics would not have
|
|
18
|
+
appeared in the preview and cannot satisfy creator ownership or licensing. A vocal job therefore requires the exact
|
|
19
|
+
accepted lyrics; an instrumental job carries neither lyrics nor an optimizer request.
|
|
20
|
+
|
|
21
|
+
The request always uses model `music-3.0`, non-streaming `output_format: hex`, and
|
|
22
|
+
`POST /music_generation`. The adapter validates `base_resp.status_code`, decodes `data.audio` as hexadecimal bytes,
|
|
23
|
+
and writes it to a private temporary file.
|
|
24
|
+
|
|
25
|
+
Protocol reference: [MiniMax Music Generation](https://platform.minimax.io/docs/api-reference/music-generation).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Seedance adapter
|
|
2
|
+
|
|
3
|
+
Adapter command:
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{"command": ["python3", "/absolute/path/provider_adapters.py", "seedance"], "timeout_seconds": 3600}
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Required environment:
|
|
10
|
+
|
|
11
|
+
- `ARK_API_KEY`: Volcengine Ark API key.
|
|
12
|
+
- `SEEDANCE_MODEL`: the exact enabled model/endpoint ID. There is intentionally no model default; in particular the
|
|
13
|
+
adapter never assumes Seedance 2.0.
|
|
14
|
+
|
|
15
|
+
Optional environment:
|
|
16
|
+
|
|
17
|
+
- `SEEDANCE_BASE_URL` (default `https://ark.cn-beijing.volces.com/api/v3`)
|
|
18
|
+
- `SEEDANCE_POLL_INTERVAL` (default `5` seconds)
|
|
19
|
+
- `SEEDANCE_TIMEOUT_SECONDS` (default `1800` seconds)
|
|
20
|
+
- `SEEDANCE_ALLOWED_RATIOS`: comma-separated subset explicitly supported by
|
|
21
|
+
the configured model, such as `9:16,16:9`.
|
|
22
|
+
- `SEEDANCE_MIN_DURATION` and `SEEDANCE_MAX_DURATION`: the configured model's
|
|
23
|
+
explicit inclusive duration range. Set both or neither.
|
|
24
|
+
|
|
25
|
+
The job must have modality `video` and exactly one `.mp4` output. Optional
|
|
26
|
+
`duration` and `ratio` parameters are accepted only when the external runtime
|
|
27
|
+
profile above explicitly permits their values. The broad parser envelope is
|
|
28
|
+
1–15 seconds and `adaptive`, `1:1`, `3:4`, `4:3`, `9:16`, `16:9`, or `21:9`,
|
|
29
|
+
but it is never treated as proof that a particular model supports the whole
|
|
30
|
+
set. Values are compiled into the documented prompt switches `--dur` and
|
|
31
|
+
`--ratio`, not sent as unverified top-level fields.
|
|
32
|
+
The bundled runtime adapter currently supports text-to-video only. Local references fail closed because the public video
|
|
33
|
+
contract does not prove that a local data URL is accepted. A deployment that needs image-to-video must add an external,
|
|
34
|
+
authorized upload step and call `compile_seedance_payload` with the resulting HTTPS or `asset://` URI; do not put a
|
|
35
|
+
temporary provider URL into the creator project.
|
|
36
|
+
|
|
37
|
+
The adapter creates an asynchronous task, polls `GET /contents/generations/tasks/{id}` until a terminal state, and
|
|
38
|
+
downloads `content.video_url` into a private temporary directory. Any unknown status fails closed.
|
|
39
|
+
|
|
40
|
+
Protocol reference: [Volcengine video generation API](https://www.volcengine.com/docs/82379/1520757).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Offline adapter fixture for image, video, TTS, and music production tests."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import base64
|
|
8
|
+
import json
|
|
9
|
+
import struct
|
|
10
|
+
import sys
|
|
11
|
+
import wave
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
MINIMUM_PYTHON = (3, 9)
|
|
15
|
+
if sys.version_info < MINIMUM_PYTHON:
|
|
16
|
+
raise SystemExit(
|
|
17
|
+
"short-drama-produce fixture needs Python {}.{} or newer".format(
|
|
18
|
+
*MINIMUM_PYTHON
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
PNG = base64.b64decode(
|
|
23
|
+
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def main() -> int:
|
|
28
|
+
parser = argparse.ArgumentParser()
|
|
29
|
+
parser.add_argument("--fail", action="store_true")
|
|
30
|
+
args = parser.parse_args()
|
|
31
|
+
job = json.load(sys.stdin.buffer)
|
|
32
|
+
if args.fail:
|
|
33
|
+
return 7
|
|
34
|
+
directory_raw = job.get("output_root")
|
|
35
|
+
if not isinstance(directory_raw, str):
|
|
36
|
+
return 8
|
|
37
|
+
directory = Path(directory_raw)
|
|
38
|
+
if not directory.is_absolute() or not directory.is_dir() or directory.is_symlink():
|
|
39
|
+
return 8
|
|
40
|
+
outputs = []
|
|
41
|
+
for index, target in enumerate(job["outputs"]):
|
|
42
|
+
suffix = Path(target).suffix.lower()
|
|
43
|
+
path = directory / f"output-{index}{suffix}"
|
|
44
|
+
if job["modality"] == "image":
|
|
45
|
+
path.write_bytes(PNG)
|
|
46
|
+
elif job["modality"] == "video":
|
|
47
|
+
path.write_bytes(b"\x00\x00\x00\x18ftypisom" + b"\x00" * 24)
|
|
48
|
+
else:
|
|
49
|
+
with wave.open(str(path), "wb") as handle:
|
|
50
|
+
handle.setnchannels(1)
|
|
51
|
+
handle.setsampwidth(2)
|
|
52
|
+
handle.setframerate(8000)
|
|
53
|
+
handle.writeframes(struct.pack("<h", 0) * 80)
|
|
54
|
+
outputs.append({"target": target, "source": str(path)})
|
|
55
|
+
json.dump({"outputs": outputs, "provider_job_id": "fixture-local"}, sys.stdout)
|
|
56
|
+
return 0
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
if __name__ == "__main__":
|
|
60
|
+
raise SystemExit(main())
|