@dexto/agent-management 1.5.8 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/AgentFactory.cjs +5 -9
  2. package/dist/AgentFactory.d.ts +6 -5
  3. package/dist/AgentFactory.d.ts.map +1 -1
  4. package/dist/AgentFactory.js +5 -9
  5. package/dist/AgentManager.cjs +2 -2
  6. package/dist/AgentManager.d.ts +1 -1
  7. package/dist/AgentManager.d.ts.map +1 -1
  8. package/dist/AgentManager.js +4 -4
  9. package/dist/agent-creation.cjs +95 -0
  10. package/dist/agent-creation.d.ts +15 -0
  11. package/dist/agent-creation.d.ts.map +1 -0
  12. package/dist/agent-creation.js +78 -0
  13. package/dist/config/config-enrichment.cjs +0 -11
  14. package/dist/config/config-enrichment.d.ts +1 -1
  15. package/dist/config/config-enrichment.d.ts.map +1 -1
  16. package/dist/config/config-enrichment.js +0 -11
  17. package/dist/config/config-manager.cjs +4 -4
  18. package/dist/config/config-manager.d.ts +1 -1
  19. package/dist/config/config-manager.d.ts.map +1 -1
  20. package/dist/config/config-manager.js +3 -1
  21. package/dist/config/loader.d.ts +3 -3
  22. package/dist/config/loader.d.ts.map +1 -1
  23. package/dist/images/image-store.cjs +256 -0
  24. package/dist/images/image-store.d.ts +70 -0
  25. package/dist/images/image-store.d.ts.map +1 -0
  26. package/dist/images/image-store.js +210 -0
  27. package/dist/index.cjs +32 -2
  28. package/dist/index.d.ts +3 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +31 -1
  31. package/dist/plugins/discover-plugins.cjs +15 -31
  32. package/dist/plugins/discover-plugins.d.ts.map +1 -1
  33. package/dist/plugins/discover-plugins.js +15 -31
  34. package/dist/plugins/index.cjs +0 -2
  35. package/dist/plugins/index.d.ts +5 -6
  36. package/dist/plugins/index.d.ts.map +1 -1
  37. package/dist/plugins/index.js +0 -2
  38. package/dist/plugins/list-plugins.cjs +3 -1
  39. package/dist/plugins/list-plugins.d.ts.map +1 -1
  40. package/dist/plugins/list-plugins.js +3 -1
  41. package/dist/plugins/load-plugin.cjs +0 -13
  42. package/dist/plugins/load-plugin.d.ts +3 -5
  43. package/dist/plugins/load-plugin.d.ts.map +1 -1
  44. package/dist/plugins/load-plugin.js +0 -13
  45. package/dist/plugins/schemas.cjs +1 -11
  46. package/dist/plugins/schemas.d.ts +14 -69
  47. package/dist/plugins/schemas.d.ts.map +1 -1
  48. package/dist/plugins/schemas.js +1 -10
  49. package/dist/plugins/types.d.ts +2 -20
  50. package/dist/plugins/types.d.ts.map +1 -1
  51. package/dist/plugins/validate-plugin.cjs +7 -37
  52. package/dist/plugins/validate-plugin.d.ts +6 -24
  53. package/dist/plugins/validate-plugin.d.ts.map +1 -1
  54. package/dist/plugins/validate-plugin.js +8 -38
  55. package/dist/registry/registry.d.ts +4 -44
  56. package/dist/registry/registry.d.ts.map +1 -1
  57. package/dist/runtime/AgentPool.d.ts +2 -2
  58. package/dist/runtime/AgentPool.d.ts.map +1 -1
  59. package/dist/runtime/AgentRuntime.cjs +20 -15
  60. package/dist/runtime/AgentRuntime.d.ts +2 -2
  61. package/dist/runtime/AgentRuntime.d.ts.map +1 -1
  62. package/dist/runtime/AgentRuntime.js +20 -15
  63. package/dist/runtime/approval-delegation.d.ts +2 -2
  64. package/dist/runtime/approval-delegation.d.ts.map +1 -1
  65. package/dist/runtime/schemas.d.ts +1 -1
  66. package/dist/runtime/types.d.ts +2 -1
  67. package/dist/runtime/types.d.ts.map +1 -1
  68. package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.d.ts +1 -1
  69. package/dist/tool-factories/agent-spawner/error-codes.d.ts.map +1 -0
  70. package/dist/{tool-provider → tool-factories/agent-spawner}/errors.d.ts +1 -1
  71. package/dist/tool-factories/agent-spawner/errors.d.ts.map +1 -0
  72. package/dist/tool-factories/agent-spawner/factory.cjs +290 -0
  73. package/dist/tool-factories/agent-spawner/factory.d.ts +4 -0
  74. package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -0
  75. package/dist/tool-factories/agent-spawner/factory.js +279 -0
  76. package/dist/{tool-provider → tool-factories/agent-spawner}/index.cjs +9 -9
  77. package/dist/{tool-provider → tool-factories/agent-spawner}/index.d.ts +3 -3
  78. package/dist/tool-factories/agent-spawner/index.d.ts.map +1 -0
  79. package/dist/{tool-provider → tool-factories/agent-spawner}/index.js +4 -4
  80. package/dist/tool-factories/agent-spawner/llm-resolution.d.ts.map +1 -0
  81. package/dist/{tool-provider/runtime-service.cjs → tool-factories/agent-spawner/runtime.cjs} +33 -71
  82. package/dist/{tool-provider/runtime-service.d.ts → tool-factories/agent-spawner/runtime.d.ts} +6 -6
  83. package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -0
  84. package/dist/{tool-provider/runtime-service.js → tool-factories/agent-spawner/runtime.js} +29 -67
  85. package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.cjs +2 -2
  86. package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.d.ts +4 -4
  87. package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -0
  88. package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.js +2 -2
  89. package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.cjs +8 -7
  90. package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts +11 -0
  91. package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts.map +1 -0
  92. package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.js +8 -7
  93. package/dist/tool-factories/agent-spawner/types.d.ts.map +1 -0
  94. package/dist/writer.d.ts +2 -1
  95. package/dist/writer.d.ts.map +1 -1
  96. package/package.json +6 -4
  97. package/dist/tool-provider/error-codes.d.ts.map +0 -1
  98. package/dist/tool-provider/errors.d.ts.map +0 -1
  99. package/dist/tool-provider/index.d.ts.map +0 -1
  100. package/dist/tool-provider/llm-resolution.d.ts.map +0 -1
  101. package/dist/tool-provider/runtime-service.d.ts.map +0 -1
  102. package/dist/tool-provider/schemas.d.ts.map +0 -1
  103. package/dist/tool-provider/spawn-agent-tool.d.ts +0 -10
  104. package/dist/tool-provider/spawn-agent-tool.d.ts.map +0 -1
  105. package/dist/tool-provider/tool-provider.cjs +0 -197
  106. package/dist/tool-provider/tool-provider.d.ts +0 -30
  107. package/dist/tool-provider/tool-provider.d.ts.map +0 -1
  108. package/dist/tool-provider/tool-provider.js +0 -180
  109. package/dist/tool-provider/types.d.ts.map +0 -1
  110. /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.cjs +0 -0
  111. /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.js +0 -0
  112. /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.cjs +0 -0
  113. /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.js +0 -0
  114. /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.cjs +0 -0
  115. /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.d.ts +0 -0
  116. /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.js +0 -0
  117. /package/dist/{tool-provider → tool-factories/agent-spawner}/types.cjs +0 -0
  118. /package/dist/{tool-provider → tool-factories/agent-spawner}/types.d.ts +0 -0
  119. /package/dist/{tool-provider → tool-factories/agent-spawner}/types.js +0 -0
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * Zod schemas for plugin validation
3
3
  *
