Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion CAPABILITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ improvising or retrying when something is off.
| Signed write receipts: a verifier verdict with its scope (stores read, window, strength) and a plain not-checked list, signed as a COSE_Sign1 (IETF SCITT shape) and logged in a local Merkle transparency log; checked offline against pinned keys; a receipt that claims more than its scope is neither issued nor accepted; optional Rekor anchor | On main | Unit tests on the real verifier (SQLite) and shadow proxy; COSE checked through python-cwt | `openadapt-flow receipt verify`, `receipt keys export`, `receipt anchor`; `verify_write(..., write_receipt=True)`; `shadow --receipts`; [WRITE_RECEIPTS.md](packages/flow/docs/WRITE_RECEIPTS.md) |
| See a run's Seal offline: one HTML page that checks the Ed25519 signature over the run's exact report in the browser, draws the Seal from it, replays the run over its program map, and lets the reader tamper with a copy; no network requests; the quickstart ends on the person's own | On main ([#1566](https://github.com/OpenAdaptAI/OpenAdapt/pull/1566)) | A real quickstart run's Seal opened from `file://` in Chromium (valid, tampered, no requests); RFC 8032 test vectors; a published OpenEMR Seal's Rekor entry and timestamp | `openadapt seal view RUN_DIR`; `openadapt quickstart`; [`@openadapt/seal-view`](packages/seal-view/README.md) |
| Sign in to OpenAdapt Cloud from the terminal: `openadapt login` with no token prints a sign-in link (opened only with `--open`), listens on 127.0.0.1 for the browser's redirect, and redeems Cloud's one-use code with an S256 PKCE verifier that never leaves the process. A first-time user gets a workspace on the way. The credential goes to the OS keychain entry `push` and `report-run` read; a stored token is re-validated as before, and `--token` and `--no-browser` keep the token path | On main | Unit tests with a real loopback listener (state mismatch, refusal, malformed code, timeout, browser opened only on request); end to end against Cloud's `/auth/loopback` and pairing routes in mock mode, both Connect and Cancel | `openadapt login`; [browser_login.py](packages/flow/openadapt_flow/browser_login.py) |
| Publish a run's Seal online: a signed public card (counts, outcomes, each step's check, digests; the program name only with `--names` or for the tutorial; never inputs, intents, screenshots, URLs or halt text) shown in full and uploaded only after a yes, with a delete token; check a hosted link here | On main ([#2266](https://github.com/OpenAdaptAI/OpenAdapt/pull/2266)) | Unit tests with synthetic reports: planted values absent from the file, 64-step card within 4,096 bytes, stopped runs, mock uploads with real sockets blocked; 29 golden vectors shared with Cloud's verifier | `openadapt-flow local-seal public`; `openadapt seal publish`, `unpublish`, `seal verify <link>`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#public-seals-a-summary-you-can-post) |
| Publish a run's Seal online: a signed public card (counts, outcomes, each step's check, digests; the program name only with `--names` or for the tutorial; never inputs, intents, screenshots, URLs or halt text) shown in full and uploaded only after a yes, with a delete token; check a hosted link here. The quickstart offers its checked and its stopped run's Seals in one question, showing every public field and the full path to each file; `--show` prints the exact upload | On main ([#2266](https://github.com/OpenAdaptAI/OpenAdapt/pull/2266)) | Unit tests with synthetic reports: planted values absent from the file, 64-step card within 4,096 bytes, stopped runs, mock uploads with real sockets blocked; 29 golden vectors shared with Cloud's verifier | `openadapt-flow local-seal public`; `openadapt seal publish`, `unpublish`, `seal verify <link>`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#public-seals-a-summary-you-can-post) |
| Run authorizations signed with the authorizer's GitHub SSH key (`ssh-keygen -Y sign`, after a summary of what it allows), naming the signing key and bound to the bundle digest, items, profile and Seal keys, and referenced by each Seal; the identity checked against github.com (`--live`) or pinned allowed signers; a pseudonymous operator profile counted from anchored Seals only | Released ([#1401](https://github.com/OpenAdaptAI/OpenAdapt/pull/1401)) | Unit tests with synthetic data; signatures checked against OpenSSH's `ssh-keygen` both ways | `openadapt-flow local-seal authorize`, `local-seal run --authorization`, `local-seal profile`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#run-authorizations-who-authorized-the-runs) |
| Run reports redacted before they are sealed: session and CSRF tokens, OAuth grants and credential headers become `<redacted>` and are listed in `redactions`; a Seal refuses a report that still holds one; per-app policy | Released ([#1407](https://github.com/OpenAdaptAI/OpenAdapt/pull/1407)) | Unit tests with generated tokens; 7,773 local reports scanned, only OpenEMR `token_main` matched | `openadapt-flow redact-report`, `local-seal run --allow-unredacted`; [REPORT_REDACTION.md](packages/flow/docs/REPORT_REDACTION.md) |
| Strict no-outbound mode and an unattended on-prem service | Released | Synthetic | `openadapt-flow no-outbound`, `service`; [ON_PREM.md](packages/flow/docs/ON_PREM.md) |
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

<!-- version list -->

## Unreleased

### Fixes

- Before publishing a Seal, the quickstart and `openadapt seal publish` list
each public field and explain how readers can link Seals signed by the same
key. The quickstart shows the checked and stopped Seals, with both file
paths, before asking once. Type `show` at the prompt to inspect the exact upload, or run
`openadapt seal publish --show` to write its bytes to standard output without
publishing.

## v1.23.0 (2026-11-19)

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ improvising or retrying when something is off.
| Signed write receipts: a verifier verdict with its scope (stores read, window, strength) and a plain not-checked list, signed as a COSE_Sign1 (IETF SCITT shape) and logged in a local Merkle transparency log; checked offline against pinned keys; a receipt that claims more than its scope is neither issued nor accepted; optional Rekor anchor | On main | Unit tests on the real verifier (SQLite) and shadow proxy; COSE checked through python-cwt | `openadapt-flow receipt verify`, `receipt keys export`, `receipt anchor`; `verify_write(..., write_receipt=True)`; `shadow --receipts`; [WRITE_RECEIPTS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/WRITE_RECEIPTS.md) |
| See a run's Seal offline: one HTML page that checks the Ed25519 signature over the run's exact report in the browser, draws the Seal from it, replays the run over its program map, and lets the reader tamper with a copy; no network requests; the quickstart ends on the person's own | On main ([#1566](https://github.com/OpenAdaptAI/OpenAdapt/pull/1566)) | A real quickstart run's Seal opened from `file://` in Chromium (valid, tampered, no requests); RFC 8032 test vectors; a published OpenEMR Seal's Rekor entry and timestamp | `openadapt seal view RUN_DIR`; `openadapt quickstart`; [`@openadapt/seal-view`](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/seal-view/README.md) |
| Sign in to OpenAdapt Cloud from the terminal: `openadapt login` with no token prints a sign-in link (opened only with `--open`), listens on 127.0.0.1 for the browser's redirect, and redeems Cloud's one-use code with an S256 PKCE verifier that never leaves the process. A first-time user gets a workspace on the way. The credential goes to the OS keychain entry `push` and `report-run` read; a stored token is re-validated as before, and `--token` and `--no-browser` keep the token path | On main | Unit tests with a real loopback listener (state mismatch, refusal, malformed code, timeout, browser opened only on request); end to end against Cloud's `/auth/loopback` and pairing routes in mock mode, both Connect and Cancel | `openadapt login`; [browser_login.py](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/openadapt_flow/browser_login.py) |
| Publish a run's Seal online: a signed public card (counts, outcomes, each step's check, digests; the program name only with `--names` or for the tutorial; never inputs, intents, screenshots, URLs or halt text) shown in full and uploaded only after a yes, with a delete token; check a hosted link here | On main ([#2266](https://github.com/OpenAdaptAI/OpenAdapt/pull/2266)) | Unit tests with synthetic reports: planted values absent from the file, 64-step card within 4,096 bytes, stopped runs, mock uploads with real sockets blocked; 29 golden vectors shared with Cloud's verifier | `openadapt-flow local-seal public`; `openadapt seal publish`, `unpublish`, `seal verify <link>`; [OFFLINE_SEALS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/OFFLINE_SEALS.md#public-seals-a-summary-you-can-post) |
| Publish a run's Seal online: a signed public card (counts, outcomes, each step's check, digests; the program name only with `--names` or for the tutorial; never inputs, intents, screenshots, URLs or halt text) shown in full and uploaded only after a yes, with a delete token; check a hosted link here. The quickstart offers its checked and its stopped run's Seals in one question, showing every public field and the full path to each file; `--show` prints the exact upload | On main ([#2266](https://github.com/OpenAdaptAI/OpenAdapt/pull/2266)) | Unit tests with synthetic reports: planted values absent from the file, 64-step card within 4,096 bytes, stopped runs, mock uploads with real sockets blocked; 29 golden vectors shared with Cloud's verifier | `openadapt-flow local-seal public`; `openadapt seal publish`, `unpublish`, `seal verify <link>`; [OFFLINE_SEALS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/OFFLINE_SEALS.md#public-seals-a-summary-you-can-post) |
| Run authorizations signed with the authorizer's GitHub SSH key (`ssh-keygen -Y sign`, after a summary of what it allows), naming the signing key and bound to the bundle digest, items, profile and Seal keys, and referenced by each Seal; the identity checked against github.com (`--live`) or pinned allowed signers; a pseudonymous operator profile counted from anchored Seals only | Released ([#1401](https://github.com/OpenAdaptAI/OpenAdapt/pull/1401)) | Unit tests with synthetic data; signatures checked against OpenSSH's `ssh-keygen` both ways | `openadapt-flow local-seal authorize`, `local-seal run --authorization`, `local-seal profile`; [OFFLINE_SEALS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/OFFLINE_SEALS.md#run-authorizations-who-authorized-the-runs) |
| Run reports redacted before they are sealed: session and CSRF tokens, OAuth grants and credential headers become `<redacted>` and are listed in `redactions`; a Seal refuses a report that still holds one; per-app policy | Released ([#1407](https://github.com/OpenAdaptAI/OpenAdapt/pull/1407)) | Unit tests with generated tokens; 7,773 local reports scanned, only OpenEMR `token_main` matched | `openadapt-flow redact-report`, `local-seal run --allow-unredacted`; [REPORT_REDACTION.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/REPORT_REDACTION.md) |
| Strict no-outbound mode and an unattended on-prem service | Released | Synthetic | `openadapt-flow no-outbound`, `service`; [ON_PREM.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/ON_PREM.md) |
Expand Down
40 changes: 20 additions & 20 deletions openadapt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,32 +806,23 @@ def _quickstart_publish_offer():
if not _public_seals_available():
return None

def offer(run_dir: Path, say, ask) -> bool:
def offer(run_dirs: list[Path] | Path, say, ask) -> bool:
from openadapt.seal_publish import (
PublishError,
endpoint,
hosted_seals_live,
publish,
publish_quickstart,
)

try:
if not hosted_seals_live(endpoint()):
return False
except PublishError:
return False
say(
"Put this Seal online? This is the exact summary that would be "
f"uploaded ({run_dir / 'public-seal.json'}):"
)
if isinstance(run_dirs, Path):
run_dirs = [run_dirs]
try:
publish(
run_dir,
interactive=True,
ask=ask,
say=say,
provenance="synthetic-tutorial",
command=_hint,
)
publish_quickstart(run_dirs, ask=ask, say=say, command=_hint)
except PublishError as exc:
say(str(exc))
except (KeyboardInterrupt, EOFError):
Expand Down Expand Up @@ -2041,10 +2032,10 @@ def _seal_publish_parser() -> argparse.ArgumentParser:
"and the hour the run started, signed by this computer's Seal key. "
"It never holds inputs, typed values, screenshots or record "
"contents. The program name is left out unless you pass --names "
"(the synthetic tutorial includes it). The exact card is printed "
"first, and nothing is uploaded until you say yes: at the prompt, "
"or with --yes when there is no terminal. --yes skips the "
"question, not the printed card."
"(the synthetic tutorial includes it). The preview lists every field; "
"--show prints the exact upload. Seals signed by the same key have the same public "
"key ID. Confirm at the prompt, or pass --yes to publish without "
"a prompt."
),
allow_abbrev=False,
)
Expand All @@ -2064,7 +2055,12 @@ def _seal_publish_parser() -> argparse.ArgumentParser:
parser.add_argument(
"--dry-run",
action="store_true",
help="write and print public-seal.json; upload nothing",
help="preview all public fields and write public-seal.json; upload nothing",
)
parser.add_argument(
"--show",
action="store_true",
help="write the exact upload bytes to standard output and exit without publishing",
)
parser.add_argument(
"--github",
Expand Down Expand Up @@ -2124,7 +2120,7 @@ def _ask_line(prompt: str) -> str:

def _publish_seal(argv: list[str]) -> int:
"""`openadapt seal publish [RUN_DIR]`."""
from openadapt.seal_publish import PublishError, publish
from openadapt.seal_publish import PublishError, build, public_bytes, publish

options = _seal_publish_parser().parse_args(argv)
run_dir = options.run_dir or _newest_sealed_run()
Expand All @@ -2138,6 +2134,10 @@ def _publish_seal(argv: list[str]) -> int:
click.echo(f"Not published: {run_dir} has no seal.json.", err=True)
return 2
try:
if options.show:
doc = build(run_dir, names=options.names, github=options.github)
click.get_binary_stream("stdout").write(public_bytes(doc))
return 0
publish(
run_dir,
yes=options.yes,
Expand Down
6 changes: 3 additions & 3 deletions openadapt/quickstart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def next_steps(
keep: Optional[str] = None,
shadow: Optional[Callable[[], Optional[str]]] = None,
offer_publish: Optional[
Callable[[Path, Callable[[str], None], Callable[[str], str]], bool]
Callable[[list[Path], Callable[[str], None], Callable[[str], str]], bool]
] = None,
) -> Callable[[Outcome], NextSteps]:
"""The finale's commands, spelled by the launcher's ``hint`` helper.
Expand All @@ -41,8 +41,8 @@ def next_steps(
check (run once, at the finale) for an older ``openadapt`` on PATH.
``offer_publish`` is given only in a terminal outside CI, with an engine
that can build public Seals. At the finale it asks once whether to put
the Seal online, and only when Cloud says hosted Seals are live. Otherwise
the finale says nothing about publishing.
the checked and stopped runs' Seals online. The offer appears only
when Cloud accepts hosted Seals.
"""

def build(outcome: Outcome) -> NextSteps:
Expand Down
8 changes: 4 additions & 4 deletions openadapt/quickstart/story.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ class NextSteps:
#: The command that checks one run folder, for its Seal page.
verify_run: Optional[Callable[[Path], str]] = None
#: In a terminal and outside CI only: asks once whether to publish the
#: run's public Seal, and does so on a yes. Called as
#: ``offer_publish(run_dir, say, ask)``; returns False, having said
#: nothing, when hosted Seals are not live.
#: public Seals of the checked run and the stopped run, and does so on a
#: yes. Called as ``offer_publish(run_dirs, say, ask)``; returns False,
#: having said nothing, when hosted Seals are not live.
offer_publish: Optional[
Callable[[Path, Callable[[str], None], Callable[[str], str]], bool]
Callable[[list[Path], Callable[[str], None], Callable[[str], str]], bool]
] = None


Expand Down
28 changes: 16 additions & 12 deletions openadapt/quickstart/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,19 @@ def seal_page_note(outcome: Outcome) -> str:
return note


def publish_run(outcome: Outcome) -> Optional[Path]:
"""The run whose Seal the finale offers to publish: the first checked run."""
def publish_runs(outcome: Outcome) -> list[Path]:
"""The runs whose Seals the finale offers: the first checked run, then the
stopped run when Act 3 signed one. The stopped run is the point of the
quickstart, so it goes online with the checked run or not at all."""

page = outcome.seal_pages.verified
if outcome.seal is None or page is None:
return None
return page.parent
return []
runs = [page.parent]
broken = outcome.seal_pages.broken
if broken is not None and (broken.parent / "seal.json").is_file():
runs.append(broken.parent)
return runs


def next_step(steps: NextSteps) -> tuple[str, str, str]:
Expand Down Expand Up @@ -575,11 +581,9 @@ def _ask(self, prompt: str) -> str:
return input()

def _publish(self, outcome: Outcome, steps: NextSteps) -> None:
run = publish_run(outcome)
if run is None:
return
if steps.offer_publish is not None:
steps.offer_publish(run, lambda line: self._say(f" {line}"), self._ask)
runs = publish_runs(outcome)
if runs and steps.offer_publish is not None:
steps.offer_publish(runs, lambda line: self._say(f" {line}"), self._ask)

def confirm(self, prompt: str) -> None:
self.stream.write(f" {prompt} ")
Expand Down Expand Up @@ -1237,8 +1241,8 @@ def finale(self, outcome: Outcome, steps: NextSteps) -> None:
self.console.print()
if outcome.seal is not None:
self._seal(outcome, seal_card(outcome))
run = publish_run(outcome)
if run is not None and steps.offer_publish is not None:
runs = publish_runs(outcome)
if runs and steps.offer_publish is not None:
spoken: list[bool] = []

def say(line: str) -> None:
Expand All @@ -1248,7 +1252,7 @@ def say(line: str) -> None:
self.console.print()
self.console.print(_escape(line), soft_wrap=True)

steps.offer_publish(run, say, self._ask)
steps.offer_publish(runs, say, self._ask)
self.console.print()
self.console.print(Rule(style="cyan"))
if all_clear(outcome):
Expand Down
Loading
Loading