co-mono/packages/coding-agent/src
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
..
cli fix: enabledModels now supports glob patterns for OAuth providers 2026-01-01 02:04:04 +01:00
core Add session management and agent state methods to hooks API 2026-01-01 23:56:24 +01:00
modes Add session management and agent state methods to hooks API 2026-01-01 23:56:24 +01:00
utils Fix characters (#372) 2026-01-01 02:16:29 +01:00
cli.ts Remove old implementation files (main.ts, cli.ts, tui-renderer.ts), rename new files 2025-12-09 01:21:28 +01:00
config.ts WIP: Rewrite export-html with tree sidebar, client-side rendering 2026-01-01 03:36:47 +01:00
index.ts Consolidate session events: remove session_before_new/session_new, add reason field to switch events 2026-01-01 23:31:26 +01:00
main.ts WIP: Rewrite export-html with tree sidebar, client-side rendering 2026-01-01 03:36:47 +01:00
migrations.ts Add automatic session migration for v0.30.0 bug 2025-12-26 03:24:49 +01:00