Repository navigation
Conversation
… task Run 1 by the built-in agent on the bundled synthetic clinic app, read back, compiled, canaried and admitted with throwaway keys; run 2 with a new note through the emitted MCP tool with no model calls. Emitted MCP tools now run the program off the server's event loop, where Playwright's sync API refused to start.
3e2ca63 to
8125f31
Compare
…a local MCP endpoint
8125f31 to
3e6eb48
Compare
Independent adversarial review: APPROVEFrom: Grok First review of this PR, stacked on #2406. Author is GitHub What I checked in
|
…openadapt[wrap] - The qualify default-form rewrite moves to cli_forms.py and the wrap dispatch comment shrinks, so __main__.py stays at its 14331-line budget. - The wrap subparser rejects abbreviated options, has a handler, and is routed as compile --wrap in the task view. - anthropic leaves the launcher's base dependencies for a wrap extra; a missing SDK prints the one-line uvx command. Docs use that command. - wrap/examples/ may name the bundled demo app, like the other demo paths. - Register the example and its recorded run in the public inventory, and fix the CAPABILITIES link to the recorded run.
# Conflicts: # CAPABILITIES.md # llms-full.txt # tests/test_wrap_command.py
Independent adversarial review: REQUEST CHANGESFrom: Claude (independent reviewer) Blockers
Checked and fine
Out of scope
|
tests/test_cli_documented_tasks.py holds that discovery must not invent an engine wrap verb, and the parser entry imported the wrap package (and its POSIX-only ledger locks) while building the parser, which broke Windows. Drop the openadapt-flow wrap entry, its task route, its command file and the cli_forms module that only made room for it; __main__.py is main's again. The benchmark README no longer promises a .txt output file.
# Conflicts: # CAPABILITIES.md # llms-full.txt # packages/flow/docs/commands/01-record-and-build/wrap.md # packages/flow/openadapt_flow/wrap/cli.py
…ithhold verifier credentials
- Ctrl-C and SIGTERM to openadapt wrap end the wrapped command's whole
process group (it runs in its own session, so neither reached it), and
--command-timeout still ends the group. Tests cover both, grandchild
included.
- A run without --request-id gets an ID derived from the task, the command
and its inputs, never a random one, so a retry dedupes.
- Every variable the task's verify.yaml reads (${NAME} references and
*_env values) is left out of the command's environment, as WRAP.md says.
Independent adversarial review: REQUEST CHANGESFrom: Claude (independent reviewer) Delta from Blockers
Checked and fine
Out of scope
|
…v maps; say when a run is deduped
- The SIGINT and SIGTERM handlers stop the command's group themselves, so a
signal during a browser tool call (whose error handling keeps the
interrupt) still ends it. Test: the command on serve_while's worker
thread, the main thread inside a tool call, both signals.
- verify_env_names withholds every value of a *_env map such as
secret_env: {slot: VAR}.
- A run whose derived request ID already ran prints one stderr line saying
nothing ran again and that a new --request-id runs it again.
Independent adversarial review: REQUEST CHANGESFrom: Claude (independent reviewer) Delta from BlockerThe dedupe notice tells the user to bypass reconciliation. Fix: when Earlier blockers: fixed
RLock and running the handler from a signal
Behavior worth knowing (not blocking)
CICI had just started on this head: 12 checks pending, none failed yet. Judge the result by CI. The shared venv has no pytest, so I did not run the unit tests locally. |
…, not rerun RECONCILIATION_REQUIRED means the earlier attempt may have saved, so the deduped-run notice (pass a new --request-id) could lead to a second save. That case now prints its own line telling the user to check the record in the app before rerunning; the rerun line stays for finished replays only.
Independent adversarial review: APPROVEFrom: Claude (independent reviewer) Delta from What I checked
Nit (non-blocking)The check is on the status, not on CICI had just started on this head: 12 checks pending and none failed yet. Merge once they are green. |
Independent adversarial review: APPROVEFrom: Claude (independent reviewer) Delta review against the previous approval at f5e314a. What I checked:
The delta is the typing fix the author described. Strictly it is 5 changed lines, not 1, but they are all the same rename plus the annotation. I found no behaviour change and no new risk. |
# Conflicts: # CAPABILITIES.md # llms-full.txt # packages/flow/public-artifacts.json # uv.lock
# Conflicts: # CAPABILITIES.md # llms-full.txt
What this does
openadapt wrap --task TASK --param NAME=VALUE -- COMMAND ...runs your own agent, any program, for the first run instead of OpenAdapt's built-in agent. Stacked on #2406 (openadapt wrap --example); retarget tomainafter #2406 merges.COMMANDwith three variables:OPENADAPT_MCP_URL(a streamable-HTTP MCP endpoint on 127.0.0.1),OPENADAPT_MCP_TOKEN(a random per-run bearer token, compared in constant time) andOPENADAPT_TASK(the task with its inputs).observe,click,type_text,press_key,scroll,finish), behind compile-agent's harness: the save gate, a read-back of every save, the origin check, and recording. The command gets no handle to the browser itself.openadapt wrap --task. A nonzero exit is a failed capture: no program, andopenadapt wrapexits with the command's status.openadapt wrap run --task TASK --param ...runs the admitted program only, with no command and no model calls. With no admitted program it exits 2 with[NO_ADMITTED_PROGRAM], or[DRAFT_NOT_ADMITTED]naming a draft that run 1 left.Safety
OPENADAPT_*variable (the admission-key passphrase,OPENADAPT_FLOW_SECRET_<NAME>sign-in values, Cloud keys) and without any variable the task'sverify.yamlreads: each${NAME}reference and each*_envvalue, including every value of asecret_env: {slot: VAR}map, such as a database password or an API token. An unreadableverify.yamlstops the run before the command starts.--command-timeout(default 600 s) ends the whole group, and so do Ctrl-C and SIGTERM sent toopenadapt wrap. The signal handlers stop the group themselves, so a signal that arrives during a browser tool call still ends the command, and every exit stops what is still running.--request-id, the ID is derived from the task path, the command and its inputs (wrap-<sha256 prefix>), never generated at random, so asking for the same run again dedupes. A deduped run prints its earlier result and one stderr line saying nothing ran again and that a new--request-idruns it again (for example after a failure). A run with no command and norunstill requires--request-id.Files
openadapt_flow/wrap/process.py:ProcessAgent, the token-checked MCP endpoint, the child environment, the process-group runner.openadapt_flow/wrap/cli.py:-- COMMAND,wrap run,--command-timeout, the signal handling.openadaptlauncher: passes--and the command through unchanged.examples/wrap_command/agent.py: a small listing-driven agent with no model, used by the e2e.docs/WRAP.md("Wrap your own agent"), a CAPABILITIES.md row, and the refreshedllms-full.txt.Tests
tests/e2e/test_wrap_command_e2e.py: an outside command is compiled, admitted and replayed with no model calls; a failing command makes no program and keeps its exit status; the endpoint refuses a request without the token.packages.ymlruns it in the critical-e2e step.tests/test_wrap_command_cli.py: argument routing, exit status passthrough,runnever starting an agent, no OpenAdapt settings or verifier credentials in a real child's environment, a deterministic request ID that a retry repeats, the timeout ending the whole group, and SIGTERM and SIGINT to OpenAdapt ending the command's group, grandchild included, both directly and while the main thread is inside a browser tool call with the command onserve_while's worker thread, and the deduped-run notice.tests/test_wrap_command.py: the launcher keeps the--separator and the command's own flags.