Hand out the right opencode command: the API's public URL, and setup uses the install script

install-newt now asks for the API's public URL first (--api-url) and records it; it names
the Pangolin resource and refuses an endpoint on the same host. expose-dashboard records
only that the dashboard is public. One rule (opencode.client_targets) decides which
opencode-install.sh commands are shown -- local only without a tunnel; internet and local
with one; internet only once the dashboard is public -- and setup's closing message,
`llmhost opencode-config` and the dashboard's Connect dialog all use it.

Setup's offer to install opencode now goes through opencode-install.sh --install-only, a
new mode that only installs opencode; this machine's own provider is still configured by
llm-host, which keeps it in sync on every switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-06 18:35:41 -08:00
parent c8b70afdbf
commit 3e9ebeed42
10 changed files with 266 additions and 109 deletions

View file

@ -327,4 +327,10 @@ check("a non-reasoning model gets no variants", "variants" not in nr["models"]["
check("one entry only, named for the alias, so the client can't pick a model either",
list(q["models"]) == [plan.SERVED_ALIAS], list(q["models"]))
print("\nthe command handed to other machines")
cmd = opencode.remote_command("http://mybox.local:1134")
check("fetches opencode-install.sh from a repo and passes the URL",
cmd.startswith('/bin/bash -c "$(curl -fsSL https://') and '/opencode-install.sh)" -- --url http://mybox.local:1134' in cmd, cmd)
check("the script it names is in this repo", (harness.REPO / "opencode-install.sh").exists())
check.done(ROOT)