mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 23:01:30 +00:00
- Custom tools: TypeScript modules that extend pi with new tools - Custom TUI rendering via renderCall/renderResult - User interaction via pi.ui (select, confirm, input, notify) - Session lifecycle via onSession callback for state reconstruction - Examples: todo.ts, question.ts, hello.ts - Hook examples: permission-gate, git-checkpoint, protected-paths - Session lifecycle centralized in AgentSession - Works across all modes (interactive, print, RPC) - Unified session event for hooks (replaces session_start/session_switch) - Box component added to pi-tui - Examples bundled in npm and binary releases Fixes #190
37 lines
820 B
TypeScript
37 lines
820 B
TypeScript
/**
|
|
* Core modules shared between all run modes.
|
|
*/
|
|
|
|
export {
|
|
AgentSession,
|
|
type AgentSessionConfig,
|
|
type AgentSessionEvent,
|
|
type AgentSessionEventListener,
|
|
type CompactionResult,
|
|
type ModelCycleResult,
|
|
type PromptOptions,
|
|
type SessionStats,
|
|
} from "./agent-session.js";
|
|
export { type BashExecutorOptions, type BashResult, executeBash } from "./bash-executor.js";
|
|
export {
|
|
type CustomAgentTool,
|
|
type CustomToolFactory,
|
|
type CustomToolsLoadResult,
|
|
discoverAndLoadCustomTools,
|
|
type ExecResult,
|
|
type LoadedCustomTool,
|
|
loadCustomTools,
|
|
type RenderResultOptions,
|
|
type ToolAPI,
|
|
type ToolUIContext,
|
|
} from "./custom-tools/index.js";
|
|
export {
|
|
type HookAPI,
|
|
type HookError,
|
|
type HookEvent,
|
|
type HookEventContext,
|
|
type HookFactory,
|
|
HookRunner,
|
|
type HookUIContext,
|
|
loadHooks,
|
|
} from "./hooks/index.js";
|