04d59f31ea
- Add hooks infrastructure in core/hooks/ (loader, runner, types)
- HookUIContext interface with mode-specific implementations
- Interactive mode: TUI-based selector/input/confirm dialogs
- RPC mode: JSON protocol for hook UI requests/responses
- Print mode: no-op UI context (hooks run but can't prompt)
- AgentSession.branch() now async, returns { selectedText, skipped }
- Settings: hooks[] and hookTimeout configuration
- Export hook types from package for hook authors
Based on PR #147 proposal, adapted for new architecture.
18 lines
426 B
TypeScript
18 lines
426 B
TypeScript
// Hook system types
|
|
export type {
|
|
AgentEndEvent,
|
|
AgentStartEvent,
|
|
BranchEvent,
|
|
BranchEventResult,
|
|
HookAPI,
|
|
HookEvent,
|
|
HookEventContext,
|
|
HookFactory,
|
|
HookUIContext,
|
|
TurnEndEvent,
|
|
TurnStartEvent,
|
|
} from "./core/hooks/index.js";
|
|
export { SessionManager } from "./core/session-manager.js";
|
|
export { bashTool, codingTools, editTool, readTool, writeTool } from "./core/tools/index.js";
|
|
export { main } from "./main.js";
|