Repository navigation
Replies: 2 comments
|
先确认你的观察是对的,但结论要翻过来:这不是回归,是有意移除 —— 而且官方给了迁移指引和一个专门的回归测试。 1. 你看到的代码状态属实(版本也没过期)
ctx.systemPrompt.variable('provider', …)
ctx.systemPrompt.variable('model', …)我复核了 2.
|
| 版本 | 三注册(含 cwd)? |
|---|---|
dsh-v0.2.0-rc.2(2026-09-29) |
有 |
dsh-v0.2.1-alpha.1(2026-10-03) |
有 |
dsh-v0.2.1-alpha.2(2026-10-09) |
无 |
⇒ 你说"0.2.0-rc.2 有、alpha.2 没有"是对的,但真正的分界线是 alpha.1 → alpha.2,不是 rc.2 → alpha.2。把这条改准,时间线部分就完全站得住了。
7. 你该怎么办
不要请求恢复注册。可做的是二选一:
- 迁移:从 home / profile / 单次调用的
personaSuffix与 presetsuffix字段里删掉Your working directory is {{cwd}}.(后缀没别的内容就留空)。需要目录文本时,依赖working-directory的用户上下文,或用working_directory({ cd? })工具读写 —— 二者都已随基础 bundle 挂载(packages/bundle/base/cordis.patch.yml里的working-directory与tool-working-directory两行)。 - 提改进:如果你认为这个失败应当更可见(比如在 preset 加载期就报,而不是每轮组装期),那是新诉求,可以提 —— 但要说清它不改变"不再注册
cwd"这个决定。
|
Confirming this regression is still present on the published 0.2.1-rc.2 Windows desktop build (FileVersion Environment: Windows 11 x64, Node 24.21.0 bundled with the desktop runtime, profile
Source-level confirmation in the installed runtime: Workaround that worked: remove Suggestion beyond restoring the registration: validate prompt-variable names at profile composition time (when preset strings are loaded) and fail with the variable name, the section, and the registered list. Right now the preset looks valid and the error only appears on turn start, after the session has been created; that is the expensive part to diagnose. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
In
0.2.1-alpha.2the agent loop registers onlyproviderandmodelas prompt variables. Thecwdregistration that exists in0.2.0-rc.2— and in the publisheddsh-agent-loop@0.1.7-rc.2tarball — is absent. Because the shipped bundles and presets placeYour working directory is {{cwd}}.in the persona suffix, this is not limited to custom configurations: every preset that interpolates{{cwd}}fails 100% of turns on this version, before any model request is made.Reproduction
0.2.1-alpha.2(source checkout or published package).deployment:persona-prefixor-suffix) contains{{cwd}}, including the shipped wordingYour working directory is {{cwd}}.Source-level confirmation on
dsh-v0.2.1-alpha.2(merge commitd743267388, 2026-10-09):The same file in
0.2.0-rc.2has three registrations:A repo-wide search shows no replacement registration:
grep -rn "systemPrompt.variable" packagesreturns only these two production sites plus tests.Current behavior
Every turn fails during prompt assembly, before the request is built:
The published
registered variableslist is exactly the two-line registry above, which is what makes the missing third entry visible from the error text alone.Expected behavior
Restore the registration.
cwdis a documented prompt variable and the shipped presets depend on it:packages/core/system-prompt/README.md: "the loop suppliesmodelandcwd", with the examplectx.systemPrompt.variable('cwd', ({ agent }) => agent?.session.header.cwd).agents/notes/implemented/architecture/2026-07-05-prompt-variables-and-tool-guidance-ownership.md: the loop registersmodelandcwdas pure projections of the context agent.agents/notes/implemented/bug-fix/2026-09-06-environment-prompt-suffix.md: the shipped Web/headless/SDK/ACP bundles and the standard/PTC/Cordis presets placeYour working directory is {{cwd}}.indeployment:persona-suffixNothing in the source suggests the removal was intentional. The two remaining registrations stand alone with no comment, no conditional, and no replacement registration elsewhere, and the same constructor still reads
cwdfrom its own config one block later:If the removal was in fact deliberate, then it needs to be recorded as a breaking change with a migration path — the
working_directorytool and session-working-directory SDK APIs introduced in this same release — because the current documentation and the shipped presets still treat{{cwd}}as available.Environment
@deepseek-ai/dsh0.2.1-alpha.2 — source checkoutdsh-v0.2.1-alpha.2, merge commitd743267388(2026-10-09, PR feat(session-title): support throttling all-prompts title revisions (e.g. every N prompts / idle debounce) #5946);apps/cli/package.jsonandpackages/core/agent-loop/package.jsonboth report0.2.1-alpha.2pnpm dsh web(source launcher); reproduced with the source checkout0.2.0-rc.2source (three registrations) and the published@deepseek-ai/dsh-agent-loop@0.1.7-rc.2(lib/index.js:1549-1551, three registrations)unknown prompt variablereport listsprovider, model, cwd(for example Bug: unknown prompt variable "{{hexagon}}" in section "tools:sdk" under code-mode presets with drawio MCP #3454, PTC 呈现下,工具描述中的字面量 {{...}} 被当作提示词变量,导致每轮请求组装失败 #6537, and the handbook troubleshooting page). The only neighbouring persona-section report, 复用会话 resume 时 persona prefix 的 {{model}}/{{cwd}} 无值(dsh web 重启后必现) #7730, is the opposite branch —prompt variable "{{cwd}}" has no value for this assembly(registered but valueless), not "unknown" / unregistered.All reactions