strom-research 1.38.0-beta.6 → 1.38.0-beta.7
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 +4 -2
- package/CHANGELOG.de.md +4 -2
- package/CHANGELOG.md +4 -2
- package/CHANGELOG.pl.md +3 -2
- package/dist/commands/sync.js +1 -1
- package/dist/core/sync.js +32 -14
- package/dist/core/tree.js +1 -1
- package/package.json +1 -1
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.38.0
|
|
9
9
|
|
|
10
|
-
*Připravuje se: bety do 1.38.0-beta.
|
|
10
|
+
*Připravuje se: bety do 1.38.0-beta.7. Oddíl bude úplný s vydáním.*
|
|
11
11
|
|
|
12
12
|
- **Přehlednější menu v terminálu:** každá obrazovka říká, kde je (Strom › Nastavení › Údržba), volby jako
|
|
13
13
|
`[1] Popisek stav`, přepínač s tím, jak je teď a na co přepne, zpět vždy poslední jako `[0]` (i cesta stahovače v
|
|
@@ -16,7 +16,9 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
|
|
|
16
16
|
jen jedna linie výzkumu je o krok dál.
|
|
17
17
|
- **Materiál roztříděný jednou, nastavení výzkumu slovy:** soubor, kterému poslední třídění navrhlo název, druh,
|
|
18
18
|
datum nebo osoby a který je už má podle návrhu, se počítá za hotový a znovu se netřídí; co člověk o návrhu rozhodl
|
|
19
|
-
v aplikaci Strom (přijato, odmítnuto a proč), zůstane u třídění.
|
|
19
|
+
v aplikaci Strom (přijato, odmítnuto a proč), zůstane u třídění. Název, druh, datum a poznámka souboru zadané
|
|
20
|
+
v materiálu zůstanou, i když z něj aplikace Strom udělá portrét nebo přílohu bez nich a rodokmen pošle dvakrát (brály
|
|
21
|
+
se jako odebrané v aplikaci). Nastavení změněné z aplikace nebo z menu se
|
|
20
22
|
v posledních změnách ukáže názvem a hodnotou v jazyce výzkumu („Vypnuto ve výzkumu: Dotaz před tříděním materiálu“), už ne jako klíč
|
|
21
23
|
(`sort.confirm`).
|
|
22
24
|
- **Agent se zorientuje s méně pokusy:** `strom place find <jméno>` a `strom place <jméno>` navedou na
|
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.38.0
|
|
9
9
|
|
|
10
|
-
*In Vorbereitung: die Betas bis 1.38.0-beta.
|
|
10
|
+
*In Vorbereitung: die Betas bis 1.38.0-beta.7. Der Abschnitt ist mit dem Release vollständig.*
|
|
11
11
|
|
|
12
12
|
- **Ein übersichtlicheres Menü im Terminal:** jeder Bildschirm sagt, wo er ist (Strom › Einstellungen › Wartung), die
|
|
13
13
|
Auswahlen als `[1] Bezeichnung Stand`, ein Schalter mit seinem jetzigen Stand und wohin er umschaltet, zurück
|
|
@@ -18,7 +18,9 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
|
|
|
18
18
|
- **Material einmal sortiert, Einstellungen der Forschung in Worten:** eine Datei, der die letzte Sortierung einen
|
|
19
19
|
Titel, eine Art, ein Datum oder Personen vorschlug und die sie schon wie vorgeschlagen hat, gilt als erledigt und
|
|
20
20
|
wird nicht neu sortiert; was der Mensch in der Strom-App über einen Vorschlag entschied (übernommen, abgelehnt und
|
|
21
|
-
warum), bleibt bei der Sortierung.
|
|
21
|
+
warum), bleibt bei der Sortierung. Titel, Art, Datum und Notiz einer Datei, im Material angegeben, bleiben, auch
|
|
22
|
+
wenn die Strom-App daraus ein Porträt oder einen Anhang ohne sie macht und den Stammbaum zweimal sendet (sie galten
|
|
23
|
+
als in der App entfernt). Eine in der App oder im Menü geänderte Einstellung erscheint in den letzten Änderungen mit Namen und Wert in der Sprache der Forschung („In der Forschung ausgeschaltet:
|
|
22
24
|
Rückfrage vor dem Sortieren des Materials“), nicht mehr als Schlüssel (`sort.confirm`).
|
|
23
25
|
- **Der Agent findet sich mit weniger Versuchen zurecht:** `strom place find <Name>` und `strom place <Name>` führen
|
|
24
26
|
zu `strom place list <Name>`; `strom source list --note <Text>` listet mit einem Aufruf die Quellen, deren Notiz
|
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.38.0
|
|
9
9
|
|
|
10
|
-
*In preparation: the betas up to 1.38.0-beta.
|
|
10
|
+
*In preparation: the betas up to 1.38.0-beta.7. The section is complete with the release.*
|
|
11
11
|
|
|
12
12
|
- **A clearer menu in the terminal:** every screen says where it is (Strom › Settings › Maintenance), its options as
|
|
13
13
|
`[1] Label state`, a switch with how it is now and what it switches to, back last as `[0]` (also the way a
|
|
@@ -16,7 +16,9 @@ The changes of each version in short. The full notes and the install lines are o
|
|
|
16
16
|
first with what is next in it; one line of the research alone is a step further.
|
|
17
17
|
- **Material sorted once, a research's settings in words:** a file whose last sorting proposed a title, kind, date or
|
|
18
18
|
people and which already has them as proposed counts as done and is not sorted again; what the person decided on a
|
|
19
|
-
proposal in the Strom app (taken over, refused, and why) is kept with the sorting. A
|
|
19
|
+
proposal in the Strom app (taken over, refused, and why) is kept with the sorting. A file's title, kind, date and
|
|
20
|
+
note given in the material stay when the Strom app makes a portrait or an attachment of it without them and sends the
|
|
21
|
+
tree twice (they were taken off as removed in the app). A setting changed from the app or
|
|
20
22
|
the menu shows in the recent changes by its name and value in the research's language ("Turned off in the research: Question before the
|
|
21
23
|
material is sorted"), no longer as its key (`sort.confirm`).
|
|
22
24
|
- **The agent finds its way with fewer tries:** `strom place find <name>` and `strom place <name>` point to
|
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.38.0
|
|
9
9
|
|
|
10
|
-
*W przygotowaniu: bety do 1.38.0-beta.
|
|
10
|
+
*W przygotowaniu: bety do 1.38.0-beta.7. Sekcja będzie kompletna z wydaniem.*
|
|
11
11
|
|
|
12
12
|
- **Bardziej przejrzyste menu w terminalu:** każdy ekran mówi, gdzie jest (Strom › Ustawienia › Konserwacja), opcje
|
|
13
13
|
jako `[1] Etykieta stan`, przełącznik z tym, jak jest teraz i na co przełącza, powrót zawsze na końcu jako `[0]`
|
|
@@ -17,7 +17,8 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
|
|
|
17
17
|
- **Materiał posortowany raz, ustawienia badania słowami:** plik, któremu ostatnie sortowanie zaproponowało tytuł,
|
|
18
18
|
rodzaj, datę lub osoby i który ma je już zgodnie z propozycją, liczy się jako gotowy i nie jest sortowany ponownie;
|
|
19
19
|
to, co człowiek zdecydował o propozycji w aplikacji Strom (przyjęto, odrzucono i dlaczego), zostaje przy
|
|
20
|
-
sortowaniu.
|
|
20
|
+
sortowaniu. Tytuł, rodzaj, data i notatka pliku podane w materiałach zostają, także gdy aplikacja Strom zrobi z niego
|
|
21
|
+
portret lub załącznik bez nich i wyśle drzewo dwa razy (były brane jako usunięte w aplikacji). Ustawienie zmienione w aplikacji lub w menu pokazuje się w ostatnich zmianach nazwą i wartością w języku badania („Wyłączono w badaniu: Pytanie przed sortowaniem materiałów”), już nie
|
|
21
22
|
jako klucz (`sort.confirm`).
|
|
22
23
|
- **Agent odnajduje się przy mniejszej liczbie prób:** `strom place find <nazwa>` i `strom place <nazwa>` kierują do
|
|
23
24
|
`strom place list <nazwa>`; `strom source list --note <tekst>` wypisuje jednym wywołaniem źródła, których notatka
|
package/dist/commands/sync.js
CHANGED
|
@@ -633,7 +633,7 @@ register({
|
|
|
633
633
|
// a send of the app waited in the inbox: written now (the app hears it through the bridge)
|
|
634
634
|
// the app's files it wrote, with the records they are (the bridge's answer: `media`)
|
|
635
635
|
const media = mediaWritten(written.changes, skipped);
|
|
636
|
-
clocked("settle", () => settleReceived(tree.root, file, { state: "written", input: input.id, kept: written.changes.filter((c) => c.kept).length, notWritten: notWrittenList(written.changes), skipped, media, ...(retracted.length ? { retracted } : {}) }, input.sync?.applied ?? []));
|
|
636
|
+
clocked("settle", () => settleReceived(tree.root, file, { state: "written", input: input.id, kept: written.changes.filter((c) => c.kept).length, notWritten: notWrittenList(written.changes), skipped, media, ...(retracted.length ? { retracted } : {}), ...(written.mediaCarried ? { mediaSent: written.mediaCarried } : {}) }, input.sync?.applied ?? []));
|
|
637
637
|
// each send of the app a little more history: packed in the background once it has grown
|
|
638
638
|
compactSoon(tree.root, ctx.env);
|
|
639
639
|
// a question to the person is no change of the research: counted as what it is
|
package/dist/core/sync.js
CHANGED
|
@@ -3857,7 +3857,7 @@ function planned(tree, incoming, edits, opts, timed) {
|
|
|
3857
3857
|
for (const c of idsToAdd(tree, incoming))
|
|
3858
3858
|
push(c);
|
|
3859
3859
|
// the files of the app's tree: only added (a record, a place, a portrait's new version), never conflicts, in every state
|
|
3860
|
-
planMedia(tree, incoming, ours, sources, { based: !!base, whole: !!opts.mediaApp && !partial }, changes, push);
|
|
3860
|
+
const mediaCarried = planMedia(tree, incoming, ours, sources, { based: !!base, whole: !!opts.mediaApp && !partial }, changes, push);
|
|
3861
3861
|
if (incoming.head && opts.takenBack !== false && !sentAgain)
|
|
3862
3862
|
takenBack(tree, incoming, edits, changes);
|
|
3863
3863
|
// a send of the app (`sent`: it came through the bridge) with nothing to stand on (no _STROM_HEAD, no _STROM_SINCE the research still has —
|
|
@@ -3915,7 +3915,7 @@ function planned(tree, incoming, edits, opts, timed) {
|
|
|
3915
3915
|
surname: c,
|
|
3916
3916
|
});
|
|
3917
3917
|
}
|
|
3918
|
-
return { changes, sources, readings, base: !!base, ...(incoming.head ? { head: incoming.head } : {}), partial, identity, ...(mended ? { mended } : {}), ...(waiting.size ? { waiting: [...waiting].sort() } : {}) };
|
|
3918
|
+
return { changes, sources, readings, base: !!base, ...(incoming.head ? { head: incoming.head } : {}), partial, identity, ...(mended ? { mended } : {}), ...(waiting.size ? { waiting: [...waiting].sort() } : {}), ...(mediaCarried ? { mediaCarried } : {}) };
|
|
3919
3919
|
}
|
|
3920
3920
|
/** The day a file was written (its HEAD's DATE, "28 OCT 2026" → 2026-10-28). */
|
|
3921
3921
|
function headDay(head) {
|
|
@@ -4932,7 +4932,8 @@ function mediaBase(tree, incoming) {
|
|
|
4932
4932
|
if (!l.retracted)
|
|
4933
4933
|
links.add(linkKey(id, l));
|
|
4934
4934
|
// the sends of this tree of the app written since its head: the commits that brought their inputs, the oldest first
|
|
4935
|
-
const
|
|
4935
|
+
const sends = incoming.appTree ? receivedAll(tree.root).filter((r) => r.tree === incoming.appTree && r.state === "written" && r.input && !atHead.has(r.input)) : [];
|
|
4936
|
+
const own = new Set(sends.map((r) => r.input));
|
|
4936
4937
|
const commits = [];
|
|
4937
4938
|
if (own.size) {
|
|
4938
4939
|
const r = git.runGit(tree.root, ["log", "--name-only", "--format=%x1e%H", `${head}..HEAD`, "--", "data/inputs"]);
|
|
@@ -4940,25 +4941,40 @@ function mediaBase(tree, incoming) {
|
|
|
4940
4941
|
for (const entry of r.stdout.split("\x1e").slice(1)) {
|
|
4941
4942
|
const [commit, ...files] = entry.trim().split("\n");
|
|
4942
4943
|
const ids = files.map((f) => idOf(f.trim())).filter((x) => !!x);
|
|
4943
|
-
|
|
4944
|
-
|
|
4944
|
+
const input = ids.find((x) => own.has(x));
|
|
4945
|
+
if (commit && input)
|
|
4946
|
+
commits.unshift({ commit, records: ids.filter((x) => !own.has(x)), input });
|
|
4945
4947
|
}
|
|
4946
4948
|
for (const rec of tree.list("input"))
|
|
4947
4949
|
for (const l of rec.links ?? [])
|
|
4948
4950
|
if (l.input && own.has(l.input))
|
|
4949
4951
|
links.add(linkKey(rec.id, l));
|
|
4950
4952
|
}
|
|
4951
|
-
//
|
|
4953
|
+
// what each own send carried of the files its head gave no place in the tree (kept with it, by its input)
|
|
4954
|
+
const sentOf = new Map(sends.filter((r) => r.mediaSent).map((r) => [r.input, r.mediaSent]));
|
|
4955
|
+
// the records the app was given: those in its tree at the head (a place there), and those its own sends wrote since —
|
|
4956
|
+
// never a record of the material that had no place in the tree (found: the note of a file the app first got in that
|
|
4957
|
+
// very send taken as removed by its user, its commit refused, the research stuck for every write after it)
|
|
4958
|
+
const given = new Set([...atHead].filter(([, r]) => !r.retracted && (r.links ?? []).some((l) => !l.retracted)).map(([id]) => id));
|
|
4959
|
+
// a record's fields: one given at the head as the head had them, each as the last own send that changed it left it;
|
|
4960
|
+
// one the head gave no place in the tree only what the own sends carried — the head's value of it the app was never
|
|
4961
|
+
// given (found: a title and kind given in the material, the app's portrait of the file without them, its second send
|
|
4962
|
+
// took them as removed by the user and the commit took them off)
|
|
4952
4963
|
const cache = new Map();
|
|
4953
4964
|
const fieldsOf = (id) => {
|
|
4954
4965
|
if (cache.has(id))
|
|
4955
4966
|
return cache.get(id);
|
|
4956
|
-
const at = atHead.get(id);
|
|
4957
|
-
|
|
4958
|
-
let got = out;
|
|
4967
|
+
const at = given.has(id) ? atHead.get(id) : undefined;
|
|
4968
|
+
let got = at ? Object.fromEntries(MEDIA_FIELDS.map((k) => [k, mediaValue(at, k)])) : undefined;
|
|
4959
4969
|
for (const c of commits) {
|
|
4960
4970
|
if (!c.records.includes(id))
|
|
4961
4971
|
continue;
|
|
4972
|
+
// what the send carried, where it is kept (a strom before keeps none): the whole of what the app had of the file
|
|
4973
|
+
const sent = !at && c.input ? sentOf.get(c.input)?.[id] : undefined;
|
|
4974
|
+
if (sent) {
|
|
4975
|
+
got = { ...sent };
|
|
4976
|
+
continue;
|
|
4977
|
+
}
|
|
4962
4978
|
const [after, before] = [parse(git.showFile(tree.root, c.commit, `data/inputs/${id}.json`)), parse(git.showFile(tree.root, `${c.commit}^`, `data/inputs/${id}.json`))];
|
|
4963
4979
|
if (!after)
|
|
4964
4980
|
continue;
|
|
@@ -4970,12 +4986,8 @@ function mediaBase(tree, incoming) {
|
|
|
4970
4986
|
cache.set(id, got);
|
|
4971
4987
|
return got;
|
|
4972
4988
|
};
|
|
4973
|
-
// the records the app was given: those in its tree at the head (a place there), and those its own sends wrote since —
|
|
4974
|
-
// never a record of the material that had no place in the tree (found: the note of a file the app first got in that
|
|
4975
|
-
// very send taken as removed by its user, its commit refused, the research stuck for every write after it)
|
|
4976
|
-
const given = [...atHead].filter(([, r]) => !r.retracted && (r.links ?? []).some((l) => !l.retracted)).map(([id]) => id);
|
|
4977
4989
|
const records = new Set([...given, ...commits.flatMap((c) => c.records)]);
|
|
4978
|
-
return { links, records, field: (id, k) => (records.has(id) ? fieldsOf(id)?.[k] : undefined) };
|
|
4990
|
+
return { links, records, given, field: (id, k) => (records.has(id) ? fieldsOf(id)?.[k] : undefined) };
|
|
4979
4991
|
}
|
|
4980
4992
|
/** What of a record only follows the file (no change of the user's): the original come, a working copy, its orientation. */
|
|
4981
4993
|
function mediaKept(rec, f) {
|
|
@@ -5144,6 +5156,7 @@ function planMedia(tree, incoming, ours, sources, o, changes, push) {
|
|
|
5144
5156
|
}
|
|
5145
5157
|
}
|
|
5146
5158
|
// what the user gave a file the research has: its title, kind, date, note — against the record as the app was given it
|
|
5159
|
+
const carried = {};
|
|
5147
5160
|
const wasOf = (id) => {
|
|
5148
5161
|
if (!based || !incoming.head)
|
|
5149
5162
|
return undefined;
|
|
@@ -5162,6 +5175,10 @@ function planMedia(tree, incoming, ours, sources, o, changes, push) {
|
|
|
5162
5175
|
push({ kind: "media.edit", action: "report", code: "media.unreadable", ...first.get(key), text: f.title ?? f.name ?? key.slice(0, 12), media: { file: key, ...recOf(rec) } });
|
|
5163
5176
|
if (!rec || !first.has(key))
|
|
5164
5177
|
continue;
|
|
5178
|
+
// a file whose record had no place in the tree at the head (the app was never given it with the tree): what the
|
|
5179
|
+
// send carries of it is kept with the send — the base of its fields for the next sends (mediaBase), never the head's
|
|
5180
|
+
if (incoming.appTree && !(base ? base.given.has(rec.id) : rec.links?.some((l) => !l.retracted)))
|
|
5181
|
+
carried[rec.id] = Object.fromEntries(MEDIA_FIELDS.flatMap((k) => (fileValue(f, k) === undefined ? [] : [[k, fileValue(f, k)]])));
|
|
5165
5182
|
const fields = mediaFields(rec, f, wasOf(rec.id), base?.records.has(rec.id) ? (k) => base.field(rec.id, k) : undefined);
|
|
5166
5183
|
const kept = mediaKept(rec, f);
|
|
5167
5184
|
if (!fields.length && (!kept.length || touched.has(key)))
|
|
@@ -5183,6 +5200,7 @@ function planMedia(tree, incoming, ours, sources, o, changes, push) {
|
|
|
5183
5200
|
text: u.name,
|
|
5184
5201
|
});
|
|
5185
5202
|
}
|
|
5203
|
+
return Object.keys(carried).length ? carried : undefined;
|
|
5186
5204
|
}
|
|
5187
5205
|
/**
|
|
5188
5206
|
* The places of files the app was given (the media base) that a send carrying all its files no longer has: taken off
|
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.38.0-beta.
|
|
35
|
+
export const VERSION = "1.38.0-beta.7";
|
|
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", "name-status-1"];
|
|
38
38
|
const GITIGNORE = `# Strom Research — local state and large files are not versioned
|