cli: chroxy schedule could read the running daemon's default provider over the existing authenticated path (follow-up to #9178)

Open
#9,201 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
54/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, node.js
Domain
backend, cli

Research direction

Start with packages/server/src/cli/agent-cmd.js to see how it uses the existing connection helper and primary token, then trace the authenticated WebSocket data named in the issue. Check how chroxy schedule currently reports the configured default after #9200. Done means the daemon default is reported when reachable, configured-default wording is used after an unreachable or timed-out read, and tests cover all three cases.

Written by the indexing model from the issue text.

Description

enhancement from-review server

Context

Found in the review of PR #9200, which closes #9178. #9200 took the issue's second acceptance route: chroxy schedule reports the configured default (config/env) and says that a daemon started with --provider, or with a different CHROXY_PROVIDER, may use another one. It deliberately stays offline and works on the scheduler store without needing a daemon.

Description

The running daemon's effective default is already readable through an existing authenticated path:

  • The WebSocket handshake carries it: auth_bootstrap.defaultProvider, list_providers, and scheduled_tasks.defaultProvider.
  • packages/server/src/cli/agent-cmd.js already reaches the daemon with the connection.json primary token.

chroxy schedule could therefore read the actual default when a daemon is reachable, and fall back to the configured default with #9200's wording when it is not.

Acceptance Criteria

  • Reuse the existing connection helper from agent-cmd.js, or a shared extraction of it. No new endpoint, no new message type, and no wider token use.
  • When a daemon is reachable, the default text and refusal clause use the daemon's default and say where it came from. When none is reachable, or the read fails or times out, output falls back to the configured default and #9200's wording, with no added delay beyond a short timeout.
  • Tests cover a daemon whose default differs from config, an unreachable daemon, and a timeout.
  • Any new or extracted helper keeps agent-cmd.js's token handling unchanged.
Dominant language
JavaScript
Stars
7
Forks
1
Avg merge
2h 3m
Merged PRs (30d)
333

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from blamechris/chroxy

All issues in blamechris/chroxy

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.