Commit Graph
3 Commits
Author SHA1 Message Date
Hasan BasbunarandClaude Opus 5.5 21ecc040e4 Fixes found by a real uninstall and a real first install on the reference box
- oc and the Agent tab load the box's generated opencode config through
  OPENCODE_CONFIG: on a box emptied and installed with the published
  one-liner, both answered with opencode's hosted free model (big-pickle),
  not the model the box serves.
- uninstall.sh --yes takes the providers that read the API key out of
  opencode's config before deleting the key (opencode refused to start at
  all: "bad file reference"); a file with nothing else of the user's goes to
  a backup (oc-merge-limits.py --remove-providers).
- The uninstall inventory knows the image lane's checkpoint (31 GB), and the
  CI gate on inventory pins reads install-image.sh too.
- The docker room check asks only for the container's room when the image is
  already here (an update with 36 GB free was refused for want of 40).
- A commented-out opencode PATH line no longer counts as one.
- uninstall.sh says when there was nothing to remove.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 17:43:37 +02:00
Hasan BasbunarandClaude Fable 5.1 48e8e043ca agent tab: AGENT_AUTO=1 approves every tool call (v1.7.1)
opencode serve rejects the TUI's --yolo and --auto flags, so the installer
renders OPENCODE_PERMISSION={"*":"allow"} into opencode-web.service when asked
(single-quoted assignment so the JSON survives systemd's parser), which opencode
honours: the served config reads {"*": "allow"}. Verified on the reference box:
a bash call reading a path outside the session's project ran with no permission
request. Explicit deny rules still apply, the user's opencode.json is untouched,
a re-run remembers the choice (AGENT_AUTO=0 turns it off).

The collector reports the mode the unit declares and the mode the running
server applies (GET /config through the credentials); the tab line says which,
and says when a restart is pending. Tests: relay helpers (26 tests), CI renders
the auto line, the HTTP smoke checks unit and server agree.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-03 23:55:11 +02:00
Hasan BasbunarandClaude Fable 5.1 e7ebfe0df5 cockpit: the Agent tab, opencode's web interface behind the cockpit login (v1.7.0)
dashboard/install-agent.sh installs opencode-web.service (opencode serve as the
user on 127.0.0.1:4096, Basic credentials generated once, 0600) and re-installs
the cockpit with a relay on one address, the tailnet address by default. The
relay (dashboard/agent_relay.py, stdlib) is the only thing that reaches
opencode: cockpit session cookie required, foreign Origin refused, cookie
stripped, credentials added, plain answers, event stream and the terminal's
WebSocket streamed back, frame-ancestors set to the cockpit. One host for the
cockpit and the relay, so the tab needs no second login and no Basic prompt.

The tab reports the server, the relay and the served version, with Open in a
tab, Reload and Restart server (three more exact sudoers lines); the Logs tab
reads the server's journal. install-dashboard.sh now keeps the bind, port and
relay settings it finds in the installed unit when re-run without variables.

Tests: 25 offline relay tests (fake opencode with SSE and WebSocket), a
headless check of the tab against the live cockpit, eleven relay checks in the
HTTP smoke, the monkey check covers the new tab (a deep link to #agent crashed
the first build at parse time; fixed), CI renders both cockpit unit templates
and cross-checks every unit action against the sudoers allowlist.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-03 23:34:09 +02:00