mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 09:28:42 +00:00
16 lines
609 B
TypeScript
16 lines
609 B
TypeScript
export default {
|
|
id: "sample-agent-plugin",
|
|
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 = [
|
|
"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.",
|
|
].join("\n")
|
|
})
|
|
})
|
|
},
|
|
}
|