diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c411a245c..17f881c45a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - **fix(dashboard):** correct two dashboard fetches that hit non-existent routes (404) — `CustomHostsManager` called `/api/tools/traffic-inspector/custom-hosts` (the real route is `/hosts`), and `FeatureFlagsGrid`'s post-restart liveness probe called `/api/health` (the real lightweight endpoint is `/api/health/ping`). ([#3486](https://github.com/diegosouzapw/OmniRoute/issues/3486), [#3487](https://github.com/diegosouzapw/OmniRoute/issues/3487)) - **chore(providers):** remove the dead `krutrim` registry entry — it was half-registered (present in `providerRegistry.ts` with a baseUrl + one model, but absent from `providers.ts`, with no executor/translator/OAuth), so it was never selectable. Dropped its `ProviderIcon` entry and the `KNOWN_REGISTRY_ONLY` exception. ([#3483](https://github.com/diegosouzapw/OmniRoute/issues/3483)) - **docs(api):** fix the agent-bridge per-agent state route in `openapi.yaml` and `AGENTBRIDGE.md` — both documented `/api/tools/agent-bridge/agents/{id}/state`, which has no route; corrected to the real per-agent `/api/tools/agent-bridge/agents/{id}` (global state remains `/api/tools/agent-bridge/state`). ([#3489](https://github.com/diegosouzapw/OmniRoute/issues/3489)) +- **docs(api):** correct `API_REFERENCE.md` endpoints that documented non-existent routes — skills (`PUT /api/skills/[id]`, `POST`/`GET /api/skills/executions`), plugins (`[id]`→`[name]`, `activate`/`deactivate`), ACP (`DELETE`/`POST /api/acp/agents` via `?id`/`{action:"refresh"}`), cache (`DELETE /api/cache/reasoning`, `/api/cache/entries`), and removed the fabricated `/api/admin/circuit-breaker`, `/api/admin/rate-limits`, and `/api/system-info` (admin only exposes `/concurrency`). ([#3497](https://github.com/diegosouzapw/OmniRoute/issues/3497)) --- diff --git a/docs/reference/API_REFERENCE.md b/docs/reference/API_REFERENCE.md index 20d10c8b60..8fdda8372c 100644 --- a/docs/reference/API_REFERENCE.md +++ b/docs/reference/API_REFERENCE.md @@ -539,7 +539,6 @@ These endpoints mirror Gemini's API format for clients that expect native Gemini | `/api/restart` | POST | Trigger graceful server restart | | `/api/shutdown` | POST | Trigger graceful server shutdown | | `/api/system/env/repair` | POST | Repair OAuth provider environment variables | -| `/api/system-info` | GET | Generate system diagnostics report | > **Note:** These endpoints are used internally by the system or for Ollama client compatibility. They are not typically called by end users. @@ -1003,9 +1002,8 @@ registration. | Method | Path | Description | | ------ | ----------------------- | ---------------------------------------------------------------------------------------- | | GET | `/api/acp/agents` | List all known CLI agents (built-in + custom) with installation status, version, binary | -| POST | `/api/acp/agents` | Register a custom ACP agent — body: `{id, name, binary, versionCommand, providerAlias, spawnArgs, protocol}` | -| DELETE | `/api/acp/agents/[id]` | Remove a custom ACP agent | -| POST | `/api/acp/agents/refresh` | Force refresh of the agent detection cache (60s TTL) | +| POST | `/api/acp/agents` | Register a custom ACP agent or refresh cache — body: `{id, name, binary, versionCommand, providerAlias, spawnArgs, protocol}` or `{action: "refresh"}` | +| DELETE | `/api/acp/agents` | Remove a custom ACP agent — query param: `?id=` | **Response example** (`GET /api/acp/agents`): @@ -1148,10 +1146,6 @@ Admin-only endpoints for operational management. | ------ | ------------------------------- | ---------------------------------------------------------------------------------------------- | | GET | `/api/admin/concurrency` | Read current concurrency limits (global + per-provider) | | POST | `/api/admin/concurrency` | Update concurrency limits — body: `{global?: number, perProvider?: Record}` | -| GET | `/api/admin/circuit-breaker` | Read circuit breaker states for all providers | -| POST | `/api/admin/circuit-breaker/reset` | Manually reset a circuit breaker — body: `{providerId}` | -| GET | `/api/admin/rate-limits` | Read current rate limit configurations | -| POST | `/api/admin/rate-limits` | Update rate limit configs — body: `{providerId, requestsPerMinute, tokensPerMinute}` | **Auth:** Requires management session with admin scope. @@ -1206,8 +1200,7 @@ Manage the semantic cache and reasoning cache. | DELETE | `/api/cache/entries` | Delete cache entries (filter by query parameters) | | GET | `/api/cache/stats` | Detailed cache statistics (per-provider, per-model) | | GET | `/api/cache/reasoning` | Reasoning cache status (for reasoning replay) | -| POST | `/api/cache/reasoning/clear` | Clear reasoning cache | -| POST | `/api/cache/clear` | Clear all cache entries | +| DELETE | `/api/cache/reasoning` | Clear reasoning cache — query params: `?toolCallId=` (single) or `?provider=

` or no params (all) | **Auth:** Requires management session. @@ -1262,10 +1255,9 @@ Manage Skills (the agentic extensions framework). | GET | `/api/skills` | List all installed skills (built-in + custom) | | POST | `/api/skills/install` | Install a skill from a local path or URL | | DELETE | `/api/skills/[id]` | Uninstall a skill | -| POST | `/api/skills/[id]/enable` | Enable a disabled skill | -| POST | `/api/skills/[id]/disable` | Disable an enabled skill | -| POST | `/api/skills/[id]/execute` | Execute a skill with input | -| GET | `/api/skills/[id]/executions` | List execution history for a skill | +| PUT | `/api/skills/[id]` | Enable or disable a skill — body: `{enabled?: boolean, mode?: "on" \| "off" \| "auto"}` | +| POST | `/api/skills/executions` | Execute a skill — body: `{skillName, apiKeyId, input?, sessionId?}` | +| GET | `/api/skills/executions` | List execution history for all skills (filter by `?apiKeyId=`) | **Auth:** Requires management session or management-scoped API key. @@ -1281,11 +1273,11 @@ Manage OmniRoute plugins (third-party extensions). | ------ | --------------------------------- | -------------------------------------------------------------------------------------------- | | GET | `/api/plugins` | List installed plugins | | POST | `/api/plugins/install` | Install a plugin from a local path or URL | -| DELETE | `/api/plugins/[id]` | Uninstall a plugin | -| POST | `/api/plugins/[id]/enable` | Enable a disabled plugin | -| POST | `/api/plugins/[id]/disable` | Disable an enabled plugin | -| GET | `/api/plugins/[id]/config` | Get plugin configuration | -| PUT | `/api/plugins/[id]/config` | Update plugin configuration | +| DELETE | `/api/plugins/[name]` | Uninstall a plugin | +| POST | `/api/plugins/[name]/activate` | Activate a plugin | +| POST | `/api/plugins/[name]/deactivate` | Deactivate a plugin | +| GET | `/api/plugins/[name]/config` | Get plugin configuration | +| PUT | `/api/plugins/[name]/config` | Update plugin configuration | **Auth:** Requires management session. diff --git a/scripts/check/check-docs-symbols.mjs b/scripts/check/check-docs-symbols.mjs index e1ae41f3c9..54079a5164 100644 --- a/scripts/check/check-docs-symbols.mjs +++ b/scripts/check/check-docs-symbols.mjs @@ -50,31 +50,17 @@ function isFileRef(p) { // o path na doc, ou remover a menção. NÃO adicione novas aqui sem justificativa — esse // é o ponto do gate. Issues de tracking devem ser abertas para cada cluster. export const KNOWN_STALE_DOC_REFS = new Set([ - // docs/reference/API_REFERENCE.md — tabela de endpoints com várias rotas obsoletas: - "/api/acp/agents/[id]", // só existe /api/acp/agents (sem [id]) - "/api/acp/agents/refresh", // sem rota /refresh - "/api/admin/circuit-breaker", // admin só tem /concurrency - "/api/admin/circuit-breaker/reset", // idem - "/api/admin/rate-limits", // idem - "/api/cache/clear", // cache usa DELETE em /api/cache, não /clear - "/api/cache/reasoning/clear", // /api/cache/reasoning existe; /clear não - "/api/guardrails", // sem dir de API guardrails (feature server-side, sem rota REST) + // docs/reference/API_REFERENCE.md — guardrails/shadow entries fixed in separate issues: + "/api/guardrails", // sem dir de API guardrails (feature server-side, sem rota REST) — #3496 "/api/guardrails/[id]/disable", "/api/guardrails/[id]/enable", "/api/guardrails/logs", "/api/guardrails/test", - "/api/plugins/[id]/disable", // rota real usa [name] + activate/deactivate - "/api/plugins/[id]/enable", // idem - "/api/shadow", // sem dir de API shadow (shadow routing não tem rota REST) + "/api/shadow", // sem dir de API shadow (shadow routing não tem rota REST) — #3498 "/api/shadow/[id]", "/api/shadow/[id]/results", "/api/shadow/metrics", - "/api/skills/[id]/disable", // skills tem [id] e /executions (base), não estas sub-ações - "/api/skills/[id]/enable", - "/api/skills/[id]/execute", - "/api/skills/[id]/executions", - "/api/system-info", // sem rota /system-info - // docs/research/DISCOVERY_TOOL_DESIGN.md — design doc de feature NÃO implementada: + // docs/research/DISCOVERY_TOOL_DESIGN.md — design doc de feature NÃO implementada: — #3498 "/api/discovery/results", "/api/discovery/results/:id", "/api/discovery/scan",