Repository navigation
feat(cli-agent-orchestrator): real local CAO, localOnly, no hosted/CI lane - #8
Merged
Merged
Conversation
Python Preview Packages — Publish FailedPreview publish failed for commit 033e155. |
… local cao-server Reworks the CAO integration to the localOnly shape the maintainers asked for on ag-ui-protocol#2216: the Dojo talks to a real cao-server on loopback driving real agent processes, for one feature (tool_approval), with no hosted service, no CI lane and no mock server. - Drop the hosted service (render.yaml), the dojo-e2e CI lane, the CAO e2e specs and the Python mock example server. - Point the Dojo at a local cao-server (CAO_URL, default 127.0.0.1:9889) and show the tool_approval card for real permission prompts. - Add integrations/cli-agent-orchestrator/README.md (local run guide, troubleshooting) and agui-approver.md, the demo agent profile, whose limits run-local.sh enforces. - Add scripts/run-local.sh, which installs CAO at a pinned commit, starts cao-server and the Dojo, and warns when it reuses a running server. - Add scripts/e2e-local.{sh,mjs}: an unattended local check that approve writes the file, reject leaves none, and a run with nothing pending finishes. Opt-in video and screenshot capture. Not wired into CI. - Add the package license policy entry and regenerate files.json. - Drop the per-folder CODEOWNERS line; the catch-all entry covers it. Needs the CAO run-plane fix (awslabs/cli-agent-orchestrator#1106) for runs to finish after resume and when nothing is pending. Co-authored-by: plauzy <4451274+plauzy@users.noreply.github.com> Co-authored-by: Kiro Agent <244629292+kiro-agent@users.noreply.github.com>
plauzy
force-pushed
the
feat/cao-real-local-dojo
branch
from
October 27, 2026 21:59
11fb91c to
1e5cf20
Compare
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.
Reworks ag-ui-protocol#2216 to what was asked in this review: a Dojo entry that runs against a real local
cao-serverwith a real agent process, markedlocalOnly, with no hosted deployment and no CI lane, plus a README in the integration folder. This PR targetscao-integration-458; once approved there, that branch (and so ag-ui-protocol#2216) carries it.What changes
tool_approval, wired directly to${CAO_URL}/agui/v1/run(defaulthttp://127.0.0.1:9889),localOnly: true. The Python mock/projection example server is deleted, so nothing simulated is left in the Dojo path.tool_approval/page.tsx: a CAO branch inreadApprovalRequest, checked after the Mastra return. It matches only an interrupt carrying stringmetadata.providerandmetadata.terminalId, renders reason, provider and terminal id, and resolves with the same{approved}payload. The Mastra path is unchanged.integrations/cli-agent-orchestrator/:README.md: prerequisites, install, start, approve, reject, teardown, troubleshooting.agui-approver.md: a CAO profile for Claude Code withpermissionMode: defaultandallowedTools: [fs_read, fs_write], so the agent's limits are enforced by the CLI, not only by the prompt.scripts/run-local.sh: brings up a loopbackcao-serverwith AG-UI enabled and the agent in a temp dir;--downtears it all down.runAgent()/resume[]API; peer deps>=1.0.0; runtime code unchanged.render.yamlservice, thedojo-e2e.ymllane, the CAO e2e specs, and everyapps/dojo/e2e/**change. All of those files are now byte-identical toupstream/main.docs/introduction.mdxlinks the integration README instead of a hosted demo.Left out, because CAO can't genuinely back them today:
agentic_chat(the run endpoint doesn't readmessages),shared_state(CAO ignoresRunAgentInput.state),human_in_the_loop(client-declaredtools[]are never called),agentic_generative_ui(no agent step state on CAO's stream), theinterruptpage (its{chosen_time}payload is rejected by CAO), and theeditresume option (on Claude Code the edited text is ignored).Known limits: the agent's task starts outside the Dojo (the README's launch step), and the card shows no prompt text because CAO keeps prompt bodies off the wire.
CAO version
Needs two CAO fixes, in plauzy/cli-agent-orchestrator#44:
/agui/v1/runnow finishes after a resume and when nothing is pending, and Claude Code 2.1.310 tool-permission prompts are detected. Until a CAO release carries them, the README installs fromacbb1538; the line moves to the PyPI release once it ships.Verification
Live, against an isolated
cao-serverbuilt fromed6e0193(same code asacbb1538, which adds only a docstring) and a real Claude Code 2.1.310 agent, driving the realtool_approvalpage:claude-code:permission_request / claude_code in terminal …).approved-by-dojo.txt; Reject (fresh demo per README step 6) left no file, paneUser rejected write to approved-by-dojo.txt.RUN_FINISHED(interrupt), resume →RUN_FINISHED(success), and the chat left its running state.allowedToolsset, the Claude process carried--disallowedToolsfor Bash, Agent, Task, web and background tools, and the Write prompt still appeared.Gates, all exit 0:
pnpm install --frozen-lockfile,pnpm run check-types,@ag-ui/cli-agent-orchestratorbuild, test (5/5) and test:exports,generate-content-json,published-mode.test.js(12/12),bash -n(3.2) +shellcheckon the launcher.files.jsonis regenerated with the repo script.Not verified:
pnpm run testis not green on this machine. It has three failures, none in touched packages: one needsdotnet, and two are timeouts that pass when rerun alone.Evidence (recorded 2026-10-26)
integrations/cli-agent-orchestrator/scripts/e2e-local.shdrives the realtool_approvalpage against an isolatedcao-serverand a real Claude Code 2.1.310 agent: approve, then a fresh agent and reject, then a run with nothing pending. Every frame has a stamp bar naming the CAO build and the ag-ui sha.acbb1538(ag-ui-protocol#44)Videos (click to play; same runs as the GIFs above):
Before (CAO 2.5.4 from PyPI): the Write prompt raises no approval card, and every run stays open.
before.mp4
After (CAO
acbb1538, ag-uid1c21086): the card appears. Approve writesapproved-by-dojo.txt, Reject leaves no file, and every run finishes.after-1.mp4
Approve: the card, then the file it wrote
Reject: the card, then no file
The run passed 3 out of 3 on CAO
acbb1538(after-1toafter-3, 19/19 assertions each);after-4reran the committed script, also 19/19. On 2.5.4 it failed.Full resolution: before MP4 · after MP4 · after per phase: approve.webm, reject.webm, none.webm · settled chat after approve / reject / none: png, png, png · before, 15 s after asking: approve, reject, none.
CODEOWNERS
The per-folder line
integrations/cli-agent-orchestrator @ag-ui-protocol/copilotkit @plauzy @haofeiffrom the original PR is dropped; the catch-all* @ag-ui-protocol/copilotkitalready covers this folder.