quantex-cli 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/README.zh-CN.md +4 -0
- package/dist/agents-CqX4AmIi.mjs +1 -0
- package/dist/capabilities-BV9VnfNY.mjs +1 -0
- package/dist/capabilities-D47qKysn.mjs +5 -0
- package/dist/cli.mjs +1 -1
- package/dist/color-BeRyMqm9.mjs +6 -0
- package/dist/commands-BVW6158n.mjs +1 -0
- package/dist/{commands-B_Hju0lq.mjs → commands-CLqO7mwl.mjs} +1 -1
- package/dist/{config-CFYt99os.mjs → config-CvCtt9i2.mjs} +1 -1
- package/dist/detect-Faj7A-SZ.mjs +1 -0
- package/dist/doctor-DDEBruF-.mjs +3 -0
- package/dist/ensure-B5pO75qe.mjs +1 -0
- package/dist/{ensure-DpX11qbo.mjs → ensure-DaDMUVUq.mjs} +1 -1
- package/dist/index.d.mts +55 -3
- package/dist/index.mjs +2 -2
- package/dist/{info-BUsquCrf.mjs → info-lrDfz_Pk.mjs} +1 -1
- package/dist/{inspect-CihiIfvE.mjs → inspect-aHnVkE1y.mjs} +1 -1
- package/dist/inspect-zLOD1zF6.mjs +1 -0
- package/dist/{install-YLaojYug.mjs → install-CnAKrxWy.mjs} +1 -1
- package/dist/{list-D79BiyLS.mjs → list-BKcqcp8l.mjs} +1 -1
- package/dist/{resolve-BhJphfVN.mjs → resolve-CVQ-2rK8.mjs} +1 -1
- package/dist/resolve-D8P8NNBr.mjs +1 -0
- package/dist/schema-B8pc2YX5.mjs +3 -0
- package/dist/schema-Byep9Vvi.mjs +1 -0
- package/dist/{uninstall-C0IfMGxA.mjs → uninstall-BhwW-jdp.mjs} +1 -1
- package/dist/{update-DNz98nPV.mjs → update-CwQMSQKF.mjs} +1 -1
- package/dist/update-DOWtjWx4.mjs +1 -0
- package/dist/{upgrade-C60CHTun.mjs → upgrade-LWHTMAQP.mjs} +1 -1
- package/dist/{user-output-DoYIFFWA.mjs → user-output-BxHvAzGg.mjs} +1 -1
- package/package.json +1 -1
- package/dist/agents-Egq0RCta.mjs +0 -1
- package/dist/capabilities-DVYVq0Kb.mjs +0 -1
- package/dist/capabilities-LjMH_zbA.mjs +0 -5
- package/dist/color-DEbCq7kh.mjs +0 -6
- package/dist/commands-CBYZqBF0.mjs +0 -1
- package/dist/detect-DWabXMgY.mjs +0 -1
- package/dist/doctor-Dp9VEmRS.mjs +0 -3
- package/dist/ensure-B-zpnaT-.mjs +0 -1
- package/dist/inspect-DO3c51A6.mjs +0 -1
- package/dist/resolve-D3cko00u.mjs +0 -1
- package/dist/schema-1VaAQRYe.mjs +0 -1
- package/dist/schema-C7v-CajU.mjs +0 -3
- package/dist/update-DgZD1TXs.mjs +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,10 +2,11 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
//#region src/agents/types.d.ts
|
|
4
4
|
type Platform = 'windows' | 'macos' | 'linux';
|
|
5
|
-
type ManagedInstallType = 'bun' | 'npm' | 'brew' | 'cargo' | 'mise' | 'pip' | 'uv' | 'winget';
|
|
5
|
+
type ManagedInstallType = 'bun' | 'npm' | 'brew' | 'cargo' | 'deno' | 'mise' | 'pip' | 'uv' | 'winget';
|
|
6
6
|
type InstallType = ManagedInstallType | 'script' | 'binary';
|
|
7
7
|
type PackageTargetKind = 'package' | 'cask' | 'id';
|
|
8
8
|
interface BaseInstallMethod {
|
|
9
|
+
binaryName?: string;
|
|
9
10
|
command?: string;
|
|
10
11
|
packageInstallArgs?: string[];
|
|
11
12
|
packageName?: string;
|
|
@@ -26,6 +27,7 @@ interface BinaryInstallMethod extends BaseInstallMethod {
|
|
|
26
27
|
type InstallMethod = ManagedInstallMethod | ScriptInstallMethod | BinaryInstallMethod;
|
|
27
28
|
interface AgentPackageMetadata {
|
|
28
29
|
cargo?: string;
|
|
30
|
+
deno?: string;
|
|
29
31
|
mise?: string;
|
|
30
32
|
npm?: string;
|
|
31
33
|
pip?: string;
|
|
@@ -59,13 +61,16 @@ declare const codebuddy: AgentDefinition;
|
|
|
59
61
|
declare const codex: AgentDefinition;
|
|
60
62
|
declare const copilot: AgentDefinition;
|
|
61
63
|
declare const cursor: AgentDefinition;
|
|
64
|
+
declare const deepcode: AgentDefinition;
|
|
62
65
|
declare const deepseek: AgentDefinition;
|
|
63
66
|
declare const devin: AgentDefinition;
|
|
64
67
|
declare const droid: AgentDefinition;
|
|
65
68
|
declare const gemini: AgentDefinition;
|
|
69
|
+
declare const genie: AgentDefinition;
|
|
66
70
|
declare const jcode: AgentDefinition;
|
|
67
71
|
declare const junie: AgentDefinition;
|
|
68
72
|
declare const kilo: AgentDefinition;
|
|
73
|
+
declare const omp: AgentDefinition;
|
|
69
74
|
declare const opencode: AgentDefinition;
|
|
70
75
|
declare const openhands: AgentDefinition;
|
|
71
76
|
declare const pi: AgentDefinition;
|
|
@@ -83,6 +88,7 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
83
88
|
name: z.ZodString;
|
|
84
89
|
packages: z.ZodOptional<z.ZodObject<{
|
|
85
90
|
cargo: z.ZodOptional<z.ZodString>;
|
|
91
|
+
deno: z.ZodOptional<z.ZodString>;
|
|
86
92
|
mise: z.ZodOptional<z.ZodString>;
|
|
87
93
|
npm: z.ZodOptional<z.ZodString>;
|
|
88
94
|
pip: z.ZodOptional<z.ZodString>;
|
|
@@ -95,11 +101,13 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
95
101
|
npm: "npm";
|
|
96
102
|
brew: "brew";
|
|
97
103
|
cargo: "cargo";
|
|
104
|
+
deno: "deno";
|
|
98
105
|
mise: "mise";
|
|
99
106
|
pip: "pip";
|
|
100
107
|
uv: "uv";
|
|
101
108
|
winget: "winget";
|
|
102
109
|
}>;
|
|
110
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
103
111
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
112
|
packageName: z.ZodOptional<z.ZodString>;
|
|
105
113
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -110,6 +118,7 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
110
118
|
}, z.core.$strict>, z.ZodObject<{
|
|
111
119
|
command: z.ZodString;
|
|
112
120
|
type: z.ZodLiteral<"script">;
|
|
121
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
113
122
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
123
|
packageName: z.ZodOptional<z.ZodString>;
|
|
115
124
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -120,6 +129,7 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
120
129
|
}, z.core.$strict>, z.ZodObject<{
|
|
121
130
|
command: z.ZodString;
|
|
122
131
|
type: z.ZodLiteral<"binary">;
|
|
132
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
123
133
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
134
|
packageName: z.ZodOptional<z.ZodString>;
|
|
125
135
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -134,11 +144,13 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
134
144
|
npm: "npm";
|
|
135
145
|
brew: "brew";
|
|
136
146
|
cargo: "cargo";
|
|
147
|
+
deno: "deno";
|
|
137
148
|
mise: "mise";
|
|
138
149
|
pip: "pip";
|
|
139
150
|
uv: "uv";
|
|
140
151
|
winget: "winget";
|
|
141
152
|
}>;
|
|
153
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
142
154
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
143
155
|
packageName: z.ZodOptional<z.ZodString>;
|
|
144
156
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -149,6 +161,7 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
149
161
|
}, z.core.$strict>, z.ZodObject<{
|
|
150
162
|
command: z.ZodString;
|
|
151
163
|
type: z.ZodLiteral<"script">;
|
|
164
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
152
165
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
153
166
|
packageName: z.ZodOptional<z.ZodString>;
|
|
154
167
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -159,6 +172,7 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
159
172
|
}, z.core.$strict>, z.ZodObject<{
|
|
160
173
|
command: z.ZodString;
|
|
161
174
|
type: z.ZodLiteral<"binary">;
|
|
175
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
162
176
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
163
177
|
packageName: z.ZodOptional<z.ZodString>;
|
|
164
178
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -173,11 +187,13 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
173
187
|
npm: "npm";
|
|
174
188
|
brew: "brew";
|
|
175
189
|
cargo: "cargo";
|
|
190
|
+
deno: "deno";
|
|
176
191
|
mise: "mise";
|
|
177
192
|
pip: "pip";
|
|
178
193
|
uv: "uv";
|
|
179
194
|
winget: "winget";
|
|
180
195
|
}>;
|
|
196
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
181
197
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
182
198
|
packageName: z.ZodOptional<z.ZodString>;
|
|
183
199
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -188,6 +204,7 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
188
204
|
}, z.core.$strict>, z.ZodObject<{
|
|
189
205
|
command: z.ZodString;
|
|
190
206
|
type: z.ZodLiteral<"script">;
|
|
207
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
191
208
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
209
|
packageName: z.ZodOptional<z.ZodString>;
|
|
193
210
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -198,6 +215,7 @@ declare const agentCatalogEntrySchema: z.ZodObject<{
|
|
|
198
215
|
}, z.core.$strict>, z.ZodObject<{
|
|
199
216
|
command: z.ZodString;
|
|
200
217
|
type: z.ZodLiteral<"binary">;
|
|
218
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
201
219
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
202
220
|
packageName: z.ZodOptional<z.ZodString>;
|
|
203
221
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -227,6 +245,7 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
227
245
|
name: z.ZodString;
|
|
228
246
|
packages: z.ZodOptional<z.ZodObject<{
|
|
229
247
|
cargo: z.ZodOptional<z.ZodString>;
|
|
248
|
+
deno: z.ZodOptional<z.ZodString>;
|
|
230
249
|
mise: z.ZodOptional<z.ZodString>;
|
|
231
250
|
npm: z.ZodOptional<z.ZodString>;
|
|
232
251
|
pip: z.ZodOptional<z.ZodString>;
|
|
@@ -239,11 +258,13 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
239
258
|
npm: "npm";
|
|
240
259
|
brew: "brew";
|
|
241
260
|
cargo: "cargo";
|
|
261
|
+
deno: "deno";
|
|
242
262
|
mise: "mise";
|
|
243
263
|
pip: "pip";
|
|
244
264
|
uv: "uv";
|
|
245
265
|
winget: "winget";
|
|
246
266
|
}>;
|
|
267
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
247
268
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
269
|
packageName: z.ZodOptional<z.ZodString>;
|
|
249
270
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -254,6 +275,7 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
254
275
|
}, z.core.$strict>, z.ZodObject<{
|
|
255
276
|
command: z.ZodString;
|
|
256
277
|
type: z.ZodLiteral<"script">;
|
|
278
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
257
279
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
258
280
|
packageName: z.ZodOptional<z.ZodString>;
|
|
259
281
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -264,6 +286,7 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
264
286
|
}, z.core.$strict>, z.ZodObject<{
|
|
265
287
|
command: z.ZodString;
|
|
266
288
|
type: z.ZodLiteral<"binary">;
|
|
289
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
267
290
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
268
291
|
packageName: z.ZodOptional<z.ZodString>;
|
|
269
292
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -278,11 +301,13 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
278
301
|
npm: "npm";
|
|
279
302
|
brew: "brew";
|
|
280
303
|
cargo: "cargo";
|
|
304
|
+
deno: "deno";
|
|
281
305
|
mise: "mise";
|
|
282
306
|
pip: "pip";
|
|
283
307
|
uv: "uv";
|
|
284
308
|
winget: "winget";
|
|
285
309
|
}>;
|
|
310
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
286
311
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
312
|
packageName: z.ZodOptional<z.ZodString>;
|
|
288
313
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -293,6 +318,7 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
293
318
|
}, z.core.$strict>, z.ZodObject<{
|
|
294
319
|
command: z.ZodString;
|
|
295
320
|
type: z.ZodLiteral<"script">;
|
|
321
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
296
322
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
297
323
|
packageName: z.ZodOptional<z.ZodString>;
|
|
298
324
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -303,6 +329,7 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
303
329
|
}, z.core.$strict>, z.ZodObject<{
|
|
304
330
|
command: z.ZodString;
|
|
305
331
|
type: z.ZodLiteral<"binary">;
|
|
332
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
306
333
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
307
334
|
packageName: z.ZodOptional<z.ZodString>;
|
|
308
335
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -317,11 +344,13 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
317
344
|
npm: "npm";
|
|
318
345
|
brew: "brew";
|
|
319
346
|
cargo: "cargo";
|
|
347
|
+
deno: "deno";
|
|
320
348
|
mise: "mise";
|
|
321
349
|
pip: "pip";
|
|
322
350
|
uv: "uv";
|
|
323
351
|
winget: "winget";
|
|
324
352
|
}>;
|
|
353
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
325
354
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
326
355
|
packageName: z.ZodOptional<z.ZodString>;
|
|
327
356
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -332,6 +361,7 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
332
361
|
}, z.core.$strict>, z.ZodObject<{
|
|
333
362
|
command: z.ZodString;
|
|
334
363
|
type: z.ZodLiteral<"script">;
|
|
364
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
335
365
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
336
366
|
packageName: z.ZodOptional<z.ZodString>;
|
|
337
367
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -342,6 +372,7 @@ declare const agentCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
|
342
372
|
}, z.core.$strict>, z.ZodObject<{
|
|
343
373
|
command: z.ZodString;
|
|
344
374
|
type: z.ZodLiteral<"binary">;
|
|
375
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
345
376
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
346
377
|
packageName: z.ZodOptional<z.ZodString>;
|
|
347
378
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -376,6 +407,7 @@ declare const agentCatalogJsonSchema: {
|
|
|
376
407
|
name: z.ZodString;
|
|
377
408
|
packages: z.ZodOptional<z.ZodObject<{
|
|
378
409
|
cargo: z.ZodOptional<z.ZodString>;
|
|
410
|
+
deno: z.ZodOptional<z.ZodString>;
|
|
379
411
|
mise: z.ZodOptional<z.ZodString>;
|
|
380
412
|
npm: z.ZodOptional<z.ZodString>;
|
|
381
413
|
pip: z.ZodOptional<z.ZodString>;
|
|
@@ -388,11 +420,13 @@ declare const agentCatalogJsonSchema: {
|
|
|
388
420
|
npm: "npm";
|
|
389
421
|
brew: "brew";
|
|
390
422
|
cargo: "cargo";
|
|
423
|
+
deno: "deno";
|
|
391
424
|
mise: "mise";
|
|
392
425
|
pip: "pip";
|
|
393
426
|
uv: "uv";
|
|
394
427
|
winget: "winget";
|
|
395
428
|
}>;
|
|
429
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
396
430
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
397
431
|
packageName: z.ZodOptional<z.ZodString>;
|
|
398
432
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -403,6 +437,7 @@ declare const agentCatalogJsonSchema: {
|
|
|
403
437
|
}, z.core.$strict>, z.ZodObject<{
|
|
404
438
|
command: z.ZodString;
|
|
405
439
|
type: z.ZodLiteral<"script">;
|
|
440
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
406
441
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
407
442
|
packageName: z.ZodOptional<z.ZodString>;
|
|
408
443
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -413,6 +448,7 @@ declare const agentCatalogJsonSchema: {
|
|
|
413
448
|
}, z.core.$strict>, z.ZodObject<{
|
|
414
449
|
command: z.ZodString;
|
|
415
450
|
type: z.ZodLiteral<"binary">;
|
|
451
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
416
452
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
417
453
|
packageName: z.ZodOptional<z.ZodString>;
|
|
418
454
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -427,11 +463,13 @@ declare const agentCatalogJsonSchema: {
|
|
|
427
463
|
npm: "npm";
|
|
428
464
|
brew: "brew";
|
|
429
465
|
cargo: "cargo";
|
|
466
|
+
deno: "deno";
|
|
430
467
|
mise: "mise";
|
|
431
468
|
pip: "pip";
|
|
432
469
|
uv: "uv";
|
|
433
470
|
winget: "winget";
|
|
434
471
|
}>;
|
|
472
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
435
473
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
436
474
|
packageName: z.ZodOptional<z.ZodString>;
|
|
437
475
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -442,6 +480,7 @@ declare const agentCatalogJsonSchema: {
|
|
|
442
480
|
}, z.core.$strict>, z.ZodObject<{
|
|
443
481
|
command: z.ZodString;
|
|
444
482
|
type: z.ZodLiteral<"script">;
|
|
483
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
445
484
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
446
485
|
packageName: z.ZodOptional<z.ZodString>;
|
|
447
486
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -452,6 +491,7 @@ declare const agentCatalogJsonSchema: {
|
|
|
452
491
|
}, z.core.$strict>, z.ZodObject<{
|
|
453
492
|
command: z.ZodString;
|
|
454
493
|
type: z.ZodLiteral<"binary">;
|
|
494
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
455
495
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
456
496
|
packageName: z.ZodOptional<z.ZodString>;
|
|
457
497
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -466,11 +506,13 @@ declare const agentCatalogJsonSchema: {
|
|
|
466
506
|
npm: "npm";
|
|
467
507
|
brew: "brew";
|
|
468
508
|
cargo: "cargo";
|
|
509
|
+
deno: "deno";
|
|
469
510
|
mise: "mise";
|
|
470
511
|
pip: "pip";
|
|
471
512
|
uv: "uv";
|
|
472
513
|
winget: "winget";
|
|
473
514
|
}>;
|
|
515
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
474
516
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
475
517
|
packageName: z.ZodOptional<z.ZodString>;
|
|
476
518
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -481,6 +523,7 @@ declare const agentCatalogJsonSchema: {
|
|
|
481
523
|
}, z.core.$strict>, z.ZodObject<{
|
|
482
524
|
command: z.ZodString;
|
|
483
525
|
type: z.ZodLiteral<"script">;
|
|
526
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
484
527
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
485
528
|
packageName: z.ZodOptional<z.ZodString>;
|
|
486
529
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -491,6 +534,7 @@ declare const agentCatalogJsonSchema: {
|
|
|
491
534
|
}, z.core.$strict>, z.ZodObject<{
|
|
492
535
|
command: z.ZodString;
|
|
493
536
|
type: z.ZodLiteral<"binary">;
|
|
537
|
+
binaryName: z.ZodOptional<z.ZodString>;
|
|
494
538
|
packageInstallArgs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
495
539
|
packageName: z.ZodOptional<z.ZodString>;
|
|
496
540
|
packageTargetKind: z.ZodOptional<z.ZodEnum<{
|
|
@@ -651,6 +695,7 @@ interface SelfUpgradePlan {
|
|
|
651
695
|
//#region src/state/index.d.ts
|
|
652
696
|
interface InstalledAgentState {
|
|
653
697
|
agentName: string;
|
|
698
|
+
binaryName?: string;
|
|
654
699
|
installType: InstallType;
|
|
655
700
|
packageInstallArgs?: string[];
|
|
656
701
|
packageName?: string;
|
|
@@ -820,6 +865,10 @@ interface CapabilitiesData {
|
|
|
820
865
|
available: boolean;
|
|
821
866
|
reason?: string;
|
|
822
867
|
};
|
|
868
|
+
deno: {
|
|
869
|
+
available: boolean;
|
|
870
|
+
reason?: string;
|
|
871
|
+
};
|
|
823
872
|
mise: {
|
|
824
873
|
available: boolean;
|
|
825
874
|
reason?: string;
|
|
@@ -1025,11 +1074,13 @@ declare function emitCommandResult<T>(result: CommandResult<T>, renderHuman: Hum
|
|
|
1025
1074
|
//#endregion
|
|
1026
1075
|
//#region src/package-manager/installers.d.ts
|
|
1027
1076
|
interface ManagedPackageSpec {
|
|
1077
|
+
binaryName?: string;
|
|
1028
1078
|
packageInstallArgs?: string[];
|
|
1029
1079
|
packageName: string;
|
|
1030
1080
|
packageTargetKind?: PackageTargetKind;
|
|
1031
1081
|
}
|
|
1032
1082
|
interface ManagedInstallerUpdateOptions {
|
|
1083
|
+
binaryName?: string;
|
|
1033
1084
|
npmBunUpdateStrategy?: NpmBunUpdateStrategy;
|
|
1034
1085
|
packageInstallArgs?: string[];
|
|
1035
1086
|
}
|
|
@@ -1038,7 +1089,7 @@ interface ManagedInstaller {
|
|
|
1038
1089
|
getInstalledVersion?: (packageName: string, packageTargetKind?: PackageTargetKind) => Promise<string | undefined>;
|
|
1039
1090
|
isAvailable: () => Promise<boolean>;
|
|
1040
1091
|
install: (packageName: string, packageTargetKind?: PackageTargetKind, packageInstallArgs?: string[]) => Promise<boolean>;
|
|
1041
|
-
uninstall: (packageName: string, packageTargetKind?: PackageTargetKind) => Promise<boolean>;
|
|
1092
|
+
uninstall: (packageName: string, packageTargetKind?: PackageTargetKind, options?: ManagedInstallerUpdateOptions) => Promise<boolean>;
|
|
1042
1093
|
update: (packageName: string, packageTargetKind?: PackageTargetKind, options?: ManagedInstallerUpdateOptions) => Promise<boolean>;
|
|
1043
1094
|
updateMany: (packages: ManagedPackageSpec[], options?: ManagedInstallerUpdateOptions) => Promise<boolean>;
|
|
1044
1095
|
}
|
|
@@ -1184,6 +1235,7 @@ declare function planAgentUpdates(): Promise<PlannedAgentUpdates>;
|
|
|
1184
1235
|
declare function getPlatform(): Platform;
|
|
1185
1236
|
declare function isBunAvailable(): Promise<boolean>;
|
|
1186
1237
|
declare function isNpmAvailable(): Promise<boolean>;
|
|
1238
|
+
declare function isDenoAvailable(): Promise<boolean>;
|
|
1187
1239
|
declare function isBinaryInPath(binaryName: string): Promise<boolean>;
|
|
1188
1240
|
//#endregion
|
|
1189
1241
|
//#region src/utils/exec.d.ts
|
|
@@ -1199,4 +1251,4 @@ declare function getLatestVersion(packageName: string, distTag?: string, options
|
|
|
1199
1251
|
}): Promise<string | undefined>;
|
|
1200
1252
|
declare function getBinaryPath(binaryName: string): Promise<string | undefined>;
|
|
1201
1253
|
//#endregion
|
|
1202
|
-
export { type AgentCatalogData, type AgentCatalogEntry, type AgentDefinition, type AgentInspection, type AgentOperationResult, type AgentPackageMetadata, type AgentSelfUpdate, type AgentUpdateContext, type AgentUpdateProvider, type AgentUpdateStrategy, type AgentVersionProbe, type BinaryInstallMethod, type CliContext, type CliContextOptions, type CliErrorCode, type CommandError, type CommandMeta, type CommandResult, type CommandTarget, type CommandWarning, type ExecCommandOptions, type ExecInstallPolicy, type HumanRenderer, type InstallMethod, type InstallType, type InstalledAgentState, type ManagedInstallMethod, type ManagedInstallType, type ManagedInstaller, type ManagedPackageSpec, type ManagedUpdateBucket, type OutputMode, type PackageTargetKind, type PendingAgentUpdate, type PlannedAgentUpdates, type Platform, type QuantexConfig, type QuantexState, type ReleaseArtifactTarget, type ReleaseChannel, type ReleaseManifest, type ReleaseManifestAsset, type ResolvedAgentInspection, type ScriptInstallMethod, type SelfInspection, type SelfInstallSource, type SelfState, type SelfUpdateResult, type SingleAgentUpdateStatus, type UpdatePlan, type UpdatePlanEntry, agentCatalogEntrySchema, agentCatalogJsonSchema, agentCatalogSchema, agentUpdateProviders, autohand, canAutoUpdateSelf, canLookupLatestVersionForInstallType, canResolveAgentUpdate, canUninstallInstallType, canUpdateInstallType, capabilitiesCommand, claude, codebuddy, codex, commandsCommand, copilot, createErrorResult, createReleaseManifest, createSuccessResult, createUpdatePlan, cursor, deepseek, detectSelfInstallSource, devin, droid, emitCommandResult, ensureCommand, execCommand, formatChecksums, gemini, getAgentByLookupName, getAgentByNameOrAlias, getAgentUpdateFailureHint, getAgentUpdateStrategy, getAllAgents, getBinaryPath, getBinaryReleaseAssetName, getBinaryReleaseDownloadUrl, getCatalogAgent, getCatalogAgents, getCliContext, getConfigDir, getConfigFilePath, getExitCodeForError, getExitCodeForResult, getInstallLifecycle, getInstalledAgentState, getInstalledVersion, getInstallerCapabilities, getLatestVersion, getManagedInstaller, getManualAgentUpdateMessage, getManualSelfUpgradeCommand, getOrderedInstallMethods, getPlatform, getSchemaCatalog, getSelfState, getSelfUpgradeRecoveryHint, getSelfUpgradeRecoveryHintForInspection, getSelfVersion, getSingleAgentUpdateStatus, getStateFilePath, inspectAgent, inspectAllAgents, inspectCommand, inspectRegisteredAgents, inspectSelf, installAgent, isBinaryInPath, isBunAvailable, isInspectionUpdateAvailable, isManagedInstallType, isNpmAvailable, jcode, junie, kilo, loadConfig, loadState, normalizeRepositoryUrl, opencode, openhands, parseBinaryTarget, parseChecksums, pi, planAgentUpdates, qoder, reasonix, removeInstalledAgentState, resetCliContext, resolveAgent, resolveAgentInspection, resolveAgentUpdateProvider, resolveCliContext, resolveCommand, resolveReleaseChannel, saveConfig, saveState, schemaCommand, setCliContext, setInstalledAgentState, setSelfInstallSource, setSelfUpdateNoticeState, uninstallAgent, updateAgent, updateAgentsByType, upgradeSelf, validateReleaseManifest, vibe, vtcode };
|
|
1254
|
+
export { type AgentCatalogData, type AgentCatalogEntry, type AgentDefinition, type AgentInspection, type AgentOperationResult, type AgentPackageMetadata, type AgentSelfUpdate, type AgentUpdateContext, type AgentUpdateProvider, type AgentUpdateStrategy, type AgentVersionProbe, type BinaryInstallMethod, type CliContext, type CliContextOptions, type CliErrorCode, type CommandError, type CommandMeta, type CommandResult, type CommandTarget, type CommandWarning, type ExecCommandOptions, type ExecInstallPolicy, type HumanRenderer, type InstallMethod, type InstallType, type InstalledAgentState, type ManagedInstallMethod, type ManagedInstallType, type ManagedInstaller, type ManagedPackageSpec, type ManagedUpdateBucket, type OutputMode, type PackageTargetKind, type PendingAgentUpdate, type PlannedAgentUpdates, type Platform, type QuantexConfig, type QuantexState, type ReleaseArtifactTarget, type ReleaseChannel, type ReleaseManifest, type ReleaseManifestAsset, type ResolvedAgentInspection, type ScriptInstallMethod, type SelfInspection, type SelfInstallSource, type SelfState, type SelfUpdateResult, type SingleAgentUpdateStatus, type UpdatePlan, type UpdatePlanEntry, agentCatalogEntrySchema, agentCatalogJsonSchema, agentCatalogSchema, agentUpdateProviders, autohand, canAutoUpdateSelf, canLookupLatestVersionForInstallType, canResolveAgentUpdate, canUninstallInstallType, canUpdateInstallType, capabilitiesCommand, claude, codebuddy, codex, commandsCommand, copilot, createErrorResult, createReleaseManifest, createSuccessResult, createUpdatePlan, cursor, deepcode, deepseek, detectSelfInstallSource, devin, droid, emitCommandResult, ensureCommand, execCommand, formatChecksums, gemini, genie, getAgentByLookupName, getAgentByNameOrAlias, getAgentUpdateFailureHint, getAgentUpdateStrategy, getAllAgents, getBinaryPath, getBinaryReleaseAssetName, getBinaryReleaseDownloadUrl, getCatalogAgent, getCatalogAgents, getCliContext, getConfigDir, getConfigFilePath, getExitCodeForError, getExitCodeForResult, getInstallLifecycle, getInstalledAgentState, getInstalledVersion, getInstallerCapabilities, getLatestVersion, getManagedInstaller, getManualAgentUpdateMessage, getManualSelfUpgradeCommand, getOrderedInstallMethods, getPlatform, getSchemaCatalog, getSelfState, getSelfUpgradeRecoveryHint, getSelfUpgradeRecoveryHintForInspection, getSelfVersion, getSingleAgentUpdateStatus, getStateFilePath, inspectAgent, inspectAllAgents, inspectCommand, inspectRegisteredAgents, inspectSelf, installAgent, isBinaryInPath, isBunAvailable, isDenoAvailable, isInspectionUpdateAvailable, isManagedInstallType, isNpmAvailable, jcode, junie, kilo, loadConfig, loadState, normalizeRepositoryUrl, omp, opencode, openhands, parseBinaryTarget, parseChecksums, pi, planAgentUpdates, qoder, reasonix, removeInstalledAgentState, resetCliContext, resolveAgent, resolveAgentInspection, resolveAgentUpdateProvider, resolveCliContext, resolveCommand, resolveReleaseChannel, saveConfig, saveState, schemaCommand, setCliContext, setInstalledAgentState, setSelfInstallSource, setSelfUpdateNoticeState, uninstallAgent, updateAgent, updateAgentsByType, upgradeSelf, validateReleaseManifest, vibe, vtcode };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,t}from"./messages-qcLhD-Gc.mjs";import{C as n,D as r,E as i,S as a,T as ee,a as te,d as ne,f as re,g as ie,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g,w as _}from"./agents-
|
|
2
|
-
`)}\n`}function
|
|
1
|
+
import{n as e,t}from"./messages-qcLhD-Gc.mjs";import{C as n,D as r,E as i,S as a,T as ee,a as te,d as ne,f as re,g as ie,h as o,i as s,l as c,m as l,n as u,o as d,p as f,r as p,s as m,t as h,u as g,w as _}from"./agents-CqX4AmIi.mjs";import{A as v,B as y,C as b,D as x,E as S,F as C,H as w,I as T,L as E,M as D,N as O,O as k,P as A,R as j,S as M,T as N,V as P,_ as F,b as I,c as L,f as R,g as z,h as B,i as V,j as H,k as U,m as W,n as G,o as K,p as q,t as J,v as Y,w as ae,x as oe,y as se,z as ce}from"./detect-Faj7A-SZ.mjs";import{A as le,B as ue,C as de,D as fe,E as pe,F as me,G as he,I as ge,K as _e,M as ve,N as ye,O as be,P as xe,R as Se,T as Ce,X as we,Z as Te,a as Ee,at as De,c as Oe,ct as ke,et as Ae,j as je,k as Me,l as Ne,n as Pe,o as Fe,ot as Ie,r as Le,s as Re,st as ze,tt as Be,u as Ve,w as He,z as Ue}from"./color-BeRyMqm9.mjs";import{t as We}from"./capabilities-D47qKysn.mjs";import{t as Ge}from"./commands-CLqO7mwl.mjs";import{t as Ke}from"./ensure-DaDMUVUq.mjs";import{t as qe}from"./inspect-aHnVkE1y.mjs";import{t as Je}from"./resolve-CVQ-2rK8.mjs";import{n as Ye,t as Xe}from"./schema-B8pc2YX5.mjs";import{n as Ze,t as X}from"./errors-DCtNasuC.mjs";import{a as Qe,i as $e,n as et,t as tt}from"./update-DOWtjWx4.mjs";const nt=[`quantex-darwin-arm64`,`quantex-darwin-x64`,`quantex-linux-arm64`,`quantex-linux-x64`,`quantex-windows-x64.exe`];function rt(e){return`${e.sort((e,t)=>e.name.localeCompare(t.name)).map(e=>`${e.checksum} ${e.name}`).join(`
|
|
2
|
+
`)}\n`}function it(e){let t=new Map;for(let n of e.split(/\r?\n/)){let e=n.trim();if(!e)continue;let[r,i]=e.split(/\s+/,2),a=i?.replace(/^\*/,``);r&&a&&t.set(a,r)}return t}function Z(e){let t=e.match(/^quantex-(darwin|linux|windows)-(arm64|x64)(?:\.exe)?$/);if(t)return{arch:t[2]===`arm64`?`arm64`:`x64`,platform:t[1]===`windows`?`win32`:t[1]===`darwin`?`darwin`:`linux`}}function Q(e){return e?e.startsWith(`git+`)?e.slice(4).replace(/\.git$/,``):e.startsWith(`git@github.com:`)?e.replace(`git@github.com:`,`https://github.com/`).replace(/\.git$/,``):e.replace(/\.git$/,``):`https://github.com/Drswith/quantex-cli`}function $(e){return e.includes(`beta`)?`beta`:`stable`}function at(e){let t=Q(e.repositoryUrl),n=$(e.version),r=e.files.map(n=>{let r=Z(n.name);if(!r)return;let i=e.checksums.get(n.name);if(!i)throw Error(`Missing checksum entry for ${n.name}.`);return{arch:r.arch,checksum:i,downloadUrl:`${t}/releases/download/v${e.version}/${n.name}`,name:n.name,platform:r.platform,size:n.size}}).filter(e=>e!==void 0).sort((e,t)=>e.name.localeCompare(t.name));if(r.length===0)throw Error(`No release binaries were found when creating manifest.json.`);return{assets:r,channel:n,version:e.version}}function ot(e,t){if(e.assets.length===0)throw Error(`manifest.json must contain at least one binary asset.`);let n=new Set(e.assets.map(e=>e.name));for(let e of nt)if(!n.has(e))throw Error(`manifest.json is missing required release asset: ${e}.`);for(let n of e.assets){let e=t.get(n.name);if(!e)throw Error(`manifest.json references ${n.name}, but it is missing from SHA256SUMS.txt.`);if(n.checksum!==e)throw Error(`manifest.json checksum mismatch for ${n.name}.`);if(!Z(n.name))throw Error(`manifest.json contains an invalid binary asset name: ${n.name}.`)}}async function st(e,t){try{let n=await _e(he([e,...t]));return{success:n===0,exitCode:n}}catch{return{success:!1,exitCode:1}}}export{y as agentCatalogEntrySchema,P as agentCatalogJsonSchema,w as agentCatalogSchema,f as agentUpdateProviders,B as autohand,de as canAutoUpdateSelf,a as canLookupLatestVersionForInstallType,l as canResolveAgentUpdate,n as canUninstallInstallType,_ as canUpdateInstallType,We as capabilitiesCommand,z as claude,F as codebuddy,Y as codex,Ge as commandsCommand,se as copilot,Pe as createErrorResult,at as createReleaseManifest,Le as createSuccessResult,$e as createUpdatePlan,I as cursor,oe as deepcode,M as deepseek,He as detectSelfInstallSource,b as devin,ae as droid,Ee as emitCommandResult,Ke as ensureCommand,st as execCommand,rt as formatChecksums,N as gemini,S as genie,R as getAgentByLookupName,q as getAgentByNameOrAlias,t as getAgentUpdateFailureHint,o as getAgentUpdateStrategy,W as getAllAgents,Se as getBinaryPath,pe as getBinaryReleaseAssetName,fe as getBinaryReleaseDownloadUrl,j as getCatalogAgent,ce as getCatalogAgents,De as getCliContext,we as getConfigDir,Te as getConfigFilePath,X as getExitCodeForError,Ze as getExitCodeForResult,ee as getInstallLifecycle,be as getInstalledAgentState,Ue as getInstalledVersion,i as getInstallerCapabilities,ue as getLatestVersion,re as getManagedInstaller,e as getManualAgentUpdateMessage,Fe as getManualSelfUpgradeCommand,d as getOrderedInstallMethods,J as getPlatform,Xe as getSchemaCatalog,Me as getSelfState,Ne as getSelfUpgradeRecoveryHint,Ve as getSelfUpgradeRecoveryHintForInspection,Ce as getSelfVersion,tt as getSingleAgentUpdateStatus,le as getStateFilePath,s as inspectAgent,te as inspectAllAgents,qe as inspectCommand,h as inspectRegisteredAgents,Re as inspectSelf,m as installAgent,G as isBinaryInPath,V as isBunAvailable,K as isDenoAvailable,Qe as isInspectionUpdateAvailable,r as isManagedInstallType,L as isNpmAvailable,x as jcode,k as junie,U as kilo,Ae as loadConfig,je as loadState,Q as normalizeRepositoryUrl,v as omp,H as opencode,D as openhands,Z as parseBinaryTarget,it as parseChecksums,O as pi,et as planAgentUpdates,A as qoder,C as reasonix,ve as removeInstalledAgentState,Ie as resetCliContext,u as resolveAgent,p as resolveAgentInspection,ie as resolveAgentUpdateProvider,ze as resolveCliContext,Je as resolveCommand,$ as resolveReleaseChannel,Be as saveConfig,ye as saveState,Ye as schemaCommand,ke as setCliContext,xe as setInstalledAgentState,me as setSelfInstallSource,ge as setSelfUpdateNoticeState,c as uninstallAgent,g as updateAgent,ne as updateAgentsByType,Oe as upgradeSelf,ot as validateReleaseManifest,T as vibe,E as vtcode};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,v as t,y as n}from"./agents-
|
|
1
|
+
import{r as e,v as t,y as n}from"./agents-CqX4AmIi.mjs";import{a as r,n as i,r as a,t as o}from"./color-BeRyMqm9.mjs";async function s(o){let s=await e(o);if(!s)return r(i({action:`info`,error:{code:`AGENT_NOT_FOUND`,details:{input:o},message:`Unknown agent: ${o}`},target:{kind:`agent`,name:o}}),c);let{agent:l,inspection:u}=s,d=l.selfUpdate?[l.selfUpdate.command,...l.selfUpdate.fallbackCommands??[]].map(e=>e.join(` `)):[];return r(a({action:`info`,data:{agent:{aliases:l.lookupAliases??[],binaryName:l.binaryName,displayName:l.displayName,installMethods:u.methods.map(e=>({command:t(l,e),label:n(e),type:e.type})),name:l.name,packageName:l.packages?.npm,selfUpdateCommands:d},inspection:{binaryPath:u.binaryPath,installed:u.inPath,installedVersion:u.installedVersion,latestVersion:u.latestVersion,lifecycle:u.lifecycle,sourceLabel:u.inPath?u.sourceLabel:void 0}},target:{kind:`agent`,name:l.name}}),c)}function c(e){if(e.error){console.log(o.red(e.error.message));return}if(e.data){console.log(o.bold(`\n${e.data.agent.displayName}\n`)),console.log(` Name: ${e.data.agent.name}`),console.log(` Aliases: ${e.data.agent.aliases.join(`, `)||`-`}`),console.log(` Package: ${e.data.agent.packageName??`-`}`),console.log(` Binary: ${e.data.agent.binaryName}`),console.log(` Update: ${e.data.agent.selfUpdateCommands.join(` || `)||`-`}`),console.log(` Installed: ${e.data.inspection.installed?o.green(`Yes`):o.red(`No`)}`),e.data.inspection.sourceLabel&&console.log(` Source: ${e.data.inspection.sourceLabel}`),e.data.inspection.installed&&console.log(` Lifecycle: ${e.data.inspection.lifecycle}`),e.data.inspection.installedVersion&&console.log(` Version: ${e.data.inspection.installedVersion}`),e.data.inspection.latestVersion&&console.log(` Latest: ${e.data.inspection.latestVersion}`),e.data.inspection.binaryPath&&console.log(` Path: ${e.data.inspection.binaryPath}`),console.log(o.bold(`
|
|
2
2
|
Install Methods:`));for(let t of e.data.agent.installMethods)console.log(` ${o.green(`+`)} [${t.label}] ${t.command}`);console.log()}}export{s as infoCommand};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e,v as t,y as n}from"./agents-
|
|
1
|
+
import{r as e,v as t,y as n}from"./agents-CqX4AmIi.mjs";import{a as r,n as i,r as a,t as o}from"./color-BeRyMqm9.mjs";async function s(o){let s=await e(o);if(!s)return r(i({action:`inspect`,error:{code:`AGENT_NOT_FOUND`,details:{input:o},message:`Unknown agent: ${o}`},target:{kind:`agent`,name:o}}),c);let{agent:l,inspection:u}=s,d=l.selfUpdate?[l.selfUpdate.command,...l.selfUpdate.fallbackCommands??[]].map(e=>e.join(` `)):[];return r(a({action:`inspect`,data:{agent:{aliases:l.lookupAliases??[],binaryName:l.binaryName,displayName:l.displayName,installMethods:u.methods.map(e=>({command:t(l,e),label:n(e),type:e.type})),name:l.name,packageName:l.packages?.npm,selfUpdateCommands:d},capabilities:{canAutoInstall:u.methods.length>0,canAutoUninstall:u.inPath&&u.lifecycle===`managed`,canRun:u.inPath,canSelfUpdate:d.length>0},inspection:{binaryPath:u.binaryPath,installed:u.inPath,installedVersion:u.installedVersion,latestVersion:u.latestVersion,lifecycle:u.lifecycle,sourceLabel:u.inPath?u.sourceLabel:void 0,updateLabel:u.updateLabel}},target:{kind:`agent`,name:l.name}}),c)}function c(e){if(e.error){console.log(o.red(e.error.message));return}if(e.data){console.log(o.bold(`\n${e.data.agent.displayName}\n`)),console.log(` Name: ${e.data.agent.name}`),console.log(` Aliases: ${e.data.agent.aliases.join(`, `)||`-`}`),console.log(` Package: ${e.data.agent.packageName??`-`}`),console.log(` Binary: ${e.data.agent.binaryName}`),console.log(` Installed: ${e.data.inspection.installed?o.green(`Yes`):o.red(`No`)}`),console.log(` Update Mode: ${e.data.inspection.updateLabel}`),console.log(` Self Update: ${e.data.agent.selfUpdateCommands.join(` || `)||`-`}`),e.data.inspection.sourceLabel&&console.log(` Source: ${e.data.inspection.sourceLabel}`),e.data.inspection.installedVersion&&console.log(` Version: ${e.data.inspection.installedVersion}`),e.data.inspection.latestVersion&&console.log(` Latest: ${e.data.inspection.latestVersion}`),e.data.inspection.binaryPath&&console.log(` Path: ${e.data.inspection.binaryPath}`),console.log(o.bold(`
|
|
2
2
|
Capabilities:`)),console.log(` auto-install: ${e.data.capabilities.canAutoInstall?`yes`:`no`}`),console.log(` self-update: ${e.data.capabilities.canSelfUpdate?`yes`:`no`}`),console.log(` auto-uninstall: ${e.data.capabilities.canAutoUninstall?`yes`:`no`}`),console.log(` runnable: ${e.data.capabilities.canRun?`yes`:`no`}`),console.log(o.bold(`
|
|
3
3
|
Install Methods:`));for(let t of e.data.agent.installMethods)console.log(` ${o.green(`+`)} [${t.label}] ${t.command}`);console.log()}}export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./inspect-aHnVkE1y.mjs";export{e as inspectCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,c as t,r as n,s as r}from"./agents-
|
|
1
|
+
import{b as e,c as t,r as n,s as r}from"./agents-CqX4AmIi.mjs";import{J as i,a,i as o,n as s,r as c,t as l}from"./color-BeRyMqm9.mjs";import{t as u}from"./lifecycle-errors-D7JpbOsK.mjs";import{a as d,i as f,n as p,r as m}from"./user-output-BxHvAzGg.mjs";async function h(e){let t=Array.isArray(e)?e:[e];if(t.length<=1)return a(await g(t[0],{emitStartedEvent:!0}),S);o({action:`install`,data:{scope:`batch`},target:{kind:`agent`},type:`started`});let n=[];for(let e of t){let t=v(e,await g(e));n.push(t),o({action:`install`,data:t,target:{kind:`agent`,name:t.agent.name},type:`progress`})}let r={results:n,scope:`batch`,summary:b(n)};return a(n.some(e=>!e.ok)?s({action:`install`,data:r,error:x(n),target:{kind:`agent`}}):c({action:`install`,data:r,target:{kind:`agent`}}),C)}async function g(a,o={}){let l=await n(a);if(!l)return s({action:`install`,error:{code:`AGENT_NOT_FOUND`,details:{input:a},message:`Unknown agent: ${a}`},target:{kind:`agent`,name:a}});let{agent:d,inspection:f}=l;if(f.inPath){if(f.installedState)return c({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!1,installed:!0},target:{kind:`agent`,name:d.name},warnings:[{code:`ALREADY_INSTALLED`,message:`${d.displayName} is already installed.`}]});let n=e(f.methods,f.resolvedBinaryPath??f.binaryPath);if(n){if(p())return c({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!1,installed:!0},target:{kind:`agent`,name:d.name},warnings:[{code:`DRY_RUN`,message:`Dry run: would record the existing ${d.displayName} install in Quantex state.`}]});_(d,o.emitStartedEvent);try{let e=await t(d,n);return c({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!0,installState:{installType:e.installType,packageName:e.packageName},installed:!0},target:{kind:`agent`,name:d.name},warnings:[{code:`TRACKED_EXISTING_INSTALL`,message:`${d.displayName} is already installed. Quantex is now tracking the existing install.`}]})}catch(e){if(i(e))return s({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!1,installed:!0},...u(e,{kind:`agent`,name:d.name})});throw e}}return c({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!1,installed:!0},target:{kind:`agent`,name:d.name},warnings:[{code:`UNTRACKED_EXISTING_INSTALL`,message:`${d.displayName} is already installed but not tracked by Quantex. Quantex could not safely determine the supported install source, so the existing install remains unmanaged.`}]})}if(p())return c({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!1,installed:!1},target:{kind:`agent`,name:d.name},warnings:[{code:`DRY_RUN`,message:`Dry run: would install ${d.displayName}.`}]});_(d,o.emitStartedEvent);let m;try{m=await r(d)}catch(e){if(i(e))return s({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!1,installed:!1},...u(e,{kind:`agent`,name:d.name})});throw e}return m.success?c({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!0,installState:m.installedState?{installType:m.installedState.installType,packageName:m.installedState.packageName}:void 0,installed:!0},target:{kind:`agent`,name:d.name}}):s({action:`install`,data:{agent:{displayName:d.displayName,name:d.name},changed:!1,installed:!1},error:{code:`INSTALL_FAILED`,message:`Failed to install ${d.displayName}.`},target:{kind:`agent`,name:d.name}})}function _(e,t=!1){t&&o({action:`install`,data:{agent:{displayName:e.displayName,name:e.name}},target:{kind:`agent`,name:e.name},type:`started`})}function v(e,t){let n=t.data,r=t.warnings.map(e=>({code:e.code,message:e.message}));return{agent:n?.agent??{displayName:e,name:t.target?.name??e},changed:n?.changed??!1,error:t.error?{code:t.error.code,message:t.error.message}:void 0,input:e,installState:n?.installState,installed:n?.installed??!1,ok:t.ok,status:y(t),warnings:r}}function y(e){return e.ok?e.warnings.some(e=>e.code===`TRACKED_EXISTING_INSTALL`)?`tracked-existing-install`:e.warnings.some(e=>e.code===`UNTRACKED_EXISTING_INSTALL`)?`untracked-existing-install`:e.warnings.some(e=>e.code===`ALREADY_INSTALLED`)?`already-installed`:e.warnings.some(e=>e.code===`DRY_RUN`)?`planned`:`installed`:e.error?.code===`RESOURCE_LOCKED`?`locked`:`failed`}function b(e){let t={alreadyInstalled:0,failed:0,installed:0,locked:0,planned:0,trackedExistingInstall:0,untrackedExistingInstall:0};for(let n of e)switch(n.status){case`already-installed`:t.alreadyInstalled+=1;break;case`failed`:t.failed+=1;break;case`installed`:t.installed+=1;break;case`locked`:t.locked+=1;break;case`planned`:t.planned+=1;break;case`tracked-existing-install`:t.trackedExistingInstall+=1;break;case`untracked-existing-install`:t.untrackedExistingInstall+=1;break}return t}function x(e){let t=e.filter(e=>!e.ok),n=new Set(t.map(e=>e.error?.code));return n.size===1&&n.has(`RESOURCE_LOCKED`)?{code:`RESOURCE_LOCKED`,details:{failedAgents:t.map(e=>e.input)},message:`One or more agents could not be installed because another Quantex process is already using the agent lifecycle lock.`}:{code:`INSTALL_FAILED`,details:{failedAgents:t.map(e=>e.input)},message:`One or more agents failed to install.`}}function S(e){if(e.error){m(l.red(e.error.message));return}if(e.data){if(e.warnings.length>0){for(let t of e.warnings){if(t.code===`TRACKED_EXISTING_INSTALL`){f(l.green(t.message));continue}if(t.code===`DRY_RUN`){d(l.cyan(t.message));continue}d(l.yellow(t.message))}return}f(l.cyan(`Installing ${e.data.agent.displayName}...`)),f(l.green(`${e.data.agent.displayName} installed successfully!`))}}function C(e){if(!e.data){e.error&&m(l.red(e.error.message));return}for(let t of e.data.results)switch(t.status){case`installed`:f(l.cyan(`Installing ${t.agent.displayName}...`)),f(l.green(`${t.agent.displayName} installed successfully!`));break;case`tracked-existing-install`:f(l.green(w(t.warnings,`${t.agent.displayName} is already installed.`)));break;case`already-installed`:case`untracked-existing-install`:d(l.yellow(w(t.warnings,`${t.agent.displayName} is already installed.`)));break;case`planned`:d(l.cyan(w(t.warnings,`Dry run: would install ${t.agent.displayName}.`)));break;case`locked`:d(l.yellow(t.error?.message??`Another quantex process is already installing ${t.agent.displayName}.`));break;case`failed`:m(l.red(t.error?.message??`Failed to install ${t.agent.displayName}.`));break}T(e.data.summary)}function w(e,t){return e[0]?.message??t}function T(e){let t=[e.installed?`installed ${e.installed}`:void 0,e.alreadyInstalled?`already installed ${e.alreadyInstalled}`:void 0,e.trackedExistingInstall?`tracked existing ${e.trackedExistingInstall}`:void 0,e.untrackedExistingInstall?`untracked existing ${e.untrackedExistingInstall}`:void 0,e.failed?`failed ${e.failed}`:void 0,e.locked?`locked ${e.locked}`:void 0,e.planned?`planned ${e.planned}`:void 0].filter(Boolean);t.length>0&&f(l.bold(`Summary: ${t.join(`, `)}`))}export{h as installCommand};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t as e}from"./agents-
|
|
1
|
+
import{t as e}from"./agents-CqX4AmIi.mjs";import{a as t,r as n,t as r}from"./color-BeRyMqm9.mjs";async function i(){return t(n({action:`list`,data:{agents:(await e()).map(e=>({binaryName:e.agent.binaryName,displayName:e.agent.displayName,installed:e.inPath,installedVersion:e.installedVersion,latestVersion:e.latestVersion,lifecycle:e.lifecycle,name:e.agent.name,sourceLabel:e.sourceLabel,updateLabel:e.updateLabel}))},target:{kind:`system`,name:`agents`}}),a)}function a(e){console.log(r.bold(`
|
|
2
2
|
AI Agents:
|
|
3
3
|
`));for(let t of e.data?.agents??[]){let e=t.displayName.padEnd(18),n=t.installed?r.green(`installed`):r.gray(`not installed`),i=t.installed?r.dim(t.installedVersion??`unknown version`):``,a=t.installed?r.cyan(t.updateLabel):``,o=t.installed?r.dim(t.sourceLabel):``;console.log(` ${e} ${n} ${i}${a?` ${a}`:``}${o?` ${o}`:``}`)}console.log()}export{i as listCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,v as t,y as n}from"./agents-
|
|
1
|
+
import{r as e,v as t,y as n}from"./agents-CqX4AmIi.mjs";import{a as r,n as i,r as a,t as o}from"./color-BeRyMqm9.mjs";async function s(o){let s=await e(o);if(!s)return r(i({action:`resolve`,error:{code:`AGENT_NOT_FOUND`,details:{input:o},message:`Unknown agent: ${o}`},target:{kind:`agent`,name:o}}),c);let{agent:l,inspection:u}=s;if(!u.inPath||!u.binaryPath){let e=u.methods.map(e=>({command:t(l,e),label:n(e),type:e.type})).filter(e=>e.command);return r(i({action:`resolve`,data:{agent:{binaryName:l.binaryName,displayName:l.displayName,name:l.name},resolution:{binaryPath:``,installGuidance:{docsRef:`skills/quantex-cli/references/command-recipes.md`,installMethods:e,suggestedAction:`ensure-agent-installed`,suggestedEnsureCommand:`quantex ensure ${l.name}`},installed:!1,installSource:`not-installed`,lifecycle:`unmanaged`,sourceLabel:`not installed`,suggestedLaunchCommand:[]}},error:{code:`AGENT_NOT_INSTALLED`,details:{docsRef:`skills/quantex-cli/references/command-recipes.md`,installMethods:e,suggestedAction:`ensure-agent-installed`,suggestedEnsureCommand:`quantex ensure ${l.name}`},message:`${l.displayName} is not installed.`},target:{kind:`agent`,name:l.name}}),c)}return r(a({action:`resolve`,data:{agent:{binaryName:l.binaryName,displayName:l.displayName,name:l.name},resolution:{binaryPath:u.binaryPath,installed:!0,installSource:u.installedState?.installType??`detected-in-path`,installedVersion:u.installedVersion,lifecycle:u.lifecycle,sourceLabel:u.sourceLabel,suggestedLaunchCommand:[u.binaryPath]}},target:{kind:`agent`,name:l.name}}),c)}function c(e){if(e.error){console.log(o.red(e.error.message));let t=e.data?.resolution.installGuidance;if(t){console.log(o.dim(`Try: ${t.suggestedEnsureCommand}`));for(let e of t.installMethods)console.log(o.dim(`Install: [${e.label}] ${e.command}`))}return}e.data&&(console.log(o.bold(`\n${e.data.agent.displayName}\n`)),console.log(` Name: ${e.data.agent.name}`),console.log(` Binary: ${e.data.agent.binaryName}`),console.log(` Path: ${e.data.resolution.binaryPath}`),console.log(` Source: ${e.data.resolution.sourceLabel}`),console.log(` Lifecycle: ${e.data.resolution.lifecycle}`),console.log(` Install Type: ${e.data.resolution.installSource}`),e.data.resolution.installedVersion&&console.log(` Version: ${e.data.resolution.installedVersion}`),console.log(` Launch: ${e.data.resolution.suggestedLaunchCommand.join(` `)}`),console.log())}export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./resolve-CVQ-2rK8.mjs";export{e as resolveCommand};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{a as e,n as t,r as n,t as r}from"./color-BeRyMqm9.mjs";const i={additionalProperties:!1,properties:{action:{type:`string`},data:{type:`object`},error:{additionalProperties:!1,properties:{code:{type:`string`},message:{type:`string`}},required:[`code`,`message`],type:`object`},exitCode:{type:`integer`},meta:{additionalProperties:!1,properties:{mode:{type:`string`},runId:{type:`string`},schemaVersion:{type:`string`},source:{type:`string`},fetchedAt:{type:`string`},staleAfter:{type:`string`},timestamp:{type:`string`},version:{type:`string`}},required:[`mode`,`runId`,`schemaVersion`,`timestamp`,`version`],type:`object`},ok:{type:`boolean`},target:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},warnings:{items:{additionalProperties:!1,properties:{code:{type:`string`},message:{type:`string`}},required:[`code`,`message`],type:`object`},type:`array`}},required:[`action`,`error`,`meta`,`ok`,`warnings`],type:`object`},a={additionalProperties:!1,properties:{action:{type:`string`},data:{type:`object`},meta:{additionalProperties:!1,properties:{mode:{type:`string`},runId:{type:`string`},schemaVersion:{type:`string`},source:{type:`string`},fetchedAt:{type:`string`},staleAfter:{type:`string`},timestamp:{type:`string`},version:{type:`string`}},required:[`mode`,`runId`,`schemaVersion`,`timestamp`,`version`],type:`object`},target:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},type:{type:`string`}},required:[`action`,`meta`,`type`],type:`object`},o={additionalProperties:!1,properties:{available:{type:`boolean`},reason:{type:`string`}},required:[`available`],type:`object`},s={brew:o,bun:o,cargo:o,deno:o,mise:o,npm:o,pip:o,uv:o,winget:o},c=[`brew`,`bun`,`cargo`,`deno`,`mise`,`npm`,`pip`,`uv`,`winget`],l=[{dataSchema:{additionalProperties:!1,properties:{agents:{items:{type:`string`},type:`array`},features:{additionalProperties:!1,properties:{assumeYes:{type:`boolean`},cacheBypass:{type:`boolean`},cacheRefresh:{type:`boolean`},channels:{items:{type:`string`},type:`array`},colorModes:{items:{type:`string`},type:`array`},dryRun:{type:`boolean`},execInstallPolicies:{items:{type:`string`},type:`array`},freshnessMetadata:{type:`boolean`},idempotencyKey:{type:`boolean`},logLevels:{items:{type:`string`},type:`array`},quietLogs:{type:`boolean`},selfUpgrade:{type:`boolean`},timeout:{type:`boolean`}},required:[`assumeYes`,`cacheBypass`,`cacheRefresh`,`channels`,`colorModes`,`dryRun`,`execInstallPolicies`,`freshnessMetadata`,`idempotencyKey`,`logLevels`,`quietLogs`,`selfUpgrade`,`timeout`],type:`object`},installers:{additionalProperties:!1,properties:s,required:c,type:`object`},outputModes:{items:{type:`string`},type:`array`},platform:{additionalProperties:!1,properties:{arch:{type:`string`},os:{type:`string`}},required:[`arch`,`os`],type:`object`}},required:[`agents`,`features`,`installers`,`outputModes`,`platform`],type:`object`},description:`Environment and surface capabilities`,envelopeSchema:i,name:`capabilities`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{commands:{items:{additionalProperties:!1,properties:{flags:{items:{type:`string`},type:`array`},name:{type:`string`},outputSchemaRef:{type:`string`},stability:{type:`string`},summary:{type:`string`}},required:[`flags`,`name`,`outputSchemaRef`,`stability`,`summary`],type:`object`},type:`array`}},required:[`commands`],type:`object`},description:`Stable command catalog`,envelopeSchema:i,name:`commands`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agents:{items:{additionalProperties:!1,properties:{displayName:{type:`string`},installedVersion:{type:`string`},latestVersion:{type:`string`},lifecycle:{type:`string`},outdated:{type:`boolean`},sourceLabel:{type:`string`}},required:[`displayName`,`lifecycle`,`outdated`,`sourceLabel`],type:`object`},type:`array`},installers:{additionalProperties:!1,properties:{brew:{type:`boolean`},bun:{type:`boolean`},cargo:{type:`boolean`},deno:{type:`boolean`},mise:{type:`boolean`},npm:{type:`boolean`},pip:{type:`boolean`},uv:{type:`boolean`},winget:{type:`boolean`}},required:c,type:`object`},issues:{items:{additionalProperties:!1,properties:{blocking:{type:`boolean`},category:{type:`string`},code:{type:`string`},docsRef:{type:`string`},message:{type:`string`},severity:{type:`string`},subject:{additionalProperties:!1,properties:{kind:{type:`string`},name:{type:`string`}},required:[`kind`],type:`object`},suggestedAction:{type:`string`},suggestedCommands:{items:{type:`string`},type:`array`}},required:[`blocking`,`category`,`code`,`message`,`severity`,`subject`,`suggestedAction`,`suggestedCommands`],type:`object`},type:`array`},self:{additionalProperties:!1,properties:{canAutoUpdate:{type:`boolean`},currentVersion:{type:`string`},installSource:{type:`string`},latestVersion:{type:`string`},outdated:{type:`boolean`},recoveryHint:{type:`string`}},required:[`canAutoUpdate`,`currentVersion`,`installSource`,`outdated`],type:`object`}},required:[`agents`,`installers`,`issues`,`self`],type:`object`},description:`Diagnostic state and remediation guidance for the current environment`,envelopeSchema:i,name:`doctor`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{additionalProperties:!1,properties:{binaryName:{type:`string`},displayName:{type:`string`},name:{type:`string`}},required:[`name`],type:`object`},execution:{additionalProperties:!1,properties:{args:{items:{type:`string`},type:`array`},installGuidance:{additionalProperties:!1,properties:{docsRef:{type:`string`},installMethods:{items:{additionalProperties:!1,properties:{command:{type:`string`},label:{type:`string`},type:{type:`string`}},required:[`command`,`label`,`type`],type:`object`},type:`array`},suggestedAction:{type:`string`},suggestedEnsureCommand:{type:`string`},suggestedExecCommand:{type:`string`}},required:[`docsRef`,`installMethods`,`suggestedAction`,`suggestedEnsureCommand`,`suggestedExecCommand`],type:`object`},installPolicy:{type:`string`},installed:{type:`boolean`},interactive:{type:`boolean`},launched:{type:`boolean`}},required:[`args`,`installPolicy`,`installed`,`interactive`,`launched`],type:`object`}},required:[`agent`,`execution`],type:`object`},description:`Preflight contract for managed agent execution`,envelopeSchema:i,name:`exec`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},installState:{type:`object`},installed:{type:`boolean`},results:{items:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},error:{type:`object`},input:{type:`string`},installState:{type:`object`},installed:{type:`boolean`},ok:{type:`boolean`},status:{type:`string`},warnings:{items:{type:`object`},type:`array`}},required:[`agent`,`changed`,`input`,`installed`,`ok`,`status`,`warnings`],type:`object`},type:`array`},scope:{type:`string`},summary:{type:`object`}},type:`object`},description:`Install result for one or more agents`,envelopeSchema:i,name:`install`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},changed:{type:`boolean`},installState:{type:`object`},installed:{type:`boolean`}},required:[`agent`,`changed`,`installed`],type:`object`},description:`Ensure result for an agent`,envelopeSchema:i,name:`ensure`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},capabilities:{type:`object`},inspection:{type:`object`}},required:[`agent`,`capabilities`,`inspection`],type:`object`},description:`Structured inspection result for an agent`,envelopeSchema:i,name:`inspect`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{agent:{type:`object`},resolution:{additionalProperties:!1,properties:{binaryPath:{type:`string`},installGuidance:{additionalProperties:!1,properties:{docsRef:{type:`string`},installMethods:{items:{additionalProperties:!1,properties:{command:{type:`string`},label:{type:`string`},type:{type:`string`}},required:[`command`,`label`,`type`],type:`object`},type:`array`},suggestedAction:{type:`string`},suggestedEnsureCommand:{type:`string`}},required:[`docsRef`,`installMethods`,`suggestedAction`,`suggestedEnsureCommand`],type:`object`},installed:{type:`boolean`},installSource:{type:`string`},installedVersion:{type:`string`},lifecycle:{type:`string`},sourceLabel:{type:`string`},suggestedLaunchCommand:{items:{type:`string`},type:`array`}},required:[`binaryPath`,`installed`,`installSource`,`lifecycle`,`sourceLabel`,`suggestedLaunchCommand`],type:`object`}},required:[`agent`,`resolution`],type:`object`},description:`Resolved executable entrypoint for an agent`,envelopeSchema:i,name:`resolve`,ndjsonEventSchema:a},{dataSchema:{additionalProperties:!1,properties:{commands:{items:{additionalProperties:!1,properties:{dataSchema:{type:`object`},description:{type:`string`},envelopeSchema:{type:`object`},name:{type:`string`},ndjsonEventSchema:{type:`object`}},required:[`dataSchema`,`description`,`envelopeSchema`,`name`],type:`object`},type:`array`}},required:[`commands`],type:`object`},description:`Structured schema catalog`,envelopeSchema:i,name:`schema`,ndjsonEventSchema:a}];async function u(r){let i=r?l.filter(e=>e.name===r):l;return r&&i.length===0?e(t({action:`schema`,error:{code:`INVALID_ARGUMENT`,details:{command:r},message:`Unknown schema target: ${r}`},target:{kind:`system`,name:`schema`}}),d):e(n({action:`schema`,data:{commands:i},target:{kind:`system`,name:`schema`}}),d)}function d(e){if(e.error){console.log(r.red(e.error.message));return}if(e.data){console.log(r.bold(`
|
|
2
|
+
Quantex Schemas
|
|
3
|
+
`));for(let t of e.data.commands)console.log(` ${r.cyan(t.name)}`),console.log(` ${t.description}`);console.log()}}function f(){return l}export{u as n,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./schema-B8pc2YX5.mjs";export{e as schemaCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e,n as t}from"./agents-
|
|
1
|
+
import{l as e,n as t}from"./agents-CqX4AmIi.mjs";import{J as n,O as r,a as i,n as a,r as o,t as s}from"./color-BeRyMqm9.mjs";import{t as c}from"./lifecycle-errors-D7JpbOsK.mjs";import{a as l,i as u,n as d,r as f}from"./user-output-BxHvAzGg.mjs";async function p(s){let l=t(s);if(!l)return i(a({action:`uninstall`,error:{code:`AGENT_NOT_FOUND`,details:{input:s},message:`Unknown agent: ${s}`},target:{kind:`agent`,name:s}}),m);if(d())return await r(l.name)?i(o({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},target:{kind:`agent`,name:l.name},warnings:[{code:`DRY_RUN`,message:`Dry run: would uninstall ${l.displayName}.`}]}),m):i(a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},error:{code:`UNINSTALL_FAILED`,message:`Failed to uninstall ${l.displayName}.`},target:{kind:`agent`,name:l.name}}),m);let u;try{u=await e(l)}catch(e){if(n(e))return i(a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},...c(e,{kind:`agent`,name:l.name})}),m);throw e}return i(u?o({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!0},target:{kind:`agent`,name:l.name}}):a({action:`uninstall`,data:{agent:{displayName:l.displayName,name:l.name},changed:!1},error:{code:`UNINSTALL_FAILED`,message:`Failed to uninstall ${l.displayName}.`},target:{kind:`agent`,name:l.name}}),m)}function m(e){if(e.error){f(s.red(e.error.message));return}if(e.data){if(e.warnings&&e.warnings.length>0){for(let t of e.warnings)l(s.yellow(t.message));return}u(s.cyan(`Uninstalling ${e.data.agent.displayName}...`)),u(s.green(`${e.data.agent.displayName} uninstalled successfully!`))}}export{p as uninstallCommand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./messages-qcLhD-Gc.mjs";import{_ as r,d as i,h as a,n as o,u as s}from"./agents-
|
|
1
|
+
import{n as e,r as t,t as n}from"./messages-qcLhD-Gc.mjs";import{_ as r,d as i,h as a,n as o,u as s}from"./agents-CqX4AmIi.mjs";import{J as c,a as l,i as u,n as d,r as f,t as p,z as m}from"./color-BeRyMqm9.mjs";import{a as h,i as g,n as _,r as v}from"./user-output-BxHvAzGg.mjs";import{n as y,r as b}from"./update-DOWtjWx4.mjs";async function x(e,t){if(t)return S();if(!e)return l(d({action:`update`,error:{code:`INVALID_ARGUMENT`,message:`Please specify an agent name or use --all flag`},target:{kind:`agent`}}),k);let n=o(e);return n?C(n):l(d({action:`update`,error:{code:`AGENT_NOT_FOUND`,details:{input:e},message:`Unknown agent: ${e}`},target:{kind:`agent`,name:e}}),k)}async function S(){u({action:`update`,data:{scope:`all`},target:{kind:`agent`},type:`started`});let e=await w(await y());return e.hasFailures?l(d({action:`update`,data:{results:e.results,scope:`all`},error:{code:`UPDATE_FAILED`,message:`One or more agents failed to update.`},target:{kind:`agent`}}),k):l(f({action:`update`,data:{results:e.results,scope:`all`},target:{kind:`agent`}}),k)}async function C(e){u({action:`update`,data:{agent:e.name,scope:`single`},target:{kind:`agent`,name:e.name},type:`started`});let{inspection:t,plan:n}=await b(e);if(!t.inPath)return l(d({action:`update`,error:{code:`AGENT_NOT_INSTALLED`,message:`${e.displayName} is not installed.`},target:{kind:`agent`,name:e.name}}),k);let r=await w(n),i=O(r.results);return i?l(d({action:`update`,data:{results:r.results,scope:`single`},error:{code:`RESOURCE_LOCKED`,details:i.resource?{resource:i.resource}:void 0,message:i.message??`Another quantex process is already updating ${e.displayName}.`},target:{kind:`agent`,name:e.name}}),k):r.hasFailures?l(d({action:`update`,data:{results:r.results,scope:`single`},error:{code:`UPDATE_FAILED`,message:`Failed to update ${e.displayName}.`},target:{kind:`agent`,name:e.name}}),k):l(f({action:`update`,data:{results:r.results,scope:`single`},target:{kind:`agent`,name:e.name}}),k)}async function w(n){let r=[];for(let e of n.upToDate)T(r,{displayName:e.agent.displayName,installedVersion:e.installedVersion,latestVersion:e.latestVersion,name:e.agent.name,status:`up-to-date`});for(let t of n.skippedManualCheck)T(r,{displayName:t.agent.displayName,message:e(t.agent),name:t.agent.name,status:`manual-required`});for(let e of n.untrackedInPath)T(r,{displayName:e.agent.displayName,message:t(e.agent),name:e.agent.name,status:`manual-required`});for(let e of n.grouped){let t=await E(e.type,e.packages,e.updates);for(let e of t)T(r,e)}for(let e of n.manual)T(r,await D(e.agent,e.state,e.inspection.methods,e.inspection));return{hasFailures:r.some(e=>e.status===`failed`||e.status===`locked`),results:r}}function T(e,t){e.push(t),u({action:`update`,data:t,target:{kind:`agent`,name:t.name},type:`progress`})}async function E(e,t,n){if(n.length===0)return[];if(_())return n.map(({agent:t,inspection:n,strategy:r})=>({displayName:t.displayName,installedVersion:n.installedVersion,latestVersion:n.latestVersion,message:`Dry run: would update ${t.displayName}.`,name:t.name,status:`planned`,strategy:r===`managed`?`managed/${e}`:r}));try{if(await i(e,t))return n.map(({agent:t,inspection:n,strategy:r})=>({displayName:t.displayName,installedVersion:n.installedVersion,latestVersion:n.latestVersion,name:t.name,status:`updated`,strategy:r===`managed`?`managed/${e}`:r}));let r=[];for(let{agent:e,inspection:t,state:i}of n)r.push(await D(e,i,t.methods,t));return r}catch(t){if(!c(t))throw t;return n.map(({agent:n,inspection:r,strategy:i})=>({displayName:n.displayName,installedVersion:r.installedVersion,latestVersion:r.latestVersion,message:t.message,name:n.name,resource:t.resource,status:`locked`,strategy:i===`managed`?`managed/${e}`:i}))}}async function D(t,i,o,l){let u=a({agent:t,installedState:i,methods:o??l?.methods??[]}),d=l?.installedVersion,f=l?.latestVersion;if(u===`manual-hint`&&!r(t,i))return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:e(t),name:t.name,status:`manual-required`,strategy:u};if(_())return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:`Dry run: would update ${t.displayName}.`,name:t.name,status:`planned`,strategy:u};let p;try{p=await s(t,i)}catch(e){if(c(e))return{displayName:t.displayName,installedVersion:d,latestVersion:f,message:e.message,name:t.name,resource:e.resource,status:`locked`,strategy:u};throw e}if(p.success){if(u===`self-update`){let e=await m(t.binaryName,t.versionProbe);if(d&&e)return e===d?{displayName:t.displayName,installedVersion:e,latestVersion:e,name:t.name,status:`up-to-date`,strategy:u}:{displayName:t.displayName,installedVersion:d,latestVersion:e,name:t.name,status:`updated`,strategy:u}}return{displayName:t.displayName,installedVersion:d,latestVersion:f,name:t.name,status:`updated`,strategy:u}}return{displayName:t.displayName,hint:n(t,u),installedVersion:d,latestVersion:f,name:t.name,status:`failed`,strategy:u}}function O(e){if(e.length===1)return e[0]?.status===`locked`?e[0]:void 0}function k(e){if(!e.data){e.error&&v(p.red(e.error.message));return}for(let t of e.data.results)switch(t.status){case`up-to-date`:g(p.green(`${t.displayName} is up to date (${t.installedVersion??`unknown`})`));break;case`manual-required`:h(p.yellow(`${t.displayName}: manual action required.`)),t.message&&h(p.cyan(`Next step: ${t.message}`));break;case`planned`:h(p.cyan(`Would update ${t.displayName}${t.strategy?` via ${t.strategy}`:``}${A(t.installedVersion,t.latestVersion)}`));break;case`updated`:g(p.cyan(`Updating ${t.displayName}${t.strategy?` via ${t.strategy}`:``}...${A(t.installedVersion,t.latestVersion)}`)),g(p.green(`${t.displayName} updated successfully!`));break;case`failed`:g(p.cyan(`Updating ${t.displayName}${t.strategy?` via ${t.strategy}`:``}...${A(t.installedVersion,t.latestVersion)}`)),v(p.red(`Failed to update ${t.displayName}.`)),t.hint&&h(p.cyan(`Next step: ${t.hint}`));break;case`locked`:h(p.yellow(t.message??`Another quantex process is already updating ${t.displayName}.`));break}e.data.results.length>1&&j(e.data.results),!e.data.results.length&&e.error&&v(p.red(e.error.message))}function A(e,t){return e?` (${e} -> ${t??`latest`})`:``}function j(e){let t={failed:0,locked:0,manualRequired:0,planned:0,upToDate:0,updated:0};for(let n of e)switch(n.status){case`up-to-date`:t.upToDate+=1;break;case`manual-required`:t.manualRequired+=1;break;case`planned`:t.planned+=1;break;case`updated`:t.updated+=1;break;case`failed`:t.failed+=1;break;case`locked`:t.locked+=1;break}let n=[t.updated?`updated ${t.updated}`:void 0,t.upToDate?`up to date ${t.upToDate}`:void 0,t.manualRequired?`manual ${t.manualRequired}`:void 0,t.failed?`failed ${t.failed}`:void 0,t.locked?`locked ${t.locked}`:void 0,t.planned?`planned ${t.planned}`:void 0].filter(Boolean);n.length>0&&g(p.bold(`Summary: ${n.join(`, `)}`))}export{x as updateCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,g as t,i as n,t as r,x as i}from"./agents-CqX4AmIi.mjs";function a(e,n={}){let r={bun:[],npm:[],brew:[],cargo:[],deno:[],mise:[],pip:[],uv:[],winget:[]},i=[],a=[],c=[],l=[];for(let u of e){if(!u.inPath)continue;if(n.skipUntrackedInPath&&!u.installedState){c.push(u);continue}if(s(u)){a.push(u);continue}if(!o(u)){l.push(u);continue}let e=t({agent:u.agent,installedState:u.installedState,methods:u.methods}),d=e.strategy===`managed`?e.getManagedInstallerType?.({agent:u.agent,installedState:u.installedState,methods:u.methods}):void 0;if(d){let e={inspection:u,installerType:d,strategy:`grouped`};r[d].push(e);continue}i.push({inspection:u,strategy:e.strategy===`self-update`?`self-update`:`manual`})}return{entries:[...r.bun,...r.npm,...r.brew,...r.cargo,...r.deno,...r.mise,...r.pip,...r.uv,...r.winget,...i],grouped:r,manual:i,skippedManualCheck:a,untrackedInPath:c,upToDate:l}}function o(e){return e.installedVersion&&e.latestVersion?e.installedVersion!==e.latestVersion:!0}function s(t){return!t.latestVersion&&!e(t.agent,t.installedState)}const c=[`bun`,`npm`,`brew`,`cargo`,`deno`,`mise`,`pip`,`uv`,`winget`];async function l(e){let t=await n(e);return{agent:e,inspection:t,updateAvailable:o(t)}}async function u(){return f(await r(),{skipUntrackedInPath:!0})}async function d(e){let t=await n(e);return{inspection:t,plan:f([t])}}function f(e,t={}){let n=a(e,t),r=[],i=c.map(e=>p(e,n.grouped[e],r)).filter(e=>e!==void 0);return{entries:n.entries.map(e=>h(e.inspection)),grouped:i,manual:[...r,...n.manual.map(e=>h(e.inspection))],skippedManualCheck:n.skippedManualCheck,untrackedInPath:n.untrackedInPath,upToDate:n.upToDate}}function p(e,t,n){if(t.length===0)return;let r=t.map(e=>h(e.inspection)),i=r.filter(m);if(n.push(...r.filter(e=>!m(e))),i.length!==0)return{type:e,packages:i.map(e=>e.package),updates:i}}function m(e){return!!e.package?.packageName}function h(e){let n=t({agent:e.agent,installedState:e.installedState,methods:e.methods}),r=n.getManagedInstallerType?.({agent:e.agent,installedState:e.installedState,methods:e.methods});return{agent:e.agent,inspection:e,installerType:r,package:r?g(e.agent,e.installedState,e.methods,r):void 0,state:e.installedState,strategy:n.strategy}}function g(e,t,n,r){if(t?.packageName&&t.installType===r)return{packageName:t.packageName,binaryName:r===`deno`?t.binaryName:void 0,packageInstallArgs:t.packageInstallArgs,packageTargetKind:t.packageTargetKind};let a=n.find(e=>e.type===r);if(!a)return;let o=i(e,a);if(o)return{packageName:o,binaryName:a.binaryName??(r===`deno`?e.binaryName:void 0),packageInstallArgs:a.packageInstallArgs,packageTargetKind:a.packageTargetKind}}export{o as a,a as i,u as n,d as r,l as t};
|