feat: añadir tools wikipedia_search y exchange_rate
- tools/wikipedia/wikipedia.go: tool wikipedia_search que consulta la API pública de Wikipedia (sin auth). Devuelve resumen del artículo. - tools/exchange/exchange.go: 4 tools de tipo de cambio usando exchangerate-api.com: exchange_rate_get, exchange_rate_convert, exchange_rate_list, exchange_rate_historical. - internal/config/schema.go: añadir ExchangeRateToolCfg con Enabled, APIKey, APIKeyEnv y Timeout. - devagents/registry_build.go: registrar ambas tool families. wikipedia_search siempre disponible; exchange rate tools requieren APIKey configurado (deny-by-default con WARN si falta). - devagents/registry_build_test.go: actualizar test de registry build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -164,6 +164,7 @@ type ToolsCfg struct {
|
||||
SharedKnowledge SharedKnowledgeToolCfg `yaml:"shared_knowledge"`
|
||||
Skills SkillsToolCfg `yaml:"skills"`
|
||||
IMDb IMDbToolCfg `yaml:"imdb"`
|
||||
ExchangeRate ExchangeRateToolCfg `yaml:"exchange_rate"`
|
||||
}
|
||||
|
||||
type MatrixToolCfg struct {
|
||||
@@ -438,6 +439,13 @@ type IMDbToolCfg struct {
|
||||
Timeout time.Duration `yaml:"timeout"` // timeout for API requests (default: 10s)
|
||||
}
|
||||
|
||||
type ExchangeRateToolCfg struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
APIKey string `yaml:"api_key"` // ExchangeRate-API key (get from https://www.exchangerate-api.com)
|
||||
APIKeyEnv string `yaml:"api_key_env"` // env var name for API key (e.g., "EXCHANGE_RATE_API_KEY")
|
||||
Timeout time.Duration `yaml:"timeout"` // timeout for API requests (default: 10s)
|
||||
}
|
||||
|
||||
// ── Special Agents ────────────────────────────────────────────────────────
|
||||
|
||||
// SpecialConfig is the root configuration for a special agent (no Matrix identity).
|
||||
|
||||
Reference in New Issue
Block a user