@ai-matrx/agents 0.59.189 → 0.59.191
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/CHANGELOG.md +14 -2
- package/dist/content-transfer/index.cjs +1 -1
- package/dist/content-transfer/index.js +1 -1
- package/dist/content-transfer/react/index.cjs +1 -1
- package/dist/content-transfer/react/index.js +1 -1
- package/dist/mandates/index.cjs +4 -4
- package/dist/mandates/index.d.cts +6 -6
- package/dist/mandates/index.d.ts +6 -6
- package/dist/mandates/index.js +4 -4
- package/dist/settings/index.cjs +85 -1
- package/dist/settings/index.d.cts +159 -1
- package/dist/settings/index.d.ts +159 -1
- package/dist/settings/index.js +85 -1
- package/dist/settings/react/index.cjs +541 -157
- package/dist/settings/react/index.d.cts +208 -22
- package/dist/settings/react/index.d.ts +208 -22
- package/dist/settings/react/index.js +540 -157
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.59.191
|
|
4
|
+
### THE model-settings panel (2026-10-21)
|
|
5
|
+
|
|
6
|
+
- Added `./settings/react` `ModelSettingsPanel`, `ExtraSettingRow`, `SettingRowFrame`, `SettingsGroupSection`, `SettingRowLabel`, `formatSettingValue`; `./settings` `SettingsWriteTarget` / `CapabilitiesWriteTarget` / `SettingRowRead`, `isOffValue` / `offValueFor` / `settingStateOf` / `withSettingState` / `ENUM_OFF_VALUE`, `isUnsetChoice` / `AUTO_VALUE` / `AUTO_MEANS_UNSET_KEYS`, `startingValueFor`.
|
|
7
|
+
- Removed `SettingControlInput` props `size` and `explicitState`; `InputCapabilitiesEditor` prop `variant` (and `overriddenKeys` is now `changedKeys`); `ENUM_OFF_VALUE` is exported from `./settings` only.
|
|
8
|
+
- **Consumer action:** render settings through `ModelSettingsPanel` with a `SettingsWriteTarget` (never `SettingControlInput` in a hand-built row); import the auto rule from `@ai-matrx/agents/settings` (the `@ai-matrx/chat/.../instance-model-overrides/auto-means-unset` module is gone); matrx-frontend deletes its `settings-management/setting-state.ts` and imports it from `@ai-matrx/agents/settings`.
|
|
9
|
+
|
|
10
|
+
## 0.59.190
|
|
11
|
+
|
|
12
|
+
Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff 950fa97924 db501b9913 -- apps/shared/matrx-agents/src`
|
|
13
|
+
has no shipped-source changes outside tests, fixtures and docs). No consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.59.189
|
|
4
16
|
|
|
5
|
-
|
|
6
|
-
|
|
17
|
+
Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff 27c653019f 950fa97924 -- apps/shared/matrx-agents/src`
|
|
18
|
+
has no shipped-source changes outside tests, fixtures and docs). No consumer action required.
|
|
7
19
|
|
|
8
20
|
## 0.59.188
|
|
9
21
|
|
|
@@ -703,7 +703,7 @@ var MANDATE_KEYS = {
|
|
|
703
703
|
*/
|
|
704
704
|
brand_discovery__offering_roles: "brand_discovery.offering_roles",
|
|
705
705
|
/**
|
|
706
|
-
* @deprecated retiring since 0.59.
|
|
706
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
707
707
|
* aidream. It leaves this union once no snapshot within the last
|
|
708
708
|
* 3 published versions still carries it as active.
|
|
709
709
|
*/
|
|
@@ -680,7 +680,7 @@ var MANDATE_KEYS = {
|
|
|
680
680
|
*/
|
|
681
681
|
brand_discovery__offering_roles: "brand_discovery.offering_roles",
|
|
682
682
|
/**
|
|
683
|
-
* @deprecated retiring since 0.59.
|
|
683
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
684
684
|
* aidream. It leaves this union once no snapshot within the last
|
|
685
685
|
* 3 published versions still carries it as active.
|
|
686
686
|
*/
|
|
@@ -656,7 +656,7 @@ var MANDATE_KEYS = {
|
|
|
656
656
|
*/
|
|
657
657
|
brand_discovery__offering_roles: "brand_discovery.offering_roles",
|
|
658
658
|
/**
|
|
659
|
-
* @deprecated retiring since 0.59.
|
|
659
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
660
660
|
* aidream. It leaves this union once no snapshot within the last
|
|
661
661
|
* 3 published versions still carries it as active.
|
|
662
662
|
*/
|
|
@@ -628,7 +628,7 @@ var MANDATE_KEYS = {
|
|
|
628
628
|
*/
|
|
629
629
|
brand_discovery__offering_roles: "brand_discovery.offering_roles",
|
|
630
630
|
/**
|
|
631
|
-
* @deprecated retiring since 0.59.
|
|
631
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
632
632
|
* aidream. It leaves this union once no snapshot within the last
|
|
633
633
|
* 3 published versions still carries it as active.
|
|
634
634
|
*/
|
package/dist/mandates/index.cjs
CHANGED
|
@@ -47,9 +47,9 @@ module.exports = __toCommonJS(mandates_exports);
|
|
|
47
47
|
|
|
48
48
|
// mandates/keys.generated.ts
|
|
49
49
|
var MANDATE_KEYS_META = {
|
|
50
|
-
aidreamRevision: "
|
|
50
|
+
aidreamRevision: "89bae1f6f7736d73868dd44406d583d8a4e1ee49",
|
|
51
51
|
generatorVersion: "1.0.0",
|
|
52
|
-
packageVersion: "0.59.
|
|
52
|
+
packageVersion: "0.59.191",
|
|
53
53
|
retireWindow: 3
|
|
54
54
|
};
|
|
55
55
|
var MANDATE_KEYS = {
|
|
@@ -666,7 +666,7 @@ var MANDATE_KEYS = {
|
|
|
666
666
|
*/
|
|
667
667
|
brand_discovery__offering_roles: "brand_discovery.offering_roles",
|
|
668
668
|
/**
|
|
669
|
-
* @deprecated retiring since 0.59.
|
|
669
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
670
670
|
* aidream. It leaves this union once no snapshot within the last
|
|
671
671
|
* 3 published versions still carries it as active.
|
|
672
672
|
*/
|
|
@@ -693,7 +693,7 @@ var MANDATE_KEYS = {
|
|
|
693
693
|
var ALL_MANDATE_KEYS = Object.values(MANDATE_KEYS);
|
|
694
694
|
var RETIRING_MANDATE_KEYS = {
|
|
695
695
|
"brand_discovery.offering_roles": "0.59.0",
|
|
696
|
-
"coding_session.managed_translation_reference": "0.59.
|
|
696
|
+
"coding_session.managed_translation_reference": "0.59.191",
|
|
697
697
|
"pdf.content_cleaner": "0.59.0",
|
|
698
698
|
"sms.owner_beta": "0.59.0",
|
|
699
699
|
"voice.owner_beta": "0.59.0"
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* from the IN-PROCESS mandate declarations — the same `declared_mandates()` the
|
|
7
7
|
* boot sync writes to the database from. There is no hand list anywhere.
|
|
8
8
|
*
|
|
9
|
-
* aidream revision:
|
|
9
|
+
* aidream revision: 89bae1f6f7736d73868dd44406d583d8a4e1ee49
|
|
10
10
|
* generator version: 1.0.0
|
|
11
|
-
* package version: 0.59.
|
|
11
|
+
* package version: 0.59.191
|
|
12
12
|
* active keys: 606
|
|
13
13
|
* retiring keys: 5
|
|
14
14
|
*
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*/
|
|
20
20
|
/** Where this module came from — surfaced so a report can name the exact build. */
|
|
21
21
|
declare const MANDATE_KEYS_META: {
|
|
22
|
-
readonly aidreamRevision: "
|
|
22
|
+
readonly aidreamRevision: "89bae1f6f7736d73868dd44406d583d8a4e1ee49";
|
|
23
23
|
readonly generatorVersion: "1.0.0";
|
|
24
|
-
readonly packageVersion: "0.59.
|
|
24
|
+
readonly packageVersion: "0.59.191";
|
|
25
25
|
readonly retireWindow: 3;
|
|
26
26
|
};
|
|
27
27
|
/** Every declared mandate key, by THE IDENTIFIER RULE. */
|
|
@@ -639,7 +639,7 @@ declare const MANDATE_KEYS: {
|
|
|
639
639
|
*/
|
|
640
640
|
readonly brand_discovery__offering_roles: "brand_discovery.offering_roles";
|
|
641
641
|
/**
|
|
642
|
-
* @deprecated retiring since 0.59.
|
|
642
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
643
643
|
* aidream. It leaves this union once no snapshot within the last
|
|
644
644
|
* 3 published versions still carries it as active.
|
|
645
645
|
*/
|
|
@@ -670,7 +670,7 @@ declare const ALL_MANDATE_KEYS: readonly MandateKey[];
|
|
|
670
670
|
/** Keys still in the union but no longer declared (two-phase retire, phase 1). */
|
|
671
671
|
declare const RETIRING_MANDATE_KEYS: {
|
|
672
672
|
readonly "brand_discovery.offering_roles": "0.59.0";
|
|
673
|
-
readonly "coding_session.managed_translation_reference": "0.59.
|
|
673
|
+
readonly "coding_session.managed_translation_reference": "0.59.191";
|
|
674
674
|
readonly "pdf.content_cleaner": "0.59.0";
|
|
675
675
|
readonly "sms.owner_beta": "0.59.0";
|
|
676
676
|
readonly "voice.owner_beta": "0.59.0";
|
package/dist/mandates/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* from the IN-PROCESS mandate declarations — the same `declared_mandates()` the
|
|
7
7
|
* boot sync writes to the database from. There is no hand list anywhere.
|
|
8
8
|
*
|
|
9
|
-
* aidream revision:
|
|
9
|
+
* aidream revision: 89bae1f6f7736d73868dd44406d583d8a4e1ee49
|
|
10
10
|
* generator version: 1.0.0
|
|
11
|
-
* package version: 0.59.
|
|
11
|
+
* package version: 0.59.191
|
|
12
12
|
* active keys: 606
|
|
13
13
|
* retiring keys: 5
|
|
14
14
|
*
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*/
|
|
20
20
|
/** Where this module came from — surfaced so a report can name the exact build. */
|
|
21
21
|
declare const MANDATE_KEYS_META: {
|
|
22
|
-
readonly aidreamRevision: "
|
|
22
|
+
readonly aidreamRevision: "89bae1f6f7736d73868dd44406d583d8a4e1ee49";
|
|
23
23
|
readonly generatorVersion: "1.0.0";
|
|
24
|
-
readonly packageVersion: "0.59.
|
|
24
|
+
readonly packageVersion: "0.59.191";
|
|
25
25
|
readonly retireWindow: 3;
|
|
26
26
|
};
|
|
27
27
|
/** Every declared mandate key, by THE IDENTIFIER RULE. */
|
|
@@ -639,7 +639,7 @@ declare const MANDATE_KEYS: {
|
|
|
639
639
|
*/
|
|
640
640
|
readonly brand_discovery__offering_roles: "brand_discovery.offering_roles";
|
|
641
641
|
/**
|
|
642
|
-
* @deprecated retiring since 0.59.
|
|
642
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
643
643
|
* aidream. It leaves this union once no snapshot within the last
|
|
644
644
|
* 3 published versions still carries it as active.
|
|
645
645
|
*/
|
|
@@ -670,7 +670,7 @@ declare const ALL_MANDATE_KEYS: readonly MandateKey[];
|
|
|
670
670
|
/** Keys still in the union but no longer declared (two-phase retire, phase 1). */
|
|
671
671
|
declare const RETIRING_MANDATE_KEYS: {
|
|
672
672
|
readonly "brand_discovery.offering_roles": "0.59.0";
|
|
673
|
-
readonly "coding_session.managed_translation_reference": "0.59.
|
|
673
|
+
readonly "coding_session.managed_translation_reference": "0.59.191";
|
|
674
674
|
readonly "pdf.content_cleaner": "0.59.0";
|
|
675
675
|
readonly "sms.owner_beta": "0.59.0";
|
|
676
676
|
readonly "voice.owner_beta": "0.59.0";
|
package/dist/mandates/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// mandates/keys.generated.ts
|
|
2
2
|
var MANDATE_KEYS_META = {
|
|
3
|
-
aidreamRevision: "
|
|
3
|
+
aidreamRevision: "89bae1f6f7736d73868dd44406d583d8a4e1ee49",
|
|
4
4
|
generatorVersion: "1.0.0",
|
|
5
|
-
packageVersion: "0.59.
|
|
5
|
+
packageVersion: "0.59.191",
|
|
6
6
|
retireWindow: 3
|
|
7
7
|
};
|
|
8
8
|
var MANDATE_KEYS = {
|
|
@@ -619,7 +619,7 @@ var MANDATE_KEYS = {
|
|
|
619
619
|
*/
|
|
620
620
|
brand_discovery__offering_roles: "brand_discovery.offering_roles",
|
|
621
621
|
/**
|
|
622
|
-
* @deprecated retiring since 0.59.
|
|
622
|
+
* @deprecated retiring since 0.59.191 — no longer declared in
|
|
623
623
|
* aidream. It leaves this union once no snapshot within the last
|
|
624
624
|
* 3 published versions still carries it as active.
|
|
625
625
|
*/
|
|
@@ -646,7 +646,7 @@ var MANDATE_KEYS = {
|
|
|
646
646
|
var ALL_MANDATE_KEYS = Object.values(MANDATE_KEYS);
|
|
647
647
|
var RETIRING_MANDATE_KEYS = {
|
|
648
648
|
"brand_discovery.offering_roles": "0.59.0",
|
|
649
|
-
"coding_session.managed_translation_reference": "0.59.
|
|
649
|
+
"coding_session.managed_translation_reference": "0.59.191",
|
|
650
650
|
"pdf.content_cleaner": "0.59.0",
|
|
651
651
|
"sms.owner_beta": "0.59.0",
|
|
652
652
|
"voice.owner_beta": "0.59.0"
|
package/dist/settings/index.cjs
CHANGED
|
@@ -20,8 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// settings/index.ts
|
|
21
21
|
var settings_exports = {};
|
|
22
22
|
__export(settings_exports, {
|
|
23
|
+
AUTO_MEANS_UNSET_KEYS: () => AUTO_MEANS_UNSET_KEYS,
|
|
24
|
+
AUTO_VALUE: () => AUTO_VALUE,
|
|
23
25
|
CATALOGUE_KEYS: () => CATALOGUE_KEYS,
|
|
24
26
|
EMPTY_UI_GATES: () => EMPTY_UI_GATES,
|
|
27
|
+
ENUM_OFF_VALUE: () => ENUM_OFF_VALUE,
|
|
25
28
|
PARAM_ALIASES: () => PARAM_ALIASES,
|
|
26
29
|
SETTINGS_CATALOGUE: () => SETTINGS_CATALOGUE,
|
|
27
30
|
UI_GATE_EDITABLE_KEYS: () => UI_GATE_EDITABLE_KEYS,
|
|
@@ -35,9 +38,12 @@ __export(settings_exports, {
|
|
|
35
38
|
extractModelDefaults: () => extractModelDefaults,
|
|
36
39
|
gateEnabled: () => gateEnabled,
|
|
37
40
|
getActionForMode: () => getActionForMode,
|
|
41
|
+
isOffValue: () => isOffValue,
|
|
38
42
|
isUiGateKey: () => isUiGateKey,
|
|
43
|
+
isUnsetChoice: () => isUnsetChoice,
|
|
39
44
|
mergeEffectiveSettings: () => mergeEffectiveSettings,
|
|
40
45
|
mergeVariableValues: () => mergeVariableValues,
|
|
46
|
+
offValueFor: () => offValueFor,
|
|
41
47
|
parseModelControls: () => parseModelControls,
|
|
42
48
|
parseUiGates: () => parseUiGates,
|
|
43
49
|
readApiPayload: () => readApiPayload,
|
|
@@ -49,7 +55,10 @@ __export(settings_exports, {
|
|
|
49
55
|
readPreviewedResolution: () => readPreviewedResolution,
|
|
50
56
|
readSettingsEntry: () => readSettingsEntry,
|
|
51
57
|
resolveConflicts: () => resolveConflicts,
|
|
52
|
-
sanitizeSettings: () => sanitizeSettings
|
|
58
|
+
sanitizeSettings: () => sanitizeSettings,
|
|
59
|
+
settingStateOf: () => settingStateOf,
|
|
60
|
+
startingValueFor: () => startingValueFor,
|
|
61
|
+
withSettingState: () => withSettingState
|
|
53
62
|
});
|
|
54
63
|
module.exports = __toCommonJS(settings_exports);
|
|
55
64
|
|
|
@@ -947,3 +956,78 @@ function readConflictSummary(entry) {
|
|
|
947
956
|
function readEffectiveVariableValues(entry) {
|
|
948
957
|
return entry ? mergeVariableValues(entry.variable_defaults, entry.variable_overrides) : {};
|
|
949
958
|
}
|
|
959
|
+
|
|
960
|
+
// settings/setting-state.ts
|
|
961
|
+
var ENUM_OFF_VALUE = "none";
|
|
962
|
+
function offValueFor(control) {
|
|
963
|
+
if (!control) return void 0;
|
|
964
|
+
if (control.type === "boolean") return false;
|
|
965
|
+
if (control.type === "enum" && control.enum?.includes(ENUM_OFF_VALUE)) {
|
|
966
|
+
return ENUM_OFF_VALUE;
|
|
967
|
+
}
|
|
968
|
+
return void 0;
|
|
969
|
+
}
|
|
970
|
+
function isOffValue(value, control) {
|
|
971
|
+
if (value === false) return true;
|
|
972
|
+
if (value === ENUM_OFF_VALUE) {
|
|
973
|
+
return !control || control.type === "enum";
|
|
974
|
+
}
|
|
975
|
+
return false;
|
|
976
|
+
}
|
|
977
|
+
function settingStateOf(settings, key, control) {
|
|
978
|
+
const value = settings?.[key];
|
|
979
|
+
if (value === void 0 || value === null) return "unset";
|
|
980
|
+
return isOffValue(value, control) ? "off" : "value";
|
|
981
|
+
}
|
|
982
|
+
function withSettingState(settings, key, state, control, value) {
|
|
983
|
+
if (state === "unset") {
|
|
984
|
+
const { [key]: _removed, ...rest } = settings;
|
|
985
|
+
return rest;
|
|
986
|
+
}
|
|
987
|
+
if (state === "off") {
|
|
988
|
+
const off = offValueFor(control);
|
|
989
|
+
if (off === void 0) return settings;
|
|
990
|
+
return { ...settings, [key]: off };
|
|
991
|
+
}
|
|
992
|
+
if (value === void 0 || value === null) {
|
|
993
|
+
const { [key]: _removed, ...rest } = settings;
|
|
994
|
+
return rest;
|
|
995
|
+
}
|
|
996
|
+
return { ...settings, [key]: value };
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
// settings/auto-means-unset.ts
|
|
1000
|
+
var AUTO_VALUE = "auto";
|
|
1001
|
+
var AUTO_MEANS_UNSET_KEYS = /* @__PURE__ */ new Set([
|
|
1002
|
+
"reasoning_effort",
|
|
1003
|
+
"visualization"
|
|
1004
|
+
]);
|
|
1005
|
+
function isUnsetChoice(key, value) {
|
|
1006
|
+
if (value === void 0 || value === null) return true;
|
|
1007
|
+
return value === AUTO_VALUE && AUTO_MEANS_UNSET_KEYS.has(key);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
// settings/starting-value.ts
|
|
1011
|
+
function startingValueFor(key, control) {
|
|
1012
|
+
let value = control.default;
|
|
1013
|
+
if (value === null || value === void 0) {
|
|
1014
|
+
if (control.type === "number" || control.type === "integer") {
|
|
1015
|
+
value = control.min ?? 0;
|
|
1016
|
+
} else if (control.type === "string" || control.type === "string_array") {
|
|
1017
|
+
value = "";
|
|
1018
|
+
} else if (control.type === "boolean") {
|
|
1019
|
+
value = false;
|
|
1020
|
+
} else if (control.type === "enum" && control.enum?.length) {
|
|
1021
|
+
value = control.enum[0];
|
|
1022
|
+
} else if (control.type === "array" || control.type === "object_array") {
|
|
1023
|
+
value = [];
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
if (isUnsetChoice(key, value) && control.type === "enum" && control.enum?.length) {
|
|
1027
|
+
value = control.enum.find((choice) => !isUnsetChoice(key, choice));
|
|
1028
|
+
}
|
|
1029
|
+
if (key === "response_format" && typeof value === "string") {
|
|
1030
|
+
value = value === "" ? void 0 : { type: value };
|
|
1031
|
+
}
|
|
1032
|
+
return value;
|
|
1033
|
+
}
|
|
@@ -450,4 +450,162 @@ declare function readConflictSummary(entry: AgentSettingsEntry | undefined): Con
|
|
|
450
450
|
/** Variable values the run sends: defaults with the person's overrides on top. */
|
|
451
451
|
declare function readEffectiveVariableValues(entry: AgentSettingsEntry | undefined): Record<string, string>;
|
|
452
452
|
|
|
453
|
-
|
|
453
|
+
/**
|
|
454
|
+
* The three states of one model setting — THE definition every settings
|
|
455
|
+
* surface reads (owner, 2026-10-02: "the difference between something being
|
|
456
|
+
* set to none and something not being included at all").
|
|
457
|
+
*
|
|
458
|
+
* unset — the key is ABSENT from the saved settings JSON. The model's own
|
|
459
|
+
* default applies. A person can always return a setting here.
|
|
460
|
+
* off — an explicit off value is saved: `false` for a boolean control,
|
|
461
|
+
* `"none"` for an enum control that declares it (reasoning_effort,
|
|
462
|
+
* thinking_level, …). The server translates it per model (K6 `off`
|
|
463
|
+
* in common-docs/projects/settings-translation/CONTRACTS.md) — it is
|
|
464
|
+
* never the same request as unset.
|
|
465
|
+
* value — any other saved value.
|
|
466
|
+
*
|
|
467
|
+
* `null` in the saved JSON is treated as unset, and writing unset DELETES the
|
|
468
|
+
* key — the client never stores `null` (or a sentinel like `-1`) to mean
|
|
469
|
+
* "not set".
|
|
470
|
+
*/
|
|
471
|
+
|
|
472
|
+
type SettingState = "unset" | "off" | "value";
|
|
473
|
+
/** The enum value that means "off" when a control declares it. */
|
|
474
|
+
declare const ENUM_OFF_VALUE = "none";
|
|
475
|
+
/**
|
|
476
|
+
* The explicit off value this control can save, or `undefined` when the
|
|
477
|
+
* setting has no off (e.g. temperature — 0 is a value, not off).
|
|
478
|
+
*/
|
|
479
|
+
declare function offValueFor(control: ControlDefinition | null | undefined): boolean | string | undefined;
|
|
480
|
+
/** True when `value` is an explicit off (boolean false or enum "none"). */
|
|
481
|
+
declare function isOffValue(value: unknown, control: ControlDefinition | null | undefined): boolean;
|
|
482
|
+
declare function settingStateOf(settings: Record<string, unknown> | null | undefined, key: string, control: ControlDefinition | null | undefined): SettingState;
|
|
483
|
+
/**
|
|
484
|
+
* Write one setting into a NEW settings object.
|
|
485
|
+
* unset → the key is removed (never `null`)
|
|
486
|
+
* off → the control's off value (no-op when the control has none)
|
|
487
|
+
* value → `value`
|
|
488
|
+
*/
|
|
489
|
+
declare function withSettingState<T extends Record<string, unknown>>(settings: T, key: string, state: SettingState, control: ControlDefinition | null | undefined, value?: unknown): T;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* ONE MEANING PER STATE (settings-translation F-b, owner 2026-10-02: "the
|
|
493
|
+
* difference between something being set to none and something not being
|
|
494
|
+
* included at all").
|
|
495
|
+
*
|
|
496
|
+
* For these keys the house "auto" posture IS the unset state on the server:
|
|
497
|
+
* - reasoning_effort — aidream `matrx_ai/catalog/canonicalize.py` normalizes
|
|
498
|
+
* "auto" to None before any rule or processor sees it (ai_041).
|
|
499
|
+
* - visualization — the Google research agent reads an unset value as "auto"
|
|
500
|
+
* (`providers/google/google_research_agent.py`).
|
|
501
|
+
* So a control that offers "auto" for one of them must CLEAR the key, never
|
|
502
|
+
* save the word: a saved "auto" and an absent key would be two stored states
|
|
503
|
+
* with one meaning. Keys whose "auto" is a real provider value that goes on the
|
|
504
|
+
* wire (render_quality, background, moderation, reasoning_summary) are NOT here.
|
|
505
|
+
*
|
|
506
|
+
* Every settings writer reads this one rule: the agent builder
|
|
507
|
+
* (AgentSettingsCore), the conversation settings target (useConversationSettingsTarget), the
|
|
508
|
+
* comparison column editor, and the wire selector.
|
|
509
|
+
*/
|
|
510
|
+
declare const AUTO_VALUE = "auto";
|
|
511
|
+
declare const AUTO_MEANS_UNSET_KEYS: ReadonlySet<string>;
|
|
512
|
+
/** True when writing `value` to `key` means "not set" — the key is removed. */
|
|
513
|
+
declare function isUnsetChoice(key: string, value: unknown): boolean;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* THE starting value of a setting a person turns on (ticks its box). One rule
|
|
517
|
+
* for every settings writer — the agent builder and every conversation /
|
|
518
|
+
* binding override — so ticking "Max Output Tokens" stores the same value
|
|
519
|
+
* wherever it is ticked.
|
|
520
|
+
*
|
|
521
|
+
* - the model's declared default when it has one,
|
|
522
|
+
* - otherwise the control's natural empty value (min / "" / false / first
|
|
523
|
+
* choice / []),
|
|
524
|
+
* - never a choice that IS "not set" ("auto" effort): ticking SETS the
|
|
525
|
+
* setting, so the first real choice is taken instead,
|
|
526
|
+
* - `response_format` is stored in its canonical `{ type }` shape.
|
|
527
|
+
*
|
|
528
|
+
* `undefined` means nothing can be stored — the box stays unticked rather than
|
|
529
|
+
* claiming a setting that does not exist.
|
|
530
|
+
*/
|
|
531
|
+
|
|
532
|
+
declare function startingValueFor(key: string, control: ControlDefinition): unknown;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* THE SETTINGS WRITE TARGET — the one seam between THE model-settings panel
|
|
536
|
+
* (`./react/ModelSettingsPanel`) and whatever a change is written to.
|
|
537
|
+
*
|
|
538
|
+
* Owner ruling, 2026-10-21: one settings experience. The agent builder and the
|
|
539
|
+
* chat's "Model and overrides" render the SAME rows, controls, labels and
|
|
540
|
+
* order; they differ ONLY in where a change lands. The builder's target writes
|
|
541
|
+
* the agent; a conversation's (or a binding's, a mandate's, a shortcut's)
|
|
542
|
+
* target writes that record's overrides and adds a per-row reset back to what
|
|
543
|
+
* it inherits. The panel never knows which.
|
|
544
|
+
*
|
|
545
|
+
* Every method is the person's intent in the panel's words — never a store
|
|
546
|
+
* action. Optional methods are optional ACTIONS: a target that cannot bind a
|
|
547
|
+
* control to a run input simply has no `bind`, and the panel draws no button.
|
|
548
|
+
*/
|
|
549
|
+
|
|
550
|
+
/** What one row shows. Off is a `set` value the panel recognizes (setting-state). */
|
|
551
|
+
type SettingRowView =
|
|
552
|
+
/** Key absent: the model's own default applies. */
|
|
553
|
+
{
|
|
554
|
+
state: "unset";
|
|
555
|
+
modelDefault?: unknown;
|
|
556
|
+
}
|
|
557
|
+
/** A saved / effective value. */
|
|
558
|
+
| {
|
|
559
|
+
state: "set";
|
|
560
|
+
value: unknown;
|
|
561
|
+
}
|
|
562
|
+
/** The setting is a run input: its value comes from `{{variableName}}`. */
|
|
563
|
+
| {
|
|
564
|
+
state: "bound";
|
|
565
|
+
variableName: string;
|
|
566
|
+
value: unknown;
|
|
567
|
+
};
|
|
568
|
+
/** What the target knows about a row beyond its value. */
|
|
569
|
+
interface SettingRowFacts {
|
|
570
|
+
/** True when THIS target changed the row (a conversation override). */
|
|
571
|
+
changedHere?: boolean;
|
|
572
|
+
/** Where the shown value comes from, in the host's words ("Agent", "Organization"). */
|
|
573
|
+
source?: string;
|
|
574
|
+
/** The row's first validation issue, when the target validates. */
|
|
575
|
+
issue?: {
|
|
576
|
+
message: string;
|
|
577
|
+
fixable: boolean;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
type SettingRowRead = SettingRowView & SettingRowFacts;
|
|
581
|
+
interface SettingsWriteTarget {
|
|
582
|
+
read(key: string, control: ControlDefinition | null): SettingRowRead;
|
|
583
|
+
/** The person edited the control. */
|
|
584
|
+
change(key: string, value: unknown, control: ControlDefinition | null): void;
|
|
585
|
+
/** The person ticked an unset row (store `startingValueFor`). */
|
|
586
|
+
turnOn(key: string, control: ControlDefinition): void;
|
|
587
|
+
/** The person cleared the row back to "not set". */
|
|
588
|
+
clear(key: string): void;
|
|
589
|
+
/** One-click repair of the row's issue. */
|
|
590
|
+
fix?(key: string): void;
|
|
591
|
+
/** May this row become a run input? (Builder only.) */
|
|
592
|
+
canBind?(key: string): boolean;
|
|
593
|
+
bind?(key: string, control: ControlDefinition): void;
|
|
594
|
+
unbind?(key: string, control: ControlDefinition | null): void;
|
|
595
|
+
/** Drop THIS target's change and show what it inherits again. */
|
|
596
|
+
resetToInherited?(key: string): void;
|
|
597
|
+
/** The reset button's words, in the host's noun. Default "Reset to agent". */
|
|
598
|
+
resetLabel?: string;
|
|
599
|
+
}
|
|
600
|
+
/** The frontend input capabilities (ui gates) shown under the settings groups. */
|
|
601
|
+
interface CapabilitiesWriteTarget {
|
|
602
|
+
values: UiGates;
|
|
603
|
+
change(key: UiGateEditableKey, value: boolean): void;
|
|
604
|
+
/** Keys THIS target changed; each gets its own reset. */
|
|
605
|
+
changedKeys?: ReadonlySet<UiGateEditableKey>;
|
|
606
|
+
resetToInherited?(key: UiGateEditableKey): void;
|
|
607
|
+
/** Said under the rows when saving the capabilities failed. */
|
|
608
|
+
error?: string | null;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export { AUTO_MEANS_UNSET_KEYS, AUTO_VALUE, type AgentContext, type AgentSettings, type AgentSettingsEntry, type AgentSettingsState, type AgentSource, type AgentVariable, CATALOGUE_KEYS, type CapabilitiesWriteTarget, type CatalogueEntry, type CatalogueGroup, type ConflictAction, type ConflictItem, type ConflictReason, type ConflictSummary, type ControlDefinition, type ControlType, EMPTY_UI_GATES, ENUM_OFF_VALUE, type InitializeSettingsInput, type LLMParams, type NormalizedControls, PARAM_ALIASES, type PendingModelSwitch, type RenderGroup, type ResolutionMode, SETTINGS_CATALOGUE, type SettingRowFacts, type SettingRowRead, type SettingRowView, type SettingState, type SettingsGroupId, type SettingsModelInfo, type SettingsRow, type SettingsStore, type SettingsStoreConfig, type SettingsWriteTarget, UI_GATE_EDITABLE_KEYS, UI_GATE_KEYS, type UiGateEditableKey, type UiGateKey, type UiGates, type VariableCustomComponentRef, buildApiPayload, buildSettingsRows, computeOverrideDiff, createSettingsStore, detectConflicts, effectiveOfferingPinOf, extractModelDefaults, gateEnabled, getActionForMode, isOffValue, isUiGateKey, isUnsetChoice, mergeEffectiveSettings, mergeVariableValues, offValueFor, parseModelControls, parseUiGates, readApiPayload, readConflictActions, readConflictSummary, readEffectiveModelId, readEffectiveSettings, readEffectiveVariableValues, readPreviewedResolution, readSettingsEntry, resolveConflicts, sanitizeSettings, settingStateOf, startingValueFor, withSettingState };
|
package/dist/settings/index.d.ts
CHANGED
|
@@ -450,4 +450,162 @@ declare function readConflictSummary(entry: AgentSettingsEntry | undefined): Con
|
|
|
450
450
|
/** Variable values the run sends: defaults with the person's overrides on top. */
|
|
451
451
|
declare function readEffectiveVariableValues(entry: AgentSettingsEntry | undefined): Record<string, string>;
|
|
452
452
|
|
|
453
|
-
|
|
453
|
+
/**
|
|
454
|
+
* The three states of one model setting — THE definition every settings
|
|
455
|
+
* surface reads (owner, 2026-10-02: "the difference between something being
|
|
456
|
+
* set to none and something not being included at all").
|
|
457
|
+
*
|
|
458
|
+
* unset — the key is ABSENT from the saved settings JSON. The model's own
|
|
459
|
+
* default applies. A person can always return a setting here.
|
|
460
|
+
* off — an explicit off value is saved: `false` for a boolean control,
|
|
461
|
+
* `"none"` for an enum control that declares it (reasoning_effort,
|
|
462
|
+
* thinking_level, …). The server translates it per model (K6 `off`
|
|
463
|
+
* in common-docs/projects/settings-translation/CONTRACTS.md) — it is
|
|
464
|
+
* never the same request as unset.
|
|
465
|
+
* value — any other saved value.
|
|
466
|
+
*
|
|
467
|
+
* `null` in the saved JSON is treated as unset, and writing unset DELETES the
|
|
468
|
+
* key — the client never stores `null` (or a sentinel like `-1`) to mean
|
|
469
|
+
* "not set".
|
|
470
|
+
*/
|
|
471
|
+
|
|
472
|
+
type SettingState = "unset" | "off" | "value";
|
|
473
|
+
/** The enum value that means "off" when a control declares it. */
|
|
474
|
+
declare const ENUM_OFF_VALUE = "none";
|
|
475
|
+
/**
|
|
476
|
+
* The explicit off value this control can save, or `undefined` when the
|
|
477
|
+
* setting has no off (e.g. temperature — 0 is a value, not off).
|
|
478
|
+
*/
|
|
479
|
+
declare function offValueFor(control: ControlDefinition | null | undefined): boolean | string | undefined;
|
|
480
|
+
/** True when `value` is an explicit off (boolean false or enum "none"). */
|
|
481
|
+
declare function isOffValue(value: unknown, control: ControlDefinition | null | undefined): boolean;
|
|
482
|
+
declare function settingStateOf(settings: Record<string, unknown> | null | undefined, key: string, control: ControlDefinition | null | undefined): SettingState;
|
|
483
|
+
/**
|
|
484
|
+
* Write one setting into a NEW settings object.
|
|
485
|
+
* unset → the key is removed (never `null`)
|
|
486
|
+
* off → the control's off value (no-op when the control has none)
|
|
487
|
+
* value → `value`
|
|
488
|
+
*/
|
|
489
|
+
declare function withSettingState<T extends Record<string, unknown>>(settings: T, key: string, state: SettingState, control: ControlDefinition | null | undefined, value?: unknown): T;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* ONE MEANING PER STATE (settings-translation F-b, owner 2026-10-02: "the
|
|
493
|
+
* difference between something being set to none and something not being
|
|
494
|
+
* included at all").
|
|
495
|
+
*
|
|
496
|
+
* For these keys the house "auto" posture IS the unset state on the server:
|
|
497
|
+
* - reasoning_effort — aidream `matrx_ai/catalog/canonicalize.py` normalizes
|
|
498
|
+
* "auto" to None before any rule or processor sees it (ai_041).
|
|
499
|
+
* - visualization — the Google research agent reads an unset value as "auto"
|
|
500
|
+
* (`providers/google/google_research_agent.py`).
|
|
501
|
+
* So a control that offers "auto" for one of them must CLEAR the key, never
|
|
502
|
+
* save the word: a saved "auto" and an absent key would be two stored states
|
|
503
|
+
* with one meaning. Keys whose "auto" is a real provider value that goes on the
|
|
504
|
+
* wire (render_quality, background, moderation, reasoning_summary) are NOT here.
|
|
505
|
+
*
|
|
506
|
+
* Every settings writer reads this one rule: the agent builder
|
|
507
|
+
* (AgentSettingsCore), the conversation settings target (useConversationSettingsTarget), the
|
|
508
|
+
* comparison column editor, and the wire selector.
|
|
509
|
+
*/
|
|
510
|
+
declare const AUTO_VALUE = "auto";
|
|
511
|
+
declare const AUTO_MEANS_UNSET_KEYS: ReadonlySet<string>;
|
|
512
|
+
/** True when writing `value` to `key` means "not set" — the key is removed. */
|
|
513
|
+
declare function isUnsetChoice(key: string, value: unknown): boolean;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* THE starting value of a setting a person turns on (ticks its box). One rule
|
|
517
|
+
* for every settings writer — the agent builder and every conversation /
|
|
518
|
+
* binding override — so ticking "Max Output Tokens" stores the same value
|
|
519
|
+
* wherever it is ticked.
|
|
520
|
+
*
|
|
521
|
+
* - the model's declared default when it has one,
|
|
522
|
+
* - otherwise the control's natural empty value (min / "" / false / first
|
|
523
|
+
* choice / []),
|
|
524
|
+
* - never a choice that IS "not set" ("auto" effort): ticking SETS the
|
|
525
|
+
* setting, so the first real choice is taken instead,
|
|
526
|
+
* - `response_format` is stored in its canonical `{ type }` shape.
|
|
527
|
+
*
|
|
528
|
+
* `undefined` means nothing can be stored — the box stays unticked rather than
|
|
529
|
+
* claiming a setting that does not exist.
|
|
530
|
+
*/
|
|
531
|
+
|
|
532
|
+
declare function startingValueFor(key: string, control: ControlDefinition): unknown;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* THE SETTINGS WRITE TARGET — the one seam between THE model-settings panel
|
|
536
|
+
* (`./react/ModelSettingsPanel`) and whatever a change is written to.
|
|
537
|
+
*
|
|
538
|
+
* Owner ruling, 2026-10-21: one settings experience. The agent builder and the
|
|
539
|
+
* chat's "Model and overrides" render the SAME rows, controls, labels and
|
|
540
|
+
* order; they differ ONLY in where a change lands. The builder's target writes
|
|
541
|
+
* the agent; a conversation's (or a binding's, a mandate's, a shortcut's)
|
|
542
|
+
* target writes that record's overrides and adds a per-row reset back to what
|
|
543
|
+
* it inherits. The panel never knows which.
|
|
544
|
+
*
|
|
545
|
+
* Every method is the person's intent in the panel's words — never a store
|
|
546
|
+
* action. Optional methods are optional ACTIONS: a target that cannot bind a
|
|
547
|
+
* control to a run input simply has no `bind`, and the panel draws no button.
|
|
548
|
+
*/
|
|
549
|
+
|
|
550
|
+
/** What one row shows. Off is a `set` value the panel recognizes (setting-state). */
|
|
551
|
+
type SettingRowView =
|
|
552
|
+
/** Key absent: the model's own default applies. */
|
|
553
|
+
{
|
|
554
|
+
state: "unset";
|
|
555
|
+
modelDefault?: unknown;
|
|
556
|
+
}
|
|
557
|
+
/** A saved / effective value. */
|
|
558
|
+
| {
|
|
559
|
+
state: "set";
|
|
560
|
+
value: unknown;
|
|
561
|
+
}
|
|
562
|
+
/** The setting is a run input: its value comes from `{{variableName}}`. */
|
|
563
|
+
| {
|
|
564
|
+
state: "bound";
|
|
565
|
+
variableName: string;
|
|
566
|
+
value: unknown;
|
|
567
|
+
};
|
|
568
|
+
/** What the target knows about a row beyond its value. */
|
|
569
|
+
interface SettingRowFacts {
|
|
570
|
+
/** True when THIS target changed the row (a conversation override). */
|
|
571
|
+
changedHere?: boolean;
|
|
572
|
+
/** Where the shown value comes from, in the host's words ("Agent", "Organization"). */
|
|
573
|
+
source?: string;
|
|
574
|
+
/** The row's first validation issue, when the target validates. */
|
|
575
|
+
issue?: {
|
|
576
|
+
message: string;
|
|
577
|
+
fixable: boolean;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
type SettingRowRead = SettingRowView & SettingRowFacts;
|
|
581
|
+
interface SettingsWriteTarget {
|
|
582
|
+
read(key: string, control: ControlDefinition | null): SettingRowRead;
|
|
583
|
+
/** The person edited the control. */
|
|
584
|
+
change(key: string, value: unknown, control: ControlDefinition | null): void;
|
|
585
|
+
/** The person ticked an unset row (store `startingValueFor`). */
|
|
586
|
+
turnOn(key: string, control: ControlDefinition): void;
|
|
587
|
+
/** The person cleared the row back to "not set". */
|
|
588
|
+
clear(key: string): void;
|
|
589
|
+
/** One-click repair of the row's issue. */
|
|
590
|
+
fix?(key: string): void;
|
|
591
|
+
/** May this row become a run input? (Builder only.) */
|
|
592
|
+
canBind?(key: string): boolean;
|
|
593
|
+
bind?(key: string, control: ControlDefinition): void;
|
|
594
|
+
unbind?(key: string, control: ControlDefinition | null): void;
|
|
595
|
+
/** Drop THIS target's change and show what it inherits again. */
|
|
596
|
+
resetToInherited?(key: string): void;
|
|
597
|
+
/** The reset button's words, in the host's noun. Default "Reset to agent". */
|
|
598
|
+
resetLabel?: string;
|
|
599
|
+
}
|
|
600
|
+
/** The frontend input capabilities (ui gates) shown under the settings groups. */
|
|
601
|
+
interface CapabilitiesWriteTarget {
|
|
602
|
+
values: UiGates;
|
|
603
|
+
change(key: UiGateEditableKey, value: boolean): void;
|
|
604
|
+
/** Keys THIS target changed; each gets its own reset. */
|
|
605
|
+
changedKeys?: ReadonlySet<UiGateEditableKey>;
|
|
606
|
+
resetToInherited?(key: UiGateEditableKey): void;
|
|
607
|
+
/** Said under the rows when saving the capabilities failed. */
|
|
608
|
+
error?: string | null;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export { AUTO_MEANS_UNSET_KEYS, AUTO_VALUE, type AgentContext, type AgentSettings, type AgentSettingsEntry, type AgentSettingsState, type AgentSource, type AgentVariable, CATALOGUE_KEYS, type CapabilitiesWriteTarget, type CatalogueEntry, type CatalogueGroup, type ConflictAction, type ConflictItem, type ConflictReason, type ConflictSummary, type ControlDefinition, type ControlType, EMPTY_UI_GATES, ENUM_OFF_VALUE, type InitializeSettingsInput, type LLMParams, type NormalizedControls, PARAM_ALIASES, type PendingModelSwitch, type RenderGroup, type ResolutionMode, SETTINGS_CATALOGUE, type SettingRowFacts, type SettingRowRead, type SettingRowView, type SettingState, type SettingsGroupId, type SettingsModelInfo, type SettingsRow, type SettingsStore, type SettingsStoreConfig, type SettingsWriteTarget, UI_GATE_EDITABLE_KEYS, UI_GATE_KEYS, type UiGateEditableKey, type UiGateKey, type UiGates, type VariableCustomComponentRef, buildApiPayload, buildSettingsRows, computeOverrideDiff, createSettingsStore, detectConflicts, effectiveOfferingPinOf, extractModelDefaults, gateEnabled, getActionForMode, isOffValue, isUiGateKey, isUnsetChoice, mergeEffectiveSettings, mergeVariableValues, offValueFor, parseModelControls, parseUiGates, readApiPayload, readConflictActions, readConflictSummary, readEffectiveModelId, readEffectiveSettings, readEffectiveVariableValues, readPreviewedResolution, readSettingsEntry, resolveConflicts, sanitizeSettings, settingStateOf, startingValueFor, withSettingState };
|