You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/runtime-and-tools.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,6 +214,65 @@ Important options:
214
214
215
215
When mediated tool execution consults `completion_policy`, complete decisions stop the loop and record `completion_policy_stop` in `events[]`. Incomplete decisions with an empty message preserve the existing continue behavior. Incomplete decisions with a non-empty message append a normalized `user` text continuation message, record a `completion_policy_continue` lifecycle event in `events[]`, and emit the same event through `on_event`; the event metadata includes `tool_name`, `turn`, `message`, and caller-owned policy `context`. Agents API does not persist these diagnostics beyond the returned transcript/result surfaces.
216
216
217
+
### Trusted chat runtime tool overlays
218
+
219
+
The native `agents/chat` handler accepts runtime-local overlays only through the
220
+
server-side `agents_api_runtime_tool_declarations` filter. Public REST,
221
+
JSON-RPC, and chat request `client_context` fields cannot declare or select
222
+
runtime tools; those transport fields are stripped before dispatch.
223
+
224
+
Each map key and declaration `name` must be the same canonical id already listed
225
+
in the imported agent's `enabled_tools` allowlist. The declaration is normalized
226
+
by `WP_Agent_Tool_Declaration::normalizeForConversationRequest()`. It can replace
227
+
only the model-facing `description`, `parameters`, and runtime execution metadata
228
+
for that allowlisted tool, including `runtime.executor_target`. It cannot change
229
+
the imported declaration's ability binding, capability, mandatory flag, modes,
230
+
categories, visibility, parameter bindings, defaults, or policy behavior.
231
+
232
+
The filter runs after agent selection and final session/run context resolution.
0 commit comments