@askdkc/dsh-cli 0.13.2 → 0.13.4

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.
Files changed (37) hide show
  1. package/README.md +2 -2
  2. package/bin/dsh-tui.js +2 -2
  3. package/lib/types/components/LogoV2.d.ts +1 -5
  4. package/lib/types/components/LogoV2.d.ts.map +1 -1
  5. package/lib/types/components/LogoV2.js +3 -12
  6. package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
  7. package/lib/types/dsh-adapter/bundled-presets.js +9 -0
  8. package/lib/types/dsh-adapter/contract.d.ts +6 -55
  9. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  10. package/lib/types/dsh-adapter/contract.js +15 -129
  11. package/lib/types/dsh-adapter/index.d.ts +3 -3
  12. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  13. package/lib/types/dsh-adapter/index.js +6 -12
  14. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  15. package/lib/types/dsh-adapter/plugin.js +3 -1
  16. package/lib/types/dsh-adapter/recap.d.ts.map +1 -1
  17. package/lib/types/dsh-adapter/recap.js +5 -1
  18. package/lib/types/dsh-adapter/response-language.d.ts +6 -0
  19. package/lib/types/dsh-adapter/response-language.d.ts.map +1 -0
  20. package/lib/types/dsh-adapter/response-language.js +11 -0
  21. package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
  22. package/lib/types/dsh-adapter/sideQuestion.js +3 -0
  23. package/lib/types/i18n.d.ts +5 -22
  24. package/lib/types/i18n.d.ts.map +1 -1
  25. package/lib/types/i18n.js +6 -25
  26. package/lib/types/update.d.ts +2 -2
  27. package/lib/types/update.js +2 -2
  28. package/node_modules/@askdkc/dsh-auth/package.json +29 -11
  29. package/node_modules/dsh-working-activity/lib/types/index.js +4 -6
  30. package/node_modules/dsh-working-activity/lib/types/lang.d.ts +10 -8
  31. package/node_modules/dsh-working-activity/lib/types/lang.js +11 -12
  32. package/node_modules/dsh-working-activity/package.json +27 -9
  33. package/node_modules/dsh-working-activity/src/index.ts +4 -6
  34. package/node_modules/dsh-working-activity/src/lang.ts +12 -13
  35. package/package.json +108 -95
  36. package/presets/liangshen/agent.cordis.yml +2 -1
  37. package/presets/response-language.txt +5 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dsh-tui localization — UI strings for Chinese (`zh`, the default) and
2
+ * dsh-tui localization — UI strings for Chinese (`zh`) and
3
3
  * English (`en`).
4
4
  *
5
5
  * Resolution order mirrors the `/theme` mechanism (see themePrefs.ts):
@@ -8,7 +8,7 @@
8
8
  * 2. `lang` cordis.yml config key (see Config in index.ts)
9
9
  * 3. the persisted `/lang` choice in `~/.dsh-tui/lang.json`
10
10
  * 4. the OS locale guess (`LC_ALL` / `LC_MESSAGES` / `LANG`)
11
- * 5. `zh` (the original hard-coded language)
11
+ * 5. `en` (the fallback language)
12
12
  *
13
13
  * `/lang` switches at runtime and hot-swaps the whole UI. The dictionary is
14
14
  * a flat key → per-language text map; `t(key, params)` substitutes
@@ -2164,22 +2164,6 @@ declare const dict: {
2164
2164
  readonly zh: "更多技巧";
2165
2165
  readonly en: "more tips";
2166
2166
  };
