Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
da2b61f
feat(flow): flight recorder for third-party agents
abrichr Nov 21, 2026
a39f4f1
fix(flight): keep zero coordinates in logged actions
abrichr Nov 21, 2026
b34a658
fix(flight): price OpenAI cached tokens once; lint and types
abrichr Nov 21, 2026
8d4d903
test(flight): cached-token pricing and --no-scrub refusal; one-line r…
abrichr Nov 21, 2026
c9b25a9
test(flight): real-model smoke as a short loop; record its evidence
abrichr Nov 22, 2026
a9fee95
docs(capabilities): flight row status is the open PR
abrichr Nov 22, 2026
42c8789
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
8b31252
fix(flight): scrub every string in the request, not six keys
abrichr Nov 22, 2026
d42246d
feat(flight): ScrubbedEgress, the J7 egress API with a macOS egress b…
abrichr Nov 22, 2026
c66dda6
test(flight): synthetic PHI never reaches the model payload; measure …
abrichr Nov 22, 2026
ee27706
fix(flight): refuse unenforced egress and fail a run that bypassed th…
abrichr Nov 22, 2026
5c8e87e
fix(flight): hold every click not known to be safe; OCR names only th…
abrichr Nov 22, 2026
9703d68
fix(cli): route the flight verb through FLOW_NAMES (run --flight)
abrichr Nov 22, 2026
54e814d
docs(flight): say what is enforced and what was measured
abrichr Nov 22, 2026
54ca021
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
905d3f9
fix(cli): pass the new flight options through the launcher
abrichr Nov 22, 2026
fd21c03
fix(flight): a timeline that can't be written refuses the egress session
abrichr Nov 22, 2026
a16ac1c
fix(flight): no exemptions inside tool payloads; OCR text has no role
abrichr Nov 22, 2026
5697889
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
ba77491
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
fc533cc
fix(flight): find names in long prompts and JSON in text
abrichr Nov 22, 2026
dc22747
feat(flight): run pseudonyms the agent can use, and less over-redaction
abrichr Nov 22, 2026
fba9c7a
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
9da11b2
docs: refresh llms-full for the flight scrubber changes
abrichr Nov 22, 2026
4836638
fix(flight): refuse a run with no call count and no egress block; scr…
abrichr Nov 22, 2026
e6a24bd
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
3b9cca0
fix(flight): close five review gaps in the gate and the scrubber
abrichr Nov 22, 2026
f3e1957
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
0fa7a4f
fix(flight): hold typing with unknown focus; scrub base64 inside text
abrichr Nov 22, 2026
1f60b67
fix(flight): hold typed control characters; find wrapped base64
abrichr Nov 22, 2026
334d065
fix(flight): catch wrapped base64 with a short first line or escaped …
abrichr Nov 22, 2026
525836c
fix(flight): end base64 shape-chasing with decoding and a backstop
abrichr Nov 22, 2026
a8b7de9
test(flight): the flight modules build without POSIX-only imports
abrichr Nov 22, 2026
5fffd51
fix(flight): search image signatures anywhere; state the scrubber's l…
abrichr Nov 22, 2026
b9453cb
fix(flight): run the density backstops on the joined request too
abrichr Nov 22, 2026
f6fa92e
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
e1215eb
docs(flight): narrow the scrubbing claim to what is covered
abrichr Nov 22, 2026
ddf9ae0
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
b1a2f7a
fix(flight): register the flight evidence in the public artifact inve…
abrichr Nov 22, 2026
a297fd9
fix(cli): openadapt flight says which openadapt-flow it needs
abrichr Nov 22, 2026
7352cd8
ci(flow): run the flight OCR tests with tesseract; prove OCR loss fai…
abrichr Nov 22, 2026
f229112
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
35e6dc1
build(eligibility): relock for pytesseract in Flow's dev extra
abrichr Nov 22, 2026
572c30f
Merge remote-tracking branch 'origin/main' into claude/acp-P3-flight-…
abrichr Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/apt-cache-seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
packages: >-
at-spi2-core dbus-x11 gir1.2-atspi-2.0 gir1.2-gtk-3.0 libatk-adaptor
libcairo2-dev libgirepository-2.0-dev openbox pkg-config xauth xvfb
- name: flow unit tesseract
os: ubuntu-latest
recommends: "false"
packages: tesseract-ocr tesseract-ocr-eng
- name: capture system dependencies
os: ubuntu-24.04
recommends: "true"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,11 @@ jobs:
run: >-
python ../../scripts/ci/locked_install.py --lock 'packages/flow[dev,capture,agent]' --lock packages/capture
--editable packages/types --editable packages/capture --editable packages/flow --editable packages/agent --editable .
- name: Install tesseract for the flight scrubber's OCR tests
# pytesseract comes from Flow's dev extra (locked); this is its binary.
uses: OpenAdaptAI/OpenAdapt/.github/actions/apt-install@94f724c7dc0b0995a7108b7b99bbb53f0749cb68
with:
packages: tesseract-ocr tesseract-ocr-eng
- name: Install Harness² for the integration tests
# Not on PyPI. Pinned to the commit benchmark.harness.harness2
# is written against; it has no runtime dependencies.
Expand Down
2 changes: 2 additions & 0 deletions CAPABILITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ improvising or retrying when something is off.
| Verified write tools for agent frameworks: `verified(tool, contract=...)` wraps a Claude Agent SDK, OpenAI Agents SDK, LangGraph or CrewAI write tool in one line. The contract and any values the operator pins come from the operator, never the agent's arguments; the store is read before and after; the agent gets a receipt or a refusal, and a refused write is held instead of retried | Released | Synthetic (each framework's own agent loop with a scripted model, writing through the example app's order form over real HTTP: verified save, a save the app drops, a save it keeps twice); one real-model run per framework, opt-in | `openadapt_flow.integrations.agents`, extras `claude-agent-sdk`, `openai-agents`, `langgraph` (CrewAI: install `crewai` beside it); [AGENT_FRAMEWORKS.md](packages/flow/docs/AGENT_FRAMEWORKS.md) |
| Teach a browser write as a verified tool: with write contracts and a person's signed teach authorization (`serve --teach-browser --contracts DIR --teach-authorization STATEMENT`), the agent teaches a save once. Run 1 starts only when the statement covers the write (origin, contract, write adapter, the record's fields and values) and runs under it; it is verified in the system of record before the `taught_<name>` tool exists. Every call checks the statement and the tool's signature again, makes the write and returns a verified receipt or a refusal. Sign-in values come from the server's environment and never reach the agent or the program. Controls in named iframes are found through their frame | On main ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589), [#1763](https://github.com/OpenAdaptAI/OpenAdapt/pull/1763)) | Synthetic (the example app's sign-in and order form in headless Chromium over MCP: verified save, a save the app drops, a save it keeps twice, a page that swaps the record during run 1; refusals for a missing, uncovering, expired, edited or wrongly signed statement) | `openadapt-agent serve --teach-browser --contracts --teach-authorization`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md#teach-a-write-as-a-tool) |
| Guard an agent you already run: attach to its own Chromium over CDP (one added line), hold each save until the record on screen is the one the task names, block it and tell the agent why when it isn't, read the save back; a run that reads back correctly becomes a draft program with a record check from scaffold-verifier, which a person confirms and admits, then a `taught_*` tool with no model calls. `--observe-only` never blocks. The approval card shows each field's value now, the value the held save sends (read by the app's `write_adapter`; without one the card says the values were not read and not checked before saving, and shows a screenshot and the form's values on screen taken when the save is held; with neither a value nor a readable screenshot no approval is offered and the run ends `ESCALATED` `values_unread`), the task's value beside it and its source; each save gets a ledger row with no values whose outcome follows the guard's own verdict, and a 0600 diff; the read-back goes through a `ReadbackProvider` where only an independent read can verify | Released ([#1357](https://github.com/OpenAdaptAI/OpenAdapt/pull/1357), stacked on [#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)); card values, ledger row and `ReadbackProvider` in PR [#2492](https://github.com/OpenAdaptAI/OpenAdapt/pull/2492) | Synthetic (MockMed, scripted Playwright agent, `effect_e2e` faults; the approval card in headless Chromium with and without MockMed's write adapter) | `openadapt-flow guard`, [GUARD_AN_AGENT.md](packages/flow/docs/GUARD_AN_AGENT.md) |
| Flight recorder for an agent you already run: `openadapt flight -- CMD` puts a loopback proxy in front of the model API the agent calls (`ANTHROPIC_BASE_URL`, `OPENAI_BASE_URL`), meters and prices each call (an unpriced model's cost is recorded as unknown), honours a `--max-cost-usd` cap and logs each computer action. Scrubbing: the strings in the request (message text, tool-call arguments, tool results, URLs cut to their origin) and the screenshots it recognises (PNG, JPEG, GIF, BMP, TIFF, WEBP) are scrubbed before they are sent (see "What the scrubber does not cover" in FLIGHT_RECORDER.md); a request that can't be scrubbed is answered 502 and never sent, and the run refuses to start when openadapt-privacy, its spaCy model or tesseract is missing. Each value becomes a run token (`[PERSON_1]`, the same in text and on screen, painted over with the token written in); tokens in tool-call inputs are turned back into the real values before the response reaches the agent, so it can type them; the map stays local (`pseudonyms.json`, 0600). Measured on 50 synthetic records: 97.6 to 98.0% of fields in text and 97.2% in rendered screenshots, every miss a name; 93.1% of non-personal words on a synthetic work-list screen stay readable (30.9% with Presidio's image redaction). The agent still can't read a name it must check; task success with scrubbing on is not measured. The scrubber covers ordinary agent traffic in standard encodings (base64 in any wrapping, JSON escapes; image signatures are searched across the whole request and dense base64-like text refuses, per string and across the request). Images are recognised and scrubbed in PNG, JPEG, GIF, BMP, TIFF and WEBP; other image formats are refused only when the density backstops catch them, and a page with text on a flat background, uncompressed in another format, can get through; the backstops can refuse ordinary content that looks encoded (git SHAs, many camelCase identifiers, random tokens), and because the history is resent a refused turn refuses the rest of the run; an agent that deliberately re-encodes data (hex, percent-encoding, a custom scheme) can get it past the scrubber, so a hostile agent is out of scope and the egress block and provider choice are the controls there. Egress: on macOS the agent runs under `sandbox-exec` with outbound network denied except loopback; elsewhere `flight` refuses to run unless `--allow-unenforced-egress` is given (recorded). A run whose agent reports more model calls than the proxy saw, or that tried a direct call through the proxy variables, exits 3 and is marked refused; a kernel-blocked connection is blocked but not counted. Python API: `openadapt_flow.flight.egress.ScrubbedEgress`. Gate: a one-line executor swap (`GatedComputer` for the Anthropic computer tool, `GatedComputerCall` for an OpenAI `computer_call` loop) holds every action not known to be safe: a click or drag passes only on focus/view roles or a short list of labels (Cancel, Close, Back, Search, Open...; non-English and unreadable labels are held; OCR names a target only with text inside it); keys pass only on a short navigation list, or for editing inside a known text field; typing passes only when focus is known to be in a text field (from the accessibility hook, or the last click landed on one), and typed text with any control character is held; a focus move followed by more input in one action, Ctrl/Cmd+S, Ctrl/Cmd+Enter and any unknown action are held for a person (terminal y/N, or an item-approval request Desktop or a phone answers). It sees clicks and keys, not autosave. Writes `flight.json` (`openadapt.flight-run/v1`), `egress.json`, a scrubbed timeline and `timeline.html`. Image scrubbing covers text in the image, not faces | Experimental, PR [#2493](https://github.com/OpenAdaptAI/OpenAdapt/pull/2493) | Synthetic (fake provider, scripted agent loop on MockMed in headless Chromium under the macOS egress block, the real Presidio scrubber on a 50-record synthetic PHI corpus ([recall](packages/flow/benchmark/flight/scrub_recall/README.md))); one real Claude run whose Save click was held, recorded before the scrubbing and gate changes ([flight](packages/flow/benchmark/flight/README.md)) | `openadapt-flow flight`, `openadapt_flow.flight`, [FLIGHT_RECORDER.md](packages/flow/docs/FLIGHT_RECORDER.md) |
| Check a coding agent's writes to declared systems of record: `openadapt hooks install --agent claude-code` (or `codex`) writes project-local hooks (Claude Code `PreToolUse`/`PostToolUse`/`PostToolUseFailure`/`Stop`, Codex `PreToolUse`/`PostToolUse`/`Stop`). For a call that writes to a database, HTTP API or MCP tool declared in `openadapt.systems.yaml`, the pre-check allows, asks or blocks it by the write's approval mode (Codex can't ask from a hook, so `ask` is a deny until `openadapt hooks approve`); an undeclared write to a declared system is blocked or asked about; the read-back uses the verifier's contract (`openadapt.verify/v1`), a failed read-back is `UNCERTAIN` and the same call is then held; every outcome gets a signed `record/run/v1` receipt. Advisory: hooks see tool calls, so an agent with its own credentials and shell can bypass them; `--strict` (credential broker) is refused until a broker exists for these systems | Experimental, PR [#2411](https://github.com/OpenAdaptAI/OpenAdapt/pull/2411) | Synthetic (a scripted harness sends each agent's documented hook input to the installed hook command; one run of live headless Claude Code 2.1.305 and Codex CLI 0.144.4 sessions, both against a local SQLite file and HTTP API: declared writes VERIFIED, an out-of-scope delete blocked, a broken read-back UNCERTAIN, and a Python write that builds the path at run time not seen, [hooks_live](packages/flow/benchmark/hooks_live/README.md)) | `openadapt hooks`, `openadapt_flow/hooks/`, [HOOKS.md](packages/flow/docs/HOOKS.md) |
| Hold the database credentials and give the agent scoped tools: `openadapt proxy --postgres URL -- claude` (or `--sqlite`) serves an MCP endpoint on loopback with a per-run token and takes the credentials out of the agent's environment. Each SQL write is dry-run in a rolled-back transaction with its exact row-level diff (triggers and cascades included), approved by policy (`--auto-approve-max-rows`) or by a person (`y`, `openadapt plan approve`) against the plan digest, used once, committed only if its diff matches the plan, read back, and undone from its row images with a read-back proof. A regenerated statement over rows already written in the task is held for a person (`possible_replay`). Each stage gets a signed `record/run/v1` receipt with the approval block. The dry run covers effects inside the database only | Experimental, this PR | Lab: PostgreSQL 16, 120 statements of 8 kinds, 0 missed effects, 0 false diffs, 120/120 verified undos, 0/20 regenerated statements applied (control 20/20 doubled), the independent `capture_database` read-back agreed on 120/120, 8-12 s from empty venv to first diff; one real MCP SDK session; one live headless Claude Code session (held, then applied and undone) | `openadapt proxy`, `openadapt_flow/txplan/proxy.py`, [TRANSACTIONS.md](packages/flow/docs/TRANSACTIONS.md) |
| Dry-run, apply, undo and release a batch of writes to external systems: `openadapt plan create/approve/apply/undo/release/cancel` over an `openadapt.tx.yaml` of REST collections, SQL tables and mail. The diff comes from a staged transaction (SQL), a computed shadow with declared server-set and derived fields (REST) or the holdback queue (email). Approval is single-use and bound to the plan digest, a stale plan is refused, each write's idempotency key comes from the task and the record slot (never the payload), and a retry with a different payload is refused (the ACRFence action-replay attack). The undo is verified by reading back each record and the whole frame. Irreversible writes wait in a cancelable holdback queue | Experimental, this PR | Lab: Vikunja 2.7.1, Dolibarr 21.0.4 on MariaDB, Mailpit; 100 writes each; 0 missed effects, 0 false diffs, 200/200 verified undos (REST, SQL), 50/50 cancelled emails never sent, 50/50 released exactly once, 0/60 regenerated retries through (control 60/60 doubled), 0/10 after a crash after send; seeded faults caught 20/20 | `openadapt plan`, `openadapt_flow/txplan/`, [TRANSACTIONS.md](packages/flow/docs/TRANSACTIONS.md) |
Expand Down Expand Up @@ -504,6 +505,7 @@ A test fails when a command has no file or this list is out of date.

**Guard an agent you already run:**

- `flight`: Record any agent you already run: meter and price its model calls through a loopback proxy, scrub its text and PNG/JPEG/GIF/BMP/TIFF/WEBP screenshots before they leave the machine, block other egress on macOS, log its actions, and hold each click that is not known to be safe for a person.
- `guard`: Attaches to the agent's own Chromium over CDP, holds each save until the right record is on screen, reads it back, writes a ledger row and a private diff, and hands a verified run to the teach dir.
- `hooks`: Writes `openadapt.systems.yaml` checks into Claude Code or Codex hooks: each write to a declared database, HTTP API or MCP tool is pre-checked, read back and given a signed receipt (advisory).
- `learn`: Learn the app's own per-request writes from a shadow run, propose excuses, and approve them into the contracts.
Expand Down
Loading
Loading