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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.cs.md CHANGED
@@ -7,13 +7,18 @@ 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.1. Oddíl bude úplný s vydáním.*
10
+ *Připravuje se: bety do 1.31.1-beta.2. 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)
14
14
  na jeden snímek minuty a ukládání vzdalo po 30 s se zprávou, že dlaždice nedorazily všechny. Ta zpráva teď jmenuje,
15
15
  co pomůže: `strom config set browser.tileWait 180` (60–600 s) — skript pak čeká, dokud dlaždice ještě přicházejí,
16
16
  a agentovi odpovídá „strom-wait“, dokud není hotovo. Bez nastavení se nemění nic.
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
+ 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
+ (`--apply`) i jeho vrácení dál čekají na převzetí výzkumu.
20
+ - **`strom repair undo <razítko> --json` bez terminálu** teď odpovídá jako `strom repair`: `status: "needs-consent"`
21
+ s příkazem ke spuštění v terminálu, ne jen kódem 4.
17
22
 
18
23
  ## 1.31.0
19
24
 
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.1. Der Abschnitt ist mit dem Release vollständig.*
10
+ *In Vorbereitung: die Betas bis 1.31.1-beta.2. 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)
@@ -15,6 +15,12 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
15
15
  Meldung nennt jetzt, was hilft: `strom config set browser.tileWait 180` (60–600 s) — das Skript wartet dann, solange
16
16
  die Kacheln noch kommen, und antwortet dem Agenten „strom-wait“, bis es fertig ist. Ohne die Einstellung ändert sich
17
17
  nichts.
18
+ - **Die Vorschau von `strom source split` bei einer auf einem anderen Computer versiegelten Forschung.** Sie wurde
19
+ abgelehnt, bis die Forschung übernommen war (`strom seal adopt`), obwohl sie nur liest. Jetzt zeigt die Vorschau wie
20
+ jedes Lesen, was die Aufteilung täte; das Schreiben (`--apply`) und sein Rückgängigmachen warten weiter auf die
21
+ Übernahme der Forschung.
22
+ - **`strom repair undo <Stempel> --json` ohne Terminal** antwortet jetzt wie `strom repair`: `status: "needs-consent"`
23
+ mit dem Befehl, der in einem Terminal auszuführen ist, nicht nur mit dem Exit-Code 4.
18
24
 
19
25
  ## 1.31.0
20
26
 
package/CHANGELOG.md CHANGED
@@ -7,13 +7,18 @@ 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.1. The section is complete with the release.*
10
+ *In preparation: the betas up to 1.31.1-beta.2. 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
14
14
  image and saving gave up after 30 s with "the viewer's tiles did not all come". That message now names what helps:
15
15
  `strom config set browser.tileWait 180` (60–600 s) — the script then waits while the tiles still come and answers
16
16
  the agent "strom-wait" until it is done. Without the setting nothing changes.
17
+ - **The preview of `strom source split` on a research sealed on another computer.** It was refused until the research
18
+ was taken over there (`strom seal adopt`), though it only reads. Now the preview shows what the split would do, as
19
+ any reading does; writing it (`--apply`) and its undo still wait for the research to be taken over.
20
+ - **`strom repair undo <stamp> --json` without a terminal** now answers as `strom repair` does: `status:
21
+ "needs-consent"` with the command to run in a terminal, not only exit code 4.
17
22
 
18
23
  ## 1.31.0
19
24
 
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.1. Sekcja będzie kompletna z wydaniem.*
10
+ *W przygotowaniu: bety do 1.31.1-beta.2. 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)
@@ -15,6 +15,11 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
15
15
  Ten komunikat podaje teraz, co pomaga: `strom config set browser.tileWait 180` (60–600 s) — skrypt czeka wtedy,
16
16
  dopóki kafelki jeszcze przychodzą, i odpowiada agentowi „strom-wait”, aż skończy. Bez tego ustawienia nic się nie
17
17
  zmienia.
