mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
Add setup.required_secrets to tool capabilities.json files so users can configure OAuth client credentials (Google, Slack, Okta, Telegram) through the Extensions UI Setup modal instead of environment variables. - Add ToolSetupSchema/ToolSecretSetupSchema types to capabilities_schema.rs - Extend get_setup_schema(), save_setup_secrets(), list() to handle WasmTool - Extract load_tool_capabilities() helper to reduce duplication - Auto-activate tools after saving setup secrets - Show display_name labels (Channel/Tool/MCP) in extension cards - Update button labels: "Setup" when unconfigured, "Reconfigure" when set - Replace "Set" badge with checkmark in configure modal - Fix innerHTML XSS pattern in slash autocomplete (use textContent) - Add tests for ToolSetupSchema parsing and resolve_nested promotion - Update registry display names (e.g. "Telegram Channel" vs "Telegram Tool") Co-authored-by: Claude Sonnet 4.6 <[email protected]>
63 lines
1.8 KiB
JSON
63 lines
1.8 KiB
JSON
{
|
|
"http": {
|
|
"allowlist": [
|
|
{
|
|
"host": "slack.com",
|
|
"path_prefix": "/api/",
|
|
"methods": ["GET", "POST"]
|
|
}
|
|
],
|
|
"credentials": {
|
|
"slack_bot_token": {
|
|
"secret_name": "slack_bot_token",
|
|
"location": { "type": "bearer" },
|
|
"host_patterns": ["slack.com"]
|
|
}
|
|
},
|
|
"rate_limit": {
|
|
"requests_per_minute": 50,
|
|
"requests_per_hour": 1000
|
|
},
|
|
"timeout_secs": 30
|
|
},
|
|
"secrets": {
|
|
"allowed_names": ["slack_bot_token"]
|
|
},
|
|
"auth": {
|
|
"secret_name": "slack_bot_token",
|
|
"display_name": "Slack",
|
|
"oauth": {
|
|
"authorization_url": "https://slack.com/oauth/v2/authorize",
|
|
"token_url": "https://slack.com/api/oauth.v2.access",
|
|
"client_id_env": "SLACK_OAUTH_CLIENT_ID",
|
|
"client_secret_env": "SLACK_OAUTH_CLIENT_SECRET",
|
|
"scopes": [
|
|
"chat:write",
|
|
"channels:read",
|
|
"channels:history",
|
|
"groups:read",
|
|
"groups:history",
|
|
"reactions:write",
|
|
"users:read"
|
|
],
|
|
"use_pkce": false
|
|
},
|
|
"instructions": "1. Create a Slack App at https://api.slack.com/apps\n2. Add Bot Token Scopes under OAuth & Permissions:\n chat:write, channels:read, channels:history, groups:read,\n groups:history, reactions:write, users:read\n3. Install the app to your workspace\n4. Copy the Bot User OAuth Token (starts with xoxb-)",
|
|
"setup_url": "https://api.slack.com/apps",
|
|
"token_hint": "Starts with 'xoxb-'",
|
|
"env_var": "SLACK_BOT_TOKEN"
|
|
},
|
|
"setup": {
|
|
"required_secrets": [
|
|
{
|
|
"name": "slack_oauth_client_id",
|
|
"prompt": "Slack OAuth Client ID (from api.slack.com/apps)"
|
|
},
|
|
{
|
|
"name": "slack_oauth_client_secret",
|
|
"prompt": "Slack OAuth Client Secret"
|
|
}
|
|
]
|
|
}
|
|
}
|