dsh-gitbash-shell 0.26.0 → 0.26.1
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 +25 -0
- package/README.md +7 -0
- package/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/client.js +37 -1
- package/src/compositions.js +19 -15
- package/src/index.js +79 -19
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
> 倒序排列,新版本条目在最上面。条目格式:`## vX.Y.Z — YYYY-MM-DD` + 类型(feat / fix / docs / chore)+ 要点 + 相关链接。
|
|
4
4
|
> 纪律见 AGENTS.md「变更记录纪律」:发版前先更新本文件并随版本提交;事故复盘、复现与真机验证记录也记在这里。
|
|
5
5
|
|
|
6
|
+
## v0.26.1 — 2026-09-25
|
|
7
|
+
|
|
8
|
+
**类型**:fix(v0.26.0 的 workflow 互斥按「意图」而非「生效态」收敛:后端不可用时用户会白丢 workflow 能力)
|
|
9
|
+
|
|
10
|
+
> v0.26.0 把互斥条件写成「对方能力报 `pythonRuntime: true`」——那是**用户意图**。当对方的 preflight 失败(包被移除、解释器不合格、Windows),`!!js` 兜底与组合实际仍跑 Node,而本插件却已经把四个变体的 `workflow-ptc`/`tool-workflow` 关掉了:用户白丢一项能力,且卡片显示"已开启"与实际不符。dsh-ptc-cordis-preset **v0.15.1** 在能力服务上加了**加法字段** `pythonBackend: 'python' | 'node'`(用与 `!!js` 完全相同的合取计算),本版据此收敛。
|
|
11
|
+
|
|
12
|
+
- **① 互斥只在真正生效时发生**:新增纯函数 `pythonBackendActive(capability)` = 「意图 `pythonRuntime` 为真 **且** 生效态为 `'python'`」;`pluginsFor({ …, pythonActive })` 的形参由 `pythonRuntime` 改名 **`pythonActive`**,语义写明「run_code 实际会用的后端」——`workflowOn = kind !== 'ptc' && pythonActive !== true`。
|
|
13
|
+
- **② 旧 peer 回退(兼容硬要求)**:`peerBackend()` 对缺字段 / 类型不符 / getter 抛错一律返回 `undefined`(绝不把"没报"读成 `'node'`),`pythonBackendActive` 此时**用意图顶替** ⇒ 对方 < 0.15.1 的行为与 v0.26.0 **完全一致**,不会因缺字段崩溃或改变既有联动。
|
|
14
|
+
- **③ 日志把"真换了"与"想换但没生效"分开**:生效 → `peer reports the experimental CPython run_code backend: workflow rows go off in every variant`;意图 on 但未生效 → `peer has the CPython switch on but the effective backend is node|unreported (older peer: the intent stands in): workflow rows stay on (reason in the host log)`。
|
|
15
|
+
- **④ 卡片显示真实状态(防御性实现,当前不可达)**:从**同一份 peer 快照**读可选的 `pythonBackend`;意图 on + 生效 `node` ⇒ 状态值显示「Python(实验性) · **后端不可用,当前仍为 Node(原因见宿主启动日志)**」并另起一行红字;新增第 7 个词典键 `python.degraded`(**21 门语言**同齐)。字段缺省(旧 peer)⇒ 卡片与 v0.26.0 **逐字节一致**(不显示降级态)。
|
|
16
|
+
- **可达性拆分(Lead 裁决 A,2026-09-25)**:**「意图 on + 生效 node」这个状态本身是可达的** —— ptc 侧不拒绝把意图落成 true(Lead 明确不授权任何"单方面回写用户 settings 表单值"的行为,即不做"点开关被拒绝")。**不可达的是本插件这行降级显示**:浏览器侧只能读 `configForms.get('ptc-cordis').getSnapshot().value`(该行 **Config / settings 表单**),而 `pythonBackend` 只挂在**能力服务**上(宿主侧,浏览器读不到),ptc v0.15.1 的 Config schema 里没有该字段。因此现状是:ptc 卡显示 on + 红字原因,**本插件卡只显示 on**(hint 已指向宿主日志)。
|
|
17
|
+
- **后续项(本轮不做,避免再开一轮发布)**:由对方用**加法只读字段**把 `pythonBackend`/`pythonIssue` **投影进行 Config 快照**(不动用户意图字段 `pythonRuntime`);那一刻本插件**无需改动**即自动亮起(读的就是同一个键)。已记入最终报告的「已知限制/后续项」。
|
|
18
|
+
- **测试**:冒烟 **83/83 绿**(改写 2 条到 `pythonActive` 语义 + 新增 3 条:①生效态矩阵含旧 peer 回退与闭集校验 ②降级意图只上报不驱动 ③卡片降级态与 21 语言文案);`tests/align-official.mjs` 四个变体仍全绿(本版不动组合的官方行形态)。
|
|
19
|
+
- **真机 A/B/C(隔离 `DSH_HOME` + 新建 profile + `link:` 安装 + 探针能力,dsh 0.1.7-rc.2,本机 macOS,端口 3262-3264,收尾已清理)**:探针分别报三种能力形态,读数(`readDocument()` 的 `disabled`)与日志三例全部符合预期:
|
|
20
|
+
|
|
21
|
+
| 探针能力 | 日志 | 四变体的 `workflow-ptc`/`tool-workflow` |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| `{pythonRuntime:true, pythonBackend:'python'}` | `peer reports the experimental CPython run_code backend: workflow rows go off in every variant` + 四条 `retired … (peer CPython backend changed; rows are rebuilt)` | **`disabled: true`**(互斥生效) |
|
|
24
|
+
| `{pythonRuntime:true, pythonBackend:'node'}` | `peer has the CPython switch on but the effective backend is node: workflow rows stay on (reason in the host log)`(**无**重建日志,行未变) | **保持启用**(`standard/cordis-gitbash` 不丢 workflow;`code-gitbash` 本就关) |
|
|
25
|
+
| `{pythonRuntime:true}`(旧 peer,缺生效字段) | 与第一行相同(意图顶替) | `disabled: true` —— 与 v0.26.0 行为**逐字节一致** |
|
|
26
|
+
|
|
27
|
+
- 协作边界:v0.15.1 的 `pythonBackend` 是**加法字段**,本插件零形状破坏;`pythonRuntime` 仍是两侧卡片读写的权威**意图**字段。发布后由 contract-rc2 在 task-10 复验两条通道一致性。
|
|
28
|
+
|
|
6
29
|
## v0.26.0 — 2026-09-25
|
|
7
30
|
|
|
8
31
|
**类型**:feat(run_code 的实验性 Python 后端开关,与 dsh-ptc-cordis-preset 双向联动)+ fix(issue #10:JSON 转义的 Windows 路径多出前导斜杠)+ chore(dsh 0.1.7-rc.2 增量对齐复核)
|
|
@@ -39,6 +62,8 @@
|
|
|
39
62
|
- **B(探针报 `pythonRuntime: true`)**:出现上面两行日志,四个变体**全部重建**,读数变为两行 `disabled: true`。
|
|
40
63
|
- **两态都做真实挂载**:`agentPresets.acquireScope('<variant>')` 四个变体各返回 `MOUNT OK`(挂载审计无 failed 行),证明显式注册的组合在 rc.2 上确实可挂载,而不只是"注册成功"。
|
|
41
64
|
- **Windows 专属面**:win32 分支(卡片禁用态、宿主拒绝写入、python 后端构造抛错)在 macOS 上**无法真机验证**,按实现 + 单测/模拟记录;本插件的执行器与路径方言层按 `process.platform === 'win32'` 门控,而 python 后端仅 POSIX,两者在各自平台上互不重叠。
|
|
65
|
+
- **独立验证(发布后补记,2026-09-25,task-8,由另一位成员执行)**:用 **npm 已发布的 `dsh-gitbash-shell@0.26.0`** + `dsh-ptc-cordis-preset@0.15.0` 在隔离 `DSH_HOME` 上复验 —— **ptc → gitbash 方向联动通过**:把对方的行 Config `pythonRuntime` 置 `true` 后 boot,本插件打出 `peer reports the experimental CPython run_code backend: workflow rows go off in every variant` 以及四条 `retired … (peer CPython switch changed; rows are rebuilt)`;关态 boot **没有**这些行 ⇒ 能力感知 + 变体重建按设计工作(完整报告:`_rc2-contract/PYTHON-SWITCH-VERIFY.md`)。
|
|
66
|
+
- 仍未覆盖(留给集成阶段/真机):**反方向「在 gitbash 卡上改 → ptc 跟随」与两张卡的 UI 即时同步**(headless 无法操作设置卡,需真实 web 实例人工点选;两侧写的是同一个 `configForms` 字段,机制与 v0.25.0 已验证的 dedupe 镜像同构)以及 **win32 真机**(本机无 Windows;静态核对确认 ptc 侧平台表达式与 python 后端 `ptc-runtime-python/src/index.ts:837-839` 的「win32 构造即抛」一致,本插件侧按 `python.blocked` + 不画按钮实现平台限制)。
|
|
42
67
|
- 相关:issue #10 https://github.com/KannaKuron/dsh-gitbash-shell/issues/10 ;对方仓库 dsh-ptc-cordis-preset v0.15.0(能力字段与运行行)
|
|
43
68
|
|
|
44
69
|
## v0.25.1 — 2026-09-24
|
package/README.md
CHANGED
|
@@ -204,6 +204,13 @@ Config 的布尔字段 `pythonRuntime`(默认 `false`),由它在 profile 组合
|
|
|
204
204
|
`language`/`executionInstructions` 决定,组合文本不变)。
|
|
205
205
|
- **生效时机**:**重启 dsh 之后生效**(后端行的替换在 profile 组合期求值);设置卡上的状态
|
|
206
206
|
两侧即时同步,只有后端切换需要重启。若开启后没有生效,原因见 dsh 启动日志。
|
|
207
|
+
- **"想开"与"真的开了"是两件事**:后端不可用(包被移除 / 解释器低于 3.10 / Windows)时,开关的
|
|
208
|
+
意图仍可为"开",但组合**照旧跑 Node** —— 此时 **workflow 侧不再被连带禁用**(v0.26.1:互斥只看
|
|
209
|
+
实际生效的后端;v0.26.0 只看意图,会让用户白丢 workflow 能力),**原因见 dsh 启动日志**。
|
|
210
|
+
> 关于卡片上的"后端不可用,当前仍为 Node"这行提示:本插件已实现该降级文案(21 语言),但它要等
|
|
211
|
+
> **对方把生效态投影进行 Config 快照**后才会亮起 —— 浏览器只读得到那份快照,而生效态目前只在
|
|
212
|
+
> 宿主侧的能力服务里(见 AGENTS.md §4f)。在此之前:对方卡片显示"已开启 + 原因",本插件卡片
|
|
213
|
+
> 显示"已开启"(hint 指向宿主日志)。
|
|
207
214
|
- **平台**:该后端**仅支持 POSIX**——它在 Windows 上构造即抛错,所以 Windows 上开关显示为
|
|
208
215
|
禁用并注明原因,宿主侧也会拒绝写入。
|
|
209
216
|
- **与 workflow 互斥**:`workflow-ptc` 硬要求 TypeScript 后端(`ctx.ptcRuntime.language ===
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.1",
|
|
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.26.
|
|
3
|
+
"version": "0.26.1",
|
|
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
|
@@ -55,6 +55,11 @@ window.__ModuleLoader__.load({
|
|
|
55
55
|
both cards read and write this one form field, so either side changes
|
|
56
56
|
both. Absent on a peer that predates the switch ⇒ no row is drawn. */
|
|
57
57
|
var PEER_PYTHON_FIELD = "pythonRuntime";
|
|
58
|
+
/** The peer's EFFECTIVE backend on the same snapshot ('python' | 'node'),
|
|
59
|
+
when its version reports one: 'node' while the intent is on means the
|
|
60
|
+
preflight failed (package missing / interpreter too old / Windows), so
|
|
61
|
+
the card shows the degraded state instead of claiming Python. */
|
|
62
|
+
var PEER_PYTHON_BACKEND_FIELD = "pythonBackend";
|
|
58
63
|
|
|
59
64
|
// ── dictionaries ────────────────────────────────────────────────────────
|
|
60
65
|
// zh/en stay inline; the third languages live in LOCALES below, one entry
|
|
@@ -98,6 +103,7 @@ window.__ModuleLoader__.load({
|
|
|
98
103
|
"python.on": "Python(实验性)",
|
|
99
104
|
"python.off": "Node / TypeScript(默认)",
|
|
100
105
|
"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 时显示。若置为开启后未生效,原因见宿主启动日志。",
|
|
106
|
+
"python.degraded": "后端不可用,当前仍为 Node(原因见宿主启动日志)",
|
|
101
107
|
"python.blocked": "本机是 Windows:实验性 Python 后端仅支持 POSIX,此开关不可用。",
|
|
102
108
|
};
|
|
103
109
|
|
|
@@ -137,6 +143,7 @@ window.__ModuleLoader__.load({
|
|
|
137
143
|
"python.on": "Python (experimental)",
|
|
138
144
|
"python.off": "Node / TypeScript (default)",
|
|
139
145
|
"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.",
|
|
146
|
+
"python.degraded": "backend unavailable, still Node (reason in the dsh startup log)",
|
|
140
147
|
"python.blocked": "This host is Windows: the experimental Python backend supports POSIX only, so this switch is unavailable.",
|
|
141
148
|
};
|
|
142
149
|
|
|
@@ -186,6 +193,7 @@ window.__ModuleLoader__.load({
|
|
|
186
193
|
"python.on": "Python (تجريبي)",
|
|
187
194
|
"python.off": "Node / TypeScript (افتراضي)",
|
|
188
195
|
"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.",
|
|
196
|
+
"python.degraded": "الخلفية غير متاحة، لا يزال Node (السبب في سجل بدء التشغيل)",
|
|
189
197
|
"python.blocked": "هذا المضيف يعمل بـ Windows: الخلفية التجريبية Python تدعم POSIX فقط، لذا لا يتوفر هذا المفتاح.",
|
|
190
198
|
},
|
|
191
199
|
/* locale: de */
|
|
@@ -225,6 +233,7 @@ window.__ModuleLoader__.load({
|
|
|
225
233
|
"python.on": "Python (experimentell)",
|
|
226
234
|
"python.off": "Node / TypeScript (Standard)",
|
|
227
235
|
"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.",
|
|
236
|
+
"python.degraded": "Backend nicht verfügbar, weiterhin Node (Grund im dsh-Startprotokoll)",
|
|
228
237
|
"python.blocked": "Dieser Host ist Windows: Das experimentelle Python-Backend unterstützt nur POSIX, der Schalter ist nicht verfügbar.",
|
|
229
238
|
},
|
|
230
239
|
/* locale: fr */
|
|
@@ -264,6 +273,7 @@ window.__ModuleLoader__.load({
|
|
|
264
273
|
"python.on": "Python (expérimental)",
|
|
265
274
|
"python.off": "Node / TypeScript (par défaut)",
|
|
266
275
|
"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.",
|
|
276
|
+
"python.degraded": "backend indisponible, toujours Node (raison dans le journal de démarrage de dsh)",
|
|
267
277
|
"python.blocked": "Cet hôte est sous Windows : le backend Python expérimental n'est disponible que sur POSIX, l'interrupteur est indisponible.",
|
|
268
278
|
},
|
|
269
279
|
/* locale: hi */
|
|
@@ -303,6 +313,7 @@ window.__ModuleLoader__.load({
|
|
|
303
313
|
"python.on": "Python (प्रयोगात्मक)",
|
|
304
314
|
"python.off": "Node / TypeScript (डिफ़ॉल्ट)",
|
|
305
315
|
"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 के स्टार्टअप लॉग में मिलेगा।",
|
|
316
|
+
"python.degraded": "बैकएंड उपलब्ध नहीं, अब भी Node (कारण dsh स्टार्टअप लॉग में)",
|
|
306
317
|
"python.blocked": "यह होस्ट Windows है: प्रयोगात्मक Python बैकएंड केवल POSIX पर चलता है, इसलिए यह स्विच उपलब्ध नहीं है।",
|
|
307
318
|
},
|
|
308
319
|
/* locale: id */
|
|
@@ -342,6 +353,7 @@ window.__ModuleLoader__.load({
|
|
|
342
353
|
"python.on": "Python (eksperimental)",
|
|
343
354
|
"python.off": "Node / TypeScript (bawaan)",
|
|
344
355
|
"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.",
|
|
356
|
+
"python.degraded": "backend tidak tersedia, masih Node (alasan di log mulai dsh)",
|
|
345
357
|
"python.blocked": "Host ini Windows: backend Python eksperimental hanya mendukung POSIX, sakelar ini tidak tersedia.",
|
|
346
358
|
},
|
|
347
359
|
/* locale: it */
|
|
@@ -381,6 +393,7 @@ window.__ModuleLoader__.load({
|
|
|
381
393
|
"python.on": "Python (sperimentale)",
|
|
382
394
|
"python.off": "Node / TypeScript (predefinito)",
|
|
383
395
|
"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.",
|
|
396
|
+
"python.degraded": "backend non disponibile, resta Node (motivo nel log di avvio di dsh)",
|
|
384
397
|
"python.blocked": "Questo host è Windows: il backend Python sperimentale supporta solo POSIX, l'interruttore non è disponibile.",
|
|
385
398
|
},
|
|
386
399
|
/* locale: ja */
|
|
@@ -420,6 +433,7 @@ window.__ModuleLoader__.load({
|
|
|
420
433
|
"python.on": "Python(実験的)",
|
|
421
434
|
"python.off": "Node / TypeScript(既定)",
|
|
422
435
|
"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 の起動ログにあります。",
|
|
436
|
+
"python.degraded": "バックエンド利用不可・現在も Node(理由は dsh の起動ログ)",
|
|
423
437
|
"python.blocked": "このホストは Windows です。実験的 Python バックエンドは POSIX 専用のため、このスイッチは利用できません。",
|
|
424
438
|
},
|
|
425
439
|
/* locale: ko */
|
|
@@ -459,6 +473,7 @@ window.__ModuleLoader__.load({
|
|
|
459
473
|
"python.on": "Python(실험적)",
|
|
460
474
|
"python.off": "Node / TypeScript(기본)",
|
|
461
475
|
"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 시작 로그에 있습니다.",
|
|
476
|
+
"python.degraded": "백엔드 사용 불가, 여전히 Node(이유는 dsh 시작 로그)",
|
|
462
477
|
"python.blocked": "이 호스트는 Windows입니다. 실험적 Python 백엔드는 POSIX만 지원하므로 이 스위치를 쓸 수 없습니다.",
|
|
463
478
|
},
|
|
464
479
|
/* locale: nl */
|
|
@@ -498,6 +513,7 @@ window.__ModuleLoader__.load({
|
|
|
498
513
|
"python.on": "Python (experimenteel)",
|
|
499
514
|
"python.off": "Node / TypeScript (standaard)",
|
|
500
515
|
"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.",
|
|
516
|
+
"python.degraded": "backend niet beschikbaar, nog steeds Node (reden in het dsh-opstartlogboek)",
|
|
501
517
|
"python.blocked": "Deze host is Windows: de experimentele Python-backend ondersteunt alleen POSIX, deze schakelaar is niet beschikbaar.",
|
|
502
518
|
},
|
|
503
519
|
/* locale: pl */
|
|
@@ -537,6 +553,7 @@ window.__ModuleLoader__.load({
|
|
|
537
553
|
"python.on": "Python (eksperymentalny)",
|
|
538
554
|
"python.off": "Node / TypeScript (domyślnie)",
|
|
539
555
|
"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.",
|
|
556
|
+
"python.degraded": "backend niedostępny, nadal Node (powód w logu startowym dsh)",
|
|
540
557
|
"python.blocked": "Ten host to Windows: eksperymentalny backend Python obsługuje tylko POSIX, przełącznik jest niedostępny.",
|
|
541
558
|
},
|
|
542
559
|
/* locale: pt */
|
|
@@ -576,6 +593,7 @@ window.__ModuleLoader__.load({
|
|
|
576
593
|
"python.on": "Python (experimental)",
|
|
577
594
|
"python.off": "Node / TypeScript (padrão)",
|
|
578
595
|
"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.",
|
|
596
|
+
"python.degraded": "backend indisponível, continua Node (motivo no registo de arranque do dsh)",
|
|
579
597
|
"python.blocked": "Este anfitrião é Windows: o backend Python experimental só suporta POSIX, pelo que este interruptor não está disponível.",
|
|
580
598
|
},
|
|
581
599
|
/* locale: ru */
|
|
@@ -615,6 +633,7 @@ window.__ModuleLoader__.load({
|
|
|
615
633
|
"python.on": "Python (экспериментальный)",
|
|
616
634
|
"python.off": "Node / TypeScript (по умолчанию)",
|
|
617
635
|
"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.",
|
|
636
|
+
"python.degraded": "бэкенд недоступен, по-прежнему Node (причина в журнале запуска dsh)",
|
|
618
637
|
"python.blocked": "Этот хост — Windows: экспериментальный бэкенд Python поддерживает только POSIX, переключатель недоступен.",
|
|
619
638
|
},
|
|
620
639
|
/* locale: sv */
|
|
@@ -654,6 +673,7 @@ window.__ModuleLoader__.load({
|
|
|
654
673
|
"python.on": "Python (experimentell)",
|
|
655
674
|
"python.off": "Node / TypeScript (standard)",
|
|
656
675
|
"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.",
|
|
676
|
+
"python.degraded": "backend otillgänglig, fortfarande Node (orsak i dsh-startloggen)",
|
|
657
677
|
"python.blocked": "Den här värden är Windows: den experimentella Python-backenden stöder bara POSIX, så växeln är otillgänglig.",
|
|
658
678
|
},
|
|
659
679
|
/* locale: th */
|
|
@@ -693,6 +713,7 @@ window.__ModuleLoader__.load({
|
|
|
693
713
|
"python.on": "Python (ทดลอง)",
|
|
694
714
|
"python.off": "Node / TypeScript (ค่าเริ่มต้น)",
|
|
695
715
|
"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",
|
|
716
|
+
"python.degraded": "แบ็กเอนด์ใช้ไม่ได้ ยังเป็น Node (เหตุผลในบันทึกเริ่มต้นของ dsh)",
|
|
696
717
|
"python.blocked": "โฮสต์นี้เป็น Windows: แบ็กเอนด์ Python ทดลองรองรับเฉพาะ POSIX สวิตช์นี้จึงใช้ไม่ได้",
|
|
697
718
|
},
|
|
698
719
|
/* locale: tr */
|
|
@@ -732,6 +753,7 @@ window.__ModuleLoader__.load({
|
|
|
732
753
|
"python.on": "Python (deneysel)",
|
|
733
754
|
"python.off": "Node / TypeScript (varsayılan)",
|
|
734
755
|
"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.",
|
|
756
|
+
"python.degraded": "arka uç kullanılamıyor, hâlâ Node (neden dsh başlangıç günlüğünde)",
|
|
735
757
|
"python.blocked": "Bu ana makine Windows: deneysel Python arka ucu yalnızca POSIX destekler, bu anahtar kullanılamaz.",
|
|
736
758
|
},
|
|
737
759
|
/* locale: vi */
|
|
@@ -771,6 +793,7 @@ window.__ModuleLoader__.load({
|
|
|
771
793
|
"python.on": "Python (thử nghiệm)",
|
|
772
794
|
"python.off": "Node / TypeScript (mặc định)",
|
|
773
795
|
"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.",
|
|
796
|
+
"python.degraded": "backend không khả dụng, vẫn là Node (lý do trong nhật ký khởi động dsh)",
|
|
774
797
|
"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.",
|
|
775
798
|
},
|
|
776
799
|
/* locale: zh-hk */
|
|
@@ -810,6 +833,7 @@ window.__ModuleLoader__.load({
|
|
|
810
833
|
"python.on": "Python(實驗性)",
|
|
811
834
|
"python.off": "Node / TypeScript(預設)",
|
|
812
835
|
"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 啟動日誌度。",
|
|
836
|
+
"python.degraded": "後端用唔到,暫時仍然係 Node(原因喺 dsh 啟動日誌)",
|
|
813
837
|
"python.blocked": "呢部主機係 Windows:實驗性 Python 後端淨係支援 POSIX,所以呢個開關用唔到。",
|
|
814
838
|
},
|
|
815
839
|
/* locale: zh-mo */
|
|
@@ -849,6 +873,7 @@ window.__ModuleLoader__.load({
|
|
|
849
873
|
"python.on": "Python(實驗性)",
|
|
850
874
|
"python.off": "Node / TypeScript(預設)",
|
|
851
875
|
"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 啟動日誌度。",
|
|
876
|
+
"python.degraded": "後端用唔到,暫時仍然係 Node(原因喺 dsh 啟動日誌)",
|
|
852
877
|
"python.blocked": "呢部主機係 Windows:實驗性 Python 後端淨係支援 POSIX,所以呢個開關用唔到。",
|
|
853
878
|
},
|
|
854
879
|
/* locale: zh-tw */
|
|
@@ -888,6 +913,7 @@ window.__ModuleLoader__.load({
|
|
|
888
913
|
"python.on": "Python(實驗性)",
|
|
889
914
|
"python.off": "Node / TypeScript(預設)",
|
|
890
915
|
"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 啟動日誌。",
|
|
916
|
+
"python.degraded": "後端無法使用,目前仍為 Node(原因見 dsh 啟動日誌)",
|
|
891
917
|
"python.blocked": "此主機是 Windows:實驗性 Python 後端僅支援 POSIX,因此這個開關無法使用。",
|
|
892
918
|
},
|
|
893
919
|
};
|
|
@@ -1300,6 +1326,13 @@ window.__ModuleLoader__.load({
|
|
|
1300
1326
|
&& typeof peerSnap.value === "object"
|
|
1301
1327
|
&& Object.prototype.hasOwnProperty.call(peerSnap.value, PEER_PYTHON_FIELD);
|
|
1302
1328
|
var pythonOn = pythonOffered && peerSnap.value[PEER_PYTHON_FIELD] === true;
|
|
1329
|
+
var peerPythonBackend = "";
|
|
1330
|
+
if (pythonOffered && typeof peerSnap.value[PEER_PYTHON_BACKEND_FIELD] === "string") {
|
|
1331
|
+
peerPythonBackend = peerSnap.value[PEER_PYTHON_BACKEND_FIELD];
|
|
1332
|
+
}
|
|
1333
|
+
/* Intent on + effective node = the user asked for Python and the host
|
|
1334
|
+
is still running Node behind the official rows. */
|
|
1335
|
+
var pythonDegraded = pythonOn && peerPythonBackend === "node";
|
|
1303
1336
|
function writePython(next) {
|
|
1304
1337
|
setError("");
|
|
1305
1338
|
if (peer === null || typeof peer.set !== "function") return;
|
|
@@ -1322,7 +1355,9 @@ window.__ModuleLoader__.load({
|
|
|
1322
1355
|
E("div", { className: "gb-stack" },
|
|
1323
1356
|
E("div", { className: "gb-row" },
|
|
1324
1357
|
E("span", { className: "gb-rowLabel" }, t("python.label") + ":"),
|
|
1325
|
-
E("span", { className: "gb-rowValue" }, pythonOn
|
|
1358
|
+
E("span", { className: "gb-rowValue" }, pythonOn
|
|
1359
|
+
? (pythonDegraded ? t("python.on") + " · " + t("python.degraded") : t("python.on"))
|
|
1360
|
+
: t("python.off")),
|
|
1326
1361
|
),
|
|
1327
1362
|
winHost ? null : E("div", { className: "gb-seg" },
|
|
1328
1363
|
E("button", { type: "button", className: "gb-segBtn" + (pythonOn ? " gb-segActive" : ""), onClick: function () { if (!pythonOn) writePython(true); } }, t("switch.on")),
|
|
@@ -1330,6 +1365,7 @@ window.__ModuleLoader__.load({
|
|
|
1330
1365
|
),
|
|
1331
1366
|
E("p", { className: "gb-hint" }, t("python.hint")),
|
|
1332
1367
|
winHost ? E("p", { className: "gb-error" }, t("python.blocked")) : null,
|
|
1368
|
+
pythonDegraded ? E("p", { className: "gb-error" }, t("python.degraded")) : null,
|
|
1333
1369
|
),
|
|
1334
1370
|
) : null;
|
|
1335
1371
|
|
package/src/compositions.js
CHANGED
|
@@ -13,10 +13,11 @@
|
|
|
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
15
|
* materialized variants encoded). A second, conditional delta exists while
|
|
16
|
-
* dsh-ptc-cordis-preset reports its experimental-CPython
|
|
17
|
-
* workflow rows follow the official Python composition and go off (see
|
|
18
|
-
* `
|
|
19
|
-
* the official ones
|
|
16
|
+
* dsh-ptc-cordis-preset reports its experimental-CPython backend ACTIVE: the
|
|
17
|
+
* two workflow rows follow the official Python composition and go off (see
|
|
18
|
+
* `pythonActive` below). While that backend is off — the default, and also
|
|
19
|
+
* whenever the peer's preflight failed — the rows are the official ones
|
|
20
|
+
* unchanged.
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
/** Default Git Bash binary — must match src/shell.js and the patch config. */
|
|
@@ -48,22 +49,25 @@ When ready, call exit_plan_mode with the complete plan markdown, starting with a
|
|
|
48
49
|
* @param {boolean} input.gitBash - bash rows always on, pwsh rows always off.
|
|
49
50
|
* @param {string|undefined} input.skillsDir - Creation authoring skills
|
|
50
51
|
* directory (cordis variant only; resolved beside the agent-preset package).
|
|
51
|
-
* @param {boolean} [input.
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
52
|
+
* @param {boolean} [input.pythonActive] - whether the experimental CPython
|
|
53
|
+
* backend is the one run_code will ACTUALLY use (the peer's effective
|
|
54
|
+
* backend, not the bare user intent: when its preflight fails the
|
|
55
|
+
* composition still runs Node and the workflow rows must stay live).
|
|
56
|
+
* `workflow-ptc` hard-requires `ctx.ptcRuntime.language === 'typescript'`
|
|
57
|
+
* (packages/workflow/workflow-ptc/src/index.ts:117) while the CPython
|
|
58
|
+
* backend reports 'python', and a throwing preset row rejects the WHOLE
|
|
59
|
+
* mount (agent-preset-registry mount.ts). The official Python composition
|
|
60
|
+
* disables both workflow rows for exactly this reason
|
|
61
|
+
* (snapshots/session/ptc-python-turn/cordis.yml), so while CPython is
|
|
62
|
+
* active every variant mirrors that: the two rows go off, the user's own
|
|
63
|
+
* workflow setting is untouched and returns once it is not.
|
|
60
64
|
* @returns {object[]} the declarative plugins list.
|
|
61
65
|
*/
|
|
62
|
-
export function pluginsFor({ kind, gitBash, skillsDir,
|
|
66
|
+
export function pluginsFor({ kind, gitBash, skillsDir, pythonActive = false }) {
|
|
63
67
|
const win = typeof process !== 'undefined' && process.platform === 'win32'
|
|
64
68
|
const bashDisabled = gitBash ? false : win
|
|
65
69
|
const pwshDisabled = gitBash ? true : !win
|
|
66
|
-
const workflowOn = kind !== 'ptc' &&
|
|
70
|
+
const workflowOn = kind !== 'ptc' && pythonActive !== true
|
|
67
71
|
const rows = [
|
|
68
72
|
{
|
|
69
73
|
id: 'persona',
|
package/src/index.js
CHANGED
|
@@ -104,15 +104,23 @@ export const PEER_COVERED_PRESET_ID = 'cordis-gitbash'
|
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Service dsh-ptc-cordis-preset publishes:
|
|
107
|
-
* `{ id, gitBashActive, pythonRuntime }`. `pythonRuntime`
|
|
108
|
-
*
|
|
109
|
-
*
|
|
107
|
+
* `{ id, gitBashActive, pythonRuntime, pythonBackend? }`. `pythonRuntime` is
|
|
108
|
+
* the user's INTENT for the experimental CPython run_code backend (the field
|
|
109
|
+
* the settings card writes); `pythonBackend` ('python' | 'node', v0.15.1+,
|
|
110
|
+
* additive) is the backend that is ACTUALLY active after the peer's own
|
|
111
|
+
* preflight — package resolvable, interpreter qualified, POSIX host.
|
|
110
112
|
*/
|
|
111
113
|
export const PEER_CAPABILITY = 'ptcCordisPreset'
|
|
112
114
|
|
|
113
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* The peer's CPython intent field — on its capability AND on its row Config
|
|
117
|
+
* (the field both settings cards read and write).
|
|
118
|
+
*/
|
|
114
119
|
export const PEER_PYTHON_FIELD = 'pythonRuntime'
|
|
115
120
|
|
|
121
|
+
/** The peer's EFFECTIVE backend field on the capability ('python' | 'node'). */
|
|
122
|
+
export const PEER_PYTHON_BACKEND_FIELD = 'pythonBackend'
|
|
123
|
+
|
|
116
124
|
/**
|
|
117
125
|
* Read one boolean fact off the peer's capability object. A getter is honoured
|
|
118
126
|
* so a live peer can report its current switch rather than a boot-time copy;
|
|
@@ -133,6 +141,45 @@ export function peerFact(capability, field) {
|
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
143
|
|
|
144
|
+
/**
|
|
145
|
+
* The peer's EFFECTIVE run_code backend, as the closed two-value vocabulary it
|
|
146
|
+
* publishes. `undefined` means "the peer does not report one" — an older peer,
|
|
147
|
+
* a getter that threw, or a value outside the vocabulary — and every caller
|
|
148
|
+
* must then fall back to the INTENT, which is the pre-v0.15.1 behavior.
|
|
149
|
+
* @param {object|undefined} capability - the peer's published capability.
|
|
150
|
+
* @returns {'python'|'node'|undefined} the reported backend.
|
|
151
|
+
*/
|
|
152
|
+
export function peerBackend(capability) {
|
|
153
|
+
if (capability === null || capability === undefined) return undefined
|
|
154
|
+
try {
|
|
155
|
+
const raw = capability[PEER_PYTHON_BACKEND_FIELD]
|
|
156
|
+
const value = typeof raw === 'function' ? raw.call(capability) : raw
|
|
157
|
+
return value === 'python' || value === 'node' ? value : undefined
|
|
158
|
+
} catch {
|
|
159
|
+
return undefined
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Is the experimental CPython backend ACTUALLY the one run_code will use? The
|
|
165
|
+
* composition's workflow mutex keys on this, never on the bare intent: when the
|
|
166
|
+
* peer's preflight fails (package removed, interpreter too old, win32) the
|
|
167
|
+
* composition still runs Node, so forcing the workflow rows off would cost the
|
|
168
|
+
* user a capability for nothing.
|
|
169
|
+
*
|
|
170
|
+
* An older peer without the effective field reports no backend, and the intent
|
|
171
|
+
* stands in for it — exactly the pre-v0.15.1 behavior, so the linkage never
|
|
172
|
+
* changes shape because a field is missing.
|
|
173
|
+
* @param {object|undefined} capability - the peer's published capability.
|
|
174
|
+
* @returns {boolean} true only while the CPython backend is the active one.
|
|
175
|
+
*/
|
|
176
|
+
export function pythonBackendActive(capability) {
|
|
177
|
+
const intent = peerFact(capability, PEER_PYTHON_FIELD)
|
|
178
|
+
const reported = peerBackend(capability)
|
|
179
|
+
if (reported === undefined) return intent
|
|
180
|
+
return intent && reported === 'python'
|
|
181
|
+
}
|
|
182
|
+
|
|
136
183
|
/**
|
|
137
184
|
* The roster this plugin serves: the configured list, minus the variant a peer
|
|
138
185
|
* already covers. Two independent facts must BOTH hold before anything is
|
|
@@ -2057,12 +2104,12 @@ function cleanupLegacyTrees(presetIds) {
|
|
|
2057
2104
|
* failures stay visible through the roster's broken diagnostic instead of
|
|
2058
2105
|
* failing the boot.
|
|
2059
2106
|
*/
|
|
2060
|
-
async function registerVariant(ctx, presetId, { gitBashActive, skillsDir,
|
|
2107
|
+
async function registerVariant(ctx, presetId, { gitBashActive, skillsDir, pythonActive }) {
|
|
2061
2108
|
const meta = PRESET_META[presetId]
|
|
2062
2109
|
if (!meta) return undefined
|
|
2063
2110
|
const plugins = meta.kind === 'minimal'
|
|
2064
2111
|
? minimalPluginsFor()
|
|
2065
|
-
: pluginsFor({ kind: meta.kind, gitBash: gitBashActive, skillsDir,
|
|
2112
|
+
: pluginsFor({ kind: meta.kind, gitBash: gitBashActive, skillsDir, pythonActive })
|
|
2066
2113
|
return ctx.agentPresets.register({
|
|
2067
2114
|
id: presetId,
|
|
2068
2115
|
name: meta.name,
|
|
@@ -2077,10 +2124,11 @@ async function registerVariant(ctx, presetId, { gitBashActive, skillsDir, python
|
|
|
2077
2124
|
* SHOULD SERVE for the plugin's lifetime, and re-reconcile whenever that set
|
|
2078
2125
|
* changes. Three inputs drive it — the live `suppressPeerCordis` switch, the
|
|
2079
2126
|
* peer capability appearing (or leaving) via `ctx.inject`, which fires
|
|
2080
|
-
* independent of row activation order, and the peer's
|
|
2081
|
-
*
|
|
2082
|
-
* peer
|
|
2083
|
-
*
|
|
2127
|
+
* independent of row activation order, and the peer's EFFECTIVE CPython
|
|
2128
|
+
* backend (`pythonBackend`, falling back to the `pythonRuntime` intent on a
|
|
2129
|
+
* peer that does not report one), which changes the ROWS of every variant —
|
|
2130
|
+
* and the peer's own coverage only counts while it reports a Git Bash-
|
|
2131
|
+
* materialized preset.
|
|
2084
2132
|
*
|
|
2085
2133
|
* The roster picks entries up immediately; sessions already pinned to a
|
|
2086
2134
|
* variant keep their revision until recomposed, so suppressing a variant never
|
|
@@ -2107,17 +2155,19 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2107
2155
|
const reconcile = () => {
|
|
2108
2156
|
serial = serial.then(async () => {
|
|
2109
2157
|
const want = desired()
|
|
2110
|
-
// The peer's CPython
|
|
2111
|
-
// (the official Python composition disables them, and
|
|
2112
|
-
// refuses a non-TypeScript backend), so a flip re-registers
|
|
2113
|
-
// variants instead of leaving stale rows mounted. Same cadence
|
|
2114
|
-
// backend swap itself: the peer's patch is evaluated at boot.
|
|
2158
|
+
// The peer's EFFECTIVE CPython backend rewrites the workflow rows of
|
|
2159
|
+
// EVERY variant (the official Python composition disables them, and
|
|
2160
|
+
// workflow-ptc refuses a non-TypeScript backend), so a flip re-registers
|
|
2161
|
+
// the live variants instead of leaving stale rows mounted. Same cadence
|
|
2162
|
+
// as the backend swap itself: the peer's patch is evaluated at boot. A
|
|
2163
|
+
// bare INTENT without the effective backend changes nothing here — the
|
|
2164
|
+
// composition still runs Node, so the workflow rows must stay live.
|
|
2115
2165
|
if (live.size > 0 && registeredPython !== peerPython) {
|
|
2116
2166
|
for (const [presetId, off] of [...live]) {
|
|
2117
2167
|
live.delete(presetId)
|
|
2118
2168
|
try {
|
|
2119
2169
|
await off()
|
|
2120
|
-
console.log(TAG + " preset '" + presetId + "' retired (peer CPython
|
|
2170
|
+
console.log(TAG + " preset '" + presetId + "' retired (peer CPython backend changed; rows are rebuilt)")
|
|
2121
2171
|
} catch (error) {
|
|
2122
2172
|
console.log(TAG + " preset '" + presetId + "' retirement failed: " + (error && error.message ? error.message : error))
|
|
2123
2173
|
}
|
|
@@ -2136,7 +2186,7 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2136
2186
|
for (const presetId of want) {
|
|
2137
2187
|
if (live.has(presetId)) continue
|
|
2138
2188
|
try {
|
|
2139
|
-
const unregister = await registerVariant(ctx, presetId, { gitBashActive, skillsDir,
|
|
2189
|
+
const unregister = await registerVariant(ctx, presetId, { gitBashActive, skillsDir, pythonActive: peerPython })
|
|
2140
2190
|
if (unregister) {
|
|
2141
2191
|
live.set(presetId, unregister)
|
|
2142
2192
|
console.log(TAG + " preset '" + presetId + "' registered declaratively")
|
|
@@ -2163,11 +2213,21 @@ async function runDeclarativeEra(ctx, presetIds, readSuppress) {
|
|
|
2163
2213
|
try {
|
|
2164
2214
|
const coverage = peerCtx[PEER_CAPABILITY] ?? peerCtx.get(PEER_CAPABILITY)
|
|
2165
2215
|
const nextGitBash = peerFact(coverage, 'gitBashActive')
|
|
2166
|
-
|
|
2216
|
+
// INTENT (what the user asked for) vs EFFECTIVE (what run_code will
|
|
2217
|
+
// actually use). Only the effective fact may cost the user a variant's
|
|
2218
|
+
// workflow rows; the intent alone is reported, never acted on.
|
|
2219
|
+
const intentPython = peerFact(coverage, PEER_PYTHON_FIELD)
|
|
2220
|
+
const reportedBackend = peerBackend(coverage)
|
|
2221
|
+
const nextPython = pythonBackendActive(coverage)
|
|
2167
2222
|
if (nextGitBash !== peerGitBash || nextPython !== peerPython) {
|
|
2168
2223
|
peerGitBash = nextGitBash
|
|
2169
2224
|
peerPython = nextPython
|
|
2170
2225
|
if (nextPython) console.log(TAG + ' peer reports the experimental CPython run_code backend: workflow rows go off in every variant')
|
|
2226
|
+
else if (intentPython) {
|
|
2227
|
+
console.log(TAG + ' peer has the CPython switch on but the effective backend is '
|
|
2228
|
+
+ (reportedBackend === undefined ? 'unreported (older peer: the intent stands in)' : reportedBackend)
|
|
2229
|
+
+ ': workflow rows stay on (reason in the host log)')
|
|
2230
|
+
}
|
|
2171
2231
|
void reconcile()
|
|
2172
2232
|
}
|
|
2173
2233
|
} catch (error) {
|
|
@@ -2657,4 +2717,4 @@ export async function apply(ctx, config = {}) {
|
|
|
2657
2717
|
}
|
|
2658
2718
|
|
|
2659
2719
|
// Test surface: pure helpers, no Cordis context required.
|
|
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 }
|
|
2720
|
+
export const _internal = { PRESET_IDS, PEER_COVERED_PRESET_ID, PEER_CAPABILITY, PEER_PYTHON_FIELD, PEER_PYTHON_BACKEND_FIELD, peerFact, peerBackend, pythonBackendActive, 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 }
|