dshbase

插件目录 / Network / dsh-weather

dsh-weather

已验证 · 实测可装 sunshine-lang

✓ 持续维护 基于 3 个官方 DSH 包 纯 TypeScript

查看 GitHub ↗ ← 返回插件目录

7Stars
1Forks
2未关闭 issue
TypeScript语言
2026-08-14最近推送
跨平台平台

功能简介

天气工具:当前与多日预报,无需 API 密钥

✅
我们的评价
可用 — 实测通过,早期项目

天气工具:当前与多日预报,无需 API 密钥 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-weather

English | 中文

DeepSeek Harness 天气工具:查询任意城市或地点的实时天气与多日预报,数据来自 Open-Meteo——免费、无需 API key、无需注册。

功能特性

  • get_weather 工具:实时温度、体感温度、湿度、风速与天气状况。
  • 可选多日预报(最多 7 天):每日最高/最低温度与天气状况。
  • 支持摄氏 / 华氏温度单位。
  • 无需 API key;数据来源:Open-Meteo。

安装

从 GitHub 安装

dsh plugin --profile web add "github:sunshine-lang/dsh-weather"

然后重启 dsh --profile web。lib/ 已预构建并提交,安装无需构建权限。

从 npm 安装

dsh plugin --profile web add dsh-weather

从本地源码安装(开发)

dsh plugin --profile web add ./dsh-weather

注意:pnpm 对 link: 方式的本地依赖不会自动安装其依赖,需要手动添加到 profile(通过 registry 或 GitHub 安装则会自动处理):

dsh plugin --profile web add @deepseek-ai/dsh-tools @deepseek-ai/cordis @deepseek-ai/schemastery

验证

dsh --profile web --dump-config   # 应能看到 "# == dsh-weather" 层

使用方法

启动 Web UI 后,向模型提问,例如:

上海现在天气怎么样?

查一下东京的天气,用华氏度,并给出 3 天预报。

模型会调用 get_weather:参数 location(必填),可选 units(celsius | fahrenheit)和 days(1–7)。

配置

可通过 cordis.patch.yml 或 profile 的 patch 层覆盖任意配置项:

- patch:
    - id: dsh-weather
      config:
        defaultUnits: fahrenheit
        timeoutMs: 15000
        maxForecastDays: 5
配置项 默认值 含义
defaultUnits celsius 模型未传 units 时使用的温度单位
timeoutMs 10000 每次天气 API 调用的超时时间(毫秒)
maxForecastDays 7 days 参数的上限(1–7)

配置无效时插件加载会直接失败,并给出可操作的错误信息。

开发

pnpm install
pnpm build        # tsc → lib/

在 DeepSeek Harness 仓库内构建(类型解析指向工作区源码)时,改用 tsconfig.local.json:tsc -p tsconfig.local.json。

同作者更多插件

该作者的全部 DeepSeek Harness 插件(统一入口):dsh-plugins

许可证

MIT。天气数据 © Open-Meteo。

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-weather」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

Web profile:

dsh plugin --profile web add dsh-weather

Headless(CLI)profile:

dsh plugin --profile headless add dsh-weather

包信息

npm:dsh-weather · 版本 — · 实测环境 dsh 0.1.0-rc.6

实测报告

端到端验证通过:dsh 0.1.0-rc.6 上 L1 安装 + L2 加载 + L3 运行问答。

使用场景

给 agent 网络能力——请求、API、代理或协议——让它能触达外部系统。

适合谁

任务涉及网络的人——调 API、抓资源或与远端服务通信。

二次开发建议

适配器和请求整形是缝——加协议、鉴权处理器、重试和端点抽象。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Network 里更多

浏览全部 7797 个插件 →