🤖 AI Generated:
Follow-up to #95, which added optional multi Claude config-dir polling with active-plan selection to the Linux (bash) and macOS/Linux (Python) daemons. The Windows daemon (daemon/claude_usage_daemon_windows.py) does not yet support it.
Current state
- The Windows daemon already reads the config file (
%LOCALAPPDATA%\Clawdmeter\config) for clock and chime, so the config-file plumbing exists.
- Token discovery is single-plan:
_windows_credential_candidates() resolves ONE token from CLAUDE_CREDENTIALS_PATH / CLAUDE_CONFIG_DIR env overrides or a fixed fallback list.
What to add (mirror #95)
- Read a
config_dirs key (comma-separated list) from the config file; default to the existing single-token behavior when unset (no change for current users).
read_token_for(dir) — resolve a token per configured dir (each dir's .credentials.json); keep the current candidate-list behavior for the default/unset case.
- A
PlanSelector equivalent: "active" = the plan whose 5h session % rose most recently (monotonic poll counter, so the choice is sticky; a window reset/drop isn't activity; startup falls back to the highest current %).
- Poll each configured dir per cycle and send the active plan's payload.
Tests
The Windows daemon has a solid pytest suite (daemon/tests/test_windows_*.py). Add selector + dir-parsing + token-per-dir tests, mirroring daemon/tests/test_macos_multidir.py from #95.
Notes
- Windows config path differs from Linux/macOS (
%LOCALAPPDATA%\Clawdmeter\config vs ~/.config/claude-usage-monitor/config).
- Installer prompts are tracked separately (see the
install-windows.ps1 follow-up).
🤖 AI Generated:
Follow-up to #95, which added optional multi Claude config-dir polling with active-plan selection to the Linux (bash) and macOS/Linux (Python) daemons. The Windows daemon (
daemon/claude_usage_daemon_windows.py) does not yet support it.Current state
%LOCALAPPDATA%\Clawdmeter\config) forclockandchime, so the config-file plumbing exists._windows_credential_candidates()resolves ONE token fromCLAUDE_CREDENTIALS_PATH/CLAUDE_CONFIG_DIRenv overrides or a fixed fallback list.What to add (mirror #95)
config_dirskey (comma-separated list) from the config file; default to the existing single-token behavior when unset (no change for current users).read_token_for(dir)— resolve a token per configured dir (each dir's.credentials.json); keep the current candidate-list behavior for the default/unset case.PlanSelectorequivalent: "active" = the plan whose 5h session % rose most recently (monotonic poll counter, so the choice is sticky; a window reset/drop isn't activity; startup falls back to the highest current %).Tests
The Windows daemon has a solid pytest suite (
daemon/tests/test_windows_*.py). Add selector + dir-parsing + token-per-dir tests, mirroringdaemon/tests/test_macos_multidir.pyfrom #95.Notes
%LOCALAPPDATA%\Clawdmeter\configvs~/.config/claude-usage-monitor/config).install-windows.ps1follow-up).