Repository navigation
Python: binding external approval to final tool arguments across resume #9667
Replies: 2 comments 1 reply
|
I traced this on main (67ba500) and ran the cases below against a fake chat client. Short version: with a session, core binds a tool approval to the arguments the approval request showed, and only to those. Pydantic coercion, runtime kwargs, What core binds (default settings, with a session)
What that binding does not cover
Declaration-only tools (
There is no public API that compares the approved arguments with the final ones; the comparison key is private. If you need it in process, a middleware placed innermost can compare The cases I ran (tool
|
|
Readback handles the lost response well. The case left open is the document written exactly as signed that turns out wrong a day later: create-only means the fix is a second action, so I'd have its retained action carry the digest of the document it supersedes and refuse if that document changed, which lets the operator sign the correction knowing exactly what it replaces. Same idea as an If-Match precondition on the write: https://gist.github.com/renezander030/383aa72aa2df60379f72e12b5602c09d |
Uh oh!
There was an error while loading. Please reload this page.
I am working on an external exact-action approval adapter and want to pin down its supported integration boundary in Python Agent Framework.
The answer in #6848 identifies declaration-only tools with the request_info/responses handshake, and FunctionMiddleware for in-process interception. #7871 separately discusses session-backed approval rebinding. My question is narrower than those two: which boundary owns the final executable arguments when validation, hidden-argument materialization or runtime kwargs can occur around approval and resume?
The contract I need is:
For a local create-only file action, I already have this host-side boundary in Action Authority 0.3.0, using the Harness writer. There is no Agent Framework/FIDES adapter yet.
Is the recommended route to keep final materialization and execution entirely host-owned behind a declaration-only tool, or is there a supported FunctionMiddleware ordering contract that binds approval to the final arguments across resume? In the FIDES case, that must preserve its policy preflight rather than expand hidden values before authorization.
I am looking for the existing contract or sample to target, not proposing a parallel approval API. This is an integration question, not a vulnerability report; the local-file component does not provide IFC or containment of a compromised host.
— krivonosoff161
All reactions