agent-plugin.ts 441 B

123456789101112
  1. // Every export in this file must be a plugin function — `getLegacyPlugins`
  2. // (src/plugin/index.ts) throws on anything else. Test constants live in
  3. // `agent-plugin.constants.ts`.
  4. export default async () => ({
  5. config: async (cfg: { agent?: Record<string, unknown> }) => {
  6. cfg.agent = cfg.agent ?? {}
  7. cfg.agent["plugin_added"] = {
  8. description: "Added by a plugin via the config hook",
  9. mode: "subagent",
  10. }
  11. },
  12. })