@authinex/dsh-plugin 0.3.11 → 0.3.12

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 CHANGED
@@ -63,6 +63,20 @@ DeepSeek Harness 负责对话,并安装、启用本插件。插件把**技能*
63
63
  设好之后模型调工具时自动按这个版本和产品线查,建单自动带客户名,技能列表也跟着收窄。
64
64
  留空就是自己判断。详见 [工作上下文-使用说明.md](docs/工作上下文-使用说明.md)。
65
65
 
66
+ ### 深度分析
67
+
68
+ 配置页的开关(默认关闭),或对话里用 `/ax-deep 开` / `/ax-deep 关`。
69
+
70
+ 开着时每一轮都先用源码核实再答,答复按「结论 / 源码依据(路径:行号)/ 旁证 /
71
+ 反证或未核实点 / 置信度」列;知识库和文档只作背景。**关着不是禁用源码分析**:
72
+ 工具一个不少,只是不再强制每轮看代码,回到按问题复杂度自动选工具。
73
+
74
+ 代价是更慢,换来的是证据更全。开关存在本机,和工作上下文分开。
75
+ 详见 [深度分析-使用说明.md](docs/深度分析-使用说明.md)。
76
+
77
+ 两种模式的测试(易中难六题,开和关各跑一遍,看模型实际怎么调工具)见
78
+ [深度分析-两模式测试.md](docs/深度分析-两模式测试.md)。
79
+
66
80
  ## 使用时记住
67
81
 
68
82
  - 不填版本时,用该产品线的默认版本。对外号、清单号和分支名由服务端识别。
@@ -71,3 +85,4 @@ DeepSeek Harness 负责对话,并安装、启用本插件。插件把**技能*
71
85
  - 访问地址和密钥在配置页填写,私钥留在本机。ONES / 氚云 / PMO 的账号写回服务端,页面显示登录名和已配置,不显示密码。
72
86
  - 知识命中标 `[S1]`,代码命中标 `[C1]`,答复里用同一个号对回那一条。出处来自当次检索。
73
87
  - 没查到会说明没找到,并给出下一步,例如换说法、放宽条件或换一个工具。
88
+ - 深度分析开着时再问「这版为什么」,答案会带文件行号;只查单号或配置路径时关掉更省时间。
package/lib/client.js CHANGED
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(client_exports);
30
30
 
31
31
  // src/panel/panel.tsx
32
32
  var import_react5 = require("react");
33
- var import_dsh_client_ui_primitives5 = require("@deepseek-ai/dsh-client-ui-primitives");
33
+ var import_dsh_client_ui_primitives6 = require("@deepseek-ai/dsh-client-ui-primitives");
34
34
 
35
35
  // src/session/endpoint.ts
36
36
  function checkEndpoint(raw) {
@@ -337,6 +337,19 @@ var TOOLS = {
337
337
  }
338
338
  };
339
339
 
340
+ // src/work/deep-analysis.ts
341
+ var DEEP_ON_HINT = "每轮先用代码检索核实再答:结论、源码依据(文件:行号)、旁证、反证和置信度都会列出来。";
342
+ var DEEP_OFF_HINT = "按问题复杂度自动决定用哪些工具;源码分析能力不受影响,需要看代码时照样会用。";
343
+ var DEEP_COST_HINT = "开启后耗时可能更久,但给出的答案证据更丰富、维度更全。";
344
+ var HOWTO = "用法:/ax-deep 开,或 /ax-deep 关";
345
+ var USAGE = `没看懂。${HOWTO}`;
346
+ function deepSaveFailureText(body) {
347
+ const data = body || {};
348
+ const missing = !("ok" in data) || String(data.detail || "") === "not found";
349
+ if (missing) return "没保存:插件后端还是旧版本,重启智能问答后这个开关才能用";
350
+ return String(data.message || "没有保存");
351
+ }
352
+
340
353
  // src/work/work-context.ts
341
354
  var PRODUCT_KINDS = [
342
355
  { id: "yunshu", label: "云枢" },
@@ -348,8 +361,8 @@ function labelOf(kind) {
348
361
  const found = PRODUCT_KINDS.find((item) => item.id === kind);
349
362
  return found ? found.label : kind;
350
363
  }
351
- var HOWTO = "用法:/ax-context 云枢 8.7 某客户 要问的问题,或 /ax-context 清空";
352
- var USAGE = `没看懂。${HOWTO}`;
364
+ var HOWTO2 = "用法:/ax-context 云枢 8.7 某客户 要问的问题,或 /ax-context 清空";
365
+ var USAGE2 = `没看懂。${HOWTO2}`;
353
366
  function parseReceiptText(text) {
354
367
  const lines = String(text || "").split("\n").map((line) => line.trim()).filter(Boolean);
355
368
  const first = lines[0] || "";
@@ -464,6 +477,10 @@ function verified(state) {
464
477
  const phase = state?.phase;
465
478
  return phase === "bound" || phase === "caps-missing" || phase === "upgrade";
466
479
  }
480
+ var BIND_FORM_PHASES = ["unbound", "invalid", "revoked", "locked"];
481
+ function showsBindForm(phase) {
482
+ return BIND_FORM_PHASES.includes(phase);
483
+ }
467
484
  function phaseTone(phase) {
468
485
  if (phase === "bound") return "done";
469
486
  if (phase === "binding") return "ongoing";
@@ -544,6 +561,8 @@ function viewModel(state) {
544
561
  retryAfterSec: Number(state?.retryAfterSec || 0),
545
562
  installedSkills: Array.isArray(state?.installedSkills) ? state.installedSkills : [],
546
563
  workContext: showIdentity ? workContext : EMPTY_WORK,
564
+ // 开关只对已登录的这份配置有意义;未绑定时和工具清单一样不外露。
565
+ deepAnalysis: showIdentity ? Boolean(state?.deepAnalysis) : false,
547
566
  skillsOnline: Boolean(state?.skillsOnline)
548
567
  };
549
568
  }
@@ -1321,10 +1340,38 @@ function SkillsTab(props) {
1321
1340
  ] });
1322
1341
  }
1323
1342
 
1324
- // src/work/work-context-card.tsx
1325
- var import_react4 = require("react");
1343
+ // src/work/deep-analysis-card.tsx
1326
1344
  var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
1327
1345
  var import_jsx_runtime5 = require("react/jsx-runtime");
1346
+ function DeepAnalysisCard(props) {
1347
+ const on = props.value;
1348
+ const noCode = on && props.hasCodeTools === false;
1349
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-card", children: [
1350
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-switch-row", children: [
1351
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-switch-text", children: [
1352
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-title", children: "深度分析" }),
1353
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "axds-desc", children: on ? DEEP_ON_HINT : DEEP_OFF_HINT }),
1354
+ on ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "axds-notice", children: DEEP_COST_HINT }) : null,
1355
+ noCode ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "axds-error", children: "当前角色没有代码检索和线上定位工具,开启后答复只能标「未用源码核实」。" }) : null
1356
+ ] }),
1357
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1358
+ import_dsh_client_ui_primitives4.Switch,
1359
+ {
1360
+ checked: on,
1361
+ disabled: props.disabled,
1362
+ label: "深度分析",
1363
+ onChange: props.onChange
1364
+ }
1365
+ )
1366
+ ] }),
1367
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "axds-row", children: props.saving ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-muted", children: "正在保存…" }) : props.note ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: props.note.tone === "ok" ? "axds-ok" : "axds-error", role: "status", children: props.note.text }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-muted", children: "修改后立即生效,也可以在对话里用 /ax-deep 开 / 关" }) })
1368
+ ] });
1369
+ }
1370
+
1371
+ // src/work/work-context-card.tsx
1372
+ var import_react4 = require("react");
1373
+ var import_dsh_client_ui_primitives5 = require("@deepseek-ai/dsh-client-ui-primitives");
1374
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1328
1375
  function WorkContextCard(props) {
1329
1376
  const [productKind, setProductKind] = (0, import_react4.useState)(props.value.productKind);
1330
1377
  const [version, setVersion] = (0, import_react4.useState)(props.value.version);
@@ -1335,16 +1382,16 @@ function WorkContextCard(props) {
1335
1382
  setCustomer(props.value.customer);
1336
1383
  }, [props.value.productKind, props.value.version, props.value.customer]);
1337
1384
  const shownKind = labelOf(productKind);
1338
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-card", children: [
1339
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-between", children: [
1340
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-title", children: "工作上下文" }),
1341
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-muted", children: "没填的版本和产品线,调用工具时补上" })
1385
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-card", children: [
1386
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-between", children: [
1387
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-title", children: "工作上下文" }),
1388
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "没填的版本和产品线,调用工具时补上" })
1342
1389
  ] }),
1343
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-fields", children: [
1344
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "axds-field", children: [
1345
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "产品线" }),
1346
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1347
- import_dsh_client_ui_primitives4.Input,
1390
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-fields", children: [
1391
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
1392
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "产品线" }),
1393
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1394
+ import_dsh_client_ui_primitives5.Input,
1348
1395
  {
1349
1396
  className: "axds-input",
1350
1397
  value: shownKind,
@@ -1357,10 +1404,10 @@ function WorkContextCard(props) {
1357
1404
  }
1358
1405
  )
1359
1406
  ] }),
1360
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "axds-field", children: [
1361
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "版本" }),
1362
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1363
- import_dsh_client_ui_primitives4.Input,
1407
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
1408
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "版本" }),
1409
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1410
+ import_dsh_client_ui_primitives5.Input,
1364
1411
  {
1365
1412
  className: "axds-input",
1366
1413
  value: version,
@@ -1374,10 +1421,10 @@ function WorkContextCard(props) {
1374
1421
  }
1375
1422
  )
1376
1423
  ] }),
1377
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "axds-field", children: [
1378
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "客户" }),
1379
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1380
- import_dsh_client_ui_primitives4.Input,
1424
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
1425
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "客户" }),
1426
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1427
+ import_dsh_client_ui_primitives5.Input,
1381
1428
  {
1382
1429
  className: "axds-input",
1383
1430
  value: customer,
@@ -1392,11 +1439,11 @@ function WorkContextCard(props) {
1392
1439
  )
1393
1440
  ] })
1394
1441
  ] }),
1395
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "axds-actions", children: [
1396
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "axds-muted", children: "也可以在对话里用 /ax-context 云枢 8.7 某客户 要问的问题" }),
1397
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_dsh_client_ui_primitives4.Button, { size: "sm", variant: "ghost", disabled: props.disabled, onClick: props.onClear, children: "清空" }),
1398
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1399
- import_dsh_client_ui_primitives4.Button,
1442
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-actions", children: [
1443
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "也可以在对话里用 /ax-context 云枢 8.7 某客户 要问的问题" }),
1444
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "ghost", disabled: props.disabled, onClick: props.onClear, children: "清空" }),
1445
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1446
+ import_dsh_client_ui_primitives5.Button,
1400
1447
  {
1401
1448
  size: "sm",
1402
1449
  variant: "primary",
@@ -1412,7 +1459,7 @@ function WorkContextCard(props) {
1412
1459
  }
1413
1460
 
1414
1461
  // src/panel/panel.tsx
1415
- var import_jsx_runtime6 = require("react/jsx-runtime");
1462
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1416
1463
  function AuthinexPanel() {
1417
1464
  const [state, setState] = (0, import_react5.useState)(null);
1418
1465
  const [loaded, setLoaded] = (0, import_react5.useState)(false);
@@ -1427,6 +1474,8 @@ function AuthinexPanel() {
1427
1474
  const [feedback, setFeedback] = (0, import_react5.useState)("");
1428
1475
  const [tab, setTab] = (0, import_react5.useState)("overview");
1429
1476
  const [skillRefresh, setSkillRefresh] = (0, import_react5.useState)(0);
1477
+ const [deepDraft, setDeepDraft] = (0, import_react5.useState)(null);
1478
+ const [deepNote, setDeepNote] = (0, import_react5.useState)(null);
1430
1479
  const model = (0, import_react5.useMemo)(() => viewModel(state || void 0), [state]);
1431
1480
  const applyState = (0, import_react5.useCallback)((next) => {
1432
1481
  setState(next);
@@ -1448,14 +1497,18 @@ function AuthinexPanel() {
1448
1497
  (0, import_react5.useEffect)(() => {
1449
1498
  if (model.endpoint) setEndpoint((prev) => prev || model.endpoint);
1450
1499
  }, [model.endpoint]);
1451
- const run = (0, import_react5.useCallback)(async (label, work) => {
1500
+ const run = (0, import_react5.useCallback)(async (label, work, onFail) => {
1452
1501
  setBusy(label);
1453
1502
  setNotice("");
1454
1503
  setLocalError("");
1455
1504
  setFeedback("");
1456
1505
  try {
1457
1506
  await work();
1458
- } catch {
1507
+ } catch (error) {
1508
+ if (onFail) {
1509
+ onFail(error);
1510
+ return;
1511
+ }
1459
1512
  setState({ phase: "unreachable" });
1460
1513
  if (label === "refresh") setNotice("没有刷新到");
1461
1514
  if (label === "update") setNotice("没有查到更新");
@@ -1545,6 +1598,26 @@ function AuthinexPanel() {
1545
1598
  setFeedback(body.ok ? "ok" : "error");
1546
1599
  });
1547
1600
  };
1601
+ const onSetDeep = (enabled) => {
1602
+ setDeepDraft(enabled);
1603
+ setDeepNote(null);
1604
+ const fail = (text) => {
1605
+ setDeepDraft(null);
1606
+ setDeepNote({ tone: "error", text });
1607
+ };
1608
+ void run("deep", async () => {
1609
+ const body = await api("/authinex-ds/deep", { method: "POST", body: { enabled } });
1610
+ if (body.ok !== true) {
1611
+ fail(deepSaveFailureText(body));
1612
+ return;
1613
+ }
1614
+ setDeepDraft(null);
1615
+ setDeepNote({ tone: "ok", text: enabled ? "已开启" : "已关闭" });
1616
+ if (body.state) applyState(body.state);
1617
+ }, () => {
1618
+ fail("没保存:请求没有回来,检查插件后端是否在运行");
1619
+ });
1620
+ };
1548
1621
  const onCheckUpdate = () => {
1549
1622
  void run("update", async () => {
1550
1623
  const [body] = await Promise.all([
@@ -1566,43 +1639,43 @@ function AuthinexPanel() {
1566
1639
  if (body.ok) setRestart(true);
1567
1640
  });
1568
1641
  };
1569
- const showForm = loaded && (model.phase === "unbound" || model.phase === "invalid" || model.phase === "revoked");
1642
+ const showForm = loaded && showsBindForm(model.phase);
1570
1643
  const message = localError || notice || model.message;
1571
- const messageError = localError !== "" || model.phase === "invalid" || model.phase === "revoked" || model.phase === "unreachable";
1644
+ const messageError = localError !== "" || model.phase === "invalid" || model.phase === "revoked" || model.phase === "unreachable" || model.phase === "locked";
1572
1645
  const disabled = busy !== "";
1573
1646
  const pending = busy === "refresh" ? "正在刷新…" : busy === "update" ? "正在检查更新…" : busy.startsWith("test:") ? "正在测试连接…" : busy.startsWith("save:") ? "正在保存…" : "";
1574
1647
  const messageClass = feedback === "ok" ? "axds-ok" : feedback === "warn" ? "axds-notice" : messageError || feedback === "error" ? "axds-error" : "axds-muted";
1575
1648
  const installed = model.installedSkills;
1576
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "axds", "aria-label": "AuthineX 助手", children: [
1577
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "axds-head", children: [
1578
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.StateDot, { state: model.tone }),
1579
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-head-text", children: [
1580
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "axds-title", children: "AuthineX 助手" }),
1581
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "axds-sub", children: loaded ? model.headline : "正在读取状态…" })
1649
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "axds", "aria-label": "AuthineX 助手", children: [
1650
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "axds-head", children: [
1651
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.StateDot, { state: model.tone }),
1652
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-head-text", children: [
1653
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-title", children: "AuthineX 助手" }),
1654
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-sub", children: loaded ? model.headline : "正在读取状态…" })
1582
1655
  ] }),
1583
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "axds-head-actions", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", disabled, onClick: onRefresh, children: busy === "refresh" ? "刷新中" : "刷新" }) })
1656
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-head-actions", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", disabled, onClick: onRefresh, children: busy === "refresh" ? "刷新中" : "刷新" }) })
1584
1657
  ] }),
1585
- model.retryAfterSec > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "axds-notice", children: [
1658
+ model.retryAfterSec > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-notice", children: [
1586
1659
  "请等待 ",
1587
1660
  model.retryAfterSec,
1588
1661
  " 秒后再试。"
1589
1662
  ] }) : null,
1590
- model.phase === "upgrade" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "axds-error", children: [
1663
+ model.phase === "upgrade" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-error", children: [
1591
1664
  "当前版本 ",
1592
1665
  model.version,
1593
1666
  ",最低要求 ",
1594
1667
  model.minVersion,
1595
1668
  "。请先更新插件。"
1596
1669
  ] }) : null,
1597
- pending ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "axds-pending", role: "status", children: [
1598
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-spin", "aria-hidden": "true" }),
1599
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: pending })
1600
- ] }, "pending") : message ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: messageClass, role: "status", children: message }, message) : null,
1601
- showForm ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("form", { className: "axds-card", onSubmit: onBind, children: [
1602
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
1603
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "访问地址" }),
1604
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1605
- import_dsh_client_ui_primitives5.Input,
1670
+ pending ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-pending", role: "status", children: [
1671
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-spin", "aria-hidden": "true" }),
1672
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: pending })
1673
+ ] }, "pending") : message ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: messageClass, role: "status", children: message }, message) : null,
1674
+ showForm ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { className: "axds-card", onSubmit: onBind, children: [
1675
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "axds-field", children: [
1676
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "访问地址" }),
1677
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1678
+ import_dsh_client_ui_primitives6.Input,
1606
1679
  {
1607
1680
  className: "axds-input",
1608
1681
  value: endpoint,
@@ -1616,10 +1689,10 @@ function AuthinexPanel() {
1616
1689
  }
1617
1690
  )
1618
1691
  ] }),
1619
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
1620
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "密钥" }),
1621
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1622
- import_dsh_client_ui_primitives5.Input,
1692
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "axds-field", children: [
1693
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "密钥" }),
1694
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1695
+ import_dsh_client_ui_primitives6.Input,
1623
1696
  {
1624
1697
  className: "axds-input",
1625
1698
  value: key,
@@ -1633,31 +1706,32 @@ function AuthinexPanel() {
1633
1706
  }
1634
1707
  )
1635
1708
  ] }),
1636
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-actions", children: [
1637
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "地址和密钥都由你填;插件本身不带任何地址或密钥。" }),
1638
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { type: "submit", variant: "primary", size: "md", disabled: disabled || key.trim() === "", children: "绑定" })
1709
+ model.phase === "locked" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: "正在等待上一次重试冷却。密钥已经注销的话,直接贴一把新的;不想再试就点下面的「解除绑定」。" }) : null,
1710
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
1711
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "地址和密钥都由你填;插件本身不带任何地址或密钥。" }),
1712
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { type: "submit", variant: "primary", size: "md", disabled: disabled || key.trim() === "", children: "绑定" })
1639
1713
  ] }),
1640
- model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-actions", children: [
1641
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "axds-muted", children: [
1714
+ model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
1715
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "axds-muted", children: [
1642
1716
  "本机还记着上次的地址 ",
1643
1717
  model.endpoint
1644
1718
  ] }),
1645
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "outline", disabled, onClick: () => {
1719
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", disabled, onClick: () => {
1646
1720
  setConfirmUnbind(true);
1647
1721
  }, children: "解除绑定" })
1648
1722
  ] }) : null,
1649
- model.phase === "invalid" && model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "axds-muted", children: "升级不会作废这把密钥。把原来的密钥再贴一次,就会接回这台机器。" }) : null
1723
+ model.phase === "invalid" && model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: "升级不会作废这把密钥。把原来的密钥再贴一次,就会接回这台机器。" }) : null
1650
1724
  ] }) : null,
1651
- model.user ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1652
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-row", children: [
1653
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: model.user.displayName }),
1654
- model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "axds-muted", children: [
1725
+ model.user ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1726
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-row", children: [
1727
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: model.user.displayName }),
1728
+ model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "axds-muted", children: [
1655
1729
  "· ",
1656
1730
  model.endpoint
1657
1731
  ] }) : null
1658
1732
  ] }),
1659
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-tabs", role: "tablist", "aria-label": "配置分区", children: [
1660
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1733
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-tabs", role: "tablist", "aria-label": "配置分区", children: [
1734
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1661
1735
  "button",
1662
1736
  {
1663
1737
  type: "button",
@@ -1668,7 +1742,7 @@ function AuthinexPanel() {
1668
1742
  children: "概览"
1669
1743
  }
1670
1744
  ),
1671
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1745
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1672
1746
  "button",
1673
1747
  {
1674
1748
  type: "button",
@@ -1678,23 +1752,23 @@ function AuthinexPanel() {
1678
1752
  onClick: () => setTab("skills"),
1679
1753
  children: [
1680
1754
  "技能",
1681
- installed.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-tab-badge", children: installed.length }) : null
1755
+ installed.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-tab-badge", children: installed.length }) : null
1682
1756
  ]
1683
1757
  }
1684
1758
  )
1685
1759
  ] }),
1686
- tab === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1687
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-card", children: [
1688
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-between", children: [
1689
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-title", children: "可用功能" }),
1690
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "axds-muted", children: [
1760
+ tab === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1761
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-card", children: [
1762
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-between", children: [
1763
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-title", children: "可用功能" }),
1764
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "axds-muted", children: [
1691
1765
  model.tools.length,
1692
1766
  " 个工具"
1693
1767
  ] })
1694
1768
  ] }),
1695
- model.tools.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "axds-tags", children: model.toolNames.map((name) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Tag, { tone: "neutral", children: name }, name)) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "axds-muted", children: "当前角色没有可用工具。权限由运营台角色决定。" })
1769
+ model.tools.length ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-tags", children: model.toolNames.map((name) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Tag, { tone: "neutral", children: name }, name)) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: "当前角色没有可用工具。权限由运营台角色决定。" })
1696
1770
  ] }),
1697
- model.user ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1771
+ model.user ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1698
1772
  WorkContextCard,
1699
1773
  {
1700
1774
  value: model.workContext,
@@ -1702,9 +1776,20 @@ function AuthinexPanel() {
1702
1776
  onSave: onSaveContext,
1703
1777
  onClear: onClearContext
1704
1778
  }
1779
+ ) : null,
1780
+ model.user ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1781
+ DeepAnalysisCard,
1782
+ {
1783
+ value: deepDraft ?? model.deepAnalysis,
1784
+ disabled,
1785
+ saving: busy === "deep",
1786
+ note: deepNote,
1787
+ hasCodeTools: model.tools.includes("search_code"),
1788
+ onChange: onSetDeep
1789
+ }
1705
1790
  ) : null
1706
1791
  ] }) : null,
1707
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1792
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1708
1793
  AccountsCard,
1709
1794
  {
1710
1795
  active: tab === "overview",
@@ -1716,20 +1801,20 @@ function AuthinexPanel() {
1716
1801
  notify
1717
1802
  }
1718
1803
  ),
1719
- tab === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1720
- model.update?.version ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-card", children: [
1721
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-between", children: [
1722
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-title", children: model.update.available ? `新版本 ${model.update.version}` : `已是最新(${model.update.version})` }),
1723
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Tag, { tone: model.update.available ? "info" : "success", children: model.update.available ? "可更新" : "最新" })
1804
+ tab === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1805
+ model.update?.version ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-card", children: [
1806
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-between", children: [
1807
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-title", children: model.update.available ? `新版本 ${model.update.version}` : `已是最新(${model.update.version})` }),
1808
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Tag, { tone: model.update.available ? "info" : "success", children: model.update.available ? "可更新" : "最新" })
1724
1809
  ] }),
1725
- model.update.notes ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "axds-muted", children: model.update.notes }) : null,
1726
- model.update.sha ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "axds-muted", children: [
1810
+ model.update.notes ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-muted", children: model.update.notes }) : null,
1811
+ model.update.sha ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("p", { className: "axds-muted", children: [
1727
1812
  "校验值 ",
1728
1813
  model.update.sha
1729
1814
  ] }) : null,
1730
- model.update.available ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-actions", children: [
1731
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "更新由 DeepSeek 自己的安装器完成,装完要重启智能问答" }),
1732
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "primary", disabled, onClick: () => {
1815
+ model.update.available ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
1816
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "更新由 DeepSeek 自己的安装器完成,装完要重启智能问答" }),
1817
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled, onClick: () => {
1733
1818
  setConfirmUpdate(true);
1734
1819
  }, children: [
1735
1820
  "更新到 ",
@@ -1737,23 +1822,23 @@ function AuthinexPanel() {
1737
1822
  ] })
1738
1823
  ] }) : null
1739
1824
  ] }) : null,
1740
- confirmUpdate ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-confirm", children: [
1741
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
1825
+ confirmUpdate ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-confirm", children: [
1826
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
1742
1827
  "现在更新到 ",
1743
1828
  model.update?.version,
1744
1829
  "?装完需要重启智能问答。"
1745
1830
  ] }),
1746
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "outline", onClick: () => {
1831
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", onClick: () => {
1747
1832
  setConfirmUpdate(false);
1748
1833
  }, children: "取消" }),
1749
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "primary", disabled, onClick: onApplyUpdate, children: "确认更新" })
1834
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled, onClick: onApplyUpdate, children: "确认更新" })
1750
1835
  ] }) : null,
1751
- restart ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "axds-notice", children: "已装好,重启智能问答后新版本才生效。" }) : null,
1752
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-card", children: [
1753
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "axds-field", children: [
1754
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "新密钥" }),
1755
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1756
- import_dsh_client_ui_primitives5.Input,
1836
+ restart ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "axds-notice", children: "已装好,重启智能问答后新版本才生效。" }) : null,
1837
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-card", children: [
1838
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { className: "axds-field", children: [
1839
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "新密钥" }),
1840
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1841
+ import_dsh_client_ui_primitives6.Input,
1757
1842
  {
1758
1843
  className: "axds-input",
1759
1844
  value: key,
@@ -1767,17 +1852,17 @@ function AuthinexPanel() {
1767
1852
  }
1768
1853
  )
1769
1854
  ] }),
1770
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-actions", children: [
1771
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "贴一把新密钥会重新兑换,运营台才会变成已绑定" }),
1772
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "primary", disabled: disabled || key.trim() === "", onClick: onRebind, children: "绑定这把密钥" })
1855
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-actions", children: [
1856
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "贴一把新密钥会重新兑换,运营台才会变成已绑定" }),
1857
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled: disabled || key.trim() === "", onClick: onRebind, children: "绑定这把密钥" })
1773
1858
  ] })
1774
1859
  ] }),
1775
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-row", children: [
1776
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", disabled, onClick: onCheckUpdate, children: busy === "update" ? "检查中" : "检查更新" }),
1777
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "服务端有更新清单就走清单,没有就比 npm 上的版本号" })
1860
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-row", children: [
1861
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", disabled, onClick: onCheckUpdate, children: busy === "update" ? "检查中" : "检查更新" }),
1862
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "服务端有更新清单就走清单,没有就比 npm 上的版本号" })
1778
1863
  ] })
1779
1864
  ] }) : null,
1780
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1865
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1781
1866
  SkillsTab,
1782
1867
  {
1783
1868
  active: tab === "skills",
@@ -1790,72 +1875,72 @@ function AuthinexPanel() {
1790
1875
  },
1791
1876
  model.user ? "signed-in" : "signed-out"
1792
1877
  ),
1793
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-row", children: [
1794
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "outline", disabled, onClick: () => {
1878
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-row", children: [
1879
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", disabled, onClick: () => {
1795
1880
  setConfirmUnbind(true);
1796
1881
  }, children: "解除绑定" }),
1797
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "axds-muted", children: "解除后地址和密钥都会清掉,要重新填" })
1882
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "解除后地址和密钥都会清掉,要重新填" })
1798
1883
  ] })
1799
1884
  ] }) : null,
1800
- confirmUnbind ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "axds-confirm", children: [
1801
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "确认解除这台设备的绑定?" }),
1802
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "outline", onClick: () => {
1885
+ confirmUnbind ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-confirm", children: [
1886
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "确认解除这台设备的绑定?" }),
1887
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "outline", onClick: () => {
1803
1888
  setConfirmUnbind(false);
1804
1889
  }, children: "取消" }),
1805
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dsh_client_ui_primitives5.Button, { size: "sm", variant: "primary", disabled, onClick: onUnbind, children: "确认解除" })
1890
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives6.Button, { size: "sm", variant: "primary", disabled, onClick: onUnbind, children: "确认解除" })
1806
1891
  ] }) : null,
1807
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("footer", { className: "axds-foot", children: [
1808
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { children: [
1892
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("footer", { className: "axds-foot", children: [
1893
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { children: [
1809
1894
  "v",
1810
1895
  model.version || "0.1.0"
1811
1896
  ] }),
1812
- model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1813
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: "·" }),
1814
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: model.endpoint })
1897
+ model.endpoint ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1898
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: "·" }),
1899
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: model.endpoint })
1815
1900
  ] }) : null
1816
1901
  ] })
1817
1902
  ] });
1818
1903
  }
1819
1904
 
1820
1905
  // src/work/command-card.tsx
1821
- var import_jsx_runtime7 = require("react/jsx-runtime");
1906
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1822
1907
  function AxContextCommandCard(props) {
1823
1908
  const outcome = props.node?.outcome;
1824
1909
  if (!outcome) {
1825
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-cmd", "data-state": "running", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-cmd-head", children: [
1826
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1827
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-muted", children: "正在设置…" })
1910
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd", "data-state": "running", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
1911
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1912
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-muted", children: "正在设置…" })
1828
1913
  ] }) });
1829
1914
  }
1830
1915
  if (outcome.kind === "error") {
1831
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-cmd", "data-state": "error", children: [
1832
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-cmd-head", children: [
1833
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1834
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-cmd-mark", "data-mark": "bad", children: "没设成" })
1916
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd", "data-state": "error", children: [
1917
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
1918
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1919
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-mark", "data-mark": "bad", children: "没设成" })
1835
1920
  ] }),
1836
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-cmd-note axds-error", children: outcome.text })
1921
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-note axds-error", children: outcome.text })
1837
1922
  ] });
1838
1923
  }
1839
1924
  const receipt = parseReceiptText(outcome.text || "");
1840
1925
  if (!receipt) {
1841
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-cmd", "data-state": "ok", children: [
1842
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-cmd-head", children: [
1843
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1844
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-cmd-mark", "data-mark": "ok", children: "已生效" })
1926
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd", "data-state": "ok", children: [
1927
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
1928
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1929
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-mark", "data-mark": "ok", children: "已生效" })
1845
1930
  ] }),
1846
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-cmd-note axds-muted", children: outcome.text })
1931
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-note axds-muted", children: outcome.text })
1847
1932
  ] });
1848
1933
  }
1849
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-cmd", "data-state": "ok", children: [
1850
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "axds-cmd-head", children: [
1851
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1852
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "axds-cmd-mark", "data-mark": "ok", children: "已生效" })
1934
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd", "data-state": "ok", children: [
1935
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "axds-cmd-head", children: [
1936
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-title", children: "工作上下文" }),
1937
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "axds-cmd-mark", "data-mark": "ok", children: "已生效" })
1853
1938
  ] }),
1854
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-cmd-fields", children: receipt.fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "axds-cmd-field", children: [
1855
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: field.label }),
1856
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("b", { children: field.value })
1939
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-fields", children: receipt.fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "axds-cmd-field", children: [
1940
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: field.label }),
1941
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("b", { children: field.value })
1857
1942
  ] }, `${field.label}:${field.value}`)) }),
1858
- receipt.note ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "axds-cmd-note axds-muted", children: receipt.note }) : null
1943
+ receipt.note ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "axds-cmd-note axds-muted", children: receipt.note }) : null
1859
1944
  ] });
1860
1945
  }
1861
1946
 
@@ -1907,6 +1992,11 @@ var CSS = `
1907
1992
  .axds-tab:hover{color:var(--dsw-alias-label-primary)}
1908
1993
  .axds-tab.on{background:var(--dsw-alias-settings-card-fill);color:var(--dsw-alias-label-primary);font-weight:600;box-shadow:0 1px 2px rgb(0 0 0 / 6%)}
1909
1994
  .axds-tab-badge{min-width:16px;height:16px;line-height:16px;padding:0 4px;border-radius:8px;background:var(--dsw-alias-state-success-primary);color:#fff;font-size:10px;text-align:center}
1995
+ /* 开关行照宿主设置项那一套:左边文字块,开关推到最右,标题与说明差一档字重。
1996
+ 开关本身用宿主 Switch 原子,这里只管排版,不重画控件。 */
1997
+ .axds-switch-row{display:flex;align-items:center;justify-content:space-between;gap:24px}
1998
+ .axds-switch-text{display:flex;flex-direction:column;gap:4px;min-width:0}
1999
+ .axds-desc{margin:0;font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}
1910
2000
  /* 折叠标题:整行可点,箭头只做指示。 */
1911
2001
  .axds-collapse{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer;text-align:left}
1912
2002
  .axds-collapse:hover .axds-title{color:var(--dsw-alias-label-primary)}
package/lib/index.js CHANGED
@@ -83,6 +83,12 @@ function attachOptionalHosts(ctx, bridge) {
83
83
  input: { hint: "云枢 8.7 某客户 要问的问题,或「清空」" },
84
84
  handler: (invocation) => bridge.runContextCommand(invocation.rawInput)
85
85
  }));
86
+ keep(ctx, "authinex-ds: deep-command", () => service.register({
87
+ name: "ax-deep",
88
+ description: "深度分析开关:开启后每轮先查源码核实再作答(更慢,证据更全);关闭恢复按问题复杂度自动选工具",
89
+ input: { hint: "开 / 关,留空查看当前状态" },
90
+ handler: (invocation) => bridge.runDeepCommand(invocation.rawInput)
91
+ }));
86
92
  }
87
93
  }
88
94
 
@@ -787,6 +793,41 @@ var TOOL_OUTPUT = {
787
793
  render: (_args, value) => [{ type: "text", text: String(value?.text || "") }]
788
794
  };
789
795
 
796
+ // src/work/deep-analysis.ts
797
+ var DEEP_RULE = "深度分析已开启:除了查单、建单、提交经验这类与代码无关的,每轮都先用代码检索(search_code)核实,要根因或「这版为什么」再按版本读线上源码(locate_online);知识库、文档和工单只作背景,不能单独当结论依据。答复按「结论 / 源码依据(路径:行号)/ 旁证 / 反证或未核实点 / 置信度」分块;没拿到代码证据就标「未用源码核实」再作答,别把文档推断写成事实。";
798
+ var DEEP_RULE_NO_CODE = "深度分析已开启,但当前角色没有代码检索和线上定位工具:本轮只能凭知识库、文档和工单回答,答复里必须写「未用源码核实」并说明缺哪个权限,不要把文档推断写成源码结论。";
799
+ var DEEP_STORED = "on";
800
+ function parseStoredDeep(raw) {
801
+ return String(raw || "").trim() === DEEP_STORED;
802
+ }
803
+ var HOWTO = "用法:/ax-deep 开,或 /ax-deep 关";
804
+ var USAGE = `没看懂。${HOWTO}`;
805
+ var ON_WORDS = /* @__PURE__ */ new Set(["开", "开启", "打开", "on", "true", "1"]);
806
+ var OFF_WORDS = /* @__PURE__ */ new Set(["关", "关闭", "关掉", "off", "false", "0"]);
807
+ function interpretDeepCommand(raw, current) {
808
+ const text3 = raw.trim().toLowerCase();
809
+ if (!text3) {
810
+ const head = current ? "深度分析已开启:每轮先查源码核实再答,比平时慢,证据更全。" : "深度分析已关闭:按问题复杂度自动选工具,源码分析能力仍然保留。";
811
+ return { kind: "success", text: `${head}
812
+ ${HOWTO}`, deep: current };
813
+ }
814
+ if (ON_WORDS.has(text3)) {
815
+ return {
816
+ kind: "success",
817
+ text: "已开启深度分析:每轮先查源码核实再作答;耗时可能更久,但证据更丰富、多维。",
818
+ deep: true
819
+ };
820
+ }
821
+ if (OFF_WORDS.has(text3)) {
822
+ return {
823
+ kind: "success",
824
+ text: "已关闭深度分析:回到按问题复杂度自动选工具;源码分析能力没有关,需要看代码时照样会用。",
825
+ deep: false
826
+ };
827
+ }
828
+ return { kind: "error", text: USAGE };
829
+ }
830
+
790
831
  // src/work/work-context.ts
791
832
  var PRODUCT_KINDS = [
792
833
  { id: "yunshu", label: "云枢" },
@@ -903,7 +944,9 @@ function buildPrompt(input) {
903
944
  const work = formatWork(input.work);
904
945
  if (work) parts.push(work);
905
946
  parts.push(accessLine(input.tickets));
906
- parts.push([CITE_RULE, PLAN_RULE, FOLLOW_UP_RULE, NO_HIT_RULE].join(""));
947
+ const rules = [CITE_RULE, PLAN_RULE, FOLLOW_UP_RULE, NO_HIT_RULE];
948
+ if (input.deep) rules.unshift(input.codeTools === false ? DEEP_RULE_NO_CODE : DEEP_RULE);
949
+ parts.push(rules.join(""));
907
950
  let head = parts.join("\n");
908
951
  if (head.length > PROMPT_LIMIT) return head.slice(0, PROMPT_LIMIT);
909
952
  const extra = input.promptContext.trim().slice(0, PROMPT_CONTEXT_MAX);
@@ -922,8 +965,8 @@ function contextPatch(input) {
922
965
  }
923
966
  return patch;
924
967
  }
925
- var HOWTO = "用法:/ax-context 云枢 8.7 某客户 要问的问题,或 /ax-context 清空";
926
- var USAGE = `没看懂。${HOWTO}`;
968
+ var HOWTO2 = "用法:/ax-context 云枢 8.7 某客户 要问的问题,或 /ax-context 清空";
969
+ var USAGE2 = `没看懂。${HOWTO2}`;
927
970
  var QUESTION_MARKS = ["?", "?", "怎么", "怎样", "如何", "为啥", "为什么", "为何", "哪些", "哪个", "排查", "报错"];
928
971
  function questionStartOf(tokens) {
929
972
  return tokens.findIndex((token) => QUESTION_MARKS.some((mark) => token.includes(mark)));
@@ -934,7 +977,7 @@ function interpretCommand(raw, current) {
934
977
  const line2 = formatWorkFields(current);
935
978
  return {
936
979
  kind: "success",
937
- text: line2 ? `当前工作上下文:${line2}` : `还没有工作上下文。${HOWTO}`,
980
+ text: line2 ? `当前工作上下文:${line2}` : `还没有工作上下文。${HOWTO2}`,
938
981
  work: current,
939
982
  question: ""
940
983
  };
@@ -943,7 +986,7 @@ function interpretCommand(raw, current) {
943
986
  const tokens = text3.split(/\s+/).filter(Boolean);
944
987
  const kindToken = tokens[0] || "";
945
988
  if (!Object.prototype.hasOwnProperty.call(ALIASES, kindToken) || !ALIASES[kindToken]) {
946
- return { kind: "error", text: USAGE };
989
+ return { kind: "error", text: USAGE2 };
947
990
  }
948
991
  const version = tokens[1] || "";
949
992
  const rest = tokens.slice(2);
@@ -1016,6 +1059,10 @@ function createRouteHandler(deps) {
1016
1059
  const saved = await dispatch.saveContext(body || {});
1017
1060
  return { status: saved.ok ? 200 : 400, body: { ...saved, state: snapshot() } };
1018
1061
  }
1062
+ if (method === "POST" && path3 === "/authinex-ds/deep") {
1063
+ const saved = await dispatch.saveDeep(body?.enabled === true);
1064
+ return { status: saved.ok ? 200 : 400, body: { ...saved, state: snapshot() } };
1065
+ }
1019
1066
  if (method === "POST" && path3 === "/authinex-ds/bind") {
1020
1067
  const result = await bind({ key: String(body?.key || ""), endpoint: body?.endpoint });
1021
1068
  return { status: result.ok ? 200 : 400, body: { ...result.state, message: result.message || "" } };
@@ -1094,6 +1141,17 @@ function createRouteHandler(deps) {
1094
1141
  import { randomUUID } from "node:crypto";
1095
1142
  import { hostname as hostname2, platform as platform2 } from "node:os";
1096
1143
 
1144
+ // src/session/retry-policy.ts
1145
+ var INVALID_RETRIES = 2;
1146
+ function shouldStopRetry(phase, tries) {
1147
+ if (phase === "revoked" || phase === "locked") return true;
1148
+ if (phase === "invalid") return tries >= INVALID_RETRIES;
1149
+ return false;
1150
+ }
1151
+ function resumeDelayMs(attempt) {
1152
+ return Math.min(3e4, 2e3 * 2 ** attempt);
1153
+ }
1154
+
1097
1155
  // src/session/key.ts
1098
1156
  var CROCKFORD = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
1099
1157
  function foldChar(ch) {
@@ -1281,14 +1339,16 @@ function createSessionActions(deps) {
1281
1339
  let resumeTimer = null;
1282
1340
  let resumeAttempt = 0;
1283
1341
  let signingIn = false;
1342
+ let invalidTries = 0;
1284
1343
  function stopResume() {
1285
1344
  if (resumeTimer) clearTimeout(resumeTimer);
1286
1345
  resumeTimer = null;
1287
1346
  resumeAttempt = 0;
1347
+ invalidTries = 0;
1288
1348
  }
1289
1349
  function scheduleResume() {
1290
1350
  if (resumeTimer) return;
1291
- const wait = Math.min(3e4, 2e3 * 2 ** resumeAttempt);
1351
+ const wait = resumeDelayMs(resumeAttempt);
1292
1352
  resumeAttempt += 1;
1293
1353
  resumeTimer = setTimeout(() => {
1294
1354
  resumeTimer = null;
@@ -1296,13 +1356,19 @@ function createSessionActions(deps) {
1296
1356
  }, wait);
1297
1357
  resumeTimer.unref?.();
1298
1358
  }
1359
+ const TRANSIENT_PHASES = /* @__PURE__ */ new Set(["unreachable", "locked"]);
1299
1360
  function fail(phase, detail = "") {
1361
+ if (TRANSIENT_PHASES.has(phase)) {
1362
+ memory.phase = phase;
1363
+ memory.detail = ALLOWED_DETAILS.has(detail) ? detail : "";
1364
+ if (phase === "unreachable" && detail === "服务不可用,联系管理员") {
1365
+ memory.detail = detail;
1366
+ }
1367
+ return snapshot();
1368
+ }
1300
1369
  clearSession();
1301
1370
  memory.phase = phase;
1302
1371
  memory.detail = ALLOWED_DETAILS.has(detail) ? detail : "";
1303
- if (phase === "unreachable" && detail === "服务不可用,联系管理员") {
1304
- memory.detail = detail;
1305
- }
1306
1372
  return snapshot();
1307
1373
  }
1308
1374
  async function request(path3, init = {}) {
@@ -1437,6 +1503,7 @@ function createSessionActions(deps) {
1437
1503
  });
1438
1504
  applySession(data);
1439
1505
  stopResume();
1506
+ invalidTries = 0;
1440
1507
  await loadAccounts();
1441
1508
  await refreshInstalled();
1442
1509
  await getDispatch().refreshStatus();
@@ -1449,6 +1516,16 @@ function createSessionActions(deps) {
1449
1516
  memory.retryAfter = known.retryAfter || 0;
1450
1517
  return false;
1451
1518
  }
1519
+ if (known?.phase === "invalid") {
1520
+ invalidTries += 1;
1521
+ if (shouldStopRetry("invalid", invalidTries)) {
1522
+ stopResume();
1523
+ fail("invalid", known.detail || "");
1524
+ return false;
1525
+ }
1526
+ } else {
1527
+ invalidTries = 0;
1528
+ }
1452
1529
  clearSession();
1453
1530
  memory.endpoint = secret.endpoint;
1454
1531
  memory.deviceId = secret.deviceId;
@@ -2929,11 +3006,19 @@ ${prepared.note}` };
2929
3006
  }
2930
3007
  }
2931
3008
  async function loadWork() {
2932
- if (!deps.workStore) return;
2933
- try {
2934
- state.work = parseStoredWork(await deps.workStore.load());
2935
- } catch {
2936
- state.work = EMPTY_WORK;
3009
+ if (deps.workStore) {
3010
+ try {
3011
+ state.work = parseStoredWork(await deps.workStore.load());
3012
+ } catch {
3013
+ state.work = EMPTY_WORK;
3014
+ }
3015
+ }
3016
+ if (deps.deepStore) {
3017
+ try {
3018
+ state.deep = parseStoredDeep(await deps.deepStore.load());
3019
+ } catch {
3020
+ state.deep = false;
3021
+ }
2937
3022
  }
2938
3023
  }
2939
3024
  async function saveWork() {
@@ -2941,12 +3026,30 @@ ${prepared.note}` };
2941
3026
  if (workIsEmpty(state.work)) await deps.workStore.clear();
2942
3027
  else await deps.workStore.save(JSON.stringify(state.work));
2943
3028
  }
3029
+ async function saveDeep(enabled) {
3030
+ try {
3031
+ if (deps.deepStore) {
3032
+ if (enabled) await deps.deepStore.save(DEEP_STORED);
3033
+ else await deps.deepStore.clear();
3034
+ }
3035
+ } catch {
3036
+ return { ok: false, message: "没有写成深度分析开关" };
3037
+ }
3038
+ state.deep = enabled;
3039
+ return {
3040
+ ok: true,
3041
+ message: enabled ? "已开启深度分析:每轮先查源码核实再答,耗时可能更久" : "已关闭深度分析:按问题复杂度自动选工具"
3042
+ };
3043
+ }
2944
3044
  function promptText() {
2945
3045
  return buildPrompt({
2946
3046
  bound: state.phase === "bound" && Boolean(state.token),
2947
3047
  work: state.work,
2948
3048
  tickets: state.capabilities?.tickets,
2949
- promptContext: state.promptContext
3049
+ promptContext: state.promptContext,
3050
+ deep: state.deep,
3051
+ // 代码工具是按角色下发的:没有就别让模型去调,免得它反复失败或编一个「已核实」。
3052
+ codeTools: allowedTools().includes("search_code")
2950
3053
  });
2951
3054
  }
2952
3055
  async function applyContextCommand(raw) {
@@ -2960,9 +3063,16 @@ ${prepared.note}` };
2960
3063
  }
