@dexto/agent-management 1.5.7 → 1.6.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/dist/AgentFactory.cjs +5 -9
- package/dist/AgentFactory.d.ts +6 -5
- package/dist/AgentFactory.d.ts.map +1 -1
- package/dist/AgentFactory.js +5 -9
- package/dist/AgentManager.cjs +2 -2
- package/dist/AgentManager.d.ts +1 -1
- package/dist/AgentManager.d.ts.map +1 -1
- package/dist/AgentManager.js +4 -4
- package/dist/agent-creation.cjs +95 -0
- package/dist/agent-creation.d.ts +15 -0
- package/dist/agent-creation.d.ts.map +1 -0
- package/dist/agent-creation.js +78 -0
- package/dist/config/config-enrichment.cjs +2 -12
- package/dist/config/config-enrichment.d.ts +1 -1
- package/dist/config/config-enrichment.d.ts.map +1 -1
- package/dist/config/config-enrichment.js +2 -12
- package/dist/config/config-manager.cjs +4 -4
- package/dist/config/config-manager.d.ts +1 -1
- package/dist/config/config-manager.d.ts.map +1 -1
- package/dist/config/config-manager.js +3 -1
- package/dist/config/loader.d.ts +3 -3
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/images/image-store.cjs +256 -0
- package/dist/images/image-store.d.ts +70 -0
- package/dist/images/image-store.d.ts.map +1 -0
- package/dist/images/image-store.js +210 -0
- package/dist/index.cjs +43 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -1
- package/dist/models/custom-models.cjs +1 -1
- package/dist/models/custom-models.d.ts +7 -7
- package/dist/models/custom-models.d.ts.map +1 -1
- package/dist/models/custom-models.js +1 -1
- package/dist/plugins/discover-plugins.cjs +15 -31
- package/dist/plugins/discover-plugins.d.ts.map +1 -1
- package/dist/plugins/discover-plugins.js +15 -31
- package/dist/plugins/discover-skills.cjs +4 -0
- package/dist/plugins/discover-skills.d.ts +6 -3
- package/dist/plugins/discover-skills.d.ts.map +1 -1
- package/dist/plugins/discover-skills.js +4 -0
- package/dist/plugins/index.cjs +0 -2
- package/dist/plugins/index.d.ts +5 -6
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +0 -2
- package/dist/plugins/list-plugins.cjs +3 -1
- package/dist/plugins/list-plugins.d.ts.map +1 -1
- package/dist/plugins/list-plugins.js +3 -1
- package/dist/plugins/load-plugin.cjs +0 -13
- package/dist/plugins/load-plugin.d.ts +3 -5
- package/dist/plugins/load-plugin.d.ts.map +1 -1
- package/dist/plugins/load-plugin.js +0 -13
- package/dist/plugins/schemas.cjs +1 -11
- package/dist/plugins/schemas.d.ts +14 -69
- package/dist/plugins/schemas.d.ts.map +1 -1
- package/dist/plugins/schemas.js +1 -10
- package/dist/plugins/types.d.ts +2 -20
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/plugins/validate-plugin.cjs +7 -37
- package/dist/plugins/validate-plugin.d.ts +6 -24
- package/dist/plugins/validate-plugin.d.ts.map +1 -1
- package/dist/plugins/validate-plugin.js +8 -38
- package/dist/preferences/errors.cjs +11 -0
- package/dist/preferences/errors.d.ts +1 -0
- package/dist/preferences/errors.d.ts.map +1 -1
- package/dist/preferences/errors.js +11 -0
- package/dist/preferences/loader.cjs +119 -6
- package/dist/preferences/loader.d.ts +21 -1
- package/dist/preferences/loader.d.ts.map +1 -1
- package/dist/preferences/loader.js +102 -1
- package/dist/preferences/schemas.cjs +12 -0
- package/dist/preferences/schemas.d.ts +38 -12
- package/dist/preferences/schemas.d.ts.map +1 -1
- package/dist/preferences/schemas.js +10 -0
- package/dist/registry/registry.d.ts +4 -44
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/runtime/AgentPool.d.ts +2 -2
- package/dist/runtime/AgentPool.d.ts.map +1 -1
- package/dist/runtime/AgentRuntime.cjs +20 -15
- package/dist/runtime/AgentRuntime.d.ts +2 -2
- package/dist/runtime/AgentRuntime.d.ts.map +1 -1
- package/dist/runtime/AgentRuntime.js +20 -15
- package/dist/runtime/approval-delegation.d.ts +2 -2
- package/dist/runtime/approval-delegation.d.ts.map +1 -1
- package/dist/runtime/schemas.d.ts +1 -1
- package/dist/runtime/types.d.ts +2 -1
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.d.ts +1 -1
- package/dist/tool-factories/agent-spawner/error-codes.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/errors.d.ts +1 -1
- package/dist/tool-factories/agent-spawner/errors.d.ts.map +1 -0
- package/dist/tool-factories/agent-spawner/factory.cjs +290 -0
- package/dist/tool-factories/agent-spawner/factory.d.ts +4 -0
- package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -0
- package/dist/tool-factories/agent-spawner/factory.js +279 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/index.cjs +9 -9
- package/dist/{tool-provider → tool-factories/agent-spawner}/index.d.ts +3 -3
- package/dist/tool-factories/agent-spawner/index.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/index.js +4 -4
- package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.cjs +1 -1
- package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.d.ts +4 -4
- package/dist/tool-factories/agent-spawner/llm-resolution.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.js +1 -1
- package/dist/{tool-provider/runtime-service.cjs → tool-factories/agent-spawner/runtime.cjs} +112 -73
- package/dist/{tool-provider/runtime-service.d.ts → tool-factories/agent-spawner/runtime.d.ts} +8 -6
- package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -0
- package/dist/{tool-provider/runtime-service.js → tool-factories/agent-spawner/runtime.js} +98 -69
- package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.cjs +2 -2
- package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.d.ts +4 -4
- package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.js +2 -2
- package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.cjs +8 -7
- package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts +11 -0
- package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.js +8 -7
- package/dist/tool-factories/agent-spawner/types.d.ts.map +1 -0
- package/dist/utils/api-key-resolver.cjs +1 -1
- package/dist/utils/api-key-resolver.js +1 -1
- package/dist/utils/feature-flags.cjs +3 -1
- package/dist/utils/feature-flags.d.ts +2 -2
- package/dist/utils/feature-flags.d.ts.map +1 -1
- package/dist/utils/feature-flags.js +3 -1
- package/dist/writer.d.ts +2 -1
- package/dist/writer.d.ts.map +1 -1
- package/package.json +6 -3
- package/dist/tool-provider/error-codes.d.ts.map +0 -1
- package/dist/tool-provider/errors.d.ts.map +0 -1
- package/dist/tool-provider/index.d.ts.map +0 -1
- package/dist/tool-provider/llm-resolution.d.ts.map +0 -1
- package/dist/tool-provider/runtime-service.d.ts.map +0 -1
- package/dist/tool-provider/schemas.d.ts.map +0 -1
- package/dist/tool-provider/spawn-agent-tool.d.ts +0 -10
- package/dist/tool-provider/spawn-agent-tool.d.ts.map +0 -1
- package/dist/tool-provider/tool-provider.cjs +0 -46
- package/dist/tool-provider/tool-provider.d.ts +0 -24
- package/dist/tool-provider/tool-provider.d.ts.map +0 -1
- package/dist/tool-provider/tool-provider.js +0 -22
- package/dist/tool-provider/types.d.ts.map +0 -1
- /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.js +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.js +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/types.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/types.d.ts +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/types.js +0 -0
|
@@ -68,8 +68,10 @@ function discoverStandaloneSkills(projectPath) {
|
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
+
scanSkillsDir(path.join(cwd, ".agents", "skills"), "project");
|
|
71
72
|
scanSkillsDir(path.join(cwd, ".dexto", "skills"), "project");
|
|
72
73
|
if (homeDir) {
|
|
74
|
+
scanSkillsDir(path.join(homeDir, ".agents", "skills"), "user");
|
|
73
75
|
scanSkillsDir(path.join(homeDir, ".dexto", "skills"), "user");
|
|
74
76
|
}
|
|
75
77
|
return skills;
|
|
@@ -78,7 +80,9 @@ function getSkillSearchPaths() {
|
|
|
78
80
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
79
81
|
const cwd = process.cwd();
|
|
80
82
|
return [
|
|
83
|
+
path.join(cwd, ".agents", "skills"),
|
|
81
84
|
path.join(cwd, ".dexto", "skills"),
|
|
85
|
+
homeDir ? path.join(homeDir, ".agents", "skills") : "",
|
|
82
86
|
homeDir ? path.join(homeDir, ".dexto", "skills") : ""
|
|
83
87
|
].filter(Boolean);
|
|
84
88
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Standalone Skill Discovery
|
|
3
3
|
*
|
|
4
|
-
* Discovers standalone skills from ~/.dexto/skills/
|
|
4
|
+
* Discovers standalone skills from ~/.agents/skills/ and ~/.dexto/skills/ directories.
|
|
5
5
|
* These are different from plugin skills - they're just directories containing a SKILL.md file.
|
|
6
6
|
*
|
|
7
7
|
* Structure:
|
|
8
|
+
* ~/.agents/skills/
|
|
8
9
|
* ~/.dexto/skills/
|
|
9
10
|
* └── skill-name/
|
|
10
11
|
* ├── SKILL.md (required - the skill prompt)
|
|
@@ -29,8 +30,10 @@ export interface DiscoveredSkill {
|
|
|
29
30
|
* Discovers standalone skills from standard locations.
|
|
30
31
|
*
|
|
31
32
|
* Search Locations:
|
|
32
|
-
* 1. <cwd>/.
|
|
33
|
-
* 2.
|
|
33
|
+
* 1. <cwd>/.agents/skills/* (project)
|
|
34
|
+
* 2. <cwd>/.dexto/skills/* (project)
|
|
35
|
+
* 3. ~/.agents/skills/* (user)
|
|
36
|
+
* 4. ~/.dexto/skills/* (user)
|
|
34
37
|
*
|
|
35
38
|
* @param projectPath Optional project path (defaults to cwd)
|
|
36
39
|
* @returns Array of discovered skills
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover-skills.d.ts","sourceRoot":"","sources":["../../src/plugins/discover-skills.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"discover-skills.d.ts","sourceRoot":"","sources":["../../src/plugins/discover-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAgEhF;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAU9C"}
|
|
@@ -34,8 +34,10 @@ function discoverStandaloneSkills(projectPath) {
|
|
|
34
34
|
} catch {
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
scanSkillsDir(path.join(cwd, ".agents", "skills"), "project");
|
|
37
38
|
scanSkillsDir(path.join(cwd, ".dexto", "skills"), "project");
|
|
38
39
|
if (homeDir) {
|
|
40
|
+
scanSkillsDir(path.join(homeDir, ".agents", "skills"), "user");
|
|
39
41
|
scanSkillsDir(path.join(homeDir, ".dexto", "skills"), "user");
|
|
40
42
|
}
|
|
41
43
|
return skills;
|
|
@@ -44,7 +46,9 @@ function getSkillSearchPaths() {
|
|
|
44
46
|
const homeDir = process.env.HOME || process.env.USERPROFILE || "";
|
|
45
47
|
const cwd = process.cwd();
|
|
46
48
|
return [
|
|
49
|
+
path.join(cwd, ".agents", "skills"),
|
|
47
50
|
path.join(cwd, ".dexto", "skills"),
|
|
51
|
+
homeDir ? path.join(homeDir, ".agents", "skills") : "",
|
|
48
52
|
homeDir ? path.join(homeDir, ".dexto", "skills") : ""
|
|
49
53
|
].filter(Boolean);
|
|
50
54
|
}
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -19,7 +19,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var plugins_exports = {};
|
|
20
20
|
__export(plugins_exports, {
|
|
21
21
|
DEFAULT_MARKETPLACES: () => import_marketplace.DEFAULT_MARKETPLACES,
|
|
22
|
-
DextoPluginManifestSchema: () => import_schemas.DextoPluginManifestSchema,
|
|
23
22
|
InstalledPluginEntrySchema: () => import_schemas.InstalledPluginEntrySchema,
|
|
24
23
|
InstalledPluginsFileSchema: () => import_schemas.InstalledPluginsFileSchema,
|
|
25
24
|
KnownMarketplacesFileSchema: () => import_marketplace.KnownMarketplacesFileSchema,
|
|
@@ -88,7 +87,6 @@ var import_marketplace = require("./marketplace/index.js");
|
|
|
88
87
|
// Annotate the CommonJS export names for ESM import in node:
|
|
89
88
|
0 && (module.exports = {
|
|
90
89
|
DEFAULT_MARKETPLACES,
|
|
91
|
-
DextoPluginManifestSchema,
|
|
92
90
|
InstalledPluginEntrySchema,
|
|
93
91
|
InstalledPluginsFileSchema,
|
|
94
92
|
KnownMarketplacesFileSchema,
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* Plugin Loader
|
|
3
3
|
*
|
|
4
4
|
* Discovers and loads bundled plugins from community sources.
|
|
5
|
-
* Supports
|
|
6
|
-
* - .claude-plugin
|
|
7
|
-
* - .dexto-plugin: Dexto-native format with extended features (customToolProviders)
|
|
5
|
+
* Supports Claude Code compatible plugins:
|
|
6
|
+
* - .claude-plugin
|
|
8
7
|
*/
|
|
9
|
-
export type { PluginManifest,
|
|
10
|
-
export { PluginManifestSchema,
|
|
11
|
-
export type { ValidatedPluginManifest,
|
|
8
|
+
export type { PluginManifest, DiscoveredPlugin, PluginCommand, PluginMCPConfig, LoadedPlugin, PluginInstallScope, InstalledPluginEntry, InstalledPluginsFile, ListedPlugin, PluginValidationResult, PluginInstallResult, PluginUninstallResult, } from './types.js';
|
|
9
|
+
export { PluginManifestSchema, PluginMCPConfigSchema, InstalledPluginEntrySchema, InstalledPluginsFileSchema, } from './schemas.js';
|
|
10
|
+
export type { ValidatedPluginManifest, ValidatedPluginMCPConfig, ValidatedInstalledPluginsFile, ValidatedInstalledPluginEntry, } from './schemas.js';
|
|
12
11
|
export { PluginErrorCode } from './error-codes.js';
|
|
13
12
|
export { PluginError } from './errors.js';
|
|
14
13
|
export { discoverClaudeCodePlugins, getPluginSearchPaths, getInstalledPluginsPath, } from './discover-plugins.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACR,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACxB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACH,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,cAAc,CAAC;AACtB,YAAY,EACR,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,GAChC,M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EAClB,sBAAsB,EACtB,oBAAoB,EAEpB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EAExB,eAAe,EACf,4BAA4B,EAC5B,wBAAwB,GAC3B,MAAM,wBAAwB,CAAC"}
|
package/dist/plugins/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PluginManifestSchema,
|
|
3
|
-
DextoPluginManifestSchema,
|
|
4
3
|
PluginMCPConfigSchema,
|
|
5
4
|
InstalledPluginEntrySchema,
|
|
6
5
|
InstalledPluginsFileSchema
|
|
@@ -59,7 +58,6 @@ import {
|
|
|
59
58
|
} from "./marketplace/index.js";
|
|
60
59
|
export {
|
|
61
60
|
DEFAULT_MARKETPLACES,
|
|
62
|
-
DextoPluginManifestSchema,
|
|
63
61
|
InstalledPluginEntrySchema,
|
|
64
62
|
InstalledPluginsFileSchema,
|
|
65
63
|
KnownMarketplacesFileSchema,
|
|
@@ -96,7 +96,9 @@ function readDextoInstalledPlugins(currentProjectPath) {
|
|
|
96
96
|
if (!result.success) {
|
|
97
97
|
return { plugins };
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
const installedPlugins = result.data.plugins;
|
|
100
|
+
for (const pluginId of Object.keys(installedPlugins)) {
|
|
101
|
+
const installations = installedPlugins[pluginId] ?? [];
|
|
100
102
|
for (const installation of installations) {
|
|
101
103
|
const { scope, installPath, version, installedAt, projectPath } = installation;
|
|
102
104
|
if (!(0, import_fs.existsSync)(installPath)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-plugins.d.ts","sourceRoot":"","sources":["../../src/plugins/list-plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"list-plugins.d.ts","sourceRoot":"","sources":["../../src/plugins/list-plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAErD;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CA8DzE"}
|
|
@@ -62,7 +62,9 @@ function readDextoInstalledPlugins(currentProjectPath) {
|
|
|
62
62
|
if (!result.success) {
|
|
63
63
|
return { plugins };
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
const installedPlugins = result.data.plugins;
|
|
66
|
+
for (const pluginId of Object.keys(installedPlugins)) {
|
|
67
|
+
const installations = installedPlugins[pluginId] ?? [];
|
|
66
68
|
for (const installation of installations) {
|
|
67
69
|
const { scope, installPath, version, installedAt, projectPath } = installation;
|
|
68
70
|
if (!existsSync(installPath)) {
|
|
@@ -34,15 +34,11 @@ module.exports = __toCommonJS(load_plugin_exports);
|
|
|
34
34
|
var path = __toESM(require("path"), 1);
|
|
35
35
|
var import_fs = require("fs");
|
|
36
36
|
var import_schemas = require("./schemas.js");
|
|
37
|
-
function isDextoManifest(manifest) {
|
|
38
|
-
return typeof manifest === "object" && manifest !== null && "customToolProviders" in manifest && Array.isArray(manifest.customToolProviders);
|
|
39
|
-
}
|
|
40
37
|
function loadClaudeCodePlugin(plugin) {
|
|
41
38
|
const warnings = [];
|
|
42
39
|
const commands = [];
|
|
43
40
|
const pluginName = plugin.manifest.name;
|
|
44
41
|
const pluginPath = plugin.path;
|
|
45
|
-
const format = plugin.format;
|
|
46
42
|
const commandsDir = path.join(pluginPath, "commands");
|
|
47
43
|
if ((0, import_fs.existsSync)(commandsDir)) {
|
|
48
44
|
const commandFiles = scanMarkdownFiles(commandsDir);
|
|
@@ -88,19 +84,10 @@ function loadClaudeCodePlugin(plugin) {
|
|
|
88
84
|
}
|
|
89
85
|
const mcpConfig = loadMcpConfig(pluginPath, pluginName, warnings);
|
|
90
86
|
checkUnsupportedFeatures(pluginPath, pluginName, warnings);
|
|
91
|
-
const customToolProviders = [];
|
|
92
|
-
if (format === "dexto" && isDextoManifest(plugin.manifest)) {
|
|
93
|
-
const providers = plugin.manifest.customToolProviders;
|
|
94
|
-
if (providers && providers.length > 0) {
|
|
95
|
-
customToolProviders.push(...providers);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
87
|
return {
|
|
99
88
|
manifest: plugin.manifest,
|
|
100
|
-
format,
|
|
101
89
|
commands,
|
|
102
90
|
mcpConfig,
|
|
103
|
-
customToolProviders,
|
|
104
91
|
warnings
|
|
105
92
|
};
|
|
106
93
|
}
|
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
* Plugin Loader
|
|
3
3
|
*
|
|
4
4
|
* Loads plugin contents including commands, skills, MCP configuration,
|
|
5
|
-
* and custom tool providers (Dexto-native plugins).
|
|
6
5
|
* Detects and warns about unsupported features (hooks, LSP).
|
|
7
6
|
*
|
|
8
|
-
* Supports
|
|
9
|
-
* - .claude-plugin
|
|
10
|
-
* - .dexto-plugin: Dexto-native format with extended features (customToolProviders)
|
|
7
|
+
* Supports Claude Code compatible plugins:
|
|
8
|
+
* - .claude-plugin
|
|
11
9
|
*/
|
|
12
10
|
import type { DiscoveredPlugin, LoadedPlugin } from './types.js';
|
|
13
11
|
/**
|
|
14
12
|
* Loads a discovered plugin's contents.
|
|
15
13
|
*
|
|
16
14
|
* @param plugin The discovered plugin to load
|
|
17
|
-
* @returns Loaded plugin with commands, MCP config, custom tool
|
|
15
|
+
* @returns Loaded plugin with commands, MCP config, custom tool factories, and warnings
|
|
18
16
|
*/
|
|
19
17
|
export declare function loadClaudeCodePlugin(plugin: DiscoveredPlugin): LoadedPlugin;
|
|
20
18
|
//# sourceMappingURL=load-plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/load-plugin.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"load-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/load-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAkC,MAAM,YAAY,CAAC;AAEjG;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,YAAY,CAqE3E"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
2
|
import { existsSync, readdirSync, readFileSync } from "fs";
|
|
3
3
|
import { PluginMCPConfigSchema } from "./schemas.js";
|
|
4
|
-
function isDextoManifest(manifest) {
|
|
5
|
-
return typeof manifest === "object" && manifest !== null && "customToolProviders" in manifest && Array.isArray(manifest.customToolProviders);
|
|
6
|
-
}
|
|
7
4
|
function loadClaudeCodePlugin(plugin) {
|
|
8
5
|
const warnings = [];
|
|
9
6
|
const commands = [];
|
|
10
7
|
const pluginName = plugin.manifest.name;
|
|
11
8
|
const pluginPath = plugin.path;
|
|
12
|
-
const format = plugin.format;
|
|
13
9
|
const commandsDir = path.join(pluginPath, "commands");
|
|
14
10
|
if (existsSync(commandsDir)) {
|
|
15
11
|
const commandFiles = scanMarkdownFiles(commandsDir);
|
|
@@ -55,19 +51,10 @@ function loadClaudeCodePlugin(plugin) {
|
|
|
55
51
|
}
|
|
56
52
|
const mcpConfig = loadMcpConfig(pluginPath, pluginName, warnings);
|
|
57
53
|
checkUnsupportedFeatures(pluginPath, pluginName, warnings);
|
|
58
|
-
const customToolProviders = [];
|
|
59
|
-
if (format === "dexto" && isDextoManifest(plugin.manifest)) {
|
|
60
|
-
const providers = plugin.manifest.customToolProviders;
|
|
61
|
-
if (providers && providers.length > 0) {
|
|
62
|
-
customToolProviders.push(...providers);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
54
|
return {
|
|
66
55
|
manifest: plugin.manifest,
|
|
67
|
-
format,
|
|
68
56
|
commands,
|
|
69
57
|
mcpConfig,
|
|
70
|
-
customToolProviders,
|
|
71
58
|
warnings
|
|
72
59
|
};
|
|
73
60
|
}
|
package/dist/plugins/schemas.cjs
CHANGED
|
@@ -18,7 +18,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var schemas_exports = {};
|
|
20
20
|
__export(schemas_exports, {
|
|
21
|
-
DextoPluginManifestSchema: () => DextoPluginManifestSchema,
|
|
22
21
|
InstalledPluginEntrySchema: () => InstalledPluginEntrySchema,
|
|
23
22
|
InstalledPluginsFileSchema: () => InstalledPluginsFileSchema,
|
|
24
23
|
PluginMCPConfigSchema: () => PluginMCPConfigSchema,
|
|
@@ -39,19 +38,11 @@ const PluginManifestSchema = import_zod.z.object({
|
|
|
39
38
|
version: import_zod.z.string().optional().describe("Semantic version (e.g., 1.0.0)"),
|
|
40
39
|
author: AuthorSchema.optional().describe("Plugin author - string or {name, email} object")
|
|
41
40
|
}).passthrough().describe("Claude Code plugin manifest from .claude-plugin/plugin.json");
|
|
42
|
-
const DextoPluginManifestSchema = import_zod.z.object({
|
|
43
|
-
name: import_zod.z.string().min(1).describe("Unique plugin name (used for namespacing commands)"),
|
|
44
|
-
description: import_zod.z.string().optional().describe("Human-readable plugin description"),
|
|
45
|
-
version: import_zod.z.string().optional().describe("Semantic version (e.g., 1.0.0)"),
|
|
46
|
-
author: AuthorSchema.optional().describe("Plugin author - string or {name, email} object"),
|
|
47
|
-
// Dexto-specific extensions
|
|
48
|
-
customToolProviders: import_zod.z.array(import_zod.z.string()).optional().describe('Custom tool provider types bundled with this plugin (e.g., ["plan-tools"])')
|
|
49
|
-
}).passthrough().describe("Dexto-native plugin manifest from .dexto-plugin/plugin.json");
|
|
50
41
|
const PluginMCPConfigSchema = import_zod.z.object({
|
|
51
42
|
mcpServers: import_zod.z.record(import_zod.z.unknown()).optional().describe("MCP servers to register")
|
|
52
43
|
}).passthrough().describe("MCP configuration from .mcp.json");
|
|
53
44
|
const InstalledPluginEntrySchema = import_zod.z.object({
|
|
54
|
-
scope: import_zod.z.enum(["project", "user", "local"
|
|
45
|
+
scope: import_zod.z.enum(["project", "user", "local"]).describe("Installation scope"),
|
|
55
46
|
installPath: import_zod.z.string().describe("Absolute path to the installed plugin"),
|
|
56
47
|
version: import_zod.z.string().optional().describe("Plugin version"),
|
|
57
48
|
installedAt: import_zod.z.string().optional().describe("ISO timestamp of installation"),
|
|
@@ -66,7 +57,6 @@ const InstalledPluginsFileSchema = import_zod.z.object({
|
|
|
66
57
|
}).passthrough().describe("Claude Code installed plugins manifest");
|
|
67
58
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68
59
|
0 && (module.exports = {
|
|
69
|
-
DextoPluginManifestSchema,
|
|
70
60
|
InstalledPluginEntrySchema,
|
|
71
61
|
InstalledPluginsFileSchema,
|
|
72
62
|
PluginMCPConfigSchema,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Zod schemas for plugin validation
|
|
3
3
|
*
|
|
4
|
-
* Supports
|
|
5
|
-
* - .claude-plugin/plugin.json
|
|
6
|
-
* - .dexto-plugin/plugin.json: Dexto-native format with extended features
|
|
4
|
+
* Supports Claude Code compatible plugins:
|
|
5
|
+
* - .claude-plugin/plugin.json
|
|
7
6
|
*/
|
|
8
7
|
import { z } from 'zod';
|
|
9
8
|
/**
|
|
@@ -53,56 +52,6 @@ export declare const PluginManifestSchema: z.ZodObject<{
|
|
|
53
52
|
email?: string | undefined;
|
|
54
53
|
}>]>>;
|
|
55
54
|
}, z.ZodTypeAny, "passthrough">>;
|
|
56
|
-
/**
|
|
57
|
-
* Schema for Dexto-native plugin.json manifest
|
|
58
|
-
* Extends Claude Code format with Dexto-specific features
|
|
59
|
-
*/
|
|
60
|
-
export declare const DextoPluginManifestSchema: z.ZodObject<{
|
|
61
|
-
name: z.ZodString;
|
|
62
|
-
description: z.ZodOptional<z.ZodString>;
|
|
63
|
-
version: z.ZodOptional<z.ZodString>;
|
|
64
|
-
author: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
65
|
-
name: z.ZodString;
|
|
66
|
-
email: z.ZodOptional<z.ZodString>;
|
|
67
|
-
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
name: string;
|
|
69
|
-
email?: string | undefined;
|
|
70
|
-
}, {
|
|
71
|
-
name: string;
|
|
72
|
-
email?: string | undefined;
|
|
73
|
-
}>]>>;
|
|
74
|
-
customToolProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
76
|
-
name: z.ZodString;
|
|
77
|
-
description: z.ZodOptional<z.ZodString>;
|
|
78
|
-
version: z.ZodOptional<z.ZodString>;
|
|
79
|
-
author: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
80
|
-
name: z.ZodString;
|
|
81
|
-
email: z.ZodOptional<z.ZodString>;
|
|
82
|
-
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
name: string;
|
|
84
|
-
email?: string | undefined;
|
|
85
|
-
}, {
|
|
86
|
-
name: string;
|
|
87
|
-
email?: string | undefined;
|
|
88
|
-
}>]>>;
|
|
89
|
-
customToolProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
90
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
91
|
-
name: z.ZodString;
|
|
92
|
-
description: z.ZodOptional<z.ZodString>;
|
|
93
|
-
version: z.ZodOptional<z.ZodString>;
|
|
94
|
-
author: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
95
|
-
name: z.ZodString;
|
|
96
|
-
email: z.ZodOptional<z.ZodString>;
|
|
97
|
-
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
name: string;
|
|
99
|
-
email?: string | undefined;
|
|
100
|
-
}, {
|
|
101
|
-
name: string;
|
|
102
|
-
email?: string | undefined;
|
|
103
|
-
}>]>>;
|
|
104
|
-
customToolProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
105
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
106
55
|
/**
|
|
107
56
|
* Schema for .mcp.json configuration
|
|
108
57
|
* Uses passthrough to allow unknown MCP server configurations
|
|
@@ -118,10 +67,6 @@ export declare const PluginMCPConfigSchema: z.ZodObject<{
|
|
|
118
67
|
* Type for validated Claude Code plugin manifest
|
|
119
68
|
*/
|
|
120
69
|
export type ValidatedPluginManifest = z.output<typeof PluginManifestSchema>;
|
|
121
|
-
/**
|
|
122
|
-
* Type for validated Dexto-native plugin manifest
|
|
123
|
-
*/
|
|
124
|
-
export type ValidatedDextoPluginManifest = z.output<typeof DextoPluginManifestSchema>;
|
|
125
70
|
/**
|
|
126
71
|
* Type for validated MCP config
|
|
127
72
|
*/
|
|
@@ -130,7 +75,7 @@ export type ValidatedPluginMCPConfig = z.output<typeof PluginMCPConfigSchema>;
|
|
|
130
75
|
* Schema for individual plugin installation entry in installed_plugins.json
|
|
131
76
|
*/
|
|
132
77
|
export declare const InstalledPluginEntrySchema: z.ZodObject<{
|
|
133
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
78
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
134
79
|
installPath: z.ZodString;
|
|
135
80
|
version: z.ZodOptional<z.ZodString>;
|
|
136
81
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -139,7 +84,7 @@ export declare const InstalledPluginEntrySchema: z.ZodObject<{
|
|
|
139
84
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
140
85
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
141
86
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
142
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
87
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
143
88
|
installPath: z.ZodString;
|
|
144
89
|
version: z.ZodOptional<z.ZodString>;
|
|
145
90
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -148,7 +93,7 @@ export declare const InstalledPluginEntrySchema: z.ZodObject<{
|
|
|
148
93
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
149
94
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
150
95
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
151
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
96
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
152
97
|
installPath: z.ZodString;
|
|
153
98
|
version: z.ZodOptional<z.ZodString>;
|
|
154
99
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -163,7 +108,7 @@ export declare const InstalledPluginEntrySchema: z.ZodObject<{
|
|
|
163
108
|
export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
164
109
|
version: z.ZodOptional<z.ZodNumber>;
|
|
165
110
|
plugins: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
166
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
111
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
167
112
|
installPath: z.ZodString;
|
|
168
113
|
version: z.ZodOptional<z.ZodString>;
|
|
169
114
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -172,7 +117,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
172
117
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
173
118
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
174
119
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
175
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
120
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
176
121
|
installPath: z.ZodString;
|
|
177
122
|
version: z.ZodOptional<z.ZodString>;
|
|
178
123
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -181,7 +126,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
181
126
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
182
127
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
183
128
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
184
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
129
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
185
130
|
installPath: z.ZodString;
|
|
186
131
|
version: z.ZodOptional<z.ZodString>;
|
|
187
132
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -193,7 +138,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
193
138
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
194
139
|
version: z.ZodOptional<z.ZodNumber>;
|
|
195
140
|
plugins: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
196
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
141
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
197
142
|
installPath: z.ZodString;
|
|
198
143
|
version: z.ZodOptional<z.ZodString>;
|
|
199
144
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -202,7 +147,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
202
147
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
203
148
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
204
149
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
205
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
150
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
206
151
|
installPath: z.ZodString;
|
|
207
152
|
version: z.ZodOptional<z.ZodString>;
|
|
208
153
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -211,7 +156,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
211
156
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
212
157
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
213
158
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
214
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
159
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
215
160
|
installPath: z.ZodString;
|
|
216
161
|
version: z.ZodOptional<z.ZodString>;
|
|
217
162
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -223,7 +168,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
223
168
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
224
169
|
version: z.ZodOptional<z.ZodNumber>;
|
|
225
170
|
plugins: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
226
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
171
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
227
172
|
installPath: z.ZodString;
|
|
228
173
|
version: z.ZodOptional<z.ZodString>;
|
|
229
174
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -232,7 +177,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
232
177
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
233
178
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
234
179
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
235
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
180
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
236
181
|
installPath: z.ZodString;
|
|
237
182
|
version: z.ZodOptional<z.ZodString>;
|
|
238
183
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -241,7 +186,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
|
|
|
241
186
|
projectPath: z.ZodOptional<z.ZodString>;
|
|
242
187
|
isLocal: z.ZodOptional<z.ZodBoolean>;
|
|
243
188
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
244
|
-
scope: z.ZodEnum<["project", "user", "local"
|
|
189
|
+
scope: z.ZodEnum<["project", "user", "local"]>;
|
|
245
190
|
installPath: z.ZodString;
|
|
246
191
|
version: z.ZodOptional<z.ZodString>;
|
|
247
192
|
installedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/plugins/schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/plugins/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQ2C,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;gCAKe,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAeG,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQgB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
package/dist/plugins/schemas.js
CHANGED
|
@@ -12,19 +12,11 @@ const PluginManifestSchema = z.object({
|
|
|
12
12
|
version: z.string().optional().describe("Semantic version (e.g., 1.0.0)"),
|
|
13
13
|
author: AuthorSchema.optional().describe("Plugin author - string or {name, email} object")
|
|
14
14
|
}).passthrough().describe("Claude Code plugin manifest from .claude-plugin/plugin.json");
|
|
15
|
-
const DextoPluginManifestSchema = z.object({
|
|
16
|
-
name: z.string().min(1).describe("Unique plugin name (used for namespacing commands)"),
|
|
17
|
-
description: z.string().optional().describe("Human-readable plugin description"),
|
|
18
|
-
version: z.string().optional().describe("Semantic version (e.g., 1.0.0)"),
|
|
19
|
-
author: AuthorSchema.optional().describe("Plugin author - string or {name, email} object"),
|
|
20
|
-
// Dexto-specific extensions
|
|
21
|
-
customToolProviders: z.array(z.string()).optional().describe('Custom tool provider types bundled with this plugin (e.g., ["plan-tools"])')
|
|
22
|
-
}).passthrough().describe("Dexto-native plugin manifest from .dexto-plugin/plugin.json");
|
|
23
15
|
const PluginMCPConfigSchema = z.object({
|
|
24
16
|
mcpServers: z.record(z.unknown()).optional().describe("MCP servers to register")
|
|
25
17
|
}).passthrough().describe("MCP configuration from .mcp.json");
|
|
26
18
|
const InstalledPluginEntrySchema = z.object({
|
|
27
|
-
scope: z.enum(["project", "user", "local"
|
|
19
|
+
scope: z.enum(["project", "user", "local"]).describe("Installation scope"),
|
|
28
20
|
installPath: z.string().describe("Absolute path to the installed plugin"),
|
|
29
21
|
version: z.string().optional().describe("Plugin version"),
|
|
30
22
|
installedAt: z.string().optional().describe("ISO timestamp of installation"),
|
|
@@ -38,7 +30,6 @@ const InstalledPluginsFileSchema = z.object({
|
|
|
38
30
|
plugins: z.record(z.array(InstalledPluginEntrySchema)).describe("Map of plugin identifiers to installation entries")
|
|
39
31
|
}).passthrough().describe("Claude Code installed plugins manifest");
|
|
40
32
|
export {
|
|
41
|
-
DextoPluginManifestSchema,
|
|
42
33
|
InstalledPluginEntrySchema,
|
|
43
34
|
InstalledPluginsFileSchema,
|
|
44
35
|
PluginMCPConfigSchema,
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -32,18 +32,6 @@ export interface PluginManifest {
|
|
|
32
32
|
version?: string | undefined;
|
|
33
33
|
author?: PluginAuthor | undefined;
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
* Dexto-native plugin manifest from .dexto-plugin/plugin.json
|
|
37
|
-
* Extends PluginManifest with Dexto-specific features
|
|
38
|
-
*/
|
|
39
|
-
export interface DextoPluginManifest extends PluginManifest {
|
|
40
|
-
/** Custom tool provider types bundled with this plugin (e.g., ["plan-tools"]) */
|
|
41
|
-
customToolProviders?: string[] | undefined;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Plugin format type
|
|
45
|
-
*/
|
|
46
|
-
export type PluginFormat = 'claude-code' | 'dexto';
|
|
47
35
|
/**
|
|
48
36
|
* A discovered plugin directory with its manifest
|
|
49
37
|
*/
|
|
@@ -51,11 +39,9 @@ export interface DiscoveredPlugin {
|
|
|
51
39
|
/** Absolute path to plugin directory */
|
|
52
40
|
path: string;
|
|
53
41
|
/** Parsed and validated plugin manifest */
|
|
54
|
-
manifest: PluginManifest
|
|
42
|
+
manifest: PluginManifest;
|
|
55
43
|
/** Source location type */
|
|
56
44
|
source: 'project' | 'user';
|
|
57
|
-
/** Plugin format (claude-code or dexto) */
|
|
58
|
-
format: PluginFormat;
|
|
59
45
|
}
|
|
60
46
|
/**
|
|
61
47
|
* A command or skill discovered within a plugin
|
|
@@ -80,15 +66,11 @@ export interface PluginMCPConfig {
|
|
|
80
66
|
*/
|
|
81
67
|
export interface LoadedPlugin {
|
|
82
68
|
/** Plugin manifest metadata */
|
|
83
|
-
manifest: PluginManifest
|
|
84
|
-
/** Plugin format (claude-code or dexto) */
|
|
85
|
-
format: PluginFormat;
|
|
69
|
+
manifest: PluginManifest;
|
|
86
70
|
/** Discovered commands and skills */
|
|
87
71
|
commands: PluginCommand[];
|
|
88
72
|
/** MCP servers to merge into agent config */
|
|
89
73
|
mcpConfig?: PluginMCPConfig | undefined;
|
|
90
|
-
/** Custom tool provider types to register (Dexto-native plugins only) */
|
|
91
|
-
customToolProviders: string[];
|
|
92
74
|
/** Warnings for unsupported features found */
|
|
93
75
|
warnings: string[];
|
|
94
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACrC;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,wCAAwC;IACxC,IAAI,EAAE,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