@dotdance/dsh-skill-scope 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npm package](https://img.shields.io/npm/v/%40dotdance%2Fdsh-skill-scope.svg?label=npm%20package)](https://www.npmjs.com/package/@dotdance/dsh-skill-scope)
7
7
  [![npm downloads](https://img.shields.io/npm/dt/%40dotdance%2Fdsh-skill-scope.svg?label=npm%20downloads)](https://www.npmjs.com/package/@dotdance/dsh-skill-scope)
8
8
  [![DSH Web Plugin](https://img.shields.io/badge/DSH%20Web-Plugin-0f766e.svg)](https://github.com/dotdance/dsh-skill-scope)
9
- [![DSH >=0.2.2-rc.1 <0.4.0-0](https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.1%20%3C0.4.0--0-2563eb.svg)](#installation)
9
+ [![DSH >=0.2.3-alpha.1 <0.4.0-0](https://img.shields.io/badge/DSH-%3E%3D0.2.3--alpha.1%20%3C0.4.0--0-2563eb.svg)](#installation)
10
10
  ![node](https://img.shields.io/badge/node-%5E22.19.0%20%7C%7C%20%3E%3D24-3c873a.svg)
11
11
 
12
12
  **Lighten the load on your agent: one-click toggles for skills and MCP, so the context holds only what this turn actually needs. Skills and MCP servers you switch off are no longer injected into the model context — cleaner, and lighter on tokens.**
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npm package](https://img.shields.io/npm/v/%40dotdance%2Fdsh-skill-scope.svg?label=npm%20package)](https://www.npmjs.com/package/@dotdance/dsh-skill-scope)
7
7
  [![npm 下载量](https://img.shields.io/npm/dt/%40dotdance%2Fdsh-skill-scope.svg?label=npm%20%E4%B8%8B%E8%BD%BD%E9%87%8F)](https://www.npmjs.com/package/@dotdance/dsh-skill-scope)
8
8
  [![DSH Web Plugin](https://img.shields.io/badge/DSH%20Web-Plugin-0f766e.svg)](https://github.com/dotdance/dsh-skill-scope)
9
- [![DSH >=0.2.2-rc.1 <0.4.0-0](https://img.shields.io/badge/DSH-%3E%3D0.2.2--rc.1%20%3C0.4.0--0-2563eb.svg)](#安装)
9
+ [![DSH >=0.2.3-alpha.1 <0.4.0-0](https://img.shields.io/badge/DSH-%3E%3D0.2.3--alpha.1%20%3C0.4.0--0-2563eb.svg)](#安装)
10
10
  ![node](https://img.shields.io/badge/node-%5E22.19.0%20%7C%7C%20%3E%3D24-3c873a.svg)
11
11
 
12
12
  **给你的 Agent 减负:Skill 与 MCP 一键启停,让上下文只装这一轮真正要用的能力。关掉的 skill / MCP 不再进入模型上下文,更干净,更省 token。**
@@ -78,6 +78,9 @@ dsh plugin --profile web add @dotdance/dsh-skill-scope
78
78
 
79
79
  - 列表与全局面板**同一份清单**:全局关掉的项也在里面(开关是关的),你可以直接在这里把它打开。
80
80
  - 与全局设置不同的行带一个红色标记「**与全局不同**」,一眼看出这个工程动过什么。
81
+ - **上游自己禁用了模型调用的 Skill**(`SKILL.md` 里写了 `disable-model-invocation: true`)显示为
82
+ 「skill 内已禁用」(锁形图标 + 短文案)并置灰只读:本插件只做减法,打不开它。这类行照样计入段头总数,但不计进
83
+ 「已启用」,也不标「与全局不同」——它的状态不是你的工程造成的。
81
84
  - 视图条除「全部 / 已启用 / 已禁用」外多一个「**与全局不同**」:点它只剩本工程改过的项(清单长时好用)。
82
85
  - 改动**只对本工程的新会话生效**,不影响别的项目。
83
86
 
@@ -107,6 +110,7 @@ dsh plugin --profile web add @dotdance/dsh-skill-scope
107
110
  | 跟随全局 | 本工程对这项没有主张 | 开关位置与全局一致,没有红标 |
108
111
  | 本工程打开 | 全局关着,这个工程要用 | 开关是开的 + 红标「与全局不同」 |
109
112
  | 本工程关闭 | 全局开着,这个工程不要 | 开关是关的 + 红标「与全局不同」 |
113
+ | 上游禁用(skill 自己的 `SKILL.md` 写了 `disable-model-invocation: true`) | 模型不能调用它,本面板也打不开 | 开关是关的且不可点,行尾带锁形 +「skill 内已禁用」,**没有**红标(这不是本工程的选择) |
110
114
 
111
115
  想改回「跟随全局」:把开关拨回全局的样子即可,红标消失,这条决定也随之删除。
112
116
 
package/lib/client.js CHANGED
@@ -5,7 +5,7 @@ window.__ModuleLoader__.load({
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
7
  let react = require("react");
8
- let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
8
+ let _deepseek_ai_dsh_client_ui_primitives_client = require("@deepseek-ai/dsh-client-ui-primitives/client");
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  //#region src/shared/routes.ts
11
11
  /**
@@ -138,7 +138,7 @@ window.__ModuleLoader__.load({
138
138
  }
139
139
  //#endregion
140
140
  //#region \0dsh-css-module:/home/runner/work/dsh-skill-scope/dsh-skill-scope/src/client/styles.module.css?dsh-css-module
141
- const css = ".Jg-IJa_panel{box-sizing:border-box;flex-direction:column;gap:16px;height:100%;padding:20px 24px 32px;display:flex;overflow-y:auto}.Jg-IJa_overlay{pointer-events:auto;background:var(--dsw-alias-bg-mask-1,#00000073);z-index:60;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.Jg-IJa_modal{z-index:1;background:var(--dsw-alias-bg-layer-1,Canvas);width:min(760px,100vw - 48px);max-width:calc(100vw - 48px);height:min(680px,100vh - 48px);color:var(--dsw-alias-label-primary,CanvasText);border-radius:24px;flex-direction:column;display:flex;position:relative;overflow:hidden;box-shadow:0 24px 64px #00000052}.Jg-IJa_panelHead{flex-direction:column;gap:16px;padding:24px 24px 16px;display:flex}.Jg-IJa_header{justify-content:space-between;align-items:center;gap:12px;display:flex}.Jg-IJa_title{margin:0;font-size:17px;font-weight:600;line-height:1.3}.Jg-IJa_intro{color:var(--dsw-alias-label-secondary,currentColor);margin:0;font-size:13px;line-height:1.55}.Jg-IJa_introWarn{color:var(--dsw-alias-state-warn-primary,currentColor);font-weight:600}.Jg-IJa_closeButton{width:28px;height:28px;color:var(--dsw-alias-label-secondary,currentColor);cursor:pointer;background:0 0;border:0;border-radius:8px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.Jg-IJa_closeButton:hover{background:var(--dsw-alias-interactive-bg-hover,transparent);color:var(--dsw-alias-label-primary,currentColor)}.Jg-IJa_searchRow{align-items:center;display:flex;position:relative}.Jg-IJa_searchIcon{color:var(--dsw-alias-label-tertiary,currentColor);pointer-events:none;display:inline-flex;position:absolute;left:12px}.Jg-IJa_search{border:1px solid var(--dsw-alias-border-l2,currentColor);background:var(--dsw-alias-bg-layer-3,transparent);width:100%;color:var(--dsw-alias-label-primary,currentColor);font:inherit;border-radius:10px;padding:9px 12px 9px 36px;font-size:13px}.Jg-IJa_search::placeholder{color:var(--dsw-alias-label-tertiary,currentColor)}.Jg-IJa_search:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,currentColor);outline-offset:1px}.Jg-IJa_panelBody{flex:1;min-height:0;padding:4px 24px 24px;overflow-y:auto}.Jg-IJa_body{flex-direction:column;gap:14px;width:100%;display:flex}.Jg-IJa_section{flex-direction:column;gap:10px;min-width:0;display:flex}.Jg-IJa_sectionHead{align-items:center;gap:8px;min-width:0;display:flex}.Jg-IJa_sectionToggle{min-width:0;color:var(--dsw-alias-label-primary,currentColor);font:inherit;cursor:pointer;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:8px;padding:2px 0;display:flex}.Jg-IJa_sectionTitle{margin:0;font-size:14px;font-weight:600}.Jg-IJa_sectionCount{color:var(--dsw-alias-label-secondary,currentColor);font-size:13px}.Jg-IJa_sectionChevron{color:var(--dsw-alias-label-secondary,currentColor);margin-left:auto;transition:transform .14s;display:inline-flex}.Jg-IJa_sectionChevronOpen{transform:rotate(180deg)}.Jg-IJa_cards{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;margin:0;padding:0;list-style:none;display:grid}.Jg-IJa_groups{flex-direction:column;gap:14px;display:flex}.Jg-IJa_group{border-left:2px solid var(--dsw-alias-border-1,#00000014);flex-direction:column;gap:8px;min-width:0;padding-left:10px;display:flex}.Jg-IJa_groupToggle{min-width:0;color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:6px;padding:2px 0;font-size:13px;font-weight:600;display:flex}.Jg-IJa_groupToggle:hover{color:var(--dsw-alias-label-primary,currentColor)}.Jg-IJa_groupChevron{flex:none;transition:transform .14s;display:inline-flex}.Jg-IJa_groupChevron[data-open=true]{transform:rotate(180deg)}.Jg-IJa_groupTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Jg-IJa_groupCount{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary,currentColor));font-variant-numeric:tabular-nums;flex:none;font-weight:400}@media (width<=640px){.Jg-IJa_cards{grid-template-columns:minmax(0,1fr)}}.Jg-IJa_card{border:1px solid var(--dsw-alias-border-l2,currentColor);background:var(--dsw-alias-bg-layer-3,transparent);border-radius:10px;min-width:0;overflow:hidden}.Jg-IJa_cardHead{align-items:center;gap:10px;min-width:0;padding:11px 12px;display:flex}.Jg-IJa_cardMain{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.Jg-IJa_cardName{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.Jg-IJa_overridden{align-items:center;display:inline-flex}.Jg-IJa_cardDisabled .Jg-IJa_cardName{color:var(--dsw-alias-label-secondary,currentColor)}.Jg-IJa_cardTail{flex:0 3 auto;align-items:center;gap:6px;min-width:0;display:inline-flex}.Jg-IJa_expandButton{width:20px;height:20px;color:var(--dsw-alias-label-secondary,currentColor);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.Jg-IJa_expandButton:hover{background:var(--dsw-alias-interactive-bg-hover,transparent)}.Jg-IJa_expandChevron{transition:transform .14s;display:inline-flex}.Jg-IJa_expandChevronOpen{transform:rotate(180deg)}.Jg-IJa_cardBody{border-top:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);padding:10px;font-size:12px;line-height:1.55}.Jg-IJa_cardDescription{overflow-wrap:anywhere;margin:0}.Jg-IJa_detailRow{gap:10px;margin-top:8px;display:flex}.Jg-IJa_detailKey{width:56px;color:var(--dsw-alias-label-secondary,currentColor);flex:none}.Jg-IJa_detailValue{min-width:0;color:var(--dsw-alias-label-primary,currentColor);overflow-wrap:anywhere}.Jg-IJa_detailOrigin{min-width:0;color:var(--dsw-alias-label-primary,currentColor);overflow-wrap:anywhere;word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5}.Jg-IJa_toolList{min-width:0;max-height:120px;margin:0;padding:0;list-style:none;overflow-y:auto}.Jg-IJa_toolName{color:var(--dsw-alias-label-primary,currentColor);overflow-wrap:anywhere;word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.Jg-IJa_switch{cursor:pointer;background:0 0;border:0;border-radius:999px;flex:none;align-items:center;padding:0;display:inline-flex}.Jg-IJa_switch:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:2px}.Jg-IJa_switchTrack{background:var(--dsw-alias-border-l2,currentColor);border-radius:999px;width:28px;height:16px;transition:background-color .12s ease-in-out;display:inline-block;position:relative}.Jg-IJa_switchOn .Jg-IJa_switchTrack{background:var(--dsw-alias-state-business-primary,currentColor)}.Jg-IJa_switchThumb{background:var(--dsw-alias-bg-layer-1,currentColor);border-radius:50%;width:12px;height:12px;transition:transform .12s ease-in-out;position:absolute;top:2px;left:2px}.Jg-IJa_switchOn .Jg-IJa_switchThumb{transform:translate(12px)}.Jg-IJa_switch:disabled{cursor:not-allowed;opacity:.5}.Jg-IJa_alert{border:1px solid var(--dsw-alias-state-error-primary,currentColor);color:var(--dsw-alias-state-error-primary,currentColor);border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;font-size:12px;display:flex}.Jg-IJa_modeRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.Jg-IJa_modeButton{border:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;background:0 0;border-radius:999px;padding:4px 12px;font-size:12px}.Jg-IJa_modeButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,transparent)}.Jg-IJa_modeButtonActive{border-color:var(--dsw-alias-brand-primary,currentColor);background:var(--dsw-alias-interactive-bg-active,transparent);color:var(--dsw-alias-brand-primary,currentColor)}.Jg-IJa_modeButton:disabled{cursor:not-allowed;opacity:.5}.Jg-IJa_modeRowTrailing{align-items:center;margin-left:auto;display:flex}.Jg-IJa_toggleRow{color:var(--dsw-alias-label-secondary,currentColor);align-items:center;gap:8px;font-size:12px;display:flex}.Jg-IJa_toggleLabel{cursor:default;user-select:none}.Jg-IJa_button{border:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;background:0 0;border-radius:8px;padding:4px 10px;font-size:12px}.Jg-IJa_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,transparent)}.Jg-IJa_button:disabled{cursor:not-allowed;opacity:.5}.Jg-IJa_empty{color:var(--dsw-alias-label-secondary,currentColor);padding:4px 2px;font-size:12px}.Jg-IJa_chip{border:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:5px;padding:3px 9px;font-size:12px;display:inline-flex}.Jg-IJa_chip:hover{background:var(--dsw-alias-interactive-bg-hover,transparent)}";
141
+ const css = ".Jg-IJa_panel{box-sizing:border-box;flex-direction:column;gap:16px;height:100%;padding:20px 24px 32px;display:flex;overflow-y:auto}.Jg-IJa_overlay{pointer-events:auto;background:var(--dsw-alias-bg-mask-1,#00000073);z-index:60;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.Jg-IJa_modal{z-index:1;background:var(--dsw-alias-bg-layer-1,Canvas);width:min(760px,100vw - 48px);max-width:calc(100vw - 48px);height:min(680px,100vh - 48px);color:var(--dsw-alias-label-primary,CanvasText);border-radius:24px;flex-direction:column;display:flex;position:relative;overflow:hidden;box-shadow:0 24px 64px #00000052}.Jg-IJa_panelHead{flex-direction:column;gap:16px;padding:24px 24px 16px;display:flex}.Jg-IJa_header{justify-content:space-between;align-items:center;gap:12px;display:flex}.Jg-IJa_title{margin:0;font-size:17px;font-weight:600;line-height:1.3}.Jg-IJa_intro{color:var(--dsw-alias-label-secondary,currentColor);margin:0;font-size:13px;line-height:1.55}.Jg-IJa_introWarn{color:var(--dsw-alias-state-warn-primary,currentColor);font-weight:600}.Jg-IJa_closeButton{width:28px;height:28px;color:var(--dsw-alias-label-secondary,currentColor);cursor:pointer;background:0 0;border:0;border-radius:8px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.Jg-IJa_closeButton:hover{background:var(--dsw-alias-interactive-bg-hover,transparent);color:var(--dsw-alias-label-primary,currentColor)}.Jg-IJa_searchRow{align-items:center;display:flex;position:relative}.Jg-IJa_searchIcon{color:var(--dsw-alias-label-tertiary,currentColor);pointer-events:none;display:inline-flex;position:absolute;left:12px}.Jg-IJa_search{border:1px solid var(--dsw-alias-border-l2,currentColor);background:var(--dsw-alias-bg-layer-3,transparent);width:100%;color:var(--dsw-alias-label-primary,currentColor);font:inherit;border-radius:10px;padding:9px 12px 9px 36px;font-size:13px}.Jg-IJa_search::placeholder{color:var(--dsw-alias-label-tertiary,currentColor)}.Jg-IJa_search:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,currentColor);outline-offset:1px}.Jg-IJa_panelBody{flex:1;min-height:0;padding:4px 24px 24px;overflow-y:auto}.Jg-IJa_body{flex-direction:column;gap:14px;width:100%;display:flex}.Jg-IJa_section{flex-direction:column;gap:10px;min-width:0;display:flex}.Jg-IJa_sectionHead{align-items:center;gap:8px;min-width:0;display:flex}.Jg-IJa_sectionToggle{min-width:0;color:var(--dsw-alias-label-primary,currentColor);font:inherit;cursor:pointer;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:8px;padding:2px 0;display:flex}.Jg-IJa_sectionTitle{margin:0;font-size:14px;font-weight:600}.Jg-IJa_sectionCount{color:var(--dsw-alias-label-secondary,currentColor);font-size:13px}.Jg-IJa_sectionChevron{color:var(--dsw-alias-label-secondary,currentColor);margin-left:auto;transition:transform .14s;display:inline-flex}.Jg-IJa_sectionChevronOpen{transform:rotate(180deg)}.Jg-IJa_cards{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;margin:0;padding:0;list-style:none;display:grid}.Jg-IJa_groups{flex-direction:column;gap:14px;display:flex}.Jg-IJa_group{border-left:2px solid var(--dsw-alias-border-1,#00000014);flex-direction:column;gap:8px;min-width:0;padding-left:10px;display:flex}.Jg-IJa_groupToggle{min-width:0;color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:6px;padding:2px 0;font-size:13px;font-weight:600;display:flex}.Jg-IJa_groupToggle:hover{color:var(--dsw-alias-label-primary,currentColor)}.Jg-IJa_groupChevron{flex:none;transition:transform .14s;display:inline-flex}.Jg-IJa_groupChevron[data-open=true]{transform:rotate(180deg)}.Jg-IJa_groupTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Jg-IJa_groupCount{color:var(--dsw-alias-label-tertiary,var(--dsw-alias-label-secondary,currentColor));font-variant-numeric:tabular-nums;flex:none;font-weight:400}@media (width<=640px){.Jg-IJa_cards{grid-template-columns:minmax(0,1fr)}}.Jg-IJa_card{border:1px solid var(--dsw-alias-border-l2,currentColor);background:var(--dsw-alias-bg-layer-3,transparent);border-radius:10px;min-width:0;overflow:hidden}.Jg-IJa_cardHead{align-items:center;gap:10px;min-width:0;padding:11px 12px;display:flex}.Jg-IJa_cardMain{flex:1;align-items:center;gap:10px;min-width:0;display:flex}.Jg-IJa_cardName{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.Jg-IJa_overridden{align-items:center;display:inline-flex}.Jg-IJa_locked{white-space:nowrap;min-width:0;color:var(--dsw-alias-label-secondary,currentColor);cursor:help;align-items:center;gap:3px;font-size:12px;display:inline-flex}.Jg-IJa_locked svg{flex:none}.Jg-IJa_lockedText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.Jg-IJa_cardDisabled .Jg-IJa_cardName{color:var(--dsw-alias-label-secondary,currentColor)}.Jg-IJa_cardTail{flex:0 3 auto;align-items:center;gap:6px;min-width:0;display:inline-flex}.Jg-IJa_expandButton{width:20px;height:20px;color:var(--dsw-alias-label-secondary,currentColor);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.Jg-IJa_expandButton:hover{background:var(--dsw-alias-interactive-bg-hover,transparent)}.Jg-IJa_expandChevron{transition:transform .14s;display:inline-flex}.Jg-IJa_expandChevronOpen{transform:rotate(180deg)}.Jg-IJa_cardBody{border-top:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);padding:10px;font-size:12px;line-height:1.55}.Jg-IJa_cardDescription{overflow-wrap:anywhere;margin:0}.Jg-IJa_detailRow{gap:10px;margin-top:8px;display:flex}.Jg-IJa_detailKey{width:56px;color:var(--dsw-alias-label-secondary,currentColor);flex:none}.Jg-IJa_detailValue{min-width:0;color:var(--dsw-alias-label-primary,currentColor);overflow-wrap:anywhere}.Jg-IJa_detailOrigin{min-width:0;color:var(--dsw-alias-label-primary,currentColor);overflow-wrap:anywhere;word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5}.Jg-IJa_toolList{min-width:0;max-height:120px;margin:0;padding:0;list-style:none;overflow-y:auto}.Jg-IJa_toolName{color:var(--dsw-alias-label-primary,currentColor);overflow-wrap:anywhere;word-break:break-all;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.Jg-IJa_switch{cursor:pointer;background:0 0;border:0;border-radius:999px;flex:none;align-items:center;padding:0;display:inline-flex}.Jg-IJa_switch:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary,currentColor);outline-offset:2px}.Jg-IJa_switchTrack{background:var(--dsw-alias-border-l2,currentColor);border-radius:999px;width:28px;height:16px;transition:background-color .12s ease-in-out;display:inline-block;position:relative}.Jg-IJa_switchOn .Jg-IJa_switchTrack{background:var(--dsw-alias-state-business-primary,currentColor)}.Jg-IJa_switchThumb{background:var(--dsw-alias-bg-layer-1,currentColor);border-radius:50%;width:12px;height:12px;transition:transform .12s ease-in-out;position:absolute;top:2px;left:2px}.Jg-IJa_switchOn .Jg-IJa_switchThumb{transform:translate(12px)}.Jg-IJa_switch:disabled{cursor:not-allowed;opacity:.5}.Jg-IJa_alert{border:1px solid var(--dsw-alias-state-error-primary,currentColor);color:var(--dsw-alias-state-error-primary,currentColor);border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;font-size:12px;display:flex}.Jg-IJa_modeRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.Jg-IJa_modeButton{border:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;background:0 0;border-radius:999px;padding:4px 12px;font-size:12px}.Jg-IJa_modeButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,transparent)}.Jg-IJa_modeButtonActive{border-color:var(--dsw-alias-brand-primary,currentColor);background:var(--dsw-alias-interactive-bg-active,transparent);color:var(--dsw-alias-brand-primary,currentColor)}.Jg-IJa_modeButton:disabled{cursor:not-allowed;opacity:.5}.Jg-IJa_modeRowTrailing{align-items:center;margin-left:auto;display:flex}.Jg-IJa_toggleRow{color:var(--dsw-alias-label-secondary,currentColor);align-items:center;gap:8px;font-size:12px;display:flex}.Jg-IJa_toggleLabel{cursor:default;user-select:none}.Jg-IJa_button{border:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;background:0 0;border-radius:8px;padding:4px 10px;font-size:12px}.Jg-IJa_button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover,transparent)}.Jg-IJa_button:disabled{cursor:not-allowed;opacity:.5}.Jg-IJa_empty{color:var(--dsw-alias-label-secondary,currentColor);padding:4px 2px;font-size:12px}.Jg-IJa_chip{border:1px solid var(--dsw-alias-border-l2,currentColor);color:var(--dsw-alias-label-secondary,currentColor);font:inherit;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:5px;padding:3px 9px;font-size:12px;display:inline-flex}.Jg-IJa_chip:hover{background:var(--dsw-alias-interactive-bg-hover,transparent)}";
142
142
  const tagId = "@dotdance/dsh-skill-scope/styles.module.css";
143
143
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
144
144
  const tag = document.createElement("style");
@@ -148,66 +148,68 @@ window.__ModuleLoader__.load({
148
148
  document.head.appendChild(tag);
149
149
  }
150
150
  var styles_module_default = {
151
- "cardMain": "Jg-IJa_cardMain",
152
- "cardDisabled": "Jg-IJa_cardDisabled",
153
- "chip": "Jg-IJa_chip",
154
- "switchThumb": "Jg-IJa_switchThumb",
155
- "intro": "Jg-IJa_intro",
156
- "sectionHead": "Jg-IJa_sectionHead",
157
- "cards": "Jg-IJa_cards",
158
- "cardName": "Jg-IJa_cardName",
159
151
  "searchRow": "Jg-IJa_searchRow",
152
+ "introWarn": "Jg-IJa_introWarn",
160
153
  "modeRowTrailing": "Jg-IJa_modeRowTrailing",
161
- "detailValue": "Jg-IJa_detailValue",
162
- "section": "Jg-IJa_section",
163
- "sectionChevron": "Jg-IJa_sectionChevron",
164
- "search": "Jg-IJa_search",
165
- "cardDescription": "Jg-IJa_cardDescription",
166
- "modeRow": "Jg-IJa_modeRow",
167
- "expandChevronOpen": "Jg-IJa_expandChevronOpen",
168
- "sectionChevronOpen": "Jg-IJa_sectionChevronOpen",
169
- "sectionTitle": "Jg-IJa_sectionTitle",
170
- "group": "Jg-IJa_group",
171
- "switchOn": "Jg-IJa_switchOn",
172
- "toggleRow": "Jg-IJa_toggleRow",
173
- "panel": "Jg-IJa_panel",
154
+ "locked": "Jg-IJa_locked",
155
+ "cardMain": "Jg-IJa_cardMain",
174
156
  "switchTrack": "Jg-IJa_switchTrack",
175
- "panelBody": "Jg-IJa_panelBody",
176
- "closeButton": "Jg-IJa_closeButton",
157
+ "searchIcon": "Jg-IJa_searchIcon",
158
+ "header": "Jg-IJa_header",
159
+ "modal": "Jg-IJa_modal",
177
160
  "groups": "Jg-IJa_groups",
161
+ "panelHead": "Jg-IJa_panelHead",
162
+ "modeRow": "Jg-IJa_modeRow",
163
+ "title": "Jg-IJa_title",
164
+ "toggleRow": "Jg-IJa_toggleRow",
165
+ "modeButtonActive": "Jg-IJa_modeButtonActive",
166
+ "section": "Jg-IJa_section",
167
+ "switch": "Jg-IJa_switch",
168
+ "chip": "Jg-IJa_chip",
178
169
  "groupTitle": "Jg-IJa_groupTitle",
179
- "detailRow": "Jg-IJa_detailRow",
180
- "expandChevron": "Jg-IJa_expandChevron",
181
- "header": "Jg-IJa_header",
182
- "searchIcon": "Jg-IJa_searchIcon",
183
- "cardBody": "Jg-IJa_cardBody",
170
+ "overlay": "Jg-IJa_overlay",
171
+ "toolList": "Jg-IJa_toolList",
172
+ "cardDisabled": "Jg-IJa_cardDisabled",
173
+ "empty": "Jg-IJa_empty",
174
+ "cardTail": "Jg-IJa_cardTail",
175
+ "toolName": "Jg-IJa_toolName",
176
+ "card": "Jg-IJa_card",
177
+ "modeButton": "Jg-IJa_modeButton",
184
178
  "overridden": "Jg-IJa_overridden",
179
+ "groupToggle": "Jg-IJa_groupToggle",
180
+ "cards": "Jg-IJa_cards",
185
181
  "alert": "Jg-IJa_alert",
186
- "empty": "Jg-IJa_empty",
187
- "panelHead": "Jg-IJa_panelHead",
188
182
  "body": "Jg-IJa_body",
189
- "overlay": "Jg-IJa_overlay",
190
- "sectionCount": "Jg-IJa_sectionCount",
183
+ "expandChevron": "Jg-IJa_expandChevron",
184
+ "expandButton": "Jg-IJa_expandButton",
191
185
  "sectionToggle": "Jg-IJa_sectionToggle",
192
186
  "detailKey": "Jg-IJa_detailKey",
187
+ "cardName": "Jg-IJa_cardName",
188
+ "panel": "Jg-IJa_panel",
189
+ "expandChevronOpen": "Jg-IJa_expandChevronOpen",
190
+ "switchThumb": "Jg-IJa_switchThumb",
191
+ "panelBody": "Jg-IJa_panelBody",
193
192
  "toggleLabel": "Jg-IJa_toggleLabel",
194
- "toolName": "Jg-IJa_toolName",
195
- "cardTail": "Jg-IJa_cardTail",
193
+ "groupCount": "Jg-IJa_groupCount",
194
+ "sectionHead": "Jg-IJa_sectionHead",
195
+ "cardDescription": "Jg-IJa_cardDescription",
196
+ "closeButton": "Jg-IJa_closeButton",
197
+ "search": "Jg-IJa_search",
198
+ "detailRow": "Jg-IJa_detailRow",
196
199
  "cardHead": "Jg-IJa_cardHead",
197
- "groupToggle": "Jg-IJa_groupToggle",
198
- "introWarn": "Jg-IJa_introWarn",
200
+ "sectionChevron": "Jg-IJa_sectionChevron",
199
201
  "groupChevron": "Jg-IJa_groupChevron",
200
- "modeButton": "Jg-IJa_modeButton",
202
+ "group": "Jg-IJa_group",
203
+ "intro": "Jg-IJa_intro",
201
204
  "button": "Jg-IJa_button",
202
- "modal": "Jg-IJa_modal",
203
- "expandButton": "Jg-IJa_expandButton",
204
- "toolList": "Jg-IJa_toolList",
205
+ "lockedText": "Jg-IJa_lockedText",
205
206
  "detailOrigin": "Jg-IJa_detailOrigin",
206
- "title": "Jg-IJa_title",
207
- "groupCount": "Jg-IJa_groupCount",
208
- "card": "Jg-IJa_card",
209
- "switch": "Jg-IJa_switch",
210
- "modeButtonActive": "Jg-IJa_modeButtonActive"
207
+ "detailValue": "Jg-IJa_detailValue",
208
+ "sectionTitle": "Jg-IJa_sectionTitle",
209
+ "switchOn": "Jg-IJa_switchOn",
210
+ "cardBody": "Jg-IJa_cardBody",
211
+ "sectionCount": "Jg-IJa_sectionCount",
212
+ "sectionChevronOpen": "Jg-IJa_sectionChevronOpen"
211
213
  };
212
214
  //#endregion
213
215
  //#region src/client/parts.tsx
@@ -280,6 +282,38 @@ window.__ModuleLoader__.load({
280
282
  });
281
283
  }
282
284
  /**
285
+ * 挂锁图标(`locked` 行尾标注用)。
286
+ *
287
+ * **为什么这里必须有图形而不只是文字**:这一行与「本面板把它关了」的行在收起态
288
+ * 只差一个字形,用户扫一眼分不出「我不能开」和「我关的」。锁形是唯一无需阅读就成立的
289
+ * 区分,缺了它这条标注就退化成第二段小字(用户原话要的是「锁形图标」)。
290
+ * 图形与文字并存,不用图标单独承担语义:读屏与色弱用户仍有完整文案。
291
+ */
292
+ function LockIcon() {
293
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
294
+ width: "13",
295
+ height: "13",
296
+ viewBox: "0 0 16 16",
297
+ fill: "none",
298
+ "aria-hidden": "true",
299
+ focusable: "false",
300
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
301
+ x: "3.5",
302
+ y: "7",
303
+ width: "9",
304
+ height: "6.5",
305
+ rx: "1.3",
306
+ stroke: "currentColor",
307
+ strokeWidth: "1.5"
308
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
309
+ d: "M5.6 7V5.1a2.4 2.4 0 0 1 4.8 0V7",
310
+ stroke: "currentColor",
311
+ strokeWidth: "1.5",
312
+ strokeLinecap: "round"
313
+ })]
314
+ });
315
+ }
316
+ /**
283
317
  * 四叶草(**空心线描**)—— 本插件的标识图标,**两个入口共用同一个**:
284
318
  * 侧栏 `sidebar.panellist` 的图标位与输入框右侧的工作区 chip。
285
319
  *
@@ -334,7 +368,7 @@ window.__ModuleLoader__.load({
334
368
  function CapabilityCard(props) {
335
369
  const { row, testId } = props;
336
370
  const [open, setOpen] = (0, react.useState)(false);
337
- const readonly = row.readonly === true;
371
+ const readonly = row.readonly === true || row.locked === true;
338
372
  const stateText = row.enabled ? props.enabledLabel : props.disabledLabel;
339
373
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
340
374
  className: readonly ? `${styles_module_default.card} ${styles_module_default.cardDisabled}` : styles_module_default.card,
@@ -361,16 +395,25 @@ window.__ModuleLoader__.load({
361
395
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
362
396
  className: styles_module_default.cardTail,
363
397
  children: [
398
+ row.locked === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
399
+ className: styles_module_default.locked,
400
+ "data-testid": "row-locked",
401
+ title: row.lockedHint,
402
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(LockIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
403
+ className: styles_module_default.lockedText,
404
+ children: row.lockedLabel
405
+ })]
406
+ }) : null,
364
407
  row.overridden === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
365
408
  className: styles_module_default.overridden,
366
409
  "data-testid": "ws-overridden",
367
410
  title: props.overriddenLabel,
368
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
411
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives_client.Tag, {
369
412
  tone: "danger",
370
413
  children: props.overriddenLabel
371
414
  })
372
415
  }) : null,
373
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
416
+ row.locked === true ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives_client.Tag, {
374
417
  tone: row.enabled ? "success" : "neutral",
375
418
  children: stateText
376
419
  }),
@@ -406,6 +449,16 @@ window.__ModuleLoader__.load({
406
449
  children: stateText
407
450
  })]
408
451
  }),
452
+ row.locked === true && row.lockedHint !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
453
+ className: styles_module_default.detailRow,
454
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
455
+ className: styles_module_default.detailKey,
456
+ children: row.lockedLabel
457
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
458
+ className: styles_module_default.detailValue,
459
+ children: row.lockedHint
460
+ })]
461
+ }) : null,
409
462
  row.tools === void 0 || row.tools.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
410
463
  className: styles_module_default.detailRow,
411
464
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
@@ -474,8 +527,11 @@ window.__ModuleLoader__.load({
474
527
  * 两个数都取自**同一批可见行**(搜索过滤之后),所以搜索时两个数一起变小 ——
475
528
  * 不会出现「4/34」而屏幕上只剩 3 张卡片。
476
529
  *
477
- * 只读行(MCP 的未加载 / 不可限制项)照样计入总量与启用数:它们也是列表里实实在在
478
- * 占了一格的东西,从总量里扣掉会让「这一组有几个」对不上眼前的卡片数。
530
+ * 只读行照样计入总量:它们也是列表里实实在在占了一格的东西,从总量里扣掉会让
531
+ * 「这一组有几个」对不上眼前的卡片数。**但分子不同**:MCP 的只读行(未加载 /
532
+ * 不可限制)状态仍是它真实的状态,`enabled` 照旧参与分子;上游禁用模型调用的
533
+ * Skill 行则被强制 `enabled: false`(`panel-model.ts` 的 `locked` 分支),
534
+ * 只进分母 —— 它的「开」不是本面板能给的,计进分子会让数字宣称一件做不到的事。
479
535
  */
480
536
  function countText(rows) {
481
537
  return `${rows.filter((row) => row.enabled).length}/${rows.length}`;
@@ -681,16 +737,25 @@ window.__ModuleLoader__.load({
681
737
  * 本地类型只会让两个外壳的数据多过一道不必要的适配。
682
738
  */
683
739
  function toSkillRows(skills, isOpen, t, isOverridden = () => false) {
684
- return skills.map((skill) => ({
685
- name: skill.name,
686
- description: skill.description,
687
- source: skill.source,
688
- enabled: isOpen(skill.name),
689
- ...isOverridden(skill.name) ? { overridden: true } : {},
690
- ...skill.group === void 0 ? {} : { group: skill.group },
691
- ...skill.groupLabel === void 0 ? {} : { groupLabel: skill.groupLabel },
692
- ...skill.sourceLabel === void 0 || skill.sourceLabel === null ? {} : { origin: skill.sourceLabel }
693
- }));
740
+ return skills.map((skill) => {
741
+ const locked = skill.upstreamModelInvocable === false;
742
+ return {
743
+ name: skill.name,
744
+ description: skill.description,
745
+ source: skill.source,
746
+ enabled: locked ? false : isOpen(skill.name),
747
+ ...locked ? {
748
+ readonly: true,
749
+ locked: true,
750
+ lockedLabel: t("state.locked"),
751
+ lockedHint: t("state.lockedHint")
752
+ } : {},
753
+ ...!locked && isOverridden(skill.name) ? { overridden: true } : {},
754
+ ...skill.group === void 0 ? {} : { group: skill.group },
755
+ ...skill.groupLabel === void 0 ? {} : { groupLabel: skill.groupLabel },
756
+ ...skill.sourceLabel === void 0 || skill.sourceLabel === null ? {} : { origin: skill.sourceLabel }
757
+ };
758
+ });
694
759
  }
695
760
  /**
696
761
  * MCP 行派生。与 `toSkillRows` 同形:**不排除任何行**——全局关掉的 server 也要留在
@@ -916,6 +981,8 @@ window.__ModuleLoader__.load({
916
981
  "state.enabled": "已启用",
917
982
  "state.disabled": "已禁用",
918
983
  "state.overridden": "与全局不同",
984
+ "state.locked": "skill 内已禁用",
985
+ "state.lockedHint": "这个 skill 自己的 SKILL.md 里写了 disable-model-invocation: true,模型无法调用它;本面板只能关闭它,无法把它打开。",
919
986
  "action.expand": "展开",
920
987
  "action.collapse": "收起",
921
988
  "detail.state": "状态",
@@ -952,6 +1019,8 @@ window.__ModuleLoader__.load({
952
1019
  "state.enabled": "Enabled",
953
1020
  "state.disabled": "Disabled",
954
1021
  "state.overridden": "Differs from global",
1022
+ "state.locked": "set in skill",
1023
+ "state.lockedHint": "This skill’s own SKILL.md sets disable-model-invocation: true, so the model cannot invoke it; this panel can only switch it off, never on.",
955
1024
  "action.expand": "Expand",
956
1025
  "action.collapse": "Collapse",
957
1026
  "detail.state": "State",