Files
ironclaw/tools-src/github/github-tool.capabilities.json
Guille 653801700e feat: add fork action to github tool (#2139)
feat: add fork_repo action to GitHub WASM tool

Adds fork_repo action with full input validation, optional organization/name/default_branch_only params. CI failures are pre-existing (RUSTSEC-2026-0098 in rustls-webpki transitive dep, unrelated to this PR).
2026-04-22 10:54:42 +03:00

120 lines
3.5 KiB
JSON

{
"version": "0.2.3",
"wit_version": "0.3.0",
"description": "Manage GitHub repositories, issues, pull requests, search, branches, file reads and writes, releases, and workflows.",
"discovery_summary": {
"always_required": [
"action"
],
"conditional_requirements": [
"Repository-scoped actions require `owner` and `repo`.",
"Search actions require `query`.",
"File write actions require `path` and `message`; updates additionally need `sha`.",
"Workflow dispatch requires `workflow_id` and `ref`.",
"Branch creation requires `branch` and `from_ref`."
],
"notes": [
"Use `tool_info(name: \"github\", detail: \"schema\")` for the full action schema before guessing fields.",
"Supported families: repositories, issues, pull requests, reviews/comments, search, branches, code reads, file writes, releases, workflow dispatch/runs, and webhook normalization.",
"Not supported yet: labels, milestones, projects, org/team admin, GraphQL, release asset uploads, and repository deletion."
],
"examples": [
{
"action": "create_repo",
"name": "infra-playground",
"private": true,
"auto_init": true
},
{
"action": "search_code",
"query": "repo:nearai/ironclaw tool_info",
"limit": 5
},
{
"action": "create_or_update_file",
"owner": "nearai",
"repo": "ironclaw",
"path": "docs/example.txt",
"message": "docs: add example",
"content": "Hello from IronClaw"
}
]
},
"capabilities": {
"webhook": {
"hmac_secret_name": "github_webhook_secret",
"hmac_signature_header": "x-hub-signature-256",
"hmac_prefix": "sha256="
},
"http": {
"allowlist": [
{
"host": "api.github.com",
"path_prefix": "/",
"methods": [
"GET",
"POST",
"PUT",
"DELETE"
]
}
],
"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_*"
]
}
},
"auth": {
"secret_name": "github_token",
"display_name": "GitHub",
"provider": "github",
"oauth": {
"authorization_url": "https://github.com/login/oauth/authorize",
"token_url": "https://github.com/login/oauth/access_token",
"client_id_env": "GITHUB_OAUTH_CLIENT_ID",
"client_secret_env": "GITHUB_OAUTH_CLIENT_SECRET",
"scopes": [
"repo",
"workflow",
"read:org"
],
"use_pkce": false
},
"instructions": "Create a Personal Access Token at github.com/settings/tokens with scopes: repo, workflow, read:org. Then paste it here.",
"setup_url": "https://github.com/settings/tokens",
"token_hint": "Starts with 'ghp_' or 'github_pat_'",
"env_var": "GITHUB_TOKEN",
"validation_endpoint": {
"url": "https://api.github.com/user",
"method": "GET",
"success_status": 200,
"headers": {
"Accept": "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28"
}
}
},
"config": {
"default_limit": 30,
"max_limit": 100
}
}