3.4 KiB
3.4 KiB
Runtime checks — verified against real OpenCode v2
Environment: Windows 11, opencode v2.0.29, @opencode/plugin@2.0.29, 2026-10-14.
Method: scripts/smoke.ts boots opencode serve (private server, Basic auth user opencode,
password printed on stdout) in a temp fixture and asserts against the HTTP API. Result: PASS.
Verified
- Plugin loads and activates from a local directory entry (
plugins: ["<abs path>/dist"]);GET /api/pluginshowshaylan.pocockwithstate.status: "active".- A file entry (
file://.../dist/index.js) is IGNORED — local plugin entries must be directories with a rootindex/serverfile (confirms fastcrw research). npm-name entries resolve throughexports(to be re-verified after first registry publish, TODO 1.10).
- A file entry (
- Skill injection works: all 31 manifest skills registered (
GET /api/skill); the 16 user-invoked ones carryautoinvoke: false. The API omitsautoinvokewhen true (default). - DMI honored natively: file-loaded skills with upstream
disable-model-invocation: true(e.g. a global~/.agents/skillsinstall) showautoinvoke: falsewithout our plugin. - ID collisions: when the same skill id also exists as a file-based skill (global install), the
file-based entry is what
/api/skillreports; plugin injection coexists without errors. (pr, absent from the tester's global install, was served from our package path.) - Injected content must have frontmatter stripped to match file-based loading
(
markdown.content); the plugin does this since 2026-10-14. - Agent markdown with V2-native frontmatter decodes correctly from
.opencode/agents/:pocock(primary),pocock-worker/pocock-reviewer(subagent), descriptions intact, and the fullpermissionsarray survived decoding in order — verified onpocock-worker:skill * deny+tdd/codebase-design/diagnosing-bugs allow,subagent * deny, and all git/gh/glab shell denies present. - Default permission floor (v2.0.29): agents start with
{action:"*",resource:"*",effect:"allow"}plus specific rules, among themexternal_directory /tmpand/tmp/*allow — the/tmp/pocock-workersworktree root needs no extra user config on this build (README still documents the rule for other setups/subagents). - Injected skills do NOT become slash commands (
GET /api/commandshows none for them;Skill.Infohas noslashfield). User-invoked steps are started via conversation withpocock(propose → yes → load) or by any agent explicitly loading the skill. File-based installs (global~/.agents/skills, or askills: [...]directory source) keep slash behavior. - Server API: prefix
/api/*, Basic auth (opencode+ printed password); SPA HTML answers unknown non-/api paths with 200 — assert JSON, not status.POST /api/location/reloadexists. Plugin loading is lazy (appears seconds after boot);/openapi.jsonrequires auth.
Known environment quirks (tester machine, not product issues)
- Windows:
server.kill()undershell:trueonly killscmd.exe; smoke usestaskkill /PID <pid> /T /F. Temp fixture deletion can lag behind handle release (EPERM warning); harmless, retried on next run. - The user's global
~/.agents/skillsalready contains most Matt Pocock skills — smoke assertions are written to tolerate id collisions (presence + flags, not source path).