/** * Weather API Skill - Fetches current weather data from OpenWeatherMap. * * Tier 2 built-in skill: requires WEATHER_API_KEY environment variable. * Uses the OpenWeatherMap API to retrieve current weather conditions * for a specified location. */ import { SkillBase } from '../SkillBase.js'; import type { SkillToolDefinition, SkillPromptSection, SkillConfig, ParameterSchemaEntry } from '../SkillBase.js'; /** * Fetches current weather data from OpenWeatherMap for any location worldwide. * * Tier 2 built-in skill. Requires the `WEATHER_API_KEY` environment variable * containing a valid OpenWeatherMap API key (obtainable at openweathermap.org). * Supports metric, imperial, and standard temperature units via the `units` * config option. The `api_key` config value takes precedence over the * environment variable when both are set. * * **Provider note:** The Python reference SDK uses WeatherAPI.com * (`api.weatherapi.com/v1/current.json`). This TypeScript skill uses * OpenWeatherMap (`api.openweathermap.org/data/2.5/weather`). These providers * use different API key formats — a WeatherAPI.com key will NOT work here. * Obtain an OpenWeatherMap key at https://openweathermap.org/api. * * **Unit aliases:** For migration compatibility with the Python SDK the `units` * config also accepts `"fahrenheit"` (normalized to `"imperial"`) and * `"celsius"` (normalized to `"metric"`). * * @example * ```ts * agent.addSkill('weather_api', { units: 'imperial' }); * // or pass the key explicitly: * agent.addSkill('weather_api', { api_key: process.env.WEATHER_API_KEY }); * ``` */ export declare class WeatherApiSkill extends SkillBase { static SKILL_NAME: string; static SKILL_DESCRIPTION: string; static REQUIRED_ENV_VARS: readonly string[]; static SUPPORTS_MULTIPLE_INSTANCES: boolean; /** * Validates that an API key is available either via inline config or the * `WEATHER_API_KEY` environment variable. Fails fast (returns `false`) when * neither source provides a key — matching Python SDK behaviour where * `_validate_config()` raises on construction when `api_key` is absent. * @returns `true` if a key is present, `false` otherwise. */ setup(): Promise; static getParameterSchema(): Record; /** @returns A single weather tool (configurable name) that fetches current weather for a location. */ getTools(): SkillToolDefinition[]; protected _getPromptSections(): SkillPromptSection[]; } /** * Factory function for creating WeatherApiSkill instances. * @param config - Optional skill configuration. * @returns A new WeatherApiSkill instance. */ export declare function createSkill(config?: SkillConfig): WeatherApiSkill;