From d190ded022188ea0b58c4ae59ba77e8bbf70bc7a Mon Sep 17 00:00:00 2001 From: haylan Date: Wed, 14 Oct 2026 11:39:52 +0200 Subject: [PATCH] docs: record verified Skill.Info and Agent.Info typings from @opencode/plugin 2.0.29 --- AGENTS.md | 12 +++++++++--- TODO.md | 6 ++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index be94679..af7aff4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,9 +45,15 @@ safe intermediate work. - Plugins: `Plugin.define({ id, setup(ctx) })` from `@opencode/plugin`; config key `plugins`; npm package needs `type: module` + `exports["."]`. -- `ctx.skill.transform(editor)` **can add** skills programmatically (id, name, description, path, - content, autoinvoke, slash). `ctx.agent.transform(editor)` **cannot add** agents — only - list/get/update/remove/default. Hence: skills ship via plugin injection, agents via `init` copy. +- `ctx.skill.transform(editor)` **can add** skills programmatically. `Skill.Info` (verified in + `@opencode/plugin@2.0.29` typings) = `{ id, name, description?, autoinvoke?, path, content }` — + `path` must be absolute (we point it at the bundled SKILL.md so supporting files resolve); there is + **no `slash` field** in `Skill.Info` (slash is file-frontmatter only — verify `/name` exposure for + injected skills at runtime; fallback: document a `skills: ["/skills"]` config entry). + `ctx.agent.transform(editor)` **cannot add** agents — only list/get/update/remove/default. Hence: + skills ship via plugin injection, agents via `init` copy. +- `Agent.Info` (verified): `{ id, name, mode: subagent|primary|all, description?, model?, system?, + hidden, color?, steps?, request{settings,headers,body}, permissions[{action,resource,effect}] }`. - Skills frontmatter honored: `name`, `description`, `slash`, `disable-model-invocation` / `metadata.opencode/autoinvoke` (hidden from model, still loadable by id/slash). - Agent files: `.opencode/agents/.md` (project), `~/.config/opencode/agents/` (global); diff --git a/TODO.md b/TODO.md index e0c726f..3eb03dc 100644 --- a/TODO.md +++ b/TODO.md @@ -48,9 +48,11 @@ State: `.opencode/state/status.md`. Design: `docs/architecture.md`. ## Open questions -- Exact `Skill.Info`/editor.add field set — check `@opencode/plugin` typings at 1.4. +- ~~Exact `Skill.Info`/editor.add field set~~ RESOLVED 2026-10-14 (`@opencode/plugin@2.0.29`): + `{id, name, description?, autoinvoke?, path, content}`; no `slash` in Info. - V2 background subagents: still env-gated? Affects orchestrator dispatch loop wording (1.6). -- Does `slash` need explicit `true` in editor.add to expose `/name` commands? (1.4 runtime check.) +- Do plugin-injected skills get `/name` slash exposure (no `slash` field in Skill.Info)? Runtime + check at 1.9; fallback = document `skills: ["/skills"]` config entry for file-based load. - Package name/scope confirmation (1.1). - Does nightly runner have network access to github.com for upstream fetch? (1.8 — fallback: mirror upstream to Gitea and sync from the mirror.)