@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
package/lib/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts", "../src/skill-provider.ts", "../src/native-hooks.ts", "../src/role-tool.ts", "../src/role-provider.ts", "../src/workspace-route.ts", "../src/workspace-security.ts", "../src/workspace-request-trust.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Context } from \"@deepseek-ai/cordis\";\nimport type {} from \"@deepseek-ai/dsh-host-webserver\";\nimport type {} from \"@deepseek-ai/dsh-session\";\nimport type {} from \"@deepseek-ai/dsh-skill\";\nimport type {} from \"@deepseek-ai/dsh-subagent\";\nimport type {} from \"@deepseek-ai/dsh-tools\";\nimport z from \"@deepseek-ai/schemastery\";\nimport { createDramaSkillProvider, createOhStorySkillProvider } from \"./skill-provider.js\";\nimport { registerOhStoryHooks } from \"./native-hooks.js\";\nimport { registerOhStoryRoleTool } from \"./role-tool.js\";\nimport { registerWorkspaceRoute } from \"./workspace-route.js\";\nimport { assertTrustedWorkspaceAuthority } from \"./workspace-request-trust.js\";\n\nexport { createDramaSkillProvider, createOhStorySkillProvider, parseBundledSkill } from \"./skill-provider.js\";\nexport { OH_STORY_ROLE_NAMES, loadBundledRole } from \"./role-provider.js\";\nexport { createOhStoryRoleTool, OH_STORY_ROLE_TOOL_NAME, registerOhStoryRoleTool, roleToolFilter } from \"./role-tool.js\";\nexport { registerWorkspaceRoute } from \"./workspace-route.js\";\nexport { registerOhStoryHooks } from \"./native-hooks.js\";\n\nexport const name = \"oh-story\";\nexport const inject = [\"sessions\", \"skills\", \"subagents\", \"tools\", \"webServer\"];\n\n/** DSH owns models, providers, presets, permissions, roots, runs, and sessions. */\nexport interface Config {\n readonly editorMaxBytes?: number;\n readonly trustedHosts?: string[];\n}\n\nexport const Config = z.object({\n editorMaxBytes: z.natural().min(65_536).max(8_388_608).default(2_097_152),\n trustedHosts: z.array(String).default([])\n}) as z<Config>;\n\n/** Mount only domain contributions into the current DSH process. */\nexport async function apply(context: Context, config: Config = {}): Promise<void> {\n const trustedHosts = config.trustedHosts ?? [];\n for (const entry of trustedHosts) assertTrustedWorkspaceAuthority(entry);\n context.skills.registerProvider(() => createOhStorySkillProvider());\n context.skills.registerProvider(() => createDramaSkillProvider());\n registerOhStoryHooks(context);\n await registerOhStoryRoleTool(context);\n registerWorkspaceRoute(context, { maxBytes: config.editorMaxBytes ?? 2_097_152, trustedHosts });\n}\n\nexport default { name, inject, Config, apply };\n", "import { readdir, readFile } from \"node:fs/promises\";\nimport { basename, dirname, isAbsolute, join, relative, resolve } from \"node:path\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport {\n BUNDLED_SKILL_RANK,\n type SkillCandidate,\n type SkillDefinition,\n type SkillProvider\n} from \"@deepseek-ai/dsh-skill\";\n\nconst STORY_PROVIDER_NAME = \"oh-story\";\nconst DRAMA_PROVIDER_NAME = \"short-drama\";\nconst INVOCATION = { modelInvocable: true, userInvocable: true } as const;\nconst DSH_SKILL_BRIDGE = [\n \"<oh-story-dsh-integration>\",\n \"This Skill is a native contribution to the current DeepSeek Harness session.\",\n \"DSH owns the workspace, model, preset, permissions, Session Log, tools, subagents, cancellation, resume, and Agent UI.\",\n \"Never start another Agent runtime, session transport, Dashboard, SSE stream, polling loop, or model configuration.\",\n \"All seven upstream Oh Story specialist Roles are bundled. Invoke one with oh_story_role and a self-contained prompt.\",\n \"Never inspect .claude/agents, .codex/agents, .opencode/agents, or .story-deployed to decide whether a Role is available.\",\n \"Use only DSH-visible tools. DSH sandbox and permission policy remain authoritative.\",\n \"</oh-story-dsh-integration>\"\n].join(\"\\n\");\nconst DSH_SKILL_OVERRIDES: Readonly<Partial<Record<string, string>>> = {\n story: \"The \u5C0F\u8BF4 workspace is an official DSH conversation view. Never start or open a second web application.\",\n \"story-setup\": \"Initialize or validate novel project data only. DSH already supplies Skills, Roles, hooks, tools, permissions, sessions, and UI; never deploy Claude/OpenCode/Codex/ZCode/OpenClaw/Reasonix files or a .story-deployed marker.\",\n \"story-long-analyze\": \"Use oh_story_role for chapter extraction or specialist analysis. Never inspect platform agent directories or require a deployed external Agent definition.\",\n \"story-long-write\": \"All named Roles are provided through oh_story_role. Do not check platform agent files. Keep the upstream writing, Tracking, lint, outline, revision, and quality workflows.\",\n \"story-review\": \"All named reviewer Roles are provided through oh_story_role. Do not check platform agent files; full/lean review may use the bundled Roles directly.\",\n \"story-import\": \"All named Roles are provided through oh_story_role. Do not require story-setup to deploy them.\",\n \"story-deslop\": \"Use the bundled narrative-writer Role through oh_story_role when specialist review is useful. Never inspect platform agent directories.\",\n \"story-short-analyze\": \"Use oh_story_role for specialist analysis. Never inspect platform agent directories or require external Agent deployment.\",\n \"story-short-write\": \"All named Roles are provided through oh_story_role. Do not inspect platform agent files; preserve the upstream short-fiction workflow and quality gates.\",\n \"browser-cdp\": \"Use only browser or web capabilities visible in the current DSH preset. Do not start a parallel browser host; if no compatible capability is visible, explain the limitation.\",\n \"story-cover\": \"Use only image-generation or HTTP capabilities visible in the current DSH preset. Never assume a separate Codex or Claude runtime.\"\n};\nconst DSH_DRAMA_BRIDGE = [\n \"<short-drama-dsh-integration>\",\n \"This Skill is a native contribution to the current DeepSeek Harness session.\",\n \"DSH owns the workspace, model, preset, permissions, Session Log, tools, approvals, cancellation, resume, and Agent UI.\",\n \"The \u77ED\u5267 tab is the creator workspace. Never start dashboard_server.py, another web server, Dashboard, Agent runtime, session transport, or model configuration.\",\n \"Use only tools visible in the current DSH preset and preserve the upstream project ownership, freshness, review, and explicit production-confirmation contracts.\",\n \"Production credentials remain outside project files. Never treat a prior acceptance, preview, continuation request, or budget discussion as confirmation for a paid production run.\",\n \"</short-drama-dsh-integration>\"\n].join(\"\\n\");\nconst DSH_DRAMA_OVERRIDES: Readonly<Partial<Record<string, string>>> = {\n \"short-drama\": \"A dashboard request means focus or use the native \u77ED\u5267 tab in this DSH Session. Do not run the bundled standalone Dashboard script.\",\n \"short-drama-produce\": \"Use an upstream adapter only after the creator explicitly confirms the exact current job. DSH permissions and approval UI remain authoritative.\"\n};\n\nconst DSH_NATIVE_SKILLS: Readonly<Partial<Record<string, string>>> = {\n story: `# story \u2014 DSH \u5C0F\u8BF4\u6D41\u7A0B\u5165\u53E3\n\n\u5728\u5F53\u524D DSH Session \u5185\u5224\u65AD\u7528\u6237\u610F\u56FE\uFF0C\u5E76\u52A0\u8F7D\u6700\u5339\u914D\u7684 Oh Story Skill\uFF1A\n\n- \u65B0\u5EFA\u6216\u4FEE\u590D\u5C0F\u8BF4\u5DE5\u7A0B\uFF1Astory-setup\n- \u957F\u7BC7\u9009\u9898/\u626B\u699C/\u62C6\u6587/\u65E5\u66F4\uFF1Astory-long-scan\u3001story-long-analyze\u3001story-long-write\n- \u77ED\u7BC7\u9009\u9898/\u62C6\u6587/\u5199\u4F5C\uFF1Astory-short-scan\u3001story-short-analyze\u3001story-short-write\n- \u5BFC\u5165\u5DF2\u6709\u4F5C\u54C1\uFF1Astory-import\n- \u5BA1\u7A3F\u4E0E\u53BB AI \u5473\uFF1Astory-review\u3001story-deslop\n- \u5C01\u9762\uFF1Astory-cover\n\n\u610F\u56FE\u660E\u786E\u65F6\u76F4\u63A5\u8FDB\u5165\u5BF9\u5E94 Skill\uFF1B\u4E0D\u660E\u786E\u65F6\u53EA\u95EE\u4E00\u4E2A\u4F1A\u6539\u53D8\u6D41\u7A0B\u7684\u95EE\u9898\u3002\u9879\u76EE\u6587\u4EF6\u3001\nAgent\u3001\u6A21\u578B\u3001\u6743\u9650\u3001Session Log \u548C UI \u5747\u7531\u5F53\u524D DSH \u4F1A\u8BDD\u7BA1\u7406\u3002\u5C0F\u8BF4\u6587\u4EF6\u901A\u8FC7\u201C\u5C0F\u8BF4\u201D\n\u89C6\u56FE\u67E5\u770B\uFF0CAgent \u8FC7\u7A0B\u901A\u8FC7\u53F3\u4FA7\u52A8\u6001\u680F\u6216\u5B98\u65B9 Chat \u67E5\u770B\u3002\u7981\u6B62\u542F\u52A8\u72EC\u7ACB Dashboard\u3002`,\n \"story-setup\": `# story-setup \u2014 DSH \u539F\u751F\u5C0F\u8BF4\u5DE5\u7A0B\u521D\u59CB\u5316\n\n\u53EA\u521D\u59CB\u5316\u6216\u6821\u9A8C\u5F53\u524D DSH workspace \u4E2D\u7684\u5C0F\u8BF4\u6570\u636E\uFF0C\u4E0D\u90E8\u7F72\u4EFB\u4F55 Agent \u5E73\u53F0\u6587\u4EF6\u3002\n\n1. \u68C0\u67E5\u73B0\u6709\u6B63\u6587\u3001\u8BBE\u5B9A\u3001\u5927\u7EB2\u548C\u8FFD\u8E2A\u6587\u4EF6\uFF0C\u5DF2\u6709\u5185\u5BB9\u7EDD\u4E0D\u8986\u76D6\u3002\n2. \u6839\u636E\u7528\u6237\u58F0\u660E\u4E0E\u73B0\u6709\u7ED3\u6784\u5224\u65AD\u957F\u7BC7/\u77ED\u7BC7\uFF1B\u65E0\u6CD5\u53EF\u9760\u5224\u65AD\u65F6\u8BF7\u6C42\u786E\u8BA4\u3002\n3. \u957F\u7BC7\u6309\u9700\u5EFA\u7ACB \u6B63\u6587/\u3001\u8BBE\u5B9A/\u3001\u5927\u7EB2/\u3001\u8FFD\u8E2A/\uFF0C\u5E76\u51C6\u5907\u8FFD\u8E2A/_tracking-state.json\uFF1B\n \u7B2C\u4E00\u7AE0\u6B63\u6587\u843D\u76D8\u524D\u5FC5\u987B\u6709\u5BF9\u5E94\u7EC6\u7EB2\u3002\u77ED\u7BC7\u4FDD\u6301\u8F7B\u91CF\u7ED3\u6784\uFF0C\u4E0D\u5F3A\u52A0\u957F\u7BC7 Tracking\u3002\n4. \u9700\u8981\u67B6\u6784\u3001\u89D2\u8272\u6216\u7814\u7A76\u5DE5\u4F5C\u65F6\uFF0C\u901A\u8FC7 oh_story_role \u8C03\u7528\u5DF2\u6253\u5305 Role\uFF1B\u4E0D\u8981\u68C0\u67E5\u6216\n \u751F\u6210 .claude\u3001.codex\u3001.opencode\u3001.zcode\u3001AGENTS.md \u6216 .story-deployed\u3002\n5. \u590D\u8FF0\u521B\u5EFA\u3001\u4FDD\u7559\u548C\u5F85\u7528\u6237\u786E\u8BA4\u7684\u6587\u4EF6\u3002\u4E0D\u8981\u914D\u7F6E\u6A21\u578B\u3001\u6743\u9650\u3001Hooks \u6216 Session\u3002\n\n\u9898\u6750\u3001\u89D2\u8272\u3001\u8282\u594F\u3001\u51B2\u7A81\u3001\u5F00\u7BC7\u548C\u5199\u4F5C\u65B9\u6CD5\u8D44\u6599\u4F4D\u4E8E references/agent-references/\uFF1B\n\u53EA\u52A0\u8F7D\u5F53\u524D\u4EFB\u52A1\u9700\u8981\u7684\u6587\u4EF6\u3002`,\n \"browser-cdp\": `# browser-cdp \u2014 DSH \u6D4F\u89C8\u5668\u80FD\u529B\u9002\u914D\n\n\u672C Skill \u4E0D\u542F\u52A8 Chrome\u3001CDP \u7AEF\u53E3\u3001\u72EC\u7ACB\u6D4F\u89C8\u5668 Host \u6216 setup-cdp-chrome.js\u3002\n\u4EC5\u4F7F\u7528\u5F53\u524D DSH Preset \u5DF2\u66B4\u9732\u7684 web_search\u3001web_fetch \u6216\u6D4F\u89C8\u5668\u5DE5\u5177\u5B8C\u6210\u7F51\u9875\u8BFB\u53D6\u3001\n\u699C\u5355\u91C7\u96C6\u548C\u8D44\u6599\u6838\u9A8C\u3002\u4FDD\u6301\u4EE5\u4E0B\u539F\u5219\uFF1A\n\n1. \u4F18\u5148\u4F7F\u7528\u7ED3\u6784\u5316\u641C\u7D22/\u6293\u53D6\u5DE5\u5177\uFF1B\u9700\u8981\u767B\u5F55\u6001\u6216\u4EA4\u4E92\u9875\u9762\u65F6\u624D\u4F7F\u7528\u53EF\u89C1\u6D4F\u89C8\u5668\u80FD\u529B\u3002\n2. \u5C0A\u91CD\u7AD9\u70B9\u6761\u6B3E\u3001\u8BBF\u95EE\u9891\u7387\u4E0E\u7528\u6237\u6388\u6743\uFF1B\u4E0D\u7ED5\u8FC7\u9A8C\u8BC1\u7801\u3001\u4ED8\u8D39\u5899\u6216\u8BBF\u95EE\u63A7\u5236\u3002\n3. \u8BB0\u5F55\u6765\u6E90 URL\u3001\u91C7\u96C6\u65F6\u95F4\u3001\u5931\u8D25\u9879\u548C\u6570\u636E\u8D28\u91CF\uFF0C\u4E0D\u628A\u63A8\u65AD\u5199\u6210\u9875\u9762\u4E8B\u5B9E\u3002\n4. \u5F53\u524D Preset \u6CA1\u6709\u517C\u5BB9\u80FD\u529B\u65F6\uFF0C\u8BF4\u660E\u7F3A\u5931\u80FD\u529B\u548C\u53EF\u884C\u7684\u624B\u5DE5\u6B65\u9AA4\uFF0C\u4E0D\u53E6\u8D77\u8FD0\u884C\u65F6\u3002`,\n \"story-long-scan\": `# story-long-scan \u2014 DSH \u539F\u751F\u957F\u7BC7\u626B\u699C\n\n\u57FA\u4E8E\u53EF\u6838\u9A8C\u6837\u672C\u8BC6\u522B\u957F\u7BC7\u7F51\u6587\u8D8B\u52BF\uFF0C\u4E0D\u8FD0\u884C\u6253\u5305\u811A\u672C\u3001\u4E0D\u63D0\u53D6\u767B\u5F55\u51ED\u636E\uFF0C\u4E5F\u4E0D\u7ED5\u8FC7\u9A8C\u8BC1\u7801\u3001\n\u8BBF\u95EE\u63A7\u5236\u6216\u7AD9\u70B9\u9650\u5236\u3002\n\n1. \u660E\u786E\u5E73\u53F0\u3001\u9891\u9053\u548C\u9898\u6750\u65B9\u5411\uFF1B\u53EA\u6709\u7B54\u6848\u4F1A\u6539\u53D8\u91C7\u6837\u8303\u56F4\u65F6\u624D\u95EE\u4E00\u4E2A\u95EE\u9898\u3002\n2. \u6570\u636E\u6765\u6E90\u4F9D\u6B21\u4E3A\uFF1A\u7528\u6237\u63D0\u4F9B\u7684\u6570\u636E\u6216\u94FE\u63A5\u3001\u5F53\u524D DSH Preset \u53EF\u89C1\u7684\u7F51\u9875\u5DE5\u5177\u3001\n references/genre-trends.md \u4E2D\u7684\u5386\u53F2\u8D8B\u52BF\u3002\u65E0\u6CD5\u83B7\u53D6\u5B9E\u65F6\u6570\u636E\u65F6\u5FC5\u987B\u660E\u786E\u6807\u4E3A\u5386\u53F2\u5047\u8BBE\u3002\n3. \u6BCF\u4E2A\u6837\u672C\u8BB0\u5F55\u6765\u6E90 URL\u3001\u91C7\u96C6\u65E5\u671F\u3001\u699C\u5355\u53E3\u5F84\u3001\u6709\u6548\u6761\u76EE\u6570\u3001\u7F3A\u5931\u5B57\u6BB5\u548C\u5F02\u5E38\u9879\uFF1B\n \u4E0D\u628A\u641C\u7D22\u6458\u8981\u3001\u63A8\u65AD\u6216\u8FC7\u671F\u7F13\u5B58\u5199\u6210\u9875\u9762\u4E8B\u5B9E\u3002\n4. \u6309\u9898\u6750\u5206\u5E03\u3001\u65B0\u9898\u6750\u4FE1\u53F7\u3001\u7ECF\u5178\u9898\u6750\u53D8\u5316\u3001\u7BC7\u5E45\u4E0E\u66F4\u65B0\u3001\u4E66\u540D\u6A21\u5F0F\u3001\u5F00\u5934\u5356\u70B9\u548C\n \u5DEE\u5F02\u5316\u5143\u7D20\u5206\u6790\u3002\u9700\u8981\u51B3\u7B56\u95E8\u7981\u65F6\u4F7F\u7528 references/topic-decision.md\u3002\n5. \u8F93\u51FA\u5E02\u573A\u6982\u51B5\u3001\u9898\u6750\u70ED\u5EA6\u3001\u8BC1\u636E\u4E0E\u53EF\u4FE1\u5EA6\u3001\u98CE\u9669\u3001\u4E09\u9879\u53EF\u6267\u884C\u65B9\u5411\u548C\u4E0B\u6B21\u590D\u626B\u65F6\u95F4\u3002\n\n\u5F53\u524D Preset \u6CA1\u6709\u7F51\u9875\u80FD\u529B\u4E14\u7528\u6237\u4E5F\u672A\u63D0\u4F9B\u6837\u672C\u65F6\uFF0C\u4F7F\u7528\u5185\u7F6E\u53C2\u8003\u5B8C\u6210\u65B9\u6CD5\u8BBA\u5206\u6790\uFF0C\n\u5E76\u5217\u51FA\u4ECD\u9700\u6838\u9A8C\u7684\u699C\u5355\uFF1B\u4E0D\u8981\u542F\u52A8 CDP\u3001\u72EC\u7ACB\u6D4F\u89C8\u5668\u6216\u5E76\u884C\u8FD0\u884C\u65F6\u3002`,\n \"story-short-scan\": `# story-short-scan \u2014 DSH \u539F\u751F\u77ED\u7BC7\u626B\u699C\n\n\u57FA\u4E8E\u53EF\u6838\u9A8C\u6837\u672C\u8BC6\u522B\u77ED\u7BC7\u5E02\u573A\u7684\u60C5\u7EEA\u3001\u9898\u6750\u4E0E\u4F20\u64AD\u4FE1\u53F7\uFF0C\u4E0D\u8FD0\u884C\u6253\u5305\u811A\u672C\u3001\u4E0D\u8BFB\u53D6 Cookie\n\u6216 token\uFF0C\u4E5F\u4E0D\u7ED5\u8FC7\u9A8C\u8BC1\u7801\u3001\u767B\u5F55\u6216\u8BBF\u95EE\u63A7\u5236\u3002\n\n1. \u660E\u786E\u5E73\u53F0\u4E0E\u65B9\u5411\uFF1B\u53EA\u6709\u7B54\u6848\u4F1A\u6539\u53D8\u91C7\u6837\u8303\u56F4\u65F6\u624D\u95EE\u4E00\u4E2A\u95EE\u9898\u3002\n2. \u6570\u636E\u6765\u6E90\u4F9D\u6B21\u4E3A\uFF1A\u7528\u6237\u63D0\u4F9B\u7684\u6570\u636E\u6216\u94FE\u63A5\u3001\u5F53\u524D DSH Preset \u53EF\u89C1\u7684\u7F51\u9875\u5DE5\u5177\u3001\n references/real-market-data.md \u4E2D\u7684\u5386\u53F2\u8D44\u6599\u3002\u65E0\u6CD5\u8054\u7F51\u65F6\u5FC5\u987B\u628A\u7ED3\u8BBA\u6807\u4E3A\u5019\u9009\u5047\u8BBE\u3002\n3. \u8BB0\u5F55\u6765\u6E90 URL\u3001\u91C7\u96C6\u65E5\u671F\u3001\u699C\u5355\u53E3\u5F84\u3001\u6709\u6548\u6837\u672C\u6570\u3001\u7F3A\u5931\u5B57\u6BB5\u548C\u5F02\u5E38\u9879\u3002\n4. \u5206\u6790\u60C5\u7EEA\u7C7B\u578B\u3001\u9898\u6750\u70ED\u70B9\u3001\u7BC7\u5E45\u3001\u5F00\u5934\u3001\u7ED3\u5C3E\u3001\u6807\u9898\u3001\u4EBA\u8BBE\u4E0E\u4F20\u64AD\u89E6\u53D1\u70B9\uFF1B\n \u7ED9\u6BCF\u4E2A\u8D8B\u52BF\u6807\u6CE8\u8BC1\u636E\u5F3A\u5EA6\u3001\u9971\u548C\u98CE\u9669\u548C\u6709\u6548\u671F\u3002\n5. \u8F93\u51FA\u5E02\u573A\u6982\u51B5\u3001\u60C5\u7EEA\u70ED\u5EA6\u3001\u9898\u6750\u70ED\u70B9\u3001\u5173\u952E\u6570\u636E\u3001\u98CE\u53E3\u9884\u8B66\u3001\u4E09\u9879\u53EF\u5199\u65B9\u5411\u548C\u590D\u626B\u65F6\u95F4\u3002\n\n\u5F53\u524D Preset \u6CA1\u6709\u7F51\u9875\u80FD\u529B\u4E14\u7528\u6237\u4E5F\u672A\u63D0\u4F9B\u6837\u672C\u65F6\uFF0C\u53EA\u505A\u5386\u53F2\u8D44\u6599\u5206\u6790\u5E76\u5217\u51FA\u9A8C\u8BC1\u52A8\u4F5C\uFF1B\n\u4E0D\u8981\u542F\u52A8 CDP\u3001\u72EC\u7ACB\u6D4F\u89C8\u5668\u6216\u5E76\u884C\u8FD0\u884C\u65F6\u3002`\n};\n\ninterface ParsedSkill {\n readonly name: string;\n readonly description: string;\n readonly content: string;\n}\n\nfunction frontmatterValue(frontmatter: string, key: string): string | undefined {\n const match = new RegExp(`^${key}:\\\\s*(.+)$`, \"mu\").exec(frontmatter);\n const raw = match?.[1]?.trim();\n if (raw === undefined) return undefined;\n if (raw.startsWith(\"\\\"\") && raw.endsWith(\"\\\"\")) {\n try { return JSON.parse(raw) as string; }\n catch { return raw.slice(1, -1); }\n }\n return raw.replace(/^['\"]|['\"]$/gu, \"\");\n}\n\nexport function parseBundledSkill(source: string): ParsedSkill {\n const match = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---\\r?\\n?/u.exec(source);\n if (match?.[1] === undefined) throw new Error(\"Bundled skill is missing YAML frontmatter.\");\n const name = frontmatterValue(match[1], \"name\");\n const description = frontmatterValue(match[1], \"description\");\n if (!name || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(name)) throw new Error(\"Bundled skill has an invalid name.\");\n if (!description) throw new Error(`Bundled skill \"${name}\" has no description.`);\n return { name, description, content: source.slice(match[0].length) };\n}\n\nexport function dshSkillContent(name: string, content: string): string {\n const override = DSH_SKILL_OVERRIDES[name];\n const native = DSH_NATIVE_SKILLS[name];\n return `${DSH_SKILL_BRIDGE}${override === undefined ? \"\" : `\\n<skill-specific-dsh-override>${override}</skill-specific-dsh-override>`}\\n\\n${native ?? content}`;\n}\n\nexport function defaultBundledSkillRoot(): string {\n const current = dirname(fileURLToPath(import.meta.url));\n return basename(current) === \"src\"\n ? resolve(current, \"../../knowledge/oh-story/skills\")\n : resolve(current, \"oh-story/skills\");\n}\n\nexport function defaultDramaSkillRoot(): string {\n const current = dirname(fileURLToPath(import.meta.url));\n return basename(current) === \"src\"\n ? resolve(current, \"../../knowledge/drama/skills\")\n : resolve(current, \"drama/skills\");\n}\n\nfunction createBundledSkillProvider(\n providerName: string,\n skillRoot: string,\n content: (name: string, source: string) => string\n): SkillProvider {\n const root = resolve(skillRoot);\n return {\n name: providerName,\n async list(): Promise<readonly SkillCandidate[]> {\n const directories = (await readdir(root, { withFileTypes: true }))\n .filter((entry) => entry.isDirectory())\n .map((entry) => entry.name)\n .sort();\n return Promise.all(directories.map(async (directory): Promise<SkillCandidate> => {\n const path = join(root, directory, \"SKILL.md\");\n const parsed = parseBundledSkill(await readFile(path, \"utf8\"));\n if (parsed.name !== directory) throw new Error(`Bundled skill directory \"${directory}\" does not match name \"${parsed.name}\".`);\n return {\n name: parsed.name,\n description: parsed.description,\n invocation: INVOCATION,\n provider: providerName,\n source: \"bundled\",\n resourceBase: { kind: \"directory\", path: join(root, directory) },\n rank: BUNDLED_SKILL_RANK,\n locator: pathToFileURL(path),\n path\n };\n }));\n },\n async get(candidate): Promise<SkillDefinition | undefined> {\n if (candidate.provider !== providerName || typeof candidate.path !== \"string\") return undefined;\n const path = resolve(candidate.path);\n const relativePath = relative(root, path);\n if (relativePath === \"\" || relativePath.startsWith(\"..\") || isAbsolute(relativePath)) {\n throw new Error(\"Bundled skill locator escaped the packaged skill root.\");\n }\n const parsed = parseBundledSkill(await readFile(path, \"utf8\"));\n if (parsed.name !== candidate.name) return undefined;\n return {\n name: parsed.name,\n description: parsed.description,\n invocation: INVOCATION,\n provider: providerName,\n source: \"bundled\",\n resourceBase: { kind: \"directory\", path: join(root, parsed.name) },\n path,\n content: content(parsed.name, parsed.content)\n };\n }\n };\n}\n\nexport function createOhStorySkillProvider(skillRoot = defaultBundledSkillRoot()): SkillProvider {\n return createBundledSkillProvider(STORY_PROVIDER_NAME, skillRoot, dshSkillContent);\n}\n\nexport function dshDramaSkillContent(name: string, content: string): string {\n const override = DSH_DRAMA_OVERRIDES[name];\n return `${DSH_DRAMA_BRIDGE}${override === undefined ? \"\" : `\\n<skill-specific-dsh-override>${override}</skill-specific-dsh-override>`}\\n\\n${content}`;\n}\n\nexport function createDramaSkillProvider(skillRoot = defaultDramaSkillRoot()): SkillProvider {\n return createBundledSkillProvider(DRAMA_PROVIDER_NAME, skillRoot, dshDramaSkillContent);\n}\n", "import { access, readdir } from \"node:fs/promises\";\nimport { isAbsolute, relative, resolve, sep } from \"node:path\";\nimport type { Context } from \"@deepseek-ai/cordis\";\nimport { createUserMessage } from \"@deepseek-ai/dsh-llm\";\nimport type { PostToolDecision, PreToolDecision, ToolExecution } from \"@deepseek-ai/dsh-tools\";\n\nconst MUTATION_TOOLS = new Set([\"write\", \"edit\", \"str_replace_editor\"]);\n\nexport interface StoryMutation {\n readonly root: string;\n readonly path: string;\n readonly chapter?: number;\n}\n\nfunction mutationPath(name: string, args: unknown): string | undefined {\n if (!MUTATION_TOOLS.has(name) || typeof args !== \"object\" || args === null || Array.isArray(args)) return undefined;\n const record = args as Record<string, unknown>;\n if (name === \"str_replace_editor\") {\n if (!new Set([\"create\", \"str_replace\", \"insert\"]).has(String(record.command))) return undefined;\n return typeof record.path === \"string\" && record.path.trim() !== \"\" ? record.path : undefined;\n }\n return typeof record.file_path === \"string\" && record.file_path.trim() !== \"\" ? record.file_path : undefined;\n}\n\nexport function detectStoryMutation(name: string, args: unknown, cwd: string | undefined): StoryMutation | undefined {\n const path = mutationPath(name, args);\n if (cwd === undefined || path === undefined) return undefined;\n const root = resolve(cwd);\n const absolute = isAbsolute(path) ? resolve(path) : resolve(root, path);\n const offset = relative(root, absolute);\n if (offset === \"..\" || offset.startsWith(`..${sep}`) || isAbsolute(offset)) return undefined;\n const normalized = offset.replaceAll(\"\\\\\", \"/\");\n if (!normalized.startsWith(\"\u6B63\u6587/\")) return undefined;\n const chapterText = /\u7B2C0*(\\d+)\u7AE0/u.exec(normalized)?.[1];\n return { root, path: normalized, ...(chapterText === undefined ? {} : { chapter: Number(chapterText) }) };\n}\n\nfunction storyMutation(exec: ToolExecution): StoryMutation | undefined {\n return detectStoryMutation(exec.name, exec.arguments, exec.agent?.session.header.cwd);\n}\n\nasync function exists(path: string): Promise<boolean> {\n return access(path).then(() => true, () => false);\n}\n\nasync function hasChapterOutline(root: string, chapter: number): Promise<boolean> {\n const entries = await readdir(resolve(root, \"\u5927\u7EB2\"), { withFileTypes: true }).catch(() => []);\n return entries.some((entry) => entry.isFile()\n && Number(/^\u7EC6\u7EB2_\u7B2C0*(\\d+)\u7AE0.*\\.md$/u.exec(entry.name)?.[1]) === chapter);\n}\n\nexport async function validateStoryMutation(mutation: StoryMutation): Promise<string | undefined> {\n const hasLongFormLayout = await exists(resolve(mutation.root, \"\u5927\u7EB2\")) || await exists(resolve(mutation.root, \"\u8FFD\u8E2A\"));\n if (!hasLongFormLayout) return undefined;\n if (!(await exists(resolve(mutation.root, \"\u8FFD\u8E2A/_tracking-state.json\")))) {\n // Setup/import must be able to bootstrap an existing manuscript before the\n // canonical Tracking file exists. The Skill remains responsible for\n // creating it; hard guards begin once the project has committed Tracking.\n return undefined;\n }\n if (mutation.chapter !== undefined && !(await hasChapterOutline(mutation.root, mutation.chapter))) {\n return `Oh Story \u963B\u6B62\u5199\u5165\u7B2C ${String(mutation.chapter)} \u7AE0\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u7684 \u5927\u7EB2/\u7EC6\u7EB2_\u7B2CXXX\u7AE0*.md\u3002\u8BF7\u5148\u5B8C\u6210\u7EC6\u7EB2\u3002`;\n }\n return undefined;\n}\n\nexport async function decideStoryMutation(\n exec: ToolExecution,\n next: () => Promise<PreToolDecision>\n): Promise<PreToolDecision> {\n const mutation = storyMutation(exec);\n if (mutation === undefined) return next();\n const reason = await validateStoryMutation(mutation);\n if (reason !== undefined) return { kind: \"deny\", reason };\n return next();\n}\n\n/**\n * Native DSH equivalents of the upstream prose guards. They join DSH's typed\n * tool waterfall, so decisions remain visible in the official approval/tool UI.\n */\nexport function registerOhStoryHooks(context: Context): void {\n context.on(\"tools/pre-execute\", decideStoryMutation);\n\n context.on(\"tools/post-execute\", async (exec, result, next): Promise<PostToolDecision> => {\n const mutation = storyMutation(exec);\n const downstream = await next();\n if (mutation === undefined || result.isError || downstream.kind !== \"accept\") return downstream;\n const reminder = createUserMessage({\n source: { kind: \"plugin\", plugin: \"oh-story\" },\n content: [{\n type: \"text\",\n text: `<oh-story-post-write>\u6B63\u6587 ${mutation.path} \u5DF2\u53D8\u66F4\u3002\u7EE7\u7EED\u5F53\u524D\u6B65\u9AA4\u524D\u6838\u5BF9\u5E76\u66F4\u65B0 _tracking-state.json \u53CA\u5BF9\u5E94\u6D3E\u751F Tracking \u89C6\u56FE\uFF1B\u4E0D\u8981\u628A\u8FD9\u6761\u63D0\u9192\u5F53\u4F5C\u7528\u6237\u7684\u65B0\u5199\u4F5C\u8981\u6C42\u3002</oh-story-post-write>`\n }]\n });\n return {\n ...downstream,\n additionalContexts: [...downstream.additionalContexts ?? [], reminder]\n };\n });\n}\n", "import type { Context } from \"@deepseek-ai/cordis\";\nimport type { ContentBlock } from \"@deepseek-ai/dsh-llm\";\nimport type { JsonValue } from \"@deepseek-ai/dsh-session\";\nimport { defineTool, type ToolDefinition } from \"@deepseek-ai/dsh-tools\";\nimport { OH_STORY_ROLE_NAMES, loadBundledRole, type OhStoryRoleName } from \"./role-provider.js\";\n\nexport const OH_STORY_ROLE_TOOL_NAME = \"oh_story_role\";\n\nconst roleTools: Readonly<Record<OhStoryRoleName, readonly string[]>> = {\n \"chapter-extractor\": [\"read\", \"glob\", \"grep\"],\n \"character-designer\": [\"read\", \"glob\", \"grep\"],\n \"consistency-checker\": [\"read\", \"glob\", \"grep\"],\n \"narrative-writer\": [\"read\", \"glob\", \"grep\", \"bash\"],\n \"story-architect\": [\"read\", \"glob\", \"grep\"],\n \"story-explorer\": [\"read\", \"glob\", \"grep\"],\n \"story-researcher\": [\"read\", \"glob\", \"grep\", \"bash\", \"web_search\", \"web_fetch\"]\n};\n\nexport function roleToolFilter(role: OhStoryRoleName): { readonly allow: readonly string[] } {\n return { allow: roleTools[role] };\n}\n\nfunction resultText(output: readonly ContentBlock[]): string {\n return output.map((block) => block.type === \"text\" ? block.text : JSON.stringify(block)).join(\"\\n\");\n}\n\nexport async function createOhStoryRoleTool(): Promise<ToolDefinition> {\n const personas = new Map<OhStoryRoleName, string>();\n await Promise.all(OH_STORY_ROLE_NAMES.map(async (role) => {\n personas.set(role, await loadBundledRole(role, undefined, \"native-tools\"));\n }));\n return defineTool({\n name: OH_STORY_ROLE_TOOL_NAME,\n description: \"Run one focused Oh Story specialist as a child of the current DSH Agent. The child inherits DSH model, workspace, permissions, lifecycle, and UI.\",\n parameters: {\n role: {\n type: \"string\",\n required: true,\n enum: OH_STORY_ROLE_NAMES,\n description: \"The exact Oh Story Role to run.\"\n },\n prompt: {\n type: \"string\",\n required: true,\n description: \"A self-contained task. The child inherits the current DSH workspace but not the current in-flight turn.\"\n }\n },\n output: {\n schema: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n role: { type: \"string\", required: true, enum: OH_STORY_ROLE_NAMES },\n runId: { type: \"string\", required: true },\n content: { type: \"array\", required: true, items: { type: \"json\" } }\n }\n },\n render: (_args, value) => [{ type: \"text\", text: resultText(value.content as unknown as ContentBlock[]) }]\n },\n isConcurrencySafe: () => true,\n async execute(args, exec) {\n if (exec.agent === undefined) throw new Error(\"oh_story_role requires a calling DSH Agent.\");\n const persona = personas.get(args.role);\n if (persona === undefined) throw new Error(`Oh Story Role ${args.role} is not bundled.`);\n const allowed = roleToolFilter(args.role).allow.filter((name) =>\n exec.agent?.ctx.tools.get(name, exec.agent) !== undefined);\n const run = await exec.agent.ctx.subagents.start(\"spawn\", {\n label: `oh-story:${args.role}`,\n prompt: [{ type: \"text\", text: args.prompt }],\n parent: exec.agent,\n persona,\n toolFilter: { allow: allowed },\n maxDepth: 1,\n signal: exec.signal\n });\n try {\n const result = await run.result;\n if (result.stopReason !== \"completed\") {\n throw new Error(`Oh Story Role ${args.role} ended with ${result.stopReason}${result.diagnostic === undefined ? \"\" : `: ${result.diagnostic}`}`);\n }\n return {\n role: args.role,\n runId: run.id,\n content: result.output as unknown as JsonValue[]\n };\n } finally {\n await run.dispose();\n }\n }\n });\n}\n\nexport async function registerOhStoryRoleTool(context: Context): Promise<void> {\n const definition = await createOhStoryRoleTool();\n let dispose: (() => void) | undefined;\n const mount = (): void => { dispose ??= context.tools.register(definition); };\n const unmount = (): void => { dispose?.(); dispose = undefined; };\n context.on(\"subagent/provider-added\", (provider) => { if (provider.name === \"spawn\") mount(); });\n context.on(\"subagent/provider-removed\", (name) => { if (name === \"spawn\") unmount(); });\n if (context.subagents.getProvider(\"spawn\") !== undefined) mount();\n}\n", "import { readFile } from \"node:fs/promises\";\nimport { basename, dirname, join, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nexport const OH_STORY_ROLE_NAMES = [\n \"chapter-extractor\",\n \"character-designer\",\n \"consistency-checker\",\n \"narrative-writer\",\n \"story-architect\",\n \"story-explorer\",\n \"story-researcher\"\n] as const;\n\nexport type OhStoryRoleName = typeof OH_STORY_ROLE_NAMES[number];\nexport type OhStoryRoleExecution = \"tool-free\" | \"native-tools\";\n\nfunction roleBody(source: string): string {\n const frontmatter = /^---\\r?\\n[\\s\\S]*?\\r?\\n---\\r?\\n?/u.exec(source);\n return source.slice(frontmatter?.[0].length ?? 0).trim();\n}\n\nexport function defaultBundledRoleRoot(): string {\n const current = dirname(fileURLToPath(import.meta.url));\n return basename(current) === \"src\"\n ? resolve(current, \"../../knowledge/oh-story/roles\")\n : resolve(current, \"oh-story/roles\");\n}\n\nexport async function loadBundledRole(\n name: OhStoryRoleName,\n roleRoot = defaultBundledRoleRoot(),\n execution: OhStoryRoleExecution = \"tool-free\"\n): Promise<string> {\n const body = roleBody(await readFile(join(resolve(roleRoot), `${name}.md`), \"utf8\"));\n if (body.length === 0) throw new Error(`Bundled role \"${name}\" is empty.`);\n const integration = execution === \"tool-free\"\n ? [\n \"You are running inside an Oh Story review-required DSH collaboration. The caller supplies every permitted input in the prompt.\",\n \"Do not read or write project files, do not call tools, and do not follow legacy .claude/.codex path or deployment instructions in the upstream role text.\",\n \"Return only the output contract requested by the caller; never claim to have changed the project.\"\n ]\n : [\n \"You are running as a native oh-story-dsh specialist. The current DSH workspace and visible tool set are your complete authority boundary.\",\n \"Never inspect or require legacy .claude/.opencode/.codex agent deployment files; this exact pinned Role is already active.\",\n \"Use only the tools actually visible to you. Mutate files only when the caller explicitly requests it and your visible DSH tools permit it; otherwise return findings to the caller.\"\n ];\n return [\n `OH_STORY_DSH_ROLE:${name}`,\n ...integration,\n \"\",\n body\n ].join(\"\\n\");\n}\n", "import { createHash, randomUUID } from \"node:crypto\";\nimport { mkdir, readFile, readdir, rename, rm, stat, writeFile } from \"node:fs/promises\";\nimport type { IncomingMessage, ServerResponse } from \"node:http\";\nimport { dirname, extname, join, relative, resolve } from \"node:path\";\nimport type { Context } from \"@deepseek-ai/cordis\";\nimport type {} from \"@deepseek-ai/dsh-host-webserver\";\nimport { SessionId } from \"@deepseek-ai/dsh-session\";\nimport { canonicalWorkspaceRoot, resolveWorkspacePath } from \"./workspace-security.js\";\nimport { isTrustedWorkspaceRequest } from \"./workspace-request-trust.js\";\n\nconst STORY_DIRECTORIES = [\"\u6B63\u6587\", \"\u5927\u7EB2\", \"\u8BBE\u5B9A\", \"\u8FFD\u8E2A\", \"\u5BF9\u6807\", \"\u53C2\u8003\u8D44\u6599\"] as const;\nconst DRAMA_DIRECTORIES = [\"\u8F93\u5165\", \"\u9879\u76EE\u5F00\u53D1\", \"\u8BBE\u5B9A\u96C6\", \"\u5267\u96C6\", \"\u4EA4\u4ED8\", \"\u521B\u4F5C\u8005\u51B3\u7B56\", \"\u5BA1\u67E5\"] as const;\nconst CREATIVE_DIRECTORIES = [...STORY_DIRECTORIES, ...DRAMA_DIRECTORIES] as const;\nconst ROOT_FILES = new Set([\"short-drama.json\"]);\nconst EDITABLE_EXTENSIONS = new Set([\".md\", \".txt\", \".json\", \".jsonl\"]);\n\ninterface WorkspaceRouteOptions {\n readonly maxBytes: number;\n readonly trustedHosts?: readonly string[];\n}\ninterface WorkspaceFile { readonly path: string; readonly bytes: number }\n\nclass WorkspaceHttpError extends Error {\n constructor(readonly status: number, message: string) { super(message); }\n}\n\nfunction send(response: ServerResponse, status: number, value: unknown): void {\n const body = `${JSON.stringify(value)}\\n`;\n response.writeHead(status, {\n \"content-type\": \"application/json; charset=utf-8\",\n \"content-length\": Buffer.byteLength(body),\n \"cache-control\": \"no-store\",\n \"x-content-type-options\": \"nosniff\"\n });\n response.end(body);\n}\n\nexport function workspaceContentVersion(content: string | Buffer): string {\n return createHash(\"sha256\").update(content).digest(\"hex\");\n}\n\nasync function jsonBody(request: IncomingMessage, maxBytes: number): Promise<Record<string, unknown>> {\n const chunks: Buffer[] = [];\n let size = 0;\n for await (const chunk of request as AsyncIterable<Uint8Array>) {\n const value = Buffer.from(chunk);\n size += value.byteLength;\n if (size > maxBytes) throw new WorkspaceHttpError(413, \"\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927\u3002\");\n chunks.push(value);\n }\n try {\n const value = JSON.parse(Buffer.concat(chunks).toString(\"utf8\")) as unknown;\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error();\n return value as Record<string, unknown>;\n } catch {\n throw new WorkspaceHttpError(400, \"\u8BF7\u6C42\u5FC5\u987B\u662F JSON \u5BF9\u8C61\u3002\");\n }\n}\n\nfunction assertCreativePath(path: string): void {\n if (!EDITABLE_EXTENSIONS.has(extname(path).toLocaleLowerCase())) {\n throw new WorkspaceHttpError(415, \"\u5DE5\u4F5C\u53F0\u53EA\u7F16\u8F91 Markdown\u3001\u6587\u672C\u3001JSON \u548C JSONL \u6587\u4EF6\u3002\");\n }\n if (path.split(\"/\").some((segment) => segment === \"\" || segment === \"..\")) {\n throw new WorkspaceHttpError(403, \"\u6587\u4EF6\u8DEF\u5F84\u4E0D\u5728\u521B\u4F5C\u5DE5\u4F5C\u53F0\u4E2D\u3002\");\n }\n const root = path.split(\"/\", 1)[0];\n if (!CREATIVE_DIRECTORIES.some((directory) => directory === root) && !ROOT_FILES.has(path)) {\n throw new WorkspaceHttpError(403, \"\u6587\u4EF6\u8DEF\u5F84\u4E0D\u5728\u521B\u4F5C\u5DE5\u4F5C\u53F0\u4E2D\u3002\");\n }\n}\n\nasync function listFiles(root: string): Promise<WorkspaceFile[]> {\n const files: WorkspaceFile[] = [];\n const walk = async (directory: string): Promise<void> => {\n const absolute = await resolveWorkspacePath(root, directory, { expect: \"directory\" });\n for (const entry of await readdir(absolute, { withFileTypes: true })) {\n if (entry.isSymbolicLink() || entry.name.startsWith(\".\")) continue;\n const path = `${directory}/${entry.name}`;\n if (entry.isDirectory()) await walk(path);\n else if (entry.isFile() && EDITABLE_EXTENSIONS.has(extname(entry.name).toLocaleLowerCase())) {\n files.push({ path, bytes: (await stat(join(absolute, entry.name))).size });\n }\n if (files.length >= 1_000) return;\n }\n };\n for (const directory of CREATIVE_DIRECTORIES) await walk(directory).catch(() => undefined);\n for (const path of ROOT_FILES) {\n await resolveWorkspacePath(root, path, { expect: \"file\" })\n .then(async (absolute) => { files.push({ path, bytes: (await stat(absolute)).size }); })\n .catch(() => undefined);\n }\n return files.sort((left, right) => left.path.localeCompare(right.path, \"zh-Hans-CN\"));\n}\n\nfunction sessionRoot(context: Context, url: URL): Promise<string> {\n const id = url.searchParams.get(\"sessionId\");\n if (id === null || id === \"\") throw new WorkspaceHttpError(400, \"\u7F3A\u5C11 DSH sessionId\u3002\");\n const session = context.sessions.get(SessionId(id));\n if (session === undefined) throw new WorkspaceHttpError(404, \"DSH \u4F1A\u8BDD\u4E0D\u53EF\u7528\u3002\");\n if (session.header.parentSession !== undefined) throw new WorkspaceHttpError(403, \"\u5B50 Agent \u4F1A\u8BDD\u4E0D\u5F00\u653E\u5C0F\u8BF4\u7F16\u8F91\u5668\u3002\");\n const cwd = session.header.cwd;\n if (cwd === undefined) throw new WorkspaceHttpError(409, \"\u5F53\u524D DSH \u4F1A\u8BDD\u6CA1\u6709\u5DE5\u4F5C\u76EE\u5F55\u3002\");\n return canonicalWorkspaceRoot(cwd);\n}\n\nasync function handle(context: Context, request: IncomingMessage, response: ServerResponse, options: WorkspaceRouteOptions): Promise<void> {\n try {\n if (!isTrustedWorkspaceRequest(request, options.trustedHosts ?? [])) {\n throw new WorkspaceHttpError(403, \"\u8BF7\u6C42\u6765\u6E90\u4E0D\u53D7\u4FE1\u4EFB\u3002\");\n }\n const url = new URL(request.url ?? \"/\", \"http://127.0.0.1\");\n if (url.pathname === \"/oh-story/workspace\" && request.method === \"GET\") {\n const root = await sessionRoot(context, url);\n const files = await listFiles(root);\n const trackingFile = files.find((file) => file.path === \"\u8FFD\u8E2A/_tracking-state.json\");\n const tracking: unknown = trackingFile === undefined\n ? null\n : JSON.parse(await readFile(await resolveWorkspacePath(root, trackingFile.path, { expect: \"file\" }), \"utf8\")) as unknown;\n const dramaFile = files.find((file) => file.path === \"short-drama.json\");\n const shortDrama: unknown = dramaFile === undefined\n ? null\n : JSON.parse(await readFile(await resolveWorkspacePath(root, dramaFile.path, { expect: \"file\" }), \"utf8\")) as unknown;\n send(response, 200, { cwd: root, files, tracking, shortDrama, mode: \"dsh-session\" });\n return;\n }\n if (url.pathname === \"/oh-story/file\" && request.method === \"GET\") {\n const root = await sessionRoot(context, url);\n const path = url.searchParams.get(\"path\");\n if (path === null) throw new WorkspaceHttpError(400, \"\u7F3A\u5C11\u6587\u4EF6\u8DEF\u5F84\u3002\");\n assertCreativePath(path);\n const absolute = await resolveWorkspacePath(root, path, { expect: \"file\" });\n const data = await readFile(absolute);\n if (data.byteLength > options.maxBytes) throw new WorkspaceHttpError(413, \"\u6587\u4EF6\u8D85\u8FC7\u5DE5\u4F5C\u53F0\u5927\u5C0F\u9650\u5236\u3002\");\n send(response, 200, {\n path,\n content: data.toString(\"utf8\"),\n bytes: data.byteLength,\n version: workspaceContentVersion(data)\n });\n return;\n }\n if (url.pathname === \"/oh-story/file\" && request.method === \"PUT\") {\n const root = await sessionRoot(context, url);\n const path = url.searchParams.get(\"path\");\n if (path === null) throw new WorkspaceHttpError(400, \"\u7F3A\u5C11\u6587\u4EF6\u8DEF\u5F84\u3002\");\n assertCreativePath(path);\n // A JSON string can expand control bytes up to sixfold (for example\n // `\\u0000`), so the transport cap must not reject otherwise valid files.\n const input = await jsonBody(request, options.maxBytes * 6 + 1_024);\n if (typeof input.content !== \"string\") throw new WorkspaceHttpError(400, \"content \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002\");\n if (typeof input.baseVersion !== \"string\") throw new WorkspaceHttpError(400, \"baseVersion \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002\");\n if (Buffer.byteLength(input.content) > options.maxBytes) throw new WorkspaceHttpError(413, \"\u6587\u4EF6\u8D85\u8FC7\u5DE5\u4F5C\u53F0\u5927\u5C0F\u9650\u5236\u3002\");\n // Human edits use this route directly. Model-facing prose policy belongs\n // to DSH's tool waterfall and must never be applied to the editor.\n const absolute = await resolveWorkspacePath(root, path, { expect: \"file\" });\n const current = await readFile(absolute);\n if (workspaceContentVersion(current) !== input.baseVersion) {\n throw new WorkspaceHttpError(412, \"\u6587\u4EF6\u5DF2\u5728\u78C1\u76D8\u4E0A\u66F4\u65B0\u3002\u8BF7\u5237\u65B0\u5E76\u5408\u5E76\u540E\u518D\u4FDD\u5B58\u3002\");\n }\n const parent = dirname(absolute);\n await mkdir(parent, { recursive: true });\n const rootReal = await canonicalWorkspaceRoot(root);\n const parentReal = await canonicalWorkspaceRoot(parent);\n const offset = relative(rootReal, parentReal);\n if (offset === \"..\" || offset.startsWith(\"../\")) throw new WorkspaceHttpError(403, \"\u6587\u4EF6\u8DEF\u5F84\u79BB\u5F00\u4E86 DSH \u5DE5\u4F5C\u76EE\u5F55\u3002\");\n const temporary = resolve(parent, `.${randomUUID()}.oh-story.tmp`);\n try {\n await writeFile(temporary, input.content, { encoding: \"utf8\", flag: \"wx\" });\n if (workspaceContentVersion(await readFile(absolute)) !== input.baseVersion) {\n throw new WorkspaceHttpError(412, \"\u6587\u4EF6\u5DF2\u5728\u78C1\u76D8\u4E0A\u66F4\u65B0\u3002\u8BF7\u5237\u65B0\u5E76\u5408\u5E76\u540E\u518D\u4FDD\u5B58\u3002\");\n }\n await rename(temporary, absolute);\n } finally {\n await rm(temporary, { force: true });\n }\n send(response, 200, {\n path,\n content: input.content,\n bytes: Buffer.byteLength(input.content),\n version: workspaceContentVersion(input.content)\n });\n return;\n }\n send(response, 404, { error: \"Oh Story route not found.\" });\n } catch (error) {\n if (error instanceof WorkspaceHttpError) send(response, error.status, { error: error.message });\n else send(response, 500, { error: error instanceof Error ? error.message : String(error) });\n }\n}\n\n/** This narrow route never starts agents, runs, streams, or models. */\nexport function registerWorkspaceRoute(context: Context, options: WorkspaceRouteOptions): void {\n context.effect(() => context.webServer.register({\n kind: \"prefix\",\n path: \"/oh-story\",\n handler: (request, response) => handle(context, request, response, options)\n }), \"oh-story: DSH-session workspace API\");\n}\n", "import { lstat, realpath } from \"node:fs/promises\";\nimport { isAbsolute, relative, resolve, sep } from \"node:path\";\n\nexport class PathSecurityError extends Error {\n public constructor(message: string) {\n super(message);\n this.name = \"PathSecurityError\";\n }\n}\n\nfunction isInside(root: string, candidate: string): boolean {\n const offset = relative(root, candidate);\n return offset === \"\" || (!offset.startsWith(`..${sep}`) && offset !== \"..\" && !isAbsolute(offset));\n}\n\nexport async function canonicalWorkspaceRoot(root: string): Promise<string> {\n const canonical = await realpath(root);\n const info = await lstat(canonical);\n if (!info.isDirectory()) throw new PathSecurityError(\"Workspace root must be a directory.\");\n return canonical;\n}\n\nexport async function resolveWorkspacePath(\n root: string,\n relativePath: string,\n options: { readonly allowMissing?: boolean; readonly expect?: \"file\" | \"directory\" } = {}\n): Promise<string> {\n if (relativePath.includes(\"\\0\") || isAbsolute(relativePath) || /^[A-Za-z]:[\\\\/]/u.test(relativePath)) {\n throw new PathSecurityError(\"Only workspace-relative paths are allowed.\");\n }\n const segments = relativePath.replaceAll(\"\\\\\", \"/\").split(\"/\");\n if (segments.some((segment) => segment === \"..\" || segment === \"\")) {\n throw new PathSecurityError(\"Path traversal and empty segments are not allowed.\");\n }\n const canonicalRoot = await canonicalWorkspaceRoot(root);\n const candidate = resolve(canonicalRoot, ...segments);\n if (!isInside(canonicalRoot, candidate)) throw new PathSecurityError(\"Path escapes the workspace.\");\n\n let cursor = canonicalRoot;\n for (let index = 0; index < segments.length; index += 1) {\n cursor = resolve(cursor, segments[index] ?? \"\");\n try {\n const info = await lstat(cursor);\n if (info.isSymbolicLink()) {\n const target = await realpath(cursor);\n if (!isInside(canonicalRoot, target)) throw new PathSecurityError(\"Symbolic link escapes the workspace.\");\n cursor = target;\n }\n if (index < segments.length - 1 && !info.isDirectory()) throw new PathSecurityError(\"A path parent is not a directory.\");\n if (index === segments.length - 1 && options.expect !== undefined) {\n if (options.expect === \"file\" && !info.isFile()) throw new PathSecurityError(\"Expected a regular file.\");\n if (options.expect === \"directory\" && !info.isDirectory()) throw new PathSecurityError(\"Expected a directory.\");\n }\n } catch (error: unknown) {\n if (error instanceof PathSecurityError) throw error;\n const code = error instanceof Error && \"code\" in error ? String(error.code) : \"\";\n if (code === \"ENOENT\" && options.allowMissing === true && index === segments.length - 1) return cursor;\n throw error;\n }\n }\n const finalPath = await realpath(cursor);\n if (!isInside(canonicalRoot, finalPath)) throw new PathSecurityError(\"Resolved path escapes the workspace.\");\n return finalPath;\n}\n", "import type { IncomingHttpHeaders } from \"node:http\";\n\ninterface WorkspaceTrustRequest {\n readonly headers: IncomingHttpHeaders | Headers;\n}\n\nfunction header(headers: IncomingHttpHeaders | Headers, name: string): string | undefined {\n if (headers instanceof Headers) return headers.get(name) ?? undefined;\n const value = headers[name];\n return typeof value === \"string\" ? value : undefined;\n}\n\nfunction parseAuthority(authority: string): URL | undefined {\n try { return new URL(`http://${authority}`); }\n catch { return undefined; }\n}\n\nfunction canonicalAuthority(entry: string, url: URL): string {\n const port = url.port !== \"\" ? url.port : new URL(`https://${entry}`).port;\n return port === \"\" ? url.hostname : `${url.hostname}:${port}`;\n}\n\nfunction isLoopbackHostname(hostname: string): boolean {\n if (hostname === \"localhost\" || hostname === \"[::1]\") return true;\n const parts = hostname.split(\".\");\n return parts.length === 4\n && parts[0] === \"127\"\n && parts.every((part) => /^\\d{1,3}$/u.test(part) && Number(part) <= 255);\n}\n\nfunction isTrustedAuthority(host: URL, trustedHosts: readonly string[]): boolean {\n return trustedHosts.some((entry) => {\n const candidate = parseAuthority(entry);\n if (candidate === undefined) return false;\n return canonicalAuthority(entry, candidate) === candidate.hostname\n ? candidate.hostname === host.hostname\n : candidate.host === host.host;\n });\n}\n\n/** Reject malformed declarations at plugin load instead of silently widening access. */\nexport function assertTrustedWorkspaceAuthority(entry: string): void {\n const url = parseAuthority(entry);\n if (url !== undefined && canonicalAuthority(entry, url) === entry.toLocaleLowerCase()) return;\n throw new Error(`oh-story: trustedHosts entry ${JSON.stringify(entry)} is not a bare host[:port] authority`);\n}\n\n/**\n * Same browser trust boundary as DSH's native API: every request must address a\n * loopback or explicitly trusted Host, and browser markers must be same-origin.\n */\nexport function isTrustedWorkspaceRequest(\n request: WorkspaceTrustRequest,\n trustedHosts: readonly string[]\n): boolean {\n const authority = header(request.headers, \"host\");\n if (authority === undefined) return false;\n const host = parseAuthority(authority);\n if (host === undefined) return false;\n if (!isLoopbackHostname(host.hostname) && !isTrustedAuthority(host, trustedHosts)) return false;\n if (header(request.headers, \"sec-fetch-site\") === \"cross-site\") return false;\n const origin = header(request.headers, \"origin\");\n if (origin === undefined) return true;\n try { return new URL(origin).host === host.host; }\n catch { return false; }\n}\n"],
|
|
5
|
+
"mappings": ";AAMA,OAAO,OAAO;;;ACNd,SAAS,SAAS,gBAAgB;AAClC,SAAS,UAAU,SAAS,YAAY,MAAM,UAAU,eAAe;AACvE,SAAS,eAAe,qBAAqB;AAC7C;AAAA,EACE;AAAA,OAIK;AAEP,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;AAC5B,IAAM,aAAa,EAAE,gBAAgB,MAAM,eAAe,KAAK;AAC/D,IAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;A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S;AAAA,EACxE,cAAc,EAAE,MAAM,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAGD,eAAsB,MAAM,SAAkB,SAAiB,CAAC,GAAkB;AAChF,QAAM,eAAe,OAAO,gBAAgB,CAAC;AAC7C,aAAW,SAAS,aAAc,iCAAgC,KAAK;AACvE,UAAQ,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAClE,UAAQ,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAChE,uBAAqB,OAAO;AAC5B,QAAM,wBAAwB,OAAO;AACrC,yBAAuB,SAAS,EAAE,UAAU,OAAO,kBAAkB,SAAW,aAAa,CAAC;AAChG;AAEA,IAAO,gBAAQ,EAAE,MAAM,QAAQ,QAAQ,MAAM;",
|
|
6
|
+
"names": ["name", "readdir", "isAbsolute", "relative", "resolve", "name", "readFile", "basename", "dirname", "join", "resolve", "fileURLToPath", "name", "name", "readFile", "readdir", "dirname", "join", "relative", "resolve", "isAbsolute", "relative", "resolve", "sep", "name", "readdir", "join", "readFile", "dirname", "relative", "resolve"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 oh-story-claudecode
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|