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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.cs.md CHANGED
@@ -7,7 +7,7 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
7
7
 
8
8
  ## 1.31.1
9
9
 
10
- *Připravuje se: bety do 1.31.1-beta.2. Oddíl bude úplný s vydáním.*
10
+ *Připravuje se: bety do 1.31.1-beta.3. Oddíl bude úplný s vydáním.*
11
11
 
12
12
  - **Nastavení pro prohlížeče archivů, které prohlížeč vykresluje pomalu.** Kde prohlížeč vykreslí kartu jen zhruba
13
13
  jednou za sekundu (kreslení bez grafické karty, vzdálená plocha), potřebuje prohlížeč snímků archivu (ACTA PUBLICA)
@@ -17,8 +17,23 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
17
17
  - **Náhled `strom source split` na výzkumu zapečetěném na jiném počítači.** Dřív se odmítl, dokud výzkum nebyl
18
18
  převzat (`strom seal adopt`), přestože jen čte. Teď náhled ukáže, co by rozdělení udělalo, jako každé čtení; zápis
19
19
  (`--apply`) i jeho vrácení dál čekají na převzetí výzkumu.
20
+ - **Totéž u `strom sync <soubor>` a `strom input names`:** co by rodokmen přinesl a která příjmení po sňatku by se
21
+ přidala, se ukáže i na výzkumu zapečetěném na jiném počítači; zápis (`--apply`, `strom sync --app`, `--undo`) dál
22
+ čeká na převzetí výzkumu.
20
23
  - **`strom repair undo <razítko> --json` bez terminálu** teď odpovídá jako `strom repair`: `status: "needs-consent"`
21
24
  s příkazem ke spuštění v terminálu, ne jen kódem 4.
25
+ - **Agent, kterému sandbox nedovolí číst nastavení nebo zapisovat do výzkumu** (Codex na Windows), se teď dozví
26
+ právě to — s příkazem ke spuštění mimo sandbox — místo „dějiny jsou pro tento výzkum vypnuté, zapíná je jen
27
+ uživatel“, které ho posílalo k nastavení, jež bylo zapnuté.
28
+ - **Úkol, u kterého sandbox nebo oprávnění agenta třikrát za sebou nepustily strom k výzkumu** (nic se nezapsalo), se
29
+ odloží: s důvodem a u Codexu i s tím, co pomůže (`strom task show`), a běh pokračuje dalším úkolem, místo aby běh za
30
+ během začínal tentýž. Znovu probuzený úkol (`strom task wake`) se počítá od probuzení. Takto se odkládá vždy nejvýš
31
+ jeden úkol — když sandbox odmítá všechno, běh skončí jako dřív. `strom error` ukáže, které příkazy byly odmítnuty,
32
+ zkrácené a zamaskované.
33
+ - **Codex na Windows pouští strom ze sandboxu jen jako holý příkaz**: bez `&`, roury nebo `cd` před ním, bez pomlčky (–)
34
+ a bez uvozovek uvnitř textu v uvozovkách v argumentech. Agent na Windows se to teď dozví (AGENTS.md, `strom guide`,
35
+ rada sandboxu), i s cestou pro delší text: jeho příkaz v souboru v `notes/`, spuštěný přes `strom batch --file`.
36
+ Příklady stromu už pomlčku mezi čísly nenabízejí.
22
37
 
23
38
  ## 1.31.0
24
39
 
package/CHANGELOG.de.md CHANGED
@@ -7,7 +7,7 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
7
7
 
8
8
  ## 1.31.1
9
9
 
10
- *In Vorbereitung: die Betas bis 1.31.1-beta.2. Der Abschnitt ist mit dem Release vollständig.*
10
+ *In Vorbereitung: die Betas bis 1.31.1-beta.3. Der Abschnitt ist mit dem Release vollständig.*
11
11
 
12
12
  - **Eine Einstellung für Archiv-Viewer, die ein Browser langsam zeichnet.** Wo der Browser einen Tab nur etwa einmal
13
13
  pro Sekunde zeichnet (Zeichnen ohne Grafikkarte, ein Remote-Desktop), braucht der Viewer des Archivs (ACTA PUBLICA)
@@ -19,8 +19,25 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
19
19
  abgelehnt, bis die Forschung übernommen war (`strom seal adopt`), obwohl sie nur liest. Jetzt zeigt die Vorschau wie
20
20
  jedes Lesen, was die Aufteilung täte; das Schreiben (`--apply`) und sein Rückgängigmachen warten weiter auf die
21
21
  Übernahme der Forschung.
22
+ - **Ebenso bei `strom sync <Datei>` und `strom input names`:** was ein Stammbaum brächte und welche Namen nach der
23
+ Heirat hinzukämen, wird auch bei einer auf einem anderen Computer versiegelten Forschung gezeigt; das Schreiben
24
+ (`--apply`, `strom sync --app`, `--undo`) wartet weiter auf die Übernahme der Forschung.
22
25
  - **`strom repair undo <Stempel> --json` ohne Terminal** antwortet jetzt wie `strom repair`: `status: "needs-consent"`
23
26
  mit dem Befehl, der in einem Terminal auszuführen ist, nicht nur mit dem Exit-Code 4.
27
+ - **Ein Agent, dessen Sandbox strom von den Einstellungen oder der Forschung fernhält** (Codex unter Windows), erfährt
28
+ jetzt genau das — mit dem Befehl, der außerhalb der Sandbox auszuführen ist — statt „die Geschichte ist für diese
29
+ Forschung aus, nur der Benutzer schaltet sie ein“, was ihn zu einer Einstellung schickte, die eingeschaltet war.
30
+ - **Eine Aufgabe, bei der die Sandbox oder die Berechtigungen des Agenten strom dreimal hintereinander nicht an die
31
+ Forschung ließen,** wird zurückgestellt (nichts wurde erfasst): mit ihrem Grund und bei Codex mit dem, was hilft
32
+ (`strom task show`), und der Lauf geht mit der nächsten Aufgabe weiter, statt Lauf für Lauf dieselbe zu beginnen. Eine
33
+ wieder geweckte Aufgabe (`strom task wake`) zählt ab dann neu. So wird höchstens eine Aufgabe auf einmal
34
+ zurückgestellt — lehnt die Sandbox alles ab, endet der Lauf wie bisher. `strom error` zeigt, welche Befehle abgelehnt
35
+ wurden, gekürzt und maskiert.
36
+ - **Codex unter Windows lässt strom nur als einfachen Befehl aus seiner Sandbox**: ohne `&`, Pipe oder `cd` davor, ohne
37
+ Gedankenstrich (–) und ohne Anführungszeichen innerhalb eines Textes in Anführungszeichen in den Argumenten. Der Agent
38
+ unter Windows erfährt das jetzt (AGENTS.md, `strom guide`, der Hinweis der Sandbox), mit dem Weg für einen längeren
39
+ Text: sein Befehl in einer Datei in `notes/`, ausgeführt mit `strom batch --file`. Die Beispiele von strom bieten
40
+ keinen Gedankenstrich zwischen Zahlen mehr an.
24
41
 
25
42
  ## 1.31.0
26
43
 
package/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ The changes of each version in short. The full notes and the install lines are o
7
7
 
8
8
  ## 1.31.1
9
9
 
10
- *In preparation: the betas up to 1.31.1-beta.2. The section is complete with the release.*
10
+ *In preparation: the betas up to 1.31.1-beta.3. The section is complete with the release.*
11
11
 
12
12
  - **A setting for archive viewers a browser draws slowly.** Where the browser draws a tab only about once a second
13
13
  (drawing without the graphics card, a remote desktop), the archive's viewer (ACTA PUBLICA) needs minutes for one
@@ -17,8 +17,23 @@ The changes of each version in short. The full notes and the install lines are o
17
17
  - **The preview of `strom source split` on a research sealed on another computer.** It was refused until the research
18
18
  was taken over there (`strom seal adopt`), though it only reads. Now the preview shows what the split would do, as
19
19
  any reading does; writing it (`--apply`) and its undo still wait for the research to be taken over.
20
+ - **The same for `strom sync <file>` and `strom input names`:** what a family tree would bring and which married names
21
+ would be added are shown on a research sealed on another computer too; writing them (`--apply`, `strom sync --app`,
22
+ `--undo`) still waits for the research to be taken over.
20
23
  - **`strom repair undo <stamp> --json` without a terminal** now answers as `strom repair` does: `status:
21
24
  "needs-consent"` with the command to run in a terminal, not only exit code 4.
