strom-research 1.13.0-beta.8 → 1.13.0

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.
@@ -419,7 +419,6 @@
419
419
  "ui.menu.update": "Aktualizovat strom na {version}",
420
420
  "ui.doc.update": "nová verze",
421
421
  "ui.doc.update.new": "vyšla {version}",
422
- "ui.update.unknown": "Nepodařilo se zjistit nejnovější verzi stromu.",
423
422
  "ui.update.current": "strom {version} je nejnovější verze.",
424
423
  "ui.update.available": "Vyšla nová verze: {version} (tato je {current}) – nainstaluje ji strom update.",
425
424
  "ui.update.npm": "Vyšla nová verze: {version}. strom je tu nainstalovaný přes npm: npm install -g strom-research@{tag}",
@@ -851,6 +850,8 @@
851
850
  "ui.error.tree.none.hint": "založit ho: strom init \"<název>\"",
852
851
  "ui.error.tree.which": "který rodokmen? je jich tu víc",
853
852
  "ui.error.tree.which.hint": "zadat --tree <název>: {names}",
853
+ "ui.error.update.unknown": "nepodařilo se zjistit nejnovější verzi stromu",
854
+ "ui.error.update.unknown.hint": "zkontrolovat připojení k síti – nebo spustit instalátor znovu",
854
855
  "ui.error.sync.which": "který rodokmen? soubor, nebo --app (rovnou z aplikace Strom)",
855
856
  "ui.error.sync.which.hint": "strom sync ~/Downloads/rodina.ged · strom sync --app · co čeká: strom sync --inbox",
856
857
  "ui.live.runs": "most běží: {url}",
@@ -419,7 +419,6 @@
419
419
  "ui.menu.update": "strom auf {version} aktualisieren",
420
420
  "ui.doc.update": "neue Version",
421
421
  "ui.doc.update.new": "{version} ist da",
422
- "ui.update.unknown": "Die neueste Version von strom ließ sich nicht ermitteln.",
423
422
  "ui.update.current": "strom {version} ist die neueste Version.",
424
423
  "ui.update.available": "Eine neue Version ist da: {version} (diese ist {current}) – strom update installiert sie.",
425
424
  "ui.update.npm": "Eine neue Version ist da: {version}. strom ist hier mit npm installiert: npm install -g strom-research@{tag}",
@@ -851,6 +850,8 @@
851
850
  "ui.error.tree.none.hint": "einen anlegen: strom init \"<Name>\"",
852
851
  "ui.error.tree.which": "welcher Stammbaum? es gibt mehrere",
853
852
  "ui.error.tree.which.hint": "--tree <Name> angeben: {names}",
853
+ "ui.error.update.unknown": "die neueste Version von strom ließ sich nicht ermitteln",
854
+ "ui.error.update.unknown.hint": "die Netzwerkverbindung prüfen – oder das Installationsprogramm erneut ausführen",
854
855
  "ui.error.sync.which": "welcher Stammbaum? eine Datei, oder --app (direkt aus der Strom-App)",
855
856
  "ui.error.sync.which.hint": "strom sync ~/Downloads/familie.ged · strom sync --app · was wartet: strom sync --inbox",
856
857
  "ui.live.runs": "die Brücke läuft: {url}",