2167
- readonly 'logo-drift-newer': {
2168
- readonly zh: "dsh 引擎为 {{installed}},比本界面验证过的 {{validated}} 新,可能出现兼容问题;求稳可执行 npm i -g @deepseek-ai/dsh@{{primary}} 降级,或等待 dsh-tui 适配新版。";
2169
- readonly en: "The dsh engine ({{installed}}) is newer than the {{validated}} this UI is validated against, so issues are possible; downgrade via npm i -g @deepseek-ai/dsh@{{primary}} for stability, or wait for a dsh-tui update.";
2170
- };
2171
- readonly 'logo-drift-older': {
2172
- readonly zh: "dsh 引擎为 {{installed}},低于本界面验证过的 {{validated}},部分功能可能不可用;建议执行 npm i -g @deepseek-ai/dsh@{{primary}} 升级。";
2173
- readonly en: "The dsh engine ({{installed}}) is older than the {{validated}} this UI is validated against; some features may be missing. Upgrade via npm i -g @deepseek-ai/dsh@{{primary}}.";
2174
- };
2175
- readonly 'logo-drift-mixed': {
2176
- readonly zh: "检测到 dsh 引擎多版本混装({{installed}}),容易出现奇怪问题;建议执行 npm i -g @deepseek-ai/dsh@{{primary}} 统一版本。";
2177
- readonly en: "Mixed dsh engine versions detected ({{installed}}), which can cause odd behavior; unify them via npm i -g @deepseek-ai/dsh@{{primary}}.";
2178
- };
2179
- readonly 'logo-drift-broken': {
2180
- readonly zh: "dsh 引擎版本异常({{installed}}),本界面验证过 {{validated}};建议执行 npm i -g @deepseek-ai/dsh@{{primary}} 重装。";
2181
- readonly en: "Unexpected dsh engine versions ({{installed}}); this UI is validated against {{validated}}. Reinstall via npm i -g @deepseek-ai/dsh@{{primary}}.";
2182
- };
2183
2167
  readonly 'input-sent-after-turn': {
2184
2168
  readonly zh: "已发送,当前回合结束后处理";
2185
2169
  readonly en: "Sent, processed after the current turn";
@@ -4434,16 +4418,15 @@ export declare function writeLangPref(lang: Lang, dir?: string): boolean;
4434
4418
  * user must not get a Chinese UI. The POSIX/C locale means "no locale
4435
4419
  * selected" and conventionally maps to English — importantly it is what
4436
4420
  * CI runners (LANG=C.UTF-8) report, so tests asserting English UI copy
4437
- * stay deterministic. Only an ABSENT locale (typical on Windows, where
4438
- * these POSIX vars don't exist and imply nothing about the user) keeps
4439
- * the zh default.
4421
+ * stay deterministic. An absent locale (typical on Windows) also uses
4422
+ * the English fallback.
4440
4423
  */
4441
4424
  export declare function detectLocaleLang(): Lang;
4442
4425
  /**
4443
4426
  * Resolve the startup language: `DSH_TUI_LANG` when it holds a valid value
4444
4427
  * (pinned at process start — the repro/verify scripts rely on this for
4445
4428
  * deterministic UI copy), else the persisted `/lang` choice, else the OS
4446
- * locale guess, else `zh` (the original hard-coded language). The
4429
+ * locale guess, else `en` (the fallback language). The
4447
4430
  * cordis.yml `lang` precedence lives in plugin.apply.
4448
4431
  */
4449
4432
  export declare function resolveStartupLang(): Lang;
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","s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,GAAE,UAAe,GAAG,MAAM,CAGlF;AAED,qFAAqF;AACrF,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;CAKR,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEjD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAC1B,GAAG,EAAE,MAAM,OAAO,YAAY,EAC9B,MAAM,GAAE,UAAe,GACtB,MAAM,CAER;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpF;AAED,4EAA4E;AAC5E,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAQ,CAAA;AAI1G;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAS5D;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAkB,GAAG,IAAI,GAAG,SAAS,CAMtE;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAU1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAWvC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC"}
package/lib/types/i18n.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * dsh-tui localization — UI strings for Chinese (`zh`, the default) and
2
+ * dsh-tui localization — UI strings for Chinese (`zh`) and
3
3
  * English (`en`).
4
4
  *
5
5
  * Resolution order mirrors the `/theme` mechanism (see themePrefs.ts):
@@ -8,7 +8,7 @@
8
8
  * 2. `lang` cordis.yml config key (see Config in index.ts)
9
9
  * 3. the persisted `/lang` choice in `~/.dsh-tui/lang.json`
10
10
  * 4. the OS locale guess (`LC_ALL` / `LC_MESSAGES` / `LANG`)
11
- * 5. `zh` (the original hard-coded language)
11
+ * 5. `en` (the fallback language)
12
12
  *
13
13
  * `/lang` switches at runtime and hot-swaps the whole UI. The dictionary is
14
14
  * a flat key → per-language text map; `t(key, params)` substitutes
@@ -661,24 +661,6 @@ const dict = {
661
661
  'logo-tagline': { zh: '探索未至之境!', en: 'Explore the uncharted!' },
662
662
  'logo-tip-prefix': { zh: '提示:', en: 'Tip: ' },
663
663
  'logo-tip-more': { zh: '更多技巧', en: 'more tips' },
664
- // Upstream-drift notice (merged one-liner under the tip; copy explains
665
- // the problem AND the fix — the command pins the validated line).
666
- 'logo-drift-newer': {
667
- zh: 'dsh 引擎为 {{installed}},比本界面验证过的 {{validated}} 新,可能出现兼容问题;求稳可执行 npm i -g @deepseek-ai/dsh@{{primary}} 降级,或等待 dsh-tui 适配新版。',
668
- en: 'The dsh engine ({{installed}}) is newer than the {{validated}} this UI is validated against, so issues are possible; downgrade via npm i -g @deepseek-ai/dsh@{{primary}} for stability, or wait for a dsh-tui update.',
669
- },
670
- 'logo-drift-older': {
671
- zh: 'dsh 引擎为 {{installed}},低于本界面验证过的 {{validated}},部分功能可能不可用;建议执行 npm i -g @deepseek-ai/dsh@{{primary}} 升级。',
672
- en: 'The dsh engine ({{installed}}) is older than the {{validated}} this UI is validated against; some features may be missing. Upgrade via npm i -g @deepseek-ai/dsh@{{primary}}.',
673
- },
674
- 'logo-drift-mixed': {
675
- zh: '检测到 dsh 引擎多版本混装({{installed}}),容易出现奇怪问题;建议执行 npm i -g @deepseek-ai/dsh@{{primary}} 统一版本。',
676
- en: 'Mixed dsh engine versions detected ({{installed}}), which can cause odd behavior; unify them via npm i -g @deepseek-ai/dsh@{{primary}}.',
677
- },
678
- 'logo-drift-broken': {
679
- zh: 'dsh 引擎版本异常({{installed}}),本界面验证过 {{validated}};建议执行 npm i -g @deepseek-ai/dsh@{{primary}} 重装。',
680
- en: 'Unexpected dsh engine versions ({{installed}}); this UI is validated against {{validated}}. Reinstall via npm i -g @deepseek-ai/dsh@{{primary}}.',
681
- },
682
664
  // ── components/PromptInput.tsx ──────────────────────────────────────
683
665
  'input-sent-after-turn': { zh: '已发送,当前回合结束后处理', en: 'Sent, processed after the current turn' },
684
666
  'input-injected': { zh: '已从编辑器发送', en: 'Sent from editor' },
@@ -1474,9 +1456,8 @@ export function writeLangPref(lang, dir = PREFS_DIR) {
1474
1456
  * user must not get a Chinese UI. The POSIX/C locale means "no locale
1475
1457
  * selected" and conventionally maps to English — importantly it is what
1476
1458
  * CI runners (LANG=C.UTF-8) report, so tests asserting English UI copy
1477
- * stay deterministic. Only an ABSENT locale (typical on Windows, where
1478
- * these POSIX vars don't exist and imply nothing about the user) keeps
1479
- * the zh default.
1459
+ * stay deterministic. An absent locale (typical on Windows) also uses
1460
+ * the English fallback.
1480
1461
  */
1481
1462
  export function detectLocaleLang() {
1482
1463
  // `||` (not `??`): an EMPTY locale variable means "unset" and must fall
@@ -1487,14 +1468,14 @@ export function detectLocaleLang() {
1487
1468
  '';
1488
1469
  const locale = raw.split('.')[0]?.toLowerCase() ?? '';
1489
1470
  if (locale === '')
1490
- return 'zh';
1471
+ return 'en';
1491
1472
  return locale.startsWith('zh') ? 'zh' : 'en';
1492
1473
  }
1493
1474
  /**
1494
1475
  * Resolve the startup language: `DSH_TUI_LANG` when it holds a valid value
1495
1476
  * (pinned at process start — the repro/verify scripts rely on this for
1496
1477
  * deterministic UI copy), else the persisted `/lang` choice, else the OS
1497
- * locale guess, else `zh` (the original hard-coded language). The
1478
+ * locale guess, else `en` (the fallback language). The
1498
1479
  * cordis.yml `lang` precedence lives in plugin.apply.
1499
1480
  */
1500
1481
  export function resolveStartupLang() {
@@ -200,8 +200,8 @@ export interface ExtractedTreeCheck {
200
200
  * link; `../` members are also refused by tar/unzip themselves, but the
201
201
  * prefix check here keeps the guard local and future-proof against a
202
202
  * different extractor. The node-tar strict equivalent (preservePaths: false +
203
- * strict) is in standalone/entry.mjs — this covers the system-tool paths
204
- * entry.mjs cannot. Symlinks are rejected outright (defense in depth: a
203
+ * strict) is in standalone/entry.cjs — this covers the system-tool paths
204
+ * entry.cjs cannot. Symlinks are rejected outright (defense in depth: a
205
205
  * "harmless" in-tree link is still indistinguishable from a hostile one at
206
206
  * this layer), as are fifo/socket/device entries — and hard links (red-team
207
207
  * review): GNU tar refusing external linkname targets is extractor behavior,
@@ -442,8 +442,8 @@ function windowsTarAvailable() {
442
442
  * link; `../` members are also refused by tar/unzip themselves, but the
443
443
  * prefix check here keeps the guard local and future-proof against a
444
444
  * different extractor. The node-tar strict equivalent (preservePaths: false +
445
- * strict) is in standalone/entry.mjs — this covers the system-tool paths
446
- * entry.mjs cannot. Symlinks are rejected outright (defense in depth: a
445
+ * strict) is in standalone/entry.cjs — this covers the system-tool paths
446
+ * entry.cjs cannot. Symlinks are rejected outright (defense in depth: a
447
447
  * "harmless" in-tree link is still indistinguishable from a hostile one at
448
448
  * this layer), as are fifo/socket/device entries — and hard links (red-team
449
449
  * review): GNU tar refusing external linkname targets is extractor behavior,
@@ -50,11 +50,11 @@
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@deepseek-ai/cordis": "^4.0.1",
53
- "@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
54
- "@deepseek-ai/dsh-commands": "0.2.0-rc.2",
55
- "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
56
- "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
57
- "@deepseek-ai/dsh-user-questions": "0.2.0-rc.2",
53
+ "@deepseek-ai/dsh-attachment": "*",
54
+ "@deepseek-ai/dsh-commands": "*",
55
+ "@deepseek-ai/dsh-llm": "*",
56
+ "@deepseek-ai/dsh-llm-pi-ai": "*",
57
+ "@deepseek-ai/dsh-user-questions": "*",
58
58
  "@deepseek-ai/schemastery": "^3.18.1"
59
59
  },
60
60
  "peerDependenciesMeta": {
@@ -63,15 +63,30 @@
63
63
  },
64
64
  "@deepseek-ai/dsh-llm-pi-ai": {
65
65
  "optional": true
66
+ },
67
+ "@deepseek-ai/cordis": {
68
+ "optional": true
69
+ },
70
+ "@deepseek-ai/dsh-commands": {
71
+ "optional": true
72
+ },
73
+ "@deepseek-ai/dsh-llm": {
74
+ "optional": true
75
+ },
76
+ "@deepseek-ai/dsh-user-questions": {
77
+ "optional": true
78
+ },
79
+ "@deepseek-ai/schemastery": {
80
+ "optional": true
66
81
  }
67
82
  },
68
83
  "devDependencies": {
69
84
  "@deepseek-ai/cordis": "^4.0.1",
70
- "@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
71
- "@deepseek-ai/dsh-commands": "0.2.0-rc.2",
72
- "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
73
- "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
74
- "@deepseek-ai/dsh-user-questions": "0.2.0-rc.2",
85
+ "@deepseek-ai/dsh-attachment": "alpha",
86
+ "@deepseek-ai/dsh-commands": "alpha",
87
+ "@deepseek-ai/dsh-llm": "alpha",
88
+ "@deepseek-ai/dsh-llm-pi-ai": "alpha",
89
+ "@deepseek-ai/dsh-user-questions": "alpha",
75
90
  "@deepseek-ai/schemastery": "^3.18.1",
76
91
  "@types/node": "^22.0.0",
77
92
  "typescript": "^6.0.3",
@@ -82,6 +97,9 @@
82
97
  "@ai-sdk/provider": "4.0.21",
83
98
  "esbuild": "0.28.2",
84
99
  "zod": "4.1.8",
85
- "tsx": "4.23.13"
100
+ "tsx": "4.23.13",
101
+ "@deepseek-ai/dsh-launch-environment": "alpha",
102
+ "@deepseek-ai/dsh-authorization": "alpha",
103
+ "@deepseek-ai/dsh-credentials": "alpha"
86
104
  }
87
105
  }
@@ -22,7 +22,7 @@ import { ActivityTracker } from './status.js';
22
22
  import { feedStreamFrame } from './compat/assistant-stream.js';
23
23
  import { createActivityProjection, ACTIVITY_PROJECTION_KEY } from './projection.js';
24
24
  import { registerActivityEventType } from './registration.js';
25
- import { langNow, setLangOverride, t } from './lang.js';
25
+ import { NARRATE_INSTRUCTION, langNow, setLangOverride } from './lang.js';
26
26
  import { DEFAULT_PRESET } from './frames.js';
27
27
  import { featureOn } from './config.js';
28
28
  export const name = 'working-activity';
@@ -100,16 +100,14 @@ export function apply(ctx, config = {}) {
100
100
  const prompt = ctx.get('tuiPrompt', false);
101
101
  const promptHandle = prompt?.register('activity', undefined);
102
102
  // The `⏵` self-narration contract rides the stable system-prompt sections:
103
- // injected when the systemPrompt service is composed (agent assemblies
104
- // always mount it), removed with this fiber. The text is resolved at every
105
- // assembly in the live language, so a `/lang` switch applies to the next
106
- // turn without rebuilding the agent.
103
+ // injected when the systemPrompt service is composed and removed with this
104
+ // fiber. Model instructions stay in English independently of UI settings.
107
105
  if (resolved.narrate) {
108
106
  ctx.inject(['systemPrompt'], (promptCtx) => {
109
107
  promptCtx.systemPrompt.section({
110
108
  name: 'working-activity:narrate',
111
109
  order: 60,
112
- text: () => t('narrate-instruction'),
110
+ text: NARRATE_INSTRUCTION,
113
111
  });
114
112
  });
115
113
  }
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * The plugin follows the dsh-tui UI language without importing it: the same
5
5
  * chain dsh-tui resolves (`DSH_TUI_LANG` env → `~/.dsh-tui/lang.json` → OS
6
- * locale → zh) is read here directly, so a `/lang en|zh` switch (or the
7
- * /settings language pick) hot-swaps this plugin's narration and status-line
8
- * copy on the next render tick.
6
+ * locale → en) is read here directly, so a `/lang en|zh` switch (or the
7
+ * /settings language pick) hot-swaps rendered status-line copy. Model-facing
8
+ * narration instructions are locale-independent.
9
9
  *
10
10
  * Resolution order:
11
11
  * 1. `setLangOverride()` — a plugin-level `lang: zh|en` config key
@@ -15,7 +15,7 @@
15
15
  * so the per-tick status render never re-reads an unchanged file.
16
16
  * 4. OS locale guess (`LC_ALL` / `LC_MESSAGES` / `LANG`); POSIX/C means
17
17
  * "no locale selected" and maps to English.
18
- * 5. `zh` — the original hard-coded language.
18
+ * 5. `en` — the fallback for unsupported or absent locales.
19
19
  *
20
20
  * The dictionary is a flat key → per-language string map; `t(key, params)`
21
21
  * substitutes `{{name}}` placeholders. Missing keys render the key itself so
@@ -31,10 +31,12 @@ export declare function withProgressLang<T>(lang: Lang, render: () => T): T;
31
31
  export declare function terminalProgressLang(): Lang;
32
32
  /** Detect only confident language signals in user-authored prose. */
33
33
  export declare function detectInputLanguage(input: string): Lang | undefined;
34
+ /** Model instructions never inherit the interface or terminal language. */
35
+ export declare const NARRATE_INSTRUCTION = "[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: \u23F5 a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one \u23F5 line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: \u23F5 Fixing the login page styles, \u23F5 Investigating the error, \u23F5 Running validation for the patch. Update it when the task changes. Write the status description in the same response language chosen for the user request; use English when unclear.";
34
36
  declare const dict: {
35
37
  readonly 'narrate-instruction': {
36
- readonly zh: "[状态栏] 你有一个状态栏展示给用户。【必须】在每个步骤/子任务开始时(不只是调用工具前),在回复正文的最前面单独写一行:⏵ 你在做的具体事情(不超过20字),然后换行继续正常回复。整轮回复只写一行 ⏵,不要重复。信息为主——让人一眼知道你在干什么,风格自然、可以带点俏皮。例:⏵ 修复登录页样式、⏵ 查一下报错原因、⏵ 给补丁跑个验证。切换任务时必须更新。";
37
- readonly en: "[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes.";
38
+ readonly zh: "[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes. Write the status description in the same response language chosen for the user request; use English when unclear.";
39
+ readonly en: "[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes. Write the status description in the same response language chosen for the user request; use English when unclear.";
38
40
  };
39
41
  /** Plain (non-playful) phase labels. */
40
42
  readonly 'waiting-label': {
@@ -132,9 +134,9 @@ export declare function readLangFile(nowMs?: number): Lang | undefined;
132
134
  export declare function invalidateLangCache(): void;
133
135
  /**
134
136
  * Guess the language from the OS locale (`LC_ALL`, `LC_MESSAGES`, `LANG`),
135
- * defaulting to `zh`. POSIX/C means "no locale selected" and conventionally
137
+ * defaulting to `en`. POSIX/C means "no locale selected" and conventionally
136
138
  * maps to English (what CI runners report). An absent locale variable
137
- * (typical on Windows) defaults to `zh`.
139
+ * (typical on Windows) defaults to `en`.
138
140
  */
139
141
  export declare function detectLocaleLang(): Lang;
140
142
  export {};
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * The plugin follows the dsh-tui UI language without importing it: the same
5
5
  * chain dsh-tui resolves (`DSH_TUI_LANG` env → `~/.dsh-tui/lang.json` → OS
6
- * locale → zh) is read here directly, so a `/lang en|zh` switch (or the
7
- * /settings language pick) hot-swaps this plugin's narration and status-line
8
- * copy on the next render tick.
6
+ * locale → en) is read here directly, so a `/lang en|zh` switch (or the
7
+ * /settings language pick) hot-swaps rendered status-line copy. Model-facing
8
+ * narration instructions are locale-independent.
9
9
  *
10
10
  * Resolution order:
11
11
  * 1. `setLangOverride()` — a plugin-level `lang: zh|en` config key
@@ -15,7 +15,7 @@
15
15
  * so the per-tick status render never re-reads an unchanged file.
16
16
  * 4. OS locale guess (`LC_ALL` / `LC_MESSAGES` / `LANG`); POSIX/C means
17
17
  * "no locale selected" and maps to English.
18
- * 5. `zh` — the original hard-coded language.
18
+ * 5. `en` — the fallback for unsupported or absent locales.
19
19
  *
20
20
  * The dictionary is a flat key → per-language string map; `t(key, params)`
21
21
  * substitutes `{{name}}` placeholders. Missing keys render the key itself so
@@ -62,12 +62,11 @@ export function detectInputLanguage(input) {
62
62
  }
63
63
  /** The dsh-tui prefs file this plugin mirrors (shared language contract). */
64
64
  const LANG_FILE = join(homedir(), '.dsh-tui', 'lang.json');
65
+ /** Model instructions never inherit the interface or terminal language. */
66
+ export const NARRATE_INSTRUCTION = '[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes. Write the status description in the same response language chosen for the user request; use English when unclear.';
65
67
  const dict = {
66
- // ── ⏵ self-narration contract (system prompt, /lang aware) ──────────
67
- 'narrate-instruction': {
68
- zh: '[状态栏] 你有一个状态栏展示给用户。【必须】在每个步骤/子任务开始时(不只是调用工具前),在回复正文的最前面单独写一行:⏵ 你在做的具体事情(不超过20字),然后换行继续正常回复。整轮回复只写一行 ⏵,不要重复。信息为主——让人一眼知道你在干什么,风格自然、可以带点俏皮。例:⏵ 修复登录页样式、⏵ 查一下报错原因、⏵ 给补丁跑个验证。切换任务时必须更新。',
69
- en: '[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes.',
70
- },
68
+ // Retain the existing translation key without localizing model instructions.
69
+ 'narrate-instruction': { zh: NARRATE_INSTRUCTION, en: NARRATE_INSTRUCTION },
71
70
  // ── status-line structural copy ─────────────────────────────────────
72
71
  /** Plain (non-playful) phase labels. */
73
72
  'waiting-label': { zh: '等待模型响应', en: 'Waiting for model', ja: 'モデルの応答待ち' },
@@ -189,9 +188,9 @@ let cachedLang;
189
188
  let lastProbeAt = 0;
190
189
  /**
191
190
  * Guess the language from the OS locale (`LC_ALL`, `LC_MESSAGES`, `LANG`),
192
- * defaulting to `zh`. POSIX/C means "no locale selected" and conventionally
191
+ * defaulting to `en`. POSIX/C means "no locale selected" and conventionally
193
192
  * maps to English (what CI runners report). An absent locale variable
194
- * (typical on Windows) defaults to `zh`.
193
+ * (typical on Windows) defaults to `en`.
195
194
  */
196
195
  export function detectLocaleLang() {
197
196
  const raw = process.env.LC_ALL ||
@@ -205,5 +204,5 @@ export function detectLocaleLang() {
205
204
  return 'en';
206
205
  if (locale === 'c' || locale === 'posix')
207
206
  return 'en';
208
- return 'zh';
207
+ return 'en';
209
208
  }
@@ -73,15 +73,15 @@
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@deepseek-ai/cordis": "^4.0.1",
76
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.2 || ^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
77
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
78
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
79
- "@deepseek-ai/dsh-client-ui-session": "^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
80
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
81
- "@deepseek-ai/dsh-invariants": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.2 || ^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
82
- "@deepseek-ai/dsh-session": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.2 || ^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
83
- "@deepseek-ai/dsh-session-projection": "^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
84
- "@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-alpha.2 || ^0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2",
76
+ "@deepseek-ai/dsh-agent": "*",
77
+ "@deepseek-ai/dsh-client-ui-conversation": "*",
78
+ "@deepseek-ai/dsh-client-ui-renderer": "*",
79
+ "@deepseek-ai/dsh-client-ui-session": "*",
80
+ "@deepseek-ai/dsh-client-ui-slots": "*",
81
+ "@deepseek-ai/dsh-invariants": "*",
82
+ "@deepseek-ai/dsh-session": "*",
83
+ "@deepseek-ai/dsh-session-projection": "*",
84
+ "@deepseek-ai/dsh-system-prompt": "*",
85
85
  "@deepseek-ai/schemastery": "^3.18.1",
86
86
  "react": "^18.2.0"
87
87
  },
@@ -103,6 +103,24 @@
103
103
  },
104
104
  "react": {
105
105
  "optional": true
106
+ },
107
+ "@deepseek-ai/cordis": {
108
+ "optional": true
109
+ },
110
+ "@deepseek-ai/dsh-agent": {
111
+ "optional": true
112
+ },
113
+ "@deepseek-ai/dsh-invariants": {
114
+ "optional": true
115
+ },
116
+ "@deepseek-ai/dsh-session": {
117
+ "optional": true
118
+ },
119
+ "@deepseek-ai/dsh-system-prompt": {
120
+ "optional": true
121
+ },
122
+ "@deepseek-ai/schemastery": {
123
+ "optional": true
106
124
  }
107
125
  }
108
126
  }
@@ -30,7 +30,7 @@ import type { TrackerConfig } from './status.js'
30
30
  import { feedStreamFrame } from './compat/assistant-stream.js'
31
31
  import { createActivityProjection, ACTIVITY_PROJECTION_KEY } from './projection.js'
32
32
  import { registerActivityEventType } from './registration.js'
33
- import { langNow, setLangOverride, t } from './lang.js'
33
+ import { NARRATE_INSTRUCTION, langNow, setLangOverride, t } from './lang.js'
34
34
  import { DEFAULT_PRESET } from './frames.js'
35
35
  import { featureOn, type FeatureFlag } from './config.js'
36
36
  import type { ActivityState } from './status.js'
@@ -211,16 +211,14 @@ export function apply(ctx: Context, config: Config = {}): void {
211
211
  const promptHandle = prompt?.register('activity', undefined)
212
212
 
213
213
  // The `⏵` self-narration contract rides the stable system-prompt sections:
214
- // injected when the systemPrompt service is composed (agent assemblies
215
- // always mount it), removed with this fiber. The text is resolved at every
216
- // assembly in the live language, so a `/lang` switch applies to the next
217
- // turn without rebuilding the agent.
214
+ // injected when the systemPrompt service is composed and removed with this
215
+ // fiber. Model instructions stay in English independently of UI settings.
218
216
  if (resolved.narrate) {
219
217
  ctx.inject(['systemPrompt'], (promptCtx) => {
220
218
  promptCtx.systemPrompt.section({
221
219
  name: 'working-activity:narrate',
222
220
  order: 60,
223
- text: () => t('narrate-instruction'),
221
+ text: NARRATE_INSTRUCTION,
224
222
  })
225
223
  })
226
224
  }
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * The plugin follows the dsh-tui UI language without importing it: the same
5
5
  * chain dsh-tui resolves (`DSH_TUI_LANG` env → `~/.dsh-tui/lang.json` → OS
6
- * locale → zh) is read here directly, so a `/lang en|zh` switch (or the
7
- * /settings language pick) hot-swaps this plugin's narration and status-line
8
- * copy on the next render tick.
6
+ * locale → en) is read here directly, so a `/lang en|zh` switch (or the
7
+ * /settings language pick) hot-swaps rendered status-line copy. Model-facing
8
+ * narration instructions are locale-independent.
9
9
  *
10
10
  * Resolution order:
11
11
  * 1. `setLangOverride()` — a plugin-level `lang: zh|en` config key
@@ -15,7 +15,7 @@
15
15
  * so the per-tick status render never re-reads an unchanged file.
16
16
  * 4. OS locale guess (`LC_ALL` / `LC_MESSAGES` / `LANG`); POSIX/C means
17
17
  * "no locale selected" and maps to English.
18
- * 5. `zh` — the original hard-coded language.
18
+ * 5. `en` — the fallback for unsupported or absent locales.
19
19
  *
20
20
  * The dictionary is a flat key → per-language string map; `t(key, params)`
21
21
  * substitutes `{{name}}` placeholders. Missing keys render the key itself so
@@ -67,13 +67,12 @@ export function detectInputLanguage(input: string): Lang | undefined {
67
67
  /** The dsh-tui prefs file this plugin mirrors (shared language contract). */
68
68
  const LANG_FILE = join(homedir(), '.dsh-tui', 'lang.json')
69
69
 
70
- const dict = {
71
- // ── ⏵ self-narration contract (system prompt, /lang aware) ──────────
72
- 'narrate-instruction': {
73
- zh: '[状态栏] 你有一个状态栏展示给用户。【必须】在每个步骤/子任务开始时(不只是调用工具前),在回复正文的最前面单独写一行:⏵ 你在做的具体事情(不超过20字),然后换行继续正常回复。整轮回复只写一行 ⏵,不要重复。信息为主——让人一眼知道你在干什么,风格自然、可以带点俏皮。例:⏵ 修复登录页样式、⏵ 查一下报错原因、⏵ 给补丁跑个验证。切换任务时必须更新。',
74
- en: '[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes.',
75
- },
70
+ /** Model instructions never inherit the interface or terminal language. */
71
+ export const NARRATE_INSTRUCTION = '[Status line] You have a status line visible to the user. [Required] At the start of each step or subtask (not only before tool calls), write exactly one standalone line at the very beginning of your response: ⏵ a concrete description of what you are doing (20 words max), then continue with the normal response on the next line. Write only one ⏵ line per response and do not repeat it. Prioritize information so the user can understand the current work at a glance; keep the style natural and optionally playful. Examples: ⏵ Fixing the login page styles, ⏵ Investigating the error, ⏵ Running validation for the patch. Update it when the task changes. Write the status description in the same response language chosen for the user request; use English when unclear.'
76
72
 
73
+ const dict = {
74
+ // Retain the existing translation key without localizing model instructions.
75
+ 'narrate-instruction': { zh: NARRATE_INSTRUCTION, en: NARRATE_INSTRUCTION },
77
76
  // ── status-line structural copy ─────────────────────────────────────
78
77
  /** Plain (non-playful) phase labels. */
79
78
  'waiting-label': { zh: '等待模型响应', en: 'Waiting for model', ja: 'モデルの応答待ち' },
@@ -203,9 +202,9 @@ let lastProbeAt = 0
203
202
 
204
203
  /**
205
204
  * Guess the language from the OS locale (`LC_ALL`, `LC_MESSAGES`, `LANG`),
206
- * defaulting to `zh`. POSIX/C means "no locale selected" and conventionally
205
+ * defaulting to `en`. POSIX/C means "no locale selected" and conventionally
207
206
  * maps to English (what CI runners report). An absent locale variable
208
- * (typical on Windows) defaults to `zh`.
207
+ * (typical on Windows) defaults to `en`.
209
208
  */
210
209
  export function detectLocaleLang(): Lang {
211
210
  const raw =
@@ -217,5 +216,5 @@ export function detectLocaleLang(): Lang {
217
216
  if (locale.startsWith('zh')) return 'zh'
218
217
  if (locale.startsWith('en')) return 'en'
219
218
  if (locale === 'c' || locale === 'posix') return 'en'
220
- return 'zh'
219
+ return 'en'
221
220
  }