@mutagent/cli 0.2.30 → 0.2.32
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 +75 -4
- package/package.json +2 -2
package/dist/bin/cli.js
CHANGED
|
@@ -22284,6 +22284,25 @@ var harnessProviderIdSchema = z2.string().min(1).max(100).regex(/^[a-zA-Z0-9][a-
|
|
|
22284
22284
|
var api = z2.enum(["openai-completions", "openai-responses", "anthropic-messages"]);
|
|
22285
22285
|
var rate = z2.number().nonnegative().max(1e9);
|
|
22286
22286
|
var cost = z2.object({ input: rate, output: rate, cacheRead: rate, cacheWrite: rate }).strict();
|
|
22287
|
+
var count = z2.number().int().min(1).max(1e9);
|
|
22288
|
+
var inputLimits = z2.object({
|
|
22289
|
+
maxRequestBytes: count.optional(),
|
|
22290
|
+
images: z2.object({
|
|
22291
|
+
resize: z2.object({
|
|
22292
|
+
maxWidth: count.optional(),
|
|
22293
|
+
maxHeight: count.optional(),
|
|
22294
|
+
maxBytes: count.optional(),
|
|
22295
|
+
jpegQuality: z2.number().int().min(1).max(100).optional()
|
|
22296
|
+
}).strict().optional(),
|
|
22297
|
+
maxPerMessage: count.optional(),
|
|
22298
|
+
maxPerRequest: count.optional()
|
|
22299
|
+
}).strict().optional()
|
|
22300
|
+
}).strict();
|
|
22301
|
+
var promptCache = z2.object({
|
|
22302
|
+
short: z2.number().positive().max(1e9).optional(),
|
|
22303
|
+
long: z2.number().positive().max(1e9).optional()
|
|
22304
|
+
}).strict();
|
|
22305
|
+
var fallbackModel = z2.object({ provider: harnessProviderIdSchema, model: safeId, cost }).strict();
|
|
22287
22306
|
var compat = z2.object({
|
|
22288
22307
|
supportsStore: z2.boolean().optional(),
|
|
22289
22308
|
supportsDeveloperRole: z2.boolean().optional(),
|
|
@@ -22296,7 +22315,6 @@ var compat = z2.object({
|
|
|
22296
22315
|
supportsStrictMode: z2.boolean().optional(),
|
|
22297
22316
|
supportsTemperature: z2.boolean().optional(),
|
|
22298
22317
|
supportsStrictTools: z2.boolean().optional(),
|
|
22299
|
-
supportsToolReferences: z2.boolean().optional(),
|
|
22300
22318
|
supportsEagerToolInputStreaming: z2.boolean().optional(),
|
|
22301
22319
|
supportsCacheControlOnTools: z2.boolean().optional(),
|
|
22302
22320
|
forceAdaptiveThinking: z2.boolean().optional(),
|
|
@@ -22314,7 +22332,16 @@ var compat = z2.object({
|
|
|
22314
22332
|
"qwen-chat-template",
|
|
22315
22333
|
"string-thinking",
|
|
22316
22334
|
"ant-ling"
|
|
22317
|
-
]).optional()
|
|
22335
|
+
]).optional(),
|
|
22336
|
+
supportsFinishReason: z2.boolean().optional(),
|
|
22337
|
+
supportsMaxOutputTokens: z2.boolean().optional(),
|
|
22338
|
+
supportsMidConvoEffort: z2.boolean().optional(),
|
|
22339
|
+
vllmPriority: z2.number().min(-1e9).max(1e9).optional(),
|
|
22340
|
+
allowedFallbackModels: z2.array(fallbackModel).max(3).optional(),
|
|
22341
|
+
supportsToolReferences: z2.boolean().optional(),
|
|
22342
|
+
supportsToolSearch: z2.boolean().optional(),
|
|
22343
|
+
supportsAdditionalTools: z2.boolean().optional(),
|
|
22344
|
+
deferredToolsMode: z2.enum(["kimi"]).optional()
|
|
22318
22345
|
}).strict();
|
|
22319
22346
|
var thinkingLevelMap = z2.object({
|
|
22320
22347
|
off: safeName.nullable().optional(),
|
|
@@ -22331,6 +22358,8 @@ var capabilities = {
|
|
|
22331
22358
|
input: z2.array(z2.enum(["text", "image"])).min(1).max(2).optional(),
|
|
22332
22359
|
contextWindow: z2.number().int().positive().max(1e9).optional(),
|
|
22333
22360
|
maxTokens: z2.number().int().positive().max(1e9).optional(),
|
|
22361
|
+
inputLimits: inputLimits.optional(),
|
|
22362
|
+
promptCache: promptCache.optional(),
|
|
22334
22363
|
thinkingLevelMap: thinkingLevelMap.optional(),
|
|
22335
22364
|
compat: compat.optional()
|
|
22336
22365
|
};
|
|
@@ -22385,6 +22414,48 @@ function parseHarnessModelConfig(value) {
|
|
|
22385
22414
|
return;
|
|
22386
22415
|
}
|
|
22387
22416
|
}
|
|
22417
|
+
var SHOWN_FIELD = /^[a-z][A-Za-z]{0,47}$/;
|
|
22418
|
+
function fieldPath(path, secrets) {
|
|
22419
|
+
const known = secrets.filter((secret) => secret !== "");
|
|
22420
|
+
let label = "";
|
|
22421
|
+
path.forEach((segment, index) => {
|
|
22422
|
+
if (typeof segment === "number") {
|
|
22423
|
+
label += `[${String(segment)}]`;
|
|
22424
|
+
return;
|
|
22425
|
+
}
|
|
22426
|
+
const name = String(segment);
|
|
22427
|
+
const shown = SHOWN_FIELD.test(name) && !known.some((secret) => name.includes(secret) || secret.includes(name));
|
|
22428
|
+
const part = path[index - 1] === "modelOverrides" ? "<model id>" : shown ? name : "<withheld>";
|
|
22429
|
+
label += label === "" ? part : `.${part}`;
|
|
22430
|
+
});
|
|
22431
|
+
return label === "" ? "(root)" : label;
|
|
22432
|
+
}
|
|
22433
|
+
function describeHarnessConfigRefusal(value, secrets = []) {
|
|
22434
|
+
let text;
|
|
22435
|
+
try {
|
|
22436
|
+
text = JSON.stringify(value, (key, member) => {
|
|
22437
|
+
if (key === "prototype" || Object.hasOwn(Object.prototype, key))
|
|
22438
|
+
throw new Error("Unsafe configuration field");
|
|
22439
|
+
return member;
|
|
22440
|
+
});
|
|
22441
|
+
} catch {
|
|
22442
|
+
return "unsupported models.json field name (__proto__, constructor or prototype); remove it";
|
|
22443
|
+
}
|
|
22444
|
+
if (text !== undefined && Buffer.byteLength(text, "utf8") > HARNESS_CONFIG_MAX_BYTES) {
|
|
22445
|
+
return "unsupported models.json configuration: larger than 64 KiB; declare fewer models or overrides";
|
|
22446
|
+
}
|
|
22447
|
+
const parsed = harnessModelConfigSchema.safeParse(value);
|
|
22448
|
+
if (parsed.success)
|
|
22449
|
+
return;
|
|
22450
|
+
for (const issue of parsed.error.issues) {
|
|
22451
|
+
if (issue.code !== "unrecognized_keys")
|
|
22452
|
+
continue;
|
|
22453
|
+
const field = fieldPath([...issue.path, issue.keys[0] ?? ""], secrets);
|
|
22454
|
+
return `unsupported models.json field "${field}": not a pi 0.84.2 or 1.0.0 setting this transport ` + "carries (headers, companion credentials and nested endpoints never are); fix the spelling or remove it";
|
|
22455
|
+
}
|
|
22456
|
+
const field = fieldPath(parsed.error.issues[0]?.path ?? [], secrets);
|
|
22457
|
+
return `unsupported models.json value at "${field}": wrong type, out of bounds, or a duplicate or ` + "invalid id; correct it against the pi models.json schema";
|
|
22458
|
+
}
|
|
22388
22459
|
|
|
22389
22460
|
// src/lib/harness-providers.ts
|
|
22390
22461
|
var HARNESS_PROVIDER_METADATA_KEY = "harnessProvider";
|
|
@@ -22592,7 +22663,7 @@ function readLocalProviderStore(agentDir) {
|
|
|
22592
22663
|
const { apiKey: _key, baseUrl: _url, ...native } = raw;
|
|
22593
22664
|
const harnessConfig = parseHarnessModelConfig(native);
|
|
22594
22665
|
const builtin = HARNESS_CATALOG_IDS.includes(name) || Object.hasOwn(HARNESS_CUSTOM_ENDPOINTS, name);
|
|
22595
|
-
let unsupported = harnessConfig === undefined ?
|
|
22666
|
+
let unsupported = harnessConfig === undefined ? describeHarnessConfigRefusal(native, [...secrets]) : undefined;
|
|
22596
22667
|
if (baseUrl) {
|
|
22597
22668
|
try {
|
|
22598
22669
|
const url = new URL(baseUrl);
|
|
@@ -38029,4 +38100,4 @@ if (process.env.CLI_VERSION) {
|
|
|
38029
38100
|
}
|
|
38030
38101
|
runCli(process.argv.slice(2), cliVersion);
|
|
38031
38102
|
|
|
38032
|
-
//# debugId=
|
|
38103
|
+
//# debugId=2DFBE80115EDC82B64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutagent/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.32",
|
|
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.16",
|
|
49
49
|
"@sinclair/typebox": "^0.34.0",
|
|
50
50
|
"chalk": "^5.3.0",
|
|
51
51
|
"commander": "^12.1.0",
|