@dexto/agent-management 1.5.8 → 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 +0 -11
- 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 +0 -11
- 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 +32 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -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/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/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-factories/agent-spawner/llm-resolution.d.ts.map +1 -0
- package/dist/{tool-provider/runtime-service.cjs → tool-factories/agent-spawner/runtime.cjs} +33 -71
- package/dist/{tool-provider/runtime-service.d.ts → tool-factories/agent-spawner/runtime.d.ts} +6 -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} +29 -67
- 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/writer.d.ts +2 -1
- package/dist/writer.d.ts.map +1 -1
- package/package.json +6 -4
- 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 -197
- package/dist/tool-provider/tool-provider.d.ts +0 -30
- package/dist/tool-provider/tool-provider.d.ts.map +0 -1
- package/dist/tool-provider/tool-provider.js +0 -180
- 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}/llm-resolution.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.d.ts +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.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
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export { writeConfigFile, writeLLMPreferences, writePreferencesToAgent, type LLM
|
|
|
12
12
|
export { AgentManager, type AgentMetadata } from './AgentManager.js';
|
|
13
13
|
export { installBundledAgent, installCustomAgent, uninstallAgent, listInstalledAgents, type InstallOptions, } from './installation.js';
|
|
14
14
|
export { AgentFactory, type CreateAgentOptions } from './AgentFactory.js';
|
|
15
|
+
export { createDextoAgentFromConfig } from './agent-creation.js';
|
|
16
|
+
export { getDefaultImageStoreDir, getImageRegistryPath, getImagePackagesDir, getImagePackageInstallDir, loadImageRegistry, saveImageRegistry, parseImageSpecifier, isFileLikeImageSpecifier, resolveFileLikeImageSpecifierToPath, resolveFileLikeImageSpecifierToFileUrl, resolveImageEntryFileFromStore, setActiveImageVersion, removeImageFromStore, type ImageRegistryFile, type ImageSpecifierParts, } from './images/image-store.js';
|
|
15
17
|
export { getDextoPath, getDextoGlobalPath, getDextoEnvPath, copyDirectory, isPath, findPackageRoot, resolveBundledScript, ensureDextoGlobalDirectory, } from './utils/path.js';
|
|
16
18
|
export { getExecutionContext, findDextoSourceRoot, findDextoProjectRoot, type ExecutionContext, } from './utils/execution-context.js';
|
|
17
19
|
export { walkUpDirectories } from './utils/fs-walk.js';
|
|
@@ -24,6 +26,6 @@ export { resolveApiKeyForProvider, getPrimaryApiKeyEnvVar, PROVIDER_API_KEY_MAP,
|
|
|
24
26
|
export { loadCustomModels, saveCustomModel, deleteCustomModel, getCustomModel, getCustomModelsPath, CustomModelSchema, CUSTOM_MODEL_PROVIDERS, type CustomModel, type CustomModelProvider, } from './models/custom-models.js';
|
|
25
27
|
export { getModelsDirectory, getModelFilePath, getModelDirectory, getModelStatePath, getModelTempDirectory, ensureModelsDirectory, ensureModelDirectory, modelFileExists, getModelFileSize, deleteModelDirectory, listModelDirectories, getModelsDiskUsage, formatSize, type ModelSource, type InstalledModel, type ModelState, loadModelState, saveModelState, addInstalledModel, removeInstalledModel, getInstalledModel, getAllInstalledModels, isModelInstalled, updateModelLastUsed, setActiveModel, getActiveModelId, getActiveModel, addToDownloadQueue, removeFromDownloadQueue, getDownloadQueue, syncStateWithFilesystem, getTotalInstalledSize, getInstalledModelCount, registerManualModel, } from './models/index.js';
|
|
26
28
|
export * from './runtime/index.js';
|
|
27
|
-
export * from './tool-
|
|
29
|
+
export * from './tool-factories/agent-spawner/index.js';
|
|
28
30
|
export { discoverClaudeCodePlugins, getPluginSearchPaths, loadClaudeCodePlugin, validatePluginDirectory, tryLoadManifest, listInstalledPlugins, getDextoInstalledPluginsPath, installPluginFromPath, loadDextoInstalledPlugins, saveDextoInstalledPlugins, isPluginInstalled, uninstallPlugin, PluginManifestSchema, PluginMCPConfigSchema, PluginErrorCode, PluginError, DEFAULT_MARKETPLACES, addMarketplace, removeMarketplace, updateMarketplace, listMarketplaces, listAllMarketplacePlugins, installPluginFromMarketplace, getUninstalledDefaults, isDefaultMarketplace, MarketplaceErrorCode, MarketplaceError, type PluginManifest, type DiscoveredPlugin, type PluginCommand, type PluginMCPConfig, type LoadedPlugin, type PluginInstallScope, type InstalledPluginEntry, type InstalledPluginsFile, type ListedPlugin, type PluginValidationResult, type PluginInstallResult, type PluginUninstallResult, type ValidatedPluginManifest, type ValidatedPluginMCPConfig, type InstallPluginOptions, type UninstallPluginOptions, type MarketplaceEntry, type MarketplacePlugin, type MarketplaceAddResult, type MarketplaceUpdateResult, type MarketplaceInstallResult, } from './plugins/index.js';
|
|
29
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACrF,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EACH,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAChC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG/E,OAAO,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAG/E,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,YAAY,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE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B,qBAAqB,EAErB,eAAe,EACf,WAAW,EAEX,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,4BAA4B,EAC5B,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAEhB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAE3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAChC,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,22 @@ import {
|
|
|
32
32
|
listInstalledAgents
|
|
33
33
|
} from "./installation.js";
|
|
34
34
|
import { AgentFactory } from "./AgentFactory.js";
|
|
35
|
+
import { createDextoAgentFromConfig } from "./agent-creation.js";
|
|
36
|
+
import {
|
|
37
|
+
getDefaultImageStoreDir,
|
|
38
|
+
getImageRegistryPath,
|
|
39
|
+
getImagePackagesDir,
|
|
40
|
+
getImagePackageInstallDir,
|
|
41
|
+
loadImageRegistry,
|
|
42
|
+
saveImageRegistry,
|
|
43
|
+
parseImageSpecifier,
|
|
44
|
+
isFileLikeImageSpecifier,
|
|
45
|
+
resolveFileLikeImageSpecifierToPath,
|
|
46
|
+
resolveFileLikeImageSpecifierToFileUrl,
|
|
47
|
+
resolveImageEntryFileFromStore,
|
|
48
|
+
setActiveImageVersion,
|
|
49
|
+
removeImageFromStore
|
|
50
|
+
} from "./images/image-store.js";
|
|
35
51
|
import {
|
|
36
52
|
getDextoPath,
|
|
37
53
|
getDextoGlobalPath,
|
|
@@ -124,7 +140,7 @@ import {
|
|
|
124
140
|
registerManualModel
|
|
125
141
|
} from "./models/index.js";
|
|
126
142
|
export * from "./runtime/index.js";
|
|
127
|
-
export * from "./tool-
|
|
143
|
+
export * from "./tool-factories/agent-spawner/index.js";
|
|
128
144
|
import {
|
|
129
145
|
discoverClaudeCodePlugins,
|
|
130
146
|
getPluginSearchPaths,
|
|
@@ -181,6 +197,7 @@ export {
|
|
|
181
197
|
agentPreferencesExist,
|
|
182
198
|
canUseDextoProvider,
|
|
183
199
|
copyDirectory,
|
|
200
|
+
createDextoAgentFromConfig,
|
|
184
201
|
createInitialPreferences,
|
|
185
202
|
deleteCustomModel,
|
|
186
203
|
deleteModelDirectory,
|
|
@@ -204,6 +221,7 @@ export {
|
|
|
204
221
|
getAllInstalledModels,
|
|
205
222
|
getCustomModel,
|
|
206
223
|
getCustomModelsPath,
|
|
224
|
+
getDefaultImageStoreDir,
|
|
207
225
|
getDextoApiKeyFromAuth,
|
|
208
226
|
getDextoEnvPath,
|
|
209
227
|
getDextoGlobalPath,
|
|
@@ -212,6 +230,9 @@ export {
|
|
|
212
230
|
getDownloadQueue,
|
|
213
231
|
getExecutionContext,
|
|
214
232
|
getGlobalPreferencesPath,
|
|
233
|
+
getImagePackageInstallDir,
|
|
234
|
+
getImagePackagesDir,
|
|
235
|
+
getImageRegistryPath,
|
|
215
236
|
getInstalledModel,
|
|
216
237
|
getInstalledModelCount,
|
|
217
238
|
getModelDirectory,
|
|
@@ -234,6 +255,7 @@ export {
|
|
|
234
255
|
isDefaultMarketplace,
|
|
235
256
|
isDextoAuthEnabled,
|
|
236
257
|
isDextoAuthenticated,
|
|
258
|
+
isFileLikeImageSpecifier,
|
|
237
259
|
isModelInstalled,
|
|
238
260
|
isPath,
|
|
239
261
|
isPluginInstalled,
|
|
@@ -250,11 +272,14 @@ export {
|
|
|
250
272
|
loadCustomModels,
|
|
251
273
|
loadDextoInstalledPlugins,
|
|
252
274
|
loadGlobalPreferences,
|
|
275
|
+
loadImageRegistry,
|
|
253
276
|
loadModelState,
|
|
254
277
|
modelFileExists,
|
|
278
|
+
parseImageSpecifier,
|
|
255
279
|
registerManualModel,
|
|
256
280
|
reloadAgentConfigFromFile,
|
|
257
281
|
removeFromDownloadQueue,
|
|
282
|
+
removeImageFromStore,
|
|
258
283
|
removeInstalledModel,
|
|
259
284
|
removeMarketplace,
|
|
260
285
|
removeMcpServerFromConfig,
|
|
@@ -262,12 +287,17 @@ export {
|
|
|
262
287
|
resolveAgentPath,
|
|
263
288
|
resolveApiKeyForProvider,
|
|
264
289
|
resolveBundledScript,
|
|
290
|
+
resolveFileLikeImageSpecifierToFileUrl,
|
|
291
|
+
resolveFileLikeImageSpecifierToPath,
|
|
292
|
+
resolveImageEntryFileFromStore,
|
|
265
293
|
saveAgentPreferences,
|
|
266
294
|
saveCustomModel,
|
|
267
295
|
saveDextoInstalledPlugins,
|
|
268
296
|
saveGlobalPreferences,
|
|
297
|
+
saveImageRegistry,
|
|
269
298
|
saveModelState,
|
|
270
299
|
saveProviderApiKey,
|
|
300
|
+
setActiveImageVersion,
|
|
271
301
|
setActiveModel,
|
|
272
302
|
syncStateWithFilesystem,
|
|
273
303
|
tryLoadManifest,
|
|
@@ -64,18 +64,12 @@ function discoverClaudeCodePlugins(projectPath, bundledPluginPaths) {
|
|
|
64
64
|
if (!entry.isDirectory()) continue;
|
|
65
65
|
if (entry.name === "cache" || entry.name === "marketplaces") continue;
|
|
66
66
|
const pluginPath = path.join(dir, entry.name);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
loadResult = (0, import_validate_plugin.tryLoadManifest)(pluginPath, true);
|
|
70
|
-
} catch {
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
if (loadResult) {
|
|
67
|
+
const manifest = (0, import_validate_plugin.tryLoadManifest)(pluginPath);
|
|
68
|
+
if (manifest) {
|
|
74
69
|
addPlugin({
|
|
75
70
|
path: pluginPath,
|
|
76
|
-
manifest
|
|
77
|
-
source
|
|
78
|
-
format: loadResult.format
|
|
71
|
+
manifest,
|
|
72
|
+
source
|
|
79
73
|
});
|
|
80
74
|
}
|
|
81
75
|
}
|
|
@@ -89,19 +83,13 @@ function discoverClaudeCodePlugins(projectPath, bundledPluginPaths) {
|
|
|
89
83
|
if (!(0, import_fs.existsSync)(pluginPath)) {
|
|
90
84
|
continue;
|
|
91
85
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
loadResult = (0, import_validate_plugin.tryLoadManifest)(pluginPath, true);
|
|
95
|
-
} catch {
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
if (loadResult) {
|
|
86
|
+
const manifest = (0, import_validate_plugin.tryLoadManifest)(pluginPath);
|
|
87
|
+
if (manifest) {
|
|
99
88
|
addPlugin({
|
|
100
89
|
path: pluginPath,
|
|
101
|
-
manifest
|
|
102
|
-
source: "user"
|
|
90
|
+
manifest,
|
|
91
|
+
source: "user"
|
|
103
92
|
// Treat as user-level since they come from image
|
|
104
|
-
format: loadResult.format
|
|
105
93
|
});
|
|
106
94
|
}
|
|
107
95
|
}
|
|
@@ -121,7 +109,9 @@ function readInstalledPluginsFile(filePath, currentProjectPath) {
|
|
|
121
109
|
return plugins;
|
|
122
110
|
}
|
|
123
111
|
const installedPlugins = result.data;
|
|
124
|
-
|
|
112
|
+
const pluginsById = installedPlugins.plugins;
|
|
113
|
+
for (const pluginId of Object.keys(pluginsById)) {
|
|
114
|
+
const installations = pluginsById[pluginId] ?? [];
|
|
125
115
|
for (const installation of installations) {
|
|
126
116
|
const { scope, installPath, projectPath } = installation;
|
|
127
117
|
if (!(0, import_fs.existsSync)(installPath)) {
|
|
@@ -134,19 +124,13 @@ function readInstalledPluginsFile(filePath, currentProjectPath) {
|
|
|
134
124
|
continue;
|
|
135
125
|
}
|
|
136
126
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
loadResult = (0, import_validate_plugin.tryLoadManifest)(installPath, true);
|
|
140
|
-
} catch {
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
|
-
if (loadResult) {
|
|
127
|
+
const manifest = (0, import_validate_plugin.tryLoadManifest)(installPath);
|
|
128
|
+
if (manifest) {
|
|
144
129
|
const source = scope === "project" || scope === "local" ? "project" : "user";
|
|
145
130
|
plugins.push({
|
|
146
131
|
path: installPath,
|
|
147
|
-
manifest
|
|
148
|
-
source
|
|
149
|
-
format: loadResult.format
|
|
132
|
+
manifest,
|
|
133
|
+
source
|
|
150
134
|
});
|
|
151
135
|
}
|
|
152
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover-plugins.d.ts","sourceRoot":"","sources":["../../src/plugins/discover-plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"discover-plugins.d.ts","sourceRoot":"","sources":["../../src/plugins/discover-plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACrC,WAAW,CAAC,EAAE,MAAM,EACpB,kBAAkB,CAAC,EAAE,MAAM,EAAE,GAC9B,gBAAgB,EAAE,CAmFpB;AAmFD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAU/C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}
|
|
@@ -29,18 +29,12 @@ function discoverClaudeCodePlugins(projectPath, bundledPluginPaths) {
|
|
|
29
29
|
if (!entry.isDirectory()) continue;
|
|
30
30
|
if (entry.name === "cache" || entry.name === "marketplaces") continue;
|
|
31
31
|
const pluginPath = path.join(dir, entry.name);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
loadResult = tryLoadManifest(pluginPath, true);
|
|
35
|
-
} catch {
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if (loadResult) {
|
|
32
|
+
const manifest = tryLoadManifest(pluginPath);
|
|
33
|
+
if (manifest) {
|
|
39
34
|
addPlugin({
|
|
40
35
|
path: pluginPath,
|
|
41
|
-
manifest
|
|
42
|
-
source
|
|
43
|
-
format: loadResult.format
|
|
36
|
+
manifest,
|
|
37
|
+
source
|
|
44
38
|
});
|
|
45
39
|
}
|
|
46
40
|
}
|
|
@@ -54,19 +48,13 @@ function discoverClaudeCodePlugins(projectPath, bundledPluginPaths) {
|
|
|
54
48
|
if (!existsSync(pluginPath)) {
|
|
55
49
|
continue;
|
|
56
50
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
loadResult = tryLoadManifest(pluginPath, true);
|
|
60
|
-
} catch {
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
if (loadResult) {
|
|
51
|
+
const manifest = tryLoadManifest(pluginPath);
|
|
52
|
+
if (manifest) {
|
|
64
53
|
addPlugin({
|
|
65
54
|
path: pluginPath,
|
|
66
|
-
manifest
|
|
67
|
-
source: "user"
|
|
55
|
+
manifest,
|
|
56
|
+
source: "user"
|
|
68
57
|
// Treat as user-level since they come from image
|
|
69
|
-
format: loadResult.format
|
|
70
58
|
});
|
|
71
59
|
}
|
|
72
60
|
}
|
|
@@ -86,7 +74,9 @@ function readInstalledPluginsFile(filePath, currentProjectPath) {
|
|
|
86
74
|
return plugins;
|
|
87
75
|
}
|
|
88
76
|
const installedPlugins = result.data;
|
|
89
|
-
|
|
77
|
+
const pluginsById = installedPlugins.plugins;
|
|
78
|
+
for (const pluginId of Object.keys(pluginsById)) {
|
|
79
|
+
const installations = pluginsById[pluginId] ?? [];
|
|
90
80
|
for (const installation of installations) {
|
|
91
81
|
const { scope, installPath, projectPath } = installation;
|
|
92
82
|
if (!existsSync(installPath)) {
|
|
@@ -99,19 +89,13 @@ function readInstalledPluginsFile(filePath, currentProjectPath) {
|
|
|
99
89
|
continue;
|
|
100
90
|
}
|
|
101
91
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
loadResult = tryLoadManifest(installPath, true);
|
|
105
|
-
} catch {
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
if (loadResult) {
|
|
92
|
+
const manifest = tryLoadManifest(installPath);
|
|
93
|
+
if (manifest) {
|
|
109
94
|
const source = scope === "project" || scope === "local" ? "project" : "user";
|
|
110
95
|
plugins.push({
|
|
111
96
|
path: installPath,
|
|
112
|
-
manifest
|
|
113
|
-
source
|
|
114
|
-
format: loadResult.format
|
|
97
|
+
manifest,
|
|
98
|
+
source
|
|
115
99
|
});
|
|
116
100
|
}
|
|
117
101
|
}
|
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,EAC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EhB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,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,
|