sandbox-agent/server
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
..
packages feat: add universal hooks support for sandbox-agent 2026-01-30 13:21:41 -08:00
AGENTS.md feat: expand api snapshots and schema tooling 2026-01-26 00:13:17 -08:00
ARCHITECTURE.md docs: documentation overhaul and universal schema reference (#10) 2026-01-28 05:07:15 -08:00
CLAUDE.md docs: documentation overhaul and universal schema reference (#10) 2026-01-28 05:07:15 -08:00