@wirecat/cli-core 0.655.0 → 0.657.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.
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
+
## 0.657.0 — 13.11.2026
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Telemost meeting notes in Yandex's older layout get their summary.** Those emails have no «Итоги» heading: the
|
|
13
|
+
summary is now the text before the first heading, and Yandex's footer («Оцените точность конспекта» and below) is
|
|
14
|
+
no longer stored with the notes.
|
|
15
|
+
|
|
16
|
+
## 0.656.0 — 13.11.2026
|
|
17
|
+
|
|
18
|
+
### Changed — may break callers
|
|
19
|
+
|
|
20
|
+
- **`syncAfterInstallCases` asks only "no `permission_error`" of a shared config that is not JSON or is a folder.** A
|
|
21
|
+
step that reads such a file may fail and name it; the other states must still exit 0.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **The shared config is read with a byte-order mark.** `~/.config/WireCat/config.json` saved by a Windows editor
|
|
26
|
+
starts with one; every reader of the file (setup's answer, task categories, models, search settings) refused it as
|
|
27
|
+
not JSON, and a sync that reads the meaning-search model ended incomplete.
|
|
28
|
+
|
|
8
29
|
## 0.655.0 — 13.11.2026
|
|
9
30
|
|
|
10
31
|
### Added
|
|
@@ -8,12 +8,20 @@ import { join } from "node:path";
|
|
|
8
8
|
*/
|
|
9
9
|
const SHARED_CONFIGS = [
|
|
10
10
|
{ state: "no shared config, as on a fresh install" },
|
|
11
|
-
{
|
|
11
|
+
{
|
|
12
|
+
state: "a shared config that is not JSON",
|
|
13
|
+
write: (dir) => writeFileSync(join(dir, "config.json"), "{ setup: "),
|
|
14
|
+
broken: true,
|
|
15
|
+
},
|
|
12
16
|
{
|
|
13
17
|
state: "a shared config with a byte-order mark",
|
|
14
18
|
write: (dir) => writeFileSync(join(dir, "config.json"), '{"setup":{"permissions":"allow"}}'),
|
|
15
19
|
},
|
|
16
|
-
{
|
|
20
|
+
{
|
|
21
|
+
state: "a folder where the shared config should be",
|
|
22
|
+
write: (dir) => mkdirSync(join(dir, "config.json")),
|
|
23
|
+
broken: true,
|
|
24
|
+
},
|
|
17
25
|
{
|
|
18
26
|
state: "a setup section in a shape this version does not take",
|
|
19
27
|
write: (dir) => writeFileSync(join(dir, "config.json"), JSON.stringify({ setup: { languages: ["en"], permissions: "ask" } })),
|
|
@@ -53,7 +61,9 @@ export const syncAfterInstallCases = (options) => {
|
|
|
53
61
|
run: async () => {
|
|
54
62
|
const ran = await cli(sync, shared);
|
|
55
63
|
assert.notEqual(errorCodeOf(ran.err), "permission_error", `sync was refused: ${ran.err}`);
|
|
56
|
-
|
|
64
|
+
// A file no reader can parse may fail a step that reads it, loudly and by name; it never restricts.
|
|
65
|
+
if (!shared.broken)
|
|
66
|
+
assert.equal(ran.code, 0, `sync exited ${ran.code}: ${ran.out}${ran.err}`);
|
|
57
67
|
},
|
|
58
68
|
})),
|
|
59
69
|
...(refusedUnderReadOnly
|
|
@@ -18,12 +18,19 @@ interface NotesKind {
|
|
|
18
18
|
/** The headings the notes are split under, in the case they are written. */
|
|
19
19
|
headings: readonly string[];
|
|
20
20
|
overview: string;
|
|
21
|
+
/** The first line of the notes, before any heading; not part of them. */
|
|
22
|
+
title: string;
|
|
23
|
+
/** The lines where the provider's own footer starts: the notes end before the first of them. */
|
|
24
|
+
ends: readonly string[];
|
|
21
25
|
}
|
|
22
26
|
/** The meeting-notes mail each provider sends. A provider not here cannot be named by a rule. */
|
|
23
27
|
export declare const MEETING_NOTES: Readonly<Record<string, NotesKind>>;
|
|
24
28
|
export declare const MEETING_NOTES_PROVIDERS: string[];
|
|
25
|
-
/**
|
|
26
|
-
|
|
29
|
+
/**
|
|
30
|
+
* The notes cut at their headings, without the provider's footer. Older notes have no overview heading: their
|
|
31
|
+
* overview is the text before the first heading.
|
|
32
|
+
*/
|
|
33
|
+
export declare const notesOf: (text: string, kind: Pick<NotesKind, "headings" | "overview" | "title" | "ends">) => SummaryContent;
|
|
27
34
|
/**
|
|
28
35
|
* Meetings read from stored mail a meeting-notes rule matches, for `pull`. The notes give the day, not the hours:
|
|
29
36
|
* the event the meeting is already linked to, or the one event in the same room that day, gives its times; otherwise
|
|
@@ -18,6 +18,8 @@ export const MEETING_NOTES = {
|
|
|
18
18
|
offsets: [3],
|
|
19
19
|
headings: ["Итоги", "Что обсудили", "Задачи", "Открытые вопросы", "Следующая встреча"],
|
|
20
20
|
overview: "Итоги",
|
|
21
|
+
title: "Конспект встречи",
|
|
22
|
+
ends: ["Оцените точность конспекта"],
|
|
21
23
|
},
|
|
22
24
|
};
|
|
23
25
|
export const MEETING_NOTES_PROVIDERS = Object.keys(MEETING_NOTES);
|
|
@@ -30,25 +32,36 @@ const headingOf = (line, headings) => {
|
|
|
30
32
|
.toLowerCase();
|
|
31
33
|
return headings.find((heading) => heading.toLowerCase() === plain);
|
|
32
34
|
};
|
|
33
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* The notes cut at their headings, without the provider's footer. Older notes have no overview heading: their
|
|
37
|
+
* overview is the text before the first heading.
|
|
38
|
+
*/
|
|
34
39
|
export const notesOf = (text, kind) => {
|
|
40
|
+
const all = text.split("\n");
|
|
41
|
+
const end = all.findIndex((line) => kind.ends.includes(line.trim()));
|
|
42
|
+
const lines = end === -1 ? all : all.slice(0, end);
|
|
43
|
+
const lead = [];
|
|
35
44
|
const parts = [];
|
|
36
|
-
for (const line of
|
|
45
|
+
for (const line of lines) {
|
|
37
46
|
const heading = headingOf(line, kind.headings);
|
|
38
47
|
if (heading !== undefined)
|
|
39
48
|
parts.push({ label: heading, lines: [] });
|
|
40
49
|
else
|
|
41
|
-
parts.at(-1)?.lines.push(line);
|
|
50
|
+
(parts.at(-1)?.lines ?? lead).push(line);
|
|
42
51
|
}
|
|
43
52
|
const sections = parts
|
|
44
53
|
.map(({ label, lines }) => ({ label, text: lines.join("\n").trim() }))
|
|
45
54
|
.filter(({ text }) => text !== "");
|
|
55
|
+
const opening = lead
|
|
56
|
+
.filter((line) => line.trim() !== kind.title)
|
|
57
|
+
.join("\n")
|
|
58
|
+
.trim();
|
|
46
59
|
return {
|
|
47
60
|
title: null,
|
|
48
|
-
overview: sections.find(({ label }) => label === kind.overview)?.text ?? null,
|
|
61
|
+
overview: sections.find(({ label }) => label === kind.overview)?.text ?? (opening || null),
|
|
49
62
|
sections: sections.filter(({ label }) => label !== kind.overview),
|
|
50
63
|
nextSteps: [],
|
|
51
|
-
content:
|
|
64
|
+
content: lines.join("\n").trim() || null,
|
|
52
65
|
};
|
|
53
66
|
};
|
|
54
67
|
/** The first link in the notes that names a meeting room, as `joinKeyOf` reads it: never a plain page link. */
|
|
@@ -28,7 +28,8 @@ const readJson = (path) => {
|
|
|
28
28
|
}
|
|
29
29
|
let parsed;
|
|
30
30
|
try {
|
|
31
|
-
|
|
31
|
+
// Windows editors save JSON with a byte-order mark, which JSON.parse refuses.
|
|
32
|
+
parsed = JSON.parse(text.replace(/^\uFEFF/u, ""));
|
|
32
33
|
}
|
|
33
34
|
catch (error) {
|
|
34
35
|
throw new CliError("configuration_error", `${path} is not valid JSON: ${error.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.657.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|