@ai-matrx/agents 0.59.266 → 0.59.267

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.59.267
4
+ ### a kept value with no schema stays editable; a value's source reaches a phone
5
+
6
+ - `ModelSettingsPanel`: a set value the model declares no control for ("Translated", "Not on this model") is edited again, through `SettingControlInput` with a control from the value's own shape (new export `controlForValue`); the target receives `change(key, value, null)`. A row's `source` ("Agent", "Binding") — the status glyph's hover text — is also a `[data-touch-hint]` line under the control where nothing can hover. Test: `settings/react/a-kept-value-with-no-schema-stays-editable.test.tsx`. Consumer action: none (a target's `change` already accepts a null control).
7
+
3
8
  ## 0.59.266
4
9
  ### model labels by id (FW-014 round 3)
5
10
 
@@ -991,6 +991,15 @@ function StatusGlyph({ issue, source }) {
991
991
  }
992
992
  );
993
993
  }
994
+ function SourceTouchLine({ source }) {
995
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { "data-touch-hint": "", "data-setting-source": "", className: "hidden pt-1 type-meta text-muted-foreground [@media(hover:none)]:block", children: `Source: ${source}` });
996
+ }
997
+ function controlForValue(value) {
998
+ if (typeof value === "boolean") return { type: "boolean" };
999
+ if (typeof value === "number") return { type: Number.isInteger(value) ? "integer" : "number" };
1000
+ if (Array.isArray(value)) return value.every((item) => typeof item === "string") ? { type: "string_array" } : { type: "array" };
1001
+ return { type: "string" };
1002
+ }
994
1003
  function changeTogether(target, changes, controls) {
995
1004
  if (target.changeMany) target.changeMany(changes);
996
1005
  else for (const [key, value] of Object.entries(changes)) target.change(key, value, controls[key] ?? null);
@@ -1121,12 +1130,13 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled, multiSpeake
1121
1130
  id: `${idPrefix}-control-${row.key}`
1122
1131
  }
1123
1132
  ),
1124
- read.issue ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "pt-1 type-meta text-warning-ink", children: read.issue.message }) : null
1133
+ read.issue ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "pt-1 type-meta text-warning-ink", children: read.issue.message }) : null,
1134
+ !read.issue && read.source ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SourceTouchLine, { source: read.source }) : null
1125
1135
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RowText, { children: read.modelDefault !== void 0 && read.modelDefault !== null ? `Not set \xB7 Model default: ${formatSettingValue(read.modelDefault)}` : "Not set" })
1126
1136
  }
1127
1137
  );
1128
1138
  }
1129
- function ExtraSettingRow({ rowKey, label, value, kind, onClear, onReset, resetLabel = "Reset to agent", disabled = false }) {
1139
+ function ExtraSettingRow({ rowKey, label, value, kind, onClear, onChange, onReset, resetLabel = "Reset to agent", disabled = false, idPrefix = "settings" }) {
1130
1140
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1131
1141
  SettingRowFrame,
1132
1142
  {
@@ -1137,7 +1147,17 @@ function ExtraSettingRow({ rowKey, label, value, kind, onClear, onReset, resetLa
1137
1147
  kind === "translated" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_controls4.Chip, { tone: "sky", label: "Translated", title: "Kept as set and sent as this model's closest equivalent" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_controls4.Chip, { tone: "warning", label: "Not on this model", title: "This model has no such setting" }),
1138
1148
  onReset ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_controls4.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RotateCcwGlyph, {}), onClick: onReset, disabled, "aria-label": `${resetLabel}: ${label}`, title: resetLabel, "data-setting-reset": rowKey }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_controls4.Button, { variant: "quiet", removes: true, icon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Trash2Glyph, {}), onClick: onClear, disabled, "aria-label": `Clear ${label}`, title: "Clear to not set", "data-setting-clear": rowKey })
1139
1149
  ] }),
1140
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RowText, { mono: value !== void 0 && value !== null, children: value === void 0 || value === null ? "Not set" : isOffValue(value, null) ? "Off" : formatSettingValue(value) })
1150
+ children: onChange && value !== void 0 && value !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1151
+ SettingControlInput,
1152
+ {
1153
+ settingKey: rowKey,
1154
+ control: controlForValue(value),
1155
+ value,
1156
+ onChange,
1157
+ disabled,
1158
+ id: `${idPrefix}-extra-${rowKey}`
1159
+ }
1160
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RowText, { mono: value !== void 0 && value !== null, children: value === void 0 || value === null ? "Not set" : isOffValue(value, null) ? "Off" : formatSettingValue(value) })
1141
1161
  }
1142
1162
  );
1143
1163
  }
@@ -1219,6 +1239,8 @@ function ModelSettingsPanel({
1219
1239
  value: values?.[key],
1220
1240
  kind,
1221
1241
  onClear: () => target.clear(key),
1242
+ onChange: (next) => target.change(key, next, null),
1243
+ idPrefix,
1222
1244
  onReset: target.resetToInherited && target.read(key, null).changedHere ? () => target.resetToInherited?.(key) : void 0,
1223
1245
  resetLabel,
1224
1246
  disabled
@@ -991,6 +991,15 @@ function StatusGlyph({ issue, source }) {
991
991
  }
992
992
  );
993
993
  }
