@dexto/agent-management 1.5.8 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AgentFactory.cjs +5 -9
- package/dist/AgentFactory.d.ts +6 -5
- package/dist/AgentFactory.d.ts.map +1 -1
- package/dist/AgentFactory.js +5 -9
- package/dist/AgentManager.cjs +2 -2
- package/dist/AgentManager.d.ts +1 -1
- package/dist/AgentManager.d.ts.map +1 -1
- package/dist/AgentManager.js +4 -4
- package/dist/agent-creation.cjs +95 -0
- package/dist/agent-creation.d.ts +15 -0
- package/dist/agent-creation.d.ts.map +1 -0
- package/dist/agent-creation.js +78 -0
- package/dist/config/config-enrichment.cjs +8 -14
- package/dist/config/config-enrichment.d.ts +7 -1
- package/dist/config/config-enrichment.d.ts.map +1 -1
- package/dist/config/config-enrichment.js +8 -14
- package/dist/config/config-manager.cjs +4 -4
- package/dist/config/config-manager.d.ts +1 -1
- package/dist/config/config-manager.d.ts.map +1 -1
- package/dist/config/config-manager.js +3 -1
- package/dist/config/loader.d.ts +3 -3
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/images/image-store.cjs +256 -0
- package/dist/images/image-store.d.ts +70 -0
- package/dist/images/image-store.d.ts.map +1 -0
- package/dist/images/image-store.js +210 -0
- package/dist/index.cjs +32 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -1
- package/dist/plugins/discover-plugins.cjs +15 -31
- package/dist/plugins/discover-plugins.d.ts.map +1 -1
- package/dist/plugins/discover-plugins.js +15 -31
- package/dist/plugins/index.cjs +0 -2
- package/dist/plugins/index.d.ts +5 -6
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +0 -2
- package/dist/plugins/list-plugins.cjs +3 -1
- package/dist/plugins/list-plugins.d.ts.map +1 -1
- package/dist/plugins/list-plugins.js +3 -1
- package/dist/plugins/load-plugin.cjs +0 -13
- package/dist/plugins/load-plugin.d.ts +3 -5
- package/dist/plugins/load-plugin.d.ts.map +1 -1
- package/dist/plugins/load-plugin.js +0 -13
- package/dist/plugins/schemas.cjs +1 -11
- package/dist/plugins/schemas.d.ts +14 -69
- package/dist/plugins/schemas.d.ts.map +1 -1
- package/dist/plugins/schemas.js +1 -10
- package/dist/plugins/types.d.ts +2 -20
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/plugins/validate-plugin.cjs +7 -37
- package/dist/plugins/validate-plugin.d.ts +6 -24
- package/dist/plugins/validate-plugin.d.ts.map +1 -1
- package/dist/plugins/validate-plugin.js +8 -38
- package/dist/preferences/loader.cjs +21 -6
- package/dist/preferences/loader.d.ts +4 -0
- package/dist/preferences/loader.d.ts.map +1 -1
- package/dist/preferences/loader.js +21 -6
- package/dist/preferences/schemas.cjs +5 -1
- package/dist/preferences/schemas.d.ts +32 -0
- package/dist/preferences/schemas.d.ts.map +1 -1
- package/dist/preferences/schemas.js +5 -1
- package/dist/registry/registry.d.ts +4 -44
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/types.cjs +4 -0
- package/dist/registry/types.d.ts +8 -0
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/registry/types.js +4 -0
- package/dist/runtime/AgentPool.d.ts +2 -2
- package/dist/runtime/AgentPool.d.ts.map +1 -1
- package/dist/runtime/AgentRuntime.cjs +32 -19
- package/dist/runtime/AgentRuntime.d.ts +2 -2
- package/dist/runtime/AgentRuntime.d.ts.map +1 -1
- package/dist/runtime/AgentRuntime.js +32 -19
- package/dist/runtime/approval-delegation.cjs +6 -3
- package/dist/runtime/approval-delegation.d.ts +3 -2
- package/dist/runtime/approval-delegation.d.ts.map +1 -1
- package/dist/runtime/approval-delegation.js +6 -3
- package/dist/runtime/schemas.cjs +1 -1
- package/dist/runtime/schemas.d.ts +1 -1
- package/dist/runtime/schemas.js +1 -1
- package/dist/runtime/types.d.ts +3 -2
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.d.ts +1 -1
- package/dist/tool-factories/agent-spawner/error-codes.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/errors.d.ts +1 -1
- package/dist/tool-factories/agent-spawner/errors.d.ts.map +1 -0
- package/dist/tool-factories/agent-spawner/factory.cjs +327 -0
- package/dist/tool-factories/agent-spawner/factory.d.ts +4 -0
- package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -0
- package/dist/tool-factories/agent-spawner/factory.js +316 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/index.cjs +9 -9
- package/dist/{tool-provider → tool-factories/agent-spawner}/index.d.ts +3 -3
- package/dist/tool-factories/agent-spawner/index.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/index.js +4 -4
- package/dist/tool-factories/agent-spawner/llm-resolution.d.ts.map +1 -0
- package/dist/{tool-provider/runtime-service.cjs → tool-factories/agent-spawner/runtime.cjs} +149 -83
- package/dist/{tool-provider/runtime-service.d.ts → tool-factories/agent-spawner/runtime.d.ts} +11 -6
- package/dist/tool-factories/agent-spawner/runtime.d.ts.map +1 -0
- package/dist/{tool-provider/runtime-service.js → tool-factories/agent-spawner/runtime.js} +145 -79
- package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.cjs +4 -4
- package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.d.ts +5 -5
- package/dist/tool-factories/agent-spawner/schemas.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/schemas.js +4 -4
- package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.cjs +17 -7
- package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts +11 -0
- package/dist/tool-factories/agent-spawner/spawn-agent-tool.d.ts.map +1 -0
- package/dist/{tool-provider → tool-factories/agent-spawner}/spawn-agent-tool.js +17 -7
- package/dist/tool-factories/agent-spawner/types.d.ts.map +1 -0
- package/dist/utils/path.cjs +10 -1
- package/dist/utils/path.d.ts +5 -2
- package/dist/utils/path.d.ts.map +1 -1
- package/dist/utils/path.js +10 -1
- package/dist/writer.d.ts +2 -1
- package/dist/writer.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/tool-provider/error-codes.d.ts.map +0 -1
- package/dist/tool-provider/errors.d.ts.map +0 -1
- package/dist/tool-provider/index.d.ts.map +0 -1
- package/dist/tool-provider/llm-resolution.d.ts.map +0 -1
- package/dist/tool-provider/runtime-service.d.ts.map +0 -1
- package/dist/tool-provider/schemas.d.ts.map +0 -1
- package/dist/tool-provider/spawn-agent-tool.d.ts +0 -10
- package/dist/tool-provider/spawn-agent-tool.d.ts.map +0 -1
- package/dist/tool-provider/tool-provider.cjs +0 -197
- package/dist/tool-provider/tool-provider.d.ts +0 -30
- package/dist/tool-provider/tool-provider.d.ts.map +0 -1
- package/dist/tool-provider/tool-provider.js +0 -180
- package/dist/tool-provider/types.d.ts.map +0 -1
- /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/error-codes.js +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/errors.js +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.d.ts +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/llm-resolution.js +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/types.cjs +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/types.d.ts +0 -0
- /package/dist/{tool-provider → tool-factories/agent-spawner}/types.js +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Zod schemas for plugin validation
|
|
3
3
|
*
|
|
4
|
-
* Supports
|
|
5
|
-
* - .claude-plugin/plugin.json
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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"
|
|
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
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/plugins/schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQ2C,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,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAeG,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAQgB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
package/dist/plugins/schemas.js
CHANGED
|
@@ -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"
|
|
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,
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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,MAAM,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACrC;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAE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,MAAM,EAAE,CAAC;IACjB,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,qCAAqC;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC"}
|
|
@@ -39,29 +39,14 @@ function validatePluginDirectory(pluginPath) {
|
|
|
39
39
|
const errors = [];
|
|
40
40
|
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
|
|
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
|
|
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
|
|
147
|
-
const
|
|
148
|
-
|
|
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
|
|
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
|
|
8
|
-
* - .claude-plugin/plugin.json
|
|
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
|
|
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. .
|
|
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):
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
113
|
-
const
|
|
114
|
-
|
|
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
|
|
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;
|
|
@@ -79,11 +79,22 @@ const PREFERENCES_FILE_HEADER = `# Dexto Global Preferences
|
|
|
79
79
|
# Documentation: https://dexto.dev/docs/configuration/preferences
|
|
80
80
|
#
|
|
81
81
|
# Sound Notifications:
|
|
82
|
-
# Dexto plays sounds for approval requests and task completion.
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
#
|
|
82
|
+
# Dexto plays sounds for CLI startup, approval requests, and task completion.
|
|
83
|
+
# Configure which events play sounds:
|
|
84
|
+
# sounds.enabled: true|false
|
|
85
|
+
# sounds.onStartup: true|false
|
|
86
|
+
# sounds.onApprovalRequired: true|false
|
|
87
|
+
# sounds.onTaskComplete: true|false
|
|
88
|
+
#
|
|
89
|
+
# Select sound files (paths are relative to ~/.dexto/sounds):
|
|
90
|
+
# sounds.startupSoundFile: builtins/startup.wav
|
|
91
|
+
# sounds.approvalSoundFile: builtins/coin.wav
|
|
92
|
+
# sounds.completeSoundFile: builtins/success.wav
|
|
93
|
+
#
|
|
94
|
+
# Tip: Use the /sounds overlay to preview and pick sounds.
|
|
95
|
+
#
|
|
96
|
+
# To use custom sounds, copy files into ~/.dexto/sounds/ (subfolders ok) and set the *SoundFile
|
|
97
|
+
# keys to a relative path. Supported audio formats vary by OS (Windows reliably supports .wav).
|
|
87
98
|
|
|
88
99
|
`;
|
|
89
100
|
const AGENT_PREFERENCES_FILE_HEADER = `# Dexto Agent Preferences
|
|
@@ -238,8 +249,12 @@ function createInitialPreferences(options) {
|
|
|
238
249
|
},
|
|
239
250
|
sounds: {
|
|
240
251
|
enabled: options.sounds?.enabled ?? true,
|
|
252
|
+
onStartup: options.sounds?.onStartup ?? false,
|
|
253
|
+
...options.sounds?.startupSoundFile ? { startupSoundFile: options.sounds.startupSoundFile } : {},
|
|
241
254
|
onApprovalRequired: options.sounds?.onApprovalRequired ?? true,
|
|
242
|
-
|
|
255
|
+
...options.sounds?.approvalSoundFile ? { approvalSoundFile: options.sounds.approvalSoundFile } : {},
|
|
256
|
+
onTaskComplete: options.sounds?.onTaskComplete ?? true,
|
|
257
|
+
...options.sounds?.completeSoundFile ? { completeSoundFile: options.sounds.completeSoundFile } : {}
|
|
243
258
|
}
|
|
244
259
|
};
|
|
245
260
|
}
|
|
@@ -64,8 +64,12 @@ export interface CreatePreferencesOptions {
|
|
|
64
64
|
/** Sound notification preferences */
|
|
65
65
|
sounds?: {
|
|
66
66
|
enabled?: boolean;
|
|
67
|
+
onStartup?: boolean;
|
|
68
|
+
startupSoundFile?: string;
|
|
67
69
|
onApprovalRequired?: boolean;
|
|
70
|
+
approvalSoundFile?: string;
|
|
68
71
|
onTaskComplete?: boolean;
|
|
72
|
+
completeSoundFile?: string;
|
|
69
73
|
};
|
|
70
74
|
}
|
|
71
75
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/preferences/loader.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAGH,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACzB,MAAM,cAAc,CAAC;AAItB;;;;;GAKG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,CAAC,CA+BxE;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/preferences/loader.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAGH,KAAK,g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AAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,MAAM,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACL;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,wBAAwB,GAAG,iBAAiB,CAgD7F;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACnC,GAAG,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,iBAAiB,CAAC,CA4B5B"}
|
|
@@ -39,11 +39,22 @@ const PREFERENCES_FILE_HEADER = `# Dexto Global Preferences
|
|
|
39
39
|
# Documentation: https://dexto.dev/docs/configuration/preferences
|
|
40
40
|
#
|
|
41
41
|
# Sound Notifications:
|
|
42
|
-
# Dexto plays sounds for approval requests and task completion.
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
#
|
|
42
|
+
# Dexto plays sounds for CLI startup, approval requests, and task completion.
|
|
43
|
+
# Configure which events play sounds:
|
|
44
|
+
# sounds.enabled: true|false
|
|
45
|
+
# sounds.onStartup: true|false
|
|
46
|
+
# sounds.onApprovalRequired: true|false
|
|
47
|
+
# sounds.onTaskComplete: true|false
|
|
48
|
+
#
|
|
49
|
+
# Select sound files (paths are relative to ~/.dexto/sounds):
|
|
50
|
+
# sounds.startupSoundFile: builtins/startup.wav
|
|
51
|
+
# sounds.approvalSoundFile: builtins/coin.wav
|
|
52
|
+
# sounds.completeSoundFile: builtins/success.wav
|
|
53
|
+
#
|
|
54
|
+
# Tip: Use the /sounds overlay to preview and pick sounds.
|
|
55
|
+
#
|
|
56
|
+
# To use custom sounds, copy files into ~/.dexto/sounds/ (subfolders ok) and set the *SoundFile
|
|
57
|
+
# keys to a relative path. Supported audio formats vary by OS (Windows reliably supports .wav).
|
|
47
58
|
|
|
48
59
|
`;
|
|
49
60
|
const AGENT_PREFERENCES_FILE_HEADER = `# Dexto Agent Preferences
|
|
@@ -198,8 +209,12 @@ function createInitialPreferences(options) {
|
|
|
198
209
|
},
|
|
199
210
|
sounds: {
|
|
200
211
|
enabled: options.sounds?.enabled ?? true,
|
|
212
|
+
onStartup: options.sounds?.onStartup ?? false,
|
|
213
|
+
...options.sounds?.startupSoundFile ? { startupSoundFile: options.sounds.startupSoundFile } : {},
|
|
201
214
|
onApprovalRequired: options.sounds?.onApprovalRequired ?? true,
|
|
202
|
-
|
|
215
|
+
...options.sounds?.approvalSoundFile ? { approvalSoundFile: options.sounds.approvalSoundFile } : {},
|
|
216
|
+
onTaskComplete: options.sounds?.onTaskComplete ?? true,
|
|
217
|
+
...options.sounds?.completeSoundFile ? { completeSoundFile: options.sounds.completeSoundFile } : {}
|
|
203
218
|
}
|
|
204
219
|
};
|
|
205
220
|
}
|