dsh-olivia-bridge: Bridges the BSide: Olivia Lin offline client to the DSH local letter bridge

Introduction

After the official service for “BSide: Olivia Lin” (miHoYo Lin Li) was shut down on 2026-08-31, the client remains capable of local performance replays and wallpapers, but the original “write letter—receive letter” pipeline dependent on the backend is no longer available. There are community practices to stub /toy/letter/* locally, but these often handle each letter individually, making it easy for the context to break after a restart.

If you are already using DeepSeek Harness (DSH) for desktop agent sessions, you can assign every letter in the game to the same persistent agent session for processing: replies are written back to local letter storage, and the client displays them as usual; the session history acts as memory, eliminating the need for a separate memory plugin layer. Below is an introduction to dsh-olivia-bridge maintained by MacilyDots (DSH Community Directory Category: Memory).

What is this

dsh-olivia-bridge starts an HTTP service on a loopback address, impersonating the backend previously connected to by the client, reproducing contracts such as /toy/letter/send, list, detail, and unread_count. Inbound letters enter the DSH agent session with the fixed ID olivia-letterbox (preset persona: Lin Li), replies are written back to <DSH_HOME>\olivia-bridge\letters.json, and the game reads letters via the original UI.

Maintainer: MacilyDots. Source code and documentation: GitHub — MacilyDots/dsh-olivia-bridge. Community directory page: skillhub.cn/plugins/MacilyDots/dsh-olivia-bridge. License: MIT (package.json 0.2.1).

Core Features

Letter Bridge and “Session as Memory”

The data flow is roughly as follows:

Olivia.exe 0.0.9.627
   │  POST /toy/letter/send · GET /toy/letter/list|detail|unread_count
   ▼
dsh-olivia-bridge   127.0.0.1:8791
   │  letter store <DSH_HOME>\olivia-bridge\letters.json
   ▼
DSH agent session (preset: Lin Li)
   │  ctx.agents.create → followup → whenIdle
   ▼
Same session carries all history; after DSH restart, plugin startup calls agents.resume() to attach to the same session

The main difference from other local implementations is that the session ID is fixed. After restarting DSH, it can still resume the context of every previous letter, rather than creating a new session every time.

Game Frontend Patch (Optional but Required in Installation Flow)

Simply running dsh plugin add to wrap the package into a profile is not enough: the game frontend must still be patched, and the Lin Li persona preset must be appended to the profile. The package provides PowerShell scripts in node_modules\dsh-olivia-bridge\tools\; the patch anchors target the frontend bundle of client 0.0.9.627. If the version does not match, the script will abort due to anchor verification failure to avoid corrupting feapp.dat.

Besides redirecting axios baseURL, offline gating, toyApiUrl, etc., to the local bridge, the patch also restores the letter-writing entry, removes the daily letter quota text, changes the mailbox “Share” to call the bridge’s /toy/letter/delete, etc. (15 places total in the README, see the “Game-side patches” table in the repository for details). Before writing back, the script uses node --check to validate the bundle syntax; if it fails, the original file restored from feapp.dat.orig-backup is preserved.

Custom Performances (MIDI Local Chain)

Besides letters, the bridge implements the original server’s MIDI upload → generation → result polling pipeline locally (genObjectUploadUrl, PUT upload, midi/generate, getGenerateResult, etc.). MIDI parsing and WAV synthesis are pure JS (logic from Comma0103/Linli-Nocturne, MIT). The performance-side WebPlayer uses <video>, which cannot play WAV directly; if ffmpeg is available in the environment, the preview audio is wrapped into a silent-track MP4 for playback. The ffmpeg search order is: config → OLIVIA_FFMPEG → <DSH_HOME>\olivia-bridge\ffmpeg\ → PATH; if ffmpeg is not installed, the task can still be completed, the preview works normally, but the performance may be silent, which is explained in the logs.

Installation and Activation

Environment requirements (from README):

  • DSH desktop 0.2.x (Windows)
  • Game client 0.0.9.627

The first step is to pull the plugin code from npm into the specified profile (the command must be used as-is, replace <profile> with your profile name):

dsh plugin --profile <profile> add dsh-olivia-bridge

The second step is to run the desktop mount and game patch in the tools directory of the installed package (adjust the path to your local node_modules\dsh-olivia-bridge\tools\):

# 1. Mount to desktop profile (existing files are first backed up as *.bak-olivia-<timestamp>)
.\tools\install-desktop.ps1

# 2. Patch the game frontend (original bundle backed up as feapp.dat.orig-backup)
.\tools\patch-feapp.ps1 -GameDir 'X:\SteamLibrary\steamapps\common\BSide Olivia Lin Test'

# 3. Restart DSH

install-desktop.ps1 will add a file: dependency and bundle entries to the profile’s package.json, create a junction pointing to this package, and append preset-olivia (Lin Li persona, complete: true, no tools attached) to the end of cordis.patch.yml.

The game directory can be set as a user environment variable to avoid passing -GameDir every time:

[Environment]::SetEnvironmentVariable('BSIDE_GAME_DIR', 'X:\SteamLibrary\steamapps\common\BSide Olivia Lin Test', 'User')

Common commands related to patching:

.\tools\patch-feapp.ps1              # Apply patch (idempotent)
.\tools\patch-feapp.ps1 -Port 8800   # Use a different port
.\tools\patch-feapp.ps1 -Restore     # Restore original feapp in one step
.\tools\verify-patches.ps1           # Read-only check for whether 15 patches are in place

Typical Usage

  1. Complete plugin add, install-desktop.ps1, and patch-feapp.ps1 as described in the previous section, then restart DSH.
  2. Start the patched Olivia client and write a letter in the mailbox; the client POSTs to the local bridge, and the DSH Lin Li session generates a reply and writes it to letters.json.
  3. The client displays letters via GET list/detail exactly as before; deleting letters uses the frontend-modified delete button, corresponding to the bridge’s /toy/letter/delete.
  4. If using MIDI custom performances, complete upload and generation locally as described in the “Custom performances” section of the README; to have sound in performances, provide an executable in one of the ffmpeg search paths mentioned above.

The package also provides utility scripts such as diagnose.mjs, dump-session.mjs, and verify.mjs for diagnostics and validation; see the repository README for usage.

Use Cases and Notes

Who it is for: Developers or players already using DSH 0.2.x on Windows, possessing the 0.0.9.627 offline client, who want to use a DSH agent to continuously “reply” to letters and rely on the same session history to remember all letters (as well as optionally use the local MIDI performance chain).

Permissions and Security: The plugin runs with the permissions of the current DSH desktop process, listens on a local loopback port, and reads/writes to the profile, the game directory, and <DSH_HOME>\olivia-bridge\. Review the source code and the MIT license yourself before installation; do not forcefully patch bundles other than 0.0.9.627 without understanding the patch script’s behavior.

Ecosystem Note: The DSH community plugin directory (e.g., skillhub.cn) is an independent site with no official affiliation with DeepSeek or High-Flyer; installation methods follow each plugin’s README, do not mix with undocumented commands.

Conclusion

dsh-olivia-bridge bridges the deprecated Lin Li client’s /toy/letter/* contracts to DSH: a local HTTP bridge, a fixed session olivia-letterbox, a JSON letter store, plus verifiable frontend patches for 0.0.9.627 and optional local MIDI generation. If you want to use “one Lin Li session to remember the entire mailbox” in DSH rather than fragmented stubs, you can follow the multi-step installation in the README and retain patch backups.

  • Directory Page: https://www.skillhub.cn/plugins/MacilyDots/dsh-olivia-bridge
  • GitHub: https://github.com/MacilyDots/dsh-olivia-bridge
羽毛球分组比赛记分
小程序二维码

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

Xiaoye