@dexto/agent-management 1.5.6 → 1.5.8
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/config/config-enrichment.cjs +72 -21
- package/dist/config/config-enrichment.d.ts +10 -2
- package/dist/config/config-enrichment.d.ts.map +1 -1
- package/dist/config/config-enrichment.js +76 -21
- package/dist/config/discover-prompts.cjs +1 -1
- package/dist/config/discover-prompts.d.ts +11 -11
- package/dist/config/discover-prompts.d.ts.map +1 -1
- package/dist/config/discover-prompts.js +1 -1
- package/dist/config/loader.cjs +31 -13
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +31 -13
- package/dist/index.cjs +76 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +78 -0
- package/dist/models/custom-models.cjs +2 -1
- package/dist/models/custom-models.d.ts +7 -6
- package/dist/models/custom-models.d.ts.map +1 -1
- package/dist/models/custom-models.js +2 -1
- package/dist/plugins/discover-plugins.cjs +176 -0
- package/dist/plugins/discover-plugins.d.ts +39 -0
- package/dist/plugins/discover-plugins.d.ts.map +1 -0
- package/dist/plugins/discover-plugins.js +140 -0
- package/dist/plugins/discover-skills.cjs +93 -0
- package/dist/plugins/discover-skills.d.ts +49 -0
- package/dist/plugins/discover-skills.d.ts.map +1 -0
- package/dist/plugins/discover-skills.js +58 -0
- package/dist/plugins/error-codes.cjs +47 -0
- package/dist/plugins/error-codes.d.ts +24 -0
- package/dist/plugins/error-codes.d.ts.map +1 -0
- package/dist/plugins/error-codes.js +23 -0
- package/dist/plugins/errors.cjs +197 -0
- package/dist/plugins/errors.d.ts +68 -0
- package/dist/plugins/errors.d.ts.map +1 -0
- package/dist/plugins/errors.js +173 -0
- package/dist/plugins/index.cjs +144 -0
- package/dist/plugins/index.d.ts +23 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +115 -0
- package/dist/plugins/install-plugin.cjs +211 -0
- package/dist/plugins/install-plugin.d.ts +47 -0
- package/dist/plugins/install-plugin.d.ts.map +1 -0
- package/dist/plugins/install-plugin.js +173 -0
- package/dist/plugins/list-plugins.cjs +134 -0
- package/dist/plugins/list-plugins.d.ts +26 -0
- package/dist/plugins/list-plugins.d.ts.map +1 -0
- package/dist/plugins/list-plugins.js +99 -0
- package/dist/plugins/load-plugin.cjs +197 -0
- package/dist/plugins/load-plugin.d.ts +20 -0
- package/dist/plugins/load-plugin.d.ts.map +1 -0
- package/dist/plugins/load-plugin.js +163 -0
- package/dist/plugins/marketplace/error-codes.cjs +45 -0
- package/dist/plugins/marketplace/error-codes.d.ts +21 -0
- package/dist/plugins/marketplace/error-codes.d.ts.map +1 -0
- package/dist/plugins/marketplace/error-codes.js +21 -0
- package/dist/plugins/marketplace/errors.cjs +188 -0
- package/dist/plugins/marketplace/errors.d.ts +64 -0
- package/dist/plugins/marketplace/errors.d.ts.map +1 -0
- package/dist/plugins/marketplace/errors.js +164 -0
- package/dist/plugins/marketplace/index.cjs +95 -0
- package/dist/plugins/marketplace/index.d.ts +14 -0
- package/dist/plugins/marketplace/index.d.ts.map +1 -0
- package/dist/plugins/marketplace/index.js +74 -0
- package/dist/plugins/marketplace/install-from-marketplace.cjs +152 -0
- package/dist/plugins/marketplace/install-from-marketplace.d.ts +25 -0
- package/dist/plugins/marketplace/install-from-marketplace.d.ts.map +1 -0
- package/dist/plugins/marketplace/install-from-marketplace.js +120 -0
- package/dist/plugins/marketplace/operations.cjs +374 -0
- package/dist/plugins/marketplace/operations.d.ts +43 -0
- package/dist/plugins/marketplace/operations.d.ts.map +1 -0
- package/dist/plugins/marketplace/operations.js +339 -0
- package/dist/plugins/marketplace/registry.cjs +166 -0
- package/dist/plugins/marketplace/registry.d.ts +72 -0
- package/dist/plugins/marketplace/registry.d.ts.map +1 -0
- package/dist/plugins/marketplace/registry.js +119 -0
- package/dist/plugins/marketplace/schemas.cjs +79 -0
- package/dist/plugins/marketplace/schemas.d.ts +260 -0
- package/dist/plugins/marketplace/schemas.d.ts.map +1 -0
- package/dist/plugins/marketplace/schemas.js +49 -0
- package/dist/plugins/marketplace/types.cjs +16 -0
- package/dist/plugins/marketplace/types.d.ts +156 -0
- package/dist/plugins/marketplace/types.d.ts.map +1 -0
- package/dist/plugins/marketplace/types.js +0 -0
- package/dist/plugins/schemas.cjs +74 -0
- package/dist/plugins/schemas.d.ts +262 -0
- package/dist/plugins/schemas.d.ts.map +1 -0
- package/dist/plugins/schemas.js +46 -0
- package/dist/plugins/types.cjs +16 -0
- package/dist/plugins/types.d.ts +186 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +0 -0
- package/dist/plugins/uninstall-plugin.cjs +133 -0
- package/dist/plugins/uninstall-plugin.d.ts +24 -0
- package/dist/plugins/uninstall-plugin.d.ts.map +1 -0
- package/dist/plugins/uninstall-plugin.js +99 -0
- package/dist/plugins/validate-plugin.cjs +180 -0
- package/dist/plugins/validate-plugin.d.ts +53 -0
- package/dist/plugins/validate-plugin.d.ts.map +1 -0
- package/dist/plugins/validate-plugin.js +145 -0
- 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/runtime/AgentRuntime.cjs +1 -2
- package/dist/runtime/AgentRuntime.d.ts.map +1 -1
- package/dist/runtime/AgentRuntime.js +1 -2
- package/dist/tool-provider/llm-resolution.cjs +74 -0
- package/dist/tool-provider/llm-resolution.d.ts +51 -0
- package/dist/tool-provider/llm-resolution.d.ts.map +1 -0
- package/dist/tool-provider/llm-resolution.js +50 -0
- package/dist/tool-provider/runtime-service.cjs +246 -34
- package/dist/tool-provider/runtime-service.d.ts +34 -2
- package/dist/tool-provider/runtime-service.d.ts.map +1 -1
- package/dist/tool-provider/runtime-service.js +236 -34
- package/dist/tool-provider/tool-provider.cjs +154 -1
- package/dist/tool-provider/tool-provider.d.ts +7 -1
- package/dist/tool-provider/tool-provider.d.ts.map +1 -1
- package/dist/tool-provider/tool-provider.js +161 -1
- package/dist/tool-provider/types.d.ts +2 -0
- package/dist/tool-provider/types.d.ts.map +1 -1
- package/dist/utils/api-key-resolver.cjs +5 -2
- package/dist/utils/api-key-resolver.d.ts.map +1 -1
- package/dist/utils/api-key-resolver.js +5 -2
- package/dist/utils/dexto-auth.cjs +83 -0
- package/dist/utils/dexto-auth.d.ts +23 -0
- package/dist/utils/dexto-auth.d.ts.map +1 -0
- package/dist/utils/dexto-auth.js +57 -0
- package/dist/utils/feature-flags.cjs +32 -0
- package/dist/utils/feature-flags.d.ts +21 -0
- package/dist/utils/feature-flags.d.ts.map +1 -0
- package/dist/utils/feature-flags.js +8 -0
- package/package.json +3 -2
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var errors_exports = {};
|
|
20
|
+
__export(errors_exports, {
|
|
21
|
+
PluginError: () => PluginError
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(errors_exports);
|
|
24
|
+
var import_core = require("@dexto/core");
|
|
25
|
+
var import_error_codes = require("./error-codes.js");
|
|
26
|
+
class PluginError {
|
|
27
|
+
// Manifest errors
|
|
28
|
+
static manifestNotFound(pluginPath) {
|
|
29
|
+
return new import_core.DextoRuntimeError(
|
|
30
|
+
import_error_codes.PluginErrorCode.MANIFEST_NOT_FOUND,
|
|
31
|
+
import_core.ErrorScope.CONFIG,
|
|
32
|
+
import_core.ErrorType.USER,
|
|
33
|
+
`Plugin manifest not found: ${pluginPath}/.claude-plugin/plugin.json`,
|
|
34
|
+
{ pluginPath },
|
|
35
|
+
"Ensure the plugin has a valid .claude-plugin/plugin.json file"
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
static manifestInvalid(pluginPath, issues) {
|
|
39
|
+
return new import_core.DextoRuntimeError(
|
|
40
|
+
import_error_codes.PluginErrorCode.MANIFEST_INVALID,
|
|
41
|
+
import_core.ErrorScope.CONFIG,
|
|
42
|
+
import_core.ErrorType.USER,
|
|
43
|
+
`Invalid plugin manifest at ${pluginPath}: ${issues}`,
|
|
44
|
+
{ pluginPath, issues },
|
|
45
|
+
"Check the plugin.json file matches the expected schema (name is required)"
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
static manifestParseError(pluginPath, cause) {
|
|
49
|
+
return new import_core.DextoRuntimeError(
|
|
50
|
+
import_error_codes.PluginErrorCode.MANIFEST_PARSE_ERROR,
|
|
51
|
+
import_core.ErrorScope.CONFIG,
|
|
52
|
+
import_core.ErrorType.USER,
|
|
53
|
+
`Failed to parse plugin manifest at ${pluginPath}: ${cause}`,
|
|
54
|
+
{ pluginPath, cause },
|
|
55
|
+
"Ensure plugin.json contains valid JSON"
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
// Loading errors
|
|
59
|
+
static directoryReadError(pluginPath, cause) {
|
|
60
|
+
return new import_core.DextoRuntimeError(
|
|
61
|
+
import_error_codes.PluginErrorCode.DIRECTORY_READ_ERROR,
|
|
62
|
+
import_core.ErrorScope.CONFIG,
|
|
63
|
+
import_core.ErrorType.SYSTEM,
|
|
64
|
+
`Failed to read plugin directory ${pluginPath}: ${cause}`,
|
|
65
|
+
{ pluginPath, cause },
|
|
66
|
+
"Check file permissions and that the directory exists"
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
static mcpConfigInvalid(pluginPath, cause) {
|
|
70
|
+
return new import_core.DextoRuntimeError(
|
|
71
|
+
import_error_codes.PluginErrorCode.MCP_CONFIG_INVALID,
|
|
72
|
+
import_core.ErrorScope.CONFIG,
|
|
73
|
+
import_core.ErrorType.USER,
|
|
74
|
+
`Invalid MCP config in plugin ${pluginPath}: ${cause}`,
|
|
75
|
+
{ pluginPath, cause },
|
|
76
|
+
"Check the .mcp.json file contains valid JSON"
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
// Installation errors
|
|
80
|
+
static installSourceNotFound(sourcePath) {
|
|
81
|
+
return new import_core.DextoRuntimeError(
|
|
82
|
+
import_error_codes.PluginErrorCode.INSTALL_SOURCE_NOT_FOUND,
|
|
83
|
+
import_core.ErrorScope.CONFIG,
|
|
84
|
+
import_core.ErrorType.USER,
|
|
85
|
+
`Plugin source not found: ${sourcePath}`,
|
|
86
|
+
{ sourcePath },
|
|
87
|
+
"Ensure the path points to a valid plugin directory with .claude-plugin/plugin.json"
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
static installAlreadyExists(pluginName, existingPath) {
|
|
91
|
+
return new import_core.DextoRuntimeError(
|
|
92
|
+
import_error_codes.PluginErrorCode.INSTALL_ALREADY_EXISTS,
|
|
93
|
+
import_core.ErrorScope.CONFIG,
|
|
94
|
+
import_core.ErrorType.USER,
|
|
95
|
+
`Plugin '${pluginName}' is already installed at ${existingPath}`,
|
|
96
|
+
{ pluginName, existingPath },
|
|
97
|
+
"Use --force to overwrite the existing installation"
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
static installCopyFailed(sourcePath, destPath, cause) {
|
|
101
|
+
return new import_core.DextoRuntimeError(
|
|
102
|
+
import_error_codes.PluginErrorCode.INSTALL_COPY_FAILED,
|
|
103
|
+
import_core.ErrorScope.CONFIG,
|
|
104
|
+
import_core.ErrorType.SYSTEM,
|
|
105
|
+
`Failed to copy plugin from ${sourcePath} to ${destPath}: ${cause}`,
|
|
106
|
+
{ sourcePath, destPath, cause },
|
|
107
|
+
"Check file permissions and disk space"
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
static installManifestWriteFailed(manifestPath, cause) {
|
|
111
|
+
return new import_core.DextoRuntimeError(
|
|
112
|
+
import_error_codes.PluginErrorCode.INSTALL_MANIFEST_WRITE_FAILED,
|
|
113
|
+
import_core.ErrorScope.CONFIG,
|
|
114
|
+
import_core.ErrorType.SYSTEM,
|
|
115
|
+
`Failed to update installed plugins manifest at ${manifestPath}: ${cause}`,
|
|
116
|
+
{ manifestPath, cause },
|
|
117
|
+
"Check file permissions and ensure the directory exists"
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
static invalidScope(scope) {
|
|
121
|
+
return new import_core.DextoRuntimeError(
|
|
122
|
+
import_error_codes.PluginErrorCode.INSTALL_INVALID_SCOPE,
|
|
123
|
+
import_core.ErrorScope.CONFIG,
|
|
124
|
+
import_core.ErrorType.USER,
|
|
125
|
+
`Invalid installation scope: ${scope}. Must be 'user', 'project', or 'local'.`,
|
|
126
|
+
{ scope },
|
|
127
|
+
"Check the scope parameter is one of: 'user', 'project', 'local'"
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
// Import errors
|
|
131
|
+
static importNotFound(pluginName) {
|
|
132
|
+
return new import_core.DextoRuntimeError(
|
|
133
|
+
import_error_codes.PluginErrorCode.IMPORT_NOT_FOUND,
|
|
134
|
+
import_core.ErrorScope.CONFIG,
|
|
135
|
+
import_core.ErrorType.USER,
|
|
136
|
+
`Plugin '${pluginName}' not found`,
|
|
137
|
+
{ pluginName },
|
|
138
|
+
"Use `dexto plugin list` to see available plugins"
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
// Uninstallation errors
|
|
142
|
+
static uninstallNotFound(pluginName, hint) {
|
|
143
|
+
return new import_core.DextoRuntimeError(
|
|
144
|
+
import_error_codes.PluginErrorCode.UNINSTALL_NOT_FOUND,
|
|
145
|
+
import_core.ErrorScope.CONFIG,
|
|
146
|
+
import_core.ErrorType.USER,
|
|
147
|
+
`Plugin '${pluginName}' is not installed`,
|
|
148
|
+
{ pluginName },
|
|
149
|
+
hint || "Use `dexto plugin list` to see installed plugins"
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
static uninstallDeleteFailed(pluginPath, cause) {
|
|
153
|
+
return new import_core.DextoRuntimeError(
|
|
154
|
+
import_error_codes.PluginErrorCode.UNINSTALL_DELETE_FAILED,
|
|
155
|
+
import_core.ErrorScope.CONFIG,
|
|
156
|
+
import_core.ErrorType.SYSTEM,
|
|
157
|
+
`Failed to delete plugin at ${pluginPath}: ${cause}`,
|
|
158
|
+
{ pluginPath, cause },
|
|
159
|
+
"Check file permissions and ensure the plugin is not in use"
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
static uninstallManifestUpdateFailed(manifestPath, cause) {
|
|
163
|
+
return new import_core.DextoRuntimeError(
|
|
164
|
+
import_error_codes.PluginErrorCode.UNINSTALL_MANIFEST_UPDATE_FAILED,
|
|
165
|
+
import_core.ErrorScope.CONFIG,
|
|
166
|
+
import_core.ErrorType.SYSTEM,
|
|
167
|
+
`Failed to update installed plugins manifest at ${manifestPath}: ${cause}`,
|
|
168
|
+
{ manifestPath, cause },
|
|
169
|
+
"Check file permissions"
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
// Validation errors
|
|
173
|
+
static validationInvalidStructure(pluginPath, details) {
|
|
174
|
+
return new import_core.DextoRuntimeError(
|
|
175
|
+
import_error_codes.PluginErrorCode.VALIDATION_INVALID_STRUCTURE,
|
|
176
|
+
import_core.ErrorScope.CONFIG,
|
|
177
|
+
import_core.ErrorType.USER,
|
|
178
|
+
`Invalid plugin structure at ${pluginPath}: ${details}`,
|
|
179
|
+
{ pluginPath, details },
|
|
180
|
+
"Ensure the plugin has a .claude-plugin/plugin.json file"
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
static validationMissingRequired(pluginPath, missing) {
|
|
184
|
+
return new import_core.DextoRuntimeError(
|
|
185
|
+
import_error_codes.PluginErrorCode.VALIDATION_MISSING_REQUIRED,
|
|
186
|
+
import_core.ErrorScope.CONFIG,
|
|
187
|
+
import_core.ErrorType.USER,
|
|
188
|
+
`Plugin at ${pluginPath} is missing required fields: ${missing.join(", ")}`,
|
|
189
|
+
{ pluginPath, missing },
|
|
190
|
+
"Add the missing fields to .claude-plugin/plugin.json"
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
195
|
+
0 && (module.exports = {
|
|
196
|
+
PluginError
|
|
197
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { DextoRuntimeError } from '@dexto/core';
|
|
2
|
+
/**
|
|
3
|
+
* Plugin runtime error factory methods
|
|
4
|
+
* Creates properly typed errors for plugin operations
|
|
5
|
+
*/
|
|
6
|
+
export declare class PluginError {
|
|
7
|
+
static manifestNotFound(pluginPath: string): DextoRuntimeError<{
|
|
8
|
+
pluginPath: string;
|
|
9
|
+
}>;
|
|
10
|
+
static manifestInvalid(pluginPath: string, issues: string): DextoRuntimeError<{
|
|
11
|
+
pluginPath: string;
|
|
12
|
+
issues: string;
|
|
13
|
+
}>;
|
|
14
|
+
static manifestParseError(pluginPath: string, cause: string): DextoRuntimeError<{
|
|
15
|
+
pluginPath: string;
|
|
16
|
+
cause: string;
|
|
17
|
+
}>;
|
|
18
|
+
static directoryReadError(pluginPath: string, cause: string): DextoRuntimeError<{
|
|
19
|
+
pluginPath: string;
|
|
20
|
+
cause: string;
|
|
21
|
+
}>;
|
|
22
|
+
static mcpConfigInvalid(pluginPath: string, cause: string): DextoRuntimeError<{
|
|
23
|
+
pluginPath: string;
|
|
24
|
+
cause: string;
|
|
25
|
+
}>;
|
|
26
|
+
static installSourceNotFound(sourcePath: string): DextoRuntimeError<{
|
|
27
|
+
sourcePath: string;
|
|
28
|
+
}>;
|
|
29
|
+
static installAlreadyExists(pluginName: string, existingPath: string): DextoRuntimeError<{
|
|
30
|
+
pluginName: string;
|
|
31
|
+
existingPath: string;
|
|
32
|
+
}>;
|
|
33
|
+
static installCopyFailed(sourcePath: string, destPath: string, cause: string): DextoRuntimeError<{
|
|
34
|
+
sourcePath: string;
|
|
35
|
+
destPath: string;
|
|
36
|
+
cause: string;
|
|
37
|
+
}>;
|
|
38
|
+
static installManifestWriteFailed(manifestPath: string, cause: string): DextoRuntimeError<{
|
|
39
|
+
manifestPath: string;
|
|
40
|
+
cause: string;
|
|
41
|
+
}>;
|
|
42
|
+
static invalidScope(scope: unknown): DextoRuntimeError<{
|
|
43
|
+
scope: unknown;
|
|
44
|
+
}>;
|
|
45
|
+
static importNotFound(pluginName: string): DextoRuntimeError<{
|
|
46
|
+
pluginName: string;
|
|
47
|
+
}>;
|
|
48
|
+
static uninstallNotFound(pluginName: string, hint?: string): DextoRuntimeError<{
|
|
49
|
+
pluginName: string;
|
|
50
|
+
}>;
|
|
51
|
+
static uninstallDeleteFailed(pluginPath: string, cause: string): DextoRuntimeError<{
|
|
52
|
+
pluginPath: string;
|
|
53
|
+
cause: string;
|
|
54
|
+
}>;
|
|
55
|
+
static uninstallManifestUpdateFailed(manifestPath: string, cause: string): DextoRuntimeError<{
|
|
56
|
+
manifestPath: string;
|
|
57
|
+
cause: string;
|
|
58
|
+
}>;
|
|
59
|
+
static validationInvalidStructure(pluginPath: string, details: string): DextoRuntimeError<{
|
|
60
|
+
pluginPath: string;
|
|
61
|
+
details: string;
|
|
62
|
+
}>;
|
|
63
|
+
static validationMissingRequired(pluginPath: string, missing: string[]): DextoRuntimeError<{
|
|
64
|
+
pluginPath: string;
|
|
65
|
+
missing: string[];
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/plugins/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAGvE;;;GAGG;AACH,qBAAa,WAAW;IAEpB,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM;;;IAW1C,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;IAWzD,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAY3D,MAAM,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAW3D,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAYzD,MAAM,CAAC,qBAAqB,CAAC,UAAU,EAAE,MAAM;;;IAW/C,MAAM,CAAC,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;;;;IAWpE,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;;IAW5E,MAAM,CAAC,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAWrE,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO;;;IAYlC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM;;;IAYxC,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;;;IAW1D,MAAM,CAAC,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAW9D,MAAM,CAAC,6BAA6B,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAYxE,MAAM,CAAC,0BAA0B,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;;IAWrE,MAAM,CAAC,yBAAyB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;;;;CAUzE"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { DextoRuntimeError, ErrorScope, ErrorType } from "@dexto/core";
|
|
2
|
+
import { PluginErrorCode } from "./error-codes.js";
|
|
3
|
+
class PluginError {
|
|
4
|
+
// Manifest errors
|
|
5
|
+
static manifestNotFound(pluginPath) {
|
|
6
|
+
return new DextoRuntimeError(
|
|
7
|
+
PluginErrorCode.MANIFEST_NOT_FOUND,
|
|
8
|
+
ErrorScope.CONFIG,
|
|
9
|
+
ErrorType.USER,
|
|
10
|
+
`Plugin manifest not found: ${pluginPath}/.claude-plugin/plugin.json`,
|
|
11
|
+
{ pluginPath },
|
|
12
|
+
"Ensure the plugin has a valid .claude-plugin/plugin.json file"
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
static manifestInvalid(pluginPath, issues) {
|
|
16
|
+
return new DextoRuntimeError(
|
|
17
|
+
PluginErrorCode.MANIFEST_INVALID,
|
|
18
|
+
ErrorScope.CONFIG,
|
|
19
|
+
ErrorType.USER,
|
|
20
|
+
`Invalid plugin manifest at ${pluginPath}: ${issues}`,
|
|
21
|
+
{ pluginPath, issues },
|
|
22
|
+
"Check the plugin.json file matches the expected schema (name is required)"
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
static manifestParseError(pluginPath, cause) {
|
|
26
|
+
return new DextoRuntimeError(
|
|
27
|
+
PluginErrorCode.MANIFEST_PARSE_ERROR,
|
|
28
|
+
ErrorScope.CONFIG,
|
|
29
|
+
ErrorType.USER,
|
|
30
|
+
`Failed to parse plugin manifest at ${pluginPath}: ${cause}`,
|
|
31
|
+
{ pluginPath, cause },
|
|
32
|
+
"Ensure plugin.json contains valid JSON"
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
// Loading errors
|
|
36
|
+
static directoryReadError(pluginPath, cause) {
|
|
37
|
+
return new DextoRuntimeError(
|
|
38
|
+
PluginErrorCode.DIRECTORY_READ_ERROR,
|
|
39
|
+
ErrorScope.CONFIG,
|
|
40
|
+
ErrorType.SYSTEM,
|
|
41
|
+
`Failed to read plugin directory ${pluginPath}: ${cause}`,
|
|
42
|
+
{ pluginPath, cause },
|
|
43
|
+
"Check file permissions and that the directory exists"
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
static mcpConfigInvalid(pluginPath, cause) {
|
|
47
|
+
return new DextoRuntimeError(
|
|
48
|
+
PluginErrorCode.MCP_CONFIG_INVALID,
|
|
49
|
+
ErrorScope.CONFIG,
|
|
50
|
+
ErrorType.USER,
|
|
51
|
+
`Invalid MCP config in plugin ${pluginPath}: ${cause}`,
|
|
52
|
+
{ pluginPath, cause },
|
|
53
|
+
"Check the .mcp.json file contains valid JSON"
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
// Installation errors
|
|
57
|
+
static installSourceNotFound(sourcePath) {
|
|
58
|
+
return new DextoRuntimeError(
|
|
59
|
+
PluginErrorCode.INSTALL_SOURCE_NOT_FOUND,
|
|
60
|
+
ErrorScope.CONFIG,
|
|
61
|
+
ErrorType.USER,
|
|
62
|
+
`Plugin source not found: ${sourcePath}`,
|
|
63
|
+
{ sourcePath },
|
|
64
|
+
"Ensure the path points to a valid plugin directory with .claude-plugin/plugin.json"
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
static installAlreadyExists(pluginName, existingPath) {
|
|
68
|
+
return new DextoRuntimeError(
|
|
69
|
+
PluginErrorCode.INSTALL_ALREADY_EXISTS,
|
|
70
|
+
ErrorScope.CONFIG,
|
|
71
|
+
ErrorType.USER,
|
|
72
|
+
`Plugin '${pluginName}' is already installed at ${existingPath}`,
|
|
73
|
+
{ pluginName, existingPath },
|
|
74
|
+
"Use --force to overwrite the existing installation"
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
static installCopyFailed(sourcePath, destPath, cause) {
|
|
78
|
+
return new DextoRuntimeError(
|
|
79
|
+
PluginErrorCode.INSTALL_COPY_FAILED,
|
|
80
|
+
ErrorScope.CONFIG,
|
|
81
|
+
ErrorType.SYSTEM,
|
|
82
|
+
`Failed to copy plugin from ${sourcePath} to ${destPath}: ${cause}`,
|
|
83
|
+
{ sourcePath, destPath, cause },
|
|
84
|
+
"Check file permissions and disk space"
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
static installManifestWriteFailed(manifestPath, cause) {
|
|
88
|
+
return new DextoRuntimeError(
|
|
89
|
+
PluginErrorCode.INSTALL_MANIFEST_WRITE_FAILED,
|
|
90
|
+
ErrorScope.CONFIG,
|
|
91
|
+
ErrorType.SYSTEM,
|
|
92
|
+
`Failed to update installed plugins manifest at ${manifestPath}: ${cause}`,
|
|
93
|
+
{ manifestPath, cause },
|
|
94
|
+
"Check file permissions and ensure the directory exists"
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
static invalidScope(scope) {
|
|
98
|
+
return new DextoRuntimeError(
|
|
99
|
+
PluginErrorCode.INSTALL_INVALID_SCOPE,
|
|
100
|
+
ErrorScope.CONFIG,
|
|
101
|
+
ErrorType.USER,
|
|
102
|
+
`Invalid installation scope: ${scope}. Must be 'user', 'project', or 'local'.`,
|
|
103
|
+
{ scope },
|
|
104
|
+
"Check the scope parameter is one of: 'user', 'project', 'local'"
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
// Import errors
|
|
108
|
+
static importNotFound(pluginName) {
|
|
109
|
+
return new DextoRuntimeError(
|
|
110
|
+
PluginErrorCode.IMPORT_NOT_FOUND,
|
|
111
|
+
ErrorScope.CONFIG,
|
|
112
|
+
ErrorType.USER,
|
|
113
|
+
`Plugin '${pluginName}' not found`,
|
|
114
|
+
{ pluginName },
|
|
115
|
+
"Use `dexto plugin list` to see available plugins"
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
// Uninstallation errors
|
|
119
|
+
static uninstallNotFound(pluginName, hint) {
|
|
120
|
+
return new DextoRuntimeError(
|
|
121
|
+
PluginErrorCode.UNINSTALL_NOT_FOUND,
|
|
122
|
+
ErrorScope.CONFIG,
|
|
123
|
+
ErrorType.USER,
|
|
124
|
+
`Plugin '${pluginName}' is not installed`,
|
|
125
|
+
{ pluginName },
|
|
126
|
+
hint || "Use `dexto plugin list` to see installed plugins"
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
static uninstallDeleteFailed(pluginPath, cause) {
|
|
130
|
+
return new DextoRuntimeError(
|
|
131
|
+
PluginErrorCode.UNINSTALL_DELETE_FAILED,
|
|
132
|
+
ErrorScope.CONFIG,
|
|
133
|
+
ErrorType.SYSTEM,
|
|
134
|
+
`Failed to delete plugin at ${pluginPath}: ${cause}`,
|
|
135
|
+
{ pluginPath, cause },
|
|
136
|
+
"Check file permissions and ensure the plugin is not in use"
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
static uninstallManifestUpdateFailed(manifestPath, cause) {
|
|
140
|
+
return new DextoRuntimeError(
|
|
141
|
+
PluginErrorCode.UNINSTALL_MANIFEST_UPDATE_FAILED,
|
|
142
|
+
ErrorScope.CONFIG,
|
|
143
|
+
ErrorType.SYSTEM,
|
|
144
|
+
`Failed to update installed plugins manifest at ${manifestPath}: ${cause}`,
|
|
145
|
+
{ manifestPath, cause },
|
|
146
|
+
"Check file permissions"
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
// Validation errors
|
|
150
|
+
static validationInvalidStructure(pluginPath, details) {
|
|
151
|
+
return new DextoRuntimeError(
|
|
152
|
+
PluginErrorCode.VALIDATION_INVALID_STRUCTURE,
|
|
153
|
+
ErrorScope.CONFIG,
|
|
154
|
+
ErrorType.USER,
|
|
155
|
+
`Invalid plugin structure at ${pluginPath}: ${details}`,
|
|
156
|
+
{ pluginPath, details },
|
|
157
|
+
"Ensure the plugin has a .claude-plugin/plugin.json file"
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
static validationMissingRequired(pluginPath, missing) {
|
|
161
|
+
return new DextoRuntimeError(
|
|
162
|
+
PluginErrorCode.VALIDATION_MISSING_REQUIRED,
|
|
163
|
+
ErrorScope.CONFIG,
|
|
164
|
+
ErrorType.USER,
|
|
165
|
+
`Plugin at ${pluginPath} is missing required fields: ${missing.join(", ")}`,
|
|
166
|
+
{ pluginPath, missing },
|
|
167
|
+
"Add the missing fields to .claude-plugin/plugin.json"
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
export {
|
|
172
|
+
PluginError
|
|
173
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var plugins_exports = {};
|
|
20
|
+
__export(plugins_exports, {
|
|
21
|
+
DEFAULT_MARKETPLACES: () => import_marketplace.DEFAULT_MARKETPLACES,
|
|
22
|
+
DextoPluginManifestSchema: () => import_schemas.DextoPluginManifestSchema,
|
|
23
|
+
InstalledPluginEntrySchema: () => import_schemas.InstalledPluginEntrySchema,
|
|
24
|
+
InstalledPluginsFileSchema: () => import_schemas.InstalledPluginsFileSchema,
|
|
25
|
+
KnownMarketplacesFileSchema: () => import_marketplace.KnownMarketplacesFileSchema,
|
|
26
|
+
MarketplaceAddCommandSchema: () => import_marketplace.MarketplaceAddCommandSchema,
|
|
27
|
+
MarketplaceEntrySchema: () => import_marketplace.MarketplaceEntrySchema,
|
|
28
|
+
MarketplaceError: () => import_marketplace.MarketplaceError,
|
|
29
|
+
MarketplaceErrorCode: () => import_marketplace.MarketplaceErrorCode,
|
|
30
|
+
MarketplaceInstallCommandSchema: () => import_marketplace.MarketplaceInstallCommandSchema,
|
|
31
|
+
MarketplaceManifestSchema: () => import_marketplace.MarketplaceManifestSchema,
|
|
32
|
+
MarketplacePluginEntrySchema: () => import_marketplace.MarketplacePluginEntrySchema,
|
|
33
|
+
MarketplaceSourceSchema: () => import_marketplace.MarketplaceSourceSchema,
|
|
34
|
+
PluginError: () => import_errors.PluginError,
|
|
35
|
+
PluginErrorCode: () => import_error_codes.PluginErrorCode,
|
|
36
|
+
PluginMCPConfigSchema: () => import_schemas.PluginMCPConfigSchema,
|
|
37
|
+
PluginManifestSchema: () => import_schemas.PluginManifestSchema,
|
|
38
|
+
addMarketplace: () => import_marketplace.addMarketplace,
|
|
39
|
+
deriveMarketplaceName: () => import_marketplace.deriveMarketplaceName,
|
|
40
|
+
discoverClaudeCodePlugins: () => import_discover_plugins.discoverClaudeCodePlugins,
|
|
41
|
+
discoverStandaloneSkills: () => import_discover_skills.discoverStandaloneSkills,
|
|
42
|
+
findPluginInMarketplaces: () => import_marketplace.findPluginInMarketplaces,
|
|
43
|
+
getAllMarketplaces: () => import_marketplace.getAllMarketplaces,
|
|
44
|
+
getDextoInstalledPluginsPath: () => import_list_plugins.getDextoInstalledPluginsPath,
|
|
45
|
+
getInstalledPluginsPath: () => import_discover_plugins.getInstalledPluginsPath,
|
|
46
|
+
getMarketplaceCacheDir: () => import_marketplace.getMarketplaceCacheDir,
|
|
47
|
+
getMarketplaceEntry: () => import_marketplace.getMarketplaceEntry,
|
|
48
|
+
getMarketplacesDir: () => import_marketplace.getMarketplacesDir,
|
|
49
|
+
getMarketplacesRegistryPath: () => import_marketplace.getMarketplacesRegistryPath,
|
|
50
|
+
getPluginSearchPaths: () => import_discover_plugins.getPluginSearchPaths,
|
|
51
|
+
getSkillSearchPaths: () => import_discover_skills.getSkillSearchPaths,
|
|
52
|
+
getUninstalledDefaults: () => import_marketplace.getUninstalledDefaults,
|
|
53
|
+
installPluginFromMarketplace: () => import_marketplace.installPluginFromMarketplace,
|
|
54
|
+
installPluginFromPath: () => import_install_plugin.installPluginFromPath,
|
|
55
|
+
isDefaultMarketplace: () => import_marketplace.isDefaultMarketplace,
|
|
56
|
+
isPluginInstalled: () => import_install_plugin.isPluginInstalled,
|
|
57
|
+
listAllMarketplacePlugins: () => import_marketplace.listAllMarketplacePlugins,
|
|
58
|
+
listInstalledPlugins: () => import_list_plugins.listInstalledPlugins,
|
|
59
|
+
listMarketplaces: () => import_marketplace.listMarketplaces,
|
|
60
|
+
loadClaudeCodePlugin: () => import_load_plugin.loadClaudeCodePlugin,
|
|
61
|
+
loadDextoInstalledPlugins: () => import_install_plugin.loadDextoInstalledPlugins,
|
|
62
|
+
loadKnownMarketplaces: () => import_marketplace.loadKnownMarketplaces,
|
|
63
|
+
marketplaceExists: () => import_marketplace.marketplaceExists,
|
|
64
|
+
parseMarketplaceSource: () => import_marketplace.parseMarketplaceSource,
|
|
65
|
+
parsePluginSpec: () => import_marketplace.parsePluginSpec,
|
|
66
|
+
removeMarketplace: () => import_marketplace.removeMarketplace,
|
|
67
|
+
saveDextoInstalledPlugins: () => import_install_plugin.saveDextoInstalledPlugins,
|
|
68
|
+
saveKnownMarketplaces: () => import_marketplace.saveKnownMarketplaces,
|
|
69
|
+
scanMarketplacePlugins: () => import_marketplace.scanMarketplacePlugins,
|
|
70
|
+
searchMarketplacePlugins: () => import_marketplace.searchMarketplacePlugins,
|
|
71
|
+
tryLoadManifest: () => import_validate_plugin.tryLoadManifest,
|
|
72
|
+
uninstallPlugin: () => import_uninstall_plugin.uninstallPlugin,
|
|
73
|
+
updateMarketplace: () => import_marketplace.updateMarketplace,
|
|
74
|
+
validatePluginDirectory: () => import_validate_plugin.validatePluginDirectory
|
|
75
|
+
});
|
|
76
|
+
module.exports = __toCommonJS(plugins_exports);
|
|
77
|
+
var import_schemas = require("./schemas.js");
|
|
78
|
+
var import_error_codes = require("./error-codes.js");
|
|
79
|
+
var import_errors = require("./errors.js");
|
|
80
|
+
var import_discover_plugins = require("./discover-plugins.js");
|
|
81
|
+
var import_discover_skills = require("./discover-skills.js");
|
|
82
|
+
var import_load_plugin = require("./load-plugin.js");
|
|
83
|
+
var import_validate_plugin = require("./validate-plugin.js");
|
|
84
|
+
var import_list_plugins = require("./list-plugins.js");
|
|
85
|
+
var import_install_plugin = require("./install-plugin.js");
|
|
86
|
+
var import_uninstall_plugin = require("./uninstall-plugin.js");
|
|
87
|
+
var import_marketplace = require("./marketplace/index.js");
|
|
88
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
+
0 && (module.exports = {
|
|
90
|
+
DEFAULT_MARKETPLACES,
|
|
91
|
+
DextoPluginManifestSchema,
|
|
92
|
+
InstalledPluginEntrySchema,
|
|
93
|
+
InstalledPluginsFileSchema,
|
|
94
|
+
KnownMarketplacesFileSchema,
|
|
95
|
+
MarketplaceAddCommandSchema,
|
|
96
|
+
MarketplaceEntrySchema,
|
|
97
|
+
MarketplaceError,
|
|
98
|
+
MarketplaceErrorCode,
|
|
99
|
+
MarketplaceInstallCommandSchema,
|
|
100
|
+
MarketplaceManifestSchema,
|
|
101
|
+
MarketplacePluginEntrySchema,
|
|
102
|
+
MarketplaceSourceSchema,
|
|
103
|
+
PluginError,
|
|
104
|
+
PluginErrorCode,
|
|
105
|
+
PluginMCPConfigSchema,
|
|
106
|
+
PluginManifestSchema,
|
|
107
|
+
addMarketplace,
|
|
108
|
+
deriveMarketplaceName,
|
|
109
|
+
discoverClaudeCodePlugins,
|
|
110
|
+
discoverStandaloneSkills,
|
|
111
|
+
findPluginInMarketplaces,
|
|
112
|
+
getAllMarketplaces,
|
|
113
|
+
getDextoInstalledPluginsPath,
|
|
114
|
+
getInstalledPluginsPath,
|
|
115
|
+
getMarketplaceCacheDir,
|
|
116
|
+
getMarketplaceEntry,
|
|
117
|
+
getMarketplacesDir,
|
|
118
|
+
getMarketplacesRegistryPath,
|
|
119
|
+
getPluginSearchPaths,
|
|
120
|
+
getSkillSearchPaths,
|
|
121
|
+
getUninstalledDefaults,
|
|
122
|
+
installPluginFromMarketplace,
|
|
123
|
+
installPluginFromPath,
|
|
124
|
+
isDefaultMarketplace,
|
|
125
|
+
isPluginInstalled,
|
|
126
|
+
listAllMarketplacePlugins,
|
|
127
|
+
listInstalledPlugins,
|
|
128
|
+
listMarketplaces,
|
|
129
|
+
loadClaudeCodePlugin,
|
|
130
|
+
loadDextoInstalledPlugins,
|
|
131
|
+
loadKnownMarketplaces,
|
|
132
|
+
marketplaceExists,
|
|
133
|
+
parseMarketplaceSource,
|
|
134
|
+
parsePluginSpec,
|
|
135
|
+
removeMarketplace,
|
|
136
|
+
saveDextoInstalledPlugins,
|
|
137
|
+
saveKnownMarketplaces,
|
|
138
|
+
scanMarketplacePlugins,
|
|
139
|
+
searchMarketplacePlugins,
|
|
140
|
+
tryLoadManifest,
|
|
141
|
+
uninstallPlugin,
|
|
142
|
+
updateMarketplace,
|
|
143
|
+
validatePluginDirectory
|
|
144
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin Loader
|
|
3
|
+
*
|
|
4
|
+
* Discovers and loads bundled plugins from community sources.
|
|
5
|
+
* Supports two formats:
|
|
6
|
+
* - .claude-plugin: Claude Code compatible format
|
|
7
|
+
* - .dexto-plugin: Dexto-native format with extended features (customToolProviders)
|
|
8
|
+
*/
|
|
9
|
+
export type { PluginManifest, DextoPluginManifest, PluginFormat, DiscoveredPlugin, PluginCommand, PluginMCPConfig, LoadedPlugin, PluginInstallScope, InstalledPluginEntry, InstalledPluginsFile, ListedPlugin, PluginValidationResult, PluginInstallResult, PluginUninstallResult, } from './types.js';
|
|
10
|
+
export { PluginManifestSchema, DextoPluginManifestSchema, PluginMCPConfigSchema, InstalledPluginEntrySchema, InstalledPluginsFileSchema, } from './schemas.js';
|
|
11
|
+
export type { ValidatedPluginManifest, ValidatedDextoPluginManifest, ValidatedPluginMCPConfig, ValidatedInstalledPluginsFile, ValidatedInstalledPluginEntry, } from './schemas.js';
|
|
12
|
+
export { PluginErrorCode } from './error-codes.js';
|
|
13
|
+
export { PluginError } from './errors.js';
|
|
14
|
+
export { discoverClaudeCodePlugins, getPluginSearchPaths, getInstalledPluginsPath, } from './discover-plugins.js';
|
|
15
|
+
export { discoverStandaloneSkills, getSkillSearchPaths } from './discover-skills.js';
|
|
16
|
+
export type { DiscoveredSkill } from './discover-skills.js';
|
|
17
|
+
export { loadClaudeCodePlugin } from './load-plugin.js';
|
|
18
|
+
export { validatePluginDirectory, tryLoadManifest } from './validate-plugin.js';
|
|
19
|
+
export { listInstalledPlugins, getDextoInstalledPluginsPath } from './list-plugins.js';
|
|
20
|
+
export { installPluginFromPath, loadDextoInstalledPlugins, saveDextoInstalledPlugins, isPluginInstalled, type InstallPluginOptions, } from './install-plugin.js';
|
|
21
|
+
export { uninstallPlugin, type UninstallPluginOptions } from './uninstall-plugin.js';
|
|
22
|
+
export { type MarketplaceSourceType, type MarketplaceSource, type MarketplaceEntry, type KnownMarketplacesFile, type MarketplacePlugin, type MarketplaceAddResult, type MarketplaceRemoveResult, type MarketplaceUpdateResult, type MarketplaceInstallResult, type MarketplaceAddOptions, type MarketplaceInstallOptions, type MarketplaceManifest, MarketplaceSourceSchema, MarketplaceEntrySchema, KnownMarketplacesFileSchema, MarketplaceManifestSchema, MarketplacePluginEntrySchema, MarketplaceAddCommandSchema, MarketplaceInstallCommandSchema, MarketplaceErrorCode, MarketplaceError, DEFAULT_MARKETPLACES, getMarketplacesRegistryPath, getMarketplacesDir, getMarketplaceCacheDir, loadKnownMarketplaces, saveKnownMarketplaces, getMarketplaceEntry, marketplaceExists, getAllMarketplaces, getUninstalledDefaults, isDefaultMarketplace, parseMarketplaceSource, deriveMarketplaceName, addMarketplace, removeMarketplace, updateMarketplace, listMarketplaces, scanMarketplacePlugins, listAllMarketplacePlugins, findPluginInMarketplaces, parsePluginSpec, installPluginFromMarketplace, searchMarketplacePlugins, } from './marketplace/index.js';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,YAAY,EACR,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,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,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,cAAc,CAAC;AACtB,YAAY,EACR,uBAAuB,EACvB,4BAA4B,EAC5B,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;AAG5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGhF,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAGvF,OAAO,EACH,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,KAAK,oBAAoB,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"}
|