dsh-asteme 0.0.1 → 0.11.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/LICENSE +1 -0
- package/NOTICE +7 -0
- package/README.md +16 -8
- package/brain/acp.mjs +208 -0
- package/brain/fonts.mjs +135 -0
- package/brain/mind.mjs +1614 -0
- package/brain/page/0-base.js +214 -0
- package/brain/page/1-sky.js +71 -0
- package/brain/page/2-stars.js +1531 -0
- package/brain/page/3-beginning.js +324 -0
- package/brain/page/4-conversation.js +674 -0
- package/brain/page/5-sheets.js +957 -0
- package/brain/page/6-handing.js +352 -0
- package/brain/page/7-aloud.js +198 -0
- package/brain/page/8-start.js +739 -0
- package/brain/page/shell.html +31 -0
- package/brain/page/style.css +369 -0
- package/brain/page.mjs +38 -0
- package/brain/server.mjs +330 -0
- package/brain/voice.mjs +252 -0
- package/brain/wake.mjs +203 -0
- package/client/copy.mjs +846 -0
- package/client/dist/client.js +896 -0
- package/client/icon.mjs +12 -0
- package/client/locales/de.mjs +802 -0
- package/client/locales/es.mjs +802 -0
- package/client/locales/fr.mjs +802 -0
- package/client/locales/ja.mjs +813 -0
- package/client/locales/pt.mjs +802 -0
- package/client/locales/ru.mjs +802 -0
- package/client/locales/zh.mjs +813 -0
- package/cordis.patch.yml +4 -0
- package/eval/harness.mjs +68 -0
- package/eval/scenarios.mjs +175 -0
- package/icon.svg +6 -0
- package/locale/en.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +59 -11
- package/plugin/calls.mjs +131 -0
- package/plugin/events.mjs +110 -0
- package/plugin/files.mjs +335 -0
- package/plugin/host.mjs +728 -0
- package/plugin/index.mjs +193 -0
- package/plugin/prompt.mjs +55 -0
- package/plugin/settings.mjs +310 -0
- package/plugin/surface.mjs +88 -0
- package/plugin/tunables.mjs +52 -0
- package/plugin/voice.mjs +14 -0
- package/plugin/worker.mjs +101 -0
- package/src/LICENSE +21 -0
- package/src/archive.mjs +485 -0
- package/src/attend.mjs +395 -0
- package/src/charter.mjs +31 -0
- package/src/core.mjs +93 -0
- package/src/diary.locales.mjs +40 -0
- package/src/embed-worker.mjs +28 -0
- package/src/embedding.mjs +90 -0
- package/src/explain.mjs +82 -0
- package/src/habits.mjs +237 -0
- package/src/jev.mjs +20 -0
- package/src/journal.mjs +44 -0
- package/src/judge.mjs +89 -0
- package/src/log.mjs +484 -0
- package/src/memory.mjs +460 -0
- package/src/mind.mjs +78 -0
- package/src/model-json.mjs +86 -0
- package/src/outcome.mjs +225 -0
- package/src/package.json +23 -0
- package/src/policy.mjs +119 -0
- package/src/prompts.mjs +245 -0
- package/src/recall.mjs +261 -0
- package/src/reflect.mjs +126 -0
- package/src/sleep.mjs +356 -0
- package/src/user.mjs +172 -0
- package/index.js +0 -6
package/LICENSE
CHANGED
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
# dsh-asteme
|
|
2
2
|
|
|
3
|
-
The DeepSeek Harness plugin for [Asteme](https://github.com/asteme/asteme),
|
|
3
|
+
The DeepSeek Harness plugin bundle for [Asteme](https://github.com/asteme/asteme),
|
|
4
4
|
long-term memory for AI agents.
|
|
5
5
|
|
|
6
|
-
**Status: in development.**
|
|
7
|
-
|
|
6
|
+
**Status: in development.** The source lives in the private `asteme/asteme`
|
|
7
|
+
repository. This repository is generated from it; do not edit it by hand.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Install from this repository with the DSH plugin dialog:
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
```
|
|
12
|
+
https://github.com/asteme/dsh-asteme.git
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or build it from the source repository with `npm run bundle` and install the
|
|
16
|
+
resulting `dist-dsh` directory from disk.
|
|
17
|
+
|
|
18
|
+
Apache-2.0: see LICENSE and NOTICE. The name and the mark are the project's own.
|
|
19
|
+
|
|
20
|
+
## After an update
|
|
21
|
+
|
|
22
|
+
A native library that a plugin loaded into DSH's process stays there until DSH is restarted; reloading or switching the plugin off does not remove it. Versions up to 0.11.0-alpha.5 loaded the embedding model's libraries into DSH itself. After updating from one of them, restart DSH once. From 0.11.0-alpha.6 on, those libraries are loaded only in Asteme's own embedding process.
|
package/brain/acp.mjs
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// A worker is an agent tool that takes text and answers in text. This is the
|
|
2
|
+
// one door to all of them: the Agent Client Protocol, JSON-RPC over the
|
|
3
|
+
// worker's standard input and output. DSH, Claude Code, Codex, Gemini CLI and
|
|
4
|
+
// others speak it; nothing here knows which one is on the other end.
|
|
5
|
+
//
|
|
6
|
+
// const worker = openWorker({ name, command, args, env, cwd });
|
|
7
|
+
// const task = await worker.start({ where, text, onUpdate, onPermission });
|
|
8
|
+
// const { stopReason, said, did } = await task.done;
|
|
9
|
+
// await task.tell("one more thing"); task.cancel(); worker.close();
|
|
10
|
+
import { spawn as realSpawn } from "node:child_process";
|
|
11
|
+
|
|
12
|
+
const cut = (s, n) => {
|
|
13
|
+
const t = String(s ?? "");
|
|
14
|
+
return t.length > n ? `${t.slice(0, n)}…` : t;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function openWorker({ name, command, args = [], env = {}, cwd = process.cwd(), spawn = realSpawn, startTimeoutMs = 60000 }) {
|
|
18
|
+
let child = null,
|
|
19
|
+
buffer = "",
|
|
20
|
+
seq = 0,
|
|
21
|
+
ready = null,
|
|
22
|
+
closed = false;
|
|
23
|
+
const waiting = new Map(),
|
|
24
|
+
sessions = new Map(),
|
|
25
|
+
errors = [];
|
|
26
|
+
const send = (message) => {
|
|
27
|
+
child.stdin.write(`${JSON.stringify({ jsonrpc: "2.0", ...message })}\n`);
|
|
28
|
+
};
|
|
29
|
+
const call = (method, params, timeoutMs) =>
|
|
30
|
+
new Promise((resolve, reject) => {
|
|
31
|
+
const id = ++seq;
|
|
32
|
+
const timer = timeoutMs
|
|
33
|
+
? setTimeout(() => {
|
|
34
|
+
waiting.delete(id);
|
|
35
|
+
reject(new Error(`${name} did not answer ${method}`));
|
|
36
|
+
}, timeoutMs)
|
|
37
|
+
: null;
|
|
38
|
+
waiting.set(id, {
|
|
39
|
+
resolve: (v) => {
|
|
40
|
+
clearTimeout(timer);
|
|
41
|
+
resolve(v);
|
|
42
|
+
},
|
|
43
|
+
reject: (e) => {
|
|
44
|
+
clearTimeout(timer);
|
|
45
|
+
reject(e);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
send({ id, method, params });
|
|
49
|
+
});
|
|
50
|
+
const fail = (error) => {
|
|
51
|
+
for (const w of waiting.values()) w.reject(error);
|
|
52
|
+
waiting.clear();
|
|
53
|
+
for (const s of sessions.values()) s.fail(error);
|
|
54
|
+
sessions.clear();
|
|
55
|
+
child = null;
|
|
56
|
+
ready = null;
|
|
57
|
+
};
|
|
58
|
+
const receive = (message) => {
|
|
59
|
+
if (message.id !== undefined && (message.result !== undefined || message.error) && !message.method) {
|
|
60
|
+
const w = waiting.get(message.id);
|
|
61
|
+
waiting.delete(message.id);
|
|
62
|
+
if (w)
|
|
63
|
+
message.error
|
|
64
|
+
? w.reject(Object.assign(new Error(message.error.message ?? "The worker refused"), { code: message.error.code }))
|
|
65
|
+
: w.resolve(message.result);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const session = sessions.get(message.params?.sessionId);
|
|
69
|
+
if (message.method === "session/update") session?.update(message.params.update);
|
|
70
|
+
else if (message.method === "session/request_permission") {
|
|
71
|
+
// The brain grants nothing by itself. The question goes to whoever
|
|
72
|
+
// started the task; no answer is a refusal.
|
|
73
|
+
const options = message.params.options ?? [];
|
|
74
|
+
const answer = (allow) => {
|
|
75
|
+
const pick =
|
|
76
|
+
options.find((o) => (allow ? /^allow_once$/.test(o.kind) : /^reject_once$/.test(o.kind))) ??
|
|
77
|
+
options.find((o) => (allow ? /^allow/.test(o.kind) : /^reject/.test(o.kind)));
|
|
78
|
+
send({ id: message.id, result: { outcome: pick ? { outcome: "selected", optionId: pick.optionId } : { outcome: "cancelled" } } });
|
|
79
|
+
};
|
|
80
|
+
if (!session) answer(false);
|
|
81
|
+
else
|
|
82
|
+
session.permission({
|
|
83
|
+
title: cut(message.params.toolCall?.title ?? "an action", 200),
|
|
84
|
+
detail: cut(JSON.stringify(message.params.toolCall?.rawInput ?? {}), 600),
|
|
85
|
+
answer,
|
|
86
|
+
});
|
|
87
|
+
} else if (message.id !== undefined && message.method) send({ id: message.id, error: { code: -32601, message: "Not supported by this client" } });
|
|
88
|
+
};
|
|
89
|
+
const connect = () =>
|
|
90
|
+
(ready ??= (async () => {
|
|
91
|
+
// On Windows a .cmd or .bat (which is what npm installs for a command)
|
|
92
|
+
// cannot be started directly; it needs the shell.
|
|
93
|
+
const shell = process.platform === "win32" && /\.(cmd|bat)$/i.test(command);
|
|
94
|
+
child = spawn(command, args, {
|
|
95
|
+
cwd,
|
|
96
|
+
env: { ...process.env, ...env },
|
|
97
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
98
|
+
...(shell ? { shell: true } : {}),
|
|
99
|
+
windowsHide: true,
|
|
100
|
+
});
|
|
101
|
+
child.stdout.on("data", (chunk) => {
|
|
102
|
+
buffer += chunk;
|
|
103
|
+
for (let at; (at = buffer.indexOf("\n")) >= 0;) {
|
|
104
|
+
const line = buffer.slice(0, at);
|
|
105
|
+
buffer = buffer.slice(at + 1);
|
|
106
|
+
if (!line.trim()) continue;
|
|
107
|
+
try {
|
|
108
|
+
receive(JSON.parse(line));
|
|
109
|
+
} catch {
|
|
110
|
+
errors.push(cut(line, 200));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
child.stderr.on("data", (chunk) => {
|
|
115
|
+
errors.push(cut(chunk, 300));
|
|
116
|
+
if (errors.length > 20) errors.shift();
|
|
117
|
+
});
|
|
118
|
+
child.on("error", (e) => fail(new Error(`${name} could not be started: ${e.message}`)));
|
|
119
|
+
child.on("exit", (code) => {
|
|
120
|
+
if (!closed) fail(new Error(`${name} stopped (exit ${code})${errors.length ? `: ${errors.at(-1)}` : ""}`));
|
|
121
|
+
});
|
|
122
|
+
const hello = await call(
|
|
123
|
+
"initialize",
|
|
124
|
+
{ protocolVersion: 1, clientCapabilities: {}, clientInfo: { name: "asteme", version: "0.11.0" } },
|
|
125
|
+
startTimeoutMs,
|
|
126
|
+
);
|
|
127
|
+
return hello;
|
|
128
|
+
})().catch((e) => {
|
|
129
|
+
ready = null;
|
|
130
|
+
throw e;
|
|
131
|
+
}));
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
name,
|
|
135
|
+
/** Hands one piece of work to the worker in a session of its own. */
|
|
136
|
+
async start({ where = cwd, text, onUpdate = () => {}, onPermission }) {
|
|
137
|
+
await connect();
|
|
138
|
+
const { sessionId } = await call("session/new", { cwd: where, mcpServers: [] }, startTimeoutMs);
|
|
139
|
+
let said = [],
|
|
140
|
+
did = [],
|
|
141
|
+
settle;
|
|
142
|
+
const record = {
|
|
143
|
+
update(u) {
|
|
144
|
+
if (u.sessionUpdate === "agent_message_chunk" && u.content?.type === "text") {
|
|
145
|
+
said.push(u.content.text);
|
|
146
|
+
onUpdate({ kind: "said", text: u.content.text });
|
|
147
|
+
} else if (u.sessionUpdate === "tool_call") {
|
|
148
|
+
did.push({ id: u.toolCallId, title: u.title, status: u.status });
|
|
149
|
+
onUpdate({ kind: "doing", text: cut(u.title, 120) });
|
|
150
|
+
} else if (u.sessionUpdate === "tool_call_update") {
|
|
151
|
+
const d = did.find((x) => x.id === u.toolCallId);
|
|
152
|
+
if (d) d.status = u.status ?? d.status;
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
permission(ask) {
|
|
156
|
+
onPermission ? onPermission(ask) : ask.answer(false);
|
|
157
|
+
},
|
|
158
|
+
fail(error) {
|
|
159
|
+
settle?.reject(error);
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
sessions.set(sessionId, record);
|
|
163
|
+
const prompt = (message) => {
|
|
164
|
+
said = [];
|
|
165
|
+
did = [];
|
|
166
|
+
const done = new Promise((resolve, reject) => {
|
|
167
|
+
settle = { reject };
|
|
168
|
+
call("session/prompt", { sessionId, prompt: [{ type: "text", text: message }] }).then(
|
|
169
|
+
(r) =>
|
|
170
|
+
resolve({
|
|
171
|
+
stopReason: r?.stopReason ?? "unknown",
|
|
172
|
+
said: said.join("\n").trim(),
|
|
173
|
+
did: did.map((d) => ({ title: d.title, status: d.status })),
|
|
174
|
+
}),
|
|
175
|
+
reject,
|
|
176
|
+
);
|
|
177
|
+
});
|
|
178
|
+
done.catch(() => {});
|
|
179
|
+
return done;
|
|
180
|
+
};
|
|
181
|
+
const task = {
|
|
182
|
+
sessionId,
|
|
183
|
+
done: prompt(text),
|
|
184
|
+
tell(message) {
|
|
185
|
+
task.done = prompt(message);
|
|
186
|
+
return task.done;
|
|
187
|
+
},
|
|
188
|
+
cancel() {
|
|
189
|
+
if (child) send({ method: "session/cancel", params: { sessionId } });
|
|
190
|
+
},
|
|
191
|
+
async close() {
|
|
192
|
+
sessions.delete(sessionId);
|
|
193
|
+
if (child) await call("session/close", { sessionId }, 15000).catch(() => {});
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
return task;
|
|
197
|
+
},
|
|
198
|
+
close() {
|
|
199
|
+
closed = true;
|
|
200
|
+
child?.kill();
|
|
201
|
+
child = null;
|
|
202
|
+
ready = null;
|
|
203
|
+
},
|
|
204
|
+
get running() {
|
|
205
|
+
return !!child;
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
}
|
package/brain/fonts.mjs
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// The names of the typefaces on the machine Asteme runs on, read from the
|
|
2
|
+
// font files themselves.
|
|
3
|
+
//
|
|
4
|
+
// A page can ask its browser for this (queryLocalFonts), but not every place a
|
|
5
|
+
// page is shown answers: inside some desktop shells the question is refused.
|
|
6
|
+
// The names here are only candidates. The page keeps the ones its own screen
|
|
7
|
+
// can really draw, so a list read on one machine never promises a typeface to
|
|
8
|
+
// another.
|
|
9
|
+
//
|
|
10
|
+
// Only the name table of each file is read: no outlines, nothing else.
|
|
11
|
+
import { closeSync, openSync, readdirSync, readSync } from "node:fs";
|
|
12
|
+
import { homedir, platform } from "node:os";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
|
|
15
|
+
/** Where this kind of machine keeps its typefaces. */
|
|
16
|
+
export const fontFolders = (env = process.env, os = platform(), home = homedir()) =>
|
|
17
|
+
(os === "win32"
|
|
18
|
+
? [
|
|
19
|
+
join(env.WINDIR ?? env.SystemRoot ?? "C:\\Windows", "Fonts"),
|
|
20
|
+
env.LOCALAPPDATA ? join(env.LOCALAPPDATA, "Microsoft", "Windows", "Fonts") : null,
|
|
21
|
+
]
|
|
22
|
+
: os === "darwin"
|
|
23
|
+
? ["/System/Library/Fonts", "/Library/Fonts", join(home, "Library", "Fonts")]
|
|
24
|
+
: ["/usr/share/fonts", "/usr/local/share/fonts", join(home, ".fonts"), join(home, ".local", "share", "fonts")]
|
|
25
|
+
).filter(Boolean);
|
|
26
|
+
|
|
27
|
+
const KINDS = /\.(ttf|otf|ttc|otc)$/i;
|
|
28
|
+
const filesIn = (folder, depth = 0, out = []) => {
|
|
29
|
+
let entries;
|
|
30
|
+
try {
|
|
31
|
+
entries = readdirSync(folder, { withFileTypes: true });
|
|
32
|
+
} catch {
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
for (const e of entries) {
|
|
36
|
+
if (out.length >= 6000) break;
|
|
37
|
+
if (e.isDirectory()) {
|
|
38
|
+
if (depth < 4) filesIn(join(folder, e.name), depth + 1, out);
|
|
39
|
+
} else if (KINDS.test(e.name)) out.push(join(folder, e.name));
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const part = (fd, at, length) => {
|
|
45
|
+
const b = Buffer.alloc(length);
|
|
46
|
+
const n = readSync(fd, b, 0, length, at);
|
|
47
|
+
return n === length ? b : null;
|
|
48
|
+
};
|
|
49
|
+
const words = (b, platformId) => {
|
|
50
|
+
// Windows and Unicode names are sixteen bits a letter, high byte first; the old Macintosh ones are a byte a letter.
|
|
51
|
+
if (platformId === 1) return b.toString("latin1");
|
|
52
|
+
if (b.length % 2) return "";
|
|
53
|
+
const copy = Buffer.from(b);
|
|
54
|
+
copy.swap16();
|
|
55
|
+
return copy.toString("utf16le");
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** The family names in one name table: the name to choose it by in every language it gives one in. */
|
|
59
|
+
export const namesIn = (table) => {
|
|
60
|
+
if (!table || table.length < 6) return [];
|
|
61
|
+
const count = table.readUInt16BE(2),
|
|
62
|
+
strings = table.readUInt16BE(4),
|
|
63
|
+
family = [],
|
|
64
|
+
typographic = [];
|
|
65
|
+
for (let i = 0; i < count; i++) {
|
|
66
|
+
const at = 6 + i * 12;
|
|
67
|
+
if (at + 12 > table.length) break;
|
|
68
|
+
const platformId = table.readUInt16BE(at),
|
|
69
|
+
nameId = table.readUInt16BE(at + 6),
|
|
70
|
+
length = table.readUInt16BE(at + 8),
|
|
71
|
+
offset = strings + table.readUInt16BE(at + 10);
|
|
72
|
+
if ((nameId !== 1 && nameId !== 16) || !length || offset + length > table.length || ![0, 1, 3].includes(platformId)) continue;
|
|
73
|
+
const name = words(table.subarray(offset, offset + length), platformId)
|
|
74
|
+
.replace(/\0/g, "")
|
|
75
|
+
.trim();
|
|
76
|
+
if (name && !name.startsWith(".")) (nameId === 16 ? typographic : family).push(name);
|
|
77
|
+
}
|
|
78
|
+
// A family that says what it is properly called (16) is called that; its plainer name (1) is often one of its weights.
|
|
79
|
+
return [...new Set(typographic.length ? typographic : family)];
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** The family names in one font file, or in each face of a collection. */
|
|
83
|
+
export const namesOfFile = (path) => {
|
|
84
|
+
let fd;
|
|
85
|
+
try {
|
|
86
|
+
fd = openSync(path, "r");
|
|
87
|
+
} catch {
|
|
88
|
+
return [];
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
const head = part(fd, 0, 12);
|
|
92
|
+
if (!head) return [];
|
|
93
|
+
const starts = [];
|
|
94
|
+
if (head.toString("latin1", 0, 4) === "ttcf") {
|
|
95
|
+
const n = Math.min(64, head.readUInt32BE(8)),
|
|
96
|
+
offs = part(fd, 12, n * 4);
|
|
97
|
+
if (!offs) return [];
|
|
98
|
+
for (let i = 0; i < n; i++) starts.push(offs.readUInt32BE(i * 4));
|
|
99
|
+
} else starts.push(0);
|
|
100
|
+
const names = new Set(),
|
|
101
|
+
read = new Set();
|
|
102
|
+
for (const start of starts) {
|
|
103
|
+
const top = part(fd, start, 12);
|
|
104
|
+
if (!top) continue;
|
|
105
|
+
const tables = Math.min(80, top.readUInt16BE(4)),
|
|
106
|
+
dir = part(fd, start + 12, tables * 16);
|
|
107
|
+
if (!dir) continue;
|
|
108
|
+
for (let i = 0; i < tables; i++) {
|
|
109
|
+
if (dir.toString("latin1", i * 16, i * 16 + 4) !== "name") continue;
|
|
110
|
+
const at = dir.readUInt32BE(i * 16 + 8),
|
|
111
|
+
length = Math.min(1 << 20, dir.readUInt32BE(i * 16 + 12));
|
|
112
|
+
if (read.has(at)) break;
|
|
113
|
+
read.add(at);
|
|
114
|
+
for (const n of namesIn(part(fd, at, length))) names.add(n);
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return [...names];
|
|
119
|
+
} catch {
|
|
120
|
+
return [];
|
|
121
|
+
} finally {
|
|
122
|
+
closeSync(fd);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
let kept = null;
|
|
127
|
+
/** Every family name found, sorted. Read once and kept for ten minutes: the files do not change under a conversation. */
|
|
128
|
+
export const fontNames = ({ folders = fontFolders(), now = Date.now() } = {}) => {
|
|
129
|
+
const key = folders.join("|");
|
|
130
|
+
if (kept && kept.key === key && now - kept.at < 600000) return kept.names;
|
|
131
|
+
const names = new Set();
|
|
132
|
+
for (const folder of folders) for (const file of filesIn(folder)) for (const n of namesOfFile(file)) names.add(n);
|
|
133
|
+
kept = { key, at: now, names: [...names].sort((a, b) => a.localeCompare(b)) };
|
|
134
|
+
return kept.names;
|
|
135
|
+
};
|