执行报错Cannot read properties of undefined (reading 'prepare') #7194
Unanswered
luoyeqiufeng
asked this question in
Q&A
Replies: 4 comments 3 replies
|
我更新也是这样的 |
0 replies
|
apps/cli/src/profile-boot.ts:262 |
2 replies
|
pnpm-workspace.yaml文件加了 'zod': '4.6.5',应该是版本有冲突,需要确认。重新清了,重新安装 overrides: |
0 replies
|
看到你在查询时间、调用 pwsh 时遇到 prepare 错误,也有其他用户报告更新后同样失败。为了确认具体启动路径,麻烦补充出错时的 DSH 版本或提交号,以及实际启动命令。你提到清理重装并锁定 zod 版本,这之后在新会话里调用工具是否已经恢复?这些信息能帮助区分仍在发生的工具调度问题和本地改动后的状态。 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
上下文注入
@deepseek-ai/dsh-system-prompt
上下文注入
skill-catalog
思考
User asks current time. Run pwsh Get-Date.
已停止
Pwsh
Show current date and time
本轮运行失败Cannot read properties of undefined (reading 'prepare')
层级
助手消息
状态
失败
{
command:"Get-Date -Format "yyyy-MM-dd HH:mm:ss dddd (zzz)"",
description:"Show current date and time"
}
Interrupted: interrupted
pwsh
Execute a PowerShell command (
pwsh -Command) and return its stdout/stderr. Each call runs in a fresh pwsh process: no state (cwd, variables, functions) persists between calls — passworkdirinstead of usingcd. Paths use native Windows form (C:\...); read environment variables with$env:NAME. Non-zero exits are reported as[exit code: N]. Current harness environment facts are exposed through managed$env:DSH_*variables; inspect them when needed. Commands may run under a file sandbox; a blocked file operation is reported as[sandbox: file access denied under <mode> mode]— a policy denial, not a bug in the command; do not retry another way. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. On Windows a force-killed command settles as[exit code: 1]without a signal marker — treat it as an interruption, not a command failure. Setrun_in_background: truefor long-running commands: the call returns a job id immediately; read its output withjob_outputand stop it withjob_kill. Under the Windows sandbox, read-only pwsh runs in PowerShell ConstrainedLanguage mode, while workspace-write stays in FullLanguage unless host policy says otherwise. In read-only, prefer cmdlets and core types ([string],[datetime],[regex],[guid]); .NET static calls ([System.IO.*]::,[math]::),Add-Type, COM objects, and reflection fail with "only core types" errors.-fformatting, property access, and core cmdlets work. In both confined modes, programs cannot open named pipes, so a command that captures another program's output through piped stdio (Node.jschild_process.spawn/execwith the defaultstdio: 'pipe') fails with EPERM, whilestdio: 'inherit'andstdio: 'ignore'spawns work and PowerShell's own pipelines are unaffected. That EPERM is the documented boundary: do not retry the command another way — escalate the exact command once or restructure it to avoid capturing output. Attempting a command the sandbox may deny is safe and expected: run it and read the marker rather than assuming the denial. When a command is denied and a wider mode would let it succeed, escalate immediately in the same turn — the one sanctioned exception to a denial: retry the exact same command once withsandbox_permissions(the narrowest wider mode that suffices) plus a one-sentencejustification. Do not detour through chat to ask permission first — the approval prompt raised by that retry is how the user consents. If the session states approval prompts are disabled, there is no exception: a denial is final — do not setsandbox_permissions. Never escalate speculatively: ground the request in a real denial — normally the one this command just hit; escalating up front is fine only when this session already denied the same access. A rejected escalation is final for that command — stop and explain, never work around it — but it does not forbid attempting or escalating other commands later.{
type:"object",
properties:{command: {type: "string", description: "The PowerShell command to execute."}, description: {type: "string", description: "Clear, concise description of what this command does in active voice, 5-10 words (shown in the UI). Examples: "ls" → "List files in current directory"; "git status" → "Show working tree status"; "Get-Process" → "List running processes"."}, timeoutMs: {type: "number", description: "Timeout in milliseconds. The executor applies its configured default and cap, and kills the command on expiry."}, workdir: {type: "string", description: "Working directory for this command. Defaults to the session workspace; a relative path is resolved against it."}, …},
required:["command", "description"]
All reactions