4
- * Supports two plugin formats:
5
- * - .claude-plugin/plugin.json: Claude Code compatible format
6
- * - .dexto-plugin/plugin.json: Dexto-native format with extended features
4
+ * Supports Claude Code compatible plugins:
5
+ * - .claude-plugin/plugin.json
7
6
  */
8
7
  import { z } from 'zod';
9
8
  /**
@@ -53,56 +52,6 @@ export declare const PluginManifestSchema: z.ZodObject<{
53
52
  email?: string | undefined;
54
53
  }>]>>;
55
54
  }, z.ZodTypeAny, "passthrough">>;
56
- /**
57
- * Schema for Dexto-native plugin.json manifest
58
- * Extends Claude Code format with Dexto-specific features
59
- */
60
- export declare const DextoPluginManifestSchema: z.ZodObject<{
61
- name: z.ZodString;
62
- description: z.ZodOptional<z.ZodString>;
63
- version: z.ZodOptional<z.ZodString>;
64
- author: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
65
- name: z.ZodString;
66
- email: z.ZodOptional<z.ZodString>;
67
- }, "strip", z.ZodTypeAny, {
68
- name: string;
69
- email?: string | undefined;
70
- }, {
71
- name: string;
72
- email?: string | undefined;
73
- }>]>>;
74
- customToolProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
76
- name: z.ZodString;
77
- description: z.ZodOptional<z.ZodString>;
78
- version: z.ZodOptional<z.ZodString>;
79
- author: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
80
- name: z.ZodString;
81
- email: z.ZodOptional<z.ZodString>;
82
- }, "strip", z.ZodTypeAny, {
83
- name: string;
84
- email?: string | undefined;
85
- }, {
86
- name: string;
87
- email?: string | undefined;
88
- }>]>>;
89
- customToolProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
90
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
91
- name: z.ZodString;
92
- description: z.ZodOptional<z.ZodString>;
93
- version: z.ZodOptional<z.ZodString>;
94
- author: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
95
- name: z.ZodString;
96
- email: z.ZodOptional<z.ZodString>;
97
- }, "strip", z.ZodTypeAny, {
98
- name: string;
99
- email?: string | undefined;
100
- }, {
101
- name: string;
102
- email?: string | undefined;
103
- }>]>>;
104
- customToolProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
105
- }, z.ZodTypeAny, "passthrough">>;
106
55
  /**
107
56
  * Schema for .mcp.json configuration
108
57
  * Uses passthrough to allow unknown MCP server configurations
@@ -118,10 +67,6 @@ export declare const PluginMCPConfigSchema: z.ZodObject<{
118
67
  * Type for validated Claude Code plugin manifest
119
68
  */