package/dist/cli/ui.js CHANGED
@@ -346,7 +346,6 @@ export const UI = {
346
346
  "ui.menu.update": "Update strom to {version}",
347
347
  "ui.doc.update": "new version",
348
348
  "ui.doc.update.new": "{version} is out",
349
- "ui.update.unknown": "The newest version of strom could not be learned.",
350
349
  "ui.update.current": "strom {version} is the newest version.",
351
350
  "ui.update.available": "A new version is out: {version} (this is {current}) — strom update installs it.",
352
351
  "ui.update.npm": "A new version is out: {version}. strom is installed with npm here: npm install -g strom-research@{tag}",
@@ -767,6 +766,8 @@ export const UI = {
767
766
  "ui.error.tree.none.hint": "create one: strom init \"<tree name>\"",
768
767
  "ui.error.tree.which": "which tree? there are several",
769
768
  "ui.error.tree.which.hint": "pass --tree <name>: {names}",
769
+ "ui.error.update.unknown": "the newest version of strom could not be learned",
770
+ "ui.error.update.unknown.hint": "check the network — or run the installer again",
770
771
  "ui.error.sync.which": "which tree? a file, or --app (straight from the Strom app)",
771
772
  "ui.error.sync.which.hint": "strom sync ~/Downloads/family.ged · strom sync --app · what waits: strom sync --inbox",
772
773
  "ui.live.runs": "the bridge runs: {url}",
@@ -32,7 +32,7 @@ import { isInstalled } from "../agents/global.js";
32
32
  import { offerLinks, shortcutName } from "../cli/wizard.js";
33
33
  import { linkHandlerState, linkScheme } from "../core/links.js";
34
34
  import { globalTargets, installGlobal } from "../agents/global.js";
35
- import { placeholders, ui } from "../cli/ui.js";
35
+ import { placeholders, ui, UI } from "../cli/ui.js";
36
36
  import { PERMISSION_LEVELS } from "../core/config.js";
37
37
  import { PROFILES } from "../agents/profiles.js";
38
38
  import { NeedsInputError, StromError, UsageError } from "../core/errors.js";
@@ -471,8 +471,9 @@ register({
471
471
  const to = said;
472
472
  const channel = to ?? updateChannel(ctx.env);
473
473
  const latest = await latestRelease(ctx.env, { channel, timeoutMs: 8000 });
474
+ // the person's words in their language (the → line too); a program reads the English and the code (--json)
474
475
  if (!latest)
475
- throw new StromError(t("ui.update.unknown"), { hint: "check the network — or run the installer again" });
476
+ throw new StromError(UI["ui.error.update.unknown"], { hint: UI["ui.error.update.unknown.hint"], code: "update.unknown" });
476
477
  const newest = latest.version;
477
478
  ctx.settings.config.updateCheck = checked(newest, channel);
478
479
  ctx.settings.save();
package/dist/core/sync.js CHANGED
@@ -376,6 +376,8 @@ function allNotes(n, noteText) {
376
376
  }
377
377
  /** Words of a text, folded; numbers too (house numbers, years). */
378
378
  const wordsOf = (t) => foldText(t).match(/[\p{L}\p{M}\p{N}]{2,}/gu) ?? [];
379
+ /** The words of a text's labels — what stands before a colon on a line ("Birth:", "Address: "): the app's own in its shapes. */
380
+ const labelWords = (t) => new Set(t.split("\n").flatMap((l) => l.split(":").slice(0, -1).flatMap(wordsOf)));
379
381
  /**
380
382
  * A note the research has said already, folded into another shape by the app ("Birth: Address: čp. 35 …" of a
381
383
  * fact's notes): hardly a word of it that the research has not.
@@ -383,8 +385,12 @@ const wordsOf = (t) => foldText(t).match(/[\p{L}\p{M}\p{N}]{2,}/gu) ?? [];
383
385
  function knownNote(text, said) {
384
386
  const w = new Set(wordsOf(text));
385
387
  const unknown = [...w].filter((x) => !said.has(x));
386
- // a word or two of the app's own ("Birth:", "Address:") around what the research said — never a short note all new
387
- return unknown.length <= w.size * 0.2 || (unknown.length < 3 && unknown.length * 2 <= w.size);
388
+ if (unknown.length <= w.size * 0.2)
389
+ return true;
390
+ // a word or two of the app's own labels ("Birth:", "Address:") in front of what the research said — never a short
391
+ // note all new, nor the user's word beside one the research has (B-2: "Kim z matriky", the name and a word)
392
+ const labels = labelWords(text);
393
+ return unknown.length < 3 && unknown.length * 2 <= w.size && unknown.every((x) => labels.has(x));
388
394
  }
389
395
  /** A line of a note as compared: NFC, its spaces one (the app joins what GEDCOM splits). */
390
396
  const noteLine = (t) => t.normalize("NFC").replace(/\s+/g, " ").trim();
@@ -2027,7 +2033,8 @@ export function planSync(tree, incoming, edits, opts = {}) {
2027
2033
  * app's 3.10.0-beta.13: "nothing new taken", the edit lost) is no line the research has said: the user's own note
2028
2034
  * (typed by the user, or the app's) corrected, a session's kept and the user's line beside it (sync.edits user, an
2029
2035
  * archive: corrected too); a line like one the note still has, a line of its own. A line as the app was given it
2030
- * (the base) is no edit: the research's since stays.
2036
+ * (the base) is no edit: the research's since stays. The person's names (the partners') are no words the research
2037
+ * said in a note: a short note naming them is the user's (B-2: "Kim test" not taken).
2031
2038
  */
2032
2039
  const notesDiff = (owner, inc, said, facts, mine) => {
2033
2040
  const words = new Set(wordsOf([...said, ...facts.map((f) => [f.place, f.value, f.label].join(" "))].join("\n")));
@@ -2153,7 +2160,7 @@ export function planSync(tree, incoming, edits, opts = {}) {
2153
2160
  const overGuess = mySex === "U" && guessed !== undefined && !incoming.sexU;
2154
2161
  push({ kind: "sex.changed", action: b ? (edits === "user" ? "user" : backed || since || overGuess ? "conflict" : "correct") : "report", person: id, name, text: p.sex });
2155
2162
  }
2156
- notesDiff({ person: id, name }, p.notes, [o.said, b?.said ?? "", ...o.names], o.facts, tree.get(id)?.notes);
2163
+ notesDiff({ person: id, name }, p.notes, [o.said, b?.said ?? ""], o.facts, tree.get(id)?.notes);
2157
2164
  }
2158
2165
  if (base && !partial)
2159
2166
  for (const [key, b] of base.persons)
@@ -2336,7 +2343,7 @@ export function planSync(tree, incoming, edits, opts = {}) {
2336
2343
  const both = [...new Set([...o.partners, ...partners])];
2337
2344
  factsDiff({ family: fam.id, partners: both }, f.facts, o.facts, b?.facts, true);
2338
2345
  citesDiff({ family: fam.id, partners: both }, f.cites, fam, b?.cites);
2339
- notesDiff({ family: fam.id, partners: both }, f.notes, [o.said ?? "", b?.said ?? "", ...both.map((k) => ours.persons.get(k)?.names.join(" ") ?? "")], o.facts, fam.notes);
2346
+ notesDiff({ family: fam.id, partners: both }, f.notes, [o.said ?? "", b?.said ?? ""], o.facts, fam.notes);
2340
2347
  // how the couple is bound (no record proves it): the user's word where it changed since given, or where the research
2341
2348
  // has none; another word with nothing to stand on only said; none in the file takes nothing away (an older app)
2342
2349
  // (the one partner's married or divorced is the couple's facts' to say once the unknown one is named)
package/dist/core/tree.js CHANGED
@@ -27,7 +27,7 @@ import { lastBackup } from "./backup.js";
27
27
  export const TREE_FILE = "strom.json";
28
28
  // between releases the candidate being made (a bridge run from the sources says what it is: the Strom app goes by it);
29
29
  // at a release the release's own (package.json)
30
- export const VERSION = "1.13.0-beta.8";
30
+ export const VERSION = "1.13.0";
31
31
  const GITIGNORE = `# Strom Research — local state and large files are not versioned
32
32
  .strom/
33
33
  /media/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strom-research",
3
- "version": "1.13.0-beta.8",
3
+ "version": "1.13.0",
4
4
  "description": "Genealogical research toolkit for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,8 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@types/node": "^22.20.4",
47
47
  "typescript": "^7.0.2"
48
- },
49
- "publishConfig": {
50
- "tag": "beta"
51
48
  }
52
49
  }