@mutagent/cli 0.1.337 → 0.1.339
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 +34 -0
- package/dist/agent-build-worker.js +708 -0
- package/dist/bin/cli.js +18412 -1980
- package/dist/index.js +31 -3
- package/package.json +11 -10
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
15
15
|
});
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
18
19
|
var __export = (target, all) => {
|
|
19
20
|
for (var name in all)
|
|
20
21
|
__defProp(target, name, {
|
|
@@ -401,6 +402,15 @@ var init_config = __esm(() => {
|
|
|
401
402
|
});
|
|
402
403
|
|
|
403
404
|
// src/lib/errors.ts
|
|
405
|
+
function createErrorFromUnknown(error) {
|
|
406
|
+
if (error instanceof MutagentError) {
|
|
407
|
+
return error;
|
|
408
|
+
}
|
|
409
|
+
if (error instanceof Error) {
|
|
410
|
+
return new MutagentError("UNKNOWN_ERROR", error.message, undefined, 1);
|
|
411
|
+
}
|
|
412
|
+
return new MutagentError("UNKNOWN_ERROR", typeof error === "string" ? error : "An unknown error occurred", undefined, 1);
|
|
413
|
+
}
|
|
404
414
|
function handleError(error, isJson) {
|
|
405
415
|
if (error instanceof MutagentError) {
|
|
406
416
|
if (isJson) {
|
|
@@ -487,7 +497,7 @@ function handleError(error, isJson) {
|
|
|
487
497
|
}
|
|
488
498
|
process.exit(1);
|
|
489
499
|
}
|
|
490
|
-
var MutagentError, AUTH_REMEDIATION_MESSAGE, AuthenticationError, ApiError, WORKSPACE_REMEDIATION_MESSAGE, WorkspaceContextError, ValidationError, NotFoundError;
|
|
500
|
+
var MutagentError, AUTH_REMEDIATION_MESSAGE, AuthenticationError, ApiError, WORKSPACE_REMEDIATION_MESSAGE, WorkspaceContextError, ValidationError, NetworkError, RateLimitError, NotFoundError;
|
|
491
501
|
var init_errors = __esm(() => {
|
|
492
502
|
init_known_secrets();
|
|
493
503
|
MutagentError = class MutagentError extends Error {
|
|
@@ -554,6 +564,25 @@ var init_errors = __esm(() => {
|
|
|
554
564
|
super("VALIDATION_ERROR", message, "Check the command syntax with: mutagent <command> --help", 1);
|
|
555
565
|
}
|
|
556
566
|
};
|
|
567
|
+
NetworkError = class NetworkError extends MutagentError {
|
|
568
|
+
url;
|
|
569
|
+
statusCode;
|
|
570
|
+
constructor(message = "Network error", url, statusCode) {
|
|
571
|
+
super("NETWORK_ERROR", message, "Check your internet connection and verify the server URL", 5);
|
|
572
|
+
this.url = url;
|
|
573
|
+
this.statusCode = statusCode;
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
RateLimitError = class RateLimitError extends NetworkError {
|
|
577
|
+
retryAfter;
|
|
578
|
+
constructor(retryAfter) {
|
|
579
|
+
super("Rate limit exceeded", undefined, 429);
|
|
580
|
+
this.code = "RATE_LIMIT_ERROR";
|
|
581
|
+
this.suggestion = retryAfter ? `Wait ${String(retryAfter)} seconds before retrying` : "Wait a few seconds before retrying";
|
|
582
|
+
this.retryAfter = retryAfter;
|
|
583
|
+
this.exitCode = 6;
|
|
584
|
+
}
|
|
585
|
+
};
|
|
557
586
|
NotFoundError = class NotFoundError extends MutagentError {
|
|
558
587
|
constructor(resource, id) {
|
|
559
588
|
super("NOT_FOUND", `${resource} not found: ${id}`, `Check the ID and try again. List available ${resource.toLowerCase()}s with the appropriate list command.`, 1);
|
|
@@ -1451,5 +1480,4 @@ export {
|
|
|
1451
1480
|
ApiError
|
|
1452
1481
|
};
|
|
1453
1482
|
|
|
1454
|
-
//# debugId=
|
|
1455
|
-
//# sourceMappingURL=index.js.map
|
|
1483
|
+
//# debugId=F50D31F7C1A84A2764756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutagent/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.339",
|
|
4
4
|
"description": "Bun-native CLI for the MutagenT AI platform - auth, provider config, and lifecycle-tool installer for AI-native workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"sync-skill": "bun run scripts/sync-skill.ts",
|
|
18
18
|
"dev": "bun run sync-skill && bun run src/bin/cli.ts",
|
|
19
19
|
"prebuild": "bun run sync-skill",
|
|
20
|
-
"build": "bun
|
|
21
|
-
"build:binary": "bun run sync-skill && bun
|
|
22
|
-
"build:binary:linux-x64": "bun run sync-skill && bun
|
|
23
|
-
"build:binary:linux-arm64": "bun run sync-skill && bun
|
|
24
|
-
"build:binary:darwin-x64": "bun run sync-skill && bun
|
|
25
|
-
"build:binary:darwin-arm64": "bun run sync-skill && bun
|
|
26
|
-
"build:binary:windows-x64": "bun run sync-skill && bun
|
|
20
|
+
"build": "bun run scripts/build.ts",
|
|
21
|
+
"build:binary": "bun run sync-skill && bun run scripts/build.ts --binary",
|
|
22
|
+
"build:binary:linux-x64": "bun run sync-skill && bun run scripts/build.ts --binary linux-x64",
|
|
23
|
+
"build:binary:linux-arm64": "bun run sync-skill && bun run scripts/build.ts --binary linux-arm64",
|
|
24
|
+
"build:binary:darwin-x64": "bun run sync-skill && bun run scripts/build.ts --binary darwin-x64",
|
|
25
|
+
"build:binary:darwin-arm64": "bun run sync-skill && bun run scripts/build.ts --binary darwin-arm64",
|
|
26
|
+
"build:binary:windows-x64": "bun run sync-skill && bun run scripts/build.ts --binary windows-x64",
|
|
27
27
|
"pretest": "bun run sync-skill",
|
|
28
28
|
"test": "bun test src/",
|
|
29
29
|
"test:integration": "bun test tests/pipe/ --timeout 30000",
|
|
@@ -42,12 +42,13 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@inquirer/prompts": "^8.7.2",
|
|
45
|
-
"@mutagent/sdk": "0.5.
|
|
45
|
+
"@mutagent/sdk": "0.5.4",
|
|
46
46
|
"chalk": "^5.3.0",
|
|
47
47
|
"commander": "^12.1.0",
|
|
48
48
|
"cosmiconfig": "^9.0.0",
|
|
49
49
|
"open": "11.0.0",
|
|
50
50
|
"ora": "^8.1.0",
|
|
51
|
+
"typescript": "5.9.3",
|
|
51
52
|
"zod": "^4.3.6"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"@types/bun": "1.3.9",
|
|
56
57
|
"@types/node": "^22.7.0",
|
|
57
58
|
"eslint-formatter-compact": "9.0.1",
|
|
58
|
-
"
|
|
59
|
+
"@mutagent/agents": "0.1.0-alpha.0"
|
|
59
60
|
},
|
|
60
61
|
"engines": {
|
|
61
62
|
"bun": ">=1.1.0",
|