Skip to content

✨ feat(headroom): Add opt-in proxy routing extension#293

Merged
ladislas merged 2 commits into
mainfrom
ladislas/feature/292-headroom_proxy-extension
Jun 5, 2026
Merged

✨ feat(headroom): Add opt-in proxy routing extension#293
ladislas merged 2 commits into
mainfrom
ladislas/feature/292-headroom_proxy-extension

Conversation

@ladislas
Copy link
Copy Markdown
Owner

@ladislas ladislas commented Jun 1, 2026

Add /headroom wrap, stop, and status commands that manage a local Headroom proxy, dynamically override supported providers, and restore routing without mutating models.json.

Headroom installation remains user-managed; missing binaries report uv tool installation guidance.

Verification: npm test; npm run typecheck

closes #292

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new opt-in Pi extension (/headroom wrap|stop|status) that can start/monitor a local Headroom proxy and dynamically route supported providers through it without mutating persistent models.json.

Changes:

  • Introduces a HeadroomProxyManager to spawn, health-check, and stop a local headroom proxy subprocess.
  • Registers a new headroom slash command to wrap/stop/status provider routing using pi.registerProvider() / pi.unregisterProvider().
  • Adds unit tests covering arg parsing, provider override construction, status formatting, and proxy lifecycle ownership.

Human Reviewer Callouts (Non-Blocking)

  • (none)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
extensions/headroom/index.ts Registers /headroom command, manages provider overrides, and hooks session shutdown cleanup.
extensions/headroom/proxy.ts Implements proxy subprocess lifecycle + /health//stats polling.
extensions/headroom/helpers.ts Provides arg parsing, override construction, and status formatting helpers.
extensions/headroom/headroom.test.mjs Adds test coverage for parsing, override config, and proxy manager behavior.

Comment thread extensions/headroom/index.ts Outdated
Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts Outdated
Comment thread extensions/headroom/helpers.ts
Comment thread extensions/headroom/proxy.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread extensions/headroom/index.ts Outdated
Comment thread extensions/headroom/index.ts Outdated
Comment thread extensions/headroom/proxy.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread extensions/headroom/proxy.ts
Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread extensions/headroom/proxy.ts Outdated
Comment thread extensions/headroom/proxy.ts Outdated
Comment thread extensions/headroom/index.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread extensions/headroom/helpers.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread extensions/headroom/index.ts
Comment thread extensions/headroom/index.test.mjs Outdated
Comment thread extensions/headroom/index.ts
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread extensions/headroom/proxy.ts Outdated
@ladislas ladislas requested a review from Copilot June 2, 2026 08:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread extensions/headroom/helpers.ts
Comment thread extensions/headroom/headroom.test.mjs
@ladislas ladislas force-pushed the ladislas/feature/292-headroom_proxy-extension branch from e1bfdbb to 06f876c Compare June 5, 2026 09:32
@ladislas ladislas requested a review from Copilot June 5, 2026 09:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

ladislas added 2 commits June 5, 2026 11:45
Add /headroom wrap, stop, and status commands that manage a local Headroom proxy, dynamically override supported providers, and restore routing without mutating models.json.

Headroom installation remains user-managed; missing binaries report uv tool installation guidance.

Verification: npm test; npm run typecheck

closes #292
Add headroom proxy and index-level command coverage for wrap, stop, shutdown cleanup, provider overrides, model reselection, command help text, argument parsing, and routing rollback.

Verification: npm test; npm run typecheck
@ladislas ladislas force-pushed the ladislas/feature/292-headroom_proxy-extension branch from 06f876c to b26841c Compare June 5, 2026 09:46
@ladislas ladislas merged commit 5e95a3d into main Jun 5, 2026
2 checks passed
@ladislas ladislas deleted the ladislas/feature/292-headroom_proxy-extension branch June 5, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Pi extension for opt-in Headroom proxy routing

2 participants