feat(core): add plugin list endpoint

Adds a plugin.list HTTP endpoint that reports currently loaded plugins, wires it through protocol, server, and generated clients, and merges it into sdk-next's plugin API. Also updates the sample plugin to register a primary agent instead of a subagent for local testing.
This commit is contained in:
Dax Raad 2026-07-01 00:53:22 -04:00
commit 6a91a682e4
13 changed files with 998 additions and 883 deletions

View file

@ -3,9 +3,9 @@ export default {
setup: async (ctx) => {
await ctx.agent.transform((agents) => {
agents.update("sample-plugin-agent", (agent) => {
agent.description = "Example subagent registered by .opencode/plugins/sample-agent.ts"
agent.mode = "subagent"
agent.prompt = [
agent.description = "Example primary agent registered by .opencode/plugins/sample-agent.ts"
agent.mode = "primary"
agent.system = [
"You are the sample plugin agent for this repository.",
"Use this agent to verify that local plugin auto-discovery can add agents.",
"Keep responses concise and explain which plugin registered you when asked.",