strom-research 1.33.0 → 1.34.0-beta.2

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.
Files changed (50) hide show
  1. package/CHANGELOG.cs.md +28 -0
  2. package/CHANGELOG.de.md +34 -0
  3. package/CHANGELOG.md +29 -0
  4. package/CHANGELOG.pl.md +30 -0
  5. package/assets/lang/cs.json +53 -2
  6. package/assets/lang/de.json +54 -3
  7. package/assets/lang/pl.json +53 -2
  8. package/assets/plugins/gates/README.md +7 -0
  9. package/dist/brief/brief.js +10 -6
  10. package/dist/brief/sheet.js +2 -0
  11. package/dist/cli/help.js +3 -3
  12. package/dist/cli/ui.js +50 -1
  13. package/dist/cli/wizard.js +45 -10
  14. package/dist/commands/clips.js +3 -2
  15. package/dist/commands/output.js +4 -2
  16. package/dist/commands/people.js +73 -9
  17. package/dist/commands/read.js +19 -4
  18. package/dist/commands/readers.js +35 -4
  19. package/dist/commands/session.js +52 -12
  20. package/dist/commands/setup.js +85 -9
  21. package/dist/commands/show.js +3 -3
  22. package/dist/commands/sync.js +61 -40
  23. package/dist/commands/transcripts.js +3 -2
  24. package/dist/core/actions.js +52 -2
  25. package/dist/core/agentcli.js +28 -0
  26. package/dist/core/changelog.js +8 -0
  27. package/dist/core/citeorder.js +140 -0
  28. package/dist/core/claudedir.js +3 -1
  29. package/dist/core/doc.js +6 -5
  30. package/dist/core/import.js +23 -0
  31. package/dist/core/live.js +14 -19
  32. package/dist/core/liveged.js +4 -2
  33. package/dist/core/origin.js +4 -0
  34. package/dist/core/phrases.js +2 -0
  35. package/dist/core/planlimit.js +82 -0
  36. package/dist/core/reader.js +0 -2
  37. package/dist/core/relocate.js +80 -1
  38. package/dist/core/report.js +4 -21
  39. package/dist/core/stromapp.js +39 -0
  40. package/dist/core/sync.js +548 -39
  41. package/dist/core/tree.js +1 -1
  42. package/dist/gedcom/export.js +21 -8
  43. package/dist/gedcom/validate.js +11 -1
  44. package/dist/runners/antigravity.js +3 -3
  45. package/dist/runners/claude.js +8 -4
  46. package/dist/runners/codex.js +3 -3
  47. package/dist/runners/grok.js +5 -3
  48. package/dist/runners/opencode.js +2 -2
  49. package/dist/runners/runner.js +30 -2
  50. package/package.json +4 -1
@@ -632,6 +632,12 @@
632
632
  "ui.run.stop.limit": "limit subskrypcji{resets}",
633
633
  "ui.run.stop.resets": " (odnowi się {at})",
634
634
  "ui.run.stop.auth": "agent nie jest zalogowany – raz uruchomić {command} i się zalogować",
635
+ "ui.read.auth": "Claude Code w terminalu nie jest zalogowany (czytelników uruchamia sam strom, nie aplikacja Claude) – raz uruchomić {command} w terminalu i się zalogować (/login)",
636
+ "ui.read.done": "■ czytelnik {k}: {outcome}{cost} · znaleziska: {n}",
637
+ "ui.read.timeout": "zatrzymany na swoim limicie czasu ({minutes} min)",
638
+ "ui.read.failed": "czytelnicy z błędem: {list}",
639
+ "ui.read.failed.timeout": "zatrzymany na swoim limicie czasu, {minutes} min",
640
+ "ui.read.stalled": "usługa jego agenta zamilkła po ponownej próbie, także po wznowieniu – zatrzymany",
635
641
  "ui.run.stop.failed": "agent zawiódł: {detail}",
636
642
  "ui.run.stop.model": "{agent} nie przyjmuje modelu {model} – wybrać inny: strom config set model.lead <model> (albo na jeden przebieg: strom run --model <model>)",
637
643
  "ui.run.stop.model.codex": "model {model} nie jest dostępny w zainstalowanej wersji Codex CLI – zaktualizować Codex (npm install -g @openai/codex@latest) albo wybrać inny model: strom config set model.lead <model> (albo na jeden przebieg: strom run --model <model>)",
@@ -760,7 +766,11 @@
760
766
  "ui.doc.where": "gdzie toczy się rozmowa z agentem",
761
767
  "ui.doc.where.app": "aplikacja {app}",
762
768
  "ui.doc.cli": "agent w terminalu",
769
+ "ui.doc.login": "logowanie Claude Code",
763
770
  "ui.doc.cli.missing": "praca samodzielna, czytanie skanów i praca z aplikacji Strom wymagają {cli} w terminalu",
771
+ "ui.doc.login.ok": "Claude Code w terminalu zalogowany",
772
+ "ui.doc.login.no": "Claude Code w terminalu nie jest zalogowany – praca samodzielna, czytanie skanów i praca z aplikacji Strom od razu się kończą (aplikacja Claude ma własne logowanie)",
773
+ "ui.doc.login.fix": "{command} w terminalu, potem /login",
764
774
  "ui.doc.where.terminal": "terminal ({agent})",
765
775
  "ui.run.needscli": "Praca samodzielna wymaga {agent} w terminalu (sama aplikacja tego nie potrafi).",
766
776
  "ui.fix.git.download": "Pobrać git dla strom (ok. {mb} MB – oficjalny Git for Windows, używa go tylko strom, nic się nie instaluje)?",
@@ -1283,6 +1293,8 @@
1283
1293
  "ui.show.ages": "wiek {ages}",
1284
1294
  "ui.show.with": "wymienieni: {who}",
1285
1295
  "ui.show.retracted": "(wycofane: {reason})",
1296
+ "ui.show.main": "(główne, wybór użytkownika)",
1297
+ "ui.show.uncited": "(usunięte przez użytkownika: {sources})",
1286
1298
  "ui.show.removed": "usunięte ({day}, {reason})",
1287
1299
  "ui.show.removed.app": "usunięte w aplikacji Strom ({day}) – przywrócenie: {undo}",
1288
1300
  "ui.show.removed.mark": "(usunięte)",
@@ -1321,6 +1333,9 @@
1321
1333
  "ui.query.story.draft": "szkic",
1322
1334
  "ui.query.story.all": "źródła całej opowieści: {list}",
1323
1335
  "ui.event.edited": "zmieniono: {line}",
1336
+ "ui.event.main": "wybrano główny zapis danej: {line}",
1337
+ "ui.event.main.off": "dana bez głównego zapisu (kolejność badania): {line}",
1338
+ "ui.event.main.same": "nie ma czego zmieniać: {line}",
1324
1339
  "ui.show.sex.M": "mężczyzna",
1325
1340
  "ui.show.sex.F": "kobieta",
1326
1341
  "ui.show.sex.U": "płeć nieznana",
@@ -1439,7 +1454,8 @@
1439
1454
  "ui.help.cmd.offline.set": "Jak jest badana jedna gałąź poza liniami: własny wybór, dodana do linii albo jak w całym drzewie",
1440
1455
  "ui.help.cmd.offline.answer": "Odpowiedzieć na propozycję dla gałęzi, która urosła: dodać do linii, zostawić albo nie badać",
1441
1456
  "ui.help.cmd.conflict.leave": "Zostawić sprzeczność ze zmiany w aplikacji Strom do rozstrzygnięcia agentowi",
