import type { Annotation } from "@vincentt-xr/harness/events"; export interface Injector { /** Stable id for config/logging: "claude-code" | "paste" | … */ readonly name: string; /** Cheap best-effort readiness probe. The dispatcher skips unavailable injectors. */ isAvailable(): Promise; /** * Deliver so the agent acts with zero user action. Resolves when the host * accepted the injection (not when the agent finishes). Throws if it couldn't — * the dispatcher falls through to the next injector (paste never throws). */ inject(a: Annotation): Promise; } export interface Dispatcher { dispatch(a: Annotation): Promise; } /** Walk the injector chain; first available that accepts wins, else fall through. */ export declare function createDispatcher(injectors: Injector[], onLog?: (msg: string) => void): Dispatcher; /** * Claude Code passive injector: append the annotation to a queue a running `/loop` * drains. Available only when the queue dir exists (the loop has been set up), so a * project with no loop configured falls through to the fallback. */ export declare function claudeCodeInjector(queuePath: string): Injector; /** * Universal never-fail fallback. When no zero-action injector accepted the * annotation, stage a ready prompt so the worst case is a single paste. */ export declare function pasteInjector(onReady: (prompt: string) => void): Injector;