@dexto/agent-management 1.7.1 → 1.8.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/agent-creation.cjs +6 -2
- package/dist/agent-creation.d.ts.map +1 -1
- package/dist/agent-creation.js +6 -2
- package/dist/config/config-enrichment.cjs +1 -16
- package/dist/config/config-enrichment.d.ts.map +1 -1
- package/dist/config/config-enrichment.js +2 -21
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/plugins/discover-skills.d.ts +2 -3
- package/dist/plugins/discover-skills.d.ts.map +1 -1
- package/dist/plugins/index.cjs +6 -0
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +4 -0
- package/dist/plugins/local-skill-source.cjs +104 -0
- package/dist/plugins/local-skill-source.d.ts +20 -0
- package/dist/plugins/local-skill-source.d.ts.map +1 -0
- package/dist/plugins/local-skill-source.js +70 -0
- package/dist/plugins/local-skill-sources.cjs +74 -0
- package/dist/plugins/local-skill-sources.d.ts +7 -0
- package/dist/plugins/local-skill-sources.d.ts.map +1 -0
- package/dist/plugins/local-skill-sources.js +40 -0
- package/dist/plugins/types.d.ts +1 -1
- package/dist/tool-factories/agent-spawner/factory.cjs +2 -4
- package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/factory.js +2 -4
- package/dist/tool-factories/agent-spawner/runtime.cjs +4 -9
- package/dist/tool-factories/agent-spawner/runtime.d.ts +3 -3
- package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -1
- package/dist/tool-factories/agent-spawner/runtime.js +4 -9
- package/dist/tool-factories/creator-tools/factory.cjs +49 -146
- package/dist/tool-factories/creator-tools/factory.d.ts.map +1 -1
- package/dist/tool-factories/creator-tools/factory.js +50 -148
- package/package.json +5 -5
package/dist/agent-creation.cjs
CHANGED
|
@@ -80,14 +80,18 @@ async function createDextoAgentFromConfig(options) {
|
|
|
80
80
|
enrichedConfig.agentId = agentIdOverride;
|
|
81
81
|
}
|
|
82
82
|
const validatedConfig = import_agent_config.AgentConfigSchema.parse(enrichedConfig);
|
|
83
|
-
const
|
|
83
|
+
const resolvedHostContext = {
|
|
84
|
+
...hostContext ?? {},
|
|
85
|
+
...enrichOptions?.workspaceRoot ? { workspaceRoot: enrichOptions.workspaceRoot } : {}
|
|
86
|
+
};
|
|
87
|
+
const services = await (0, import_agent_config.resolveServicesFromConfig)(validatedConfig, image, resolvedHostContext);
|
|
84
88
|
const mergedOverrides = overrides ? { ...overrides } : void 0;
|
|
85
89
|
return new import_core.DextoAgent(
|
|
86
90
|
(0, import_agent_config.toDextoAgentOptions)({
|
|
87
91
|
config: validatedConfig,
|
|
88
92
|
services,
|
|
89
93
|
image,
|
|
90
|
-
|
|
94
|
+
hostContext: resolvedHostContext,
|
|
91
95
|
...runtimeOverrides ? { runtimeOverrides } : {},
|
|
92
96
|
overrides: mergedOverrides
|
|
93
97
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-creation.d.ts","sourceRoot":"","sources":["../src/agent-creation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAc,MAAM,qBAAqB,CAAC;AASrF,OAAO,EACH,UAAU,EAEV,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EACjC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAGrF,KAAK,iCAAiC,GAAG;IACrC,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACrD,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,GAAG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A8CrB"}
|
package/dist/agent-creation.js
CHANGED
|
@@ -67,14 +67,18 @@ async function createDextoAgentFromConfig(options) {
|
|
|
67
67
|
enrichedConfig.agentId = agentIdOverride;
|
|
68
68
|
}
|
|
69
69
|
const validatedConfig = AgentConfigSchema.parse(enrichedConfig);
|
|
70
|
-
const
|
|
70
|
+
const resolvedHostContext = {
|
|
71
|
+
...hostContext ?? {},
|
|
72
|
+
...enrichOptions?.workspaceRoot ? { workspaceRoot: enrichOptions.workspaceRoot } : {}
|
|
73
|
+
};
|
|
74
|
+
const services = await resolveServicesFromConfig(validatedConfig, image, resolvedHostContext);
|
|
71
75
|
const mergedOverrides = overrides ? { ...overrides } : void 0;
|
|
72
76
|
return new DextoAgent(
|
|
73
77
|
toDextoAgentOptions({
|
|
74
78
|
config: validatedConfig,
|
|
75
79
|
services,
|
|
76
80
|
image,
|
|
77
|
-
|
|
81
|
+
hostContext: resolvedHostContext,
|
|
78
82
|
...runtimeOverrides ? { runtimeOverrides } : {},
|
|
79
83
|
overrides: mergedOverrides
|
|
80
84
|
})
|
|
@@ -156,6 +156,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
156
156
|
console.warn(`[plugin] ${warning}`);
|
|
157
157
|
}
|
|
158
158
|
for (const cmd of loaded.commands) {
|
|
159
|
+
if (cmd.isSkill) continue;
|
|
159
160
|
const resolvedPath = path.resolve(cmd.file);
|
|
160
161
|
if (existingPromptPaths.has(resolvedPath)) {
|
|
161
162
|
continue;
|
|
@@ -176,22 +177,6 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
176
177
|
};
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
|
-
const standaloneSkills = (0, import_plugins.discoverStandaloneSkills)(workspaceRoot);
|
|
180
|
-
for (const skill of standaloneSkills) {
|
|
181
|
-
const resolvedPath = path.resolve(skill.skillFile);
|
|
182
|
-
if (existingPromptPaths.has(resolvedPath)) {
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
existingPromptPaths.add(resolvedPath);
|
|
186
|
-
const promptEntry = {
|
|
187
|
-
type: "file",
|
|
188
|
-
file: skill.skillFile
|
|
189
|
-
// No namespace for standalone skills - they use id directly
|
|
190
|
-
// (unlike plugin commands which need plugin:command naming)
|
|
191
|
-
};
|
|
192
|
-
enriched.prompts = enriched.prompts ?? [];
|
|
193
|
-
enriched.prompts.push(promptEntry);
|
|
194
|
-
}
|
|
195
180
|
}
|
|
196
181
|
const shouldDiscoverAgentInstructions = config.agentFile?.discoverInCwd !== void 0 ? config.agentFile.discoverInCwd : true;
|
|
197
182
|
const instructionFile = shouldDiscoverAgentInstructions ? (0, import_discover_prompts.discoverAgentInstructionFile)(workspaceRoot) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-enrichment.d.ts","sourceRoot":"","sources":["../../src/config/config-enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"config-enrichment.d.ts","sourceRoot":"","sources":["../../src/config/config-enrichment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOvD,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAoC9E;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,mGAAmG;IACnG,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAuBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC7B,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,wBAAwB,GAAG,OAAY,GACjD,WAAW,CAmOb"}
|
|
@@ -2,11 +2,7 @@ import { getDextoPath } from "../utils/path.js";
|
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import { discoverCommandPrompts, discoverAgentInstructionFile } from "./discover-prompts.js";
|
|
4
4
|
import { findDextoProjectRoot } from "../utils/execution-context.js";
|
|
5
|
-
import {
|
|
6
|
-
discoverClaudeCodePlugins,
|
|
7
|
-
loadClaudeCodePlugin,
|
|
8
|
-
discoverStandaloneSkills
|
|
9
|
-
} from "../plugins/index.js";
|
|
5
|
+
import { discoverClaudeCodePlugins, loadClaudeCodePlugin } from "../plugins/index.js";
|
|
10
6
|
import { discoverCommandPrompts as discoverCommandPrompts2, discoverAgentInstructionFile as discoverAgentInstructionFile2 } from "./discover-prompts.js";
|
|
11
7
|
function deriveAgentId(config, configPath) {
|
|
12
8
|
if (config.agentId) {
|
|
@@ -124,6 +120,7 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
124
120
|
console.warn(`[plugin] ${warning}`);
|
|
125
121
|
}
|
|
126
122
|
for (const cmd of loaded.commands) {
|
|
123
|
+
if (cmd.isSkill) continue;
|
|
127
124
|
const resolvedPath = path.resolve(cmd.file);
|
|
128
125
|
if (existingPromptPaths.has(resolvedPath)) {
|
|
129
126
|
continue;
|
|
@@ -144,22 +141,6 @@ function enrichAgentConfig(config, configPath, options = {}) {
|
|
|
144
141
|
};
|
|
145
142
|
}
|
|
146
143
|
}
|
|
147
|
-
const standaloneSkills = discoverStandaloneSkills(workspaceRoot);
|
|
148
|
-
for (const skill of standaloneSkills) {
|
|
149
|
-
const resolvedPath = path.resolve(skill.skillFile);
|
|
150
|
-
if (existingPromptPaths.has(resolvedPath)) {
|
|
151
|
-
continue;
|
|
152
|
-
}
|
|
153
|
-
existingPromptPaths.add(resolvedPath);
|
|
154
|
-
const promptEntry = {
|
|
155
|
-
type: "file",
|
|
156
|
-
file: skill.skillFile
|
|
157
|
-
// No namespace for standalone skills - they use id directly
|
|
158
|
-
// (unlike plugin commands which need plugin:command naming)
|
|
159
|
-
};
|
|
160
|
-
enriched.prompts = enriched.prompts ?? [];
|
|
161
|
-
enriched.prompts.push(promptEntry);
|
|
162
|
-
}
|
|
163
144
|
}
|
|
164
145
|
const shouldDiscoverAgentInstructions = config.agentFile?.discoverInCwd !== void 0 ? config.agentFile.discoverInCwd : true;
|
|
165
146
|
const instructionFile = shouldDiscoverAgentInstructions ? discoverAgentInstructionFile(workspaceRoot) : null;
|
package/dist/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
ConfigErrorCode: () => import_config.ConfigErrorCode,
|
|
27
27
|
CustomModelSchema: () => import_custom_models.CustomModelSchema,
|
|
28
28
|
DEFAULT_MARKETPLACES: () => import_plugins.DEFAULT_MARKETPLACES,
|
|
29
|
+
LocalSkillSource: () => import_plugins.LocalSkillSource,
|
|
29
30
|
MODEL_PICKER_FAVORITES_LIMIT: () => import_models.MODEL_PICKER_FAVORITES_LIMIT,
|
|
30
31
|
MODEL_PICKER_RECENTS_LIMIT: () => import_models.MODEL_PICKER_RECENTS_LIMIT,
|
|
31
32
|
MODEL_PICKER_STATE_VERSION: () => import_models.MODEL_PICKER_STATE_VERSION,
|
|
@@ -53,6 +54,7 @@ __export(index_exports, {
|
|
|
53
54
|
copyDirectory: () => import_path.copyDirectory,
|
|
54
55
|
createDextoAgentFromConfig: () => import_agent_creation.createDextoAgentFromConfig,
|
|
55
56
|
createInitialPreferences: () => import_loader.createInitialPreferences,
|
|
57
|
+
createLocalSkillSources: () => import_plugins.createLocalSkillSources,
|
|
56
58
|
deleteCustomModel: () => import_custom_models.deleteCustomModel,
|
|
57
59
|
deleteModelDirectory: () => import_models.deleteModelDirectory,
|
|
58
60
|
deletePromptByMetadata: () => import_config.deletePromptByMetadata,
|
|
@@ -235,6 +237,7 @@ var import_plugins = require("./plugins/index.js");
|
|
|
235
237
|
ConfigErrorCode,
|
|
236
238
|
CustomModelSchema,
|
|
237
239
|
DEFAULT_MARKETPLACES,
|
|
240
|
+
LocalSkillSource,
|
|
238
241
|
MODEL_PICKER_FAVORITES_LIMIT,
|
|
239
242
|
MODEL_PICKER_RECENTS_LIMIT,
|
|
240
243
|
MODEL_PICKER_STATE_VERSION,
|
|
@@ -262,6 +265,7 @@ var import_plugins = require("./plugins/index.js");
|
|
|
262
265
|
copyDirectory,
|
|
263
266
|
createDextoAgentFromConfig,
|
|
264
267
|
createInitialPreferences,
|
|
268
|
+
createLocalSkillSources,
|
|
265
269
|
deleteCustomModel,
|
|
266
270
|
deleteModelDirectory,
|
|
267
271
|
deletePromptByMetadata,
|
package/dist/index.d.ts
CHANGED
|
@@ -29,5 +29,5 @@ export { getModelsDirectory, getModelFilePath, getModelDirectory, getModelStateP
|
|
|
29
29
|
export * from './runtime/index.js';
|
|
30
30
|
export * from './tool-factories/agent-spawner/index.js';
|
|
31
31
|
export * from './tool-factories/creator-tools/index.js';
|
|
32
|
-
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';
|
|
32
|
+
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, createLocalSkillSources, LocalSkillSource, 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 CreateLocalSkillSourcesOptions, type LocalSkillRoot, type MarketplaceEntry, type MarketplacePlugin, type MarketplaceAddResult, type MarketplaceUpdateResult, type MarketplaceInstallResult, } from './plugins/index.js';
|
|
33
33
|
//# 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,EAA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,EAErB,eAAe,EACf,WAAW,EAEX,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,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,EAC3B,KAAK,8BAA8B,EACnC,KAAK,cAAc,EAEnB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAChC,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -199,6 +199,8 @@ import {
|
|
|
199
199
|
listAllMarketplacePlugins,
|
|
200
200
|
installPluginFromMarketplace,
|
|
201
201
|
getUninstalledDefaults,
|
|
202
|
+
createLocalSkillSources,
|
|
203
|
+
LocalSkillSource,
|
|
202
204
|
isDefaultMarketplace,
|
|
203
205
|
MarketplaceErrorCode,
|
|
204
206
|
MarketplaceError
|
|
@@ -211,6 +213,7 @@ export {
|
|
|
211
213
|
ConfigErrorCode,
|
|
212
214
|
CustomModelSchema,
|
|
213
215
|
DEFAULT_MARKETPLACES,
|
|
216
|
+
LocalSkillSource,
|
|
214
217
|
MODEL_PICKER_FAVORITES_LIMIT,
|
|
215
218
|
MODEL_PICKER_RECENTS_LIMIT,
|
|
216
219
|
MODEL_PICKER_STATE_VERSION,
|
|
@@ -238,6 +241,7 @@ export {
|
|
|
238
241
|
copyDirectory,
|
|
239
242
|
createDextoAgentFromConfig,
|
|
240
243
|
createInitialPreferences,
|
|
244
|
+
createLocalSkillSources,
|
|
241
245
|
deleteCustomModel,
|
|
242
246
|
deleteModelDirectory,
|
|
243
247
|
deletePromptByMetadata,
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
* ~/.agents/skills/
|
|
10
10
|
* ~/.dexto/skills/
|
|
11
11
|
* └── skill-name/
|
|
12
|
-
* ├── SKILL.md (required -
|
|
12
|
+
* ├── SKILL.md (required - skill instructions)
|
|
13
13
|
* ├── handlers/ (optional - workflow helper files)
|
|
14
14
|
* ├── scripts/ (optional - executable helpers)
|
|
15
15
|
* ├── mcps/ (optional - MCP server config JSON files)
|
|
16
16
|
* └── references/ (optional - reference files)
|
|
17
17
|
*
|
|
18
|
-
* These skills are
|
|
18
|
+
* These skills are discovered by skill tooling, not loaded as prompts.
|
|
19
19
|
*/
|
|
20
20
|
/**
|
|
21
21
|
* Represents a discovered standalone skill
|
|
@@ -31,7 +31,6 @@ export interface DiscoveredSkill {
|
|
|
31
31
|
source: 'user' | 'project';
|
|
32
32
|
/**
|
|
33
33
|
* Reserved for future discovery metadata.
|
|
34
|
-
* Skill-bundled MCP config is resolved lazily from the skill directory when the prompt is loaded.
|
|
35
34
|
*/
|
|
36
35
|
warnings?: string[] | undefined;
|
|
37
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover-skills.d.ts","sourceRoot":"","sources":["../../src/plugins/discover-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;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;IAC3B
|
|
1
|
+
{"version":3,"file":"discover-skills.d.ts","sourceRoot":"","sources":["../../src/plugins/discover-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;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;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACnC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAkEhF;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAW9C"}
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ __export(plugins_exports, {
|
|
|
22
22
|
InstalledPluginEntrySchema: () => import_schemas.InstalledPluginEntrySchema,
|
|
23
23
|
InstalledPluginsFileSchema: () => import_schemas.InstalledPluginsFileSchema,
|
|
24
24
|
KnownMarketplacesFileSchema: () => import_marketplace.KnownMarketplacesFileSchema,
|
|
25
|
+
LocalSkillSource: () => import_local_skill_source.LocalSkillSource,
|
|
25
26
|
MarketplaceAddCommandSchema: () => import_marketplace.MarketplaceAddCommandSchema,
|
|
26
27
|
MarketplaceEntrySchema: () => import_marketplace.MarketplaceEntrySchema,
|
|
27
28
|
MarketplaceError: () => import_marketplace.MarketplaceError,
|
|
@@ -35,6 +36,7 @@ __export(plugins_exports, {
|
|
|
35
36
|
PluginMCPConfigSchema: () => import_schemas.PluginMCPConfigSchema,
|
|
36
37
|
PluginManifestSchema: () => import_schemas.PluginManifestSchema,
|
|
37
38
|
addMarketplace: () => import_marketplace.addMarketplace,
|
|
39
|
+
createLocalSkillSources: () => import_local_skill_sources.createLocalSkillSources,
|
|
38
40
|
deriveMarketplaceName: () => import_marketplace.deriveMarketplaceName,
|
|
39
41
|
discoverClaudeCodePlugins: () => import_discover_plugins.discoverClaudeCodePlugins,
|
|
40
42
|
discoverStandaloneSkills: () => import_discover_skills.discoverStandaloneSkills,
|
|
@@ -78,6 +80,8 @@ var import_error_codes = require("./error-codes.js");
|
|
|
78
80
|
var import_errors = require("./errors.js");
|
|
79
81
|
var import_discover_plugins = require("./discover-plugins.js");
|
|
80
82
|
var import_discover_skills = require("./discover-skills.js");
|
|
83
|
+
var import_local_skill_source = require("./local-skill-source.js");
|
|
84
|
+
var import_local_skill_sources = require("./local-skill-sources.js");
|
|
81
85
|
var import_load_plugin = require("./load-plugin.js");
|
|
82
86
|
var import_validate_plugin = require("./validate-plugin.js");
|
|
83
87
|
var import_list_plugins = require("./list-plugins.js");
|
|
@@ -90,6 +94,7 @@ var import_marketplace = require("./marketplace/index.js");
|
|
|
90
94
|
InstalledPluginEntrySchema,
|
|
91
95
|
InstalledPluginsFileSchema,
|
|
92
96
|
KnownMarketplacesFileSchema,
|
|
97
|
+
LocalSkillSource,
|
|
93
98
|
MarketplaceAddCommandSchema,
|
|
94
99
|
MarketplaceEntrySchema,
|
|
95
100
|
MarketplaceError,
|
|
@@ -103,6 +108,7 @@ var import_marketplace = require("./marketplace/index.js");
|
|
|
103
108
|
PluginMCPConfigSchema,
|
|
104
109
|
PluginManifestSchema,
|
|
105
110
|
addMarketplace,
|
|
111
|
+
createLocalSkillSources,
|
|
106
112
|
deriveMarketplaceName,
|
|
107
113
|
discoverClaudeCodePlugins,
|
|
108
114
|
discoverStandaloneSkills,
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export { PluginError } from './errors.js';
|
|
|
13
13
|
export { discoverClaudeCodePlugins, getPluginSearchPaths, getInstalledPluginsPath, } from './discover-plugins.js';
|
|
14
14
|
export { discoverStandaloneSkills, getSkillSearchPaths } from './discover-skills.js';
|
|
15
15
|
export type { DiscoveredSkill } from './discover-skills.js';
|
|
16
|
+
export { LocalSkillSource } from './local-skill-source.js';
|
|
17
|
+
export type { LocalSkillRoot } from './local-skill-source.js';
|
|
18
|
+
export { createLocalSkillSources } from './local-skill-sources.js';
|
|
19
|
+
export type { CreateLocalSkillSourcesOptions } from './local-skill-sources.js';
|
|
16
20
|
export { loadClaudeCodePlugin } from './load-plugin.js';
|
|
17
21
|
export { validatePluginDirectory, tryLoadManifest } from './validate-plugin.js';
|
|
18
22
|
export { listInstalledPlugins, getDextoInstalledPluginsPath } from './list-plugins.js';
|
|
@@ -1 +1 @@
|
|
|
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,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,EACH,yBAAyB,EACzB,oBAAoB,EACpB,uBAAuB,GAC1B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACrF,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceR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oB,GAC5B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAGrF,OAAO,EAEH,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAExB,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,+BAA+B,EAE/B,oBAAoB,EACpB,gBAAgB,EAEhB,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
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
getInstalledPluginsPath
|
|
13
13
|
} from "./discover-plugins.js";
|
|
14
14
|
import { discoverStandaloneSkills, getSkillSearchPaths } from "./discover-skills.js";
|
|
15
|
+
import { LocalSkillSource } from "./local-skill-source.js";
|
|
16
|
+
import { createLocalSkillSources } from "./local-skill-sources.js";
|
|
15
17
|
import { loadClaudeCodePlugin } from "./load-plugin.js";
|
|
16
18
|
import { validatePluginDirectory, tryLoadManifest } from "./validate-plugin.js";
|
|
17
19
|
import { listInstalledPlugins, getDextoInstalledPluginsPath } from "./list-plugins.js";
|
|
@@ -61,6 +63,7 @@ export {
|
|
|
61
63
|
InstalledPluginEntrySchema,
|
|
62
64
|
InstalledPluginsFileSchema,
|
|
63
65
|
KnownMarketplacesFileSchema,
|
|
66
|
+
LocalSkillSource,
|
|
64
67
|
MarketplaceAddCommandSchema,
|
|
65
68
|
MarketplaceEntrySchema,
|
|
66
69
|
MarketplaceError,
|
|
@@ -74,6 +77,7 @@ export {
|
|
|
74
77
|
PluginMCPConfigSchema,
|
|
75
78
|
PluginManifestSchema,
|
|
76
79
|
addMarketplace,
|
|
80
|
+
createLocalSkillSources,
|
|
77
81
|
deriveMarketplaceName,
|
|
78
82
|
discoverClaudeCodePlugins,
|
|
79
83
|
discoverStandaloneSkills,
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|