Added
- Hook API:
before_agent_starthandlers can now returnsystemPromptAppendto dynamically append text to the system prompt for that turn. Multiple hooks' appends are concatenated. - Hook API:
before_agent_starthandlers can now return multiple messages (all are injected, not just the first) - New example hook:
tools.ts- Interactive/toolscommand to enable/disable tools with session persistence - New example hook:
pirate.ts- DemonstratessystemPromptAppendto make the agent speak like a pirate - Tool registry now contains all built-in tools (read, bash, edit, write, grep, find, ls) even when
--toolslimits the initially active set. Hooks can enable any tool from the registry viapi.setActiveTools(). - System prompt now automatically rebuilds when tools change via
setActiveTools(), updating tool descriptions and guidelines to match the new tool set - Hook errors now display full stack traces for easier debugging
Changed
- Removed image placeholders after copy & paste, replaced with inserting image file paths directly. (#442 by @mitsuhiko)