DeepSeek Harness Plugin

ifyr/dsh-daily-fortune

Stars ★ 0 Downloads (30d) 550 Category Just for Fun Added 2026-11-25 npm dsh-daily-fortune

Turns the empty DSH home screen into a today card: lunar date with the sexagenary day, the day officer (建除) and the day deity, plus ten optional five-star daily readings — health, career, marriage, children, travel, wealth, parents, benefactors, study and romance — scored from the saved four pillars against the day's sexagenary rules. One grey line carries up to four of seven chosen fields (auspicious hours, direction, colour, number, food, gemstone, what to avoid). Birth data stays in local storage, each day is computed once and cached, and the almanac engine ships as a client chunk with no network access.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-daily-fortune

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:ifyr/dsh-daily-fortune

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Turn the DeepSeek Harness home screen into a daily almanac: lunar date, sexagenary day, 12 officers, solar term countdown — plus ten star-rated life areas scored from your own four pillars and today's day pillar.

Same birth moment + same date always produce the same stars. The scores are a fixed rule table, not a language model, and the card never predicts anything.

home page

No birth data yet? The card still shows the calendar facts and asks for a birthday:

no birth data

All ten areas shown at once (three rows):

ten areas

Settings live behind the ⚙ at the card's bottom-right corner (birth data, which life areas to show, which footer fields to show):

settings

中文说明见 README.md。

What it does

  • Replaces the empty-hero headline with a single card above the composer, the same width as the input box. It only renders on the home screen, not inside conversations.
  • Ten life areas: health, career, love, children, travel, wealth, parents, benefactor, study, romance. Eight are shown by default in two rows; you can pick any subset of up to ten in settings.
  • Every area gets 1–5 stars with half-star steps (drawn by clipping a star glyph, so a half star is a real 40% fill).
  • One grey footer line, up to four of these seven fields, always in this order: auspicious hours · direction · colour · number · food · gemstone · what to avoid today.
  • One daily computation: the card caches the day's result in localStorage and only recomputes when the date or the birth data changes.

Install

Published on npm:

dsh plugin add dsh-daily-fortune

On DSH Desktop the profile is managed by the app, so add it from Settings → Plugins (search "运程" once the market listing is live) instead of the CLI.

Manual install into a profile ($DSH_HOME/profiles/<name>) — for local development:

  1. pnpm add "link:/path/to/dsh-daily-fortune"
  2. add "dsh-daily-fortune" to dsh.profile.bundles in that profile's package.json
  3. restart DSH Desktop.

Adding the package to bundles is required: a profile's own cordis.patch.yml can only patch entries that already exist, so a flat - id: daily-fortune there fails with patch: entry "daily-fortune" not found. The package's own cordis.patch.yml carries the - insert: entry.

Restart is mandatory — the profile plugin tree is assembled at boot, not hot-reloaded.

How the stars are computed

Everything starts from your day master (the heavenly stem of your birth day) and only adds or subtracts:

Signal Source Effect
Ten gods today's stem vs your day master one step per area, e.g. 正官 helps career, 劫财 hurts wealth and love
Gender the toggle in settings male: 正财 adds love, 官杀 adds children; female: 正官 adds love, 食伤 adds children
Branch relations today's branch vs your year/month/day/hour branches 六合/半合 add, 冲/刑/害/破 subtract, weighted by pillar (day 1.0, month 0.8, hour 0.6, year 0.5); a 冲 on your day branch helps travel (+0.25, motion)
Travel horse your year/day branch's 驿马 vs today's branch hit: travel +0.75, career +0.25
Nobleman your day stem's 天乙 vs today's branch hit: benefactor +0.75
12 officers today 成/开/收 add, 破/危/闭 subtract (and further cut travel)
Day god today's yellow/black path yellow adds, black subtracts
Five elements today's stem element vs your day master generating/being generated/controlling/being controlled each lean differently; generating leans children, travel, wealth; being generated adds parents and study
文昌 / 桃花 your day stem's 文昌, your year/day branch's 咸池 hit: study / romance +0.6

Each area has its own base so all ten sit around 3 stars, without flipping any direction. The result is clamped to 1–5 and rounded to 0.5. All tables live in client.js (DOMAINS, TEN_GOD_SCORE, GENDER_SCORE, REL_SCORE, ZHIXING_SCORE, ELEM_SCORE).

Direction is your personal wealth direction: the compass direction of the element your day master controls (我克为财). It does not drift day to day and does not use 喜用神.

Colour, number, food, gemstone follow today's day-stem element — unless that element controls your day master (官杀), in which case they use the element that generates you (化杀). So these four change daily and depend on you: the same date yields a different colour for a different day master.

Today's avoid list keeps the heaviest single item from each of 冲/刑/害/破, then folds in ten-god, officer, day-god and "weakest areas" signals, and shows the top two.

Privacy

Birth data never leaves the machine. It is stored in localStorage under dsh-daily-fortune.birth.v1; preferences under dsh-daily-fortune.prefs.v1; the day's cached reading under dsh-daily-fortune.day.v2 (with a version and area-count check, so stale caches are dropped after an upgrade).

Limits

  • The almanac layer was compared field by field against the upstream dsh-metaphysics engine for every day from 2020-01-01 to 2030-12-31 (4018 days, 15 fields) — zero differences — and 126 birth moments for the four pillars.
  • Four pillars use 立春 for the year, solar terms for the month, 23:00 late-zi day change, and the five-rat hour rule; optional true solar time (longitude + equation of time) and automatic 1986–1991 China DST correction.
  • The stars are arithmetic from a rule table. They are not predictions and not advice: a low star means "don't push this today", nothing more.
  • Full daily 吉神凶煞 and 彭祖百忌 are not included; the upstream engine marks what it does not cover rather than inventing it.

Development

pnpm install            # only for the dev tools (react for static rendering)
node tools/build.mjs    # dist/engine.js (IIFE, tests) + client.engine.js (host chunk)
npm test                # client-smoke / chunk-load / slot-priority / render
node test/parity.mjs    # compare against upstream dsh-metaphysics; skips if not present
node tools/calibrate.mjs
node tools/preview.mjs  # writes preview.html for a quick layout check

Set DSH_METAPHYSICS_ENGINE to point at an upstream engine/ directory to run the parity check, DSH_REACT_ROOT to reuse an existing react/react-dom install, CHROME_BIN for the screenshot helpers.

client.engine.js must stay at the package root: the host resolves plugin chunks as client.<name>.js next to the plugin entry and hands them to the plugin via require.async, so the engine ships with the plugin and needs no build step on install.

Structure

index.js            host-side stub (export function apply() {})
client.js           web client: card, scoring rules, settings dialog, CSS
client.engine.js    bundled almanac engine (a window.__ModuleLoader__ chunk)
src/engine/         upstream MIT engine copy (calendar/lunar/almanac/…)
src/fourpillars.js  four pillars, computed from calendar primitives
tools/build.mjs     minimal ESM → IIFE bundler
test/               smoke, chunk loading, slot priority, real-React render, parity

License

MIT. The almanac engine under src/engine/ is derived from the dsh-metaphysics plugin (MIT); its copyright notice is kept in LICENSE.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.