feat: PHI-safe observe and one-OK admit on AuthoringSession - #468
Merged
Conversation
Agent-led demonstration already wraps Recorder and compile_recording. observe() now returns a projected tree without titles, values, screenshots, URLs, or backend pixels. Click still uses remembered pixel bounds. admit() records that a local operator accepted the compiled draft (empty/ok/yes/True). It does not mint a production admission.
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.
openadapt-agent serve --authoringalready constructsAuthoringSessionwhen the module is importable. This fills the two remaining holes for a real session:observe()and one-OKadmit().observe()returnsopenadapt.authoring.observe/v1. Window titles, field values, screenshots, URLs, and backend pixels stay off that payload. Pixel bounds stay on the session, so a laterclick(node_id=...)still hits the remembered center. Windows / RDP / Citrix still raiseCoachOnlyErrorat construct. web / macos / linux stay agent-drive when the window is pinned.compile()is unchanged. It wrapscompile_recordingand returnsneeds_human_admit. An agent click still can't paintVERIFIED.admit(confirm=None)is the human step. Empty,ok,yes, andTrueall succeed. The operator doesn't re-enter schema, authority, effect contract, environment, or digest. Those come from the compiled draft. The method writesadmit.jsonnext to the bundle (kind=local_operator_accept) and returns{status: accepted, workflow_id, digest?}. It doesn't mint a Seal or a Production admission.Continue still uses
Recorder.record_observed. It never callstype_texton the pause target.Reviewer checklist
observe()payload has none of:value,text,title,screenshot,url,backend_pixels.click(node_id=...)afterobserve()uses remembered pixels.admit()withNone/""/"ok"/"yes"/Truewritesadmit.jsonand returnsaccepted.admit("no")andadmit(False)refuse.admit()beforecompile()refuses.qualification_admission, orbundle_sealing.Tests:
tests/test_authoring.py(unit, fakes). The existing MockMed Playwright gate is untouched.Opened by an agent session, not the founder.