Display per harness spec 3.7.0: the end line, durations, locale numbers, the cards' actions
CI / check (push) Canceled after 0s

- A reply that was stopped or failed keeps the progress text at its end
  (display.md section 4): "Stopped: by you", "Failed: ...". message.stopped
  was never drawn, and a failure showed the raw error. The reason comes from
  the stream's last status frame and stays with the finished row; a stored
  row gives "Stopped" or "Failed: <first line of its error>".
- A finished tool call shows its duration (0.4s, 1m 05s, 2h 03m) from the
  call's `ms`, where the server sends it; none while running or when denied.
- Counts in the progress line are in the phone's locale format (Locale.ROOT
  is the spec's plain format, which the conformance cases use); a cut `what`
  ends in an ellipsis, counted in code points; the clock is joined with the
  shared progress_line separator.
- Approval card: Allow once / Always allow / Deny / Deny, and say why. Plan
  card: Approve, continue in Edit / in Manual, and Revise.
- fetch-contract.py pins the spec's display.json as harness_display.json
  once the server's copy of the spec has it; DisplayTest then runs its
  duration and end cases.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Fable 5.2 committed 2026-11-12 10:03:04 +00:00
1 parent f2a2acf996
commit a30075c8f3
22 files changed
+428 -41

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ SOURCE = "tests/fixtures/api_v2"
# The harness spec's conformance cases a client draws by, from the server's vendored copy of the
# spec at the same ref: `harness_<name>.json` beside the fixtures, once the server has them.
HARNESS = "src/lembas/harness_spec/conformance"
HARNESS_CASES = ("progress.json",)
HARNESS_CASES = ("progress.json", "display.json")
OUT = ROOT / "contract"
LOCK = OUT / "lock.json"
+4 -1
View File
@@ -265,8 +265,11 @@ STRINGS: dict[str, str] = {
# Cards
"card_approval": "Allow this?",
"card_allow_once": "Allow once",
"card_allow_always": "Always allow this",
"card_allow_always": "Always allow",
"card_deny": "Deny",
"card_deny_reason": "Deny, and say why",
"plan_approve_edit": "Approve, continue in Edit",
"plan_approve_manual": "Approve, continue in Manual",
"card_reason": "Why not? (optional)",
"card_recommended": "recommended",
"card_answer": "Your answer",
+32
View File
@@ -83,9 +83,11 @@
"attach_choose_files": "Vybrat soubory",
"attach_choose_photos": "Vybrat fotky",
"attach_take_photo": "Vyfotit",
"card_allow_always": "Vždy povolit",
"card_allow_once": "Povolit jednou",
"card_answer": "Vaše odpověď",
"card_approval": "Povolit to?",
"card_deny_reason": "Zamítnout a říct proč",
"card_reason": "Proč ne? (nepovinné)",
"channel_asks": "Otázky a schválení",
"channel_scheduled": "Výsledky naplánovaných úloh",
@@ -154,6 +156,8 @@
"output_cut": "Výstup je zde zkrácen. Celý ho najdete na webové stránce.",
"phone_actions_line": "Model může nabídnout, že v telefonu něco udělá — nastaví budík, přidá událost, připraví zprávu, spustí trasu. Nic se nestane, dokud neklepnete na Provést na jeho kartě, a nikdy při zamčeném telefonu. Mapy Google spustí trasu s několika zastávkami, ale do běžící trasy zastávku nepřidají ani je nelze zastavit; OsmAnd to umí.",
"plan_approve": "Schválit plán",
"plan_approve_edit": "Schválit, pokračovat v režimu Upravit",
"plan_approve_manual": "Schválit, pokračovat v režimu Ručně",
"plan_carry_out": "Provést plán",
"plan_first": "Nejdřív plán",
"plan_first_hint": "Model napíše plán, který schválíte, než začne jednat.",
@@ -403,9 +407,11 @@
"attach_choose_files": "Dateien auswählen",
"attach_choose_photos": "Fotos auswählen",
"attach_take_photo": "Foto aufnehmen",
"card_allow_always": "Immer erlauben",
"card_allow_once": "Einmal erlauben",
"card_answer": "Ihre Antwort",
"card_approval": "Das erlauben?",
"card_deny_reason": "Ablehnen und begründen",
"card_reason": "Warum nicht? (optional)",
"channel_asks": "Fragen und Bestätigungen",
"channel_scheduled": "Geplante Ergebnisse",
@@ -475,6 +481,8 @@
"output_cut": "Die Ausgabe ist hier verkürzt. Vollständig finden Sie sie auf der Webseite.",
"phone_actions_line": "Ein Modell kann anbieten, etwas auf diesem Telefon zu tun — einen Wecker stellen, einen Termin eintragen, eine Nachricht entwerfen, eine Route starten. Nichts passiert, bevor du auf seiner Karte auf Ausführen tippst, und nie bei gesperrtem Telefon. Google Maps startet eine Route mit ein paar Stopps, kann aber keinen in eine laufende Route einfügen und nicht angehalten werden; OsmAnd kann das.",
"plan_approve": "Plan bestätigen",
"plan_approve_edit": "Bestätigen, weiter im Modus Bearbeiten",
"plan_approve_manual": "Bestätigen, weiter im Modus Manuell",
"plan_carry_out": "Plan ausführen",
"plan_first": "Erst planen",
"plan_first_hint": "Das Modell schreibt einen Plan, den du genehmigst, bevor es handelt.",
@@ -724,9 +732,11 @@
"attach_choose_files": "Elegir archivos",
"attach_choose_photos": "Elegir fotos",
"attach_take_photo": "Hacer una foto",
"card_allow_always": "Permitir siempre",
"card_allow_once": "Permitir una vez",
"card_answer": "Su respuesta",
"card_approval": "¿Permitir esto?",
"card_deny_reason": "Denegar y decir por qué",
"card_reason": "¿Por qué no? (opcional)",
"channel_asks": "Preguntas y aprobaciones",
"channel_scheduled": "Resultados programados",
@@ -795,6 +805,8 @@
"output_cut": "La salida está acortada aquí. La tiene completa en la página web.",
"phone_actions_line": "Un modelo puede ofrecer hacer cosas en este teléfono: poner una alarma, añadir un evento, redactar un mensaje, iniciar una ruta. No pasa nada hasta que tocas Hacerlo en su tarjeta, y nunca con el teléfono bloqueado. Google Maps inicia una ruta con unas pocas paradas, pero no puede añadir una a una ruta en curso ni detenerse a petición; OsmAnd sí.",
"plan_approve": "Aprobar el plan",
"plan_approve_edit": "Aprobar y continuar en Editar",
"plan_approve_manual": "Aprobar y continuar en Manual",
"plan_carry_out": "Llevar a cabo el plan",
"plan_first": "Primero un plan",
"plan_first_hint": "El modelo escribe un plan que apruebas antes de que actúe.",
@@ -1044,9 +1056,11 @@
"attach_choose_files": "Choisir des fichiers",
"attach_choose_photos": "Choisir des photos",
"attach_take_photo": "Prendre une photo",
"card_allow_always": "Toujours autoriser",
"card_allow_once": "Autoriser une fois",
"card_answer": "Votre réponse",
"card_approval": "Autoriser ceci ?",
"card_deny_reason": "Refuser, et dire pourquoi",
"card_reason": "Pourquoi pas ? (facultatif)",
"channel_asks": "Questions et approbations",
"channel_scheduled": "Résultats planifiés",
@@ -1116,6 +1130,8 @@
"output_cut": "La sortie est raccourcie ici. Vous la trouverez en entier sur la page web.",
"phone_actions_line": "Un modèle peut proposer de faire des choses sur ce téléphone : régler une alarme, ajouter un événement, rédiger un message, lancer un itinéraire. Rien ne se passe tant que vous ne touchez pas Le faire sur sa carte, et jamais téléphone verrouillé. Google Maps lance un itinéraire avec quelques arrêts mais ne peut ni en ajouter à un itinéraire en cours ni être arrêté ; OsmAnd le peut.",
"plan_approve": "Approuver le plan",
"plan_approve_edit": "Approuver, continuer en mode Modifier",
"plan_approve_manual": "Approuver, continuer en mode Manuel",
"plan_carry_out": "Exécuter le plan",
"plan_first": "D’abord un plan",
"plan_first_hint": "Le modèle rédige un plan que vous approuvez avant qu’il agisse.",
@@ -1365,9 +1381,11 @@
"attach_choose_files": "Fájlok kiválasztása",
"attach_choose_photos": "Fényképek kiválasztása",
"attach_take_photo": "Fénykép készítése",
"card_allow_always": "Engedélyezés mindig",
"card_allow_once": "Engedélyezés egyszer",
"card_answer": "Az Ön válasza",
"card_approval": "Engedélyezzük ezt?",
"card_deny_reason": "Elutasítás indoklással",
"card_reason": "Miért nem? (opcionális)",
"channel_asks": "Kérdések és jóváhagyások",
"channel_scheduled": "Ütemezett eredmények",
@@ -1437,6 +1455,8 @@
"output_cut": "A kimenet itt lerövidítve jelenik meg. A teljes szöveg a weblapon található.",
"phone_actions_line": "Egy modell felajánlhatja, hogy tesz valamit ezen a telefonon — ébresztőt állít, eseményt vesz fel, üzenetet fogalmaz, útvonalat indít. Semmi sem történik, amíg a kártyáján nem koppintasz a Mehet gombra, és zárolt telefonnál soha. A Google Térkép néhány megállós útvonalat indít, de futó útvonalhoz nem ad megállót és nem állítható le; az OsmAnd igen.",
"plan_approve": "Terv jóváhagyása",
"plan_approve_edit": "Jóváhagyás, folytatás Szerkesztés módban",
"plan_approve_manual": "Jóváhagyás, folytatás Kézi módban",
"plan_carry_out": "Terv végrehajtása",
"plan_first": "Előbb terv",
"plan_first_hint": "A modell tervet ír, amelyet jóváhagy, mielőtt cselekszik.",
@@ -1686,9 +1706,11 @@
"attach_choose_files": "Scegli file",
"attach_choose_photos": "Scegli foto",
"attach_take_photo": "Scatta una foto",
"card_allow_always": "Consenti sempre",
"card_allow_once": "Consenti una volta",
"card_answer": "La tua risposta",
"card_approval": "Consentire questo?",
"card_deny_reason": "Nega e spiega perché",
"card_reason": "Perché no? (facoltativo)",
"channel_asks": "Domande e approvazioni",
"channel_scheduled": "Risultati pianificati",
@@ -1757,6 +1779,8 @@
"output_cut": "L'output qui è abbreviato. Lo trovi per intero sulla pagina web.",
"phone_actions_line": "Un modello può offrirsi di fare cose su questo telefono: impostare una sveglia, aggiungere un evento, preparare un messaggio, avviare un percorso. Non succede nulla finché non tocchi Fallo sulla sua scheda, e mai a telefono bloccato. Google Maps avvia un percorso con alcune tappe ma non può aggiungerne a un percorso in corso né essere fermato; OsmAnd sì.",
"plan_approve": "Approva il piano",
"plan_approve_edit": "Approva, continua in Modifica",
"plan_approve_manual": "Approva, continua in Manuale",
"plan_carry_out": "Esegui il piano",
"plan_first": "Prima un piano",
"plan_first_hint": "Il modello scrive un piano da approvare prima di agire.",
@@ -2006,9 +2030,11 @@
"attach_choose_files": "Wybierz pliki",
"attach_choose_photos": "Wybierz zdjęcia",
"attach_take_photo": "Zrób zdjęcie",
"card_allow_always": "Zawsze zezwalaj",
"card_allow_once": "Zezwól raz",
"card_answer": "Twoja odpowiedź",
"card_approval": "Zezwolić na to?",
"card_deny_reason": "Odrzuć i powiedz dlaczego",
"card_reason": "Czemu nie? (opcjonalnie)",
"channel_asks": "Pytania i zatwierdzenia",
"channel_scheduled": "Wyniki zaplanowanych zadań",
@@ -2077,6 +2103,8 @@
"output_cut": "Wynik jest tu skrócony. Cały znajduje się na stronie internetowej.",
"phone_actions_line": "Model może zaproponować zrobienie czegoś na tym telefonie — ustawienie budzika, dodanie wydarzenia, szkic wiadomości, start trasy. Nic się nie dzieje, dopóki nie dotkniesz Zrób to na jego karcie, i nigdy przy zablokowanym telefonie. Mapy Google uruchomią trasę z kilkoma przystankami, ale nie dodadzą przystanku do trwającej trasy ani nie dadzą się zatrzymać; OsmAnd potrafi.",
"plan_approve": "Zatwierdź plan",
"plan_approve_edit": "Zatwierdź, kontynuuj w trybie Edytuj",
"plan_approve_manual": "Zatwierdź, kontynuuj w trybie Ręcznie",
"plan_carry_out": "Wykonaj plan",
"plan_first": "Najpierw plan",
"plan_first_hint": "Model pisze plan do zatwierdzenia, zanim zacznie działać.",
@@ -2326,9 +2354,11 @@
"attach_choose_files": "Vybrať súbory",
"attach_choose_photos": "Vybrať fotky",
"attach_take_photo": "Odfotiť",
"card_allow_always": "Vždy povoliť",
"card_allow_once": "Povoliť raz",
"card_answer": "Vaša odpoveď",
"card_approval": "Povoliť to?",
"card_deny_reason": "Odmietnuť a povedať prečo",
"card_reason": "Prečo nie? (nepovinné)",
"channel_asks": "Otázky a schválenia",
"channel_scheduled": "Výsledky naplánovaných úloh",
@@ -2397,6 +2427,8 @@
"output_cut": "Výstup je tu skrátený. Celý nájdete na webovej stránke.",
"phone_actions_line": "Model môže ponúknuť, že v telefóne niečo urobí — nastaví budík, pridá udalosť, pripraví správu, spustí trasu. Nič sa nestane, kým neťuknete na Urobiť na jeho karte, a nikdy pri zamknutom telefóne. Mapy Google spustia trasu s niekoľkými zastávkami, ale do bežiacej trasy zastávku nepridajú ani sa nedajú zastaviť; OsmAnd to vie.",
"plan_approve": "Schváliť plán",
"plan_approve_edit": "Schváliť, pokračovať v režime Upraviť",
"plan_approve_manual": "Schváliť, pokračovať v režime Ručne",
"plan_carry_out": "Vykonať plán",
"plan_first": "Najprv plán",
"plan_first_hint": "Model napíše plán, ktorý schválite, skôr než začne konať.",