feat(flow): authoring session wraps Recorder; compile wrapper returns needs_human_admit - #449
Merged
Merged
Conversation
… needs_human_admit Scripted actuate+record goes through the existing Recorder. Continue after pause_for_input calls record_observed on the pause-target node and never backend.type_text. Compile wraps compile_recording and returns needs_human_admit. Citrix/RDP/Windows native refuse agent-drive. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
Halt is abort: compile after halt is refused. Compile() no longer requires bundle_dir/name and refuses while paused. Continue stays paused on an empty non-secret field, reads Playwright input_value when text_value_at is absent, and is tested not to call Recorder.type_text. Secret pause-target frames are blacked out. open_session is the Desktop/stdio factory. compile_recording signature and emit/mcp_tool.py are unchanged. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
… gate MockMed in this file is a Playwright fixture for CI. It is not a user path and not a reason to wait for a real bank or tax job. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
Member
Author
|
Merged by an agent session, not the founder. |
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.
Implementation continues. Do not merge unless the founder says so. This PR is F1 of the authoring mailbox stack: ChatGPT.com can drive once on the person's computer, Flow records, a person admits. The un-park gate is a synthetic CI job, not a real bank or tax job.
Synthetic un-park gate
tests/test_authoring.pyis the gate. It drives MockMed through Playwright: no PHI, CI only, never shown as the user's path on start or pack pages. A green run of that file is enough to keep implementing mailbox/MCP/local drive. Production should serve mailbox and/mcp(web 464). Rollback isAUTHORING_MCP=0. User jobs are the ones they name.Summary
F1 of the hosted authoring MCP stack. New
openadapt_flow/authoring.pywraps the existingRecorderfor a scripted first demonstration. Desktop and--authoringstdio call this session (open_session/AuthoringSession). It does not fork the recording format, does not changecompile_recording, and does not copyemit/mcp_tool.py.Behavior
click/type_text/pressgo throughRecorder→events.jsonl+ frames (same path asrecord_desktop_demo).pause_for_inputcaptures the pause-target node (backend_pixels+before_png) at pause start and returns{paused, param, secret}with no value.Recorder.record_observedon that pause-target. It does not callbackend.type_text/Recorder.type_textand does not read current OS focus (overlay Continue can steal it).secret=True, no text on disk,redact_regionof pause-target bounds (frames blacked out). Empty readable field stays paused. Masked AX-empty + operator Continue still records.text_value_at/ Playwrightinput_valueon the pause-target pixels; text goes intorecord_observedonly. Empty/unreadable non-secret field stays paused.AuthoringSession.compile()callscompile_recording(signature unchanged, returnsWorkflow) and wraps the result as{ status: "needs_human_admit", workflow_id, recording_retained: true }. Never paintsVERIFIED. Optionalbundle_dir/name(A1 callscompile()with no args).win,win_agent) refuse agent-drive withCOACH_ONLY. Do not spawnwin_agent/parallels_vm.launch_agent.record_injected.Taxes/RBC/Amex are an example job only and are not hardcoded. MockMed is not a product path.
Gaps closed (2026-09-01 review vs design)
_haltedis now enforced; compile after halt is refused.compile()no longer requiresbundle_dir/name.open_session()factory for Desktop / stdio--authoring.{recorded: true}or return a value.Recorder.type_text(test spies both backend and recorder).input_valuefallback whentext_value_atis absent.win_agentspawn, noemit/mcp_tool.py.Tests
tests/test_authoring.py(scripted backend + live MockMed fixture), 29 passed:backend.type_textorRecorder.type_text(required).text_value_at, notfocused_text_value.input_valuepath whentext_value_atis missing.text_value_at/input_valueintorecord_observedonly; MockMed compile returnsneeds_human_admit.needs_human_admitand actually callscompile_recording(with and without args).win_agentraiseCOACH_ONLY.Out of scope
compiler/compile.pycompile_recordingsignature: unchanged.emit/mcp_tool.py: untouched (replay, not record).execute/), 443, 445.Opened by an agent session, not the founder.