strom-research 1.32.0-beta.2 → 1.32.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.cs.md CHANGED
@@ -7,7 +7,7 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
7
7
 
8
8
  ## 1.32.0
9
9
 
10
- *Připravuje se: bety do 1.32.0-beta.2. Oddíl bude úplný s vydáním.*
10
+ *Připravuje se: bety do 1.32.0-beta.3. Oddíl bude úplný s vydáním.*
11
11
 
12
12
  - **Otázky nad rodokmenem jedním voláním: `strom query`.** Kolik mlynářů je v rodu, kdo žil v čísle 12, kdo se
13
13
  narodil ve Lhotě v 18. století: řádek za každý údaj osoby s hodnotou, místem, číslem popisným, datem, jistotou
@@ -27,6 +27,10 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
27
27
  pramenů.
28
28
  - **Číslo domu zapsané i se slovem** (č. 7, Nr. 7) už nemá slovo dvakrát, ani na kartě osoby.
29
29
  - **`strom app --person P…`** otevře aplikaci Strom na této osobě stromu (aplikace před 3.21 otevře strom).
30
+ - **Fronta z aplikace Strom:** hledání v celé frontě (číslo úkolu nebo osoby, jméno, slova úkolu, jeho kniha, archiv nebo
31
+ místo, bez ohledu na diakritiku; hledaný text se nikam neukládá); „jako další“ dá naposledy zvolený úkol první a jde
32
+ přesně vrátit; práce na frontě otevře terminál, který ukáže, co se pustí, a spustí to až po „ano“ – určitý počet úkolů
33
+ (`strom run --tasks N`, skončí po N vyřízených), nebo samostatnou práci jen pod podmínkou.
30
34
 
31
35
  ## 1.31.1
32
36
 
package/CHANGELOG.de.md CHANGED
@@ -7,7 +7,7 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
7
7
 
8
8
  ## 1.32.0
9
9
 
10
- *In Vorbereitung: die Betas bis 1.32.0-beta.2. Der Abschnitt ist mit dem Release vollständig.*
10
+ *In Vorbereitung: die Betas bis 1.32.0-beta.3. Der Abschnitt ist mit dem Release vollständig.*
11
11
 
12
12
  - **Fragen an den Stammbaum mit einem Aufruf: `strom query`.** Wie viele Müller es in der Familie gibt, wer im Haus 12
13
13
  wohnte, wer im 18. Jahrhundert in Lhota geboren wurde: eine Zeile je Angabe einer Person mit Wert, Ort, Hausnummer,
@@ -28,6 +28,11 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
28
28
  wem ein Eintrag gehört, wer wer ist und das Prüfen der Angaben geht weiter wie bisher, aus den Quellen.
29
29
  - **Eine Hausnummer mit eigenem Wort** (č. 7, Nr. 7) zeigt das Wort nicht mehr doppelt, auch auf der Karte einer Person.
30
30
  - **`strom app --person P…`** öffnet die Strom-App bei dieser Person des Baums (eine App vor 3.21 öffnet den Baum).
31
+ - **Die Warteschlange aus der Strom-App:** Suche in der ganzen Warteschlange (Nummer einer Aufgabe oder Person, Name,
32
+ Wörter der Aufgabe, ihr Buch, Archiv oder Ort, ohne Rücksicht auf diakritische Zeichen; der gesuchte Text wird nirgends
33
+ gespeichert); „Als Nächstes“ setzt die zuletzt gewählte Aufgabe an die Spitze und lässt sich genau zurücksetzen; Arbeit
34
+ an der Warteschlange öffnet ein Terminal, das zeigt, was startet, und es erst nach einem Ja startet – eine Anzahl
35
+ Aufgaben (`strom run --tasks N`, endet nach N erledigten) oder selbstständige Arbeit nur unter einer Bedingung.
31
36
 
32
37
  ## 1.31.1
33
38
 
package/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ The changes of each version in short. The full notes and the install lines are o
7
7
 
8
8
  ## 1.32.0
9
9
 
10
- *In preparation: the betas up to 1.32.0-beta.2. The section is complete with the release.*
10
+ *In preparation: the betas up to 1.32.0-beta.3. The section is complete with the release.*
11
11
 
12
12
  - **Questions over the family tree in one call: `strom query`.** How many millers in the family, who lived at house 12,
13
13
  who was born in Lhota in the 18th century: one row per fact of a person with its value, place, house, date, how sure
@@ -27,6 +27,10 @@ The changes of each version in short. The full notes and the install lines are o
27
27
  go on as before, from the records.
28
28
  - **A house written with its own word** (č. 7, Nr. 7) no longer shows the word twice, on a person's card too.
29
29
  - **`strom app --person P…`** opens the Strom app on that person of the tree (an app before 3.21 opens the tree).
30
+ - **The queue from the Strom app:** a search in the whole queue (a task's or a person's number, a name, words of the task,
31
+ its book, archive or place, without regard to accents; the searched words kept nowhere); "next" puts the last chosen
32
+ first and can be put back exactly; work on the queue opens a terminal that shows what will start and starts it only
33
+ on a yes — a number of tasks (`strom run --tasks N`, ends after N settled), or work on its own only under a gate.
30
34
 
31
35
  ## 1.31.1
32
36
 
package/CHANGELOG.pl.md CHANGED
@@ -7,7 +7,7 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
7
7
 
8
8
  ## 1.32.0
9
9
 
10
- *W przygotowaniu: bety do 1.32.0-beta.2. Sekcja będzie kompletna z wydaniem.*
10
+ *W przygotowaniu: bety do 1.32.0-beta.3. Sekcja będzie kompletna z wydaniem.*
11
11
 
12
12
  - **Pytania o drzewo jednym wywołaniem: `strom query`.** Ilu młynarzy jest w rodzie, kto mieszkał pod numerem 12, kto
13
13
  urodził się w Lhocie w XVIII wieku: wiersz na każdą daną osoby z wartością, miejscem, numerem domu, datą, pewnością
@@ -27,6 +27,11 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
27
27
  danych idą dalej jak dotąd, ze źródeł.
28
28
  - **Numer domu zapisany z własnym słowem** (č. 7, Nr. 7) nie ma już słowa dwa razy, także na karcie osoby.
29
29
  - **`strom app --person P…`** otwiera aplikację Strom na tej osobie drzewa (aplikacja przed 3.21 otwiera drzewo).
