v0.106.0 — human-in-the-loop tool approval
Client-executed tools + human-in-the-loop approval (fork issue #4, phase 1)
Clean-room reimplementation of upstream prism-php#932 (the most-requested upstream feature, prism-php#921), wired end-to-end for Anthropic and OpenAI Text + Structured:
Tool::clientExecuted()— the tool is sent to the model but executed by your application: the request loop stops and pending tool calls come back on the response; resume by appending aToolResultMessagewith your results.Tool::requiresApproval(bool|Closure)— execution pauses for an approval decision. Pending calls surface asToolApprovalRequests (server-generated ids) on the assistant message and step; resume withToolApprovalResponses. Deny-by-default: unanswered or denied requests produce denial results, never execution.ToolApprovalRequestEventstream event type + broadcast mapping (ToolApprovalRequestBroadcast) for realtime approval UIs.- Providers not yet wired keep their exact previous behavior (legacy
callToolspath untouched). Streaming emission + remaining providers tracked in fork issue #4. - Ports the upstream PR's unit suite (39 tests).
Security
- Replicate generated-image auto-download hardened (closes #5): https-only, host allowlist (
replicate.deliverydefault, configurable), 30s timeout, 25MB cap — per the v0.105.0 release audit.
Suite: 1866 passing, PHPStan clean.