@mutagent/cli 0.2.11 → 0.2.13
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/agent-build-worker.js +263 -263
- package/dist/bin/cli.js +4155 -4771
- package/dist/index.js +28 -70
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
2
|
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
-
for (let key of __getOwnPropNames(mod))
|
|
11
|
-
if (!__hasOwnProp.call(to, key))
|
|
12
|
-
__defProp(to, key, {
|
|
13
|
-
get: () => mod[key],
|
|
14
|
-
enumerable: true
|
|
15
|
-
});
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
3
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
4
|
+
var __returnValue = (v) => v;
|
|
5
|
+
function __exportSetter(name, newValue) {
|
|
6
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
7
|
+
}
|
|
19
8
|
var __export = (target, all) => {
|
|
20
9
|
for (var name in all)
|
|
21
10
|
__defProp(target, name, {
|
|
22
11
|
get: all[name],
|
|
23
12
|
enumerable: true,
|
|
24
13
|
configurable: true,
|
|
25
|
-
set: (
|
|
14
|
+
set: __exportSetter.bind(all, name)
|
|
26
15
|
});
|
|
27
16
|
};
|
|
28
|
-
var __esm = (fn, res) => () =>
|
|
17
|
+
var __esm = (fn, res, err) => () => {
|
|
18
|
+
if (fn)
|
|
19
|
+
try {
|
|
20
|
+
res = fn(fn = 0);
|
|
21
|
+
} catch (e) {
|
|
22
|
+
err = [e];
|
|
23
|
+
}
|
|
24
|
+
if (err)
|
|
25
|
+
throw err[0];
|
|
26
|
+
return res;
|
|
27
|
+
};
|
|
29
28
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
30
29
|
|
|
31
30
|
// src/lib/secure-file.ts
|
|
@@ -256,18 +255,6 @@ var init_known_secrets = __esm(() => {
|
|
|
256
255
|
});
|
|
257
256
|
|
|
258
257
|
// src/lib/config.ts
|
|
259
|
-
var exports_config = {};
|
|
260
|
-
__export(exports_config, {
|
|
261
|
-
setWorkspaceSelection: () => setWorkspaceSelection,
|
|
262
|
-
saveFullCredentials: () => saveFullCredentials,
|
|
263
|
-
saveCredentials: () => saveCredentials,
|
|
264
|
-
recordKeyScope: () => recordKeyScope,
|
|
265
|
-
loadConfig: () => loadConfig,
|
|
266
|
-
hasCredentials: () => hasCredentials,
|
|
267
|
-
getApiKey: () => getApiKey,
|
|
268
|
-
envKeyReplacesFile: () => envKeyReplacesFile,
|
|
269
|
-
clearCredentials: () => clearCredentials
|
|
270
|
-
});
|
|
271
258
|
import { cosmiconfigSync } from "cosmiconfig";
|
|
272
259
|
import { z } from "zod";
|
|
273
260
|
import { homedir } from "os";
|
|
@@ -1057,32 +1044,6 @@ var init_key_check = __esm(() => {
|
|
|
1057
1044
|
});
|
|
1058
1045
|
|
|
1059
1046
|
// src/lib/organization-scope.ts
|
|
1060
|
-
var exports_organization_scope = {};
|
|
1061
|
-
__export(exports_organization_scope, {
|
|
1062
|
-
workspaceDenied: () => workspaceDenied,
|
|
1063
|
-
unreachableServerError: () => unreachableServerError,
|
|
1064
|
-
tenancyHeaders: () => tenancyHeaders,
|
|
1065
|
-
tenancyFailure: () => tenancyFailure,
|
|
1066
|
-
setWorkspaceFlag: () => setWorkspaceFlag,
|
|
1067
|
-
setOrgAssertion: () => setOrgAssertion,
|
|
1068
|
-
resolveKeyTenancy: () => resolveKeyTenancy,
|
|
1069
|
-
resetKeyScopeCache: () => resetKeyScopeCache,
|
|
1070
|
-
otherOrganizationHint: () => otherOrganizationHint,
|
|
1071
|
-
orgMismatch: () => orgMismatch,
|
|
1072
|
-
noWorkspaceSelected: () => noWorkspaceSelected,
|
|
1073
|
-
matchesOrganization: () => matchesOrganization,
|
|
1074
|
-
looksLikeWorkspaceId: () => looksLikeWorkspaceId,
|
|
1075
|
-
listKeyWorkspaces: () => listKeyWorkspaces,
|
|
1076
|
-
findWorkspace: () => findWorkspace,
|
|
1077
|
-
fetchOrganizations: () => fetchOrganizations,
|
|
1078
|
-
fetchKeySelf: () => fetchKeySelf,
|
|
1079
|
-
envKeyHasNoSelection: () => envKeyHasNoSelection,
|
|
1080
|
-
endpointOf: () => endpointOf,
|
|
1081
|
-
deadKeyError: () => deadKeyError,
|
|
1082
|
-
configTenancyHeaders: () => configTenancyHeaders,
|
|
1083
|
-
TenancyError: () => TenancyError,
|
|
1084
|
-
TENANCY_DENIED: () => TENANCY_DENIED
|
|
1085
|
-
});
|
|
1086
1047
|
function looksLikeWorkspaceId(value) {
|
|
1087
1048
|
return UUID_PATTERN.test(value);
|
|
1088
1049
|
}
|
|
@@ -1241,9 +1202,6 @@ ${apiKey}`;
|
|
|
1241
1202
|
probe.catch(() => keySelfProbes.delete(cacheKey));
|
|
1242
1203
|
return probe;
|
|
1243
1204
|
}
|
|
1244
|
-
function resetKeyScopeCache() {
|
|
1245
|
-
keySelfProbes.clear();
|
|
1246
|
-
}
|
|
1247
1205
|
async function readKeyScope(apiKey, endpoint, fromFile) {
|
|
1248
1206
|
try {
|
|
1249
1207
|
const self = await fetchKeySelf(apiKey, endpoint);
|
|
@@ -1863,7 +1821,7 @@ class SDKClientWrapper {
|
|
|
1863
1821
|
registerSecretFields(data.credentialFields);
|
|
1864
1822
|
try {
|
|
1865
1823
|
if (data.metadata !== undefined || data.supportedModels !== undefined) {
|
|
1866
|
-
const
|
|
1824
|
+
const response = await this.request(`/api/providers/${encodeURIComponent(id)}`, {
|
|
1867
1825
|
method: "PATCH",
|
|
1868
1826
|
body: JSON.stringify({
|
|
1869
1827
|
name: data.name,
|
|
@@ -1876,7 +1834,7 @@ class SDKClientWrapper {
|
|
|
1876
1834
|
supportedModels: data.supportedModels
|
|
1877
1835
|
})
|
|
1878
1836
|
});
|
|
1879
|
-
return scrubKnownSuccessDeep({ ...
|
|
1837
|
+
return scrubKnownSuccessDeep({ ...response, workspaceId });
|
|
1880
1838
|
}
|
|
1881
1839
|
const response = await this.sdk.llmProviders.updateProviderConfig({
|
|
1882
1840
|
id,
|
|
@@ -1952,16 +1910,16 @@ init_output();
|
|
|
1952
1910
|
init_errors();
|
|
1953
1911
|
var version = "0.1.0";
|
|
1954
1912
|
export {
|
|
1955
|
-
|
|
1956
|
-
validateApiKey,
|
|
1957
|
-
saveCredentials,
|
|
1958
|
-
loadConfig,
|
|
1959
|
-
getSDKClient,
|
|
1960
|
-
clearCredentials,
|
|
1961
|
-
OutputFormatter,
|
|
1962
|
-
MutagentError,
|
|
1913
|
+
ApiError,
|
|
1963
1914
|
AuthenticationError,
|
|
1964
|
-
|
|
1915
|
+
MutagentError,
|
|
1916
|
+
OutputFormatter,
|
|
1917
|
+
clearCredentials,
|
|
1918
|
+
getSDKClient,
|
|
1919
|
+
loadConfig,
|
|
1920
|
+
saveCredentials,
|
|
1921
|
+
validateApiKey,
|
|
1922
|
+
version
|
|
1965
1923
|
};
|
|
1966
1924
|
|
|
1967
|
-
//# debugId=
|
|
1925
|
+
//# debugId=4CBE15031C5FFF4664756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutagent/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
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": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "^8.7.2",
|
|
48
|
-
"@mutagent/sdk": "0.8.
|
|
48
|
+
"@mutagent/sdk": "0.8.6",
|
|
49
49
|
"@sinclair/typebox": "^0.34.0",
|
|
50
50
|
"chalk": "^5.3.0",
|
|
51
51
|
"commander": "^12.1.0",
|