30
+ - **Kolejka z aplikacji Strom:** wyszukiwanie w całej kolejce (numer zadania lub osoby, imię i nazwisko, słowa zadania,
31
+ jego księga, archiwum lub miejsce, bez względu na znaki diakrytyczne; szukany tekst nie jest nigdzie zapisywany);
32
+ „jako następne” stawia ostatnio wybrane zadanie na początku i daje się dokładnie cofnąć; praca nad kolejką otwiera
33
+ terminal, który pokazuje, co się uruchomi, i uruchamia to dopiero po „tak” – określoną liczbę zadań (`strom run
34
+ --tasks N`, kończy się po N załatwionych) albo samodzielną pracę tylko pod warunkiem.
30
35
 
31
36
  ## 1.31.1
32
37
 
@@ -3505,6 +3505,8 @@
3505
3505
  "ui.plan.history.prefer": "; přednost: místo {place} z nedávného sezení",
3506
3506
  "ui.run.stop.history": "žádné úkoly dějin nezbývají",
3507
3507
  "ui.run.stop.places": "žádná místa ke ztotožnění nezbývají",
3508
+ "ui.run.stop.tasks": "vyřízené úkoly: {n}",
3509
+ "ui.run.stop.sessions": "sezení: {max} (nejvíc pro žádaný počet úkolů) – vyřízené úkoly: {n}",
3508
3510
  "ui.plan.history.left": "Úkolů dějin zbývá: {n} (všechny napřed: strom run --history)",
3509
3511
  "ui.run.history": "Hledat dějiny teď ({n, plural, one {# úkol} few {# úkoly} other {# úkolů}} dějin)",
3510
3512
  "ui.run.history.how": "Kolik úkolů dějin? (0 zpět)",
@@ -3541,6 +3543,23 @@
3541
3543
  "ui.link.places.count.usd": "; podle dosavadních sezení {from}–{to}",
3542
3544
  "ui.link.places.none": "teď žádné – ztotožnění zůstane ve frontě první",
3543
3545
  "ui.link.places.stop": "Sezení jedno po druhém; Ctrl-C požádá rozpracované sezení o dokončení a běh zastaví – zbylá místa zůstanou ve frontě první.",
3546
+ "ui.link.what.work.tasks": "samostatná práce agenta na frontě, úkolů: {n}",
3547
+ "ui.link.what.work.loop": "samostatná práce agenta na frontě, dokud je práce",
3548
+ "ui.link.work.tasks": "Skončí po vyřízení úkolů: {n} (hotové, čekající, odložené nebo vzdané); úkol vrácený do fronty se nepočítá; nejvýš {max} sezení.",
3549
+ "ui.link.work.loop": "Sezení za sezením, dokud je práce a podmínka to dovolí.",
3550
+ "ui.link.work.gate.each": "Podmínka: {gate} – ptá se před každým sezením.",
3551
+ "ui.link.work.gate.once": "Podmínka: {gate} – ptá se jednou, před prvním sezením; když by nespustila, otázka přijde tady.",
3552
+ "ui.link.work.gate.none": "Podmínka: žádná (nastavení run.gate).",
3553
+ "ui.link.work.empty": "Ve frontě nic nečeká. Nic se nespustilo.",
3554
+ "ui.link.work.busy": "Na tomto výzkumu se už pracuje (běhy: {runs}, sezení: {sessions}). Nic dalšího se nespustilo.",
3555
+ "ui.link.work.nogate": "Automatická práce běží jen pod podmínkou (nastavení run.gate): ta před každým sezením řekne, zda pokračovat, počkat, nebo skončit. Bez ní se samo nic nespustí.",
3556
+ "ui.link.work.instead": "Místo toho:",
3557
+ "ui.link.work.instead.tasks": "Teď jen určitý počet úkolů",
3558
+ "ui.link.work.instead.gate": "Nastavit podmínku (jako v nastavení)",
3559
+ "ui.link.work.instead.none": "Teď nic",
3560
+ "ui.link.work.how": "Kolik úkolů? (1–100; 0 nic)",
3561
+ "ui.link.work.gate.still": "Podmínka nastavená není. Nic se nespustilo.",
3562
+ "ui.link.work.stop": "Sezení za sezením v tomto okně; Ctrl-C požádá rozpracované sezení o dokončení a běh zastaví – zbytek zůstane ve frontě.",
3544
3563
  "ui.link.what.experiment.places": "hledat samo dějiny každého místa se souřadnicemi a jeho okolí, jedno místo po druhém",
3545
3564
  "ui.link.experiment.places.count": "Míst se souřadnicemi: {n}, z nich už prohledaných: {done}.",
3546
3565
  "ui.link.experiment.places.on.done": "Dějiny jednotlivých míst se hledají samy, v tempu dějin.",
@@ -3505,6 +3505,8 @@
3505
3505
  "ui.plan.history.prefer": "; zuerst: der Ort {place} aus einer kürzlichen Sitzung",
3506
3506
  "ui.run.stop.history": "keine Aufgaben der Geschichte übrig",
3507
3507
  "ui.run.stop.places": "keine Orte mehr zu bestimmen",
3508
+ "ui.run.stop.tasks": "{n, plural, one {# Aufgabe} other {# Aufgaben}} erledigt",
3509
+ "ui.run.stop.sessions": "Sitzungen: {max} (höchstens so viele für die gewünschten Aufgaben) – erledigte Aufgaben: {n}",
3508
3510
  "ui.plan.history.left": "Aufgaben der Geschichte offen: {n} (alle zuerst: strom run --history)",
3509
3511
  "ui.run.history": "Geschichte jetzt suchen ({n, plural, one {# Aufgabe} other {# Aufgaben}} der Geschichte)",
3510
3512
  "ui.run.history.how": "Wie viele Aufgaben der Geschichte? (0 zurück)",
@@ -3541,6 +3543,23 @@
3541
3543
  "ui.link.places.count.usd": "; nach den bisherigen Sitzungen {from}–{to}",
3542
3544
  "ui.link.places.none": "jetzt keine – die Bestimmung bleibt zuerst in der Warteschlange",
3543
3545
  "ui.link.places.stop": "Eine Sitzung nach der anderen; Strg-C bittet die laufende Sitzung abzuschließen und hält den Lauf an – die übrigen Orte bleiben zuerst in der Warteschlange.",
