{"_id":"@ambitionax/weather-query","_rev":"2-d755ae01bd2c9ca0076e95faae507744","name":"@ambitionax/weather-query","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.3":{"name":"@ambitionax/weather-query","version":"1.0.3","keywords":["openclaw","plugin","weather","天气","智能提醒"],"license":"MIT","_id":"@ambitionax/weather-query@1.0.3","maintainers":[{"name":"ambitionax","email":"2982147512@qq.com"}],"dist":{"shasum":"f1128593ac331d1df51f7fb98db5844ee42c6052","tarball":"https://registry.npmjs.org/@ambitionax/weather-query/-/weather-query-1.0.3.tgz","fileCount":6,"integrity":"sha512-zfCCZZ4BukMM5f8ykPMugWUAry5FqzAlKj9nMsiRFm9xCpA6AFvS/bml0oADM89dtEAc9/3XvZ3o09mtMTJW8g==","signatures":[{"sig":"MEQCICaKM/A1nn+7HIm2Obwk8mnNAQhZC62r+3IipvDJ3zD7AiBW5i0Hhhu9Hic/w5mcK+lFzFNb0K+8QUw8BYx1ybb6yg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16609},"main":"./src/index.ts","type":"module","engines":{"node":">=22"},"scripts":{"build":"tsc","setup":"node scripts/setup.mjs","postinstall":"node scripts/setup.mjs","prepublishOnly":"npm run build"},"_npmUser":{"name":"ambitionax","email":"2982147512@qq.com"},"openclaw":{"extensions":["./src/index.ts"]},"_npmVersion":"11.8.0","description":"OpenClaw 天气智能提醒插件 - 支持自定义 API 与穿衣带伞建议","directories":{},"_nodeVersion":"24.13.1","dependencies":{"openclaw":">=2026.2.0","@sinclair/typebox":"^0.34.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/weather-query_1.0.3_1774327167189_0.7538987605388012","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@ambitionax/weather-query","version":"1.0.4","description":"OpenClaw 天气智能提醒插件 - 支持自定义 API 与穿衣带伞建议","type":"module","publishConfig":{"access":"public"},"main":"./src/index.ts","openclaw":{"extensions":["./src/index.ts"]},"scripts":{"build":"tsc","setup":"node scripts/setup.mjs","postinstall":"node scripts/setup.mjs","prepublishOnly":"npm run build"},"engines":{"node":">=22"},"dependencies":{"@sinclair/typebox":"^0.34.0","openclaw":">=2026.2.0"},"devDependencies":{"typescript":"^5.0.0"},"keywords":["openclaw","plugin","weather","天气","智能提醒"],"license":"MIT","_id":"@ambitionax/weather-query@1.0.4","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-dPCfb0dEET4s5udb737S0sDBb8vq0NYUcfaXO6B/sm4O1UJLG8ak9wmu599D8PB5/Bz42s9Ps2hYSVBrAWnLiQ==","shasum":"d0794adb6ae56fb289cd41245efed8dc1f895e06","tarball":"https://registry.npmjs.org/@ambitionax/weather-query/-/weather-query-1.0.4.tgz","fileCount":6,"unpackedSize":16609,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCot2GPTnkSTsOJ3E6dh4jjXwZMCnIi7naohUXuM20epwIhAMuZfCkx/EcCBdPIz1NittB6DF2kcabsjb+jLwbUa2ql"}]},"_npmUser":{"name":"ambitionax","email":"2982147512@qq.com"},"directories":{},"maintainers":[{"name":"ambitionax","email":"2982147512@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/weather-query_1.0.4_1774327254686_0.15114376275533425"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-24T04:39:27.119Z","modified":"2026-03-24T04:40:54.950Z","1.0.3":"2026-03-24T04:39:27.337Z","1.0.4":"2026-03-24T04:40:54.847Z"},"license":"MIT","keywords":["openclaw","plugin","weather","天气","智能提醒"],"description":"OpenClaw 天气智能提醒插件 - 支持自定义 API 与穿衣带伞建议","maintainers":[{"name":"ambitionax","email":"2982147512@qq.com"}],"readme":"# OpenClaw 天气智能提醒插件\n\n提供 `get_weather` 工具，供 Agent 查询天气并生成穿衣、带伞等智能提醒。支持自定义天气 API 或免费 Open-Meteo。\n\n## 安装\n\n```bash\nopenclaw plugins install @ambitionax/weather-query\nopenclaw gateway restart\n```\n\n**可选**：`npm run build` 仅用于类型检查，运行时直接加载 `./src/index.ts`，无需预编译。\n\n## 配置\n\n在 `~/.openclaw/openclaw.json` 中启用并配置，按需选择一种方式：\n\n### 方式一：Open-Meteo（默认，免费无需 Key）\n\n不填 `apiUrl` 即使用 Open-Meteo：\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"weather-query\": {\n        \"enabled\": true,\n        \"config\": {\n          \"defaultCity\": \"北京\",\n          \"units\": \"metric\"\n        }\n      }\n    }\n  }\n}\n```\n\n### 方式二：自定义 API\n\n填写 `apiUrl`、`apiKey` 等，URL 和鉴权方式按你使用的 API 文档配置：\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"weather-query\": {\n        \"enabled\": true,\n        \"config\": {\n          \"apiUrl\": \"https://your-api.com/weather\",\n          \"apiKey\": \"your-api-key\",\n          \"cityParam\": \"city\",\n          \"authMode\": \"query\",\n          \"defaultCity\": \"北京\",\n          \"extraParams\": {}\n        }\n      }\n    }\n  }\n}\n```\n\n| 配置项 | 说明 |\n|--------|------|\n| apiUrl | 天气 API 地址（留空则用 Open-Meteo） |\n| apiKey | API Key（鉴权方式由 authMode 决定） |\n| cityParam | 城市参数名 |\n| authMode | query（URL 参数）或 header（Authorization: Bearer） |\n| defaultCity | 默认城市 |\n| extraParams | 附加参数，如 hourly、lang 等 |\n| units | metric(摄氏) / imperial(华氏) |\n\n## 每日 8:00 智能提醒（Cron）\n\n安装插件后，添加 Cron 任务实现每天 8:00 推送天气简报：\n\n```bash\nopenclaw cron add \\\n  --name \"早安天气简报\" \\\n  --cron \"0 8 * * *\" \\\n  --tz \"Asia/Shanghai\" \\\n  --session isolated \\\n  --message \"调用 get_weather 查询【北京】天气，根据温度、降水、风力、紫外线等数据，生成今日早安简报，包含：1)当前气温和体感 2)要不要带伞 3)穿衣建议(加衣/减衣/防晒) 4)其他贴心提醒。控制在150字内，语气亲切自然。\" \\\n  --model \"默认\" \\\n  --announce \\\n  --channel feishu\n```\n\n将 `--channel feishu` 和 `--to` 改为你的飞书配置。\n\n## 工具说明\n\n- **get_weather(city?, days?)**  \n  - city: 城市名，如 北京、上海  \n  - days: 预报天数 1-7，默认 1  \n\nAgent 在对话中也可直接调用，例如用户问「北京今天天气怎么样」时自动查天气并回复。\n","readmeFilename":"README.md"}