feat: change default port from 47822 to 37849 (v1.2.0)
47822 collided with ClaudeDo.Worker.exe on at least one user's machine. 37849 is high, registered to nobody, and avoids the prior conflict. Both the Node port and the .NET port move together (still wire-compatible). Defaults change only — if a user has a custom port in mailbox.json, that stays.
This commit is contained in:
@@ -29,19 +29,19 @@ Run: `claude-mailbox --version`
|
||||
|
||||
## Step 2 — port-conflict check (before autostart!)
|
||||
|
||||
Default port is 47822. Probe whether anything is already on it:
|
||||
Default port is 37849. Probe whether anything is already on it:
|
||||
|
||||
```
|
||||
curl -sf http://127.0.0.1:47822/health
|
||||
curl -sf http://127.0.0.1:37849/health
|
||||
```
|
||||
|
||||
- **Returns a JSON body with `"status":"ok"` and a `version` field that matches `claude-mailbox --version`** → it's already our daemon, ✓ skip to Step 4.
|
||||
- **Returns 200 with `"status":"ok"` but a different `version`** → it's an older claude-mailbox; treat as running, ✓.
|
||||
- **Returns non-200, non-JSON, or any other foreign response** → **port conflict**. Some other process owns 47822.
|
||||
- **Returns non-200, non-JSON, or any other foreign response** → **port conflict**. Some other process owns 37849.
|
||||
- **Connection refused** → port is free, ✓ continue to Step 3.
|
||||
|
||||
If port conflict detected:
|
||||
1. Tell the user which process holds the port (Windows: `Get-NetTCPConnection -LocalPort 47822 | Select-Object OwningProcess`, then `Get-Process -Id <pid>`; macOS/Linux: `lsof -i :47822`).
|
||||
1. Tell the user which process holds the port (Windows: `Get-NetTCPConnection -LocalPort 37849 | Select-Object OwningProcess`, then `Get-Process -Id <pid>`; macOS/Linux: `lsof -i :37849`).
|
||||
2. Pick a free port. Default suggestion: **47900**. Verify it's free: `curl -sf http://127.0.0.1:47900/health` should fail with connection refused.
|
||||
3. Read `~/.claude-mailbox/mailbox.json` (create empty `{}` if missing) and merge `{"port": <chosen>}`. Write back.
|
||||
4. Also write the override into `.claude/settings.json` env so the plugin's hooks find the right URL:
|
||||
@@ -65,7 +65,7 @@ If `install-autostart` still fails after both attempts (very rare — would mean
|
||||
|
||||
## Step 4 — health probe
|
||||
|
||||
Hit `http://127.0.0.1:<port>/health` (use the configured port, not necessarily 47822). Expect a JSON body with `"status":"ok"` AND a `version` matching `claude-mailbox --version`. If unreachable or version mismatch, stop and report.
|
||||
Hit `http://127.0.0.1:<port>/health` (use the configured port, not necessarily 37849). Expect a JSON body with `"status":"ok"` AND a `version` matching `claude-mailbox --version`. If unreachable or version mismatch, stop and report.
|
||||
|
||||
## Step 5 — mailbox identity (base prefix)
|
||||
|
||||
@@ -100,7 +100,7 @@ Claude-Mailbox doctor
|
||||
binary: <version>
|
||||
daemon: Running (port: <port>, what you did if anything)
|
||||
health: ok
|
||||
port conflict: none | resolved (moved from 47822 to <port>)
|
||||
port conflict: none | resolved (moved from 37849 to <port>)
|
||||
base prefix: <name from settings, or "auto-derived (anonymous)">
|
||||
smoke test: passed | failed
|
||||
restart hint: yes if restart_needed, otherwise no
|
||||
|
||||
@@ -11,7 +11,7 @@ Print exactly this block, filling in each line:
|
||||
Claude-Mailbox status
|
||||
binary: <output of `claude-mailbox --version`, or "not installed">
|
||||
daemon: <output of `claude-mailbox status`>
|
||||
health: <"ok" if GET http://127.0.0.1:47822/health returns 200, else "unreachable">
|
||||
health: <"ok" if GET http://127.0.0.1:37849/health returns 200, else "unreachable">
|
||||
mailbox name: <value of env.CLAUDE_MAILBOX_NAME in ./.claude/settings.json, or "unset"; also note if ~/.claude/settings.json has a value>
|
||||
pending: <integer count from `claude-mailbox peek --name <resolved-name>` if name is set, else "n/a">
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user