Commit df7bc6f
feat: add
A gateway auto-started by `ccmr claude` is detached and reparented to init,
so it outlives the terminal that spawned it. That is intended — several
Claude Code sessions share one gateway — but it left no supported way to
find or stop one. A stale gateway then serves 401s invisibly for days, and
the only remedy was a `pkill` pattern nobody remembers.
- `ccmr status` lists gateways found on 8080-8099 with port, pid, version,
config source and ready-model count. A gateway showing "0/28 models ready"
and "built-in defaults" is now self-diagnosing.
- `ccmr stop [--port|--all|--force]` terminates one. It only ever signals a
process that self-identified through /health and reported its own pid: a
stranger on the port is reported and explicitly refused, never killed.
- /health gains `pid`, which is what makes the above possible without
parsing lsof/netstat, and confines `stop` to ccmr's own processes.
- The auto-start log path was hardcoded to ~/.ccmr/gateway.log while config
followed CCMR_HOME, so the two could live in different directories. Both
now derive from gatewayLogFile().
Also documents gateway lifetime in the README: `ccmr start` dies with the
terminal, `ccmr claude`'s auto-started gateway deliberately does not.ccmr status / ccmr stop, keep logs under CCMR_HOME1 parent b24872c commit df7bc6f
31 files changed
Lines changed: 749 additions & 26 deletions
File tree
- dist
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
83 | 91 | | |
84 | 92 | | |
85 | 93 | | |
86 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
87 | 106 | | |
88 | 107 | | |
89 | 108 | | |
| |||
382 | 401 | | |
383 | 402 | | |
384 | 403 | | |
385 | | - | |
| 404 | + | |
386 | 405 | | |
387 | 406 | | |
388 | 407 | | |
| |||
439 | 458 | | |
440 | 459 | | |
441 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
442 | 469 | | |
443 | 470 | | |
444 | 471 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments