co-mono/packages/coding-agent/docs
Mario Zechner ccdd7bd283 Add session management and agent state methods to hooks API
HookAPI additions:
- pi.newSession(options?) - create new session with optional setup callback
- pi.branch(entryId) - branch from a specific entry
- pi.navigateTree(targetId, options?) - navigate the session tree

HookContext additions:
- ctx.isIdle() - check if agent is streaming
- ctx.waitForIdle() - wait for agent to finish
- ctx.abort() - abort current operation
- ctx.hasQueuedMessages() - check for queued user messages

These enable hooks to programmatically manage sessions (handoff, templates)
and check agent state before showing interactive UI.

Fixes #388
2026-01-01 23:56:24 +01:00
..
compaction.md Update custom-compaction example to use serializeConversation 2025-12-31 13:24:23 +01:00
custom-tools.md Consolidate session events: remove session_before_new/session_new, add reason field to switch events 2026-01-01 23:31:26 +01:00
extension-loading.md Update extension-loading.md with install/remove/update commands 2025-12-26 20:51:15 +01:00
hooks.md Add session management and agent state methods to hooks API 2026-01-01 23:56:24 +01:00
rpc.md Consolidate session events: remove session_before_new/session_new, add reason field to switch events 2026-01-01 23:31:26 +01:00
sdk.md Consolidate session events: remove session_before_new/session_new, add reason field to switch events 2026-01-01 23:31:26 +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 Add creation hints to docs and update system prompt 2025-12-31 13:16:44 +01:00