import type { HarnessAdapter, ToolNameMap } from '../harness.js'; import type { GuardResult, AnyGuardDefinition } from '../guard.js'; /** * OB1 hook output protocol. * * OB1 hooks receive JSON on stdin and return JSON on stdout: * Allow (no context): {} * Allow (with context): { "output": "context message for the agent" } * Block: { "error": "reason for blocking" } */ export interface OB1HookOutput { /** Context to inject into agent's conversation (when allowing) */ output?: string; /** Error message to block the operation */ error?: string; } /** OB1 adapter — formats guard output for OB1's JSON hook protocol. */ export declare class OB1Adapter implements HarnessAdapter { readonly id: "ob1"; readonly displayName = "OB1"; readonly toolNames: ToolNameMap; readonly supportedEvents: Set; readonly supportsContextInjection = true; hooksConfigPath(_cwd: string): string | null; formatPreToolOutput(result: GuardResult): OB1HookOutput; formatPostToolOutput(result: GuardResult): OB1HookOutput; formatStopOutput(result: GuardResult): OB1HookOutput; /** * Generate per-event dispatcher script content for a set of guards. * OB1 uses per-event scripts named _slope.sh in .ob1/hooks/. * Each script handles all guards for that event, including tool name filtering. * * Returns a map of script filename → script content. */ generateHooksConfig(guards: AnyGuardDefinition[], guardScriptPath: string): Record; installGuards(cwd: string, guards: AnyGuardDefinition[]): void; detect(cwd: string): boolean; } /** Singleton instance */ export declare const ob1Adapter: OB1Adapter; //# sourceMappingURL=ob1.d.ts.map