"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.content = exports.filename = void 0;
exports.filename = 'README.md';
exports.content = `# Repoburg Tool Hooks

This directory contains TypeScript scripts that can be attached to AI tool execution events.
You can configure these hooks in the "Tool Hooks" section of the Repoburg UI.

## How it works

1.  **Create a script** in this folder (e.g., \`audit-patch.ts\`).
2.  **Go to UI**: Open Repoburg -> Tool Hooks -> Add Hook.
3.  **Configure**: Select the tool (e.g., \`patch\`), timing (\`before\` or \`after\`), and your script.

## Script Interface

Your script must **export a default function** that receives the context.

### Input Context

\`\`\`typescript
interface HookContext {
  hook_type: 'before' | 'after';
  
  action: {
    tool_name: string; // e.g. "patch"
    args: any;         // e.g. { file_path: "src/app.ts", patch_code: "..." }
    
    // Only present for 'after' hooks
    result?: {
      status: 'SUCCESS' | 'FAILURE';
      output?: string;
      error?: string;
    };
  };

  plan_context: any; // Shared state of the current AI plan
}
\`\`\`

### Output Format

Your function should return an object (or void if passive):

\`\`\`typescript
interface HookOutput {
  // If true, the AI plan stops immediately.
  should_halt_plan?: boolean;
  
  // Optional message to log in the UI
  message?: string;
  
  // Optional data to merge back into the plan context
  update_context?: Record<string, any>;
}
\`\`\`
`;
//# sourceMappingURL=readme.js.map