Patch Changes
- b3588dc:
WorkflowAgentpassed the assistant response that contains the tool calls totoolApproval, so approval functions saw pending, denied, and invalid sibling calls as if they were completed history. Approval functions now receive only the messages that were sent to the model for the step, without system messages and without the current response, as documented forgenerateTextandstreamText. - f3d7a10: fix(workflow): evaluate a
toolApprovalpolicy with the runtime context of the current step.WorkflowAgentnow passes theruntimeContextreturned byprepareStepto the approval policy for that step instead of the context from the start of the call, so a policy that tightens permissions per step denies or requires approval for the calls it restricts, as inToolLoopAgent. - 7655f47:
WorkflowAgentnow passes the tool metadata, dynamic flag, and title defined by the server-side tool totoolApprovalpolicies, both for new tool calls and for approved calls replayed from message history. Previously a policy that protects a tool throughtoolCall.toolMetadatacould let the tool run, and a policy that no longer requires approval could still see the call as requiring one. - Updated dependencies [3bea041]
- Updated dependencies [30d35eb]
- Updated dependencies [fab7478]
- Updated dependencies [10ff0b1]
- Updated dependencies [718824c]
- Updated dependencies [e878ab3]
- Updated dependencies [d99098a]
- ai@7.0.174
- @ai-sdk/provider@4.0.39
- @ai-sdk/provider-utils@5.0.82