1442
- "ui.help.cmd.event.revert": "Przywrócić daną, jak podawało ją przejęte drzewo",
1457
+ "ui.help.cmd.event.main": "Wybrać zapis pokazywany przy danej jako pierwszy (główny przypis) albo cofnąć wybór",
1458
+ "ui.help.cmd.event.revert":"Przywrócić daną, jak podawało ją przejęte drzewo",
1443
1459
  "ui.help.cmd.person.revert": "Przywrócić imię i nazwisko lub płeć, jak podawało je przejęte drzewo",
1444
1460
  "ui.help.cmd.fixes": "Poprawki drzewa: co w tym badaniu pozostawiły wcześniejsze wersje strom i ile kosztuje naprawa (bezpłatnie)",
1445
1461
  "ui.help.cmd.fixes.show": "Jedna poprawka w całości: co tu znalazła, co zrobi naprawa i ile kosztuje",
@@ -1483,7 +1499,7 @@
1483
1499
  "ui.help.more": "Pomoc do jednego polecenia: strom help <polecenie> --human · wszystkie polecenia po angielsku (to, co czyta agent): strom help",
1484
1500
  "ui.help.more.archive": "Pomoc do jednego polecenia: strom help <polecenie> --human",
1485
1501
  "ui.help.source": "Kod źródłowy (GNU AGPL 3.0 lub nowsza): {url}",
1486
- "ui.help.doc": "Jak działa Strom: strom doc · stromapp.info/doc/{lang}/",
1502
+ "ui.help.doc": "Jak działa Strom: strom doc · {site}",
1487
1503
  "ui.docs.how": "Zasada: strom doc R2.3 · wyszukiwanie: strom doc <słowa>",
1488
1504
  "ui.docs.fallback": "Jak działa Strom nie jest napisane w języku {language}: po angielsku.",
1489
1505
  "ui.docs.chapter": "W tym rozdziale:",
@@ -1539,6 +1555,8 @@
1539
1555
  "ui.error.agent.cli-missing": "{agent} nie jest tu zainstalowany w terminalu – {command} go uruchamia (sama aplikacja tego nie potrafi)",
1540
1556
  "ui.error.agent.cli-missing.hint": "instalacja {agent}: {install}",
1541
1557
  "ui.error.agent.cli-missing.app.hint": "rozmowa w aplikacji {app} trwa dalej: strom chat · instalacja {agent}: {install}",
1558
+ "ui.error.agent.logged-out": "Claude Code w terminalu nie jest zalogowany – {command} uruchamia go sam (nie aplikacja Claude, która ma własne logowanie)",
1559
+ "ui.error.agent.logged-out.hint": "raz zalogować się w terminalu: {login}, potem /login",
1542
1560
  "ui.status.disk": "Na dysku: badanie {research} · obok niego strom przechowuje {strom}",
1543
1561
  "ui.status.disk.frees": " (strom tidy zwolni {size})",
1544
1562
  "ui.status.refused": "{host} odmówił programowi strom automatycznego dostępu – skany ręcznie; zniesienie: strom allow host {host} --unblock",
@@ -1716,10 +1734,17 @@
1716
1734
  "ui.sync.fact.share.gone": "{n}. {who}: {fact} – w aplikacji Strom już niewspólne z innymi",
1717
1735
  "ui.sync.fact.share.role": "{n}. {who}: {fact} – rola przy cudzym wydarzeniu w aplikacji Strom",
1718
1736
  "ui.sync.fact.share.role.gone": "{n}. {who}: {fact} – rola przy cudzym wydarzeniu w aplikacji Strom usunięta",
1737
+ "ui.sync.fact.main": "{n}. {who}: {fact} – główny dowód w aplikacji Strom: {sources}",
1738
+ "ui.sync.fact.main.off": "{n}. {who}: {fact} – w aplikacji Strom już bez głównego dowodu",
1739
+ "ui.sync.fact.main.nomatch": "{n}. {who}: {fact} – główny dowód wybrany w aplikacji Strom przy danej, którą badanie ma inaczej",
1740
+ "ui.sync.fact.uncite": "{n}. {who}: {fact} – w aplikacji Strom już nie cytuje {sources}",
1741
+ "ui.sync.cite.notCarried": "{n}. {who}: {sources} – brak w pliku aplikacji Strom",
1719
1742
  "ui.sync.fact.part": "{n}. {who}: {kind} {when} – {role}: {part}",
1720
1743
  "ui.sync.fact.part.link": "{n}. {who}: {kind} {when} – {role} {part}: osoba z drzewa",
1721
1744
  "ui.sync.fact.part.role": "{n}. {who}: {kind} {when} – {part}: {wasRole} → {role}",
1722
1745
  "ui.sync.fact.part.gone": "{n}. {who}: {kind} {when} – już niewymieniony: {wasRole} {part}",
1746
+ "ui.sync.fact.note": "{n}. {who}: {kind} {when} – notatka „{old}” → „{new}”",
1747
+ "ui.sync.fact.part.note": "{n}. {who}: {kind} {when} – {role} {part}, notatka „{old}” → „{new}”",
1723
1748
  "ui.sync.person.cite": "{n}. {who}: źródło z aplikacji do osoby – {sources}",
1724
1749
  "ui.sync.family.cite": "{n}. {who}: źródło z aplikacji do rodziny – {sources}",
1725
1750
  "ui.sync.surname.group": "{n}. Formy nazwiska jednej rodziny: {forms}",
@@ -1785,6 +1810,10 @@
1785
1810
  "ui.sync.do.guarded": "nie zostanie zapisane – wartość użytkownika lub z zaimportowanego drzewa (zmienia ją tylko użytkownik)",
1786
1811
  "ui.sync.do.note.changed": "ten wiersz notatki badania zostanie poprawiony",
1787
1812
  "ui.sync.do.detail": "zostanie dodane do danej z odnośnikiem do drzewa z aplikacji",
1813
+ "ui.sync.do.fact.note": "notatka zostanie poprawiona (wersja badania zostanie w historii)",
1814
+ "ui.sync.do.fact.note.add": "notatka zostanie dodana do danej",
1815
+ "ui.sync.do.fact.part.note": "notatka zostanie poprawiona",
1816
+ "ui.sync.do.fact.part.note.add": "notatka zostanie dodana",
1788
1817
  "ui.sync.do.refine": "zostanie dodane do danej z odnośnikiem do drzewa z aplikacji (nic nie przeczy aktowi)",
1789
1818
  "ui.sync.do.conflict": "sprzeczność do rozstrzygnięcia (badanie ma to z aktu)",
1790
1819
  "ui.sync.do.parents": "sprzeczność do rozstrzygnięcia (badanie podaje innych rodziców)",
@@ -1799,6 +1828,16 @@
1799
1828
  "ui.sync.do.share": "oznaczenie zostanie dodane do danej, dana pozostaje",
1800
1829
  "ui.sync.do.share.user": "obowiązuje zmiana z aplikacji (wersja badania zostanie w historii)",
1801
1830
  "ui.sync.do.share.kept": "nie zapisano: o wspólnym wydarzeniu decyduje tylko użytkownik",
1831
+ "ui.sync.do.main": "dowód pojawi się przy danej jako pierwszy, zgodnie z wyborem",
1832
+ "ui.sync.do.main.off": "przy danej już żaden dowód pierwszy: kolejność badania",
1833
+ "ui.sync.do.main.kept": "nie zapisano: główny dowód wybiera tylko użytkownik",
1834
+ "ui.sync.do.uncite": "dana już go nie cytuje (zostaje w historii; bez powodu nie zostanie zacytowany ponownie)",
1835
+ "ui.sync.do.uncite.kept": "nie zapisano: o tym, czego dana już nie cytuje, decyduje tylko użytkownik",
1836
+ "ui.sync.do.cite.olderApp": "nic się nie zmienia: ta aplikacja Strom nie zgłasza usunięcia cytatu – badanie go zachowuje",
1837
+ "ui.sync.do.cite.sourceRemoved": "nic się nie zmienia: badanie zachowuje źródło i jego cytaty",
1838
+ "ui.sync.do.cite.notCarried": "nic się nie zmienia: badanie zachowuje cytat",
1839
+ "ui.sync.do.fact.noMatch": "nie zapisano: danej, przy której go wybrano, badanie tak nie ma",
1840
+ "ui.sync.do.event.retracted": "nie zapisano: badanie w międzyczasie wycofało tę daną (nie wróci już do aplikacji)",
1802
1841
  "ui.sync.edits": "Zmiany z aplikacji w danych potwierdzonych aktem: {mode} (strom config set sync.edits conflict|user)",
1803
1842
  "ui.sync.mode.conflict": "sprzeczność do rozstrzygnięcia",
1804
1843
  "ui.sync.mode.user": "obowiązuje zmiana z aplikacji",
@@ -2235,6 +2274,9 @@
2235
2274
  "ui.run.cap.finish": "⏳ {session}: limit agenta na {used} % ({kind}) – sesja dostała prośbę o zapisanie, co znalazła, i zakończenie; po przekroczeniu pułapu kolejna sesja nie ruszy",
2236
2275
  "ui.run.limit.five_hour": "okno pięciogodzinne",
2237
2276
  "ui.run.limit.seven_day": "tydzień",
2277
+ "ui.run.limit.wait": "⏸ limit planu agenta wyczerpał się{kind} – oczekiwanie do jego odnowienia ({at}), potem ponowne pytanie warunku i praca idzie dalej (Ctrl-C kończy przebieg)",
2278
+ "ui.run.limit.unknown": "⏸ limit planu agenta wyczerpał się{kind}, czas odnowienia nieznany – oczekiwanie do {at}, potem ponowne pytanie warunku (Ctrl-C kończy przebieg)",
2279
+ "ui.run.limit.why": "limit planu agenta wyczerpał się{kind} – praca idzie dalej po jego odnowieniu",
2238
2280
  "ui.run.loop": "Pozwól mu pracować, dopóki jest co robić i pozwala na to warunek „{name}”",
2239
2281
  "ui.consent.gate.set": "Pozwolić warunkowi „{name}” decydować, kiedy agent pracujący samodzielnie kontynuuje?",
2240
2282
  "ui.consent.gate.unset": "Usunąć warunek „{name}” – agent pracujący samodzielnie nie będzie go już pytał?",
@@ -2676,6 +2718,8 @@
2676
2718
  "log.event.edit": "Uściślono: {who} – {fact}",
2677
2719
  "log.event.cite": "Dowód dla faktu: {who} – {fact}",
2678
2720
  "log.event.uncite": "Usunięto dowód: {who} – {fact}",
2721
+ "log.event.main": "Wybrano główny dowód faktu: {who} – {fact}",
2722
+ "log.event.main.off": "Fakt bez głównego dowodu: {who} – {fact}",
2679
2723
  "log.event.recite": "Fakt znów opiera się na dowodzie, z którego pochodził: {who} – {fact}",
2680
2724
  "log.person.uncite": "Usunięto dowód osoby {who}",
2681
2725
  "log.family.uncite": "Usunięto dowód rodziny {who}",
@@ -2927,6 +2971,13 @@
2927
2971
  "ui.home.program": "{to} leży w folderze programu strom – aktualizacja zastępuje to, co tam jest; potrzebny jest folder poza nim.",
2928
2972
  "ui.home.busy": "W drzewie genealogicznym {trees} ktoś teraz pracuje (agent, praca samodzielna albo śledzenie na żywo w aplikacji Strom) – badanie będzie można przenieść, gdy skończy.",
2929
2973
  "ui.home.failed": "Nie udało się przenieść ({reason}) – nic się nie zmieniło.",
2974
+ "ui.home.existing": "W folderze {to} jest już badanie (drzewa genealogiczne: {trees}). Można z niego korzystać tak, jak jest – nic się nie przenosi, a folder {from} zostaje bez zmian.",
2975
+ "ui.home.existing.left": "Drzewa genealogiczne z folderu {from} znikną wtedy z listy (zostaną tam bez zmian): {trees}.",
2976
+ "ui.home.existing.sure": "Korzystać z badania w folderze {to}?",
2977
+ "ui.home.existing.busy": "W drzewie genealogicznym {trees} ktoś teraz pracuje (agent, praca samodzielna albo śledzenie na żywo w aplikacji Strom) – z drugiego folderu będzie można korzystać, gdy skończy.",
2978
+ "ui.home.existing.ask": "Korzystać z badania w folderze {to} tak, jak jest, bez przenoszenia? Folder {from} zostaje bez zmian, jego drzewa genealogiczne znikną z listy.",
2979
+ "ui.home.used": "✓ Teraz używane jest badanie z folderu {to}. Folder {from} został bez zmian – nic z niego nie przeniesiono ani nie usunięto.",
2980
+ "ui.home.left": "Poza listą, bez zmian w folderze {from}: {trees} – powrót przez ponowny wybór tego folderu (strom setup).",
2930
2981
  "ui.app.notinstalled": "Aplikacja Strom nie jest jeszcze zainstalowana na tym komputerze. Zainstalować ją teraz jako aplikację z przeglądarki (za darmo; strom pokaże, gdzie kliknąć)?",
2931
2982
  "ui.browser.agent": "{names}: pobieranie przez przeglądarkę – to potrafi tylko Claude Code (rozszerzenie Claude in Chrome); badanie prowadzi teraz {agent}. Skany z tych archiwów zapisać ręcznie albo powierzyć badanie Claude Code (strom agents use claude).",
2932
2983
  "ui.browser.noext": "{names}: pobieranie przez przeglądarkę – Chrome potrzebuje do tego rozszerzenia Claude in Chrome zalogowanego na to samo konto co Claude Code; nie widać go tu w żadnej przeglądarce: {url}",
@@ -96,6 +96,13 @@ not start now, strom tells you why and asks whether to start anyway (no is
96
96
  suggested). An agent starting them needs your yes in a window of the system;
97
97
  a script nobody can ask keeps to the gate.
98
98
 
99
+ When the agent's plan limit cuts off a session of a run that goes on by
100
+ itself, the run does not end: it waits until the limit resets as the agent
101
+ said it (a minute more; not said: 15 minutes), then asks the gate again and
102
+ goes on — the interrupted task back in the queue. With `--until`, a reset
103
+ after that time ends the run. A run you started yourself ends there, saying
104
+ when the limit resets.
105
+
99
106
  Every answer is recorded, so a run can be checked afterwards: one line of
100
107
  `strom run`'s output, and one line of JSON in the tree's `.strom/gate.log`
101
108
  (and at the head of the next session's log, `.strom/runs/<session>.log`) —
@@ -5,6 +5,7 @@
5
5
  // The brief has a hard token budget; sections come in priority order and
6
6
  // what does not fit is cut to a pointer: the command that shows the rest.
7
7
  import { noteWhole } from "../core/model.js";
8
+ import { orderCitations } from "../core/citeorder.js";
8
9
  import fs from "node:fs";
9
10
  import path from "node:path";
10
11
  import { inboxFolders, inputPath } from "../core/media.js";
@@ -108,12 +109,15 @@ function layered(name, pointer, layers) {
108
109
  }
109
110
  /** The sections whose parts are given whole once all the others have their room, in this order. */
110
111
  const UPGRADES = ["premise", "open questions", "people"];
111
- function eventLine(e) {
112
- const cites = citesOf(e.citations);
113
- return ` ${e.id} ${e.kind}${e.label ? ` ${e.label}` : ""}${e.date ? ` ${e.date}` : ""}${e.place ? ` ${e.place}` : ""}${e.house ? `, house ${e.house}` : ""}${e.value ? ` "${e.value}"` : ""} [${e.status}]${cites ? ` ← ${cites}` : ""}`;
112
+ function eventLine(tree, e) {
113
+ // in the order every program shows them (spec 095 K1.1): the first is the fact's record, the user's main one first
114
+ const cites = citesOf(orderCitations(e.citations, (id) => tree.get(id), { kind: e.kind, date: e.date }));
115
+ // what the user removed from the fact: never cited there again without a reason (strom cite … --reason)
116
+ const removed = (e.uncited ?? []).filter((u) => !u.cleared).map((u) => u.source);
117
+ return ` ${e.id} ${e.kind}${e.label ? ` ${e.label}` : ""}${e.date ? ` ${e.date}` : ""}${e.place ? ` ${e.place}` : ""}${e.house ? `, house ${e.house}` : ""}${e.value ? ` "${e.value}"` : ""} [${e.status}]${cites ? ` ← ${cites}` : ""}${removed.length ? ` (removed by the user: ${[...new Set(removed)].join(", ")})` : ""}`;
114
118
  }
115
119
  function citesOf(citations) {
116
- return (citations ?? []).map((c) => `${c.source}${c.locator ? ` ${c.locator}` : ""}`).join(", ");
120
+ return (citations ?? []).map((c) => `${c.source}${c.locator ? ` ${c.locator}` : ""}${c.main ? " (main: the user's choice, never changed by an agent)" : ""}`).join(", ");
117
121
  }
118
122
  /** The notes of a person in short: the start of the last one, the others counted — what tells namesakes apart. */
119
123
  function notesShort(p) {
@@ -129,7 +133,7 @@ function personBlock(tree, p, depth, short = false) {
129
133
  if (p.names.length > 1 || p.names.some((n) => n.citations?.length))
130
134
  out.push(` names: ${p.names.map((n) => `${formatName(n)}${n.kind ? ` (${n.kind})` : ""}${n.primary ? " (shown by it)" : ""}${n.citations?.length ? ` ← ${citesOf(n.citations)}` : ""}`).join("; ")}`);
131
135
  for (const e of p.events.filter((x) => !x.retracted))
132
- out.push(eventLine(e));
136
+ out.push(eventLine(tree, e));
133
137
  const parents = parentsOf(tree, p.id);
134
138
  const birthFamily = familiesAsChild(tree, p.id)[0];
135
139
  out.push(` parents: ${parents.length ? parents.map(label).join(" & ") : "unknown"}${birthFamily?.citations?.length ? ` (${birthFamily.id} ← ${citesOf(birthFamily.citations)})` : ""}`);
@@ -308,7 +312,7 @@ function familyBlock(tree, f, short = false) {
308
312
  const partners = f.partners.map((x) => tree.get(x)).filter((x) => !!x).map(label);
309
313
  const out = [` ${f.id} family of ${partners.join(" & ") || "?"}${f.union ? ` [${f.union}]` : ""}${f.children.length ? ` · ${f.children.length} child${f.children.length > 1 ? "ren" : ""}` : ""}`];
310
314
  for (const e of f.events.filter((x) => !x.retracted))
311
- out.push(eventLine(e));
315
+ out.push(eventLine(tree, e));
312
316
  if (f.citations?.length)
313
317
  out.push(` sources: ${citesOf(f.citations)}`);
314
318
  for (const n of f.notes.slice(short ? -1 : -3))
@@ -36,6 +36,8 @@ const RARE = {
36
36
  "hypothesis decide": ["proposed", "keep-open"],
37
37
  "source add": ["translation", "media"],
38
38
  "source edit": ["translation", "media"],
39
+ // a citation the user removed from a fact (spec 095 K3.2): its refusal says --reason where it applies
40
+ cite: ["reason"],
39
41
  "recordset add": ["images", "again"],
40
42
  grep: ["regex", "files"],
41
43
  // what a waiting task waits for is said when it is set waiting (task wait); edit fills it for an older one
package/dist/cli/help.js CHANGED
@@ -4,7 +4,7 @@ import { GROUPS, GROUP_ALIASES, GLOBAL_OPTIONS, WRITE_OPTIONS, aliasGroup, comma
4
4
  import { table } from "./format.js";
5
5
  import { RENAMED, suggest } from "./execute.js";
6
6
  import { UI, ui } from "./ui.js";
7
- import { docLangOf } from "../core/doc.js";
7
+ import { docLangOf, docUrl } from "../core/doc.js";
8
8
  import { REPORT_TABLE_ARCHIVE } from "../core/report.js";
9
9
  function optionRows(opts) {
10
10
  return opts.map((o) => [`--${o.name}${o.value ? ` ${o.value}` : ""}${o.multiple ? " (repeatable)" : ""}`, `${o.description}${o.max ? ` (≤${o.max} characters)` : ""}`]);
@@ -236,7 +236,7 @@ export const HUMAN_COMMANDS = [
236
236
  "menu", "status", "setup", "doctor", "error", "update", "uninstall", "shortcut",
237
237
  "init", "trees", "trees use", "trees remove", "trees forget", "lang", "mode",
238
238
  "chat", "run", "session finish", "research new", "research pause", "research resume", "research done", "research edit", "research order", "research move", "review", "verify bulk", "verify stop",
239
- "intake", "sync", "sync undo", "sync discard", "conflict list", "conflict resolve", "conflict leave", "event revert", "person revert", "hypothesis decide", "task list", "task wake", "task order", "story approve", "story discard",
239
+ "intake", "sync", "sync undo", "sync discard", "conflict list", "conflict resolve", "conflict leave", "event main", "event revert", "person revert", "hypothesis decide", "task list", "task wake", "task order", "story approve", "story discard",
240
240
  "offline list", "offline show", "offline set", "offline answer",
241
241
  "stats", "recent", "plan", "history", "history back", "person card", "person list", "pedigree", "find", "query", "doc",
242
242
  "app", "app install", "live", "live start", "live stop", "phone", "phone on", "phone qr", "phone off", "export gedcom", "pack", "unpack", "seal adopt", "seal accept", "repair undo", "backup", "tidy", "check",
@@ -260,7 +260,7 @@ function humanOverview(as) {
260
260
  });
261
261
  const more = ui(as.lang, as.archive ? "ui.help.more.archive" : "ui.help.more");
262
262
  // the last line: "How Strom works", the documentation carried with strom and its pages on the web (spec 051 K2.1)
263
- const doc = ui(as.lang, "ui.help.doc", { lang: docLangOf(as.lang).lang });
263
+ const doc = ui(as.lang, "ui.help.doc", { site: docUrl(docLangOf(as.lang).lang).replace(/^https:\/\//u, "") });
264
264
  return [ui(as.lang, "ui.help.title"), "", table(rows), "", more, ui(as.lang, "ui.help.source", { url: SOURCE_URL }), doc].join("\n");
265
265
  }
266
266
  function humanCommand(def, as) {
package/dist/cli/ui.js CHANGED
@@ -609,6 +609,12 @@ export const UI = {
609
609
  "ui.run.stop.limit": "subscription limit{resets}",
610
610
  "ui.run.stop.resets": " (resets {at})",
611
611
  "ui.run.stop.auth": "the agent is not logged in — run {command} once and log in",
612
+ "ui.read.auth": "Claude Code in the terminal is not logged in (the readers start it themselves, not the Claude app) — run {command} once in a terminal and log in (/login)",
613
+ "ui.read.done": "■ reader {k}: {outcome}{cost} · {n} with finds",
614
+ "ui.read.timeout": "stopped at its time limit ({minutes} min)",
615
+ "ui.read.failed": "readers that failed: {list}",
616
+ "ui.read.failed.timeout": "stopped at its time limit, {minutes} min",
617
+ "ui.read.stalled": "its agent's service went silent after a retry, also when resumed — stopped",
612
618
  "ui.run.stop.failed": "the agent failed: {detail}",
613
619
  "ui.run.stop.model": "{agent} does not take the model {model} — another one: strom config set model.lead <model> (or for one run: strom run --model <model>)",
614
620
  "ui.run.stop.model.codex": "the model {model} is not available in the Codex CLI installed here — update Codex (npm install -g @openai/codex@latest), or another model: strom config set model.lead <model> (or for one run: strom run --model <model>)",
@@ -731,7 +737,11 @@ export const UI = {
731
737
  "ui.doc.where": "where the conversation is",
732
738
  "ui.doc.where.app": "the {app} app",
733
739
  "ui.doc.cli": "the agent in the terminal",
740
+ "ui.doc.login": "Claude Code login",
734
741
  "ui.doc.cli.missing": "working alone, reading scans and work from the Strom app need {cli} in the terminal",
742
+ "ui.doc.login.ok": "Claude Code in the terminal logged in",
743
+ "ui.doc.login.no": "Claude Code in the terminal is not logged in — working alone, reading scans and work from the Strom app stop at once (the Claude app has its own login)",
744
+ "ui.doc.login.fix": "{command} in a terminal, then /login",
735
745
  "ui.doc.where.terminal": "the terminal ({agent})",
736
746
  "ui.run.needscli": "Working on its own needs {agent} in the terminal (the app alone cannot).",
737
747
  "ui.fix.git.download": "Download git for strom (about {mb} MB — the official Git for Windows, used by strom only, no installation)?",
@@ -1011,6 +1021,8 @@ export const UI = {
1011
1021
  "ui.show.ages": "ages {ages}",
1012
1022
  "ui.show.with": "with {who}",
1013
1023
  "ui.show.retracted": "(retracted: {reason})",
1024
+ "ui.show.main": "(main, the user's)",
1025
+ "ui.show.uncited": "(removed by the user: {sources})",
1014
1026
  "ui.show.removed": "retracted ({day}, {reason})",
1015
1027
  "ui.show.removed.app": "removed in the Strom app ({day}) — to put back: {undo}",
1016
1028
  "ui.show.removed.mark": "(retracted)",
@@ -1049,6 +1061,9 @@ export const UI = {
1049
1061
  "ui.query.story.draft": "draft",
1050
1062
  "ui.query.story.all": "the story's sources: {list}",
1051
1063
  "ui.event.edited": "edited: {line}",
1064
+ "ui.event.main": "the main record of the fact chosen: {line}",
1065
+ "ui.event.main.off": "the fact without a main record (the research's order): {line}",
1066
+ "ui.event.main.same": "nothing to change: {line}",
1052
1067
  "ui.show.sex.M": "man",
1053
1068
  "ui.show.sex.F": "woman",
1054
1069
  "ui.show.sex.U": "sex not known",
@@ -1167,6 +1182,7 @@ export const UI = {
1167
1182
  "ui.help.cmd.offline.set": "How one branch off the lines is taken: its own way, added to a line, or as the whole tree says",
1168
1183
  "ui.help.cmd.offline.answer": "Answer what is proposed for a branch that grew: add it to a line, leave it, or not research it",
1169
1184
  "ui.help.cmd.conflict.leave": "Leave a conflict of an edit made in the Strom app to the agent to decide",
1185
+ "ui.help.cmd.event.main": "Choose the record shown first with a fact (its main citation), or cancel the choice",
1170
1186
  "ui.help.cmd.event.revert": "Put a fact back as the imported family tree gave it",
1171
1187
  "ui.help.cmd.person.revert": "Put a name or sex back as the imported family tree gave it",
1172
1188
  "ui.help.cmd.fixes": "Fixes: what earlier versions of strom left behind in this research, and what setting it right takes (free)",
@@ -1211,7 +1227,7 @@ export const UI = {
1211
1227
  "ui.help.more": "Help for one command: strom help <command> --human · every command in English (what an agent reads): strom help",
1212
1228
  "ui.help.more.archive": "Help for one command: strom help <command> --human",
1213
1229
  "ui.help.source": "Source code (GNU AGPL 3.0 or later): {url}",
1214
- "ui.help.doc": "How Strom works: strom doc · stromapp.info/doc/{lang}/",
1230
+ "ui.help.doc": "How Strom works: strom doc · {site}",
1215
1231
  "ui.docs.how": "A rule: strom doc R2.3 · a search: strom doc <words>",
1216
1232
  "ui.docs.fallback": "How Strom works is not written in {language}: shown in English.",
1217
1233
  "ui.docs.chapter": "In this chapter:",
@@ -1499,6 +1515,8 @@ export const UI = {
1499
1515
  "ui.error.agent.cli-missing": "{agent} is not installed in the terminal here — {command} starts it (the app alone cannot)",
1500
1516
  "ui.error.agent.cli-missing.hint": "installing {agent}: {install}",
1501
1517
  "ui.error.agent.cli-missing.app.hint": "the conversation in the {app} app goes on: strom chat · installing {agent}: {install}",
1518
+ "ui.error.agent.logged-out": "Claude Code in the terminal is not logged in — {command} starts it itself (not the Claude app, which has its own login)",
1519
+ "ui.error.agent.logged-out.hint": "logging in once in a terminal: {login}, then /login",
1502
1520
  "ui.status.disk": "On disk: the research {research} · strom's own beside it {strom}",
1503
1521
  "ui.status.disk.frees": " (strom tidy frees {size})",
1504
1522
  "ui.status.refused": "{host} refused strom's automated access — images by hand; to lift it: strom allow host {host} --unblock",
@@ -1677,10 +1695,17 @@ export const UI = {
1677
1695
  "ui.sync.fact.share.gone": "{n}. {who}: {fact} — no longer shared with others in the Strom app",
1678
1696
  "ui.sync.fact.share.role": "{n}. {who}: {fact} — a role at another's event in the Strom app",
1679
1697
  "ui.sync.fact.share.role.gone": "{n}. {who}: {fact} — the role at another's event taken off in the Strom app",
1698
+ "ui.sync.fact.main": "{n}. {who}: {fact} — its main record in the Strom app: {sources}",
1699
+ "ui.sync.fact.main.off": "{n}. {who}: {fact} — no main record of it in the Strom app any more",
1700
+ "ui.sync.fact.main.nomatch": "{n}. {who}: {fact} — a main record chosen in the Strom app at a fact the research has otherwise",
1701
+ "ui.sync.fact.uncite": "{n}. {who}: {fact} — no longer cites {sources} in the Strom app",
1702
+ "ui.sync.cite.notCarried": "{n}. {who}: {sources} — not in the Strom app's file",
1680
1703
  "ui.sync.fact.part": "{n}. {who}: {kind} {when} — {role}: {part}",
1681
1704
  "ui.sync.fact.part.link": "{n}. {who}: {kind} {when} — {role} {part}: a person of the tree",
1682
1705
  "ui.sync.fact.part.role": "{n}. {who}: {kind} {when} — {part}: {wasRole} → {role}",
1683
1706
  "ui.sync.fact.part.gone": "{n}. {who}: {kind} {when} — no longer named: {wasRole} {part}",
1707
+ "ui.sync.fact.note": "{n}. {who}: {kind} {when} — the note “{old}” → “{new}”",
1708
+ "ui.sync.fact.part.note": "{n}. {who}: {kind} {when} — {role} {part}, the note “{old}” → “{new}”",
1684
1709
  "ui.sync.person.cite": "{n}. {who}: the file's source for them — {sources}",
1685
1710
  "ui.sync.family.cite": "{n}. {who}: the file's source for the family — {sources}",
1686
1711
  "ui.sync.surname.group": "{n}. Surname forms of one family: {forms}",
@@ -1755,6 +1780,10 @@ export const UI = {
1755
1780
  "ui.sync.do.guarded": "not written — the user's or an imported family tree's value (only the user changes it)",
1756
1781
  "ui.sync.do.note.changed": "that line of the research's note corrected",
1757
1782
  "ui.sync.do.detail": "added to the fact, citing the tree sent",
1783
+ "ui.sync.do.fact.note": "the note corrected (the research's kept in its history)",
1784
+ "ui.sync.do.fact.note.add": "the note added to the fact",
1785
+ "ui.sync.do.fact.part.note": "the note corrected",
1786
+ "ui.sync.do.fact.part.note.add": "the note added",
1758
1787
  "ui.sync.do.refine": "added to the fact, citing the tree sent (nothing in it disagrees with the record)",
1759
1788
  "ui.sync.do.conflict": "a conflict to decide (the research has it from a record)",
1760
1789
  "ui.sync.do.parents": "a conflict to decide (the research gives other parents)",
@@ -1769,6 +1798,16 @@ export const UI = {
1769
1798
  "ui.sync.do.share": "the mark added to the fact, the fact as it is",
1770
1799
  "ui.sync.do.share.user": "the edit wins (the research's in its history)",
1771
1800
  "ui.sync.do.share.kept": "not written: who shares an event only the user decides",
1801
+ "ui.sync.do.main": "the record shown first with the fact, as chosen",
1802
+ "ui.sync.do.main.off": "no record shown first with the fact any more: the order of the research",
1803
+ "ui.sync.do.main.kept": "not written: the main record only the user chooses",
1804
+ "ui.sync.do.uncite": "no longer cited at the fact (kept in its history; not cited there again without a reason)",
1805
+ "ui.sync.do.uncite.kept": "not written: what a fact no longer cites only the user decides",
1806
+ "ui.sync.do.cite.olderApp": "nothing changes: this Strom app does not say a citation was removed — the research keeps it",
1807
+ "ui.sync.do.cite.sourceRemoved": "nothing changes: the research keeps the source and what cites it",
1808
+ "ui.sync.do.cite.notCarried": "nothing changes: the research keeps the citation",
1809
+ "ui.sync.do.fact.noMatch": "not written: the fact it was chosen at is not the research's as it is",
1810
+ "ui.sync.do.event.retracted": "not written: the research has taken this fact back since (nothing of it comes back to the app)",
1772
1811
  "ui.sync.edits": "Edits to facts a record proves: {mode} (strom config set sync.edits conflict|user)",
1773
1812
  "ui.sync.mode.conflict": "a conflict to decide",
1774
1813
  "ui.sync.mode.user": "the edit wins",
@@ -2206,6 +2245,9 @@ export const UI = {
2206
2245
  "ui.run.cap.finish": "⏳ {session}: the agent's limit at {used} % ({kind}) — the session is asked to write down what it found and close; past the cap no next session starts",
2207
2246
  "ui.run.limit.five_hour": "five-hour window",
2208
2247
  "ui.run.limit.seven_day": "week",
2248
+ "ui.run.limit.wait": "⏸ the agent's plan limit is used up{kind}: waiting until it resets ({at}), then the condition is asked again and the work goes on (Ctrl-C ends the run)",
2249
+ "ui.run.limit.unknown": "⏸ the agent's plan limit is used up{kind}, when it resets not said: waiting until {at}, then the condition is asked again (Ctrl-C ends the run)",
2250
+ "ui.run.limit.why": "the agent's plan limit is used up{kind} — the work goes on after it resets",
2209
2251
  "ui.run.loop": "Let it work on while there is work and the condition “{name}” allows it",
2210
2252
  "ui.consent.gate.set": "Let the condition “{name}” decide when the agent working alone goes on?",
2211
2253
  "ui.consent.gate.unset": "Remove the condition “{name}” — the agent working alone no longer asks it?",
@@ -2750,6 +2792,13 @@ export const UI = {
2750
2792
  "ui.home.program": "{to} is inside strom's program folder — an update replaces what is there; a folder outside it is needed.",
2751
2793
  "ui.home.busy": "Somebody is at work in {trees} right now (an agent, a run, or the Strom app following it live) — the research can move once that has finished.",
2752
2794
  "ui.home.failed": "It could not be moved ({reason}) — nothing changed.",
2795
+ "ui.home.existing": "{to} is the home of a research already (family trees: {trees}). It can be used as it is — nothing moves, and {from} stays as it is.",
2796
+ "ui.home.existing.left": "The family trees of {from} then leave the list (they stay there untouched): {trees}.",
2797
+ "ui.home.existing.sure": "Use the research in {to}?",
2798
+ "ui.home.existing.busy": "Somebody is at work in {trees} right now (an agent, a run, or the Strom app following it live) — the other folder can be used once that has finished.",
2799
+ "ui.home.existing.ask": "Use the research in {to} as it is, nothing moved? {from} stays as it is, its family trees out of the list.",
2800
+ "ui.home.used": "✓ The research in {to} is used now. {from} stays as it was — nothing in it moved or deleted.",
2801
+ "ui.home.left": "Out of the list, left untouched in {from}: {trees} — back by choosing that folder again (strom setup).",
2753
2802
  "ui.app.notinstalled": "The Strom app is not installed on this computer yet. Install it now as an app from the browser (free; strom shows where to click)?",
2754
2803
  "ui.browser.agent": "{names}: through the browser — that only Claude Code can (the Claude in Chrome extension); this research is done by {agent}. Save those images by hand, or let Claude Code do the research (strom agents use claude).",
2755
2804
  "ui.browser.noext": "{names}: through the browser — Chrome needs the Claude in Chrome extension, signed in to the account Claude Code uses; it is not in a browser here: {url}",
@@ -23,9 +23,9 @@ import { createShortcut } from "../core/shortcut.js";
23
23
  import { appMarkFromInstall, linkFiles, linkHandlerState, linkOwner, linksTakeable, registerLinks } from "../core/links.js";
24
24
  import { configDir, desktopDir, isolated, noLinks } from "../core/paths.js";
25
25
  import { chooseHistory, ensureShared, historySuggested, markHistoryAsked, setTreeSetting } from "../commands/setup.js";
26
- import { moveHome, planMove, repointSettings, sameFolder } from "../core/relocate.js";
26
+ import { moveHome, planMove, planUseExisting, repointSettings, researchHome, sameFolder, useExistingHome } from "../core/relocate.js";
27
27
  import { adoptSeal, foundTrees, offerAdopt } from "./seal.js";
28
- import { Tree } from "../core/tree.js";
28
+ import { knownTreesIn, Tree } from "../core/tree.js";
29
29
  import { isAgent } from "../core/which.js";
30
30
  /** The shortcut's name, in the user's language. */
31
31
  export function shortcutName(lang) {
@@ -80,10 +80,19 @@ export async function setupWizard(ctx, opts = {}) {
80
80
  }
81
81
  }
82
82
  // Another folder while the research is in the old one: it moves along (trees, the shared folder) — or stays where it is.
83
+ // A folder that holds a research already: taken as it is, nothing moved.
84
+ let used;
83
85
  if (was && !sameFolder(home, was))
84
- home = await moveResearch(ctx, lang, was, home);
86
+ ({ home, used } = await moveResearch(ctx, lang, was, home));
85
87
  cfg.lang = lang;
86
- if (was && !sameFolder(home, was))
88
+ if (used) {
89
+ useExistingHome(s, was, home);
90
+ const where = { from: ctx.display(was), to: ctx.display(home) };
91
+ ctx.io.stdout(ui(lang, "ui.home.used", where) + "\n");
92
+ if (used.left.length)
93
+ ctx.io.stdout(ui(lang, "ui.home.left", { ...where, trees: used.left.map((t) => t.name).join(", ") }) + "\n");
94
+ }
95
+ else if (was && !sameFolder(home, was))
87
96
  repointSettings(s, ctx.env, was, home);
88
97
  else if (!was)
89
98
  cfg.home = home;
@@ -527,6 +536,7 @@ export async function askStromApp(ctx, lang, back = ui(lang, "ui.browse.back"))
527
536
  /**
528
537
  * The research to another folder: what moves is said (the trees, the shared folder with the plugins and images), and it
529
538
  * moves on the person's yes. Where it cannot (somebody at work, a folder with something in it, into itself) it stays.
539
+ * A folder that is the home of a research already is offered to be taken as it is, nothing moved (`used`).
530
540
  * Returns the folder the research is in afterwards.
531
541
  */
532
542
  async function moveResearch(ctx, lang, from, to) {
@@ -534,31 +544,56 @@ async function moveResearch(ctx, lang, from, to) {
534
544
  // Set from outside (STROM_HOME): the folder is not the wizard's to change.
535
545
  if (ctx.settings.home()?.source !== "config") {
536
546
  out(ui(lang, "ui.home.env", { from: ctx.display(from) }));
537
- return from;
547
+ return { home: from };
538
548
  }
539
549
  const plan = planMove(from, to, ctx.knownTrees().map((k) => k.root), { settings: configDir(ctx.env) });
540
550
  if (!plan.content && !plan.problem)
541
- return to;
551
+ return { home: to };
542
552
  const where = { from: ctx.display(from), to: ctx.display(plan.to) };
553
+ if (plan.problem === "notEmpty" && researchHome(to))
554
+ return useExisting(ctx, lang, from, to);
543
555
  if (plan.problem) {
544
556
  out(ui(lang, `ui.home.${plan.problem}`, { ...where, trees: plan.busy.join(", ") }));
545
557
  out(ui(lang, "ui.home.stays", where));
546
- return from;
558
+ return { home: from };
547
559
  }
548
560
  out(ui(lang, "ui.home.what", { ...where, trees: plan.trees.length ? plan.trees.join(", ") : "–" }));
549
561
  if (!(await ctx.confirm(ui(lang, "ui.home.sure"), true))) {
550
562
  out(ui(lang, "ui.home.stays", where));
551
- return from;
563
+ return { home: from };
552
564
  }
553
565
  try {
554
566
  const how = moveHome(plan);
555
567
  out(ui(lang, how === "moved" ? "ui.home.moved" : "ui.home.copied", where));
556
- return plan.to;
568
+ return { home: plan.to };
557
569
  }
558
570
  catch (err) {
559
571
  out(ui(lang, "ui.home.failed", { ...where, reason: err.message }));
560
- return from;
572
+ return { home: from };
573
+ }
574
+ }
575
+ /**
576
+ * The folder chosen holds a research already: what it holds is said, and what the old folder keeps out of the list,
577
+ * and it is taken as it is on the person's yes.
578
+ */
579
+ async function useExisting(ctx, lang, from, to) {
580
+ const out = (line) => ctx.io.stdout(line + "\n");
581
+ const plan = planUseExisting(from, to, knownTreesIn(ctx.treesDir(), ctx.settings.config.extraTrees ?? []), { settings: configDir(ctx.env) });
582
+ const where = { from: ctx.display(from), to: ctx.display(to) };
583
+ if (plan.problem) {
584
+ const key = plan.problem === "busy" ? "ui.home.existing.busy" : `ui.home.${plan.problem}`;
585
+ out(ui(lang, key, { ...where, trees: plan.busy.join(", ") }));
586
+ out(ui(lang, "ui.home.stays", where));
587
+ return { home: from };
588
+ }
589
+ out(ui(lang, "ui.home.existing", { ...where, trees: plan.trees.length ? plan.trees.join(", ") : "–" }));
590
+ if (plan.left.length)
591
+ out(ui(lang, "ui.home.existing.left", { ...where, trees: plan.left.map((t) => t.name).join(", ") }));
592
+ if (!(await ctx.confirm(ui(lang, "ui.home.existing.sure", where), true))) {
593
+ out(ui(lang, "ui.home.stays", where));
594
+ return { home: from };
561
595
  }
596
+ return { home: to, used: plan };
562
597
  }
563
598
  /**
564
599
  * The ChatGPT app chosen in the setup: its browser strom does not watch (ChatGPT's cloud, no hook of the tree), and what
@@ -18,7 +18,8 @@ import { mergeOverlappingClips } from "../core/clipmerge.js";
18
18
  import { batches, READER_MINUTES_HELP } from "../core/reader.js";
19
19
  import { checkPrompt, locatePrompt, parseChecked, parseLocated, widen } from "../core/clipfinder.js";
20
20
  import { displayName } from "../core/people.js";
21
- import { readers, refuseReadersInArchive } from "./readers.js";
21
+ import { readers, readersLang, refuseReadersInArchive } from "./readers.js";
22
+ import { ui } from "../cli/ui.js";
22
23
  import { verifyFast } from "../core/integrity.js";
23
24
  import { pool } from "./read.js";
24
25
  import { addReaders } from "../core/session.js";
@@ -183,7 +184,7 @@ register({
183
184
  // a search over many entries, not one entry: no clip, and said so
184
185
  const many = [...new Set(locs.filter((l) => l.result === "many").map((l) => l.source))];
185
186
  const missed = todo.filter((s) => !clipsOf.has(s.id));
186
- const text = lines(`${clipsOf.size} of ${counted(todo.length, "source")} got their clip${model ? ` · ${model}` : ""}${r0.cost() ? ` · $${r0.cost().toFixed(2)}` : ""}`, many.length ? `not one entry but a search over many (no clip — a page of it would show nothing): ${many.join(", ")}` : undefined, rejected.length ? `the check turned down: ${rejected.map((v) => `${v.source} (${v.verdict}${v.why ? `: ${truncate(v.why, 40)}` : ""})`).join(", ")}` : undefined, missed.length ? `without a clip: ${missed.map((s) => s.id).slice(0, 20).join(", ")}${missed.length > 20 ? ` … (${missed.length})` : ""} — strom source edit S… --clip M…@x,y,w,h, or strom clips again` : undefined, away.length ? `on images not on this computer (or not JPEG/PNG): ${away.length}` : undefined, failed.length ? `readers that failed: ${failed.join(", ")}` : undefined, "the entries cut out for the Strom app: strom app (output/tree-strom.ged)");
187
+ const text = lines(`${clipsOf.size} of ${counted(todo.length, "source")} got their clip${model ? ` · ${model}` : ""}${r0.cost() ? ` · $${r0.cost().toFixed(2)}` : ""}`, many.length ? `not one entry but a search over many (no clip — a page of it would show nothing): ${many.join(", ")}` : undefined, rejected.length ? `the check turned down: ${rejected.map((v) => `${v.source} (${v.verdict}${v.why ? `: ${truncate(v.why, 40)}` : ""})`).join(", ")}` : undefined, missed.length ? `without a clip: ${missed.map((s) => s.id).slice(0, 20).join(", ")}${missed.length > 20 ? ` … (${missed.length})` : ""} — strom source edit S… --clip M…@x,y,w,h, or strom clips again` : undefined, away.length ? `on images not on this computer (or not JPEG/PNG): ${away.length}` : undefined, failed.length ? ui(readersLang(ctx, tree), "ui.read.failed", { list: failed.join(", ") }) : undefined, "the entries cut out for the Strom app: strom app (output/tree-strom.ged)");
187
188
  return {
188
189
  text,
189
190
  data: {
@@ -13,7 +13,7 @@ import { UsageError } from "../core/errors.js";
13
13
  import { excerptSettings, planExcerpts } from "../core/excerpt.js";
14
14
  import { runGit, tracked } from "../core/git.js";
15
15
  import { Settings } from "../core/config.js";
16
- import { appKnowsArchive, appKnowsNoCouple, appShowsHypothesisDecider, appShowsHypothesisLinks, appShowsReadings, appShowsOmittedImages, appDecidesConflicts, appOpensLinks, appReadsTitles, appShowsCoupleEvents, appShowsEdges, appShowsSourceReads, appShowsFactStatus, appShowsStoryDrafts, appTurnsExcerpts, appReadsSurnameGroups, appReadsLines, appReadsPlaceRecords, appShowsOrigin, appShowsVerify, appConfirmsTranscripts, appReadsSourcesAgain, appShowsResearchTable, appDecidesHypotheses, appReadsSourceFields } from "../core/stromapp.js";
16
+ import { appKnowsArchive, appKnowsNoCouple, appShowsHypothesisDecider, appShowsHypothesisLinks, appShowsReadings, appShowsOmittedImages, appDecidesConflicts, appOpensLinks, appReadsTitles, appShowsCoupleEvents, appShowsEdges, appShowsSourceReads, appShowsFactStatus, appShowsStoryDrafts, appTurnsExcerpts, appReadsSurnameGroups, appReadsLines, appReadsPlaceRecords, appShowsOrigin, appShowsVerify, appConfirmsTranscripts, appReadsSourcesAgain, appShowsResearchTable, appDecidesHypotheses, appReadsSourceFields, appReadsMainCitation } from "../core/stromapp.js";
17
17
  import { tableMarks } from "../core/tablemarks.js";
18
18
  import { surnamesForExport } from "../core/surnames.js";
19
19
  import { actsAsArchive } from "../core/state.js";
@@ -121,10 +121,12 @@ export function writeTreeGed(tree, opts) {
121
121
  const table = opts.for === "strom" && appShowsResearchTable(new Settings(tree.env, {}), opts.stromVersion) ? tableMarks(tree) : undefined;
122
122
  // …and each source's location field by field (folio, image, the rest), for an app that reads them
123
123
  const sourceFields = opts.for === "strom" && appReadsSourceFields(new Settings(tree.env, {}), opts.stromVersion);
124
+ // …and the user's main citation of a fact with the events each source records, for an app that reads them (spec 095)
125
+ const mainCitations = opts.for === "strom" && appReadsMainCitation(new Settings(tree.env, {}), opts.stromVersion);
124
126
  // …and which sources can be read again from their original here, for an app that offers it (never in an archive)
125
127
  const shared = new Settings(tree.env, {}).shared()?.value;
126
128
  const original = opts.for === "strom" && appReadsSourcesAgain(new Settings(tree.env, {}), opts.stromVersion) && !actsAsArchive(tree) ? (s) => readsAgain(tree, shared, s) : undefined;
127
- const result = exportGedcom(tree, { for: opts.for, ...(surnameGroups ? { surnameGroups } : {}), ...(lines ? { lines } : {}), ...(placeRecords ? { placeRecords } : {}), ...(origins ? { origins } : {}), ...(verify ? { verify } : {}), ...(table ? { table } : {}), ...(sourceFields ? { sourceFields } : {}), stromVersion: opts.stromVersion, ...(persons ? { persons } : {}), ...(images ? { excerpts: images.of } : {}), ...(clips ? { clips } : {}), ...(research ? { research } : {}), ...(edges ? { edges } : {}), ...(storyDrafts ? { storyDrafts } : {}), ...(coupleResi ? { coupleResi } : {}), ...(sourceReads ? { sourceReads } : {}), ...(confirms ? { confirms } : {}), ...(factStatus ? { factStatus } : {}), ...(archive ? { archive } : {}), ...(turnsExcerpts ? { turnsExcerpts } : {}), ...(noCouple ? { noCouple } : {}), ...(titles ? { titles } : {}), ...(hypothesisLinks ? { hypothesisLinks } : {}), ...(hypothesisDecider ? { hypothesisDecider } : {}), ...(hypothesisPick ? { hypothesisPick } : {}), ...(conflictSides ? { conflictSides } : {}), ...(readings ? { readings } : {}), ...(original ? { original } : {}), ...(omitted ? { omitted: images.omitted } : {}) });
129
+ const result = exportGedcom(tree, { for: opts.for, ...(surnameGroups ? { surnameGroups } : {}), ...(lines ? { lines } : {}), ...(placeRecords ? { placeRecords } : {}), ...(origins ? { origins } : {}), ...(verify ? { verify } : {}), ...(table ? { table } : {}), ...(sourceFields ? { sourceFields } : {}), ...(mainCitations ? { mainCitations } : {}), stromVersion: opts.stromVersion, ...(persons ? { persons } : {}), ...(images ? { excerpts: images.of } : {}), ...(clips ? { clips } : {}), ...(research ? { research } : {}), ...(edges ? { edges } : {}), ...(storyDrafts ? { storyDrafts } : {}), ...(coupleResi ? { coupleResi } : {}), ...(sourceReads ? { sourceReads } : {}), ...(confirms ? { confirms } : {}), ...(factStatus ? { factStatus } : {}), ...(archive ? { archive } : {}), ...(turnsExcerpts ? { turnsExcerpts } : {}), ...(noCouple ? { noCouple } : {}), ...(titles ? { titles } : {}), ...(hypothesisLinks ? { hypothesisLinks } : {}), ...(hypothesisDecider ? { hypothesisDecider } : {}), ...(hypothesisPick ? { hypothesisPick } : {}), ...(conflictSides ? { conflictSides } : {}), ...(readings ? { readings } : {}), ...(original ? { original } : {}), ...(omitted ? { omitted: images.omitted } : {}) });
128
130
  const findings = validateGedcom(result.text, opts.for === "standard" ? { strict: true } : {});
129
131
  const file = opts.out ?? gedFile(tree, opts.for, opts.research);
130
132
  if (!hasGedErrors(findings) && !tree.dryRun) {