feat(miner-hands): doctor preflight for claude/codex CLI presence + auth#4376
Conversation
gittensory-miner doctor gains two advisory checks — claude-cli-present and codex-cli-present — that detect whether the coding-agent binaries are on PATH (reusing findExecutableOnPath) and authenticated. Auth detection is read-only and never spawns the CLI: it surfaces the same conditions the providers check at call time (CLAUDE_CODE_OAUTH_TOKEN; codex's auth.json readability). Advisory tone (ok: true), matching checkDockerPresent, since a coding-agent CLI is only required once a driver provider is configured (JSONbored#4289). Closes JSONbored#4304
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4376 +/- ##
=======================================
Coverage 93.95% 93.95%
=======================================
Files 400 400
Lines 36820 36820
Branches 13452 13452
=======================================
Hits 34595 34595
Misses 1569 1569
Partials 656 656 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-09 17:17:08 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
What
gittensory-miner doctor(offline-only) checks node/engine/state-dir/sqlite/docker today, but has no visibility into the coding-agent CLIs a driver will need. This adds two advisory checks —claude-cli-presentandcodex-cli-present— so an operator can see, before running a real attempt, whether theclaude/codexbinaries are on PATH and authenticated.findExecutableOnPath(the same helpercheckDockerPresentuses) — no new PATH search.CLAUDE_CODE_OAUTH_TOKENfor claude (percreateClaudeCodeAi), and a readableauth.jsonat$CODEX_HOME/auth.json(else$HOME/.codex/auth.json) for codex (perassertCodexAuthConfigured).ok: trueeven when absent/unauthenticated), matchingcheckDockerPresent. A coding-agent CLI is only strictly required once a driver provider is configured (feat(miner-hands): CodingAgentDriver factory + provider-style config resolution #4289, not yet wired), so a missing/unauthenticated CLI is informational — thedetailstring tells the operator exactly what to fix (set CLAUDE_CODE_OAUTH_TOKEN/run codex auth).Deliverables
checkClaudeCliPresent/checkCodexCliPresentadded to the arrayrunDoctorChecksreturns, each in the exact{ name, ok, detail }shape.findExecutableOnPath(laptop-init.js).CLAUDE_CODE_OAUTH_TOKEN; codexauth.jsonreadability) — no network, no subprocess.runDoctorCheckswiring.Closes #4304