(opts: {
slug: string;
baseDir: string;
scope: 'project' | 'user';
})
| 280 | |
| 281 | /** Remove a server-pushed agent-hook plugin file for OpenCode. */ |
| 282 | export async function removeOpencodeAgentHook(opts: { |
| 283 | slug: string; |
| 284 | baseDir: string; |
| 285 | scope: 'project' | 'user'; |
| 286 | }): Promise<void> { |
| 287 | assertSafeSlug(opts.slug); |
| 288 | const dir = resolveOpencodePluginDir(opts.baseDir, opts.scope); |
| 289 | const file = path.join(dir, `teamai-agent-${opts.slug}.ts`); |
| 290 | if (await pathExists(file)) { |
| 291 | await remove(file); |
| 292 | log.success(`Removed OpenCode agent hook [${opts.slug}] from ${file}`); |
| 293 | } |
| 294 | } |
no test coverage detected