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.
| Anchor an offline Seal in the public Sigstore Rekor transparency log (opt-in; sends one digest and the public key), and verify the anchor offline from the stored inclusion proof | Released ([#1394](https://github.com/OpenAdaptAI/OpenAdapt/pull/1394)) | Unit tests against a simulated Rekor log; real public Rekor entries and Sigstore TSA tokens for the landing demo's referral runs, verified offline in tests; Ed25519ph matches the RFC 8032 test vector | `openadapt-flow local-seal anchor`, `local-seal verify --require-anchor`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#optional-anchor-a-seal-in-a-public-transparency-log) |
| 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) |
| 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 one line per card and the exact file to be uploaded | 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
2 changes: 1 addition & 1 deletion llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ improvising or retrying when something is off.
| Anchor an offline Seal in the public Sigstore Rekor transparency log (opt-in; sends one digest and the public key), and verify the anchor offline from the stored inclusion proof | Released ([#1394](https://github.com/OpenAdaptAI/OpenAdapt/pull/1394)) | Unit tests against a simulated Rekor log; real public Rekor entries and Sigstore TSA tokens for the landing demo's referral runs, verified offline in tests; Ed25519ph matches the RFC 8032 test vector | `openadapt-flow local-seal anchor`, `local-seal verify --require-anchor`; [OFFLINE_SEALS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/OFFLINE_SEALS.md#optional-anchor-a-seal-in-a-public-transparency-log) |
| 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) |
| 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 one line per card and the exact file to be uploaded | 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
19 changes: 5 additions & 14 deletions openadapt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,32 +911,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], 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'}):"
)
which = "these runs" if len(run_dirs) > 1 else "this run"
say(f"See {which} on app.openadapt.ai? It would upload:")
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
4 changes: 2 additions & 2 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,7 +41,7 @@ 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 checked and the stopped run's Seals online, and only when Cloud says hosted Seals are live. Otherwise
the finale says nothing about publishing.
"""

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 @@ -360,13 +360,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 @@ -622,11 +628,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 @@ -1296,8 +1300,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 @@ -1307,7 +1311,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