@framers/agentos-ext-weather 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -0
- package/manifest.json +1 -1
- package/package.json +5 -2
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Weather
|
|
2
|
+
|
|
3
|
+
This pack gives an agent current weather and forecast lookup through WeatherAPI.com with an Open-Meteo fallback. It uses `fetch` and resolves locations through the Open-Meteo Geocoding API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-weather
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` with range `>=0.10.40`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AgentOS } from '@framers/agentos';
|
|
17
|
+
|
|
18
|
+
const agentos = await AgentOS.create({
|
|
19
|
+
extensionManifest: {
|
|
20
|
+
packs: [
|
|
21
|
+
{
|
|
22
|
+
package: '@framers/agentos-ext-weather',
|
|
23
|
+
options: {
|
|
24
|
+
weatherApiKey: process.env.WEATHERAPI_KEY,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
| Option | Secret id | Environment variable | Required | Default |
|
|
35
|
+
| --- | --- | --- | --- | --- |
|
|
36
|
+
| `weatherApiKey` | `weather.weatherApiKey` | `WEATHERAPI_KEY` | no | Unset; uses Open-Meteo |
|
|
37
|
+
| `priority` | None | None | no | `50` |
|
|
38
|
+
|
|
39
|
+
The key resolves from a truthy `weatherApiKey`, then `context.getSecret('weather.weatherApiKey')`, then `WEATHERAPI_KEY`.
|
|
40
|
+
|
|
41
|
+
## Tools
|
|
42
|
+
|
|
43
|
+
| Tool | What it does |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `weather_lookup` | Returns current conditions and forecasts with temperature, humidity, wind, precipitation, UV and provider-supplied alerts. |
|
|
46
|
+
|
|
47
|
+
### `weather_lookup`
|
|
48
|
+
|
|
49
|
+
| Parameter | Type | Required | Description |
|
|
50
|
+
| --- | --- | --- | --- |
|
|
51
|
+
| `location` | string | yes | City name, zip code, or lat,lon coordinates (e.g. "Las Vegas", "90210", "36.17,-115.14") |
|
|
52
|
+
| `days` | integer, minimum `1`, maximum `14`, default `3` | no | Number of forecast days (`1` to `14`, default `3`) |
|
|
53
|
+
|
|
54
|
+
## Notes
|
|
55
|
+
|
|
56
|
+
The tool declares `capability:web_access`. It trims `location` and returns an error for an empty value. All location strings go to the geocoder's name search; the service does not separately parse zip codes or coordinate strings. A missing geocoding result fails the lookup.
|
|
57
|
+
|
|
58
|
+
With a key, the service tries WeatherAPI.com first and falls back to Open-Meteo on any WeatherAPI error. Without a key, it uses Open-Meteo. WeatherAPI requests are capped at `3` forecast days; Open-Meteo requests are capped at `16`, while the tool schema allows up to `14`. Requests have no explicit timeout in the service.
|
|
59
|
+
|
|
60
|
+
Alerts are returned only by the WeatherAPI path when present. The Open-Meteo path sets `feels_like_f` to the current temperature and uses the first forecast day's maximum UV as current UV. Results identify the provider and include both Fahrenheit and Celsius temperatures.
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
Apache-2.0
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.research.weather",
|
|
4
4
|
"name": "Weather Extension",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.3",
|
|
6
6
|
"description": "Weather lookup via WeatherAPI.com (preferred) with Open-Meteo fallback (no key required)",
|
|
7
7
|
"author": { "name": "Rabbit Hole Inc" },
|
|
8
8
|
"license": "Apache-2.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-weather",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Weather lookup via WeatherAPI.com (preferred) with Open-Meteo fallback for AgentOS",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"./manifest.json": "./manifest.json",
|
|
16
16
|
"./package.json": "./package.json"
|
|
17
17
|
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22"
|
|
20
|
+
},
|
|
18
21
|
"peerDependencies": {
|
|
19
22
|
"@framers/agentos": ">=0.10.40"
|
|
20
23
|
},
|
|
@@ -22,7 +25,7 @@
|
|
|
22
25
|
"@types/node": "^20.12.12",
|
|
23
26
|
"typescript": "^5.4.5",
|
|
24
27
|
"vitest": "^3.2.7",
|
|
25
|
-
"@framers/agentos": "^0.
|
|
28
|
+
"@framers/agentos": "^0.14.25"
|
|
26
29
|
},
|
|
27
30
|
"repository": {
|
|
28
31
|
"type": "git",
|