@dexto/agent-management 1.10.3 → 1.11.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.
Files changed (37) hide show
  1. package/dist/agent-creation.cjs +1 -1
  2. package/dist/agent-creation.js +1 -1
  3. package/dist/index.cjs +6 -4
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +6 -4
  7. package/dist/plugins/discover-skills.cjs +30 -19
  8. package/dist/plugins/discover-skills.d.ts +16 -8
  9. package/dist/plugins/discover-skills.d.ts.map +1 -1
  10. package/dist/plugins/discover-skills.js +28 -18
  11. package/dist/plugins/index.cjs +7 -6
  12. package/dist/plugins/index.d.ts +4 -6
  13. package/dist/plugins/index.d.ts.map +1 -1
  14. package/dist/plugins/index.js +9 -5
  15. package/dist/plugins/local-skills.cjs +198 -0
  16. package/dist/plugins/local-skills.d.ts +40 -0
  17. package/dist/plugins/local-skills.d.ts.map +1 -0
  18. package/dist/plugins/local-skills.js +163 -0
  19. package/dist/plugins/skill-markdown.cjs +61 -0
  20. package/dist/plugins/skill-markdown.d.ts +11 -0
  21. package/dist/plugins/skill-markdown.d.ts.map +1 -0
  22. package/dist/plugins/skill-markdown.js +36 -0
  23. package/dist/tool-factories/creator-tools/factory.cjs +77 -73
  24. package/dist/tool-factories/creator-tools/factory.d.ts.map +1 -1
  25. package/dist/tool-factories/creator-tools/factory.js +82 -74
  26. package/dist/utils/execution-context.cjs +3 -3
  27. package/dist/utils/execution-context.d.ts.map +1 -1
  28. package/dist/utils/execution-context.js +3 -3
  29. package/package.json +6 -6
  30. package/dist/plugins/local-skill-source.cjs +0 -104
  31. package/dist/plugins/local-skill-source.d.ts +0 -20
  32. package/dist/plugins/local-skill-source.d.ts.map +0 -1
  33. package/dist/plugins/local-skill-source.js +0 -70
  34. package/dist/plugins/local-skill-sources.cjs +0 -74
  35. package/dist/plugins/local-skill-sources.d.ts +0 -7
  36. package/dist/plugins/local-skill-sources.d.ts.map +0 -1
  37. package/dist/plugins/local-skill-sources.js +0 -40
@@ -22,9 +22,9 @@ function getCaseInsensitiveRootFilename(dirPath, filename) {
22
22
  return null;
23
23
  }
24
24
  }
25
- function hasWorkspaceAuthoringDirectory(dirPath, name) {
25
+ function hasWorkspaceAuthoringDirectory(dirPath, relativePath) {
26
26
  try {
27
- return statSync(path.join(dirPath, name)).isDirectory();
27
+ return statSync(path.join(dirPath, relativePath)).isDirectory();
28
28
  } catch {
29
29
  return false;
30
30
  }
@@ -42,7 +42,7 @@ function hasDextoWorkspaceAgentsFile(dirPath) {
42
42
  }
43
43
  }
44
44
  function hasWorkspaceScaffoldMarker(dirPath) {
45
- return hasDextoWorkspaceAgentsFile(dirPath) && (hasWorkspaceAuthoringDirectory(dirPath, "agents") || hasWorkspaceAuthoringDirectory(dirPath, "skills"));
45
+ return hasDextoWorkspaceAgentsFile(dirPath) && (hasWorkspaceAuthoringDirectory(dirPath, "agents") || hasWorkspaceAuthoringDirectory(dirPath, ".agents/skills") || hasWorkspaceAuthoringDirectory(dirPath, "skills") || hasWorkspaceAuthoringDirectory(dirPath, ".dexto/skills"));
46
46
  }
47
47
  function readPackageName(dirPath) {
48
48
  const packageJsonPath = path.join(dirPath, "package.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/agent-management",
3
- "version": "1.10.3",
3
+ "version": "1.11.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,11 +22,11 @@
22
22
  "dependencies": {
23
23
  "yaml": "^2.8.3",
24
24
  "zod": "^4.3.6",
25
- "@dexto/agent-config": "1.10.3",
26
- "@dexto/core": "1.10.3",
27
- "@dexto/llm": "1.10.3",
28
- "@dexto/orchestration": "1.10.3",
29
- "@dexto/tools-builtins": "1.10.3"
25
+ "@dexto/agent-config": "1.11.0",
26
+ "@dexto/core": "1.11.0",
27
+ "@dexto/llm": "1.11.0",
28
+ "@dexto/orchestration": "1.11.0",
29
+ "@dexto/tools-builtins": "1.11.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.13.5"
@@ -1,104 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var local_skill_source_exports = {};
30
- __export(local_skill_source_exports, {
31
- LocalSkillSource: () => LocalSkillSource
32
- });
33
- module.exports = __toCommonJS(local_skill_source_exports);
34
- var import_node_fs = require("node:fs");
35
- var import_node_path = __toESM(require("node:path"), 1);
36
- class LocalSkillSource {
37
- constructor(id, roots) {
38
- this.id = id;
39
- this.roots = roots;
40
- }
41
- skills;
42
- async list() {
43
- return (await this.entries()).map(
44
- ({ skillFile: _skillFile, skillDirectory: _skillDirectory, ...summary }) => ({
45
- ...summary
46
- })
47
- );
48
- }
49
- async get(id) {
50
- const entry = await this.findEntry(id);
51
- if (!entry) return null;
52
- const instructions = await import_node_fs.promises.readFile(entry.skillFile, "utf8");
53
- return {
54
- id: entry.id,
55
- displayName: entry.displayName,
56
- ...entry.description !== void 0 && { description: entry.description },
57
- instructions
58
- };
59
- }
60
- async readFile(skillId, requestedPath) {
61
- const entry = await this.findEntry(skillId);
62
- if (!entry || requestedPath.startsWith("/") || requestedPath.split("/").includes("..")) {
63
- throw new Error(`Skill file not found: ${skillId}/${requestedPath}`);
64
- }
65
- return import_node_fs.promises.readFile(import_node_path.default.join(entry.skillDirectory, requestedPath), "utf8");
66
- }
67
- async refresh() {
68
- this.skills = void 0;
69
- }
70
- async entries() {
71
- if (this.skills) return this.skills;
72
- const entries = [];
73
- for (const root of this.roots) {
74
- const instructions = await import_node_fs.promises.readFile(root.skillFile, "utf8");
75
- entries.push({
76
- id: root.id,
77
- displayName: root.displayName ?? firstHeading(instructions) ?? root.id,
78
- ...root.description ?? frontmatterDescription(instructions) ? { description: root.description ?? frontmatterDescription(instructions) } : {},
79
- skillFile: root.skillFile,
80
- skillDirectory: import_node_path.default.dirname(root.skillFile)
81
- });
82
- }
83
- this.skills = entries;
84
- return entries;
85
- }
86
- async findEntry(id) {
87
- return (await this.entries()).find((entry) => entry.id === id || entry.displayName === id) ?? null;
88
- }
89
- }
90
- function firstHeading(markdown) {
91
- const heading = markdown.split("\n").find((line) => line.startsWith("# ") && line.slice(2).trim().length > 0);
92
- return heading?.slice(2).trim();
93
- }
94
- function frontmatterDescription(markdown) {
95
- if (!markdown.startsWith("---\n")) return void 0;
96
- const end = markdown.indexOf("\n---", 4);
97
- if (end < 0) return void 0;
98
- const line = markdown.slice(4, end).split("\n").find((candidate) => candidate.trim().startsWith("description:"));
99
- return line?.split(":").slice(1).join(":").trim().replace(/^"|"$/g, "") || void 0;
100
- }
101
- // Annotate the CommonJS export names for ESM import in node:
102
- 0 && (module.exports = {
103
- LocalSkillSource
104
- });
@@ -1,20 +0,0 @@
1
- import type { SkillDocument, SkillSource, SkillSummary } from '@dexto/core';
2
- export interface LocalSkillRoot {
3
- id: string;
4
- skillFile: string;
5
- displayName?: string | undefined;
6
- description?: string | undefined;
7
- }
8
- export declare class LocalSkillSource implements SkillSource {
9
- readonly id: string;
10
- private readonly roots;
11
- private skills;
12
- constructor(id: string, roots: LocalSkillRoot[]);
13
- list(): Promise<SkillSummary[]>;
14
- get(id: string): Promise<SkillDocument | null>;
15
- readFile(skillId: string, requestedPath: string): Promise<string>;
16
- refresh(): Promise<void>;
17
- private entries;
18
- private findEntry;
19
- }
20
- //# sourceMappingURL=local-skill-source.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-skill-source.d.ts","sourceRoot":"","sources":["../../src/plugins/local-skill-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5E,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAOD,qBAAa,gBAAiB,YAAW,WAAW;IAI5C,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJ1B,OAAO,CAAC,MAAM,CAAgC;gBAGjC,EAAE,EAAE,MAAM,EACF,KAAK,EAAE,cAAc,EAAE;IAGtC,IAAI,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAQ/B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAc9C,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQjE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAIhB,OAAO;YAqBP,SAAS;CAM1B"}
@@ -1,70 +0,0 @@
1
- import { promises as fs } from "node:fs";
2
- import path from "node:path";
3
- class LocalSkillSource {
4
- constructor(id, roots) {
5
- this.id = id;
6
- this.roots = roots;
7
- }
8
- skills;
9
- async list() {
10
- return (await this.entries()).map(
11
- ({ skillFile: _skillFile, skillDirectory: _skillDirectory, ...summary }) => ({
12
- ...summary
13
- })
14
- );
15
- }
16
- async get(id) {
17
- const entry = await this.findEntry(id);
18
- if (!entry) return null;
19
- const instructions = await fs.readFile(entry.skillFile, "utf8");
20
- return {
21
- id: entry.id,
22
- displayName: entry.displayName,
23
- ...entry.description !== void 0 && { description: entry.description },
24
- instructions
25
- };
26
- }
27
- async readFile(skillId, requestedPath) {
28
- const entry = await this.findEntry(skillId);
29
- if (!entry || requestedPath.startsWith("/") || requestedPath.split("/").includes("..")) {
30
- throw new Error(`Skill file not found: ${skillId}/${requestedPath}`);
31
- }
32
- return fs.readFile(path.join(entry.skillDirectory, requestedPath), "utf8");
33
- }
34
- async refresh() {
35
- this.skills = void 0;
36
- }
37
- async entries() {
38
- if (this.skills) return this.skills;
39
- const entries = [];
40
- for (const root of this.roots) {
41
- const instructions = await fs.readFile(root.skillFile, "utf8");
42
- entries.push({
43
- id: root.id,
44
- displayName: root.displayName ?? firstHeading(instructions) ?? root.id,
45
- ...root.description ?? frontmatterDescription(instructions) ? { description: root.description ?? frontmatterDescription(instructions) } : {},
46
- skillFile: root.skillFile,
47
- skillDirectory: path.dirname(root.skillFile)
48
- });
49
- }
50
- this.skills = entries;
51
- return entries;
52
- }
53
- async findEntry(id) {
54
- return (await this.entries()).find((entry) => entry.id === id || entry.displayName === id) ?? null;
55
- }
56
- }
57
- function firstHeading(markdown) {
58
- const heading = markdown.split("\n").find((line) => line.startsWith("# ") && line.slice(2).trim().length > 0);
59
- return heading?.slice(2).trim();
60
- }
61
- function frontmatterDescription(markdown) {
62
- if (!markdown.startsWith("---\n")) return void 0;
63
- const end = markdown.indexOf("\n---", 4);
64
- if (end < 0) return void 0;
65
- const line = markdown.slice(4, end).split("\n").find((candidate) => candidate.trim().startsWith("description:"));
66
- return line?.split(":").slice(1).join(":").trim().replace(/^"|"$/g, "") || void 0;
67
- }
68
- export {
69
- LocalSkillSource
70
- };
@@ -1,74 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var local_skill_sources_exports = {};
30
- __export(local_skill_sources_exports, {
31
- createLocalSkillSources: () => createLocalSkillSources
32
- });
33
- module.exports = __toCommonJS(local_skill_sources_exports);
34
- var import_node_path = __toESM(require("node:path"), 1);
35
- var import_discover_plugins = require("./discover-plugins.js");
36
- var import_discover_skills = require("./discover-skills.js");
37
- var import_load_plugin = require("./load-plugin.js");
38
- var import_local_skill_source = require("./local-skill-source.js");
39
- function createLocalSkillSources(options = {}) {
40
- const roots = [];
41
- const seen = /* @__PURE__ */ new Set();
42
- const addRoot = (root) => {
43
- const resolved = import_node_path.default.resolve(root.skillFile);
44
- if (seen.has(resolved)) return;
45
- seen.add(resolved);
46
- roots.push({ ...root, skillFile: resolved });
47
- };
48
- for (const skill of (0, import_discover_skills.discoverStandaloneSkills)(options.workspaceRoot)) {
49
- addRoot({
50
- id: skill.name,
51
- skillFile: skill.skillFile
52
- });
53
- }
54
- for (const plugin of (0, import_discover_plugins.discoverClaudeCodePlugins)(
55
- options.workspaceRoot,
56
- options.bundledPlugins ?? []
57
- )) {
58
- const loaded = (0, import_load_plugin.loadClaudeCodePlugin)(plugin);
59
- for (const command of loaded.commands) {
60
- if (!command.isSkill) continue;
61
- const id = import_node_path.default.basename(import_node_path.default.dirname(command.file));
62
- addRoot({
63
- id: `${command.namespace}:${id}`,
64
- displayName: `${command.namespace}:${id}`,
65
- skillFile: command.file
66
- });
67
- }
68
- }
69
- return roots.length > 0 ? [new import_local_skill_source.LocalSkillSource("local", roots)] : [];
70
- }
71
- // Annotate the CommonJS export names for ESM import in node:
72
- 0 && (module.exports = {
73
- createLocalSkillSources
74
- });
@@ -1,7 +0,0 @@
1
- import { LocalSkillSource } from './local-skill-source.js';
2
- export interface CreateLocalSkillSourcesOptions {
3
- workspaceRoot?: string | undefined;
4
- bundledPlugins?: string[] | undefined;
5
- }
6
- export declare function createLocalSkillSources(options?: CreateLocalSkillSourcesOptions): LocalSkillSource[];
7
- //# sourceMappingURL=local-skill-sources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-skill-sources.d.ts","sourceRoot":"","sources":["../../src/plugins/local-skill-sources.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAuB,MAAM,yBAAyB,CAAC;AAEhF,MAAM,WAAW,8BAA8B;IAC3C,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACzC;AAED,wBAAgB,uBAAuB,CACnC,OAAO,GAAE,8BAAmC,GAC7C,gBAAgB,EAAE,CAmCpB"}
@@ -1,40 +0,0 @@
1
- import path from "node:path";
2
- import { discoverClaudeCodePlugins } from "./discover-plugins.js";
3
- import { discoverStandaloneSkills } from "./discover-skills.js";
4
- import { loadClaudeCodePlugin } from "./load-plugin.js";
5
- import { LocalSkillSource } from "./local-skill-source.js";
6
- function createLocalSkillSources(options = {}) {
7
- const roots = [];
8
- const seen = /* @__PURE__ */ new Set();
9
- const addRoot = (root) => {
10
- const resolved = path.resolve(root.skillFile);
11
- if (seen.has(resolved)) return;
12
- seen.add(resolved);
13
- roots.push({ ...root, skillFile: resolved });
14
- };
15
- for (const skill of discoverStandaloneSkills(options.workspaceRoot)) {
16
- addRoot({
17
- id: skill.name,
18
- skillFile: skill.skillFile
19
- });
20
- }
21
- for (const plugin of discoverClaudeCodePlugins(
22
- options.workspaceRoot,
23
- options.bundledPlugins ?? []
24
- )) {
25
- const loaded = loadClaudeCodePlugin(plugin);
26
- for (const command of loaded.commands) {
27
- if (!command.isSkill) continue;
28
- const id = path.basename(path.dirname(command.file));
29
- addRoot({
30
- id: `${command.namespace}:${id}`,
31
- displayName: `${command.namespace}:${id}`,
32
- skillFile: command.file
33
- });
34
- }
35
- }
36
- return roots.length > 0 ? [new LocalSkillSource("local", roots)] : [];
37
- }
38
- export {
39
- createLocalSkillSources
40
- };