diff --git a/AGENTS.md b/AGENTS.md index f58dc47..0bfb9c1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -129,6 +129,7 @@ Each part has one job. | `packages/agent` | The turn loop: pick a skill, fill it, repair it, ask the cage, wait for approval, run, log. | | `packages/model` | Everything between the loop and the on-device model: prompts, the router, model profiles, the pinned download manifest and the plan for each device. | | `packages/runtime` | The app's logic without the screens: chat state, the approval bridge, settings, the vault, the wallet and web tasks, wired from the other packages. | +| `packages/boost` | Boost: the wire protocol, the phone's engine that sends a completion to the paired computer, and the computer's side that answers it. The cage, the loop and the router stay on the phone. | | `packages/connectors` | Connector specs and the one runtime that runs them, OAuth with PKCE, the MCP client and the relay protocol. Credentials stay on the phone. | | `packages/mail` | Email: Gmail, Microsoft Graph, IMAP and SMTP behind ports, and the mail skills. | | `packages/night` | The night shift: jobs that run while the phone charges, under the cage's rules for when nobody is there, and the morning briefing. | diff --git a/apps/mobile/src/app/settings.tsx b/apps/mobile/src/app/settings.tsx index 63d4bd6..8fc390c 100644 --- a/apps/mobile/src/app/settings.tsx +++ b/apps/mobile/src/app/settings.tsx @@ -16,7 +16,7 @@ import { modeName, Refusal } from "../components/BotFormParts"; import { ChoiceList } from "../components/ChoiceList"; import type { IconName } from "../components/Icon"; import { ModeSheet } from "../components/ModeSheet"; -import { Btn, Group, Label, Note, Page, Row, T, Toggle } from "../components/kit"; +import { Btn, Group, Label, Note, Page, Row, T, TitleLine, Toggle } from "../components/kit"; import { setLanguage, useDisplay } from "../display-settings"; import { useHermit } from "../hermit-context"; import { deviceLocale, t, tCount } from "../i18n"; @@ -32,9 +32,22 @@ export default function Settings() { useFocusEffect(useCallback(() => { void mailService()?.view().then((v) => setMailCount(v.rows.length), () => setMailCount(undefined)); }, [])); - const link = (icon: IconName, titleKey: string, href: Href, sub?: string) => ( - router.push(href)} /> - ); + // #27: a bench screen's row also says it is experimental, next to its title and in its accessibility label. + const link = (icon: IconName, titleKey: string, href: Href, sub?: string, experimental = false) => { + const title = t(titleKey); + const tag = experimental ? t("common.experimental") : undefined; + return ( + : title} + {...(sub ? { sub } : {})} + {...(tag ? { a11y: `${title}: ${tag}` } : {})} + chevron + role="link" + onPress={() => router.push(href)} + /> + ); + }; return ( @@ -54,13 +67,13 @@ export default function Settings() { {/* SL-48: HM-MAIL-01, the email accounts, with how many are connected. */} {link("mail", "HM-MAIL-01.title", "/mail", mailCount === undefined ? undefined : mailCount ? tCount("HM-SET-01.mailCount", mailCount) : t("HM-SET-01.mailNone"))} {/* SL-53: HM-WEB-02, the saved web tasks, recording a new one and the sites kept signed in. */} - {link("globe", "HM-SET-01.webTasks", "/browser")} + {link("globe", "HM-SET-01.webTasks", "/browser", undefined, true)} {link("key-round", "HM-VAULT-01.title", "/vault")} {/* SL-55: HM-CONN-04, connect a service by name, docs link or pasted docs. */} - {link("link", "HM-CONN-04.title", "/connect")} - {link("server", "HM-CONN-03.title", "/mcp")} + {link("link", "HM-CONN-04.title", "/connect", undefined, true)} + {link("server", "HM-CONN-03.title", "/mcp", undefined, true)} {/* SL-57: HM-CONN-05, the user's own relay and Dojo's opt-in relay for services that need a client secret. */} - {link("log-in", "HM-CONN-05.title", "/sign-in-options")} + {link("log-in", "HM-CONN-05.title", "/sign-in-options", undefined, true)} diff --git a/apps/mobile/src/settings-experimental.test.ts b/apps/mobile/src/settings-experimental.test.ts new file mode 100644 index 0000000..7b88d3f --- /dev/null +++ b/apps/mobile/src/settings-experimental.test.ts @@ -0,0 +1,29 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; + +// #27: the bench screens in Settings wear an Experimental label, and TalkBack reads it. +const screen = readFileSync(new URL("./app/settings.tsx", import.meta.url), "utf8"); +const locale = (name: string) => JSON.parse(readFileSync(new URL(`../../../packages/copy/locales/${name}.json`, import.meta.url), "utf8")) as Record; + +test("common.experimental reads Experimental in both locales", () => { + assert.equal(locale("en")["common.experimental"], "Experimental"); + assert.equal(locale("es-419")["common.experimental"], "Experimental"); +}); + +test("the four bench rows are marked experimental, next to their titles", () => { + for (const [key, route] of [ + ["HM-SET-01.webTasks", "/browser"], + ["HM-CONN-04.title", "/connect"], + ["HM-CONN-03.title", "/mcp"], + ["HM-CONN-05.title", "/sign-in-options"], + ] as const) { + assert.match(screen, new RegExp(`link\\("[^"]+", "${key.replace(".", "\\.")}", "${route.replace("/", "\\/")}", undefined, true\\)`), `${key} ${route}`); + } + assert.match(screen, /const tag = experimental \? t\("common\.experimental"\) : undefined;/); + assert.match(screen, //); +}); + +test("the experimental tag is part of the row's accessibility label", () => { + assert.match(screen, /a11y: `\$\{title\}: \$\{tag\}`/); +}); diff --git a/docs/architecture.md b/docs/architecture.md index 7e833ee..f522b18 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -49,6 +49,7 @@ Screens and adapters live in `apps/mobile`. The filled boxes are packages under | [`cage`](../packages/cage) | The policy engine (`decide()`), taint, approval proofs, signed approvals for money and passwords with one-time nonces, the signed hash-chained audit log and its verification, and the views the Activity screen draws. | | [`model`](../packages/model) | The harness around the model. Prompts, the router, the native tool-call and two-stage formats, the quarantined reader, model profiles, the download and update rules, the device floor and the device-adaptive runtime plan. | | [`runtime`](../packages/runtime) | The composition root. `createHermit()` wires the database, the cage's rules, the loop, the skills, the model, the signed log, the vault, the wallet, mail, the night shift and web tasks behind the ports, plus the view models the screens render. | +| [`boost`](../packages/boost) | Boost: the wire protocol decided in [#54](https://github.com/DojoCodingLabs/hermit/issues/54), the phone's engine that sends a completion to the paired computer, and the computer's side that answers it. The cage, the loop and the router stay on the phone. Planned work, with no user-facing app yet. | | [`mail`](../packages/mail) | Email: IMAP and SMTP, Gmail and Microsoft Graph clients, MIME parsing, drafts and the mail skills. | | [`night`](../packages/night) | The night shift: fixed jobs (agenda, reminders, messages, mail) in unattended sessions while the phone charges, and the morning briefing they leave. Jobs only read. Anything else becomes a suggestion you approve in the morning. | | [`payments`](../packages/payments) | Money paths: transfer authorizations (EIP-712 and EIP-3009), x402 parsing and payment, the spending ledger and caps, and the message protocol of the wallet worklet. | @@ -222,7 +223,7 @@ Boost is not built yet. It is planned work in [ROADMAP.md](../ROADMAP.md) and [E - **Task family and the gate.** A kind of task that moves from Boost to the phone when it passes on the phone the same eval that Boost passes. [PDR-026] - **Confidential-cloud Boost.** A Boost in a confidential cloud enclave for users without a computer. Remote attestation is shown before data moves. Planned for V3. [US-BOOST-04] -The wire protocol and the computer-side stack are still open. They are decided in the Boost design issues. +The wire protocol is decided ([#54](https://github.com/DojoCodingLabs/hermit/issues/54)) and built in [`packages/boost`](../packages/boost). The computer-side app and the pairing are still open ([#52](https://github.com/DojoCodingLabs/hermit/issues/52), [#53](https://github.com/DojoCodingLabs/hermit/issues/53)). ## Where to go next diff --git a/packages/copy/locales/en.json b/packages/copy/locales/en.json index a4b974a..a4cd98b 100644 --- a/packages/copy/locales/en.json +++ b/packages/copy/locales/en.json @@ -8,6 +8,7 @@ "common.understood": "Got it", "common.moreInfo": "More information", "common.copied": "Copied", + "common.experimental": "Experimental", "common.loading": "Loading…", "common.when.now": "Just now", "common.when.minutes": "{n} min ago", diff --git a/packages/copy/locales/es-419.json b/packages/copy/locales/es-419.json index 845226f..2fa6c79 100644 --- a/packages/copy/locales/es-419.json +++ b/packages/copy/locales/es-419.json @@ -8,6 +8,7 @@ "common.understood": "Entendido", "common.moreInfo": "Más información", "common.copied": "Copiada", + "common.experimental": "Experimental", "common.loading": "Cargando…", "common.when.now": "Ahora", "common.when.minutes": "Hace {n} min",