@daweifu/capability-menu 0.1.1 → 0.1.2

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/lib/client.d.ts CHANGED
@@ -7,20 +7,23 @@ import { ClientContext } from "@deepseek-ai/dsh-client-runtime/client";
7
7
  /**
8
8
  * ⚠️ VERIFIED AGAINST REAL rc.8 CLIENT API.
9
9
  *
10
- * Types + small helpers for the 能力菜单 (Capability Menu) settings
10
+ * Types + small helpers for the 能力管理 (Capability Management) settings
11
11
  * section. The component reads/writes the Host `ctx.capabilityPolicy` through
12
12
  * the generated `remote.capabilityPolicy` face (see `./remote.ts`), mirroring
13
13
  * how `dsh-client-ui-settings-plugin-inventory` consumes
14
14
  * `ctx.remote.pluginInventory`.
15
15
  */
16
- /** One capability's Exposed/Progressive/Blocked row, as surfaced by the server. */
16
+ /** One capability's Resident/On-demand/Disabled row, as surfaced by the server. */
17
17
  interface CapabilityRow {
18
18
  readonly id: string;
19
19
  readonly kind: 'tool' | 'skill';
20
20
  readonly name: string;
21
+ /** Server namespace for tools (`built-in` groups harness-native tools); undefined for skills. */
21
22
  readonly server?: string;
22
- readonly class: 'exposed' | 'progressive' | 'blocked';
23
- /** Human-friendly display: `Exposed · 常驻(直接调用)` / `Progressive · 按需(目录渐进加载)` / `Blocked · 禁用`. */
23
+ /** Skill source root label (`project-dsh`/`user-agents`/…), present only for skills. */
24
+ readonly source?: string;
25
+ readonly class: 'resident' | 'on-demand' | 'disabled';
26
+ /** Human-friendly display: `Resident · 常驻(直接调用)` / `On-demand · 按需(目录渐进加载)` / `Disabled · 禁用`. */
24
27
  readonly classLabel?: string;
25
28
  readonly mandatory: boolean;
26
29
  }
@@ -47,6 +50,7 @@ interface ToolDetail {
47
50
  readonly provider: string;
48
51
  readonly serverName?: string;
49
52
  readonly path?: string;
53
+ readonly source?: string;
50
54
  };
51
55
  readonly tags: readonly string[];
52
56
  readonly stats: {
@@ -57,6 +61,18 @@ interface ToolDetail {
57
61
  readonly lastUsedAt?: number;
58
62
  };
59
63
  }
64
+ /** 能力目录查看负载:两份只读「文件」+ 缺失原因。 */
65
+ interface CatalogDocs {
66
+ /** 当前生效的三档策略配置 YAML。 */
67
+ readonly policyYaml: string;
68
+ /** 按需能力目录物化文件(path + content)。 */
69
+ readonly catalog?: {
70
+ readonly path: string;
71
+ readonly content: string;
72
+ };
73
+ /** catalog 不可用原因:'disabled' = 物化未启用;'read-failed' = 读盘失败。 */
74
+ readonly catalogMissing?: 'disabled' | 'read-failed';
75
+ }
60
76
  /** The Host `capabilityPolicy` remote face (generated contribution). */
61
77
  interface CapabilityPolicyRemote {
62
78
  getConfig(): Promise<{
@@ -119,6 +135,16 @@ interface CapabilityPolicyRemote {
119
135
  message: string;
120
136
  };
121
137
  }>;
138
+ getCatalogDocs(): Promise<{
139
+ ok: true;
140
+ value: CatalogDocs;
141
+ } | {
142
+ ok: false;
143
+ error: {
144
+ code: string;
145
+ message: string;
146
+ };
147
+ }>;
122
148
  }
123
149
  //#endregion
124
150
  //#region src/client/CapabilitySection.d.ts
@@ -132,12 +158,12 @@ interface CapabilitySectionInjected {
132
158
  remoteKeys?: string;
133
159
  }
134
160
  type CapabilitySectionProps = CapabilitySectionInjected;
135
- type CapabilityKey = 'nav' | 'title' | 'desc' | 'exposed' | 'progressive' | 'blocked' | 'kind' | 'class' | 'tool' | 'skill' | 'mandatory' | 'rules' | 'toolsGroup' | 'skillsGroup' | 'emptyTools' | 'emptySkills' | 'toolCount' | 'exposedShort' | 'progressiveShort' | 'blockedShort' | 'cycleHint' | 'notPreviewable' | 'previewClose' | 'detailNotFound';
161
+ type CapabilityKey = 'nav' | 'title' | 'desc' | 'resident' | 'on-demand' | 'disabled' | 'kind' | 'class' | 'tool' | 'skill' | 'mandatory' | 'rules' | 'toolsGroup' | 'skillsGroup' | 'builtInGroup' | 'globalSkills' | 'projectSkills' | 'emptyTools' | 'emptySkills' | 'emptyGlobalSkills' | 'emptyProjectSkills' | 'toolCount' | 'residentShort' | 'onDemandShort' | 'disabledShort' | 'cycleHint' | 'notPreviewable' | 'previewClose' | 'detailNotFound' | 'cycleOverridden' | 'viewCatalog' | 'catalogPolicy' | 'catalogOnDemand' | 'catalogPolicyNote' | 'catalogDisabled' | 'catalogUnreadable';
136
162
  //#endregion
