@daweifu/capability-menu 0.1.0 → 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/README.en.md +217 -0
- package/README.md +144 -135
- package/cordis.patch.yml +41 -33
- package/lib/client.d.ts +182 -0
- package/lib/client.d.ts.map +1 -0
- package/lib/client.js +6508 -0
- package/lib/index.js +27 -13
- package/lib/index.js.map +1 -0
- package/lib/invoke.js +69 -97
- package/lib/invoke.js.map +1 -0
- package/lib/policy.js +228 -84
- package/lib/policy.js.map +1 -0
- package/lib/registry.js +184 -144
- package/lib/registry.js.map +1 -0
- package/lib/search.js +19 -10
- package/lib/search.js.map +1 -0
- package/lib/server/remote.js +194 -0
- package/lib/server/remote.js.map +1 -0
- package/lib/types/index.d.ts +25 -13
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/invoke.d.ts +7 -13
- package/lib/types/invoke.d.ts.map +1 -0
- package/lib/types/policy.d.ts +80 -57
- package/lib/types/policy.d.ts.map +1 -0
- package/lib/types/registry.d.ts +63 -26
- package/lib/types/registry.d.ts.map +1 -0
- package/lib/types/search.d.ts.map +1 -0
- package/lib/types/server/remote.d.ts +72 -0
- package/lib/types/server/remote.d.ts.map +1 -0
- package/package.json +55 -27
- package/lib/invariant.js +0 -22
- package/lib/types/invariant.d.ts +0 -16
package/lib/index.js
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @daweifu/capability-menu — consolidated plugin package.
|
|
2
|
+
* @daweifu/capability-menu — consolidated plugin package (server + browser).
|
|
3
3
|
*
|
|
4
|
-
* One installable source package exposing
|
|
5
|
-
* bundle mounts as separate entries via subpath exports (`/registry`, `/search`,
|
|
6
|
-
* `/invoke`, `/policy`):
|
|
4
|
+
* One installable source package exposing:
|
|
7
5
|
*
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
6
|
+
* - four cordis plugin factories via subpath exports (`/registry`, `/search`,
|
|
7
|
+
* `/invoke`, `/policy`), mounted by the bundle patch as separate entries:
|
|
8
|
+
* - `registry` (P0): capability catalog + `ctx.capability` service (no model tool).
|
|
9
|
+
* - `search` (P1): registers `meta_search`.
|
|
10
|
+
* - `invoke` (P2): registers `meta_invoke`.
|
|
11
|
+
* - `policy` (P3): Resident/On-demand/Disabled projection policy + `ctx.capabilityPolicy`.
|
|
12
|
+
* - the package root entry (`name` + `apply` below): mounts the Typert gateway
|
|
13
|
+
* that exposes `ctx.capabilityPolicy` to the browser as the `capabilityPolicy`
|
|
14
|
+
* remote namespace — the data source of the 能力管理 settings tab.
|
|
15
|
+
* - a browser bundle via the `./client` subpath (`src/client`), discovered by
|
|
16
|
+
* `@deepseek-ai/dsh-client-modules` from this package's `dsh.client`
|
|
17
|
+
* declaration and served as `/plugins/<id>/client.js`.
|
|
18
|
+
*
|
|
19
|
+
* NOTE: this module deliberately re-exports nothing from the subpath plugins
|
|
20
|
+
* (not even types — those live at `/registry`, `/search`, `/invoke`, `/policy`).
|
|
21
|
+
* Re-exporting would either pollute the root entry's plugin identity with the
|
|
22
|
+
* sub-plugins' `name`/`apply`/`inject`, or trigger ambiguous-type re-exports
|
|
23
|
+
* (each subpath exports its own `Config` interface).
|
|
12
24
|
*
|
|
13
25
|
* @module @daweifu/capability-menu
|
|
14
26
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export
|
|
27
|
+
import { CapabilityPolicyGateway } from "./server/remote.js";
|
|
28
|
+
/** Root plugin identity (matches the `capability-menu` patch entry id). */
|
|
29
|
+
export const name = 'capability-menu';
|
|
30
|
+
/** Root entry: mount the browser-facing capabilityPolicy gateway. */
|
|
31
|
+
export function apply(ctx) {
|
|
32
|
+
ctx.plugin(CapabilityPolicyGateway);
|
|
33
|
+
}
|
|
20
34
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAE5D,2EAA2E;AAC3E,MAAM,CAAC,MAAM,IAAI,GAAG,iBAAiB,CAAA;AAErC,qEAAqE;AACrE,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,GAAG,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAA;AACrC,CAAC"}
|
package/lib/invoke.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* @module @daweifu/capability-menu (invoke plugin)
|
|
5
5
|
*/
|
|
6
6
|
import z from '@deepseek-ai/schemastery';
|
|
7
|
-
import {
|
|
7
|
+
import { ToolCallId } from '@deepseek-ai/dsh-llm';
|
|
8
8
|
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
9
9
|
import { isModelInvocable, renderSkillContent } from '@deepseek-ai/dsh-skill';
|
|
10
|
-
import {
|
|
10
|
+
import { MCP_ID_PREFIX } from "./registry.js";
|
|
11
11
|
export const name = 'capability-menu-invoke';
|
|
12
|
-
export const inject = ['
|
|
12
|
+
export const inject = ['capability', 'tools', 'skills'];
|
|
13
13
|
/** Validate and default the tool configuration. */
|
|
14
14
|
export const Config = z.object({
|
|
15
15
|
forwardMode: z.union(['direct', 'resolve']).default('direct'),
|
|
@@ -17,14 +17,14 @@ export const Config = z.object({
|
|
|
17
17
|
/**
|
|
18
18
|
* Register the `meta_invoke` tool.
|
|
19
19
|
*
|
|
20
|
-
* Dispatch is by `
|
|
21
|
-
* kept only as a defensive guard alongside the kind check).
|
|
20
|
+
* Dispatch is by the explicit `kind` argument (no id-prefix parsing).
|
|
22
21
|
*
|
|
23
|
-
* - Tools (`kind: 'tool'`,
|
|
24
|
-
* call via the official
|
|
25
|
-
* `agent`/`signal`/parent lineage.
|
|
26
|
-
* the target schema so the model can
|
|
27
|
-
*
|
|
22
|
+
* - Tools (`kind: 'tool'`, e.g. `mcp__gongfeng__create_issue` or a harness-native
|
|
23
|
+
* tool such as `bash`): forwards to the underlying tool call via the official
|
|
24
|
+
* `ctx.tools.execute` pipeline, preserving `agent`/`signal`/parent lineage.
|
|
25
|
+
* `forwardMode: 'resolve'` instead returns the target schema so the model can
|
|
26
|
+
* call the tool directly.
|
|
27
|
+
* - Skills (`kind: 'skill'`, id is the bare skill name): loads the full skill
|
|
28
28
|
* instructions and returns them as `<skill_content>` — no args, no script
|
|
29
29
|
* execution (matches the existing `skill` tool semantics).
|
|
30
30
|
*/
|
|
@@ -33,53 +33,19 @@ export function apply(ctx, config = {}) {
|
|
|
33
33
|
if (forwardMode !== 'direct' && forwardMode !== 'resolve') {
|
|
34
34
|
throw new Error(`forwardMode must be "direct" or "resolve", received "${String(forwardMode)}"`);
|
|
35
35
|
}
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
// instructions, saving tokens (mirrors synapse's `_loaded_skills`).
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
* the catalog entry's `path` (SKILL.md) directly and strip frontmatter to
|
|
44
|
-
* produce a `SkillDefinition`-compatible body.
|
|
45
|
-
*/
|
|
46
|
-
const loadProgressiveSkill = async (name, capability, signal) => {
|
|
47
|
-
// If the skill is registered globally, prefer the registry's parser.
|
|
48
|
-
const registered = await ctx.skills.get(name, { signal }).catch(() => undefined);
|
|
49
|
-
if (registered !== undefined)
|
|
50
|
-
return registered;
|
|
51
|
-
const basePath = capability.origin.path;
|
|
52
|
-
if (basePath === undefined)
|
|
53
|
-
return undefined;
|
|
54
|
-
const { readFile } = await import('node:fs/promises');
|
|
55
|
-
const { resolve } = await import('node:path');
|
|
56
|
-
const markdownPath = resolve(process.cwd(), basePath, 'SKILL.md');
|
|
57
|
-
let text;
|
|
58
|
-
try {
|
|
59
|
-
text = await readFile(markdownPath, 'utf8');
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
ctx.logger.warn(`meta_invoke: progressive skill "${name}" body not readable (${markdownPath}): ${String(error)}`);
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
const content = stripFrontmatter(text);
|
|
66
|
-
return {
|
|
67
|
-
name,
|
|
68
|
-
description: capability.description,
|
|
69
|
-
...capability.whenToUse !== undefined ? { whenToUse: capability.whenToUse } : {},
|
|
70
|
-
invocation: { modelInvocable: true, userInvocable: false },
|
|
71
|
-
source: { type: 'local' },
|
|
72
|
-
provider: capability.origin.provider ?? 'progressive-catalog',
|
|
73
|
-
...capability.origin.path !== undefined ? { path: resolve(process.cwd(), capability.origin.path) } : {},
|
|
74
|
-
resourceBase: { kind: 'directory', path: resolve(process.cwd(), basePath) },
|
|
75
|
-
content,
|
|
76
|
-
};
|
|
77
|
-
};
|
|
36
|
+
// Per-session dedup for loaded skills. Re-loading an already-injected skill
|
|
37
|
+
// only returns a short reminder instead of re-injecting the full
|
|
38
|
+
// instructions, saving tokens (mirrors synapse's `_loaded_skills`). Keyed by
|
|
39
|
+
// the agent object so two sessions in the same process never share state; a
|
|
40
|
+
// WeakMap lets entries be collected with the agent. Without an agent context
|
|
41
|
+
// (headless dispatch) nothing is cached.
|
|
42
|
+
const loadedSkills = new WeakMap();
|
|
78
43
|
const tool = defineTool({
|
|
79
44
|
name: 'meta_invoke',
|
|
80
|
-
description: 'Execute a capability by its exact id (from meta_search)
|
|
45
|
+
description: 'Execute a capability by its exact id (from meta_search) and kind. For tools (kind "tool", e.g. mcp__gongfeng__create_issue or a native tool such as bash), forwards to the underlying tool call with args. For skills (kind "skill", e.g. frontend-design), loads the full skill instructions and returns them as <skill_content> — no args needed. Always pass the same kind the search result reported.',
|
|
81
46
|
parameters: {
|
|
82
|
-
id: { type: 'string', required: true, description: 'Capability id from meta_search, e.g. mcp__gongfeng__create_issue or
|
|
47
|
+
id: { type: 'string', required: true, description: 'Capability id from meta_search, e.g. mcp__gongfeng__create_issue or frontend-design.' },
|
|
48
|
+
kind: { type: 'string', enum: ['tool', 'skill'], required: true, description: 'Capability kind reported by meta_search for this id.' },
|
|
83
49
|
args: { type: 'json', description: 'Arguments forwarded to a tool; ignored for skills.' },
|
|
84
50
|
},
|
|
85
51
|
output: {
|
|
@@ -157,22 +123,36 @@ export function apply(ctx, config = {}) {
|
|
|
157
123
|
},
|
|
158
124
|
async execute(args, exec) {
|
|
159
125
|
const id = args.id.trim();
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const policy = ctx.get('capabilityPolicy');
|
|
164
|
-
if (policy?.isBlockedCapability(id)) {
|
|
165
|
-
throw new Error(`meta_invoke: capability "${id}" is blocked and cannot be invoked`);
|
|
126
|
+
const kind = args.kind;
|
|
127
|
+
if (kind !== 'tool' && kind !== 'skill') {
|
|
128
|
+
throw new Error('meta_invoke: kind must be "tool" or "skill" (the kind meta_search reported for this id)');
|
|
166
129
|
}
|
|
167
|
-
const capability = ctx.
|
|
130
|
+
const capability = ctx.capability.get(id, kind);
|
|
168
131
|
if (capability === undefined) {
|
|
169
|
-
throw new Error(`meta_invoke: capability "${id}" is
|
|
132
|
+
throw new Error(`meta_invoke: no ${kind} capability "${id}" is available`);
|
|
133
|
+
}
|
|
134
|
+
// Disabled capabilities are a hard deny at the execution surface: the
|
|
135
|
+
// registry keeps them indexed so the management UI can list them, but the
|
|
136
|
+
// model can never reach a disabled capability through meta_invoke.
|
|
137
|
+
const policy = ctx.get('capabilityPolicy');
|
|
138
|
+
if (policy?.isDisabledCapability(id, kind)) {
|
|
139
|
+
throw new Error(`meta_invoke: ${kind} capability "${id}" is disabled and cannot be invoked`);
|
|
170
140
|
}
|
|
171
|
-
// Tool: forward to the underlying MCP server call
|
|
172
|
-
|
|
141
|
+
// Tool: forward to the underlying tool execution (an MCP server call or a
|
|
142
|
+
// harness-native tool cataloged under the built-in server) — or resolve its
|
|
143
|
+
// schema.
|
|
144
|
+
if (capability.kind === 'tool') {
|
|
173
145
|
// Resolve the definition on the GLOBAL view (no agent scope) so a
|
|
174
|
-
//
|
|
175
|
-
|
|
146
|
+
// tool hidden from the caller's exposure (On-demand) is still addressable.
|
|
147
|
+
// Native tools cataloged from a preset standing scope live on the agent
|
|
148
|
+
// plane and are invisible to the global view; for those, fall back to the
|
|
149
|
+
// caller's own view (the agent joining the preset standing mount).
|
|
150
|
+
const native = !capability.name.startsWith(MCP_ID_PREFIX);
|
|
151
|
+
let definition = ctx.tools.get(capability.name);
|
|
152
|
+
const nativeCallerView = native && definition === undefined ? exec.agent : undefined;
|
|
153
|
+
if (definition === undefined && nativeCallerView !== undefined) {
|
|
154
|
+
definition = ctx.tools.get(capability.name, nativeCallerView);
|
|
155
|
+
}
|
|
176
156
|
if (definition === undefined) {
|
|
177
157
|
throw new Error(`meta_invoke: tool "${capability.name}" is not available`);
|
|
178
158
|
}
|
|
@@ -194,17 +174,19 @@ export function apply(ctx, config = {}) {
|
|
|
194
174
|
// this as a transport sub-dispatch so code-mode collapse rules treat it
|
|
195
175
|
// like a nested SDK call, and `tools/result` observers can attribute the
|
|
196
176
|
// outcome to the target capability.
|
|
197
|
-
// Do NOT pass `agent` — `ctx.tools.execute` resolves through
|
|
198
|
-
// caller's `view.visible`, so passing an agent whose projection hid the
|
|
177
|
+
// Do NOT pass `agent` for MCP tools — `ctx.tools.execute` resolves through
|
|
178
|
+
// the caller's `view.visible`, so passing an agent whose projection hid the
|
|
199
179
|
// Progressive tool would surface `UNKNOWN_TOOL`. Executing on the global view
|
|
200
180
|
// keeps Progressive tools runnable; the target tool's own guards still apply
|
|
201
|
-
// (no permission bypass — see README).
|
|
181
|
+
// (no permission bypass — see README). A native tool reachable only through
|
|
182
|
+
// the caller's view does pass that view, mirroring the direct-call surface.
|
|
202
183
|
const result = await ctx.tools.execute({
|
|
203
|
-
callId:
|
|
184
|
+
callId: ToolCallId(`${exec.callId}:meta:${id}`),
|
|
204
185
|
name: capability.name,
|
|
205
186
|
arguments: args.args,
|
|
206
187
|
signal: exec.signal,
|
|
207
188
|
parent: exec.token,
|
|
189
|
+
...nativeCallerView !== undefined ? { agent: nativeCallerView } : {},
|
|
208
190
|
});
|
|
209
191
|
if (result.isError) {
|
|
210
192
|
const message = result.content.map(block => block.type === 'text' ? block.text : `[${block.type} content]`).join('\n');
|
|
@@ -222,10 +204,21 @@ export function apply(ctx, config = {}) {
|
|
|
222
204
|
};
|
|
223
205
|
}
|
|
224
206
|
// Skill: load the full instructions.
|
|
225
|
-
if (capability.kind === 'skill'
|
|
226
|
-
const name =
|
|
207
|
+
if (capability.kind === 'skill') {
|
|
208
|
+
const name = capability.name;
|
|
209
|
+
// Per-session loaded set (see the WeakMap above); undefined when there
|
|
210
|
+
// is no agent context, in which case nothing is deduped.
|
|
211
|
+
const agent = exec.agent;
|
|
212
|
+
let sessionSkills;
|
|
213
|
+
if (agent !== undefined) {
|
|
214
|
+
sessionSkills = loadedSkills.get(agent);
|
|
215
|
+
if (sessionSkills === undefined) {
|
|
216
|
+
sessionSkills = new Set();
|
|
217
|
+
loadedSkills.set(agent, sessionSkills);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
227
220
|
// Already loaded this session → return a short reminder, no re-injection.
|
|
228
|
-
if (
|
|
221
|
+
if (sessionSkills?.has(name) === true) {
|
|
229
222
|
return {
|
|
230
223
|
ok: true,
|
|
231
224
|
kind: 'skill',
|
|
@@ -242,21 +235,14 @@ export function apply(ctx, config = {}) {
|
|
|
242
235
|
signal: exec.signal,
|
|
243
236
|
scope: exec.agent,
|
|
244
237
|
};
|
|
245
|
-
|
|
246
|
-
// Progressive skills are indexed from the independent YAML catalog; they may
|
|
247
|
-
// not be registered in the session skill registry. Fall back to reading
|
|
248
|
-
// the catalog entry's path (or the catalog-provided name lookup) so the
|
|
249
|
-
// full SKILL.md can still be loaded on demand.
|
|
250
|
-
if (skill === undefined) {
|
|
251
|
-
skill = await loadProgressiveSkill(name, capability, exec.signal);
|
|
252
|
-
}
|
|
238
|
+
const skill = await ctx.skills.get(name, lookup).catch(() => undefined);
|
|
253
239
|
if (skill === undefined) {
|
|
254
240
|
throw new Error(`meta_invoke: skill "${name}" is unknown or no longer available`);
|
|
255
241
|
}
|
|
256
242
|
if (!isModelInvocable(skill)) {
|
|
257
243
|
throw new Error(`meta_invoke: skill "${name}" is not available for model invocation`);
|
|
258
244
|
}
|
|
259
|
-
|
|
245
|
+
sessionSkills?.add(name);
|
|
260
246
|
return {
|
|
261
247
|
ok: true,
|
|
262
248
|
kind: 'skill',
|
|
@@ -275,25 +261,11 @@ export function apply(ctx, config = {}) {
|
|
|
275
261
|
return {
|
|
276
262
|
card: 'generic',
|
|
277
263
|
title: `Execute capability ${args.id}`,
|
|
278
|
-
kind: args.
|
|
264
|
+
kind: args.kind === 'skill' ? 'read' : 'other',
|
|
279
265
|
rawInput: args.id,
|
|
280
266
|
};
|
|
281
267
|
},
|
|
282
268
|
});
|
|
283
269
|
ctx.tools.register(tool);
|
|
284
270
|
}
|
|
285
|
-
/**
|
|
286
|
-
* Strip leading YAML frontmatter (`---\n...\n---`) from a raw SKILL.md body,
|
|
287
|
-
* returning the remaining markdown. Falls back to the raw text when no
|
|
288
|
-
* frontmatter delimiter is present.
|
|
289
|
-
*/
|
|
290
|
-
export function stripFrontmatter(markdown) {
|
|
291
|
-
const text = markdown.startsWith('\uFEFF') ? markdown.slice(1) : markdown;
|
|
292
|
-
if (!text.startsWith('---'))
|
|
293
|
-
return text;
|
|
294
|
-
const end = text.indexOf('\n---', 3);
|
|
295
|
-
if (end === -1)
|
|
296
|
-
return text;
|
|
297
|
-
return text.slice(end + 4).replace(/^\n+/, '');
|
|
298
|
-
}
|
|
299
271
|
//# sourceMappingURL=invoke.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoke.js","sourceRoot":"","sources":["../src/invoke.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB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