994
+ function SourceTouchLine({ source }) {
995
+ return /* @__PURE__ */ jsx5("p", { "data-touch-hint": "", "data-setting-source": "", className: "hidden pt-1 type-meta text-muted-foreground [@media(hover:none)]:block", children: `Source: ${source}` });
996
+ }
997
+ function controlForValue(value) {
998
+ if (typeof value === "boolean") return { type: "boolean" };
999
+ if (typeof value === "number") return { type: Number.isInteger(value) ? "integer" : "number" };
1000
+ if (Array.isArray(value)) return value.every((item) => typeof item === "string") ? { type: "string_array" } : { type: "array" };
1001
+ return { type: "string" };
1002
+ }
994
1003
  function changeTogether(target, changes, controls) {
995
1004
  if (target.changeMany) target.changeMany(changes);
996
1005
  else for (const [key, value] of Object.entries(changes)) target.change(key, value, controls[key] ?? null);
@@ -1121,12 +1130,13 @@ function ModelSettingRow({ row, control, target, idPrefix, disabled, multiSpeake
1121
1130
  id: `${idPrefix}-control-${row.key}`
1122
1131
  }
1123
1132
  ),
1124
- read.issue ? /* @__PURE__ */ jsx5("p", { className: "pt-1 type-meta text-warning-ink", children: read.issue.message }) : null
1133
+ read.issue ? /* @__PURE__ */ jsx5("p", { className: "pt-1 type-meta text-warning-ink", children: read.issue.message }) : null,
1134
+ !read.issue && read.source ? /* @__PURE__ */ jsx5(SourceTouchLine, { source: read.source }) : null
1125
1135
  ] }) : /* @__PURE__ */ jsx5(RowText, { children: read.modelDefault !== void 0 && read.modelDefault !== null ? `Not set \xB7 Model default: ${formatSettingValue(read.modelDefault)}` : "Not set" })
1126
1136
  }
1127
1137
  );
1128
1138
  }
1129
- function ExtraSettingRow({ rowKey, label, value, kind, onClear, onReset, resetLabel = "Reset to agent", disabled = false }) {
1139
+ function ExtraSettingRow({ rowKey, label, value, kind, onClear, onChange, onReset, resetLabel = "Reset to agent", disabled = false, idPrefix = "settings" }) {
1130
1140
  return /* @__PURE__ */ jsx5(
1131
1141
  SettingRowFrame,
1132
1142
  {
@@ -1137,7 +1147,17 @@ function ExtraSettingRow({ rowKey, label, value, kind, onClear, onReset, resetLa
1137
1147
  kind === "translated" ? /* @__PURE__ */ jsx5(Chip, { tone: "sky", label: "Translated", title: "Kept as set and sent as this model's closest equivalent" }) : /* @__PURE__ */ jsx5(Chip, { tone: "warning", label: "Not on this model", title: "This model has no such setting" }),
1138
1148
  onReset ? /* @__PURE__ */ jsx5(Button3, { variant: "quiet", icon: /* @__PURE__ */ jsx5(RotateCcwGlyph, {}), onClick: onReset, disabled, "aria-label": `${resetLabel}: ${label}`, title: resetLabel, "data-setting-reset": rowKey }) : /* @__PURE__ */ jsx5(Button3, { variant: "quiet", removes: true, icon: /* @__PURE__ */ jsx5(Trash2Glyph, {}), onClick: onClear, disabled, "aria-label": `Clear ${label}`, title: "Clear to not set", "data-setting-clear": rowKey })
1139
1149
  ] }),
1140
- children: /* @__PURE__ */ jsx5(RowText, { mono: value !== void 0 && value !== null, children: value === void 0 || value === null ? "Not set" : isOffValue(value, null) ? "Off" : formatSettingValue(value) })
1150
+ children: onChange && value !== void 0 && value !== null ? /* @__PURE__ */ jsx5(
1151
+ SettingControlInput,
1152
+ {
1153
+ settingKey: rowKey,
1154
+ control: controlForValue(value),
1155
+ value,
1156
+ onChange,
1157
+ disabled,
1158
+ id: `${idPrefix}-extra-${rowKey}`
1159
+ }
1160
+ ) : /* @__PURE__ */ jsx5(RowText, { mono: value !== void 0 && value !== null, children: value === void 0 || value === null ? "Not set" : isOffValue(value, null) ? "Off" : formatSettingValue(value) })
1141
1161
  }
1142
1162
  );
1143
1163
  }
@@ -1219,6 +1239,8 @@ function ModelSettingsPanel({
1219
1239
  value: values?.[key],
1220
1240
  kind,
1221
1241
  onClear: () => target.clear(key),
1242
+ onChange: (next) => target.change(key, next, null),
1243
+ idPrefix,
1222
1244
  onReset: target.resetToInherited && target.read(key, null).changedHere ? () => target.resetToInherited?.(key) : void 0,
1223
1245
  resetLabel,
1224
1246
  disabled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/agents",
3
- "version": "0.59.266",
3
+ "version": "0.59.267",
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",
@@ -536,5 +536,5 @@
536
536
  ],
537
537
  "layer": 5
538
538
  },
539
- "gitHead": "1273dc696288f11ece2552257206a1e0cfdb28db"
539
+ "gitHead": "06a190b44e4a1374047a5922da7e8b77a48555f8"
540
540
  }