@songtonyli/dsh-cli 0.1.57 → 0.1.59
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/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +1 -0
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +1 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox/lib/index.js +59 -4
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/README.i18n.yaml +73 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/README.md +166 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/README.zh.md +166 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/lib/exec-shim.js +227 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/lib/index.js +704 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-apple-container/package.json +62 -0
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/lib/index.js +23 -0
- package/node_modules/@deepseek-ai/dsh-session/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +1 -0
- package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +1 -0
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +22 -0
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +24 -0
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/lib/index.js +28 -3
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +7 -2
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/lib/index.js +14 -6
- package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-tui-app/README.md +6 -5
- package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +6 -5
- package/node_modules/@deepseek-ai/dsh-tui-app/cordis.patch.yml +20 -0
- package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +42 -31
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +1 -0
- package/node_modules/@deepseek-ai/libreoffice-kit/README.md +20 -5
- package/node_modules/@deepseek-ai/libreoffice-kit/README.zh.md +21 -6
- package/node_modules/@deepseek-ai/libreoffice-kit/lib/cli.js +499 -253
- package/node_modules/@deepseek-ai/libreoffice-kit/lib/font-snapshot-worker.js +37 -26
- package/node_modules/@deepseek-ai/libreoffice-kit/lib/index.js +498 -252
- package/node_modules/@deepseek-ai/libreoffice-kit/lib/worker.js +39 -13
- package/node_modules/@deepseek-ai/libreoffice-kit/package.json +5 -3
- package/node_modules/@earendil-works/pi-ai/README.md +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +117 -18
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +19 -8
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +3 -2
- package/node_modules/@earendil-works/pi-ai/package.json +6 -2
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@shikijs/core/dist/index.mjs +15 -12
- package/node_modules/@shikijs/core/package.json +4 -4
- package/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +2 -4
- package/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +2 -4
- package/node_modules/@shikijs/engine-javascript/dist/index.mjs +1 -1
- package/node_modules/@shikijs/engine-javascript/dist/string-TLTPtCPs.mjs +115 -0
- package/node_modules/@shikijs/engine-javascript/package.json +3 -3
- package/node_modules/@shikijs/engine-oniguruma/package.json +3 -3
- package/node_modules/@shikijs/langs/dist/ada.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/ahk.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/beancount.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/coq.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/csharp.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/css.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/dart.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/dotenv.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/emacs-lisp.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/gn.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/handlebars.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/julia.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/latex.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/luau.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/marko.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/moonbit.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/nextflow-groovy.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/nextflow.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/nushell.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/php.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/powershell.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/ruby.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/rust.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/sql.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/svelte.mjs +1 -1
- package/node_modules/@shikijs/langs/dist/twig.mjs +3 -3
- package/node_modules/@shikijs/langs/dist/typespec.mjs +1 -1
- package/node_modules/@shikijs/langs/package.json +3 -3
- package/node_modules/@shikijs/primitive/dist/index.mjs +2 -1
- package/node_modules/@shikijs/primitive/package.json +3 -3
- package/node_modules/@shikijs/themes/dist/monokai.mjs +1 -1
- package/node_modules/@shikijs/themes/dist/one-dark-pro.mjs +1 -1
- package/node_modules/@shikijs/themes/dist/red.mjs +1 -1
- package/node_modules/@shikijs/themes/dist/solarized-dark.mjs +1 -1
- package/node_modules/@shikijs/themes/dist/solarized-light.mjs +1 -1
- package/node_modules/@shikijs/themes/package.json +3 -3
- package/node_modules/@shikijs/types/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +33 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +33 -11
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +3 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/node-addon-native-custom-loader/lib/index.js +23 -10
- package/node_modules/node-addon-native-custom-loader/package.json +6 -1
- package/node_modules/node-addon-require-builtin/package.json +7 -2
- package/node_modules/powershell-utils/index.js +40 -19
- package/node_modules/powershell-utils/package.json +1 -1
- package/node_modules/powershell-utils/readme.md +69 -13
- package/node_modules/shiki/package.json +10 -10
- package/node_modules/wsl-utils/index.js +18 -37
- package/node_modules/wsl-utils/package.json +2 -2
- package/package.json +33 -29
- package/node_modules/@shikijs/engine-javascript/dist/scanner-DX8LRFGE.mjs +0 -77
- package/node_modules/open/node_modules/powershell-utils/index.js +0 -79
- package/node_modules/open/node_modules/powershell-utils/license +0 -9
- package/node_modules/open/node_modules/powershell-utils/package.json +0 -47
- package/node_modules/open/node_modules/powershell-utils/readme.md +0 -209
|
@@ -4,6 +4,29 @@ import { closeSync, constants, fstatSync, mkdirSync, openSync, readSync, readdir
|
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { extname, isAbsolute, join, posix, win32 } from "node:path";
|
|
6
6
|
import { create } from "fontkit";
|
|
7
|
+
//#region lib/types/font-file-identity.js
|
|
8
|
+
/** Preserve 64-bit device and inode values without JavaScript integer rounding. */
|
|
9
|
+
function fontFileIdentity(status) {
|
|
10
|
+
return {
|
|
11
|
+
dev: status.dev.toString(),
|
|
12
|
+
ino: status.ino.toString(),
|
|
13
|
+
size: Number(status.size),
|
|
14
|
+
mtimeMs: Number(status.mtimeNs) / 1e6,
|
|
15
|
+
ctimeMs: Number(status.ctimeNs) / 1e6
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/** Compare a source descriptor's exact identity with its indexed font metadata. */
|
|
19
|
+
function matchesFontFile(status, expected) {
|
|
20
|
+
const current = fontFileIdentity(status);
|
|
21
|
+
return [
|
|
22
|
+
"dev",
|
|
23
|
+
"ino",
|
|
24
|
+
"size",
|
|
25
|
+
"mtimeMs",
|
|
26
|
+
"ctimeMs"
|
|
27
|
+
].every((key) => current[key] === expected[key]);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
7
30
|
//#region lib/types/fonts.js
|
|
8
31
|
/** Host font metadata snapshots and conversion-local glyph matching over original files. */
|
|
9
32
|
const FONT_EXTENSIONS$1 = /* @__PURE__ */ new Set([
|
|
@@ -13,14 +36,6 @@ const FONT_EXTENSIONS$1 = /* @__PURE__ */ new Set([
|
|
|
13
36
|
".otc",
|
|
14
37
|
".dfont"
|
|
15
38
|
]);
|
|
16
|
-
/** File identity read from the descriptor, before and after, to detect concurrent replacement. */
|
|
17
|
-
const STAT_KEYS = [
|
|
18
|
-
"dev",
|
|
19
|
-
"ino",
|
|
20
|
-
"size",
|
|
21
|
-
"mtimeMs",
|
|
22
|
-
"ctimeMs"
|
|
23
|
-
];
|
|
24
39
|
/**
|
|
25
40
|
* @param error - Thrown filesystem value.
|
|
26
41
|
* @returns whether it means the path is not a usable font source.
|
|
@@ -92,17 +107,17 @@ function inspect(path, maxBytes, observed) {
|
|
|
92
107
|
try {
|
|
93
108
|
const fd = openSync(path, constants.O_RDONLY | constants.O_NONBLOCK | constants.O_NOFOLLOW);
|
|
94
109
|
try {
|
|
95
|
-
status = fstatSync(fd);
|
|
110
|
+
status = fstatSync(fd, { bigint: true });
|
|
96
111
|
if (!status.isFile() || status.size > maxBytes) return [];
|
|
97
|
-
bytes = Buffer.alloc(status.size);
|
|
112
|
+
bytes = Buffer.alloc(Number(status.size));
|
|
98
113
|
let offset = 0;
|
|
99
114
|
while (offset < bytes.length) {
|
|
100
115
|
const count = readSync(fd, bytes, offset, bytes.length - offset, offset);
|
|
101
116
|
if (count === 0) throw new Error("A system font was truncated while indexing; reload the font service.");
|
|
102
117
|
offset += count;
|
|
103
118
|
}
|
|
104
|
-
const after = fstatSync(fd);
|
|
105
|
-
if (after.size !== status.size || after.
|
|
119
|
+
const after = fstatSync(fd, { bigint: true });
|
|
120
|
+
if (after.size !== status.size || after.mtimeNs !== status.mtimeNs || after.ctimeNs !== status.ctimeNs) throw new Error("A system font changed while indexing; reload the font service.");
|
|
106
121
|
} finally {
|
|
107
122
|
closeSync(fd);
|
|
108
123
|
}
|
|
@@ -128,11 +143,7 @@ function inspect(path, maxBytes, observed) {
|
|
|
128
143
|
].filter((name) => Boolean(name)).map(normalize))];
|
|
129
144
|
return {
|
|
130
145
|
path,
|
|
131
|
-
|
|
132
|
-
mtimeMs: status.mtimeMs,
|
|
133
|
-
ctimeMs: status.ctimeMs,
|
|
134
|
-
dev: status.dev,
|
|
135
|
-
ino: status.ino,
|
|
146
|
+
...fontFileIdentity(status),
|
|
136
147
|
faceIndex,
|
|
137
148
|
family: font.familyName,
|
|
138
149
|
style: font.subfamilyName,
|
|
@@ -147,11 +158,7 @@ function inspect(path, maxBytes, observed) {
|
|
|
147
158
|
}
|
|
148
159
|
observed?.set(path, {
|
|
149
160
|
path,
|
|
150
|
-
|
|
151
|
-
ino: status.ino,
|
|
152
|
-
size: status.size,
|
|
153
|
-
mtimeMs: status.mtimeMs,
|
|
154
|
-
ctimeMs: status.ctimeMs,
|
|
161
|
+
...fontFileIdentity(status),
|
|
155
162
|
faces
|
|
156
163
|
});
|
|
157
164
|
return faces;
|
|
@@ -169,8 +176,8 @@ function indexSystemFonts(options, previous = /* @__PURE__ */ new Map(), observe
|
|
|
169
176
|
if (prior !== void 0) try {
|
|
170
177
|
const fd = openSync(path, constants.O_RDONLY | constants.O_NONBLOCK | constants.O_NOFOLLOW);
|
|
171
178
|
try {
|
|
172
|
-
const current = fstatSync(fd);
|
|
173
|
-
if (current.isFile() && current.size <= options.maxFileBytes &&
|
|
179
|
+
const current = fstatSync(fd, { bigint: true });
|
|
180
|
+
if (current.isFile() && current.size <= options.maxFileBytes && matchesFontFile(current, prior)) {
|
|
174
181
|
observed?.set(path, prior);
|
|
175
182
|
return prior.faces;
|
|
176
183
|
}
|
|
@@ -274,7 +281,7 @@ function officeFontFiles(platform = process.platform, home = homedir(), env = pr
|
|
|
274
281
|
/** Optional, bounded disk storage for derived font metadata; source reads remain authoritative. */
|
|
275
282
|
const VERSION = {
|
|
276
283
|
format: 1,
|
|
277
|
-
extractor:
|
|
284
|
+
extractor: 2,
|
|
278
285
|
fontkit: "2.0.4"
|
|
279
286
|
};
|
|
280
287
|
const digest = (records) => createHash("sha256").update(JSON.stringify(records)).digest("hex");
|
|
@@ -291,7 +298,11 @@ const IDENTITY = [
|
|
|
291
298
|
"ino"
|
|
292
299
|
];
|
|
293
300
|
function record(value) {
|
|
294
|
-
if (!object(value) || !text(value.path) || !isAbsolute(value.path) || !
|
|
301
|
+
if (!object(value) || !text(value.path) || !isAbsolute(value.path) || ![
|
|
302
|
+
"size",
|
|
303
|
+
"mtimeMs",
|
|
304
|
+
"ctimeMs"
|
|
305
|
+
].every((key) => finite(value[key])) || !["dev", "ino"].every((key) => typeof value[key] === "string" && /^\d+$/.test(value[key])) || !Number.isSafeInteger(value.size) || Number(value.size) < 0 || !Object.keys(value).every((key) => [
|
|
295
306
|
"path",
|
|
296
307
|
...IDENTITY,
|
|
297
308
|
"faces"
|