Skip to content

feat(mcp): read the approval mode; answer a waiting save as a delegated agent (carry-over of openadapt-agent#80) - #1192

Merged
abrichr merged 5 commits into
mainfrom
carry/agent-80
Oct 17, 2026
Merged

abrichr merged 5 commits into
mainfrom
carry/agent-80

Conversation

@abrichr

@abrichr abrichr commented Oct 17, 2026

Copy link
Copy Markdown
Member

Carry-over of OpenAdaptAI/openadapt-agent#80 (feat/delegated-approval-tools, head f6cc2107).

Replayed with git format-patch f5ef1d7d..f6cc2107 (2 commits) and git 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 the openadapt_agent shim). Stacked on the #534 carry-over (#1190), whose approval-mode code it uses; main is merged in.

Adaptations:

  • One conflict in agent/bridge.py (import block), resolved with openadapt_flow.agent.* paths; the two new in-core imports of openadapt_agent.contract and openadapt_agent.delegated point at openadapt_flow.agent too, so the core never imports the shim.
  • A follow-up commit reformats the carried files under openadapt-flow's Ruff config. No behavior change.

Local: packages/agent pytest 484 passed, 9 skipped; ruff and mypy on packages/flow clean.

…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>
@abrichr
abrichr merged commit a7bd9fa into main Oct 17, 2026
25 checks passed
@abrichr
abrichr deleted the carry/agent-80 branch October 17, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant