Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
Merge PR 2958 into release/v3.8.8
diegosouzapwff255c4582e9
diff --cc CHANGELOG.mdindex 9fbd264061,239006f3a2..82415e4045--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -1,58 -1,15 +1,66 @@@# Changelog-## [Unreleased]+## [Unreleased] — Group A: AgentBridge + Traffic Inspector (planos 11+12)++### Added++- **AgentBridge** (`/dashboard/tools/agent-bridge`) — MITM proxy consolidating 9 IDE agents+ (Antigravity, Kiro, GitHub Copilot, OpenAI Codex, Cursor IDE, Zed Industries, Claude Code,+ Open Code, Trae stub) with server card, per-agent setup wizard, model mapping table,+ bypass list, upstream CA cert support, and redirect from legacy `/dashboard/system/mitm-proxy`.+ See `docs/frameworks/AGENTBRIDGE.md`.+- **Traffic Inspector** (`/dashboard/tools/traffic-inspector`) — LLM-aware HTTPS debugger with+ 4 capture modes (AgentBridge hook, Custom Hosts DNS, HTTP_PROXY :8080, System-wide proxy),+ DevTools split UI, 7 detail tabs (Conversation, Headers, Request, Response, Timing, LLM Details,+ Stats), resizable panels, session recording (.har/.jsonl export), SSE stream merger,+ conversation normalizer (multi-provider), system-prompt fingerprint colorization, and annotations.+ See `docs/frameworks/TRAFFIC_INSPECTOR.md`.+- **MITM handler base + 9 agent handlers** (`src/mitm/handlers/`) — `MitmHandlerBase` abstract+ class with `hookBufferStart`/`hookBufferUpdate` for Traffic Inspector integration; concrete+ handlers for all 9 agents.+- **MITM targets registry** (`src/mitm/targets/`) — declarative `MitmTarget` shape per agent;+ emits `DATA_DIR/mitm/targets.json` for dynamic `server.cjs` resolution.+- **Traffic Inspector core** (`src/mitm/inspector/`) — `TrafficBuffer` in-memory ring,+ `kindDetector`, `sseMerger` (MIT port from chouzz/llm-interceptor), `conversationNormalizer`+ (MIT port), `contextKey` fingerprinting, `httpProxyServer`, `systemProxyConfig`.+- **AgentBridge passthrough + bypass** (`src/mitm/passthrough.ts`) — TCP tunnel for+ non-mapped hosts; bypass list with default sensitive-host patterns + user-defined patterns.+- **Upstream CA cert** (`src/mitm/upstreamTrust.ts`) — `AGENTBRIDGE_UPSTREAM_CA_CERT` for+ corporate TLS environments.+- **Secret masking** (`src/mitm/maskSecrets.ts`) — sk-/Bearer/generic token masking before+ any log or Traffic Inspector broadcast.+- **DB migrations 073–075** — `agent_bridge_state`, `agent_bridge_mappings`,+ `agent_bridge_bypass`, `inspector_custom_hosts`, `inspector_sessions`,+ `inspector_session_requests`.+- **~28 API routes** under `/api/tools/agent-bridge/` (12 routes) and+ `/api/tools/traffic-inspector/` (16+ routes). All LOCAL_ONLY + SPAWN_CAPABLE.+- **i18n** PT-BR + EN for all new keys in `agentBridge.*` and `trafficInspector.*` namespaces;+ all other locales fall back to EN automatically.+- **E2E smoke tests** — `tests/e2e/agent-bridge.spec.ts`,+ `tests/e2e/traffic-inspector.spec.ts`, `tests/e2e/agent-bridge-traffic-cross.spec.ts`+ (skip-gated on CI by `RUN_AGENT_BRIDGE_E2E` / `RUN_TRAFFIC_INSPECTOR_E2E` / `RUN_CROSS_E2E`).+- **Documentation** — `docs/frameworks/AGENTBRIDGE.md` and `docs/frameworks/TRAFFIC_INSPECTOR.md`;+ `docs/architecture/REPOSITORY_MAP.md` updated; `docs/reference/openapi.yaml` updated with+ ~28 new routes and 20+ new schemas.++### Changed++- Sidebar Tools group: added `agent-bridge` and `traffic-inspector` items after `cloud-agents`.+- `/api/tools/agent-bridge/` and `/api/tools/traffic-inspector/` added to `LOCAL_ONLY_API_PREFIXES`+ and `SPAWN_CAPABLE_PREFIXES` in `src/server/authz/routeGuard.ts`.+- `.env.example`: documented 9 new env vars (`AGENTBRIDGE_UPSTREAM_CA_CERT`,+ `INSPECTOR_BUFFER_SIZE`, `INSPECTOR_HTTP_PROXY_PORT`, `INSPECTOR_HTTP_PROXY_AUTOSTART`,+ `INSPECTOR_TLS_INTERCEPT`, `INSPECTOR_SYSTEM_PROXY_GUARD_MINUTES`, `INSPECTOR_MAX_BODY_KB`,+ `INSPECTOR_MASK_SECRETS`, `INSPECTOR_LLM_HOSTS_EXTRA`, `INSPECTOR_INTERNAL_INGEST_TOKEN`).+ ### ✨ New Features++ - **notion:** add Notion as an MCP context source — 6 tools (`notion_search`, `notion_list_databases`, `notion_get_database`, `notion_query_database`, `notion_read`, `notion_append_blocks`) scoped under `read:notion` / `write:notion`, with dashboard "Context Sources" tab, settings API, and token persistence in `key_value` table (#2959)++ ### 🔧 Bug Fixes++ - **mcp:** move `enforceScopes` guard before `MCP_TOOL_MAP` lookup, add inline `scopes` parameter to `withScopeEnforcement()`, and declare scopes on all 24 dynamic tool definitions (memory, skills, plugins, gamification, compression) to fix scope enforcement for dynamic MCP tool groups (#2958)+---## [3.8.7] — 2026-05-29diff --cc docs/frameworks/MCP-SERVER.mdindex ecc47fee8b,3c7b0f51fb..de5b061511--- a/docs/frameworks/MCP-SERVER.md+++ b/docs/frameworks/MCP-SERVER.md@@@ -168,29 -168,45 +168,57 @@@ Defined in `open-sse/mcp-server/tools/mDefined in `open-sse/mcp-server/tools/skillTools.ts`. Backed by `src/lib/skills/registry` + `src/lib/skills/executor`.- | Tool | Description |- | :---------------------------- | :-------------------------------------------------------------------------------- |- | `omniroute_skills_list` | List registered skills with optional filtering by API key, name, or enabled state |- | `omniroute_skills_enable` | Enable or disable a specific skill by ID |- | `omniroute_skills_execute` | Execute a skill with provided input and return the execution record |- | `omniroute_skills_executions` | List recent skill execution history |+ | Tool | Scopes | Description |+ | :---------------------------- | :-------------- | :-------------------------------------------------------------------------------- |+ | `omniroute_skills_list` | `read:skills` | List registered skills with optional filtering by API key, name, or enabled state |+ | `omniroute_skills_enable` | `write:skills` | Enable or disable a specific skill by ID |+ | `omniroute_skills_execute` | `execute:skills`| Execute a skill with provided input and return the execution record |+ | `omniroute_skills_executions` | `read:skills` | List recent skill execution history |++ ## Notion Context Source (6)++ Defined in `open-sse/mcp-server/tools/notionTools.ts`. Token stored in `key_value` table via `src/lib/db/notion.ts`. REST client in `src/lib/notion/api.ts`. Settings API in `src/app/api/settings/notion/route.ts`. Dashboard UI in `src/app/(dashboard)/dashboard/endpoint/components/NotionSourceCard.tsx`.++ Configure your Notion integration token from the **Context Sources** tab in the Endpoint dashboard, or via the REST API:++ ```bash+ # Set token+ curl -X POST http://localhost:20128/api/settings/notion \+ -H "Content-Type: application/json" \+ -d '{"token": "ntn_..."}'++ # Check status+ curl http://localhost:20128/api/settings/notion++ # Disconnect+ curl -X DELETE http://localhost:20128/api/settings/notion+ ```++ | Tool | Scopes | Description |+ | :--------------------------- | :--------------- | :------------------------------------------------------------------------------------ |+ | `omniroute_notion_search` | `read:notion` | Full-text search across all pages and databases |+ | `omniroute_notion_list_databases` | `read:notion` | List all accessible databases with schema metadata |+ | `omniroute_notion_get_database` | `read:notion` | Get database schema by ID |+ | `omniroute_notion_query_database` | `read:notion` | Query a database with filters, sorts, and pagination |+ | `omniroute_notion_read` | `read:notion` | Read a page or block by ID with its content |+ | `omniroute_notion_append_blocks` | `write:notion`| Append children blocks to a parent block (max 100 per request) |+## Agent Skill Catalog Tools (3)++Defined in `open-sse/mcp-server/tools/agentSkillTools.ts`. Backed by `src/lib/agentSkills/catalog`. These tools expose the 42-entry Agent Skills documentation catalog to MCP clients and external agents. Scope: `read:catalog`.++| Tool | Scopes | Description |+| :--------------------------------- | :------------- | :--------------------------------------------------------------------------------------------------------------- |+| `omniroute_agent_skills_list` | `read:catalog` | List all 42 agent skills with optional `category` (api\|cli) and `area` filters; returns metadata + coverage |+| `omniroute_agent_skills_get` | `read:catalog` | Get full metadata + SKILL.md content for a single skill by canonical `id` |+| `omniroute_agent_skills_coverage` | `read:catalog` | Coverage stats: how many of the 22 API and 20 CLI skills have SKILL.md files on the filesystem vs catalog totals |++See [AGENT-SKILLS.md](./AGENT-SKILLS.md) for the full catalog and how external agents consume it.+## Related Frameworks (v3.8.0)- The MCP tool inventory above (37 tools = 30 base + 3 memory + 4 skills) is intentionally- scoped to runtime routing/cache/compression/memory/skills/proxy operations. Two adjacent+ The MCP tool inventory above (43 tools = 30 core + 3 memory + 4 skills + 6 notion) is intentionally+ scoped to runtime routing/cache/compression/memory/skills/proxy/context-source operations. Two adjacentframeworks ship alongside the MCP server in v3.8.0 and are documented separately:### Cloud Agents@@@ -259,13 -275,16 +287,19 @@@ MCP tools are authenticated through AP| `read:compression` | `compression_status`, `list_compression_combos`, `compression_combo_stats` || `write:compression` | `compression_configure`, `set_compression_engine` || `read:proxies` | `oneproxy_fetch`, `oneproxy_rotate`, `oneproxy_stats` |+ | `read:notion` | `notion_search`, `notion_list_databases`, `notion_get_database`, `notion_query_database`, `notion_read` |+ | `write:notion` | `notion_append_blocks` |+ | `read:memory` | `memory_search` |+ | `write:memory` | `memory_add`, `memory_clear` |+ | `read:skills` | `skills_list`, `skills_executions` |+ | `write:skills` | `skills_enable` |+ | `execute:skills` | `skills_execute` |+| `read:catalog` | `agent_skills_list`, `agent_skills_get`, `agent_skills_coverage` |+Wildcard scopes are supported: `read:*` grants all read-scopes, `*` grants full access.- Memory and Skill tools currently do not declare static scope requirements in their definitions; access is gated by the caller's API key and audited through the standard MCP audit pipeline. Agent Skill Catalog tools require `read:catalog`.-++Agent Skill Catalog tools require `read:catalog`.---## Environment Variablesdiff --cc open-sse/mcp-server/tools/memoryTools.tsindex b5ed467a95,da2ce1dfc1..a41cdeebcd--- a/open-sse/mcp-server/tools/memoryTools.ts+++ b/open-sse/mcp-server/tools/memoryTools.ts@@@ -31,19 -30,18 +31,20 @@@ export const memoryTools =omniroute_memory_search: {name: "omniroute_memory_search",description: "Search memories by query, type, or API key with token budget enforcement",+ scopes: ["read:memory"],inputSchema: MemorySearchSchema,handler: async (args: z.infer<typeof MemorySearchSchema>) => {- const config = {- enabled: true,- maxTokens: args.maxTokens || 2000,- retrievalStrategy: "exact" as const,- autoSummarize: false,- persistAcrossModels: false,- retentionDays: 30,- scope: "apiKey" as const,+ // Plan 21 D16/Bug#7 fix: even on the error path the fallback must+ // respect DEFAULT_MEMORY_SETTINGS.strategy instead of hardcoding "exact".+ const memorySettings =+ (await getMemorySettings().catch(() => null)) ?? DEFAULT_MEMORY_SETTINGS;+ const baseConfig = toMemoryRetrievalConfig(memorySettings, {query: args.query,+ });++ const config = {+ ...baseConfig,+ maxTokens: args.maxTokens || (baseConfig.maxTokens ?? DEFAULT_MEMORY_SETTINGS.maxTokens),};const memories = await retrieveMemories(args.apiKeyId, config);