/** * Loop Package Registry * * Add your own loop definitions here. This directory is designed so you can * keep each workflow in its own subdirectory without touching core runtime files. * * How to add a new loop: * * 1. Create src/loops/my-loop/definition.ts * - Export a function that returns a LoopDefinition object * - Define nodes (code, llm, gate, approval, finalizer) * - Define transitions between nodes * * 2. Create src/loops/my-loop/handlers.ts (optional, for code nodes) * - Write deterministic handler functions * - Register them with registerCodeHandler("myHandler", myHandler) * - Export a function that registers all handlers * * 3. Register here: * - Import your definition and handler registration * - Call registerDefinition(createMyLoopDefinition()) * - Call registerMyLoopHandlers() * * Example: * * import { createMyLoopDefinition } from "./my-loop/definition.ts"; * import { registerMyLoopHandlers } from "./my-loop/handlers.ts"; * * export function registerLoopPackages( * registerDefinition: (definition: LoopDefinition) => void, * ): void { * registerDefinition(createMyLoopDefinition()); * registerMyLoopHandlers(); * } * */ import type { LoopDefinition } from "../types.ts"; export function registerLoopPackages( _registerDefinition: (definition: LoopDefinition) => void, ): void { // Register your loops here. // This function is called during extension startup. // // Example: // registerDefinition(createMyCustomLoopDefinition()); // registerMyLoopHandlers(); }