dsh-m 0.2.6 → 0.2.8
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.en.md +5 -0
- package/README.md +5 -0
- package/lib/core/dsh-cli.js +41 -1
- package/package.json +1 -1
- package/registry.json +11 -0
package/README.en.md
CHANGED
|
@@ -10,6 +10,11 @@ English · [中文](./README.md)
|
|
|
10
10
|
|
|
11
11
|
A DeepSeek Harness (DSH) plugin marketplace with a customizable registry: **browse, install, uninstall, upgrade** — all local. Ships as a DSH web plugin: the "Plugin Marketplace" sidebar entry opens a three-view panel, backed by seven `dshm_*` agent tools and the `dshm` CLI.
|
|
12
12
|
|
|
13
|
+
<div align="center">
|
|
14
|
+
<img src="https://raw.githubusercontent.com/iasiv5/dsh-m/main/docs/images/marketplace.webp" alt="Plugin Marketplace panel — Market view: curated card flow with search and category filters" width="100%">
|
|
15
|
+
<p><sub>The "Plugin Marketplace" panel · Market view: curated cards · search · category filters · one-click install</sub></p>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
13
18
|
## Quick start
|
|
14
19
|
|
|
15
20
|
**Paste this whole block to your agent to install:**
|
package/README.md
CHANGED
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
可自定义收录清单(Registry)的 DeepSeek Harness (DSH) 插件市场:**收录 · 安装 · 卸载 · 升级**,全部本机完成。以 DSH web 插件形态运行——侧栏「插件市场」打开三视图面板,同时提供 `dshm_*` agent 工具与 `dshm` CLI。
|
|
12
12
|
|
|
13
|
+
<div align="center">
|
|
14
|
+
<img src="https://raw.githubusercontent.com/iasiv5/dsh-m/main/docs/images/marketplace.webp" alt="侧栏「插件市场」面板——市场视图:收录卡片流、关键词搜索与分类筛选" width="100%">
|
|
15
|
+
<p><sub>侧栏「插件市场」· 市场视图:收录卡片流 · 搜索 · 分类筛选 · 展开即装</sub></p>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
13
18
|
## 30 秒上手
|
|
14
19
|
|
|
15
20
|
**把下面整段贴给 agent 即可完成安装**:
|
package/lib/core/dsh-cli.js
CHANGED
|
@@ -287,6 +287,46 @@ export function rewritePnpmError(err) {
|
|
|
287
287
|
}
|
|
288
288
|
return err instanceof Error ? err : new Error(text);
|
|
289
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* 失败摘要:命令失败时从完整输出里提取可诊断的行,而不是盲取末尾。
|
|
292
|
+
* 2026-09-05 实证(dsh-better-sidebar 安装失败):pnpm ndjson 错误行 ~1.2KB,
|
|
293
|
+
* 错误码/信息/hint 在行首,尾截 800 只剩纯栈帧——`ERR_PNPM_IGNORED_BUILDS`
|
|
294
|
+
* 与 `node-pty` 关键字全部丢失,isPrepareBlocked 匹配不到,
|
|
295
|
+
* dangerouslyAllowAllBuilds 自愈重试从未触发,用户只看到一屏栈。
|
|
296
|
+
* 优先级:ndjson 错误行(code — message — hint)→ 含 ERR_ 码的行 + 尾部 → 纯尾部。
|
|
297
|
+
*/
|
|
298
|
+
export function errorDigest(out, maxChars = 800) {
|
|
299
|
+
const text = out.trim();
|
|
300
|
+
if (text === '')
|
|
301
|
+
return '';
|
|
302
|
+
if (text.length <= maxChars)
|
|
303
|
+
return text;
|
|
304
|
+
const lines = text.split('\n');
|
|
305
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
306
|
+
const line = lines[i].trim();
|
|
307
|
+
if (!line.startsWith('{') || !line.includes('"level":"error"'))
|
|
308
|
+
continue;
|
|
309
|
+
try {
|
|
310
|
+
const doc = JSON.parse(line);
|
|
311
|
+
const code = typeof doc.code === 'string' && doc.code !== '' ? doc.code
|
|
312
|
+
: typeof doc.err?.code === 'string' ? doc.err.code : null;
|
|
313
|
+
const message = typeof doc.err?.message === 'string' ? doc.err.message : null;
|
|
314
|
+
const hint = typeof doc.hint === 'string' ? doc.hint : null;
|
|
315
|
+
const parts = [code, message, hint].filter((p) => p !== null && p !== '');
|
|
316
|
+
if (parts.length > 0)
|
|
317
|
+
return parts.join(' — ');
|
|
318
|
+
}
|
|
319
|
+
catch {
|
|
320
|
+
/* 非 JSON 行,继续向前找 */
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
const errCodeLines = lines.filter((l) => /ERR_[A-Z0-9_]+/.test(l)).slice(-5);
|
|
324
|
+
if (errCodeLines.length > 0) {
|
|
325
|
+
const digest = [...errCodeLines, text.slice(-maxChars)].join('\n').slice(-maxChars * 2);
|
|
326
|
+
return digest;
|
|
327
|
+
}
|
|
328
|
+
return text.slice(-maxChars);
|
|
329
|
+
}
|
|
290
330
|
export async function runCommand(command, args, options) {
|
|
291
331
|
return new Promise((resolvePromise, reject) => {
|
|
292
332
|
const child = spawn(command, args, {
|
|
@@ -350,7 +390,7 @@ export async function runCommand(command, args, options) {
|
|
|
350
390
|
if (code === 0)
|
|
351
391
|
finish();
|
|
352
392
|
else
|
|
353
|
-
finish(new Error(`命令失败 (exit ${code}): ${out
|
|
393
|
+
finish(new Error(`命令失败 (exit ${code}): ${errorDigest(out) || 'no output'}`));
|
|
354
394
|
});
|
|
355
395
|
});
|
|
356
396
|
}
|
package/package.json
CHANGED
package/registry.json
CHANGED
|
@@ -45,6 +45,17 @@
|
|
|
45
45
|
"github": "iasiv5/dsh-skip-browser-auth",
|
|
46
46
|
"homepage": "https://github.com/iasiv5/dsh-skip-browser-auth"
|
|
47
47
|
},
|
|
48
|
+
{
|
|
49
|
+
"id": "dsh-better-sidebar",
|
|
50
|
+
"name": "DSH Better Sidebar",
|
|
51
|
+
"description": "开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面。",
|
|
52
|
+
"category": "ui",
|
|
53
|
+
"tags": ["侧边栏", "文件编辑", "终端", "Git"],
|
|
54
|
+
"source": "npm",
|
|
55
|
+
"npm": "dsh-better-sidebar",
|
|
56
|
+
"github": "omdsh-dev/DSH-better-sidebar",
|
|
57
|
+
"homepage": "https://github.com/omdsh-dev/DSH-better-sidebar"
|
|
58
|
+
},
|
|
48
59
|
{
|
|
49
60
|
"id": "modsearch",
|
|
50
61
|
"name": "ModSearch",
|