strom-research 1.22.0 → 1.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.cs.md +24 -0
- package/CHANGELOG.de.md +27 -0
- package/CHANGELOG.md +24 -0
- package/assets/lang/cs.json +14 -0
- package/assets/lang/de.json +14 -0
- package/dist/agents/files.js +12 -2
- package/dist/brief/history.js +6 -0
- package/dist/cli/main.js +9 -0
- package/dist/cli/menu.js +7 -1
- package/dist/cli/seal.js +45 -2
- package/dist/cli/ui.js +14 -0
- package/dist/commands/checks.js +19 -6
- package/dist/commands/history.js +8 -2
- package/dist/commands/setup.js +38 -3
- package/dist/core/changelog.js +1 -1
- package/dist/core/git.js +2 -2
- package/dist/core/integrity.js +104 -14
- package/dist/core/live.js +4 -0
- package/dist/core/oldsettings.js +101 -0
- package/dist/core/packaged.js +69 -0
- package/dist/core/paths.js +9 -5
- package/dist/core/placehistory.js +33 -0
- package/dist/core/seal.js +51 -3
- package/dist/core/tree.js +11 -5
- package/package.json +1 -1
package/CHANGELOG.cs.md
CHANGED
|
@@ -5,6 +5,30 @@
|
|
|
5
5
|
Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou na
|
|
6
6
|
[GitHub Releases](https://github.com/ACiDekCZ/strom-research/releases) (anglicky).
|
|
7
7
|
|
|
8
|
+
## 1.22.2
|
|
9
|
+
|
|
10
|
+
*30. 10. 2026 · patří k aplikaci Strom 3.17.1.*
|
|
11
|
+
|
|
12
|
+
- **Strom z desktopové aplikace agenta a z terminálu zase zapisují do jednoho výzkumu (Windows).** Desktopová aplikace
|
|
13
|
+
agenta může být pro Windows zabalená (MSIX) a každý soubor, který strom spuštěný z ní vytvořil v nastavení stromu, skončil
|
|
14
|
+
v soukromé kopii aplikace: strom z aplikace a strom z terminálu měly každý vlastní pečetní klíč a každý bral zápisy
|
|
15
|
+
druhého jako změnu mimo strom. Nastavení je teď mimo AppData (`%USERPROFILE%\.config\strom`) a samo se převezme ze
|
|
16
|
+
staré složky i z kopie aplikace (obě zůstanou, jak byly). Rozdvojený výzkum se opraví sám, kde to jde; jinak
|
|
17
|
+
klíče sjednotí `strom seal adopt` v terminálu (nabídka ho jednou nabídne) – každý záznam zkontrolovaný, nic se
|
|
18
|
+
neztratí, nikdy `strom repair`. `strom update` spuštěný z takové aplikace nic nenainstaluje (viděla by to jen ona)
|
|
19
|
+
a řekne, ať se spustí v terminálu; `strom doctor` najde kopii programu, kterou si aplikace drží pro sebe.
|
|
20
|
+
- **`strom repair` po commitu přes git, který nezměnil žádný záznam** (prázdný, jen poznámky), výzkum znovu zapečetí;
|
|
21
|
+
dřív commit zůstal nezapečetěný, každý zápis byl odmítnut a nebylo co opravit.
|
|
22
|
+
|
|
23
|
+
## 1.22.1
|
|
24
|
+
|
|
25
|
+
*29. 10. 2026 · patří k aplikaci Strom 3.17.0.*
|
|
26
|
+
|
|
27
|
+
- **Událost místa se u regionu nezapíše znovu.** Když se dějiny místa hledaly dřív než dějiny regionů, do kterých
|
|
28
|
+
patří, mohly dějiny regionu přidat tutéž událost ještě jednou (stejný druh, stejné roky). Region teď vynechá, co už
|
|
29
|
+
má některé z jeho míst; událost, která se týkala celého regionu, se zapíše dál. To, co agent k místu čte, říká
|
|
30
|
+
i to, které z jeho regionů se ještě neprošly.
|
|
31
|
+
|
|
8
32
|
## 1.22.0
|
|
9
33
|
|
|
10
34
|
*29. 10. 2026 · patří k aplikaci Strom 3.17.0.*
|
package/CHANGELOG.de.md
CHANGED
|
@@ -5,6 +5,33 @@
|
|
|
5
5
|
Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Installationszeilen stehen bei
|
|
6
6
|
[GitHub Releases](https://github.com/ACiDekCZ/strom-research/releases) (auf Englisch).
|
|
7
7
|
|
|
8
|
+
## 1.22.2
|
|
9
|
+
|
|
10
|
+
*30.10.2026 · gehört zur Strom-App 3.17.1.*
|
|
11
|
+
|
|
12
|
+
- **strom aus der Desktop-App eines Agenten und aus einem Terminal schreiben wieder in eine Forschung (Windows).** Die
|
|
13
|
+
Desktop-App eines Agenten kann für Windows verpackt sein (MSIX), und jede Datei, die ein von ihr gestartetes strom in den Einstellungen
|
|
14
|
+
von strom anlegte, landete in der privaten Kopie der App: das strom der App und das des Terminals hatten je einen
|
|
15
|
+
eigenen Siegelschlüssel, und jedes hielt die Schreibvorgänge des anderen für Änderungen außerhalb von strom. Die
|
|
16
|
+
Einstellungen liegen jetzt außerhalb von AppData (`%USERPROFILE%\.config\strom`) und werden aus dem alten Ordner
|
|
17
|
+
und aus der Kopie der App von selbst übernommen (beide bleiben, wie sie waren). Eine so geteilte Forschung heilt sich
|
|
18
|
+
selbst, wo es geht; sonst vereint `strom seal adopt` in einem Terminal die Schlüssel (das Menü bietet es einmal an) –
|
|
19
|
+
jeder Datensatz geprüft, nichts geht verloren, nie `strom repair`. Ein aus einer solchen App gestartetes
|
|
20
|
+
`strom update` installiert nichts (nur die App sähe es) und sagt, es im Terminal auszuführen; `strom doctor` findet
|
|
21
|
+
eine Kopie des Programms, die eine App für sich behält.
|
|
22
|
+
- **`strom repair` nach einem mit git gemachten Commit, der keinen Datensatz änderte** (leer, nur Notizen), versiegelt
|
|
23
|
+
die Forschung wieder; vorher blieb der Commit unversiegelt, jeder Schreibvorgang wurde abgelehnt, und es gab nichts zu reparieren.
|
|
24
|
+
|
|
25
|
+
## 1.22.1
|
|
26
|
+
|
|
27
|
+
*29.10.2026 · gehört zur Strom-App 3.17.0.*
|
|
28
|
+
|
|
29
|
+
- **Ein Ereignis eines Ortes wird bei seiner Region nicht noch einmal geschrieben.** Wurde die Geschichte eines Ortes
|
|
30
|
+
vor den Regionen gesucht, zu denen er gehört, konnte die Geschichte der Region dasselbe Ereignis noch einmal
|
|
31
|
+
hinzufügen (dieselbe Art, dieselben Jahre). Die Region lässt jetzt aus, was einer ihrer Orte schon hat; ein
|
|
32
|
+
Ereignis, das die ganze Region betraf, wird weiter geschrieben. Was der Agent zu einem Ort liest, sagt auch, welche
|
|
33
|
+
seiner Regionen noch nicht durchgesehen sind.
|
|
34
|
+
|
|
8
35
|
## 1.22.0
|
|
9
36
|
|
|
10
37
|
*29.10.2026 · gehört zur Strom-App 3.17.0.*
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,30 @@ English · [Čeština](CHANGELOG.cs.md) · [Deutsch](CHANGELOG.de.md)
|
|
|
5
5
|
The changes of each version in short. The full notes and the install lines are on
|
|
6
6
|
[GitHub Releases](https://github.com/ACiDekCZ/strom-research/releases).
|
|
7
7
|
|
|
8
|
+
## 1.22.2
|
|
9
|
+
|
|
10
|
+
*2026-10-30 · goes with the Strom app 3.17.1.*
|
|
11
|
+
|
|
12
|
+
- **Strom from an agent's desktop app and from a terminal write to one research again (Windows).** An agent's
|
|
13
|
+
desktop app can be packaged for Windows (MSIX), and every file a strom it started made in strom's settings went to
|
|
14
|
+
the app's private copy: the app's strom and the terminal's each had a seal key of their own, and each refused the other's writes as
|
|
15
|
+
made outside strom. The settings are now outside AppData (`%USERPROFILE%\.config\strom`), taken over from the old
|
|
16
|
+
folder and from the app's copy by themselves (both left as they were). A research split so heals itself where it can;
|
|
17
|
+
else `strom seal adopt` in a terminal unites the keys (the menu offers it once) — every record checked, nothing lost,
|
|
18
|
+
never `strom repair`. `strom update` started from such an app installs nothing (only the app would see it) and says
|
|
19
|
+
to run it in a terminal; `strom doctor` finds a copy of the program an app keeps for itself.
|
|
20
|
+
- **`strom repair` after a commit made with git that changed no record** (an empty one, notes only) seals the research
|
|
21
|
+
again; before, the commit stayed unsealed, every write was refused and there was nothing to repair.
|
|
22
|
+
|
|
23
|
+
## 1.22.1
|
|
24
|
+
|
|
25
|
+
*2026-10-29 · goes with the Strom app 3.17.0.*
|
|
26
|
+
|
|
27
|
+
- **An event of a place is not written again for its region.** When the history of a place was looked for before the
|
|
28
|
+
regions it lies in, the region's history could add the same event once more (the same kind, the same years). The
|
|
29
|
+
region now leaves out what one of its places has already; an event that touched the whole region is still written.
|
|
30
|
+
What the agent reads for a place also says which of its regions are not looked through yet.
|
|
31
|
+
|
|
8
32
|
## 1.22.0
|
|
9
33
|
|
|
10
34
|
*2026-10-29 · goes with the Strom app 3.17.0.*
|
package/assets/lang/cs.json
CHANGED
|
@@ -569,6 +569,8 @@
|
|
|
569
569
|
"ui.tree.created": "✓ Rodokmen „{name}“ je založený: {dir}",
|
|
570
570
|
"ui.chat.trust": "Claude Code se poprvé zeptá, jestli této složce důvěřovat. Je to složka rodokmenu, kterou vytvořil strom – stačí potvrdit „Yes, proceed“.",
|
|
571
571
|
"ui.doc.program": "program",
|
|
572
|
+
"ui.doc.packaged": "kopie programu",
|
|
573
|
+
"ui.doc.packaged.copy": "aplikace zabalená pro Windows má vlastní kopii programu: {folders} – ta aplikace spouští jiný strom než terminál",
|
|
572
574
|
"ui.doc.git": "git (historie)",
|
|
573
575
|
"ui.doc.home": "složka výzkumu",
|
|
574
576
|
"ui.doc.gitdir": "git ve složce výzkumů",
|
|
@@ -636,6 +638,7 @@
|
|
|
636
638
|
"ui.doc.appurl.env.fix": "proměnnou STROM_APP_URL nastavit na adresu aplikace Strom ({web}, nebo její kopie na tomto počítači http://127.0.0.1:<port>/), nebo odebrat",
|
|
637
639
|
"ui.doc.tree.ok": "{name}: data v pořádku a zapečetěná",
|
|
638
640
|
"ui.doc.tree.bad": "{name}: {n, plural, one {# problém} few {# problémy} other {# problémů}}",
|
|
641
|
+
"ui.doc.tree.twokeys": "{name}: zapečetěno dvěma klíči stromu na tomto počítači (strom z aplikace a z terminálu) – zápisy obou jsou stromu",
|
|
639
642
|
"ui.doc.write": "zápis do rodokmenu",
|
|
640
643
|
"ui.doc.write.ok": "do jeho .strom i .git lze zapisovat",
|
|
641
644
|
"ui.doc.write.sandbox": "{where}: zápis odepřen – strom běží pod agentem, nejspíš to zakazuje jeho sandbox",
|
|
@@ -672,6 +675,8 @@
|
|
|
672
675
|
"ui.fix.git.inwindow": "Dokončit instalaci v okně systému a pak znovu spustit strom doctor.",
|
|
673
676
|
"ui.fix.failed": "Nepovedlo se: {detail}",
|
|
674
677
|
"ui.fix.app": "Otevřít aplikaci Strom v prohlížeči a nainstalovat ji?",
|
|
678
|
+
"ui.fix.packaged": "Přesunout kopii programu, kterou si aplikace drží pro sebe, do koše (aplikace pak spouští strom z terminálu)?",
|
|
679
|
+
"ui.fix.packaged.done": "V koši: {folder}",
|
|
675
680
|
"ui.fix.nothing": "Nic, co by strom opravil sám – viz šipky.",
|
|
676
681
|
"ui.why.git.human": "chybí git – strom v něm uchovává historii výzkumu",
|
|
677
682
|
"ui.why.git.agent": "chybí git (strom v něm uchovává historii výzkumu): řekni to uživateli a spusť tohle – uživatel to potvrdí v okně systému",
|
|
@@ -2565,6 +2570,8 @@
|
|
|
2565
2570
|
"ui.error.folder.in-program.default.hint": "Zadat složku mimo ni: strom setup --home \"{suggested}\" --yes",
|
|
2566
2571
|
"ui.error.update.in-program": "{folder} leží uvnitř {entry}, kterou aktualizace nahrazuje – výzkum by šel s ní. Nic se nenainstalovalo.",
|
|
2567
2572
|
"ui.error.update.in-program.hint": "Nejdřív přesunout výzkum ze složky programu strom: strom setup ve vlastním terminálu (otázka na složku ho přesune i s výzkumem), pak znovu strom update",
|
|
2573
|
+
"ui.error.update.packaged": "Tento strom spustila aplikace zabalená pro Windows (MSIX): co by aktualizace nainstalovala do {folder}, uvidí jen ta aplikace, terminál by zůstal na {current}. Nic se nenainstalovalo.",
|
|
2574
|
+
"ui.error.update.packaged.hint": "strom update ve vlastním terminálu (PowerShell); aplikace novou verzi převezme odtud",
|
|
2568
2575
|
"ui.error.tree.newer": "Tento rodokmen zapsal strom {by}, novější než tento strom {version}. Tento strom ho nechává beze změny.",
|
|
2569
2576
|
"ui.error.tree.newer.hint": "Aktualizovat strom: strom update",
|
|
2570
2577
|
"ui.error.tree.newer.backup": "Tento rodokmen zapsal strom {by}, novější než tento strom {version}. Tento strom ho nechává beze změny.",
|
|
@@ -3087,9 +3094,16 @@
|
|
|
3087
3094
|
"ui.seal.ask": "Převzít „{name}“ na tomto počítači? Záznamy jsou zkontrolované a beze změn.",
|
|
3088
3095
|
"ui.seal.adopted": "„{name}“ je teď zapečetěný na tomto počítači – zapisovat jde tady",
|
|
3089
3096
|
"ui.seal.already": "„{name}“ je na tomto počítači zapečetěný už",
|
|
3097
|
+
"ui.seal.unite.ask": "„{name}“ je na tomto počítači zapečetěný dvěma klíči stromu (strom z aplikace a z terminálu, každý s vlastním nastavením). Sjednotit je? Záznamy jsou zkontrolované: nic se nezměnilo mimo strom, nic se neztratí.",
|
|
3098
|
+
"ui.seal.united": "„{name}“ je teď na tomto počítači zapečetěný jedním klíčem – zapisovat jde z aplikace i z terminálu",
|
|
3099
|
+
"ui.error.seal.other-key": "výzkum „{name}“ je na tomto počítači zapečetěný dvěma klíči stromu (strom z aplikace a z terminálu, každý s vlastním nastavením): nic se nezapsalo",
|
|
3100
|
+
"ui.error.seal.other-key.hint": "sjednotit ve vlastním terminálu: {set} – nikdy strom repair, ten by tu práci vrátil zpět",
|
|
3101
|
+
"ui.check.otherkey": "zapečetěno dvěma klíči stromu na tomto počítači (strom z aplikace a z terminálu): zápisy obou jsou stromu",
|
|
3102
|
+
"ui.check.otherkey.hint": "sjednotit ve vlastním terminálu: strom seal adopt – nikdy strom repair",
|
|
3090
3103
|
"ui.seal.problems": "nepřevzato: záznamy nesedí se svou pečetí – co, řekne strom check",
|
|
3091
3104
|
"ui.menu.seal": "Zapečetěno na jiném počítači: zapisovat tu jde až po převzetí (strom seal adopt).",
|
|
3092
3105
|
"ui.seal.bridge": "výzkum „{name}“ je zapečetěný na jiném počítači: nic se nezapsalo – po převzetí na tomto počítači (terminál: strom seal adopt, nebo nabídka strom) poslat znovu",
|
|
3106
|
+
"ui.seal.bridge.twokeys": "výzkum „{name}“ je na tomto počítači zapečetěný dvěma klíči stromu (strom z aplikace a z terminálu): nic se nezapsalo – po sjednocení (terminál: strom seal adopt, nebo nabídka strom) poslat znovu",
|
|
3093
3107
|
"ui.check.foreignseal": "zapečetěno na jiném počítači (nebo tu chybí nastavení stromu): číst jde, zapisovat až po převzetí tady",
|
|
3094
3108
|
"ui.check.foreignseal.hint": "převzít ve vlastním terminálu: strom seal adopt – nebo v nabídce (strom)",
|
|
3095
3109
|
"ui.why.seal.human": "výzkum je zapečetěný na jiném počítači: zapisovat tu jde až po převzetí (potvrzuje se v tomto terminálu)",
|
package/assets/lang/de.json
CHANGED
|
@@ -569,6 +569,8 @@
|
|
|
569
569
|
"ui.tree.created": "✓ Der Stammbaum „{name}“ ist angelegt: {dir}",
|
|
570
570
|
"ui.chat.trust": "Beim ersten Mal fragt Claude Code, ob diesem Ordner vertraut wird. Es ist der Ordner des Stammbaums, von strom angelegt – mit „Yes, proceed“ bestätigen.",
|
|
571
571
|
"ui.doc.program": "Programm",
|
|
572
|
+
"ui.doc.packaged": "Kopie des Programms",
|
|
573
|
+
"ui.doc.packaged.copy": "eine für Windows verpackte App hat eine eigene Kopie des Programms: {folders} – diese App startet ein anderes strom als das Terminal",
|
|
572
574
|
"ui.doc.git": "Git (Verlauf)",
|
|
573
575
|
"ui.doc.home": "Forschungsordner",
|
|
574
576
|
"ui.doc.gitdir": "git im Forschungsordner",
|
|
@@ -636,6 +638,7 @@
|
|
|
636
638
|
"ui.doc.appurl.env.fix": "die Variable STROM_APP_URL auf eine Adresse der Strom-App setzen ({web}, oder eine Kopie auf diesem Computer http://127.0.0.1:<port>/) oder entfernen",
|
|
637
639
|
"ui.doc.tree.ok": "{name}: Daten in Ordnung und versiegelt",
|
|
638
640
|
"ui.doc.tree.bad": "{name}: {n, plural, one {# Problem} other {# Probleme}}",
|
|
641
|
+
"ui.doc.tree.twokeys": "{name}: mit zwei Schlüsseln von strom auf diesem Computer versiegelt (strom einer App und eines Terminals) – die Schreibvorgänge beider sind von strom",
|
|
639
642
|
"ui.doc.write": "Schreiben in diesen Stammbaum",
|
|
640
643
|
"ui.doc.write.ok": "in sein .strom und .git kann geschrieben werden",
|
|
641
644
|
"ui.doc.write.sandbox": "{where}: Schreiben verweigert – strom läuft unter einem Agenten, wahrscheinlich verbietet es dessen Sandbox",
|
|
@@ -672,6 +675,8 @@
|
|
|
672
675
|
"ui.fix.git.inwindow": "Die Installation im Fenster des Systems abschließen, dann strom doctor erneut starten.",
|
|
673
676
|
"ui.fix.failed": "Das hat nicht geklappt: {detail}",
|
|
674
677
|
"ui.fix.app": "Die Strom-App im Browser öffnen, um sie zu installieren?",
|
|
678
|
+
"ui.fix.packaged": "Die Kopie des Programms, die eine App für sich behält, in den Papierkorb legen (die App startet dann das strom des Terminals)?",
|
|
679
|
+
"ui.fix.packaged.done": "Im Papierkorb: {folder}",
|
|
675
680
|
"ui.fix.nothing": "Nichts, was strom selbst beheben kann – siehe die Pfeile.",
|
|
676
681
|
"ui.why.git.human": "Git fehlt – strom bewahrt darin den Verlauf der Forschung auf",
|
|
677
682
|
"ui.why.git.agent": "Git fehlt (strom bewahrt darin den Verlauf auf): sag es dem Benutzer und führe dies aus – der Benutzer bestätigt in einem Fenster des Systems",
|
|
@@ -2565,6 +2570,8 @@
|
|
|
2565
2570
|
"ui.error.folder.in-program.default.hint": "Einen Ordner außerhalb angeben: strom setup --home \"{suggested}\" --yes",
|
|
2566
2571
|
"ui.error.update.in-program": "{folder} liegt in {entry}, das das Update ersetzt – die Forschung ginge mit. Nichts wurde installiert.",
|
|
2567
2572
|
"ui.error.update.in-program.hint": "Zuerst die Forschung aus dem Programmordner von strom verschieben: strom setup in einem eigenen Terminal (die Frage nach dem Ordner verschiebt sie mit), dann erneut strom update",
|
|
2573
|
+
"ui.error.update.packaged": "Dieses strom wurde von einer für Windows verpackten App (MSIX) gestartet: was das Update in {folder} installierte, sähe nur diese App, das Terminal bliebe bei {current}. Nichts wurde installiert.",
|
|
2574
|
+
"ui.error.update.packaged.hint": "strom update in einem eigenen Terminal (PowerShell); die App übernimmt die neue Version von dort",
|
|
2568
2575
|
"ui.error.tree.newer": "Diesen Stammbaum hat strom {by} geschrieben, neuer als dieses strom {version}. Dieses strom lässt ihn unverändert.",
|
|
2569
2576
|
"ui.error.tree.newer.hint": "strom aktualisieren: strom update",
|
|
2570
2577
|
"ui.error.tree.newer.backup": "Diesen Stammbaum hat strom {by} geschrieben, neuer als dieses strom {version}. Dieses strom lässt ihn unverändert.",
|
|
@@ -3087,9 +3094,16 @@
|
|
|
3087
3094
|
"ui.seal.ask": "„{name}“ auf diesem Computer übernehmen? Die Einträge sind geprüft und unverändert.",
|
|
3088
3095
|
"ui.seal.adopted": "„{name}“ ist jetzt auf diesem Computer versiegelt – schreiben geht hier",
|
|
3089
3096
|
"ui.seal.already": "„{name}“ ist auf diesem Computer schon versiegelt",
|
|
3097
|
+
"ui.seal.unite.ask": "„{name}“ ist auf diesem Computer mit zwei Schlüsseln von strom versiegelt (strom aus einer App und aus einem Terminal, jedes mit eigenen Einstellungen). Vereinen? Alle Einträge sind geprüft: nichts außerhalb von strom geändert, nichts geht verloren.",
|
|
3098
|
+
"ui.seal.united": "„{name}“ ist jetzt auf diesem Computer mit einem Schlüssel versiegelt – schreiben geht aus der App wie aus dem Terminal",
|
|
3099
|
+
"ui.error.seal.other-key": "die Forschung „{name}“ ist auf diesem Computer mit zwei Schlüsseln von strom versiegelt (strom aus einer App und aus einem Terminal, jedes mit eigenen Einstellungen): nichts wurde geschrieben",
|
|
3100
|
+
"ui.error.seal.other-key.hint": "vereinen in einem eigenen Terminal: {set} – nie strom repair, das würde diese Arbeit rückgängig machen",
|
|
3101
|
+
"ui.check.otherkey": "mit zwei Schlüsseln von strom auf diesem Computer versiegelt (strom aus einer App und aus einem Terminal): was beide schrieben, ist von strom",
|
|
3102
|
+
"ui.check.otherkey.hint": "vereinen in einem eigenen Terminal: strom seal adopt – nie strom repair",
|
|
3090
3103
|
"ui.seal.problems": "nicht übernommen: was im Stammbaum steht, ist nicht so versiegelt, wie strom es schrieb – was, sagt strom check",
|
|
3091
3104
|
"ui.menu.seal": "Auf einem anderen Computer versiegelt: schreiben hier erst nach der Übernahme (strom seal adopt).",
|
|
3092
3105
|
"ui.seal.bridge": "die Forschung „{name}“ ist auf einem anderen Computer versiegelt: nichts wurde geschrieben – nach der Übernahme auf diesem Computer (Terminal: strom seal adopt, oder das Menü von strom) erneut senden",
|
|
3106
|
+
"ui.seal.bridge.twokeys": "die Forschung „{name}“ ist auf diesem Computer mit zwei Schlüsseln von strom versiegelt (strom einer App und eines Terminals): nichts wurde geschrieben – nach dem Vereinen (Terminal: strom seal adopt, oder das Menü von strom) erneut senden",
|
|
3093
3107
|
"ui.check.foreignseal": "auf einem anderen Computer versiegelt (oder die Einstellungen von strom fehlen hier): lesen geht, schreiben erst nach der Übernahme hier",
|
|
3094
3108
|
"ui.check.foreignseal.hint": "übernehmen in einem eigenen Terminal: strom seal adopt – oder im Menü (strom)",
|
|
3095
3109
|
"ui.why.seal.human": "die Forschung ist auf einem anderen Computer versiegelt: schreiben hier erst nach der Übernahme (bestätigt in diesem Terminal)",
|
package/dist/agents/files.js
CHANGED
|
@@ -14,6 +14,7 @@ import { isArchive } from "../core/mode.js";
|
|
|
14
14
|
import { Settings } from "../core/config.js";
|
|
15
15
|
import { agentAppUrl, appSite } from "../core/stromapp.js";
|
|
16
16
|
import { configDir, ownCommand } from "../core/paths.js";
|
|
17
|
+
import { oldSettingsDirs, packagedSettingsPattern } from "../core/oldsettings.js";
|
|
17
18
|
import { within } from "../core/relocate.js";
|
|
18
19
|
import { agentBrowser } from "../core/connector.js";
|
|
19
20
|
import { CHROME_ALLOW, CHROME_DENY, chromeDomain } from "../core/browser.js";
|
|
@@ -212,6 +213,15 @@ export function settingsKeptFrom(dir, research, platform = process.platform) {
|
|
|
212
213
|
return { path: p, folder };
|
|
213
214
|
});
|
|
214
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* What of strom's settings is kept from the agents: of today's folder, of each it was kept in before (oldsettings.ts),
|
|
218
|
+
* and every packaged app's copy whole, one made after these rules too.
|
|
219
|
+
*/
|
|
220
|
+
function keptSettings(tree, settings) {
|
|
221
|
+
const research = researchFolders(tree, settings);
|
|
222
|
+
const packaged = packagedSettingsPattern(tree.env);
|
|
223
|
+
return [...[configDir(tree.env), ...oldSettingsDirs(tree.env)].flatMap((d) => settingsKeptFrom(d, research)), ...(packaged ? [{ path: packaged, folder: true }] : [])];
|
|
224
|
+
}
|
|
215
225
|
/** The folders of the research the agent works in: its home, the shared folder, the tree. */
|
|
216
226
|
function researchFolders(tree, settings) {
|
|
217
227
|
return [settings.home()?.value, settings.shared()?.value, tree.root].filter((p) => !!p);
|
|
@@ -227,7 +237,7 @@ function treeRules(tree, agent) {
|
|
|
227
237
|
const shared = settings.shared()?.value;
|
|
228
238
|
const claude = agent === "claude";
|
|
229
239
|
const at = (abs) => (claude ? permissionPath(abs) : abs.replace(/\\/g, "/"));
|
|
230
|
-
const kept =
|
|
240
|
+
const kept = keptSettings(tree, settings).map((k) => (k.folder ? `${at(k.path)}/**` : at(k.path)));
|
|
231
241
|
// Browser tools (Claude in Chrome): for the sites of the connectors fetching through the browser — or, agent.browser
|
|
232
242
|
// always, of every archive of the research (anything else is asked in a conversation, not used in a run).
|
|
233
243
|
const web = claude ? agentBrowser(tree, shared) : { on: false, hosts: [] };
|
|
@@ -402,7 +412,7 @@ export function opencodeConfig(tree) {
|
|
|
402
412
|
}
|
|
403
413
|
: {}),
|
|
404
414
|
// the seal keys and the person's settings, and what the browser downloads (strom's to take over)
|
|
405
|
-
...Object.fromEntries(
|
|
415
|
+
...Object.fromEntries(keptSettings(tree, settings).map((k) => [k.folder ? `${abs(k.path)}/*` : abs(k.path), "deny"])),
|
|
406
416
|
[`${abs(settings.downloads())}/*`]: "deny",
|
|
407
417
|
},
|
|
408
418
|
webfetch: "allow",
|
package/dist/brief/history.js
CHANGED
|
@@ -200,6 +200,9 @@ function placeSections(tree, id, shared, alone) {
|
|
|
200
200
|
const events = c?.events ?? [];
|
|
201
201
|
const live = events.filter((e) => !e.retracted);
|
|
202
202
|
const theirs = regionEventsAt(tree, shared, p.id, at);
|
|
203
|
+
// its regions not looked through yet (K7.1a): what touched the whole region is theirs, written when they are
|
|
204
|
+
const maps = readPlaces(tree);
|
|
205
|
+
const waiting = [...new Set((at?.keys ?? []).flatMap((k) => maps[k]?.regions ?? []).map((g) => g.id))].filter((g) => !shared || !readCatalog(shared, g)?.done);
|
|
203
206
|
const out = [];
|
|
204
207
|
out.push({
|
|
205
208
|
name: "history",
|
|
@@ -237,6 +240,9 @@ function placeSections(tree, id, shared, alone) {
|
|
|
237
240
|
: [" none yet"]),
|
|
238
241
|
theirs.length ? `The regions' events at this place in its years (${theirs.length}) — the Strom app shows them here already, never written for the place (refused):` : "No region's event at this place yet.",
|
|
239
242
|
...theirs.slice(0, EVENTS_SHOWN).map(({ event: e, region }) => ` ${e.id} ${years(e.from, e.to)} ${e.kind} (${region.region.id}) "${short(e.text[lang] ?? e.text.en ?? Object.values(e.text)[0] ?? "")}"`),
|
|
243
|
+
waiting.length
|
|
244
|
+
? `Regions of this place not looked through yet (${waiting.join(", ")}): what touched the whole region (a war of the land, its epidemic, a reform of the state) is theirs, written when they are — here only what happened at the place or near enough to touch its people`
|
|
245
|
+
: "",
|
|
240
246
|
c?.tried.length ? `Pages strom could not read (never tried again): ${c.tried.slice(-20).map((t) => `${t.url} (${short(t.why, 40)})`).join(" · ")}` : "",
|
|
241
247
|
].filter(Boolean).join("\n"),
|
|
242
248
|
});
|
package/dist/cli/main.js
CHANGED
|
@@ -13,6 +13,7 @@ import { commands, match } from "./registry.js";
|
|
|
13
13
|
import { asCommand, asCommandJson, shellArg } from "./format.js";
|
|
14
14
|
import { groupHelpAs, helpAs } from "./help.js";
|
|
15
15
|
import { autoCommit } from "./commit.js";
|
|
16
|
+
import { takeOverOldSettings } from "../core/oldsettings.js";
|
|
16
17
|
import { assertIntact } from "../core/integrity.js";
|
|
17
18
|
import { head as gitHead, resetCache } from "../core/git.js";
|
|
18
19
|
import { newerTree, Tree, VERSION } from "../core/tree.js";
|
|
@@ -226,6 +227,14 @@ async function mainOf(argv, io, env, cwd) {
|
|
|
226
227
|
resetCache(undefined, "command");
|
|
227
228
|
// the app's install line in its one variable (STROM_FROM): read as the five of an older line
|
|
228
229
|
expandFromLine(env);
|
|
230
|
+
// strom's settings on Windows before (%APPDATA%\strom and a packaged app's copy of it) taken over, before anything
|
|
231
|
+
// reads them (core/oldsettings.ts)
|
|
232
|
+
try {
|
|
233
|
+
takeOverOldSettings(env);
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// taken over next time; the old ones are read meanwhile
|
|
237
|
+
}
|
|
229
238
|
// what ran and how long, for the reminder of the session's time
|
|
230
239
|
const startedAt = Date.now();
|
|
231
240
|
let ran;
|
package/dist/cli/menu.js
CHANGED
|
@@ -10,7 +10,7 @@ import fs from "node:fs";
|
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { ui } from "./ui.js";
|
|
12
12
|
import { isAgent } from "../core/which.js";
|
|
13
|
-
import { offerAdopt } from "./seal.js";
|
|
13
|
+
import { offerAdopt, offerUnite } from "./seal.js";
|
|
14
14
|
import { mb, setTidyAsked, tidyAskAgain, tidyAsked, tidyOn, tidyPlan, TIDY_SAID } from "../core/tidy.js";
|
|
15
15
|
import { calibrationLabel, calibrationOffer } from "../core/viewsizes.js";
|
|
16
16
|
/** A line as a sentence: its first letter capital (a catalog's text that also stands inside a line). */
|
|
@@ -231,6 +231,12 @@ export async function runMenu(ctx, run) {
|
|
|
231
231
|
out();
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
+
else if (offerUnite(ctx, tree, !isAgent(ctx.env))) {
|
|
235
|
+
// sealed here with two keys of this computer (strom of an app packaged for Windows and of a terminal): united on
|
|
236
|
+
// the person's yes, offered once (as strom seal adopt: every operation and record checked)
|
|
237
|
+
await run(["seal", "adopt", "--tree", root]);
|
|
238
|
+
out();
|
|
239
|
+
}
|
|
234
240
|
// what of it the Strom app does not show (only here in the terminal) said, so its number and the app's agree
|
|
235
241
|
if (waiting)
|
|
236
242
|
out(waitingLine(lang, waits));
|
package/dist/cli/seal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// every record checked against its seal, the person's yes, then this computer's key. Never by itself, never by an agent.
|
|
3
3
|
import { ui } from "./ui.js";
|
|
4
4
|
import { verifyFull } from "../core/integrity.js";
|
|
5
|
-
import { createKey } from "../core/seal.js";
|
|
5
|
+
import { createKey, fingerprint, otherKeys } from "../core/seal.js";
|
|
6
6
|
import { sealedHere } from "../core/tree.js";
|
|
7
7
|
/**
|
|
8
8
|
* The tree taken over here: refused while a record does not match its seal (what, strom check says), else asked — the
|
|
@@ -10,7 +10,7 @@ import { sealedHere } from "../core/tree.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export async function adoptSeal(ctx, tree, lang) {
|
|
12
12
|
if (tree.key)
|
|
13
|
-
return
|
|
13
|
+
return uniteSeal(ctx, tree, lang);
|
|
14
14
|
const problems = verifyFull(tree).findings.filter((f) => f.level === "error");
|
|
15
15
|
if (problems.length)
|
|
16
16
|
return { adopted: false, why: "problems", problems };
|
|
@@ -33,6 +33,16 @@ export function offerAdopt(ctx, root, person) {
|
|
|
33
33
|
asked.add(root);
|
|
34
34
|
return true;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Whether to offer uniting this tree's keys now (strom update brought a strom that sees both): sealed here, another key
|
|
38
|
+
* of this computer that the check needs, a person at a terminal, not asked yet in this process.
|
|
39
|
+
*/
|
|
40
|
+
export function offerUnite(ctx, tree, person) {
|
|
41
|
+
if (!person || !ctx.interactive || asked.has(tree.root) || !tree.key || !otherKeys(tree.env, tree.config.id, tree.key).length)
|
|
42
|
+
return false;
|
|
43
|
+
asked.add(tree.root);
|
|
44
|
+
return keysToUnite(tree).length > 0;
|
|
45
|
+
}
|
|
36
46
|
/**
|
|
37
47
|
* The family trees the setup found in the research's folder (strom brought back, a folder from another computer): each
|
|
38
48
|
* said, and of one sealed on another computer how it is taken over — the setup then never ends with "strom init".
|
|
@@ -48,3 +58,36 @@ export function foundTrees(ctx, lang) {
|
|
|
48
58
|
];
|
|
49
59
|
return { lines, foreign: foreign.map(({ name, root }) => ({ name, root })) };
|
|
50
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* The other keys of this computer a tree sealed here needs united (strom of an app packaged for Windows and of a
|
|
63
|
+
* terminal each had their own: core/oldsettings.ts): none when the check finds nothing wrong, or none of them.
|
|
64
|
+
*/
|
|
65
|
+
export function keysToUnite(tree) {
|
|
66
|
+
if (!tree.key)
|
|
67
|
+
return [];
|
|
68
|
+
if (!verifyFull(tree).findings.some((f) => f.level === "error"))
|
|
69
|
+
return [];
|
|
70
|
+
return otherKeys(tree.env, tree.config.id, tree.key).map((o) => o.key);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A tree sealed here with another key of this computer too: every operation of the other keys checked with them and
|
|
74
|
+
* every record against its seal — refused while anything does not match (a record changed outside strom stays refused),
|
|
75
|
+
* else the person's yes, then the operation seal.unite of this key (the other keys' operations until now taken) and its
|
|
76
|
+
* commit sealed with it.
|
|
77
|
+
*/
|
|
78
|
+
async function uniteSeal(ctx, tree, lang) {
|
|
79
|
+
const others = keysToUnite(tree);
|
|
80
|
+
if (!others.length)
|
|
81
|
+
return { adopted: false, why: "already" };
|
|
82
|
+
const problems = verifyFull(tree, { trust: others }).findings.filter((f) => f.level === "error");
|
|
83
|
+
if (problems.length)
|
|
84
|
+
return { adopted: false, why: "problems", problems };
|
|
85
|
+
if (!(await ctx.confirm(ui(lang, "ui.seal.unite.ask", { name: tree.config.name }), true)))
|
|
86
|
+
return { adopted: false, why: "cancelled" };
|
|
87
|
+
const united = others.map(fingerprint);
|
|
88
|
+
tree.withTreeLock(() => {
|
|
89
|
+
tree.appendOp({ op: "seal.unite", targets: [], files: [], summary: "Seal keys of this computer united", keys: united });
|
|
90
|
+
tree.commit("Seal: keys of this computer united");
|
|
91
|
+
});
|
|
92
|
+
return { adopted: true, united };
|
|
93
|
+
}
|
package/dist/cli/ui.js
CHANGED
|
@@ -540,6 +540,8 @@ export const UI = {
|
|
|
540
540
|
"ui.tree.created": "✓ The family tree \"{name}\" is ready: {dir}",
|
|
541
541
|
"ui.chat.trust": "The first time, Claude Code asks whether this folder is trusted. It is the family tree's folder, made by strom — confirm with \"Yes, proceed\".",
|
|
542
542
|
"ui.doc.program": "program",
|
|
543
|
+
"ui.doc.packaged": "copy of the program",
|
|
544
|
+
"ui.doc.packaged.copy": "an app packaged for Windows keeps a copy of the program of its own: {folders} — that app runs another strom than the terminal",
|
|
543
545
|
"ui.doc.git": "git (history)",
|
|
544
546
|
"ui.doc.home": "research folder",
|
|
545
547
|
"ui.doc.gitdir": "git in the research folder",
|
|
@@ -607,6 +609,7 @@ export const UI = {
|
|
|
607
609
|
"ui.doc.appurl.env.fix": "the variable STROM_APP_URL set to an address of the Strom app ({web}, or a copy on this computer http://127.0.0.1:<port>/), or removed",
|
|
608
610
|
"ui.doc.tree.ok": "{name}: data consistent and sealed",
|
|
609
611
|
"ui.doc.tree.bad": "{name}: {n, plural, one {# problem} other {# problems}}",
|
|
612
|
+
"ui.doc.tree.twokeys": "{name}: sealed with two keys of strom on this computer (strom of an app and of a terminal) — writes of both are strom's",
|
|
610
613
|
"ui.doc.write": "writing into this family tree",
|
|
611
614
|
"ui.doc.write.ok": "its .strom and .git can be written",
|
|
612
615
|
"ui.doc.write.sandbox": "{where}: writing refused — strom runs under an agent, most likely its sandbox forbids it",
|
|
@@ -643,6 +646,8 @@ export const UI = {
|
|
|
643
646
|
"ui.fix.git.inwindow": "Finish the installation in the window of the system, then run strom doctor again.",
|
|
644
647
|
"ui.fix.failed": "It did not work: {detail}",
|
|
645
648
|
"ui.fix.app": "Open the Strom app in the browser, to install it?",
|
|
649
|
+
"ui.fix.packaged": "Put the copy of the program an app keeps for itself into the trash (the app then runs the strom of the terminal)?",
|
|
650
|
+
"ui.fix.packaged.done": "Into the trash: {folder}",
|
|
646
651
|
"ui.fix.nothing": "Nothing strom can fix by itself — see the arrows.",
|
|
647
652
|
"ui.why.git.human": "git is missing — strom keeps the history of the research in it",
|
|
648
653
|
"ui.why.git.agent": "git is missing (strom keeps the research history in it): tell the user, then run this — the user says yes in a window of the system",
|
|
@@ -2420,6 +2425,8 @@ export const UI = {
|
|
|
2420
2425
|
"ui.error.folder.in-program.default.hint": "Name a folder outside it: strom setup --home \"{suggested}\" --yes",
|
|
2421
2426
|
"ui.error.update.in-program": "{folder} lies inside {entry}, which the update replaces — the research would go with it. Nothing was installed.",
|
|
2422
2427
|
"ui.error.update.in-program.hint": "First move the research out of strom's program folder: strom setup in a terminal of its own (the question about the folder moves it along), then strom update again",
|
|
2428
|
+
"ui.error.update.packaged": "This strom was started by an app packaged for Windows (MSIX): what the update installed into {folder} only that app would see, the terminal would stay at {current}. Nothing was installed.",
|
|
2429
|
+
"ui.error.update.packaged.hint": "strom update in a terminal of its own (PowerShell); the app takes the new version from there",
|
|
2423
2430
|
"ui.error.tree.newer": "This family tree was written by strom {by}, newer than this strom {version}. This strom keeps it untouched.",
|
|
2424
2431
|
"ui.error.tree.newer.hint": "Update strom: strom update",
|
|
2425
2432
|
"ui.error.tree.newer.backup": "This family tree was written by strom {by}, newer than this strom {version}. This strom keeps it untouched.",
|
|
@@ -2781,9 +2788,16 @@ export const UI = {
|
|
|
2781
2788
|
"ui.seal.ask": "Take over \"{name}\" on this computer? Its records were checked: unchanged.",
|
|
2782
2789
|
"ui.seal.adopted": "\"{name}\" is sealed on this computer now — writing works here",
|
|
2783
2790
|
"ui.seal.already": "\"{name}\" is sealed on this computer already",
|
|
2791
|
+
"ui.seal.unite.ask": "\"{name}\" was sealed with two keys of strom on this computer (strom of an app and of a terminal, each with settings of its own). Unite them? Every record was checked: nothing changed outside strom, nothing is lost.",
|
|
2792
|
+
"ui.seal.united": "\"{name}\" is sealed with one key on this computer now — writing works from the app and the terminal alike",
|
|
2793
|
+
"ui.error.seal.other-key": "\"{name}\" was sealed with two keys of strom on this computer (strom of an app and of a terminal, each with settings of its own): nothing written",
|
|
2794
|
+
"ui.error.seal.other-key.hint": "united in a terminal of its own: {set} — never strom repair, which would undo that work",
|
|
2795
|
+
"ui.check.otherkey": "sealed with two keys of strom on this computer (strom of an app and of a terminal): the writes of both are strom's own",
|
|
2796
|
+
"ui.check.otherkey.hint": "united in a terminal of its own: strom seal adopt — never strom repair",
|
|
2784
2797
|
"ui.seal.problems": "not taken over: records do not match their seals — what, strom check says",
|
|
2785
2798
|
"ui.menu.seal": "Sealed on another computer: writing here only once taken over (strom seal adopt).",
|
|
2786
2799
|
"ui.seal.bridge": "\"{name}\" was sealed on another computer: nothing was written — once it is taken over on this one (a terminal: strom seal adopt, or strom's menu), send again",
|
|
2800
|
+
"ui.seal.bridge.twokeys": "\"{name}\" was sealed with two keys of strom on this computer (strom of an app and of a terminal): nothing was written — once they are united (a terminal: strom seal adopt, or strom's menu), send again",
|
|
2787
2801
|
"ui.check.foreignseal": "sealed on another computer (or strom's settings are not on this one): it can be read, written only once taken over here",
|
|
2788
2802
|
"ui.check.foreignseal.hint": "taken over in a terminal of its own: strom seal adopt — or in strom's menu (strom)",
|
|
2789
2803
|
"ui.why.seal.human": "the research was sealed on another computer: writing here only once taken over (confirmed in this terminal)",
|
package/dist/commands/checks.js
CHANGED
|
@@ -8,9 +8,9 @@ import { counted, lines, table } from "../cli/format.js";
|
|
|
8
8
|
import { check, SHARED_MISSING, sharedMissing } from "../core/check.js";
|
|
9
9
|
import { guard } from "../core/guard.js";
|
|
10
10
|
import { unprovenPeople } from "../core/review.js";
|
|
11
|
-
import { NOT_DOWNLOADED, SEALED_PATHS, notDownloaded, notDownloadedError, verifyFast, verifyFull } from "../core/integrity.js";
|
|
11
|
+
import { NOT_DOWNLOADED, OTHER_KEY, SEALED_PATHS, notDownloaded, notDownloadedError, otherKeyError, verifyFast, verifyFull } from "../core/integrity.js";
|
|
12
12
|
import { verifyCommitSeal } from "../core/seal.js";
|
|
13
|
-
import { adoptSeal } from "../cli/seal.js";
|
|
13
|
+
import { adoptSeal, keysToUnite } from "../cli/seal.js";
|
|
14
14
|
import { NeedsConsentError, StromError } from "../core/errors.js";
|
|
15
15
|
import * as git from "../core/git.js";
|
|
16
16
|
import { ui } from "../cli/ui.js";
|
|
@@ -29,6 +29,8 @@ function said(f, lang) {
|
|
|
29
29
|
return ui(lang, "ui.check.unwritable");
|
|
30
30
|
if (lang && f.code === "foreign-seal")
|
|
31
31
|
return ui(lang, "ui.check.foreignseal");
|
|
32
|
+
if (lang && f.code === OTHER_KEY)
|
|
33
|
+
return ui(lang, "ui.check.otherkey");
|
|
32
34
|
if (lang && f.code === NOT_DOWNLOADED)
|
|
33
35
|
return ui(lang, "ui.check.notdownloaded", { n: f.count ?? 1, first: f.file ?? "" });
|
|
34
36
|
if (lang && f.code === SHARED_MISSING)
|
|
@@ -45,6 +47,8 @@ function said(f, lang) {
|
|
|
45
47
|
function hintSaid(f, lang) {
|
|
46
48
|
if (lang && f.code === "foreign-seal")
|
|
47
49
|
return ui(lang, "ui.check.foreignseal.hint");
|
|
50
|
+
if (lang && f.code === OTHER_KEY)
|
|
51
|
+
return ui(lang, "ui.check.otherkey.hint");
|
|
48
52
|
if (lang && f.code === NOT_DOWNLOADED)
|
|
49
53
|
return ui(lang, "ui.check.notdownloaded.hint");
|
|
50
54
|
if (lang && f.code === SHARED_MISSING)
|
|
@@ -185,8 +189,10 @@ function repair(tree) {
|
|
|
185
189
|
restored.push(rel);
|
|
186
190
|
}
|
|
187
191
|
}
|
|
192
|
+
// sealed again even when the commits outside strom changed nothing of it (an empty one, notes only): else the last
|
|
193
|
+
// commit stays unsealed and every write refused, with nothing left to repair
|
|
188
194
|
if (!headSealed)
|
|
189
|
-
tree.commit(`Repair: restore the sealed state of ${sealed.slice(0, 8)}\n\nCommits made outside strom were undone for data/, strom.json, history/ and quality/.`, SEALED_PATHS);
|
|
195
|
+
tree.commit(`Repair: restore the sealed state of ${sealed.slice(0, 8)}\n\nCommits made outside strom were undone for data/, strom.json, history/ and quality/.`, SEALED_PATHS, true);
|
|
190
196
|
return { restored, quarantined, from: sealed };
|
|
191
197
|
}
|
|
192
198
|
register({
|
|
@@ -210,22 +216,29 @@ register({
|
|
|
210
216
|
summary: "Take over a tree sealed on another computer (the user runs this in a terminal)",
|
|
211
217
|
group: "history",
|
|
212
218
|
tree: true,
|
|
213
|
-
description: "Checks the chain and every record hash, then creates this computer's seal key for the tree.\
|
|
219
|
+
description: "Checks the chain and every record hash, then creates this computer's seal key for the tree.\n" +
|
|
220
|
+
"A tree sealed here with a second key of this computer too (a copy of strom's settings an app packaged for Windows\n" +
|
|
221
|
+
"made): checks every operation of that key with it, then unites the keys — never strom repair, which would undo that work.\n" +
|
|
222
|
+
"Agents must not run this — it needs the user's confirmation.",
|
|
214
223
|
person: "Taking over this tree on this computer (the seal) is the user's own, in their terminal",
|
|
215
224
|
run: async (ctx) => {
|
|
216
225
|
const tree = ctx.tree();
|
|
217
226
|
// a person reads it in the research's language (the menu, a link's terminal, the setup go the same way)
|
|
218
227
|
const lang = tree.lang;
|
|
219
228
|
const name = tree.config.name;
|
|
220
|
-
|
|
229
|
+
// sealed here: another key of this computer to unite (strom of a packaged app and of a terminal), else nothing to do
|
|
230
|
+
const unite = tree.key ? keysToUnite(tree).length > 0 : false;
|
|
231
|
+
if (tree.key && !unite)
|
|
221
232
|
return { text: ui(lang, "ui.seal.already", { name }), data: { adopted: false } };
|
|
233
|
+
if (!ctx.interactive && unite)
|
|
234
|
+
throw otherKeyError(name);
|
|
222
235
|
if (!ctx.interactive)
|
|
223
236
|
throw new NeedsConsentError([
|
|
224
237
|
{ key: "seal", kind: "consent", question: "Take over this tree on this computer?", set: "strom seal adopt" },
|
|
225
238
|
]);
|
|
226
239
|
const r = await adoptSeal(ctx, tree, lang);
|
|
227
240
|
if (r.adopted)
|
|
228
|
-
return { text: ui(lang, "ui.seal.adopted", { name }), data: { adopted: true } };
|
|
241
|
+
return r.united ? { text: ui(lang, "ui.seal.united", { name }), data: { adopted: true, united: r.united } } : { text: ui(lang, "ui.seal.adopted", { name }), data: { adopted: true } };
|
|
229
242
|
if (r.why === "problems") {
|
|
230
243
|
const found = report(r.problems, "", lang, true);
|
|
231
244
|
return { ...found, text: lines(found.text, ui(lang, "ui.seal.problems")), data: { ...found.data, adopted: false } };
|
package/dist/commands/history.js
CHANGED
|
@@ -15,7 +15,7 @@ import { resolvePerson } from "../core/people.js";
|
|
|
15
15
|
import { checkQuotes, cleanText, findPassages, mainQuote, pageParts, PageError, quotesShape, readPage, PART_CHARS } from "../core/pagecheck.js";
|
|
16
16
|
import { currentSession } from "../core/session.js";
|
|
17
17
|
import { addLocalEvent, addRegionEvent, askFirst, assignPlace, checkKind, checkTexts, checkYears, deleteEvent, ensureRegion, factPlaceKey, hideEvent, historyAnswer, historyStatus, forGaps, forHistory, gapsOfTask, gapText, historyOrder, historyHeld, historyTurn, mapPlace, raiseHistoryTasks, markDone, donePeriod, noteTried, readCatalog, redoRegion, refuseBeforePage, REGION_LANGS, regionIdOk, regionOfTask, requireHistoryOn, requireRegionId, retractEvent, skipHistory, EVENT_KINDS, yearsToSearch, whoSees, readPlaces, inRegion, regionName, placeRecordOf, } from "../core/pastevents.js";
|
|
18
|
-
import { addPlaceEvent, askPlace, refusePlaceAsk, ensurePlaceCatalog, markPlaceDone, factsByRecord, notePlaceTried, placeEstimate, placeKeyOf, placeLabel, placeOfTask, readPlaceCatalog, refusePlaceBeforePage, requirePlace, setArea, yearsAt, } from "../core/placehistory.js";
|
|
18
|
+
import { addPlaceEvent, askPlace, refusePlaceAsk, ensurePlaceCatalog, markPlaceDone, factsByRecord, notePlaceTried, placeEstimate, placeKeyOf, placeLabel, placeOfTask, readPlaceCatalog, refusePlaceBeforePage, refusePlaceSame, requirePlace, setArea, yearsAt, } from "../core/placehistory.js";
|
|
19
19
|
// strom history list
|
|
20
20
|
import { moreLine, paginate } from "../cli/format.js";
|
|
21
21
|
import { displayName } from "../core/people.js";
|
|
@@ -336,8 +336,11 @@ register({
|
|
|
336
336
|
}
|
|
337
337
|
if (place)
|
|
338
338
|
refusePlaceBeforePage(tree, sh, place, { kind, from, to }, s, url);
|
|
339
|
-
else
|
|
339
|
+
else {
|
|
340
340
|
refuseBeforePage(sh, region, { kind, from, to }, s, url);
|
|
341
|
+
if (!s.sameAs && !s.distinct)
|
|
342
|
+
refusePlaceSame(tree, sh, region, { kind, from, to });
|
|
343
|
+
}
|
|
341
344
|
let checked;
|
|
342
345
|
try {
|
|
343
346
|
checked = await checkQuotes(url, quotes, { from, to }, sh, ctx.env);
|
|
@@ -363,6 +366,9 @@ register({
|
|
|
363
366
|
sha: checked.page.sha,
|
|
364
367
|
};
|
|
365
368
|
const event = { from, to, ...(date ? { date } : {}), kind, text, ...(why ? { why } : {}), ...(tip ? { tip } : {}), ...(opts.sensitive ? { sensitive: true } : {}), source };
|
|
369
|
+
// a place looked for before its region (K7.1a): its own events checked again once the page is read
|
|
370
|
+
if (!place && !s.sameAs && !s.distinct)
|
|
371
|
+
refusePlaceSame(tree, sh, region, { kind, from, to });
|
|
366
372
|
const r = place ? addPlaceEvent(tree, sh, place, event, s) : addRegionEvent(sh, tree.config.id, { region: region, ...event }, s);
|
|
367
373
|
const where = place ? `at ${placeLabel(place, "en")} (${place.id}) and its surroundings` : `in ${region}`;
|
|
368
374
|
// who it shows at (their person in the Strom app, their story): for the agent to say to the person who asked
|