25
+ - **An agent whose sandbox keeps strom from the settings or the research** (Codex on Windows) is now told so — the
26
+ command to run outside the sandbox — instead of "the history is off for this research, only the user turns it on",
27
+ which sent it after a setting that was on.
28
+ - **A task at which the agent's sandbox or permissions kept strom from the research in three sessions in a row is put
29
+ aside** (nothing recorded): with its reason and, for Codex, what helps (`strom task show`), and the run goes on with
30
+ the next task instead of starting the same one again run after run. A task woken again (`strom task wake`) counts from
31
+ then. Never more than one task at a time is put aside so — when the sandbox refuses everything, the run stops as
32
+ before. `strom error` shows which commands were refused, shortened and masked.
33
+ - **Codex on Windows lets strom out of its sandbox only as a plain command**: no `&`, pipe or `cd` before it, no dash
34
+ (–) and no quotes inside a quoted text in its arguments. The agent on Windows now hears so (AGENTS.md, `strom guide`,
35
+ the sandbox's hint), with the way for a longer text: its command in a file of `notes/`, run by `strom batch --file`.
36
+ strom's own examples no longer offer a dash between numbers.
22
37
 
23
38
  ## 1.31.0
24
39
 
package/CHANGELOG.pl.md CHANGED
@@ -7,7 +7,7 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
7
7
 
8
8
  ## 1.31.1
9
9
 
10
- *W przygotowaniu: bety do 1.31.1-beta.2. Sekcja będzie kompletna z wydaniem.*
10
+ *W przygotowaniu: bety do 1.31.1-beta.3. Sekcja będzie kompletna z wydaniem.*
11
11
 
12
12
  - **Ustawienie dla przeglądarek archiwów, które przeglądarka rysuje powoli.** Gdy przeglądarka rysuje kartę tylko mniej
13
13
  więcej raz na sekundę (rysowanie bez karty graficznej, zdalny pulpit), przeglądarka skanów archiwum (ACTA PUBLICA)
@@ -18,8 +18,23 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
18
18
  - **Podgląd `strom source split` w badaniu zapieczętowanym na innym komputerze.** Był odrzucany, dopóki badanie nie
19
19
  zostało przejęte (`strom seal adopt`), choć tylko czyta. Teraz podgląd pokazuje, co zrobiłby podział, jak każde
20
20
  czytanie; zapis (`--apply`) i jego cofnięcie nadal czekają na przejęcie badania.
21
+ - **Tak samo przy `strom sync <plik>` i `strom input names`:** co wniosłoby drzewo i które nazwiska po ślubie zostałyby
22
+ dodane, widać także w badaniu zapieczętowanym na innym komputerze; zapis (`--apply`, `strom sync --app`, `--undo`)
23
+ nadal czeka na przejęcie badania.
21
24
  - **`strom repair undo <znacznik> --json` bez terminala** odpowiada teraz jak `strom repair`: `status: "needs-consent"`
22
25
  z poleceniem do uruchomienia w terminalu, nie tylko kodem wyjścia 4.
26
+ - **Agent, któremu sandbox nie pozwala czytać ustawień ani zapisywać w badaniu** (Codex w Windows), dowiaduje się
27
+ teraz właśnie tego — z poleceniem do uruchomienia poza sandboxem — zamiast „historia jest w tym badaniu wyłączona,
28
+ włącza ją tylko użytkownik”, co kierowało go do ustawienia, które było włączone.
29
+ - **Zadanie, przy którym sandbox albo uprawnienia agenta trzy razy z rzędu nie dopuściły strom do badań,** zostaje
30
+ odłożone (nic nie zapisano): z powodem, a w przypadku Codexa także z tym, co pomaga (`strom task show`), a przebieg
31
+ idzie dalej następnym zadaniem, zamiast przebieg za przebiegiem zaczynać to samo. Zadanie wybudzone ponownie (`strom
32
+ task wake`) liczy się od wybudzenia. Tak odkłada się najwyżej jedno zadanie naraz — gdy sandbox odmawia wszystkiego,
33
+ przebieg kończy się jak dotąd. `strom error` pokazuje, które polecenia odrzucono, skrócone i zamaskowane.
34
+ - **Codex w Windows wypuszcza strom z sandboxu tylko jako zwykłe polecenie**: bez `&`, potoku ani `cd` przed nim, bez
35
+ półpauzy (–) i bez cudzysłowów wewnątrz tekstu w cudzysłowie w argumentach. Agent w Windows dowiaduje się teraz o tym
36
+ (AGENTS.md, `strom guide`, wskazówka sandboxu), razem ze sposobem na dłuższy tekst: jego polecenie w pliku w `notes/`,
37
+ uruchomione przez `strom batch --file`. Przykłady strom nie podsuwają już półpauzy między liczbami.
23
38
 
24
39
  ## 1.31.0
25
40
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "about": "Known terms of archives, shipped with strom: a host (with its subdomains) and the level its published terms give automated access — allowed < restricted (unknown: the terms not found, as restricted) < manual < forbidden. A level here is a confirmed one: a connector's allowed needs no person's word, a connector taken over no confirmation; the strictest of all that is known still holds (a connector, the tree's archive, robots.txt, a refusal stricter than this keeps it stricter). browserOnly: only a person's browser goes there. pace: the site's Crawl-delay, a floor (only ever slower). disallow: paths no automated request takes. scope: what the level covers. quoteFrom robots: the quote is the site's robots.txt (its address in terms), not its terms of use. automatedUse: the terms quoted expressly allow automated use (open data, any use, an interface for programs) — a Disallow of the site's robots.txt alone then yields, carefully (one request after another, at least its Crawl-delay, strom's User-Agent, its limits as ever); never a robots.txt that names AI agents, never the paths of disallow here. Only public terms, quoted word for word from the address given, on the day checked; a release adds an archive.",
2
+ "about": "Known terms of archives, shipped with strom: a host (with its subdomains) and the level its published terms give automated access — allowed < restricted (unknown: the terms not found, as restricted) < manual < forbidden. A level here is a confirmed one: a connector's allowed needs no person's word, a connector taken over no confirmation; the strictest of all that is known still holds (a connector, the tree's archive, robots.txt, a refusal stricter than this keeps it stricter). browserOnly: only a person's browser goes there. pace: the site's Crawl-delay, a floor (only ever slower). disallow: paths no automated request takes. scope: what the level covers. quoteFrom robots: the quote is the site's robots.txt (its address in terms), not its terms of use; quoteFrom reply: the quote is the archive's written reply to strom's author on the day replied — never public terms nor an address (terms, when given, is a public page of its own), and it never opens automated use. replied alone: the day of the archive's written reply the entry follows, its quote still its public terms at terms. automatedUse: the terms quoted expressly allow automated use (open data, any use, an interface for programs) — a Disallow of the site's robots.txt alone then yields, carefully (one request after another, at least its Crawl-delay, strom's User-Agent, its limits as ever); never a robots.txt that names AI agents, never the paths of disallow here. Only public terms, quoted word for word from the address given, on the day checked (or an archive's reply, quoteFrom reply, word for word); a release adds an archive.",
3
3
  "archives": [
4
4
  {
5
5
  "host": "mza.cz",
@@ -24,11 +24,11 @@
24
24
  "host": "ebadatelna.soapraha.cz",
25
25
  "name": "Státní oblastní archiv v Praze (eBadatelna)",
26
26
  "level": "manual",
27
- "terms": "https://ebadatelna.soapraha.cz/robots.txt",
28
- "quote": "# Ostatní roboty - zákaz stahování digitalizátů / User-agent: * / Disallow: /d/ / Disallow: /a/",
29
- "robots": "User-agent: rodokmen · Disallow: / · User-agent: ClaudeBot · Disallow: / · User-agent: GPTBot · Disallow: / · User-agent: Amazonbot · Disallow: / · User-agent: * · Disallow: /d/ · Disallow: /a/ (since 2 November 2026)",
30
- "checked": "2026-11-04",
31
- "quoteFrom": "robots",
27
+ "quote": "Pokud si ručně stáhnete snímek do svého PC, není důvod omezovat u takto staženého snímku použití AI agenta.",
28
+ "quoteFrom": "reply",
29
+ "replied": "2026-11-12",
30
+ "robots": "User-agent: rodokmen · Disallow: / · User-agent: ClaudeBot · Disallow: / · User-agent: GPTBot · Disallow: / · User-agent: Amazonbot · Disallow: / · User-agent: * · Disallow: /d/ · Disallow: /a/ (since 2 November 2026; https://ebadatelna.soapraha.cz/robots.txt)",
31
+ "checked": "2026-11-12",
32
32
  "browserOnly": true,
33
33
  "termsPage": "https://soapraha.gov.cz/castokladenedotazy/",
34
34
  "termsPageSays": "Prohlížení digitálních studijních kopií je umožněno všem bez nutnosti registrace. Registrovaní uživatelé však mají navíc možnost stahování celých archiválií v ZIP balíčcích",
@@ -36,7 +36,7 @@
36
36
  "/d/",
37
37
  "/a/"
38
38
  ],
39
- "scope": "by hand only: its robots.txt names AI agents (ClaudeBot, GPTBot) and keeps every robot off its digitised records (/d/, /a/) — not through the agent's browser either; the person opens and saves the image, the agent reads the saved file"
39
+ "scope": "by hand only: its robots.txt names AI agents (ClaudeBot, GPTBot) and keeps every robot off its digitised records (/d/, /a/) — not through the agent's browser either; the person opens and saves the image, the agent reads the saved file (the archive's reply of 2026-11-12: no reason to restrict an AI agent's use of an image the person saved by hand; its technical measures are not final); the permanent link of an image is the address in the browser's address bar while it is shown — cite that"
40
40
  },
41
41
  {
42
42
  "host": "digi.ceskearchivy.cz",
@@ -44,6 +44,7 @@
44
44
  "level": "manual",
45
45
  "terms": "https://digi.ceskearchivy.cz/Uvod",
46
46
  "quote": "Snímky jsou poskytnuty pouze za účelem on-line prohlížení v DigiArchivu SOA v Třeboni, jejich kopírování, distribuování, prodávání, využití v jiných projektech a na jiných stránkách je zakázáno.",
47
+ "replied": "2026-11-05",
47
48
  "robots": "403 Forbidden for strom's User-Agent, robots.txt and the terms page too (2026-11-03); before: Allow: /DA* · Disallow: /help/* · /pages/* · /oai/* · /Assets/*",
48
49
  "disallow": [
49
50
  "/help/",
@@ -669,6 +670,7 @@
669
670
  "level": "manual",
670
671
  "terms": "https://digi.ceskearchivy.cz/Uvod",
671
672
  "quote": "Snímky jsou poskytnuty pouze za účelem on-line prohlížení v DigiArchivu SOA v Třeboni, jejich kopírování, distribuování, prodávání, využití v jiných projektech a na jiných stránkách je zakázáno.",
673
+ "replied": "2026-11-05",
672
674
  "robots": "User-agent: * · Disallow: /administrator/ · /images/ · /media/ … (Joomla default)",
673
675
  "scope": "the archive's information pages only; its scans are on digi.ceskearchivy.cz (a person's browser only, selected images by hand only); the research rules and price lists lie under /images/, which robots.txt keeps off (the terms quoted as read on 2026-11-05)",
674
676
  "checked": "2026-11-05"
@@ -1491,7 +1493,9 @@
1491
1493
  "robots": "User-agent: * · Disallow: /wp-admin",
1492
1494
  "scope": "its website, the inventories (XML/HTML) of the registers of the former eastern territories (fonds 298–557) and their links to the image galleries on agadd.home.net.pl and agadd2.home.net.pl; the galleries' scans may be used without restriction, downloaded and used freely, the place of the originals given (the archive's reply of 2026-11-06, quoted); cite the original's place, as the archive asks: \"Archiwum Główne Akt Dawnych, <zespół>, sygn. <n>, s./k. <n>\" — a gallery's address only beside it, never in its place",
1493
1495
  "checked": "2026-11-06",
1494
- "quote": "z galerii skanów dostępnej na stronie internetowej Archiwum Głównego Akt Dawnych może Pan korzystać w sposób nieograniczony. Skany można pobierać i dowolnie wykorzystywać podając miejsce przechowywania oryginałów, tzn. Archiwum Główne Akt Dawnych, zespół, sygnatura, stron/karta."
1496
+ "quote": "z galerii skanów dostępnej na stronie internetowej Archiwum Głównego Akt Dawnych może Pan korzystać w sposób nieograniczony. Skany można pobierać i dowolnie wykorzystywać podając miejsce przechowywania oryginałów, tzn. Archiwum Główne Akt Dawnych, zespół, sygnatura, stron/karta.",
1497
+ "quoteFrom": "reply",
1498
+ "replied": "2026-11-06"
1495
1499
  },
1496
1500
  {
1497
1501
  "host": "agadd.home.net.pl",
@@ -1500,7 +1504,9 @@
1500
1504
  "robots": "none (404)",
1501
1505
  "scope": "static galleries of the registers of the former eastern territories (Roman and Greek Catholic, Protestant, Jewish), linked from AGAD's inventories: one image at a time at a slow pace, never a whole book (strom's own rule; the archive's reply of 2026-11-06 sets no limit and lets the scans be downloaded and used freely); registers younger than 100 (births) or 80 years (marriages, deaths) are not in them; cite the original's place, as the archive asks: \"Archiwum Główne Akt Dawnych, <zespół>, sygn. <n>, s./k. <n>\" — a gallery's address only beside it, never in its place",
1502
1506
  "checked": "2026-11-06",
1503
- "quote": "z galerii skanów dostępnej na stronie internetowej Archiwum Głównego Akt Dawnych może Pan korzystać w sposób nieograniczony. Skany można pobierać i dowolnie wykorzystywać podając miejsce przechowywania oryginałów, tzn. Archiwum Główne Akt Dawnych, zespół, sygnatura, stron/karta."
1507
+ "quote": "z galerii skanów dostępnej na stronie internetowej Archiwum Głównego Akt Dawnych może Pan korzystać w sposób nieograniczony. Skany można pobierać i dowolnie wykorzystywać podając miejsce przechowywania oryginałów, tzn. Archiwum Główne Akt Dawnych, zespół, sygnatura, stron/karta.",
1508
+ "quoteFrom": "reply",
1509
+ "replied": "2026-11-06"
1504
1510
  },
1505
1511
  {
1506
1512
  "host": "agadd2.home.net.pl",
@@ -1508,7 +1514,9 @@
1508
1514
  "level": "unknown",
1509
1515
  "scope": "static galleries of registers linked from AGAD's inventories: one image at a time at a slow pace, never a whole book (strom's own rule; the archive's reply of 2026-11-06 sets no limit and lets the scans be downloaded and used freely); cite the original's place, as the archive asks: \"Archiwum Główne Akt Dawnych, <zespół>, sygn. <n>, s./k. <n>\" — a gallery's address only beside it, never in its place",
1510
1516
  "checked": "2026-11-06",
1511
- "quote": "z galerii skanów dostępnej na stronie internetowej Archiwum Głównego Akt Dawnych może Pan korzystać w sposób nieograniczony. Skany można pobierać i dowolnie wykorzystywać podając miejsce przechowywania oryginałów, tzn. Archiwum Główne Akt Dawnych, zespół, sygnatura, stron/karta."
1517
+ "quote": "z galerii skanów dostępnej na stronie internetowej Archiwum Głównego Akt Dawnych może Pan korzystać w sposób nieograniczony. Skany można pobierać i dowolnie wykorzystywać podając miejsce przechowywania oryginałów, tzn. Archiwum Główne Akt Dawnych, zespół, sygnatura, stron/karta.",
1518
+ "quoteFrom": "reply",
1519
+ "replied": "2026-11-06"
1512
1520
  },
1513
1521
  {
1514
1522
  "host": "archiwum.mkw.pl",
@@ -643,6 +643,8 @@
643
643
  "ui.run.back": "; {task} je zpět ve frontě",
644
644
  "ui.run.start.session": "▶ {session} · {task} {what}",
645
645
  "ui.run.parked": " · {task} odložen: {n} sezení za sebou nic nezapsalo",
646
+ "ui.run.parked.denied": " · {task} odložen: {n} sezení za sebou sandbox nebo oprávnění agenta nepustily strom k výzkumu – ostatní úkoly jdou dál; k prohlédnutí: strom task show {task}",
647
+ "ui.run.parked.denied.codex": " sandbox Codexu: mimo sandbox jde strom jen jako samostatný příkaz (bez roury, bez cd, bez shellu kolem: pravidla výzkumu v .codex/rules/strom.rules, obnoví je strom agents sync) a na Windows zůstává .git v sandboxu zavřený. Codex na úrovni bez sandboxu, nebo jiný agent, je volba v nastavení stromu",
646
648
  "ui.run.denied": " · oprávnění odmítla {n}×: {what}",
647
649
  "ui.run.refused": " · strom odmítl {n}× (limit {per, plural, one {# webového požadavku} other {# webových požadavků}} na jeden server v sezení nebo limit serveru): {what}",
648
650
  "ui.run.recover": " · spojení agenta selhalo ({why}) — jeho sezení pokračuje za {s} s ({n}/{max})",
@@ -3305,6 +3307,7 @@
3305
3307
  "ui.archive.terms.known": "Podmínky: „{quote}“ ({terms})",
3306
3308
  "ui.archive.terms.connector": "Podmínky podle stahovače: {quote} ({terms})",
3307
3309
  "ui.archive.terms.none": "Podmínky archivu zatím nejsou známé (stahovač ještě nikdo nepotvrdil).",
3310
+ "ui.archive.terms.reply": "Písemná odpověď archivu ({date}): „{quote}“",
3308
3311
  "ui.archive.terms.robots": "Jeho robots.txt: „{quote}“ ({terms}) – žádný automatický přístup jinak než přes prohlížeč člověka.",
3309
3312
  "ui.archive.terms.robots.none": "Jeho robots.txt nedovoluje automatický přístup ({terms}) – jen přes prohlížeč člověka.",
3310
3313
  "ui.archive.name": "{title} ({host})",
@@ -643,6 +643,8 @@
643
643
  "ui.run.back": "; {task} ist zurück in der Warteschlange",
644
644
  "ui.run.start.session": "▶ {session} · {task} {what}",
645
645
  "ui.run.parked": " · {task} zurückgestellt: {n} Sitzungen hintereinander haben nichts erfasst",
646
+ "ui.run.parked.denied": " · {task} zurückgestellt: {n} Sitzungen hintereinander ließen die Sandbox oder die Berechtigungen des Agenten strom nicht an die Forschung – die anderen Aufgaben gehen weiter; zum Ansehen: strom task show {task}",
647
+ "ui.run.parked.denied.codex": " die Sandbox von Codex: außerhalb der Sandbox läuft strom nur als eigener Befehl (ohne Pipe, ohne cd, ohne Shell darum: die Regeln der Forschung in .codex/rules/strom.rules, erneuert mit strom agents sync), und unter Windows bleibt .git darin geschlossen. Codex auf der Stufe ohne Sandbox oder ein anderer Agent ist eine Wahl in den Einstellungen von strom",
646
648
  "ui.run.denied": " · Berechtigungen verweigert {n}×: {what}",
647
649
  "ui.run.refused": " · strom hat {n}× abgelehnt (die Grenze von {per, plural, one {# Webanfrage} other {# Webanfragen}} an einen Server in einer Sitzung oder die des Servers): {what}",
648
650
  "ui.run.recover": " · die Verbindung des Agenten ist abgebrochen ({why}) — seine Sitzung geht in {s} s weiter ({n}/{max})",
@@ -3305,6 +3307,7 @@
3305
3307
  "ui.archive.terms.known": "Bedingungen: „{quote}“ ({terms})",
3306
3308
  "ui.archive.terms.connector": "Bedingungen laut Downloader: {quote} ({terms})",
3307
3309
  "ui.archive.terms.none": "Die Bedingungen des Archivs sind noch nicht bekannt (der Downloader ist noch nicht bestätigt).",
3310
+ "ui.archive.terms.reply": "Schriftliche Antwort des Archivs ({date}): „{quote}“",
3308
3311
  "ui.archive.terms.robots": "Seine robots.txt: „{quote}“ ({terms}) – kein automatischer Zugriff außer über den Browser eines Menschen.",
3309
3312
  "ui.archive.terms.robots.none": "Seine robots.txt erlaubt keinen automatischen Zugriff ({terms}) – nur über den Browser eines Menschen.",
3310
3313
  "ui.archive.name": "{title} ({host})",
@@ -643,6 +643,8 @@
643
643
  "ui.run.back": "; {task} jest z powrotem w kolejce",
644
644
  "ui.run.start.session": "▶ {session} · {task} {what}",
645
645
  "ui.run.parked": " · {task} odłożone: {n, plural, one {# sesja z rzędu nic nie zapisała} few {# sesje z rzędu nic nie zapisały} many {# sesji z rzędu nic nie zapisało} other {# sesji z rzędu nic nie zapisało}}",
646
+ "ui.run.parked.denied": " · {task} odłożone: przez {n, plural, one {# sesję} few {# sesje} many {# sesji} other {# sesji}} z rzędu sandbox albo uprawnienia agenta nie dopuszczały strom do badań – pozostałe zadania idą dalej; do sprawdzenia: strom task show {task}",
647
+ "ui.run.parked.denied.codex": " sandbox Codexa: poza sandboxem strom działa tylko jako osobne polecenie (bez potoku, bez cd, bez powłoki wokół: reguły badań w .codex/rules/strom.rules, odnawia je strom agents sync), a w Windows .git pozostaje w nim zamknięty. Codex na poziomie bez sandboxu albo inny agent to wybór w ustawieniach strom",
646
648
  "ui.run.denied": " · uprawnienia odmówiły {n}×: {what}",
647
649
  "ui.run.refused": " · strom odmówił {n}× (limit {per, plural, one {# zapytania internetowego} few {# zapytań internetowych} many {# zapytań internetowych} other {# zapytań internetowych}} do jednego serwera w sesji albo limit serwera): {what}",
648
650
  "ui.run.recover": " · połączenie agenta zostało przerwane ({why}) — jego sesja będzie kontynuowana za {s} s ({n}/{max})",
@@ -3305,6 +3307,7 @@
3305
3307
  "ui.archive.terms.known": "Warunki: „{quote}” ({terms})",
3306
3308
  "ui.archive.terms.connector": "Warunki według programu pobierającego: {quote} ({terms})",
3307
3309
  "ui.archive.terms.none": "Warunki archiwum nie są jeszcze znane (programu pobierającego nikt jeszcze nie potwierdził).",
3310
+ "ui.archive.terms.reply": "Pisemna odpowiedź archiwum ({date}): „{quote}”",
3308
3311
  "ui.archive.terms.robots": "Jego robots.txt: „{quote}” ({terms}) – żaden automatyczny dostęp inaczej niż przez przeglądarkę człowieka.",
3309
3312
  "ui.archive.terms.robots.none": "Jego robots.txt nie pozwala na automatyczny dostęp ({terms}) – tylko przez przeglądarkę człowieka.",
3310
3313
  "ui.archive.name": "{title} ({host})",
@@ -24,11 +24,13 @@ import { CODEX_HOOKS, codexHooks } from "../core/codexhook.js";
24
24
  import { claudeShellHooks, grokShellHook } from "../core/bridgeguard.js";
25
25
  import { claudeDelegateHooks } from "../core/delegate.js";
26
26
  import { powershellUtf8Rule, putShim } from "../core/self.js";
27
+ import { codexWindowsRule } from "../core/writable.js";
27
28
  export const MARKER = "<!-- strom: generated above this line (strom agents sync); your own notes below are kept -->";
28
29
  export function agentsMd(tree, platform = process.platform) {
29
30
  const lang = langName(tree.config.lang);
30
31
  // (Windows only: written on the computer the agent works on, as its other files)
31
32
  const ps = powershellUtf8Rule("`", platform);
33
+ const codexWin = codexWindowsRule("`", platform);
32
34
  // the Strom app's address as strom app opens it now (the beta its beta, strom.app.url where it says another)
33
35
  const app = agentAppUrl(tree.env);
34
36
  // who decides the hypotheses (hypotheses.decide — the user's; refreshed when a conversation or a run starts)
@@ -83,7 +85,7 @@ the researcher; \`strom\` is your only way to read and change the research.
83
85
  7. Run strom commands on their own — no pipes (\`| head\`, \`| grep\`), no
84
86
  redirection (\`2>&1\`), no \`cd\` before them: output is already short,
85
87
  listings take \`--limit\` and \`--page\`, and such commands may be refused by
86
- your permissions (Codex's sandbox lets strom out only on its own).${ps ? `\n ${ps}` : ""}
88
+ your permissions (Codex's sandbox lets strom out only on its own).${ps ? `\n ${ps}` : ""}${codexWin ? `\n ${codexWin}` : ""}
87
89
  8. Other agents may work on this tree too (Claude Code, Codex, Antigravity,
88
90
  OpenCode, Grok — the user's choice). \`strom\` shows who is working now; never take a task
89
91
  another one has started.
@@ -61,7 +61,7 @@ export async function decideArchive(ctx, run, lang, root, host, q, all) {
61
61
  const target = c && hosts.length > 1 && hosts.some((h) => !q?.archiveHosts?.includes(h)) ? c.name : host;
62
62
  out("");
63
63
  out(` ${t("ui.archive.item", { title, host: hosts.join(", ") })}`);
64
- out(` ${termsText(lang, ctx.env, { host, ...(a?.quote ? { quote: a.quote } : q?.quote ? { quote: q.quote } : {}), ...(a?.terms ?? q?.terms ? { terms: (a?.terms ?? q?.terms) } : {}), ...(a?.quoteBy ? { quoteBy: a.quoteBy } : q?.quoteBy ? { quoteBy: q.quoteBy } : {}) })}`);
64
+ out(` ${termsText(lang, ctx.env, { host, ...(a?.quote ? { quote: a.quote } : q?.quote ? { quote: q.quote } : {}), ...(a?.terms ?? q?.terms ? { terms: (a?.terms ?? q?.terms) } : {}), ...(a?.quoteBy ? { quoteBy: a.quoteBy, ...(a.replied ? { replied: a.replied } : {}) } : q?.quoteBy ? { quoteBy: q.quoteBy, ...(q.replied ? { replied: q.replied } : {}) } : {}) })}`);
65
65
  const tasks = tree && !isArchive(tree) ? (q?.kind === "permission" ? tasksStanding(tree, q) : [...new Set(hosts.flatMap((h) => tasksWaitingOn(tree, h).map((x) => x.id)))]) : [];
66
66
  if (tasks.length)
67
67
  out(` ${t("ui.archive.item.tasks", { ids: tasks.join(", ") })}`);
package/dist/cli/ui.js CHANGED
@@ -620,6 +620,8 @@ export const UI = {
620
620
  "ui.run.back": "; {task} is back in the queue",
621
621
  "ui.run.start.session": "▶ {session} · {task} {what}",
622
622
  "ui.run.parked": " · {task} parked: {n} sessions in a row recorded nothing",
623
+ "ui.run.parked.denied": " · {task} parked: in {n} sessions in a row the agent's sandbox or permissions kept strom from the research — the other tasks go on; to look into: strom task show {task}",
624
+ "ui.run.parked.denied.codex": " Codex's sandbox: strom goes outside it only as a command of its own (no pipe, no cd, no shell around it: the research's rules in .codex/rules/strom.rules, renewed by strom agents sync), and on Windows .git stays closed inside it. Codex at the level without the sandbox, or another agent, is a choice in strom's settings",
623
625
  "ui.run.denied": " · permissions refused {n}×: {what}",
624
626
  "ui.run.refused": " · strom refused {n}× (its limit of {per, plural, one {# web request} other {# web requests}} to one server in a session, or the server's own): {what}",
625
627
  "ui.run.recover": " · the agent's connection failed ({why}) — its session goes on in {s} s ({n}/{max})",
@@ -3139,6 +3141,7 @@ export const UI = {
3139
3141
  "ui.archive.terms.known": "Terms: “{quote}” ({terms})",
3140
3142
  "ui.archive.terms.connector": "Terms as its downloader reads them: {quote} ({terms})",
3141
3143
  "ui.archive.terms.none": "The archive's terms are not known yet (nobody has confirmed its downloader).",
3144
+ "ui.archive.terms.reply": "The archive's written reply ({date}): “{quote}”",
3142
3145
  "ui.archive.terms.robots": "Its robots.txt: “{quote}” ({terms}) – no automated access other than through a person's browser.",
3143
3146
  "ui.archive.terms.robots.none": "Its robots.txt allows no automated access ({terms}) – only through a person's browser.",
3144
3147
  "ui.archive.name": "{title} ({host})",
@@ -278,7 +278,7 @@ register({
278
278
  { name: "by", type: "string", value: "<who>", description: "main (default), reader, user" },
279
279
  { name: "note", type: "string", value: "<text>", description: "what was illegible, what is left" },
280
280
  ],
281
- examples: ['strom search add "Křty Novák 1903–1907" --recordset B0001 --years 1903-1907 --surname Novák --method page-by-page --result negative --task T0001'],
281
+ examples: ['strom search add "Křty Novák 1903-1907" --recordset B0001 --years 1903-1907 --surname Novák --method page-by-page --result negative --task T0001'],
282
282
  run(ctx, { args, opts }) {
283
283
  const tree = ctx.tree();
284
284
  const recordsets = csvOpt(opts.recordset).map((b) => requireRecord(tree, b, "recordset").id);
@@ -19,7 +19,7 @@ import { Tree } from "../core/tree.js";
19
19
  import { syncAgentFiles } from "../agents/files.js";
20
20
  import { currentSession } from "../core/session.js";
21
21
  import { noteSessionWait, wakeForArchive } from "../core/archivewait.js";
22
- import { connectorFor, levelWords, waysOffered, wokenLines } from "../core/archiveasks.js";
22
+ import { connectorFor, levelWords, replyText, waysOffered, wokenLines } from "../core/archiveasks.js";
23
23
  import { claudeHere } from "../cli/menu-parts.js";
24
24
  import { shippedTerms, within } from "../core/knownterms.js";
25
25
  import { acceptConnectors, allows, archiveLevel, keepReadings, askLater, claimOf, connectorLevels, grantWay, hostOf, humanPace, keepNetVerdict, keyHost, latchedPace, LEVELS, loadArchives, pendingQuestions, questionHosts, rank, settlePending, revokeWay, setFloor, strictest, takenOverWaiting, windowShown, WAYS, } from "../core/terms.js";
@@ -214,6 +214,8 @@ export function humanPaces(ctx, levels, activity, route) {
214
214
  }
215
215
  /** What the person reads of an archive's terms: strom's quote with its address, else the connector's reading (said so). */
216
216
  function termsLine(lang, a) {
217
+ if (a.quote && a.quoteBy === "reply")
218
+ return replyText(lang, a.quote, a.replied);
217
219
  if (a.quoteBy === "robots") {
218
220
  const text = ui(lang, a.quote ? "ui.archive.terms.robots" : "ui.archive.terms.robots.none", { quote: a.quote ?? "", terms: a.terms ?? "" });
219
221
  return a.terms ? text : text.replace(/\s*\(\)/u, "");
@@ -1841,14 +1841,20 @@ function knownTermsOf(ctx, hosts) {
1841
1841
  if (!k || seen.has(`${k.name ?? k.host} ${k.quote ?? ""}`))
1842
1842
  continue;
1843
1843
  seen.add(`${k.name ?? k.host} ${k.quote ?? ""}`);
1844
- data.push({ host: k.host, ...(k.name ? { name: k.name } : {}), level: k.level, ...(k.quote ? { quote: k.quote } : {}), from: k.quoteFrom === "robots" ? "robots" : "terms", ...(k.terms ? { terms: k.terms } : {}), ...(k.scope ? { scope: k.scope } : {}), ...(k.checked ? { checked: k.checked } : {}) });
1844
+ data.push({ host: k.host, ...(k.name ? { name: k.name } : {}), level: k.level, ...(k.quote ? { quote: k.quote } : {}), from: k.quoteFrom ?? "terms", ...(k.replied ? { replied: k.replied } : {}), ...(k.terms ? { terms: k.terms } : {}), ...(k.scope ? { scope: k.scope } : {}), ...(k.checked ? { checked: k.checked } : {}) });
1845
1845
  }
1846
1846
  if (!data.length)
1847
1847
  return undefined;
1848
1848
  return {
1849
1849
  text: lines(...data.flatMap((k) => [
1850
1850
  `strom knows the terms of ${k.name ?? k.host}: ${k.level}${k.checked ? ` (checked ${k.checked})` : ""}`,
1851
- k.quote ? ` "${k.quote}" — ${k.from === "robots" ? "its robots.txt" : "its terms"}${k.terms ? `: ${k.terms}` : ""}` : k.terms ? ` its terms: ${k.terms}` : undefined,
1851
+ k.quote
1852
+ ? k.from === "reply"
1853
+ ? ` "${k.quote}" — the archive's written reply${k.replied ? ` of ${k.replied}` : ""} (not its published terms)${k.terms ? `; its terms: ${k.terms}` : ""}`
1854
+ : ` "${k.quote}" — ${k.from === "robots" ? "its robots.txt" : "its terms"}${k.terms ? `: ${k.terms}` : ""}${k.replied ? ` (named in the archive's written reply of ${k.replied})` : ""}`
1855
+ : k.terms
1856
+ ? ` its terms: ${k.terms}`
1857
+ : undefined,
1852
1858
  k.scope ? ` what it covers: ${k.scope}` : undefined,
1853
1859
  ]), ` start connector.json's policy from them (terms, termsSummary, automation) — robots.txt and official exports still yours to read (DISCOVERY.md, step 1)`),
1854
1860
  data,
@@ -259,7 +259,7 @@ async function makeReport(ctx, opts) {
259
259
  git: () => gitArea(r),
260
260
  check: () => checkArea(ctx.tree()),
261
261
  fetches: () => fetchesArea(r, sinceMs, masker),
262
- ...(archive ? {} : { sessions: () => sessionsArea(r, sinceMs) }),
262
+ ...(archive ? {} : { sessions: () => sessionsArea(r, sinceMs, masker) }),
263
263
  }));