120
69
  export type ValidatedPluginManifest = z.output<typeof PluginManifestSchema>;
121
- /**
122
- * Type for validated Dexto-native plugin manifest
123
- */
124
- export type ValidatedDextoPluginManifest = z.output<typeof DextoPluginManifestSchema>;
125
70
  /**
126
71
  * Type for validated MCP config
127
72
  */
@@ -130,7 +75,7 @@ export type ValidatedPluginMCPConfig = z.output<typeof PluginMCPConfigSchema>;
130
75
  * Schema for individual plugin installation entry in installed_plugins.json
131
76
  */
132
77
  export declare const InstalledPluginEntrySchema: z.ZodObject<{
133
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
78
+ scope: z.ZodEnum<["project", "user", "local"]>;
134
79
  installPath: z.ZodString;
135
80
  version: z.ZodOptional<z.ZodString>;
136
81
  installedAt: z.ZodOptional<z.ZodString>;
@@ -139,7 +84,7 @@ export declare const InstalledPluginEntrySchema: z.ZodObject<{
139
84
  projectPath: z.ZodOptional<z.ZodString>;
140
85
  isLocal: z.ZodOptional<z.ZodBoolean>;
141
86
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
142
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
87
+ scope: z.ZodEnum<["project", "user", "local"]>;
143
88
  installPath: z.ZodString;
144
89
  version: z.ZodOptional<z.ZodString>;
145
90
  installedAt: z.ZodOptional<z.ZodString>;
@@ -148,7 +93,7 @@ export declare const InstalledPluginEntrySchema: z.ZodObject<{
148
93
  projectPath: z.ZodOptional<z.ZodString>;
149
94
  isLocal: z.ZodOptional<z.ZodBoolean>;
150
95
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
151
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
96
+ scope: z.ZodEnum<["project", "user", "local"]>;
152
97
  installPath: z.ZodString;
153
98
  version: z.ZodOptional<z.ZodString>;
154
99
  installedAt: z.ZodOptional<z.ZodString>;
@@ -163,7 +108,7 @@ export declare const InstalledPluginEntrySchema: z.ZodObject<{
163
108
  export declare const InstalledPluginsFileSchema: z.ZodObject<{
164
109
  version: z.ZodOptional<z.ZodNumber>;
165
110
  plugins: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
166
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
111
+ scope: z.ZodEnum<["project", "user", "local"]>;
167
112
  installPath: z.ZodString;
168
113
  version: z.ZodOptional<z.ZodString>;
169
114
  installedAt: z.ZodOptional<z.ZodString>;
@@ -172,7 +117,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
172
117
  projectPath: z.ZodOptional<z.ZodString>;
173
118
  isLocal: z.ZodOptional<z.ZodBoolean>;
174
119
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
175
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
120
+ scope: z.ZodEnum<["project", "user", "local"]>;
176
121
  installPath: z.ZodString;
177
122
  version: z.ZodOptional<z.ZodString>;
178
123
  installedAt: z.ZodOptional<z.ZodString>;
@@ -181,7 +126,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
181
126
  projectPath: z.ZodOptional<z.ZodString>;
182
127
  isLocal: z.ZodOptional<z.ZodBoolean>;
183
128
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
184
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
129
+ scope: z.ZodEnum<["project", "user", "local"]>;
185
130
  installPath: z.ZodString;
186
131
  version: z.ZodOptional<z.ZodString>;
187
132
  installedAt: z.ZodOptional<z.ZodString>;
@@ -193,7 +138,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
193
138
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
194
139
  version: z.ZodOptional<z.ZodNumber>;
195
140
  plugins: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
196
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
141
+ scope: z.ZodEnum<["project", "user", "local"]>;
197
142
  installPath: z.ZodString;
198
143
  version: z.ZodOptional<z.ZodString>;
199
144
  installedAt: z.ZodOptional<z.ZodString>;
@@ -202,7 +147,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
202
147
  projectPath: z.ZodOptional<z.ZodString>;
203
148
  isLocal: z.ZodOptional<z.ZodBoolean>;
204
149
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
205
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
150
+ scope: z.ZodEnum<["project", "user", "local"]>;
206
151
  installPath: z.ZodString;
207
152
  version: z.ZodOptional<z.ZodString>;
208
153
  installedAt: z.ZodOptional<z.ZodString>;
@@ -211,7 +156,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
211
156
  projectPath: z.ZodOptional<z.ZodString>;
212
157
  isLocal: z.ZodOptional<z.ZodBoolean>;
213
158
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
214
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
159
+ scope: z.ZodEnum<["project", "user", "local"]>;
215
160
  installPath: z.ZodString;
216
161
  version: z.ZodOptional<z.ZodString>;
217
162
  installedAt: z.ZodOptional<z.ZodString>;
@@ -223,7 +168,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
223
168
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
224
169
  version: z.ZodOptional<z.ZodNumber>;
225
170
  plugins: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
226
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
171
+ scope: z.ZodEnum<["project", "user", "local"]>;
227
172
  installPath: z.ZodString;
228
173
  version: z.ZodOptional<z.ZodString>;
229
174
  installedAt: z.ZodOptional<z.ZodString>;
@@ -232,7 +177,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
232
177
  projectPath: z.ZodOptional<z.ZodString>;
233
178
  isLocal: z.ZodOptional<z.ZodBoolean>;
234
179
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
235
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
180
+ scope: z.ZodEnum<["project", "user", "local"]>;
236
181
  installPath: z.ZodString;
237
182
  version: z.ZodOptional<z.ZodString>;
238
183
  installedAt: z.ZodOptional<z.ZodString>;
@@ -241,7 +186,7 @@ export declare const InstalledPluginsFileSchema: z.ZodObject<{
241
186
  projectPath: z.ZodOptional<z.ZodString>;
242
187
  isLocal: z.ZodOptional<z.ZodBoolean>;
243
188
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
244
- scope: z.ZodEnum<["project", "user", "local", "managed"]>;
189
+ scope: z.ZodEnum<["project", "user", "local"]>;
245
190
  installPath: z.ZodString;
246
191
  version: z.ZodOptional<z.ZodString>;
247
192
  installedAt: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/plugins/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQ2C,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAasC,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;gCAKe,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAeG,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;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AAC"}
@@ -12,19 +12,11 @@ const PluginManifestSchema = z.object({
12
12
  version: z.string().optional().describe("Semantic version (e.g., 1.0.0)"),
13
13
  author: AuthorSchema.optional().describe("Plugin author - string or {name, email} object")
14
14
  }).passthrough().describe("Claude Code plugin manifest from .claude-plugin/plugin.json");
15
- const DextoPluginManifestSchema = z.object({
16
- name: z.string().min(1).describe("Unique plugin name (used for namespacing commands)"),
17
- description: z.string().optional().describe("Human-readable plugin description"),
18
- version: z.string().optional().describe("Semantic version (e.g., 1.0.0)"),
19
- author: AuthorSchema.optional().describe("Plugin author - string or {name, email} object"),
20
- // Dexto-specific extensions
21
- customToolProviders: z.array(z.string()).optional().describe('Custom tool provider types bundled with this plugin (e.g., ["plan-tools"])')
22
- }).passthrough().describe("Dexto-native plugin manifest from .dexto-plugin/plugin.json");
23
15
  const PluginMCPConfigSchema = z.object({
24
16
  mcpServers: z.record(z.unknown()).optional().describe("MCP servers to register")
25
17
  }).passthrough().describe("MCP configuration from .mcp.json");
26
18
  const InstalledPluginEntrySchema = z.object({
27
- scope: z.enum(["project", "user", "local", "managed"]).describe("Installation scope"),
19
+ scope: z.enum(["project", "user", "local"]).describe("Installation scope"),
28
20
  installPath: z.string().describe("Absolute path to the installed plugin"),
29
21
  version: z.string().optional().describe("Plugin version"),
30
22
  installedAt: z.string().optional().describe("ISO timestamp of installation"),
@@ -38,7 +30,6 @@ const InstalledPluginsFileSchema = z.object({
38
30
  plugins: z.record(z.array(InstalledPluginEntrySchema)).describe("Map of plugin identifiers to installation entries")
39
31
  }).passthrough().describe("Claude Code installed plugins manifest");
40
32
  export {
41
- DextoPluginManifestSchema,
42
33
  InstalledPluginEntrySchema,
43
34
  InstalledPluginsFileSchema,
44
35
  PluginMCPConfigSchema,
@@ -32,18 +32,6 @@ export interface PluginManifest {
32
32
  version?: string | undefined;
33
33
  author?: PluginAuthor | undefined;
34
34
  }
35
- /**
36
- * Dexto-native plugin manifest from .dexto-plugin/plugin.json
37
- * Extends PluginManifest with Dexto-specific features
38
- */
39
- export interface DextoPluginManifest extends PluginManifest {
40
- /** Custom tool provider types bundled with this plugin (e.g., ["plan-tools"]) */
41
- customToolProviders?: string[] | undefined;
42
- }
43
- /**
44
- * Plugin format type
45
- */
46
- export type PluginFormat = 'claude-code' | 'dexto';
47
35
  /**
48
36
  * A discovered plugin directory with its manifest
49
37
  */
@@ -51,11 +39,9 @@ export interface DiscoveredPlugin {
51
39
  /** Absolute path to plugin directory */
52
40
  path: string;
53
41
  /** Parsed and validated plugin manifest */
54
- manifest: PluginManifest | DextoPluginManifest;
42
+ manifest: PluginManifest;
55
43
  /** Source location type */
56
44
  source: 'project' | 'user';
57
- /** Plugin format (claude-code or dexto) */
58
- format: PluginFormat;
59
45
  }
60
46
  /**
61
47
  * A command or skill discovered within a plugin
@@ -80,15 +66,11 @@ export interface PluginMCPConfig {
80
66
  */
81
67
  export interface LoadedPlugin {
82
68
  /** Plugin manifest metadata */
83
- manifest: PluginManifest | DextoPluginManifest;
84
- /** Plugin format (claude-code or dexto) */
85
- format: PluginFormat;
69
+ manifest: PluginManifest;
86
70
  /** Discovered commands and skills */
87
71
  commands: PluginCommand[];
88
72
  /** MCP servers to merge into agent config */
89
73
  mcpConfig?: PluginMCPConfig | undefined;
90
- /** Custom tool provider types to register (Dexto-native plugins only) */
91
- customToolProviders: string[];
92
74
  /** Warnings for unsupported features found */
93
75
  warnings: string[];
94
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAA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const warnings = [];
41
41
  let manifest;
42
- let format;
43
42
  const absolutePath = path.isAbsolute(pluginPath) ? pluginPath : path.resolve(pluginPath);
44
43
  if (!(0, import_fs.existsSync)(absolutePath)) {
45
44
  errors.push(`Directory does not exist: ${absolutePath}`);
46
45
  return { valid: false, errors, warnings };
47
46
  }
48
- const dextoPluginDir = path.join(absolutePath, ".dexto-plugin");
49
- const claudePluginDir = path.join(absolutePath, ".claude-plugin");
50
- let manifestPath;
51
- if ((0, import_fs.existsSync)(dextoPluginDir)) {
52
- manifestPath = path.join(dextoPluginDir, "plugin.json");
53
- format = "dexto";
54
- } else if ((0, import_fs.existsSync)(claudePluginDir)) {
55
- manifestPath = path.join(claudePluginDir, "plugin.json");
56
- format = "claude-code";
57
- } else {
58
- errors.push("Missing .dexto-plugin or .claude-plugin directory");
59
- return { valid: false, errors, warnings };
60
- }
47
+ const manifestPath = path.join(absolutePath, ".claude-plugin", "plugin.json");
61
48
  if (!(0, import_fs.existsSync)(manifestPath)) {
62
- errors.push(
63
- `Missing ${format === "dexto" ? ".dexto-plugin" : ".claude-plugin"}/plugin.json`
64
- );
49
+ errors.push("Missing .claude-plugin/plugin.json");
65
50
  return { valid: false, errors, warnings };
66
51
  }
67
52
  try {
@@ -75,8 +60,7 @@ function validatePluginDirectory(pluginPath) {
75
60
  );
76
61
  return { valid: false, errors, warnings };
77
62
  }
78
- const schema = format === "dexto" ? import_schemas.DextoPluginManifestSchema : import_schemas.PluginManifestSchema;
79
- const result = schema.safeParse(parsed);
63
+ const result = import_schemas.PluginManifestSchema.safeParse(parsed);
80
64
  if (!result.success) {
81
65
  const issues = result.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`);
82
66
  errors.push(`Schema validation failed: ${issues.join("; ")}`);
@@ -112,7 +96,6 @@ function validatePluginDirectory(pluginPath) {
112
96
  return {
113
97
  valid: errors.length === 0,
114
98
  manifest,
115
- format,
116
99
  errors,
117
100
  warnings
118
101
  };
@@ -143,31 +126,18 @@ function checkDirectoryHasSkills(skillsDir) {
143
126
  return false;
144
127
  }
145
128
  }
146
- function tryLoadManifest(pluginPath, returnFormat) {
147
- const dextoManifestPath = path.join(pluginPath, ".dexto-plugin", "plugin.json");
148
- const claudeManifestPath = path.join(pluginPath, ".claude-plugin", "plugin.json");
149
- let manifestPath;
150
- let format;
151
- if ((0, import_fs.existsSync)(dextoManifestPath)) {
152
- manifestPath = dextoManifestPath;
153
- format = "dexto";
154
- } else if ((0, import_fs.existsSync)(claudeManifestPath)) {
155
- manifestPath = claudeManifestPath;
156
- format = "claude-code";
157
- } else {
129
+ function tryLoadManifest(pluginPath) {
130
+ const manifestPath = path.join(pluginPath, ".claude-plugin", "plugin.json");
131
+ if (!(0, import_fs.existsSync)(manifestPath)) {
158
132
  return null;
159
133
  }
160
134
  try {
161
135
  const content = (0, import_fs.readFileSync)(manifestPath, "utf-8");
162
136
  const parsed = JSON.parse(content);
163
- const schema = format === "dexto" ? import_schemas.DextoPluginManifestSchema : import_schemas.PluginManifestSchema;
164
- const result = schema.safeParse(parsed);
137
+ const result = import_schemas.PluginManifestSchema.safeParse(parsed);
165
138
  if (!result.success) {
166
139
  return null;
167
140
  }
168
- if (returnFormat) {
169
- return { manifest: result.data, format };
170
- }
171
141
  return result.data;
172
142
  } catch {
173
143
  return null;
@@ -4,24 +4,16 @@
4
4
  * Validates plugin directory structure and manifest.
5
5
  * Checks for required files, valid JSON, and schema compliance.
6
6
  *
7
- * Supports two plugin formats:
8
- * - .claude-plugin/plugin.json: Claude Code compatible format
9
- * - .dexto-plugin/plugin.json: Dexto-native format with extended features (preferred)
7
+ * Supports Claude Code compatible plugins:
8
+ * - .claude-plugin/plugin.json
10
9
  */
11
- import type { PluginValidationResult, PluginManifest, DextoPluginManifest, PluginFormat } from './types.js';
12
- /**
13
- * Extended validation result with plugin format
14
- */
15
- export interface ExtendedPluginValidationResult extends PluginValidationResult {
16
- /** Plugin format detected */
17
- format?: PluginFormat;
18
- }
10
+ import type { PluginValidationResult, PluginManifest } from './types.js';
19
11
  /**
20
12
  * Validates a plugin directory structure and manifest.
21
13
  *
22
14
  * Checks:
23
15
  * 1. Directory exists
24
- * 2. .dexto-plugin/plugin.json OR .claude-plugin/plugin.json exists (Dexto format preferred)
16
+ * 2. .claude-plugin/plugin.json exists
25
17
  * 3. plugin.json is valid JSON
26
18
  * 4. plugin.json matches schema (name is required)
27
19
  * 5. At least one command or skill exists (warning if none)
@@ -29,25 +21,15 @@ export interface ExtendedPluginValidationResult extends PluginValidationResult {
29
21
  * @param pluginPath Absolute or relative path to plugin directory
30
22
  * @returns Validation result with manifest (if valid), errors, and warnings
31
23
  */
32
- export declare function validatePluginDirectory(pluginPath: string): ExtendedPluginValidationResult;
33
- /**
34
- * Result of manifest loading with format information
35
- */
36
- export interface LoadedManifestResult {
37
- manifest: PluginManifest | DextoPluginManifest;
38
- format: PluginFormat;
39
- }
24
+ export declare function validatePluginDirectory(pluginPath: string): PluginValidationResult;
40
25
  /**
41
26
  * Attempts to load and validate a plugin manifest from a directory.
42
27
  * Returns null if the manifest doesn't exist, is invalid JSON, or fails schema validation.
43
28
  *
44
- * Checks for .dexto-plugin first (preferred), then falls back to .claude-plugin.
45
- *
46
29
  * This is a shared utility used by discover-plugins, list-plugins, and import-plugin.
47
30
  *
48
31
  * @param pluginPath Absolute path to the plugin directory
49
- * @returns Validated manifest with format or null if not a valid plugin
32
+ * @returns Validated manifest or null if not a valid plugin
50
33
  */
51
34
  export declare function tryLoadManifest(pluginPath: string): PluginManifest | null;
52
- export declare function tryLoadManifest(pluginPath: string, returnFormat: true): LoadedManifestResult | null;
53
35
  //# sourceMappingURL=validate-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/validate-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EACR,sBAAsB,EACtB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACf,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,sBAAsB;IAC1E,6BAA6B;IAC7B,MAAM,CAAC,EAAE,YAAY,CAAC;CACzB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,8BAA8B,CAyG1F;AAuCD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,cAAc,GAAG,mBAAmB,CAAC;IAC/C,MAAM,EAAE,YAAY,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC;AAC3E,wBAAgB,eAAe,CAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,IAAI,GACnB,oBAAoB,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"validate-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/validate-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzE;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,sBAAsB,CAsFlF;AAuCD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAmBzE"}
@@ -1,33 +1,18 @@
1
1
  import * as path from "path";
2
2
  import { existsSync, readFileSync, readdirSync } from "fs";
3
- import { PluginManifestSchema, DextoPluginManifestSchema } from "./schemas.js";
3
+ import { PluginManifestSchema } from "./schemas.js";
4
4
  function validatePluginDirectory(pluginPath) {
5
5
  const errors = [];
6
6
  const warnings = [];
7
7
  let manifest;
8
- let format;
9
8
  const absolutePath = path.isAbsolute(pluginPath) ? pluginPath : path.resolve(pluginPath);
10
9
  if (!existsSync(absolutePath)) {
11
10
  errors.push(`Directory does not exist: ${absolutePath}`);
12
11
  return { valid: false, errors, warnings };
13
12
  }
14
- const dextoPluginDir = path.join(absolutePath, ".dexto-plugin");
15
- const claudePluginDir = path.join(absolutePath, ".claude-plugin");
16
- let manifestPath;
17
- if (existsSync(dextoPluginDir)) {
18
- manifestPath = path.join(dextoPluginDir, "plugin.json");
19
- format = "dexto";
20
- } else if (existsSync(claudePluginDir)) {
21
- manifestPath = path.join(claudePluginDir, "plugin.json");
22
- format = "claude-code";
23
- } else {
24
- errors.push("Missing .dexto-plugin or .claude-plugin directory");
25
- return { valid: false, errors, warnings };
26
- }
13
+ const manifestPath = path.join(absolutePath, ".claude-plugin", "plugin.json");
27
14
  if (!existsSync(manifestPath)) {
28
- errors.push(
29
- `Missing ${format === "dexto" ? ".dexto-plugin" : ".claude-plugin"}/plugin.json`
30
- );
15
+ errors.push("Missing .claude-plugin/plugin.json");
31
16
  return { valid: false, errors, warnings };
32
17
  }
33
18
  try {
@@ -41,8 +26,7 @@ function validatePluginDirectory(pluginPath) {
41
26
  );
42
27
  return { valid: false, errors, warnings };
43
28
  }
44
- const schema = format === "dexto" ? DextoPluginManifestSchema : PluginManifestSchema;
45
- const result = schema.safeParse(parsed);
29
+ const result = PluginManifestSchema.safeParse(parsed);
46
30
  if (!result.success) {
47
31
  const issues = result.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`);
48
32
  errors.push(`Schema validation failed: ${issues.join("; ")}`);
@@ -78,7 +62,6 @@ function validatePluginDirectory(pluginPath) {
78
62
  return {
79
63
  valid: errors.length === 0,
80
64
  manifest,
81
- format,
82
65
  errors,
83
66
  warnings
84
67
  };
@@ -109,31 +92,18 @@ function checkDirectoryHasSkills(skillsDir) {
109
92
  return false;
110
93
  }
111
94
  }
112
- function tryLoadManifest(pluginPath, returnFormat) {
113
- const dextoManifestPath = path.join(pluginPath, ".dexto-plugin", "plugin.json");
114
- const claudeManifestPath = path.join(pluginPath, ".claude-plugin", "plugin.json");
115
- let manifestPath;
116
- let format;
117
- if (existsSync(dextoManifestPath)) {
118
- manifestPath = dextoManifestPath;
119
- format = "dexto";
120
- } else if (existsSync(claudeManifestPath)) {
121
- manifestPath = claudeManifestPath;
122
- format = "claude-code";
123
- } else {
95
+ function tryLoadManifest(pluginPath) {
96
+ const manifestPath = path.join(pluginPath, ".claude-plugin", "plugin.json");
97
+ if (!existsSync(manifestPath)) {
124
98
  return null;
125
99
  }
126
100
  try {
127
101
  const content = readFileSync(manifestPath, "utf-8");
128
102
  const parsed = JSON.parse(content);
129
- const schema = format === "dexto" ? DextoPluginManifestSchema : PluginManifestSchema;
130
- const result = schema.safeParse(parsed);
103
+ const result = PluginManifestSchema.safeParse(parsed);
131
104
  if (!result.success) {
132
105
  return null;
133
106
  }
134
- if (returnFormat) {
135
- return { manifest: result.data, format };
136
- }
137
107
  return result.data;
138
108
  } catch {
139
109
  return null;
@@ -1,51 +1,11 @@
1
1
  import { Registry, AgentRegistry, AgentRegistryEntry } from './types.js';
2
2
  /**
3
3
  * Local agent registry implementation
4
+ * Loads and merges the bundled registry (shipped with the CLI bundle) with the user's custom
5
+ * registry under `~/.dexto`.
4
6
  *
5
- * TODO: ARCHITECTURAL REFACTOR - Move registry, preferences, and agent resolution to CLI
6
- *
7
- * PROBLEM: Registry operations are CLI concerns but live in Core, causing:
8
- * - Missing analytics for auto-install (when running `dexto`, registry installs agents but doesn't track)
9
- * - Wrong separation of concerns (Core = execution engine, not discovery/setup)
10
- * - Registry manages ~/.dexto/agents filesystem which is CLI-level setup
11
- *
12
- * THE RIGHT ARCHITECTURE:
13
- *
14
- * Move to CLI:
15
- * 1. Agent Registry (packages/core/src/agent/registry/) → packages/cli/src/registry/
16
- * - installAgent(), uninstallAgent(), resolveAgent(), listAgents()
17
- * - Can directly call capture() for analytics
18
- * - Manages ~/.dexto/agents installation directory
19
- *
20
- * 2. Global Preferences (packages/core/src/preferences/) → packages/cli/src/preferences/
21
- * - User's default LLM, model, default agent
22
- * - Used by `dexto setup` command
23
- * - Manages ~/.dexto/preferences.json
24
- *
25
- * 3. Agent Resolution (packages/core/src/config/agent-resolver.ts) → packages/cli/src/agent-resolver.ts
26
- * - Discovery logic: check registry, trigger installs, apply preferences
27
- * - Returns resolved config PATH to core
28
- *
29
- * Core keeps:
30
- * - config/loader.ts - Load YAML from path
31
- * - config/schemas.ts - Zod validation
32
- * - Agent execution (DextoAgent, LLM, tools, MCP)
33
- *
34
- * FLOW AFTER REFACTOR:
35
- * CLI index.ts:
36
- * → CLI: resolveAgentPath() (discovery logic)
37
- * → CLI: registry.resolveAgent()
38
- * → CLI: registry.installAgent() if needed
39
- * → CLI: capture('dexto_install_agent', ...) ✓ Natural!
40
- * → Core: new DextoAgent(configPath) (just loads & runs)
41
- *
42
- * BENEFITS:
43
- * - Clear separation: CLI = setup/discovery, Core = execution
44
- * - Analytics naturally colocated with operations
45
- * - Core is portable (no CLI dependencies)
46
- * - No circular deps (CLI → Core, correct direction)
47
- *
48
- * ESTIMATE: ~3-4 hours (mostly moving code + updating imports)
7
+ * Hosts (CLI, server, apps) use this to resolve an agent ID to a concrete YAML path, then
8
+ * load/validate that YAML and instantiate a `DextoAgent` from the resolved config.
49
9
  */
50
10
  export declare class LocalAgentRegistry implements AgentRegistry {
51
11
  private _registry;
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/registry/registry.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,QAAQ,EAER,aAAa,EACb,kBAAkB,EAErB,MAAM,YAAY,CAAC;AAapB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,qBAAa,kBAAmB,YAAW,aAAa;IACpD,OAAO,CAAC,SAAS,CAAyB;IAE1C;;OAEG;IACH,WAAW,IAAI,QAAQ;IAOvB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAyCpB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAKlC;;OAEG;IACH,kBAAkB,IAAI,MAA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agents, enforces resource limits, and provides
5
5
  * lookup and lifecycle management capabilities.
6
6
  */
7
- import type { IDextoLogger } from '@dexto/core';
7
+ import type { Logger } from '@dexto/core';
8
8
  import type { AgentHandle, AgentStatus, AgentFilter } from './types.js';
9
9
  import { type ValidatedAgentRuntimeConfig } from './schemas.js';
10
10
  export declare class AgentPool {
11
11
  private agents;
12
12
  private config;
13
13
  private logger;
14
- constructor(config: Partial<ValidatedAgentRuntimeConfig>, logger: IDextoLogger);
14
+ constructor(config: Partial<ValidatedAgentRuntimeConfig>, logger: Logger);
15
15
  /**
16
16
  * Add an agent handle to the pool
17
17
  * @throws RuntimeError if agent with same ID already exists or limit exceeded
@@ -1 +1 @@
1
- {"version":3,"file":"AgentPool.d.ts","sourceRoot":"","sources":["../../src/runtime/AgentPool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAGH,KAAK,2BAA2B,EACnC,MAAM,cAAc,CAAC;AAGtB,qBAAa,SAAS;IAClB,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,MAAM,CAA8B;IAC5C,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,EAAE,OAAO,CAAC,2BAA2B,CAAC,EAAE,MAAM,EAAE,YAAY;IAQ9E;;;OAGG;IACH,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAe9B;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAShD;;OAEG;IACH,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI7C;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,EAAE;IAczC;;OA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