Repository navigation
Feat/issue 14 interactive install - #28
Conversation
|
@aam9063 please fix the interactive process cleanup before merging. I reproduced this on Linux with a real PTY: after selecting a target and project scope, both confirming with P1: Minor follow-up (P3): |
P2: Check stdin before entering interactive modePlease also check that stdin is a TTY in Reproduced from a terminal (in a temporary directory): printf '2\n2\ny\n' | node bin/mobile-agent-orchestrator.mjs installThis exited with code 0 and created Please add a regression test for piped stdin with TTY stdout. The current CLI tests inject |
|
Thanks for the contribution and for addressing the review feedback! I re-reviewed commit Verified the original piped-stdin + TTY-stdout scenario: exit 1, no writes. The real interactive TTY flow also installs successfully and exits cleanly. All 87 tests pass, No remaining blockers found in this review. Thanks for adding the regression coverage! |
Linked issue
Closes #14
Summary
lib/detect.mjs) for Pi, Claude Code, Codex, OpenCode, and Gemini CLI: well-known config-directory probes plus a platform-aware PATH scan, no process spawning, fully injectable ({ home, pathEnv, platform }) for deterministic tests.lib/prompt.mjs) with injected input/output streams: detected-host listing with evidence, multi-select targets (dedup display via the existingresolveUniqueDestinations), scope selection, plan summary, and confirmation. Cancellation (EOF or non-confirm) returnsnulland the caller performs zero writes. Pi is detection-only and renders the supportedpi install npm:mobile-agent-orchestratorcommand; it is never a write target.bin/mobile-agent-orchestrator.mjs): no-argumentsinstallruns the interactive flow when a TTY is present and fails cleanly with a flags hint for CI otherwise; explicit--targetinvocations keep byte-identical validation, output, and behavior; an explicit--scopewithout--targetis validated first and preselects the scope question. README documents the no-args form.Intentionally out of scope (per the issue's non-goals): no new hosts, no changes to the canonical skill content, no npm publishing. The installer never installs Herdr, Moshi, SSH, Mosh, Tailscale, services, or firewall rules.
Verification
Platform note: verified on Windows native. The two
detect-releasefailures below are the pre-existing Windows tooling bugs (spawned-child path resolution producesC:\C:\...), unchanged frommain; they are unrelated to this change.npm test: fails on this machine only at the two pre-existing Windowsdetect-releasecases (CLI emits GitHub output for unchanged and taggable versions,CLI reports invalid transitions and exits nonzero); full runner: 77 tests, 68 pass, 2 fail (both pre-existing), 7 skipped (pre-existing).npm run pack:check: exit 0, 11 entries.node bin/mobile-agent-orchestrator.mjs --help: exit 0, documents both the interactive and explicit forms.node bin/mobile-agent-orchestrator.mjs install --target codex --scope project --dry-run: exit 0, plan JSON printed, nothing written.node bin/mobile-agent-orchestrator.mjs install(non-TTY shell): exit 1, single-line error suggesting explicit flags; no prompting.tests/cli.test.mjs(8 cases) andtests/prompt.test.mjs(8 cases) via injected streams, including cancellation-equals-zero-writes.Small correction to the issue text: the issue's verification snippet
install --target codex --dry-runomits the required--scope(no default by design, per the shipped behavior from #12), andinstall --helpwas never a valid form (usage is shown by bare--help). The corrected commands above exit 0.Checklist
Closesfor completed work orRefsfor partial work.