264
264
  }
265
265
  else if (others.length) {
@@ -280,7 +280,7 @@ async function makeReport(ctx, opts) {
280
280
  else if (a === "fetch")
281
281
  fixed.push(readArea("fetch", masker, () => (root ? { fetches: fetchesArea(root, 0, masker) } : { research: false })));
282
282
  else if (a === "agent")
283
- fixed.push(readArea("agent", masker, () => (root ? sessionsArea(root, 0) : { research: false })));
283
+ fixed.push(readArea("agent", masker, () => (root ? sessionsArea(root, 0, masker) : { research: false })));
284
284
  }
285
285
  // the logs and commands, within their sizes: --about gives its own more room; past the report's size, less for all
286
286
  const base = {
@@ -7,6 +7,7 @@ import { langName } from "../core/lang.js";
7
7
  import { appSite } from "../core/stromapp.js";
8
8
  import { WEB_PER_HOST, webRuleLines } from "../core/web.js";
9
9
  import { powershellUtf8Rule } from "../core/self.js";
10
+ import { codexWindowsRule } from "../core/writable.js";
10
11
  /**
11
12
  * The history of the places in a conversation (spec 020 K2.8): only in the guide of a research whose user has it on —
12
13
  * otherwise the guide says nothing of it (its commands are hidden, behind the experiment).
@@ -34,6 +35,7 @@ export const HISTORY_GUIDE = `THE HISTORY OF THE PLACES (the user has it on: wha
34
35
  /** The guide; appUrl: the Strom app's address it names — the one `strom app` opens (appUrlShown); perHost: web.perHost here; history: the user has the history of the places on here. */
35
36
  export function guideText(lang, appUrl, perHost = WEB_PER_HOST, platform = process.platform, history = false, decide = "person") {
36
37
  const ps = powershellUtf8Rule("", platform);
38
+ const codexWin = codexWindowsRule("", platform);
37
39
  const language = lang
38
40
  ? `The research language of this tree is ${langName(lang)} (${lang}): talk to the user in ${langName(lang)} and write notes, tasks and stories in ${langName(lang)}. Keep transcripts of records in their original language; a record in another language or script gets a translation into ${langName(lang)} too (--translation).`
39
41
  : "Talk to the user in their language. Set it as the research language: strom setup --lang <code> (cs, en, de, pl, …).";
@@ -380,7 +382,7 @@ A PROBLEM WITH STROM (the user reports one, or wants to "send the error")
380
382
 
381
383
  OUTPUT AND ERRORS
382
384
  - One line per record, IDs first. Read the text; add --json only to parse.
383
- - Listings are paged (--limit, --page). Do not pipe strom output.${ps ? `\n- ${ps}` : ""}
385
+ - Listings are paged (--limit, --page). Do not pipe strom output.${ps ? `\n- ${ps}` : ""}${codexWin ? `\n- ${codexWin}` : ""}
384
386
  - People can be named by ID (P0001) or name ("Jan Novák", no diacritics ok).
385
387
  An ambiguous name lists candidates (exit 2) — then use the ID.
386
388
  - Every error ends with "→ <what to run next>".
@@ -539,6 +539,8 @@ register({
539
539
  group: "inputs",
540
540
  tree: true,
541
541
  writes: true,
542
+ // what it would add reads only: anybody's, also on a research sealed on another computer
543
+ writesWith: ({ opts }) => !!opts.apply || !!opts.undo,
542
544
  description: "strom before 1.16 left out the married names other programs write as _MARNM (MyHeritage, Legacy, PAF). This reads\n" +
543
545
  "the file the research was started from again — the input it keeps — and finds the people imported from it by the\n" +
544
546
  "IDs the import kept (nobody else). Only names of the married kind are added, beside the name each person is shown\n" +
@@ -874,7 +874,7 @@ register({
874
874
  { name: "n", description: "the note's number (strom note list <id>; a fact's note is 1)", required: true },
875
875
  { name: "text", description: "the corrected note", required: true },
876
876
  ],
877
- examples: ['strom note edit T0002 1 "Book 12 searched 1801–1830: no entry" --reason "the years were written wrong"'],
877
+ examples: ['strom note edit T0002 1 "Book 12 searched 1801-1830: no entry" --reason "the years were written wrong"'],
878
878
  run(ctx, { args, opts }) {
879
879
  const tree = ctx.tree();
880
880
  const id = noteHolderId(tree, args[0]);
@@ -202,7 +202,7 @@ register({
202
202
  { name: "no-index", type: "boolean", description: `browse the images although an index of the book's parish and years is known (read already, or of no use here) — from ${INDEX_FIRST_DEFAULT} images on (the person's answer: strom media calibrate --questions) strom names the index first, and a session of strom run needs this to go on` },
203
203
  ],
204
204
  examples: [
205
- 'strom read B0001 --images 40-69 --question "Every baptism of the surname Novák (Nowak, Nowack) in 1820–1824: the child, date, house, both parents and their parents"',
205
+ 'strom read B0001 --images 40-69 --question "Every baptism of the surname Novák (Nowak, Nowack) in 1820-1824: the child, date, house, both parents and their parents"',
206
206
  'strom read B0001 --images 40-69 --until-found --question "The baptism of Jan Novák, born about 1822 in house 12, son of Josef: the entry whole"',
207
207
  'strom read B0001:2 --blind --crop 0.05,0.40,0.45,0.18 --question "Transcribe this entry completely; mark what is uncertain with [?]"',
208
208
  ],
@@ -6,7 +6,7 @@
6
6
  // sessions not a single token is spent.
7
7
  import { RUN_TURNS } from "../core/queue.js";
8
8
  import { queueVerify } from "../core/verify.js";
9
- import { opsLogsOf } from "../core/opslog.js";
9
+ import { opsLogs, opsLogsOf } from "../core/opslog.js";
10
10
  import fs from "node:fs";
11
11
  import { spawnSync } from "node:child_process";
12
12
  import path from "node:path";
@@ -17,6 +17,7 @@ import { counted, lines, shellArg, table, truncate } from "../cli/format.js";
17
17
  import { NeedsConsentError, UsageError, StromError } from "../core/errors.js";
18
18
  import { closeSession, costPartial, currentSession, openSessions, othersAtWork, sessionCost, sessionNote, startSession, whichSession, withReaders } from "../core/session.js";
19
19
  import { reviveLive } from "../core/live.js";
20
+ import { cutDenied, DENIED_KEPT, DENIED_KEPT_CHARS } from "../core/report.js";
20
21
  import { revivePhone } from "../core/phone.js";
21
22
  import { buildBrief } from "../brief/brief.js";
22
23
  import { sandboxOfRun } from "../core/sandbox.js";
@@ -696,6 +697,24 @@ function parseUntil(v) {
696
697
  d.setDate(d.getDate() + 1);
697
698
  return d.getTime();
698
699
  }
700
+ /**
701
+ * The commands refused in a session, kept for strom error alone (K031: which of strom's commands the agent's sandbox
702
+ * refused — the count alone in the session's metrics said nothing of them): beside its log in .strom/runs, never in
703
+ * data/ (the research is committed and synced) — at most DENIED_KEPT, each cut to DENIED_KEPT_CHARS (core/report.ts
704
+ * runDenied masks each whole as a log's line, then cuts it for the report).
705
+ * Diagnostics only: a file that cannot be written is left out.
706
+ */
707
+ function keepDenied(root, session, denied, whole) {
708
+ const kept = denied.slice(0, DENIED_KEPT).map((d, i) => ({ command: cutDenied(d, DENIED_KEPT_CHARS), strom: deniedStrom(d, whole.has(i)), whole: whole.has(i) }));
709
+ try {
710
+ const dir = path.join(root, ".strom", "runs");
711
+ fs.mkdirSync(dir, { recursive: true });
712
+ fs.writeFileSync(path.join(dir, `${session}.denied.json`), JSON.stringify(kept, null, 2) + "\n", "utf8");
713
+ }
714
+ catch {
715
+ // (diagnostics only)
716
+ }
717
+ }
699
718
  /** Sessions in a row that worked on a task without writing anything to the research before it is parked. */
700
719
  const MAX_IDLE_SESSIONS = 2;
701
720
  /** How many research writes a session made (bookkeeping of sessions and tasks does not count). */
@@ -731,6 +750,79 @@ function idleSessions(tree, taskId) {
731
750
  }
732
751
  return n;
733
752
  }
753
+ /**
754
+ * Sessions in a row on a task in which strom was refused to the agent (its permissions, its sandbox) and nothing was
755
+ * recorded, before the task is parked and the run goes on with the next one (K031: Codex's sandbox on Windows kept
756
+ * strom from .git, and run after run started the same task — 14 in a row). Three, the maintainer's choice: once or
757
+ * twice may be a passing refusal (a command the agent wrote another way, a folder trusted since), the person meanwhile
758
+ * told by each run's stop; a third in a row is the task's way of being worked on here — the others are tried.
759
+ */
760
+ const MAX_DENIED_SESSIONS = 3;
761
+ /**
762
+ * The last sessions on a task strom was refused in that recorded nothing, newest first (ended from outside: skipped) —
763
+ * since the task was last parked or woken: a task the person woke (its agent's trust or rules changed meanwhile) starts
764
+ * its count again, one passing refusal never parks it at once (K031).
765
+ */
766
+ function deniedSessions(tree, taskId) {
767
+ const sessions = tree
768
+ .list("session")
769
+ .filter((x) => x.task === taskId && x.state !== "open")
770
+ .sort((a, b) => (b.ended ?? b.updated).localeCompare(a.ended ?? a.updated));
771
+ const row = [];
772
+ for (const x of sessions) {
773
+ if (x.endedBy === "user" || x.endedBy === "run" || x.endedBy === "chat" || x.summary === BY_USER || x.summary === RUN_GONE)
774
+ continue;
775
+ if ((x.metrics?.stromDenied ?? 0) === 0 || sessionWrites(tree, x.id) > 0)
776
+ break;
777
+ row.push(x);
778
+ }
779
+ if (!row.length)
780
+ return 0;
781
+ const since = lastParkOrWake(tree, taskId, row.reduce((at, x) => (x.started < at ? x.started : at), row[0].started));
782
+ return since ? row.filter((x) => x.started > since).length : row.length;
783
+ }
784
+ /**
785
+ * When a task was last parked or woken (task.park, task.wake: by a run, the person, an archive's decision), from the
786
+ * operation logs of the days since `from` alone (a session strom was refused in is of this strom's, never older than its
787
+ * daily logs) — undefined when not since then.
788
+ */
789
+ function lastParkOrWake(tree, taskId, from) {
790
+ const day = from.slice(0, 10);
791
+ let last;
792
+ for (const file of opsLogs(tree.dataDir)) {
793
+ const m = /[\\/]ops[\\/](\d{4}-\d{2})[\\/](\d{2})[\\/][^\\/]+$/.exec(file);
794
+ if (!m || `${m[1]}-${m[2]}` < day)
795
+ continue;
796
+ for (const line of fs.readFileSync(file, "utf8").split("\n")) {
797
+ if (!line.includes(taskId) || !/"op":"task\.(?:park|wake)"/.test(line))
798
+ continue;
799
+ try {
800
+ const op = JSON.parse(line);
801
+ if (typeof op.at !== "string" || !Array.isArray(op.targets) || !op.targets.includes(taskId))
802
+ continue;
803
+ if (op.at >= from && (!last || op.at > last))
804
+ last = op.at;
805
+ }
806
+ catch {
807
+ // (a line cut short: not this one)
808
+ }
809
+ }
810
+ }
811
+ return last;
812
+ }
813
+ /**
814
+ * A task parked for strom refused in its sessions that holds the one such park (K031): no session of any task has
815
+ * recorded anything since its last one — a sandbox that refuses everything parks one task, never empties the queue.
816
+ */
817
+ function deniedParkHolds(tree) {
818
+ const ended = tree.list("session").filter((x) => x.state !== "open");
819
+ for (const t of tree.list("task").filter((x) => x.state === "parked" && x.parkedFor === "denied")) {
820
+ const since = ended.filter((x) => x.task === t.id).reduce((at, x) => ((x.ended ?? x.updated) > at ? (x.ended ?? x.updated) : at), "");
821
+ if (!ended.some((x) => (x.ended ?? x.updated) > since && sessionWrites(tree, x.id) > 0))
822
+ return t;
823
+ }
824
+ return undefined;
825
+ }
734
826
  register(updatedDuringRun({
735
827
  path: ["run"],
736
828
  summary: "Run research sessions with an AI agent: pick task → brief → agent → close → export → commit",
@@ -743,7 +835,9 @@ register(updatedDuringRun({
743
835
  "--minutes). The agent knows when its session is stopped (the brief; strom's output counts down its last\n" +
744
836
  "10 minutes, a short session its last quarter); at --minutes it is stopped, and Claude Code, Codex, OpenCode and Grok\n" +
745
837
  "get 5 minutes more to write down what they found and close (an unfinished task goes back to the queue); a task\n" +
746
- "that comes back twice in a row with nothing recorded is parked. --task picks the tasks (one session each, in that order;\n" +
838
+ "that comes back twice in a row with nothing recorded is parked, and one strom was refused in (the agent's sandbox or\n" +
839
+ "permissions) three sessions in a row — one such at a time, until a session records something; else the run stops.\n" +
840
+ "--task picks the tasks (one session each, in that order;\n" +
747
841
  "one done or held by another agent meanwhile is left out). --loop: session after session for as long as there\n" +
748
842
  "is work. A gate (setting run.gate, or --gate; plugins/gates/<name>) is asked before each session of --loop and\n" +
749
843
  "--until: go on, wait (the run waits and asks again) or stop — the user's condition, e.g. the subscription's room\n" +
@@ -1222,6 +1316,8 @@ register(updatedDuringRun({
1222
1316
  const stromDenied = result.denied?.filter((d, i) => deniedStrom(d, whole.has(i))).length ?? 0;
1223
1317
  if (stromDenied)
1224
1318
  result = { ...result, metrics: { ...result.metrics, stromDenied } };
1319
+ if (result.denied?.length)
1320
+ keepDenied(root, session.id, result.denied, whole);
1225
1321
  // the agent closed the session itself and its process then failed by its exit code alone (OpenCode: 1 after its
1226
1322
  // last step ended normally, nothing else said wrong): done, the run goes on — the exit code kept in the log
1227
1323
  if (result.outcome === "error" && result.exitOnly && s.state === "closed") {
@@ -1255,12 +1351,33 @@ register(updatedDuringRun({
1255
1351
  // A task that comes back again and again without anything being recorded
1256
1352
  // is stuck: park it (the user decides), work on the next one.
1257
1353
  const back = after.get(task.id);
1258
- const idle = back && back.state === "open" ? idleSessions(after, task.id) : 0;
1354
+ // strom refused to the agent in this task's sessions again and again (its sandbox): parked, the run goes on with
1355
+ // the next task — one such park at a time, until a session records something (deniedParkHolds); else the stop
1356
+ const refusedRow = !ranStrom && stromDenied && back?.state === "open" ? deniedSessions(after, task.id) : 0;
1357
+ const parkDenied = refusedRow >= MAX_DENIED_SESSIONS && !deniedParkHolds(after);
1358
+ if (parkDenied) {
1359
+ // Codex in its sandbox: what the run's stop would have said of it, with the park — also when the task was the
1360
+ // run's last and the run ends as done (K031)
1361
+ const codexSandbox = runnerId === "codex" && permissions !== "full";
1362
+ const why = `${refusedRow} sessions in a row: the agent's sandbox or permissions kept strom from the research — needs a look (strom task show ${task.id})` +
1363
+ (codexSandbox
1364
+ ? ". Codex's sandbox lets strom out only as a command of its own (the research's rules in .codex/rules/strom.rules, renewed by strom agents sync); on Windows .git stays closed inside it. Codex at the level without the sandbox, or another agent, is a choice in strom's settings"
1365
+ : "");
1366
+ update(after, task.id, "task", (t) => ({ ...t, state: "parked", parkedReason: why, parkedFor: "denied" }), {
1367
+ op: "task.park",
1368
+ summary: `${task.id} park: ${refusedRow} sessions strom was refused in`,
1369
+ reason: why,
1370
+ });
1371
+ out(ui(lang, "ui.run.parked.denied", { task: task.id, n: refusedRow }));
1372
+ if (codexSandbox)
1373
+ out(ui(lang, "ui.run.parked.denied.codex"));
1374
+ }
1375
+ const idle = back && back.state === "open" && !parkDenied ? idleSessions(after, task.id) : 0;
1259
1376
  if (idle >= MAX_IDLE_SESSIONS) {
1260
1377
  const why = `${idle} sessions in a row recorded nothing for it — needs a look (strom task show ${task.id})`;
1261
1378
  // its images wait for the person's decision about an archive: said, so the decision wakes it
1262
1379
  const decision = permissionWait(after, back, undefined, { queue: true });
1263
- update(after, task.id, "task", (t) => ({ ...t, state: "parked", parkedReason: why, ...(decision ? { awaitsPermission: decision } : {}) }), {
1380
+ update(after, task.id, "task", ({ parkedFor: _f, ...t }) => ({ ...t, state: "parked", parkedReason: why, ...(decision ? { awaitsPermission: decision } : {}) }), {
1264
1381
  op: "task.park",
1265
1382
  summary: `${task.id} park: ${idle} sessions without a result`,
1266
1383
  reason: why,
@@ -1304,7 +1421,7 @@ register(updatedDuringRun({
1304
1421
  // A refused command that only starts with strom (strom … && sed …, a loop) is no such thing
1305
1422
  // when strom worked for it otherwise. (The plan's limit and a login gone come first: they ended the session,
1306
1423
  // the limit said with when it resets; a refusal is met again by the run after them.)
1307
- if (!ranStrom && stromDenied) {
1424
+ if (!ranStrom && stromDenied && !parkDenied) {
1308
1425
  // Codex: its sandbox (strom out of it only as a command of its own, by the research's rules; on Windows .git
1309
1426
  // closed inside it) — said with what is the person's choice; nothing more is started, the task stays queued
1310
1427
  stopCode = runnerId === "codex" && permissions !== "full" ? "denied.codex" : "denied";
@@ -290,6 +290,9 @@ register({
290
290
  group: "research",
291
291
  tree: true,
292
292
  writes: true,
293
+ // what a file would bring (no --apply) and the inbox read only: anybody's, also on a research sealed on another
294
+ // computer; --app starts the bridge, which writes what the app sends at once — a write
295
+ writesWith: ({ opts }) => !!opts.apply || !!opts.app,
293
296
  // the Strom app may take minutes to send the tree: the tree is locked only while a sync is written
294
297
  lock: "sections",
295
298
  description: "Compares the file with the research and shows what it would take: people, facts, names, notes, families and\n" +
@@ -416,6 +416,8 @@ function stateChange(tree, ref, state, fields, reason, verb, notes = []) {
416
416
  if (t.state === "done" && state !== "open")
417
417
  throw new UsageError(`${id} is already done`);
418
418
  const next = { ...t, state, ...fields, ...(notes.length ? { notes: [...t.notes, ...notes] } : {}) };
419
+ // a refusal park of strom run (parkedFor) goes with any change of the state
420
+ delete next.parkedFor;
419
421
  if (state !== "parked") {
420
422
  delete next.parkedUntil;
421
423
  delete next.parkedReason;
@@ -513,7 +515,7 @@ const WAIT_OPTIONS = [
513
515
  function impersonal(tree, flag, text) {
514
516
  const word = addressesPerson(text, tree.lang);
515
517
  if (word)
516
- throw new UsageError(`${flag} speaks to the user ("${word}"): they read it in strom's menu and the Strom app, where nothing addresses them nor speaks as the agent — say what is needed and from whom, impersonal, in the research language`, { hint: `e.g. --on "reply of the registry office of <place> to the request of <date>", --on "images 40–45 of the baptisms to be saved from <link>"`, code: "task.addresses", params: { flag, word } });
518
+ throw new UsageError(`${flag} speaks to the user ("${word}"): they read it in strom's menu and the Strom app, where nothing addresses them nor speaks as the agent — say what is needed and from whom, impersonal, in the research language`, { hint: `e.g. --on "reply of the registry office of <place> to the request of <date>", --on "images 40-45 of the baptisms to be saved from <link>"`, code: "task.addresses", params: { flag, word } });
517
519
  return text.trim();
518
520
  }
519
521
  /** What --kind, --to, --request and --url say of a wait, checked; undefined: none given. */
@@ -582,7 +584,7 @@ register({
582
584
  { name: "anyway", type: "boolean", description: "add it although an open task of the same person and level reads the same (it is really other work)" },
583
585
  ],
584
586
  examples: [
585
- 'strom task add "Křest Jana Nováka (~1905)" --level link --where B0001 --why "potvrdí otce Josefa" --done-when "zápis nalezen, nebo ročníky 1903–1907 prohledány celé" --about P0001 --priority 4',
587
+ 'strom task add "Křest Jana Nováka (~1905)" --level link --where B0001 --why "potvrdí otce Josefa" --done-when "zápis nalezen, nebo ročníky 1903-1907 prohledány celé" --about P0001 --priority 4',
586
588
  ],
587
589
  run(ctx, { args, opts }) {
588
590
  const tree = ctx.tree();
@@ -1030,8 +1032,8 @@ register({
1030
1032
  examples: [
1031
1033
  'strom task wait T0002 --on "reply of the archive to the request of 21 Sep"',
1032
1034
  'strom task wait T0002 --on "reply of the registry office of Lhota to the request of 21 Sep" --kind letter --to "the registry office of Lhota" --request notes/request-lhota.md',
1033
- 'strom task wait T0002 --images B0001:40-45 --on "images 40–45 of the baptisms of Týnec 1784–1820 (https://archive.example.org/book/5359)"',
1034
- 'strom task wait T0002 --check https://archive.example.org/book/5359 --on "whether the baptisms of 1784–1820 are there, with their images"',
1035
+ 'strom task wait T0002 --images B0001:40-45 --on "images 40-45 of the baptisms of Týnec 1784-1820 (https://archive.example.org/book/5359)"',
1036
+ 'strom task wait T0002 --check https://archive.example.org/book/5359 --on "whether the baptisms of 1784-1820 are there, with their images"',
1035
1037
  ],
1036
1038
  run(ctx, { args, opts }) {
1037
1039
  const tree = ctx.tree();
@@ -10,7 +10,7 @@ export { savedInInbox } from "./archivewait.js";
10
10
  import { claimOf, pendingQuestions, questionHosts, termsFor } from "./terms.js";
11
11
  import { bareHost, listConnectors, routesOf } from "./connector.js";
12
12
  import { ui } from "../cli/ui.js";
13
- import { humanDay } from "../cli/human.js";
13
+ import { humanDate, humanDay } from "../cli/human.js";
14
14
  const ORDER = { permission: 0, takeover: 1, milder: 2 };
15
15
  /** The questions shown with a research: the permissions first (they hold work up), then the takeover, then the rest. */
16
16
  export function archiveQuestions(tree) {
@@ -120,8 +120,12 @@ export function waysOffered(c, claude, asked, browserOnly = false) {
120
120
  }
121
121
  /** What the person reads of the archive's terms: strom's quote with its address, else the connector's reading (said so). */
122
122
  export function termsText(lang, env, q) {
123
+ const known = q.host && !q.quoteBy ? termsFor(env, q.host) : undefined;
124
+ // the archive's written reply strom's list quotes: said as its reply (with its day), never as its terms nor with an address
125
+ if (q.quote && (q.quoteBy === "reply" || (known?.quoteFrom === "reply" && known.quote === q.quote)))
126
+ return replyText(lang, q.quote, q.replied ?? known?.replied);
123
127
  // the site's robots.txt (strom's list quotes it, or strom read it): said as robots.txt, never as its terms of use
124
- const robots = q.quoteBy === "robots" || (!!q.host && !q.quoteBy && termsFor(env, q.host)?.quoteFrom === "robots");
128
+ const robots = q.quoteBy === "robots" || known?.quoteFrom === "robots";
125
129
  if (robots) {
126
130
  const text = ui(lang, q.quote ? "ui.archive.terms.robots" : "ui.archive.terms.robots.none", { quote: q.quote ?? "", terms: q.terms ?? "" });
127
131
  return q.terms ? text : text.replace(/\s*\(\)/u, "");
@@ -132,6 +136,15 @@ export function termsText(lang, env, q) {
132
136
  const text = ui(lang, by === "strom" ? "ui.archive.terms.known" : "ui.archive.terms.connector", { quote: q.quote, terms: q.terms ?? "" });
133
137
  return q.terms ? text : text.replace(/\s*\(\)/u, "");
134
138
  }
139
+ /** The archive's written reply as the person reads it: "The archive's written reply (12. 11. 2026): “…”". */
140
+ export function replyText(lang, quote, replied) {
141
+ const m = replied ? /^(\d{4})-(\d\d)-(\d\d)$/u.exec(replied) : null;
142
+ const months = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
143
+ // with its year always (a day of a source, not of the research)
144
+ const date = m && months[Number(m[2]) - 1] ? humanDate(`${Number(m[3])} ${months[Number(m[2]) - 1]} ${m[1]}`, lang) : "";
145
+ const text = ui(lang, "ui.archive.terms.reply", { quote, date });
146
+ return date ? text : text.replace(/\s*\(\)/u, "");
147
+ }
135
148
  /** What gives a level from the archive's terms (strom's known terms, a connector's reading of them). */
136
149
  const FROM_TERMS = ["terms", "connector", "kept"];
137
150
  /**
@@ -65,10 +65,10 @@ export function knownPaceMs(host) {
65
65
  }
66
66
  /**
67
67
  * An entry whose terms expressly allow automated use: `automatedUse` on an "allowed" one, quoted word for word from its
68
- * terms (not its robots.txt) and not only for a person's browser — anything less, robots.txt holds as before.
68
+ * terms (not its robots.txt, not an archive's reply) and not only for a person's browser — anything less, robots.txt holds as before.
69
69
  */
70
70
  export function openByTerms(k) {
71
- return !!k && k.automatedUse === true && k.level === "allowed" && !k.browserOnly && k.quoteFrom !== "robots" && typeof k.quote === "string" && !!k.quote.trim() && typeof k.terms === "string" && /^https?:\/\//u.test(k.terms);
71
+ return !!k && k.automatedUse === true && k.level === "allowed" && !k.browserOnly && !k.quoteFrom && typeof k.quote === "string" && !!k.quote.trim() && typeof k.terms === "string" && /^https?:\/\//u.test(k.terms);
72
72
  }
73
73
  /** strom's own list says a host's terms expressly allow automated use (its strictest entry, a site above it too). */
74
74
  export function knownOpen(host) {
@@ -20,7 +20,8 @@ import { allKinds, EVENT_KINDS, sayKinds } from "./eventkinds.js";
20
20
  import { readJsonIfExists, stringifyCanonical, writeFileAtomic } from "./json.js";
21
21
  import { foldText } from "./text.js";
22
22
  import { streetsOf } from "./streets.js";
23
- import { historySwitches, Settings } from "./config.js";
23
+ import { configFile, historySwitches, readStored, Settings } from "./config.js";
24
+ import { sandboxedSwitch } from "./writable.js";
24
25
  import { actsAsArchive } from "./state.js";
25
26
  import { phrase } from "./phrases.js";
26
27
  import { addressesPerson } from "./impersonal.js";
@@ -115,6 +116,17 @@ export function requireHistoryOn(tree, settings = new Settings(tree.env, {}), wh
115
116
  return;
116
117
  const key = which === "places" ? "experiments.placeHistory" : "experiments.history";
117
118
  const what = which === "places" ? "the history of the places" : which === "regions" ? "the history of the regions" : "the history of the regions and of the places";
119
+ // off by the user's settings, not the tree's own (its strom.json: an off there is the tree's indeed), under an agent
120
+ // that cannot read them or write the research: its sandbox said, never the switch (K031)
121
+ const set = (k) => readStored(tree.config, k, "") !== undefined;
122
+ const regionsOwn = set("experiments.history");
123
+ const placesOwn = set("experiments.placeHistory") || regionsOwn;
124
+ const treeOwns = which === "regions" ? regionsOwn : which === "places" ? placesOwn : regionsOwn && placesOwn;
125
+ if (!treeOwns) {
126
+ const sandbox = sandboxedSwitch(settings.env, tree.root, configFile(settings.env), what);
127
+ if (sandbox)
128
+ throw sandbox;
129
+ }
118
130
  throw new UsageError(`${what} is off for this research — nothing is looked for or written`, {
119
131
  code: "history.off",
120
132
  hint: `the user alone turns it on, in their terminal: strom config set ${key} on --for-tree (this research) or strom config set ${key} on (every research)`,
@@ -408,7 +408,7 @@ export function fetchesArea(root, sinceMs, masker) {
408
408
  return { running, ended };
409
409
  }
410
410
  /** The sessions of the agents since a time: when, how they ended, their numbers — never their summary or notes. */
411
- export function sessionsArea(root, sinceMs) {
411
+ export function sessionsArea(root, sinceMs, masker) {
412
412
  const dir = path.join(root, "data", RECORD_TYPES.session.dir);
413
413
  let files;
414
414
  try {
@@ -448,11 +448,54 @@ export function sessionsArea(root, sinceMs) {
448
448
  ...(s.ended ? { ended: s.ended } : {}),
449
449
  ...(Object.keys(nums).length ? { metrics: nums } : {}),
450
450
  ...runExit(root, id),
451
+ ...runDenied(root, id, masker),
451
452
  });
452
453
  }
453
454
  out.sort((a, b) => String(a.started).localeCompare(String(b.started)));
454
455
  return { sessions: out.slice(-60), open };
455
456
  }
457
+ /**
458
+ * The commands the agent's permissions or sandbox refused in a run's session, as the run kept them beside its log
459
+ * (.strom/runs/<session>.denied.json, commands/session.ts keepDenied: at most DENIED_KEPT, each cut to
460
+ * DENIED_CHARS): each masked as every value going out, whether strom was the one refused, whether refused whole (K031).
461
+ */
462
+ function runDenied(root, id, masker) {
463
+ try {
464
+ const kept = readJsonIfExists(path.join(root, ".strom", "runs", `${id}.denied.json`));
465
+ if (!Array.isArray(kept))
466
+ return {};
467
+ const denied = kept
468
+ .filter((d) => typeof d?.command === "string")
469
+ .slice(0, DENIED_KEPT)
470
+ // masked as a log's line (what is quoted one code, a path's parts, any word not strom's), then cut: the run keeps
471
+ // more of it than the report shows, so a quote and a path are whole when masked (K031)
472
+ .map((d) => ({ command: cutDenied(masker.text(cutDenied(d.command, DENIED_KEPT_CHARS))), strom: d.strom === true, whole: d.whole === true }));
473
+ return denied.length ? { denied } : {};
474
+ }
475
+ catch {
476
+ return {};
477
+ }
478
+ }
479
+ /**
480
+ * How many refused commands of a session are kept for strom error, and how long each in the report (K031: the report
481
+ * stays small) — and how long each as the run keeps it (masked whole before it is cut for the report).
482
+ */
483
+ export const DENIED_KEPT = 10;
484
+ export const DENIED_CHARS = 200;
485
+ export const DENIED_KEPT_CHARS = 2000;
486
+ /**
487
+ * A refused command cut to `max` characters, "…" where it was cut: whole characters, never part of a word (a name cut
488
+ * in half would no longer be known to the masker) nor of a masked word's code (‹3fa9c›) — any script.
489
+ */
490
+ export function cutDenied(command, max = DENIED_CHARS) {
491
+ const chars = [...command];
492
+ if (chars.length <= max)
493
+ return command;
494
+ const head = chars.slice(0, max - 1).join("");
495
+ // (alternatives, not a class: Node 26's V8 misses a class of properties before $ when the last character is astral)
496
+ const inWord = /(?:\p{L}|\p{M}|\p{N})$/u.test(head) && /^(?:\p{L}|\p{M}|\p{N})/u.test(chars[max - 1]);
497
+ return (inWord ? head.replace(/(?:\p{L}|\p{M}|\p{N})+$/u, "") : head).replace(/‹[0-9a-f]{0,5}$/u, "") + "…";
498
+ }
456
499
  /** What strom wrote of a run's agent's end into its log (never the agent's own output): its exit code. */
457
500
  function runExit(root, id) {
458
501
  const file = path.join(root, ".strom", "runs", `${id}.log`);
@@ -113,6 +113,7 @@ export const SCHEMAS = {
113
113
  research: R("research"),
114
114
  state: S({ req: true, enum: TASK_STATES }),
115
115
  parkedUntil: S(),
116
+ parkedFor: S({ max: 40 }),
116
117
  heldFrom: S({ enum: ["waiting"] }),
117
118
  waitingOn: S(),
118
119
  awaits: { t: "object", of: { recordset: R("recordset", true), images: S({ req: true, max: 200 }), folder: S({ req: true, max: 200 }) } },
@@ -188,7 +188,7 @@ export function startSession(tree, opts) {
188
188
  tree.actor = s.id;
189
189
  if (task && task.state !== "doing") {
190
190
  // taken up: what kept it aside goes (a parked task's date and reason)
191
- const { parkedUntil: _until, parkedReason: _reason, awaitsPermission: _decision, ...rest } = task;
191
+ const { parkedUntil: _until, parkedReason: _reason, parkedFor: _for, awaitsPermission: _decision, ...rest } = task;
192
192
  const doing = { ...rest, state: "doing", updated: now() };
193
193
  tree.put(doing, { op: "task.start", targets: [doing.id, s.id], summary: `${doing.id} start` });
194
194
  }
@@ -502,7 +502,7 @@ export function archiveLevel(env, input) {
502
502
  title: known?.name ?? t?.repo.name ?? c?.manifest.title ?? host,
503
503
  // robots.txt said so (strom's list quotes it, or strom read it): said as robots.txt, never as the terms (with its address)
504
504
  ...(known?.terms ? { terms: known.terms } : robotsSaid ? { terms: `https://${rec.robots?.host ?? other.robots?.host ?? host}/robots.txt` } : c?.manifest.policy.terms ? { terms: c.manifest.policy.terms } : t?.repo.terms ? { terms: t.repo.terms } : {}),
505
- ...(known?.quote ? { quote: known.quote, quoteBy: known.quoteFrom === "robots" ? "robots" : "strom" } : robotsSaid ? { ...(browserOnly?.line ? { quote: browserOnly.line } : {}), quoteBy: "robots" } : summary ? { quote: summary, quoteBy: "connector" } : {}),
505
+ ...(known?.quote ? { quote: known.quote, quoteBy: known.quoteFrom === "robots" || known.quoteFrom === "reply" ? known.quoteFrom : "strom", ...(known.quoteFrom === "reply" && known.replied ? { replied: known.replied } : {}) } : robotsSaid ? { ...(browserOnly?.line ? { quote: browserOnly.line } : {}), quoteBy: "robots" } : summary ? { quote: summary, quoteBy: "connector" } : {}),
506
506
  ...(known?.scope ? { scope: known.scope } : {}),
507
507
  ...(milder ? { milder } : {}),
508
508
  ...(t ? { repository: t.repo.id } : {}),
@@ -673,6 +673,7 @@ export function askLater(env, a, q) {
673
673
  ...(a.terms ? { terms: a.terms } : {}),
674
674
  ...(a.quote ? { quote: a.quote } : {}),
675
675
  ...(a.quoteBy ? { quoteBy: a.quoteBy } : {}),
676
+ ...(a.replied ? { replied: a.replied } : {}),
676
677
  ...(q.tree ? { tree: q.tree } : {}),
677
678
  ...(q.task ? { task: q.task } : {}),
678
679
  ...(q.tree && q.task ? { tasks: [{ tree: q.tree, task: q.task }] } : {}),
package/dist/core/tidy.js CHANGED
@@ -209,6 +209,14 @@ export function tidyPlan(tree, at = Date.now()) {
209
209
  if (plain && e.bytes > SHRINK_FROM)
210
210
  items.push({ kind: "logs", path: e.rel, bytes: e.bytes, do: "shrink", why: "a closed session's log: the images in it left out, compressed" });
211
211
  }
212
+ // the commands refused in a session, kept for strom error (K031): with their session's log, or as old
213
+ for (const e of entries(root, "runs").filter((x) => x.rel.endsWith(".denied.json"))) {
214
+ const s = sessionOf(e);
215
+ if (running(e))
216
+ continue;
217
+ if ((s && goneSessions.has(s)) || at - e.mtime > LIMITS.logs.days * DAY)
218
+ items.push({ kind: "logs", path: e.rel, bytes: e.bytes, do: "remove", why: "a closed session's refused commands, with its log" });
219
+ }
212
220
  // the briefs: with their session's log, or as old
213
221
  for (const e of entries(root, "briefs").filter((x) => x.rel.endsWith(".md"))) {
214
222
  const s = /^(N\d+)\.md$/.exec(path.basename(e.rel))?.[1];
package/dist/core/tree.js CHANGED
@@ -32,7 +32,7 @@ export const TREE_FILE = "strom.json";
32
32
  export const SEAL_FOREIGN = "seal.foreign";
33
33
  // between releases the candidate being made (a bridge run from the sources says what it is: the Strom app goes by it);
34
34
  // at a release the release's own (package.json)
35
- export const VERSION = "1.31.1-beta.2";
35
+ export const VERSION = "1.31.1-beta.3";
36
36
  /** What a new research is settled with from the start: nothing an older strom counted otherwise to set right in it. */
37
37
  export const NEW_TREE_SETTLED = ["readers-1", "proven-originals-1", "origins-1", "verify-originals-1", "origins-tree-1"];
38
38
  const GITIGNORE = `# Strom Research — local state and large files are not versioned
@@ -7,7 +7,7 @@ import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import { StromError, UsageError } from "./errors.js";
9
9
  import { hardLinksHere } from "./lock.js";
10
- import { AGENTS, detectAgent } from "./which.js";
10
+ import { AGENTS, detectAgent, isAgent } from "./which.js";
11
11
  /** What the system says when it refuses writing (no right, a sandbox, a read-only disk). */
12
12
  const REFUSED = new Set(["EACCES", "EPERM", "EROFS"]);
13
13
  export function refusedCode(code) {
@@ -28,11 +28,13 @@ export const SANDBOX_HINT = "run this strom command outside the agent's sandbox
28
28
  * - any other agent: the general words.
29
29
  * The level of an agent is the person's choice alone: named, never changed.
30
30
  */
31
- export function sandboxHint(env, where) {
31
+ export function sandboxHint(env, where, platform = process.platform) {
32
32
  const here = sandboxHere(env);
33
33
  const root = where ? researchOf(where) : undefined;
34
34
  const never = "never another folder, never strom's settings changed";
35
- const alone = "strom run on its own (no pipe, no redirection like 2>&1, no cd before it): the research's .codex/rules/strom.rules lets that run outside Codex's sandbox";
35
+ // on Windows: what else sends strom into Codex's sandbox (K031)
36
+ const windows = platform === "win32" ? "; on Windows also no & or cmd /c before it, a plain hyphen (-) never the dash (–) in its texts, no quotes inside a quoted text (a text that needs them: its command line in a file of notes/, strom batch --file)" : "";
37
+ const alone = `strom run on its own (no pipe, no redirection like 2>&1, no cd before it${windows}): the research's .codex/rules/strom.rules lets that run outside Codex's sandbox`;
36
38
  // strom run working alone (codex exec): nobody approves anything there — Codex's approval is "never" whatever is
37
39
  // asked (GitHub #8) — so the agent stops instead of waiting for an approval, and strom run tells the person
38
40
  if (here === "codex-strom" && env.STROM_DEADLINE && env.STROM_NONINTERACTIVE === "1")
@@ -53,6 +55,19 @@ export function sandboxHint(env, where) {
53
55
  `(strom chat does), or approves this command outside the sandbox; ${never}`);
54
56
  return SANDBOX_HINT;
55
57
  }
58
+ /**
59
+ * What lets strom out of Codex's sandbox on Windows (measured 2026-11-12, codex-cli 0.167.2, Windows PowerShell 5.1:
60
+ * K031): Codex runs a command by its rules outside the sandbox only when it splits the PowerShell script into plain
61
+ * words beginning with strom (`strom a; strom b` too) — `& strom`, a pipe, `Set-Location`, `cmd /c` and any argument
62
+ * with a dash (–, U+2013) go into the sandbox or are refused, and quotes inside a quoted text are lost on the way.
63
+ * A text that needs them goes through a file strom reads (strom batch --file: one command line each, any text kept —
64
+ * no new option on each command). `q` quotes the code (a backtick in Markdown). Empty elsewhere than on Windows.
65
+ */
66
+ export function codexWindowsRule(q, platform = process.platform) {
67
+ return platform === "win32"
68
+ ? `Codex on Windows lets strom out of its sandbox only as plain words: strom first (never ${q}& strom${q}, ${q}cmd /c${q} or ${q}Set-Location${q} before it), in its texts a plain hyphen (1890-1900, never the dash –) and no quotes inside a quoted text — any of them sends the command into the sandbox, where strom cannot write. A text that needs them (a note, a history's text): its command line in a file of notes/, run by ${q}strom batch --file notes/<file>.txt${q}.`
69
+ : "";
70
+ }
56
71
  /** Which sandbox strom most likely runs in: Codex strom started, Codex started by hand, Claude Code's — or another. */
57
72
  export function sandboxHere(env) {
58
73
  const agent = detectAgent(env);
@@ -175,3 +190,43 @@ export function writeProblems(root, agent) {
175
190
  out.push({ where: lockDir, place: ".strom", cause: "nolink" });
176
191
  return out;
177
192
  }
193
+ /** Why the user's settings could not be read: missing where strom looks for them, or reading them refused. */
194
+ export function settingsUnread(file) {
195
+ try {
196
+ fs.readFileSync(file);
197
+ return undefined;
198
+ }
199
+ catch (err) {
200
+ const code = err.code;
201
+ if (code === "ENOENT" || code === "ENOTDIR")
202
+ return "missing";
203
+ return refusedCode(code) ? "refused" : undefined;
204
+ }
205
+ }
206
+ /**
207
+ * A switch the user's settings hold found off under an agent (K031: an agent's sandbox on Windows ran strom with
208
+ * another home, or kept it from the settings — strom took the default "off", and the agent was told of a setting the
209
+ * user had on): when strom cannot read the user's settings (`settingsFile` missing or refused) or cannot write the
210
+ * research (.strom, .git), the sandbox is said — fs.sandboxed, the words a run counts as strom refused — never the
211
+ * switch. Undefined: no agent, or everything readable and writable — the switch is off indeed. A tree's own off is
212
+ * the tree's (never asked here: the caller leaves it out).
213
+ */
214
+ export function sandboxedSwitch(env, root, settingsFile, key) {
215
+ if (!isAgent(env))
216
+ return undefined;
217
+ const unread = settingsUnread(settingsFile);
218
+ const refused = writeProblems(root, true).filter((p) => p.cause === "sandbox");
219
+ if (!unread && !refused.length)
220
+ return undefined;
221
+ const said = [
222
+ ...(unread ? [`the user's settings ${unread === "missing" ? "not found at" : "not let to be read at"} ${settingsFile}`] : []),
223
+ ...refused.map((p) => `no right to write ${p.where}`),
224
+ ];
225
+ const where = refused[0]?.where ?? settingsFile;
226
+ const mark = refusalMark(env.STROM_SESSION);
227
+ return new UsageError(`${key} could not be read as the user set it: ${said.join("; ")} — ${SANDBOX_REFUSAL}${mark ? ` ${mark}` : ""}`, {
228
+ hint: sandboxHint(env, where),
229
+ code: "fs.sandboxed",
230
+ params: { where },
231
+ });
232
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strom-research",
3
- "version": "1.31.1-beta.2",
3
+ "version": "1.31.1-beta.3",
4
4
  "stromDoc": "f1f6a992bb9cafaa788ee51023070309bb452997",
5
5
  "description": "Genealogical research toolkit for AI coding agents",
6
6
  "type": "module",