3546
+ "ui.link.what.work.tasks": "die Arbeit des Agenten allein an der Warteschlange, {n, plural, one {# Aufgabe} other {# Aufgaben}}",
3547
+ "ui.link.what.work.loop": "die Arbeit des Agenten allein an der Warteschlange, solange es Arbeit gibt",
3548
+ "ui.link.work.tasks": "Endet nach {n, plural, one {# erledigten Aufgabe} other {# erledigten Aufgaben}} (fertig, wartend, zurückgestellt oder aufgegeben); eine in die Warteschlange zurückgegebene Aufgabe zählt nicht; höchstens {max} Sitzungen.",
3549
+ "ui.link.work.loop": "Sitzung um Sitzung, solange es Arbeit gibt und die Bedingung es zulässt.",
3550
+ "ui.link.work.gate.each": "Bedingung: {gate} – vor jeder Sitzung gefragt.",
3551
+ "ui.link.work.gate.once": "Bedingung: {gate} – einmal gefragt, vor der ersten Sitzung; würde sie nicht starten, kommt die Frage hier.",
3552
+ "ui.link.work.gate.none": "Bedingung: keine (Einstellung run.gate).",
3553
+ "ui.link.work.empty": "In der Warteschlange wartet nichts. Nichts wurde gestartet.",
3554
+ "ui.link.work.busy": "An dieser Forschung wird schon gearbeitet (Läufe: {runs}, Sitzungen: {sessions}). Nichts weiter wurde gestartet.",
3555
+ "ui.link.work.nogate": "Die automatische Arbeit läuft nur unter einer Bedingung (Einstellung run.gate): vor jeder Sitzung sagt sie, ob weiter, warten oder aufhören. Ohne sie startet nichts von selbst.",
3556
+ "ui.link.work.instead": "Stattdessen:",
3557
+ "ui.link.work.instead.tasks": "Jetzt nur eine Anzahl Aufgaben",
3558
+ "ui.link.work.instead.gate": "Die Bedingung einstellen (wie in den Einstellungen)",
3559
+ "ui.link.work.instead.none": "Jetzt nichts",
3560
+ "ui.link.work.how": "Wie viele Aufgaben? (1–100; 0 nichts)",
3561
+ "ui.link.work.gate.still": "Keine Bedingung eingestellt. Nichts wurde gestartet.",
3562
+ "ui.link.work.stop": "Sitzung um Sitzung in diesem Fenster; Strg-C bittet die laufende Sitzung abzuschließen und hält den Lauf an – der Rest bleibt in der Warteschlange.",
3544
3563
  "ui.link.what.experiment.places": "die Geschichte jedes Ortes mit Koordinaten und seiner Umgebung von selbst suchen, einen Ort nach dem anderen",
3545
3564
  "ui.link.experiment.places.count": "Orte mit Koordinaten: {n}, davon schon durchsucht: {done}.",
3546
3565
  "ui.link.experiment.places.on.done": "Die Geschichte der einzelnen Orte wird von selbst gesucht, im Tempo der Geschichte.",
@@ -3505,6 +3505,8 @@
3505
3505
  "ui.plan.history.prefer": "; pierwszeństwo: miejsce {place} z niedawnej sesji",
3506
3506
  "ui.run.stop.history": "nie zostały żadne zadania historii",
3507
3507
  "ui.run.stop.places": "nie zostały żadne miejsca do identyfikacji",
3508
+ "ui.run.stop.tasks": "załatwione zadania: {n}",
3509
+ "ui.run.stop.sessions": "sesje: {max} (najwięcej dla żądanej liczby zadań) – załatwione zadania: {n}",
3508
3510
  "ui.plan.history.left": "Zadań historii zostało: {n} (wszystkie najpierw: strom run --history)",
3509
3511
  "ui.run.history": "Szukaj historii teraz ({n, plural, one {# zadanie} few {# zadania} many {# zadań} other {# zadań}} historii)",
3510
3512
  "ui.run.history.how": "Ile zadań historii? (0 wstecz)",
@@ -3541,6 +3543,23 @@
3541
3543
  "ui.link.places.count.usd": "; według dotychczasowych sesji {from}–{to}",
3542
3544
  "ui.link.places.none": "teraz żadnej – identyfikacja zostaje pierwsza w kolejce",
3543
3545
  "ui.link.places.stop": "Sesja po sesji; Ctrl-C prosi trwającą sesję o dokończenie i zatrzymuje przebieg – pozostałe miejsca zostają pierwsze w kolejce.",
3546
+ "ui.link.what.work.tasks": "samodzielna praca agenta nad kolejką, zadań: {n}",
3547
+ "ui.link.what.work.loop": "samodzielna praca agenta nad kolejką, dopóki jest praca",
3548
+ "ui.link.work.tasks": "Kończy się po załatwieniu zadań: {n} (gotowe, czekające, odłożone lub porzucone); zadanie zwrócone do kolejki się nie liczy; najwyżej sesji: {max}.",
3549
+ "ui.link.work.loop": "Sesja za sesją, dopóki jest praca i warunek na to pozwala.",
3550
+ "ui.link.work.gate.each": "Warunek: {gate} – pytany przed każdą sesją.",
3551
+ "ui.link.work.gate.once": "Warunek: {gate} – pytany raz, przed pierwszą sesją; gdyby nie pozwolił zacząć, pytanie pojawi się tutaj.",
3552
+ "ui.link.work.gate.none": "Warunek: brak (ustawienie run.gate).",
3553
+ "ui.link.work.empty": "W kolejce nic nie czeka. Nic nie uruchomiono.",
3554
+ "ui.link.work.busy": "Nad tym badaniem już trwa praca (przebiegi: {runs}, sesje: {sessions}). Nic więcej nie uruchomiono.",
3555
+ "ui.link.work.nogate": "Praca automatyczna działa tylko pod warunkiem (ustawienie run.gate): przed każdą sesją mówi, czy kontynuować, czekać, czy skończyć. Bez niego nic nie uruchomi się samo.",
3556
+ "ui.link.work.instead": "Zamiast tego:",
3557
+ "ui.link.work.instead.tasks": "Teraz tylko określona liczba zadań",
3558
+ "ui.link.work.instead.gate": "Ustawić warunek (jak w ustawieniach)",
3559
+ "ui.link.work.instead.none": "Teraz nic",
3560
+ "ui.link.work.how": "Ile zadań? (1–100; 0 nic)",
3561
+ "ui.link.work.gate.still": "Warunek nie jest ustawiony. Nic nie uruchomiono.",
3562
+ "ui.link.work.stop": "Sesja za sesją w tym oknie; Ctrl-C prosi trwającą sesję o dokończenie i zatrzymuje przebieg – reszta zostaje w kolejce.",
3544
3563
  "ui.link.what.experiment.places": "szukać samoczynnie historii każdego miejsca ze współrzędnymi i jego okolicy, jednego miejsca po drugim",
