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
Fix RTK binary path on Windows (.exe extension)
chopratejas75829747016d
diff --git a/headroom/rtk/__init__.py b/headroom/rtk/__init__.pyindex 54e212af6..8a8df8040 100644--- a/headroom/rtk/__init__.py+++ b/headroom/rtk/__init__.py@@ -6,12 +6,14 @@ enters the LLM context window. Headroom downloads and manages the rtk binary.from __future__ import annotations+import platformimport shutilfrom pathlib import PathRTK_VERSION = "v0.28.2"RTK_BIN_DIR = Path.home() / ".headroom" / "bin"-RTK_BIN_PATH = RTK_BIN_DIR / "rtk"+_RTK_NAME = "rtk.exe" if platform.system() == "Windows" else "rtk"+RTK_BIN_PATH = RTK_BIN_DIR / _RTK_NAMEdef get_rtk_path() -> Path | None:diff --git a/headroom/rtk/installer.py b/headroom/rtk/installer.pyindex cf2905175..1abcd99df 100644--- a/headroom/rtk/installer.py+++ b/headroom/rtk/installer.py@@ -115,8 +115,9 @@ def download_rtk(version: str | None = None) -> Path:except (tarfile.TarError, zipfile.BadZipFile) as e:raise RuntimeError(f"Failed to extract rtk archive: {e}") from e- # Make executable- RTK_BIN_PATH.chmod(RTK_BIN_PATH.stat().st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)+ # Make executable (skip on Windows — no Unix permissions)+ if platform.system() != "Windows":+ RTK_BIN_PATH.chmod(RTK_BIN_PATH.stat().st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)# Verifytry: