@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.
Files changed (140) hide show
  1. package/dist/config/config-enrichment.cjs +72 -21
  2. package/dist/config/config-enrichment.d.ts +10 -2
  3. package/dist/config/config-enrichment.d.ts.map +1 -1
  4. package/dist/config/config-enrichment.js +76 -21
  5. package/dist/config/discover-prompts.cjs +1 -1
  6. package/dist/config/discover-prompts.d.ts +11 -11
  7. package/dist/config/discover-prompts.d.ts.map +1 -1
  8. package/dist/config/discover-prompts.js +1 -1
  9. package/dist/config/loader.cjs +31 -13
  10. package/dist/config/loader.d.ts.map +1 -1
  11. package/dist/config/loader.js +31 -13
  12. package/dist/index.cjs +76 -0
  13. package/dist/index.d.ts +5 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +78 -0
  16. package/dist/models/custom-models.cjs +2 -1
  17. package/dist/models/custom-models.d.ts +7 -6
  18. package/dist/models/custom-models.d.ts.map +1 -1
  19. package/dist/models/custom-models.js +2 -1
  20. package/dist/plugins/discover-plugins.cjs +176 -0
  21. package/dist/plugins/discover-plugins.d.ts +39 -0
  22. package/dist/plugins/discover-plugins.d.ts.map +1 -0
  23. package/dist/plugins/discover-plugins.js +140 -0
  24. package/dist/plugins/discover-skills.cjs +93 -0
  25. package/dist/plugins/discover-skills.d.ts +49 -0
  26. package/dist/plugins/discover-skills.d.ts.map +1 -0
  27. package/dist/plugins/discover-skills.js +58 -0
  28. package/dist/plugins/error-codes.cjs +47 -0
  29. package/dist/plugins/error-codes.d.ts +24 -0
  30. package/dist/plugins/error-codes.d.ts.map +1 -0
  31. package/dist/plugins/error-codes.js +23 -0
  32. package/dist/plugins/errors.cjs +197 -0
  33. package/dist/plugins/errors.d.ts +68 -0
  34. package/dist/plugins/errors.d.ts.map +1 -0
  35. package/dist/plugins/errors.js +173 -0
  36. package/dist/plugins/index.cjs +144 -0
  37. package/dist/plugins/index.d.ts +23 -0
  38. package/dist/plugins/index.d.ts.map +1 -0
  39. package/dist/plugins/index.js +115 -0
  40. package/dist/plugins/install-plugin.cjs +211 -0
  41. package/dist/plugins/install-plugin.d.ts +47 -0
  42. package/dist/plugins/install-plugin.d.ts.map +1 -0
  43. package/dist/plugins/install-plugin.js +173 -0
  44. package/dist/plugins/list-plugins.cjs +134 -0
  45. package/dist/plugins/list-plugins.d.ts +26 -0
  46. package/dist/plugins/list-plugins.d.ts.map +1 -0
  47. package/dist/plugins/list-plugins.js +99 -0
  48. package/dist/plugins/load-plugin.cjs +197 -0
  49. package/dist/plugins/load-plugin.d.ts +20 -0
  50. package/dist/plugins/load-plugin.d.ts.map +1 -0
  51. package/dist/plugins/load-plugin.js +163 -0
  52. package/dist/plugins/marketplace/error-codes.cjs +45 -0
  53. package/dist/plugins/marketplace/error-codes.d.ts +21 -0
  54. package/dist/plugins/marketplace/error-codes.d.ts.map +1 -0
  55. package/dist/plugins/marketplace/error-codes.js +21 -0
  56. package/dist/plugins/marketplace/errors.cjs +188 -0
  57. package/dist/plugins/marketplace/errors.d.ts +64 -0
  58. package/dist/plugins/marketplace/errors.d.ts.map +1 -0
  59. package/dist/plugins/marketplace/errors.js +164 -0
  60. package/dist/plugins/marketplace/index.cjs +95 -0
  61. package/dist/plugins/marketplace/index.d.ts +14 -0
  62. package/dist/plugins/marketplace/index.d.ts.map +1 -0
  63. package/dist/plugins/marketplace/index.js +74 -0
  64. package/dist/plugins/marketplace/install-from-marketplace.cjs +152 -0
  65. package/dist/plugins/marketplace/install-from-marketplace.d.ts +25 -0
  66. package/dist/plugins/marketplace/install-from-marketplace.d.ts.map +1 -0
  67. package/dist/plugins/marketplace/install-from-marketplace.js +120 -0
  68. package/dist/plugins/marketplace/operations.cjs +374 -0
  69. package/dist/plugins/marketplace/operations.d.ts +43 -0
  70. package/dist/plugins/marketplace/operations.d.ts.map +1 -0
  71. package/dist/plugins/marketplace/operations.js +339 -0
  72. package/dist/plugins/marketplace/registry.cjs +166 -0
  73. package/dist/plugins/marketplace/registry.d.ts +72 -0
  74. package/dist/plugins/marketplace/registry.d.ts.map +1 -0
  75. package/dist/plugins/marketplace/registry.js +119 -0
  76. package/dist/plugins/marketplace/schemas.cjs +79 -0
  77. package/dist/plugins/marketplace/schemas.d.ts +260 -0
  78. package/dist/plugins/marketplace/schemas.d.ts.map +1 -0
  79. package/dist/plugins/marketplace/schemas.js +49 -0
  80. package/dist/plugins/marketplace/types.cjs +16 -0
  81. package/dist/plugins/marketplace/types.d.ts +156 -0
  82. package/dist/plugins/marketplace/types.d.ts.map +1 -0
  83. package/dist/plugins/marketplace/types.js +0 -0
  84. package/dist/plugins/schemas.cjs +74 -0
  85. package/dist/plugins/schemas.d.ts +262 -0
  86. package/dist/plugins/schemas.d.ts.map +1 -0
  87. package/dist/plugins/schemas.js +46 -0
  88. package/dist/plugins/types.cjs +16 -0
  89. package/dist/plugins/types.d.ts +186 -0
  90. package/dist/plugins/types.d.ts.map +1 -0
  91. package/dist/plugins/types.js +0 -0
  92. package/dist/plugins/uninstall-plugin.cjs +133 -0
  93. package/dist/plugins/uninstall-plugin.d.ts +24 -0
  94. package/dist/plugins/uninstall-plugin.d.ts.map +1 -0
  95. package/dist/plugins/uninstall-plugin.js +99 -0
  96. package/dist/plugins/validate-plugin.cjs +180 -0
  97. package/dist/plugins/validate-plugin.d.ts +53 -0
  98. package/dist/plugins/validate-plugin.d.ts.map +1 -0
  99. package/dist/plugins/validate-plugin.js +145 -0
  100. package/dist/preferences/errors.cjs +11 -0
  101. package/dist/preferences/errors.d.ts +1 -0
  102. package/dist/preferences/errors.d.ts.map +1 -1
  103. package/dist/preferences/errors.js +11 -0
  104. package/dist/preferences/loader.cjs +119 -6
  105. package/dist/preferences/loader.d.ts +21 -1
  106. package/dist/preferences/loader.d.ts.map +1 -1
  107. package/dist/preferences/loader.js +102 -1
  108. package/dist/preferences/schemas.cjs +12 -0
  109. package/dist/preferences/schemas.d.ts +38 -12
  110. package/dist/preferences/schemas.d.ts.map +1 -1
  111. package/dist/preferences/schemas.js +10 -0
  112. package/dist/runtime/AgentRuntime.cjs +1 -2
  113. package/dist/runtime/AgentRuntime.d.ts.map +1 -1
  114. package/dist/runtime/AgentRuntime.js +1 -2
  115. package/dist/tool-provider/llm-resolution.cjs +74 -0
  116. package/dist/tool-provider/llm-resolution.d.ts +51 -0
  117. package/dist/tool-provider/llm-resolution.d.ts.map +1 -0
  118. package/dist/tool-provider/llm-resolution.js +50 -0
  119. package/dist/tool-provider/runtime-service.cjs +246 -34
  120. package/dist/tool-provider/runtime-service.d.ts +34 -2
  121. package/dist/tool-provider/runtime-service.d.ts.map +1 -1
  122. package/dist/tool-provider/runtime-service.js +236 -34
  123. package/dist/tool-provider/tool-provider.cjs +154 -1
  124. package/dist/tool-provider/tool-provider.d.ts +7 -1
  125. package/dist/tool-provider/tool-provider.d.ts.map +1 -1
  126. package/dist/tool-provider/tool-provider.js +161 -1
  127. package/dist/tool-provider/types.d.ts +2 -0
  128. package/dist/tool-provider/types.d.ts.map +1 -1
  129. package/dist/utils/api-key-resolver.cjs +5 -2
  130. package/dist/utils/api-key-resolver.d.ts.map +1 -1
  131. package/dist/utils/api-key-resolver.js +5 -2
  132. package/dist/utils/dexto-auth.cjs +83 -0
  133. package/dist/utils/dexto-auth.d.ts +23 -0
  134. package/dist/utils/dexto-auth.d.ts.map +1 -0
  135. package/dist/utils/dexto-auth.js +57 -0
  136. package/dist/utils/feature-flags.cjs +32 -0
  137. package/dist/utils/feature-flags.d.ts +21 -0
  138. package/dist/utils/feature-flags.d.ts.map +1 -0
  139. package/dist/utils/feature-flags.js +8 -0
  140. package/package.json +3 -2
