Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
Merge upstream/main into feat/canonical-pipeline
JerrettDavis87a13ef2cd61
diff --cc tests/test_cli/test_wrap_copilot.pyindex 0d948ec32,792feea84..a18e627a1--- a/tests/test_cli/test_wrap_copilot.py+++ b/tests/test_cli/test_wrap_copilot.py@@@ -2,14 -2,15 +2,28 @@@from __future__ import annotations++import sys++import typesfrom pathlib import Pathfrom unittest.mock import patchimport pytestfrom click.testing import CliRunner++if "fastapi" not in sys.modules:++ fastapi_mod = types.ModuleType("fastapi")++ fastapi_mod.FastAPI = type("FastAPI", (), {})++ fastapi_mod.Request = type("Request", (), {})++ fastapi_mod.WebSocket = type("WebSocket", (), {})++ sys.modules["fastapi"] = fastapi_mod++++if "fastapi.responses" not in sys.modules:++ responses_mod = types.ModuleType("fastapi.responses")++ responses_mod.Response = type("Response", (), {})++ sys.modules["fastapi.responses"] = responses_mod++from headroom.cli import wrap as wrap_clifrom headroom.cli.main import main-from headroom.copilot_auth import DEFAULT_API_URL@pytest.fixture