137
163
  //#region src/client/index.d.ts
138
164
  declare module '@deepseek-ai/dsh-client-ui-slots' {
139
165
  interface LocaleNamespaceMap {
140
- /** 能力菜单 tab copy. */
166
+ /** 能力管理 tab copy. */
141
167
  'settings.capability': Record<CapabilityKey, string>;
142
168
  }
143
169
  }
@@ -146,7 +172,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
146
172
  * ("waiting for service"). Access it via `ctx.get('remote.capabilityPolicy')`,
147
173
  * which resolves the mounted namespace service without the inject gate. */
148
174
  declare const inject: string[];
149
- /** Register the 能力菜单 section once `settings.section` is on the ledger. */
175
+ /** Register the 能力管理 section once `settings.section` is on the ledger. */
150
176
  declare function apply(ctx: ClientContext): Promise<() => void>;
151
177
  //#endregion
152
178
  export { type CapabilityKey, type CapabilityPolicyRemote, type CapabilityRow, type CapabilitySectionInjected, type CapabilitySectionProps, type CapabilitySnapshot, apply, inject };
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","names":[],"sources":["../src/client/store.ts","../src/client/CapabilitySection.tsx","../src/client/index.ts"],"mappings":";;;;;;;;;;;;;;;;UAWiB;WACN;WACA;WACA;WACA;WACA;;WAEA;WACA;;;UAIM;WACN,eAAe;;;UAIT;WACN;WACA;;;UAIM;WACN;WACA;WACA;WACA;WACA;WACA;WACA,YAAY;WACZ,SAAS;WACT;aAAmB;aAA2B;aAA8B;;WAC5E;WACA;aACE;aACA;aACA;aACA;aACA;;;;UAKI;EACf,aAAa;IAAU;IAAU,OAAO;;IAA8B;IAAW;MAAS;MAAc;;;EACxG,aAAa,SAAS,0BAA0B;IAAU;IAAU;;IAAkB;IAAW;MAAS;MAAc;;;EACxH,eAAe;IAAU;IAAU,OAAO;;IAAsB;IAAW;MAAS;MAAc;;;EAClG,aAAa,YAAY,mBAAmB;IAAU;IAAU,OAAO;;IAAmC;IAAW;MAAS;MAAc;;;EAC5I,cAAc,YAAY,kBAAkB;IAAU;IAAU;;IAAgC;IAAW;MAAS;MAAc;;;EAClI,UAAU,aAAa;IAAU;IAAU,OAAO;;IAA6B;IAAW;MAAS;MAAc;;;;;;;UCtClG;EACf,QAAQ;EACR,EAAE,KAAK,eAAe,SAAS;;EAE/B;;EAEA;;KAGU,yBAAyB;KAEzB;;;;YCVA;;IAER,uBAAuB,OAAO;;;;;;;cAQrB;;iBAGS,MAAM,KAAK,gBAAgB"}
1
+ {"version":3,"file":"client.d.ts","names":[],"sources":["../src/client/store.ts","../src/client/CapabilitySection.tsx","../src/client/index.ts"],"mappings":";;;;;;;;;;;;;;;;UAWiB;WACN;WACA;WACA;;WAEA;;WAEA;WACA;;WAEA;WACA;;;UAIM;WACN,eAAe;;;UAIT;WACN;WACA;;;UAIM;WACN;WACA;WACA;WACA;WACA;WACA;WACA,YAAY;WACZ,SAAS;WACT;aAAmB;aAA2B;aAA8B;aAAwB;;WACpG;WACA;aACE;aACA;aACA;aACA;aACA;;;;UAKI;;WAEN;;WAEA;aAAqB;aAAuB;;;WAE5C;;;UAIM;EACf,aAAa;IAAU;IAAU,OAAO;;IAA8B;IAAW;MAAS;MAAc;;;EACxG,aAAa,SAAS,0BAA0B;IAAU;IAAU;;IAAkB;IAAW;MAAS;MAAc;;;EACxH,eAAe;IAAU;IAAU,OAAO;;IAAsB;IAAW;MAAS;MAAc;;;EAClG,aAAa,YAAY,mBAAmB;IAAU;IAAU,OAAO;;IAAmC;IAAW;MAAS;MAAc;;;EAC5I,cAAc,YAAY,kBAAkB;IAAU;IAAU;;IAAgC;IAAW;MAAS;MAAc;;;EAClI,UAAU,aAAa;IAAU;IAAU,OAAO;;IAA6B;IAAW;MAAS;MAAc;;;EACjH,kBAAkB;IAAU;IAAU,OAAO;;IAAkB;IAAW;MAAS;MAAc;;;;;;;UChDlF;EACf,QAAQ;EACR,EAAE,KAAK,eAAe,SAAS;;EAE/B;;EAEA;;KAGU,yBAAyB;KAEzB;;;;YCdA;;IAER,uBAAuB,OAAO;;;;;;;cAQrB;;iBAGS,MAAM,KAAK,gBAAgB"}