dsh-aivn: Rendering the Dialogue Workspace as the AIVN Stage in DSH

Introduction

In DeepSeek Harness (DSH), common approaches for creating interactive experiences with plotlines, options, and character portraits involve maintaining scripts outside the conversation or using a separate application. AIVN itself is a stage engine: the playwright outputs Stage DSL, and the client renders backgrounds, character portraits, dialogue, and stop-point options in real-time. A standalone project of the same name, stage-ai, provides a complete desktop or web experience (route trees, playthrough archives, workshops, etc.). If you are already using DSH and want your workspace to serve as the script and the stage visible directly within the session without opening a separate application, you can use the plugin dsh-aivn (maintained by john-walks-slow, categorized as “Fun & Dress-up” in the community directory).

Below, we introduce what it is, what it can do, and how to install and get started.

What is this

dsh-aivn embeds the AIVN stage engine into DSH: one workspace corresponds to one play. After selecting the Playwright preset within a session, an AIVN tab appears on the conversation page (only in Playwright sessions; Stagehand assistant sessions do not have this tab). The Stage DSL written by the playwright is rendered live within the tab—backgrounds, character portraits, the dialogue bar, and stop-point options. When the player clicks an option, that line is returned to the playwright to continue writing. Optional features include sentence-by-sentence TTS, web search, image generation, and BGM composition, depending on the plugin configuration determining whether to register the corresponding tools.

The plugin shares the @aivn/core and @aivn/stage engines and domain models with the standalone version; the difference lies in the host: the DSH version utilizes native sessions, the file sidebar, and skill mechanisms, and does not implement AIVN’s proprietary lineage branching. Branching and rewinding rely on native DSH capabilities (e.g., dsh-rewind, branching in a new conversation).

Core Features

Stage and Session Roles

  1. Playwright: Advances the plot within Stage DSL; the third tab in the session header is Chat / Trajectory / AIVN.
  2. Stagehand: Prepares materials (placing play.json, assets, etc.); tools like image generation and cutout are used within this preset, not via the director toolbar in the top right of the stage.

Presets are fixed at the start of the session; changing seats mid-session is not allowed. To switch roles, you must create a new session.

Real-time Rendering and Interaction

  • Backgrounds, character portraits, the dialogue box, and stop-point options are synchronized and updated within the AIVN tab.
  • Full-screen mode is available in the top-left corner of the stage (degrading to viewport-fill on iPhone Safari); the full-screen button hides along with the dialogue bar when the player executes HIDE.
  • The bottom right corner provides a voice toggle and “Replay line” (requires TTS Key configuration).

Director Toolbar

Located in the top right of the stage, facing the “Director”: Prompt (Guide / Interrupt), Rewrite, Rewrite All. Rewrite / Rewrite All append replacement markers to the session (similar to the dsh-rewind technique), instructing the playwright to rewrite the corresponding beats, ensuring context and visual consistency. This differs in semantics from modifying script lines in the standalone AIVN version.

Optional Capabilities (Tools Registered Only After Configuration)

Capability Configuration Key Points Behavior if Not Configured
Voice ttsKeys etc. (Default: Fish Audio) No voice-related tools or hints
Web Search searchKeys (Exa) No web_search for Stagehand
Image Gen / Assets imageFormat, imageBaseUrl, imageModel etc. must be complete No generate_image / generate_asset
BGM musicBaseUrl, musicModel etc. must be complete No generate_bgm
Shell shell: true bash disabled by default; Effective for new sessions only
NSFW Channel nsfwModel, nsfwPrompt (can be overridden per play in play.json) Remains empty if model is not switched upon entering channel

There are 21 top-level configuration fields. After modifying plugin settings or cordis.patch.yml, most capabilities take effect in the next conversation turn, except for shell.

Plays and DSH Native Capabilities

  • The working directory root requires play.json (the only mandatory file); other skeletons like memory/ and character cards are also present. See README “What a Play Looks Like” for details.
  • Rewind: After dsh-rewind rewinds, the plugin re-projects the stage to that point.
  • Branch: Use DSH “Branch in new conversation”; the plugin rebuilds from the session, stopping at the moment of branching.
  • NSFW: The playwright calls enter_nsfw / exit_nsfw; after exiting, the main model only sees a summary, while logs and the stage retain the original text.

The client AIVN tab depends on dsh-web-app, declared in package.json under dsh.client (platform: web).

Installation and Activation

The package is a DSH bundle (dsh.bundle.patch in package.json). Under the web profile, it is recommended to use:

dsh plugin --profile web add dsh-aivn

Direct installation from GitHub (The lib/ in the repo contains tracked build artifacts, no local build required):

dsh plugin --profile web add github:john-walks-slow/dsh-aivn

Manual mounting: Add the following to the profile’s cordis.patch.yml:

- insert:
    - id: dsh-aivn
      name: dsh-aivn
      config: {}

Choose one of the following configuration methods; changes take effect immediately upon saving (generally no need to restart dsh):

  1. Sidebar Plugins → dsh-aivn configuration card (P0 capability toggles and Keys, P1 default preference items).
  2. The config block in the cordis.patch.yml of the same profile (writes to the same config as the UI).

Example snippet (See GitHub README for full fields and default values):

- id: dsh-aivn
  name: dsh-aivn
  config:
    ttsKeys: ["<your-fish-audio-key>"]
    searchKeys: ["<your-exa-key>"]
    shell: false
    imageFormat: gemini
    imageBaseUrl: http://127.0.0.1:38000
    imageModel: gemini-3.0-pro-image

Some Keys can be backed up by environment variables, such as DSH_AIVN_TTS_KEYS, DSH_AIVN_EXA_KEYS.

Please review the repository source code and LICENSE before installation. Understand that the plugin runs with the permissions of the current dsh process; evaluate risks before enabling shell or external API connections.

Typical Usage

1. Enter the Stage

  1. Create a new session and select Playwright on the seat chip (select Stagehand for material prep).
  2. Ensure play.json exists in the working directory root; if not, the stage will prompt “This is not a play yet”.
  3. Say a line in the input box to start (e.g., “Let’s begin”)—this line is sent to the playwright along with the play’s opening; you do not need to recite the opening verbatim.

If the Playwright is selected and play.json exists in the directory, “Start Game” appears above the input box: it delivers the opening and automatically switches to the AIVN tab in one step (auto-switch happens only the first time; subsequent selections are remembered by DSH). You can also speak manually and then click the AIVN tab.

2. Create a New Play

When the workspace does not have a play.json, execute in the input box (only writes files that do not yet exist; errors if play.json exists):

/new-play The Old School Building in the Rain

If no play name is provided, the working directory name is used. This command writes the skeleton without consuming LLM round-trips. To validate the structure, you can ask the Stagehand to call validate_play.

3. Player Advancement

Select an option at a stop point; the option returns to the playwright as the player’s line, and the subsequent DSL continues to render in the AIVN tab. Director toolbar hints do not appear in the player’s timeline (source marked as dsh-aivn-director).

Use Cases and Notes

Suitable for: Those already developing agents/skills in the DSH web environment who want to manage play files, session trajectories, and a visual stage within the same workspace; those needing optional TTS, search, image generation, and BGM, and who accept enabling them item-by-item via Keys.

Not very suitable for: Those needing the standalone AIVN version’s route trees, playthrough archives, and complete workshop features—please use stage-ai.

Notes:

  • The two presets, /new-play, and /aivn routes are fixed and cannot be changed via configuration.
  • The community directory skillhub.cn has no official affiliation with DeepSeek / High-Flyer; installation commands are subject to the README.
  • Current package version is 0.2.0 (subject to the repository’s package.json).

Conclusion

dsh-aivn connects “Workspace = Play, Playwright writes DSL, In-session Stage tab renders live” to DSH: rewinding and branching follow the session, and extension capabilities are toggled via flat configuration as needed. For a complete AIVN product experience, use the standalone version; if you are already rooted in DSH, install using the commands above and start with /new-play or an existing play.json under the web profile.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye