Repository navigation
feat(mcp): read the approval mode; answer a waiting save as a delegated agent (carry-over of openadapt-agent#80) - #1192
Merged
Merged
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>
…f config openadapt-agent formatted with a longer line length; since the fold the MCP server lives in openadapt_flow.agent and follows openadapt-flow's ruff format settings. No behavior change. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Carry-over of OpenAdaptAI/openadapt-agent#80 (
feat/delegated-approval-tools, headf6cc2107).Replayed with
git format-patch f5ef1d7d..f6cc2107(2 commits) andgit am -3, with paths mapped to the folded layout:src/openadapt_agent/{bridge,cli,delegated,runner}.py→packages/flow/openadapt_flow/agent/, README and tests →packages/agent/(tests import through theopenadapt_agentshim). Stacked on the #534 carry-over (#1190), whose approval-mode code it uses;mainis merged in.Adaptations:
agent/bridge.py(import block), resolved withopenadapt_flow.agent.*paths; the two new in-core imports ofopenadapt_agent.contractandopenadapt_agent.delegatedpoint atopenadapt_flow.agenttoo, so the core never imports the shim.Local:
packages/agentpytest 484 passed, 9 skipped; ruff and mypy onpackages/flowclean.