@daweifu/capability-menu 0.1.4 → 0.1.5
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 +72 -87
- package/README.md +74 -89
- package/cordis.patch.yml +7 -0
- package/lib/client.d.ts +15 -3
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +710 -442
- package/lib/locations.js +168 -5
- package/lib/locations.js.map +1 -1
- package/lib/patch-file.js +33 -3
- package/lib/patch-file.js.map +1 -1
- package/lib/policy.js +3 -0
- package/lib/policy.js.map +1 -1
- package/lib/registry.js +53 -10
- package/lib/registry.js.map +1 -1
- package/lib/search.js +4 -4
- package/lib/search.js.map +1 -1
- package/lib/server/remote.js +7 -0
- package/lib/server/remote.js.map +1 -1
- package/lib/types/locations.d.ts +2 -0
- package/lib/types/locations.d.ts.map +1 -1
- package/lib/types/patch-file.d.ts.map +1 -1
- package/lib/types/policy.d.ts +2 -0
- package/lib/types/policy.d.ts.map +1 -1
- package/lib/types/registry.d.ts.map +1 -1
- package/lib/types/search.d.ts +2 -2
- package/lib/types/server/remote.d.ts +2 -0
- package/lib/types/server/remote.d.ts.map +1 -1
- package/package.json +37 -21
package/cordis.patch.yml
CHANGED
|
@@ -51,6 +51,13 @@
|
|
|
51
51
|
# Default (policy present but no config): every capability is Resident — the
|
|
52
52
|
# `classify` fallback, nothing is hidden. Add explicit `on-demand`/`disabled`
|
|
53
53
|
# rules to pull capabilities out of the model surface.
|
|
54
|
+
# The web surface disables the host skill filesystem provider by default, but
|
|
55
|
+
# this plugin's global Skill registration writes to its standard ~/.dsh/skills
|
|
56
|
+
# root. Re-enable the native provider so registered skills are indexed and
|
|
57
|
+
# available through ctx.skills; no upstream source or skill implementation is
|
|
58
|
+
# replaced.
|
|
59
|
+
- id: skill-filesystem
|
|
60
|
+
disabled: false
|
|
54
61
|
- insert:
|
|
55
62
|
- id: capability-menu-registry
|
|
56
63
|
name: '@daweifu/capability-menu/registry'
|
package/lib/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ window.__ModuleLoader__.load({ id: "@daweifu/capability-menu", factory: (require
|
|
|
2
2
|
var module = { exports: {} };
|
|
3
3
|
var exports = module.exports;
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
6
6
|
import { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
7
7
|
//#region src/client/remote.d.ts
|
|
8
8
|
/** Read-only row: one capability's Resident/On-demand/Disabled classification. */
|
|
@@ -129,6 +129,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
129
129
|
updateLocation: (id: string, input: McpUpdateInput) => Promise<RemoteResult<boolean>>;
|
|
130
130
|
listSkillLocations: () => Promise<RemoteResult<SkillLocation[]>>;
|
|
131
131
|
addSkillLocation: (dir: string, projectPath?: string) => Promise<RemoteResult<string>>;
|
|
132
|
+
importSkillFromGitHub: (url: string, projectPath?: string) => Promise<RemoteResult<string>>;
|
|
132
133
|
removeSkillLocation: (name: string, entryDir?: string) => Promise<RemoteResult<boolean>>;
|
|
133
134
|
adoptSkillLocation: (name: string) => Promise<RemoteResult<string>>;
|
|
134
135
|
updateSkillLocation: (name: string, dir: string, entryDir?: string) => Promise<RemoteResult<boolean>>;
|
|
@@ -149,6 +150,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
149
150
|
'capabilityPolicy/updateLocation': (id: string, input: McpUpdateInput) => Promise<RemoteResult<boolean>>;
|
|
150
151
|
'capabilityPolicy/listSkillLocations': () => Promise<RemoteResult<SkillLocation[]>>;
|
|
151
152
|
'capabilityPolicy/addSkillLocation': (dir: string, projectPath?: string) => Promise<RemoteResult<string>>;
|
|
153
|
+
'capabilityPolicy/importSkillFromGitHub': (url: string, projectPath?: string) => Promise<RemoteResult<string>>;
|
|
152
154
|
'capabilityPolicy/removeSkillLocation': (name: string, entryDir?: string) => Promise<RemoteResult<boolean>>;
|
|
153
155
|
'capabilityPolicy/adoptSkillLocation': (name: string) => Promise<RemoteResult<string>>;
|
|
154
156
|
'capabilityPolicy/updateSkillLocation': (name: string, dir: string, entryDir?: string) => Promise<RemoteResult<boolean>>;
|
|
@@ -316,6 +318,16 @@ interface CapabilityPolicyRemote {
|
|
|
316
318
|
message: string;
|
|
317
319
|
};
|
|
318
320
|
}>;
|
|
321
|
+
importSkillFromGitHub(url: string, projectPath?: string): Promise<{
|
|
322
|
+
ok: true;
|
|
323
|
+
value: string;
|
|
324
|
+
} | {
|
|
325
|
+
ok: false;
|
|
326
|
+
error: {
|
|
327
|
+
code: string;
|
|
328
|
+
message: string;
|
|
329
|
+
};
|
|
330
|
+
}>;
|
|
319
331
|
removeSkillLocation(name: string, entryDir?: string): Promise<{
|
|
320
332
|
ok: true;
|
|
321
333
|
value: boolean;
|
|
@@ -365,7 +377,7 @@ interface CapabilitySectionInjected {
|
|
|
365
377
|
subscribeSignals?: (listener: () => void) => () => void;
|
|
366
378
|
}
|
|
367
379
|
type CapabilitySectionProps = CapabilitySectionInjected;
|
|
368
|
-
type CapabilityKey = 'nav' | 'title' | 'desc' | 'resident' | 'on-demand' | 'disabled' | 'tool' | 'skill' | 'mandatory' | 'toolsGroup' | 'skillsGroup' | 'builtInGroup' | 'globalSkills' | 'projectSkills' | 'presetSkills' | 'emptyTools' | 'emptySkills' | 'emptyGlobalSkills' | 'emptyProjectSkills' | 'filterByName' | 'filterHint' | 'filterNoMatch' | 'toolCount' | 'residentShort' | 'onDemandShort' | 'disabledShort' | 'cycleHint' | 'notPreviewable' | 'previewClose' | 'detailNotFound' | 'cycleOverridden' | 'refreshFailed' | 'retry' | 'carrierFailureHint' | 'registerCapability' | 'editMcp' | 'editSkillNamed' | 'edit' | 'save' | 'remove' | 'cancel' | 'confirmRemove' | 'confirmRemoveMcp' | 'confirmRemoveSkillLink' | 'confirmRemoveSkillDir' | 'confirmSaveAnyway' | 'saveConfirmRealDir' | 'register' | 'notEditable' | 'entryNotFound' | 'mcpServers' | 'skillDirs' | 'skillDirPath' | 'skillDirHint' | 'skillRoot' | 'skillRootUser' | 'skillRootProject' | 'skillRootHintUser' | 'skillRootHintProject' | 'skillProjectPath' | 'skillProjectPathHint' | 'skillRegisteredAt' | 'skillRepointed' | 'skillAdopted' | 'skillSource' | 'skillSourceHint' | 'skillFromPreset' | 'skillFromPresetHint' | 'skillUnmanaged' | 'adoptSkill' | 'adoptSkillHint' | 'adoptSkillTitle' | 'sourceCustom' | 'sourceBundled' | 'serverName' | 'serverNameImmutable' | 'transport' | 'transportStdio' | 'transportHttp' | 'transportHintStdio' | 'transportHintHttp' | 'command' | 'args' | 'cwd' | 'env' | 'url' | 'headers' | 'headersHint' | 'timeout' | 'timeoutInvalid' | 'viewCatalog' | 'catalogPolicy' | 'catalogOnDemand' | 'catalogPolicyNote' | 'catalogDisabled' | 'catalogUnreadable';
|
|
380
|
+
type CapabilityKey = 'nav' | 'title' | 'packageName' | 'desc' | 'resident' | 'on-demand' | 'disabled' | 'tool' | 'skill' | 'mandatory' | 'toolsGroup' | 'skillsGroup' | 'builtInGroup' | 'globalSkills' | 'projectSkills' | 'presetSkills' | 'emptyTools' | 'emptySkills' | 'emptyGlobalSkills' | 'emptyProjectSkills' | 'emptyPresetSkills' | 'filterByName' | 'filterHint' | 'filterNoMatch' | 'toolCount' | 'residentShort' | 'onDemandShort' | 'disabledShort' | 'cycleHint' | 'notPreviewable' | 'previewClose' | 'markdownCode' | 'markdownWrap' | 'markdownUnwrap' | 'markdownCopy' | 'markdownCopied' | 'markdownFootnotes' | 'detailNotFound' | 'cycleOverridden' | 'refreshFailed' | 'mcpToolsPending' | 'feedback' | 'retry' | 'carrierFailureHint' | 'registerCapability' | 'editMcp' | 'editSkillNamed' | 'edit' | 'save' | 'remove' | 'cancel' | 'confirmRemove' | 'confirmRemoveMcp' | 'confirmRemoveSkillLink' | 'confirmRemoveSkillDir' | 'confirmSaveAnyway' | 'saveConfirmRealDir' | 'register' | 'notEditable' | 'entryNotFound' | 'mcpServers' | 'skillDirs' | 'skillDirPath' | 'skillDirHint' | 'skillRoot' | 'skillRootUser' | 'skillRootProject' | 'skillRootHintUser' | 'skillRootHintProject' | 'skillProjectPath' | 'skillProjectPathHint' | 'skillRegisteredAt' | 'skillRepointed' | 'skillAdopted' | 'skillSource' | 'skillSourceHint' | 'skillFromPreset' | 'skillFromPresetHint' | 'githubImporting' | 'importing' | 'skillUnmanaged' | 'adoptSkill' | 'adoptSkillHint' | 'adoptSkillTitle' | 'sourceCustom' | 'sourceBundled' | 'serverName' | 'serverNameImmutable' | 'transport' | 'transportStdio' | 'transportHttp' | 'transportHintStdio' | 'transportHintHttp' | 'command' | 'args' | 'cwd' | 'env' | 'url' | 'headers' | 'headersHint' | 'timeout' | 'timeoutInvalid' | 'viewCatalog' | 'catalogPolicy' | 'catalogOnDemand' | 'catalogPolicyNote' | 'catalogDisabled' | 'catalogUnreadable';
|
|
369
381
|
//#endregion
|
|
370
382
|
//#region src/client/index.d.ts
|
|
371
383
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
@@ -380,7 +392,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
380
392
|
* which resolves the mounted namespace service without the inject gate. */
|
|
381
393
|
declare const inject: string[];
|
|
382
394
|
/** Register the 能力菜单 section once `settings.section` is on the ledger. */
|
|
383
|
-
declare function apply(ctx:
|
|
395
|
+
declare function apply(ctx: Context): Promise<() => void>;
|
|
384
396
|
//#endregion
|
|
385
397
|
export { type CapabilityKey, type CapabilityPolicyRemote, type CapabilityRow, type CapabilitySectionInjected, type CapabilitySectionProps, type CapabilitySnapshot, apply, inject };
|
|
386
398
|
|
package/lib/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","names":[],"sources":["../src/client/remote.ts","../src/client/store.ts","../src/client/CapabilitySection.tsx","../src/client/index.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../src/client/remote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