UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

45 lines 1.56 kB
/** * Hook Executor * * Executes hook handlers in priority order, handles blocking, modification, * and error propagation. Provides the runtime for the hook system. * * @implements @.aiwg/requirements/use-cases/UC-004-extension-system.md * @architecture @src/extensions/types.ts * @tests @test/unit/cli/hooks/executor.test.ts * @issue #58 */ import type { HookRegistry } from './registry.js'; import type { HookEvent, HookContext, HookExecutionResult } from './types.js'; /** * Hook Executor * * Executes registered hooks for lifecycle events. Handles priority ordering, * blocking, modification accumulation, and error handling. */ export declare class HookExecutor { private registry; constructor(registry: HookRegistry); /** * Execute all hooks for a lifecycle event * * Executes hooks in priority order (ascending). Stops execution if any * hook blocks. Accumulates modifications from all executed hooks. * * @param event - Lifecycle event * @param ctx - Hook execution context * @returns Aggregated execution result */ execute(event: HookEvent, ctx: HookContext): Promise<HookExecutionResult>; /** * Execute hooks for a specific command * * Convenience method that extracts command from context. * * @param event - Lifecycle event * @param ctx - Hook execution context * @returns Aggregated execution result */ executeForCommand(event: HookEvent, ctx: HookContext): Promise<HookExecutionResult>; } //# sourceMappingURL=executor.d.ts.map