@moxt-ai/mobius 0.0.61 → 0.0.62
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/acp/session-config/session-config-protocol.d.ts.map +1 -1
- package/dist/acp/session-config/session-config-protocol.js +21 -6
- package/dist/acp/session-config/session-config-protocol.js.map +1 -1
- package/dist/cli.js +22 -8
- package/dist/cli.js.map +2 -2
- package/dist/index.js +21 -7
- package/dist/index.js.map +2 -2
- package/dist/runtime.js +21 -7
- package/dist/runtime.js.map +2 -2
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -22645,7 +22645,11 @@ var configValueSchema = external_exports.strictObject({
|
|
|
22645
22645
|
groupId: external_exports.string().max(128),
|
|
22646
22646
|
groupName: external_exports.string().max(255),
|
|
22647
22647
|
name: external_exports.string().min(1).max(255),
|
|
22648
|
-
value
|
|
22648
|
+
// ACP types a select value id as any string, and Agents use the empty
|
|
22649
|
+
// id to mean "the provider's own default" — no explicit setting is
|
|
22650
|
+
// sent. Refusing it would drop the whole option, so the id is bounded
|
|
22651
|
+
// by length alone.
|
|
22652
|
+
value: external_exports.string().max(500)
|
|
22649
22653
|
}).readonly();
|
|
22650
22654
|
var sessionConfigOptionSchema = external_exports.strictObject({
|
|
22651
22655
|
booleanValue: external_exports.boolean(),
|
|
@@ -32322,12 +32326,16 @@ function readBoolean(value, fallback = false) {
|
|
|
32322
32326
|
return typeof value === "boolean" ? value : fallback;
|
|
32323
32327
|
}
|
|
32324
32328
|
function normalizeConfigValue(option, groupId = "", groupName = "") {
|
|
32329
|
+
const value = option["value"];
|
|
32330
|
+
if (typeof value !== "string") {
|
|
32331
|
+
return void 0;
|
|
32332
|
+
}
|
|
32325
32333
|
return {
|
|
32326
32334
|
description: truncate2(readString2(option["description"]), 500),
|
|
32327
32335
|
groupId: truncate2(groupId, 128),
|
|
32328
32336
|
groupName: truncate2(groupName, 255),
|
|
32329
|
-
name: truncate2(readString2(option["name"],
|
|
32330
|
-
value: truncate2(
|
|
32337
|
+
name: truncate2(readString2(option["name"], value), 255),
|
|
32338
|
+
value: truncate2(value, 500)
|
|
32331
32339
|
};
|
|
32332
32340
|
}
|
|
32333
32341
|
function normalizeConfigValues(value) {
|
|
@@ -32345,14 +32353,20 @@ function normalizeConfigValues(value) {
|
|
|
32345
32353
|
const groupName = readString2(entry["name"]);
|
|
32346
32354
|
for (const groupedOption of groupedOptions) {
|
|
32347
32355
|
if (isRecord6(groupedOption)) {
|
|
32348
|
-
|
|
32356
|
+
const normalizedValue = normalizeConfigValue(groupedOption, groupId, groupName);
|
|
32357
|
+
if (normalizedValue !== void 0) {
|
|
32358
|
+
normalized.push(normalizedValue);
|
|
32359
|
+
}
|
|
32349
32360
|
}
|
|
32350
32361
|
}
|
|
32351
32362
|
continue;
|
|
32352
32363
|
}
|
|
32353
|
-
|
|
32364
|
+
const normalizedEntry = normalizeConfigValue(entry);
|
|
32365
|
+
if (normalizedEntry !== void 0) {
|
|
32366
|
+
normalized.push(normalizedEntry);
|
|
32367
|
+
}
|
|
32354
32368
|
}
|
|
32355
|
-
return normalized.
|
|
32369
|
+
return normalized.slice(0, 500);
|
|
32356
32370
|
}
|
|
32357
32371
|
function normalizeConfigOptions(value, modes) {
|
|
32358
32372
|
const normalized = [];
|
|
@@ -32383,7 +32397,7 @@ function normalizeConfigOptions(value, modes) {
|
|
|
32383
32397
|
if (option["type"] === "select") {
|
|
32384
32398
|
const values = normalizeConfigValues(option["options"]);
|
|
32385
32399
|
const currentValue = truncate2(readString2(option["currentValue"]), 500);
|
|
32386
|
-
if (
|
|
32400
|
+
if (values.some((entry) => entry.value === currentValue)) {
|
|
32387
32401
|
normalized.push({
|
|
32388
32402
|
booleanValue: false,
|
|
32389
32403
|
category,
|