3545
3564
  "ui.link.experiment.places.count": "Miejsc ze współrzędnymi: {n}, z nich już przeszukanych: {done}.",
3546
3565
  "ui.link.experiment.places.on.done": "Historii poszczególnych miejsc szuka się samoczynnie, w tempie historii.",
@@ -110,7 +110,7 @@ export function resolveCommand(argv) {
110
110
  throw unknownCommand([...words, ...extra].slice(0, Math.max(words.length + 1, 2)));
111
111
  }
112
112
  /** Commands strom renamed: the old name → the new one, which takes the same options. */
113
- const RENAMED = { facts: "query" };
113
+ export const RENAMED = { facts: "query" };
114
114
  /** A renamed command called by its old name: the same call under the new name, to run as it is. */
115
115
  function renamedCommand(argv, old) {
116
116
  const now = RENAMED[old];
package/dist/cli/help.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // then arguments and options.
3
3
  import { GROUPS, GROUP_ALIASES, GLOBAL_OPTIONS, WRITE_OPTIONS, aliasGroup, commands, descriptionOf, match, subcommandsOf, usageLine } from "./registry.js";
4
4
  import { table } from "./format.js";
5
- import { suggest } from "./execute.js";
5
+ import { RENAMED, suggest } from "./execute.js";
6
6
  import { UI, ui } from "./ui.js";
7
7
  import { docLangOf } from "../core/doc.js";
8
8
  import { REPORT_TABLE_ARCHIVE } from "../core/report.js";
@@ -202,6 +202,10 @@ export function overview(archive = false) {
202
202
  out.push("", "One command — usage, examples, options: strom help <command>", archive ? "Each command with what it does: strom commands <group>" : "Each command with what it does: strom commands [<group>] · with options and examples: strom commands <group> --json");
203
203
  return out.join("\n");
204
204
  }
205
+ /** A command strom renamed, named in help by its old name alone (strom help facts): the old name and the new one. */
206
+ function renamedHelp(words) {
207
+ return words.length === 1 && Object.hasOwn(RENAMED, words[0]) ? { old: words[0], now: RENAMED[words[0]] } : undefined;
208
+ }
205
209
  export function helpFor(input, archive, appUrl, waiting = false) {
206
210
  // "strom help 'research new'" — one quoted argument with several words.
207
211
  const words = input.flatMap((w) => w.trim().split(/\s+/)).filter(Boolean);
@@ -215,6 +219,10 @@ export function helpFor(input, archive, appUrl, waiting = false) {
215
219
  const real = aliasGroup(words);
216
220
  if (real)
217
221
  return groupHelp(real, archive, waiting);
222
+ // a command strom renamed (strom help facts): said as running it says it, then the help of its new name
223
+ const renamed = renamedHelp(words);
224
+ if (renamed)
225
+ return `${ui("en", "ui.error.command.renamed", renamed)}\n→ strom help ${renamed.now}\n\n${helpFor([renamed.now], archive, appUrl, waiting)}`;
218
226
  const all = commands().filter((c) => c.path.length > 0).map((c) => c.path.join(" "));
219
227
  const near = suggest(words.join(" "), all.filter((c) => c.split(" ").length === words.length));
220
228
  return `unknown command "${words.join(" ")}"${near.length ? ` — similar command: ${near.map((c) => `strom help ${c}`).join(" · ")}` : ""}\nall commands: strom help`;
@@ -309,6 +317,9 @@ export function helpAs(input, as) {
309
317
  const real = aliasGroup(words);
310
318
  if (real)
311
319
  return humanGroup(real, as);
320
+ const renamed = renamedHelp(words);
321
+ if (renamed)
322
+ return `${ui(as.lang, "ui.error.command.renamed", renamed)}\n→ strom help ${renamed.now} --human\n\n${helpAs([renamed.now], as)}`;
312
323
  const all = commands().filter((c) => c.path.length > 0).map((c) => c.path.join(" "));
313
324
  const near = suggest(words.join(" "), all.filter((c) => c.split(" ").length === words.length));
314
325
  return [ui(as.lang, "ui.help.unknown", { cmd: words.join(" ") }), ...near.map((c) => ` strom help ${c} --human`)].join("\n");
@@ -25,7 +25,14 @@ import { changeLines } from "../core/changelog.js";
25
25
  import { startLive } from "../core/live.js";
26
26
  import { adoptAppUrl, appTreeNameFromInstall, defaultAppUrl, stromAppUrl } from "../core/stromapp.js";
27
27
  import { stromReadsTags } from "../gedcom/export.js";
28
- import { appMarkFromInstall } from "../core/links.js";
28
+ import { appMarkFromInstall, LINK_WORK_DEFAULT, LINK_WORK_MAX } from "../core/links.js";
29
+ import { taskQueue } from "../commands/tasks.js";
30
+ import { lacksImages, RUN_TURNS } from "../core/queue.js";
31
+ import { forHistory } from "../core/pastevents.js";
32
+ import { othersAtWork } from "../core/session.js";
33
+ import { forStory } from "../core/stories.js";
34
+ import { busyIn } from "../core/busy.js";
35
+ import { gateLabel } from "../core/gate.js";
29
36
  import { settleFromApp } from "./wizard.js";
30
37
  import { isValidLang } from "../core/lang.js";
31
38
  import { agentsHere, hasDesktopApp, suggestedWay, waysHere } from "../core/apps.js";
@@ -493,6 +500,71 @@ export async function placesRun(ctx, run, lang, root, id) {
493
500
  out(ctx, t("ui.link.places.stop"));
494
501
  return (await run(["run", "--places", "--max", String(count)])) === 0;
495
502
  }
503
+ /** How many tasks of the queue a link to work on it shows before the question. */
504
+ const WORK_LIST = 5;
505
+ /**
506
+ * The agent working on the queue alone, asked for from the Strom app (strom-research://work?…&do=tasks[&n=…] or
507
+ * do=loop): the agent's CLI not here said first; anything at work in the research already (a run, a session) said and
508
+ * nothing started; then what would start — the first tasks in the order strom run takes them (the one put next first),
509
+ * n tasks or for as long as there is work, the time of a session, the gate (asked once for n tasks, before each
510
+ * session of the loop) — and on the person's yes (no by default) strom run --tasks n or strom run --loop in this
511
+ * terminal (Ctrl-C asks the session at work to finish and stops). The loop goes only under a gate: none set, it is not
512
+ * started — n tasks instead or the gate picked as in the settings, or nothing. The bridge never starts it.
513
+ */
514
+ export async function workRun(ctx, run, lang, root, what, n) {
515
+ const t = translator(lang);
516
+ const tree = Tree.open(root, ctx.env);
517
+ // its sessions are strom run's: the agent's CLI not here said before anything else
518
+ if (!(await agentCliHere(ctx, run, lang, tree)))
519
+ return false;
520
+ // a run or a session at work already (the app's state may be older than the click): nothing more started
521
+ const busy = busyIn(tree);
522
+ if (busy.runs || busy.sessions.length)
523
+ return stop(ctx, t("ui.link.work.busy", { runs: busy.runs, sessions: busy.sessions.length }));
524
+ // the queue as strom run takes it: a story now and then, history by its pace, the one put next first, without what others hold
525
+ const held = othersAtWork(tree, tree.env).tasks;
526
+ const queue = taskQueue(tree, { strategy: ctx.settings.strategy(tree.config), ...RUN_TURNS }).filter((x) => !held.has(x.id));
527
+ if (!queue.length)
528
+ return stop(ctx, t("ui.link.work.empty"));
529
+ let tasks = what === "tasks" ? (n ?? LINK_WORK_DEFAULT) : undefined;
530
+ if (what === "loop" && !ctx.settings.runGate()) {
531
+ // automatic work only under a gate of the person's: none set, not started — n tasks, the gate as in the settings, or nothing
532
+ out(ctx, t("ui.link.work.nogate"));
533
+ const i = await ctx.choose(t("ui.link.work.instead"), [{ label: t("ui.link.work.instead.tasks") }, { label: t("ui.link.work.instead.gate") }], 2, { back: t("ui.link.work.instead.none") });
534
+ if (i === undefined)
535
+ return false;
536
+ if (i === 0) {
537
+ let k = -1;
538
+ while (!(Number.isInteger(k) && k >= 0 && k <= LINK_WORK_MAX)) {
539
+ if (outOfAnswers(ctx))
540
+ return false;
541
+ const a = (await ctx.ask(t("ui.link.work.how"), String(LINK_WORK_DEFAULT))).trim();
542
+ k = /^\d{1,3}$/.test(a) ? Number(a) : -1;
543
+ }
544
+ if (k === 0)
545
+ return false;
546
+ tasks = k;
547
+ }
548
+ else {
549
+ const { chooseGate } = await import("./menu-settings.js");
550
+ await chooseGate(ctx, run, lang, root);
551
+ ctx.settings.reload();
552
+ if (!ctx.settings.runGate())
553
+ return stop(ctx, t("ui.link.work.gate.still"));
554
+ }
555
+ }
556
+ const fresh = Tree.open(root, ctx.env);
557
+ const shown = queue.slice(0, WORK_LIST);
558
+ const minutes = ctx.settings.number("run.minutes", fresh.config, DEFAULT_RUN_MINUTES);
559
+ const spec = ctx.settings.runGate();
560
+ const gate = spec ? gateLabel(ctx.settings.shared()?.value, spec) : undefined;
561
+ const note = lines(t("ui.run.next"), ...shown.map((x, k) => ` ${String(k + 1).padStart(2)}. ${truncate(humanTask(fresh, x.what, lang), 100)}${forStory(x) ? t("ui.run.story") : forHistory(x) ? t("ui.run.ofhistory") : ""}${lacksImages(fresh, x) ? t("ui.plan.images") : ""}`), queue.length > shown.length ? ` ${t("ui.plan.more", { n: queue.length - shown.length })}` : undefined, tasks !== undefined ? t("ui.link.work.tasks", { n: tasks, max: 2 * tasks }) : t("ui.link.work.loop"), t("ui.run.limit", { minutes }), gate ? t(tasks !== undefined ? "ui.link.work.gate.once" : "ui.link.work.gate.each", { gate }) : t("ui.link.work.gate.none"), t("ui.link.cost"));
562
+ const said = tasks !== undefined ? t("ui.link.what.work.tasks", { n: tasks }) : t("ui.link.what.work.loop");
563
+ if (!(await asks(ctx, lang, root, said, note, false)))
564
+ return false;
565
+ out(ctx, t("ui.link.work.stop"));
566
+ return (await run(tasks !== undefined ? ["run", "--tasks", String(tasks)] : ["run", "--loop"])) === 0;
567
+ }
496
568
  /**
497
569
  * How many sessions of identification now, the queue in `batches` sessions: 1, 2, 3 and the whole queue (at most four
498
570
  * answers and 0), each with its minutes and, measured, its price. Suggested: the whole queue when it is three sessions
@@ -19,7 +19,7 @@ import { byTree, offLineView } from "../core/offline.js";
19
19
  import { displayName } from "../core/people.js";
20
20
  import { humanTask } from "./human.js";
21
21
  import { chooseHistory, historyOfferDue, historySuggested, markHistoryAsked } from "../commands/setup.js";
22
- import { askGate, capProblem, ensureGatesDir, listGates, loadGate, pointsProblem } from "../core/gate.js";
22
+ import { askGate, capProblem, ensureGatesDir, gateLabel, listGates, loadGate, pointsProblem } from "../core/gate.js";
23
23
  import { ensureHooksDir, hooksDir, listHooks } from "../core/hooks.js";
24
24
  import { byHandOnly, listConnectors, routeOf, routesOf } from "../core/connector.js";
25
25
  import { claudeInChrome, CLAUDE_IN_CHROME_URL } from "../core/browser.js";
@@ -95,7 +95,7 @@ export async function settingsMenu(ctx, run, lang, root, newer) {
95
95
  return true;
96
96
  },
97
97
  },
98
- ...(archive ? [] : [{ key: "2", label: t("ui.settings.alone", { minutes, gate: gate ? gateName(shared, gate) : t("ui.settings.gate.none") }), act: async () => alone(ctx, run, lang, root) }]),
98
+ ...(archive ? [] : [{ key: "2", label: t("ui.settings.alone", { minutes, gate: gate ? gateLabel(shared, gate) : t("ui.settings.gate.none") }), act: async () => alone(ctx, run, lang, root) }]),
99
99
  {
100
100
  key: "3",
101
101
  label: t("ui.settings.hooks", { state: on.length ? on.join(", ") : t(anyHook ? "ui.settings.off" : "ui.hooks.nothing") }),
@@ -312,17 +312,53 @@ async function maintenance(ctx, run, lang, root, newer) {
312
312
  return { title: t("ui.maintenance.title"), items };
313
313
  }, { fixed: true });
314
314
  }
315
- /** A gate as the user reads it: its title and what it is given ("Claude usage 10"). */
316
- function gateName(shared, spec) {
315
+ /**
316
+ * The condition the agent works alone under (run.gate), picked by the person: the gates there are (strom's claude-usage
317
+ * only where Claude Code is), what each is given, none — set through strom config (the person's yes). The settings'
318
+ * item, and the Strom app's link to work on the queue where none is set.
319
+ */
320
+ export async function chooseGate(ctx, run, lang, root) {
321
+ const t = translator(lang);
322
+ const out = (line) => ctx.io.stdout(line + "\n");
323
+ ctx.settings.reload();
324
+ const shared = ctx.settings.shared()?.value;
317
325
  if (!shared)
318
- return spec;
319
- try {
320
- const g = loadGate(shared, spec);
321
- return [g.manifest.title ?? g.name, ...g.args].join(" ");
326
+ return;
327
+ const tree = root ? Tree.open(root, ctx.env).config : undefined;
328
+ const set = ctx.settings.runGate();
329
+ ensureGatesDir(shared);
330
+ // strom's claude-usage asks Claude Code: offered only where it is
331
+ const claude = claudeHere(ctx, tree);
332
+ const gates = listGates(shared).filter((g) => g.name !== "claude-usage" || claude || loadGateName(set ?? "") === g.name);
333
+ out(t("ui.alone.gate.about"));
334
+ const current = set ? gates.findIndex((g) => g.name === loadGateName(set)) : gates.length;
335
+ const i = await ctx.choose(t("ui.alone.gate.pick"), [...gates.map((g) => ({ label: g.manifest.title ?? g.name })), { label: t("ui.settings.gate.none") }], current >= 0 ? current : gates.length + 1, {
336
+ back: t("ui.browse.back"),
337
+ });
338
+ if (i === undefined)
339
+ return;
340
+ if (i === gates.length) {
341
+ if (set)
342
+ await run(["config", "unset", "run.gate"], true);
343
+ return;
322
344
  }
323
- catch {
324
- return spec;
345
+ const g = gates[i];
346
+ const had = set && loadGateName(set) === g.name ? set.trim().split(/\s+/u).slice(1).join(" ") : undefined;
347
+ let given = "";
348
+ for (;;) {
349
+ given = (await ctx.ask(t(g.name === "claude-usage" ? "ui.alone.gate.claude" : "ui.alone.gate.args"), had ?? (g.name === "claude-usage" ? "10" : ""))).trim();
350
+ // claude-usage takes a whole number of points (0–99), as the gate reads it; anything else would stop every run
351
+ if (pointsProblem(g.name, given.split(/\s+/u).filter(Boolean)) === undefined && capProblem(given.split(/\s+/u).filter(Boolean)) === undefined)
352
+ break;
353
+ out(t("ui.alone.gate.bad"));
354
+ if (ctx.io.answers !== undefined && ctx.io.answers.length === 0)
355
+ return;
325
356
  }
357
+ if (given === "0" && g.name !== "claude-usage")
358
+ return;
359
+ const spec = [g.name, given].filter(Boolean).join(" ");
360
+ if (spec !== set)
361
+ await run(["config", "set", "run.gate", spec], true);
326
362
  }
327
363
  /** The agent working alone: how long one session may take, and the condition it works on under (run.gate). */
328
364
  async function alone(ctx, run, lang, root) {
@@ -358,42 +394,8 @@ async function alone(ctx, run, lang, root) {
358
394
  if (shared)
359
395
  items.push({
360
396
  key: "2",
361
- label: t("ui.alone.gate", { gate: set ? gateName(shared, set) : t("ui.settings.gate.none") }),
362
- act: async () => {
363
- ensureGatesDir(shared);
364
- // strom's claude-usage asks Claude Code: offered only where it is
365
- const claude = claudeHere(ctx, tree);
366
- const gates = listGates(shared).filter((g) => g.name !== "claude-usage" || claude || loadGateName(set ?? "") === g.name);
367
- out(t("ui.alone.gate.about"));
368
- const current = set ? gates.findIndex((g) => g.name === loadGateName(set)) : gates.length;
369
- const i = await ctx.choose(t("ui.alone.gate.pick"), [...gates.map((g) => ({ label: g.manifest.title ?? g.name })), { label: t("ui.settings.gate.none") }], current >= 0 ? current : gates.length + 1, {
370
- back: t("ui.browse.back"),
371
- });
372
- if (i === undefined)
373
- return;
374
- if (i === gates.length) {
375
- if (set)
376
- await run(["config", "unset", "run.gate"], true);
377
- return;
378
- }
379
- const g = gates[i];
380
- const had = set && loadGateName(set) === g.name ? set.trim().split(/\s+/u).slice(1).join(" ") : undefined;
381
- let given = "";
382
- for (;;) {
383
- given = (await ctx.ask(t(g.name === "claude-usage" ? "ui.alone.gate.claude" : "ui.alone.gate.args"), had ?? (g.name === "claude-usage" ? "10" : ""))).trim();
384
- // claude-usage takes a whole number of points (0–99), as the gate reads it; anything else would stop every run
385
- if (pointsProblem(g.name, given.split(/\s+/u).filter(Boolean)) === undefined && capProblem(given.split(/\s+/u).filter(Boolean)) === undefined)
386
- break;
387
- out(t("ui.alone.gate.bad"));
388
- if (ctx.io.answers !== undefined && ctx.io.answers.length === 0)
389
- return;
390
- }
391
- if (given === "0" && g.name !== "claude-usage")
392
- return;
393
- const spec = [g.name, given].filter(Boolean).join(" ");
394
- if (spec !== set)
395
- await run(["config", "set", "run.gate", spec], true);
396
- },
397
+ label: t("ui.alone.gate", { gate: set ? gateLabel(shared, set) : t("ui.settings.gate.none") }),
398
+ act: () => chooseGate(ctx, run, lang, root),
397
399
  });
398
400
  // Without the person's own add-ons (skills, plugins, MCP servers) — only for an agent that has the switches (nearly
399
401
  // always here: before the test of a gate, which shows only with one set); a tree with a value of its own: the
package/dist/cli/ui.js CHANGED
@@ -3339,6 +3339,8 @@ export const UI = {
3339
3339
  "ui.plan.history.prefer": "; first: the place {place} from a recent session",
3340
3340
  "ui.run.stop.history": "no tasks of history left",
3341
3341
  "ui.run.stop.places": "no places left to identify",
3342
+ "ui.run.stop.tasks": "{n, plural, one {# task} other {# tasks}} dealt with",
3343
+ "ui.run.stop.sessions": "sessions: {max} (the most for the tasks asked) — tasks dealt with: {n}",
3342
3344
  "ui.plan.history.left": "Tasks of history waiting: {n} (all of them first: strom run --history)",
3343
3345
  "ui.run.history": "Look for history now ({n, plural, one {# task} other {# tasks}} of history)",
3344
3346
  "ui.run.history.how": "How many tasks of history? (0 goes back)",
@@ -3375,6 +3377,23 @@ export const UI = {
3375
3377
  "ui.link.places.count.usd": "; by the sessions so far {from}–{to}",
3376
3378
  "ui.link.places.none": "none now — identifying stays first in the queue",
3377
3379
  "ui.link.places.stop": "One session after another; Ctrl-C asks the session at work to finish and stops the run — the places left stay first in the queue.",
3380
+ "ui.link.what.work.tasks": "the agent working on the queue alone, {n, plural, one {# task} other {# tasks}}",
3381
+ "ui.link.what.work.loop": "the agent working on the queue alone, for as long as there is work",
3382
+ "ui.link.work.tasks": "It ends after {n, plural, one {# task} other {# tasks}} dealt with (done, waiting, put aside or given up); a task given back to the queue does not count; at most {max} sessions.",
3383
+ "ui.link.work.loop": "Session after session for as long as there is work and the condition lets it.",
3384
+ "ui.link.work.gate.each": "Condition: {gate} — asked before each session.",
3385
+ "ui.link.work.gate.once": "Condition: {gate} — asked once, before the first session; when it would not start, the question comes here.",
3386
+ "ui.link.work.gate.none": "Condition: none (setting run.gate).",
3387
+ "ui.link.work.empty": "Nothing waits in the queue. Nothing was started.",
3388
+ "ui.link.work.busy": "Work already goes on in this research (runs: {runs}, sessions: {sessions}). Nothing more was started.",
3389
+ "ui.link.work.nogate": "Automatic work runs only under a condition (setting run.gate): before each session it says whether to go on, wait or stop. Without one, nothing starts by itself.",
3390
+ "ui.link.work.instead": "Instead:",
3391
+ "ui.link.work.instead.tasks": "Only a number of tasks now",
3392
+ "ui.link.work.instead.gate": "Set the condition (as in the settings)",
3393
+ "ui.link.work.instead.none": "Nothing now",
3394
+ "ui.link.work.how": "How many tasks? (1–100; 0 nothing)",
3395
+ "ui.link.work.gate.still": "No condition is set. Nothing was started.",
3396
+ "ui.link.work.stop": "Session after session in this window; Ctrl-C asks the session at work to finish and stops the run — the rest stays in the queue.",
3378
3397
  "ui.link.what.experiment.places": "look for the history of each place with coordinates and its surroundings by itself, one place at a time",
3379
3398
  "ui.link.experiment.places.count": "Places with coordinates: {n}, looked for already: {done}.",
3380
3399
  "ui.link.experiment.places.on.done": "The history of each place is looked for by itself, at the pace of the history.",
@@ -122,6 +122,7 @@ function refusedHere(ctx, root, link) {
122
122
  link.action === "research" ||
123
123
  link.action === "history" ||
124
124
  link.action === "places" ||
125
+ link.action === "work" ||
125
126
  (link.action === "conflict" && link.do === "agent") ||
126
127
  // the agent deciding the hypotheses: nobody researches in an archive (back to the person: anywhere)
127
128
  (link.action === "hypotheses" && "decide" in link && link.decide === "agent") ||
@@ -311,6 +312,11 @@ async function inTerminal(ctx, link) {
311
312
  const { placesRun } = await import("../cli/menu-links.js");
312
313
  return end(await placesRun(ctx, run, treeLang, root, link.place));
313
314
  }
315
+ case "work": {
316
+ // the agent working on the queue alone: what starts shown here, started in this terminal only on the person's yes
317
+ const { workRun } = await import("../cli/menu-links.js");
318
+ return end(await workRun(ctx, run, treeLang, root, link.do, link.n === undefined ? undefined : Number(link.n)));
319
+ }
314
320
  case "fixes": {
315
321
  // strom's fixes: shown here; set right or put back only on the person's word, asked by strom fixes itself
316
322
  const { fixesDo } = await import("../cli/menu-links.js");
@@ -502,6 +508,10 @@ register({
502
508
  " (or the one place, queued when it is not) with its sessions and estimate, the task on top of the queue on the\n" +
503
509
  " person's yes in the terminal, then started now if wanted — a queue of more sessions: how many, each with its\n" +
504
510
  " estimate, run one after another (the bridge never starts it).\n" +
511
+ "strom-research://work?tree=<id>&do=loop|tasks[&n=5] — the agent working on the queue alone: n tasks settled (1–100,\n" +
512
+ " default 5; strom run --tasks n) or for as long as there is work (strom run --loop, only under a gate — none set: n\n" +
513
+ " tasks or the gate offered instead); the first tasks, the session's time and the gate shown, started in the terminal\n" +
514
+ " only on the person's yes (no by default; the bridge never starts it). Refused where nobody researches.\n" +
505
515
  "strom-research://fixes?tree=<id>[&id=street-places][&do=undo] — strom's fixes of the research (strom fixes), one of them\n" +
506
516
  " shown, or what it set right to be put back: set right or put back only on the person's word in the terminal.\n" +
507
517
  "strom-research://back?tree=<id>[&change=<hash>] — the research back in time (strom history back): the change named by\n" +
@@ -10,7 +10,7 @@ import { update, requireRecord } from "../core/records.js";
10
10
  import { detectAgent } from "../core/which.js";
11
11
  import { refuseInArchive } from "../core/state.js";
12
12
  import { answerBranch, BRANCH_MODES, branchJson, branchKey, branchOf, offLineJson, offLineView, readOffline, setBranch } from "../core/offline.js";
13
- import { ownTurn, runOrder } from "../core/queue.js";
13
+ import { ownTurn, restoredTurn, runOrder, turnWas } from "../core/queue.js";
14
14
  import { resolveResearch } from "./research.js";
15
15
  import { rankData } from "./tasks.js";
16
16
  const who = (tree, id) => {
@@ -160,37 +160,59 @@ register({
160
160
  tree: true,
161
161
  writes: true,
162
162
  description: "--next: the task comes next, before the lines, the places and history — once: when a session on it ends,\n" +
163
- "the choice goes by itself; several in the order given. --last: after everything else, until done or\n" +
164
- "--default. Also a task off the lines whose branch is not researched. (strom task next is another command:\n" +
165
- "what comes next.)",
163
+ "the choice goes by itself; several: the last chosen first (next again: on top). --last: after everything\n" +
164
+ "else, until done or --default. --restore <next|last>@<time>: the turn put back exactly as it was (its time\n" +
165
+ "as --json gave it in was: an ISO time, not later than now, at most 30 days ago) — the Strom app's \"back\".\n" +
166
+ "Also a task off the lines whose branch is not researched. (strom task next is another command: what comes\n" +
167
+ "next.)",
166
168
  args: [{ name: "task", description: "task ID", required: true }],
167
169
  options: [
168
170
  { name: "next", type: "boolean", description: "next, once" },
169
171
  { name: "last", type: "boolean", description: "at the end" },
170
172
  { name: "default", type: "boolean", description: "back to the queue's own order" },
173
+ { name: "restore", type: "string", value: "<next|last>@<time>", description: "the turn exactly as it was (was in --json)" },
171
174
  ],
172
175
  examples: ["strom task order T0002 --next", "strom task order T0002 --default"],
173
176
  run(ctx, { args, opts }) {
174
177
  const tree = ctx.tree();
175
178
  refuse(ctx, tree, "strom task order");
176
- const given = [!!opts.next, !!opts.last, !!opts.default].filter(Boolean).length;
179
+ const given = [!!opts.next, !!opts.last, !!opts.default, opts.restore !== undefined].filter(Boolean).length;
177
180
  if (given !== 1)
178
- throw new UsageError("give exactly one of --next, --last or --default", { code: "queue.body" });
181
+ throw new UsageError("give exactly one of --next, --last, --default or --restore", { code: "queue.body" });
182
+ // a turn put back as it was: checked before the task is looked at (a wrong time is the call's, whatever the task)
183
+ let back;
184
+ if (opts.restore !== undefined) {
185
+ const spec = String(opts.restore).trim();
186
+ const at = spec.indexOf("@");
187
+ const r = restoredTurn(at < 0 ? spec : spec.slice(0, at), at < 0 ? undefined : spec.slice(at + 1));
188
+ if ("bad" in r)
189
+ throw new UsageError(`--restore: ${r.bad}`, { code: "queue.body" });
190
+ back = r;
191
+ }
179
192
  const t = requireRecord(tree, args[0], "task");
180
193
  if (t.state === "doing")
181
194
  throw new UsageError(`${t.id} is in progress: its turn is now`, { code: "queue.doing", params: { task: t.id } });
182
195
  if (t.state !== "open")
183
196
  throw new UsageError(`${t.id} is ${t.state}: only an open task has a turn in the queue`, { hint: "strom task list", code: "queue.none", params: { task: t.id } });
184
- const want = opts.next ? "next" : opts.last ? "last" : undefined;
197
+ const want = back?.do ?? (opts.next ? "next" : opts.last ? "last" : undefined);
185
198
  const ended = tree.list("session").filter((s) => s.state !== "open" && s.task);
186
- // as it is already ("next" only while it holds: a session on the task since used it up)
187
- if (want ? t.queueAt?.do === want && ownTurn(t, ended) === want : !t.queueAt)
188
- return { text: `${t.id}: nothing to change`, data: taskTurn(ctx, tree, t.id) };
199
+ // the turn before (the Strom app's "back" puts it back with --restore)
200
+ const was = turnWas(t, ended);
201
+ // as it is already ("next" only while it holds: a session on the task since used it up; next again goes on top of
202
+ // the others put next — the last chosen first — so it is as it is only when none was chosen after it)
203
+ const newest = (x) => tree.list("task").every((o) => o.id === x.id || (o.state !== "open" && o.state !== "doing") || ownTurn(o, ended) !== "next" || o.queueAt.at <= x.queueAt.at);
204
+ const same = back
205
+ ? t.queueAt?.do === back.do && t.queueAt.at === back.at
206
+ : want
207
+ ? t.queueAt?.do === want && ownTurn(t, ended) === want && (want === "last" || newest(t))
208
+ : !t.queueAt;
209
+ if (same)
210
+ return { text: `${t.id}: nothing to change`, data: { ...taskTurn(ctx, tree, t.id), was } };
189
211
  update(tree, t.id, "task", (x) => {
190
212
  const { queueAt: _old, ...rest } = x;
191
- return want ? { ...rest, queueAt: { do: want, at: new Date().toISOString() } } : rest;
192
- }, { op: "task.order", summary: `${t.id} ${want ? `${want} in the queue, the person's choice` : "back to the queue's order"}` });
193
- return { text: lines(...tree.written.map((o) => o.summary)), data: taskTurn(ctx, tree, t.id) };
213
+ return want ? { ...rest, queueAt: back ?? { do: want, at: new Date().toISOString() } } : rest;
214
+ }, { op: "task.order", summary: `${t.id} ${back ? `${back.do} in the queue as it was (${back.at}), the person's choice` : want ? `${want} in the queue, the person's choice` : "back to the queue's order"}` });
215
+ return { text: lines(...tree.written.map((o) => o.summary)), data: { ...taskTurn(ctx, tree, t.id), was } };
194
216
  },
195
217
  });
196
218
  /** The task as the queue has it now (its why, its branch, the person's turn); not in the queue: the task alone. */