Repository navigation
Headless mode + local reload endpoint (#18) - #35
Merged
Merged
Conversation
Completes the passive-compatible parts of the #18 upstreaming stack (#14), without the active background prober (which would violate the passive-only design). - `teamclaude server --headless` (alias `--no-tui`) runs the proxy without the interactive TUI, for backgrounding / running as a service. - `POST /teamclaude/reload` re-syncs accounts from config without a restart — the headless equivalent of pressing 'R' in the TUI. Local-only control endpoint (no upstream calls); returns the number of newly added accounts, 501 if unwired, 500 on handler error. - CLI commands that change accounts (login/import/enable/disable/priority) now best-effort notify a running server to reload, so changes apply live. A closed port refuses instantly, so it's a no-op when nothing is running. (Reload picks up adds + credential/priority/enable-disable changes; removals still need a restart.) - reloadAccounts is shared by the TUI 'R' key, the endpoint, and CLI notify. Explicitly NOT included (active polling, against passive-only): the background quota prober, usage-endpoint quota, and probe-on-add from #14/#16. Tests for the reload endpoint (success/501/500); README + help updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the passive-compatible parts of the #18 upstreaming stack (from #14), without the active background prober.
Added
teamclaude server --headless(alias--no-tui) — run the proxy without the interactive TUI, for backgrounding / running as a service.POST /teamclaude/reload— re-sync accounts from config without a restart; the headless equivalent of pressingRin the TUI. Local-only control endpoint (no upstream calls — same trust model as the existing/teamclaude/status). Returns{ok, added}; 501 if no handler is wired, 500 on error.login/import/enable/disable/prioritybest-effort POST to/teamclaude/reload, so CLI changes apply to a running server live. A closed local port refuses instantly, so it's a near-instant no-op when nothing is running.reloadAccountsis shared by the TUIRkey, the endpoint, and the CLI notify.Deliberately excluded (passive-only)
The background quota prober, usage-endpoint quota, and probe-on-add from #14/#16 all actively call the Anthropic API on a timer — that violates TeamClaude's passive-only design, so they're not included.
Notes
syncAccountsFromDiskalready applies). Account removals still require a restart — documented in help and README./teamclaude/status.Tests
test/server-reload.test.js— endpoint success/501/500. Verified end-to-end: a--headlessserver serves/teamclaude/statusand/teamclaude/reload. Full suite 49 passing, lint clean.Part of #18.
🤖 Generated with Claude Code