@ai-matrx/agents 0.59.270 → 0.59.272
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 +17 -2
- package/context/rules-corpus.json +238 -0
- package/dist/models/index.cjs +127 -47
- package/dist/models/index.d.cts +58 -6
- package/dist/models/index.d.ts +58 -6
- package/dist/models/index.js +127 -47
- package/dist/models/react/index.d.cts +6 -1
- package/dist/models/react/index.d.ts +6 -1
- package/dist/settings/index.cjs +11 -3
- package/dist/settings/index.d.cts +12 -6
- package/dist/settings/index.d.ts +12 -6
- package/dist/settings/index.js +11 -3
- package/package.json +4 -2
|
@@ -516,14 +516,16 @@ declare function withSettingState<T extends Record<string, unknown>>(settings: T
|
|
|
516
516
|
* included at all").
|
|
517
517
|
*
|
|
518
518
|
* For these keys the house "auto" posture IS the unset state on the server:
|
|
519
|
-
* - reasoning_effort — aidream `matrx_ai/catalog/canonicalize.py` normalizes
|
|
520
|
-
* "auto" to None before any rule or processor sees it (ai_041).
|
|
521
519
|
* - visualization — the Google research agent reads an unset value as "auto"
|
|
522
520
|
* (`providers/google/google_research_agent.py`).
|
|
523
521
|
* So a control that offers "auto" for one of them must CLEAR the key, never
|
|
524
|
-
* save the word
|
|
525
|
-
*
|
|
526
|
-
*
|
|
522
|
+
* save the word.
|
|
523
|
+
*
|
|
524
|
+
* `reasoning_effort` is NOT here (owner ruling 2026-10-24): unset runs at the
|
|
525
|
+
* platform default ("low"), and "auto" is a PERSON's explicit choice that the
|
|
526
|
+
* server sends as the provider's own auto where it has one
|
|
527
|
+
* (`matrx_ai/catalog/controls.py::apply_reasoning_default`). So a person picking
|
|
528
|
+
* "auto" SAVES "auto"; it is never a starting value (`NEVER_IMPLICIT_AUTO_KEYS`).
|
|
527
529
|
*
|
|
528
530
|
* Every settings writer reads this one rule: the agent builder
|
|
529
531
|
* (AgentSettingsCore), the conversation settings target (useConversationSettingsTarget), the
|
|
@@ -531,8 +533,12 @@ declare function withSettingState<T extends Record<string, unknown>>(settings: T
|
|
|
531
533
|
*/
|
|
532
534
|
declare const AUTO_VALUE = "auto";
|
|
533
535
|
declare const AUTO_MEANS_UNSET_KEYS: ReadonlySet<string>;
|
|
536
|
+
/** Keys whose "auto" is a real choice that only a person makes — never a default. */
|
|
537
|
+
declare const NEVER_IMPLICIT_AUTO_KEYS: ReadonlySet<string>;
|
|
534
538
|
/** True when writing `value` to `key` means "not set" — the key is removed. */
|
|
535
539
|
declare function isUnsetChoice(key: string, value: unknown): boolean;
|
|
540
|
+
/** True when `value` may not be chosen FOR a person (a starting value / default). */
|
|
541
|
+
declare function isNeverImplicitChoice(key: string, value: unknown): boolean;
|
|
536
542
|
|
|
537
543
|
/**
|
|
538
544
|
* THE starting value of a setting a person turns on (ticks its box). One rule
|
|
@@ -746,5 +752,5 @@ interface CapabilitiesWriteTarget {
|
|
|
746
752
|
error?: string | null;
|
|
747
753
|
}
|
|
748
754
|
|
|
749
|
-
export { AUTO_MEANS_UNSET_KEYS, AUTO_VALUE, CATALOGUE_KEYS, EMPTY_UI_GATES, ENUM_OFF_VALUE, PARAM_ALIASES, SETTINGS_CATALOGUE, UI_GATE_EDITABLE_KEYS, UI_GATE_KEYS, buildApiPayload, buildSettingsRows, computeOverrideDiff, createSettingsStore, detectConflicts, effectiveOfferingPinOf, extraSettingKeys, extractModelDefaults, gateEnabled, getActionForMode, isOffValue, isUiGateKey, isUnsetChoice, mergeEffectiveSettings, mergeVariableValues, offValueFor, parseModelControls, parseUiGates, readApiPayload, readConflictActions, readConflictSummary, readEffectiveModelId, readEffectiveSettings, readEffectiveVariableValues, readPreviewedResolution, readSettingsEntry, resolveConflicts, sanitizeSettings, settingControl, settingLabel, settingStateOf, startingValueFor, withSettingState };
|
|
755
|
+
export { AUTO_MEANS_UNSET_KEYS, AUTO_VALUE, CATALOGUE_KEYS, EMPTY_UI_GATES, ENUM_OFF_VALUE, NEVER_IMPLICIT_AUTO_KEYS, PARAM_ALIASES, SETTINGS_CATALOGUE, UI_GATE_EDITABLE_KEYS, UI_GATE_KEYS, buildApiPayload, buildSettingsRows, computeOverrideDiff, createSettingsStore, detectConflicts, effectiveOfferingPinOf, extraSettingKeys, extractModelDefaults, gateEnabled, getActionForMode, isNeverImplicitChoice, isOffValue, isUiGateKey, isUnsetChoice, mergeEffectiveSettings, mergeVariableValues, offValueFor, parseModelControls, parseUiGates, readApiPayload, readConflictActions, readConflictSummary, readEffectiveModelId, readEffectiveSettings, readEffectiveVariableValues, readPreviewedResolution, readSettingsEntry, resolveConflicts, sanitizeSettings, settingControl, settingLabel, settingStateOf, startingValueFor, withSettingState };
|
|
750
756
|
export type { AgentContext, AgentSettings, AgentSettingsEntry, AgentSettingsState, AgentSource, AgentVariable, CapabilitiesWriteTarget, CatalogueEntry, CatalogueGroup, ConflictAction, ConflictItem, ConflictReason, ConflictSummary, ControlDefinition, ControlType, ExtraSettingKeys, InitializeSettingsInput, LLMParams, ModelRowTarget, ModelSettingRow, NormalizedControls, PendingModelSwitch, RenderGroup, ResolutionMode, SettingRowFacts, SettingRowRead, SettingRowView, SettingState, SettingsGroupId, SettingsModelInfo, SettingsStore, SettingsStoreConfig, SettingsWriteTarget, UiGateEditableKey, UiGateKey, UiGates, VariableCustomComponentRef };
|
package/dist/settings/index.d.ts
CHANGED
|
@@ -516,14 +516,16 @@ declare function withSettingState<T extends Record<string, unknown>>(settings: T
|
|
|
516
516
|
* included at all").
|
|
517
517
|
*
|
|
518
518
|
* For these keys the house "auto" posture IS the unset state on the server:
|
|
519
|
-
* - reasoning_effort — aidream `matrx_ai/catalog/canonicalize.py` normalizes
|
|
520
|
-
* "auto" to None before any rule or processor sees it (ai_041).
|
|
521
519
|
* - visualization — the Google research agent reads an unset value as "auto"
|
|
522
520
|
* (`providers/google/google_research_agent.py`).
|
|
523
521
|
* So a control that offers "auto" for one of them must CLEAR the key, never
|
|
524
|
-
* save the word
|
|
525
|
-
*
|
|
526
|
-
*
|
|
522
|
+
* save the word.
|
|
523
|
+
*
|
|
524
|
+
* `reasoning_effort` is NOT here (owner ruling 2026-10-24): unset runs at the
|
|
525
|
+
* platform default ("low"), and "auto" is a PERSON's explicit choice that the
|
|
526
|
+
* server sends as the provider's own auto where it has one
|
|
527
|
+
* (`matrx_ai/catalog/controls.py::apply_reasoning_default`). So a person picking
|
|
528
|
+
* "auto" SAVES "auto"; it is never a starting value (`NEVER_IMPLICIT_AUTO_KEYS`).
|
|
527
529
|
*
|
|
528
530
|
* Every settings writer reads this one rule: the agent builder
|
|
529
531
|
* (AgentSettingsCore), the conversation settings target (useConversationSettingsTarget), the
|
|
@@ -531,8 +533,12 @@ declare function withSettingState<T extends Record<string, unknown>>(settings: T
|
|
|
531
533
|
*/
|
|
532
534
|
declare const AUTO_VALUE = "auto";
|
|
533
535
|
declare const AUTO_MEANS_UNSET_KEYS: ReadonlySet<string>;
|
|
536
|
+
/** Keys whose "auto" is a real choice that only a person makes — never a default. */
|
|
537
|
+
declare const NEVER_IMPLICIT_AUTO_KEYS: ReadonlySet<string>;
|
|
534
538
|
/** True when writing `value` to `key` means "not set" — the key is removed. */
|
|
535
539
|
declare function isUnsetChoice(key: string, value: unknown): boolean;
|
|
540
|
+
/** True when `value` may not be chosen FOR a person (a starting value / default). */
|
|
541
|
+
declare function isNeverImplicitChoice(key: string, value: unknown): boolean;
|
|
536
542
|
|
|
537
543
|
/**
|
|
538
544
|
* THE starting value of a setting a person turns on (ticks its box). One rule
|
|
@@ -746,5 +752,5 @@ interface CapabilitiesWriteTarget {
|
|
|
746
752
|
error?: string | null;
|
|
747
753
|
}
|
|
748
754
|
|
|
749
|
-
export { AUTO_MEANS_UNSET_KEYS, AUTO_VALUE, CATALOGUE_KEYS, EMPTY_UI_GATES, ENUM_OFF_VALUE, PARAM_ALIASES, SETTINGS_CATALOGUE, UI_GATE_EDITABLE_KEYS, UI_GATE_KEYS, buildApiPayload, buildSettingsRows, computeOverrideDiff, createSettingsStore, detectConflicts, effectiveOfferingPinOf, extraSettingKeys, extractModelDefaults, gateEnabled, getActionForMode, isOffValue, isUiGateKey, isUnsetChoice, mergeEffectiveSettings, mergeVariableValues, offValueFor, parseModelControls, parseUiGates, readApiPayload, readConflictActions, readConflictSummary, readEffectiveModelId, readEffectiveSettings, readEffectiveVariableValues, readPreviewedResolution, readSettingsEntry, resolveConflicts, sanitizeSettings, settingControl, settingLabel, settingStateOf, startingValueFor, withSettingState };
|
|
755
|
+
export { AUTO_MEANS_UNSET_KEYS, AUTO_VALUE, CATALOGUE_KEYS, EMPTY_UI_GATES, ENUM_OFF_VALUE, NEVER_IMPLICIT_AUTO_KEYS, PARAM_ALIASES, SETTINGS_CATALOGUE, UI_GATE_EDITABLE_KEYS, UI_GATE_KEYS, buildApiPayload, buildSettingsRows, computeOverrideDiff, createSettingsStore, detectConflicts, effectiveOfferingPinOf, extraSettingKeys, extractModelDefaults, gateEnabled, getActionForMode, isNeverImplicitChoice, isOffValue, isUiGateKey, isUnsetChoice, mergeEffectiveSettings, mergeVariableValues, offValueFor, parseModelControls, parseUiGates, readApiPayload, readConflictActions, readConflictSummary, readEffectiveModelId, readEffectiveSettings, readEffectiveVariableValues, readPreviewedResolution, readSettingsEntry, resolveConflicts, sanitizeSettings, settingControl, settingLabel, settingStateOf, startingValueFor, withSettingState };
|
|
750
756
|
export type { AgentContext, AgentSettings, AgentSettingsEntry, AgentSettingsState, AgentSource, AgentVariable, CapabilitiesWriteTarget, CatalogueEntry, CatalogueGroup, ConflictAction, ConflictItem, ConflictReason, ConflictSummary, ControlDefinition, ControlType, ExtraSettingKeys, InitializeSettingsInput, LLMParams, ModelRowTarget, ModelSettingRow, NormalizedControls, PendingModelSwitch, RenderGroup, ResolutionMode, SettingRowFacts, SettingRowRead, SettingRowView, SettingState, SettingsGroupId, SettingsModelInfo, SettingsStore, SettingsStoreConfig, SettingsWriteTarget, UiGateEditableKey, UiGateKey, UiGates, VariableCustomComponentRef };
|
package/dist/settings/index.js
CHANGED
|
@@ -965,13 +965,19 @@ function withSettingState(settings, key, state, control, value) {
|
|
|
965
965
|
// settings/auto-means-unset.ts
|
|
966
966
|
var AUTO_VALUE = "auto";
|
|
967
967
|
var AUTO_MEANS_UNSET_KEYS = /* @__PURE__ */ new Set([
|
|
968
|
-
"reasoning_effort",
|
|
969
968
|
"visualization"
|
|
970
969
|
]);
|
|
970
|
+
var NEVER_IMPLICIT_AUTO_KEYS = /* @__PURE__ */ new Set([
|
|
971
|
+
"reasoning_effort"
|
|
972
|
+
]);
|
|
971
973
|
function isUnsetChoice(key, value) {
|
|
972
974
|
if (value === void 0 || value === null) return true;
|
|
973
975
|
return value === AUTO_VALUE && AUTO_MEANS_UNSET_KEYS.has(key);
|
|
974
976
|
}
|
|
977
|
+
function isNeverImplicitChoice(key, value) {
|
|
978
|
+
if (isUnsetChoice(key, value)) return true;
|
|
979
|
+
return value === AUTO_VALUE && NEVER_IMPLICIT_AUTO_KEYS.has(key);
|
|
980
|
+
}
|
|
975
981
|
|
|
976
982
|
// settings/starting-value.ts
|
|
977
983
|
function startingValueFor(key, control) {
|
|
@@ -989,8 +995,8 @@ function startingValueFor(key, control) {
|
|
|
989
995
|
value = [];
|
|
990
996
|
}
|
|
991
997
|
}
|
|
992
|
-
if (
|
|
993
|
-
value = control.enum.find((choice) => !
|
|
998
|
+
if (isNeverImplicitChoice(key, value) && control.type === "enum" && control.enum?.length) {
|
|
999
|
+
value = control.enum.find((choice) => !isNeverImplicitChoice(key, choice));
|
|
994
1000
|
}
|
|
995
1001
|
if (key === "response_format" && typeof value === "string") {
|
|
996
1002
|
value = value === "" ? void 0 : { type: value };
|
|
@@ -1003,6 +1009,7 @@ export {
|
|
|
1003
1009
|
CATALOGUE_KEYS,
|
|
1004
1010
|
EMPTY_UI_GATES,
|
|
1005
1011
|
ENUM_OFF_VALUE,
|
|
1012
|
+
NEVER_IMPLICIT_AUTO_KEYS,
|
|
1006
1013
|
PARAM_ALIASES,
|
|
1007
1014
|
SETTINGS_CATALOGUE,
|
|
1008
1015
|
UI_GATE_EDITABLE_KEYS,
|
|
@@ -1017,6 +1024,7 @@ export {
|
|
|
1017
1024
|
extractModelDefaults,
|
|
1018
1025
|
gateEnabled,
|
|
1019
1026
|
getActionForMode,
|
|
1027
|
+
isNeverImplicitChoice,
|
|
1020
1028
|
isOffValue,
|
|
1021
1029
|
isUiGateKey,
|
|
1022
1030
|
isUnsetChoice,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/agents",
|
|
3
|
-
"version": "0.59.
|
|
3
|
+
"version": "0.59.272",
|
|
4
4
|
"description": "Portable AI Matrx agent stream protocol, event projection, and safe result-presentation primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
27
|
"scripts/check-model-catalog-reads.mjs",
|
|
28
|
+
"context/rules-corpus.json",
|
|
28
29
|
"README.md",
|
|
29
30
|
"LICENSE",
|
|
30
31
|
"CHANGELOG.md"
|
|
@@ -171,6 +172,7 @@
|
|
|
171
172
|
"default": "./dist/context/react/index.cjs"
|
|
172
173
|
}
|
|
173
174
|
},
|
|
175
|
+
"./context/rules-corpus.json": "./context/rules-corpus.json",
|
|
174
176
|
"./react": {
|
|
175
177
|
"import": {
|
|
176
178
|
"types": "./dist/react/index.d.ts",
|
|
@@ -518,5 +520,5 @@
|
|
|
518
520
|
"optional": true
|
|
519
521
|
}
|
|
520
522
|
},
|
|
521
|
-
"gitHead": "
|
|
523
|
+
"gitHead": "467bc8f11239e00d4bcd8d27c85861b0165cd0bd"
|
|
522
524
|
}
|