mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
* fix(tools): add missing description, parameters, and improve credential prompts Silence three categories of startup warnings emitted by CapabilitiesFile::validate() and WasmToolLoader: 1. "description" field missing → add tool descriptions to all manifests 2. "parameters" field missing → add action-enum parameter schemas 3. Short credential prompts (<30 chars) → append source URLs Affects: github, gmail, google-calendar, google-docs, google-drive, google-sheets, google-slides, slack, telegram, llm-context, feishu. [skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * refactor(tools): auto-compact WASM tool schemas from module exports Replace the manual `parameters` field in capabilities JSON with automatic schema compaction. WasmToolSchemas::compact_schema() derives a compact advertised schema from the WASM module's schema() export by keeping only required and enum-constrained properties. The full schema remains available via tool_info(detail: "schema"). This eliminates: - The `parameters` field from CapabilitiesFile and all 11 sidecar JSONs - The "missing parameters" startup warning from the loader - Manual maintenance of duplicate schema data The `description` field in capabilities JSON is retained. [skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix(tests): remove cap_file.parameters reference in test_rig The parameters field was removed from CapabilitiesFile in the previous commit. Update test_rig.rs to match — schema is now auto-compacted from the WASM module export, no sidecar override needed. [skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix(tools): handle oneOf schemas in compact_schema, add tool name to warning Address PR review feedback: - compact_schema now collects properties from oneOf/anyOf/allOf variants, fixing GitHub-style schemas that have no top-level properties - Use HashSet for required lookup instead of Vec::contains - Add tool name to "Capabilities file not found" warning for consistency [skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * fix(tools): merge oneOf const values into enum, cap property collection Address review feedback from @serrrfirat: 1. Merge const values across oneOf variants into a single enum array, so the LLM sees all valid actions (not just the first variant's const). 2. Cap property collection at 100 to bound allocations. 3. Also keep properties with const constraint (single-variant case). 4. Update doc comment to describe variant collection and design choices around variant-level required fields. [skip-regression-check] Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
61 lines
1.7 KiB
JSON
61 lines
1.7 KiB
JSON
{
|
|
"version": "0.2.0",
|
|
"wit_version": "0.3.0",
|
|
"description": "Create, read, write, and format Google Sheets spreadsheets. Supports cell operations using A1 notation, sheet (tab) management, and cell formatting.",
|
|
"http": {
|
|
"allowlist": [
|
|
{
|
|
"host": "sheets.googleapis.com",
|
|
"path_prefix": "/v4/spreadsheets",
|
|
"methods": ["GET", "POST", "PUT"]
|
|
}
|
|
],
|
|
"credentials": {
|
|
"google_oauth_token": {
|
|
"secret_name": "google_oauth_token",
|
|
"location": { "type": "bearer" },
|
|
"host_patterns": ["sheets.googleapis.com"]
|
|
}
|
|
},
|
|
"rate_limit": {
|
|
"requests_per_minute": 60,
|
|
"requests_per_hour": 500
|
|
},
|
|
"timeout_secs": 30
|
|
},
|
|
"secrets": {
|
|
"allowed_names": ["google_oauth_token"]
|
|
},
|
|
"auth": {
|
|
"secret_name": "google_oauth_token",
|
|
"display_name": "Google",
|
|
"oauth": {
|
|
"authorization_url": "https://accounts.google.com/o/oauth2/v2/auth",
|
|
"token_url": "https://oauth2.googleapis.com/token",
|
|
"client_id_env": "GOOGLE_OAUTH_CLIENT_ID",
|
|
"client_secret_env": "GOOGLE_OAUTH_CLIENT_SECRET",
|
|
"scopes": [
|
|
"https://www.googleapis.com/auth/spreadsheets"
|
|
],
|
|
"use_pkce": false,
|
|
"extra_params": {
|
|
"access_type": "offline",
|
|
"prompt": "consent"
|
|
}
|
|
},
|
|
"env_var": "GOOGLE_OAUTH_TOKEN"
|
|
},
|
|
"setup": {
|
|
"required_secrets": [
|
|
{
|
|
"name": "google_oauth_client_id",
|
|
"prompt": "Google OAuth Client ID (from console.cloud.google.com/apis/credentials)"
|
|
},
|
|
{
|
|
"name": "google_oauth_client_secret",
|
|
"prompt": "Google OAuth Client Secret (from console.cloud.google.com/apis/credentials)"
|
|
}
|
|
]
|
|
}
|
|
}
|