mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
Adds compression engine that collapses repeated sibling lines (≥30 items with same indent + role prefix) into head + summary + tail, preserves [ref=eXX] anchors required by Playwright/computer-use MCPs, and hard-truncates oversized text with a navigation hint footer. Reduces token usage 60-80% on browser snapshots/accessibility trees from external MCP servers (playwright-mcp, chrome-mcp). Configurable via settings.compression.mcpAccessibility namespace. Changes: - open-sse/services/compression/engines/mcpAccessibility/: new engine (constants.ts, collapseRepeated.ts, index.ts with smartFilterText) - open-sse/services/compression/types.ts: re-exports McpAccessibilityConfig - src/lib/db/compression.ts: getMcpAccessibilityConfig/setMcpAccessibilityConfig - src/lib/db/migrations/056_mcp_accessibility_compression.sql: default settings - open-sse/mcp-server/server.ts: apply filter to all tool result text blocks - tests/unit/compression/mcpAccessibility.test.ts: 4 unit tests - tests/unit/mcp/serverSmartFilter.test.ts: 4 integration tests (DB getter/setter) Ref: 9router/src/lib/mcp/stdioSseBridge.js:14-90 (algorithm origin).