Skip to content

Releases

v0.4.1 — localize the daily UV level

Choose a tag to compare

@whaoran1018-cmd whaoran1018-cmd released this 04 Oct 18:04

Fixed

Daily forecast rows showed their UV level in English regardless of the configured language — a Chinese
summary read 紫外线 6.1 (High) instead of 紫外线 6.1(高). The Open-Meteo daily mapping called
uvLevel(value) without passing the language; current conditions, air quality and wind labels were already
fine. One-line fix, visible in daily[].uvLevel.label.

Guarded against repeats

test/i18n-test.mjs now enforces a locale invariant on live results: every {key,label} value the
providers emit —

  • current.uvLevel / current.windDirection
  • daily[].uvLevel / daily[].windDirectionLabel
  • airQuality.usAqiCategory / airQuality.europeanAqiCategory

— is compared against the locale table for the requested language. A forgotten language argument now fails
the test suite instead of silently leaking English into a localized summary. 177 checks live.

Full changelog: CHANGELOG.md

v0.4.0 — nine languages (中文 · English · Español · 日本語 · 한국어 · Português · Italiano · Français · Deutsch)

Choose a tag to compare

@whaoran1018-cmd whaoran1018-cmd released this 04 Oct 17:41

Nine languages

The summary is now fully localized — weather descriptions, all 16 compass points, UV levels, US/EU AQI
categories, weekdays, every label, note and error message.

Code Language Code Language Code Language
zh 中文 ko 한국어 it Italiano
en English (default) pt Português fr Français
es Español ja 日本語 de Deutsch

Pick it wherever it suits you:

  • DSH plugin config — language: ja
  • Per call — get_weather { "location": "上海", "language": "de" }
  • MCP — WEATHER_LANG=es in the server's env
  • CLI — dsh-weather 上海 --lang ko

Aliases work too (zh-CN, pt_BR, ES, …) and anything unrecognized falls back to English.

Machine-readable output stays stable

JSON keys remain English, and every localized value ships with a stable key:

{ "uvLevel": { "key": "low", "label": "低" },
  "usAqiCategory": { "key": "moderate", "label": "中等" },
  "windDirection": { "compass": "NNW", "label": "西北偏北" } }

Fixed: cross-script place lookup

Open-Meteo's geocoder only finds names such as 上海 with a CJK language (and 서울 with Korean), so
looking up a Chinese city while the summary language was German/English used to end in
"no place found". The lookup now falls back across scripts (requested → en → zh → ja → ko) instead of
giving up, and localized summaries no longer leak English labels into daily/hourly rows.

Also in this release

  • lib/i18n.js + lib/locales/<code>.js catalogs with an English fallback for anything missing.
  • Default summary language is now en (was zh); the shipped cordis.patch.yml still pins zh.
  • Tool descriptions are English-first with Chinese keywords, for mixed-language agent pools.
  • New test/i18n-test.mjs (171 checks): key/order/placeholder parity against en.js, value-table
    completeness, fixture rendering in all nine languages, plus live rendering, override and fallback.
  • CI runs the locale suite offline on Node 20/22 (blocking) and live on main/schedule (advisory).

Full changelog: CHANGELOG.md

v0.3.0 — one core, four surfaces (DSH + MCP + CLI)

Choose a tag to compare

@whaoran1018-cmd whaoran1018-cmd released this 04 Oct 17:08

One core, four surfaces

The weather logic was already agent-agnostic; this release adds the registration layers the other
agents need — all reading the same tool definitions (lib/harness.js), so behaviour cannot drift
between surfaces.

Surface Entry point Works with
DSH plugin cordis.patch.yml + lib/index.js DeepSeek Harness
MCP server (stdio) bin/mcp-server.mjs (dsh-weather-mcp) Claude Code, Codex CLI, Cursor, Windsurf, Gemini CLI, Cline, Zed, DSH
One-shot CLI bin/cli.mjs (dsh-weather) any command-running agent (Aider, Codex exec, Claude Code Bash tool, CI, cron)
Tool schemas bin/schemas.mjs, schema/*.json OpenAI / Anthropic function calling

Install

DeepSeek Harness

plugin_manager { "action": "install_bundle", "target": "github:whaoran1018-cmd/dsh-plugin-weather" }

Claude Code

claude mcp add dsh-weather -- node /absolute/path/to/dsh-plugin-weather/bin/mcp-server.mjs

Codex CLI — ~/.codex/config.toml

[mcp_servers.dsh-weather]
command = "node"
args = ["/absolute/path/to/dsh-plugin-weather/bin/mcp-server.mjs"]

Cursor / Windsurf / Cline / Gemini CLI — the same mcpServers block in their settings file
(see the README section Use it with other agents).

Any agent that can run a command

npm i -g github:whaoran1018-cmd/dsh-plugin-weather
dsh-weather 上海 --days 7 --json

What the tools return

  • Current: temperature, feels-like, humidity, dew point, UV index + level, sunrise/sunset/daylight,
    16-point wind direction + degrees + speed + gusts, precipitation, cloud cover, pressure, WMO description
  • Air quality: PM2.5, PM10, O₃, NO₂, SO₂, CO, US AQI and European AQI, each with its category
  • Forecast: 1–16 days (min/max temperature and feels-like, precipitation probability + amount,
    max UV + level, dominant wind, sunrise/sunset per day) and hourly rows (next 48 h, or one chosen date)
  • get_weather returns a 3-day outlook by default; multi-day answers add a trend line
    (temperature range, wettest day, UV peak)

Data sources

Open-Meteo forecast + geocoding (CC BY 4.0), Open-Meteo Air Quality (CAMS),
wttr.in as a weather fallback, and three IP-location providers for the
"no location given" case. No API key, no signup, no SDK.

Verification

  • 199-check plugin self-test (offline contract + live Open-Meteo data)
  • MCP session test over real stdio JSON-RPC — handshake, tools/list, tools/call, both framings, error paths
  • CLI end-to-end test — flags, exit codes, JSON shape, live calls
  • DSH's real JSON-schema validator run against the tool schemas
  • CI: offline suites on Node 20/22 (blocking) + live suites on main/schedule/dispatch (advisory,
    because the free upstream API can be rate-limited)

Full changelog: CHANGELOG.md