sandbox-agent/server/packages
Nathan Flurry e84967f916 feat: add universal hooks support for sandbox-agent
Implements sandbox-agent-managed hooks that work universally across all agents
(Claude, Codex, OpenCode, Amp, Mock). Hooks are shell commands executed at
specific lifecycle points in a session.

## Hook Types
- on_session_start - Executed when a session is created
- on_session_end - Executed when a session terminates
- on_message_start - Executed before processing each message
- on_message_end - Executed after each message is fully processed

## Features
- Hooks are configured via the API when creating sessions
- Environment variables provide context (SANDBOX_SESSION_ID, SANDBOX_AGENT, etc.)
- Configurable timeout per hook
- continue_on_failure option to control execution flow
- Working directory support for hook execution

## API Changes
- CreateSessionRequest now accepts optional 'hooks' and 'workingDir' fields
- HooksConfig and HookDefinition schemas added to OpenAPI spec

## Testing
- 8 unit tests for hook execution
- 9 integration tests using mock agent with snapshot testing
- Tests cover all lifecycle hooks, multiple hooks, failure handling, and env vars
2026-01-30 13:21:41 -08:00
..
agent-credentials fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00
agent-management feat: add Claude adapter improvements for HITL support (#30) 2026-01-29 07:19:10 -08:00
error fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00
extracted-agent-schemas feat: move api cli commands under api subcommand 2026-01-28 01:11:57 -08:00
openapi-gen fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00
sandbox-agent feat: add universal hooks support for sandbox-agent 2026-01-30 13:21:41 -08:00
universal-agent-schema feat: add Claude adapter improvements for HITL support (#30) 2026-01-29 07:19:10 -08:00
universal-schema-gen fix: add description and repository fields to all crate Cargo.toml files 2026-01-27 20:32:09 -08:00