dsh-gitbash-shell 0.25.0 → 0.26.0
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.
- package/CHANGELOG.md +58 -0
- package/README.md +27 -0
- package/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/client.js +197 -0
- package/src/compositions.js +16 -3
- package/src/index.js +123 -38
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,64 @@
|
|
|
3
3
|
> 倒序排列,新版本条目在最上面。条目格式:`## vX.Y.Z — YYYY-MM-DD` + 类型(feat / fix / docs / chore)+ 要点 + 相关链接。
|
|
4
4
|
> 纪律见 AGENTS.md「变更记录纪律」:发版前先更新本文件并随版本提交;事故复盘、复现与真机验证记录也记在这里。
|
|
5
5
|
|
|
6
|
+
## v0.26.0 — 2026-09-25
|
|
7
|
+
|
|
8
|
+
**类型**:feat(run_code 的实验性 Python 后端开关,与 dsh-ptc-cordis-preset 双向联动)+ fix(issue #10:JSON 转义的 Windows 路径多出前导斜杠)+ chore(dsh 0.1.7-rc.2 增量对齐复核)
|
|
9
|
+
|
|
10
|
+
### 一、issue #10:JSON 转义的 Windows 路径多出前导斜杠(报障 @youyv)
|
|
11
|
+
|
|
12
|
+
> https://github.com/KannaKuron/dsh-gitbash-shell/issues/10 —— `windowsToMsys('"D:\\\\dsh\\\\工作"')` 得到 `"/d//dsh/工作"`,期望 `"/d/dsh/工作"`。
|
|
13
|
+
|
|
14
|
+
- **根因**(与报障者的定位一致,独立复核后确认):两个正则的**盘符后分隔符原子都只吃一个**(`(?:\\|\/)`),而生产输入是**JSON 转义**形态 —— 宿主 `packages/sandbox/sandbox-policy/src/index.ts:47` 用 `${JSON.stringify(policy.workspaceRoot)}` 渲染 `sandbox:policy` 上下文行,于是进入提示词的字面文本带**双反斜杠**。第一个反斜杠被原子吃掉,第二个留在 `rest` 头部,`rest.replace(/[\\/]+/g,'/')` 把它归一成**前导斜杠** ⇒ `/d/` + `/dsh/工作` = `/d//dsh/工作`。缺陷点:`src/index.js:960`(`BARE_WIN_PATH`)、`src/index.js:961`(`QUOTED_WIN_PATH`)、合成点 `src/index.js:967-970`;对照组整值字段走 `driveToMsys()`(带 `^\/*` 剥离)一直正确 —— **只有散文改写器在 JSON 转义输入下坏掉**。
|
|
15
|
+
- **修法(用户批准的方案 A)**:两处原子改为 `[\\/]+`(一次吃光盘符后的全部连续分隔符)。单分隔符输入逐字节不变;`D://dsh//工作` 也一并收敛。**没有**对整段文本 collapse `//`(本文件其它地方把 UNC 拼成 `//server/share`,全局收敛会破坏该形态)。
|
|
16
|
+
- **回归测试**:冒烟新增 `windowsToMsys keeps JSON-escaped Windows paths canonical (v0.26.0, issue #10)` —— 引号分支 + 裸分支、`JSON.stringify('D:\\dsh\\工作')`、`D://dsh//工作`、带空格目录,外加 UNC / URL / `file://` / 已 MSYS 形态的负例。
|
|
17
|
+
- **影响面**:仅"盘符后紧跟 ≥2 个连续分隔符"的文本;三面(`system-prompt/assemble` 的 sections/contexts/variables 与失败 content / error.message)共用该纯函数,同时受益、不会产生方言分歧。语义上是**规范性**修复(Windows 与 MSYS 本来都会收敛中间的 `//`),不是权限或功能故障。
|
|
18
|
+
|
|
19
|
+
### 二、dsh 0.1.7-rc.1 → rc.2 增量对齐复核(AGENTS.md §9)
|
|
20
|
+
|
|
21
|
+
- **官方预设文本逐字节未变**:`packages/bundle/web-app/presets/{standard,cordis,ptc,minimal}.patch.yml` 在 rc.1→rc.2 的 sha256 **完全一致**(`git diff dsh-v0.1.7-rc.1 dsh-v0.1.7-rc.2 -- packages/bundle/web-app/presets/` 为空),所以 `src/compositions.js` 的行数据与 `PLAN_SECTION` 本版无需重新对齐。
|
|
22
|
+
- **新增可复跑的核对工具 `tests/align-official.mjs`**:按 §9① 抽官方 patch 的 `- id:` / `name:` / `disabled:` 行序列(含嵌套组层级),与本插件四个变体逐条对比,并**钉住 rc.2 的四个 sha256**;官方文本将来变化时会以 `DRIFT` 明确报警而不是静默漂移。当前结果:**四个变体 × unix/win32 两个分支全绿**,唯一的差异是文档化的 Git Bash 增量(bash 行常开、pwsh 行常关)。
|
|
23
|
+
- **执行器 / 路径方言 / 沙箱面**:rc.1→rc.2 的 `packages/shell/bash-local`、`bash-sandbox` **只有版本号 bump**,`ShellExecutor`/`Config`/`confine` 契约无变化 ⇒ 本插件执行器半无需改动。rc.2 的真实改动集中在 `@deepseek-ai/dsh-tool-bash`/`tool-pwsh` 的**描述文本搬迁**(description → 参数描述、新增 `sandboxPermissionsDescription`)、`tool-*-persistent` 的代理对截断修复、`sandbox` 的 escalation `displayReason`、boot/plugin-manager 的 profile 并发保护、client UI。本插件不消费这些描述文本,启动的翻译层/执行器面不受影响(rc.2 新增的 `PreToolDecision.ask.displayReason` 是可选字段,本插件不产 `ask` 决策)。
|
|
24
|
+
- **exports / manifest / peer 复核**:rc.2 新增 `packages/boot/app-boot/src/package-meta.ts`(插件图标与 locale 显示元数据走 exports map,**不执行插件代码**)。本插件已具备 `./package.json`、`./locale/*.json`、`./client`、`./shell`、`.` 五条导出 + `icon.svg` + `dsh.client.platform: 'web'` + `dsh.bundle.patch`,与 rc.2 的解析规则一致(`packages/client/modules/src/index.ts` 的 `locatePkgJson()` 在 rc.2 未变),无需改动。
|
|
25
|
+
- **工具面覆盖复核(§9⑥)**:rc.2 未新增/改动带路径参数的工具 schema(`read/write/edit/read_image/glob/grep/present/bash` 的字段名与嵌套形状不变),`TRANSLATABLE_PATH_FIELDS` + present 嵌套覆盖仍然完整。
|
|
26
|
+
|
|
27
|
+
### 三、run_code 后端开关:实验性 Python(与 dsh-ptc-cordis-preset 双向联动,默认关)
|
|
28
|
+
|
|
29
|
+
- **需求**:有时想用 Python 跑 `run_code`(少踩转义/编码坑),但默认必须与官方逐字节一致;两插件同装时**只在一处改**、两侧即时同步。
|
|
30
|
+
- **归属(Lead 裁决 + ptc 定案)**:换掉的是 **profile 级** `ptc-runtime` 行(`packages/bundle/base/cordis.patch.yml:389`),不是 preset 内的行;isolate realm 方案实测无效(provider 落在私有 realm,root 的 `tools` 服务看不到)。所以**运行行只由 dsh-ptc-cordis-preset insert**(它的 `./src/runtime.js` + 条件 disable base 行),**本插件不 insert 任何运行行、不声明该依赖**(两插件各插一行会让 `ptcRuntime` 二次注册)。权威状态 = 对方行 Config 布尔 `pythonRuntime`(默认 false)。
|
|
31
|
+
- **本插件侧只做两件事**:
|
|
32
|
+
- ① **镜像设置卡**(`src/client.js`):`configForms.get('ptc-cordis')` 读写**同一个字段** + `subscribe`,任一侧改动两侧立即同步;对方未装或版本无该字段(对方 < 0.15.0)⇒ 整段不画;win32 显示禁用态 + POSIX-only 原因(实验性 CPython 后端在 win32 构造即抛错),按钮不出现。文案 21 语言(`sec.python` / `python.label/on/off/hint/blocked`),写明**重启 dsh 后生效**与**原因见宿主启动日志**(对方不提供 `pythonRuntimeIssue` 这类字段:客户端读不到宿主探测结果,加了就是第二份会漂移的状态)。
|
|
33
|
+
- ② **组合的工作流互斥**(`src/compositions.js` + `src/index.js`):`workflow-ptc` 构造器硬要求 `ctx.ptcRuntime.language === 'typescript'`(`packages/workflow/workflow-ptc/src/index.ts:117`),而 preset 行在**独立 PresetTree** 里挂载、**base 行 disable 管不到它** ⇒ python 后端期间选 standard/cordis 会让该行抛错,`agent-preset-registry` 的 `audit.failed` 直接**拒绝整棵 preset 挂载**。修法与官方 Python 参考组合一致(`snapshots/session/ptc-python-turn/cordis.yml:25-36` 同款禁用两行):对方能力报 `pythonRuntime: true` 时,**四个变体**的 `workflow-ptc`/`tool-workflow` 一律 `disabled: true`(用户 workflow 设置值保留,关掉后端后下次启动恢复);`code-gitbash` 本来就关。
|
|
34
|
+
- **信号来源**:对方能力服务 `ptcCordisPreset` 新增 `pythonRuntime`(boolean 或 getter,读不到一律 false);值变化必须**重注册已在 `live` 表里的变体**(行内容变了,只增删名录不够),日志 `peer reports the experimental CPython run_code backend: workflow rows go off in every variant` + 每条 `retired … (peer CPython switch changed; rows are rebuilt)`。
|
|
35
|
+
- **提示词自动跟随**:后端实例自己提供 `language`(`'typescript'` / `'python'`)与 `executionInstructions`,`packages/core/tools/src/ptc.ts:752` 与 `agent-tool-presentation`(`ctx.inject(['ptcRuntime'])`)据此渲染 run_code 的 SDK 提示词与工具呈现 ⇒ 组合文本两种状态都不变,无需本插件硬编码 Python 文案。
|
|
36
|
+
- **测试**:冒烟 +4(`peerFact` 保守读取矩阵、组合的 workflow 互斥矩阵、宿主重注册与"不 insert 运行行"断言、镜像卡的门控/写穿/win32 断言),共 **80/80 绿**。
|
|
37
|
+
- **真机验证(隔离 `DSH_HOME` + 新建 web profile + 插件 `link:` 安装 + 探针插件,真实 dsh 0.1.7-rc.2,本机 macOS,端口 3251-3256,未触碰 `~/.dsh` 下任何在用 profile)**:
|
|
38
|
+
- **A(默认关)**:四个变体注册成功,名录 8 项;`readDocument()` 读数 = 官方形态(`standard/cordis-gitbash`:`workflow-ptc`/`tool-workflow` 启用;`code-gitbash`:两者 `disabled: true`;`tool-bash` 启用 / `tool-pwsh` 禁用;`tool-ralph` 全禁用)。
|
|
39
|
+
- **B(探针报 `pythonRuntime: true`)**:出现上面两行日志,四个变体**全部重建**,读数变为两行 `disabled: true`。
|
|
40
|
+
- **两态都做真实挂载**:`agentPresets.acquireScope('<variant>')` 四个变体各返回 `MOUNT OK`(挂载审计无 failed 行),证明显式注册的组合在 rc.2 上确实可挂载,而不只是"注册成功"。
|
|
41
|
+
- **Windows 专属面**:win32 分支(卡片禁用态、宿主拒绝写入、python 后端构造抛错)在 macOS 上**无法真机验证**,按实现 + 单测/模拟记录;本插件的执行器与路径方言层按 `process.platform === 'win32'` 门控,而 python 后端仅 POSIX,两者在各自平台上互不重叠。
|
|
42
|
+
- 相关:issue #10 https://github.com/KannaKuron/dsh-gitbash-shell/issues/10 ;对方仓库 dsh-ptc-cordis-preset v0.15.0(能力字段与运行行)
|
|
43
|
+
|
|
44
|
+
## v0.25.1 — 2026-09-24
|
|
45
|
+
|
|
46
|
+
**类型**:fix(issue #8 —— 路径方言在 dsh 0.1.7 上**整层静默失效**:工具分发面用错了设置读取器;同一次审计另修侧栏终端还原的同类漏网)
|
|
47
|
+
|
|
48
|
+
> 报障:第三方用户 @youyv 的 https://github.com/KannaKuron/dsh-gitbash-shell/issues/8 —— 在 0.1.7-rc.1 上,`posixPaths` 指示词进了提示词、`DSH_PATH_DIALECT=msys` 也在环境里,但**参数翻译整层不工作**。用户侧的五条最小复现全部命中:文件工具把 `/c/...` 变成 `/c/c/...`、`~` 不展开、`glob`/`grep` 的 `path` 原样丢给原生 `rg`、`bash` 的 `workdir` 不翻译(spawn ENOENT)、工作区内的 `/c/...` 写入被沙箱拒绝(未翻译 ⇒ 落到工作区外)。方向判断也对:"插件翻坏了"与"完全没翻"两种形态混在一起,说明方言层是"半活"的。
|
|
49
|
+
|
|
50
|
+
- **root cause(一行)**:v0.24.4 的 era 适配(`makeLiveReader`)只改了一部分消费点 —— `tools/execute` 这个**唯一承担入参翻译**的 wrapper 仍在调 `readDialectSettings(ctx)`,而它读的是 `settings.get(ns)`;0.1.7 上该方法**已不存在**,于是永远返回 `{ posixPaths: false, … }` 的全关 fallback ⇒ wrapper 里 `if (dialect.posixPaths)` 永不成立,**一个参数都不翻**。同一时刻指示词、shell env、prompt 组装早就在 live reader 上(所以它们看起来"正常") —— 这正是"半活"的来源,也与 issue 里"指示词在、翻译不在"的观察完全一致。
|
|
51
|
+
- 五条症状逐一对应:`read`/`write` 拿到未翻译的 `/c/...`,由 Node 解析成 `<当前盘符>:\c\...`,再经**输出侧**回显器转回 MSYS 形态 ⇒ 用户看到的 `/c/c/...`(输入没翻、输出翻了);`~`/`/tmp` 属挂载表翻译,同样被跳过;`glob`/`grep` 的 `path` 与 `bash` 的 `workdir` 字段同理原样下发。
|
|
52
|
+
- **修法**:wrapper 改用 `liveSettings.dialect()`(与其余消费点同源),并把参数翻译抽成可测的 `translateDispatch(exec, dialect, env)` 导出到 `_internal` —— issue 里那句"现有冒烟只跑纯函数、没跑过一次工具分发的参数翻译"点到了要害:纯函数一直是绿的,**喂给它的接线**没人测。
|
|
53
|
+
- **同一次审计查出的第二处(同类)**:`adoptSidebarShell` 的 dispose 分支用 `s.get(SIDEBAR_NS)` 读当前值再决定是否恢复接管 —— 0.1.7 上没有 `get`,异常直接被 catch 吞掉,**插件卸载时侧栏终端从不还原**。现改走已有的 era-aware `readShell()`。
|
|
54
|
+
- **回归测试(75/75,新增 2 条,其中一条就是 issue 建议的那种)**:
|
|
55
|
+
- `translateDispatch covers every argument face issue #8 reported`:对 issue 的五条症状逐条断言(`/c/...` → `C:/...`;`~` → home 挂载;`/tmp` → TEMP 挂载;`glob`/`grep` 的 `path`;`bash` 的 `workdir`,且 `command` 绝不被改写),外加 glob 拆分、run_code 程序字面量、以及"已原生/相对路径保持对象身份(不触发无谓重渲染)"。
|
|
56
|
+
- `issue #8 root cause stays fixed`:锁定根因本身 —— 断言**旧读取器在 0.1.7 形状的 settings 上返回全关**(这就是它不能给分发面当输入的原因),并断言 `apply()` 的代码里不再出现 `readDialectSettings(ctx)`、侧栏还原不再出现 `s.get(SIDEBAR_NS)`。
|
|
57
|
+
- **验证(真实 dsh 0.1.7-rc.1 宿主上的 A/B,本机 macOS)**:
|
|
58
|
+
- 先核对宿主契约:`packages/core/tools/src/index.ts` 的 `dispatchScheduledExecution` 仍以 `mutableExec` 走 `tools/execute` waterfall,tool 体在 waterfall **之后**读 `exec.arguments`(`tool.execute(exec.arguments, exec)`)—— 所以"就地改写 `exec.arguments`"这条机制在 rc.1 上依然成立,问题只在读取器。
|
|
59
|
+
- A/B 装置:隔离 `DSH_HOME` + 新建 profile + 两份插件 `link:` 安装 + 探针插件**自注册一个回显工具**并通过 `ctx.tools.execute()` 走一次**真实分发**(把工具体收到的参数打出来);由于方言面按 `process.platform === 'win32'` 门控,探针副本只强制打开这一处门 + 把 `gitBash` 能力置 `active: true`,其余全为真代码。
|
|
60
|
+
- **未修复副本**(把 wrapper 换回 `readDialectSettings(ctx)`):工具体收到 `{"file_path":"/c/Users/x/.dsh/f.txt","path":"/c/Users/x/dir","workdir":"/c/Users/x/.dsh"}` 与 `{"file_path":"~/.anonymous-user-id","path":"/tmp/a.txt"}` —— **issue #8 的五条症状在同一台机器上完整复现**。
|
|
61
|
+
- **修复后**:同一装置收到 `C:/Users/x/.dsh/f.txt`、`C:/Users/x/dir`、`C:/Users/x/.dsh`,以及 `~` → home、`/tmp` → TEMP 的挂载翻译。
|
|
62
|
+
- 相关:issue #8 https://github.com/KannaKuron/dsh-gitbash-shell/issues/8 (报障与定位线索来自 @youyv)
|
|
63
|
+
|
|
6
64
|
## v0.25.0 — 2026-09-24
|
|
7
65
|
|
|
8
66
|
**类型**:feat(与 dsh-ptc-cordis-preset 去重:issue #7)
|
package/README.md
CHANGED
|
@@ -187,6 +187,33 @@ preset 会被插件自动清理;宿主 shell 回退为 PowerShell。
|
|
|
187
187
|
**依赖版本**:去重开关本体在**本插件 ≥ 0.25.0**;对方的协作能力在
|
|
188
188
|
**dsh-ptc-cordis-preset ≥ 0.14.0**。
|
|
189
189
|
|
|
190
|
+
### run_code 后端开关:`pythonRuntime`(默认关,v0.26.0)
|
|
191
|
+
|
|
192
|
+
dsh 有一个**实验性 CPython 后端**用于 PTC 的 `run_code`
|
|
193
|
+
(`@deepseek-ai/dsh-experimental-ptc-runtime-python`)。它换掉的是 **profile 级**的
|
|
194
|
+
`ptc-runtime` 行(不是 preset 里的行),所以**权威开关属于 dsh-ptc-cordis-preset**:它那一行
|
|
195
|
+
Config 的布尔字段 `pythonRuntime`(默认 `false`),由它在 profile 组合期决定挂哪个后端。
|
|
196
|
+
|
|
197
|
+
本插件做的是**第二张设置卡**——同装 dsh-ptc-cordis-preset 时,本插件的设置页也会出现这一行,
|
|
198
|
+
通过 `ctx.configForms.get('ptc-cordis')` 读写**同一个字段**,任一侧改动两侧立即同步
|
|
199
|
+
(与 `suppressPeerCordis` 同构,方向相反)。对方没装、或版本低于 0.15.0(没有该字段)时,
|
|
200
|
+
这一行**不显示**。
|
|
201
|
+
|
|
202
|
+
- **开关关闭(默认)**:`run_code` 用官方 Node/TypeScript 后端,组合与官方逐字节一致。
|
|
203
|
+
- **开关开启**:`run_code` 的语言、生成的 SDK 提示词与工具呈现整体切到 Python(由后端实例的
|
|
204
|
+
`language`/`executionInstructions` 决定,组合文本不变)。
|
|
205
|
+
- **生效时机**:**重启 dsh 之后生效**(后端行的替换在 profile 组合期求值);设置卡上的状态
|
|
206
|
+
两侧即时同步,只有后端切换需要重启。若开启后没有生效,原因见 dsh 启动日志。
|
|
207
|
+
- **平台**:该后端**仅支持 POSIX**——它在 Windows 上构造即抛错,所以 Windows 上开关显示为
|
|
208
|
+
禁用并注明原因,宿主侧也会拒绝写入。
|
|
209
|
+
- **与 workflow 互斥**:`workflow-ptc` 硬要求 TypeScript 后端(`ctx.ptcRuntime.language ===
|
|
210
|
+
'typescript'`),官方 Python 组合同样把 `workflow-ptc` / `tool-workflow` 一起禁用。因此**开启
|
|
211
|
+
期间本插件四个变体的这两行一律禁用**(用户自己的 workflow 设置值保留,关掉后端后下次启动
|
|
212
|
+
恢复)——不这样做,选标准/创造模式会因一行构造失败而拒绝**整棵 preset 挂载**。
|
|
213
|
+
- **依赖**:python 运行时包由 dsh-ptc-cordis-preset 声明(`optionalDependencies`,
|
|
214
|
+
`0.1.7-rc.2`);本插件不声明该依赖、也不 insert 任何运行行(两个插件各插一行会造成
|
|
215
|
+
`ptcRuntime` 二次注册)。
|
|
216
|
+
|
|
190
217
|
## POSIX 路径方言(v0.7.0 引入,受 `posixPaths` 开关门控)
|
|
191
218
|
|
|
192
219
|
Windows 上本插件把宿主 shell 换成 Git Bash 的同时,让**模型看到的路径**统一成 MSYS 盘根
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "Windows 全模式 Git Bash:用 Git for Windows bash 替换 PowerShell 执行器,并物化 standard/minimal/code/cordis 的 Git Bash 变体 preset。双 era 适配 dsh <= 0.1.1(内置 id 'code')与 >= 0.1.2(改名 'ptc'),启动探测自动选择,preset id 永不变。联动:dsh-ptc-cordis-preset(两者同装时 PTC 创造模式自动物化为 Git Bash 版)+ dsh-better-sidebar(终端 UI 标签与模型 terminal_* 工具自动切到 Git Bash)。",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gitbash-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Windows 上让 agent 的每条 shell 命令改经 Git for Windows bash 执行;物化四个内置预设的 Git Bash 变体,统一 MSYS 盘根路径方言,侧栏终端接管可开关。· Run every agent shell command through Git for Windows bash on Windows; materialize Git Bash variants of the built-in presets, unify the MSYS drive-root path dialect, and adopt the sidebar terminal behind a switch.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/client.js
CHANGED
|
@@ -51,6 +51,10 @@ window.__ModuleLoader__.load({
|
|
|
51
51
|
plugin's row (the single authoritative copy the peer card binds too) —
|
|
52
52
|
and the section is drawn only while that entry is actually served. */
|
|
53
53
|
var PEER_NS = "ptc-cordis";
|
|
54
|
+
/** The peer's authoritative experimental-CPython field on that SAME row:
|
|
55
|
+
both cards read and write this one form field, so either side changes
|
|
56
|
+
both. Absent on a peer that predates the switch ⇒ no row is drawn. */
|
|
57
|
+
var PEER_PYTHON_FIELD = "pythonRuntime";
|
|
54
58
|
|
|
55
59
|
// ── dictionaries ────────────────────────────────────────────────────────
|
|
56
60
|
// zh/en stay inline; the third languages live in LOCALES below, one entry
|
|
@@ -89,6 +93,12 @@ window.__ModuleLoader__.load({
|
|
|
89
93
|
"sec.dedupe": "与 PTC 创造模式去重",
|
|
90
94
|
"dedupe.label": "「创造模式 · Git Bash」重复项",
|
|
91
95
|
"dedupe.hint": "dsh-ptc-cordis-preset 同装时,它的「PTC 创造模式」在联动下已是 Git Bash 版,与本插件的「创造模式 · Git Bash」指向同一件事。开启去重后本插件不再注册那一条(名录少一项);默认关闭,保持四个变体不变。此开关就是对方设置卡上的同一个开关——两侧共享同一份状态,任一侧改动另一侧立即同步。仅在已安装 dsh-ptc-cordis-preset 时显示。",
|
|
96
|
+
"sec.python": "run_code 后端(实验性 Python)",
|
|
97
|
+
"python.label": "run_code 后端",
|
|
98
|
+
"python.on": "Python(实验性)",
|
|
99
|
+
"python.off": "Node / TypeScript(默认)",
|
|
100
|
+
"python.hint": "默认关闭时 run_code 用官方 Node/TypeScript 后端,与官方 ptc 组合逐字节一致;开启后改用 dsh 实验性 CPython 后端(@deepseek-ai/dsh-experimental-ptc-runtime-python),run_code 的语言、生成的 SDK 提示词与工具呈现随之切到 Python。要求 POSIX 平台与 CPython ≥ 3.10(Windows 不可用);与 workflow 工具互斥——官方 Python 组合同样禁用 workflow,因此开启期间本插件四个变体的 workflow 侧强制关闭(你的工作流设置值保留,关掉后恢复)。改动需重启 dsh 后生效;此开关就是 dsh-ptc-cordis-preset 设置卡上的同一个开关——两侧共享同一份状态,任一侧改动两侧同步。仅在已安装 dsh-ptc-cordis-preset 时显示。若置为开启后未生效,原因见宿主启动日志。",
|
|
101
|
+
"python.blocked": "本机是 Windows:实验性 Python 后端仅支持 POSIX,此开关不可用。",
|
|
92
102
|
};
|
|
93
103
|
|
|
94
104
|
var en = {
|
|
@@ -122,6 +132,12 @@ window.__ModuleLoader__.load({
|
|
|
122
132
|
"sec.dedupe": "Dedupe with PTC creation mode",
|
|
123
133
|
"dedupe.label": "\"Creation mode · Git Bash\" duplicate",
|
|
124
134
|
"dedupe.hint": "With dsh-ptc-cordis-preset installed alongside, its \"PTC creation mode\" is already the Git Bash variant under the link-up, so it and this plugin's \"creation mode · Git Bash\" point at the same thing. With dedupe on, this plugin stops registering that entry (one fewer in the roster); off by default, which keeps the four variants unchanged. This switch is the very same switch on the peer's settings card — both sides share one state, so a change on either side syncs to the other immediately. Shown only while dsh-ptc-cordis-preset is installed.",
|
|
135
|
+
"sec.python": "run_code backend (experimental Python)",
|
|
136
|
+
"python.label": "run_code backend",
|
|
137
|
+
"python.on": "Python (experimental)",
|
|
138
|
+
"python.off": "Node / TypeScript (default)",
|
|
139
|
+
"python.hint": "While off (default) run_code uses the official Node/TypeScript backend, byte-identical to the shipped ptc composition; turning it on switches to dsh's experimental CPython backend (@deepseek-ai/dsh-experimental-ptc-runtime-python), which also switches run_code's language, generated SDK prompt and tool presentation to Python. Requires a POSIX platform and CPython ≥ 3.10 (unavailable on Windows) and is mutually exclusive with the workflow tool — the official Python composition disables workflow too, so the workflow side of all four variants is forced off while this is on (your workflow setting is kept and restored when you turn it back off). Takes effect after restarting dsh; this is the very same switch on dsh-ptc-cordis-preset's card — both sides share one state, so either side updates both. Shown only while dsh-ptc-cordis-preset is installed. If turning it on does not take effect, the dsh startup log states why.",
|
|
140
|
+
"python.blocked": "This host is Windows: the experimental Python backend supports POSIX only, so this switch is unavailable.",
|
|
125
141
|
};
|
|
126
142
|
|
|
127
143
|
/* Third-language dictionaries: one entry per language, each preceded
|
|
@@ -165,6 +181,12 @@ window.__ModuleLoader__.load({
|
|
|
165
181
|
"sec.dedupe": "إزالة التكرار مع وضع PTC الإبداعي",
|
|
166
182
|
"dedupe.label": "عنصر «وضع الإبداع · Git Bash» المكرر",
|
|
167
183
|
"dedupe.hint": "عند تثبيت dsh-ptc-cordis-preset معًا، يكون «وضع PTC الإبداعي» لديه بالفعل نسخة Git Bash في إطار الربط، فيشير هو و«وضع الإبداع · Git Bash» في هذه الإضافة إلى الشيء نفسه. عند تفعيل إزالة التكرار تتوقف هذه الإضافة عن تسجيل ذلك العنصر (عنصر أقل في القائمة)؛ والمعطَّل افتراضيًا يُبقي المتغيّرات الأربعة كما هي. هذا المفتاح هو نفسه المفتاح الموجود على بطاقة إعدادات الطرف الآخر — الجانبان يتشاركان الحالة نفسها، وأي تغيير في أحد الجانبين يُزامَن فورًا مع الآخر. يظهر فقط عندما يكون dsh-ptc-cordis-preset مثبَّتًا.",
|
|
184
|
+
"sec.python": "خلفية run_code (Python تجريبي)",
|
|
185
|
+
"python.label": "خلفية run_code",
|
|
186
|
+
"python.on": "Python (تجريبي)",
|
|
187
|
+
"python.off": "Node / TypeScript (افتراضي)",
|
|
188
|
+
"python.hint": "عند الإيقاف (افتراضيًا) يستخدم run_code الخلفية الرسمية Node/TypeScript، مطابقة تمامًا لتركيبة ptc الرسمية؛ وعند التشغيل يتحول إلى خلفية CPython التجريبية في dsh (@deepseek-ai/dsh-experimental-ptc-runtime-python)، فتتحول لغة run_code ومطالبة SDK المولَّدة وعرض الأداة إلى Python. يتطلب نظام POSIX و CPython ≥ 3.10 (غير متاح على Windows)، وهو متعارض مع أداة workflow — فالتركيبة الرسمية لـ Python تعطّل workflow أيضًا، لذا يبقى جانب workflow مُعطَّلًا في المتغيّرات الأربعة أثناء التشغيل (قيمتك محفوظة وتعود عند الإيقاف). يسري التغيير بعد إعادة تشغيل dsh؛ هذا هو المفتاح نفسه على بطاقة dsh-ptc-cordis-preset — الجانبان يتشاركان حالة واحدة. يظهر فقط عند تثبيت dsh-ptc-cordis-preset. إذا لم يسري التشغيل، فسبب ذلك مذكور في سجل تشغيل dsh.",
|
|
189
|
+
"python.blocked": "هذا المضيف يعمل بـ Windows: الخلفية التجريبية Python تدعم POSIX فقط، لذا لا يتوفر هذا المفتاح.",
|
|
168
190
|
},
|
|
169
191
|
/* locale: de */
|
|
170
192
|
"de": {
|
|
@@ -198,6 +220,12 @@ window.__ModuleLoader__.load({
|
|
|
198
220
|
"sec.dedupe": "Deduplizierung mit dem PTC-Kreativmodus",
|
|
199
221
|
"dedupe.label": "Doppelter Eintrag „Kreativmodus · Git Bash“",
|
|
200
222
|
"dedupe.hint": "Ist dsh-ptc-cordis-preset mitinstalliert, ist dessen „PTC-Kreativmodus“ durch die Verknüpfung bereits die Git-Bash-Fassung und zeigt damit auf dasselbe wie der „Kreativmodus · Git Bash“ dieses Plugins. Mit aktiver Deduplizierung registriert dieses Plugin den eigenen Eintrag nicht mehr (ein Eintrag weniger im Verzeichnis); standardmäßig aus, die vier Varianten bleiben unverändert. Dieser Schalter ist derselbe Schalter auf der Einstellungskarte der Gegenseite — beide Seiten teilen einen Zustand, eine Änderung auf einer Seite erreicht die andere sofort. Nur sichtbar, solange dsh-ptc-cordis-preset installiert ist.",
|
|
223
|
+
"sec.python": "run_code-Backend (experimentelles Python)",
|
|
224
|
+
"python.label": "run_code-Backend",
|
|
225
|
+
"python.on": "Python (experimentell)",
|
|
226
|
+
"python.off": "Node / TypeScript (Standard)",
|
|
227
|
+
"python.hint": "Aus (Standard): run_code nutzt das offizielle Node/TypeScript-Backend, byte-identisch zur ausgelieferten ptc-Komposition; an: dsh wechselt auf das experimentelle CPython-Backend (@deepseek-ai/dsh-experimental-ptc-runtime-python), womit Sprache, generierter SDK-Prompt und Darstellung von run_code auf Python umstellen. Erfordert POSIX und CPython ≥ 3.10 (unter Windows nicht verfügbar) und ist mit dem workflow-Tool unvereinbar — die offizielle Python-Komposition deaktiviert workflow ebenfalls, deshalb bleibt die workflow-Seite aller vier Varianten so lange aus (dein Workflow-Wert bleibt erhalten und kehrt nach dem Ausschalten zurück). Wirkt nach einem Neustart von dsh; dies ist derselbe Schalter auf der Karte von dsh-ptc-cordis-preset — beide Seiten teilen einen Zustand. Nur sichtbar, solange dsh-ptc-cordis-preset installiert ist. Bleibt das Einschalten ohne Wirkung, nennt das dsh-Startprotokoll den Grund.",
|
|
228
|
+
"python.blocked": "Dieser Host ist Windows: Das experimentelle Python-Backend unterstützt nur POSIX, der Schalter ist nicht verfügbar.",
|
|
201
229
|
},
|
|
202
230
|
/* locale: fr */
|
|
203
231
|
"fr": {
|
|
@@ -231,6 +259,12 @@ window.__ModuleLoader__.load({
|
|
|
231
259
|
"sec.dedupe": "Dédoublonnage avec le mode création PTC",
|
|
232
260
|
"dedupe.label": "Entrée en double « mode création · Git Bash »",
|
|
233
261
|
"dedupe.hint": "Lorsque dsh-ptc-cordis-preset est installé en même temps, son « mode création PTC » est déjà la version Git Bash grâce à l'appairage : lui et le « mode création · Git Bash » de ce plugin désignent la même chose. Une fois le dédoublonnage activé, ce plugin n'enregistre plus sa propre entrée (une entrée de moins dans le catalogue) ; désactivé par défaut, ce qui laisse les quatre variantes intactes. Cet interrupteur est exactement le même que sur la carte de réglages d'en face — les deux côtés partagent un seul état, toute modification d'un côté est synchronisée immédiatement de l'autre. Affiché uniquement lorsque dsh-ptc-cordis-preset est installé.",
|
|
262
|
+
"sec.python": "Backend run_code (Python expérimental)",
|
|
263
|
+
"python.label": "Backend run_code",
|
|
264
|
+
"python.on": "Python (expérimental)",
|
|
265
|
+
"python.off": "Node / TypeScript (par défaut)",
|
|
266
|
+
"python.hint": "Désactivé (par défaut), run_code utilise le backend officiel Node/TypeScript, identique octet pour octet à la composition ptc livrée ; activé, dsh bascule sur le backend CPython expérimental (@deepseek-ai/dsh-experimental-ptc-runtime-python) : la langue, l'invite SDK générée et la présentation de run_code passent en Python. Exige POSIX et CPython ≥ 3.10 (indisponible sous Windows) et est incompatible avec l'outil workflow — la composition Python officielle désactive aussi workflow, donc le côté workflow des quatre variantes reste désactivé tant que l'option est active (ta valeur est conservée et revient à la désactivation). Prend effet après un redémarrage de dsh ; c'est le même interrupteur que sur la carte de dsh-ptc-cordis-preset — les deux côtés partagent un seul état. Affiché uniquement si dsh-ptc-cordis-preset est installé. Si l'activation reste sans effet, le journal de démarrage de dsh en indique la raison.",
|
|
267
|
+
"python.blocked": "Cet hôte est sous Windows : le backend Python expérimental n'est disponible que sur POSIX, l'interrupteur est indisponible.",
|
|
234
268
|
},
|
|
235
269
|
/* locale: hi */
|
|
236
270
|
"hi": {
|
|
@@ -264,6 +298,12 @@ window.__ModuleLoader__.load({
|
|
|
264
298
|
"sec.dedupe": "PTC क्रिएशन मोड के साथ डुप्लीकेट हटाना",
|
|
265
299
|
"dedupe.label": "«क्रिएशन मोड · Git Bash» की डुप्लीकेट प्रविष्टि",
|
|
266
300
|
"dedupe.hint": "जब dsh-ptc-cordis-preset साथ में इंस्टॉल होता है, तो लिंक-अप के कारण उसका «PTC क्रिएशन मोड» पहले से Git Bash रूप है, और वह इस प्लगइन के «क्रिएशन मोड · Git Bash» के साथ एक ही चीज़ दर्शाता है। डुप्लीकेट हटाना चालू करने पर यह प्लगइन अपनी वह प्रविष्टि पंजीकृत नहीं करता (सूची में एक कम); डिफ़ॉल्ट रूप से बंद, जिससे चारों वेरिएंट अपरिवर्तित रहते हैं। यह स्विच सामने वाले की सेटिंग कार्ड पर मौजूद ठीक वही स्विच है — दोनों ओर एक ही स्थिति साझा होती है, किसी एक ओर बदलाव तुरंत दूसरी ओर सिंक होता है। यह केवल तभी दिखता है जब dsh-ptc-cordis-preset इंस्टॉल हो।",
|
|
301
|
+
"sec.python": "run_code बैकएंड (प्रयोगात्मक Python)",
|
|
302
|
+
"python.label": "run_code बैकएंड",
|
|
303
|
+
"python.on": "Python (प्रयोगात्मक)",
|
|
304
|
+
"python.off": "Node / TypeScript (डिफ़ॉल्ट)",
|
|
305
|
+
"python.hint": "बंद (डिफ़ॉल्ट) रहने पर run_code आधिकारिक Node/TypeScript बैकएंड इस्तेमाल करता है, जो भेजे गए ptc संयोजन से पूरी तरह मेल खाता है; चालू करने पर dsh का प्रयोगात्मक CPython बैकएंड (@deepseek-ai/dsh-experimental-ptc-runtime-python) चलता है और run_code की भाषा, बना SDK प्रॉम्प्ट तथा प्रस्तुति Python में बदल जाती है। इसके लिए POSIX और CPython ≥ 3.10 चाहिए (Windows पर उपलब्ध नहीं), और यह workflow टूल से परस्पर अनन्य है — आधिकारिक Python संयोजन भी workflow बंद करता है, इसलिए चालू रहने तक चारों वेरिएंट का workflow पक्ष बंद रहता है (आपकी workflow सेटिंग सुरक्षित रहती है और बंद करने पर लौट आती है)। बदलाव dsh को फिर से शुरू करने के बाद लागू होता है; यह dsh-ptc-cordis-preset के कार्ड पर मौजूद वही स्विच है — दोनों ओर एक ही स्थिति साझा होती है। यह केवल तभी दिखता है जब dsh-ptc-cordis-preset इंस्टॉल हो। चालू करने पर असर न हो तो कारण dsh के स्टार्टअप लॉग में मिलेगा।",
|
|
306
|
+
"python.blocked": "यह होस्ट Windows है: प्रयोगात्मक Python बैकएंड केवल POSIX पर चलता है, इसलिए यह स्विच उपलब्ध नहीं है।",
|
|
267
307
|
},
|
|
268
308
|
/* locale: id */
|
|
269
309
|
"id": {
|
|
@@ -297,6 +337,12 @@ window.__ModuleLoader__.load({
|
|
|
297
337
|
"sec.dedupe": "Deduplikasi dengan mode kreatif PTC",
|
|
298
338
|
"dedupe.label": "Entri duplikat «mode kreatif · Git Bash»",
|
|
299
339
|
"dedupe.hint": "Saat dsh-ptc-cordis-preset terpasang bersama, «mode kreatif PTC» miliknya sudah menjadi versi Git Bash berkat keterkaitan, sehingga ia dan «mode kreatif · Git Bash» plugin ini menunjuk hal yang sama. Dengan deduplikasi aktif, plugin ini berhenti mendaftarkan entrinya sendiri (berkurang satu di daftar); nonaktif secara bawaan, sehingga keempat varian tetap utuh. Sakelar ini adalah sakelar yang sama di kartu setelan pihak lain — kedua sisi berbagi satu status, perubahan di salah satu sisi langsung tersinkron ke sisi lain. Hanya tampil saat dsh-ptc-cordis-preset terpasang.",
|
|
340
|
+
"sec.python": "Backend run_code (Python eksperimental)",
|
|
341
|
+
"python.label": "Backend run_code",
|
|
342
|
+
"python.on": "Python (eksperimental)",
|
|
343
|
+
"python.off": "Node / TypeScript (bawaan)",
|
|
344
|
+
"python.hint": "Saat nonaktif (bawaan), run_code memakai backend resmi Node/TypeScript, identik byte demi byte dengan komposisi ptc resmi; saat aktif, dsh memakai backend CPython eksperimental (@deepseek-ai/dsh-experimental-ptc-runtime-python) sehingga bahasa run_code, prompt SDK yang dihasilkan, dan penyajiannya beralih ke Python. Memerlukan POSIX dan CPython ≥ 3.10 (tidak tersedia di Windows) serta saling eksklusif dengan alat workflow — komposisi Python resmi juga menonaktifkan workflow, jadi sisi workflow keempat varian tetap mati selama ini aktif (nilai workflow-mu dipertahankan dan kembali saat dimatikan). Berlaku setelah dsh dimulai ulang; ini sakelar yang sama di kartu dsh-ptc-cordis-preset — kedua sisi berbagi satu status. Hanya tampil saat dsh-ptc-cordis-preset terpasang. Jika diaktifkan tetapi tidak berpengaruh, alasannya ada di log mulai dsh.",
|
|
345
|
+
"python.blocked": "Host ini Windows: backend Python eksperimental hanya mendukung POSIX, sakelar ini tidak tersedia.",
|
|
300
346
|
},
|
|
301
347
|
/* locale: it */
|
|
302
348
|
"it": {
|
|
@@ -330,6 +376,12 @@ window.__ModuleLoader__.load({
|
|
|
330
376
|
"sec.dedupe": "Deduplicazione con la modalità creazione PTC",
|
|
331
377
|
"dedupe.label": "Voce duplicata «modalità creazione · Git Bash»",
|
|
332
378
|
"dedupe.hint": "Quando dsh-ptc-cordis-preset è installato insieme, la sua «modalità creazione PTC» è già la versione Git Bash grazie al collegamento: essa e la «modalità creazione · Git Bash» di questo plugin indicano la stessa cosa. Attivando la deduplicazione questo plugin non registra più la propria voce (una in meno nell'elenco); disattivata per impostazione predefinita, lascia intatte le quattro varianti. Questo interruttore è lo stesso presente sulla scheda impostazioni dell'altra parte — entrambe le parti condividono un unico stato, una modifica su un lato si sincronizza subito sull'altro. Visibile solo quando dsh-ptc-cordis-preset è installato.",
|
|
379
|
+
"sec.python": "Backend run_code (Python sperimentale)",
|
|
380
|
+
"python.label": "Backend run_code",
|
|
381
|
+
"python.on": "Python (sperimentale)",
|
|
382
|
+
"python.off": "Node / TypeScript (predefinito)",
|
|
383
|
+
"python.hint": "Disattivato (predefinito) run_code usa il backend ufficiale Node/TypeScript, identico byte per byte alla composizione ptc distribuita; attivandolo dsh passa al backend CPython sperimentale (@deepseek-ai/dsh-experimental-ptc-runtime-python): lingua, prompt SDK generato e presentazione di run_code passano a Python. Richiede POSIX e CPython ≥ 3.10 (non disponibile su Windows) ed è incompatibile con lo strumento workflow — anche la composizione Python ufficiale disattiva workflow, quindi il lato workflow di tutte e quattro le varianti resta spento finché è attivo (il tuo valore viene conservato e torna alla disattivazione). Ha effetto dopo il riavvio di dsh; è lo stesso interruttore sulla scheda di dsh-ptc-cordis-preset — entrambi i lati condividono un unico stato. Visibile solo quando dsh-ptc-cordis-preset è installato. Se l'attivazione non ha effetto, il motivo è nel log di avvio di dsh.",
|
|
384
|
+
"python.blocked": "Questo host è Windows: il backend Python sperimentale supporta solo POSIX, l'interruttore non è disponibile.",
|
|
333
385
|
},
|
|
334
386
|
/* locale: ja */
|
|
335
387
|
"ja": {
|
|
@@ -363,6 +415,12 @@ window.__ModuleLoader__.load({
|
|
|
363
415
|
"sec.dedupe": "PTC 創造モードとの重複排除",
|
|
364
416
|
"dedupe.label": "「創造モード · Git Bash」の重複項目",
|
|
365
417
|
"dedupe.hint": "dsh-ptc-cordis-preset を併用している場合、連携により相手の「PTC 創造モード」はすでに Git Bash 版であり、本プラグインの「創造モード · Git Bash」と同じものを指します。重複排除を有効にすると本プラグインは自前の項目を登録しなくなります(名簿が 1 件減ります)。既定は無効で、4 つのバリアントは変わりません。このスイッチは相手の設定カードにあるものと同一で、両側が同じ状態を共有し、どちらかで変更すればもう一方へ即座に同期されます。dsh-ptc-cordis-preset がインストールされているときだけ表示されます。",
|
|
418
|
+
"sec.python": "run_code バックエンド(実験的 Python)",
|
|
419
|
+
"python.label": "run_code バックエンド",
|
|
420
|
+
"python.on": "Python(実験的)",
|
|
421
|
+
"python.off": "Node / TypeScript(既定)",
|
|
422
|
+
"python.hint": "オフ(既定)では run_code は公式の Node/TypeScript バックエンドを使い、公式 ptc 構成とバイト単位で一致します。オンにすると dsh の実験的 CPython バックエンド(@deepseek-ai/dsh-experimental-ptc-runtime-python)に切り替わり、run_code の言語・生成される SDK プロンプト・提示が Python に変わります。POSIX と CPython ≥ 3.10 が必要(Windows では利用不可)で、workflow ツールとは排他です —— 公式 Python 構成も workflow を無効化するため、オン期間中は 4 変体すべてで workflow 側が強制的にオフになります(ワークフロー設定値は保持され、オフに戻すと復帰)。変更は dsh の再起動後に有効です。これは dsh-ptc-cordis-preset のカードにある同じスイッチで、両側が同一状態を共有します。dsh-ptc-cordis-preset がインストールされているときだけ表示されます。 オンにしても効かない場合の理由は dsh の起動ログにあります。",
|
|
423
|
+
"python.blocked": "このホストは Windows です。実験的 Python バックエンドは POSIX 専用のため、このスイッチは利用できません。",
|
|
366
424
|
},
|
|
367
425
|
/* locale: ko */
|
|
368
426
|
"ko": {
|
|
@@ -396,6 +454,12 @@ window.__ModuleLoader__.load({
|
|
|
396
454
|
"sec.dedupe": "PTC 창조 모드와 중복 제거",
|
|
397
455
|
"dedupe.label": "«창조 모드 · Git Bash» 중복 항목",
|
|
398
456
|
"dedupe.hint": "dsh-ptc-cordis-preset을 함께 설치하면 연동으로 인해 상대의 «PTC 창조 모드»가 이미 Git Bash 버전이므로, 그것과 이 플러그인의 «창조 모드 · Git Bash»는 같은 것을 가리킵니다. 중복 제거를 켜면 이 플러그인은 자기 항목을 더 이상 등록하지 않습니다(명부에서 하나 줄어듦). 기본값은 꺼짐이며 네 가지 변형은 그대로 유지됩니다. 이 스위치는 상대 설정 카드에 있는 바로 그 스위치입니다 — 양쪽이 같은 상태를 공유하므로 어느 쪽에서 바꾸든 다른 쪽에 즉시 동기화됩니다. dsh-ptc-cordis-preset이 설치되어 있을 때만 표시됩니다.",
|
|
457
|
+
"sec.python": "run_code 백엔드(실험적 Python)",
|
|
458
|
+
"python.label": "run_code 백엔드",
|
|
459
|
+
"python.on": "Python(실험적)",
|
|
460
|
+
"python.off": "Node / TypeScript(기본)",
|
|
461
|
+
"python.hint": "끄면(기본) run_code는 공식 Node/TypeScript 백엔드를 사용해 공식 ptc 구성과 바이트 단위로 일치합니다. 켜면 dsh의 실험적 CPython 백엔드(@deepseek-ai/dsh-experimental-ptc-runtime-python)로 바뀌어 run_code의 언어, 생성되는 SDK 프롬프트, 도구 표시가 Python으로 전환됩니다. POSIX와 CPython ≥ 3.10이 필요하며(Windows에서는 사용 불가) workflow 도구와 상호 배타적입니다 — 공식 Python 구성도 workflow를 끄므로 켜져 있는 동안 네 변형 모두 workflow 쪽이 강제로 꺼집니다(워크플로 설정값은 유지되고 끄면 복구됩니다). 변경은 dsh 재시작 후 적용됩니다. 이 스위치는 dsh-ptc-cordis-preset 카드에 있는 바로 그 스위치이며 양쪽이 같은 상태를 공유합니다. dsh-ptc-cordis-preset이 설치되어 있을 때만 표시됩니다. 켠 뒤에도 적용되지 않으면 그 이유는 dsh 시작 로그에 있습니다.",
|
|
462
|
+
"python.blocked": "이 호스트는 Windows입니다. 실험적 Python 백엔드는 POSIX만 지원하므로 이 스위치를 쓸 수 없습니다.",
|
|
399
463
|
},
|
|
400
464
|
/* locale: nl */
|
|
401
465
|
"nl": {
|
|
@@ -429,6 +493,12 @@ window.__ModuleLoader__.load({
|
|
|
429
493
|
"sec.dedupe": "Deduplicatie met de PTC-creatiemodus",
|
|
430
494
|
"dedupe.label": "Dubbele vermelding ‘creatiemodus · Git Bash’",
|
|
431
495
|
"dedupe.hint": "Als dsh-ptc-cordis-preset meegaat, is zijn ‘PTC-creatiemodus’ door de koppeling al de Git Bash-variant, dus die en de ‘creatiemodus · Git Bash’ van deze plugin wijzen op hetzelfde. Met deduplicatie aan registreert deze plugin die eigen vermelding niet meer (één minder in de lijst); standaard uit, waardoor de vier varianten ongewijzigd blijven. Deze schakelaar is dezelfde als op de instellingenkaart van de andere kant — beide kanten delen één status, een wijziging aan één kant synct direct naar de andere. Alleen zichtbaar zolang dsh-ptc-cordis-preset is geïnstalleerd.",
|
|
496
|
+
"sec.python": "run_code-backend (experimenteel Python)",
|
|
497
|
+
"python.label": "run_code-backend",
|
|
498
|
+
"python.on": "Python (experimenteel)",
|
|
499
|
+
"python.off": "Node / TypeScript (standaard)",
|
|
500
|
+
"python.hint": "Uit (standaard) gebruikt run_code de officiële Node/TypeScript-backend, byte voor byte gelijk aan de meegeleverde ptc-compositie; aan schakelt dsh over op de experimentele CPython-backend (@deepseek-ai/dsh-experimental-ptc-runtime-python), waardoor taal, gegenereerde SDK-prompt en weergave van run_code naar Python gaan. Vereist POSIX en CPython ≥ 3.10 (niet beschikbaar op Windows) en is onverenigbaar met de workflow-tool — de officiële Python-compositie schakelt workflow ook uit, dus de workflow-kant van alle vier varianten blijft uit zolang dit aan staat (je workflow-waarde blijft bewaard en keert terug als je het uitzet). Werkt na een herstart van dsh; dit is dezelfde schakelaar op de kaart van dsh-ptc-cordis-preset — beide kanten delen één status. Alleen zichtbaar zolang dsh-ptc-cordis-preset is geïnstalleerd. Werkt het aanzetten niet, dan staat de reden in het opstartlogboek van dsh.",
|
|
501
|
+
"python.blocked": "Deze host is Windows: de experimentele Python-backend ondersteunt alleen POSIX, deze schakelaar is niet beschikbaar.",
|
|
432
502
|
},
|
|
433
503
|
/* locale: pl */
|
|
434
504
|
"pl": {
|
|
@@ -462,6 +532,12 @@ window.__ModuleLoader__.load({
|
|
|
462
532
|
"sec.dedupe": "Deduplikacja z trybem tworzenia PTC",
|
|
463
533
|
"dedupe.label": "Zduplikowany wpis „tryb tworzenia · Git Bash”",
|
|
464
534
|
"dedupe.hint": "Gdy dsh-ptc-cordis-preset jest zainstalowany razem, jego „tryb tworzenia PTC” jest już dzięki powiązaniu wersją Git Bash, więc on i „tryb tworzenia · Git Bash” tej wtyczki oznaczają to samo. Po włączeniu deduplikacji ta wtyczka nie rejestruje już własnego wpisu (o jeden mniej w wykazie); domyślnie wyłączona, dzięki czemu cztery warianty pozostają bez zmian. Ten przełącznik to ten sam przełącznik na karcie ustawień drugiej strony — obie strony dzielą jeden stan, zmiana po jednej stronie natychmiast synchronizuje się z drugą. Widoczny tylko, gdy dsh-ptc-cordis-preset jest zainstalowany.",
|
|
535
|
+
"sec.python": "Backend run_code (eksperymentalny Python)",
|
|
536
|
+
"python.label": "Backend run_code",
|
|
537
|
+
"python.on": "Python (eksperymentalny)",
|
|
538
|
+
"python.off": "Node / TypeScript (domyślnie)",
|
|
539
|
+
"python.hint": "Wyłączony (domyślnie) run_code używa oficjalnego backendu Node/TypeScript, identycznego co do bajtu z dostarczaną kompozycją ptc; włączenie przełącza dsh na eksperymentalny backend CPython (@deepseek-ai/dsh-experimental-ptc-runtime-python), więc język, generowany prompt SDK i prezentacja run_code przechodzą na Python. Wymaga POSIX i CPython ≥ 3.10 (niedostępny w Windows) i jest wykluczający z narzędziem workflow — oficjalna kompozycja Python również wyłącza workflow, więc strona workflow wszystkich czterech wariantów pozostaje wyłączona, dopóki to jest włączone (twoje ustawienie workflow jest zachowane i wraca po wyłączeniu). Zmiana działa po restarcie dsh; to ten sam przełącznik na karcie dsh-ptc-cordis-preset — obie strony dzielą jeden stan. Widoczny tylko, gdy dsh-ptc-cordis-preset jest zainstalowany. Jeśli włączenie nie przyniesie skutku, powód znajdziesz w logu startowym dsh.",
|
|
540
|
+
"python.blocked": "Ten host to Windows: eksperymentalny backend Python obsługuje tylko POSIX, przełącznik jest niedostępny.",
|
|
465
541
|
},
|
|
466
542
|
/* locale: pt */
|
|
467
543
|
"pt": {
|
|
@@ -495,6 +571,12 @@ window.__ModuleLoader__.load({
|
|
|
495
571
|
"sec.dedupe": "Desduplicação com o modo de criação PTC",
|
|
496
572
|
"dedupe.label": "Entrada duplicada «modo de criação · Git Bash»",
|
|
497
573
|
"dedupe.hint": "Quando o dsh-ptc-cordis-preset está instalado em conjunto, o «modo de criação PTC» dele já é a versão Git Bash graças à integração, então ele e o «modo de criação · Git Bash» deste plugin apontam para a mesma coisa. Com a desduplicação ligada, este plugin deixa de registar a sua própria entrada (uma a menos na lista); desligada por padrão, mantendo as quatro variantes inalteradas. Este interruptor é o mesmo do cartão de definições do outro lado — os dois lados partilham um único estado, e uma alteração de um lado sincroniza imediatamente com o outro. Só aparece quando o dsh-ptc-cordis-preset está instalado.",
|
|
574
|
+
"sec.python": "Backend run_code (Python experimental)",
|
|
575
|
+
"python.label": "Backend run_code",
|
|
576
|
+
"python.on": "Python (experimental)",
|
|
577
|
+
"python.off": "Node / TypeScript (padrão)",
|
|
578
|
+
"python.hint": "Desligado (padrão), o run_code usa o backend oficial Node/TypeScript, idêntico byte a byte à composição ptc distribuída; ligado, o dsh passa para o backend CPython experimental (@deepseek-ai/dsh-experimental-ptc-runtime-python), e a linguagem, o prompt SDK gerado e a apresentação do run_code passam para Python. Exige POSIX e CPython ≥ 3.10 (indisponível no Windows) e é incompatível com a ferramenta workflow — a composição Python oficial também desativa workflow, pelo que o lado workflow das quatro variantes fica desligado enquanto isto estiver ligado (o teu valor é mantido e regressa ao desligar). Produz efeito após reiniciar o dsh; é o mesmo interruptor no cartão do dsh-ptc-cordis-preset — os dois lados partilham um único estado. Só aparece quando o dsh-ptc-cordis-preset está instalado. Se ligar não tiver efeito, o motivo está no registo de arranque do dsh.",
|
|
579
|
+
"python.blocked": "Este anfitrião é Windows: o backend Python experimental só suporta POSIX, pelo que este interruptor não está disponível.",
|
|
498
580
|
},
|
|
499
581
|
/* locale: ru */
|
|
500
582
|
"ru": {
|
|
@@ -528,6 +610,12 @@ window.__ModuleLoader__.load({
|
|
|
528
610
|
"sec.dedupe": "Удаление дубликата с творческим режимом PTC",
|
|
529
611
|
"dedupe.label": "Дублирующая запись «творческий режим · Git Bash»",
|
|
530
612
|
"dedupe.hint": "Если dsh-ptc-cordis-preset установлен вместе, его «творческий режим PTC» благодаря связке уже является версией Git Bash, поэтому он и «творческий режим · Git Bash» этого плагина указывают на одно и то же. При включённом удалении дубликатов плагин больше не регистрирует свою запись (в списке на одну меньше); по умолчанию выключено, четыре варианта остаются без изменений. Этот переключатель — тот же самый на карточке настроек у второй стороны: обе стороны делят одно состояние, изменение с любой стороны сразу синхронизируется с другой. Показывается только когда установлен dsh-ptc-cordis-preset.",
|
|
613
|
+
"sec.python": "Бэкенд run_code (экспериментальный Python)",
|
|
614
|
+
"python.label": "Бэкенд run_code",
|
|
615
|
+
"python.on": "Python (экспериментальный)",
|
|
616
|
+
"python.off": "Node / TypeScript (по умолчанию)",
|
|
617
|
+
"python.hint": "Выключено (по умолчанию) — run_code использует официальный бэкенд Node/TypeScript, побайтово совпадающий с поставляемой композицией ptc; при включении dsh переходит на экспериментальный бэкенд CPython (@deepseek-ai/dsh-experimental-ptc-runtime-python), и язык, сгенерированная подсказка SDK и представление run_code переключаются на Python. Требуются POSIX и CPython ≥ 3.10 (в Windows недоступно), и это несовместимо с инструментом workflow — официальная композиция Python тоже отключает workflow, поэтому сторона workflow всех четырёх вариантов остаётся выключенной, пока это включено (ваша настройка workflow сохраняется и возвращается после выключения). Изменение действует после перезапуска dsh; это тот же переключатель на карточке dsh-ptc-cordis-preset — обе стороны делят одно состояние. Показывается только когда установлен dsh-ptc-cordis-preset. Если включение не подействовало, причина указана в журнале запуска dsh.",
|
|
618
|
+
"python.blocked": "Этот хост — Windows: экспериментальный бэкенд Python поддерживает только POSIX, переключатель недоступен.",
|
|
531
619
|
},
|
|
532
620
|
/* locale: sv */
|
|
533
621
|
"sv": {
|
|
@@ -561,6 +649,12 @@ window.__ModuleLoader__.load({
|
|
|
561
649
|
"sec.dedupe": "Deduplicering med PTC-skaparläget",
|
|
562
650
|
"dedupe.label": "Dubblerad post ”skaparläge · Git Bash”",
|
|
563
651
|
"dedupe.hint": "När dsh-ptc-cordis-preset är installerat samtidigt är dess ”PTC-skaparläge” redan Git Bash-versionen tack vare kopplingen, så det och det här pluginets ”skaparläge · Git Bash” pekar på samma sak. Med deduplicering på registrerar pluginet inte längre sin egen post (en färre i listan); av som standard, vilket lämnar de fyra varianterna oförändrade. Den här växeln är samma växel som på motpartens inställningskort — båda sidor delar ett tillstånd, en ändring på ena sidan synkas direkt till den andra. Visas bara när dsh-ptc-cordis-preset är installerat.",
|
|
652
|
+
"sec.python": "run_code-backend (experimentell Python)",
|
|
653
|
+
"python.label": "run_code-backend",
|
|
654
|
+
"python.on": "Python (experimentell)",
|
|
655
|
+
"python.off": "Node / TypeScript (standard)",
|
|
656
|
+
"python.hint": "Av (standard) använder run_code den officiella Node/TypeScript-backenden, byte för byte identisk med den medföljande ptc-kompositionen; på växlar dsh till den experimentella CPython-backenden (@deepseek-ai/dsh-experimental-ptc-runtime-python), vilket även byter run_codes språk, genererade SDK-prompt och presentation till Python. Kräver POSIX och CPython ≥ 3.10 (ej tillgängligt i Windows) och utesluter workflow-verktyget — den officiella Python-kompositionen stänger också av workflow, så workflow-sidan i alla fyra varianter hålls avstängd medan detta är på (ditt workflow-värde behålls och återställs när du stänger av). Gäller efter omstart av dsh; detta är samma växel på dsh-ptc-cordis-presets kort — båda sidor delar ett tillstånd. Visas bara när dsh-ptc-cordis-preset är installerat. Om påslaget inte får effekt står orsaken i dsh:s startlogg.",
|
|
657
|
+
"python.blocked": "Den här värden är Windows: den experimentella Python-backenden stöder bara POSIX, så växeln är otillgänglig.",
|
|
564
658
|
},
|
|
565
659
|
/* locale: th */
|
|
566
660
|
"th": {
|
|
@@ -594,6 +688,12 @@ window.__ModuleLoader__.load({
|
|
|
594
688
|
"sec.dedupe": "ตัดรายการซ้ำกับโหมดสร้างสรรค์ PTC",
|
|
595
689
|
"dedupe.label": "รายการซ้ำ «โหมดสร้างสรรค์ · Git Bash»",
|
|
596
690
|
"dedupe.hint": "เมื่อติดตั้ง dsh-ptc-cordis-preset ควบคู่กัน «โหมดสร้างสรรค์ PTC» ของมันเป็นเวอร์ชัน Git Bash อยู่แล้วจากการเชื่อมโยง จึงชี้ไปที่สิ่งเดียวกันกับ «โหมดสร้างสรรค์ · Git Bash» ของปลั๊กอินนี้ เมื่อเปิดการตัดรายการซ้ำ ปลั๊กอินนี้จะไม่ลงทะเบียนรายการของตัวเองอีก (รายการในสารบบลดลงหนึ่งรายการ); ปิดไว้เป็นค่าเริ่มต้น จึงคงสี่รูปแบบไว้เหมือนเดิม สวิตช์นี้คือสวิตช์เดียวกันกับบนการ์ดตั้งค่าของอีกฝ่าย — ทั้งสองฝั่งใช้สถานะเดียวกัน แก้ที่ฝั่งใดอีกฝั่งจะซิงก์ทันที แสดงเฉพาะเมื่อติดตั้ง dsh-ptc-cordis-preset แล้วเท่านั้น",
|
|
691
|
+
"sec.python": "แบ็กเอนด์ run_code (Python ทดลอง)",
|
|
692
|
+
"python.label": "แบ็กเอนด์ run_code",
|
|
693
|
+
"python.on": "Python (ทดลอง)",
|
|
694
|
+
"python.off": "Node / TypeScript (ค่าเริ่มต้น)",
|
|
695
|
+
"python.hint": "เมื่อปิด (ค่าเริ่มต้น) run_code จะใช้แบ็กเอนด์ Node/TypeScript อย่างเป็นทางการ ซึ่งเหมือนกับคอมโพซิชัน ptc ที่จัดส่งทุกไบต์; เมื่อเปิด dsh จะเปลี่ยนไปใช้แบ็กเอนด์ CPython ทดลอง (@deepseek-ai/dsh-experimental-ptc-runtime-python) ภาษา พรอมป์ต์ SDK ที่สร้างขึ้น และการนำเสนอของ run_code จะเปลี่ยนเป็น Python ต้องใช้ POSIX และ CPython ≥ 3.10 (ใช้ไม่ได้บน Windows) และใช้ร่วมกับเครื่องมือ workflow ไม่ได้ — คอมโพซิชัน Python อย่างเป็นทางการก็ปิด workflow เช่นกัน ฝั่ง workflow ของทั้งสี่รูปแบบจึงถูกปิดขณะเปิดอยู่ (ค่าที่คุณตั้งไว้จะถูกเก็บและกลับมาเมื่อปิด) การเปลี่ยนแปลงมีผลหลังรีสตาร์ต dsh; นี่คือสวิตช์เดียวกันบนการ์ดของ dsh-ptc-cordis-preset — ทั้งสองฝั่งใช้สถานะเดียวกัน แสดงเฉพาะเมื่อติดตั้ง dsh-ptc-cordis-preset แล้วเท่านั้น หากเปิดแล้วไม่เกิดผล เหตุผลอยู่ในบันทึกการเริ่มต้นของ dsh",
|
|
696
|
+
"python.blocked": "โฮสต์นี้เป็น Windows: แบ็กเอนด์ Python ทดลองรองรับเฉพาะ POSIX สวิตช์นี้จึงใช้ไม่ได้",
|
|
597
697
|
},
|
|
598
698
|
/* locale: tr */
|
|
599
699
|
"tr": {
|
|
@@ -627,6 +727,12 @@ window.__ModuleLoader__.load({
|
|
|
627
727
|
"sec.dedupe": "PTC yaratma moduyla yinelenen kaydı kaldırma",
|
|
628
728
|
"dedupe.label": "«Yaratma modu · Git Bash» yinelenen kaydı",
|
|
629
729
|
"dedupe.hint": "dsh-ptc-cordis-preset birlikte kuruluysa, bağlantı sayesinde onun «PTC yaratma modu» zaten Git Bash sürümüdür; dolayısıyla o ve bu eklentinin «Yaratma modu · Git Bash» kaydı aynı şeyi gösterir. Yinelenen kaydı kaldırma açıkken bu eklenti kendi kaydını artık kaydetmez (listede bir eksik); varsayılan olarak kapalıdır ve dört varyant değişmeden kalır. Bu anahtar, karşı tarafın ayar kartındaki anahtarın ta kendisidir — iki taraf aynı durumu paylaşır, bir taraftaki değişiklik anında diğerine eşitlenir. Yalnızca dsh-ptc-cordis-preset kurulu olduğunda görünür.",
|
|
730
|
+
"sec.python": "run_code arka ucu (deneysel Python)",
|
|
731
|
+
"python.label": "run_code arka ucu",
|
|
732
|
+
"python.on": "Python (deneysel)",
|
|
733
|
+
"python.off": "Node / TypeScript (varsayılan)",
|
|
734
|
+
"python.hint": "Kapalıyken (varsayılan) run_code resmî Node/TypeScript arka ucunu kullanır ve gönderilen ptc bileşimiyle bayt bayt aynıdır; açıldığında dsh deneysel CPython arka ucuna (@deepseek-ai/dsh-experimental-ptc-runtime-python) geçer; run_code dil, üretilen SDK istemi ve sunum Python'a döner. POSIX ve CPython ≥ 3.10 gerektirir (Windows'ta kullanılamaz) ve workflow aracıyla birbirini dışlar — resmî Python bileşimi de workflow'u kapatır, bu yüzden bu açıkken dört varyantın workflow tarafı kapalı kalır (workflow ayarın korunur ve kapatınca geri gelir). Değişiklik dsh yeniden başlatıldıktan sonra geçerli olur; bu, dsh-ptc-cordis-preset kartındaki aynı anahtardır — iki taraf tek durumu paylaşır. Yalnızca dsh-ptc-cordis-preset kurulu olduğunda görünür. Açmak etkili olmazsa nedeni dsh başlangıç günlüğünde yazar.",
|
|
735
|
+
"python.blocked": "Bu ana makine Windows: deneysel Python arka ucu yalnızca POSIX destekler, bu anahtar kullanılamaz.",
|
|
630
736
|
},
|
|
631
737
|
/* locale: vi */
|
|
632
738
|
"vi": {
|
|
@@ -660,6 +766,12 @@ window.__ModuleLoader__.load({
|
|
|
660
766
|
"sec.dedupe": "Loại bỏ trùng lặp với chế độ sáng tạo PTC",
|
|
661
767
|
"dedupe.label": "Mục trùng lặp «chế độ sáng tạo · Git Bash»",
|
|
662
768
|
"dedupe.hint": "Khi cài chung dsh-ptc-cordis-preset, nhờ liên kết mà «chế độ sáng tạo PTC» của nó đã là bản Git Bash, nên nó và «chế độ sáng tạo · Git Bash» của plugin này cùng chỉ một thứ. Khi bật loại bỏ trùng lặp, plugin này không đăng ký mục của riêng nó nữa (danh mục bớt một mục); mặc định tắt, giữ nguyên bốn biến thể. Công tắc này chính là công tắc trên thẻ cài đặt của bên kia — hai bên dùng chung một trạng thái, thay đổi ở bên nào cũng đồng bộ ngay sang bên kia. Chỉ hiện khi đã cài dsh-ptc-cordis-preset.",
|
|
769
|
+
"sec.python": "Backend run_code (Python thử nghiệm)",
|
|
770
|
+
"python.label": "Backend run_code",
|
|
771
|
+
"python.on": "Python (thử nghiệm)",
|
|
772
|
+
"python.off": "Node / TypeScript (mặc định)",
|
|
773
|
+
"python.hint": "Khi tắt (mặc định), run_code dùng backend Node/TypeScript chính thức, giống từng byte với tổ hợp ptc được phát hành; khi bật, dsh chuyển sang backend CPython thử nghiệm (@deepseek-ai/dsh-experimental-ptc-runtime-python), kéo theo ngôn ngữ, prompt SDK được sinh và cách trình bày của run_code chuyển sang Python. Yêu cầu POSIX và CPython ≥ 3.10 (không dùng được trên Windows) và loại trừ lẫn nhau với công cụ workflow — tổ hợp Python chính thức cũng tắt workflow, nên phía workflow của cả bốn biến thể bị tắt trong lúc bật (giá trị workflow của bạn được giữ và trở lại khi tắt). Thay đổi có hiệu lực sau khi khởi động lại dsh; đây chính là công tắc trên thẻ của dsh-ptc-cordis-preset — hai bên dùng chung một trạng thái. Chỉ hiện khi đã cài dsh-ptc-cordis-preset. Nếu bật mà không có hiệu lực, lý do nằm trong nhật ký khởi động dsh.",
|
|
774
|
+
"python.blocked": "Máy chủ này là Windows: backend Python thử nghiệm chỉ hỗ trợ POSIX, nên công tắc này không dùng được.",
|
|
663
775
|
},
|
|
664
776
|
/* locale: zh-hk */
|
|
665
777
|
"zh-hk": {
|
|
@@ -693,6 +805,12 @@ window.__ModuleLoader__.load({
|
|
|
693
805
|
"sec.dedupe": "與 PTC 創造模式去重",
|
|
694
806
|
"dedupe.label": "「創造模式 · Git Bash」重複項",
|
|
695
807
|
"dedupe.hint": "裝埋 dsh-ptc-cordis-preset 嗰陣,佢嘅「PTC 創造模式」喺聯動下已經係 Git Bash 版,同本插件嘅「創造模式 · Git Bash」指向同一件事。開咗去重之後本插件唔再註冊嗰一條(名錄少一項);預設關閉,保持四個變體不變。呢個開關就係對方設定卡上面同一個開關——兩邊共享同一份狀態,任一邊改動另一邊即刻同步。只喺已安裝 dsh-ptc-cordis-preset 時顯示。",
|
|
808
|
+
"sec.python": "run_code 後端(實驗性 Python)",
|
|
809
|
+
"python.label": "run_code 後端",
|
|
810
|
+
"python.on": "Python(實驗性)",
|
|
811
|
+
"python.off": "Node / TypeScript(預設)",
|
|
812
|
+
"python.hint": "閂咗(預設)嗰陣 run_code 用官方 Node/TypeScript 後端,同官方 ptc 組合逐位元組一致;開咗就轉用 dsh 實驗性 CPython 後端(@deepseek-ai/dsh-experimental-ptc-runtime-python),run_code 嘅語言、生成嘅 SDK 提示詞同工具呈現都會轉去 Python。需要 POSIX 平台同 CPython ≥ 3.10(Windows 用唔到),而且同 workflow 工具互斥——官方 Python 組合同樣停用 workflow,所以開住嗰陣本插件四個變體嘅 workflow 側會強制關閉(你嘅工作流設定值會保留,閂咗之後恢復)。改動要重啟 dsh 先生效;呢個開關就係 dsh-ptc-cordis-preset 設定卡上面同一個開關——兩邊共享同一份狀態。只喺已安裝 dsh-ptc-cordis-preset 時顯示。開咗之後唔生效,原因喺 dsh 啟動日誌度。",
|
|
813
|
+
"python.blocked": "呢部主機係 Windows:實驗性 Python 後端淨係支援 POSIX,所以呢個開關用唔到。",
|
|
696
814
|
},
|
|
697
815
|
/* locale: zh-mo */
|
|
698
816
|
"zh-mo": {
|
|
@@ -726,6 +844,12 @@ window.__ModuleLoader__.load({
|
|
|
726
844
|
"sec.dedupe": "與 PTC 創造模式去重",
|
|
727
845
|
"dedupe.label": "「創造模式 · Git Bash」重複項",
|
|
728
846
|
"dedupe.hint": "裝埋 dsh-ptc-cordis-preset 嗰陣,佢嘅「PTC 創造模式」喺聯動下已經係 Git Bash 版,同本插件嘅「創造模式 · Git Bash」指向同一件事。開咗去重之後本插件唔再註冊嗰一條(名錄少一項);預設關閉,保持四個變體不變。呢個開關就係對方設定卡上面同一個開關——兩邊共享同一份狀態,任一邊改動另一邊即刻同步。只喺已安裝 dsh-ptc-cordis-preset 時顯示。",
|
|
847
|
+
"sec.python": "run_code 後端(實驗性 Python)",
|
|
848
|
+
"python.label": "run_code 後端",
|
|
849
|
+
"python.on": "Python(實驗性)",
|
|
850
|
+
"python.off": "Node / TypeScript(預設)",
|
|
851
|
+
"python.hint": "閂咗(預設)嗰陣 run_code 用官方 Node/TypeScript 後端,同官方 ptc 組合逐位元組一致;開咗就轉用 dsh 實驗性 CPython 後端(@deepseek-ai/dsh-experimental-ptc-runtime-python),run_code 嘅語言、生成嘅 SDK 提示詞同工具呈現都會轉去 Python。需要 POSIX 平台同 CPython ≥ 3.10(Windows 用唔到),而且同 workflow 工具互斥——官方 Python 組合同樣停用 workflow,所以開住嗰陣本插件四個變體嘅 workflow 側會強制關閉(你嘅工作流設定值會保留,閂咗之後恢復)。改動要重啟 dsh 先生效;呢個開關就係 dsh-ptc-cordis-preset 設定卡上面同一個開關——兩邊共享同一份狀態。只喺已安裝 dsh-ptc-cordis-preset 時顯示。開咗之後唔生效,原因喺 dsh 啟動日誌度。",
|
|
852
|
+
"python.blocked": "呢部主機係 Windows:實驗性 Python 後端淨係支援 POSIX,所以呢個開關用唔到。",
|
|
729
853
|
},
|
|
730
854
|
/* locale: zh-tw */
|
|
731
855
|
"zh-tw": {
|
|
@@ -759,6 +883,12 @@ window.__ModuleLoader__.load({
|
|
|
759
883
|
"sec.dedupe": "與 PTC 創造模式去重",
|
|
760
884
|
"dedupe.label": "「創造模式 · Git Bash」重複項目",
|
|
761
885
|
"dedupe.hint": "同時安裝 dsh-ptc-cordis-preset 時,它的「PTC 創造模式」在聯動下已是 Git Bash 版,與本插件的「創造模式 · Git Bash」指向同一件事。開啟去重後本插件不再註冊那一條(清單少一項);預設關閉,保持四個變體不變。這個開關就是對方設定卡上的同一個開關——兩側共享同一份狀態,任一側改動另一側立即同步。僅在已安裝 dsh-ptc-cordis-preset 時顯示。",
|
|
886
|
+
"sec.python": "run_code 後端(實驗性 Python)",
|
|
887
|
+
"python.label": "run_code 後端",
|
|
888
|
+
"python.on": "Python(實驗性)",
|
|
889
|
+
"python.off": "Node / TypeScript(預設)",
|
|
890
|
+
"python.hint": "關閉(預設)時 run_code 使用官方 Node/TypeScript 後端,與官方 ptc 組合逐位元組一致;開啟後改用 dsh 實驗性 CPython 後端(@deepseek-ai/dsh-experimental-ptc-runtime-python),run_code 的語言、產生的 SDK 提示詞與工具呈現都會切換到 Python。需要 POSIX 平台與 CPython ≥ 3.10(Windows 無法使用),且與 workflow 工具互斥——官方 Python 組合同樣會停用 workflow,因此開啟期間本外掛四個變體的 workflow 側強制關閉(你的工作流設定值會保留,關閉後恢復)。變更需重新啟動 dsh 後生效;這個開關就是 dsh-ptc-cordis-preset 設定卡上的同一個開關——兩側共用同一份狀態。僅在已安裝 dsh-ptc-cordis-preset 時顯示。若設為開啟後未生效,原因見 dsh 啟動日誌。",
|
|
891
|
+
"python.blocked": "此主機是 Windows:實驗性 Python 後端僅支援 POSIX,因此這個開關無法使用。",
|
|
762
892
|
},
|
|
763
893
|
};
|
|
764
894
|
|
|
@@ -980,6 +1110,25 @@ window.__ModuleLoader__.load({
|
|
|
980
1110
|
return typeof unsubscribe === "function" ? unsubscribe : undefined;
|
|
981
1111
|
}, []);
|
|
982
1112
|
|
|
1113
|
+
/* The experimental Python backend refuses to load on Windows
|
|
1114
|
+
(packages/experimental/ptc-runtime-python: POSIX rlimits, fd-3
|
|
1115
|
+
stdio, process-group signals), and a browser cannot see the host
|
|
1116
|
+
OS. The one host fact this card can read is the remote face's
|
|
1117
|
+
reported home: a drive-letter path means a Windows host, which is
|
|
1118
|
+
exactly where that backend cannot run. Absent or unreadable keeps
|
|
1119
|
+
the switch usable — the host side still rejects an impossible
|
|
1120
|
+
write. */
|
|
1121
|
+
var winState = useState(false);
|
|
1122
|
+
var winHost = winState[0];
|
|
1123
|
+
var setWinHost = winState[1];
|
|
1124
|
+
useEffect(function () {
|
|
1125
|
+
try {
|
|
1126
|
+
var remote = props.ctx === undefined || props.ctx === null ? undefined : props.ctx.get("remote");
|
|
1127
|
+
var host = remote && remote.$host ? remote.$host.home : undefined;
|
|
1128
|
+
if (typeof host === "string" && /^[A-Za-z]:[\\/]/.test(host)) setWinHost(true);
|
|
1129
|
+
} catch (error_) { /* keep the switch usable */ }
|
|
1130
|
+
}, []);
|
|
1131
|
+
|
|
983
1132
|
var bashState = useState("");
|
|
984
1133
|
var bashDraft = bashState[0];
|
|
985
1134
|
var setBashDraft = bashState[1];
|
|
@@ -1137,10 +1286,58 @@ window.__ModuleLoader__.load({
|
|
|
1137
1286
|
),
|
|
1138
1287
|
) : null;
|
|
1139
1288
|
|
|
1289
|
+
/* Python row (v0.26.0): the SECOND seat of the PEER's switch. Unlike
|
|
1290
|
+
the dedupe row above, the value does NOT live on our row — the
|
|
1291
|
+
experimental run_code backend replaces a profile-level row, so its
|
|
1292
|
+
authoritative state is dsh-ptc-cordis-preset's own `pythonRuntime`
|
|
1293
|
+
field and BOTH cards read/write that one form. Drawn only when the
|
|
1294
|
+
peer's snapshot actually carries the field (an older peer without
|
|
1295
|
+
the switch draws nothing), and the buttons write through the peer
|
|
1296
|
+
form so either side syncs the other immediately. On a Windows host
|
|
1297
|
+
the switch is inert — the CPython backend refuses to load there —
|
|
1298
|
+
so the buttons give way to that reason. */
|
|
1299
|
+
var pythonOffered = peerSnap.status === "ready" && peerSnap.value !== null
|
|
1300
|
+
&& typeof peerSnap.value === "object"
|
|
1301
|
+
&& Object.prototype.hasOwnProperty.call(peerSnap.value, PEER_PYTHON_FIELD);
|
|
1302
|
+
var pythonOn = pythonOffered && peerSnap.value[PEER_PYTHON_FIELD] === true;
|
|
1303
|
+
function writePython(next) {
|
|
1304
|
+
setError("");
|
|
1305
|
+
if (peer === null || typeof peer.set !== "function") return;
|
|
1306
|
+
try {
|
|
1307
|
+
Promise.resolve(peer.set(PEER_PYTHON_FIELD, next)).then(
|
|
1308
|
+
function () { bumpTick(function (n) { return n + 1; }); },
|
|
1309
|
+
function (err) {
|
|
1310
|
+
bumpTick(function (n) { return n + 1; });
|
|
1311
|
+
setError(t("error") + ": " + (err && err.message ? err.message : String(err)));
|
|
1312
|
+
},
|
|
1313
|
+
);
|
|
1314
|
+
} catch (err) {
|
|
1315
|
+
bumpTick(function (n) { return n + 1; });
|
|
1316
|
+
setError(t("error") + ": " + (err && err.message ? err.message : String(err)));
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
var pythonSection = pythonOffered ? E("div", { className: "gb-section" },
|
|
1321
|
+
E("div", { className: "gb-sectionTitle" }, t("sec.python")),
|
|
1322
|
+
E("div", { className: "gb-stack" },
|
|
1323
|
+
E("div", { className: "gb-row" },
|
|
1324
|
+
E("span", { className: "gb-rowLabel" }, t("python.label") + ":"),
|
|
1325
|
+
E("span", { className: "gb-rowValue" }, pythonOn ? t("python.on") : t("python.off")),
|
|
1326
|
+
),
|
|
1327
|
+
winHost ? null : E("div", { className: "gb-seg" },
|
|
1328
|
+
E("button", { type: "button", className: "gb-segBtn" + (pythonOn ? " gb-segActive" : ""), onClick: function () { if (!pythonOn) writePython(true); } }, t("switch.on")),
|
|
1329
|
+
E("button", { type: "button", className: "gb-segBtn" + (!pythonOn ? " gb-segActive" : ""), onClick: function () { if (pythonOn) writePython(false); } }, t("switch.off")),
|
|
1330
|
+
),
|
|
1331
|
+
E("p", { className: "gb-hint" }, t("python.hint")),
|
|
1332
|
+
winHost ? E("p", { className: "gb-error" }, t("python.blocked")) : null,
|
|
1333
|
+
),
|
|
1334
|
+
) : null;
|
|
1335
|
+
|
|
1140
1336
|
var bodyContent = E("div", { className: "gb-body" },
|
|
1141
1337
|
dialectSection,
|
|
1142
1338
|
terminalSection,
|
|
1143
1339
|
dedupeSection,
|
|
1340
|
+
pythonSection,
|
|
1144
1341
|
error ? E("p", { className: "gb-error" }, error) : null,
|
|
1145
1342
|
);
|
|
1146
1343
|
|
package/src/compositions.js
CHANGED
|
@@ -12,7 +12,11 @@
|
|
|
12
12
|
* one Git Bash delta: the bash rows are always on and the pwsh rows are
|
|
13
13
|
* always off (the host executor is this plugin's shell.js — on non-Windows
|
|
14
14
|
* hosts that is the native stack anyway, which is exactly what the old
|
|
15
|
-
* materialized variants encoded).
|
|
15
|
+
* materialized variants encoded). A second, conditional delta exists while
|
|
16
|
+
* dsh-ptc-cordis-preset reports its experimental-CPython switch on: the two
|
|
17
|
+
* workflow rows follow the official Python composition and go off (see
|
|
18
|
+
* `pythonRuntime` below). With that switch off — the default — the rows are
|
|
19
|
+
* the official ones unchanged.
|
|
16
20
|
*/
|
|
17
21
|
|
|
18
22
|
/** Default Git Bash binary — must match src/shell.js and the patch config. */
|
|
@@ -44,13 +48,22 @@ When ready, call exit_plan_mode with the complete plan markdown, starting with a
|
|
|
44
48
|
* @param {boolean} input.gitBash - bash rows always on, pwsh rows always off.
|
|
45
49
|
* @param {string|undefined} input.skillsDir - Creation authoring skills
|
|
46
50
|
* directory (cordis variant only; resolved beside the agent-preset package).
|
|
51
|
+
* @param {boolean} [input.pythonRuntime] - the peer's experimental-CPython
|
|
52
|
+
* switch. `workflow-ptc` hard-requires `ctx.ptcRuntime.language ===
|
|
53
|
+
* 'typescript'` (packages/workflow/workflow-ptc/src/index.ts:117) while the
|
|
54
|
+
* CPython backend reports 'python', and a throwing preset row rejects the
|
|
55
|
+
* WHOLE mount (agent-preset-registry mount.ts). The official Python
|
|
56
|
+
* composition disables both workflow rows for exactly this reason
|
|
57
|
+
* (snapshots/session/ptc-python-turn/cordis.yml), so with the switch on
|
|
58
|
+
* every variant mirrors that: the two rows go off, the user's own workflow
|
|
59
|
+
* setting is untouched and returns when the switch goes back off.
|
|
47
60
|
* @returns {object[]} the declarative plugins list.
|
|
48
61
|
*/
|
|
49
|
-
export function pluginsFor({ kind, gitBash, skillsDir }) {
|
|
62
|
+
export function pluginsFor({ kind, gitBash, skillsDir, pythonRuntime = false }) {
|
|
50
63
|
const win = typeof process !== 'undefined' && process.platform === 'win32'
|
|
51
64
|
const bashDisabled = gitBash ? false : win
|
|
52
65
|
const pwshDisabled = gitBash ? true : !win
|
|
53
|
-
const workflowOn = kind !== 'ptc'
|
|
66
|
+
const workflowOn = kind !== 'ptc' && pythonRuntime !== true
|
|
54
67
|
const rows = [
|
|
55
68
|
{
|
|
56
69
|
id: 'persona',
|
package/src/index.js
CHANGED
|
@@ -102,9 +102,37 @@ export const PRESET_IDS = ['standard-gitbash', 'minimal-gitbash', 'code-gitbash'
|
|
|
102
102
|
*/
|
|
103
103
|
export const PEER_COVERED_PRESET_ID = 'cordis-gitbash'
|
|
104
104
|
|
|
105
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Service dsh-ptc-cordis-preset publishes:
|
|
107
|
+
* `{ id, gitBashActive, pythonRuntime }`. `pythonRuntime` (boolean, default
|
|
108
|
+
* false when absent, read from a getter too) is the peer's experimental
|
|
109
|
+
* CPython switch for run_code.
|
|
110
|
+
*/
|
|
106
111
|
export const PEER_CAPABILITY = 'ptcCordisPreset'
|
|
107
112
|
|
|
113
|
+
/** The peer's CPython-switch field, on its capability and on its row Config. */
|
|
114
|
+
export const PEER_PYTHON_FIELD = 'pythonRuntime'
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Read one boolean fact off the peer's capability object. A getter is honoured
|
|
118
|
+
* so a live peer can report its current switch rather than a boot-time copy;
|
|
119
|
+
* anything absent, of the wrong type, or throwing reads as false — the
|
|
120
|
+
* conservative direction is always "the official Node backend is in use".
|
|
121
|
+
* @param {object|undefined} capability - the peer's published capability.
|
|
122
|
+
* @param {string} field - the field name to read.
|
|
123
|
+
* @returns {boolean} the fact, false when it cannot be established.
|
|
124
|
+
*/
|
|
125
|
+
export function peerFact(capability, field) {
|
|
126
|
+
if (capability === null || capability === undefined) return false
|
|
127
|
+
try {
|
|
128
|
+
const raw = capability[field]
|
|
129
|
+
const value = typeof raw === 'function' ? raw.call(capability) : raw
|
|
130
|
+
return value === true
|
|
131
|
+
} catch {
|
|
132
|
+
return false
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
108
136
|
/**
|
|
109
137
|
* The roster this plugin serves: the configured list, minus the variant a peer
|
|
110
138
|
* already covers. Two independent facts must BOTH hold before anything is
|
|
@@ -956,9 +984,16 @@ export async function detectPeerCoverage(ctx, timeoutMs = 1000, intervalMs = 25)
|
|
|
956
984
|
// a path as a whole-value FIELD, which never goes through here (driveToMsys).
|
|
957
985
|
// The lookbehind set rejects URL schemes (https:), file:// forms, and anything
|
|
958
986
|
// already mid-word, so only real drive-letter paths are translated. Separators
|
|
959
|
-
// normalize to single slashes.
|
|
960
|
-
|
|
961
|
-
|
|
987
|
+
// normalize to single slashes. The separator group after the colon consumes
|
|
988
|
+
// EVERY consecutive separator (`[\\/]+`), not just one (v0.26.0, issue #10):
|
|
989
|
+
// JSON-escaped Windows paths ("D:\\dsh\\工作" as the host renders
|
|
990
|
+
// `${JSON.stringify(workspaceRoot)}` in sandbox:policy) carry a DOUBLED
|
|
991
|
+
// backslash, and a single-separator atom left the second one at the head of
|
|
992
|
+
// `rest`, where the separator normalization turned it into a leading slash —
|
|
993
|
+
// "/d/" + "/dsh/工作" = "/d//dsh/工作", a non-canonical workspace root the
|
|
994
|
+
// model then copied. Single-separator inputs are byte-for-byte unchanged.
|
|
995
|
+
const BARE_WIN_PATH = /(?<![A-Za-z0-9:\\/"'`])([A-Za-z]):[\\/]+([^\s"'`<>|),;:!?]+(?: [^\s"'`<>|),;:!?]*[\\/][^\s"'`<>|),;:!?]*)*)/g
|
|
996
|
+
const QUOTED_WIN_PATH = /(["'`])([A-Za-z]):[\\/]+([^`]*?)\1/g
|
|
962
997
|
|
|
963
998
|
/** Rewrite every Windows absolute path in a text to the MSYS form; pure. */
|
|
964
999
|
export function windowsToMsys(text) {
|
|
@@ -1254,6 +1289,36 @@ const translateEnvCache = new Map()
|
|
|
1254
1289
|
* (the default install plus every PATH entry) and accepts a root only when
|
|
1255
1290
|
* <root>/usr/bin exists, which excludes the WSL bash shim in WindowsApps.
|
|
1256
1291
|
*/
|
|
1292
|
+
/**
|
|
1293
|
+
* One dispatch's path-bearing arguments in the host dialect (pure). The
|
|
1294
|
+
* tools/execute wrapper's decision surface, exported so a test can drive the
|
|
1295
|
+
* whole argument face without a Windows host — the shape issue #8 escaped
|
|
1296
|
+
* through: pure helpers were covered, the wiring that feeds them was not.
|
|
1297
|
+
* @param {{ name?: string, arguments?: object }} exec - the dispatch envelope.
|
|
1298
|
+
* @param {object} dialect - live dialect switches (posixPaths/globSplit/codePaths).
|
|
1299
|
+
* @param {object|null} env - mount table (buildTranslateEnv), null when mounts are off.
|
|
1300
|
+
* @returns {object|undefined} the translated arguments (same reference when untouched).
|
|
1301
|
+
*/
|
|
1302
|
+
export function translateDispatch(exec, dialect, env) {
|
|
1303
|
+
if (!exec || !exec.arguments || typeof exec.arguments !== 'object') return exec?.arguments
|
|
1304
|
+
let translated = translatePathArguments(exec.arguments, env)
|
|
1305
|
+
if (exec.name === 'glob' && dialect.globSplit) {
|
|
1306
|
+
const globTranslated = translateGlobArguments(translated, env)
|
|
1307
|
+
if (globTranslated !== translated) translated = globTranslated
|
|
1308
|
+
}
|
|
1309
|
+
// v0.20.0: a run_code program is DATA for a native Node process, so a
|
|
1310
|
+
// '/c/...' literal inside it never reached this layer and landed on the
|
|
1311
|
+
// current drive as '<drive>:\c\...'. The same mount table covers the program
|
|
1312
|
+
// path literals (see rewriteCodePaths; anything unclear leaves the code
|
|
1313
|
+
// untouched).
|
|
1314
|
+
if (exec.name === 'run_code' && dialect.codePaths && typeof translated.code === 'string') {
|
|
1315
|
+
const rewritten = rewriteCodePaths(translated.code, env)
|
|
1316
|
+
const nextCode = programPrelude(env) + rewritten
|
|
1317
|
+
if (nextCode !== translated.code) translated = { ...translated, code: nextCode }
|
|
1318
|
+
}
|
|
1319
|
+
return translated
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1257
1322
|
export function buildTranslateEnv(configuredBashPath) {
|
|
1258
1323
|
const cacheKey = typeof configuredBashPath === 'string' && configuredBashPath !== '' ? configuredBashPath : ''
|
|
1259
1324
|
const cached = translateEnvCache.get(cacheKey)
|
|
@@ -1869,13 +1934,13 @@ function adoptSidebarShell(ctx, bashPath, readAdopt) {
|
|
|
1869
1934
|
reverted = true
|
|
1870
1935
|
const s = ctx.get('settings')
|
|
1871
1936
|
if (!s || typeof s.update !== 'function') return
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
if (String(now
|
|
1937
|
+
// Era-aware read (v0.25.1): `settings.get(ns)` is gone on dsh >= 0.1.7, so
|
|
1938
|
+
// the old call threw straight into the catch and the takeover was NEVER
|
|
1939
|
+
// reverted when this plugin unloaded — same missed-era-read class as
|
|
1940
|
+
// issue #8 (readShell above carries both branches).
|
|
1941
|
+
const now = readShell()
|
|
1942
|
+
if (now === null) return
|
|
1943
|
+
if (String(now) === bashPath) {
|
|
1879
1944
|
s.update(SIDEBAR_NS, { terminalShell: previous }).catch(() => {})
|
|
1880
1945
|
}
|
|
1881
1946
|
},
|
|
@@ -1992,12 +2057,12 @@ function cleanupLegacyTrees(presetIds) {
|
|
|
1992
2057
|
* failures stay visible through the roster's broken diagnostic instead of
|
|
1993
2058
|
* failing the boot.
|
|
1994
2059
|
*/
|
|
1995
|
-
async function registerVariant(ctx, presetId, { gitBashActive, skillsDir }) {
|
|
2060
|
+
async function registerVariant(ctx, presetId, { gitBashActive, skillsDir, pythonRuntime }) {
|
|
1996
2061
|
const meta = PRESET_META[presetId]
|
|
1997
2062
|
if (!meta) return undefined
|
|
1998
2063
|
const plugins = meta.kind === 'minimal'
|
|
1999
2064
|
? minimalPluginsFor()
|
|
2000
|
-
: pluginsFor({ kind: meta.kind, gitBash: gitBashActive, skillsDir })
|
|
2065
|
+
: pluginsFor({ kind: meta.kind, gitBash: gitBashActive, skillsDir, pythonRuntime })
|
|
2001
2066
|
return ctx.agentPresets.register({
|
|
2002
2067
|
id: presetId,
|
|
2003
2068
|
name: meta.name,
|
|
@@ -2010,10 +2075,12 @@ async function registerVariant(ctx, presetId, { gitBashActive, skillsDir }) {
|
|
|
2010
2075
|
/**
|
|
2011
2076
|
* Declarative-era wiring: keep exactly one registration per VARIANT THIS HOST
|
|
2012
2077
|
* SHOULD SERVE for the plugin's lifetime, and re-reconcile whenever that set
|
|
2013
|
-
* changes.
|
|
2078
|
+
* changes. Three inputs drive it — the live `suppressPeerCordis` switch, the
|
|
2014
2079
|
* peer capability appearing (or leaving) via `ctx.inject`, which fires
|
|
2015
|
-
* independent of row activation order
|
|
2016
|
-
*
|
|
2080
|
+
* independent of row activation order, and the peer's experimental-CPython
|
|
2081
|
+
* fact (`pythonRuntime`), which changes the ROWS of every variant — and the
|
|
2082
|
+
* peer's own coverage only counts while it reports a Git Bash-materialized
|
|
2083
|
+
* preset.
|
|
2017
2084
|
*
|
|
2018
2085
|
* The roster picks entries up immediately; sessions already pinned to a
|
|
2019
2086
|
* variant keep their revision until recomposed, so suppressing a variant never
|
|
@@ -2030,6 +2097,9 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2030
2097
|
/** presetId -> unregister, i.e. exactly what is live right now. */
|
|
2031
2098
|
const live = new Map()
|
|
2032
2099
|
let peerGitBash = false
|
|
2100
|
+
let peerPython = false
|
|
2101
|
+
/** The CPython fact the LIVE registrations were built with. */
|
|
2102
|
+
let registeredPython = false
|
|
2033
2103
|
let serial = Promise.resolve()
|
|
2034
2104
|
|
|
2035
2105
|
const desired = () => effectivePresetIds(presetIds, { suppress: readSuppress(), peerGitBash })
|
|
@@ -2037,6 +2107,22 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2037
2107
|
const reconcile = () => {
|
|
2038
2108
|
serial = serial.then(async () => {
|
|
2039
2109
|
const want = desired()
|
|
2110
|
+
// The peer's CPython switch rewrites the workflow rows of EVERY variant
|
|
2111
|
+
// (the official Python composition disables them, and workflow-ptc
|
|
2112
|
+
// refuses a non-TypeScript backend), so a flip re-registers the live
|
|
2113
|
+
// variants instead of leaving stale rows mounted. Same cadence as the
|
|
2114
|
+
// backend swap itself: the peer's patch is evaluated at boot.
|
|
2115
|
+
if (live.size > 0 && registeredPython !== peerPython) {
|
|
2116
|
+
for (const [presetId, off] of [...live]) {
|
|
2117
|
+
live.delete(presetId)
|
|
2118
|
+
try {
|
|
2119
|
+
await off()
|
|
2120
|
+
console.log(TAG + " preset '" + presetId + "' retired (peer CPython switch changed; rows are rebuilt)")
|
|
2121
|
+
} catch (error) {
|
|
2122
|
+
console.log(TAG + " preset '" + presetId + "' retirement failed: " + (error && error.message ? error.message : error))
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2040
2126
|
for (const [presetId, off] of [...live]) {
|
|
2041
2127
|
if (want.includes(presetId)) continue
|
|
2042
2128
|
live.delete(presetId)
|
|
@@ -2050,7 +2136,7 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2050
2136
|
for (const presetId of want) {
|
|
2051
2137
|
if (live.has(presetId)) continue
|
|
2052
2138
|
try {
|
|
2053
|
-
const unregister = await registerVariant(ctx, presetId, { gitBashActive, skillsDir })
|
|
2139
|
+
const unregister = await registerVariant(ctx, presetId, { gitBashActive, skillsDir, pythonRuntime: peerPython })
|
|
2054
2140
|
if (unregister) {
|
|
2055
2141
|
live.set(presetId, unregister)
|
|
2056
2142
|
console.log(TAG + " preset '" + presetId + "' registered declaratively")
|
|
@@ -2059,6 +2145,7 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2059
2145
|
console.log(TAG + " preset '" + presetId + "' registration failed: " + (error && error.message ? error.message : error))
|
|
2060
2146
|
}
|
|
2061
2147
|
}
|
|
2148
|
+
registeredPython = peerPython
|
|
2062
2149
|
}).catch((error) => {
|
|
2063
2150
|
console.log(TAG + ' preset reconcile failed: ' + (error && error.message ? error.message : error))
|
|
2064
2151
|
})
|
|
@@ -2075,17 +2162,21 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2075
2162
|
ctx.inject([PEER_CAPABILITY], (peerCtx) => {
|
|
2076
2163
|
try {
|
|
2077
2164
|
const coverage = peerCtx[PEER_CAPABILITY] ?? peerCtx.get(PEER_CAPABILITY)
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2080
|
-
|
|
2165
|
+
const nextGitBash = peerFact(coverage, 'gitBashActive')
|
|
2166
|
+
const nextPython = peerFact(coverage, PEER_PYTHON_FIELD)
|
|
2167
|
+
if (nextGitBash !== peerGitBash || nextPython !== peerPython) {
|
|
2168
|
+
peerGitBash = nextGitBash
|
|
2169
|
+
peerPython = nextPython
|
|
2170
|
+
if (nextPython) console.log(TAG + ' peer reports the experimental CPython run_code backend: workflow rows go off in every variant')
|
|
2081
2171
|
void reconcile()
|
|
2082
2172
|
}
|
|
2083
2173
|
} catch (error) {
|
|
2084
2174
|
console.log(TAG + ' peer coverage read failed: ' + (error && error.message ? error.message : error))
|
|
2085
2175
|
}
|
|
2086
2176
|
peerCtx.effect(() => () => {
|
|
2087
|
-
if (!peerGitBash) return
|
|
2177
|
+
if (!peerGitBash && !peerPython) return
|
|
2088
2178
|
peerGitBash = false
|
|
2179
|
+
peerPython = false
|
|
2089
2180
|
void reconcile()
|
|
2090
2181
|
}, 'dsh-gitbash-shell: peer coverage release')
|
|
2091
2182
|
})
|
|
@@ -2331,27 +2422,21 @@ export async function apply(ctx, config = {}) {
|
|
|
2331
2422
|
let echo = false
|
|
2332
2423
|
let echoEnv = null
|
|
2333
2424
|
try {
|
|
2334
|
-
|
|
2425
|
+
// The LIVE, era-aware reader (v0.25.1, issue #8). The legacy
|
|
2426
|
+
// `readDialectSettings(ctx)` reads `settings.get(ns)`, which does not
|
|
2427
|
+
// exist on dsh >= 0.1.7 — it returned the all-off fallback, so this
|
|
2428
|
+
// wrapper translated NOTHING while the directive and the shell env
|
|
2429
|
+
// (both already on the live reader) kept working: `/c/...` reached the
|
|
2430
|
+
// file tools untranslated, `~` was never expanded, `glob.path` and
|
|
2431
|
+
// `bash.workdir` went through raw, and an in-workspace `/c/...` write
|
|
2432
|
+
// fell outside the sandbox. One missed call site, five symptoms.
|
|
2433
|
+
const dialect = liveSettings.dialect()
|
|
2335
2434
|
if (dialect.posixPaths) {
|
|
2336
2435
|
echo = true
|
|
2337
2436
|
const env = dialect.virtualMounts ? buildTranslateEnv(dialect.bashPath) : null
|
|
2338
2437
|
echoEnv = env
|
|
2339
2438
|
if (exec && exec.arguments && typeof exec.arguments === 'object') {
|
|
2340
|
-
|
|
2341
|
-
if (exec.name === 'glob' && dialect.globSplit) {
|
|
2342
|
-
const globTranslated = translateGlobArguments(translated, env)
|
|
2343
|
-
if (globTranslated !== translated) translated = globTranslated
|
|
2344
|
-
}
|
|
2345
|
-
// v0.20.0: a run_code program is DATA for a native Node process, so
|
|
2346
|
-
// a '/c/...' literal inside it never reached this layer and landed
|
|
2347
|
-
// on the current drive as '<drive>:\\c\\...'. The same mount table
|
|
2348
|
-
// now covers the program path literals (see rewriteCodePaths;
|
|
2349
|
-
// anything unclear leaves the code untouched).
|
|
2350
|
-
if (exec.name === 'run_code' && dialect.codePaths && typeof translated.code === 'string') {
|
|
2351
|
-
const rewritten = rewriteCodePaths(translated.code, env)
|
|
2352
|
-
const nextCode = programPrelude(env) + rewritten
|
|
2353
|
-
if (nextCode !== translated.code) translated = { ...translated, code: nextCode }
|
|
2354
|
-
}
|
|
2439
|
+
const translated = translateDispatch(exec, dialect, env)
|
|
2355
2440
|
if (translated !== exec.arguments) exec.arguments = translated
|
|
2356
2441
|
}
|
|
2357
2442
|
}
|
|
@@ -2572,4 +2657,4 @@ export async function apply(ctx, config = {}) {
|
|
|
2572
2657
|
}
|
|
2573
2658
|
|
|
2574
2659
|
// Test surface: pure helpers, no Cordis context required.
|
|
2575
|
-
export const _internal = { PRESET_IDS, PEER_COVERED_PRESET_ID, PEER_CAPABILITY, effectivePresetIds, detectPeerCoverage, readSuppressPeerCordis, translateMsysPath, translatePathArguments, rewriteCodePaths, scanCodeLiterals, programPrelude, translateGlobArguments, buildTranslateEnv, rewriteErrorContent, rewriteErrorMessage, rewriteFailureMessage, msysEcho, driveToMsys, pathEcho, ERROR_CONTENT_TOOLS, readPosixPaths, readAdoptSidebar, readDialectSettings, windowsToMsys, rewriteResultPaths, adoptSidebarShell, MARKER_FILE, classify, materialize, cleanupOnDispose, firstUserRoot, hashTree, skillsHashes, syncDecision, installRegisterShim, baseForRoster, detectBase, pickComposition, personaEraForText, detectPersonaEra, injectPresentRow, hostHasToolPresent, detectPresentSupport, injectPluginManagerRow, hostHasPluginManagerTools, rowFormOf, rowFormsOf, alignEngineRow, alignRalphRow, ROW_SOURCE }
|
|
2660
|
+
export const _internal = { PRESET_IDS, PEER_COVERED_PRESET_ID, PEER_CAPABILITY, PEER_PYTHON_FIELD, peerFact, effectivePresetIds, detectPeerCoverage, readSuppressPeerCordis, translateDispatch, translateMsysPath, translatePathArguments, rewriteCodePaths, scanCodeLiterals, programPrelude, translateGlobArguments, buildTranslateEnv, rewriteErrorContent, rewriteErrorMessage, rewriteFailureMessage, msysEcho, driveToMsys, pathEcho, ERROR_CONTENT_TOOLS, readPosixPaths, readAdoptSidebar, readDialectSettings, windowsToMsys, rewriteResultPaths, adoptSidebarShell, MARKER_FILE, classify, materialize, cleanupOnDispose, firstUserRoot, hashTree, skillsHashes, syncDecision, installRegisterShim, baseForRoster, detectBase, pickComposition, personaEraForText, detectPersonaEra, injectPresentRow, hostHasToolPresent, detectPresentSupport, injectPluginManagerRow, hostHasPluginManagerTools, rowFormOf, rowFormsOf, alignEngineRow, alignRalphRow, ROW_SOURCE }
|