mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
* feat(cli): add `tool setup` command + GitHub setup schema - Add `ironclaw tool setup <name>` CLI command that reads `setup.required_secrets` from a tool's capabilities file and prompts the user for each secret, saving them to the encrypted secrets store. Handles already-configured secrets (ask to replace), optional secrets (skip on empty), and hidden input. - Add `setup.required_secrets` to GitHub tool capabilities file with `github_token` — the only WASM tool that was missing it after PR #437 added setup schemas to all other tools. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * refactor(cli): extract init_secrets_store helper + add tool name validation Address PR review feedback: - Extract duplicated secrets store initialization (~50 lines) from auth_tool and setup_tool into shared init_secrets_store() helper - Add validate_tool_name() to reject path traversal in tool names (applies to both auth_tool and setup_tool) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
49 lines
926 B
JSON
49 lines
926 B
JSON
{
|
|
"capabilities": {
|
|
"http": {
|
|
"allowlist": [
|
|
{
|
|
"host": "api.github.com",
|
|
"path_prefix": "/",
|
|
"methods": [
|
|
"GET",
|
|
"POST"
|
|
]
|
|
}
|
|
],
|
|
"credentials": {
|
|
"github_token": {
|
|
"secret_name": "github_token",
|
|
"location": {
|
|
"type": "bearer"
|
|
},
|
|
"host_patterns": [
|
|
"api.github.com"
|
|
]
|
|
}
|
|
},
|
|
"rate_limit": {
|
|
"requests_per_minute": 60,
|
|
"requests_per_hour": 3600
|
|
}
|
|
},
|
|
"secrets": {
|
|
"allowed_names": [
|
|
"github_token",
|
|
"github_*"
|
|
]
|
|
}
|
|
},
|
|
"setup": {
|
|
"required_secrets": [
|
|
{
|
|
"name": "github_token",
|
|
"prompt": "GitHub Personal Access Token (from github.com/settings/tokens)"
|
|
}
|
|
]
|
|
},
|
|
"config": {
|
|
"default_limit": 30,
|
|
"max_limit": 100
|
|
}
|
|
} |