Skip to content

feat(quickstart): openadapt quickstart --own, your own task from recording to a tool - #2396

Merged
abrichr merged 5 commits into
mainfrom
claude/quickstart-own
Nov 22, 2026
Merged

abrichr merged 5 commits into
mainfrom
claude/quickstart-own

Conversation

@abrichr

@abrichr abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member

Quickstart v2, slice "--own" (design: openadapt-internal#248, option C, step 3). Draft. Stacked on #2365 (this PR's base) and #2395: this branch carries #2395's four claim commits, cherry-picked, so the diff shows them until #2395 merges. Launcher only; nothing under packages/flow changes.

What it does

openadapt quickstart --own [--url URL] [--watch]:

  1. Record.
    • The default is the bundled sample app (synthetic data, local).
    • Recording yourself opens a browser window, so it happens only after a yes at a terminal with a screen. It uses Flow's existing record_tutorial_interactive.
    • Without a screen, or on a no, OpenAdapt records the sample task in a hidden browser and says so.
    • --url records your own web app with the real interactive recorder. It always needs you, so without a screen it stops with one line.
  2. Compile with the demo's FlowEngine. Healthy runs make no model calls.
  3. Run twice with two new synthetic inputs, hidden (--watch shows the window). Each run reads the save back and gets a receipt.
  4. Share (sample app only, both runs checked):
  5. Next:
    • claude mcp add openadapt -- openadapt agent serve --bundles <bundle> --mode production --allow-run, with --url for your own app. Checked: tools/list serves the program over stdio.
    • The publish-as-API guide, whose publish step prints the endpoint and a curl.

What it does not do yet, and why (needs a decision, see the design doc's build log)

  • Runs and receipts on the dashboard's Runs page. The rail is push then report-run. push sanitizes with Presidio and a spaCy model that the launcher's openadapt-flow[browser,hosted] doesn't install, and the privacy package won't download the model. It failed on the first try (No module named 'spacy'). --own uses the Seal rail instead: the runs show on the Seal page and in the Home greeting.
  • A curl for this recording's own endpoint. wrap publish takes a wrap task, not a recorded bundle. A hosted endpoint can't reach a localhost sample app. So the ending links the guide instead of printing a curl for an endpoint that doesn't exist.

Tests

tests/test_quickstart_own.py:

  • Fakes, no browser or network:
    • no screen means no question and a hidden recording;
    • a window opens only after a yes;
    • the MCP command is exact;
    • sharing is offered only when both runs are checked;
    • --url without a screen gives one line;
    • --url with no yes opens nothing;
    • the CLI routes --own and refuses --url without it;
    • share_runs asks before any upload and never raises.
  • Real recorder: one test records the --url path through record_interactive in a headless browser against the bundled sample app (a scripted user), compiles it, and checks the password never reached events.jsonl.

Evidence (headless, no window opened)

docs/quickstart/own-2026-11-21/own-headless.txt and the ending. This is a full --own run on macOS with no screen (stdout redirected, BROWSER=true), answering y, against openadapt-cloud#523 in mock mode. Two runs: Done and checked, 2 of 2 record checks, 0 model calls. Both published on one page, then claimed.

Rough edge: Flow's plaintext-storage warning prints once per run folder. The demo quickstart's encryption notice would read better here; that's a follow-up.

Do not merge.

… login

openadapt seal publish now notes each upload next to the Seal key
(published-seals.json, mode 0600, no delete token). After openadapt login
succeeds, the launcher asks Cloud whether it takes Seal claims and, if so,
claims this computer's Seals for that Cloud with a signature by the Seal
key over a challenge Cloud minted for the workspace. It prints one line
and never changes login's result. openadapt seal claim [RUN_DIR...] does
the same on demand and takes folders published before the note existed.

Cloud keeps the routes behind LOCAL_SEAL_CLAIMS_ENABLED; with it off the
status route answers false and nothing more is sent.
unpublish removes the Seal from the local note. When Cloud reports some
ids gone, the claim drops them and claims the rest. Claimed Seals are
marked, so a later login sends nothing.
The design and the dashboard's first-run checklist name openadapt login, but
only openadapt setup login existed. The new command passes every argument to
openadapt-flow login, then claims this computer's published Seals.
…tination rule

The claim after login takes only Seals with provenance synthetic-tutorial;
any other Seal is claimed only by an explicit openadapt seal claim. Both
paths apply the destination rule login applies before a token is sent, with
the same --destination-kind and --trusted-host.
…rding to a tool

Record a task once in the bundled sample app (synthetic data) or in your
own web app with --url, compile it, run it with two new inputs and check
each save, then offer to share the two runs' signed summaries (one y/N,
default No) and claim them into your workspace when signed in. It ends with
the MCP command that gives an agent the program, and the guide for
publishing a program as an API endpoint.

Recording yourself opens a browser window only after a yes at a terminal
with a screen. Without one, OpenAdapt records the sample task in a hidden
browser and says so; --url without a screen stops with one line. Runs are
hidden unless --watch.
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 8ee6b3c

Reviewed only openadapt/quickstart/own.py, the --own/--url wiring in cli.py, and tests/test_quickstart_own.py (the stacked #2365 and cherry-picked #2395 claim commits were not re-reviewed). A browser window opens only after a yes at a terminal that has a screen; --url without a screen raises before record_interactive; a declined --url yes opens nothing. Sharing runs only when both sample-app runs are checked, and publish_quickstart asks one y/N (default No) before any upload. The later claim reads the token locally, applies login's destination rule, and sends it only when resolve_host matches the configured Seal origin; automatic claim still takes only synthetic-tutorial. The ending prints the MCP agent serve command and links the wrap-publish guide; it does not print a curl. Tests cover the screen/yes/--url/consent paths, including the headless real-recorder case. Draft, stacked on #2365: do not merge.

Nit: the ending still says "Publishing prints the endpoint and a curl example," which can be read as if that path is ready for this recorded bundle. The guide link and the lack of a curl are the honest part.

Pointer: openadapt-internal#211

Base automatically changed from claude/quickstart-headless-2026-11-20 to main November 21, 2026 17:56
@abrichr abrichr closed this Nov 22, 2026
@abrichr abrichr reopened this Nov 22, 2026
@abrichr
abrichr marked this pull request as ready for review November 22, 2026 02:30
@abrichr
abrichr merged commit 2092fc0 into main Nov 22, 2026
71 of 79 checks passed
@abrichr
abrichr deleted the claude/quickstart-own branch November 22, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant