@inventec/dsh-copilot-auth 1.2.11 → 1.2.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 +2 -1
- package/lib/client.js +10 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
| 本插件 | DSH 实测版本 | authorization 服务 | 说明 |
|
|
35
35
|
|---|---|---|---|
|
|
36
|
-
| v1.2.
|
|
36
|
+
| v1.2.12+ | `0.1.7-rc.2`+ | runtime 内置,插件不挂载 | **交互打磨**:「补充模型」的全选按钮在全选中切换为「取消全选」(任一取消勾选即恢复「全选」);「重建」风险提示精简为一行;成功路径的「技术详情」计数移除(与弹窗增删列表重复),技术详情仅在真实失败时展示。其余同 v1.2.11 |
|
|
37
|
+
| v1.2.11 | `0.1.7-rc.2`+ | runtime 内置,插件不挂载 | **界面收敛:移除「重新授权」按钮与 `capabilities.reauthorize` 能力位**(逻辑冗余——已登录只需退出登录,未登录入口本就是「授权登录」;换号/重授权=先退出再登录两步)。其余同 v1.2.10 |
|
|
37
38
|
| v1.2.10 | `0.1.7-rc.2`+ | runtime 内置,插件不挂载 | **退出登录正式可用**:无进行中授权尝试且无未核实风险(风险锁存)时,经确认弹窗清除凭据并**删除后立即复核**(凭据未消失则如实报「退出未完成」);授权尝试进行中(begin 晚写窗口)与撤回/超时未核实期一律拒绝退出。`/status` 的 `authorization.capabilities.logout` 按可用性动态返回。经主人 2026-10-05 裁决替代 v1.2.8 D-01「退出全禁」策略 |
|
|
38
39
|
| v1.2.9 | `0.1.7-rc.2`+(`0.2.0-rc.1` web 与 `0.2.0-rc.2` desktop 已实测) | runtime 内置,插件不挂载 | **修复 v1.2.8 授权页显示回归**:授权状态机漏接 `fetch`,页面恒显「未登录」、点「授权登录」恒「失败」且请求根本不发出(2026-10-04 实机实证,nginx 全量零 `POST /copilot-auth/start`)。另加:/status 加载失败退避自愈重试(60 秒转手动+「查询状态」)、失败原因分层展示(网络/网关/响应,不再裸「失败」)、已登录时服务端拒绝替换性授权(409 `already-configured`)且客户端自动恢复已登录视图 |
|
|
39
40
|
| v1.2.8 | `0.1.7-rc.2`+(`0.2.0-rc.1` web 与 `0.2.0-rc.2` desktop 已实测) | runtime 内置,插件不挂载 | **协议 v2:诚实的授权语义+补充/重建双入口**。授权侧:等待中可「请求撤回」(结果如实显示待核实)、退出/重新授权在宿主可证明安全前禁用并说明、单实例 attempt、15 分钟等待上限、晚到授权成功不再写配置;模型侧:旧「刷新」拆为「补充模型」(候选默认不勾选、非破坏)与「重建模型列表」(二次确认+清 modelOverrides),预览 10 分钟绑定选择、operationId 幂等、配置并发编辑优先、崩溃可恢复(「结束旧配置意图」显式闭环),状态按 profile 隔离(旧全局状态只读提示);模型路由要求 `protocolVersion:2`,GET `/status` 零写探针;v1 函数族已从 state.mjs 移除。**已知缺陷**:授权状态机漏接 fetchImpl → 授权页恒「未登录/失败」(v1.2.9 修复) |
|
package/lib/client.js
CHANGED
|
@@ -593,8 +593,9 @@ var DICTS = {
|
|
|
593
593
|
rebuildTitle: "Rebuild model list",
|
|
594
594
|
candidates: "Models available to add",
|
|
595
595
|
selectAll: "Select all",
|
|
596
|
+
selectNone: "Deselect all",
|
|
596
597
|
supplementRisk: "Existing models and customizations will be kept. Only selected models will be added.",
|
|
597
|
-
rebuildRisk: "
|
|
598
|
+
rebuildRisk: "Rebuilding clears model parameters and overrides. Other provider settings remain unchanged.",
|
|
598
599
|
clearRisk: "This clears the Copilot model list and its model customizations. Confirm clearing separately.",
|
|
599
600
|
secondConfirm: "This is destructive. Click again to confirm.",
|
|
600
601
|
applyChanges: "Apply changes",
|
|
@@ -676,8 +677,9 @@ var DICTS = {
|
|
|
676
677
|
rebuildTitle: "\u91CD\u5EFA\u6A21\u578B\u5217\u8868",
|
|
677
678
|
candidates: "\u53EF\u65B0\u589E\u7684\u6A21\u578B",
|
|
678
679
|
selectAll: "\u5168\u9009",
|
|
680
|
+
selectNone: "\u53D6\u6D88\u5168\u9009",
|
|
679
681
|
supplementRisk: "\u5C06\u4FDD\u7559\u73B0\u6709\u6A21\u578B\u53CA\u5B9A\u5236\uFF0C\u53EA\u6DFB\u52A0\u4F60\u52FE\u9009\u7684\u6A21\u578B\u3002",
|
|
680
|
-
rebuildRisk: "\
|
|
682
|
+
rebuildRisk: "\u91CD\u5EFA\u5C06\u6E05\u9664\u73B0\u6709\u6A21\u578B\u53C2\u6570\u4E0E\u8986\u76D6\u914D\u7F6E\uFF0C\u5176\u4ED6\u63D0\u4F9B\u65B9\u8BBE\u7F6E\u4E0D\u53D8\u3002",
|
|
681
683
|
clearRisk: "\u672C\u6B21\u5C06\u6E05\u7A7A Copilot \u6A21\u578B\u5217\u8868\u5E76\u6E05\u9664\u5176\u6A21\u578B\u5B9A\u5236\u3002\u8BF7\u5355\u72EC\u786E\u8BA4\u6E05\u7A7A\u3002",
|
|
682
684
|
secondConfirm: "\u6B64\u64CD\u4F5C\u5177\u6709\u7834\u574F\u6027\uFF0C\u8BF7\u518D\u6B21\u70B9\u51FB\u786E\u8BA4\u3002",
|
|
683
685
|
applyChanges: "\u5E94\u7528\u66F4\u6539",
|
|
@@ -909,7 +911,10 @@ function RefreshModal({ t, flow, onSelect, onConfirm, onCancel, onOverlay }) {
|
|
|
909
911
|
"\uFF08",
|
|
910
912
|
candidates.length,
|
|
911
913
|
"\uFF09",
|
|
912
|
-
candidates.length > 0 &&
|
|
914
|
+
candidates.length > 0 && (() => {
|
|
915
|
+
const allSelected = candidates.every((id) => selectedIds.has(id));
|
|
916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", style: { ...styles.button, ...styles.secondary, height: 24, marginLeft: 10, fontSize: 12 }, onClick: () => onSelect(allSelected ? [] : candidates), children: allSelected ? t("selectNone") : t("selectAll") });
|
|
917
|
+
})()
|
|
913
918
|
] }),
|
|
914
919
|
list(candidates, styles.added, (id) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
915
920
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { type: "checkbox", checked: selectedIds.has(id), onChange: () => {
|
|
@@ -1229,12 +1234,9 @@ function CopilotSection({ t = (key) => DICTS.en[key] ?? key }) {
|
|
|
1229
1234
|
] }) : null;
|
|
1230
1235
|
})(),
|
|
1231
1236
|
["recovery-needed", "rollback-conflict", "intent-retired"].includes(flow.result?.status) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", style: { ...styles.button, ...styles.secondary }, onClick: () => drive({ type: "retire-request" }), children: t("retireBtn") }) }),
|
|
1232
|
-
|
|
1237
|
+
flow.result?.error && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", { style: styles.modalText, children: [
|
|
1233
1238
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", { children: t("techDetails") }),
|
|
1234
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
1235
|
-
flow.result?.error ?? "",
|
|
1236
|
-
flow.result?.changes ? ` ${JSON.stringify(flow.result.changes)}` : ""
|
|
1237
|
-
] })
|
|
1239
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...styles.mono, fontSize: 12 }, children: flow.result.error })
|
|
1238
1240
|
] })
|
|
1239
1241
|
] }),
|
|
1240
1242
|
flow.name === "failed" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: styles.error, children: flow.error === "state-corrupt" ? t("stateCorrupt") : flow.error })
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inventec/dsh-copilot-auth",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "为内置 Copilot 提供方补设备码登录设置页,预置开箱路由;凭据入内置凭据库,模型目录兜底不覆盖定制。v1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
|
+
"description": "为内置 Copilot 提供方补设备码登录设置页,预置开箱路由;凭据入内置凭据库,模型目录兜底不覆盖定制。v1.2.12:补充模型全选/取消全选互斥切换、重建风险提示精简一行、成功路径技术详情移除(失败诊断保留)。v1.2.10:退出登录正式可用(协议 v2)。适配 DSH 0.1.7+(≤0.1.5 请用 1.1.x)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "iasi",
|