@@ -0,0 +1,188 @@
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
+ MarketplaceError: () => MarketplaceError
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 MarketplaceError {
27
+ // Registry errors
28
+ static registryReadFailed(path, cause) {
29
+ return new import_core.DextoRuntimeError(
30
+ import_error_codes.MarketplaceErrorCode.REGISTRY_READ_FAILED,
31
+ import_core.ErrorScope.CONFIG,
32
+ import_core.ErrorType.SYSTEM,
33
+ `Failed to read marketplace registry at ${path}: ${cause}`,
34
+ { path, cause },
35
+ "Check file permissions and ensure the file exists"
36
+ );
37
+ }
38
+ static registryWriteFailed(path, cause) {
39
+ return new import_core.DextoRuntimeError(
40
+ import_error_codes.MarketplaceErrorCode.REGISTRY_WRITE_FAILED,
41
+ import_core.ErrorScope.CONFIG,
42
+ import_core.ErrorType.SYSTEM,
43
+ `Failed to write marketplace registry at ${path}: ${cause}`,
44
+ { path, cause },
45
+ "Check file permissions and disk space"
46
+ );
47
+ }
48
+ // Add marketplace errors
49
+ static addAlreadyExists(name, existingPath) {
50
+ return new import_core.DextoRuntimeError(
51
+ import_error_codes.MarketplaceErrorCode.ADD_ALREADY_EXISTS,
52
+ import_core.ErrorScope.CONFIG,
53
+ import_core.ErrorType.USER,
54
+ `Marketplace '${name}' already exists at ${existingPath}`,
55
+ { name, existingPath },
56
+ "Use a different name or remove the existing marketplace first"
57
+ );
58
+ }
59
+ static addCloneFailed(source, cause) {
60
+ return new import_core.DextoRuntimeError(
61
+ import_error_codes.MarketplaceErrorCode.ADD_CLONE_FAILED,
62
+ import_core.ErrorScope.CONFIG,
63
+ import_core.ErrorType.SYSTEM,
64
+ `Failed to clone marketplace from ${source}: ${cause}`,
65
+ { source, cause },
66
+ "Check the URL is correct and you have network access"
67
+ );
68
+ }
69
+ static addInvalidSource(source, reason) {
70
+ return new import_core.DextoRuntimeError(
71
+ import_error_codes.MarketplaceErrorCode.ADD_INVALID_SOURCE,
72
+ import_core.ErrorScope.CONFIG,
73
+ import_core.ErrorType.USER,
74
+ `Invalid marketplace source '${source}': ${reason}`,
75
+ { source, reason },
76
+ "Use format: owner/repo (GitHub), git URL, or local path"
77
+ );
78
+ }
79
+ static addLocalNotFound(path) {
80
+ return new import_core.DextoRuntimeError(
81
+ import_error_codes.MarketplaceErrorCode.ADD_LOCAL_NOT_FOUND,
82
+ import_core.ErrorScope.CONFIG,
83
+ import_core.ErrorType.USER,
84
+ `Local marketplace path not found: ${path}`,
85
+ { path },
86
+ "Check the path exists and is a directory"
87
+ );
88
+ }
89
+ // Remove marketplace errors
90
+ static removeNotFound(name) {
91
+ return new import_core.DextoRuntimeError(
92
+ import_error_codes.MarketplaceErrorCode.REMOVE_NOT_FOUND,
93
+ import_core.ErrorScope.CONFIG,
94
+ import_core.ErrorType.USER,
95
+ `Marketplace '${name}' not found`,
96
+ { name },
97
+ "Use `dexto plugin marketplace list` to see registered marketplaces"
98
+ );
99
+ }
100
+ static removeDeleteFailed(name, path, cause) {
101
+ return new import_core.DextoRuntimeError(
102
+ import_error_codes.MarketplaceErrorCode.REMOVE_DELETE_FAILED,
103
+ import_core.ErrorScope.CONFIG,
104
+ import_core.ErrorType.SYSTEM,
105
+ `Failed to delete marketplace '${name}' at ${path}: ${cause}`,
106
+ { name, path, cause },
107
+ "Check file permissions"
108
+ );
109
+ }
110
+ // Update marketplace errors
111
+ static updateNotFound(name) {
112
+ return new import_core.DextoRuntimeError(
113
+ import_error_codes.MarketplaceErrorCode.UPDATE_NOT_FOUND,
114
+ import_core.ErrorScope.CONFIG,
115
+ import_core.ErrorType.USER,
116
+ `Marketplace '${name}' not found`,
117
+ { name },
118
+ "Use `dexto plugin marketplace list` to see registered marketplaces"
119
+ );
120
+ }
121
+ static updatePullFailed(name, cause) {
122
+ return new import_core.DextoRuntimeError(
123
+ import_error_codes.MarketplaceErrorCode.UPDATE_PULL_FAILED,
124
+ import_core.ErrorScope.CONFIG,
125
+ import_core.ErrorType.SYSTEM,
126
+ `Failed to update marketplace '${name}': ${cause}`,
127
+ { name, cause },
128
+ "Check network connectivity and that the repository is accessible"
129
+ );
130
+ }
131
+ static updateLocalNotSupported(name) {
132
+ return new import_core.DextoRuntimeError(
133
+ import_error_codes.MarketplaceErrorCode.UPDATE_LOCAL_NOT_SUPPORTED,
134
+ import_core.ErrorScope.CONFIG,
135
+ import_core.ErrorType.USER,
136
+ `Cannot update local marketplace '${name}'`,
137
+ { name },
138
+ "Local marketplaces do not support automatic updates"
139
+ );
140
+ }
141
+ // Install from marketplace errors
142
+ static installMarketplaceNotFound(marketplace) {
143
+ return new import_core.DextoRuntimeError(
144
+ import_error_codes.MarketplaceErrorCode.INSTALL_MARKETPLACE_NOT_FOUND,
145
+ import_core.ErrorScope.CONFIG,
146
+ import_core.ErrorType.USER,
147
+ `Marketplace '${marketplace}' not found`,
148
+ { marketplace },
149
+ "Use `dexto plugin marketplace list` to see registered marketplaces, or `dexto plugin marketplace add` to register one"
150
+ );
151
+ }
152
+ static installPluginNotFound(pluginName, marketplace) {
153
+ const marketplaceInfo = marketplace ? ` in marketplace '${marketplace}'` : "";
154
+ return new import_core.DextoRuntimeError(
155
+ import_error_codes.MarketplaceErrorCode.INSTALL_PLUGIN_NOT_FOUND,
156
+ import_core.ErrorScope.CONFIG,
157
+ import_core.ErrorType.USER,
158
+ `Plugin '${pluginName}' not found${marketplaceInfo}`,
159
+ { pluginName, marketplace },
160
+ "Use `dexto plugin marketplace` to browse available plugins"
161
+ );
162
+ }
163
+ static installCopyFailed(pluginName, cause) {
164
+ return new import_core.DextoRuntimeError(
165
+ import_error_codes.MarketplaceErrorCode.INSTALL_COPY_FAILED,
166
+ import_core.ErrorScope.CONFIG,
167
+ import_core.ErrorType.SYSTEM,
168
+ `Failed to copy plugin '${pluginName}' from marketplace: ${cause}`,
169
+ { pluginName, cause },
170
+ "Check file permissions and disk space"
171
+ );
172
+ }
173
+ // Scan errors
174
+ static scanFailed(marketplacePath, cause) {
175
+ return new import_core.DextoRuntimeError(
176
+ import_error_codes.MarketplaceErrorCode.SCAN_FAILED,
177
+ import_core.ErrorScope.CONFIG,
178
+ import_core.ErrorType.SYSTEM,
179
+ `Failed to scan marketplace at ${marketplacePath}: ${cause}`,
180
+ { marketplacePath, cause },
181
+ "Check the marketplace directory is accessible"
182
+ );
183
+ }
184
+ }
185
+ // Annotate the CommonJS export names for ESM import in node:
186
+ 0 && (module.exports = {
187
+ MarketplaceError
188
+ });
@@ -0,0 +1,64 @@
1
+ import { DextoRuntimeError } from '@dexto/core';
2
+ /**
3
+ * Marketplace error factory methods
4
+ * Creates properly typed errors for marketplace operations
5
+ */
6
+ export declare class MarketplaceError {
7
+ static registryReadFailed(path: string, cause: string): DextoRuntimeError<{
8
+ path: string;
9
+ cause: string;
10
+ }>;
11
+ static registryWriteFailed(path: string, cause: string): DextoRuntimeError<{
12
+ path: string;
13
+ cause: string;
14
+ }>;
15
+ static addAlreadyExists(name: string, existingPath: string): DextoRuntimeError<{
16
+ name: string;
17
+ existingPath: string;
18
+ }>;
19
+ static addCloneFailed(source: string, cause: string): DextoRuntimeError<{
20
+ source: string;
21
+ cause: string;
22
+ }>;
23
+ static addInvalidSource(source: string, reason: string): DextoRuntimeError<{
24
+ source: string;
25
+ reason: string;
26
+ }>;
27
+ static addLocalNotFound(path: string): DextoRuntimeError<{
28
+ path: string;
29
+ }>;
30
+ static removeNotFound(name: string): DextoRuntimeError<{
31
+ name: string;
32
+ }>;
33
+ static removeDeleteFailed(name: string, path: string, cause: string): DextoRuntimeError<{
34
+ name: string;
35
+ path: string;
36
+ cause: string;
37
+ }>;
38
+ static updateNotFound(name: string): DextoRuntimeError<{
39
+ name: string;
40
+ }>;
41
+ static updatePullFailed(name: string, cause: string): DextoRuntimeError<{
42
+ name: string;
43
+ cause: string;
44
+ }>;
45
+ static updateLocalNotSupported(name: string): DextoRuntimeError<{
46
+ name: string;
47
+ }>;
48
+ static installMarketplaceNotFound(marketplace: string): DextoRuntimeError<{
49
+ marketplace: string;
50
+ }>;
51
+ static installPluginNotFound(pluginName: string, marketplace?: string): DextoRuntimeError<{
52
+ pluginName: string;
53
+ marketplace: string | undefined;
54
+ }>;
55
+ static installCopyFailed(pluginName: string, cause: string): DextoRuntimeError<{
56
+ pluginName: string;
57
+ cause: string;
58
+ }>;
59
+ static scanFailed(marketplacePath: string, cause: string): DextoRuntimeError<{
60
+ marketplacePath: string;
61
+ cause: string;
62
+ }>;
63
+ }
64
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/plugins/marketplace/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAGvE;;;GAGG;AACH,qBAAa,gBAAgB;IAEzB,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAWrD,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAYtD,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;;;;IAW1D,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAWnD,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;IAWtD,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM;;;IAYpC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM;;;IAWlC,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;;IAYnE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM;;;IAWlC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAWnD,MAAM,CAAC,uBAAuB,CAAC,IAAI,EAAE,MAAM;;;IAY3C,MAAM,CAAC,0BAA0B,CAAC,WAAW,EAAE,MAAM;;;IAWrD,MAAM,CAAC,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;;;;IAYrE,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAY1D,MAAM,CAAC,UAAU,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;CAU3D"}
@@ -0,0 +1,164 @@
1
+ import { DextoRuntimeError, ErrorScope, ErrorType } from "@dexto/core";
2
+ import { MarketplaceErrorCode } from "./error-codes.js";
3
+ class MarketplaceError {
4
+ // Registry errors
5
+ static registryReadFailed(path, cause) {
6
+ return new DextoRuntimeError(
7
+ MarketplaceErrorCode.REGISTRY_READ_FAILED,
8
+ ErrorScope.CONFIG,
9
+ ErrorType.SYSTEM,
10
+ `Failed to read marketplace registry at ${path}: ${cause}`,
11
+ { path, cause },
12
+ "Check file permissions and ensure the file exists"
13
+ );
14
+ }
15
+ static registryWriteFailed(path, cause) {
16
+ return new DextoRuntimeError(
17
+ MarketplaceErrorCode.REGISTRY_WRITE_FAILED,
18
+ ErrorScope.CONFIG,
19
+ ErrorType.SYSTEM,
20
+ `Failed to write marketplace registry at ${path}: ${cause}`,
21
+ { path, cause },
22
+ "Check file permissions and disk space"
23
+ );
24
+ }
25
+ // Add marketplace errors
26
+ static addAlreadyExists(name, existingPath) {
27
+ return new DextoRuntimeError(
28
+ MarketplaceErrorCode.ADD_ALREADY_EXISTS,
29
+ ErrorScope.CONFIG,
30
+ ErrorType.USER,
31
+ `Marketplace '${name}' already exists at ${existingPath}`,
32
+ { name, existingPath },
33
+ "Use a different name or remove the existing marketplace first"
34
+ );
35
+ }
36
+ static addCloneFailed(source, cause) {
37
+ return new DextoRuntimeError(
38
+ MarketplaceErrorCode.ADD_CLONE_FAILED,
39
+ ErrorScope.CONFIG,
40
+ ErrorType.SYSTEM,
41
+ `Failed to clone marketplace from ${source}: ${cause}`,
42
+ { source, cause },
43
+ "Check the URL is correct and you have network access"
44
+ );
45
+ }
46
+ static addInvalidSource(source, reason) {
47
+ return new DextoRuntimeError(
48
+ MarketplaceErrorCode.ADD_INVALID_SOURCE,
49
+ ErrorScope.CONFIG,
50
+ ErrorType.USER,
51
+ `Invalid marketplace source '${source}': ${reason}`,
52
+ { source, reason },
53
+ "Use format: owner/repo (GitHub), git URL, or local path"
54
+ );
55
+ }
56
+ static addLocalNotFound(path) {
57
+ return new DextoRuntimeError(
58
+ MarketplaceErrorCode.ADD_LOCAL_NOT_FOUND,
59
+ ErrorScope.CONFIG,
60
+ ErrorType.USER,
61
+ `Local marketplace path not found: ${path}`,
62
+ { path },
63
+ "Check the path exists and is a directory"
64
+ );
65
+ }
66
+ // Remove marketplace errors
67
+ static removeNotFound(name) {
68
+ return new DextoRuntimeError(
69
+ MarketplaceErrorCode.REMOVE_NOT_FOUND,
70
+ ErrorScope.CONFIG,
71
+ ErrorType.USER,
72
+ `Marketplace '${name}' not found`,
73
+ { name },
74
+ "Use `dexto plugin marketplace list` to see registered marketplaces"
75
+ );
76
+ }
77
+ static removeDeleteFailed(name, path, cause) {
78
+ return new DextoRuntimeError(
79
+ MarketplaceErrorCode.REMOVE_DELETE_FAILED,
80
+ ErrorScope.CONFIG,
81
+ ErrorType.SYSTEM,
82
+ `Failed to delete marketplace '${name}' at ${path}: ${cause}`,
83
+ { name, path, cause },
84
+ "Check file permissions"
85
+ );
86
+ }
87
+ // Update marketplace errors
88
+ static updateNotFound(name) {
89
+ return new DextoRuntimeError(
90
+ MarketplaceErrorCode.UPDATE_NOT_FOUND,
91
+ ErrorScope.CONFIG,
92
+ ErrorType.USER,
93
+ `Marketplace '${name}' not found`,
94
+ { name },
95
+ "Use `dexto plugin marketplace list` to see registered marketplaces"
96
+ );
97
+ }
98
+ static updatePullFailed(name, cause) {
99
+ return new DextoRuntimeError(
100
+ MarketplaceErrorCode.UPDATE_PULL_FAILED,
101
+ ErrorScope.CONFIG,
102
+ ErrorType.SYSTEM,
103
+ `Failed to update marketplace '${name}': ${cause}`,
104
+ { name, cause },
105
+ "Check network connectivity and that the repository is accessible"
106
+ );
107
+ }
108
+ static updateLocalNotSupported(name) {
109
+ return new DextoRuntimeError(
110
+ MarketplaceErrorCode.UPDATE_LOCAL_NOT_SUPPORTED,
111
+ ErrorScope.CONFIG,
112
+ ErrorType.USER,
113
+ `Cannot update local marketplace '${name}'`,
114
+ { name },
115
+ "Local marketplaces do not support automatic updates"
116
+ );
117
+ }
118
+ // Install from marketplace errors
119
+ static installMarketplaceNotFound(marketplace) {
120
+ return new DextoRuntimeError(
121
+ MarketplaceErrorCode.INSTALL_MARKETPLACE_NOT_FOUND,
122
+ ErrorScope.CONFIG,
123
+ ErrorType.USER,
124
+ `Marketplace '${marketplace}' not found`,
125
+ { marketplace },
126
+ "Use `dexto plugin marketplace list` to see registered marketplaces, or `dexto plugin marketplace add` to register one"
127
+ );
128
+ }
129
+ static installPluginNotFound(pluginName, marketplace) {
130
+ const marketplaceInfo = marketplace ? ` in marketplace '${marketplace}'` : "";
131
+ return new DextoRuntimeError(
132
+ MarketplaceErrorCode.INSTALL_PLUGIN_NOT_FOUND,
133
+ ErrorScope.CONFIG,
134
+ ErrorType.USER,
135
+ `Plugin '${pluginName}' not found${marketplaceInfo}`,
136
+ { pluginName, marketplace },
137
+ "Use `dexto plugin marketplace` to browse available plugins"
138
+ );
139
+ }
140
+ static installCopyFailed(pluginName, cause) {
141
+ return new DextoRuntimeError(
142
+ MarketplaceErrorCode.INSTALL_COPY_FAILED,
143
+ ErrorScope.CONFIG,
144
+ ErrorType.SYSTEM,
145
+ `Failed to copy plugin '${pluginName}' from marketplace: ${cause}`,
146
+ { pluginName, cause },
147
+ "Check file permissions and disk space"
148
+ );
149
+ }
150
+ // Scan errors
151
+ static scanFailed(marketplacePath, cause) {
152
+ return new DextoRuntimeError(
153
+ MarketplaceErrorCode.SCAN_FAILED,
154
+ ErrorScope.CONFIG,
155
+ ErrorType.SYSTEM,
156
+ `Failed to scan marketplace at ${marketplacePath}: ${cause}`,
157
+ { marketplacePath, cause },
158
+ "Check the marketplace directory is accessible"
159
+ );
160
+ }
161
+ }
162
+ export {
163
+ MarketplaceError
164
+ };
@@ -0,0 +1,95 @@
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 marketplace_exports = {};
20
+ __export(marketplace_exports, {
21
+ DEFAULT_MARKETPLACES: () => import_registry.DEFAULT_MARKETPLACES,
22
+ KnownMarketplacesFileSchema: () => import_schemas.KnownMarketplacesFileSchema,
23
+ MarketplaceAddCommandSchema: () => import_schemas.MarketplaceAddCommandSchema,
24
+ MarketplaceEntrySchema: () => import_schemas.MarketplaceEntrySchema,
25
+ MarketplaceError: () => import_errors.MarketplaceError,
26
+ MarketplaceErrorCode: () => import_error_codes.MarketplaceErrorCode,
27
+ MarketplaceInstallCommandSchema: () => import_schemas.MarketplaceInstallCommandSchema,
28
+ MarketplaceManifestSchema: () => import_schemas.MarketplaceManifestSchema,
29
+ MarketplacePluginEntrySchema: () => import_schemas.MarketplacePluginEntrySchema,
30
+ MarketplaceSourceSchema: () => import_schemas.MarketplaceSourceSchema,
31
+ addMarketplace: () => import_operations.addMarketplace,
32
+ deriveMarketplaceName: () => import_operations.deriveMarketplaceName,
33
+ findPluginInMarketplaces: () => import_operations.findPluginInMarketplaces,
34
+ getAllMarketplaces: () => import_registry.getAllMarketplaces,
35
+ getMarketplaceCacheDir: () => import_registry.getMarketplaceCacheDir,
36
+ getMarketplaceEntry: () => import_registry.getMarketplaceEntry,
37
+ getMarketplacesDir: () => import_registry.getMarketplacesDir,
38
+ getMarketplacesRegistryPath: () => import_registry.getMarketplacesRegistryPath,
39
+ getUninstalledDefaults: () => import_registry.getUninstalledDefaults,
40
+ installPluginFromMarketplace: () => import_install_from_marketplace.installPluginFromMarketplace,
41
+ isDefaultMarketplace: () => import_registry.isDefaultMarketplace,
42
+ listAllMarketplacePlugins: () => import_operations.listAllMarketplacePlugins,
43
+ listMarketplaces: () => import_operations.listMarketplaces,
44
+ loadKnownMarketplaces: () => import_registry.loadKnownMarketplaces,
45
+ marketplaceExists: () => import_registry.marketplaceExists,
46
+ parseMarketplaceSource: () => import_operations.parseMarketplaceSource,
47
+ parsePluginSpec: () => import_install_from_marketplace.parsePluginSpec,
48
+ removeMarketplace: () => import_operations.removeMarketplace,
49
+ saveKnownMarketplaces: () => import_registry.saveKnownMarketplaces,
50
+ scanMarketplacePlugins: () => import_operations.scanMarketplacePlugins,
51
+ searchMarketplacePlugins: () => import_install_from_marketplace.searchMarketplacePlugins,
52
+ updateMarketplace: () => import_operations.updateMarketplace
53
+ });
54
+ module.exports = __toCommonJS(marketplace_exports);
55
+ var import_schemas = require("./schemas.js");
56
+ var import_error_codes = require("./error-codes.js");
57
+ var import_errors = require("./errors.js");
58
+ var import_registry = require("./registry.js");
59
+ var import_operations = require("./operations.js");
60
+ var import_install_from_marketplace = require("./install-from-marketplace.js");
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ DEFAULT_MARKETPLACES,
64
+ KnownMarketplacesFileSchema,
65
+ MarketplaceAddCommandSchema,
66
+ MarketplaceEntrySchema,
67
+ MarketplaceError,
68
+ MarketplaceErrorCode,
69
+ MarketplaceInstallCommandSchema,
70
+ MarketplaceManifestSchema,
71
+ MarketplacePluginEntrySchema,
72
+ MarketplaceSourceSchema,
73
+ addMarketplace,
74
+ deriveMarketplaceName,
75
+ findPluginInMarketplaces,
76
+ getAllMarketplaces,
77
+ getMarketplaceCacheDir,
78
+ getMarketplaceEntry,
79
+ getMarketplacesDir,
80
+ getMarketplacesRegistryPath,
81
+ getUninstalledDefaults,
82
+ installPluginFromMarketplace,
83
+ isDefaultMarketplace,
84
+ listAllMarketplacePlugins,
85
+ listMarketplaces,
86
+ loadKnownMarketplaces,
87
+ marketplaceExists,
88
+ parseMarketplaceSource,
89
+ parsePluginSpec,
90
+ removeMarketplace,
91
+ saveKnownMarketplaces,
92
+ scanMarketplacePlugins,
93
+ searchMarketplacePlugins,
94
+ updateMarketplace
95
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Plugin Marketplace Module
3
+ *
4
+ * Provides functionality for managing plugin marketplaces and installing
5
+ * plugins from marketplace repositories.
6
+ */
7
+ export type { MarketplaceSourceType, MarketplaceSource, MarketplaceEntry, KnownMarketplacesFile, MarketplacePlugin, MarketplaceAddResult, MarketplaceRemoveResult, MarketplaceUpdateResult, MarketplaceInstallResult, MarketplaceAddOptions, MarketplaceInstallOptions, MarketplaceManifest, } from './types.js';
8
+ export { MarketplaceSourceSchema, MarketplaceEntrySchema, KnownMarketplacesFileSchema, MarketplaceManifestSchema, MarketplacePluginEntrySchema, MarketplaceAddCommandSchema, MarketplaceInstallCommandSchema, } from './schemas.js';
9
+ export { MarketplaceErrorCode } from './error-codes.js';
10
+ export { MarketplaceError } from './errors.js';
11
+ export { DEFAULT_MARKETPLACES, getMarketplacesRegistryPath, getMarketplacesDir, getMarketplaceCacheDir, loadKnownMarketplaces, saveKnownMarketplaces, getMarketplaceEntry, marketplaceExists, getAllMarketplaces, getUninstalledDefaults, isDefaultMarketplace, } from './registry.js';
12
+ export { parseMarketplaceSource, deriveMarketplaceName, addMarketplace, removeMarketplace, updateMarketplace, listMarketplaces, scanMarketplacePlugins, listAllMarketplacePlugins, findPluginInMarketplaces, } from './operations.js';
13
+ export { parsePluginSpec, installPluginFromMarketplace, searchMarketplacePlugins, } from './install-from-marketplace.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/marketplace/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACR,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACH,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,+BAA+B,GAClC,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EACH,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,GACvB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACH,eAAe,EACf,4BAA4B,EAC5B,wBAAwB,GAC3B,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,74 @@
1
+ import {
2
+ MarketplaceSourceSchema,
3
+ MarketplaceEntrySchema,
4
+ KnownMarketplacesFileSchema,
5
+ MarketplaceManifestSchema,
6
+ MarketplacePluginEntrySchema,
7
+ MarketplaceAddCommandSchema,
8
+ MarketplaceInstallCommandSchema
9
+ } from "./schemas.js";
10
+ import { MarketplaceErrorCode } from "./error-codes.js";
11
+ import { MarketplaceError } from "./errors.js";
12
+ import {
13
+ DEFAULT_MARKETPLACES,
14
+ getMarketplacesRegistryPath,
15
+ getMarketplacesDir,
16
+ getMarketplaceCacheDir,
17
+ loadKnownMarketplaces,
18
+ saveKnownMarketplaces,
19
+ getMarketplaceEntry,
20
+ marketplaceExists,
21
+ getAllMarketplaces,
22
+ getUninstalledDefaults,
23
+ isDefaultMarketplace
24
+ } from "./registry.js";
25
+ import {
26
+ parseMarketplaceSource,
27
+ deriveMarketplaceName,
28
+ addMarketplace,
29
+ removeMarketplace,
30
+ updateMarketplace,
31
+ listMarketplaces,
32
+ scanMarketplacePlugins,
33
+ listAllMarketplacePlugins,
34
+ findPluginInMarketplaces
35
+ } from "./operations.js";
36
+ import {
37
+ parsePluginSpec,
38
+ installPluginFromMarketplace,
39
+ searchMarketplacePlugins
40
+ } from "./install-from-marketplace.js";
41
+ export {
42
+ DEFAULT_MARKETPLACES,
43
+ KnownMarketplacesFileSchema,
44
+ MarketplaceAddCommandSchema,
45
+ MarketplaceEntrySchema,
46
+ MarketplaceError,
47
+ MarketplaceErrorCode,
48
+ MarketplaceInstallCommandSchema,
49
+ MarketplaceManifestSchema,
50
+ MarketplacePluginEntrySchema,
51
+ MarketplaceSourceSchema,
52
+ addMarketplace,
53
+ deriveMarketplaceName,
54
+ findPluginInMarketplaces,
55
+ getAllMarketplaces,
56
+ getMarketplaceCacheDir,
57
+ getMarketplaceEntry,
58
+ getMarketplacesDir,
59
+ getMarketplacesRegistryPath,
60
+ getUninstalledDefaults,
61
+ installPluginFromMarketplace,
62
+ isDefaultMarketplace,
63
+ listAllMarketplacePlugins,
64
+ listMarketplaces,
65
+ loadKnownMarketplaces,
66
+ marketplaceExists,
67
+ parseMarketplaceSource,
68
+ parsePluginSpec,
69
+ removeMarketplace,
70
+ saveKnownMarketplaces,
71
+ scanMarketplacePlugins,
72
+ searchMarketplacePlugins,
73
+ updateMarketplace
74
+ };