diff --git a/skills/index.json b/skills/index.json index 64531a2..d4e5719 100644 --- a/skills/index.json +++ b/skills/index.json @@ -2,7 +2,7 @@ "skills": [ { "name": "opencode-api", - "version": "0.3.0", + "version": "0.3.1", "files": [ "ERRATA.md", "SKILL.md", diff --git a/skills/opencode-api/SKILL.md b/skills/opencode-api/SKILL.md index f4bebd4..cd1bfc9 100644 --- a/skills/opencode-api/SKILL.md +++ b/skills/opencode-api/SKILL.md @@ -6,7 +6,7 @@ license: MIT metadata: author: Robert Stone source: https://github.com/rjstone/opencode-dev-plugin - version: "0.3.0" + version: "0.3.1" --- # opencode server API (v2) @@ -70,9 +70,15 @@ disagree, `ERRATA.md` wins. argument: body `{"input": }` → `{"output": }`. `rpcID` is the id in the plugin's `Rpc.define`. A bare argument as the body → `rpc.invalid_input` "Expected object". -- **Throwaway server** (tests, sandboxes): `opencode serve --hostname - 127.0.0.1 --port --print-logs` prints `server password ` at - startup; point `XDG_CONFIG_HOME`, `XDG_DATA_HOME`, `XDG_CACHE_HOME` and +- **Throwaway server** (tests, sandboxes): choose the password yourself, so + you never have to read one: `export OPENCODE_PASSWORD="$(openssl rand -hex 24)"`, + then `opencode serve --hostname 127.0.0.1 --port > serve.log 2>&1 &` + and call it with `curl -u "opencode:$OPENCODE_PASSWORD" ...`. With the + variable set the server prints no password (checked 2026-11-28 against + opencode 2.4.2). Without it, the server makes one up and prints + `server password ` at startup: don't start it that way, and never + read that line into the conversation. Send the server's output to a file + either way. Point `XDG_CONFIG_HOME`, `XDG_DATA_HOME`, `XDG_CACHE_HOME` and `XDG_STATE_HOME` at a temp folder to keep it off your real setup. A location's plugins load in the background after its first request, so plugin-provided agents, skills, references and MCP servers appear a few