Repository navigation
feat(seal): claim published Seals into your workspace after openadapt login - #2395
Conversation
… 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.
Independent adversarial review: APPROVEFrom: Grok
Pointer: openadapt-internal#211 |
Quickstart v2, slice "claim", launcher half (design: openadapt-internal#248). Cloud half: OpenAdaptAI/openadapt-cloud#523, behind
LOCAL_SEAL_CLAIMS_ENABLED(off). Launcher only: nothing underpackages/flowchanges, so Flow 3.4.0 is unaffected.What changes
openadapt loginis now a command. Onlyopenadapt setup loginworked before ("No such command 'login'"), although the design and the dashboard checklist nameopenadapt login. It passes every argument toopenadapt-flow login.GET /api/local-seal-claims/status(bounded to 1 s).{"enabled": true}and there is something to claim does it sign and send the claim. It then prints one line:Your 2 published runs are in your workspace: <host>/dashboard.openadapt seal claim [RUN_DIR...]does the same on demand. It also takes run folders, or a quickstart folder, published before this change.seal publish(and so the quickstart's publish) notes each upload inpublished-seals.jsonnext to the Seal key (~/.openadapt/seal, or$OPENADAPT_SEAL_HOME).seal_sha256, key id and run folder. No delete token.seal unpublishremoves the entry. Claimed entries are marked, so later logins send nothing.openadapt.local-seal-claim/v1\0followed by canonical JSON of the challenge, the origin and each id with its digest. The ingest token goes only to the host you logged in to.tests/test_seal_claim.pypins the exact bytes, with the same vector as Cloud's test.Tests
tests/test_seal_claim.py(21 tests) runs against a fake Cloud that verifies the signature the way the real route does. It covers the 0600 note without the token, origin and key filtering, the wrong key, a Seal another workspace holds, a bad token, silence when the flag is off, never raising after login, no repeat claim, dropping Seals that are gone, unpublish forgetting, older run folders, the login argv detection, and the hook running only after exit 0.End to end
Real launcher against Cloud #523 in mock mode, with isolated homes, a null keyring and no browser: cli-e2e.txt. Home greeting screenshot: desktop.
Overlaps
#2357 and #2365 also edit
cli.pyandseal_publish.py. My edits there are small: aseal claimbranch, alogincommand, the post-login hook in_invoke_flow, one call inupload()and one inunpublish(). I'll rebase on whichever lands first. No CHANGELOG or CAPABILITIES entry until Cloud's flag is on in production.Do not merge without the coordinator.