strom-research 1.29.0-beta.3 → 1.29.0-beta.4

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,15 +7,17 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
7
7
 
8
8
  ## 1.29.0
9
9
 
10
- *Připravuje se: bety do 1.29.0-beta.3. Oddíl bude úplný s vydáním.*
10
+ *Připravuje se: bety do 1.29.0-beta.4. Oddíl bude úplný s vydáním.*
11
11
 
12
12
  - **Kdo rozhoduje hypotézy: uživatel, nebo AI.** Nová volba výzkumu (`strom config set hypotheses.decide`, otázka
13
13
  v úvodním nastavení spolu s ostatními volbami, Nastavení v menu stromu, nastavení výzkumu v aplikaci Strom):
14
- *rozhoduje člověk* (výchozí, jako v 1.28) nebo *rozhoduje AI*. Když rozhoduje AI, agent hypotézu rozhodne sám, jakmile
14
+ *rozhoduje AI* nebo *rozhoduje člověk*. Když rozhoduje AI, agent hypotézu rozhodne sám, jakmile
15
15
  citovaný záznam podpoří jednu verzi, vždy s verzí a důvodem; rozhodnutí uživatele nikdy nemění a větev deseti a více
16
16
  lidí mimo strom připojí jen na dva prameny bez námitky – jinak navrhne. Každé jeho rozhodnutí je označené jako
17
17
  rozhodnutí agenta, objeví se v přehledu změn a dá se kdykoli změnit; přepnutí volby nemění nic už rozhodnutého.
18
- Rozhodování AI zapíná jen člověk.
18
+ Kde nic zvoleno není, rozhoduje AI – i v dříve založeném výzkumu; zpět na rozhodování člověka:
19
+ `strom config set hypotheses.decide person`. Úvodní nastavení stromu doporučí rozhodování AI a nabídne ho jako první,
20
+ zvolené *rozhoduje člověk* se uloží; kde rozhoduje člověk, zapne rozhodování AI znovu jen člověk, po druhém ano.
19
21
 
20
22
  - **Každou hypotézu jde rozhodnout z menu.** Co čeká nabízí i otevřené hypotézy bez návrhu agenta – rozhodnout s verzí
21
23
  a důvodem, nebo nechat otevřenou –, a rozhodnutou či odloženou hypotézu jde rozhodnout znovu s důvodem, staré
@@ -36,7 +38,10 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
36
38
  příkazovou řádku. Z aplikace se nic nevypíná. Terminál aplikace pozná strom pod jakýmkoli jménem – jiného kanálu,
37
39
  druhé instalace, balíček spuštěný přes spouštěč balíčků, cestu k němu. Prohlížeč Codexu (v aplikaci ChatGPT) drží stejná
38
40
  pravidla podle adres v jeho kódu, jakmile jsou hooky stromu v Codexu potvrzené – `strom doctor` a `strom chat` řeknou,
39
- když čekají; kód bez adresy se nikdy neodmítne, jen zapíše. Computer use zůstává nehlídané. Co strom u kterého agenta
41
+ když čekají; kód bez adresy se nikdy neodmítne, jen zapíše. S potvrzenými hooky pustí archiv, který pouští jen
42
+ prohlížeč člověka, se svolením „přes prohlížeč“ i prohlížeč Codexu, stejně jako prohlížeč agenta v Chrome (`strom net web
43
+ --check --browser`, `strom doctor`, podklady agenta, aplikace Strom); bez potvrzení beze změny. Computer use zůstává
44
+ nehlídané. Co strom u kterého agenta
40
45
  a aplikace hlídá: `strom doc R12`; agent s computer use dostane pokyn ovládat aplikaci Strom přes nástroje stránky
41
46
  v prohlížeči a výzkum přes strom.
42
47
 
@@ -59,7 +64,10 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
59
64
  volby čte podle nastavení výzkumu, nikdy levnějším modelem. Výsledek říká, kdo četl – v terminálu, v souboru čtení i v
60
65
  aplikaci Strom. Zdroj se přečte znovu z originálu na tomto počítači (`strom document read --source S… [--clip …]` nebo
61
66
  z aplikace Strom), čtenáři přepis nevidí; nové čtení zůstane vedle zdroje, a kde se liší, postaví úkol obě znění vedle
62
- sebe – přepis, kdo ho četl, i potvrzení uživatele zůstanou, jak byly.
67
+ sebe – přepis, kdo ho četl, i potvrzení uživatele zůstanou, jak byly. Výřezy jednoho snímku, které se překrývají nebo
68
+ dotýkají, se čtou jako jeden pohled a slova přepisu mimo přečtený výřez (záhlaví strany nad ním) se za rozdíl
69
+ nepočítají. `strom fixes` bere čtení dvou čtenářů jako čtení prvního z nich: slepý čtenář s jiným modelem není nikdy
70
+ dřívější model, se kterým číst znovu, a čtení, jehož některý čtenář četl dnešním modelem, se počítá jako přečtené jím.
63
71
 
64
72
  - **Dále:** nápověda uvádí hodnoty každého nastavení s volbami a vysvětluje obě volby toho, kdo rozhoduje hypotézy;
65
73
  `strom help --human` uvádí všechny příkazy, které spouští jen člověk. Povolení archivu dané ve výzkumu mimo složku
package/CHANGELOG.de.md CHANGED
@@ -7,17 +7,20 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
7
7
 
8
8
  ## 1.29.0
9
9
 
10
- *In Vorbereitung: die Betas bis 1.29.0-beta.3. Der Abschnitt ist mit dem Release vollständig.*
10
+ *In Vorbereitung: die Betas bis 1.29.0-beta.4. Der Abschnitt ist mit dem Release vollständig.*
11
11
 
12
12
  - **Wer Hypothesen entscheidet: der Mensch oder die KI.** Eine neue Einstellung der Forschung
13
13
  (`strom config set hypotheses.decide`, die Frage der Ersteinrichtung neben den anderen Wahlen, Einstellungen im Menü
14
- von strom, die Forschungseinstellungen der Strom-App): *der Mensch entscheidet* (Standard, wie in 1.28) oder
15
- *die KI entscheidet*. Entscheidet die KI, entscheidet der Agent eine Hypothese selbst, sobald ein zitierter Eintrag eine
14
+ von strom, die Forschungseinstellungen der Strom-App): *die KI entscheidet* oder *der Mensch entscheidet*.
15
+ Entscheidet die KI, entscheidet der Agent eine Hypothese selbst, sobald ein zitierter Eintrag eine
16
16
  Variante stützt, stets mit Variante und Begründung; die Entscheidung des Menschen ändert er nie, und einen Zweig von
17
17
  zehn oder mehr Personen außerhalb des Stammbaums verbindet er nur auf zwei Quellen ohne Einwand – sonst schlägt er
18
18
  vor. Jede seiner Entscheidungen ist als die des Agenten markiert, steht in der Übersicht der Änderungen und lässt
19
- sich jederzeit ändern; ein Wechsel der Einstellung ändert nichts bereits Entschiedenes. Nur ein Mensch schaltet das
20
- Entscheiden der KI ein.
19
+ sich jederzeit ändern; ein Wechsel der Einstellung ändert nichts bereits Entschiedenes. Wo nichts gewählt ist,
20
+ entscheidet die KI – auch in einer früher angelegten Forschung; zurück zum Entscheiden des Menschen:
21
+ `strom config set hypotheses.decide person`. Die Ersteinrichtung von strom empfiehlt das Entscheiden der KI und bietet
22
+ es zuerst an, *der Mensch entscheidet* wird dort gespeichert; entscheidet der Mensch, schaltet nur ein Mensch das
23
+ Entscheiden der KI wieder ein, mit einem zweiten Ja.
21
24
 
22
25
  - **Jede Hypothese lässt sich im Menü entscheiden.** „Was wartet“ bietet auch offene Hypothesen ohne Vorschlag des
23
26
  Agenten an – mit Variante und Begründung entscheiden oder offen lassen –, und eine entschiedene oder zurückgestellte
@@ -41,8 +44,10 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
41
44
  abgeschaltet. Das Terminal der App erkennt strom unter jedem seiner Namen – den eines anderen Kanals, einer zweiten
42
45
  Installation, das Paket über einen Paketstarter, einen Pfad dorthin. Der Browser von Codex (in der App ChatGPT) hält
43
46
  dieselben Regeln anhand der Adressen in seinem Code ein, sobald die Hooks von strom in Codex bestätigt sind –
44
- `strom doctor` und `strom chat` sagen, wann sie warten; Code ohne Adresse wird nie abgelehnt, nur verzeichnet. Computer
45
- Use bleibt unüberwacht. Was strom bei welchem Agenten und welcher App überwacht: `strom doc R12`; ein Agent mit Computer
47
+ `strom doctor` und `strom chat` sagen, wann sie warten; Code ohne Adresse wird nie abgelehnt, nur verzeichnet. Mit
48
+ bestätigten Hooks lässt ein Archiv, das nur den Browser eines Menschen zulässt, mit der Erlaubnis „über den Browser“
49
+ auch den Browser von Codex zu, wie den Browser des Agenten in Chrome (`strom net web --check --browser`, `strom doctor`, die Unterlagen
50
+ des Agenten, die Strom-App); unbestätigt wie bisher. Computer Use bleibt unüberwacht. Was strom bei welchem Agenten und welcher App überwacht: `strom doc R12`; ein Agent mit Computer
46
51
  Use wird angewiesen, die Strom-App über die Seitenwerkzeuge eines Browsers zu bedienen und die Forschung über strom.
47
52
 
48
53
  - **Die App des Agenten ohne den Agenten im Terminal.** strom sagt jetzt, was geht und was nicht: Das Gespräch in der App geht weiter,
@@ -69,7 +74,11 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
69
74
  erneut aus dem Original auf diesem Computer gelesen (`strom document read --source S… [--clip …]` oder aus der
70
75
  Strom-App), ohne dass die Leser die Abschrift sehen; die neue Lesung bleibt neben der Quelle, und wo sie abweicht,
71
76
  stellt eine Aufgabe beide gegenüber – die Abschrift, wer sie las, und die Bestätigung des Benutzers bleiben, wie sie
72
- waren.
77
+ waren. Ausschnitte eines Bildes, die sich überlappen oder berühren, werden als eine Ansicht gelesen, und Wörter der
78
+ Abschrift außerhalb des gelesenen Ausschnitts (eine Kopfzeile der Seite darüber) zählen nicht als Abweichung. `strom
79
+ fixes` nimmt eine Lesung zweier Leser als die des ersten: ein blinder Leser mit einem anderen Modell ist nie ein
80
+ früheres Modell, mit dem erneut zu lesen wäre, und eine Lesung, von deren Lesern einer mit dem heutigen Modell las,
81
+ gilt als damit gelesen.
73
82
 
74
83
  - **Außerdem:** die Hilfe nennt die Werte jeder Einstellung mit Auswahl und erklärt beide Möglichkeiten, wer die
75
84
  Hypothesen entscheidet; `strom help --human` nennt jeden Befehl, den nur ein Mensch ausführt. Die Erlaubnis für ein
package/CHANGELOG.md CHANGED
@@ -7,15 +7,18 @@ The changes of each version in short. The full notes and the install lines are o
7
7
 
8
8
  ## 1.29.0
9
9
 
10
- *In preparation: the betas up to 1.29.0-beta.3. The section is complete with the release.*
10
+ *In preparation: the betas up to 1.29.0-beta.4. The section is complete with the release.*
11
11
 
