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
ci: Bump the actions-minor-patch group with 2 updates (#4557)
dependabot[bot]08ed419515ce
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex bf4059df3..5e6232343 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -56,4 +56,4 @@ jobs:files: dist/headroom-sbom.cdx.json- name: Publish to PyPI- uses: pypa/[email protected]+ uses: pypa/[email protected]diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex d6b6ab09d..37e59a135 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -779,7 +779,7 @@ jobs:- name: Publish ${{ env.PYPI_PACKAGE }} to PyPIid: pypi-publish- uses: pypa/[email protected]+ uses: pypa/[email protected]with:# Idempotent re-runs: when a wheel filename for the computed# version is already on PyPI (e.g. a previous push to maindiff --git a/.github/workflows/security.yml b/.github/workflows/security.ymlindex 3faeae34a..a95b8a51c 100644--- a/.github/workflows/security.yml+++ b/.github/workflows/security.yml@@ -41,7 +41,7 @@ jobs:python-version: "3.12"- name: Install uv- uses: astral-sh/[email protected]+ uses: astral-sh/[email protected]- name: Export production dependency set from uv.lockrun: |@@ -97,7 +97,7 @@ jobs:- name: Install uvif: steps.gate.outputs.run == 'true'- uses: astral-sh/[email protected]+ uses: astral-sh/[email protected]- name: Resolve what pip installs from the package metadataif: steps.gate.outputs.run == 'true'diff --git a/scripts/verify_pypi_action_trust.py b/scripts/verify_pypi_action_trust.pynew file mode 100644index 000000000..bf14925ee--- /dev/null+++ b/scripts/verify_pypi_action_trust.py@@ -0,0 +1,40 @@+"""Compare an old public wheel's CA data with the action's installed certifi."""++import hashlib+import io+import json+import ssl+import urllib.request+import zipfile+from importlib.metadata import version++import certifi++with urllib.request.urlopen("https://pypi.org/pypi/certifi/2026.7.22/json") as response:+ metadata = json.load(response)+wheel = next(item for item in metadata["urls"] if item["packagetype"] == "bdist_wheel")+with urllib.request.urlopen(wheel["url"]) as response:+ data = response.read()+assert hashlib.sha256(data).hexdigest() == wheel["digests"]["sha256"]+archive = zipfile.ZipFile(io.BytesIO(data))+old_pem = archive.read("certifi/cacert.pem").decode()+old = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)+old.load_verify_locations(cadata=old_pem)+new = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)+new.load_verify_locations(cafile=certifi.where())+++def roots(context):+ return {(cert["issuer"], cert["serialNumber"]): cert for cert in context.get_ca_certs()}+++before, after = roots(old), roots(new)+removed = [before[key] for key in before.keys() - after.keys()]+print("installed certifi=" + version("certifi"))+print("roots: old=" + str(len(before)) + ", new=" + str(len(after)))+for cert in removed:+ print("removed:", cert["subject"], "serial:", cert["serialNumber"])+assert removed, "No roots removed from the old trust store"+assert all("emsign" in str(cert["subject"]).lower() for cert in removed), removed+assert any(cert["serialNumber"] == "3CF607A968700EDA8B84" for cert in removed), removed+print("PASS: removed emSign root certificates are absent from the action trust store")