headroom-kit 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- headroom_kit-0.1.0/.github/workflows/checks.yml +35 -0
- headroom_kit-0.1.0/.github/workflows/publish.yml +138 -0
- headroom_kit-0.1.0/.gitignore +221 -0
- headroom_kit-0.1.0/.pre-commit-config.yaml +5 -0
- headroom_kit-0.1.0/.python-version +1 -0
- headroom_kit-0.1.0/LICENSE +21 -0
- headroom_kit-0.1.0/NOTICE.md +6 -0
- headroom_kit-0.1.0/PKG-INFO +127 -0
- headroom_kit-0.1.0/README.md +102 -0
- headroom_kit-0.1.0/docs/configuration.md +95 -0
- headroom_kit-0.1.0/docs/development.md +35 -0
- headroom_kit-0.1.0/docs/usage.md +84 -0
- headroom_kit-0.1.0/docs/validation.md +25 -0
- headroom_kit-0.1.0/pyproject.toml +76 -0
- headroom_kit-0.1.0/skills/install-headroom-kit/SKILL.md +70 -0
- headroom_kit-0.1.0/skills/install-headroom-kit/agents/openai.yaml +6 -0
- headroom_kit-0.1.0/src/headroom_kit/__init__.py +1 -0
- headroom_kit-0.1.0/src/headroom_kit/__main__.py +5 -0
- headroom_kit-0.1.0/src/headroom_kit/_owner.py +14 -0
- headroom_kit-0.1.0/src/headroom_kit/_serve.py +8 -0
- headroom_kit-0.1.0/src/headroom_kit/cli.py +190 -0
- headroom_kit-0.1.0/src/headroom_kit/copilot.py +156 -0
- headroom_kit-0.1.0/src/headroom_kit/proxy.py +479 -0
- headroom_kit-0.1.0/src/headroom_kit/resources/opencode-plugin/index.js +48 -0
- headroom_kit-0.1.0/src/headroom_kit/resources/opencode-plugin/package.json +1 -0
- headroom_kit-0.1.0/src/headroom_kit/resources/pi-extension.mjs +31 -0
- headroom_kit-0.1.0/src/headroom_kit/runtime.py +236 -0
- headroom_kit-0.1.0/src/headroom_kit/session.py +410 -0
- headroom_kit-0.1.0/tests/agent_routing_smoke.py +328 -0
- headroom_kit-0.1.0/tests/compression_fixtures.py +292 -0
- headroom_kit-0.1.0/tests/copilot_models_smoke.py +96 -0
- headroom_kit-0.1.0/tests/qa_share.py +287 -0
- headroom_kit-0.1.0/tests/runtime_smoke.py +174 -0
- headroom_kit-0.1.0/tests/shared_agent_smoke.py +121 -0
- headroom_kit-0.1.0/tests/smoke_auth.py +104 -0
- headroom_kit-0.1.0/tests/smoke_compression.py +392 -0
- headroom_kit-0.1.0/tests/smoke_metrics.py +183 -0
- headroom_kit-0.1.0/tests/smoke_tls.py +242 -0
- headroom_kit-0.1.0/tests/smoke_writer.py +111 -0
- headroom_kit-0.1.0/tests/standin.py +368 -0
- headroom_kit-0.1.0/tests/test_client_adapters.mjs +184 -0
- headroom_kit-0.1.0/tests/test_code_capability.py +90 -0
- headroom_kit-0.1.0/tests/test_install.py +209 -0
- headroom_kit-0.1.0/tests/test_launch.py +1479 -0
- headroom_kit-0.1.0/tests/test_proxy_routing.py +100 -0
- headroom_kit-0.1.0/tests/test_qa_share.py +73 -0
- headroom_kit-0.1.0/tests/test_release.py +78 -0
- headroom_kit-0.1.0/uv.lock +2692 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
workflow_call:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
checks:
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-14]
|
|
17
|
+
runs-on: ${{ matrix.os }}
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
fetch-tags: true
|
|
23
|
+
- uses: astral-sh/setup-uv@v6
|
|
24
|
+
with:
|
|
25
|
+
version: "0.12.3"
|
|
26
|
+
enable-cache: true
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.13"
|
|
30
|
+
- run: uv sync --locked --dev
|
|
31
|
+
- run: uv run ruff format --check .
|
|
32
|
+
- run: uv run ruff check .
|
|
33
|
+
- run: HEADROOM_KIT_INSTALL=1 uv run pytest
|
|
34
|
+
- run: node --test tests/test_client_adapters.mjs
|
|
35
|
+
- run: uv run pre-commit run anti-slop-python --all-files
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths-ignore:
|
|
8
|
+
- "**.md"
|
|
9
|
+
- "docs/**"
|
|
10
|
+
- ".gitignore"
|
|
11
|
+
- "LICENSE"
|
|
12
|
+
- "NOTICE.md"
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: publish-main
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
id-token: write
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
checks:
|
|
24
|
+
uses: ./.github/workflows/checks.yml
|
|
25
|
+
|
|
26
|
+
publish:
|
|
27
|
+
needs: checks
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment:
|
|
30
|
+
name: pypi
|
|
31
|
+
url: https://pypi.org/p/headroom-kit
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout repository
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0
|
|
37
|
+
fetch-tags: true
|
|
38
|
+
|
|
39
|
+
- name: Setup uv
|
|
40
|
+
uses: astral-sh/setup-uv@v6
|
|
41
|
+
with:
|
|
42
|
+
version: "0.12.3"
|
|
43
|
+
enable-cache: true
|
|
44
|
+
|
|
45
|
+
- name: Setup Python
|
|
46
|
+
uses: actions/setup-python@v5
|
|
47
|
+
with:
|
|
48
|
+
python-version: "3.13"
|
|
49
|
+
|
|
50
|
+
- name: Verify this commit is still main
|
|
51
|
+
id: main
|
|
52
|
+
run: |
|
|
53
|
+
git fetch origin main
|
|
54
|
+
if [[ "$(git rev-parse HEAD)" != "$(git rev-parse origin/main)" ]]; then
|
|
55
|
+
echo "main has advanced; skipping release."
|
|
56
|
+
echo "skip=true" >> "$GITHUB_OUTPUT"
|
|
57
|
+
else
|
|
58
|
+
echo "skip=false" >> "$GITHUB_OUTPUT"
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
- name: Determine next release version
|
|
62
|
+
id: release_version
|
|
63
|
+
if: steps.main.outputs.skip != 'true'
|
|
64
|
+
run: |
|
|
65
|
+
python3 - << 'EOF' >> "$GITHUB_OUTPUT"
|
|
66
|
+
import re
|
|
67
|
+
import subprocess
|
|
68
|
+
|
|
69
|
+
def resolve_version():
|
|
70
|
+
subprocess.run(["git", "fetch", "--tags", "--force"], capture_output=True)
|
|
71
|
+
|
|
72
|
+
head_tags_proc = subprocess.run(
|
|
73
|
+
["git", "tag", "--points-at", "HEAD"],
|
|
74
|
+
capture_output=True, text=True, check=True
|
|
75
|
+
)
|
|
76
|
+
for tag in head_tags_proc.stdout.splitlines():
|
|
77
|
+
tag = tag.strip()
|
|
78
|
+
if re.match(r"^v\d+\.\d+\.\d+$", tag):
|
|
79
|
+
print(f"tag={tag}")
|
|
80
|
+
print(f"version={tag.lstrip('v')}")
|
|
81
|
+
print("is_new_tag=false")
|
|
82
|
+
return
|
|
83
|
+
|
|
84
|
+
tags_proc = subprocess.run(
|
|
85
|
+
["git", "tag", "-l", "v[0-9]*.[0-9]*.[0-9]*", "--sort=-v:refname"],
|
|
86
|
+
capture_output=True, text=True, check=True
|
|
87
|
+
)
|
|
88
|
+
tags = [t.strip() for t in tags_proc.stdout.splitlines() if t.strip()]
|
|
89
|
+
|
|
90
|
+
if not tags:
|
|
91
|
+
next_tag = "v0.1.0"
|
|
92
|
+
else:
|
|
93
|
+
latest = tags[0]
|
|
94
|
+
match = re.match(r"^v(\d+)\.(\d+)\.(\d+)$", latest)
|
|
95
|
+
if match:
|
|
96
|
+
major, minor, patch = map(int, match.groups())
|
|
97
|
+
next_tag = f"v{major}.{minor}.{patch + 1}"
|
|
98
|
+
else:
|
|
99
|
+
next_tag = "v0.1.0"
|
|
100
|
+
|
|
101
|
+
print(f"tag={next_tag}")
|
|
102
|
+
print(f"version={next_tag.lstrip('v')}")
|
|
103
|
+
print("is_new_tag=true")
|
|
104
|
+
|
|
105
|
+
resolve_version()
|
|
106
|
+
EOF
|
|
107
|
+
|
|
108
|
+
- name: Create and push git tag
|
|
109
|
+
if: steps.main.outputs.skip != 'true' && steps.release_version.outputs.is_new_tag == 'true'
|
|
110
|
+
run: |
|
|
111
|
+
git config user.name "github-actions[bot]"
|
|
112
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
113
|
+
git tag "${{ steps.release_version.outputs.tag }}"
|
|
114
|
+
git push origin "${{ steps.release_version.outputs.tag }}"
|
|
115
|
+
|
|
116
|
+
- name: Build distribution packages
|
|
117
|
+
if: steps.main.outputs.skip != 'true'
|
|
118
|
+
run: uv build
|
|
119
|
+
|
|
120
|
+
- name: Create GitHub Release
|
|
121
|
+
if: steps.main.outputs.skip != 'true'
|
|
122
|
+
env:
|
|
123
|
+
GH_TOKEN: ${{ github.token }}
|
|
124
|
+
run: |
|
|
125
|
+
tag="${{ steps.release_version.outputs.tag }}"
|
|
126
|
+
if gh release view "$tag" >/dev/null 2>&1; then
|
|
127
|
+
echo "GitHub release $tag already exists."
|
|
128
|
+
else
|
|
129
|
+
gh release create "$tag" dist/* \
|
|
130
|
+
--title "$tag" \
|
|
131
|
+
--generate-notes
|
|
132
|
+
fi
|
|
133
|
+
|
|
134
|
+
- name: Publish to PyPI
|
|
135
|
+
if: steps.main.outputs.skip != 'true'
|
|
136
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
137
|
+
with:
|
|
138
|
+
skip-existing: true
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
|
|
220
|
+
# Local PR diagrams. Do not commit rendered SVGs.
|
|
221
|
+
.pr-lens/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ruairí O'Brien
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: headroom-kit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Launch existing coding agents through a local Headroom proxy
|
|
5
|
+
Project-URL: Homepage, https://github.com/ruarfff/headroom-kit
|
|
6
|
+
Project-URL: Repository, https://github.com/ruarfff/headroom-kit
|
|
7
|
+
Project-URL: Issues, https://github.com/ruarfff/headroom-kit/issues
|
|
8
|
+
Author: Ruairí O'Brien
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: NOTICE.md
|
|
12
|
+
Keywords: codex,copilot,headroom,opencode,proxy
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Requires-Python: >=3.13
|
|
23
|
+
Requires-Dist: headroom-ai[code,proxy]==0.37.0
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# Headroom Kit
|
|
27
|
+
|
|
28
|
+
[](https://pypi.org/project/headroom-kit/)
|
|
29
|
+
[](https://pypi.org/project/headroom-kit/)
|
|
30
|
+
[](https://skills.sh/ruarfff/headroom-kit)
|
|
31
|
+
[](LICENSE)
|
|
32
|
+
|
|
33
|
+
Run an existing coding agent through a local [Headroom](https://github.com/headroomlabs-ai/headroom) proxy. Kit owns routing, Copilot authentication, editor isolation, and the shared proxy. Headroom owns compression and metrics. This package does not install agents, replace the `headroom` command, or download Python packages when an agent launches.
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
agent -> headroom-kit -> Headroom on 127.0.0.1 -> model provider
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
You need Python 3.13 and the agent you want to launch. Kit and Headroom 0.37.0 install into the same environment:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
uv tool install --python 3.13 headroom-kit
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A normal virtual environment works too:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
uv venv --python 3.13
|
|
51
|
+
uv pip install headroom-kit
|
|
52
|
+
. .venv/bin/activate
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Do not point Kit at a separate `headroom` executable. It imports Headroom's Python modules. Copilot login is `headroom-kit copilot-auth login` in that same install. Headroom may still download its own model files on first proxy startup. That is separate from installing this package.
|
|
56
|
+
|
|
57
|
+
Check both versions without starting a proxy:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
headroom-kit --version
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Set up with an agent
|
|
64
|
+
|
|
65
|
+
This repository includes `install-headroom-kit`, an Agent Skill that installs the CLI and checks the Headroom version without starting a proxy.
|
|
66
|
+
|
|
67
|
+
The [`skills` CLI](https://github.com/vercel-labs/skills) can install it for the current project:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
npx skills add ruarfff/headroom-kit --skill install-headroom-kit
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Make it available to your agents:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
npx skills add ruarfff/headroom-kit --skill install-headroom-kit --agent '*' --global --yes
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
See the [`skills` CLI documentation](https://github.com/vercel-labs/skills#supported-agents).
|
|
80
|
+
|
|
81
|
+
## Commands
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
headroom-kit [--config PATH] run <agent> -- <agent arguments...>
|
|
85
|
+
headroom-kit copilot-auth login
|
|
86
|
+
headroom-kit status
|
|
87
|
+
headroom-kit stop <port>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Agents: `codex`, `codex-app`, `copilot`, `copilot-vscode`, `pi`, `opencode`.
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
headroom-kit copilot-auth login
|
|
94
|
+
headroom-kit run codex --
|
|
95
|
+
headroom-kit run copilot -- --model auto
|
|
96
|
+
headroom-kit run pi -- --provider openai --model <model-id>
|
|
97
|
+
headroom-kit run opencode --
|
|
98
|
+
headroom-kit status
|
|
99
|
+
headroom-kit stop 8787
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Arguments after `--` are forwarded unchanged. `headroom-kit run codex -- --help` shows Codex help and does not start a proxy. `status` and `stop` do not need provider credentials or model downloads.
|
|
103
|
+
|
|
104
|
+
Shared proxies stay up after the client exits. Stopping one interrupts every client on that port. Kit will not adopt or stop an unrelated listener. An incompatible managed proxy must be stopped explicitly before a new one can use the port.
|
|
105
|
+
|
|
106
|
+
## Configure
|
|
107
|
+
|
|
108
|
+
Built-in defaults are enough for a normal install. `--config` accepts a JSON object of non-secret integration defaults. Precedence is `HEADROOM_*` environment variables, then the file, then the built-in defaults. See [configuration](docs/configuration.md).
|
|
109
|
+
|
|
110
|
+
`HEADROOM_VERSION`, and config keys `version`, `uv`, and `python`, are rejected. Install the tested Headroom release instead of selecting one at launch.
|
|
111
|
+
|
|
112
|
+
## Agents
|
|
113
|
+
|
|
114
|
+
Install and sign in to the agent yourself. Kit does not install it.
|
|
115
|
+
|
|
116
|
+
| Agent | Prerequisite |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| `codex` | Existing Codex sign-in. Built-in OpenAI provider only. |
|
|
119
|
+
| `copilot` | `headroom-kit copilot-auth login`, then a Copilot CLI that honours `COPILOT_API_URL`. |
|
|
120
|
+
| `pi` | Pi installed. Copilot routing uses `headroom-kit copilot-auth login`. |
|
|
121
|
+
| `opencode` | OpenCode v2. |
|
|
122
|
+
| `copilot-vscode` | `code` or `code-insiders`. Uses an isolated profile, not your normal editor data. |
|
|
123
|
+
| `codex-app` | macOS only. Quit Codex before launch. |
|
|
124
|
+
|
|
125
|
+
Windows is not part of this package. Linux and macOS CLI lifecycle checks run in CI. GUI behaviour is platform-specific; live Linux agent support is not verified. Details are in [usage](docs/usage.md) and [validation](docs/validation.md).
|
|
126
|
+
|
|
127
|
+
[MIT](LICENSE). See [NOTICE](NOTICE.md) for attribution.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Headroom Kit
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/headroom-kit/)
|
|
4
|
+
[](https://pypi.org/project/headroom-kit/)
|
|
5
|
+
[](https://skills.sh/ruarfff/headroom-kit)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
Run an existing coding agent through a local [Headroom](https://github.com/headroomlabs-ai/headroom) proxy. Kit owns routing, Copilot authentication, editor isolation, and the shared proxy. Headroom owns compression and metrics. This package does not install agents, replace the `headroom` command, or download Python packages when an agent launches.
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
agent -> headroom-kit -> Headroom on 127.0.0.1 -> model provider
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
You need Python 3.13 and the agent you want to launch. Kit and Headroom 0.37.0 install into the same environment:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
uv tool install --python 3.13 headroom-kit
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
A normal virtual environment works too:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
uv venv --python 3.13
|
|
26
|
+
uv pip install headroom-kit
|
|
27
|
+
. .venv/bin/activate
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Do not point Kit at a separate `headroom` executable. It imports Headroom's Python modules. Copilot login is `headroom-kit copilot-auth login` in that same install. Headroom may still download its own model files on first proxy startup. That is separate from installing this package.
|
|
31
|
+
|
|
32
|
+
Check both versions without starting a proxy:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
headroom-kit --version
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Set up with an agent
|
|
39
|
+
|
|
40
|
+
This repository includes `install-headroom-kit`, an Agent Skill that installs the CLI and checks the Headroom version without starting a proxy.
|
|
41
|
+
|
|
42
|
+
The [`skills` CLI](https://github.com/vercel-labs/skills) can install it for the current project:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npx skills add ruarfff/headroom-kit --skill install-headroom-kit
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Make it available to your agents:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npx skills add ruarfff/headroom-kit --skill install-headroom-kit --agent '*' --global --yes
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
See the [`skills` CLI documentation](https://github.com/vercel-labs/skills#supported-agents).
|
|
55
|
+
|
|
56
|
+
## Commands
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
headroom-kit [--config PATH] run <agent> -- <agent arguments...>
|
|
60
|
+
headroom-kit copilot-auth login
|
|
61
|
+
headroom-kit status
|
|
62
|
+
headroom-kit stop <port>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Agents: `codex`, `codex-app`, `copilot`, `copilot-vscode`, `pi`, `opencode`.
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
headroom-kit copilot-auth login
|
|
69
|
+
headroom-kit run codex --
|
|
70
|
+
headroom-kit run copilot -- --model auto
|
|
71
|
+
headroom-kit run pi -- --provider openai --model <model-id>
|
|
72
|
+
headroom-kit run opencode --
|
|
73
|
+
headroom-kit status
|
|
74
|
+
headroom-kit stop 8787
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Arguments after `--` are forwarded unchanged. `headroom-kit run codex -- --help` shows Codex help and does not start a proxy. `status` and `stop` do not need provider credentials or model downloads.
|
|
78
|
+
|
|
79
|
+
Shared proxies stay up after the client exits. Stopping one interrupts every client on that port. Kit will not adopt or stop an unrelated listener. An incompatible managed proxy must be stopped explicitly before a new one can use the port.
|
|
80
|
+
|
|
81
|
+
## Configure
|
|
82
|
+
|
|
83
|
+
Built-in defaults are enough for a normal install. `--config` accepts a JSON object of non-secret integration defaults. Precedence is `HEADROOM_*` environment variables, then the file, then the built-in defaults. See [configuration](docs/configuration.md).
|
|
84
|
+
|
|
85
|
+
`HEADROOM_VERSION`, and config keys `version`, `uv`, and `python`, are rejected. Install the tested Headroom release instead of selecting one at launch.
|
|
86
|
+
|
|
87
|
+
## Agents
|
|
88
|
+
|
|
89
|
+
Install and sign in to the agent yourself. Kit does not install it.
|
|
90
|
+
|
|
91
|
+
| Agent | Prerequisite |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| `codex` | Existing Codex sign-in. Built-in OpenAI provider only. |
|
|
94
|
+
| `copilot` | `headroom-kit copilot-auth login`, then a Copilot CLI that honours `COPILOT_API_URL`. |
|
|
95
|
+
| `pi` | Pi installed. Copilot routing uses `headroom-kit copilot-auth login`. |
|
|
96
|
+
| `opencode` | OpenCode v2. |
|
|
97
|
+
| `copilot-vscode` | `code` or `code-insiders`. Uses an isolated profile, not your normal editor data. |
|
|
98
|
+
| `codex-app` | macOS only. Quit Codex before launch. |
|
|
99
|
+
|
|
100
|
+
Windows is not part of this package. Linux and macOS CLI lifecycle checks run in CI. GUI behaviour is platform-specific; live Linux agent support is not verified. Details are in [usage](docs/usage.md) and [validation](docs/validation.md).
|
|
101
|
+
|
|
102
|
+
[MIT](LICENSE). See [NOTICE](NOTICE.md) for attribution.
|