strom-research 1.29.0-beta.8 → 1.29.0-beta.9
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 +6 -1
- package/CHANGELOG.de.md +8 -2
- package/CHANGELOG.md +7 -2
- package/CHANGELOG.pl.md +7 -2
- package/assets/lang/cs.json +5 -0
- package/assets/lang/de.json +5 -0
- package/assets/lang/pl.json +5 -0
- package/dist/commands/source-reading.js +11 -2
- package/dist/commands/sources.js +1 -1
- package/dist/core/live.js +18 -8
- package/dist/core/phrases.js +5 -0
- package/dist/core/proposal.js +1 -1
- package/dist/core/sourceread.js +73 -26
- 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.29.0
|
|
9
9
|
|
|
10
|
-
*Připravuje se: bety do 1.29.0-beta.
|
|
10
|
+
*Připravuje se: bety do 1.29.0-beta.9. Oddíl bude úplný s vydáním.*
|
|
11
11
|
|
|
12
12
|
- **Kdo rozhoduje hypotézy: uživatel, nebo AI.** Nová volba výzkumu (`strom config set hypotheses.decide`, otázka
|
|
13
13
|
v úvodním nastavení spolu s ostatními volbami, Nastavení v menu stromu, nastavení výzkumu v aplikaci Strom):
|
|
@@ -112,6 +112,11 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
|
|
|
112
112
|
říká, co dál: *ptát se* (výchozí) – čtení zůstane u zdroje jako neověřené, dokud uživatel nezvolí: projít ho
|
|
113
113
|
s agentem hned, dát ho do fronty, nebo ho jen uložit (v terminálu hned po čtení, později `strom source reading S…`,
|
|
114
114
|
nebo v aplikaci Strom); *vždy* – úkol hned; *nikdy* – bez úkolu. Jeden zdroj má najednou jeden úkol svých čtení.
|
|
115
|
+
Čtení bez věcného údaje k rozhodnutí, jen s místy, kterými si čtenáři nejsou jistí, úkol samo nezaloží – ani při
|
|
116
|
+
*vždy*; jen na slovo uživatele (`strom source reading S… --take queue --unsure` nebo v aplikaci Strom) dostane agent
|
|
117
|
+
úkol projít každé takové místo na snímku: kde to snímek ukazuje jistě, přepis opraví i s důvodem, jinde napíše
|
|
118
|
+
poznámku k prameni. Přepis potvrzený uživatelem agent nikdy nemění: místa, která nové čtení přečetlo, se místo toho
|
|
119
|
+
navrhnou uživateli k posouzení (`--take review --unsure`).
|
|
115
120
|
|
|
116
121
|
- **Dále:** nápověda uvádí hodnoty každého nastavení s volbami a vysvětluje obě volby toho, kdo rozhoduje hypotézy;
|
|
117
122
|
`strom help --human` uvádí všechny příkazy, které spouští jen člověk. Povolení archivu dané ve výzkumu mimo složku
|
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.29.0
|
|
9
9
|
|
|
10
|
-
*In Vorbereitung: die Betas bis 1.29.0-beta.
|
|
10
|
+
*In Vorbereitung: die Betas bis 1.29.0-beta.9. Der Abschnitt ist mit dem Release vollständig.*
|
|
11
11
|
|
|
12
12
|
- **Wer Hypothesen entscheidet: der Mensch oder die KI.** Eine neue Einstellung der Forschung
|
|
13
13
|
(`strom config set hypotheses.decide`, die Frage der Ersteinrichtung neben den anderen Wahlen, Einstellungen im Menü
|
|
@@ -132,7 +132,13 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
|
|
|
132
132
|
Einstellung `read.sourceTask` sagt, was folgt: *fragen* (Standard) – die Lesung bleibt bei der Quelle als nicht
|
|
133
133
|
geprüft, bis der Nutzer wählt: jetzt mit dem Agenten durchgehen, in die Warteschlange, oder nur speichern (im Terminal
|
|
134
134
|
gleich nach der Lesung, später mit `strom source reading S…` oder in der Strom-App); *immer* – sofort eine Aufgabe;
|
|
135
|
-
*nie* – keine Aufgabe. Eine Quelle hat zugleich eine Aufgabe ihrer Lesungen.
|
|
135
|
+
*nie* – keine Aufgabe. Eine Quelle hat zugleich eine Aufgabe ihrer Lesungen. Eine Lesung ohne Sachangabe zum
|
|
136
|
+
Entscheiden, nur mit Stellen, deren sich die Leser nicht sicher sind, legt von selbst keine Aufgabe an – auch nicht
|
|
137
|
+
bei *immer*; nur auf das Wort des Nutzers (`strom source reading S… --take queue --unsure` oder in der Strom-App)
|
|
138
|
+
bekommt der Agent eine Aufgabe, jede solche Stelle auf dem Scan anzusehen: wo der Scan es sicher zeigt, die
|
|
139
|
+
Abschrift mit Begründung berichtigt, sonst eine Notiz an der Quelle. Eine vom Nutzer bestätigte Abschrift ändert der
|
|
140
|
+
Agent nie: die Stellen, die die neue Lesung gelesen hat, werden stattdessen dem Nutzer zur Prüfung vorgeschlagen
|
|
141
|
+
(`--take review --unsure`).
|
|
136
142
|
|
|
137
143
|
- **Außerdem:** die Hilfe nennt die Werte jeder Einstellung mit Auswahl und erklärt beide Möglichkeiten, wer die
|
|
138
144
|
Hypothesen entscheidet; `strom help --human` nennt jeden Befehl, den nur ein Mensch ausführt. Die Erlaubnis für ein
|
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.29.0
|
|
9
9
|
|
|
10
|
-
*In preparation: the betas up to 1.29.0-beta.
|
|
10
|
+
*In preparation: the betas up to 1.29.0-beta.9. The section is complete with the release.*
|
|
11
11
|
|
|
12
12
|
- **Who decides the hypotheses: the user, or the AI.** A new setting of the research (`strom config set hypotheses.decide`,
|
|
13
13
|
the setup's question beside the other choices, Settings in strom's menu, the Strom app's research settings): *the AI decides*
|
|
@@ -117,7 +117,12 @@ The changes of each version in short. The full notes and the install lines are o
|
|
|
117
117
|
itself shows it. A new setting `read.sourceTask` says what follows: *ask* (the default) – the reading is kept beside
|
|
118
118
|
the source as not verified until the user chooses: go through it with the agent now, put it in the queue, or just
|
|
119
119
|
keep it (in the terminal right after the reading, later with `strom source reading S…`, or in the Strom app);
|
|
120
|
-
*always* – a task at once; *never* – no task. One source has one task of its readings at a time.
|
|
120
|
+
*always* – a task at once; *never* – no task. One source has one task of its readings at a time. A reading with no
|
|
121
|
+
matter of fact to decide, only places its readers are not sure of, makes no task by itself – not even with *always*;
|
|
122
|
+
on the user's word alone (`strom source reading S… --take queue --unsure`, or in the Strom app) the agent gets a
|
|
123
|
+
task to look at each such place on the scan: the transcript corrected with its reason where the scan surely shows
|
|
124
|
+
it, elsewhere a note at the source. A transcript the user confirmed is never the agent's to change: the places the
|
|
125
|
+
new reading read are proposed to the user for review instead (`--take review --unsure`).
|
|
121
126
|
|
|
122
127
|
- **Also:** the help lists the values of every setting of choices and says what each choice of who decides the
|
|
123
128
|
hypotheses means; `strom help --human` lists every command only a person runs. An archive's permission given in a
|
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.29.0
|
|
9
9
|
|
|
10
|
-
*W przygotowaniu: bety do 1.29.0-beta.
|
|
10
|
+
*W przygotowaniu: bety do 1.29.0-beta.9. Sekcja będzie kompletna z wydaniem.*
|
|
11
11
|
|
|
12
12
|
- **Kto rozstrzyga hipotezy: użytkownik czy AI.** Nowe ustawienie badania (`strom config set hypotheses.decide`,
|
|
13
13
|
pytanie konfiguracji początkowej obok innych wyborów, Ustawienia w menu strom, ustawienia badania w aplikacji Strom):
|
|
@@ -126,7 +126,12 @@ Zmiany każdej wersji w skrócie. Pełne informacje o wydaniach i polecenia inst
|
|
|
126
126
|
*pytać* (domyślnie) – odczyt zostaje przy źródle jako niesprawdzony, dopóki użytkownik nie wybierze: przejrzeć go z
|
|
127
127
|
agentem od razu, dodać do kolejki albo tylko zapisać (w terminalu zaraz po odczycie, później `strom source reading
|
|
128
128
|
S…` lub w aplikacji Strom); *zawsze* – zadanie od razu; *nigdy* – bez zadania. Jedno źródło ma naraz jedno zadanie
|
|
129
|
-
swoich odczytów.
|
|
129
|
+
swoich odczytów. Odczyt bez faktu do rozstrzygnięcia, tylko z miejscami, których czytelnicy nie są pewni, sam nie
|
|
130
|
+
tworzy zadania – nawet przy *zawsze*; tylko na słowo użytkownika (`strom source reading S… --take queue --unsure`
|
|
131
|
+
lub w aplikacji Strom) agent dostaje zadanie obejrzenia każdego takiego miejsca na skanie: gdzie skan pokazuje to
|
|
132
|
+
pewnie, transkrypcja poprawiona z powodem, gdzie indziej notatka przy źródle. Transkrypcji potwierdzonej przez
|
|
133
|
+
użytkownika agent nigdy nie zmienia: miejsca odczytane przez nowy odczyt są zamiast tego proponowane użytkownikowi
|
|
134
|
+
do oceny (`--take review --unsure`).
|
|
130
135
|
|
|
131
136
|
- **Ponadto:** pomoc podaje wartości każdego ustawienia z wyborem i wyjaśnia obie możliwości tego, kto rozstrzyga
|
|
132
137
|
hipotezy; `strom help --human` wymienia każde polecenie uruchamiane tylko przez człowieka. Zgoda na archiwum dana w
|
package/assets/lang/cs.json
CHANGED
|
@@ -836,6 +836,11 @@
|
|
|
836
836
|
"read.source.same": " Oba čtenáři četli stejným modelem ({model}): kde se shodují, je to slabší doklad než shoda dvou modelů.",
|
|
837
837
|
"read.source.unknown": "čtenáři nezaznamenaní",
|
|
838
838
|
"read.source.again": "Znovu přečteno ({now}; četl {who}), nová místa — přepis: {before}; nové čtení: {after}.{same}",
|
|
839
|
+
"read.source.unsure.what": "Prohlédnout na snímku nejistá místa nového čtení {now} záznamu {source}",
|
|
840
|
+
"read.source.unsure.why": "{source} se přečetl znovu z originálu ({now}; četl {who}) a čtenáři si některými místy nejsou jistí — neshodli se v nich, nebo je nepřečetli; člověk požádal, aby se prohlédla. Přepis: {before}; nové čtení: {after}.{same} Každé místo na snímku se vším, co výzkum ví o lidech, místech a datech záznamu: kde to sám snímek ukazuje jistě, přepis opravit (strom source edit {source} --transcript … --reason s důvodem); kde ne, přepis nechat, jak je, a u pramene poznámku (strom source edit {source} --note …), co se prohlédlo a proč místo zůstává nejisté. Na nic se člověka neptat.",
|
|
841
|
+
"read.source.unsure.done": "každé nejisté místo prohlédnuté samotným výzkumem na snímku (strom source show {source}, jeho snímek) vedle obou čtení (přepis · strom document show {now}) se vším, co výzkum ví o lidech a místech záznamu: přepis opravený jen tam, kde to snímek ukazuje jistě, s důvodem; jinde přepis beze změny a poznámka u pramene; nic z přepisu potvrzeného člověkem nezměněné",
|
|
842
|
+
"read.source.unsure.again": "Znovu přečteno ({now}; četl {who}), nejistá místa k prohlédnutí na snímku na žádost člověka — přepis: {before}; nové čtení: {after}.{same} Kde to snímek ukazuje jistě, přepis opravit s důvodem; jinde poznámka u pramene a přepis beze změny.",
|
|
843
|
+
"read.source.unsure.review": "{source} se přečetl znovu z originálu ({now}; četl {who}) a čtenáři si některými místy nejsou jistí — neshodli se v nich, nebo je nepřečetli; bylo požádáno o jejich posouzení. Přepis: {before}; nové čtení: {after}.{same} Znění obsahuje místa, která nové čtení přečetlo; každé je jen vodítko, před přijetím porovnat se snímkem.",
|
|
839
844
|
"archive.held": "odloženo: výzkum je Archiv Stromu (data přicházejí z aplikace Strom); do fronty se vrátí, až se zapne práce s agentem",
|
|
840
845
|
"archive.removed": "odebráno v aplikaci Strom",
|
|
841
846
|
"archive.wait": "Rozhodnutí o stahování z archivu {title}",
|
package/assets/lang/de.json
CHANGED
|
@@ -836,6 +836,11 @@
|
|
|
836
836
|
"read.source.same": " Beide Leser lasen mit demselben Modell ({model}): wo sie übereinstimmen, ist das ein schwächerer Beleg als die Übereinstimmung zweier Modelle.",
|
|
837
837
|
"read.source.unknown": "Leser nicht verzeichnet",
|
|
838
838
|
"read.source.again": "Neu gelesen ({now}; gelesen von {who}), neue Stellen — die Abschrift: {before}; die neue Lesung: {after}.{same}",
|
|
839
|
+
"read.source.unsure.what": "Die unsicheren Stellen der neuen Lesung {now} des Eintrags von {source} auf seinem Bild ansehen",
|
|
840
|
+
"read.source.unsure.why": "{source} wurde neu vom Original gelesen ({now}; gelesen von {who}), und seine Leser sind sich einiger Stellen nicht sicher — sie stimmen dort nicht überein oder konnten sie nicht lesen; der Mensch hat gebeten, sie anzusehen. Die Abschrift: {before}; die neue Lesung: {after}.{same} Jede Stelle auf dem Bild, mit allem, was die Forschung über die Menschen, Orte und Daten des Eintrags weiß: wo das Bild selbst es sicher zeigt, die Abschrift berichtigen (strom source edit {source} --transcript … --reason mit dem Grund); wo nicht, die Abschrift lassen, wie sie ist, und eine Notiz an der Quelle (strom source edit {source} --note …), was angesehen wurde und warum die Stelle unsicher bleibt. Den Menschen nichts fragen.",
|
|
841
|
+
"read.source.unsure.done": "jede unsichere Stelle von der Forschung selbst auf dem Bild angesehen (strom source show {source}, sein Bild) neben beiden Lesungen (die Abschrift · strom document show {now}), mit allem, was die Forschung über seine Menschen und Orte weiß: die Abschrift nur berichtigt, wo das Bild es sicher zeigt, mit dem Grund; sonst die Abschrift unverändert und eine Notiz an der Quelle; nichts an einer vom Menschen bestätigten Abschrift geändert",
|
|
842
|
+
"read.source.unsure.again": "Neu gelesen ({now}; gelesen von {who}), unsichere Stellen auf Bitte des Menschen auf dem Bild anzusehen — die Abschrift: {before}; die neue Lesung: {after}.{same} Wo das Bild es sicher zeigt, die Abschrift mit dem Grund berichtigen; sonst eine Notiz an der Quelle, die Abschrift unverändert.",
|
|
843
|
+
"read.source.unsure.review": "{source} wurde neu vom Original gelesen ({now}; gelesen von {who}), und seine Leser sind sich einiger Stellen nicht sicher — sie stimmen dort nicht überein oder konnten sie nicht lesen; um ihre Prüfung wurde gebeten. Die Abschrift: {before}; die neue Lesung: {after}.{same} Der Wortlaut enthält die Stellen, die die neue Lesung gelesen hat; jede ist nur ein Hinweis, vor der Übernahme mit dem Bild zu vergleichen.",
|
|
839
844
|
"archive.held": "zurückgestellt: die Forschung ist ein Strom-Archiv (die Daten kommen aus der Strom-App); zurück in der Warteschlange, wenn die Arbeit mit einem Agenten eingeschaltet wird",
|
|
840
845
|
"archive.removed": "in der Strom-App entfernt",
|
|
841
846
|
"archive.wait": "Entscheidung über das Herunterladen aus dem Archiv {title}",
|
package/assets/lang/pl.json
CHANGED
|
@@ -836,6 +836,11 @@
|
|
|
836
836
|
"read.source.same": " Obaj czytelnicy czytali tym samym modelem ({model}): tam, gdzie się zgadzają, to słabszy dowód niż zgodność dwóch modeli.",
|
|
837
837
|
"read.source.unknown": "czytelnicy nie zapisani",
|
|
838
838
|
"read.source.again": "Odczytano ponownie ({now}; czytał {who}), nowe miejsca — transkrypcja: {before}; nowy odczyt: {after}.{same}",
|
|
839
|
+
"read.source.unsure.what": "Obejrzeć na skanie niepewne miejsca nowego odczytu {now} aktu {source}",
|
|
840
|
+
"read.source.unsure.why": "{source} odczytano ponownie z oryginału ({now}; czytał {who}), a czytelnicy nie są pewni niektórych miejsc — nie zgadzają się w nich albo ich nie odczytali; człowiek poprosił o ich obejrzenie. Transkrypcja: {before}; nowy odczyt: {after}.{same} Każde miejsce na skanie, ze wszystkim, co badanie wie o osobach, miejscach i datach aktu: gdzie sam skan pokazuje to pewnie, poprawić transkrypcję (strom source edit {source} --transcript … --reason z powodem); gdzie nie, zostawić transkrypcję bez zmian i notatkę przy źródle (strom source edit {source} --note …), co obejrzano i dlaczego miejsce pozostaje niepewne. O nic nie pytać człowieka.",
|
|
841
|
+
"read.source.unsure.done": "każde niepewne miejsce obejrzane przez samo badanie na skanie (strom source show {source}, jego skan) obok obu odczytów (transkrypcja · strom document show {now}) ze wszystkim, co badanie wie o osobach i miejscach aktu: transkrypcja poprawiona tylko tam, gdzie skan pokazuje to pewnie, z powodem; gdzie indziej transkrypcja bez zmian i notatka przy źródle; nic w transkrypcji potwierdzonej przez człowieka nie zmienione",
|
|
842
|
+
"read.source.unsure.again": "Odczytano ponownie ({now}; czytał {who}), niepewne miejsca do obejrzenia na skanie na prośbę człowieka — transkrypcja: {before}; nowy odczyt: {after}.{same} Gdzie skan pokazuje to pewnie, poprawić transkrypcję z powodem; gdzie indziej notatka przy źródle, transkrypcja bez zmian.",
|
|
843
|
+
"read.source.unsure.review": "{source} odczytano ponownie z oryginału ({now}; czytał {who}), a czytelnicy nie są pewni niektórych miejsc — nie zgadzają się w nich albo ich nie odczytali; poproszono o ich ocenę. Transkrypcja: {before}; nowy odczyt: {after}.{same} Brzmienie zawiera miejsca odczytane przez nowy odczyt; każde jest tylko wskazówką, przed przyjęciem do porównania ze skanem.",
|
|
839
844
|
"archive.held": "odłożone: badanie jest Archiwum Strom (dane przychodzą z aplikacji Strom); wróci do kolejki, gdy zostanie włączona praca z agentem",
|
|
840
845
|
"archive.removed": "usunięte w aplikacji Strom",
|
|
841
846
|
"archive.wait": "Decyzja o pobieraniu z archiwum {title}",
|
|
@@ -74,11 +74,17 @@ register({
|
|
|
74
74
|
"review proposes them a wording of it with the new reading's places (their task, What waits — never the queue's)\n" +
|
|
75
75
|
"or keep. Places an earlier task judged, or a wording the person declined, are not handed over again; a task of\n" +
|
|
76
76
|
"the source not ended takes the new places (now, queue). The person's alone: at their terminal (no --take: asked),\n" +
|
|
77
|
-
"or through the Strom app; an agent never decides it — it tells the person what waits (strom source show S…)
|
|
77
|
+
"or through the Strom app; an agent never decides it — it tells the person what waits (strom source show S…).\n" +
|
|
78
|
+
"--unsure: a reading with no matter of fact both readers are sure of left to decide, only places they are not\n" +
|
|
79
|
+
"sure of (never trifles, never places a task judged), handed over only by the person's word (read.sourceTask\n" +
|
|
80
|
+
"always never does it): queue — a task of the agent's to look at each on the scan, correct the transcript where\n" +
|
|
81
|
+
"sure (with the reason), else a note at the source; review — a transcript they confirmed: a wording with the\n" +
|
|
82
|
+
"places the new reading read proposed to them.",
|
|
78
83
|
args: [{ name: "source", description: "source ID (S0001)", required: true }],
|
|
79
84
|
options: [
|
|
80
85
|
{ name: "take", type: "string", value: "now|queue|keep|review", description: "the decision (at a terminal without it: asked); review: only a transcript the person confirmed, now and queue never for one" },
|
|
81
86
|
{ name: "reading", type: "string", value: "<D…>", description: "the reading decided on (default: the newest reading again of the source)" },
|
|
87
|
+
{ name: "unsure", type: "boolean", description: "hand over the places its readers are not sure of (with --take queue, or review for a transcript the person confirmed): only a reading with no matter of fact sure to decide" },
|
|
82
88
|
],
|
|
83
89
|
examples: ["strom source reading S0001", "strom source reading S0001 --take queue"],
|
|
84
90
|
async run(ctx, { args, opts }) {
|
|
@@ -90,6 +96,9 @@ register({
|
|
|
90
96
|
if (take !== undefined && !TAKES.includes(take))
|
|
91
97
|
throw new UsageError("--take: now, queue, keep or review", { code: "read.decide.invalid", hint: `strom source reading ${id} --take queue` });
|
|
92
98
|
const reading = opts.reading === undefined ? undefined : String(opts.reading).trim();
|
|
99
|
+
const unsure = !!opts.unsure;
|
|
100
|
+
if (unsure && take !== "queue" && take !== "review")
|
|
101
|
+
throw new UsageError("--unsure: with --take queue (a task of the agent's) or review (a transcript the person confirmed)", { code: "read.decide.invalid", hint: `strom source reading ${id} --take queue --unsure` });
|
|
93
102
|
const fail = (e) => {
|
|
94
103
|
const x = e;
|
|
95
104
|
if (!x.code?.startsWith("read.decide."))
|
|
@@ -110,7 +119,7 @@ register({
|
|
|
110
119
|
}
|
|
111
120
|
let out;
|
|
112
121
|
try {
|
|
113
|
-
out = tree.withTreeLock(() => decideReading(tree, id, chosen, reading));
|
|
122
|
+
out = tree.withTreeLock(() => decideReading(tree, id, chosen, reading, { unsure }));
|
|
114
123
|
}
|
|
115
124
|
catch (e) {
|
|
116
125
|
return fail(e);
|
package/dist/commands/sources.js
CHANGED
|
@@ -994,7 +994,7 @@ export function readAgainState(tree, s) {
|
|
|
994
994
|
function againLine(a, id, places) {
|
|
995
995
|
if (!a)
|
|
996
996
|
return undefined;
|
|
997
|
-
const proposal = a.proposal ? ` · a wording proposed to the person waits in ${a.proposal.task}` : "";
|
|
997
|
+
const proposal = (a.proposal ? ` · a wording proposed to the person waits in ${a.proposal.task}` : "") + (a.unsureOffer ? ` · places its readers are not sure of no task holds: the person may hand them over for a look on the scan (strom source reading ${id} --take queue --unsure; a transcript they confirmed: --take review --unsure) — never without their word` : "");
|
|
998
998
|
if (a.state === "unchecked")
|
|
999
999
|
return `\nread again ${a.read} — differs from the transcript in ${counted(places, "matter of fact", "matters of fact")} both readers are sure of, NOT verified: the person decides (strom source reading ${id}) — the transcript stays as it is${proposal}`;
|
|
1000
1000
|
if (a.state === "saved")
|
package/dist/core/live.js
CHANGED
|
@@ -126,18 +126,25 @@
|
|
|
126
126
|
// the person may decide on), task + taskFor agent|person (person: a wording proposed for their
|
|
127
127
|
// review of a transcript they confirmed), decided saved (just kept), openTask (the source's task
|
|
128
128
|
// not ended a task chosen would go into), appended (the places went into it), state (as /status
|
|
129
|
-
// readAgain)
|
|
129
|
+
// readAgain), unsureOffer (feature read.sourceTask.unsure: no matter of fact sure left to
|
|
130
|
+
// decide, places not sure no task holds — the person may hand them over; a transcript they
|
|
131
|
+
// confirmed: only with a place the new reading read, found in it); without taskChoice
|
|
132
|
+
// (an older app): a task at once, as before
|
|
130
133
|
// POST <token>/sources/<S…>/read/<D…>/task {"how": "now"|"queue"|"save"|"review"}: the person's word on that reading
|
|
131
134
|
// (strom source reading; save = just keep; review only for a transcript the person confirmed,
|
|
132
135
|
// now|queue never for one) — {ok, source, reading, how, task?, taskFor?, appended?, chat? (now:
|
|
133
136
|
// strom-research://task?…&do=chat), head, parent}; 400 read.decide.invalid, 404 read.decide.none
|
|
134
137
|
// | noreading, 409 read.decide.task (+task) | done | nothing | confirmed | unconfirmed |
|
|
135
|
-
// noproposal | declined, 503 research.busy
|
|
138
|
+
// noproposal | declined, 503 research.busy. With "unsure": true (feature
|
|
139
|
+
// read.sourceTask.unsure; how queue or review alone, else 400): the reading's places not sure
|
|
140
|
+
// handed over by the person's word — queue: a task of the agent's to look at each on the scan,
|
|
141
|
+
// review: a wording proposed to the person; {…, unsure: true}; 409 read.decide.sure (a matter
|
|
142
|
+
// of fact sure waits: decide without unsure) | nothing (no place not sure left unjudged)
|
|
136
143
|
// POST <token>/sourceTask {"sourceTask": "ask"|"always"|"never"}: what a source read again that differs in a matter of
|
|
137
144
|
// fact becomes in this research (read.sourceTask in its strom.json) — {ok, sourceTask, head,
|
|
138
145
|
// parent}; 400 sourceTask.invalid, 409 sourceTask.archive, 503 research.busy. /status readAgain
|
|
139
146
|
// {"S…": {read, state unchecked|saved|task, task?, taskFor?, taskOpen?, taskQueued?, minorOnly?,
|
|
140
|
-
// unsureOnly?, proposal? {text, by, task, at}}}: each source whose newest reading again differs
|
|
147
|
+
// unsureOnly?, unsureOffer?, proposal? {text, by, task, at}}}: each source whose newest reading again differs
|
|
141
148
|
// (core/sourceread.ts readAgainOf; none in an archive or a research waiting for its agent)
|
|
142
149
|
// The Strom file: 1 _STROM_ORIG Y under SOUR where the original is here and a transcript to
|
|
143
150
|
// hold a reading against (APP_READS_SOURCES_AGAIN; never in an archive)
|
|
@@ -1203,7 +1210,7 @@ function idsOf(applied, known) {
|
|
|
1203
1210
|
return Object.keys(ids.persons).length || Object.keys(ids.sources).length ? { ids } : {};
|
|
1204
1211
|
}
|
|
1205
1212
|
/** What the bridge does that an app may ask about (each added once, never taken away). */
|
|
1206
|
-
export const BRIDGE_FEATURES = ["sync.again", "sync.undoneSince", "sync.takenBack", "sync.conflictEdit", "sync.since", "sync.ids", "family.noCouple", "family.alone", "adopt.transfer", "adopt.empty", "material.list", "person.titles", "media.codes", "hypothesis.links", "status.recent", "spend.readers", "hypothesis.intree", "archive.permission", "task.check", "waiting.groups", "waiting.sent", "waiting.note", "batch.kept", "live.end", "whats.new", "terminal.choice", "person.marriedSurname", "phone", "read.now", "read.sync", "excerpt.get", "log.sources", "material.assign", "material.thumb", "seal.foreign", "tree.state", "disk.full", "tree.notDownloaded", "sync.removed", "tree.kind", "experiments", "experiments.off", "experiments.link", "experiments.split", "history.events", "history.hide", "experiments.pace", "history.first", "history.regions", "history.hide.all", "history.skip", "history.map", "history.delete", "history.delete.restore", "stories.history", "history.place", "surnames.suggest", "surnames.read", "lineage.read", "duplicates.judge", "quality.dismiss", "quality.read", "person.primary", "fixes.list", "fixes.towns", "history.back", "places.identify", "places.answer", "places.undo", "tasks.offLine", "status.busy", "history.kinds", "history.align", "places.nameKinds", "directions.edit", "directions.order", "directions.found", "directions.people", "offLine.branches", "queue.own", "story.sources", "queue.page", "status.parts", "waiting.answer", "browser.state", "working.place", "working.family", "hypotheses.decide", "sources.confirm", "read.sourceTask", "read.choose", "read.choices.now", "read.source", "read.sourceEntry", "read.blindText", "read.kinds", "read.variantKind", "read.readerState", "live.idle", "live.stop", "live.start", "sources.proposal", "sources.proposal.undo"];
|
|
1213
|
+
export const BRIDGE_FEATURES = ["sync.again", "sync.undoneSince", "sync.takenBack", "sync.conflictEdit", "sync.since", "sync.ids", "family.noCouple", "family.alone", "adopt.transfer", "adopt.empty", "material.list", "person.titles", "media.codes", "hypothesis.links", "status.recent", "spend.readers", "hypothesis.intree", "archive.permission", "task.check", "waiting.groups", "waiting.sent", "waiting.note", "batch.kept", "live.end", "whats.new", "terminal.choice", "person.marriedSurname", "phone", "read.now", "read.sync", "excerpt.get", "log.sources", "material.assign", "material.thumb", "seal.foreign", "tree.state", "disk.full", "tree.notDownloaded", "sync.removed", "tree.kind", "experiments", "experiments.off", "experiments.link", "experiments.split", "history.events", "history.hide", "experiments.pace", "history.first", "history.regions", "history.hide.all", "history.skip", "history.map", "history.delete", "history.delete.restore", "stories.history", "history.place", "surnames.suggest", "surnames.read", "lineage.read", "duplicates.judge", "quality.dismiss", "quality.read", "person.primary", "fixes.list", "fixes.towns", "history.back", "places.identify", "places.answer", "places.undo", "tasks.offLine", "status.busy", "history.kinds", "history.align", "places.nameKinds", "directions.edit", "directions.order", "directions.found", "directions.people", "offLine.branches", "queue.own", "story.sources", "queue.page", "status.parts", "waiting.answer", "browser.state", "working.place", "working.family", "hypotheses.decide", "sources.confirm", "read.sourceTask", "read.sourceTask.unsure", "read.choose", "read.choices.now", "read.source", "read.sourceEntry", "read.blindText", "read.kinds", "read.variantKind", "read.readerState", "live.idle", "live.stop", "live.start", "sources.proposal", "sources.proposal.undo"];
|
|
1207
1214
|
/** /status busy: how many sessions and runs work now. */
|
|
1208
1215
|
function busyOf(tree) {
|
|
1209
1216
|
const b = busyIn(tree);
|
|
@@ -5036,6 +5043,8 @@ export function serveLive(root, env) {
|
|
|
5036
5043
|
* The person's word on a source read again that differs in a matter of fact (POST /sources/<S…>/read/<D…>/task
|
|
5037
5044
|
* {how: now|queue|save|review}): strom source reading, as theirs in the app (save: just keep). {ok, source, reading,
|
|
5038
5045
|
* how, task?, taskFor?, appended?, chat?, head, parent} — chat: the link that opens the conversation about the task (now).
|
|
5046
|
+
* unsure true (feature read.sourceTask.unsure; how queue or review): its places not sure handed over (--unsure),
|
|
5047
|
+
* {…, unsure: true}; 409 read.decide.sure while a matter of fact sure waits for a decision.
|
|
5039
5048
|
*/
|
|
5040
5049
|
const readTaskWrite = (source, reading) => {
|
|
5041
5050
|
let before = "";
|
|
@@ -5045,14 +5054,15 @@ export function serveLive(root, env) {
|
|
|
5045
5054
|
codes: { badBody: "read.decide.invalid", busy: "research.busy", failed: "read.decide.failed" },
|
|
5046
5055
|
busyStatus: 503,
|
|
5047
5056
|
ask(_tree, body) {
|
|
5048
|
-
const keys = Object.keys(body);
|
|
5049
|
-
|
|
5050
|
-
|
|
5057
|
+
const keys = Object.keys(body).filter((k) => k !== "unsure");
|
|
5058
|
+
const unsure = body.unsure === true;
|
|
5059
|
+
if (keys.length !== 1 || (body.how !== "now" && body.how !== "queue" && body.how !== "save" && body.how !== "review") || ("unsure" in body && typeof body.unsure !== "boolean") || (unsure && body.how !== "queue" && body.how !== "review"))
|
|
5060
|
+
return { code: 400, body: refusal(`the body: {"how": "now" | "queue" | "save" | "review"} — with "unsure": true only queue or review`, "read.decide.invalid") };
|
|
5051
5061
|
if (!/^S\d{1,9}$/iu.test(source) || !/^D\d{14}-[0-9a-f]{4}$/u.test(reading))
|
|
5052
5062
|
return { code: 400, body: refusal("the address: sources/<S…>/read/<D…>/task", "read.decide.invalid") };
|
|
5053
5063
|
how = body.how;
|
|
5054
5064
|
before = head(root);
|
|
5055
|
-
return { args: ["source", "reading", normId(source), "--take", how === "save" ? "keep" : how, "--reading", reading] };
|
|
5065
|
+
return { args: ["source", "reading", normId(source), "--take", how === "save" ? "keep" : how, "--reading", reading, ...(unsure ? ["--unsure"] : [])] };
|
|
5056
5066
|
},
|
|
5057
5067
|
done(_tree, data, h) {
|
|
5058
5068
|
const { link, take: _t, places: _p, ...rest } = data;
|
package/dist/core/phrases.js
CHANGED
|
@@ -83,6 +83,11 @@ export const PHRASES = {
|
|
|
83
83
|
"read.source.same": " Both readers read with the same model ({model}): where they agree it is weaker evidence than two models agreeing.",
|
|
84
84
|
"read.source.unknown": "readers not recorded",
|
|
85
85
|
"read.source.again": "Read again ({now}; read by {who}), new places — the transcript: {before}; the new reading: {after}.{same}",
|
|
86
|
+
"read.source.unsure.what": "Look at the places not sure of the new reading {now} of the record of {source} on its scan",
|
|
87
|
+
"read.source.unsure.why": "{source} was read again from its original ({now}; read by {who}) and its readers are not sure of some places — they disagree there or could not read them; the person asked that they be looked at. The transcript: {before}; the new reading: {after}.{same} Each place on the scan, with what the research knows of the record's people, places and dates: where the scan itself shows it surely, the transcript corrected (strom source edit {source} --transcript … --reason saying why); where it does not, the transcript left as it was and a note at the source (strom source edit {source} --note …) of what was looked at and why it stays not sure. Nothing to ask the person.",
|
|
88
|
+
"read.source.unsure.done": "each place not sure looked at by the research itself on the scan (strom source show {source}, its image) beside both readings (the transcript · strom document show {now}) with what the research knows of its people and places: the transcript corrected only where the scan surely shows it, with the reason; elsewhere the transcript left as it was and a note at the source; nothing of a transcript the person confirmed changed",
|
|
89
|
+
"read.source.unsure.again": "Read again ({now}; read by {who}), places not sure to look at on the scan, by the person's word — the transcript: {before}; the new reading: {after}.{same} Where the scan shows it surely, the transcript corrected with the reason; elsewhere a note at the source, the transcript as it was.",
|
|
90
|
+
"read.source.unsure.review": "{source} was read again from its original ({now}; read by {who}) and its readers are not sure of some places — they disagree there or could not read them; looking at them was asked. The transcript: {before}; the new reading: {after}.{same} The wording holds the places the new reading read; each is only a lead, to be held against the scan before it is taken.",
|
|
86
91
|
"archive.held": "kept for later: the research is a Strom archive (the data come from the Strom app); back in the queue when work with an agent is switched on",
|
|
87
92
|
"archive.removed": "removed in the Strom app",
|
|
88
93
|
"archive.wait": "Decision on downloading from the archive {title}",
|
package/dist/core/proposal.js
CHANGED
|
@@ -55,7 +55,7 @@ export function proposeTranscript(tree, sourceId, text, o = {}) {
|
|
|
55
55
|
const by = o.by ?? tree.actor;
|
|
56
56
|
const why = o.why?.normalize("NFC").trim() || undefined;
|
|
57
57
|
const byWords = `${by}${why ? `: ${why}` : ""}`;
|
|
58
|
-
const proposal = { source: id, text: words, by, at: now(), ...(why ? { why: truncate(why, 1000) } : {}), ...(o.reading ? { reading: o.reading } : {}) };
|
|
58
|
+
const proposal = { source: id, text: words, by, at: now(), ...(why ? { why: truncate(why, 1000) } : {}), ...(o.reading ? { reading: o.reading } : {}), ...(o.unsure ? { unsure: true } : {}) };
|
|
59
59
|
const waiting = openProposal(tree, id);
|
|
60
60
|
if (waiting?.proposal && !transcriptDiffers(waiting.proposal.text, words))
|
|
61
61
|
return { outcome: "same", source: id, task: waiting.id, line: `${id}: this wording waits for the person's decision already (${waiting.id}) — nothing more to do` };
|
package/dist/core/sourceread.js
CHANGED
|
@@ -325,15 +325,14 @@ export function keepSourceReading(tree, at, r, with_ = at.taskWith ?? "always")
|
|
|
325
325
|
* spacing), proposed to them (core/proposal.ts: a note on the source, their task, never an agent's). A place with
|
|
326
326
|
* nothing of the transcript, or not found in it: left out of the wording, said in its why with the others.
|
|
327
327
|
*/
|
|
328
|
-
function review(tree, s, r, fresh) {
|
|
329
|
-
const
|
|
330
|
-
const wording = replacePlaces((waiting ?? s.transcript ?? "").normalize("NFC"), fresh);
|
|
328
|
+
function review(tree, s, r, fresh, unsure = false) {
|
|
329
|
+
const wording = wordingOf(tree, s, fresh, unsure);
|
|
331
330
|
if (wording === undefined)
|
|
332
|
-
return { refused: "noproposal", why: `no place the reading of ${s.id} differs in could be put into a wording of its transcript (none of its words found there) — nothing proposed; keep it` };
|
|
331
|
+
return { refused: "noproposal", why: `no place the reading of ${s.id} differs in could be put into a wording of its transcript (none of its words found there${unsure ? ", or the new reading could not read it either" : ""}) — nothing proposed; keep it` };
|
|
333
332
|
const lang = tree.lang;
|
|
334
333
|
const list = (ws) => ws.slice(0, 6).join(" · ") + (ws.length > 6 ? " · …" : "");
|
|
335
|
-
const why = phrase(lang, "read.source.why", { source: s.id, now: r.id, who: whoRead(lang, r), same: sameModel(lang, r), before: list(fresh.map((v) => v.at || "—")), after: list(fresh.map((v) => v.other || "—")) });
|
|
336
|
-
const out = proposeTranscript(tree, s.id, wording, { by: whoRead(lang, r), why, reading: r.id });
|
|
334
|
+
const why = phrase(lang, unsure ? "read.source.unsure.review" : "read.source.why", { source: s.id, now: r.id, who: whoRead(lang, r), same: sameModel(lang, r), before: list(fresh.map((v) => v.at || "—")), after: list(fresh.map((v) => v.other || "—")) });
|
|
335
|
+
const out = proposeTranscript(tree, s.id, wording, { by: whoRead(lang, r), why, reading: r.id, ...(unsure ? { unsure: true } : {}) });
|
|
337
336
|
if (out.outcome === "proposed" || out.outcome === "appended")
|
|
338
337
|
return { task: out.task, appended: out.outcome === "appended" };
|
|
339
338
|
if (out.outcome === "declined")
|
|
@@ -342,6 +341,16 @@ function review(tree, s, r, fresh) {
|
|
|
342
341
|
return { refused: "same", why: `this wording of the transcript of ${s.id} waits for the person's decision already (${out.task})`, ...(out.task ? { task: out.task } : {}) };
|
|
343
342
|
return { refused: "noproposal", why: `the wording of ${s.id} with the reading's places is its transcript's own — nothing to propose` };
|
|
344
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* The wording review would propose of a transcript the person read or confirmed: the transcript — or the wording
|
|
346
|
+
* proposed to them that waits already — with the places put in; places not sure only those the new reading read
|
|
347
|
+
* without a mark ([...], [?] never do). No place found in it: undefined.
|
|
348
|
+
*/
|
|
349
|
+
function wordingOf(tree, s, places, unsure) {
|
|
350
|
+
const waiting = openProposal(tree, s.id)?.proposal?.text;
|
|
351
|
+
const into = unsure ? places.filter((v) => !v.other || (!nothingRead(v.other) && !UNSURE.test(v.other))) : places;
|
|
352
|
+
return into.length ? replacePlaces((waiting ?? s.transcript ?? "").normalize("NFC"), into) : undefined;
|
|
353
|
+
}
|
|
345
354
|
/**
|
|
346
355
|
* A text with each place's words (at) replaced by the other reading's (other): found tolerant of whitespace (its words
|
|
347
356
|
* joined by any spacing), a word never within a longer one, places never overlapping; none found: undefined.
|
|
@@ -390,30 +399,34 @@ function placesOf(tree, s, now, vs) {
|
|
|
390
399
|
const matters = variants.filter((v) => v.sure !== false && !TRIFLES.includes(variantKind(v.at, v.other)));
|
|
391
400
|
const fresh = matters.filter((v) => !v.judged);
|
|
392
401
|
const ordered = [...fresh, ...variants.filter((v) => !fresh.includes(v) && !v.judged)];
|
|
393
|
-
|
|
402
|
+
// places its readers are not sure of (no trifles), judged in no task: a task of them only on the person's word
|
|
403
|
+
const unsure = variants.filter((v) => v.sure === false && !v.judged && !TRIFLES.includes(variantKind(v.at, v.other)));
|
|
404
|
+
return { variants, matters, fresh, ordered, unsure };
|
|
394
405
|
}
|
|
395
406
|
/** The task a reading's places are held in: said in the source's open one, else a new one (priority as asked). */
|
|
396
|
-
function handOver(tree, s, r, ordered, priority, open = openTaskOf(tree, s.id)) {
|
|
407
|
+
function handOver(tree, s, r, ordered, priority, open = openTaskOf(tree, s.id), unsure = false) {
|
|
397
408
|
const lang = tree.lang;
|
|
409
|
+
// the places not sure: a task asked by the person — each looked at on the scan, corrected where sure, else a note
|
|
410
|
+
const k = unsure ? "read.source.unsure" : "read.source";
|
|
398
411
|
const list = (ws) => ws.slice(0, 6).join(" · ") + (ws.length > 6 ? " · …" : "");
|
|
399
412
|
const said = { now: r.id, who: whoRead(lang, r), same: sameModel(lang, r), before: list(ordered.map((v) => v.at || "—")), after: list(ordered.map((v) => v.other || "—")) };
|
|
400
413
|
if (open) {
|
|
401
414
|
// one task of a source at a time: the new places said in it, beside the ones it holds
|
|
402
|
-
update(tree, open.id, "task", (x) => ({ ...x, why: `${x.why} ${phrase(lang,
|
|
415
|
+
update(tree, open.id, "task", (x) => ({ ...x, why: `${x.why} ${phrase(lang, `${k}.again`, { source: s.id, ...said })}` }), { op: "task.edit", summary: `${open.id} holds the reading ${r.id} of ${s.id} too${unsure ? " (its places not sure)" : ""}` });
|
|
403
416
|
return tree.get(open.id);
|
|
404
417
|
}
|
|
405
418
|
const where = [...new Set([...(s.clips ?? []).map((x) => x.media), ...(s.media ?? []), ...(s.input ? [s.input] : [])])];
|
|
406
419
|
return create(tree, "task", {
|
|
407
420
|
level: "verify",
|
|
408
421
|
priority,
|
|
409
|
-
what: phrase(lang,
|
|
422
|
+
what: phrase(lang, `${k}.what`, { source: s.id, now: r.id }),
|
|
410
423
|
where: [s.id, ...where],
|
|
411
|
-
why: phrase(lang,
|
|
412
|
-
doneWhen: phrase(lang,
|
|
424
|
+
why: phrase(lang, `${k}.why`, { source: s.id, ...said }),
|
|
425
|
+
doneWhen: phrase(lang, `${k}.done`, { source: s.id, now: r.id }),
|
|
413
426
|
subject: [s.id],
|
|
414
427
|
state: "open",
|
|
415
428
|
origin: SOURCE_READ_ORIGIN,
|
|
416
|
-
}, (id) => `+${id} task "hold the reading ${r.id} against the transcript of ${s.id}"`);
|
|
429
|
+
}, (id) => `+${id} task "${unsure ? `look at the places not sure of the reading ${r.id} of ${s.id} on its scan` : `hold the reading ${r.id} against the transcript of ${s.id}`}"`);
|
|
417
430
|
}
|
|
418
431
|
/** A reading's result as finish kept it (notes/readings/<id>.json), if there is one. */
|
|
419
432
|
function resultOf(tree, id) {
|
|
@@ -448,8 +461,15 @@ const refuse = (why, code, more = {}) => Object.assign(new Error(why), { code: `
|
|
|
448
461
|
* for a transcript that is the person's own reading (they confirmed it, core/readers.ts), never a task of the agent's
|
|
449
462
|
* but review — a wording with the new reading's places proposed to them (their task, core/proposal.ts). A task of the
|
|
450
463
|
* source not ended takes the places (appended); kept on the source (readDecided). Who may: the caller says (a person alone).
|
|
464
|
+
* unsure — asked of a reading with no matter of fact both readers are sure of left to decide, only places they are not
|
|
465
|
+
* sure of (no trifles, none judged): queue — a task of the agent's to look at each on the scan (correct where sure,
|
|
466
|
+
* else a note at the source), or review (a transcript the person confirmed) — a wording with the places the new
|
|
467
|
+
* reading read proposed to them. Never without their word (always makes none of them).
|
|
451
468
|
*/
|
|
452
|
-
export function decideReading(tree, id, take, reading) {
|
|
469
|
+
export function decideReading(tree, id, take, reading, o = {}) {
|
|
470
|
+
const unsure = !!o.unsure;
|
|
471
|
+
if (unsure && take !== "queue" && take !== "review")
|
|
472
|
+
throw refuse(`places not sure are handed over into the queue (a task of the agent's) or, a transcript the person confirmed, for their review — not ${take}`, "invalid", { hint: `strom source reading ${id} --unsure --take queue` });
|
|
453
473
|
const s = tree.get(id);
|
|
454
474
|
if (!sourceOk(s))
|
|
455
475
|
throw refuse(`${id} is no source of the research`, "none");
|
|
@@ -468,26 +488,29 @@ export function decideReading(tree, id, take, reading) {
|
|
|
468
488
|
if ((take === "now" || take === "queue") && confirmed)
|
|
469
489
|
throw refuse(`the transcript of ${id} is the person's own reading (${readingWords(s)}): no task of the agent's may change it — review (a wording proposed to the person) or keep`, "confirmed", { hint: `strom source reading ${id} --take review` });
|
|
470
490
|
const p = placesOf(tree, s, rid, r.source.variants ?? []);
|
|
471
|
-
if (
|
|
472
|
-
throw refuse(`the reading ${rid} of ${id} differs in
|
|
491
|
+
if (unsure && p.fresh.length)
|
|
492
|
+
throw refuse(`the reading ${rid} of ${id} differs in a matter of fact both its readers are sure of: decide on it first (without --unsure) — its places not sure go with it`, "sure", { hint: `strom source reading ${id} --take ${confirmed ? "review" : "queue"}` });
|
|
493
|
+
const places = unsure ? p.unsure : p.fresh;
|
|
494
|
+
if (!places.length)
|
|
495
|
+
throw refuse(`the reading ${rid} of ${id} differs in nothing to decide on (trifles, ${unsure ? "no place not sure left — each judged in a task already" : "places not sure, places judged already"})`, "nothing");
|
|
473
496
|
let task;
|
|
474
497
|
let appended = false;
|
|
475
498
|
if (take === "now" || take === "queue") {
|
|
476
499
|
const open = openTaskOf(tree, s.id);
|
|
477
|
-
task = handOver(tree, s, r, p.ordered, 3, open).id;
|
|
500
|
+
task = handOver(tree, s, r, unsure ? p.unsure : p.ordered, 3, open, unsure).id;
|
|
478
501
|
appended = !!open;
|
|
479
502
|
}
|
|
480
503
|
else if (take === "review") {
|
|
481
|
-
const made = review(tree, s, r,
|
|
504
|
+
const made = review(tree, s, r, places, unsure);
|
|
482
505
|
if ("refused" in made)
|
|
483
506
|
throw refuse(made.why, made.refused === "same" ? "task" : made.refused, made.task ? { task: made.task } : {});
|
|
484
507
|
task = made.task;
|
|
485
508
|
appended = made.appended;
|
|
486
509
|
}
|
|
487
|
-
const decided = { reading: rid, take, at: new Date().toISOString(), ...(task ? { task } : {}), ...(appended ? { appended: true } : {}) };
|
|
510
|
+
const decided = { reading: rid, take, at: new Date().toISOString(), ...(task ? { task } : {}), ...(appended ? { appended: true } : {}), ...(unsure ? { unsure: true } : {}) };
|
|
488
511
|
const said = take === "keep" ? "just kept, by the person's word" : take === "review" ? `a wording of it proposed to the person in ${task}, by their word` : `held in the task ${task}${appended ? " (not ended, the places said in it)" : ""}, by the person's word${take === "now" ? " (now with the agent)" : ""}`;
|
|
489
|
-
update(tree, s.id, "source", (x) => ({ ...x, readDecided: decided }), { op: "source.reading", summary: `${s.id}: the reading ${rid} ${said}` });
|
|
490
|
-
return { source: s.id, reading: rid, take, ...(task ? { task, taskFor: take === "review" ? "person" : "agent" } : {}), ...(appended ? { appended: true } : {}), places:
|
|
512
|
+
update(tree, s.id, "source", (x) => ({ ...x, readDecided: decided }), { op: "source.reading", summary: `${s.id}: the reading ${rid} ${said}${unsure ? " (its places not sure)" : ""}` });
|
|
513
|
+
return { source: s.id, reading: rid, take, ...(task ? { task, taskFor: take === "review" ? "person" : "agent" } : {}), ...(appended ? { appended: true } : {}), ...(unsure ? { unsure: true } : {}), places: places.length };
|
|
491
514
|
}
|
|
492
515
|
/** A place told by its words alone (folded keys of both sides), whatever its spacing, accents or punctuation. */
|
|
493
516
|
const placeKey = (v) => `${keysIn(v.at).join(" ")}\u0000${keysIn(v.other).join(" ")}`;
|
|
@@ -514,8 +537,10 @@ function judgedPlaces(tree, s, now) {
|
|
|
514
537
|
const task = held?.task ?? (s.readDecided?.reading === id ? (s.readDecided.task ?? (s.readDecided.take === "keep" ? id : undefined)) : undefined); // just kept: judged by the person's word on that reading
|
|
515
538
|
if (held?.id !== s.id || !task)
|
|
516
539
|
continue;
|
|
540
|
+
// its places not sure handed over by the person's word: judged too
|
|
541
|
+
const unsure = !held.task && s.readDecided?.reading === id && !!s.readDecided.unsure;
|
|
517
542
|
for (const v of held.variants ?? [])
|
|
518
|
-
if (v.sure !== false && !v.judged)
|
|
543
|
+
if ((v.sure !== false || unsure) && !v.judged)
|
|
519
544
|
out.set(placeKey(v), task);
|
|
520
545
|
}
|
|
521
546
|
for (const t of tree.list("task")) {
|
|
@@ -525,7 +550,7 @@ function judgedPlaces(tree, s, now) {
|
|
|
525
550
|
if (!(t.state === "waiting" || (t.state === "parked" && t.heldBy === "archive")) && !rejectedProposal(tree, s.id, p.text))
|
|
526
551
|
continue;
|
|
527
552
|
for (const v of resultOf(tree, p.reading)?.source?.variants ?? [])
|
|
528
|
-
if (v.sure !== false && !v.judged && !out.has(placeKey(v)))
|
|
553
|
+
if ((v.sure !== false || p.unsure) && !v.judged && !out.has(placeKey(v)))
|
|
529
554
|
out.set(placeKey(v), t.id);
|
|
530
555
|
}
|
|
531
556
|
return out;
|
|
@@ -564,11 +589,31 @@ export function readAgainOf(tree, s) {
|
|
|
564
589
|
const matters = vs.filter((v) => v.sure !== false && !TRIFLES.includes(variantKind(v.at, v.other)));
|
|
565
590
|
if (matters.some((v) => !v.judged))
|
|
566
591
|
return { read: id, state: "unchecked", ...proposal };
|
|
592
|
+
const offer = unsureOffered(tree, s, id, src) ? { unsureOffer: true } : {};
|
|
567
593
|
// every matter of fact judged before: in a task, or kept by the person's word on an earlier reading (D…)
|
|
568
594
|
const judged = matters[0]?.judged;
|
|
569
595
|
if (judged)
|
|
570
|
-
return judged.startsWith("D") ? { read: id, state: "saved", ...proposal } : held(judged);
|
|
571
|
-
return { read: id, state: "saved", ...(vs.some((v) => v.sure === false) ? { unsureOnly: true } : { minorOnly: true }), ...proposal };
|
|
596
|
+
return judged.startsWith("D") ? { read: id, state: "saved", ...offer, ...proposal } : { ...held(judged), ...offer };
|
|
597
|
+
return { read: id, state: "saved", ...(vs.some((v) => v.sure === false) ? { unsureOnly: true } : { minorOnly: true }), ...offer, ...proposal };
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Whether the person may hand over a reading's places not sure (decideReading unsure): nothing decided of it, no task
|
|
601
|
+
* holds it, no matter of fact both its readers are sure of left to decide, and a place not sure (no trifle) no task
|
|
602
|
+
* judged — of a transcript the person confirmed, one review would put into a wording (read by the new reading, not
|
|
603
|
+
* [...] or [?], its words found in the transcript), else review would only refuse it.
|
|
604
|
+
*/
|
|
605
|
+
function unsureOffered(tree, s, reading, src) {
|
|
606
|
+
if (src.task || s.readDecided?.reading === reading || src.agree !== "differ")
|
|
607
|
+
return false;
|
|
608
|
+
const p = placesOf(tree, s, reading, src.variants ?? []);
|
|
609
|
+
if (p.fresh.length || !p.unsure.length)
|
|
610
|
+
return false;
|
|
611
|
+
// a transcript the person confirmed: only what review would propose — a place the new reading read, found in it
|
|
612
|
+
if (!userReading(s))
|
|
613
|
+
return true;
|
|
614
|
+
const waiting = openProposal(tree, s.id)?.proposal?.text ?? s.transcript ?? "";
|
|
615
|
+
const wording = wordingOf(tree, s, p.unsure, true);
|
|
616
|
+
return wording !== undefined && wording !== waiting.normalize("NFC");
|
|
572
617
|
}
|
|
573
618
|
/** Every source whose newest reading again differs from its transcript, what became of it (/status readAgain). */
|
|
574
619
|
export function readAgainAll(tree) {
|
|
@@ -594,7 +639,8 @@ export function sourceReadForApp(tree, src, reading, setting) {
|
|
|
594
639
|
const d = s?.readDecided?.reading === reading ? s.readDecided : undefined;
|
|
595
640
|
const task = src.task ?? d?.task;
|
|
596
641
|
const offered = !!s && !!offer && !task && !d;
|
|
597
|
-
const
|
|
642
|
+
const unsure = !!s && !offered && !task && unsureOffered(tree, s, reading, src);
|
|
643
|
+
const open = offered || unsure ? openTaskOf(tree, s.id) : undefined;
|
|
598
644
|
const state = s ? readAgainOf(tree, s) : undefined;
|
|
599
645
|
return {
|
|
600
646
|
...rest,
|
|
@@ -603,6 +649,7 @@ export function sourceReadForApp(tree, src, reading, setting) {
|
|
|
603
649
|
...(task ? { task, taskFor: taskFor ?? (d?.take === "review" ? "person" : "agent") } : {}),
|
|
604
650
|
...(d?.take === "keep" ? { decided: "saved" } : {}),
|
|
605
651
|
...(open ? { openTask: open.id } : {}),
|
|
652
|
+
...(unsure ? { unsureOffer: true } : {}),
|
|
606
653
|
...(src.appended || d?.appended ? { appended: true } : {}),
|
|
607
654
|
...(state ? { state } : {}),
|
|
608
655
|
};
|
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.29.0-beta.
|
|
35
|
+
export const VERSION = "1.29.0-beta.9";
|
|
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"];
|
|
38
38
|
const GITIGNORE = `# Strom Research — local state and large files are not versioned
|