Skip to content

feat: allow configuring PlanBridge port#95

Merged
floodfx merged 4 commits into
mainfrom
feature/plan-27-allow-specific-port
May 14, 2026
Merged

feat: allow configuring PlanBridge port#95
floodfx merged 4 commits into
mainfrom
feature/plan-27-allow-specific-port

Conversation

@floodfx
Copy link
Copy Markdown
Contributor

@floodfx floodfx commented May 12, 2026

Summary

  • add CONTEXTBRIDGE_PORT for hook-driven plan review port configuration
  • add contextbridge plan --port for manual one-off runs
  • preserve default OS-assigned port behavior via port 0 and document fixed-port usage with exe.dev as an example

Test Plan

  • just verify

…-specific-port

# Conflicts:
#	README.md
#	packages/cli/src/annotation/runAnnotation.ts
#	packages/cli/src/cli.test.ts
#	packages/cli/src/commands/plan.test.ts
#	packages/cli/src/commands/plan.ts
#	packages/cli/src/planReview/runPlanReview.test.ts
#	packages/server/src/annotation.test.ts
@floodfx floodfx changed the title Allow configuring PlanBridge port feat: allow configuring PlanBridge port May 12, 2026
Copy link
Copy Markdown
Contributor

@blimmer blimmer left a comment

Choose a reason for hiding this comment

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

Only (soft) blocker for me is the README / website updates.

Comment thread README.md Outdated
- [Usage: Other agents](https://plan.contextbridge.ai/usage/other-agents/)
- [Privacy & Telemetry](https://plan.contextbridge.ai/privacy/)

## Port configuration
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should make this change in the website instead, I think.

It'd be nice if we could auto-gen from source all of the environment config properties (not a requirement for this PR). However, I'd like to keep the README succinct.

Even more reason for me to do #99 soon!


For now, could you:

  1. Remove this config from here.
  2. Create a PR in the private repo backing tools/ to add this in the relevant place.
  3. If you don't tackle auto-generating the CONTEXTBRIDGE_* env vars, could you open a github issue so we don't forget about it in the future?

});
}

function parsePortOption(value: string): number {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is duplicating logic that zod already has encoded. Can we lean on that instead?

@floodfx
Copy link
Copy Markdown
Contributor Author

floodfx commented May 14, 2026

Addressed the review feedback:

  • removed the fixed-port docs from the public README
  • moved the docs to the website in contextbridge/planbridge-private#17
  • opened follow-up issue Auto-generate environment variable docs from CLI config #118 for auto-generated environment variable docs
  • changed the manual --port parser to reuse the shared Zod-backed port parser from environment.ts

Verification:

  • just verify
  • bun run --cwd tools/website test
  • bun run --cwd tools format:check

…-specific-port

# Conflicts:
#	packages/cli/src/annotation/runAnnotation.test.ts
#	packages/cli/src/commands/plan.ts
#	packages/cli/src/environment.ts
@floodfx floodfx enabled auto-merge (squash) May 14, 2026 17:59
@floodfx floodfx merged commit bf53148 into main May 14, 2026
13 checks passed
@floodfx floodfx deleted the feature/plan-27-allow-specific-port branch May 14, 2026 17:59
blimmer pushed a commit that referenced this pull request May 14, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.0](v0.5.0...v0.6.0)
(2026-05-14)


### Features

* add global feedback submit shortcut
([#116](#116))
([21b14a1](21b14a1))
* allow configuring PlanBridge port
([#95](#95))
([bf53148](bf53148))
* tell Codex to run contextbridge open outside the sandbox
([#115](#115))
([6cff1e9](6cff1e9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: contextbridge-pr-automation[bot] <259134118+contextbridge-pr-automation[bot]@users.noreply.github.com>
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.

2 participants