18
+ - **Podgląd `strom source split` w badaniu zapieczętowanym na innym komputerze.** Był odrzucany, dopóki badanie nie
19
+ zostało przejęte (`strom seal adopt`), choć tylko czyta. Teraz podgląd pokazuje, co zrobiłby podział, jak każde
20
+ czytanie; zapis (`--apply`) i jego cofnięcie nadal czekają na przejęcie badania.
21
+ - **`strom repair undo <znacznik> --json` bez terminala** odpowiada teraz jak `strom repair`: `status: "needs-consent"`
22
+ z poleceniem do uruchomienia w terminalu, nie tylko kodem wyjścia 4.
18
23
 
19
24
  ## 1.31.0
20
25
 
package/dist/cli/main.js CHANGED
@@ -284,6 +284,8 @@ async function mainOf(argv, io, env, cwd) {
284
284
  const { rest, passthrough } = def.passthrough ? splitPassthrough(resolved.rest) : { rest: resolved.rest, passthrough: [] };
285
285
  const parsed = parseOptions(def, rest, own);
286
286
  const v = parsed.values;
287
+ // what writes the tree: a command that writes only with some of its options reads as any read without them
288
+ const writes = !!def.writes && (!def.writesWith || def.writesWith({ args: parsed.positionals, opts: v }));
287
289
  // a hook's quick answer, strom error itself and a --dry-run (it writes nothing anywhere) never noted
288
290
  quiet = v.hook === true || def.path[0] === "error" || v["dry-run"] === true;
289
291
  if (v.help) {
@@ -401,7 +403,7 @@ async function mainOf(argv, io, env, cwd) {
401
403
  ctx.backupFailed = e;
402
404
  }
403
405
  }
404
- if (ctx.backupFailed && (def.writes || STARTS_WORK.has(def.path.join(" "))))
406
+ if (ctx.backupFailed && (writes || STARTS_WORK.has(def.path.join(" "))))
405
407
  throw ctx.backupFailed;
406
408
  const lastChannel = lastChannelOf(ctx.settings.config);
407
409
  const otherChannel = !!lastChannel && lastChannel !== channelNow;
@@ -563,14 +565,14 @@ async function mainOf(argv, io, env, cwd) {
563
565
  const work = async () => {
564
566
  // Never write on top of data that was changed outside strom.
565
567
  // (a command that locks only while it writes looks under the lock too: another strom may be in the middle of a write)
566
- if (def.writes && def.tree)
568
+ if (writes && def.tree)
567
569
  def.lock === "sections" ? ctx.tree().withTreeLock(() => assertIntact(ctx.tree())) : assertIntact(ctx.tree());
568
570
  let result;
569
571
  let blocked;
570
572
  // a write of the Strom app's (through the bridge, which holds the tree from its first read to its commit): the
571
573
  // research's head before it and after it, for the app to take its own write as its version only when nothing
572
574
  // came between (found: "the research has a newer version" after every file the app assigned)
573
- const forApp = def.writes && def.tree && def.lock !== "sections" && !ctx.dryRun && env.STROM_FOR_APP === "1";
575
+ const forApp = writes && def.tree && def.lock !== "sections" && !ctx.dryRun && env.STROM_FOR_APP === "1";
574
576
  const headNow = () => {
575
577
  const root = ctx.tree().root;
576
578
  resetCache(root);
@@ -592,14 +594,14 @@ async function mainOf(argv, io, env, cwd) {
592
594
  }
593
595
  // its commit is part of it: one that fails (found on Windows: _counters.json held by another program, its IDs
594
596
  // not written) takes back what the command wrote — a person or an agent running it again gets no second record
595
- if (def.writes)
597
+ if (writes)
596
598
  blocked = autoCommit(ctx, def);
597
599
  if (parent !== undefined && !blocked && result.data && typeof result.data === "object" && !Array.isArray(result.data))
598
600
  result.data = { ...result.data, commit: { head: headNow(), parent } };
599
601
  }
600
602
  catch (err) {
601
603
  // A writing command is a transaction: on failure nothing it wrote remains.
602
- const t = def.writes ? ctx.current() : undefined;
604
+ const t = writes ? ctx.current() : undefined;
603
605
  if (t)
604
606
  t.withTreeLock(() => t.rollback());
605
607
  throw err;
@@ -621,7 +623,7 @@ async function mainOf(argv, io, env, cwd) {
621
623
  };
622
624
  // Other strom processes may write to the same tree (other agents, a run): a writing
623
625
  // command has the tree to itself from its first read to its commit.
624
- const result = def.writes && def.tree && def.lock !== "sections" ? await ctx.tree().holdTreeLock(work) : await work();
626
+ const result = writes && def.tree && def.lock !== "sections" ? await ctx.tree().holdTreeLock(work) : await work();
625
627
  // a dry run says so, last, in the person's language — it reads as what would happen, never as done (found on
626
628
  // Windows: "taken back" of a dry run, nothing told it apart); an agent reads it in English, as the rest
627
629
  if (ctx.dryRun) {
@@ -255,13 +255,12 @@ register({
255
255
  const said = undoSaid(plan, lang);
256
256
  if (plan.back.length === 0)
257
257
  return { text: lines(said, ui(lang, "ui.repair.undo.nothing")), data: { ...data, undone: false, nothing: true } };
258
- if (!ctx.interactive)
259
- return { text: lines(said, "", ui(lang, "ui.repair.undo.person", { command: set })), data: { ...data, undone: false, run: set }, exitCode: 4 };
258
+ // a script, --json or no terminal: the consent it needs, as strom repair says it (status needs-consent, what to run)
259
+ ctx.requireHuman(`Put back what strom repair removed or replaced (${plan.back.length} file${plan.back.length === 1 ? "" : "s"}, a sealed change)?`, set, "repair", lines(said, "", ui(lang, "ui.repair.undo.person", { command: set })), { window: false });
260
260
  if (liveRunning(tree.root))
261
261
  throw new UsageError("the bridge to the Strom app runs on this research: nothing put back", { hint: `strom live stop, then ${set}`, code: "repair.undo-bridge" });
262
262
  if (liveWorkers(tree.root).length > 0 || runsAtWork(tree.root).length > 0)
263
263
  throw new UsageError("somebody is at work on this research: putting back only once they finished", { hint: `strom session finish, then ${set}`, code: "repair.undo-busy" });
264
- ctx.requireHuman("Put back what strom repair removed (a sealed change)?", set, "repair", ui(lang, "ui.repair.undo.person", { command: set }), { window: false });
265
264
  ctx.io.stdout(said + "\n");
266
265
  if (!(await ctx.confirm(ui(lang, "ui.repair.undo.ask"), false)))
267
266
  return { text: ui(lang, "ui.cancelled"), data: { ...data, undone: false } };
@@ -15,6 +15,8 @@ register({
15
15
  group: "sources",
16
16
  tree: true,
17
17
  writes: true,
18
+ // the preview reads only: anybody's, also on a research sealed on another computer (prod 1.31.0 N2)
19
+ writesWith: ({ opts }) => !!opts.apply || opts.undo !== undefined,
18
20
  person: PERSON,
19
21
  agentMay: { when: "without --apply and --undo (the preview)", check: (_ctx, { opts }) => !opts.apply && opts.undo === undefined },
20
22
  description: "The folio or page and the image each source's locator names (fol. 12v, pag. 112, S. 15, snímek 34, Bild 7, …) taken into\n" +
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.1";
35
+ export const VERSION = "1.31.1-beta.2";
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strom-research",
3
- "version": "1.31.1-beta.1",
3
+ "version": "1.31.1-beta.2",
4
4
  "stromDoc": "f1f6a992bb9cafaa788ee51023070309bb452997",
5
5
  "description": "Genealogical research toolkit for AI coding agents",
6
6
  "type": "module",