dsh-ziwei: DSH Local Zi Wei Dou Shu Chart Casting and Interpretation Plugin

Introduction

When using Zi Wei Dou Shu (Purple Star Astrology) in DSH, the traditional workflow requires opening a chart-casting website and manually copying palace positions and star names into the chat window. A single missing detail leaves the subsequent conversation lacking context. This plugin runs the chart-casting application on the DSH login unit backend and exposes the /ziwei path through a same-origin reverse proxy. After casting a chart in the panel, clicking “Let DSH Interpret” injects the full chart summary into a new conversation’s input box, so follow-up questions continue in the same thread.

Plugin Overview

  • Name: dsh-ziwei
  • Maintainer: frankfurtlin
  • Category: Model Inference
  • Description: Entry point at DSH sidebar → “Plugins → Automation Tasks → Zi Wei Dou Shu.” The main panel embeds a local chart-casting app and streams interpretations across six tabs (Fate / Relationships / Career / Wealth / Health / Personality) via SSE.
  • Core Value: Closes the loop between chart casting and interpretation within a single conversation, eliminating the need to manually copy chart data.

Installation & Activation

The example path used below is /opt/dsh/dsh-ziwei. This is a conventional path only—replace it with your own directory in actual deployments.

1) Install and start the chart-casting application

sudo git clone https://github.com/frankfurtlin/dsh-ziwei /opt/dsh/dsh-ziwei
cd /opt/dsh/dsh-ziwei/app && npm ci && npm run build

sudo cp deploy/systemd/dsh-ziwei-app.service.example /etc/systemd/system/dsh-ziwei-app.service
# Edit the service file: adjust the checkout path, NEXT_PUBLIC_SITE_URL, and node interpreter path as needed
sudo systemctl daemon-reload && sudo systemctl enable --now dsh-ziwei-app
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8815/ziwei/chart

2) Install the plugin

Click “Add Plugin” on the DSH sidebar “Plugins” page and select the absolute path to this repository, then install. Alternatively, add "dsh-ziwei": "link:<path>" to dsh.profile.dependencies, append "dsh-ziwei" to dsh.profile.bundles, and create a symbolic link in node_modules.

Typical Usage

1) Open the Zi Wei Dou Shu panel, select the date (Gregorian or lunar calendar), birth time period, gender, and true solar time, then click “Cast Chart.” The chart populates the main panel, and the interpretation panel on the right streams output across six tabs (Fate / Relationships / Career / Wealth / Health / Personality).

2) Click “Let DSH Interpret.” A new conversation is created with the chart summary pre-filled in the input box. If insertion fails, the summary is copied to the clipboard instead.

3) Birth data is stored server-side at $DSH_HOME/ziwei/birth.json. The panel’s “Birth Data N ▾” dropdown retrieves the five most recent records, and “Birth Data Management” allows full CRUD operations.

4) Click “Share” to generate a card and a link. The link carries birth parameters (e.g., ?b=1990-6-15-5&g=m). Link parameters take precedence over stored records and are never written to the server.

5) Restoring a saved birth record only restores the chart; it does not automatically generate an interpretation. Open the relevant tab manually when needed.

Configuration

Setting Default Description
DSH_ZIWEI_BIRTH_FILE $DSH_HOME/ziwei/birth.json Server-side birth data storage file, permissions 0600
DSH_ZIWEI_UPSTREAM_PORT 8815 Target port for the local reverse proxy
DSH_ZIWEI_AI_REASONING low Interpretation reasoning intensity (off/minimal/low/medium/high); low keeps first-token latency within 90 seconds
DSH_ZIWEI_AI_DEBUG unset Set to 1 to log SSE chunks from interpretation requests
DSH_HOME ~/.dsh Parent directory for birth data storage
NEXT_PUBLIC_BASE_PATH /ziwei Base path at build time; must match the proxy prefix

Interpretation requests go through ctx.llm.stream(), using whatever model is currently selected in DSH. Costs are charged against that model’s quota—no separate API key configuration is required.

Caveats

  • The plugin depends on a standalone Next.js chart-casting app running on 127.0.0.1:8815. If that service is unavailable, the panel will display an empty frame.
  • The plugin itself performs no authentication. The /ziwei/* path is protected by the DSH login gateway; all other paths return 404.
  • There is a single interpretation path: plugin /ziwei/ai → DSH default model. Legacy endpoints such as /api/interpret are not provided.
  • “Let DSH Interpret” requires at least one Workspace and relies on the browser’s execCommand to insert the draft. On failure, it falls back to the clipboard.
  • Birth data on a single instance is one JSON file with no multi-user isolation, and cross-machine sync is not yet supported.

Ecosystem Context

DeepSeek Harness (DSH) follows a “everything is a plugin” philosophy. This plugin is a community-cataloged model-inference plugin and has no official affiliation with DeepSeek or High-Flyer.

References & Downloads

  • Catalog page: https://www.skillhub.cn/plugins/frankfurtlin/dsh-ziwei
  • Repository: https://github.com/frankfurtlin/dsh-ziwei
  • License: MIT
羽毛球分组比赛记分
小程序二维码

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

Xiaoye