co-mono/packages/coding-agent/docs
Helmut Januschka c956a726ed feat(coding-agent): add hook API for CLI flags, shortcuts, and tool control
Hook API additions:
- pi.getTools() / pi.setTools(toolNames) - dynamically enable/disable tools
- pi.registerFlag(name, options) / pi.getFlag(name) - register custom CLI flags
- pi.registerShortcut(shortcut, options) - register keyboard shortcuts

Plan mode hook (examples/hooks/plan-mode.ts):
- /plan command or Shift+P shortcut to toggle
- --plan CLI flag to start in plan mode
- Read-only tools: read, bash, grep, find, ls
- Bash restricted to non-destructive commands (blocks rm, mv, git commit, etc.)
- Interactive prompt after each response: execute, stay, or refine
- Shows plan indicator in footer when active
- State persists across sessions
2026-01-04 18:13:28 +01:00
..
compaction.md Update custom-compaction example to use serializeConversation 2025-12-31 13:24:23 +01:00
custom-tools.md Update docs for ctx.ui.editor() and handoff example 2026-01-02 01:26:21 +01:00
extension-loading.md Update extension-loading.md with install/remove/update commands 2025-12-26 20:51:15 +01:00
hooks.md feat(coding-agent): add hook API for CLI flags, shortcuts, and tool control 2026-01-04 18:13:28 +01:00
rpc.md Fix slash commands and hook commands during streaming 2026-01-03 15:36:54 +01:00
sdk.md Fix slash commands and hook commands during streaming 2026-01-03 15:36:54 +01:00
session-tree-plan.md Update session-tree-plan.md: tree selector details, theme.md done, add Before Release section 2025-12-30 22:42:25 +01:00
session.md Consolidate session events: remove session_before_new/session_new, add reason field to switch events 2026-01-01 23:31:26 +01:00
skills.md Add creation hints to docs and update system prompt 2025-12-31 13:16:44 +01:00
theme.md Add theme-configurable HTML export colors (from PR #387) 2026-01-01 22:21:40 +01:00
tree.md feat(coding-agent): implement /tree command for session tree navigation 2025-12-30 22:42:22 +01:00
tui.md Update tui.md docs: replace isXxx() with matchesKey() and Key helper 2026-01-03 23:10:22 +01:00