@cannbot-plugin/cannbot-harness 0.2.7 → 0.2.9
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/README.md +3 -3
- package/lib/client.js +155 -60
- package/lib/client.js.map +1 -1
- package/lib/index.js +18 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,10 +9,10 @@ CANNBot Harness 是安装在原版 DeepSeek Harness(DSH)中的独立插件
|
|
|
9
9
|
在 DSH **插件 → 添加插件** 中输入:
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
|
-
cannbot-harness@0.2.
|
|
12
|
+
cannbot-harness@0.2.9
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
完整包名为 `@cannbot-plugin/cannbot-harness@0.2.
|
|
15
|
+
完整包名为 `@cannbot-plugin/cannbot-harness@0.2.9`。请只选择一种入口安装。
|
|
16
16
|
兼容范围保持 DSH `>=0.1.1-rc.1 <0.3.0`,Node.js 24.9 或更新版本;图形包管理依赖 DSH 提供官方认证 Fetch 路由与插件管理接口。
|
|
17
17
|
|
|
18
18
|
从 0.2.6 起,目录包将默认工作流声明为标准 npm 必需依赖。DSH 的安装过程会一次下载主插件、目录包与全部 9 个默认工作流包,目前提供 129 个 Skills;任一依赖下载失败,安装阶段就会报错。首次启用只准备本地已安装资源,全部准备完成后插件才启用,不再后台补装子包。首次安装需要网络;安装完成后可离线加载。
|
|
@@ -20,7 +20,7 @@ cannbot-harness@0.2.7
|
|
|
20
20
|
Linux 可使用同一个包:
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
dsh plugin --profile web add cannbot-harness@0.2.
|
|
23
|
+
dsh plugin --profile web add cannbot-harness@0.2.9
|
|
24
24
|
dsh web
|
|
25
25
|
```
|
|
26
26
|
|
package/lib/client.js
CHANGED
|
@@ -79,18 +79,29 @@ window.__ModuleLoader__.load({
|
|
|
79
79
|
workflow: "选择工作流",
|
|
80
80
|
ordinary: "普通对话",
|
|
81
81
|
saving: "正在应用工作流…",
|
|
82
|
-
operator: "
|
|
82
|
+
operator: "ops-direct-invoke",
|
|
83
83
|
commandHint: "发送时自动应用所选工作流,只需填写需求。",
|
|
84
|
-
flash: "
|
|
85
|
-
registry: "
|
|
86
|
-
model: "
|
|
87
|
-
hccl: "
|
|
88
|
-
triton: "
|
|
89
|
-
catlass: "
|
|
90
|
-
performance: "
|
|
91
|
-
pypto: "
|
|
84
|
+
flash: "ops-direct-invoke-flash",
|
|
85
|
+
registry: "ops-registry-invoke",
|
|
86
|
+
model: "model-infer-optimize",
|
|
87
|
+
hccl: "hccl-op-generator",
|
|
88
|
+
triton: "triton-op-generator",
|
|
89
|
+
catlass: "catlass-op-generator",
|
|
90
|
+
performance: "ops-perf-optimize",
|
|
91
|
+
pypto: "pypto-op-orchestrator",
|
|
92
|
+
operatorDescription: "开发 Ascend C 算子,通过直调方式接入使用。",
|
|
93
|
+
flashDescription: "快速生成并验证 Ascend C 算子。",
|
|
94
|
+
registryDescription: "开发 Ascend C 注册算子,通过 ACLNN / GEIR 接入框架。",
|
|
95
|
+
modelDescription: "将模型迁移到 NPU,完成精度对齐与推理性能优化。",
|
|
96
|
+
hcclDescription: "开发 HCCL AICPU 通信算子,协同完成代码生成与验证。",
|
|
97
|
+
tritonDescription: "生成并优化 Triton-Ascend 算子代码。",
|
|
98
|
+
catlassDescription: "基于 CATLASS 模板开发矩阵计算、注意力等算子,验证精度与性能。",
|
|
99
|
+
performanceDescription: "分析并优化 Ascend C 算子性能,验证精度并检查性能退化。",
|
|
100
|
+
pyptoDescription: "开发并调优 PyPTO 算子,也支持对已有算子单独调优。",
|
|
92
101
|
chooseWorkspace: "请先选择工作目录。",
|
|
93
|
-
insertFailed: "工作流准备或设置未完成,请到插件详情查看准备日志后重试。"
|
|
102
|
+
insertFailed: "工作流准备或设置未完成,请到插件详情查看准备日志后重试。",
|
|
103
|
+
settingsRetry: "设置连接失败,重试",
|
|
104
|
+
workflowRetry: "工作流未就绪,重试"
|
|
94
105
|
};
|
|
95
106
|
const en = {
|
|
96
107
|
contentCatalog: "Workflow catalog",
|
|
@@ -137,18 +148,29 @@ window.__ModuleLoader__.load({
|
|
|
137
148
|
workflow: "Choose workflow",
|
|
138
149
|
ordinary: "Ordinary conversation",
|
|
139
150
|
saving: "Applying workflow…",
|
|
140
|
-
operator: "
|
|
151
|
+
operator: "ops-direct-invoke",
|
|
141
152
|
commandHint: "The selected workflow is applied in the background when you send.",
|
|
142
|
-
flash: "
|
|
143
|
-
registry: "
|
|
144
|
-
model: "
|
|
145
|
-
hccl: "
|
|
146
|
-
triton: "
|
|
147
|
-
catlass: "
|
|
148
|
-
performance: "
|
|
149
|
-
pypto: "
|
|
153
|
+
flash: "ops-direct-invoke-flash",
|
|
154
|
+
registry: "ops-registry-invoke",
|
|
155
|
+
model: "model-infer-optimize",
|
|
156
|
+
hccl: "hccl-op-generator",
|
|
157
|
+
triton: "triton-op-generator",
|
|
158
|
+
catlass: "catlass-op-generator",
|
|
159
|
+
performance: "ops-perf-optimize",
|
|
160
|
+
pypto: "pypto-op-orchestrator",
|
|
161
|
+
operatorDescription: "Develop Ascend C operators and integrate them through direct invocation.",
|
|
162
|
+
flashDescription: "Quickly generate and validate Ascend C operators.",
|
|
163
|
+
registryDescription: "Develop registered Ascend C operators for framework integration through ACLNN / GEIR.",
|
|
164
|
+
modelDescription: "Migrate models to NPU, align accuracy and optimize inference performance.",
|
|
165
|
+
hcclDescription: "Develop HCCL AICPU communication operators with coordinated code generation and validation.",
|
|
166
|
+
tritonDescription: "Generate and optimize Triton-Ascend operator code.",
|
|
167
|
+
catlassDescription: "Build matrix and attention operators using CATLASS templates; validate accuracy and performance.",
|
|
168
|
+
performanceDescription: "Analyze and optimize Ascend C operator performance, checking accuracy and regressions.",
|
|
169
|
+
pyptoDescription: "Develop and tune PyPTO operators, or tune existing operators independently.",
|
|
150
170
|
chooseWorkspace: "Choose a working directory first.",
|
|
151
|
-
insertFailed: "Workflow preparation or saving failed. Check preparation logs in the plugin details and retry."
|
|
171
|
+
insertFailed: "Workflow preparation or saving failed. Check preparation logs in the plugin details and retry.",
|
|
172
|
+
settingsRetry: "Reconnect settings",
|
|
173
|
+
workflowRetry: "Retry workflow"
|
|
152
174
|
};
|
|
153
175
|
//#endregion
|
|
154
176
|
//#region src/client/Brand.tsx
|
|
@@ -194,42 +216,61 @@ window.__ModuleLoader__.load({
|
|
|
194
216
|
const WORKFLOWS = [
|
|
195
217
|
{
|
|
196
218
|
id: "ops-direct-invoke",
|
|
197
|
-
label: "operator"
|
|
219
|
+
label: "operator",
|
|
220
|
+
description: "operatorDescription"
|
|
198
221
|
},
|
|
199
222
|
{
|
|
200
223
|
id: "ops-direct-invoke-flash",
|
|
201
|
-
label: "flash"
|
|
224
|
+
label: "flash",
|
|
225
|
+
description: "flashDescription"
|
|
202
226
|
},
|
|
203
227
|
{
|
|
204
228
|
id: "ops-registry-invoke",
|
|
205
|
-
label: "registry"
|
|
229
|
+
label: "registry",
|
|
230
|
+
description: "registryDescription"
|
|
206
231
|
},
|
|
207
232
|
{
|
|
208
233
|
id: "model-infer-optimize",
|
|
209
|
-
label: "model"
|
|
234
|
+
label: "model",
|
|
235
|
+
description: "modelDescription"
|
|
210
236
|
},
|
|
211
237
|
{
|
|
212
238
|
id: "hccl-op-generator",
|
|
213
|
-
label: "hccl"
|
|
239
|
+
label: "hccl",
|
|
240
|
+
description: "hcclDescription"
|
|
214
241
|
},
|
|
215
242
|
{
|
|
216
243
|
id: "triton-op-generator",
|
|
217
|
-
label: "triton"
|
|
244
|
+
label: "triton",
|
|
245
|
+
description: "tritonDescription"
|
|
218
246
|
},
|
|
219
247
|
{
|
|
220
248
|
id: "catlass-op-generator",
|
|
221
|
-
label: "catlass"
|
|
249
|
+
label: "catlass",
|
|
250
|
+
description: "catlassDescription"
|
|
222
251
|
},
|
|
223
252
|
{
|
|
224
253
|
id: "ops-perf-optimize",
|
|
225
|
-
label: "performance"
|
|
254
|
+
label: "performance",
|
|
255
|
+
description: "performanceDescription"
|
|
226
256
|
},
|
|
227
257
|
{
|
|
228
258
|
id: "pypto-op-orchestrator",
|
|
229
|
-
label: "pypto"
|
|
259
|
+
label: "pypto",
|
|
260
|
+
description: "pyptoDescription"
|
|
230
261
|
}
|
|
231
262
|
];
|
|
232
263
|
//#endregion
|
|
264
|
+
//#region src/client/workflow-copy.ts
|
|
265
|
+
/** Keep presentation consistent even when an older workflow package has a Chinese title. */
|
|
266
|
+
function workflowCopy(workflow, t) {
|
|
267
|
+
const known = WORKFLOWS.find((item) => item.id === workflow.id);
|
|
268
|
+
return {
|
|
269
|
+
name: workflow.id,
|
|
270
|
+
description: known ? t(known.description) : workflow.description ?? (workflow.title === workflow.id ? "" : workflow.title)
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
//#endregion
|
|
233
274
|
//#region src/client/WorkflowIcon.tsx
|
|
234
275
|
/** The exact icon component used by DSH's original Standard mode selector. */
|
|
235
276
|
function WorkflowIcon({ size = 16 }) {
|
|
@@ -353,10 +394,7 @@ window.__ModuleLoader__.load({
|
|
|
353
394
|
/** Select a workflow without submitting, replacing text, or discarding reference chips. */
|
|
354
395
|
function WorkflowSelector({ sessionId, inputActions, useInput, t, selection, content = fallbackContent }) {
|
|
355
396
|
const { workflows } = (0, react.useSyncExternalStore)(content.subscribe, content.getSnapshot);
|
|
356
|
-
const
|
|
357
|
-
const known = WORKFLOWS.find((item) => item.id === workflow.id);
|
|
358
|
-
return known ? t(known.label) : workflow.title;
|
|
359
|
-
};
|
|
397
|
+
const copy = (workflow) => workflowCopy(workflow, t);
|
|
360
398
|
const input = useInput((state) => state);
|
|
361
399
|
const saved = (0, react.useSyncExternalStore)(selection.subscribe, selection.getSnapshot);
|
|
362
400
|
const [open, setOpen] = (0, react.useState)(false);
|
|
@@ -379,17 +417,18 @@ window.__ModuleLoader__.load({
|
|
|
379
417
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorkflowIcon, {}),
|
|
380
418
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
381
419
|
className: "cannbot-harness-workflow-label",
|
|
382
|
-
|
|
420
|
+
lang: selected ? "en" : void 0,
|
|
421
|
+
children: selected ? copy(selected).name : t("workflow")
|
|
383
422
|
}),
|
|
384
423
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronIcon, { size: 12 })
|
|
385
424
|
]
|
|
386
425
|
});
|
|
387
426
|
const label = (workflow) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
388
427
|
className: "cannbot-harness-workflow-option",
|
|
389
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
428
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
390
429
|
lang: "en",
|
|
391
|
-
children: workflow.
|
|
392
|
-
})]
|
|
430
|
+
children: copy(workflow).name
|
|
431
|
+
}), copy(workflow).description && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: copy(workflow).description })] })]
|
|
393
432
|
});
|
|
394
433
|
const { Menu, MenuItemButton } = _deepseek_ai_dsh_client_ui_primitives;
|
|
395
434
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -429,7 +468,12 @@ window.__ModuleLoader__.load({
|
|
|
429
468
|
}), saved.error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
430
469
|
role: "alert",
|
|
431
470
|
className: "cannbot-harness-error",
|
|
432
|
-
children:
|
|
471
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
472
|
+
type: "button",
|
|
473
|
+
onClick: () => selection.retry(),
|
|
474
|
+
title: t("insertFailed"),
|
|
475
|
+
children: t(saved.errorKind === "settings" ? "settingsRetry" : "workflowRetry")
|
|
476
|
+
})
|
|
433
477
|
})]
|
|
434
478
|
});
|
|
435
479
|
}
|
|
@@ -512,7 +556,7 @@ window.__ModuleLoader__.load({
|
|
|
512
556
|
var interface_css_default = "span:has(>[data-slot=\"conversation.hero.brand.mark\"]>[data-cannbot-harness-hero]){width:auto;min-width:0;height:auto}span:has(>[data-slot=\"conversation.hero.brand.mark\"]>[data-cannbot-harness-hero])+span{display:none}[data-cannbot-harness-hero]{letter-spacing:-.6px;color:var(--dsw-alias-label-primary);justify-content:center;align-items:center;gap:12px;font-size:26px;font-weight:650;line-height:1.3;display:inline-flex}[data-cannbot-harness-hero] svg{flex-shrink:0}.cannbot-harness-name{letter-spacing:-.3px;font-weight:650}";
|
|
513
557
|
//#endregion
|
|
514
558
|
//#region \0dsh-global-css:D:\code\cannbot-harness-plugin\src\client\controls.css.mjs
|
|
515
|
-
const css = ".cannbot-harness-workflow{align-items:
|
|
559
|
+
const css = ".cannbot-harness-workflow{flex-direction:column;align-items:flex-start;gap:4px;min-width:120px;max-width:280px;display:inline-flex;position:relative}.cannbot-harness-workflow-anchor{flex:none;min-width:120px;max-width:100%}.cannbot-harness-workflow-trigger{border-radius:var(--dsw-radius-sm);min-width:0;max-width:100%;min-height:28px;color:var(--dsw-alias-label-primary);white-space:nowrap;cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0 8px;font-family:inherit;font-size:13px;font-weight:500;line-height:20px;display:inline-flex}.cannbot-harness-workflow-trigger svg{flex:none}.cannbot-harness-workflow-trigger svg:last-child{color:var(--dsw-alias-label-caption)}.cannbot-harness-workflow-trigger[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.cannbot-harness-workflow-trigger:disabled{cursor:default;color:var(--dsw-alias-label-quaternary)}.cannbot-harness-workflow-trigger:focus-visible{outline:2px solid var(--dsw-focus-ring-color);outline-offset:2px}.cannbot-harness-workflow-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}@media (hover:hover){.cannbot-harness-workflow-trigger:not(:disabled):hover{background:var(--dsw-alias-interactive-bg-hover)}}.cannbot-harness-workflow-option{white-space:normal;flex-direction:column;gap:4px;max-width:320px;padding:5px 0;display:flex}.cannbot-harness-workflow-option small{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.5}.cannbot-harness-error{color:var(--dsw-alias-label-secondary);max-width:100%;font-size:12px;line-height:18px}.cannbot-harness-error button{color:inherit;font:inherit;text-align:start;cursor:pointer;text-underline-offset:3px;background:0 0;border:0;padding:0 8px;text-decoration:underline}.cannbot-harness-toggle{box-sizing:border-box;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:8px;display:flex}.cannbot-harness-toggle-name{min-width:0;color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:12px;line-height:20px;display:inline-flex}.cannbot-harness-toggle-name svg{flex-shrink:0}.cannbot-harness-toggle-compact{flex-direction:column;gap:6px}.cannbot-harness-switch{background:var(--dsw-alias-interactive-bg-hover,#d7dadd);cursor:pointer;border:0;border-radius:99px;flex-shrink:0;width:36px;height:20px;padding:2px}.cannbot-harness-switch[aria-checked=true]{background:#cf1740}.cannbot-harness-switch>span{background:#fff;border-radius:50%;width:16px;height:16px;display:block;transform:translate(0)}.cannbot-harness-switch[aria-checked=true]>span{transform:translate(16px)}.cannbot-harness-switch:focus-visible{outline:2px solid var(--dsw-focus-ring-color,#cf1740);outline-offset:2px}.cannbot-harness-update{border:1px solid var(--dsw-alias-border-l2,#e5e7eb);border-radius:var(--dsw-radius-md,12px);color:var(--dsw-alias-label-primary);padding:16px}.cannbot-harness-update-heading{flex-wrap:wrap;align-items:baseline;gap:12px;margin-bottom:14px;display:flex}.cannbot-harness-update h4{margin:0;font-size:14px;font-weight:600}.cannbot-harness-update-heading>span,.cannbot-harness-update p{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.6}.cannbot-harness-update-actions{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.cannbot-harness-update-button{box-sizing:border-box;background:var(--dsw-alias-brand-primary,#cf1740);color:#fff;min-height:32px;font:inherit;cursor:pointer;border:0;border-radius:8px;align-items:center;padding:5px 14px;font-size:13px;text-decoration:none;display:inline-flex}.cannbot-harness-update-button:disabled{opacity:.6;cursor:default}.cannbot-harness-update-button:focus-visible,.cannbot-harness-update-recheck:focus-visible{outline:2px solid var(--dsw-focus-ring-color,#cf1740);outline-offset:3px}.cannbot-harness-update-recheck{font:inherit;color:var(--dsw-alias-brand-primary,#cf1740);cursor:pointer;background:0 0;border:0;padding:4px;font-size:12px}.cannbot-harness-update p{margin:10px 0 0}.cannbot-harness-content{margin-top:16px}.cannbot-harness-content details{margin-top:12px;font-size:12px}.cannbot-harness-content summary{cursor:pointer}.cannbot-harness-content pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;font-size:11px;line-height:1.5;overflow:auto}.cannbot-harness-workflow-package{border-bottom:1px solid var(--dsw-alias-border-l2,#eee);justify-content:space-between;align-items:center;gap:12px;padding:14px 0;display:flex}.cannbot-harness-workflow-package>div:first-child{min-width:0}.cannbot-harness-workflow-package strong{font-size:13px;font-weight:500}.cannbot-harness-workflow-package small{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;font-size:11px;line-height:1.6;display:block}.cannbot-harness-workflow-package-actions{flex-wrap:wrap;flex-shrink:0;justify-content:flex-end;gap:8px;display:flex}@media (width<=480px){.cannbot-harness-workflow-package{flex-direction:column;align-items:flex-start}}";
|
|
516
560
|
const tagId = "@cannbot-plugin/cannbot-harness/controls.css";
|
|
517
561
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
518
562
|
const tag = document.createElement("style");
|
|
@@ -597,12 +641,40 @@ window.__ModuleLoader__.load({
|
|
|
597
641
|
let transport;
|
|
598
642
|
let generation = 0;
|
|
599
643
|
let pendingRelease;
|
|
644
|
+
let timer;
|
|
645
|
+
let lastChoice;
|
|
600
646
|
const listeners = /* @__PURE__ */ new Set();
|
|
601
647
|
const publish = (next) => {
|
|
602
648
|
snapshot = next;
|
|
603
649
|
for (const listener of listeners) listener();
|
|
604
650
|
};
|
|
605
|
-
|
|
651
|
+
const read = async (current, own, attempt = 0) => {
|
|
652
|
+
try {
|
|
653
|
+
const view = await current.describe();
|
|
654
|
+
if (own !== generation) return;
|
|
655
|
+
const section = view.namespaces.find((item) => item.ns === NS);
|
|
656
|
+
if (!section) throw new Error("Workflow settings are not active yet");
|
|
657
|
+
publish({
|
|
658
|
+
ready: true,
|
|
659
|
+
pending: false,
|
|
660
|
+
error: false,
|
|
661
|
+
values: valuesOf(section)
|
|
662
|
+
});
|
|
663
|
+
} catch {
|
|
664
|
+
if (own !== generation) return;
|
|
665
|
+
if (attempt >= 9) publish({
|
|
666
|
+
...snapshot,
|
|
667
|
+
ready: false,
|
|
668
|
+
pending: false,
|
|
669
|
+
error: true,
|
|
670
|
+
errorKind: "settings"
|
|
671
|
+
});
|
|
672
|
+
timer = setTimeout(() => {
|
|
673
|
+
read(current, own, Math.min(attempt + 1, 9));
|
|
674
|
+
}, attempt < 9 ? Math.min(250 * (attempt + 1), 1500) : 5e3);
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
const api = {
|
|
606
678
|
subscribe(listener) {
|
|
607
679
|
listeners.add(listener);
|
|
608
680
|
return () => {
|
|
@@ -611,27 +683,23 @@ window.__ModuleLoader__.load({
|
|
|
611
683
|
},
|
|
612
684
|
getSnapshot: () => snapshot,
|
|
613
685
|
attach(next) {
|
|
686
|
+
clearTimeout(timer);
|
|
687
|
+
pendingRelease?.();
|
|
688
|
+
pendingRelease = void 0;
|
|
614
689
|
transport = next;
|
|
615
690
|
const own = ++generation;
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
error: !section,
|
|
623
|
-
values: valuesOf(section)
|
|
624
|
-
});
|
|
625
|
-
}).catch(() => {
|
|
626
|
-
if (own === generation) publish({
|
|
627
|
-
...snapshot,
|
|
628
|
-
ready: false,
|
|
629
|
-
error: true
|
|
630
|
-
});
|
|
691
|
+
publish({
|
|
692
|
+
...snapshot,
|
|
693
|
+
ready: false,
|
|
694
|
+
pending: false,
|
|
695
|
+
error: false,
|
|
696
|
+
errorKind: void 0
|
|
631
697
|
});
|
|
698
|
+
read(next, own);
|
|
632
699
|
return () => {
|
|
633
700
|
if (own === generation) {
|
|
634
701
|
generation++;
|
|
702
|
+
clearTimeout(timer);
|
|
635
703
|
transport = void 0;
|
|
636
704
|
publish({
|
|
637
705
|
...snapshot,
|
|
@@ -644,6 +712,11 @@ window.__ModuleLoader__.load({
|
|
|
644
712
|
if (!transport || !snapshot.ready || snapshot.pending) return;
|
|
645
713
|
if (workflow !== "" && !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(workflow)) throw new Error("Unknown workflow");
|
|
646
714
|
const current = transport, own = generation;
|
|
715
|
+
lastChoice = {
|
|
716
|
+
sessionId,
|
|
717
|
+
workflow,
|
|
718
|
+
reason
|
|
719
|
+
};
|
|
647
720
|
const unblock = blockSubmission(sessionId, reason);
|
|
648
721
|
let released = false;
|
|
649
722
|
const release = () => {
|
|
@@ -656,10 +729,13 @@ window.__ModuleLoader__.load({
|
|
|
656
729
|
publish({
|
|
657
730
|
...snapshot,
|
|
658
731
|
pending: true,
|
|
659
|
-
error: false
|
|
732
|
+
error: false,
|
|
733
|
+
errorKind: void 0
|
|
660
734
|
});
|
|
735
|
+
let stage = "prepare";
|
|
661
736
|
try {
|
|
662
737
|
if (workflow) await prepare(sessionId, workflow);
|
|
738
|
+
stage = "save";
|
|
663
739
|
const view = (await current.describe()).namespaces.find((item) => item.ns === NS);
|
|
664
740
|
if (!view) throw new Error("Workflow settings unavailable");
|
|
665
741
|
const values = {
|
|
@@ -681,21 +757,35 @@ window.__ModuleLoader__.load({
|
|
|
681
757
|
if (own === generation) publish({
|
|
682
758
|
...snapshot,
|
|
683
759
|
pending: false,
|
|
684
|
-
error: true
|
|
760
|
+
error: true,
|
|
761
|
+
errorKind: stage
|
|
685
762
|
});
|
|
686
763
|
} finally {
|
|
687
764
|
release();
|
|
688
765
|
if (pendingRelease === release) pendingRelease = void 0;
|
|
689
766
|
}
|
|
690
767
|
},
|
|
768
|
+
retry() {
|
|
769
|
+
if (snapshot.errorKind === "settings" && transport) {
|
|
770
|
+
clearTimeout(timer);
|
|
771
|
+
publish({
|
|
772
|
+
...snapshot,
|
|
773
|
+
error: false,
|
|
774
|
+
errorKind: void 0
|
|
775
|
+
});
|
|
776
|
+
read(transport, generation);
|
|
777
|
+
} else if (lastChoice) api.choose(lastChoice.sessionId, lastChoice.workflow, lastChoice.reason);
|
|
778
|
+
},
|
|
691
779
|
dispose() {
|
|
692
780
|
generation++;
|
|
781
|
+
clearTimeout(timer);
|
|
693
782
|
transport = void 0;
|
|
694
783
|
pendingRelease?.();
|
|
695
784
|
pendingRelease = void 0;
|
|
696
785
|
listeners.clear();
|
|
697
786
|
}
|
|
698
787
|
};
|
|
788
|
+
return api;
|
|
699
789
|
}
|
|
700
790
|
/** Both transports are official DSH settings APIs; no private editor access. */
|
|
701
791
|
function connectWorkflowSelection(ctx, selection) {
|
|
@@ -1022,10 +1112,15 @@ window.__ModuleLoader__.load({
|
|
|
1022
1112
|
className: "cannbot-harness-workflow-packages",
|
|
1023
1113
|
children: status?.workflows?.map((row) => {
|
|
1024
1114
|
const available = row.latest && (!row.version || newerVersion(row.latest, row.version));
|
|
1115
|
+
const copy = workflowCopy(row, t);
|
|
1025
1116
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1026
1117
|
className: "cannbot-harness-workflow-package",
|
|
1027
1118
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
1028
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
|
|
1119
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", {
|
|
1120
|
+
lang: "en",
|
|
1121
|
+
children: copy.name
|
|
1122
|
+
}),
|
|
1123
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: copy.description }),
|
|
1029
1124
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", {
|
|
1030
1125
|
lang: "en",
|
|
1031
1126
|
children: row.package
|
|
@@ -1045,14 +1140,14 @@ window.__ModuleLoader__.load({
|
|
|
1045
1140
|
type: "button",
|
|
1046
1141
|
className: "cannbot-harness-update-recheck",
|
|
1047
1142
|
disabled: busy,
|
|
1048
|
-
"aria-label": `${row.installed ? t("contentUpdate") : t("contentInstall")} ${
|
|
1143
|
+
"aria-label": `${row.installed ? t("contentUpdate") : t("contentInstall")} ${copy.name}`,
|
|
1049
1144
|
onClick: () => act(() => content.update(row.id, row.latest)),
|
|
1050
1145
|
children: row.installed ? t("contentUpdate") : t("contentInstall")
|
|
1051
1146
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: row.installed ? row.latest ? t("contentUpToDate") : t("contentUnchecked") : t("contentUnavailable") }), row.previous && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
1052
1147
|
type: "button",
|
|
1053
1148
|
className: "cannbot-harness-update-recheck",
|
|
1054
1149
|
disabled: busy,
|
|
1055
|
-
"aria-label": `${t("contentRollback")} ${
|
|
1150
|
+
"aria-label": `${t("contentRollback")} ${copy.name}`,
|
|
1056
1151
|
onClick: () => act(() => content.rollback(row.id)),
|
|
1057
1152
|
children: [
|
|
1058
1153
|
t("contentRollback"),
|
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["primitives","primitives","LegacyMenu","unwrap","raw","Fragment","interfaceCss"],"sources":["../src/client/locales.ts","../src/client/Brand.tsx","../src/workflows.ts","../src/client/WorkflowIcon.tsx","../src/content-types.ts","../src/client/content-store.ts","../src/client/WorkflowSelector.tsx","../src/client/WorkflowCompat.tsx","../src/client/theme.ts","../src/client/InterfaceToggle.tsx","../src/client/presentation.ts","../src/client/slot-compat.ts","../src/client/workflow-selection.ts","../src/client/plugin-update.ts","../src/client/PluginUpdateCard.tsx","../src/client/host-update.ts","../src/client/ContentCard.tsx","../src/client/register-updates.ts","../src/client/index.ts"],"sourcesContent":["export const PRODUCT = 'CANNBot Harness'\nexport const NAMESPACE = 'cannbotHarness'\nexport const PACKAGE = '@cannbot-plugin/cannbot-harness'\nexport const COMMAND = '/ops-direct-invoke'\n\nexport const zh = {\n contentCatalog: '工作流目录', contentCheck: '检查工作流更新', contentVersion: '当前版本', contentLatest: '最新版本', contentPinned: '已固定回退版本',\n contentInstall: '安装', contentUpdate: '更新', contentRollback: '回退到', contentUpToDate: '已是最新', contentUnchecked: '已安装,可使用', contentNotInstalled: '未安装', contentUnavailable: '暂不可用',\n contentTitle: '工作流管理', contentSync: '更新全部工作流', contentBusy: '正在准备…', contentDownloading: '正在从 npm 获取独立工作流包…',\n contentInitializing: '正在执行官方安装器,准备工作区依赖…', contentReady: '工作流已准备完成,可独立更新。选择工作流时自动准备当前工作区。',\n contentFailed: '准备未完成。已有工作流版本保留;请查看日志后重试。', contentFallback: '正在准备首次安装的工作流包。', contentWorkflows: '个已安装工作流', contentLogs: '查看准备日志',\n updateBackground: '后台正在更新,请勿重复安装。', updateRestored: '更新失败,已恢复旧版。',\n updateRepair: '更新和恢复未完成,请在插件页重新安装原版本。', updateConnectionLost: '连接中断,后台更新可能仍在进行。请重新打开插件页确认版本,勿重复安装。', updateDismiss: '关闭更新提示',\n updateTitle: '版本更新', updateCurrent: '当前版本', updateCheck: '检查更新', updateChecking: '正在检查…',\n updateTo: '更新到', updateRunning: '正在更新…', updateAvailable: '发现新版本,点击上方按钮更新。',\n updateLatest: '当前已是最新版本。', updateDone: '更新已完成。', updateRestart: '新版已安装,重启 DSH 后生效。',\n updateManual: '当前 DSH 要求先卸载旧版。请先下载新版包,再在插件页卸载旧版并添加下载的安装包。',\n updateIncompatible: '当前 DSH 不支持此版本,请先升级 DSH。', updateFailed: '暂时无法完成,请稍后重试。', updateDownload: '下载新版安装包',\n workflow: '选择工作流', ordinary: '普通对话', saving: '正在应用工作流…', operator: '算子开发工作流', commandHint: '发送时自动应用所选工作流,只需填写需求。',\n flash: 'Ascend C Flash 核函数开发', registry: 'ACLNN / GEIR 注册算子开发', model: 'NPU 模型推理优化',\n hccl: 'HCCL 通信算子开发', triton: 'Triton 算子开发', catlass: 'CATLASS 算子开发', performance: 'Ascend C 性能调优', pypto: 'PyPTO 算子开发',\n chooseWorkspace: '请先选择工作目录。', insertFailed: '工作流准备或设置未完成,请到插件详情查看准备日志后重试。',\n}\nexport const en: typeof zh = {\n contentCatalog: 'Workflow catalog', contentCheck: 'Check workflow updates', contentVersion: 'Installed', contentLatest: 'Latest', contentPinned: 'Rolled-back version pinned',\n contentInstall: 'Install', contentUpdate: 'Update', contentRollback: 'Roll back to', contentUpToDate: 'Up to date', contentUnchecked: 'Installed and ready', contentNotInstalled: 'Not installed', contentUnavailable: 'Unavailable',\n contentTitle: 'Workflow manager', contentSync: 'Update all workflows', contentBusy: 'Preparing…', contentDownloading: 'Fetching independent workflow packages from npm…',\n contentInitializing: 'Running the official installer to prepare workspace dependencies…', contentReady: 'Workflows are ready and can be updated independently. Selecting one prepares this workspace automatically.',\n contentFailed: 'Preparation did not finish. Existing workflow versions are retained; check the log and retry.', contentFallback: 'Preparing the first workflow package installation.', contentWorkflows: 'installed workflows', contentLogs: 'View preparation log',\n updateBackground: 'Updating in the background. Do not install again.', updateRestored: 'Update failed; the previous version was restored.',\n updateRepair: 'Update and recovery did not finish. Reinstall the previous version from Plugins.', updateConnectionLost: 'Connection lost. The Host may still be updating. Reopen Plugins to check the version before retrying.', updateDismiss: 'Dismiss update notice',\n updateTitle: 'Updates', updateCurrent: 'Installed version', updateCheck: 'Check for updates', updateChecking: 'Checking…',\n updateTo: 'Update to', updateRunning: 'Updating…', updateAvailable: 'A new version is available. Use the button above to update.',\n updateLatest: 'You are up to date.', updateDone: 'Update completed.', updateRestart: 'The update is installed. Restart DSH to apply it.',\n updateManual: 'This DSH version requires removing the old plugin first. Download the update, then uninstall the old plugin and add the downloaded package.',\n updateIncompatible: 'This release requires updating DSH first.', updateFailed: 'Unable to complete this operation. Please retry.', updateDownload: 'Download update',\n workflow: 'Choose workflow', ordinary: 'Ordinary conversation', saving: 'Applying workflow…', operator: 'Operator development workflow', commandHint: 'The selected workflow is applied in the background when you send.',\n flash: 'Ascend C Flash kernel development', registry: 'ACLNN / GEIR operator development', model: 'NPU model inference optimization',\n hccl: 'HCCL communication operators', triton: 'Triton operator development', catlass: 'CATLASS operator development', performance: 'Ascend C performance tuning', pypto: 'PyPTO operator development',\n chooseWorkspace: 'Choose a working directory first.', insertFailed: 'Workflow preparation or saving failed. Check preparation logs in the plugin details and retry.',\n}\nexport type LocaleKey = keyof typeof zh\n","import type { HeroBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { SidebarBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport { PRODUCT } from './locales.ts'\n\nexport function Mark({ size }: { size: number }) {\n return <svg width={size} height={size} viewBox=\"0 0 40 40\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"38\" height=\"38\" rx=\"12\" fill=\"var(--dsw-alias-brand-primary)\" />\n <path d=\"M27 12a11 11 0 1 0 0 16\" fill=\"none\" stroke=\"var(--dsw-alias-label-primary-foreground)\" strokeWidth=\"4\" strokeLinecap=\"round\" />\n </svg>\n}\nexport function SidebarMark({ size }: SidebarBrandMarkOwnerProps) { return <Mark size={size} /> }\nexport function SidebarName() { return <span className=\"cannbot-harness-name\">{PRODUCT}</span> }\nexport function Hero({ size }: HeroBrandMarkOwnerProps) {\n return <span data-cannbot-harness-hero=\"\"><Mark size={size} /><span>{PRODUCT}</span></span>\n}\n","export const WORKFLOWS = [\n { id: 'ops-direct-invoke', label: 'operator' },\n { id: 'ops-direct-invoke-flash', label: 'flash' },\n { id: 'ops-registry-invoke', label: 'registry' },\n { id: 'model-infer-optimize', label: 'model' },\n { id: 'hccl-op-generator', label: 'hccl' },\n { id: 'triton-op-generator', label: 'triton' },\n { id: 'catlass-op-generator', label: 'catlass' },\n { id: 'ops-perf-optimize', label: 'performance' },\n { id: 'pypto-op-orchestrator', label: 'pypto' },\n] as const\n","import * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ComponentType } from 'react'\n\n/** The exact icon component used by DSH's original Standard mode selector. */\nexport function WorkflowIcon({ size = 16 }: { size?: number }) {\n const icons = primitives as unknown as Record<string, ComponentType<{ size?: number }>>\n const Icon = icons.IconAgentPresetOutlineRegular ?? icons.IconAgentPresetOutline16 ?? icons.IconRefreshOutline16\n return Icon ? <Icon size={size} /> : null\n}\n\nexport function ChevronIcon({ size = 12 }: { size?: number }) {\n const icons = primitives as unknown as Record<string, ComponentType<{ size?: number }>>\n const Icon = icons.IconChevronDownOutlineRegular ?? icons.IconChevronDownOutline14\n return Icon ? <Icon size={size} /> : <svg width={size} height={size} viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\"><path d=\"m3 4.5 3 3 3-3\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n}\n","export interface ContentPlugin { id: string; title: string; aliases: Record<string, string>; resourceDirectory?: string; version?: string; packageName?: string }\nexport interface ContentSkill { name: string; originalName: string; pluginId: string; path: string; entry: boolean }\nexport interface ContentCatalog { revision?: string; commit?: string; skillsCommit?: string; plugins: ContentPlugin[]; exposedSkills: ContentSkill[] }\nexport interface WorkflowEntry { id: string; title: string; package: string; default: boolean }\nexport interface WorkflowRow extends WorkflowEntry {\n version?: string; latest?: string; previous?: string; installed: boolean; pinned: boolean; error?: string\n}\nexport interface WorkflowDescriptor {\n schemaVersion: 1; id: string; title: string; version: string\n initialization: { kind: 'cannbot-cli'; entry: string } | { kind: 'skill-native' }\n skills: { name: string; path: string; hash: string; entry: boolean }[]\n source: { repository: string; commit: string; skillsCommit: string }\n}\nexport interface ContentStatus {\n phase: 'idle' | 'syncing' | 'ready' | 'error' | 'initializing'\n plugins: { id: string; title: string }[]\n commit?: string; skillsCommit?: string; updatedAt?: string\n fallback: boolean; message: string; log: string\n workflows?: WorkflowRow[]; busy?: boolean; catalogVersion?: string\n}\nexport const CONTENT_PATH = 'api/cannbot-harness/content'\n","import { WORKFLOWS } from '../workflows.ts'\nimport { CONTENT_PATH, type ContentStatus } from '../content-types.ts'\nexport interface DynamicWorkflow { id: string; title: string }\nconst initial: { workflows: DynamicWorkflow[]; status: ContentStatus | undefined } = { workflows: WORKFLOWS.map(({ id }) => ({ id, title: id })), status: undefined }\nexport function createContentStore() {\n let state = initial, closed = false, timer: ReturnType<typeof setTimeout> | undefined\n const listeners = new Set<() => void>()\n const publish = (status: ContentStatus) => { if (!closed) { state = { status, workflows: status.plugins }; for (const listener of listeners) listener() } }\n const endpoint = () => new URL(CONTENT_PATH, document.baseURI)\n const pull = async () => {\n try {\n const response = await fetch(endpoint(), { credentials: 'same-origin', cache: 'no-store', signal: AbortSignal.timeout(15000) })\n if (response.ok) {\n const status = await response.json() as ContentStatus\n if (Array.isArray(status.plugins) && status.plugins.every(item => /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(item.id) && typeof item.title === 'string')) publish(status)\n }\n } catch { /* Keep the last catalog across a short disconnect. */ }\n }\n const post = async (body: object) => {\n const response = await fetch(endpoint(), { method: 'POST', credentials: 'same-origin', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) })\n if (!response.ok) { await pull(); throw new Error('CANNBot content preparation failed') }\n await pull()\n }\n return {\n getSnapshot: () => state,\n subscribe(listener: () => void) { listeners.add(listener); return () => { listeners.delete(listener) } },\n start() {\n const tick = async () => { await pull(); if (!closed) timer = setTimeout(() => { void tick() }, 3000) }\n void tick()\n return () => { closed = true; clearTimeout(timer); listeners.clear() }\n },\n sync: () => post({ action: 'sync' }),\n check: () => post({ action: 'check' }),\n update: (id: string, version: string) => post({ action: 'update', id, version }),\n rollback: (id: string) => post({ action: 'rollback', id }),\n prepare: (sessionId: string, id: string) => post({ action: 'prepare', sessionId, id }),\n }\n}\nexport type ContentStore = ReturnType<typeof createContentStore>\nexport const fallbackContent = { getSnapshot: () => initial, subscribe: (_: () => void) => () => {} }\n","import { useState, useSyncExternalStore, type ComponentType, type ReactNode } from 'react'\nimport * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport { WORKFLOWS } from '../workflows.ts'\nimport { WorkflowIcon, ChevronIcon } from './WorkflowIcon.tsx'\nimport type { WorkflowSelection } from './workflow-selection.ts'\nimport { fallbackContent, type ContentStore, type DynamicWorkflow } from './content-store.ts'\n\nexport type WorkflowProps = PropsRuntime<'conversation.hero.agentPreset'> & PropsLocale<'cannbotHarness'> & { selection: WorkflowSelection; content?: ContentStore }\n\n/** Select a workflow without submitting, replacing text, or discarding reference chips. */\nexport function WorkflowSelector({ sessionId, inputActions, useInput, t, selection, content = fallbackContent as ContentStore }: WorkflowProps) {\n const { workflows } = useSyncExternalStore(content.subscribe, content.getSnapshot)\n const title = (workflow: DynamicWorkflow) => { const known = WORKFLOWS.find(item => item.id === workflow.id); return known ? t(known.label) : workflow.title }\n const input = useInput(state => state)\n const saved = useSyncExternalStore(selection.subscribe, selection.getSnapshot)\n const [open, setOpen] = useState(false)\n const selected = workflows.find(workflow => sessionId && saved.values[sessionId] === workflow.id)\n const available = !!sessionId && saved.ready && !saved.pending && inputActions !== undefined && input !== undefined && input.phase === 'plain'\n const pick = (id: string) => {\n setOpen(false)\n if (sessionId && available) void selection.choose(sessionId, id, t('saving'))\n }\n const anchor = (\n <button type=\"button\" className=\"cannbot-harness-workflow-trigger\" aria-label={t('workflow')} aria-haspopup=\"menu\" aria-expanded={open}\n disabled={!available} title={inputActions === undefined ? t('chooseWorkspace') : t('commandHint')}\n onClick={() => setOpen(value => !value)}>\n <WorkflowIcon />\n <span className=\"cannbot-harness-workflow-label\">{selected ? title(selected) : t('workflow')}</span><ChevronIcon size={12} />\n </button>\n )\n const label = (workflow: DynamicWorkflow) => <span className=\"cannbot-harness-workflow-option\">\n <span>{title(workflow)}</span>\n <small lang=\"en\">{workflow.id}</small>\n </span>\n const { Menu, MenuItemButton } = primitives\n const LegacyMenu = Menu as unknown as ComponentType<{ open: boolean; anchor: ReactNode; portal: boolean; className: string; onClose(): void; selectedId?: string; onSelect(id: string): void; items: { id: string; label: ReactNode; icon: ReactNode }[] }>\n return <span className=\"cannbot-harness-workflow\">\n {typeof MenuItemButton === 'function' ? <Menu open={open} onClose={() => setOpen(false)} portal className=\"cannbot-harness-workflow-anchor\" anchor={anchor}>\n <MenuItemButton icon={<WorkflowIcon />} onSelect={() => pick('')}>{t('ordinary')}</MenuItemButton>\n {workflows.map(workflow => <MenuItemButton key={workflow.id} icon={<WorkflowIcon />} onSelect={() => pick(workflow.id)}>{label(workflow)}</MenuItemButton>)}\n </Menu> : <LegacyMenu open={open} onClose={() => setOpen(false)} portal className=\"cannbot-harness-workflow-anchor\" anchor={anchor}\n selectedId={selected?.id} items={[{ id: '', label: t('ordinary'), icon: <WorkflowIcon /> }, ...workflows.map(workflow => ({ id: workflow.id, label: label(workflow), icon: <WorkflowIcon /> }))]}\n onSelect={pick} />}\n {saved.error && <span role=\"alert\" className=\"cannbot-harness-error\">{t('insertFailed')}</span>}\n </span>\n}\n","import { useMemo, useSyncExternalStore } from 'react'\nimport type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport { WorkflowSelector, type WorkflowProps } from './WorkflowSelector.tsx'\n\n/** Older DSH declares the hero seat at root scope. Resolve its current session\n * through the public services rather than reaching into the editor or DOM. */\nexport function WorkflowCompat({ ctx, ...props }: WorkflowProps & { ctx: Context }) {\n return typeof props.useInput === 'function'\n ? <WorkflowSelector {...props} />\n : <LegacyWorkflow ctx={ctx} {...props} />\n}\n\nfunction LegacyWorkflow({ ctx, ...props }: WorkflowProps & { ctx: Context }) {\n type Input = ReturnType<Context['conversation']['input']['for']>\n const legacy = ctx as unknown as { sessions: { list: { subscribe(listener: () => void): () => void; getSnapshot(): { current?: string } }; scope(id: string): Context | undefined } }\n const sessions = useSyncExternalStore(legacy.sessions.list.subscribe, legacy.sessions.list.getSnapshot)\n const input = useMemo(() => {\n const scope = sessions.current && legacy.sessions.scope(sessions.current)\n return scope ? ctx.conversation.input.for(scope) as Input : undefined\n }, [ctx, sessions.current])\n const state = useSyncExternalStore(input?.state.subscribe ?? noSubscribe, input?.state.getSnapshot ?? noSnapshot)\n return <WorkflowSelector {...props} sessionId={sessions.current as WorkflowProps['sessionId']} useInput={select => state ? select(state) : undefined as never} inputActions={input ? {} as WorkflowProps['inputActions'] : undefined} />\n}\nconst noSubscribe = () => () => {}\nconst noSnapshot = () => undefined\n","import type { ThemeTokenOverrides } from '@deepseek-ai/dsh-client-ui-theme/client'\n\n/** Portal design-v2 palette, applied through the documented theme override layer. */\nexport const cannTheme: ThemeTokenOverrides = Object.fromEntries(Object.entries({\n '--dsw-alias-bg-base': ['#ffffff', '#101114'],\n '--dsw-alias-bg-layer-1': ['#ffffff', '#17191e'],\n '--dsw-alias-bg-layer-2': ['#ffffff', '#1d2026'],\n '--dsw-alias-bg-layer-3': ['#f6f8fa', '#252830'],\n '--dsw-specific-sidebar-fill': ['#f6f8fa', '#14161b'],\n '--dsw-specific-input-major': ['#ffffff', '#1d2026'],\n '--dsw-specific-sidebar-nav-item-active': ['#fdeef0', '#392029'],\n '--dsw-specific-sidebar-nav-item-active-accent': ['#fdeef0', '#392029'],\n '--dsw-alias-label-primary': ['#17181d', '#f3f4f6'],\n '--dsw-alias-label-primary-foreground': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-inverted': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-dimmed': ['#30343e', '#dde1e8'],\n '--dsw-alias-label-primary-bluish': ['#7f0f26', '#ff9aab'],\n '--dsw-alias-label-secondary': ['#59637a', '#b0b8c7'],\n '--dsw-alias-label-tertiary': ['#727d91', '#929db0'],\n '--dsw-alias-brand-primary': ['#da203e', '#ef4560'],\n '--dsw-alias-brand-text': ['#17181d', '#f3f4f6'],\n '--dsw-alias-button-primary-hover': ['#b11430', '#ff647d'],\n '--dsw-alias-button-info-fill': ['#da203e', '#da203e'],\n '--dsw-alias-button-info-hover': ['#b11430', '#b11430'],\n '--dsw-alias-state-business-primary': ['#da203e', '#ff8297'],\n '--dsw-alias-state-business-tertiary': ['#fdeef0', '#392029'],\n '--dsw-alias-link': ['#b11430', '#ff9aab'],\n '--dsw-focus-ring-color': ['#da203e', '#ff8297'],\n '--dsw-alias-border-l1': ['#f0f1f5', '#252830'],\n '--dsw-alias-border-l2': ['#e6e9ef', '#323641'],\n '--dsw-alias-border-l3': ['#dce0e8', '#414754'],\n '--dsw-alias-border-l4': ['#ced4df', '#505867'],\n '--dsw-alias-interactive-bg-hover': ['#eef0f4', '#252830'],\n '--dsw-alias-interactive-bg-active': ['#fdeef0', '#392029'],\n '--dsw-specific-bubble': ['#fff3f5', '#302027'],\n '--dsw-specific-bubble-highlight': ['#fbd6dd', '#59303d'],\n '--dsw-radius-panel': ['18px', '18px'],\n '--dsw-radius-xl': ['14px', '14px'],\n '--dsw-radius-lg': ['12px', '12px'],\n '--dsw-radius-md': ['10px', '10px'],\n '--cann-grid': ['#e6e9ef', '#323641'],\n '--cann-night': ['#0e0f12', '#0e0f12'],\n '--cann-night-label': ['#dde1e8', '#dde1e8'],\n}).map(([name, values]) => [name, { light: values[0]!, dark: values[1]! }]))\n","import { useSyncExternalStore } from 'react'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { PresentationController } from './presentation.ts'\nimport { Mark } from './Brand.tsx'\nimport { PRODUCT } from './locales.ts'\n\nexport function InterfaceToggle({ wide, controller }: PropsRuntime<'sidebar.footer.action'> & { controller: PresentationController }) {\n const enabled = useSyncExternalStore(controller.subscribe, controller.getSnapshot, controller.getSnapshot)\n return <div className={`cannbot-harness-toggle${wide ? '' : ' cannbot-harness-toggle-compact'}`}>\n <span className=\"cannbot-harness-toggle-name\" title={PRODUCT}><Mark size={20} />{wide && <span>{PRODUCT}</span>}</span>\n <button type=\"button\" role=\"switch\" aria-label={PRODUCT} aria-checked={enabled} title={PRODUCT}\n className=\"cannbot-harness-switch\" onClick={() => controller.setEnabled(!enabled)}><span /></button>\n </div>\n}\n","/** Per-activation UI preference: enabling the plugin always starts with its interface on. */\nexport interface PresentationController {\n getSnapshot(): boolean\n subscribe(listener: () => void): () => void\n setEnabled(enabled: boolean): void\n dispose(): void\n}\nexport function createPresentationController(mount: () => () => void): PresentationController {\n let enabled = true\n let stopped = false\n let unmount: (() => void) | undefined = mount()\n const listeners = new Set<() => void>()\n return {\n getSnapshot: () => enabled,\n subscribe(listener) { listeners.add(listener); return () => { listeners.delete(listener) } },\n setEnabled(next) {\n if (stopped || next === enabled) return\n if (next) unmount = mount()\n else { unmount?.(); unmount = undefined }\n enabled = next\n for (const listener of listeners) listener()\n },\n dispose() { if (stopped) return; stopped = true; unmount?.(); unmount = undefined; listeners.clear() },\n }\n}\n","import type { Context } from '@deepseek-ai/cordis'\nimport type { SlotMap } from '@deepseek-ai/dsh-client-ui-slots'\n\n/** Older DSH declares the injected parent modules before this plugin and uses direct register(). */\nexport function injectSlot(ctx: Context, name: keyof SlotMap & string, register: () => () => void): () => void {\n return typeof ctx.slots.inject === 'function' ? ctx.slots.inject(name, register) : register()\n}\n","import type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-api-remotes/client'\nimport { WORKFLOWS } from '../workflows.ts'\n\nconst NS = 'cannbot-harness'\ntype Values = Record<string, string>\ninterface Choice { sessionId: string; workflow: string }\ninterface View { ns: string; value: { selections?: Choice[] }; revision?: number }\nconst valuesOf = (view?: View): Values => Object.fromEntries((view?.value.selections ?? []).map(item => [item.sessionId, item.workflow]))\nexport interface WorkflowTransport {\n describe(): Promise<{ namespaces: View[] }>\n update(ns: string, patch: { selections: Choice[] }, revision?: number): Promise<View>\n}\nexport interface SelectionSnapshot { ready: boolean; pending: boolean; error: boolean; values: Values }\nexport interface WorkflowSelection {\n subscribe(listener: () => void): () => void\n getSnapshot(): SelectionSnapshot\n attach(transport: WorkflowTransport): () => void\n choose(sessionId: string, workflow: string, reason?: string): Promise<void>\n dispose(): void\n}\nexport function createWorkflowSelection(blockSubmission: (sessionId: string, reason: string) => () => void = () => () => {}, prepare: (sessionId: string, id: string) => Promise<void> = async () => {}): WorkflowSelection {\n let snapshot: SelectionSnapshot = { ready: false, pending: false, error: false, values: {} }\n let transport: WorkflowTransport | undefined\n let generation = 0\n let pendingRelease: (() => void) | undefined\n const listeners = new Set<() => void>()\n const publish = (next: SelectionSnapshot) => { snapshot = next; for (const listener of listeners) listener() }\n return {\n subscribe(listener) { listeners.add(listener); return () => { listeners.delete(listener) } },\n getSnapshot: () => snapshot,\n attach(next) {\n transport = next\n const own = ++generation\n void next.describe().then(view => {\n if (own !== generation) return\n const section = view.namespaces.find(item => item.ns === NS)\n publish({ ready: !!section, pending: false, error: !section, values: valuesOf(section) })\n }).catch(() => { if (own === generation) publish({ ...snapshot, ready: false, error: true }) })\n return () => { if (own === generation) { generation++; transport = undefined; publish({ ...snapshot, ready: false }) } }\n },\n async choose(sessionId, workflow, reason = 'CANNBot Harness…') {\n if (!transport || !snapshot.ready || snapshot.pending) return\n if (workflow !== '' && !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(workflow)) throw new Error('Unknown workflow')\n const current = transport, own = generation\n const unblock = blockSubmission(sessionId, reason)\n let released = false\n const release = () => { if (!released) { released = true; unblock() } }\n pendingRelease = release\n publish({ ...snapshot, pending: true, error: false })\n try {\n if (workflow) await prepare(sessionId, workflow)\n // Fresh revision prevents simultaneous windows from overwriting selections.\n const view = (await current.describe()).namespaces.find(item => item.ns === NS)\n if (!view) throw new Error('Workflow settings unavailable')\n const values = { ...valuesOf(view), [sessionId]: workflow }\n const selections = Object.entries(values).filter(([, id]) => id !== '').map(([sessionId, workflow]) => ({ sessionId, workflow }))\n const result = await current.update(NS, { selections }, view.revision)\n if (own === generation) publish({ ready: true, pending: false, error: false, values: valuesOf(result) })\n } catch {\n if (own === generation) publish({ ...snapshot, pending: false, error: true })\n } finally {\n release()\n if (pendingRelease === release) pendingRelease = undefined\n }\n },\n dispose() { generation++; transport = undefined; pendingRelease?.(); pendingRelease = undefined; listeners.clear() },\n }\n}\n\n/** Both transports are official DSH settings APIs; no private editor access. */\nexport function connectWorkflowSelection(ctx: Context, selection: WorkflowSelection) {\n ctx.inject(['remote', 'remote.settings'], scoped => {\n const settings = scoped.remote.settings\n scoped.effect(() => selection.attach({\n describe: async () => unwrap(await settings.describe()),\n update: async (ns, patch, revision) => unwrap(await settings.update(ns, patch, revision)),\n }))\n })\n ctx.inject(['connection'], scoped => {\n const api = (scoped as unknown as { connection: { api?: { settings: { describe(payload: object): Promise<unknown>; update(payload: object): Promise<unknown> } } } }).connection.api\n if (!api?.settings) return\n scoped.effect(() => selection.attach({\n describe: async () => unwrap(await api.settings.describe({})),\n update: async (ns, patch, expectedRevision) => unwrap(await api.settings.update({ ns, patch, expectedRevision })),\n }))\n })\n}\nfunction unwrap<T>(response: unknown): T {\n const raw = response as { result?: unknown }\n const result = (raw.result ?? response) as { ok: boolean; value: T; error?: { message: string } }\n if (!result.ok) throw new Error(result.error?.message ?? 'Workflow settings failed')\n return result.value\n}\n","export const UPDATE_PACKAGES = ['cannbot-harness', '@cannbot-plugin/cannbot-harness'] as const\nexport interface InstalledBundle { name: string; version?: string; installed: boolean }\nexport interface Change { application: string; error?: { code: string }; version?: string }\nexport interface UpdateBridge {\n list(): Promise<InstalledBundle[]>\n install(spec: string): Promise<Change>\n update?(name: string, version: string): Promise<{ result: Change; restore?: Change }>\n}\nexport interface Release { name: string; version: string; tarball: string }\nexport type UpdatePhase = 'idle' | 'checking' | 'latest' | 'available' | 'updating' | 'done' | 'restart' | 'manual' | 'incompatible' | 'error'\nexport interface UpdateSnapshot { phase: UpdatePhase; current?: string; release?: Release; packageName?: string }\n\n/** Only stable npm releases of our two installation entries may be selected. */\nexport function newerVersion(candidate: string, current: string): boolean {\n const next = /^(\\d+)\\.(\\d+)\\.(\\d+)$/.exec(candidate)\n const old = /^(\\d+)\\.(\\d+)\\.(\\d+)(?:[-+].*)?$/.exec(current)\n if (!next || !old) return false\n for (let index = 1; index < 4; index++) {\n const difference = Number(next[index]) - Number(old[index])\n if (difference) return difference > 0\n }\n return current.includes('-')\n}\n\nexport async function latestRelease(name: string, signal: AbortSignal): Promise<Release> {\n if (!UPDATE_PACKAGES.includes(name as typeof UPDATE_PACKAGES[number])) throw new Error('Unsupported update target')\n const answers = await Promise.allSettled(['https://registry.npmjs.org/', 'https://registry.npmmirror.com/'].map(async registry => {\n const response = await fetch(`${registry}${encodeURIComponent(name)}/latest`, {\n signal: AbortSignal.any([signal, AbortSignal.timeout(15000)]), cache: 'no-store',\n })\n if (!response.ok) throw new Error('Registry unavailable')\n const manifest = await response.json() as { name?: string; version?: string; dist?: { tarball?: string }; dsh?: { bundle?: unknown } }\n if (manifest.name !== name || !manifest.version || !/^\\d+\\.\\d+\\.\\d+$/.test(manifest.version) || !manifest.dsh?.bundle || !manifest.dist?.tarball) throw new Error('Invalid release')\n const url = new URL(manifest.dist.tarball)\n if (url.protocol !== 'https:' || !['registry.npmjs.org', 'registry.npmmirror.com'].includes(url.hostname)) throw new Error('Invalid download origin')\n return { name, version: manifest.version, tarball: url.href }\n }))\n signal.throwIfAborted()\n const releases = answers.flatMap(answer => answer.status === 'fulfilled' ? [answer.value] : [])\n const latest = releases.reduce<Release | undefined>((best, release) => !best || newerVersion(release.version, best.version) ? release : best, undefined)\n if (!latest) throw new Error('No release available')\n return latest\n}\n\nexport function createPluginUpdater(bridge: UpdateBridge, requestedName: string, lookup = latestRelease) {\n let state: UpdateSnapshot = { phase: 'idle' }\n let disposed = false\n let checking: AbortController | undefined\n const listeners = new Set<() => void>()\n const publish = (next: UpdateSnapshot) => { if (disposed) return; state = next; for (const listener of listeners) listener() }\n const failed = (result: Change) => !['applied', 'restart-required'].includes(result.application) || !!result.error\n return {\n getSnapshot: () => state,\n subscribe(listener: () => void) { listeners.add(listener); return () => { listeners.delete(listener) } },\n async check() {\n if (disposed || state.phase === 'checking' || state.phase === 'updating') return\n checking?.abort()\n const abort = new AbortController()\n checking = abort\n publish({ ...state, phase: 'checking' })\n try {\n const bundles = (await bridge.list()).filter(bundle => bundle.installed && UPDATE_PACKAGES.includes(bundle.name as typeof UPDATE_PACKAGES[number]))\n // Update the actual direct dependency, preserving short/long installation form.\n const bundle = bundles.find(bundle => bundle.name === requestedName) ?? bundles[0]\n if (!bundle?.version) throw new Error('Installed entry unavailable')\n publish({ ...state, current: bundle.version, packageName: bundle.name })\n const release = await lookup(bundle.name, abort.signal)\n if (checking !== abort || disposed) return\n publish({ phase: newerVersion(release.version, bundle.version) ? 'available' : 'latest', current: bundle.version, release, packageName: bundle.name })\n } catch {\n if (!abort.signal.aborted) publish({ ...state, phase: 'error' })\n }\n },\n async update() {\n if (disposed || state.phase !== 'available' || !state.release || !state.packageName) return\n const target = state.release, name = state.packageName\n publish({ ...state, phase: 'updating' })\n try {\n // The Host owns the complete transaction, including self-removal and recovery.\n // Frontend disposal must never cancel an update that already started.\n const answer = bridge.update\n ? await bridge.update(name, target.version)\n : { result: await bridge.install(`${name}@${target.version}`) }\n const result = answer.result\n if (failed(result)) {\n const code = result.error?.code\n publish({ ...state, phase: code === 'already-installed' || code === 'stop-profile' ? 'manual' : code === 'incompatible-version' ? 'incompatible' : 'error' })\n } else {\n publish({ ...state, phase: result.application === 'restart-required' ? 'restart' : 'done', current: target.version })\n }\n } catch { publish({ ...state, phase: 'error' }) }\n },\n dispose() { disposed = true; checking?.abort(); listeners.clear() },\n }\n}\nexport type PluginUpdater = ReturnType<typeof createPluginUpdater>\n","import { useEffect, useSyncExternalStore } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { PluginUpdater } from './plugin-update.ts'\n\nexport function PluginUpdateCard({ updater, t }: { updater: PluginUpdater } & PropsLocale<'cannbotHarness'>) {\n const state = useSyncExternalStore(updater.subscribe, updater.getSnapshot)\n useEffect(() => { void updater.check() }, [updater])\n const busy = state.phase === 'checking' || state.phase === 'updating'\n const canUpdate = state.phase === 'available'\n const message = state.phase === 'latest' ? t('updateLatest')\n : state.phase === 'available' ? t('updateAvailable')\n : state.phase === 'updating' ? t('updateRunning')\n : state.phase === 'done' ? t('updateDone')\n : state.phase === 'restart' ? t('updateRestart')\n : state.phase === 'manual' ? t('updateManual')\n : state.phase === 'incompatible' ? t('updateIncompatible')\n : state.phase === 'error' ? t('updateFailed') : ''\n return <section className=\"cannbot-harness-update\" aria-label={t('updateTitle')}>\n <div className=\"cannbot-harness-update-heading\"><h4>{t('updateTitle')}</h4>\n {state.current && <span>{t('updateCurrent')} {state.current}</span>}</div>\n <div className=\"cannbot-harness-update-actions\">\n {state.phase === 'manual' && state.release ? <>\n <a className=\"cannbot-harness-update-button\" href={state.release.tarball} download rel=\"noreferrer\">{t('updateDownload')} {state.release.version}</a>\n <button type=\"button\" className=\"cannbot-harness-update-recheck\" onClick={() => { void updater.check() }}>{t('updateCheck')}</button>\n </> :\n <button type=\"button\" className=\"cannbot-harness-update-button\" disabled={busy}\n onClick={() => { void (canUpdate ? updater.update() : updater.check()) }}>\n {state.phase === 'checking' ? t('updateChecking') : state.phase === 'updating' ? t('updateRunning')\n : canUpdate ? `${t('updateTo')} ${state.release?.version}` : t('updateCheck')}\n </button>\n }\n </div>\n {message && <p role={state.phase === 'error' ? 'alert' : 'status'} aria-live=\"polite\">{message}</p>}\n </section>\n}\n","import type { Change } from './plugin-update.ts'\nimport { en, zh } from './locales.ts'\n\n/** This notice belongs to the in-flight update, so removing the plugin must not remove it. */\nexport async function updateOnHost(name: string, version: string): Promise<{ result: Change; restore?: Change }> {\n const words = document.documentElement.lang.startsWith('en') ? en : zh\n const notice = document.createElement('div')\n notice.setAttribute('role', 'status')\n notice.setAttribute('aria-live', 'polite')\n notice.dataset.cannbotUpdate = 'progress'\n Object.assign(notice.style, { position: 'fixed', bottom: '24px', right: '24px', zIndex: '2147483647',\n maxWidth: 'min(380px, calc(100vw - 48px))', padding: '16px', borderRadius: '12px',\n background: 'var(--dsw-alias-bg-base, white)', color: 'var(--dsw-alias-label-primary, #222)',\n border: '1px solid var(--dsw-alias-border-l2, #ddd)', boxShadow: '0 8px 32px #0002', fontSize: '13px', lineHeight: '1.6' })\n const text = document.createElement('span')\n text.textContent = `${words.updateRunning} ${version} · ${words.updateBackground}`\n notice.append(text)\n document.body.append(notice)\n try {\n const response = await fetch(new URL('api/cannbot-harness/update', document.baseURI), {\n method: 'POST', credentials: 'same-origin', headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ name, version }),\n // No plugin-lifetime abort: its own uninstall is expected during the transaction.\n })\n if (!response.ok) throw new Error('Host update unavailable')\n const answer = await response.json() as { result: Change; restore?: Change }\n if (!answer?.result || typeof answer.result.application !== 'string') throw new Error('Invalid update result')\n const succeeded = (result: Change) => !result.error && ['applied', 'restart-required'].includes(result.application)\n text.textContent = succeeded(answer.result)\n ? `${answer.result.application === 'restart-required' ? words.updateRestart : words.updateDone} (${version})`\n : answer.restore ? succeeded(answer.restore) ? words.updateRestored : words.updateRepair : words.updateFailed\n return answer\n } catch (error) {\n text.textContent = words.updateConnectionLost\n throw error\n } finally {\n const close = document.createElement('button')\n close.type = 'button'; close.textContent = '×'; close.setAttribute('aria-label', words.updateDismiss)\n Object.assign(close.style, { marginLeft: '12px', border: '0', background: 'transparent', color: 'inherit', cursor: 'pointer', fontSize: '18px' })\n close.addEventListener('click', () => notice.remove(), { once: true })\n notice.append(close)\n }\n}\n","import { useState, useSyncExternalStore } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ContentStore } from './content-store.ts'\nimport { newerVersion } from './plugin-update.ts'\nexport function ContentCard({ content, t }: { content: ContentStore } & PropsLocale<'cannbotHarness'>) {\n const { status } = useSyncExternalStore(content.subscribe, content.getSnapshot)\n const [failed, setFailed] = useState(false)\n const busy = status?.busy || status?.phase === 'syncing' || status?.phase === 'initializing'\n const act = (action: () => Promise<void>) => { setFailed(false); void action().catch(() => setFailed(true)) }\n return <section className=\"cannbot-harness-update cannbot-harness-content\" aria-label={t('contentTitle')}>\n <div className=\"cannbot-harness-update-heading\"><h4>{t('contentTitle')}</h4>\n {status?.catalogVersion && <span>{t('contentCatalog')} {status.catalogVersion}</span>}</div>\n <div className=\"cannbot-harness-update-actions\">\n <button type=\"button\" className=\"cannbot-harness-update-button\" disabled={busy} onClick={() => act(content.sync)}>{busy ? t('contentBusy') : t('contentSync')}</button>\n <button type=\"button\" className=\"cannbot-harness-update-recheck\" disabled={busy} onClick={() => act(content.check)}>{t('contentCheck')}</button>\n </div>\n <p role={failed || status?.phase === 'error' ? 'alert' : 'status'} aria-live=\"polite\">\n {failed || status?.phase === 'error' ? t('contentFailed') : status?.phase === 'initializing' ? t('contentInitializing') : status?.phase === 'syncing' ? t('contentDownloading') : status?.fallback ? t('contentFallback') : t('contentReady')}\n </p>\n {status && <p>{status.plugins.length} {t('contentWorkflows')}</p>}\n <div className=\"cannbot-harness-workflow-packages\">\n {status?.workflows?.map(row => {\n const available = row.latest && (!row.version || newerVersion(row.latest, row.version))\n return <div className=\"cannbot-harness-workflow-package\" key={row.id}>\n <div><strong>{row.title}</strong><small lang=\"en\">{row.package}</small>\n <small>{row.version ? `${t('contentVersion')} ${row.version}` : t('contentNotInstalled')}\n {available && ` · ${t('contentLatest')} ${row.latest}`}{row.pinned && ` · ${t('contentPinned')}`}</small>\n {row.error && <small role=\"alert\">{row.error}</small>}</div>\n <div className=\"cannbot-harness-workflow-package-actions\">\n {available ? <button type=\"button\" className=\"cannbot-harness-update-recheck\" disabled={busy}\n aria-label={`${row.installed ? t('contentUpdate') : t('contentInstall')} ${row.title}`}\n onClick={() => act(() => content.update(row.id, row.latest!))}>{row.installed ? t('contentUpdate') : t('contentInstall')}</button>\n : <small>{row.installed ? row.latest ? t('contentUpToDate') : t('contentUnchecked') : t('contentUnavailable')}</small>}\n {row.previous && <button type=\"button\" className=\"cannbot-harness-update-recheck\" disabled={busy}\n aria-label={`${t('contentRollback')} ${row.title}`} onClick={() => act(() => content.rollback(row.id))}>{t('contentRollback')} {row.previous}</button>}\n </div>\n </div>\n })}\n </div>\n {(status?.log || status?.message) && <details><summary>{t('contentLogs')}</summary><pre>{status.message}{'\\n'}{status.log}</pre></details>}\n </section>\n}\n","import { createElement, Fragment } from 'react'\nimport type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport { createPluginUpdater, UPDATE_PACKAGES } from './plugin-update.ts'\nimport { PluginUpdateCard } from './PluginUpdateCard.tsx'\nimport { NAMESPACE } from './locales.ts'\nimport { injectSlot } from './slot-compat.ts'\nimport { updateOnHost } from './host-update.ts'\nimport { ContentCard } from './ContentCard.tsx'\nimport type { ContentStore } from './content-store.ts'\n\n/** Optional integration: old DSH versions without a Plugins page keep loading. */\nexport function registerPluginUpdates(ctx: Context, content?: ContentStore) {\n ctx.inject(['remote', 'remote.pluginManager'], scoped => {\n const manager = scoped.remote.pluginManager\n for (const name of UPDATE_PACKAGES) {\n const updater = createPluginUpdater({\n list: async () => unwrap(await manager.listBundles()),\n install: async spec => unwrap(await manager.installBundle(spec, { saveExact: true })),\n update: updateOnHost,\n }, name)\n scoped.effect(() => () => updater.dispose())\n scoped.effect(() => injectSlot(scoped, 'plugins.bundle.config', () => scoped.slots.register({\n name: 'plugins.bundle.config', key: name, locale: NAMESPACE,\n }, props => createElement(Fragment, null,\n createElement(PluginUpdateCard, { ...(props as PropsLocale<'cannbotHarness'>), updater }),\n content && createElement(ContentCard, { ...(props as PropsLocale<'cannbotHarness'>), content })))))\n }\n })\n}\nfunction unwrap<T>(result: { ok: true; value: T } | { ok: false; error: unknown }): T {\n if (!result.ok) throw result.error\n return result.value\n}\n","/** Browser companion using the existing DSH theme, settings and UI slots. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-theme/client'\nimport { en, zh, NAMESPACE, PACKAGE, type LocaleKey } from './locales.ts'\nimport { SidebarMark, SidebarName, Hero } from './Brand.tsx'\nimport { WorkflowCompat } from './WorkflowCompat.tsx'\nimport { cannTheme } from './theme.ts'\nimport interfaceCss from './interface.css?inline'\nimport './controls.css'\nimport { createElement } from 'react'\nimport { InterfaceToggle } from './InterfaceToggle.tsx'\nimport { createPresentationController } from './presentation.ts'\nimport { injectSlot } from './slot-compat.ts'\nimport { createWorkflowSelection, connectWorkflowSelection, type WorkflowSelection } from './workflow-selection.ts'\nimport { registerPluginUpdates } from './register-updates.ts'\nimport { createContentStore, type ContentStore } from './content-store.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap { cannbotHarness: LocaleKey }\n}\nexport const inject = ['slots', 'theme', 'locale', 'sessions', 'conversation']\n\n/** Register presentation with an explicit disposer so the original entries remain live underneath. */\nfunction mountInterface(ctx: Context, selection: WorkflowSelection, content: ContentStore): () => void {\n const style = document.createElement('style')\n style.dataset.cannbotHarness = 'interface'\n style.textContent = interfaceCss\n document.head.append(style)\n const releases = [\n ctx.theme.overrideTokens(PACKAGE, cannTheme),\n injectSlot(ctx, 'sidebar.brand.mark', () => ctx.slots.register({ name: 'sidebar.brand.mark', priority: -100 }, SidebarMark)),\n injectSlot(ctx, 'sidebar.brand.name', () => ctx.slots.register({ name: 'sidebar.brand.name', priority: -100 }, SidebarName)),\n injectSlot(ctx, 'conversation.hero.brand.mark', () => ctx.slots.register({ name: 'conversation.hero.brand.mark', priority: -100 }, Hero)),\n injectSlot(ctx, 'conversation.hero.agentPreset', () => ctx.slots.register({ name: 'conversation.hero.agentPreset', priority: -100, locale: NAMESPACE }, props => createElement(WorkflowCompat, { ...props, ctx, selection, content }))),\n ]\n return () => { for (const release of releases.reverse()) release(); style.remove() }\n}\n\nexport function apply(ctx: Context): void {\n const content = createContentStore()\n ctx.effect(() => content.start())\n registerPluginUpdates(ctx, content)\n const selection = createWorkflowSelection((sessionId, reason) => {\n const blocks = ctx.conversation.blocks\n const id = sessionId as Parameters<typeof blocks.set>[0]\n const store = blocks.storeFor(id)\n // Do not replace a block owned by another DSH plugin.\n if (store.getSnapshot() !== undefined) return () => {}\n const block = { reason }\n blocks.set(id, block)\n return () => { if (store.getSnapshot() === block) blocks.set(id, undefined) }\n }, content.prepare)\n connectWorkflowSelection(ctx, selection)\n ctx.effect(() => () => selection.dispose())\n ctx.effect(() => ctx.locale.register(NAMESPACE, { zh, en, ja: en, es: en, fr: en, de: en, ru: en, pt: en }))\n ctx.effect(() => {\n const controller = createPresentationController(() => mountInterface(ctx, selection, content))\n const releaseToggle = injectSlot(ctx, 'sidebar.footer.action', () => ctx.slots.register({\n name: 'sidebar.footer.action', id: 'cannbot-harness-interface', order: -100,\n }, props => createElement(InterfaceToggle, { ...props, controller })))\n return () => { releaseToggle(); controller.dispose() }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,MAAa,UAAU;EACvB,MAAa,YAAY;EACzB,MAAa,UAAU;EAGvB,MAAa,KAAK;GAChB,gBAAgB;GAAS,cAAc;GAAW,gBAAgB;GAAQ,eAAe;GAAQ,eAAe;GAChH,gBAAgB;GAAM,eAAe;GAAM,iBAAiB;GAAO,iBAAiB;GAAQ,kBAAkB;GAAW,qBAAqB;GAAO,oBAAoB;GACzK,cAAc;GAAS,aAAa;GAAW,aAAa;GAAS,oBAAoB;GACzF,qBAAqB;GAAsB,cAAc;GACzD,eAAe;GAA6B,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MAAM,KAAK;IACX,MAAM,QAAQ,OAAO,SAAS,EAAE;IAEhC,IAAI,MAAM,YAAY,MAAM,KAAA,GAAW,aAAa,CAAC;IACrD,MAAM,QAAQ,EAAE,OAAO;IACvB,OAAO,IAAI,IAAI,KAAK;IACpB,aAAa;KAAE,IAAI,MAAM,YAAY,MAAM,OAAO,OAAO,IAAI,IAAI,KAAA,CAAS;IAAE;GAC9E,GAAG,QAAQ,OAAO;GAClB,yBAAyB,KAAK,SAAS;GACvC,IAAI,mBAAmB,UAAU,QAAQ,CAAC;GAC1C,IAAI,aAAa,IAAI,OAAO,SAAS,WAAW;IAAE;IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;IAAI,IAAI;GAAG,CAAC,CAAC;GAC3G,IAAI,aAAa;IACf,MAAM,aAAa,mCAAmC,eAAe,KAAK,WAAW,OAAO,CAAC;IAC7F,MAAM,gBAAgB,WAAW,KAAK,+BAA+B,IAAI,MAAM,SAAS;KACtF,MAAM;KAAyB,IAAI;KAA6B,OAAO;IACzE,IAAG,WAAA,GAAA,MAAA,cAAA,CAAuB,iBAAiB;KAAE,GAAG;KAAO;IAAW,CAAC,CAAC,CAAC;IACrE,aAAa;KAAE,cAAc;KAAG,WAAW,QAAQ;IAAE;GACvD,CAAC;EACH"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["primitives","primitives","LegacyMenu","unwrap","raw","Fragment","interfaceCss"],"sources":["../src/client/locales.ts","../src/client/Brand.tsx","../src/workflows.ts","../src/client/workflow-copy.ts","../src/client/WorkflowIcon.tsx","../src/content-types.ts","../src/client/content-store.ts","../src/client/WorkflowSelector.tsx","../src/client/WorkflowCompat.tsx","../src/client/theme.ts","../src/client/InterfaceToggle.tsx","../src/client/presentation.ts","../src/client/slot-compat.ts","../src/client/workflow-selection.ts","../src/client/plugin-update.ts","../src/client/PluginUpdateCard.tsx","../src/client/host-update.ts","../src/client/ContentCard.tsx","../src/client/register-updates.ts","../src/client/index.ts"],"sourcesContent":["export const PRODUCT = 'CANNBot Harness'\nexport const NAMESPACE = 'cannbotHarness'\nexport const PACKAGE = '@cannbot-plugin/cannbot-harness'\nexport const COMMAND = '/ops-direct-invoke'\n\nexport const zh = {\n contentCatalog: '工作流目录', contentCheck: '检查工作流更新', contentVersion: '当前版本', contentLatest: '最新版本', contentPinned: '已固定回退版本',\n contentInstall: '安装', contentUpdate: '更新', contentRollback: '回退到', contentUpToDate: '已是最新', contentUnchecked: '已安装,可使用', contentNotInstalled: '未安装', contentUnavailable: '暂不可用',\n contentTitle: '工作流管理', contentSync: '更新全部工作流', contentBusy: '正在准备…', contentDownloading: '正在从 npm 获取独立工作流包…',\n contentInitializing: '正在执行官方安装器,准备工作区依赖…', contentReady: '工作流已准备完成,可独立更新。选择工作流时自动准备当前工作区。',\n contentFailed: '准备未完成。已有工作流版本保留;请查看日志后重试。', contentFallback: '正在准备首次安装的工作流包。', contentWorkflows: '个已安装工作流', contentLogs: '查看准备日志',\n updateBackground: '后台正在更新,请勿重复安装。', updateRestored: '更新失败,已恢复旧版。',\n updateRepair: '更新和恢复未完成,请在插件页重新安装原版本。', updateConnectionLost: '连接中断,后台更新可能仍在进行。请重新打开插件页确认版本,勿重复安装。', updateDismiss: '关闭更新提示',\n updateTitle: '版本更新', updateCurrent: '当前版本', updateCheck: '检查更新', updateChecking: '正在检查…',\n updateTo: '更新到', updateRunning: '正在更新…', updateAvailable: '发现新版本,点击上方按钮更新。',\n updateLatest: '当前已是最新版本。', updateDone: '更新已完成。', updateRestart: '新版已安装,重启 DSH 后生效。',\n updateManual: '当前 DSH 要求先卸载旧版。请先下载新版包,再在插件页卸载旧版并添加下载的安装包。',\n updateIncompatible: '当前 DSH 不支持此版本,请先升级 DSH。', updateFailed: '暂时无法完成,请稍后重试。', updateDownload: '下载新版安装包',\n workflow: '选择工作流', ordinary: '普通对话', saving: '正在应用工作流…', operator: 'ops-direct-invoke', commandHint: '发送时自动应用所选工作流,只需填写需求。',\n flash: 'ops-direct-invoke-flash', registry: 'ops-registry-invoke', model: 'model-infer-optimize',\n hccl: 'hccl-op-generator', triton: 'triton-op-generator', catlass: 'catlass-op-generator', performance: 'ops-perf-optimize', pypto: 'pypto-op-orchestrator',\n operatorDescription: '开发 Ascend C 算子,通过直调方式接入使用。',\n flashDescription: '快速生成并验证 Ascend C 算子。',\n registryDescription: '开发 Ascend C 注册算子,通过 ACLNN / GEIR 接入框架。',\n modelDescription: '将模型迁移到 NPU,完成精度对齐与推理性能优化。',\n hcclDescription: '开发 HCCL AICPU 通信算子,协同完成代码生成与验证。',\n tritonDescription: '生成并优化 Triton-Ascend 算子代码。',\n catlassDescription: '基于 CATLASS 模板开发矩阵计算、注意力等算子,验证精度与性能。',\n performanceDescription: '分析并优化 Ascend C 算子性能,验证精度并检查性能退化。',\n pyptoDescription: '开发并调优 PyPTO 算子,也支持对已有算子单独调优。',\n chooseWorkspace: '请先选择工作目录。', insertFailed: '工作流准备或设置未完成,请到插件详情查看准备日志后重试。', settingsRetry: '设置连接失败,重试', workflowRetry: '工作流未就绪,重试',\n}\nexport const en: typeof zh = {\n contentCatalog: 'Workflow catalog', contentCheck: 'Check workflow updates', contentVersion: 'Installed', contentLatest: 'Latest', contentPinned: 'Rolled-back version pinned',\n contentInstall: 'Install', contentUpdate: 'Update', contentRollback: 'Roll back to', contentUpToDate: 'Up to date', contentUnchecked: 'Installed and ready', contentNotInstalled: 'Not installed', contentUnavailable: 'Unavailable',\n contentTitle: 'Workflow manager', contentSync: 'Update all workflows', contentBusy: 'Preparing…', contentDownloading: 'Fetching independent workflow packages from npm…',\n contentInitializing: 'Running the official installer to prepare workspace dependencies…', contentReady: 'Workflows are ready and can be updated independently. Selecting one prepares this workspace automatically.',\n contentFailed: 'Preparation did not finish. Existing workflow versions are retained; check the log and retry.', contentFallback: 'Preparing the first workflow package installation.', contentWorkflows: 'installed workflows', contentLogs: 'View preparation log',\n updateBackground: 'Updating in the background. Do not install again.', updateRestored: 'Update failed; the previous version was restored.',\n updateRepair: 'Update and recovery did not finish. Reinstall the previous version from Plugins.', updateConnectionLost: 'Connection lost. The Host may still be updating. Reopen Plugins to check the version before retrying.', updateDismiss: 'Dismiss update notice',\n updateTitle: 'Updates', updateCurrent: 'Installed version', updateCheck: 'Check for updates', updateChecking: 'Checking…',\n updateTo: 'Update to', updateRunning: 'Updating…', updateAvailable: 'A new version is available. Use the button above to update.',\n updateLatest: 'You are up to date.', updateDone: 'Update completed.', updateRestart: 'The update is installed. Restart DSH to apply it.',\n updateManual: 'This DSH version requires removing the old plugin first. Download the update, then uninstall the old plugin and add the downloaded package.',\n updateIncompatible: 'This release requires updating DSH first.', updateFailed: 'Unable to complete this operation. Please retry.', updateDownload: 'Download update',\n workflow: 'Choose workflow', ordinary: 'Ordinary conversation', saving: 'Applying workflow…', operator: 'ops-direct-invoke', commandHint: 'The selected workflow is applied in the background when you send.',\n flash: 'ops-direct-invoke-flash', registry: 'ops-registry-invoke', model: 'model-infer-optimize',\n hccl: 'hccl-op-generator', triton: 'triton-op-generator', catlass: 'catlass-op-generator', performance: 'ops-perf-optimize', pypto: 'pypto-op-orchestrator',\n operatorDescription: 'Develop Ascend C operators and integrate them through direct invocation.',\n flashDescription: 'Quickly generate and validate Ascend C operators.',\n registryDescription: 'Develop registered Ascend C operators for framework integration through ACLNN / GEIR.',\n modelDescription: 'Migrate models to NPU, align accuracy and optimize inference performance.',\n hcclDescription: 'Develop HCCL AICPU communication operators with coordinated code generation and validation.',\n tritonDescription: 'Generate and optimize Triton-Ascend operator code.',\n catlassDescription: 'Build matrix and attention operators using CATLASS templates; validate accuracy and performance.',\n performanceDescription: 'Analyze and optimize Ascend C operator performance, checking accuracy and regressions.',\n pyptoDescription: 'Develop and tune PyPTO operators, or tune existing operators independently.',\n chooseWorkspace: 'Choose a working directory first.', insertFailed: 'Workflow preparation or saving failed. Check preparation logs in the plugin details and retry.', settingsRetry: 'Reconnect settings', workflowRetry: 'Retry workflow',\n}\nexport type LocaleKey = keyof typeof zh\n","import type { HeroBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type { SidebarBrandMarkOwnerProps } from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport { PRODUCT } from './locales.ts'\n\nexport function Mark({ size }: { size: number }) {\n return <svg width={size} height={size} viewBox=\"0 0 40 40\" aria-hidden=\"true\">\n <rect x=\"1\" y=\"1\" width=\"38\" height=\"38\" rx=\"12\" fill=\"var(--dsw-alias-brand-primary)\" />\n <path d=\"M27 12a11 11 0 1 0 0 16\" fill=\"none\" stroke=\"var(--dsw-alias-label-primary-foreground)\" strokeWidth=\"4\" strokeLinecap=\"round\" />\n </svg>\n}\nexport function SidebarMark({ size }: SidebarBrandMarkOwnerProps) { return <Mark size={size} /> }\nexport function SidebarName() { return <span className=\"cannbot-harness-name\">{PRODUCT}</span> }\nexport function Hero({ size }: HeroBrandMarkOwnerProps) {\n return <span data-cannbot-harness-hero=\"\"><Mark size={size} /><span>{PRODUCT}</span></span>\n}\n","export const WORKFLOWS = [\n { id: 'ops-direct-invoke', label: 'operator', description: 'operatorDescription' },\n { id: 'ops-direct-invoke-flash', label: 'flash', description: 'flashDescription' },\n { id: 'ops-registry-invoke', label: 'registry', description: 'registryDescription' },\n { id: 'model-infer-optimize', label: 'model', description: 'modelDescription' },\n { id: 'hccl-op-generator', label: 'hccl', description: 'hcclDescription' },\n { id: 'triton-op-generator', label: 'triton', description: 'tritonDescription' },\n { id: 'catlass-op-generator', label: 'catlass', description: 'catlassDescription' },\n { id: 'ops-perf-optimize', label: 'performance', description: 'performanceDescription' },\n { id: 'pypto-op-orchestrator', label: 'pypto', description: 'pyptoDescription' },\n] as const\n","import { WORKFLOWS } from '../workflows.ts'\nimport type { LocaleKey } from './locales.ts'\n\n/** Keep presentation consistent even when an older workflow package has a Chinese title. */\nexport function workflowCopy(workflow: { id: string; title: string; description?: string }, t: (key: LocaleKey) => string) {\n const known = WORKFLOWS.find(item => item.id === workflow.id)\n return { name: workflow.id, description: known ? t(known.description) : workflow.description ?? (workflow.title === workflow.id ? '' : workflow.title) }\n}\n","import * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { ComponentType } from 'react'\n\n/** The exact icon component used by DSH's original Standard mode selector. */\nexport function WorkflowIcon({ size = 16 }: { size?: number }) {\n const icons = primitives as unknown as Record<string, ComponentType<{ size?: number }>>\n const Icon = icons.IconAgentPresetOutlineRegular ?? icons.IconAgentPresetOutline16 ?? icons.IconRefreshOutline16\n return Icon ? <Icon size={size} /> : null\n}\n\nexport function ChevronIcon({ size = 12 }: { size?: number }) {\n const icons = primitives as unknown as Record<string, ComponentType<{ size?: number }>>\n const Icon = icons.IconChevronDownOutlineRegular ?? icons.IconChevronDownOutline14\n return Icon ? <Icon size={size} /> : <svg width={size} height={size} viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\"><path d=\"m3 4.5 3 3 3-3\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeLinejoin=\"round\" /></svg>\n}\n","export interface ContentPlugin { id: string; title: string; aliases: Record<string, string>; resourceDirectory?: string; version?: string; packageName?: string }\nexport interface ContentSkill { name: string; originalName: string; pluginId: string; path: string; entry: boolean }\nexport interface ContentCatalog { revision?: string; commit?: string; skillsCommit?: string; plugins: ContentPlugin[]; exposedSkills: ContentSkill[] }\nexport interface WorkflowEntry { id: string; title: string; package: string; default: boolean }\nexport interface WorkflowRow extends WorkflowEntry {\n version?: string; latest?: string; previous?: string; installed: boolean; pinned: boolean; error?: string\n}\nexport interface WorkflowDescriptor {\n schemaVersion: 1; id: string; title: string; version: string\n initialization: { kind: 'cannbot-cli'; entry: string } | { kind: 'skill-native' }\n skills: { name: string; path: string; hash: string; entry: boolean }[]\n source: { repository: string; commit: string; skillsCommit: string }\n}\nexport interface ContentStatus {\n phase: 'idle' | 'syncing' | 'ready' | 'error' | 'initializing'\n plugins: { id: string; title: string }[]\n commit?: string; skillsCommit?: string; updatedAt?: string\n fallback: boolean; message: string; log: string\n workflows?: WorkflowRow[]; busy?: boolean; catalogVersion?: string\n}\nexport const CONTENT_PATH = 'api/cannbot-harness/content'\n","import { WORKFLOWS } from '../workflows.ts'\nimport { CONTENT_PATH, type ContentStatus } from '../content-types.ts'\nexport interface DynamicWorkflow { id: string; title: string }\nconst initial: { workflows: DynamicWorkflow[]; status: ContentStatus | undefined } = { workflows: WORKFLOWS.map(({ id }) => ({ id, title: id })), status: undefined }\nexport function createContentStore() {\n let state = initial, closed = false, timer: ReturnType<typeof setTimeout> | undefined\n const listeners = new Set<() => void>()\n const publish = (status: ContentStatus) => { if (!closed) { state = { status, workflows: status.plugins }; for (const listener of listeners) listener() } }\n const endpoint = () => new URL(CONTENT_PATH, document.baseURI)\n const pull = async () => {\n try {\n const response = await fetch(endpoint(), { credentials: 'same-origin', cache: 'no-store', signal: AbortSignal.timeout(15000) })\n if (response.ok) {\n const status = await response.json() as ContentStatus\n if (Array.isArray(status.plugins) && status.plugins.every(item => /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(item.id) && typeof item.title === 'string')) publish(status)\n }\n } catch { /* Keep the last catalog across a short disconnect. */ }\n }\n const post = async (body: object) => {\n const response = await fetch(endpoint(), { method: 'POST', credentials: 'same-origin', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) })\n if (!response.ok) { await pull(); throw new Error('CANNBot content preparation failed') }\n await pull()\n }\n return {\n getSnapshot: () => state,\n subscribe(listener: () => void) { listeners.add(listener); return () => { listeners.delete(listener) } },\n start() {\n const tick = async () => { await pull(); if (!closed) timer = setTimeout(() => { void tick() }, 3000) }\n void tick()\n return () => { closed = true; clearTimeout(timer); listeners.clear() }\n },\n sync: () => post({ action: 'sync' }),\n check: () => post({ action: 'check' }),\n update: (id: string, version: string) => post({ action: 'update', id, version }),\n rollback: (id: string) => post({ action: 'rollback', id }),\n prepare: (sessionId: string, id: string) => post({ action: 'prepare', sessionId, id }),\n }\n}\nexport type ContentStore = ReturnType<typeof createContentStore>\nexport const fallbackContent = { getSnapshot: () => initial, subscribe: (_: () => void) => () => {} }\n","import { useState, useSyncExternalStore, type ComponentType, type ReactNode } from 'react'\nimport * as primitives from '@deepseek-ai/dsh-client-ui-primitives'\nimport type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport { workflowCopy } from './workflow-copy.ts'\nimport { WorkflowIcon, ChevronIcon } from './WorkflowIcon.tsx'\nimport type { WorkflowSelection } from './workflow-selection.ts'\nimport { fallbackContent, type ContentStore, type DynamicWorkflow } from './content-store.ts'\n\nexport type WorkflowProps = PropsRuntime<'conversation.hero.agentPreset'> & PropsLocale<'cannbotHarness'> & { selection: WorkflowSelection; content?: ContentStore }\n\n/** Select a workflow without submitting, replacing text, or discarding reference chips. */\nexport function WorkflowSelector({ sessionId, inputActions, useInput, t, selection, content = fallbackContent as ContentStore }: WorkflowProps) {\n const { workflows } = useSyncExternalStore(content.subscribe, content.getSnapshot)\n const copy = (workflow: DynamicWorkflow) => workflowCopy(workflow, t)\n const input = useInput(state => state)\n const saved = useSyncExternalStore(selection.subscribe, selection.getSnapshot)\n const [open, setOpen] = useState(false)\n const selected = workflows.find(workflow => sessionId && saved.values[sessionId] === workflow.id)\n const available = !!sessionId && saved.ready && !saved.pending && inputActions !== undefined && input !== undefined && input.phase === 'plain'\n const pick = (id: string) => {\n setOpen(false)\n if (sessionId && available) void selection.choose(sessionId, id, t('saving'))\n }\n const anchor = (\n <button type=\"button\" className=\"cannbot-harness-workflow-trigger\" aria-label={t('workflow')} aria-haspopup=\"menu\" aria-expanded={open}\n disabled={!available} title={inputActions === undefined ? t('chooseWorkspace') : t('commandHint')}\n onClick={() => setOpen(value => !value)}>\n <WorkflowIcon />\n <span className=\"cannbot-harness-workflow-label\" lang={selected ? 'en' : undefined}>{selected ? copy(selected).name : t('workflow')}</span><ChevronIcon size={12} />\n </button>\n )\n const label = (workflow: DynamicWorkflow) => <span className=\"cannbot-harness-workflow-option\">\n <span lang=\"en\">{copy(workflow).name}</span>\n {copy(workflow).description && <>{' '}<small>{copy(workflow).description}</small></>}\n </span>\n const { Menu, MenuItemButton } = primitives\n const LegacyMenu = Menu as unknown as ComponentType<{ open: boolean; anchor: ReactNode; portal: boolean; className: string; onClose(): void; selectedId?: string; onSelect(id: string): void; items: { id: string; label: ReactNode; icon: ReactNode }[] }>\n return <span className=\"cannbot-harness-workflow\">\n {typeof MenuItemButton === 'function' ? <Menu open={open} onClose={() => setOpen(false)} portal className=\"cannbot-harness-workflow-anchor\" anchor={anchor}>\n <MenuItemButton icon={<WorkflowIcon />} onSelect={() => pick('')}>{t('ordinary')}</MenuItemButton>\n {workflows.map(workflow => <MenuItemButton key={workflow.id} icon={<WorkflowIcon />} onSelect={() => pick(workflow.id)}>{label(workflow)}</MenuItemButton>)}\n </Menu> : <LegacyMenu open={open} onClose={() => setOpen(false)} portal className=\"cannbot-harness-workflow-anchor\" anchor={anchor}\n selectedId={selected?.id} items={[{ id: '', label: t('ordinary'), icon: <WorkflowIcon /> }, ...workflows.map(workflow => ({ id: workflow.id, label: label(workflow), icon: <WorkflowIcon /> }))]}\n onSelect={pick} />}\n {saved.error && <span role=\"alert\" className=\"cannbot-harness-error\">\n <button type=\"button\" onClick={() => selection.retry()} title={t('insertFailed')}>\n {t(saved.errorKind === 'settings' ? 'settingsRetry' : 'workflowRetry')}\n </button>\n </span>}\n </span>\n}\n","import { useMemo, useSyncExternalStore } from 'react'\nimport type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport { WorkflowSelector, type WorkflowProps } from './WorkflowSelector.tsx'\n\n/** Older DSH declares the hero seat at root scope. Resolve its current session\n * through the public services rather than reaching into the editor or DOM. */\nexport function WorkflowCompat({ ctx, ...props }: WorkflowProps & { ctx: Context }) {\n return typeof props.useInput === 'function'\n ? <WorkflowSelector {...props} />\n : <LegacyWorkflow ctx={ctx} {...props} />\n}\n\nfunction LegacyWorkflow({ ctx, ...props }: WorkflowProps & { ctx: Context }) {\n type Input = ReturnType<Context['conversation']['input']['for']>\n const legacy = ctx as unknown as { sessions: { list: { subscribe(listener: () => void): () => void; getSnapshot(): { current?: string } }; scope(id: string): Context | undefined } }\n const sessions = useSyncExternalStore(legacy.sessions.list.subscribe, legacy.sessions.list.getSnapshot)\n const input = useMemo(() => {\n const scope = sessions.current && legacy.sessions.scope(sessions.current)\n return scope ? ctx.conversation.input.for(scope) as Input : undefined\n }, [ctx, sessions.current])\n const state = useSyncExternalStore(input?.state.subscribe ?? noSubscribe, input?.state.getSnapshot ?? noSnapshot)\n return <WorkflowSelector {...props} sessionId={sessions.current as WorkflowProps['sessionId']} useInput={select => state ? select(state) : undefined as never} inputActions={input ? {} as WorkflowProps['inputActions'] : undefined} />\n}\nconst noSubscribe = () => () => {}\nconst noSnapshot = () => undefined\n","import type { ThemeTokenOverrides } from '@deepseek-ai/dsh-client-ui-theme/client'\n\n/** Portal design-v2 palette, applied through the documented theme override layer. */\nexport const cannTheme: ThemeTokenOverrides = Object.fromEntries(Object.entries({\n '--dsw-alias-bg-base': ['#ffffff', '#101114'],\n '--dsw-alias-bg-layer-1': ['#ffffff', '#17191e'],\n '--dsw-alias-bg-layer-2': ['#ffffff', '#1d2026'],\n '--dsw-alias-bg-layer-3': ['#f6f8fa', '#252830'],\n '--dsw-specific-sidebar-fill': ['#f6f8fa', '#14161b'],\n '--dsw-specific-input-major': ['#ffffff', '#1d2026'],\n '--dsw-specific-sidebar-nav-item-active': ['#fdeef0', '#392029'],\n '--dsw-specific-sidebar-nav-item-active-accent': ['#fdeef0', '#392029'],\n '--dsw-alias-label-primary': ['#17181d', '#f3f4f6'],\n '--dsw-alias-label-primary-foreground': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-inverted': ['#ffffff', '#ffffff'],\n '--dsw-alias-label-primary-dimmed': ['#30343e', '#dde1e8'],\n '--dsw-alias-label-primary-bluish': ['#7f0f26', '#ff9aab'],\n '--dsw-alias-label-secondary': ['#59637a', '#b0b8c7'],\n '--dsw-alias-label-tertiary': ['#727d91', '#929db0'],\n '--dsw-alias-brand-primary': ['#da203e', '#ef4560'],\n '--dsw-alias-brand-text': ['#17181d', '#f3f4f6'],\n '--dsw-alias-button-primary-hover': ['#b11430', '#ff647d'],\n '--dsw-alias-button-info-fill': ['#da203e', '#da203e'],\n '--dsw-alias-button-info-hover': ['#b11430', '#b11430'],\n '--dsw-alias-state-business-primary': ['#da203e', '#ff8297'],\n '--dsw-alias-state-business-tertiary': ['#fdeef0', '#392029'],\n '--dsw-alias-link': ['#b11430', '#ff9aab'],\n '--dsw-focus-ring-color': ['#da203e', '#ff8297'],\n '--dsw-alias-border-l1': ['#f0f1f5', '#252830'],\n '--dsw-alias-border-l2': ['#e6e9ef', '#323641'],\n '--dsw-alias-border-l3': ['#dce0e8', '#414754'],\n '--dsw-alias-border-l4': ['#ced4df', '#505867'],\n '--dsw-alias-interactive-bg-hover': ['#eef0f4', '#252830'],\n '--dsw-alias-interactive-bg-active': ['#fdeef0', '#392029'],\n '--dsw-specific-bubble': ['#fff3f5', '#302027'],\n '--dsw-specific-bubble-highlight': ['#fbd6dd', '#59303d'],\n '--dsw-radius-panel': ['18px', '18px'],\n '--dsw-radius-xl': ['14px', '14px'],\n '--dsw-radius-lg': ['12px', '12px'],\n '--dsw-radius-md': ['10px', '10px'],\n '--cann-grid': ['#e6e9ef', '#323641'],\n '--cann-night': ['#0e0f12', '#0e0f12'],\n '--cann-night-label': ['#dde1e8', '#dde1e8'],\n}).map(([name, values]) => [name, { light: values[0]!, dark: values[1]! }]))\n","import { useSyncExternalStore } from 'react'\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { PresentationController } from './presentation.ts'\nimport { Mark } from './Brand.tsx'\nimport { PRODUCT } from './locales.ts'\n\nexport function InterfaceToggle({ wide, controller }: PropsRuntime<'sidebar.footer.action'> & { controller: PresentationController }) {\n const enabled = useSyncExternalStore(controller.subscribe, controller.getSnapshot, controller.getSnapshot)\n return <div className={`cannbot-harness-toggle${wide ? '' : ' cannbot-harness-toggle-compact'}`}>\n <span className=\"cannbot-harness-toggle-name\" title={PRODUCT}><Mark size={20} />{wide && <span>{PRODUCT}</span>}</span>\n <button type=\"button\" role=\"switch\" aria-label={PRODUCT} aria-checked={enabled} title={PRODUCT}\n className=\"cannbot-harness-switch\" onClick={() => controller.setEnabled(!enabled)}><span /></button>\n </div>\n}\n","/** Per-activation UI preference: enabling the plugin always starts with its interface on. */\nexport interface PresentationController {\n getSnapshot(): boolean\n subscribe(listener: () => void): () => void\n setEnabled(enabled: boolean): void\n dispose(): void\n}\nexport function createPresentationController(mount: () => () => void): PresentationController {\n let enabled = true\n let stopped = false\n let unmount: (() => void) | undefined = mount()\n const listeners = new Set<() => void>()\n return {\n getSnapshot: () => enabled,\n subscribe(listener) { listeners.add(listener); return () => { listeners.delete(listener) } },\n setEnabled(next) {\n if (stopped || next === enabled) return\n if (next) unmount = mount()\n else { unmount?.(); unmount = undefined }\n enabled = next\n for (const listener of listeners) listener()\n },\n dispose() { if (stopped) return; stopped = true; unmount?.(); unmount = undefined; listeners.clear() },\n }\n}\n","import type { Context } from '@deepseek-ai/cordis'\nimport type { SlotMap } from '@deepseek-ai/dsh-client-ui-slots'\n\n/** Older DSH declares the injected parent modules before this plugin and uses direct register(). */\nexport function injectSlot(ctx: Context, name: keyof SlotMap & string, register: () => () => void): () => void {\n return typeof ctx.slots.inject === 'function' ? ctx.slots.inject(name, register) : register()\n}\n","import type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-api-remotes/client'\nimport { WORKFLOWS } from '../workflows.ts'\n\nconst NS = 'cannbot-harness'\ntype Values = Record<string, string>\ninterface Choice { sessionId: string; workflow: string }\ninterface View { ns: string; value: { selections?: Choice[] }; revision?: number }\nconst valuesOf = (view?: View): Values => Object.fromEntries((view?.value.selections ?? []).map(item => [item.sessionId, item.workflow]))\nexport interface WorkflowTransport {\n describe(): Promise<{ namespaces: View[] }>\n update(ns: string, patch: { selections: Choice[] }, revision?: number): Promise<View>\n}\nexport interface SelectionSnapshot { ready: boolean; pending: boolean; error: boolean; errorKind?: 'settings' | 'prepare' | 'save'; values: Values }\nexport interface WorkflowSelection {\n subscribe(listener: () => void): () => void\n getSnapshot(): SelectionSnapshot\n attach(transport: WorkflowTransport): () => void\n choose(sessionId: string, workflow: string, reason?: string): Promise<void>\n retry(): void\n dispose(): void\n}\nexport function createWorkflowSelection(blockSubmission: (sessionId: string, reason: string) => () => void = () => () => {}, prepare: (sessionId: string, id: string) => Promise<void> = async () => {}): WorkflowSelection {\n let snapshot: SelectionSnapshot = { ready: false, pending: false, error: false, values: {} }\n let transport: WorkflowTransport | undefined\n let generation = 0\n let pendingRelease: (() => void) | undefined\n let timer: ReturnType<typeof setTimeout> | undefined\n let lastChoice: { sessionId: string; workflow: string; reason: string } | undefined\n const listeners = new Set<() => void>()\n const publish = (next: SelectionSnapshot) => { snapshot = next; for (const listener of listeners) listener() }\n const read = async (current: WorkflowTransport, own: number, attempt = 0) => {\n try {\n const view = await current.describe()\n if (own !== generation) return\n const section = view.namespaces.find(item => item.ns === NS)\n if (!section) throw new Error('Workflow settings are not active yet')\n publish({ ready: true, pending: false, error: false, values: valuesOf(section) })\n } catch {\n if (own !== generation) return\n // Profile settings describe only active fibers. A browser can connect while\n // async plugin activation or a profile reload is still completing.\n if (attempt >= 9) publish({ ...snapshot, ready: false, pending: false, error: true, errorKind: 'settings' })\n timer = setTimeout(() => { void read(current, own, Math.min(attempt + 1, 9)) }, attempt < 9 ? Math.min(250 * (attempt + 1), 1500) : 5000)\n }\n }\n const api: WorkflowSelection = {\n subscribe(listener) { listeners.add(listener); return () => { listeners.delete(listener) } },\n getSnapshot: () => snapshot,\n attach(next) {\n clearTimeout(timer)\n pendingRelease?.(); pendingRelease = undefined\n transport = next\n const own = ++generation\n publish({ ...snapshot, ready: false, pending: false, error: false, errorKind: undefined })\n void read(next, own)\n return () => { if (own === generation) { generation++; clearTimeout(timer); transport = undefined; publish({ ...snapshot, ready: false }) } }\n },\n async choose(sessionId, workflow, reason = 'CANNBot Harness…') {\n if (!transport || !snapshot.ready || snapshot.pending) return\n if (workflow !== '' && !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(workflow)) throw new Error('Unknown workflow')\n const current = transport, own = generation\n lastChoice = { sessionId, workflow, reason }\n const unblock = blockSubmission(sessionId, reason)\n let released = false\n const release = () => { if (!released) { released = true; unblock() } }\n pendingRelease = release\n publish({ ...snapshot, pending: true, error: false, errorKind: undefined })\n let stage: 'prepare' | 'save' = 'prepare'\n try {\n if (workflow) await prepare(sessionId, workflow)\n stage = 'save'\n // Fresh revision prevents simultaneous windows from overwriting selections.\n const view = (await current.describe()).namespaces.find(item => item.ns === NS)\n if (!view) throw new Error('Workflow settings unavailable')\n const values = { ...valuesOf(view), [sessionId]: workflow }\n const selections = Object.entries(values).filter(([, id]) => id !== '').map(([sessionId, workflow]) => ({ sessionId, workflow }))\n const result = await current.update(NS, { selections }, view.revision)\n if (own === generation) publish({ ready: true, pending: false, error: false, values: valuesOf(result) })\n } catch {\n if (own === generation) publish({ ...snapshot, pending: false, error: true, errorKind: stage })\n } finally {\n release()\n if (pendingRelease === release) pendingRelease = undefined\n }\n },\n retry() {\n if (snapshot.errorKind === 'settings' && transport) {\n clearTimeout(timer)\n publish({ ...snapshot, error: false, errorKind: undefined })\n void read(transport, generation)\n } else if (lastChoice) void api.choose(lastChoice.sessionId, lastChoice.workflow, lastChoice.reason)\n },\n dispose() { generation++; clearTimeout(timer); transport = undefined; pendingRelease?.(); pendingRelease = undefined; listeners.clear() },\n }\n return api\n}\n\n/** Both transports are official DSH settings APIs; no private editor access. */\nexport function connectWorkflowSelection(ctx: Context, selection: WorkflowSelection) {\n ctx.inject(['remote', 'remote.settings'], scoped => {\n const settings = scoped.remote.settings\n scoped.effect(() => selection.attach({\n describe: async () => unwrap(await settings.describe()),\n update: async (ns, patch, revision) => unwrap(await settings.update(ns, patch, revision)),\n }))\n })\n ctx.inject(['connection'], scoped => {\n const api = (scoped as unknown as { connection: { api?: { settings: { describe(payload: object): Promise<unknown>; update(payload: object): Promise<unknown> } } } }).connection.api\n if (!api?.settings) return\n scoped.effect(() => selection.attach({\n describe: async () => unwrap(await api.settings.describe({})),\n update: async (ns, patch, expectedRevision) => unwrap(await api.settings.update({ ns, patch, expectedRevision })),\n }))\n })\n}\nfunction unwrap<T>(response: unknown): T {\n const raw = response as { result?: unknown }\n const result = (raw.result ?? response) as { ok: boolean; value: T; error?: { message: string } }\n if (!result.ok) throw new Error(result.error?.message ?? 'Workflow settings failed')\n return result.value\n}\n","export const UPDATE_PACKAGES = ['cannbot-harness', '@cannbot-plugin/cannbot-harness'] as const\nexport interface InstalledBundle { name: string; version?: string; installed: boolean }\nexport interface Change { application: string; error?: { code: string }; version?: string }\nexport interface UpdateBridge {\n list(): Promise<InstalledBundle[]>\n install(spec: string): Promise<Change>\n update?(name: string, version: string): Promise<{ result: Change; restore?: Change }>\n}\nexport interface Release { name: string; version: string; tarball: string }\nexport type UpdatePhase = 'idle' | 'checking' | 'latest' | 'available' | 'updating' | 'done' | 'restart' | 'manual' | 'incompatible' | 'error'\nexport interface UpdateSnapshot { phase: UpdatePhase; current?: string; release?: Release; packageName?: string }\n\n/** Only stable npm releases of our two installation entries may be selected. */\nexport function newerVersion(candidate: string, current: string): boolean {\n const next = /^(\\d+)\\.(\\d+)\\.(\\d+)$/.exec(candidate)\n const old = /^(\\d+)\\.(\\d+)\\.(\\d+)(?:[-+].*)?$/.exec(current)\n if (!next || !old) return false\n for (let index = 1; index < 4; index++) {\n const difference = Number(next[index]) - Number(old[index])\n if (difference) return difference > 0\n }\n return current.includes('-')\n}\n\nexport async function latestRelease(name: string, signal: AbortSignal): Promise<Release> {\n if (!UPDATE_PACKAGES.includes(name as typeof UPDATE_PACKAGES[number])) throw new Error('Unsupported update target')\n const answers = await Promise.allSettled(['https://registry.npmjs.org/', 'https://registry.npmmirror.com/'].map(async registry => {\n const response = await fetch(`${registry}${encodeURIComponent(name)}/latest`, {\n signal: AbortSignal.any([signal, AbortSignal.timeout(15000)]), cache: 'no-store',\n })\n if (!response.ok) throw new Error('Registry unavailable')\n const manifest = await response.json() as { name?: string; version?: string; dist?: { tarball?: string }; dsh?: { bundle?: unknown } }\n if (manifest.name !== name || !manifest.version || !/^\\d+\\.\\d+\\.\\d+$/.test(manifest.version) || !manifest.dsh?.bundle || !manifest.dist?.tarball) throw new Error('Invalid release')\n const url = new URL(manifest.dist.tarball)\n if (url.protocol !== 'https:' || !['registry.npmjs.org', 'registry.npmmirror.com'].includes(url.hostname)) throw new Error('Invalid download origin')\n return { name, version: manifest.version, tarball: url.href }\n }))\n signal.throwIfAborted()\n const releases = answers.flatMap(answer => answer.status === 'fulfilled' ? [answer.value] : [])\n const latest = releases.reduce<Release | undefined>((best, release) => !best || newerVersion(release.version, best.version) ? release : best, undefined)\n if (!latest) throw new Error('No release available')\n return latest\n}\n\nexport function createPluginUpdater(bridge: UpdateBridge, requestedName: string, lookup = latestRelease) {\n let state: UpdateSnapshot = { phase: 'idle' }\n let disposed = false\n let checking: AbortController | undefined\n const listeners = new Set<() => void>()\n const publish = (next: UpdateSnapshot) => { if (disposed) return; state = next; for (const listener of listeners) listener() }\n const failed = (result: Change) => !['applied', 'restart-required'].includes(result.application) || !!result.error\n return {\n getSnapshot: () => state,\n subscribe(listener: () => void) { listeners.add(listener); return () => { listeners.delete(listener) } },\n async check() {\n if (disposed || state.phase === 'checking' || state.phase === 'updating') return\n checking?.abort()\n const abort = new AbortController()\n checking = abort\n publish({ ...state, phase: 'checking' })\n try {\n const bundles = (await bridge.list()).filter(bundle => bundle.installed && UPDATE_PACKAGES.includes(bundle.name as typeof UPDATE_PACKAGES[number]))\n // Update the actual direct dependency, preserving short/long installation form.\n const bundle = bundles.find(bundle => bundle.name === requestedName) ?? bundles[0]\n if (!bundle?.version) throw new Error('Installed entry unavailable')\n publish({ ...state, current: bundle.version, packageName: bundle.name })\n const release = await lookup(bundle.name, abort.signal)\n if (checking !== abort || disposed) return\n publish({ phase: newerVersion(release.version, bundle.version) ? 'available' : 'latest', current: bundle.version, release, packageName: bundle.name })\n } catch {\n if (!abort.signal.aborted) publish({ ...state, phase: 'error' })\n }\n },\n async update() {\n if (disposed || state.phase !== 'available' || !state.release || !state.packageName) return\n const target = state.release, name = state.packageName\n publish({ ...state, phase: 'updating' })\n try {\n // The Host owns the complete transaction, including self-removal and recovery.\n // Frontend disposal must never cancel an update that already started.\n const answer = bridge.update\n ? await bridge.update(name, target.version)\n : { result: await bridge.install(`${name}@${target.version}`) }\n const result = answer.result\n if (failed(result)) {\n const code = result.error?.code\n publish({ ...state, phase: code === 'already-installed' || code === 'stop-profile' ? 'manual' : code === 'incompatible-version' ? 'incompatible' : 'error' })\n } else {\n publish({ ...state, phase: result.application === 'restart-required' ? 'restart' : 'done', current: target.version })\n }\n } catch { publish({ ...state, phase: 'error' }) }\n },\n dispose() { disposed = true; checking?.abort(); listeners.clear() },\n }\n}\nexport type PluginUpdater = ReturnType<typeof createPluginUpdater>\n","import { useEffect, useSyncExternalStore } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { PluginUpdater } from './plugin-update.ts'\n\nexport function PluginUpdateCard({ updater, t }: { updater: PluginUpdater } & PropsLocale<'cannbotHarness'>) {\n const state = useSyncExternalStore(updater.subscribe, updater.getSnapshot)\n useEffect(() => { void updater.check() }, [updater])\n const busy = state.phase === 'checking' || state.phase === 'updating'\n const canUpdate = state.phase === 'available'\n const message = state.phase === 'latest' ? t('updateLatest')\n : state.phase === 'available' ? t('updateAvailable')\n : state.phase === 'updating' ? t('updateRunning')\n : state.phase === 'done' ? t('updateDone')\n : state.phase === 'restart' ? t('updateRestart')\n : state.phase === 'manual' ? t('updateManual')\n : state.phase === 'incompatible' ? t('updateIncompatible')\n : state.phase === 'error' ? t('updateFailed') : ''\n return <section className=\"cannbot-harness-update\" aria-label={t('updateTitle')}>\n <div className=\"cannbot-harness-update-heading\"><h4>{t('updateTitle')}</h4>\n {state.current && <span>{t('updateCurrent')} {state.current}</span>}</div>\n <div className=\"cannbot-harness-update-actions\">\n {state.phase === 'manual' && state.release ? <>\n <a className=\"cannbot-harness-update-button\" href={state.release.tarball} download rel=\"noreferrer\">{t('updateDownload')} {state.release.version}</a>\n <button type=\"button\" className=\"cannbot-harness-update-recheck\" onClick={() => { void updater.check() }}>{t('updateCheck')}</button>\n </> :\n <button type=\"button\" className=\"cannbot-harness-update-button\" disabled={busy}\n onClick={() => { void (canUpdate ? updater.update() : updater.check()) }}>\n {state.phase === 'checking' ? t('updateChecking') : state.phase === 'updating' ? t('updateRunning')\n : canUpdate ? `${t('updateTo')} ${state.release?.version}` : t('updateCheck')}\n </button>\n }\n </div>\n {message && <p role={state.phase === 'error' ? 'alert' : 'status'} aria-live=\"polite\">{message}</p>}\n </section>\n}\n","import type { Change } from './plugin-update.ts'\nimport { en, zh } from './locales.ts'\n\n/** This notice belongs to the in-flight update, so removing the plugin must not remove it. */\nexport async function updateOnHost(name: string, version: string): Promise<{ result: Change; restore?: Change }> {\n const words = document.documentElement.lang.startsWith('en') ? en : zh\n const notice = document.createElement('div')\n notice.setAttribute('role', 'status')\n notice.setAttribute('aria-live', 'polite')\n notice.dataset.cannbotUpdate = 'progress'\n Object.assign(notice.style, { position: 'fixed', bottom: '24px', right: '24px', zIndex: '2147483647',\n maxWidth: 'min(380px, calc(100vw - 48px))', padding: '16px', borderRadius: '12px',\n background: 'var(--dsw-alias-bg-base, white)', color: 'var(--dsw-alias-label-primary, #222)',\n border: '1px solid var(--dsw-alias-border-l2, #ddd)', boxShadow: '0 8px 32px #0002', fontSize: '13px', lineHeight: '1.6' })\n const text = document.createElement('span')\n text.textContent = `${words.updateRunning} ${version} · ${words.updateBackground}`\n notice.append(text)\n document.body.append(notice)\n try {\n const response = await fetch(new URL('api/cannbot-harness/update', document.baseURI), {\n method: 'POST', credentials: 'same-origin', headers: { 'content-type': 'application/json' },\n body: JSON.stringify({ name, version }),\n // No plugin-lifetime abort: its own uninstall is expected during the transaction.\n })\n if (!response.ok) throw new Error('Host update unavailable')\n const answer = await response.json() as { result: Change; restore?: Change }\n if (!answer?.result || typeof answer.result.application !== 'string') throw new Error('Invalid update result')\n const succeeded = (result: Change) => !result.error && ['applied', 'restart-required'].includes(result.application)\n text.textContent = succeeded(answer.result)\n ? `${answer.result.application === 'restart-required' ? words.updateRestart : words.updateDone} (${version})`\n : answer.restore ? succeeded(answer.restore) ? words.updateRestored : words.updateRepair : words.updateFailed\n return answer\n } catch (error) {\n text.textContent = words.updateConnectionLost\n throw error\n } finally {\n const close = document.createElement('button')\n close.type = 'button'; close.textContent = '×'; close.setAttribute('aria-label', words.updateDismiss)\n Object.assign(close.style, { marginLeft: '12px', border: '0', background: 'transparent', color: 'inherit', cursor: 'pointer', fontSize: '18px' })\n close.addEventListener('click', () => notice.remove(), { once: true })\n notice.append(close)\n }\n}\n","import { useState, useSyncExternalStore } from 'react'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport type { ContentStore } from './content-store.ts'\nimport { newerVersion } from './plugin-update.ts'\nimport { workflowCopy } from './workflow-copy.ts'\nexport function ContentCard({ content, t }: { content: ContentStore } & PropsLocale<'cannbotHarness'>) {\n const { status } = useSyncExternalStore(content.subscribe, content.getSnapshot)\n const [failed, setFailed] = useState(false)\n const busy = status?.busy || status?.phase === 'syncing' || status?.phase === 'initializing'\n const act = (action: () => Promise<void>) => { setFailed(false); void action().catch(() => setFailed(true)) }\n return <section className=\"cannbot-harness-update cannbot-harness-content\" aria-label={t('contentTitle')}>\n <div className=\"cannbot-harness-update-heading\"><h4>{t('contentTitle')}</h4>\n {status?.catalogVersion && <span>{t('contentCatalog')} {status.catalogVersion}</span>}</div>\n <div className=\"cannbot-harness-update-actions\">\n <button type=\"button\" className=\"cannbot-harness-update-button\" disabled={busy} onClick={() => act(content.sync)}>{busy ? t('contentBusy') : t('contentSync')}</button>\n <button type=\"button\" className=\"cannbot-harness-update-recheck\" disabled={busy} onClick={() => act(content.check)}>{t('contentCheck')}</button>\n </div>\n <p role={failed || status?.phase === 'error' ? 'alert' : 'status'} aria-live=\"polite\">\n {failed || status?.phase === 'error' ? t('contentFailed') : status?.phase === 'initializing' ? t('contentInitializing') : status?.phase === 'syncing' ? t('contentDownloading') : status?.fallback ? t('contentFallback') : t('contentReady')}\n </p>\n {status && <p>{status.plugins.length} {t('contentWorkflows')}</p>}\n <div className=\"cannbot-harness-workflow-packages\">\n {status?.workflows?.map(row => {\n const available = row.latest && (!row.version || newerVersion(row.latest, row.version))\n const copy = workflowCopy(row, t)\n return <div className=\"cannbot-harness-workflow-package\" key={row.id}>\n <div><strong lang=\"en\">{copy.name}</strong><small>{copy.description}</small><small lang=\"en\">{row.package}</small>\n <small>{row.version ? `${t('contentVersion')} ${row.version}` : t('contentNotInstalled')}\n {available && ` · ${t('contentLatest')} ${row.latest}`}{row.pinned && ` · ${t('contentPinned')}`}</small>\n {row.error && <small role=\"alert\">{row.error}</small>}</div>\n <div className=\"cannbot-harness-workflow-package-actions\">\n {available ? <button type=\"button\" className=\"cannbot-harness-update-recheck\" disabled={busy}\n aria-label={`${row.installed ? t('contentUpdate') : t('contentInstall')} ${copy.name}`}\n onClick={() => act(() => content.update(row.id, row.latest!))}>{row.installed ? t('contentUpdate') : t('contentInstall')}</button>\n : <small>{row.installed ? row.latest ? t('contentUpToDate') : t('contentUnchecked') : t('contentUnavailable')}</small>}\n {row.previous && <button type=\"button\" className=\"cannbot-harness-update-recheck\" disabled={busy}\n aria-label={`${t('contentRollback')} ${copy.name}`} onClick={() => act(() => content.rollback(row.id))}>{t('contentRollback')} {row.previous}</button>}\n </div>\n </div>\n })}\n </div>\n {(status?.log || status?.message) && <details><summary>{t('contentLogs')}</summary><pre>{status.message}{'\\n'}{status.log}</pre></details>}\n </section>\n}\n","import { createElement, Fragment } from 'react'\nimport type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client'\nimport type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'\nimport { createPluginUpdater, UPDATE_PACKAGES } from './plugin-update.ts'\nimport { PluginUpdateCard } from './PluginUpdateCard.tsx'\nimport { NAMESPACE } from './locales.ts'\nimport { injectSlot } from './slot-compat.ts'\nimport { updateOnHost } from './host-update.ts'\nimport { ContentCard } from './ContentCard.tsx'\nimport type { ContentStore } from './content-store.ts'\n\n/** Optional integration: old DSH versions without a Plugins page keep loading. */\nexport function registerPluginUpdates(ctx: Context, content?: ContentStore) {\n ctx.inject(['remote', 'remote.pluginManager'], scoped => {\n const manager = scoped.remote.pluginManager\n for (const name of UPDATE_PACKAGES) {\n const updater = createPluginUpdater({\n list: async () => unwrap(await manager.listBundles()),\n install: async spec => unwrap(await manager.installBundle(spec, { saveExact: true })),\n update: updateOnHost,\n }, name)\n scoped.effect(() => () => updater.dispose())\n scoped.effect(() => injectSlot(scoped, 'plugins.bundle.config', () => scoped.slots.register({\n name: 'plugins.bundle.config', key: name, locale: NAMESPACE,\n }, props => createElement(Fragment, null,\n createElement(PluginUpdateCard, { ...(props as PropsLocale<'cannbotHarness'>), updater }),\n content && createElement(ContentCard, { ...(props as PropsLocale<'cannbotHarness'>), content })))))\n }\n })\n}\nfunction unwrap<T>(result: { ok: true; value: T } | { ok: false; error: unknown }): T {\n if (!result.ok) throw result.error\n return result.value\n}\n","/** Browser companion using the existing DSH theme, settings and UI slots. */\nimport type { Context } from '@deepseek-ai/cordis'\nimport type {} from '@deepseek-ai/dsh-client-locale/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-renderer/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-sidebar/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport type {} from '@deepseek-ai/dsh-client-ui-theme/client'\nimport { en, zh, NAMESPACE, PACKAGE, type LocaleKey } from './locales.ts'\nimport { SidebarMark, SidebarName, Hero } from './Brand.tsx'\nimport { WorkflowCompat } from './WorkflowCompat.tsx'\nimport { cannTheme } from './theme.ts'\nimport interfaceCss from './interface.css?inline'\nimport './controls.css'\nimport { createElement } from 'react'\nimport { InterfaceToggle } from './InterfaceToggle.tsx'\nimport { createPresentationController } from './presentation.ts'\nimport { injectSlot } from './slot-compat.ts'\nimport { createWorkflowSelection, connectWorkflowSelection, type WorkflowSelection } from './workflow-selection.ts'\nimport { registerPluginUpdates } from './register-updates.ts'\nimport { createContentStore, type ContentStore } from './content-store.ts'\n\ndeclare module '@deepseek-ai/dsh-client-ui-slots' {\n interface LocaleNamespaceMap { cannbotHarness: LocaleKey }\n}\nexport const inject = ['slots', 'theme', 'locale', 'sessions', 'conversation']\n\n/** Register presentation with an explicit disposer so the original entries remain live underneath. */\nfunction mountInterface(ctx: Context, selection: WorkflowSelection, content: ContentStore): () => void {\n const style = document.createElement('style')\n style.dataset.cannbotHarness = 'interface'\n style.textContent = interfaceCss\n document.head.append(style)\n const releases = [\n ctx.theme.overrideTokens(PACKAGE, cannTheme),\n injectSlot(ctx, 'sidebar.brand.mark', () => ctx.slots.register({ name: 'sidebar.brand.mark', priority: -100 }, SidebarMark)),\n injectSlot(ctx, 'sidebar.brand.name', () => ctx.slots.register({ name: 'sidebar.brand.name', priority: -100 }, SidebarName)),\n injectSlot(ctx, 'conversation.hero.brand.mark', () => ctx.slots.register({ name: 'conversation.hero.brand.mark', priority: -100 }, Hero)),\n injectSlot(ctx, 'conversation.hero.agentPreset', () => ctx.slots.register({ name: 'conversation.hero.agentPreset', priority: -100, locale: NAMESPACE }, props => createElement(WorkflowCompat, { ...props, ctx, selection, content }))),\n ]\n return () => { for (const release of releases.reverse()) release(); style.remove() }\n}\n\nexport function apply(ctx: Context): void {\n const content = createContentStore()\n ctx.effect(() => content.start())\n registerPluginUpdates(ctx, content)\n const selection = createWorkflowSelection((sessionId, reason) => {\n const blocks = ctx.conversation.blocks\n const id = sessionId as Parameters<typeof blocks.set>[0]\n const store = blocks.storeFor(id)\n // Do not replace a block owned by another DSH plugin.\n if (store.getSnapshot() !== undefined) return () => {}\n const block = { reason }\n blocks.set(id, block)\n return () => { if (store.getSnapshot() === block) blocks.set(id, undefined) }\n }, content.prepare)\n connectWorkflowSelection(ctx, selection)\n ctx.effect(() => () => selection.dispose())\n ctx.effect(() => ctx.locale.register(NAMESPACE, { zh, en, ja: en, es: en, fr: en, de: en, ru: en, pt: en }))\n ctx.effect(() => {\n const controller = createPresentationController(() => mountInterface(ctx, selection, content))\n const releaseToggle = injectSlot(ctx, 'sidebar.footer.action', () => ctx.slots.register({\n name: 'sidebar.footer.action', id: 'cannbot-harness-interface', order: -100,\n }, props => createElement(InterfaceToggle, { ...props, controller })))\n return () => { releaseToggle(); controller.dispose() }\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,MAAa,UAAU;EACvB,MAAa,YAAY;EACzB,MAAa,UAAU;EAGvB,MAAa,KAAK;GAChB,gBAAgB;GAAS,cAAc;GAAW,gBAAgB;GAAQ,eAAe;GAAQ,eAAe;GAChH,gBAAgB;GAAM,eAAe;GAAM,iBAAiB;GAAO,iBAAiB;GAAQ,kBAAkB;GAAW,qBAAqB;GAAO,oBAAoB;GACzK,cAAc;GAAS,aAAa;GAAW,aAAa;GAAS,oBAAoB;GACzF,qBAAqB;GAAsB,cAAc;GACzD,eAAe;GAA6B,iBAAiB;GAAkB,kBAAkB;GAAW,aAAa;GACzH,kBAAkB;GAAkB,gBAAgB;GACpD,cAAc;GAA0B,sBAAsB;GAAuC,eAAe;GACpH,aAAa;GAAQ,eAAe;GAAQ,aAAa;GAAQ,gBAAgB;GACjF,UAAU;GAAO,eAAe;GAAS,iBAAiB;GAC1D,cAAc;GAAa,YAAY;GAAU,eAAe;GAChE,cAAc;GACd,oBAAoB;GAA2B,cAAc;GAAiB,gBAAgB;GAC9F,UAAU;GAAS,UAAU;GAAQ,QAAQ;GAAY,UAAU;GAAqB,aAAa;GACrG,OAAO;GAA2B,UAA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
17
|
-
label: "operator"
|
|
17
|
+
label: "operator",
|
|
18
|
+
description: "operatorDescription"
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
21
|
id: "ops-direct-invoke-flash",
|
|
21
|
-
label: "flash"
|
|
22
|
+
label: "flash",
|
|
23
|
+
description: "flashDescription"
|
|
22
24
|
},
|
|
23
25
|
{
|
|
24
26
|
id: "ops-registry-invoke",
|
|
25
|
-
label: "registry"
|
|
27
|
+
label: "registry",
|
|
28
|
+
description: "registryDescription"
|
|
26
29
|
},
|
|
27
30
|
{
|
|
28
31
|
id: "model-infer-optimize",
|
|
29
|
-
label: "model"
|
|
32
|
+
label: "model",
|
|
33
|
+
description: "modelDescription"
|
|
30
34
|
},
|
|
31
35
|
{
|
|
32
36
|
id: "hccl-op-generator",
|
|
33
|
-
label: "hccl"
|
|
37
|
+
label: "hccl",
|
|
38
|
+
description: "hcclDescription"
|
|
34
39
|
},
|
|
35
40
|
{
|
|
36
41
|
id: "triton-op-generator",
|
|
37
|
-
label: "triton"
|
|
42
|
+
label: "triton",
|
|
43
|
+
description: "tritonDescription"
|
|
38
44
|
},
|
|
39
45
|
{
|
|
40
46
|
id: "catlass-op-generator",
|
|
41
|
-
label: "catlass"
|
|
47
|
+
label: "catlass",
|
|
48
|
+
description: "catlassDescription"
|
|
42
49
|
},
|
|
43
50
|
{
|
|
44
51
|
id: "ops-perf-optimize",
|
|
45
|
-
label: "performance"
|
|
52
|
+
label: "performance",
|
|
53
|
+
description: "performanceDescription"
|
|
46
54
|
},
|
|
47
55
|
{
|
|
48
56
|
id: "pypto-op-orchestrator",
|
|
49
|
-
label: "pypto"
|
|
57
|
+
label: "pypto",
|
|
58
|
+
description: "pyptoDescription"
|
|
50
59
|
}
|
|
51
60
|
];
|
|
52
61
|
//#endregion
|
package/package.json
CHANGED