12
12
  - **Who decides the hypotheses: the user, or the AI.** A new setting of the research (`strom config set hypotheses.decide`,
13
- the setup's question beside the other choices, Settings in strom's menu, the Strom app's research settings): *the user decides*
14
- (the default, as in 1.28) or *the AI decides*. With the AI deciding, the agent decides a hypothesis itself once a cited
13
+ the setup's question beside the other choices, Settings in strom's menu, the Strom app's research settings): *the AI decides*
14
+ or *the user decides*. With the AI deciding, the agent decides a hypothesis itself once a cited
15
15
  record supports one variant, with the variant and its reason; it never overturns the user's own decision, and a branch
16
16
  of ten or more people off the tree it joins only on two sources with nothing against them – otherwise it proposes.
17
17
  Each of its decisions is marked as the agent's, listed among the changes and changeable at any time; switching the
18
- setting changes no decision made. Only a person turns the AI's deciding on.
18
+ setting changes no decision made. Where nothing is chosen, the AI decides – in a research made before too; back to the
19
+ user deciding: `strom config set hypotheses.decide person`. strom's setup recommends the AI's deciding and offers it
20
+ first, *the user decides* chosen there is kept; once the user decides, only a person turns the AI's deciding on again,
21
+ with a second yes.
19
22
 
20
23
  - **Every hypothesis can be decided from the menu.** What waits offers also the open hypotheses without the agent's
21
24
  proposal – decided with a variant and a reason, or left open –, and a decided or set-aside hypothesis can be decided
@@ -37,7 +40,9 @@ The changes of each version in short. The full notes and the install lines are o
37
40
  terminal knows strom under any of its names – another channel's, a second installation's, the package through a
38
41
  package runner, a path to it. Codex's browser (in the ChatGPT app) keeps the same rules by the addresses its code names,
39
42
  once strom's hooks are confirmed in Codex – `strom doctor` and `strom chat` say when they wait; code naming no address
40
- is never refused, only recorded. Computer use stays unwatched. What strom watches in each agent and app: `strom doc R12`;
43
+ is never refused, only recorded. With them confirmed, an archive that lets in only a person's browser opens to Codex's
44
+ browser too with the person's permission "through the browser", as to the agent's browser in Chrome (`strom net web --check
45
+ --browser`, `strom doctor`, the brief, the Strom app); unconfirmed, as before. Computer use stays unwatched. What strom watches in each agent and app: `strom doc R12`;
41
46
  an agent with computer use is told to drive the Strom app through a browser's page tools and the research through strom.
42
47
 
43
48
  - **The agent's desktop app without the agent in the terminal.** strom now says what goes and what does not: the conversation in the app
@@ -62,7 +67,10 @@ The changes of each version in short. The full notes and the install lines are o
62
67
  in the terminal, in the reading's file and in the Strom app. A source is read again from its original on this computer
63
68
  (`strom document read --source S… [--clip …]`, or from the Strom app), its readers never shown the transcript; the new
64
69
  reading is kept beside the source, and where it differs a task holds the two against each other – the transcript, who
65
- read it and the user's confirmation stay as they were.
70
+ read it and the user's confirmation stay as they were. Excerpts of one image that overlap or touch are read as one
71
+ view, and words of the transcript outside the excerpt read (a heading of the page above it) count as no difference.
72
+ `strom fixes` takes a reading of two readers as its first reader's: a blind reader of another model is never an
73
+ earlier model to read again with, and a reading one of whose readers read with today's model counts as read with it.
66
74
 
67
75
  - **Also:** the help lists the values of every setting of choices and says what each choice of who decides the
68
76
  hypotheses means; `strom help --human` lists every command only a person runs. An archive's permission given in a
package/CHANGELOG.pl.md CHANGED
@@ -7,16 +7,19 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
7
7
 
8
8
  ## 1.29.0
9
9
 
10
- *W przygotowaniu: bety do 1.29.0-beta.3. Sekcja będzie kompletna z wydaniem.*
10
+ *W przygotowaniu: bety do 1.29.0-beta.4. Sekcja będzie kompletna z wydaniem.*
11
11
 
12
12
  - **Kto rozstrzyga hipotezy: użytkownik czy AI.** Nowe ustawienie badania (`strom config set hypotheses.decide`,
13
13
  pytanie konfiguracji początkowej obok innych wyborów, Ustawienia w menu strom, ustawienia badania w aplikacji Strom):
14
- *rozstrzyga człowiek* (domyślnie, jak w 1.28) lub *rozstrzyga AI*. Gdy rozstrzyga AI, agent sam rozstrzyga hipotezę, gdy
14
+ *rozstrzyga AI* lub *rozstrzyga człowiek*. Gdy rozstrzyga AI, agent sam rozstrzyga hipotezę, gdy
15
15
  tylko cytowany zapis potwierdzi jeden wariant, zawsze z wariantem i uzasadnieniem; decyzji użytkownika nigdy nie
16
16
  zmienia, a gałąź dziesięciu lub więcej osób spoza drzewa dołącza tylko na podstawie dwóch źródeł bez zastrzeżeń –
17
17
  w przeciwnym razie proponuje. Każda jego decyzja jest oznaczona jako decyzja agenta, pojawia się w przeglądzie zmian
18
- i można ją w każdej chwili zmienić; zmiana ustawienia nie zmienia niczego już rozstrzygniętego. Rozstrzyganie przez
19
- AI włącza tylko człowiek.
18
+ i można ją w każdej chwili zmienić; zmiana ustawienia nie zmienia niczego już rozstrzygniętego. Gdzie nic nie
19
+ wybrano, rozstrzyga AI – także w badaniu założonym wcześniej; powrót do rozstrzygania przez człowieka:
20
+ `strom config set hypotheses.decide person`. Konfiguracja początkowa stroma zaleca rozstrzyganie przez AI i proponuje
21
+ je jako pierwsze, wybrane tam *rozstrzyga człowiek* zostaje zapisane; gdy rozstrzyga człowiek, rozstrzyganie przez AI
22
+ włącza ponownie tylko człowiek, po drugim „tak”.
20
23
 
21
24
  - **Każdą hipotezę można rozstrzygnąć z menu.** „Co czeka“ oferuje także otwarte hipotezy bez propozycji agenta –
22
25
  rozstrzygnąć z wariantem i uzasadnieniem albo zostawić otwarte –, a hipotezę rozstrzygniętą lub odłożoną można
@@ -38,7 +41,10 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
38
41
  aplikacji rozpoznaje strom pod każdą jego nazwą – innego kanału, drugiej instalacji, pakiet przez program
39
42
  uruchamiający pakiety, ścieżkę do niego. Przeglądarka Codexa (w aplikacji ChatGPT) trzyma się tych samych reguł według
40
43
  adresów w jej kodzie, gdy hooki stroma są potwierdzone w Codexie – `strom doctor` i `strom chat` mówią, kiedy czekają;
41
- kod bez adresu nigdy nie jest odrzucany, tylko zapisywany. Computer use pozostaje niepilnowane. Co strom pilnuje u
44
+ kod bez adresu nigdy nie jest odrzucany, tylko zapisywany. Z potwierdzonymi hookami archiwum, które wpuszcza tylko
45
+ przeglądarkę człowieka, wpuszcza za zgodą „przez przeglądarkę” także przeglądarkę Codexa, tak jak przeglądarkę agenta w Chrome
46
+ (`strom net web --check --browser`, `strom doctor`, materiały agenta, aplikacja Strom); bez potwierdzenia bez zmian.
47
+ Computer use pozostaje niepilnowane. Co strom pilnuje u
42
48
  którego agenta i aplikacji: `strom doc R12`; agent z computer use dostaje polecenie obsługiwać aplikację Strom przez
43
49
  narzędzia strony w przeglądarce, a badania przez strom.
44
50
 
@@ -65,7 +71,11 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
65
71
  terminalu, w pliku odczytu i w aplikacji Strom. Źródło czyta się ponownie z oryginału na tym komputerze (`strom
66
72
  document read --source S… [--clip …]` albo z aplikacji Strom), a czytelnicy nie widzą transkrypcji; nowy odczyt
67
73
  zostaje obok źródła, a gdzie się różni, zadanie zestawia oba brzmienia – transkrypcja, kto ją czytał, i potwierdzenie
68
- użytkownika zostają bez zmian.
74
+ użytkownika zostają bez zmian. Wycinki jednego skanu, które się nakładają lub stykają, czyta się jako jeden widok, a
75
+ słowa transkrypcji spoza przeczytanego wycinka (nagłówek strony nad nim) nie liczą się jako różnica. `strom fixes`
76
+ traktuje odczyt dwóch czytelników jako odczyt pierwszego z nich: czytelnik na ślepo z innym modelem nigdy nie jest
77
+ wcześniejszym modelem, z którym czytać ponownie, a odczyt, którego któryś czytelnik czytał dzisiejszym modelem, liczy
78
+ się jako nim przeczytany.
69
79
 
70
80
  - **Ponadto:** pomoc podaje wartości każdego ustawienia z wyborem i wyjaśnia obie możliwości tego, kto rozstrzyga
71
81
  hipotezy; `strom help --human` wymienia każde polecenie uruchamiane tylko przez człowieka. Zgoda na archiwum dana w
@@ -997,6 +997,7 @@
997
997
  "ui.setup.hypotheses": "Kdo rozhoduje hypotézy – nejistá spojení lidí? Když rozhoduje člověk, agent jen navrhne a rozhodnutí čeká v Co čeká; když rozhoduje AI, agent rozhodne sám, jakmile citovaný záznam ukazuje na jednu variantu.",
998
998
  "ui.hypotheses.decide.person": "Rozhoduje člověk",
999
999
  "ui.hypotheses.decide.agent": "Rozhoduje AI",
1000
+ "ui.setup.hypotheses.recommended": "Doporučeno: rozhoduje AI – výzkum pokračuje, aniž by hypotézy čekaly; každé její rozhodnutí je označené a dá se změnit.",
1000
1001
  "ui.setup.stories.yes": "Ano (doporučeno)",
1001
1002
  "ui.setup.stories.no": "Ne – jen rodokmen a prameny",
1002
1003
  "ui.setup.stories.history": "Brát do vyprávění i dějiny míst – události doby v místech předků, každou s jejím zdrojem, jako pozadí života? Schválené vyprávění zůstane, jak je; dějiny přijdou až s jeho další verzí.",
@@ -997,6 +997,7 @@
997
997
  "ui.setup.hypotheses": "Wer entscheidet die Hypothesen – die unsicheren Verbindungen zwischen Personen? Entscheidet der Mensch, schlägt der Agent nur vor und die Entscheidung wartet unter „Was wartet“; entscheidet die KI, entscheidet der Agent selbst, sobald ein zitierter Eintrag auf eine Variante zeigt.",
998
998
  "ui.hypotheses.decide.person": "Der Mensch entscheidet",
999
999
  "ui.hypotheses.decide.agent": "Die KI entscheidet",
1000
+ "ui.setup.hypotheses.recommended": "Empfohlen: Die KI entscheidet – die Forschung geht weiter, ohne dass Hypothesen warten; jede ihrer Entscheidungen ist gekennzeichnet und lässt sich ändern.",
1000
1001
  "ui.setup.stories.yes": "Ja (empfohlen)",
1001
1002
  "ui.setup.stories.no": "Nein – nur der Stammbaum und seine Quellen",
1002
1003
  "ui.setup.stories.history": "In den Geschichten auch die Geschichte der Orte – die Ereignisse der Zeit an den Orten der Vorfahren, jedes mit seiner Quelle, als Hintergrund des Lebens? Eine genehmigte Geschichte bleibt, wie sie ist; die Geschichte der Orte kommt erst mit ihrer nächsten Fassung.",
@@ -997,6 +997,7 @@
997
997
  "ui.setup.hypotheses": "Kto rozstrzyga hipotezy – niepewne powiązania osób? Gdy rozstrzyga człowiek, agent tylko proponuje, a rozstrzygnięcie czeka w „Co czeka”; gdy rozstrzyga AI, agent rozstrzyga sam, gdy tylko cytowany zapis wskazuje na jeden wariant.",
998
998
  "ui.hypotheses.decide.person": "Rozstrzyga człowiek",
999
999
  "ui.hypotheses.decide.agent": "Rozstrzyga AI",
1000
+ "ui.setup.hypotheses.recommended": "Zalecane: rozstrzyga AI – badanie toczy się dalej, a hipotezy nie czekają; każde jej rozstrzygnięcie jest oznaczone i można je zmienić.",
1000
1001
  "ui.setup.stories.yes": "Tak (zalecane)",
1001
1002
  "ui.setup.stories.no": "Nie – tylko drzewo i źródła",
1002
1003
  "ui.setup.stories.history": "Uwzględniać w opowieściach także historię miejsc – wydarzenia epoki w miejscowościach przodków, każde z jego źródłem, jako tło życia? Zatwierdzona opowieść pozostanie bez zmian; historia pojawi się dopiero w jej kolejnej wersji.",
@@ -848,8 +848,9 @@ function imagesByHand(tree, b, repo, shared) {
848
848
  }
849
849
  /**
850
850
  * An archive only a person's browser goes to: what the session's agent's own browser may do there (spec 048 K5.1) —
851
- * Claude Code with Claude in Chrome page by page with the person's permission, any other agent never (nor its computer
852
- * use): the person saves the images by hand, and is told once what Claude in Chrome would do.
851
+ * Claude Code with Claude in Chrome page by page with the person's permission (Codex's browser too, its hooks confirmed
852
+ * in Codex for this tree), any other agent never (nor any computer use): the person saves the images by hand, and is
853
+ * told once what Claude in Chrome would do.
853
854
  */
854
855
  function browserLine(tree, b, repo, shared, agent, task) {
855
856
  const url = [b.url, repo?.url].find((x) => !!x && URL.canParse(x));
@@ -857,7 +858,7 @@ function browserLine(tree, b, repo, shared, agent, task) {
857
858
  return "";
858
859
  const net = shared ? path.join(shared, "net") : undefined;
859
860
  try {
860
- const x = browserAdviceFor(tree.env, agent, archiveLevel(tree.env, { url, tree, readOnly: true, ...(net ? { net } : {}) }), task, b.id);
861
+ const x = browserAdviceFor(tree.env, agent, archiveLevel(tree.env, { url, tree, readOnly: true, ...(net ? { net } : {}) }), task, b.id, tree.root);
861
862
  return x ? ` your browser: ${x}` : "";
862
863
  }
863
864
  catch {
@@ -845,7 +845,7 @@ function browserWords(ctx, t, tree, url) {
845
845
  if (!a)
846
846
  return [];
847
847
  const agent = ctx.settings.agent(tree.config).value;
848
- const note = personBrowserNote(ctx.env, agent, a);
848
+ const note = personBrowserNote(ctx.env, agent, a, tree.root);
849
849
  if (!note)
850
850
  return [];
851
851
  return [` ${t(note.key, note.key === "ui.waiting.browser.agent" ? { agent: PROFILES[agent]?.name ?? agent } : note.params)}`];
package/dist/cli/ui.js CHANGED
@@ -800,6 +800,7 @@ export const UI = {
800
800
  "ui.setup.hypotheses": "Who decides the hypotheses — the uncertain links between people? When the user decides, the agent only proposes and the decision waits in What waits; when the AI decides, the agent decides once a cited record points to one variant.",
801
801
  "ui.hypotheses.decide.person": "The user decides",
802
802
  "ui.hypotheses.decide.agent": "The AI decides",
803
+ "ui.setup.hypotheses.recommended": "Recommended: the AI decides – the research goes on without hypotheses waiting; each of its decisions is marked and can be changed.",
803
804
  "ui.setup.stories.yes": "Yes (recommended)",
804
805
  "ui.setup.stories.no": "No — just the family tree and its sources",
805
806
  "ui.setup.stories.history": "In the stories also the history of the places — the events of the time at the ancestors' places, each with its source, as the background of the life? An approved story stays as it is; the history comes only with its next version.",
@@ -193,22 +193,26 @@ export async function setupWizard(ctx, opts = {}) {
193
193
  const si = await ctx.choose(ui(lang, "ui.setup.stories"), [{ label: ui(lang, "ui.setup.stories.yes") }, { label: ui(lang, "ui.setup.stories.no") }], cfg.stories === "no" ? 1 : 0, keep);
194
194
  cfg.stories = (si ?? (cfg.stories === "no" ? 1 : 0)) === 1 ? "no" : "yes";
195
195
  }
196
- // 5c. Who decides the hypotheses (the uncertain links between people): the person (default — the agent proposes) or
197
- // the agent (on a cited record, its decisions marked and changeable). Only a person at a terminal answers it — asked
198
- // nowhere else (no terminal, an agent running the setup: nothing written, the person decides); kept as this
199
- // computer's, like the stories. The tree here with a value of its own (the Strom app set it for it): the person's
200
- // answer takes its place.
196
+ // 5c. Who decides the hypotheses (the uncertain links between people): the person (the agent proposes) or the agent
197
+ // (on a cited record, its decisions marked and changeable) — the AI recommended, offered first where the person is not
198
+ // chosen (spec 060 K1.6), and the default where nothing is set (K1.9): Enter keeps it with no second yes; the second
199
+ // yes only where the person was chosen. Only a person at a terminal answers it — asked nowhere else (no terminal, an
200
+ // agent running the setup: nothing written, the default holds, K1.7); kept as this computer's, like the stories, the
201
+ // person's choice written as it is, so a setup run again offers it. The tree here with a value of its own (the Strom
202
+ // app set it for it): the person's answer takes its place.
201
203
  let ownHypotheses = false;
202
204
  if (agent && ctx.interactive && !isAgent(ctx.env)) {
203
205
  const tree = ctx.hasTree() ? ctx.tree().config : undefined;
204
206
  ownHypotheses = readStored(tree, "hypotheses.decide", agent) !== undefined;
205
- const was = (ownHypotheses ? readStored(tree, "hypotheses.decide", agent) : readStored(cfg, "hypotheses.decide", agent)) === "agent" ? 1 : 0;
206
- const hi = await ctx.choose(ui(lang, "ui.setup.hypotheses"), [{ label: ui(lang, "ui.hypotheses.decide.person") }, { label: ui(lang, "ui.hypotheses.decide.agent") }], was, keep);
207
- // the agent deciding them anew: what it means, and the person's second yes (no: as it was)
207
+ const stored = ownHypotheses ? readStored(tree, "hypotheses.decide", agent) : readStored(cfg, "hypotheses.decide", agent);
208
+ const was = stored === "person" ? 0 : 1;
209
+ const ai = ui(lang, "ui.setup.model.recommended", { model: ui(lang, "ui.hypotheses.decide.agent") });
210
+ const hi = await ctx.choose(`${ui(lang, "ui.setup.hypotheses")}\n${ui(lang, "ui.setup.hypotheses.recommended")}`, [{ label: ui(lang, "ui.hypotheses.decide.person") }, { label: ai }], was, keep);
211
+ // the agent deciding them where the person decided: what it means, and the person's second yes (no: as it was)
208
212
  if (hi === undefined || (hi === 1 && was !== 1 && !(await ctx.confirm(ui(lang, "ui.consent.hypotheses.agent"), false))))
209
213
  ownHypotheses = false;
210
214
  else
211
- writeStored(cfg, "hypotheses.decide", agent, hi === 1 ? "agent" : undefined);
215
+ writeStored(cfg, "hypotheses.decide", agent, hi === 1 ? "agent" : "person");
212
216
  }
213
217
  // 6. What the agent may do without asking (none here: nothing to ask).
214
218
  const now = s.agentPermissions();
@@ -833,11 +833,11 @@ register({
833
833
  tree: true,
834
834
  writes: true,
835
835
  description: [
836
- "By default (hypotheses.decide person) a hypothesis is the user's to decide: once the records point to one variant",
837
- "(or show that none can be decided), propose it and tell the user in a sentence — they decide it in strom's menu",
838
- "(What waits). A new proposal replaces the one before it; a decided hypothesis a new record overturns is proposed",
839
- "again with --reason. Nothing waits for the answer: the work goes on.",
840
- "When the user let the agent decide (hypotheses.decide agent; strom config where shows it), decide it yourself",
836
+ "Where the user decides the hypotheses (hypotheses.decide person; strom config where shows it), a hypothesis is",
837
+ "theirs to decide: once the records point to one variant (or show that none can be decided), propose it and tell",
838
+ "the user in a sentence — they decide it in strom's menu (What waits). A new proposal replaces the one before it;",
839
+ "a decided hypothesis a new record overturns is proposed again with --reason. Nothing waits for the answer.",
840
+ "Where the agent decides them (hypotheses.decide agent — the default where nothing is set), decide it yourself",
841
841
  `with strom hypothesis decide — propose only what is still the user's: a branch of ${BIG_BRANCH} or more people off the tree`,
842
842
  "without two sources or with an objection, or overturning the user's own decision.",
843
843
  ].join("\n"),
@@ -356,9 +356,10 @@ async function askPerson(ctx, c, missing, way) {
356
356
  export function browserOnlyRefusal(ctx, c, a, images, pages = false) {
357
357
  const agent = detectAgent(ctx.env);
358
358
  // what the agent's own browser may do there (none for an agent whose browser strom does not keep)
359
- const advice = browserAdviceFor(ctx.env, agent, a);
359
+ const root = ctx.hasTree() ? ctx.tree().root : undefined;
360
+ const advice = browserAdviceFor(ctx.env, agent, a, undefined, undefined, root);
360
361
  // the person's "through the browser" opens it to an agent's browser strom keeps — said to the person running it too
361
- const browser = browserHelps(a) && (!agent || browserKept(agent));
362
+ const browser = browserHelps(a) && (!agent || browserKept(agent, root, ctx.env));
362
363
  const allow = `strom allow archive ${a.host} --way browser`;
363
364
  const manual = byHand(ctx, images);
364
365
  const kept = a.permission === "slow" ? ` — the person's permission "slowly" from before is kept as given, and takes no direct request there` : "";
@@ -337,6 +337,7 @@ const DOC_ID = /D\d{14}-[0-9a-f]{4}/u;
337
337
  /** Of the readers here (readers.jsonl, this computer): the key each report and each document was read with, its crop. */
338
338
  function readerRecords(root, aliases) {
339
339
  const reports = new Map();
340
+ // of each document: the key each of its readers (1 the first, 2 the blind one) read with
340
341
  const documents = new Map();
341
342
  for (const r of readJournal(path.join(metricsDir(root), "readers.jsonl"))) {
342
343
  if (typeof r.reader !== "string" || typeof r.agent !== "string")
@@ -348,10 +349,15 @@ function readerRecords(root, aliases) {
348
349
  reports.set(r.reader.replace(/^read-/u, ""), { key, ...(typeof r.crop === "string" ? { crop: r.crop } : {}), ...(Number.isFinite(t) ? { at: t } : {}) });
349
350
  }
350
351
  else if (r.kind === "document") {
351
- const id = DOC_ID.exec(r.reader)?.[0];
352
- // the model the reader said beats the one asked: the newest reader of it
353
- if (id && (!documents.has(id) || typeof r.reported === "string"))
354
- documents.set(id, key);
352
+ const m = DOC_ID.exec(r.reader);
353
+ if (!m)
354
+ continue;
355
+ const n = Number(/^-(\d+)/u.exec(r.reader.slice(m.index + m[0].length))?.[1] ?? 1);
356
+ const of = documents.get(m[0]) ?? new Map();
357
+ // the model the reader said beats the one asked: the newest record of that reader
358
+ if (!of.has(n) || typeof r.reported === "string")
359
+ of.set(n, key);
360
+ documents.set(m[0], of);
355
361
  }
356
362
  }
357
363
  return { reports, documents };
@@ -590,9 +596,14 @@ function newModelDetect(tree, env) {
590
596
  const state = loadState(tree.root, d.id);
591
597
  const agent = r.agent ?? state?.agent;
592
598
  const model = r.model ?? state?.model;
593
- const key = recs.documents.get(d.id) ?? (agent ? keyOf(calibrationKey(agent, model), undefined, aliases, r.at) : UNKNOWN_KEY);
599
+ // a reading of several readers is the first one's: a blind reader only checks it, never "an earlier model"
600
+ const blindN = new Set((state?.reports ?? []).filter((x) => x.blind).map((x) => x.n));
601
+ const readers = [...(recs.documents.get(d.id) ?? [])].sort((a, b) => a[0] - b[0]);
602
+ const lead = readers.find(([n]) => !blindN.has(n))?.[1];
603
+ const key = lead ?? (agent ? keyOf(calibrationKey(agent, model), undefined, aliases, r.at) : UNKNOWN_KEY);
594
604
  const t = Date.parse(r.at);
595
- if (isNow(key)) {
605
+ // any reader of it read with the model now: read now already
606
+ if (isNow(key) || readers.some(([, k]) => isNow(k))) {
596
607
  noteNow(`doc|${pagesKey(r)}`, t);
597
608
  continue;
598
609
  }
@@ -1185,7 +1185,7 @@ register({
1185
1185
  let g = browserGate({ env: ctx.env, tree, url: u.href, shared, task: t.id });
1186
1186
  const runner = detectAgent(ctx.env);
1187
1187
  // an agent whose browser strom does not keep: never at an archive only a person's browser goes to
1188
- if (runner && !browserKept(runner) && g.level?.browserOnly && (g.allow || g.why === "browser"))
1188
+ if (runner && !browserKept(runner, tree.root, ctx.env) && g.level?.browserOnly && (g.allow || g.why === "browser"))
1189
1189
  g = { ...g, allow: false, why: "browser", reason: withoutBrowserReason(g.level, g.level.title ?? g.host, t.id, bookOn(tree, t.id, g.host, u.href), otherWay(g.host, u.href, t.id)) };
1190
1190
  // what the script saves is an image of the archive: its images through the browser, as the person allowed
1191
1191
  const may = g.level ? allows(g.level, "images", "browser") : { ok: true };
@@ -515,7 +515,7 @@ function diagnoseInto(ctx, checks, t, add, progress) {
515
515
  const only = tree && !ctx.archiveHere() ? timed("doctor.browser.archives", () => treeBrowserArchives(ctx.tree(), shared)) : [];
516
516
  if (only.length) {
517
517
  const names = only.map((a) => a.title ?? a.host).join(", ");
518
- const s = browserState(ctx.env, chosen);
518
+ const s = browserState(ctx.env, chosen, rootHere(ctx));
519
519
  if (s.state === "agent-without-browser")
520
520
  add("browser", "warn", t("ui.doc.browser.archives.agent", { names, agent: PROFILES[chosen]?.name ?? chosen }), found.includes("claude") ? "strom agents use claude" : undefined);
521
521
  else if (s.state === "no-extension")
@@ -1133,7 +1133,7 @@ const FALLBACKS = {
1133
1133
  "stories.history": () => "yes",
1134
1134
  "sync.edits": () => "conflict",
1135
1135
  "sync.review": () => "off",
1136
- "hypotheses.decide": () => "person",
1136
+ "hypotheses.decide": () => "agent",
1137
1137
  "excerpts.quality": (s, tree) => s.excerpts(tree).quality,
1138
1138
  "excerpts.for": (s, tree) => s.excerpts(tree).for,
1139
1139
  "excerpts.mb": (s, tree) => s.excerpts(tree).mb,
@@ -1256,9 +1256,11 @@ function layerChange(ctx, key, value, scope, agent = "") {
1256
1256
  /** What only the user decides: their edits in the Strom app winning over records, sends written unasked, the agent deciding the hypotheses. */
1257
1257
  function syncDecisions(ctx, key, value, scope) {
1258
1258
  if (key === "hypotheses.decide") {
1259
+ // undefined is the default (the agent): storing agent where the person is set, or removing the person, lets the agent
1260
+ // decide — the person's yes alone; agent stored where nothing is set changes nothing of who decides now, still the person's
1259
1261
  const { now, next } = layerChange(ctx, key, value, scope);
1260
- if (next === "agent" && now !== "agent")
1261
- ctx.requireHuman("Let the agent decide the hypotheses (the uncertain links between people) itself, once a cited record points to one variant?", `strom config set hypotheses.decide agent${scope === "tree" ? " --for-tree" : ""}`, "hypotheses.decide", ui(ctx.uiLang(), "ui.consent.hypotheses.agent"));
1262
+ if (next !== now && (next ?? "agent") === "agent" && now !== "agent")
1263
+ ctx.requireHuman("Let the agent decide the hypotheses (the uncertain links between people) itself, once a cited record points to one variant?", next === undefined ? `strom config unset hypotheses.decide${scope === "tree" ? " --for-tree" : ""}` : `strom config set hypotheses.decide agent${scope === "tree" ? " --for-tree" : ""}`, "hypotheses.decide", ui(ctx.uiLang(), "ui.consent.hypotheses.agent"));
1262
1264
  return;
1263
1265
  }
1264
1266
  if (key !== "sync.edits" && key !== "sync.review")
@@ -1664,10 +1666,11 @@ register({
1664
1666
  description: [
1665
1667
  "A setting of choices takes one of its values:",
1666
1668
  ...SETTINGS.filter((s) => s.kind === "choice" && s.choices?.length).map((s) => ` ${s.key} ${s.choices.join(" | ")}`),
1667
- "hypotheses.decide: person (default) — the agent proposes a decision (strom hypothesis propose), the user decides it",
1668
- "in What waits; agent — the agent decides once a cited record points to one variant (strom hypothesis decide), never",
1669
- "changing the user's decision. Only the user sets agent (in their own terminal, or strom setup); person again at any",
1670
- "time: strom config set hypotheses.decide person (--for-tree: this tree only). strom config where shows each one.",
1669
+ "hypotheses.decide: agent (default where nothing is set, a research of 1.28 or older too) — the agent decides once a",
1670
+ "cited record points to one variant (strom hypothesis decide), never changing the user's decision; person — the agent",
1671
+ "proposes a decision (strom hypothesis propose), the user decides it in What waits. Back to the person at any time:",
1672
+ "strom config set hypotheses.decide person (--for-tree: this tree only); agent again only by the user (in their own",
1673
+ "terminal, or strom setup — it recommends agent). strom config where shows each one.",
1671
1674
  ].join("\n"),
1672
1675
  options: [{ name: "for-tree", type: "boolean", description: "only for the current tree (saved in its strom.json)" }],
1673
1676
  examples: ["strom config set lang cs", 'strom config set shared "/Volumes/Big/strom-shared"', "strom config set model.vision opus --for-tree", "strom config set run.minutes 45", "strom config set hypotheses.decide person --for-tree"],
@@ -1085,7 +1085,7 @@ register({
1085
1085
  return {
1086
1086
  text: lines(written(tree), `the user saves images ${awaits.images} of ${b.id} into ${shown}, each named by its number (${parseImageList(awaits.images)[0]}.jpg; named otherwise, they are taken by their order when as many as asked for)`, "once all of them are saved the task comes back by itself — as they are saved while the bridge runs, else at the next session's start (strom media add --inbox --waiting takes them now); a part of them, it waits on and says which are missing; the user sees it in strom's menu (What waits) and the Strom app",
1087
1087
  // an archive only a person's browser goes to: what the agent's own browser would do there (spec 048 K5.2)
1088
- ((a) => (a ? `its archive only through a person's browser — ${agentBrowserAdvice(ctx.env, detectAgent(ctx.env) ?? ctx.settings.agent(tree.config).value, a, t.id, b.id, false)}` : undefined))(bookBrowserArchive(tree, b.url, s))),
1088
+ ((a) => (a ? `its archive only through a person's browser — ${agentBrowserAdvice(ctx.env, detectAgent(ctx.env) ?? ctx.settings.agent(tree.config).value, a, t.id, b.id, false, tree.root)}` : undefined))(bookBrowserArchive(tree, b.url, s))),
1089
1089
  data: { task: t, folder: dir },
1090
1090
  };
1091
1091
  },
@@ -36,10 +36,11 @@ register({
36
36
  "person's permission, the robots.txt line, a refusal of strom's client, the host left alone — read only, nothing sent;\n" +
37
37
  "a digital library strom knows: its own search addresses too, to fetch as given (the words URL-encoded).\n" +
38
38
  "--check <url> --browser: the same for your browser (Claude in Chrome, another agent's browser): an archive only a\n" +
39
- "person's browser goes to opens to Claude in Chrome within its level and the person's permission \"through the\n" +
40
- "browser\", at a person's pace (about 10 s between pages unless the person set another, or its own slower one) —\n" +
41
- "never of its own accord to another agent's browser or computer use (strom keeps no hook before them, recommends\n" +
42
- "none; only the person's explicit request makes it the person's choice): the person saves its images.\n" +
39
+ "person's browser goes to opens to Claude in Chrome — and to Codex's browser once the person confirmed the tree's\n" +
40
+ "hooks in Codex — within its level and the person's permission \"through the browser\", at a person's pace (about\n" +
41
+ "10 s between pages unless the person set another, or its own slower one) — never of its own accord to another\n" +
42
+ "agent's browser or to computer use (strom keeps no hook before them, recommends none; only the person's explicit\n" +
43
+ "request makes it the person's choice): the person saves its images.\n" +
43
44
  "An agent without strom's hook (Codex, OpenCode, Antigravity) runs it before its own web fetch of an archive's site\n" +
44
45
  "and keeps to its answer.\n" +
45
46
  "Claude in Chrome: the same hook runs before its navigate — counted, paced and refused with the web fetches of the\n" +
@@ -166,7 +167,7 @@ function checkUrl(ctx, url, browser = false) {
166
167
  // (Milan's decision, 4 November 2026); nothing is switched off: the person's explicit request is the person's choice
167
168
  // (5 November 2026, ON_REQUEST)
168
169
  const runner = detectAgent(ctx.env);
169
- if (runner && !browserKept(runner) && g.level?.browserOnly && (g.allow || g.why === "browser")) {
170
+ if (runner && !browserKept(runner, tree?.root, ctx.env) && g.level?.browserOnly && (g.allow || g.why === "browser")) {
170
171
  const book = bookOn(tree, session?.task, g.host, u.href);
171
172
  const rest = { ...g };
172
173
  delete rest.human;
@@ -64,8 +64,9 @@ export const CHROME_DENY = ["file_upload", "upload_image", "shortcuts_execute",
64
64
  /**
65
65
  * Codex's browser and computer use: the MCP servers its desktop app (ChatGPT, Codex) adds — node_repl runs its in-app
66
66
  * browser and its Chrome extension, cua_repl (the plugin unified-computer-use) and computer-use its computer use. They
67
- * run JavaScript a hook could not read an address from, so strom keeps no watch before them and recommends none of
68
- * them; nothing of them is switched off in a research (the person's choice, Milan 5 November 2026) — only a run
67
+ * run JavaScript: strom's hook reads only the addresses node_repl's code names, and only once the person confirmed the
68
+ * tree's hooks in Codex (core/codexhook.ts, core/browserhelp.ts); computer use it neither watches nor recommends.
69
+ * Nothing of them is switched off in a research (the person's choice, Milan 5 November 2026) — only a run
69
70
  * without the person's add-ons (agent.addons off) goes without them, as without the rest (runners/codex.ts).
70
71
  */
71
72
  export const CODEX_BROWSER_SERVERS = ["node_repl", "cua_repl", "computer-use", "computer_use"];
@@ -1,27 +1,46 @@
1
1
  // Where the agent's browser helps: an archive only a person's browser goes to (strom's list of archives' terms, or its
2
2
  // robots.txt keeping automated tools off the whole site) lets its images through the agent's browser with the person's
3
3
  // permission "through the browser" — and only where strom keeps that browser (its hook before each page: Claude Code
4
- // with the Claude in Chrome extension). Another agent's browser or computer use strom does not see: there the person
5
- // saves the images by hand (strom task wait --images), and the person is told that with Claude Code and Claude in
6
- // Chrome the agent would save them itself (spec 048 story 5). Read only; derived each time, nothing written.
4
+ // with the Claude in Chrome extension; Codex's browser once the person confirmed strom's hooks of the tree in Codex,
5
+ // core/codexhook.ts). Another agent's browser or computer use strom does not see: there the person saves the images by
6
+ // hand (strom task wait --images), and the person is told that with Claude Code and Claude in Chrome the agent would
7
+ // save them itself (spec 048 story 5). Read only; derived each time, nothing written.
7
8
  import path from "node:path";
8
9
  import { allows, archiveLevel } from "./terms.js";
9
10
  import { knownDisallow } from "./knownterms.js";
10
11
  import { claudeInChrome, CLAUDE_IN_CHROME_URL } from "./browser.js";
12
+ import { codexHookState } from "./codexhook.js";
11
13
  /**
12
14
  * The agents whose browser strom keeps — its hook runs before each page and each tool on a page (count, pace, an
13
- * archive only a person's browser goes to, the bridge): Claude Code's Claude in Chrome. Any other agent's browser or
14
- * computer use goes unseen: strom does not recommend it — never of the agent's own accord to such an archive; only the
15
- * person's explicit request makes it the person's choice (ON_REQUEST).
15
+ * archive only a person's browser goes to, the bridge): Claude Code's Claude in Chrome; Codex's browser (its node_repl
16
+ * js) only in a tree whose hooks the person confirmed in Codex (codexHookState "trusted", strom doc R12.5) — else
17
+ * Codex does not run them. Any other agent's browser, and every agent's computer use, goes unseen: strom does not
18
+ * recommend it — never of the agent's own accord to such an archive; only the person's explicit request makes it the
19
+ * person's choice (ON_REQUEST). Nothing of it is switched off.
16
20
  */
17
- export const GUARDED_BROWSER_AGENTS = ["claude"];
18
- /** Whether strom keeps this agent's browser (its hooks before each page). */
19
- export function browserKept(agent) {
20
- return !!agent && GUARDED_BROWSER_AGENTS.includes(agent);
21
+ export const GUARDED_BROWSER_AGENTS = ["claude", "codex"];
22
+ /** The agents whose browser strom keeps only once the person confirmed strom's hooks of the tree in the agent. */
23
+ const KEPT_WHEN_CONFIRMED = ["codex"];
24
+ /** Whether strom keeps this agent's browser (its hooks before each page) — in the tree at root (Codex: its hooks confirmed there). */
25
+ export function browserKept(agent, root, env) {
26
+ if (!agent || !GUARDED_BROWSER_AGENTS.includes(agent))
27
+ return false;
28
+ if (!KEPT_WHEN_CONFIRMED.includes(agent))
29
+ return true;
30
+ if (!root || !env)
31
+ return false;
32
+ try {
33
+ return codexHookState(root, env) === "trusted";
34
+ }
35
+ catch {
36
+ return false;
37
+ }
21
38
  }
22
- export function browserState(env, agent) {
23
- if (!browserKept(agent))
39
+ export function browserState(env, agent, root) {
40
+ if (!browserKept(agent, root, env))
24
41
  return { state: "agent-without-browser" };
42
+ if (agent !== "claude")
43
+ return { state: "ready" };
25
44
  const found = claudeInChrome(env).extension;
26
45
  return found.length ? { state: "ready", browsers: found } : { state: "no-extension", url: CLAUDE_IN_CHROME_URL };
27
46
  }
@@ -81,16 +100,17 @@ export function bookBrowserArchive(tree, url, shared) {
81
100
  * For the agent (English): what its browser may do at an archive only a person's browser goes to — Claude Code with
82
101
  * the extension and the person's permission: its own browser, page by page; anything else: the person's hand.
83
102
  */
84
- export function agentBrowserAdvice(env, agent, a, task = "T…", book = "B…", withWait = true) {
103
+ export function agentBrowserAdvice(env, agent, a, task = "T…", book = "B…", withWait = true, root) {
85
104
  const wait = withWait ? `: strom task wait ${task} --images ${book}:<numbers> --on "<the book, its link, which images — impersonal, in the research language>"` : "";
86
- const s = browserState(env, agent);
105
+ const s = browserState(env, agent, root);
87
106
  if (s.state === "agent-without-browser")
88
107
  return `strom does not keep your browser or computer use (no hook of strom's before a page) and does not recommend them: not of your own accord for ${a.title ?? a.host} — the person saves the images by hand${wait}. ${ON_REQUEST} ${tellClaude}`;
89
108
  if (s.state === "no-extension")
90
109
  return `the Claude in Chrome extension is in no browser here — the person saves the images by hand${wait}. Tell the user once: with the extension (${s.url}) and the permission "through the browser" the agent would save them itself.`;
91
110
  if (!a.permitted)
92
111
  return `your browser goes there only with the person's permission "through the browser" (strom allow archive ${a.host} --way browser — the person's, never yours); until then the person saves the images by hand${wait}.`;
93
- return `through your browser (Claude in Chrome), one image at a time at a person's pace: strom media save ${task} --image <n> --at <the archive's page of that image> gives the script that saves it in your tab, strom media add --inbox --waiting takes it; else the person saves them by hand${wait}.`;
112
+ const yours = agent === "claude" ? "Claude in Chrome" : `its address written out in your code, tab.goto("<the page>") — strom's hook sees only an address it can read`;
113
+ return `through your browser (${yours}), one image at a time at a person's pace: strom media save ${task} --image <n> --at <the archive's page of that image> gives the script that saves it in your tab, strom media add --inbox --waiting takes it; else the person saves them by hand${wait}.`;
94
114
  }
95
115
  /**
96
116
  * A browser or computer use strom does not keep, at an archive only a person's browser goes to: never of the agent's own
@@ -109,12 +129,12 @@ export function browserHelps(a) {
109
129
  * its own browser may do there — never anything for an agent whose browser strom does not keep (nor its computer use);
110
130
  * none for a person (no agent known).
111
131
  */
112
- export function browserAdviceFor(env, agent, a, task, book) {
132
+ export function browserAdviceFor(env, agent, a, task, book, root) {
113
133
  if (!agent || !a.browserOnly)
114
134
  return undefined;
115
135
  if (!browserHelps(a))
116
- return browserKept(agent) ? undefined : `strom does not keep your browser or computer use and does not recommend them: not of your own accord there. ${ON_REQUEST}`;
117
- return agentBrowserAdvice(env, agent, { host: a.host, ...(a.title ? { title: a.title } : {}), permitted: a.permission === "browser" }, task, book, false);
136
+ return browserKept(agent, root, env) ? undefined : `strom does not keep your browser or computer use and does not recommend them: not of your own accord there. ${ON_REQUEST}`;
137
+ return agentBrowserAdvice(env, agent, { host: a.host, ...(a.title ? { title: a.title } : {}), permitted: a.permission === "browser" }, task, book, false, root);
118
138
  }
119
139
  /**
120
140
  * The refusal an agent whose browser strom does not keep gets at an archive only a person's browser goes to — its web
@@ -129,8 +149,8 @@ export function withoutBrowserReason(a, name, task, book, otherWay) {
129
149
  * What the person is told beside images of such an archive saved by hand (strom's menu, the bridge's waiting): a
130
150
  * catalogue key and its words — nothing where the agent would save them itself now.
131
151
  */
132
- export function personBrowserNote(env, agent, a) {
133
- const s = browserState(env, agent);
152
+ export function personBrowserNote(env, agent, a, root) {
153
+ const s = browserState(env, agent, root);
134
154
  if (s.state === "agent-without-browser")
135
155
  return { key: "ui.waiting.browser.agent", params: { agent: agent ?? "" } };
136
156
  if (s.state === "no-extension")
@@ -99,7 +99,7 @@ export const SETTINGS = [
99
99
  // Read from the config files only (the user's or the tree's) — no variable: turning it off is the user's decision.
100
100
  { key: "sync.review", env: "", tree: true, kind: "choice", choices: ["off", "on"], description: "what the Strom app sends: off (default — written at once: additions, the leads corrected, a record's fact changed a conflict for you to decide; strom sync undo takes a send back) or on (each send waits for your word: the menu's What waits for you) — an archive writes always" },
101
101
  // Read from the config files only (the user's or the tree's) — no variable: letting the agent decide is the user's decision.
102
- { key: "hypotheses.decide", env: "", tree: true, kind: "choice", choices: ["person", "agent"], description: "who decides the hypotheses (the uncertain links between people): person (default — the agent proposes, you decide in What waits for you) or agent (the agent decides once a cited record points to one variant; a branch of 10 or more people off the tree only with two sources and no objection, else it proposes; it never changes your decision) — only you let the agent decide; an archive: nobody decides" },
102
+ { key: "hypotheses.decide", env: "", tree: true, kind: "choice", choices: ["person", "agent"], description: "who decides the hypotheses (the uncertain links between people): agent (default where nothing is set — the agent decides once a cited record points to one variant; a branch of 10 or more people off the tree only with two sources and no objection, else it proposes; it never changes your decision) or person (the agent proposes, you decide in What waits for you; back to it: strom config set hypotheses.decide person) — only you let the agent decide where person is set (strom setup recommends agent); an archive: nobody decides" },
103
103
  { key: "main.person", env: "STROM_MAIN_PERSON", tree: true, kind: "person", description: "the main person of the tree (P…): first in the GEDCOM files — the Strom app opens on them (default: the nearest person descended from every research's focus, else the first research's focus)" },
104
104
  { key: "excerpts.quality", env: "STROM_EXCERPTS_QUALITY", tree: true, kind: "choice", choices: EXCERPT_QUALITIES, description: "the entries cut out of their scans in the file for the Strom app (output/tree-strom.ged): small (1000 px, grey — half the size), normal (default, 1200 px), sharp (1600 px)" },
105
105
  { key: "excerpts.for", env: "STROM_EXCERPTS_FOR", tree: true, kind: "choice", choices: EXCERPT_SCOPES, description: "whose entries get their image in the Strom app: none (the file without images), line (the ancestors), family (default: the ancestors and their families), connected (anyone linked to them), all (every source with an excerpt: the entries nobody cites too, where they still fit under excerpts.mb, the cited never made smaller for them)" },
@@ -704,9 +704,12 @@ export class Settings {
704
704
  syncReview(tree) {
705
705
  return this.resolve("sync.review", tree)?.value === "on";
706
706
  }
707
- /** Who decides the hypotheses (hypotheses.decide): the person (default) or the agent, on the person's yes. */
707
+ /**
708
+ * Who decides the hypotheses (hypotheses.decide): the agent where nothing is set (spec 060 K1.9 — a research of 1.28
709
+ * or older too), the person where the person chose it; the agent again only on the person's yes.
710
+ */
708
711
  hypothesesDecide(tree) {
709
- return this.resolve("hypotheses.decide", tree)?.value === "agent" ? "agent" : "person";
712
+ return this.resolve("hypotheses.decide", tree)?.value === "person" ? "person" : "agent";
710
713
  }
711
714
  syncEdits(tree) {
712
715
  return this.resolve("sync.edits", tree)?.value === "user" ? "user" : "conflict";
@@ -766,6 +766,10 @@ function partOf(r, entry) {
766
766
  // ── two readers ───────────────────────────────────────────────────────────────────────────────────────────────────
767
767
  /** The hunks where two transcripts differ, word by word (their keys; the marks [?] are no difference). */
768
768
  export function wordDiff(a, b) {
769
+ return wordHunks(a, b).map(({ at, other }) => ({ at, other }));
770
+ }
771
+ /** As wordDiff, each place saying whether it lies at the start or the end of both texts (edge): nothing alike before it, or after it. */
772
+ export function wordHunks(a, b) {
769
773
  // letters one reader spaced out joined as the other wrote the word
770
774
  const x = words(a, nameKeys(b));
771
775
  const y = words(b, nameKeys(a));
@@ -781,7 +785,7 @@ export function wordDiff(a, b) {
781
785
  let hunk;
782
786
  const flush = () => {
783
787
  if (hunk && (hunk.at.length || hunk.other.length))
784
- out.push({ at: hunk.at.map((w) => w.text).join(" "), other: hunk.other.map((w) => w.text).join(" ") });
788
+ out.push({ at: hunk.at.map((w) => w.text).join(" "), other: hunk.other.map((w) => w.text).join(" "), edge: hunk.start || (i >= n && j >= m) });
785
789
  hunk = undefined;
786
790
  };
787
791
  while (i < n || j < m) {
@@ -791,10 +795,10 @@ export function wordDiff(a, b) {
791
795
  j++;
792
796
  }
793
797
  else if (j < m && (i >= n || lcs[i][j + 1] >= lcs[i + 1][j])) {
794
- (hunk ??= { at: [], other: [] }).other.push(y[j++]);
798
+ (hunk ??= { at: [], other: [], start: i === 0 && j === 0 }).other.push(y[j++]);
795
799
  }
796
800
  else {
797
- (hunk ??= { at: [], other: [] }).at.push(x[i++]);
801
+ (hunk ??= { at: [], other: [], start: i === 0 && j === 0 }).at.push(x[i++]);
798
802
  }
799
803
  }
800
804
  flush();
package/dist/core/live.js CHANGED
@@ -5800,7 +5800,7 @@ export function serveLive(root, env) {
5800
5800
  }
5801
5801
  /** /status `browser`: the agent's browser here and the tree's archives only a person's browser goes to. */
5802
5802
  function browserStatus(tree, env, agent, shared) {
5803
- const s = browserState(env, agent);
5803
+ const s = browserState(env, agent, tree.root);
5804
5804
  return {
5805
5805
  state: s.state,
5806
5806
  ...(s.url ? { url: s.url } : {}),
@@ -8,7 +8,7 @@ import fs from "node:fs";
8
8
  import path from "node:path";
9
9
  import { inputPath } from "./media.js";
10
10
  import { clipMark, INPUT_MARK, withMargin } from "./excerpt.js";
11
- import { alive, DOC_PAGES, FINAL_STATES, listReadings, loadState, wordDiff } from "./document.js";
11
+ import { alive, DOC_PAGES, FINAL_STATES, listReadings, loadState, wordHunks } from "./document.js";
12
12
  import { create, update } from "./records.js";
13
13
  import { phrase } from "./phrases.js";
14
14
  /** The origin of the task a reading again that differs from a source's transcript makes. */
@@ -20,8 +20,8 @@ function sourceOk(s) {
20
20
  return !!s && s.type === "source" && !s.retracted && !s.mergedInto && s.kind !== "family-tree" && s.kind !== "family-memory";
21
21
  }
22
22
  /**
23
- * The pages of a source's original on this computer (`clip`: one excerpt alone, by its mark): each clip of it on its
24
- * image (with an excerpt's margin), else its images whole, else the scan the person gave — at most a reading's pages.
23
+ * The pages of a source's original on this computer (`clip`: one excerpt alone, by its mark): its clips on their
24
+ * images (with an excerpt's margin, the clips of an image that meet as one view: joinedClips), else its images whole, else the scan the person gave — at most a reading's pages.
25
25
  * None here (an image not on this computer, a clip it has not): an empty list.
26
26
  */
27
27
  export function originalPages(tree, shared, s, clip) {
@@ -46,17 +46,12 @@ export function originalPages(tree, shared, s, clip) {
46
46
  input();
47
47
  else if (clip) {
48
48
  const c = s.clips?.find((x) => clipMark(x) === clip);
49
- if (c) {
50
- const r = withMargin(c.region);
51
- media(c.media, [r.x, r.y, r.w, r.h].map((n) => Math.round(n * 1000) / 1000));
52
- }
53
- }
54
- else if (s.clips?.length) {
55
- for (const c of s.clips) {
56
- const r = withMargin(c.region);
57
- media(c.media, [r.x, r.y, r.w, r.h].map((n) => Math.round(n * 1000) / 1000));
58
- }
49
+ if (c)
50
+ media(c.media, margined(c.region));
59
51
  }
52
+ else if (s.clips?.length)
53
+ for (const c of joinedClips(s.clips))
54
+ media(c.media, c.region);
60
55
  else if (s.media?.length)
61
56
  for (const m of s.media)
62
57
  media(m);
@@ -64,6 +59,46 @@ export function originalPages(tree, shared, s, clip) {
64
59
  input();
65
60
  return out.slice(0, DOC_PAGES);
66
61
  }
62
+ /** A region with an excerpt's margin, its fractions to three places. */
63
+ function margined(r) {
64
+ const m = withMargin(r);
65
+ return [m.x, m.y, m.w, m.h].map((n) => Math.round(n * 1000) / 1000);
66
+ }
67
+ /**
68
+ * The views of a source's excerpts for its readers: the excerpts of one image that overlap or touch (each with its
69
+ * margin) one view of all of them — one entry cut in parts is read as one, never as pages of its own; excerpts apart
70
+ * and other images each a view of its own, in the order of the excerpts.
71
+ */
72
+ export function joinedClips(clips) {
73
+ const views = [];
74
+ const meet = (a, b) => a[0] <= b[0] + b[2] && b[0] <= a[0] + a[2] && a[1] <= b[1] + b[3] && b[1] <= a[1] + a[3];
75
+ const join = (a, b) => {
76
+ const x = Math.min(a[0], b[0]);
77
+ const y = Math.min(a[1], b[1]);
78
+ return [x, y, Math.max(a[0] + a[2], b[0] + b[2]) - x, Math.max(a[1] + a[3], b[1] + b[3]) - y];
79
+ };
80
+ for (const c of clips) {
81
+ let box = margined(c.region);
82
+ // a view this one meets takes it in — and any other view of the image the larger one meets then
83
+ let at = views.findIndex((v) => v.media === c.media && meet(v.box, box));
84
+ if (at < 0) {
85
+ views.push({ media: c.media, box });
86
+ continue;
87
+ }
88
+ for (;;) {
89
+ box = join(views[at].box, box);
90
+ views[at].box = box;
91
+ const other = views.findIndex((v, k) => k !== at && v.media === c.media && meet(v.box, box));
92
+ if (other < 0)
93
+ break;
94
+ box = join(views[other].box, box);
95
+ views.splice(other, 1);
96
+ if (other < at)
97
+ at--;
98
+ }
99
+ }
100
+ return views.map((v) => ({ media: v.media, region: v.box.map((n) => Math.round(n * 1000) / 1000) }));
101
+ }
67
102
  /** Why a source (one excerpt of it) cannot be read again here, or none: it can. */
68
103
  export function notAgain(tree, shared, id, clip) {
69
104
  const s = tree.get(id);
@@ -88,10 +123,17 @@ export function readingOfSource(root, id) {
88
123
  export function readsAgain(tree, shared, s) {
89
124
  return sourceOk(s) && !!s.transcript?.trim() && originalPages(tree, shared, s).length > 0;
90
125
  }
91
- /** The new reading against the source's transcript (at: the transcript, other: the new reading): its words alike, or where they differ. */
126
+ /**
127
+ * The new reading against the source's transcript (at: the transcript, other: the new reading): its words alike, or
128
+ * where they differ. Read from its excerpts, words one side has alone at the very start or end of both (a heading of
129
+ * the page above the excerpt, a word of the next entry in its margin) are outside what was read: no place that differs.
130
+ */
92
131
  export function compareWithSource(s, r) {
93
132
  const read = r.entries.map((e) => e.transcript).join("\n");
94
- const variants = wordDiff((s.transcript ?? "").normalize("NFC"), read.normalize("NFC"));
133
+ const clipped = !!s.clips?.length;
134
+ const variants = wordHunks((s.transcript ?? "").normalize("NFC"), read.normalize("NFC"))
135
+ .filter((v) => !(clipped && v.edge && (!v.at || !v.other)))
136
+ .map(({ at, other }) => ({ at, other }));
95
137
  return { agree: variants.length ? "differ" : "same", variants };
96
138
  }
97
139
  /**
package/dist/core/tree.js CHANGED
@@ -31,7 +31,7 @@ export const TREE_FILE = "strom.json";
31
31
  export const SEAL_FOREIGN = "seal.foreign";
32
32
  // between releases the candidate being made (a bridge run from the sources says what it is: the Strom app goes by it);
33
33
  // at a release the release's own (package.json)
34
- export const VERSION = "1.29.0-beta.3";
34
+ export const VERSION = "1.29.0-beta.4";
35
35
  /** What a new research is settled with from the start: nothing an older strom counted otherwise to set right in it. */
36
36
  export const NEW_TREE_SETTLED = ["readers-1", "proven-originals-1"];
37
37
  const GITIGNORE = `# Strom Research — local state and large files are not versioned
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strom-research",
3
- "version": "1.29.0-beta.3",
3
+ "version": "1.29.0-beta.4",
4
4
  "stromDoc": "8293ddb23906e0588971043f3d281bce0ff07427",
5
5
  "description": "Genealogical research toolkit for AI coding agents",
6
6
  "type": "module",