2961
3064
  return { kind: "success", text: outcome.text };
2962
3065
  }
3066
+ async function applyDeepCommand(raw) {
3067
+ const outcome = interpretDeepCommand(raw, state.deep);
3068
+ if (outcome.kind === "error") return { kind: "error", text: outcome.text };
3069
+ const saved = await saveDeep(outcome.deep);
3070
+ if (!saved.ok) return { kind: "error", text: saved.message };
3071
+ return { kind: "success", text: outcome.text };
3072
+ }
2963
3073
  function contextView() {
2964
3074
  const work = deps.verified() ? state.work : EMPTY_WORK;
2965
- return { ...work, skillsOnline: state.skillsOnline };
3075
+ return { ...work, skillsOnline: state.skillsOnline, deepAnalysis: deps.verified() ? state.deep : false };
2966
3076
  }
2967
3077
  async function saveContext(input) {
2968
3078
  if (input.clear === true) {
@@ -3035,17 +3145,20 @@ ${prepared.note}` };
3035
3145
  loadWork,
3036
3146
  promptText,
3037
3147
  applyContextCommand,
3148
+ applyDeepCommand,
3038
3149
  contextView,
3039
3150
  saveContext,
3151
+ saveDeep,
3040
3152
  listSkillSource,
3041
3153
  loadSkillSource
3042
3154
  };
3043
3155
  }
3044
3156
 
3045
3157
  // src/session/controller.ts
3046
- var VERSION = true ? "0.3.11" : "0.1.0";
3158
+ var VERSION = true ? "0.3.12" : "0.1.0";
3047
3159
  var CREDENTIAL_REF = "AUTHINEX_DS_DEVICE";
3048
3160
  var CONTEXT_CREDENTIAL_REF = "AUTHINEX_DS_CONTEXT";
3161
+ var DEEP_CREDENTIAL_REF = "AUTHINEX_DS_DEEP";
3049
3162
  function defaultMachineFingerprint() {
3050
3163
  return machineFingerprint({ platform: platform3(), arch: arch2(), machineId: readMachineId() });
3051
3164
  }
@@ -3134,6 +3247,7 @@ function createController(options) {
3134
3247
  skillsVersion: "",
3135
3248
  promptContext: "",
3136
3249
  work: EMPTY_WORK,
3250
+ deep: false,
3137
3251
  skillsOnline: false,
3138
3252
  occupied: /* @__PURE__ */ new Set(),
3139
3253
  invalidateSkills: null
@@ -3158,6 +3272,7 @@ function createController(options) {
3158
3272
  update: memory.update,
3159
3273
  installedSkills: memory.installedSkills,
3160
3274
  workContext: verified() ? memory.work : EMPTY_WORK,
3275
+ deepAnalysis: verified() ? memory.deep : false,
3161
3276
  skillsOnline: memory.skillsOnline,
3162
3277
  toolTitles: dispatch.toolTitles()
3163
3278
  };
@@ -3192,6 +3307,7 @@ function createController(options) {
3192
3307
  now,
3193
3308
  sleep,
3194
3309
  workStore: options.workStore,
3310
+ deepStore: options.deepStore,
3195
3311
  cancelled,
3196
3312
  request: session.request,
3197
3313
  jobs: options.jobs,
@@ -3295,6 +3411,7 @@ function createController(options) {
3295
3411
  loadSkillSource: dispatch.loadSkillSource,
3296
3412
  promptText: dispatch.promptText,
3297
3413
  applyContextCommand: dispatch.applyContextCommand,
3414
+ applyDeepCommand: dispatch.applyDeepCommand,
3298
3415
  saveAccount,
3299
3416
  setAccountEnabled,
3300
3417
  testAccount,
@@ -3328,6 +3445,7 @@ var PATHS = [
3328
3445
  "/authinex-ds/skills/export",
3329
3446
  "/authinex-ds/skills/install",
3330
3447
  "/authinex-ds/context",
3448
+ "/authinex-ds/deep",
3331
3449
  "/authinex-ds/upgrade/template",
3332
3450
  "/authinex-ds/upgrade/report"
3333
3451
  ];
@@ -3381,6 +3499,7 @@ function occupiedNames(ctx) {
3381
3499
  function apply(ctx) {
3382
3500
  const ref = credentialRef(CREDENTIAL_REF);
3383
3501
  const contextRef = credentialRef(CONTEXT_CREDENTIAL_REF);
3502
+ const deepRef = credentialRef(DEEP_CREDENTIAL_REF);
3384
3503
  const manager = () => {
3385
3504
  const service = ctx.get?.("pluginManager", false);
3386
3505
  if (!service || typeof service.installBundle !== "function") return void 0;
@@ -3452,6 +3571,15 @@ function apply(ctx) {
3452
3571
  },
3453
3572
  save: (value) => ctx.credentials.set(contextRef, value),
3454
3573
  clear: () => ctx.credentials.unset(contextRef)
3574
+ },
3575
+ deepStore: {
3576
+ load: async () => {
3577
+ const resolved = await ctx.credentials.resolve(deepRef);
3578
+ if (!resolved) return void 0;
3579
+ return typeof resolved === "string" ? resolved : resolved.value;
3580
+ },
3581
+ save: (value) => ctx.credentials.set(deepRef, value),
3582
+ clear: () => ctx.credentials.unset(deepRef)
3455
3583
  }
3456
3584
  });
3457
3585
  attachOptionalHosts(ctx, {
@@ -3460,6 +3588,7 @@ function apply(ctx) {
3460
3588
  setInvalidate: (fn) => controller.setSkillInvalidator(fn),
3461
3589
  promptText: () => controller.promptText(),
3462
3590
  runContextCommand: (raw) => controller.applyContextCommand(raw),
3591
+ runDeepCommand: (raw) => controller.applyDeepCommand(raw),
3463
3592
  markSkillsOnline: (online) => controller.setSkillsOnline(online)
3464
3593
  });
3465
3594
  const disposers = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authinex/dsh-plugin",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "DeepSeek 里的 AuthineX 插件:问知识库、查工单、检索源码、只读定位、升级评估,并用本人账号建单",
5
5
  "type": "module",
6
6
  "icon": "./icon.svg",