diff --git a/packages/connector/upstream-skills/README.i18n.yaml b/packages/connector/upstream-skills/README.i18n.yaml index f8531490cc..6821d0e50c 100644 --- a/packages/connector/upstream-skills/README.i18n.yaml +++ b/packages/connector/upstream-skills/README.i18n.yaml @@ -45,8 +45,8 @@ en: 2a09699bc1130758 zh: 972fc624936c8c2f /deepseek-ai-dsh-upstream-skills/known-limitations-and-deferred-work: - en: 06445918386e4553 - zh: e1f712e2983bb015 + en: 31293ef35d3c40da + zh: db7b8e190085008e /deepseek-ai-dsh-upstream-skills/known-limitations-and-deferred-work/dev-note: en: e67f633dc6fe7773 zh: e88aeb617ffb74ea diff --git a/packages/connector/upstream-skills/README.md b/packages/connector/upstream-skills/README.md index 6335738339..7bdaccdaeb 100644 --- a/packages/connector/upstream-skills/README.md +++ b/packages/connector/upstream-skills/README.md @@ -146,6 +146,7 @@ A load that finds the files in place lists the entry in the session's first cata - Published directories stay in `$DSH_HOME/cache/` after a plugin pins another commit and after the plugin is removed; nothing prunes them. A process that exits while it writes a download leaves its `.skills--` staging directory there too. - Only the published directory's existence is checked. When files inside it are deleted or changed, the entry skill stays listed over them; deleting the directory makes the next check or load download the pin again. - File modes are not kept, so an upstream script is not executable; the current upstream guides run their scripts through `python3`. +- In the experimental Web preview, which runs Host plugins in a browser worker, the Service loads but node-tar does not, so every download fails there. ### Dev Note diff --git a/packages/connector/upstream-skills/README.zh.md b/packages/connector/upstream-skills/README.zh.md index 0ee846017c..3fbad286db 100644 --- a/packages/connector/upstream-skills/README.zh.md +++ b/packages/connector/upstream-skills/README.zh.md @@ -146,6 +146,7 @@ Service 按顺序从每个 `skillsUrls` 前缀下载 `<前缀>//` 中,没有任何清理。进程在写入下载内容时退出,也会在那里留下它的暂存目录 `.skills-<摘要>-`。 - 只检查已发布的目录是否存在。目录里的文件被删除或改动后,入口技能仍会基于这些文件列出;删除该目录后,下一次检查或加载会重新下载固定的提交。 - 不保留文件权限,上游脚本不可直接执行;目前的上游子指南都通过 `python3` 运行脚本。 +- 实验性 Web 预览把 Host 插件运行在浏览器 worker 中:服务可以加载,但 node-tar 无法加载,因此那里的每次下载都会失败。 ### 开发备注 diff --git a/packages/connector/upstream-skills/src/archive.ts b/packages/connector/upstream-skills/src/archive.ts index 9364f9c7b2..b67ad7fbb9 100644 --- a/packages/connector/upstream-skills/src/archive.ts +++ b/packages/connector/upstream-skills/src/archive.ts @@ -6,7 +6,6 @@ import { dirname, join } from 'node:path' import { Readable } from 'node:stream' import { pipeline } from 'node:stream/promises' import type { ReadableStream } from 'node:stream/web' -import { t as list } from 'tar' import type { UpstreamSkillSelection, UpstreamSkillSet } from './types.ts' /** Entry types read as regular files. */ @@ -38,6 +37,8 @@ export async function readArchive(archive: Readable, selection: UpstreamSkillSel failure ??= error archive.destroy(failure) } + // Loaded at the first download: the experimental Web preview's browser worker cannot evaluate node-tar, and the Service loads there. + const { t: list } = await import('tar') const parser = list({ strict: true, onReadEntry: (entry) => {