@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/index.js
CHANGED
|
@@ -19865,7 +19865,11 @@ var configValueSchema = external_exports.strictObject({
|
|
|
19865
19865
|
groupId: external_exports.string().max(128),
|
|
19866
19866
|
groupName: external_exports.string().max(255),
|
|
19867
19867
|
name: external_exports.string().min(1).max(255),
|
|
19868
|
-
value
|
|
19868
|
+
// ACP types a select value id as any string, and Agents use the empty
|
|
19869
|
+
// id to mean "the provider's own default" — no explicit setting is
|
|
19870
|
+
// sent. Refusing it would drop the whole option, so the id is bounded
|
|
19871
|
+
// by length alone.
|
|
19872
|
+
value: external_exports.string().max(500)
|
|
19869
19873
|
}).readonly();
|
|
19870
19874
|
var sessionConfigOptionSchema = external_exports.strictObject({
|
|
19871
19875
|
booleanValue: external_exports.boolean(),
|
|
@@ -30277,12 +30281,16 @@ function readBoolean(value, fallback = false) {
|
|
|
30277
30281
|
return typeof value === "boolean" ? value : fallback;
|
|
30278
30282
|
}
|
|
30279
30283
|
function normalizeConfigValue(option, groupId = "", groupName = "") {
|
|
30284
|
+
const value = option["value"];
|
|
30285
|
+
if (typeof value !== "string") {
|
|
30286
|
+
return void 0;
|
|
30287
|
+
}
|
|
30280
30288
|
return {
|
|
30281
30289
|
description: truncate2(readString2(option["description"]), 500),
|
|
30282
30290
|
groupId: truncate2(groupId, 128),
|
|
30283
30291
|
groupName: truncate2(groupName, 255),
|
|
30284
|
-
name: truncate2(readString2(option["name"],
|
|
30285
|
-
value: truncate2(
|
|
30292
|
+
name: truncate2(readString2(option["name"], value), 255),
|
|
30293
|
+
value: truncate2(value, 500)
|
|
30286
30294
|
};
|
|
30287
30295
|
}
|
|
30288
30296
|
function normalizeConfigValues(value) {
|
|
@@ -30300,14 +30308,20 @@ function normalizeConfigValues(value) {
|
|
|
30300
30308
|
const groupName = readString2(entry["name"]);
|
|
30301
30309
|
for (const groupedOption of groupedOptions) {
|
|
30302
30310
|
if (isRecord4(groupedOption)) {
|
|
30303
|
-
|
|
30311
|
+
const normalizedValue = normalizeConfigValue(groupedOption, groupId, groupName);
|
|
30312
|
+
if (normalizedValue !== void 0) {
|
|
30313
|
+
normalized.push(normalizedValue);
|
|
30314
|
+
}
|
|
30304
30315
|
}
|
|
30305
30316
|
}
|
|
30306
30317
|
continue;
|
|
30307
30318
|
}
|
|
30308
|
-
|
|
30319
|
+
const normalizedEntry = normalizeConfigValue(entry);
|
|
30320
|
+
if (normalizedEntry !== void 0) {
|
|
30321
|
+
normalized.push(normalizedEntry);
|
|
30322
|
+
}
|
|
30309
30323
|
}
|
|
30310
|
-
return normalized.
|
|
30324
|
+
return normalized.slice(0, 500);
|
|
30311
30325
|
}
|
|
30312
30326
|
function normalizeConfigOptions(value, modes) {
|
|
30313
30327
|
const normalized = [];
|
|
@@ -30338,7 +30352,7 @@ function normalizeConfigOptions(value, modes) {
|
|
|
30338
30352
|
if (option["type"] === "select") {
|
|
30339
30353
|
const values = normalizeConfigValues(option["options"]);
|
|
30340
30354
|
const currentValue = truncate2(readString2(option["currentValue"]), 500);
|
|
30341
|
-
if (
|
|
30355
|
+
if (values.some((entry) => entry.value === currentValue)) {
|
|
30342
30356
|
normalized.push({
|
|
30343
30357
|
booleanValue: false,
|
|
30344
30358
|
category,
|