This repository was archived by the owner on Oct 17, 2026. It is now read-only.
Repository navigation
Conversation
…ed agent get_approval_mode tells the calling agent which approval mode the operator chose and whether it may answer saves. With serve --delegate-approvals AGENT_ID, list_approval_requests (PHI-free fields only) and answer_approval_request appear. An answer goes to openadapt-flow item-approval as decided_by automation from the mcp route, naming the agent; Flow accepts it only where the run's approver policy allows an agent for that step, and records the agent as the approver. No tool changes the mode or admits a check. Needs the delegated-approver support in openadapt-flow feat/approval-modes-delegated (not released). Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
…pproves each one With --delegate-approvals an agent can answer where the approver policy allows it, so the help text, tool description and README no longer say a person approves every save. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
Member
Author
|
Carried over into the monorepo as OpenAdaptAI/OpenAdapt#1192 (merged as a7bd9fac5e008bdba3f01e6a7985c46f6819eab7). openadapt-agent now lives in OpenAdapt/packages/agent (code in packages/flow/openadapt_flow/agent). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For Richard's review. Don't merge: openadapt-agent is frozen for the monorepo cutover.
What it adds
get_approval_mode(read-only, listed whenever runs are enabled). It returns the mode the operator chose (each_item,problems_only,not_gated, orflow_default), whether this agent may answer saves, and its id.serve --delegate-approvals AGENT_IDis an operator opt-in. AGENT_ID is an opaque id. With it, two more tools appear:list_approval_requests(run_id)returns allow-listed fields only: request id and digest, status, step id, index, class, mode and times. It never returns the step's words, the screenshot path or the run directory.answer_approval_request(run_id, request_id, request_sha256, decision, decline_reason?)runsopenadapt-flow item-approval approve|decline --decided-by automation --route mcp --delegate-kind agent --delegate-id AGENT_ID. Flow decides whether to accept it. By default its approver policy allows only a person, and a clinical write needs the customer's pinned opt-in. Flow records the agent as the approver, and the decision never becomes a training label. Flow's refusal comes back as-is, e.g.approver_kind_not_allowed.setwas left out on purpose. No tool admits a check.Depends on
feat/approval-modes-delegated(review PR): the--delegate-*flags ofitem-approvaland the approver policy.Tests
tests/test_delegated_approval.py(9): answer tools are off by default; no set or admit tool exists; the exact Flow arguments; refusals are passed through; bad arguments never reach Flow; the request list drops everything outside the allow-list.ruff checkis clean.