Skip to content
Discussion options

You must be logged in to vote

我对你的判读做了源级复核(基于本仓库 master 5dda764 / dsh 0.1.5-alpha.1),结论:你的"seam 绕过"判定成立,但"修复方式 = ctx.fs.mkdir"在 current API 上不成立 —— fs seam(FileSystem Service)当前没有 mkdir/ensureDir 原语。这是个值得先厘清的前提分叉,否则修复方向会落空。

你正确的地方

packages/api/session-controller/src/agent.ts:3 确实是 import { mkdir } from 'node:fs/promises':474 直接 await mkdir(cwd, { recursive: true })。同包 media-references.ts:74 已走 serveFile(request, ctx.fs, maxBytes),证明 controller 自己的 media 路径从不直接摸 node:fs —— agent-creation 是孤点。这条 seam 绕过在本地 fs 部署下无害,但一旦挂远程/虚拟 fs provider,就会在引擎主机长出镜像目录树(破坏"engine host 不产生用户目录"不变量),或在虚拟 cwd 无法解析为主机绝对路径时直接 failed to ensure project directory —— 判断准确。

需要修正的地方:ctx.fs 没有 mkdir 原语

你的修复建议写的是:

await ctx.fs.mkdir(cwd, { recursive: t…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@xmRobinYu
Comment options

Answer selected by xmRobinYu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@argszero
Comment options

Comment options

You must be logged in to vote
1 reply
@xmRobinYu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants