mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-20 06:02:14 +03:00
The pool tools (omniroute_pool_status/sessions/reset/warm/health) shipped in open-sse/mcp-server/tools/poolTools.ts but were never imported or registered in server.ts, so they were defined-but-dead — the PR4 observability step of the #3368 web-session roadmap was one wiring step from live. Wire them through the standard registration loop (import + tool-count tally + RESERVED_MCP_NAMES + Object.values(poolTools).forEach), add per-tool scopes (read:health for status/sessions/health, write:resilience for reset/warm) to both the inline tool defs and the canonical MCP_TOOL_SCOPES map. The forEach is typed structurally (no new no-explicit-any) since the shape is pinned by tests. Tests: extend mcp-tool-collections-shape with poolTools; add a dedicated guard pinning the server.ts wiring (import/registration/reserved-name), the scope contract (inline == MCP_TOOL_SCOPES, all in MCP_SCOPE_LIST), and live handler behavior against the in-memory PoolRegistry.
This commit is contained in:
committed by
GitHub
parent
51642dcc99
commit
eb48e4d953
@@ -65,6 +65,13 @@ export const MCP_TOOL_SCOPES: Record<string, readonly McpScope[]> = {
|
||||
omniroute_oneproxy_fetch: ["read:proxies"],
|
||||
omniroute_oneproxy_rotate: ["read:proxies"],
|
||||
omniroute_oneproxy_stats: ["read:proxies"],
|
||||
|
||||
// Web-session pool observability (read) + lifecycle (write)
|
||||
omniroute_pool_status: ["read:health"],
|
||||
omniroute_pool_sessions: ["read:health"],
|
||||
omniroute_pool_health: ["read:health"],
|
||||
omniroute_pool_reset: ["write:resilience"],
|
||||
omniroute_pool_warm: ["write:resilience"],
|
||||
} as const;
|
||||
|
||||
// ============ Scope Groups ============
|
||||
|
||||
Reference in New Issue
Block a user