docs: record verified Skill.Info and Agent.Info typings from @opencode/plugin 2.0.29
This commit is contained in:
1 parent
b635362171
commit
d190ded022
2 files changed
+13
-5
No files matched your search
@@ -45,9 +45,15 @@ safe intermediate work.
|
|||||||
|
|
||||||
- Plugins: `Plugin.define({ id, setup(ctx) })` from `@opencode/plugin`; config key `plugins`;
|
- Plugins: `Plugin.define({ id, setup(ctx) })` from `@opencode/plugin`; config key `plugins`;
|
||||||
npm package needs `type: module` + `exports["."]`.
|
npm package needs `type: module` + `exports["."]`.
|
||||||
- `ctx.skill.transform(editor)` **can add** skills programmatically (id, name, description, path,
|
- `ctx.skill.transform(editor)` **can add** skills programmatically. `Skill.Info` (verified in
|
||||||
content, autoinvoke, slash). `ctx.agent.transform(editor)` **cannot add** agents — only
|
`@opencode/plugin@2.0.29` typings) = `{ id, name, description?, autoinvoke?, path, content }` —
|
||||||
list/get/update/remove/default. Hence: skills ship via plugin injection, agents via `init` copy.
|
`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: ["<pkg>/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` /
|
- Skills frontmatter honored: `name`, `description`, `slash`, `disable-model-invocation` /
|
||||||
`metadata.opencode/autoinvoke` (hidden from model, still loadable by id/slash).
|
`metadata.opencode/autoinvoke` (hidden from model, still loadable by id/slash).
|
||||||
- Agent files: `.opencode/agents/<name>.md` (project), `~/.config/opencode/agents/` (global);
|
- Agent files: `.opencode/agents/<name>.md` (project), `~/.config/opencode/agents/` (global);
|
||||||
|
|||||||
@@ -48,9 +48,11 @@ State: `.opencode/state/status.md`. Design: `docs/architecture.md`.
|
|||||||
|
|
||||||
## Open questions
|
## 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).
|
- 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: ["<pkg-dir>/skills"]` config entry for file-based load.
|
||||||
- Package name/scope confirmation (1.1).
|
- Package name/scope confirmation (1.1).
|
||||||
- Does nightly runner have network access to github.com for upstream fetch? (1.8 — fallback: mirror
|
- Does nightly runner have network access to github.com for upstream fetch? (1.8 — fallback: mirror
|
||||||
upstream to Gitea and sync from the mirror.)
|
upstream to Gitea and sync from the mirror.)
|
||||||
|
|||||||
Reference in new issue
Block a user