@dexto/agent-management 1.7.2 → 1.8.1
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/dist/agent-creation.cjs +6 -2
- package/dist/agent-creation.d.ts.map +1 -1
- package/dist/agent-creation.js +6 -2
- package/dist/config/config-enrichment.cjs +1 -16
- package/dist/config/config-enrichment.d.ts.map +1 -1
- package/dist/config/config-enrichment.js +2 -21
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/models/model-picker-state.cjs +2 -2
- package/dist/models/model-picker-state.d.ts +1 -1
- package/dist/models/model-picker-state.d.ts.map +1 -1
- package/dist/models/model-picker-state.js +1 -1
- package/dist/plugins/discover-skills.d.ts +2 -3
- package/dist/plugins/discover-skills.d.ts.map +1 -1
- package/dist/plugins/index.cjs +6 -0
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/local-skill-source.cjs +104 -0
- package/dist/plugins/local-skill-source.d.ts +20 -0
- package/dist/plugins/local-skill-source.d.ts.map +1 -0
- package/dist/plugins/local-skill-source.js +70 -0
- package/dist/plugins/local-skill-sources.cjs +74 -0
- package/dist/plugins/local-skill-sources.d.ts +7 -0
- package/dist/plugins/local-skill-sources.d.ts.map +1 -0
- package/dist/plugins/local-skill-sources.js +40 -0
- package/dist/plugins/types.d.ts +1 -1
- package/dist/preferences/loader.d.ts +1 -1
- package/dist/preferences/loader.d.ts.map +1 -1
- package/dist/preferences/schemas.cjs +8 -7
- package/dist/preferences/schemas.d.ts.map +1 -1
- package/dist/preferences/schemas.js +3 -5
- package/dist/tool-factories/agent-spawner/factory.cjs +2 -4
- package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/factory.js +2 -4
- package/dist/tool-factories/agent-spawner/llm-resolution.cjs +3 -3
- package/dist/tool-factories/agent-spawner/llm-resolution.js +1 -1
- package/dist/tool-factories/agent-spawner/runtime.cjs +8 -12
- package/dist/tool-factories/agent-spawner/runtime.d.ts +3 -3
- package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/runtime.js +6 -15
- package/dist/tool-factories/agent-spawner/schemas.d.ts +1 -1
- package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -1
- package/dist/tool-factories/creator-tools/factory.cjs +49 -146
- package/dist/tool-factories/creator-tools/factory.d.ts.map +1 -1
- package/dist/tool-factories/creator-tools/factory.js +50 -148
- package/dist/utils/api-key-resolver.d.ts +1 -1
- package/dist/utils/api-key-resolver.d.ts.map +1 -1
- package/dist/utils/api-key-store.cjs +2 -2
- package/dist/utils/api-key-store.d.ts +1 -1
- package/dist/utils/api-key-store.d.ts.map +1 -1
- package/dist/utils/api-key-store.js +1 -1
- package/dist/writer.d.ts +1 -1
- package/dist/writer.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { promises as fs } from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { parse as yamlParse } from "yaml";
|
|
4
3
|
import {
|
|
5
4
|
ToolError,
|
|
6
5
|
defineTool,
|
|
7
|
-
assertValidPromptName
|
|
8
|
-
loadBundledMcpConfigFromDirectory
|
|
6
|
+
assertValidPromptName
|
|
9
7
|
} from "@dexto/core";
|
|
10
8
|
import { discoverStandaloneSkills, getSkillSearchPaths } from "../../plugins/discover-skills.js";
|
|
11
9
|
import {
|
|
@@ -18,8 +16,6 @@ const SkillCreateInputSchema = z.object({
|
|
|
18
16
|
id: z.string().min(1).describe("Skill id (kebab-case)."),
|
|
19
17
|
description: z.string().min(1).describe("Short description of what the skill does."),
|
|
20
18
|
content: z.string().min(1).describe("Skill body (markdown) without frontmatter."),
|
|
21
|
-
allowedTools: z.array(z.string().min(1)).optional().describe("Optional allowed-tools list for the skill frontmatter."),
|
|
22
|
-
toolkits: z.array(z.string().min(1)).optional().describe("Optional toolkits list for the skill frontmatter."),
|
|
23
19
|
scope: z.enum(["global", "workspace"]).optional(),
|
|
24
20
|
overwrite: z.boolean().optional()
|
|
25
21
|
}).strict();
|
|
@@ -27,8 +23,6 @@ const SkillUpdateInputSchema = z.object({
|
|
|
27
23
|
id: z.string().min(1),
|
|
28
24
|
content: z.string().min(1).describe("New SKILL.md body (markdown) without frontmatter."),
|
|
29
25
|
description: z.string().min(1).optional(),
|
|
30
|
-
allowedTools: z.array(z.string().min(1)).optional().describe("Optional allowed-tools list for the skill frontmatter."),
|
|
31
|
-
toolkits: z.array(z.string().min(1)).optional().describe("Optional toolkits list for the skill frontmatter."),
|
|
32
26
|
scope: z.enum(["global", "workspace"]).optional()
|
|
33
27
|
}).strict();
|
|
34
28
|
const SkillListInputSchema = z.object({
|
|
@@ -60,8 +54,8 @@ function matchesSkillQuery(value, query) {
|
|
|
60
54
|
if (!normalizedQuery) return false;
|
|
61
55
|
return normalizeSkillQuery(value).includes(normalizedQuery);
|
|
62
56
|
}
|
|
63
|
-
function
|
|
64
|
-
return info.displayName || info.
|
|
57
|
+
function resolveSkillName(info) {
|
|
58
|
+
return info.displayName || info.id;
|
|
65
59
|
}
|
|
66
60
|
function resolveWorkspaceBasePath(context) {
|
|
67
61
|
const workspacePath = context.workspace?.path;
|
|
@@ -76,25 +70,6 @@ function resolveWorkspaceSkillDirs(context) {
|
|
|
76
70
|
legacy: path.join(base, ".dexto", "skills")
|
|
77
71
|
};
|
|
78
72
|
}
|
|
79
|
-
function findRegisteredSkillFile(skillId, context) {
|
|
80
|
-
const prompts = context.agent?.getEffectiveConfig().prompts;
|
|
81
|
-
if (!Array.isArray(prompts)) {
|
|
82
|
-
return void 0;
|
|
83
|
-
}
|
|
84
|
-
for (const prompt of prompts) {
|
|
85
|
-
if (!prompt || typeof prompt !== "object" || prompt.type !== "file") {
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
const filePath = typeof prompt.file === "string" ? prompt.file : void 0;
|
|
89
|
-
if (!filePath || path.basename(filePath) !== "SKILL.md") {
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
if (path.basename(path.dirname(filePath)) === skillId) {
|
|
93
|
-
return filePath;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return void 0;
|
|
97
|
-
}
|
|
98
73
|
function resolveSkillBaseDirectory(scope, context) {
|
|
99
74
|
if (scope === "global") {
|
|
100
75
|
return { baseDir: getDextoGlobalPath("skills"), scope: "global" };
|
|
@@ -128,20 +103,6 @@ async function resolveSkillUpdateDirectory(input, context) {
|
|
|
128
103
|
return { baseDir: primary, scope: "workspace" };
|
|
129
104
|
}
|
|
130
105
|
async function resolveExistingSkillLocation(input, context) {
|
|
131
|
-
if (input.scope !== "global") {
|
|
132
|
-
const registeredSkillFile = findRegisteredSkillFile(input.id.trim(), context);
|
|
133
|
-
if (registeredSkillFile) {
|
|
134
|
-
const skillDir2 = path.dirname(registeredSkillFile);
|
|
135
|
-
const baseDir2 = path.dirname(skillDir2);
|
|
136
|
-
ensurePathWithinBase(baseDir2, skillDir2, "skill_refresh");
|
|
137
|
-
return {
|
|
138
|
-
baseDir: baseDir2,
|
|
139
|
-
scope: "workspace",
|
|
140
|
-
skillDir: skillDir2,
|
|
141
|
-
skillFile: registeredSkillFile
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
106
|
const { baseDir, scope } = await resolveSkillUpdateDirectory(input, context);
|
|
146
107
|
const skillDir = path.join(baseDir, input.id.trim());
|
|
147
108
|
ensurePathWithinBase(baseDir, skillDir, "skill_refresh");
|
|
@@ -181,10 +142,6 @@ function resolveSkillCreateInput(input) {
|
|
|
181
142
|
content
|
|
182
143
|
};
|
|
183
144
|
}
|
|
184
|
-
function formatFrontmatterList(key, values) {
|
|
185
|
-
const normalized = values.map((value) => JSON.stringify(value.trim()));
|
|
186
|
-
return `${key}: [${normalized.join(", ")}]`;
|
|
187
|
-
}
|
|
188
145
|
function buildSkillMarkdownFromParts(options) {
|
|
189
146
|
const id = options.id.trim();
|
|
190
147
|
const title = titleizeSkillId(id) || id;
|
|
@@ -192,12 +149,6 @@ function buildSkillMarkdownFromParts(options) {
|
|
|
192
149
|
const lines = ["---"];
|
|
193
150
|
lines.push(formatFrontmatterLine("name", id));
|
|
194
151
|
lines.push(formatFrontmatterLine("description", options.description.trim()));
|
|
195
|
-
if (options.toolkits && options.toolkits.length > 0) {
|
|
196
|
-
lines.push(formatFrontmatterList("toolkits", options.toolkits));
|
|
197
|
-
}
|
|
198
|
-
if (options.allowedTools && options.allowedTools.length > 0) {
|
|
199
|
-
lines.push(formatFrontmatterList("allowed-tools", options.allowedTools));
|
|
200
|
-
}
|
|
201
152
|
lines.push("---", "", `# ${title}`);
|
|
202
153
|
if (body.length > 0) {
|
|
203
154
|
lines.push("", body);
|
|
@@ -214,69 +165,36 @@ function buildSkillMarkdown(input) {
|
|
|
214
165
|
return buildSkillMarkdownFromParts({
|
|
215
166
|
id: input.id,
|
|
216
167
|
description: input.description,
|
|
217
|
-
content: input.content
|
|
218
|
-
allowedTools: input.allowedTools,
|
|
219
|
-
toolkits: input.toolkits
|
|
168
|
+
content: input.content
|
|
220
169
|
});
|
|
221
170
|
}
|
|
222
|
-
|
|
171
|
+
function frontmatterDescription(markdown) {
|
|
172
|
+
if (!markdown.startsWith("---\n")) return void 0;
|
|
173
|
+
const end = markdown.indexOf("\n---", 4);
|
|
174
|
+
if (end < 0) return void 0;
|
|
175
|
+
const line = markdown.slice(4, end).split("\n").find((candidate) => candidate.trim().startsWith("description:"));
|
|
176
|
+
return line?.split(":").slice(1).join(":").trim().replace(/^"|"$/g, "") || void 0;
|
|
177
|
+
}
|
|
178
|
+
async function readSkillDescription(skillFile) {
|
|
223
179
|
try {
|
|
224
180
|
const raw = await fs.readFile(skillFile, "utf-8");
|
|
225
|
-
|
|
226
|
-
if (!match) return {};
|
|
227
|
-
const frontmatter = yamlParse(match[1] ?? "");
|
|
228
|
-
if (!frontmatter || typeof frontmatter !== "object") return {};
|
|
229
|
-
const name = typeof frontmatter.name === "string" ? frontmatter.name.trim() : void 0;
|
|
230
|
-
const description = typeof frontmatter.description === "string" ? frontmatter.description.trim() : void 0;
|
|
231
|
-
const allowedToolsRaw = frontmatter["allowed-tools"];
|
|
232
|
-
const toolkitsRaw = frontmatter.toolkits;
|
|
233
|
-
const allowedTools = Array.isArray(allowedToolsRaw) ? allowedToolsRaw.filter((item) => typeof item === "string").map((item) => item.trim()).filter((item) => item.length > 0) : void 0;
|
|
234
|
-
const toolkits = Array.isArray(toolkitsRaw) ? toolkitsRaw.filter((item) => typeof item === "string").map((item) => item.trim()).filter((item) => item.length > 0) : void 0;
|
|
235
|
-
const result = {};
|
|
236
|
-
if (name) result.name = name;
|
|
237
|
-
if (description) result.description = description;
|
|
238
|
-
if (allowedTools && allowedTools.length > 0) result.allowedTools = allowedTools;
|
|
239
|
-
if (toolkits && toolkits.length > 0) result.toolkits = toolkits;
|
|
240
|
-
return result;
|
|
181
|
+
return frontmatterDescription(raw);
|
|
241
182
|
} catch {
|
|
242
|
-
return
|
|
183
|
+
return void 0;
|
|
243
184
|
}
|
|
244
185
|
}
|
|
245
|
-
async function
|
|
246
|
-
const
|
|
247
|
-
if (!
|
|
248
|
-
|
|
249
|
-
const existingPrompts = Array.isArray(effective.prompts) ? [...effective.prompts] : [];
|
|
250
|
-
const alreadyPresent = existingPrompts.some((prompt) => {
|
|
251
|
-
if (!prompt || typeof prompt !== "object") return false;
|
|
252
|
-
const record = prompt;
|
|
253
|
-
return record.type === "file" && record.file === skillFile;
|
|
254
|
-
});
|
|
255
|
-
const nextPrompts = alreadyPresent ? existingPrompts : [...existingPrompts, { type: "file", file: skillFile }];
|
|
256
|
-
await agent.refreshPrompts(nextPrompts);
|
|
186
|
+
async function refreshAgentSkills(context) {
|
|
187
|
+
const skillManager = context.services?.skills;
|
|
188
|
+
if (!skillManager) return false;
|
|
189
|
+
await skillManager.refresh();
|
|
257
190
|
return true;
|
|
258
191
|
}
|
|
259
|
-
function
|
|
260
|
-
const notes = [
|
|
261
|
-
"Creating or editing files under mcps/ only defines bundled MCP config. It does not implement or verify the target MCP server.",
|
|
262
|
-
"After editing SKILL.md or bundled MCP files with non-creator tools, run skill_refresh so the current session sees the latest skill content and MCP metadata."
|
|
263
|
-
];
|
|
264
|
-
if (bundledMcpServers.length > 0) {
|
|
265
|
-
notes.push(
|
|
266
|
-
"Bundled MCP config is present. Only describe the skill as shipping a real MCP when the config points at a bundled runnable server or a verified external command/package."
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
return notes;
|
|
270
|
-
}
|
|
271
|
-
function inspectSkillBundle(skillDir, skillId) {
|
|
272
|
-
const bundledMcpResult = loadBundledMcpConfigFromDirectory(skillDir, skillId, {
|
|
273
|
-
scanNestedMcps: true
|
|
274
|
-
});
|
|
275
|
-
const bundledMcpServers = Object.keys(bundledMcpResult.mcpServers ?? {});
|
|
192
|
+
function inspectSkillBundle() {
|
|
276
193
|
return {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
194
|
+
notes: [
|
|
195
|
+
"Files under mcps/ are inert bundled files. Configure MCP servers through normal MCP configuration paths.",
|
|
196
|
+
"After editing SKILL.md or bundled files with non-creator tools, run skill_refresh so the current session sees the latest skill content."
|
|
197
|
+
]
|
|
280
198
|
};
|
|
281
199
|
}
|
|
282
200
|
const creatorToolsFactory = {
|
|
@@ -290,7 +208,7 @@ const creatorToolsFactory = {
|
|
|
290
208
|
const enabledTools = config.enabledTools ?? CREATOR_TOOL_NAMES;
|
|
291
209
|
const skillCreateTool = defineTool({
|
|
292
210
|
id: "skill_create",
|
|
293
|
-
description: "Create a standalone SKILL.md file, scaffold bundled resource directories, and register it with the running agent.
|
|
211
|
+
description: "Create a standalone SKILL.md file, scaffold bundled resource directories, and register it with the running agent. Files under mcps/ are inert bundled files.",
|
|
294
212
|
inputSchema: SkillCreateInputSchema,
|
|
295
213
|
execute: async (input, context) => {
|
|
296
214
|
const resolvedInput = resolveSkillCreateInput(input);
|
|
@@ -318,9 +236,9 @@ const creatorToolsFactory = {
|
|
|
318
236
|
(directory) => fs.mkdir(path.join(skillDir, directory), { recursive: true })
|
|
319
237
|
)
|
|
320
238
|
);
|
|
321
|
-
const refreshed = await
|
|
239
|
+
const refreshed = await refreshAgentSkills(context);
|
|
322
240
|
const displayName = titleizeSkillId(skillId) || skillId;
|
|
323
|
-
const bundleDetails = inspectSkillBundle(
|
|
241
|
+
const bundleDetails = inspectSkillBundle();
|
|
324
242
|
return {
|
|
325
243
|
created: true,
|
|
326
244
|
id: skillId,
|
|
@@ -331,7 +249,7 @@ const creatorToolsFactory = {
|
|
|
331
249
|
resourceDirectories: SKILL_RESOURCE_DIRECTORIES.map(
|
|
332
250
|
(directory) => path.join(skillDir, directory)
|
|
333
251
|
),
|
|
334
|
-
|
|
252
|
+
skillsRefreshed: refreshed,
|
|
335
253
|
...bundleDetails
|
|
336
254
|
};
|
|
337
255
|
}
|
|
@@ -346,10 +264,7 @@ const creatorToolsFactory = {
|
|
|
346
264
|
context: "skill_update",
|
|
347
265
|
hint: "Use kebab-case skill ids (e.g., release-notes)"
|
|
348
266
|
});
|
|
349
|
-
const { scope,
|
|
350
|
-
input,
|
|
351
|
-
context
|
|
352
|
-
);
|
|
267
|
+
const { scope, skillFile } = await resolveExistingSkillLocation(input, context);
|
|
353
268
|
const exists = await pathExists(skillFile);
|
|
354
269
|
if (!exists) {
|
|
355
270
|
throw ToolError.validationFailed(
|
|
@@ -357,40 +272,36 @@ const creatorToolsFactory = {
|
|
|
357
272
|
`Skill not found at ${skillFile}`
|
|
358
273
|
);
|
|
359
274
|
}
|
|
360
|
-
const
|
|
361
|
-
const description = input.description?.trim() ||
|
|
275
|
+
const existingDescription = await readSkillDescription(skillFile);
|
|
276
|
+
const description = input.description?.trim() || existingDescription;
|
|
362
277
|
if (!description) {
|
|
363
278
|
throw ToolError.validationFailed(
|
|
364
279
|
"skill_update",
|
|
365
280
|
"description is required when the existing skill is missing one"
|
|
366
281
|
);
|
|
367
282
|
}
|
|
368
|
-
const allowedTools = input.allowedTools !== void 0 ? input.allowedTools : existing.allowedTools;
|
|
369
|
-
const toolkits = input.toolkits !== void 0 ? input.toolkits : existing.toolkits;
|
|
370
283
|
const markdown = buildSkillMarkdownFromParts({
|
|
371
284
|
id: skillId,
|
|
372
285
|
description,
|
|
373
|
-
content: input.content.trim()
|
|
374
|
-
allowedTools,
|
|
375
|
-
toolkits
|
|
286
|
+
content: input.content.trim()
|
|
376
287
|
});
|
|
377
288
|
await fs.writeFile(skillFile, markdown, "utf-8");
|
|
378
|
-
const refreshed = await
|
|
379
|
-
const bundleDetails = inspectSkillBundle(
|
|
289
|
+
const refreshed = await refreshAgentSkills(context);
|
|
290
|
+
const bundleDetails = inspectSkillBundle();
|
|
380
291
|
return {
|
|
381
292
|
updated: true,
|
|
382
293
|
id: skillId,
|
|
383
294
|
description,
|
|
384
295
|
scope,
|
|
385
296
|
path: skillFile,
|
|
386
|
-
|
|
297
|
+
skillsRefreshed: refreshed,
|
|
387
298
|
...bundleDetails
|
|
388
299
|
};
|
|
389
300
|
}
|
|
390
301
|
});
|
|
391
302
|
const skillRefreshTool = defineTool({
|
|
392
303
|
id: "skill_refresh",
|
|
393
|
-
description: "Refresh one standalone skill bundle in the current session after editing SKILL.md,
|
|
304
|
+
description: "Refresh one standalone skill bundle in the current session after editing SKILL.md, handlers/, scripts/, mcps/, or references/.",
|
|
394
305
|
inputSchema: SkillRefreshInputSchema,
|
|
395
306
|
execute: async (input, context) => {
|
|
396
307
|
const skillId = input.id.trim();
|
|
@@ -398,15 +309,12 @@ const creatorToolsFactory = {
|
|
|
398
309
|
context: "skill_refresh",
|
|
399
310
|
hint: "Use kebab-case skill ids (e.g., release-notes)"
|
|
400
311
|
});
|
|
401
|
-
if (!context.
|
|
312
|
+
if (!context.services?.skills) {
|
|
402
313
|
throw ToolError.configInvalid(
|
|
403
|
-
"skill_refresh requires ToolExecutionContext.
|
|
314
|
+
"skill_refresh requires ToolExecutionContext.services.skills"
|
|
404
315
|
);
|
|
405
316
|
}
|
|
406
|
-
const { scope,
|
|
407
|
-
input,
|
|
408
|
-
context
|
|
409
|
-
);
|
|
317
|
+
const { scope, skillFile } = await resolveExistingSkillLocation(input, context);
|
|
410
318
|
const exists = await pathExists(skillFile);
|
|
411
319
|
if (!exists) {
|
|
412
320
|
throw ToolError.validationFailed(
|
|
@@ -414,14 +322,14 @@ const creatorToolsFactory = {
|
|
|
414
322
|
`Skill not found at ${skillFile}`
|
|
415
323
|
);
|
|
416
324
|
}
|
|
417
|
-
const refreshed = await
|
|
418
|
-
const bundleDetails = inspectSkillBundle(
|
|
325
|
+
const refreshed = await refreshAgentSkills(context);
|
|
326
|
+
const bundleDetails = inspectSkillBundle();
|
|
419
327
|
return {
|
|
420
328
|
refreshed: true,
|
|
421
329
|
id: skillId,
|
|
422
330
|
scope,
|
|
423
331
|
path: skillFile,
|
|
424
|
-
|
|
332
|
+
skillsRefreshed: refreshed,
|
|
425
333
|
...bundleDetails
|
|
426
334
|
};
|
|
427
335
|
}
|
|
@@ -435,28 +343,22 @@ const creatorToolsFactory = {
|
|
|
435
343
|
const normalizedQuery = normalizeSkillQuery(query);
|
|
436
344
|
const hasQuery = normalizedQuery.length > 0;
|
|
437
345
|
const limit = input.limit ?? (hasQuery ? void 0 : 50);
|
|
438
|
-
const
|
|
439
|
-
if (!
|
|
346
|
+
const skillManager = context.services?.skills;
|
|
347
|
+
if (!skillManager) {
|
|
440
348
|
throw ToolError.configInvalid(
|
|
441
|
-
"skill_search requires ToolExecutionContext.services.
|
|
349
|
+
"skill_search requires ToolExecutionContext.services.skills"
|
|
442
350
|
);
|
|
443
351
|
}
|
|
444
|
-
const loaded = await
|
|
445
|
-
let results =
|
|
446
|
-
id,
|
|
447
|
-
name:
|
|
448
|
-
...info.
|
|
449
|
-
...info.commandName ? { commandName: info.commandName } : {},
|
|
450
|
-
...info.description ? { description: info.description } : {},
|
|
451
|
-
...info.context ? { context: info.context } : {},
|
|
452
|
-
...info.agent ? { agent: info.agent } : {}
|
|
352
|
+
const loaded = await skillManager.list();
|
|
353
|
+
let results = loaded.map((info) => ({
|
|
354
|
+
id: info.id,
|
|
355
|
+
name: resolveSkillName(info),
|
|
356
|
+
...info.description ? { description: info.description } : {}
|
|
453
357
|
}));
|
|
454
358
|
if (hasQuery && normalizedQuery) {
|
|
455
359
|
results = results.filter((entry) => {
|
|
456
360
|
if (matchesSkillQuery(entry.id, normalizedQuery)) return true;
|
|
457
361
|
if (matchesSkillQuery(entry.name, normalizedQuery)) return true;
|
|
458
|
-
if (matchesSkillQuery(entry.displayName, normalizedQuery)) return true;
|
|
459
|
-
if (matchesSkillQuery(entry.commandName, normalizedQuery)) return true;
|
|
460
362
|
if (matchesSkillQuery(entry.description, normalizedQuery)) return true;
|
|
461
363
|
return false;
|
|
462
364
|
});
|
|
@@ -527,7 +429,7 @@ const creatorToolsFactory = {
|
|
|
527
429
|
count: limited.length,
|
|
528
430
|
total: tools.length,
|
|
529
431
|
tools: limited,
|
|
530
|
-
_hint: limited.length > 0 ? "Use tool ids
|
|
432
|
+
_hint: limited.length > 0 ? "Use exact tool ids when configuring agent permissions." : "No tools matched the query."
|
|
531
433
|
};
|
|
532
434
|
}
|
|
533
435
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-resolver.d.ts","sourceRoot":"","sources":["../../src/utils/api-key-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"api-key-resolver.d.ts","sourceRoot":"","sources":["../../src/utils/api-key-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;GAGG;AAGH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,CA+B9D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAelF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAGpE"}
|
|
@@ -26,7 +26,7 @@ __export(api_key_store_exports, {
|
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(api_key_store_exports);
|
|
28
28
|
var import_api_key_resolver = require("./api-key-resolver.js");
|
|
29
|
-
var
|
|
29
|
+
var import_llm = require("@dexto/llm");
|
|
30
30
|
var import_path = require("./path.js");
|
|
31
31
|
var import_env_file = require("./env-file.js");
|
|
32
32
|
async function saveProviderApiKey(provider, apiKey, startPath) {
|
|
@@ -66,7 +66,7 @@ function getProviderKeyStatus(provider) {
|
|
|
66
66
|
}
|
|
67
67
|
function listProviderKeyStatus() {
|
|
68
68
|
const result = {};
|
|
69
|
-
for (const provider of
|
|
69
|
+
for (const provider of import_llm.LLM_PROVIDERS) {
|
|
70
70
|
result[provider] = getProviderKeyStatus(provider);
|
|
71
71
|
}
|
|
72
72
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-store.d.ts","sourceRoot":"","sources":["../../src/utils/api-key-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-key-store.d.ts","sourceRoot":"","sources":["../../src/utils/api-key-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAI7D;;;GAGG;AACH,wBAAsB,kBAAkB,CACpC,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAYpD;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,WAAW,GAAG;IACzD,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAClB,CA4CA;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAM9F;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,6CAA8C,CAAC;AAEpF,MAAM,MAAM,qBAAqB,GAAG;IAChC,6DAA6D;IAC7D,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gEAAgE;IAChE,cAAc,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,cAAc,EAAE,OAAO,EACvB,mBAAmB,EAAE,MAAM,GAAG,SAAS,GACxC,qBAAqB,CA2BvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getPrimaryApiKeyEnvVar, resolveApiKeyForProvider } from "./api-key-resolver.js";
|
|
2
|
-
import { LLM_PROVIDERS } from "@dexto/
|
|
2
|
+
import { LLM_PROVIDERS } from "@dexto/llm";
|
|
3
3
|
import { getDextoEnvPath } from "./path.js";
|
|
4
4
|
import { updateEnvFile } from "./env-file.js";
|
|
5
5
|
async function saveProviderApiKey(provider, apiKey, startPath) {
|
package/dist/writer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentConfig } from '@dexto/agent-config';
|
|
2
|
-
import type { LLMProvider } from '@dexto/
|
|
2
|
+
import type { LLMProvider } from '@dexto/llm';
|
|
3
3
|
import { type GlobalPreferences } from './preferences/schemas.js';
|
|
4
4
|
export interface LLMOverrides {
|
|
5
5
|
provider?: LLMProvider;
|
package/dist/writer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../src/writer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB5F;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACrC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,iBAAiB,EAC9B,SAAS,CAAC,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC,CA6Ff;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CACzC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,iBAAiB,EAC9B,SAAS,CAAC,EAAE,YAAY,GACzB,OAAO,CAAC,IAAI,CAAC,CAyBf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/agent-management",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"yaml": "^2.8.3",
|
|
19
19
|
"zod": "^4.3.6",
|
|
20
|
-
"@dexto/agent-config": "1.
|
|
21
|
-
"@dexto/core": "1.
|
|
22
|
-
"@dexto/
|
|
23
|
-
"@dexto/
|
|
20
|
+
"@dexto/agent-config": "1.8.1",
|
|
21
|
+
"@dexto/core": "1.8.1",
|
|
22
|
+
"@dexto/llm": "1.8.1",
|
|
23
|
+
"@dexto/orchestration": "1.8.1",
|
|
24
|
+
"@dexto/tools-builtins": "1.8.1"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@types/node": "^22.13.5"
|