Context
OpenCode V2 is currently beta and intentionally does not load V1 plugin implementations: https://opencode.ai/v2/docs/migrate-v1
Ponytail already has a strong cross-host boundary: shared instruction/config builders, AGENTS.md, skills, and commands. Only the OpenCode runtime adapter in .opencode/plugins/ponytail.mjs is V1-specific. It currently uses an async plugin export with config, experimental.chat.system.transform, and command.execute.before.
Suggested port plan
- Keep shared instruction generation and persisted mode handling unchanged.
- Add a separate V2 adapter using a unique
id + setup contract.
- Register packaged skills and commands through V2 setup transforms, or rely on native disk discovery where possible.
- Inject active Ponytail instructions through the V2 session context hook.
- Handle
/ponytail <mode> through the V2 command transform.
- Keep
AGENTS.md / skills as the no-plugin fallback for users who do not need runtime mode switching.
- Preserve V1 adapter until V2 stabilizes rather than forcing one file to support both contracts.
Compatibility checks
- Plugin appears in
opencode2 api get /api/plugin.
- Default mode is injected once with no duplicate rules.
/ponytail lite|full|ultra|off changes later turns and persists as documented.
- Packaged commands and skills remain discoverable.
- Missing or malformed state files fall back safely.
- Installation from npm works in standalone and managed service modes.
- Existing multi-agent tests and V1 OpenCode behavior remain unchanged.
Would a thin V2 adapter be welcome once the API settles? I can help test it against current opencode2 previews.
Context
OpenCode V2 is currently beta and intentionally does not load V1 plugin implementations: https://opencode.ai/v2/docs/migrate-v1
Ponytail already has a strong cross-host boundary: shared instruction/config builders,
AGENTS.md, skills, and commands. Only the OpenCode runtime adapter in.opencode/plugins/ponytail.mjsis V1-specific. It currently uses an async plugin export withconfig,experimental.chat.system.transform, andcommand.execute.before.Suggested port plan
id+setupcontract./ponytail <mode>through the V2 command transform.AGENTS.md/ skills as the no-plugin fallback for users who do not need runtime mode switching.Compatibility checks
opencode2 api get /api/plugin./ponytail lite|full|ultra|offchanges later turns and persists as documented.Would a thin V2 adapter be welcome once the API settles? I can help test it against current
opencode2previews.