@lvy-jsd/dsh-tool-manager 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +205 -2
- package/cordis.patch.yml +16 -0
- package/lib/catalog.d.ts +35 -0
- package/lib/catalog.d.ts.map +1 -0
- package/lib/catalog.js +311 -0
- package/lib/catalog.js.map +1 -0
- package/lib/index.d.ts +23 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +588 -0
- package/lib/index.js.map +1 -0
- package/lib/service.d.ts +51 -0
- package/lib/service.d.ts.map +1 -0
- package/lib/service.js +199 -0
- package/lib/service.js.map +1 -0
- package/lib/types.d.ts +317 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +7 -0
- package/lib/types.js.map +1 -0
- package/lib/visibility.d.ts +33 -0
- package/lib/visibility.d.ts.map +1 -0
- package/lib/visibility.js +305 -0
- package/lib/visibility.js.map +1 -0
- package/package.json +50 -4
- package/src/catalog.ts +305 -0
- package/src/index.ts +595 -0
- package/src/service.ts +207 -0
- package/src/types.ts +319 -0
- package/src/visibility.ts +317 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
// dsh-tool-manager: browse every DSH tool as a directory tree
|
|
2
|
+
// (category -> group -> tool) and load tools on demand per agent.
|
|
3
|
+
//
|
|
4
|
+
// Loaded tools are native: the model receives their full parameter schema.
|
|
5
|
+
// Visibility is enforced with the host's per-agent `tools.restrict({ allow })`.
|
|
6
|
+
//
|
|
7
|
+
// The core ships no placement rules: without a classifier plugin every group
|
|
8
|
+
// is `uncategorized`. Placement, metadata, hooks and extra visibility narrowing
|
|
9
|
+
// are provided by other plugins through the `toolCatalog` service.
|
|
10
|
+
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
11
|
+
import { buildCatalog, resolveTarget, toolsUnder, UNCATEGORIZED } from './catalog.js';
|
|
12
|
+
import { createVisibilityController } from './visibility.js';
|
|
13
|
+
import { createRegistries, readManifestAnnotations, listPluginPackages } from './service.js';
|
|
14
|
+
export { buildCatalog, resolveTarget, toolsUnder, estimateTokens, summary, shortName, structuralGroup, DEFAULT_CATEGORIES, UNCATEGORIZED, MISC_GROUP, OVERRIDE_PRIORITY } from './catalog.js';
|
|
15
|
+
export const name = 'tool-manager';
|
|
16
|
+
export const inject = ['tools'];
|
|
17
|
+
export const ENTRY_TOOLS = ['tools_ls', 'tools_load', 'tools_unload'];
|
|
18
|
+
// Always visible and never listed in the directory. Names the host does not
|
|
19
|
+
// have are ignored, so this list survives DSH renames. Config `pinned` adds to
|
|
20
|
+
// it; config `unpin` removes from it.
|
|
21
|
+
export const DEFAULT_PINNED = [
|
|
22
|
+
// DSH core
|
|
23
|
+
'bash', 'read', 'write', 'edit', 'str_replace_editor', 'glob', 'grep', 'read_image',
|
|
24
|
+
'ask_user_question', 'ask_user', 'exit_plan_mode', 'workflow', 'todo_write', 'present', 'skill', 'plan',
|
|
25
|
+
'web_fetch', 'web_search', 'job_list', 'job_output', 'job_kill', 'create_goal', 'get_goal', 'update_goal',
|
|
26
|
+
// delegation
|
|
27
|
+
'subagent', 'subagent_fork', 'list_subagent_models', 'wait_agent', 'interrupt_agent', 'list_agents',
|
|
28
|
+
// memory lookup is small and frequent
|
|
29
|
+
'recall',
|
|
30
|
+
// team chat: a Bot's group prompt tells it to answer through these, so they
|
|
31
|
+
// must never sit behind tools_load
|
|
32
|
+
'group_relay', 'post_to_group', 'read_group_chat', 'read_own_chat', 'message_bot', 'list_bots',
|
|
33
|
+
];
|
|
34
|
+
const TEXT_OUTPUT = {
|
|
35
|
+
schema: { type: 'string' },
|
|
36
|
+
render: (_args, value) => [{ type: 'text', text: String(value) }],
|
|
37
|
+
};
|
|
38
|
+
function fmtTokens(n) {
|
|
39
|
+
return n >= 1000 ? `~${(n / 1000).toFixed(1)}k tok` : `~${n} tok`;
|
|
40
|
+
}
|
|
41
|
+
function pad(text, width) {
|
|
42
|
+
return text.length >= width ? `${text} ` : text + ' '.repeat(width - text.length);
|
|
43
|
+
}
|
|
44
|
+
export function apply(ctx, config = {}) {
|
|
45
|
+
const logger = (typeof ctx.logger === 'function' ? ctx.logger('tool-manager') : ctx.logger) ?? console;
|
|
46
|
+
// Model routes whose tool list is handed to an external client once per
|
|
47
|
+
// session and never refreshed (Claude Code receives DSH tools through an MCP
|
|
48
|
+
// bridge at startup). Narrowing such a session hides tools it can then never
|
|
49
|
+
// load, and the client already lazy-loads schemas itself (ToolSearch), so
|
|
50
|
+
// these agents are left unrestricted. Config `exemptProviders` replaces the
|
|
51
|
+
// default list; [] restricts every route.
|
|
52
|
+
const exemptProviders = new Set(config.exemptProviders ?? ['claude-code']);
|
|
53
|
+
/** The route an agent's next request will use: latest model/selection, else its options. */
|
|
54
|
+
const selectionScan = new WeakMap(); // session -> incremental scan
|
|
55
|
+
function providerOf(agent) {
|
|
56
|
+
const session = agent?.session;
|
|
57
|
+
try {
|
|
58
|
+
if (session && typeof session.eventAt === 'function' && Number.isInteger(session.seq)) {
|
|
59
|
+
const memo = selectionScan.get(session) ?? { seq: 0, provider: undefined };
|
|
60
|
+
for (let seq = memo.seq; seq < session.seq; seq += 1) {
|
|
61
|
+
const event = session.eventAt(seq);
|
|
62
|
+
if (event?.type === 'model/selection' && event.data?.provider)
|
|
63
|
+
memo.provider = event.data.provider;
|
|
64
|
+
}
|
|
65
|
+
memo.seq = session.seq;
|
|
66
|
+
selectionScan.set(session, memo);
|
|
67
|
+
if (memo.provider)
|
|
68
|
+
return memo.provider;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// fall back to the agent's options
|
|
73
|
+
}
|
|
74
|
+
return agent?.options?.provider ?? session?.requestHeader?.()?.provider;
|
|
75
|
+
}
|
|
76
|
+
// High-risk tools can be loaded individually only while at least one risk
|
|
77
|
+
// gate (e.g. dsh-tool-manager-risk-gate) is registered; the gate confirms the
|
|
78
|
+
// load before it executes. With no gate, high-risk loads are refused.
|
|
79
|
+
const riskGates = new Set();
|
|
80
|
+
const pinnedSet = () => {
|
|
81
|
+
const set = new Set([...DEFAULT_PINNED, ...(config.pinned ?? [])]);
|
|
82
|
+
for (const n of config.unpin ?? [])
|
|
83
|
+
set.delete(n);
|
|
84
|
+
for (const n of ENTRY_TOOLS)
|
|
85
|
+
set.add(n);
|
|
86
|
+
return set;
|
|
87
|
+
};
|
|
88
|
+
// --- catalog -----------------------------------------------------------------
|
|
89
|
+
// The directory is built per agent: global tools plus tools registered in the
|
|
90
|
+
// agent's ancestor scopes (its preset). In the DSH web profile most tools
|
|
91
|
+
// live in a preset layer, so a global-only catalog would hide them without
|
|
92
|
+
// listing them. Agents with the same tool set share one cached catalog.
|
|
93
|
+
const catalogs = new Map(); // key (sorted names) -> catalog
|
|
94
|
+
let manifestAnnotations = null;
|
|
95
|
+
const invalidate = () => { catalogs.clear(); };
|
|
96
|
+
const registries = createRegistries(() => {
|
|
97
|
+
invalidate();
|
|
98
|
+
visibility?.refresh();
|
|
99
|
+
});
|
|
100
|
+
function schemaOf(definition, name) {
|
|
101
|
+
try {
|
|
102
|
+
if (typeof ctx.tools.schemaOf === 'function')
|
|
103
|
+
return ctx.tools.schemaOf(definition, false);
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
// fall through to the public fields
|
|
107
|
+
}
|
|
108
|
+
return { name, description: definition.description ?? '', parameters: definition.parameters ?? {} };
|
|
109
|
+
}
|
|
110
|
+
/** Schemas of tools an agent inherits from its ancestor (preset) layers. */
|
|
111
|
+
function inheritedSchemas(agent) {
|
|
112
|
+
const layers = ctx.tools.layers;
|
|
113
|
+
if (!agent || typeof layers?.chainLayers !== 'function')
|
|
114
|
+
return [];
|
|
115
|
+
const own = layers.peek?.(agent);
|
|
116
|
+
const out = [];
|
|
117
|
+
for (const layer of layers.chainLayers(agent)) {
|
|
118
|
+
if (layer === own)
|
|
119
|
+
continue;
|
|
120
|
+
for (const [name, definition] of layer.tools.entries())
|
|
121
|
+
out.push(schemaOf(definition, name));
|
|
122
|
+
}
|
|
123
|
+
return out;
|
|
124
|
+
}
|
|
125
|
+
/** Catalog for one agent, or for the union of all live agents when omitted. */
|
|
126
|
+
const getCatalog = (agent) => {
|
|
127
|
+
const pinned = pinnedSet();
|
|
128
|
+
const byName = new Map(ctx.tools.schemas().map((s) => [s.name, s]));
|
|
129
|
+
for (const a of agent ? [agent] : visibility.agents()) {
|
|
130
|
+
for (const s of inheritedSchemas(a))
|
|
131
|
+
if (!byName.has(s.name))
|
|
132
|
+
byName.set(s.name, s);
|
|
133
|
+
}
|
|
134
|
+
const schemas = [...byName.values()].filter((s) => !pinned.has(s.name));
|
|
135
|
+
const key = schemas.map((s) => s.name).sort().join('\n');
|
|
136
|
+
const cached = catalogs.get(key);
|
|
137
|
+
if (cached)
|
|
138
|
+
return cached;
|
|
139
|
+
ctx.emit('tool-catalog/before-rebuild', {});
|
|
140
|
+
manifestAnnotations ??= readManifestAnnotations(ctx, logger);
|
|
141
|
+
const catalog = buildCatalog(schemas, {
|
|
142
|
+
classifiers: [...registries.classifiers],
|
|
143
|
+
// Package declarations first, runtime annotate() after, so runtime wins.
|
|
144
|
+
annotations: [...manifestAnnotations, ...registries.annotations],
|
|
145
|
+
categories: Object.fromEntries(registries.categories),
|
|
146
|
+
highRisk: config.highRisk ?? [],
|
|
147
|
+
});
|
|
148
|
+
catalogs.set(key, catalog);
|
|
149
|
+
ctx.emit('tool-catalog/after-rebuild', { catalog });
|
|
150
|
+
return catalog;
|
|
151
|
+
};
|
|
152
|
+
const visibility = createVisibilityController(ctx, {
|
|
153
|
+
pinned: () => [...pinnedSet()],
|
|
154
|
+
entryTools: ENTRY_TOOLS,
|
|
155
|
+
getFilters: () => [...registries.filters],
|
|
156
|
+
getCatalog,
|
|
157
|
+
// The catalog is rebuilt lazily after any registry change.
|
|
158
|
+
invalidate,
|
|
159
|
+
onStateChange: (agent, state) => ctx.emit('tool-catalog/state-changed', { agent, state }),
|
|
160
|
+
isExempt: (agent) => {
|
|
161
|
+
const provider = providerOf(agent);
|
|
162
|
+
return provider !== undefined && exemptProviders.has(provider);
|
|
163
|
+
},
|
|
164
|
+
logger,
|
|
165
|
+
});
|
|
166
|
+
if (typeof ctx.inject === 'function') {
|
|
167
|
+
ctx.inject(['agents'], (agentCtx) => {
|
|
168
|
+
agentCtx.effect(() => visibility.mount(agentCtx), 'tool-manager.visibility()');
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
logger.warn?.('tool-manager: host has no ctx.inject; per-agent visibility is disabled');
|
|
173
|
+
}
|
|
174
|
+
ctx.effect(() => () => visibility.dispose(), 'tool-manager.dispose()');
|
|
175
|
+
// Rescue a direct call of a hidden tool (see rescueHiddenCall). Runs before
|
|
176
|
+
// dispatch resolves the name, so loading here makes the call succeed.
|
|
177
|
+
ctx.effect(() => ctx.on('tools/pre-execute', async (exec, next) => {
|
|
178
|
+
const agent = exec?.agent;
|
|
179
|
+
if (!agent || pinnedSet().has(exec.name) || ENTRY_TOOLS.includes(exec.name))
|
|
180
|
+
return next();
|
|
181
|
+
const refusal = await rescueHiddenCall(agent, exec.name);
|
|
182
|
+
if (refusal !== undefined)
|
|
183
|
+
return { kind: 'deny', reason: refusal };
|
|
184
|
+
return next();
|
|
185
|
+
}), 'tool-manager.rescue-hidden-call()');
|
|
186
|
+
// --- the toolCatalog service ---------------------------------------------------
|
|
187
|
+
const service = {
|
|
188
|
+
registerClassifier: registries.registerClassifier,
|
|
189
|
+
annotate: registries.annotate,
|
|
190
|
+
defineCategory: registries.defineCategory,
|
|
191
|
+
registerVisibilityFilter: registries.registerVisibilityFilter,
|
|
192
|
+
/**
|
|
193
|
+
* Own a target prefix (`"cap:"`) in tools_load / tools_ls / tools_unload.
|
|
194
|
+
* `resolve(target)` returns one or more ordinary targets to resolve
|
|
195
|
+
* instead, or undefined to pass. Returns a disposer.
|
|
196
|
+
*/
|
|
197
|
+
registerTargetResolver: registries.registerTargetResolver,
|
|
198
|
+
/**
|
|
199
|
+
* Let loaded state outlive the process (DSH restart). `load(agent)` returns
|
|
200
|
+
* a serialized state or null, `save(agent, state)` receives plain JSON.
|
|
201
|
+
* Returns a disposer. See dsh-tool-manager-persist.
|
|
202
|
+
*/
|
|
203
|
+
registerStateProvider: visibility.registerStateProvider,
|
|
204
|
+
/**
|
|
205
|
+
* Declare that a plugin confirms high-risk loads (normally by returning
|
|
206
|
+
* {kind:'ask'} from tools/pre-execute for tools_load). Returns a disposer.
|
|
207
|
+
*/
|
|
208
|
+
registerRiskGate(gate = {}) {
|
|
209
|
+
const entry = { name: gate.name ?? 'anonymous' };
|
|
210
|
+
riskGates.add(entry);
|
|
211
|
+
return () => { riskGates.delete(entry); };
|
|
212
|
+
},
|
|
213
|
+
riskGates: () => [...riskGates].map((g) => g.name),
|
|
214
|
+
/** Re-read package declarations and rebuild. */
|
|
215
|
+
refresh() {
|
|
216
|
+
manifestAnnotations = null;
|
|
217
|
+
invalidate();
|
|
218
|
+
visibility.refresh();
|
|
219
|
+
},
|
|
220
|
+
/** Catalog as one agent sees it, or the union over live agents. */
|
|
221
|
+
get: (agent) => getCatalog(agent),
|
|
222
|
+
resolve: (target, agent) => resolveTarget(getCatalog(agent), target, [...registries.resolvers]),
|
|
223
|
+
/** Loaded state of one agent: { loaded, groups, excluded, handoffGroups, handoffTools } (Sets). */
|
|
224
|
+
stateOf: (agent) => visibility.stateOf(agent),
|
|
225
|
+
/** Plain JSON of an agent's loaded state, for persistence plugins. */
|
|
226
|
+
exportState: (agent) => visibility.exportState(agent),
|
|
227
|
+
/** Replace an agent's loaded state (e.g. restored after a restart). */
|
|
228
|
+
importState: (agent, state) => visibility.importState(agent, state),
|
|
229
|
+
allowFor: (agent) => visibility.allowFor(agent),
|
|
230
|
+
/** True when the agent's model route is in `exemptProviders` (never narrowed). */
|
|
231
|
+
isExempt: (agent) => visibility.isExempt(agent),
|
|
232
|
+
/**
|
|
233
|
+
* Load/unload on behalf of an agent, through the same path as the entry
|
|
234
|
+
* tools (hooks, vetoes, risk gates and persistence all apply). Returns the
|
|
235
|
+
* same text the model would see. Intended for UI plugins such as
|
|
236
|
+
* dsh-tool-manager-panel.
|
|
237
|
+
*/
|
|
238
|
+
load: (agent, targets, options) => loadTargets(agent, targets, options),
|
|
239
|
+
unload: (agent, targets) => unloadTargets(agent, targets),
|
|
240
|
+
/** Live agents, each with its parent when it is a subagent. */
|
|
241
|
+
agents: () => {
|
|
242
|
+
// The parent lookup goes through the injected agents API: the plugin ctx
|
|
243
|
+
// itself does not inject `agents`, and reading it there throws.
|
|
244
|
+
return visibility.agents().map((agent) => {
|
|
245
|
+
const parent = visibility.parentOf(agent);
|
|
246
|
+
return { agent, id: String(agent.id), parentId: parent ? String(parent.id) : null };
|
|
247
|
+
});
|
|
248
|
+
},
|
|
249
|
+
/** Effective configuration, for UI display. */
|
|
250
|
+
config: () => ({
|
|
251
|
+
pinned: [...pinnedSet()],
|
|
252
|
+
entryTools: [...ENTRY_TOOLS],
|
|
253
|
+
extraPinned: config.pinned ?? [],
|
|
254
|
+
unpinned: config.unpin ?? [],
|
|
255
|
+
highRisk: config.highRisk ?? [],
|
|
256
|
+
}),
|
|
257
|
+
/** Enabled plugin packages on this host: `{ name, dir, manifest }[]`. */
|
|
258
|
+
packages: () => listPluginPackages(ctx),
|
|
259
|
+
/** Registered extension points, so a UI can show what is active. */
|
|
260
|
+
extensions: () => ({
|
|
261
|
+
classifiers: [...registries.classifiers].map((c) => ({ name: c.name, priority: c.priority ?? 0 })),
|
|
262
|
+
filters: [...registries.filters].map((f) => f.name),
|
|
263
|
+
annotations: registries.annotations.map((a) => ({ source: a.source, match: String(a.match) })),
|
|
264
|
+
categories: [...registries.categories.keys()],
|
|
265
|
+
riskGates: [...riskGates].map((g) => g.name),
|
|
266
|
+
stateProviders: visibility.stateProviders(),
|
|
267
|
+
}),
|
|
268
|
+
/**
|
|
269
|
+
* Structured cross-directory search for UIs: the same matching rules as
|
|
270
|
+
* tools_ls(query), returned as data instead of text.
|
|
271
|
+
*/
|
|
272
|
+
find: (query, path = '/') => {
|
|
273
|
+
const cat = getCatalog();
|
|
274
|
+
const node = resolveTarget(cat, path, [...registries.resolvers]);
|
|
275
|
+
if (node.kind === 'missing')
|
|
276
|
+
return [];
|
|
277
|
+
return matchingTools(cat, node, query).slice(0, 200).map((tool) => ({
|
|
278
|
+
name: tool.name,
|
|
279
|
+
short: tool.short,
|
|
280
|
+
path: `/${tool.category}/${tool.group}/${tool.short}`,
|
|
281
|
+
category: tool.category,
|
|
282
|
+
group: tool.group,
|
|
283
|
+
summary: tool.summary,
|
|
284
|
+
tokens: tool.tokens,
|
|
285
|
+
highRisk: tool.highRisk === true,
|
|
286
|
+
}));
|
|
287
|
+
},
|
|
288
|
+
/** Schema tokens actually sent for an agent: pinned tools plus its loaded set. */
|
|
289
|
+
wireTokens: (agent) => {
|
|
290
|
+
const visible = new Set(visibility.allowFor(agent) ?? []);
|
|
291
|
+
const cat = getCatalog(agent);
|
|
292
|
+
let tokens = 0;
|
|
293
|
+
for (const schema of ctx.tools.schemas(agent)) {
|
|
294
|
+
if (!visible.has(schema.name))
|
|
295
|
+
continue;
|
|
296
|
+
tokens += cat.tools.get(schema.name)?.tokens ?? 0;
|
|
297
|
+
}
|
|
298
|
+
return tokens;
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
ctx.provide('toolCatalog', service);
|
|
302
|
+
// --- direct calls of a hidden tool -----------------------------------------------
|
|
303
|
+
//
|
|
304
|
+
// A tool this plugin hid is still a registered tool: the model may call it by
|
|
305
|
+
// name, and the host would answer "unknown tool" — which reads like a broken
|
|
306
|
+
// plugin and, for a protocol tool a plugin's own prompt tells the model to
|
|
307
|
+
// use, breaks the feature outright (a group Bot replying through group_relay,
|
|
308
|
+
// for instance).
|
|
309
|
+
//
|
|
310
|
+
// So a direct call of a hidden tool is handled here, before dispatch:
|
|
311
|
+
// - an ordinary tool is loaded on the spot and the call proceeds;
|
|
312
|
+
// - a high-risk tool is refused with the exact load instruction, so it still
|
|
313
|
+
// has to go through the risk gate and its approval.
|
|
314
|
+
// The cost is a few tokens when the model skips the directory; the benefit is
|
|
315
|
+
// that forgetting to pin a protocol tool degrades instead of breaking.
|
|
316
|
+
async function rescueHiddenCall(agent, name) {
|
|
317
|
+
// allowFor() is null for an agent this plugin does not track (and for one
|
|
318
|
+
// whose context cannot restrict at all): nothing to rescue there.
|
|
319
|
+
if (visibility.allowFor(agent) === null)
|
|
320
|
+
return undefined;
|
|
321
|
+
const state = visibility.stateOf(agent);
|
|
322
|
+
if (state.loaded.has(name))
|
|
323
|
+
return undefined;
|
|
324
|
+
// Only tools this plugin manages: pinned tools and entry tools are always
|
|
325
|
+
// visible, and anything else is hidden by the host or another plugin, which
|
|
326
|
+
// is not ours to override.
|
|
327
|
+
const catalog = getCatalog(agent);
|
|
328
|
+
const tool = catalog.tools.get(name);
|
|
329
|
+
if (!tool)
|
|
330
|
+
return undefined;
|
|
331
|
+
if (tool.highRisk) {
|
|
332
|
+
return `"${name}" is high risk and is not loaded. Load it first with tools_load(["${name}"]), which asks for approval.`;
|
|
333
|
+
}
|
|
334
|
+
// An auto-load is still a load: a before-load veto must stop it too.
|
|
335
|
+
try {
|
|
336
|
+
await ctx.serial('tool-catalog/before-load', { agent, targets: [name], names: [name], rescue: true });
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
return `Load of "${name}" refused: ${errorText(error)}`;
|
|
340
|
+
}
|
|
341
|
+
visibility.update(agent, (next) => {
|
|
342
|
+
next.loaded.add(name);
|
|
343
|
+
next.excluded.delete(name);
|
|
344
|
+
});
|
|
345
|
+
// A visibility filter (or a connector deny) may still keep it out; say so
|
|
346
|
+
// rather than letting the host report an unknown tool.
|
|
347
|
+
if (!(visibility.allowFor(agent) ?? []).includes(name)) {
|
|
348
|
+
// Undo the load, or a tool the session cannot see would sit in its state
|
|
349
|
+
// (and be persisted) as if it had been loaded.
|
|
350
|
+
visibility.update(agent, (next) => { next.loaded.delete(name); });
|
|
351
|
+
return `"${name}" is not available in this session. Use tools_ls to see what is.`;
|
|
352
|
+
}
|
|
353
|
+
ctx.emit('tool-catalog/auto-loaded', { agent, name });
|
|
354
|
+
return undefined;
|
|
355
|
+
}
|
|
356
|
+
// --- listing -------------------------------------------------------------------
|
|
357
|
+
function visibleSetFor(agent) {
|
|
358
|
+
const allow = agent ? visibility.allowFor(agent) : null;
|
|
359
|
+
return allow ? new Set(allow) : null;
|
|
360
|
+
}
|
|
361
|
+
function toolLine(tool, visible, withPath = false) {
|
|
362
|
+
const marks = `${visible?.has(tool.name) ? '*' : ' '}${tool.highRisk ? '!' : ' '}`;
|
|
363
|
+
const label = withPath ? `/${tool.category}/${tool.group}/${tool.short}` : tool.short;
|
|
364
|
+
return ` ${marks} ${pad(label, withPath ? 48 : 34)}${pad(fmtTokens(tool.tokens), 11)}${tool.summary}`;
|
|
365
|
+
}
|
|
366
|
+
function listing(cat, node, visible) {
|
|
367
|
+
const count = (tools) => ({
|
|
368
|
+
n: tools.length,
|
|
369
|
+
loaded: tools.filter((t) => visible?.has(t.name)).length,
|
|
370
|
+
tokens: tools.reduce((s, t) => s + t.tokens, 0),
|
|
371
|
+
});
|
|
372
|
+
const lines = [];
|
|
373
|
+
if (node.kind === 'root') {
|
|
374
|
+
lines.push('/ (categories; * = loaded, ! = high risk; tools_ls with query searches everything)');
|
|
375
|
+
for (const category of cat.categories.values()) {
|
|
376
|
+
const c = count(category.groups.flatMap((g) => g.tools));
|
|
377
|
+
if (c.n === 0 && category.name !== UNCATEGORIZED)
|
|
378
|
+
continue;
|
|
379
|
+
lines.push(` ${pad(`${category.name}/`, 16)}${pad(`${c.n} tools`, 10)}${pad(`${c.loaded} loaded`, 11)}${pad(fmtTokens(c.tokens), 11)}${category.description}`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
else if (node.kind === 'category') {
|
|
383
|
+
lines.push(`/${node.category.name}/ ${node.category.description}`);
|
|
384
|
+
for (const group of node.category.groups) {
|
|
385
|
+
const c = count(group.tools);
|
|
386
|
+
lines.push(` ${pad(`${group.name}/`, 22)}${pad(`${c.n} tools`, 10)}${pad(`${c.loaded} loaded`, 11)}${fmtTokens(c.tokens)}`);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
else if (node.kind === 'group') {
|
|
390
|
+
lines.push(`/${node.group.category}/${node.group.name}/`);
|
|
391
|
+
for (const tool of node.group.tools)
|
|
392
|
+
lines.push(toolLine(tool, visible));
|
|
393
|
+
}
|
|
394
|
+
else if (node.kind === 'tool') {
|
|
395
|
+
const t = node.tool;
|
|
396
|
+
lines.push(`/${t.category}/${t.group}/${t.short}`, ` name: ${t.name}`, ` ${t.summary}`, ` schema ${fmtTokens(t.tokens)}${t.highRisk ? ' · high risk: load it on its own' : ''}${visible?.has(t.name) ? ' · loaded' : ''}`);
|
|
397
|
+
}
|
|
398
|
+
return lines.join('\n');
|
|
399
|
+
}
|
|
400
|
+
/** Tools under `node` matching every word of `query` (name, group, category, description). */
|
|
401
|
+
function matchingTools(cat, node, query) {
|
|
402
|
+
const words = String(query ?? '').toLowerCase().split(/\s+/).filter(Boolean);
|
|
403
|
+
if (!words.length)
|
|
404
|
+
return [];
|
|
405
|
+
return toolsUnder(cat, node).filter((t) => {
|
|
406
|
+
const hay = `${t.name} ${t.group} ${t.category} ${t.description}`.toLowerCase();
|
|
407
|
+
return words.every((w) => hay.includes(w));
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
function search(cat, node, query, visible) {
|
|
411
|
+
const hits = matchingTools(cat, node, query);
|
|
412
|
+
if (!hits.length)
|
|
413
|
+
return `No tools match "${query}".`;
|
|
414
|
+
const shown = hits.slice(0, 40);
|
|
415
|
+
return [`${hits.length} match(es) for "${query}" (load by path or full name):`, ...shown.map((t) => toolLine(t, visible, true)), hits.length > shown.length ? ` … ${hits.length - shown.length} more; narrow the query or the path` : ''].filter(Boolean).join('\n');
|
|
416
|
+
}
|
|
417
|
+
function agentOf(exec) {
|
|
418
|
+
if (!exec?.agent)
|
|
419
|
+
throw new Error('tool-manager: this tool must be called by an agent');
|
|
420
|
+
return exec.agent;
|
|
421
|
+
}
|
|
422
|
+
// --- load / unload (shared by the entry tools and the toolCatalog service) -------
|
|
423
|
+
/**
|
|
424
|
+
* Subscribe an agent to targets. Runs the before-load hook (which may veto) and
|
|
425
|
+
* returns the model-facing text; the panel calls this same path, so hooks
|
|
426
|
+
* apply identically; risk-gate approval does not, since a panel click is
|
|
427
|
+
* itself the user's consent.
|
|
428
|
+
*/
|
|
429
|
+
async function loadTargets(agent, targets, { forSubagents = false } = {}) {
|
|
430
|
+
const cat = getCatalog(agent);
|
|
431
|
+
const nodes = targets.map((raw) => ({ raw, node: resolveTarget(cat, raw, [...registries.resolvers]) }));
|
|
432
|
+
const names = nodes.flatMap(({ node }) => (node.kind === 'root' || node.kind === 'missing' ? [] : toolsUnder(cat, node).map((t) => t.name)));
|
|
433
|
+
try {
|
|
434
|
+
await ctx.serial('tool-catalog/before-load', { agent, targets, names });
|
|
435
|
+
}
|
|
436
|
+
catch (error) {
|
|
437
|
+
return `Load refused: ${errorText(error)}`;
|
|
438
|
+
}
|
|
439
|
+
const before = new Set(visibility.allowFor(agent) ?? []);
|
|
440
|
+
const notes = [];
|
|
441
|
+
visibility.update(agent, (state) => {
|
|
442
|
+
for (const { raw, node } of nodes) {
|
|
443
|
+
if (node.kind === 'missing' || node.kind === 'root') {
|
|
444
|
+
notes.push(`skipped ${raw}: ${node.kind === 'root' ? 'cannot load the whole tree' : 'not found (try tools_ls with query)'}`);
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
// An alias (e.g. a capability pack) names exact tools: add those, never
|
|
448
|
+
// the whole group they happen to live in.
|
|
449
|
+
if (node.kind === 'category' && node.category.aliasTools) {
|
|
450
|
+
for (const tool of node.category.aliasTools) {
|
|
451
|
+
if (tool.highRisk && riskGates.size === 0) {
|
|
452
|
+
notes.push(`${tool.name} is high risk and no risk gate is installed to confirm it; not loaded`);
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
state.loaded.add(tool.name);
|
|
456
|
+
state.excluded.delete(tool.name);
|
|
457
|
+
if (forSubagents)
|
|
458
|
+
state.handoffTools.add(tool.name);
|
|
459
|
+
}
|
|
460
|
+
continue;
|
|
461
|
+
}
|
|
462
|
+
const groups = node.kind === 'category' ? node.category.groups : node.kind === 'group' ? [node.group] : [];
|
|
463
|
+
for (const group of groups) {
|
|
464
|
+
state.groups.add(group.name);
|
|
465
|
+
if (forSubagents)
|
|
466
|
+
state.handoffGroups.add(group.name);
|
|
467
|
+
for (const tool of group.tools)
|
|
468
|
+
state.excluded.delete(tool.name);
|
|
469
|
+
const risky = group.tools.filter((t) => t.highRisk).map((t) => t.short);
|
|
470
|
+
if (risky.length)
|
|
471
|
+
notes.push(`${group.name}: high-risk tools not included (${risky.join(', ')}); load them one by one`);
|
|
472
|
+
}
|
|
473
|
+
if (node.kind === 'tool') {
|
|
474
|
+
if (node.tool.highRisk && riskGates.size === 0) {
|
|
475
|
+
notes.push(`${node.tool.name} is high risk and no risk gate is installed to confirm it; not loaded`);
|
|
476
|
+
continue;
|
|
477
|
+
}
|
|
478
|
+
state.loaded.add(node.tool.name);
|
|
479
|
+
state.excluded.delete(node.tool.name);
|
|
480
|
+
if (forSubagents)
|
|
481
|
+
state.handoffTools.add(node.tool.name);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
const after = visibility.allowFor(agent) ?? [];
|
|
486
|
+
const added = after.filter((n) => !before.has(n));
|
|
487
|
+
ctx.emit('tool-catalog/after-load', { agent, targets, added });
|
|
488
|
+
const tokens = added.reduce((sum, n) => sum + (cat.tools.get(n)?.tokens ?? 0), 0);
|
|
489
|
+
return [
|
|
490
|
+
added.length ? `Loaded ${added.length} tool(s), ${fmtTokens(tokens)}; callable from your next step:` : 'Nothing new loaded.',
|
|
491
|
+
...added.map((n) => ` ${n}`),
|
|
492
|
+
...notes,
|
|
493
|
+
].join('\n');
|
|
494
|
+
}
|
|
495
|
+
/** Hide targets again. Returns the model-facing text. */
|
|
496
|
+
async function unloadTargets(agent, targets) {
|
|
497
|
+
const cat = getCatalog(agent);
|
|
498
|
+
try {
|
|
499
|
+
await ctx.serial('tool-catalog/before-unload', { agent, targets });
|
|
500
|
+
}
|
|
501
|
+
catch (error) {
|
|
502
|
+
return `Unload refused: ${errorText(error)}`;
|
|
503
|
+
}
|
|
504
|
+
const before = new Set(visibility.allowFor(agent) ?? []);
|
|
505
|
+
visibility.update(agent, (state) => {
|
|
506
|
+
for (const raw of targets) {
|
|
507
|
+
if (String(raw).trim().toLowerCase() === 'all') {
|
|
508
|
+
for (const set of Object.values(state))
|
|
509
|
+
set.clear();
|
|
510
|
+
continue;
|
|
511
|
+
}
|
|
512
|
+
const node = resolveTarget(cat, raw, [...registries.resolvers]);
|
|
513
|
+
if (node.kind === 'category' && node.category.aliasTools) {
|
|
514
|
+
for (const tool of node.category.aliasTools) {
|
|
515
|
+
state.loaded.delete(tool.name);
|
|
516
|
+
state.handoffTools.delete(tool.name);
|
|
517
|
+
}
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
const groups = node.kind === 'category' ? node.category.groups : node.kind === 'group' ? [node.group] : [];
|
|
521
|
+
for (const group of groups) {
|
|
522
|
+
state.groups.delete(group.name);
|
|
523
|
+
state.handoffGroups.delete(group.name);
|
|
524
|
+
for (const tool of group.tools)
|
|
525
|
+
state.loaded.delete(tool.name);
|
|
526
|
+
}
|
|
527
|
+
if (node.kind === 'tool') {
|
|
528
|
+
state.loaded.delete(node.tool.name);
|
|
529
|
+
state.handoffTools.delete(node.tool.name);
|
|
530
|
+
if (state.groups.has(node.tool.group))
|
|
531
|
+
state.excluded.add(node.tool.name);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
const after = new Set(visibility.allowFor(agent) ?? []);
|
|
536
|
+
const removed = [...before].filter((n) => !after.has(n));
|
|
537
|
+
ctx.emit('tool-catalog/after-unload', { agent, targets, removed });
|
|
538
|
+
return removed.length ? `Unloaded ${removed.length} tool(s):\n${removed.map((n) => ` ${n}`).join('\n')}` : 'Nothing was unloaded.';
|
|
539
|
+
}
|
|
540
|
+
// --- tools -----------------------------------------------------------------------
|
|
541
|
+
ctx.tools.register(defineTool({
|
|
542
|
+
name: 'tools_ls',
|
|
543
|
+
description: 'Browse every available tool as a directory: / lists categories, /<category> lists groups (a connector or plugin), /<category>/<group> lists tools with a one-line summary and schema size. Tools marked * are loaded (callable now). Most tools are hidden until loaded with tools_load. Pass query to search names and descriptions across the whole tree (or under path) in one step.',
|
|
544
|
+
parameters: {
|
|
545
|
+
path: { type: 'string', description: 'Directory path such as "/", "/code", "/code/github", or a group or tool name. Default "/".' },
|
|
546
|
+
query: { type: 'string', description: 'Search words matched against tool name, group, category and description; searches everything under path.' },
|
|
547
|
+
},
|
|
548
|
+
output: TEXT_OUTPUT,
|
|
549
|
+
isConcurrencySafe: () => true,
|
|
550
|
+
async execute(args, exec) {
|
|
551
|
+
const cat = getCatalog(exec?.agent);
|
|
552
|
+
const node = resolveTarget(cat, args.path ?? '/', [...registries.resolvers]);
|
|
553
|
+
if (node.kind === 'missing')
|
|
554
|
+
return `No such path: ${node.target}. Start from tools_ls("/") or search with tools_ls({query}).`;
|
|
555
|
+
const visible = visibleSetFor(exec?.agent);
|
|
556
|
+
return args.query ? search(cat, node, args.query, visible) : listing(cat, node, visible);
|
|
557
|
+
},
|
|
558
|
+
}));
|
|
559
|
+
ctx.tools.register(defineTool({
|
|
560
|
+
name: 'tools_load',
|
|
561
|
+
description: 'Make tools callable for the rest of this session. Each target is a group path ("/code/github"), a category ("/maps"), or one tool by path or exact name ("mcp__github__get_file_contents"). Loading a group also includes tools the group gains later. Prefer one group load over many single tools. Loaded tools are available from your next step. Set forSubagents to also hand these targets to subagents you start afterwards.',
|
|
562
|
+
parameters: {
|
|
563
|
+
targets: { type: 'array', items: { type: 'string' }, required: true, description: 'Paths, group names or exact tool names.' },
|
|
564
|
+
forSubagents: { type: 'boolean', description: 'Also give these targets to subagents started from now on.' },
|
|
565
|
+
},
|
|
566
|
+
output: TEXT_OUTPUT,
|
|
567
|
+
async execute(args, exec) {
|
|
568
|
+
return loadTargets(agentOf(exec), args.targets ?? [], { forSubagents: args.forSubagents === true });
|
|
569
|
+
},
|
|
570
|
+
}));
|
|
571
|
+
ctx.tools.register(defineTool({
|
|
572
|
+
name: 'tools_unload',
|
|
573
|
+
description: 'Hide loaded tools again to keep context small. Targets use the same forms as tools_load; "all" returns to the always-on set. Always-on tools cannot be unloaded.',
|
|
574
|
+
parameters: {
|
|
575
|
+
targets: { type: 'array', items: { type: 'string' }, required: true, description: 'Paths, group names, exact tool names, or "all".' },
|
|
576
|
+
},
|
|
577
|
+
output: TEXT_OUTPUT,
|
|
578
|
+
async execute(args, exec) {
|
|
579
|
+
return unloadTargets(agentOf(exec), args.targets ?? []);
|
|
580
|
+
},
|
|
581
|
+
}));
|
|
582
|
+
}
|
|
583
|
+
/** The message of a thrown value, whatever was thrown. */
|
|
584
|
+
function errorText(error) {
|
|
585
|
+
return String(error?.message ?? error);
|
|
586
|
+
}
|
|
587
|
+
export default { name, inject, apply };
|
|
588
|
+
//# 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,8DAA8D;AAC9D,kEAAkE;AAClE,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,mEAAmE;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;A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