feat(cli): add setup select for explicit multi-host plugin install - #1311
feat(cli): add setup select for explicit multi-host plugin install#1311knqiufan wants to merge 3 commits into
Conversation
| HostSpec("dsh", "DeepSeek Harness"), | ||
| HostSpec("pi", "Pi"), | ||
| HostSpec("hermes", "Hermes"), | ||
| ) |
There was a problem hiding this comment.
The catalog is already stale against the current master, which now provides powercontext setup openclaw. After merging this PR, setup select --host openclaw still fails with unknown host. Please add OpenClaw while preserving its existing --scope-mode and server URL defaults.
There was a problem hiding this comment.
Thank you for catching this. I rebased onto the current master and added OpenClaw to the first-class catalog. setup select now preserves Claude Code's http://127.0.0.1:8000 and OpenClaw's http://127.0.0.1:8765 defaults when no override is supplied, and forwards OpenClaw's --scope-mode default (agent) and explicit overrides. This is included in 5f1e7e6.
| except SetupError as error: | ||
| rows.append(HostSetupRow(host=host.name, status="failed", error=str(error))) | ||
| continue | ||
| rows.append(HostSetupRow(host=host.name, status="installed")) |
There was a problem hiding this comment.
setup select reports installed as soon as the installer returns, but the existing Codex, DSH, Pi, and Hermes setup commands run post-install diagnostics first. This can exit successfully even when the host does not actually list or load the plugin. Please preserve the per-host verification before marking the row as installed.
There was a problem hiding this comment.
Thank you for pointing this out. setup select now runs the existing post-install diagnostics for Codex, DSH, Pi, and Hermes before marking a row as installed. A non-OK diagnostic marks only that host as failed, preserves the diagnostic details, and the remaining selected hosts continue. This is included in 5f1e7e6.
| continue | ||
| typer.echo(f"{row.host}: {row.status}") | ||
| if report.has_installed: | ||
| typer.echo("Next: run `powercontext server run`, then start a new host session.") |
There was a problem hiding this comment.
The generic next step is incomplete for Hermes. Users still need to run hermes memory setup and select PowerContext before starting a new session. Please include this host-specific instruction when Hermes is installed.
There was a problem hiding this comment.
Thank you for the reminder. The human-readable report now prints the Hermes-specific hermes memory setup / select PowerContext instruction when Hermes is successfully installed. JSON output remains unchanged. This is included in 5f1e7e6.
Let users choose first-class hosts instead of PATH-scanning, and isolate one host failure from the rest.
19bf317 to
5f1e7e6
Compare
Which issue or RFC does this PR close?
Closes #1301
Rationale for this change
Multi-agent machines still have to run one fail-closed
setup <host>command per integration. Concatenating those commands aborts on the first missing CLI. PATH-driven auto-install would also treat “the CLI is present” as “install this plugin,” including Claude prompt capture.This PR adds an opt-in orchestration command that installs only the first-class hosts the user selects, keeps the existing single-target commands unchanged, and isolates one host failure from the others.
What changes are included in this PR?
powercontext setup selectover a shared first-class catalog:codex,claude-code,dsh,openclaw,pi, andhermes.--hostis the scriptable path. A TTY without--hostprints the catalog and accepts numbers or names.--jsonand non-TTY require--host.http://127.0.0.1:8000; OpenClaw useshttp://127.0.0.1:8765and--scope-mode agent. An explicit--server-urloverrides the selected Claude Code/OpenClaw hosts, and--scope-modeis forwarded to OpenClaw.installed. A verification failure marks only that host asfailedand setup continues for the remaining selections.failedand continue. Unselected hosts areskipped.hermes memory setup/ select PowerContext instruction when Hermes is installed successfully.powercontext setupstill prints help.setup <host>remains fail-closed.doctoris unchanged;doctor integrationsis left for a follow-up PR.tests/test_setup_select.pycovers selection, isolation, TTY/non-TTY, JSON, flag pass-through, OpenClaw defaults and overrides, post-install verification, Hermes guidance, and the single-target fail-closed regression.Are there any user-facing changes?
Yes. New optional command:
Without
--server-url, selected Claude Code and OpenClaw integrations keep their existing default server URLs. No breaking API or storage-format change. Per-host setup commands keep their current behavior.How was this change tested?
python -m pytest tests/test_setup_select.pypython -m pytest tests/test_system_cli.py tests/test_dsh_cli.py tests/test_hermes_cli.py tests/test_openclaw_cli.py tests/test_pi_cli.pyruff checkon the changed Python filesty checkon the project scopeuv lock --lockedAI usage statement
Used for implementation and review against the issue contract. The design, command surface, and acceptance criteria follow #1301 and the follow-up comment on that issue.