Parent issue
strands-agents/sdk-typescript#1104
Scope
Write integration tests validating the hooks/callback system:
HookRegistry on Agent
- Registering callbacks for specific stream event types
- Callbacks fire at correct lifecycle points (before/after invocation, model call, tool call)
- Multiple callbacks for the same event
- Callback receives correct event data
- Stream event type coverage (text-delta, tool-use, tool-result, stop, error, etc.)
Context
The Python hooks system subscribes to stream events emitted by the WASM guest. Each event arm in the WIT stream-event variant maps to a Python class. Callbacks are registered per-class on the HookRegistry.
Key areas:
- Event dispatch correctly maps WIT variant arms to Python callback classes
- Callback ordering (registration order for "before" events, reverse for "after")
- Event data is correctly deserialized from WIT types
Done when
Parent issue
strands-agents/sdk-typescript#1104
Scope
Write integration tests validating the hooks/callback system:
HookRegistryon AgentContext
The Python hooks system subscribes to stream events emitted by the WASM guest. Each event arm in the WIT
stream-eventvariant maps to a Python class. Callbacks are registered per-class on theHookRegistry.Key areas:
Done when