Parse agent proxy paths and infer API provider for multi-agent routing
// Source: https://github.com/avirtual/clodex | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works // Provided via justclaw.it.com; keep this notice with the code. 'use strict'; // Route extraction for the per-agent proxy paths. Seeded from clodex2 // lib/route.js (itself a port of agent-workbench/components/proxy/proxy.py). // // Agent name charset matches clodex session names ([a-zA-Z0-9._-], max 64, not // a bare run of dots) so names embed cleanly in URL paths and intent fields // without escaping. This literal is a MIRROR of catalogs.js's AGENT_NAME_RE — // the gate that mints the names this router has to carry — re-expressed as a // path prefix rather than imported, because `wire/` runs on the far side of a // process boundary and takes no de ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key