Skip to content

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

Merge PR 2959 into release/v3.8.8

diegosouzapw4536aabe2395
diff --cc CHANGELOG.md
index 82415e4045,239006f3a2..5dd79c7d74
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -1,61 -1,10 +1,69 @@@
# 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)
+
+ ### ✨ 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
diff --cc docs/frameworks/MCP-SERVER.md
index de5b061511,3c7b0f51fb..90ea99c5a6
--- a/docs/frameworks/MCP-SERVER.md
+++ b/docs/frameworks/MCP-SERVER.md
@@@ -294,8 -282,6 +294,7 @@@ MCP tools are authenticated through AP
| `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.
diff --cc open-sse/mcp-server/server.ts
index f9e7f07624,6df518f58a..64d3ed9fb8
--- a/open-sse/mcp-server/server.ts
+++ b/open-sse/mcp-server/server.ts
@@@ -104,9 -104,9 +105,10 @@@ const TOTAL_MCP_TOOL_COUNT
MCP_TOOLS.length +
Object.keys(memoryTools).length +
Object.keys(skillTools).length +
+ Object.keys(agentSkillTools).length +
gamificationTools.length +
- pluginTools.length;
+ pluginTools.length +
+ notionTools.length;
type JsonRecord = Record<string, unknown>;
@@@ -1095,6 -1055,29 +1097,33 @@@ export function createMcpServer(): McpS
// ── Gamification Tools ────────────────────────
gamificationTools.forEach((toolDef) => {
+ server.registerTool(
+ toolDef.name,
+ {
+ description: toolDef.description,
+ // @ts-ignore: dynamic zod access
+ inputSchema: toolDef.inputSchema,
+ },
- withScopeEnforcement(toolDef.name, async (args) => {
- try {
- const parsedArgs = toolDef.inputSchema.parse(args ?? {});
- // @ts-ignore: handler expected specific object
- const result = await toolDef.handler(parsedArgs);
- return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
- } catch (err) {
- const msg = err instanceof Error ? err.message : String(err);
- return { content: [{ type: "text" as const, text: `Error: ${msg}` }], isError: true };
- }
- })
++ withScopeEnforcement(
++ toolDef.name,
++ async (args) => {
++ try {
++ const parsedArgs = toolDef.inputSchema.parse(args ?? {});
++ // @ts-ignore: handler expected specific object
++ const result = await toolDef.handler(parsedArgs);
++ return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
++ } catch (err) {
++ const msg = err instanceof Error ? err.message : String(err);
++ return { content: [{ type: "text" as const, text: `Error: ${msg}` }], isError: true };
++ }
++ },
++ toolDef.scopes
++ )
+ );
+ });
+
+ // ── Notion Context Source Tools ───────────────
+ notionTools.forEach((toolDef) => {
server.registerTool(
toolDef.name,
{