dsh-plugin-t-expert 0.4.36 → 0.4.38
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 +34 -0
- package/lib/client.js +1 -1
- package/lib/fetch-assets.js +14 -1
- package/lib/index.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,40 @@
|
|
|
16
16
|
> 发布时**不要再跑 `npm version`**(那会把已提交好的版本又升一级,发出去的号与 CHANGELOG、tag 就对不上),
|
|
17
17
|
> 只补一个 annotated tag(`git tag -a`,因为 `git push --follow-tags` 只推带注释的 tag)。
|
|
18
18
|
|
|
19
|
+
## [0.4.38] — 未发布
|
|
20
|
+
|
|
21
|
+
**带 CLI 的专家:补上「脚本不在 PATH 里」那段说明** —— 实测 `bin/` 脚本时踩到的真实缺口。
|
|
22
|
+
|
|
23
|
+
### 修复
|
|
24
|
+
|
|
25
|
+
- 专家包 `bin/` 下的 CLI(cpq、tcloud-price、reason、oagent…)**不在 PATH 里**:
|
|
26
|
+
WorkBuddy 的宿主会把专家包的 `bin/` 挂进 PATH,**DSH 不会**。而人格正文写的是裸命令名
|
|
27
|
+
(「用 `cpq` 命令」「`use_skill inquiry-price`」),模型照做就是 `command not found`。
|
|
28
|
+
2026-09-29 实测:`cpq` 的 `bin/health-check` 报「❌ cpq: 未找到(请检查 bin/ 目录)」,
|
|
29
|
+
五个 CLI 全部报「未找到」。
|
|
30
|
+
现在 `annotatePersona` 在该专家有 `bin/` 时补一段说明:点明 CLI 在哪个目录、要用**绝对路径**调用,
|
|
31
|
+
或先 `export PATH="<包目录>/bin:$PATH"`。23 个带 `bin/`/`scripts/` 的专家都因此受益。
|
|
32
|
+
- 那段路径仍是**运行时按机器拼**的(取自 `expert.packDir`),不随包发布 ——
|
|
33
|
+
每个用户看到的是自己机器上的目录,包内一个绝对路径都没有。
|
|
34
|
+
|
|
35
|
+
### 自检
|
|
36
|
+
|
|
37
|
+
- 新增 2 条断言:「带 bin/ 的专家会补上说明」「没有 bin/ 的不补(避免噪音)」。项数 523 → 525。
|
|
38
|
+
|
|
39
|
+
## [0.4.37] — 未发布
|
|
40
|
+
|
|
41
|
+
**跳过 0.4.36 这个号** —— 它在 npm 上卡在「tarball 已上传、发布未完成」的状态,同名再发报 409。
|
|
42
|
+
|
|
43
|
+
**内容与 0.4.36 完全相同**,只是版本号 +1(没有代码改动)。
|
|
44
|
+
|
|
45
|
+
### 说明
|
|
46
|
+
|
|
47
|
+
- `npm publish 0.4.36` 报 `E409 Cannot publish over previously staged version`:
|
|
48
|
+
npm 的发布分两阶段(先传 tarball、再写 dist-tag),0.4.36 的 tarball 传上去了、
|
|
49
|
+
但发布没走完,于是这个号被占住。`dist-tags.latest` 仍是 0.4.26,说明它**没有真正发布**。
|
|
50
|
+
- 本机 npm 是 **10.9.4**,没有 `stage` 子命令(那是 npm 11+ 的),所以那个占位清不掉 ——
|
|
51
|
+
直接换号最省事。
|
|
52
|
+
|
|
19
53
|
## [0.4.36] — 未发布
|
|
20
54
|
|
|
21
55
|
**修掉两个挡住 `npm publish` 的问题** —— 附件上云之后第一次真正走发布流程才暴露出来。
|
package/lib/client.js
CHANGED
|
@@ -67,7 +67,7 @@ var SectionBoundary = class extends import_react.default.Component {
|
|
|
67
67
|
|
|
68
68
|
// src/client/state.js
|
|
69
69
|
var NS = "t-team";
|
|
70
|
-
var CLIENT_BUILD_VERSION = "0.4.
|
|
70
|
+
var CLIENT_BUILD_VERSION = "0.4.38";
|
|
71
71
|
var PLUGIN_ID = "dsh-plugin-t-expert";
|
|
72
72
|
var DIVISION_FALLBACK = "specialized";
|
|
73
73
|
var NEW_DIVISION = "__new";
|
package/lib/fetch-assets.js
CHANGED
|
@@ -213,9 +213,10 @@ export const ASSET_DIRS = [
|
|
|
213
213
|
* @param {string} options.packDir - 专家包目录(绝对路径)。
|
|
214
214
|
* @param {string} options.slug - 专家 slug(写进说明里的工具调用示例)。
|
|
215
215
|
* @param {boolean} [options.remote] - 该专家的附件是否走云端(决定要不要提「尚未下载」)。
|
|
216
|
+
* @param {boolean} [options.hasBin] - 包内是否有 `bin/`(决定要不要补「CLI 不在 PATH 里」那段)。
|
|
216
217
|
* @returns {string} 改写后的正文。
|
|
217
218
|
*/
|
|
218
|
-
export function annotatePersona({ text, packDir, slug, remote = false }) {
|
|
219
|
+
export function annotatePersona({ text, packDir, slug, remote = false, hasBin = false }) {
|
|
219
220
|
const root = packDir.endsWith("/") ? packDir : `${packDir}/`;
|
|
220
221
|
// 负向后顾是关键:`~/.workbuddy/skills-marketplace/skills/xxx/SKILL.md` 里第二个 `skills/`
|
|
221
222
|
// 前面是 `/`,那是别人的路径、不该动(2026-09-29 实测误改过一次)。
|
|
@@ -227,6 +228,18 @@ export function annotatePersona({ text, packDir, slug, remote = false }) {
|
|
|
227
228
|
`> **资源目录**:\`${root}\``,
|
|
228
229
|
"> 正文里出现的 `skills/`、`references/` 等相对路径都相对于该目录;请用上面的绝对路径读取。",
|
|
229
230
|
];
|
|
231
|
+
// 带 CLI 的专家(包内有 bin/):命令名本身**不在 PATH 里**,得用绝对路径调。
|
|
232
|
+
// WorkBuddy 的宿主会把专家包的 bin/ 挂进 PATH,DSH 不会 —— 而正文里写的是裸命令名
|
|
233
|
+
// (「用 `cpq` 命令」「`use_skill inquiry-price`」),照做就是 command not found。
|
|
234
|
+
// 2026-09-29 实测:cpq 的 bin/health-check 报「❌ cpq: 未找到(请检查 bin/ 目录)」。
|
|
235
|
+
if (hasBin === true) {
|
|
236
|
+
const binDir = `${root}bin/`;
|
|
237
|
+
lines.push(
|
|
238
|
+
`> **可执行脚本**:本专家的 CLI 在 \`${binDir}\`(注意它**不在** PATH 里)。` +
|
|
239
|
+
`调用时用绝对路径,例如 \`${binDir}<脚本名> --help\`;` +
|
|
240
|
+
`要先按正文里的裸命令名调用,可先执行 \`export PATH="${root}bin:$PATH"\`。`,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
230
243
|
if (remote === true) {
|
|
231
244
|
lines.push(`> 若某个文件不存在,说明配套资源尚未下载到本机 —— 先调用 \`fetch_expert_assets("${slug}")\` 拉取,再读。`);
|
|
232
245
|
}
|
package/lib/index.js
CHANGED
|
@@ -733,6 +733,9 @@ export function apply(ctx, config) {
|
|
|
733
733
|
packDir: expert.packDir,
|
|
734
734
|
slug: expert.slug,
|
|
735
735
|
remote: info !== undefined,
|
|
736
|
+
// 有 bin/ 的专家,CLI 得用绝对路径调(DSH 不像 WorkBuddy 那样把包内 bin/ 挂进 PATH):
|
|
737
|
+
// 清单里登记了 bin 就写这段说明(附件还没下载时同样有用),目录已在本地也算数。
|
|
738
|
+
hasBin: (info?.dirs ?? []).includes("bin") || existsSync(join(expert.packDir, "bin")),
|
|
736
739
|
});
|
|
737
740
|
}
|
|
738
741
|
|
package/package.json
CHANGED