@mutagent/cli 0.1.384 → 0.1.386
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/bin/cli.js +9 -2
- package/dist/index.js +9 -2
- package/package.json +2 -2
package/dist/bin/cli.js
CHANGED
|
@@ -16809,9 +16809,14 @@ function matchesOrganization(value2, org) {
|
|
|
16809
16809
|
return true;
|
|
16810
16810
|
return org.name !== undefined && value2.toLowerCase() === org.name.toLowerCase();
|
|
16811
16811
|
}
|
|
16812
|
+
function shellQuote(value2) {
|
|
16813
|
+
if (/^[A-Za-z0-9_-]+$/.test(value2))
|
|
16814
|
+
return value2;
|
|
16815
|
+
return `'${value2.replace(/'/g, `'\\''`)}'`;
|
|
16816
|
+
}
|
|
16812
16817
|
function orgMismatch(value2, org) {
|
|
16813
16818
|
const shown = org.slug ? `${org.name} (${org.slug})` : org.name;
|
|
16814
|
-
return new TenancyError("ORG_MISMATCH", `Your key is for ${shown}.`, `Run: mutagent login --org ${value2}`);
|
|
16819
|
+
return new TenancyError("ORG_MISMATCH", `Your key is for ${shown}.`, `Run: mutagent login --org ${shellQuote(value2)}`);
|
|
16815
16820
|
}
|
|
16816
16821
|
function otherOrganizationHint(wanted, keyOrg, orgs) {
|
|
16817
16822
|
const others = orgs.filter((o) => o.id !== keyOrg?.id);
|
|
@@ -17184,6 +17189,8 @@ class SDKClientWrapper {
|
|
|
17184
17189
|
});
|
|
17185
17190
|
}
|
|
17186
17191
|
handleError(error3) {
|
|
17192
|
+
if (error3 instanceof MutagentError)
|
|
17193
|
+
throw error3;
|
|
17187
17194
|
if (error3 instanceof Error && SDK_TRANSPORT_ERRORS.has(error3.name)) {
|
|
17188
17195
|
throw unreachableServerError(this.endpoint);
|
|
17189
17196
|
}
|
|
@@ -29649,4 +29656,4 @@ if (isAgentInvocation(rawArgs)) {
|
|
|
29649
29656
|
program.parse(argvForCommander, { from: "user" });
|
|
29650
29657
|
}
|
|
29651
29658
|
|
|
29652
|
-
//# debugId=
|
|
29659
|
+
//# debugId=E046D4F47E19C00364756E2164756E21
|
package/dist/index.js
CHANGED
|
@@ -734,9 +734,14 @@ function matchesOrganization(value, org) {
|
|
|
734
734
|
return true;
|
|
735
735
|
return org.name !== undefined && value.toLowerCase() === org.name.toLowerCase();
|
|
736
736
|
}
|
|
737
|
+
function shellQuote(value) {
|
|
738
|
+
if (/^[A-Za-z0-9_-]+$/.test(value))
|
|
739
|
+
return value;
|
|
740
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
741
|
+
}
|
|
737
742
|
function orgMismatch(value, org) {
|
|
738
743
|
const shown = org.slug ? `${org.name} (${org.slug})` : org.name;
|
|
739
|
-
return new TenancyError("ORG_MISMATCH", `Your key is for ${shown}.`, `Run: mutagent login --org ${value}`);
|
|
744
|
+
return new TenancyError("ORG_MISMATCH", `Your key is for ${shown}.`, `Run: mutagent login --org ${shellQuote(value)}`);
|
|
740
745
|
}
|
|
741
746
|
function otherOrganizationHint(wanted, keyOrg, orgs) {
|
|
742
747
|
const others = orgs.filter((o) => o.id !== keyOrg?.id);
|
|
@@ -1109,6 +1114,8 @@ class SDKClientWrapper {
|
|
|
1109
1114
|
});
|
|
1110
1115
|
}
|
|
1111
1116
|
handleError(error) {
|
|
1117
|
+
if (error instanceof MutagentError)
|
|
1118
|
+
throw error;
|
|
1112
1119
|
if (error instanceof Error && SDK_TRANSPORT_ERRORS.has(error.name)) {
|
|
1113
1120
|
throw unreachableServerError(this.endpoint);
|
|
1114
1121
|
}
|
|
@@ -1692,4 +1699,4 @@ export {
|
|
|
1692
1699
|
ApiError
|
|
1693
1700
|
};
|
|
1694
1701
|
|
|
1695
|
-
//# debugId=
|
|
1702
|
+
//# debugId=BEB715BD5D61FB5564756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutagent/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.386",
|
|
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": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@inquirer/prompts": "^8.7.2",
|
|
45
|
-
"@mutagent/sdk": "0.6.
|
|
45
|
+
"@mutagent/sdk": "0.6.17",
|
|
46
46
|
"chalk": "^5.3.0",
|
|
47
47
|
"commander": "^12.1.0",
|
|
48
48
|
"cosmiconfig": "^9.0.0",
|