@ai-matrx/agents 0.59.179 → 0.59.181

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.
@@ -653,7 +653,6 @@ function ModelDiffRenderer({ node, enrichment }) {
653
653
  {
654
654
  modelId: oldId,
655
655
  name: oldName,
656
- showId: true,
657
656
  className: (0, import_design_system5.cn)(
658
657
  node.changeType !== "unchanged" ? "text-destructive" : "text-foreground/80"
659
658
  )
@@ -673,7 +672,6 @@ function ModelDiffRenderer({ node, enrichment }) {
673
672
  {
674
673
  modelId: newId,
675
674
  name: newName,
676
- showId: true,
677
675
  className: (0, import_design_system5.cn)(
678
676
  node.changeType !== "unchanged" ? "text-success" : "text-foreground/80"
679
677
  )
@@ -726,7 +724,7 @@ function ModelTierIdentityList({ value }) {
726
724
  }
727
725
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "flex flex-col gap-1.5", children: identities.map((identity) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "grid min-w-0 grid-cols-[5rem_minmax(0,1fr)] items-start gap-2", children: [
728
726
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-muted-foreground", children: identity.role }),
729
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ModelRef, { modelId: identity.modelId, showId: true })
727
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ModelRef, { modelId: identity.modelId })
730
728
  ] }, identity.key)) });
731
729
  }
732
730
  function ModelTiersDiffRenderer({ node }) {
@@ -751,11 +749,77 @@ var ModelTiersAdapter = {
751
749
  toSummaryText: (node, enrichment) => `${summarizeTiers(node.oldValue, enrichment)} \u2192 ${summarizeTiers(node.newValue, enrichment)}`
752
750
  };
753
751
 
754
- // versions/react/adapters/SettingsAdapter.tsx
752
+ // versions/react/adapters/RecordFieldsAdapter.tsx
755
753
  var import_design_system6 = require("@ai-matrx/design-system");
756
- var import_structural2 = require("@ai-matrx/diff/structural");
757
754
  var import_text_case2 = require("@ai-matrx/kit/text-case");
758
755
  var import_jsx_runtime9 = require("react/jsx-runtime");
756
+ var asRecord = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : {};
757
+ function recordValueText(value) {
758
+ if (value === void 0 || value === null || value === "") return "\u2014";
759
+ if (typeof value === "boolean") return value ? "Yes" : "No";
760
+ if (Array.isArray(value)) return value.length === 0 ? "None" : value.map((v) => typeof v === "string" ? v : JSON.stringify(v)).join(", ");
761
+ if (typeof value === "object") return JSON.stringify(value);
762
+ return String(value);
763
+ }
764
+ function recordRows(node, keyLabels) {
765
+ const oldRec = asRecord(node.oldValue);
766
+ const newRec = asRecord(node.newValue);
767
+ const known = Object.keys(keyLabels);
768
+ const extra = [.../* @__PURE__ */ new Set([...Object.keys(oldRec), ...Object.keys(newRec)])].filter((k) => !known.includes(k)).sort();
769
+ return [...known, ...extra].filter((key) => key in oldRec || key in newRec).map((key) => {
770
+ const oldText = recordValueText(oldRec[key]);
771
+ const newText = recordValueText(newRec[key]);
772
+ return { key, label: keyLabels[key] ?? (0, import_text_case2.humanizeIdentifier)(key), oldText, newText, changed: oldText !== newText };
773
+ });
774
+ }
775
+ function createRecordFieldsAdapter(spec) {
776
+ function RecordFieldsDiff({ node }) {
777
+ const rows = recordRows(node, spec.keyLabels);
778
+ if (rows.length === 0) {
779
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
780
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-3 py-1.5 border-r border-border" }),
781
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground", children: "Nothing set" }),
782
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-3 py-1.5 text-muted-foreground", children: "Nothing set" })
783
+ ] });
784
+ }
785
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: rows.map((r) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { "data-diff-record-key": r.key, className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
786
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8", children: r.label }),
787
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: (0, import_design_system6.cn)("px-3 py-1.5 border-r border-border whitespace-pre-wrap break-words", r.changed ? "bg-destructive/15 text-destructive-ink" : "text-foreground/80"), children: r.oldText }),
788
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: (0, import_design_system6.cn)("px-3 py-1.5 whitespace-pre-wrap break-words", r.changed ? "bg-success/15 text-success-ink" : "text-foreground/80"), children: r.newText })
789
+ ] }, r.key)) });
790
+ }
791
+ return {
792
+ label: spec.label,
793
+ icon: spec.icon,
794
+ renderDiff: RecordFieldsDiff,
795
+ toSummaryText: (node) => {
796
+ const changed = recordRows(node, spec.keyLabels).filter((r) => r.changed);
797
+ if (changed.length === 1) {
798
+ const c = changed[0];
799
+ return `${c.label}: ${c.oldText} \u2192 ${c.newText}`;
800
+ }
801
+ return changed.length === 0 ? `${spec.label} unchanged` : `${changed.length} ${spec.label.toLowerCase()} values changed`;
802
+ }
803
+ };
804
+ }
805
+ var SkillConfigAdapter = createRecordFieldsAdapter({
806
+ label: "Skill Configuration",
807
+ keyLabels: { included: "Always included", listed: "Listed", forbidden: "Never used", disabled: "Skills turned off" }
808
+ });
809
+ var UiGatesAdapter = createRecordFieldsAdapter({
810
+ label: "UI Gates",
811
+ keyLabels: { image_urls: "Image links", file_urls: "File links", youtube_videos: "YouTube videos", tools: "Tools" }
812
+ });
813
+ var MatrxDirectivesAdapter = createRecordFieldsAdapter({
814
+ label: "Matrx Directives",
815
+ keyLabels: { actions: "Actions", apply_policy: "Apply policy", auto_apply: "Auto-apply all", allow: "Auto-apply only", directive: "Legacy directive" }
816
+ });
817
+
818
+ // versions/react/adapters/SettingsAdapter.tsx
819
+ var import_design_system7 = require("@ai-matrx/design-system");
820
+ var import_structural2 = require("@ai-matrx/diff/structural");
821
+ var import_text_case3 = require("@ai-matrx/kit/text-case");
822
+ var import_jsx_runtime10 = require("react/jsx-runtime");
759
823
  function SettingsDiffRenderer({ node }) {
760
824
  const entries = node.children ?? buildEntries();
761
825
  function buildEntries() {
@@ -772,20 +836,20 @@ function SettingsDiffRenderer({ node }) {
772
836
  newValue: newSettings[key]
773
837
  }));
774
838
  }
775
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: entries.map((child) => {
839
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: entries.map((child) => {
776
840
  const oldVal = child.oldValue != null ? (0, import_structural2.formatValue)(child.oldValue) : "\u2014";
777
841
  const newVal = child.newValue != null ? (0, import_structural2.formatValue)(child.newValue) : "\u2014";
778
842
  const changed = child.changeType !== "unchanged";
779
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
843
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
780
844
  "div",
781
845
  {
782
846
  className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
783
847
  children: [
784
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8", children: (0, import_text_case2.humanizeIdentifier)(child.key) }),
785
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
848
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8", children: (0, import_text_case3.humanizeIdentifier)(child.key) }),
849
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
786
850
  "div",
787
851
  {
788
- className: (0, import_design_system6.cn)(
852
+ className: (0, import_design_system7.cn)(
789
853
  "px-3 py-1.5 border-r border-border",
790
854
  changed && child.changeType !== "added" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "text-foreground/80",
791
855
  child.changeType === "added" ? "text-muted-foreground/50" : ""
@@ -793,10 +857,10 @@ function SettingsDiffRenderer({ node }) {
793
857
  children: oldVal
794
858
  }
795
859
  ),
796
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
860
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
797
861
  "div",
798
862
  {
799
- className: (0, import_design_system6.cn)(
863
+ className: (0, import_design_system7.cn)(
800
864
  "px-3 py-1.5",
801
865
  changed && child.changeType !== "removed" ? "bg-success/10 text-success-ink bg-success/15" : "text-foreground/80",
802
866
  child.changeType === "removed" ? "text-muted-foreground/50" : ""
@@ -828,8 +892,8 @@ var SettingsAdapter = {
828
892
  };
829
893
 
830
894
  // versions/react/adapters/ToolsAdapter.tsx
831
- var import_design_system7 = require("@ai-matrx/design-system");
832
- var import_jsx_runtime10 = require("react/jsx-runtime");
895
+ var import_design_system8 = require("@ai-matrx/design-system");
896
+ var import_jsx_runtime11 = require("react/jsx-runtime");
833
897
  function resolveTool(id, enrichment) {
834
898
  return enrichment?.resolveToolId(id) ?? id;
835
899
  }
@@ -842,39 +906,39 @@ function ToolsDiffRenderer({ node, enrichment }) {
842
906
  const oldTools = Array.isArray(node.oldValue) ? node.oldValue : [];
843
907
  const newTools = Array.isArray(node.newValue) ? node.newValue : [];
844
908
  const allToolIds = [.../* @__PURE__ */ new Set([...oldTools, ...newTools])];
845
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: allToolIds.map((id) => {
909
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: allToolIds.map((id) => {
846
910
  const inOld = oldTools.includes(id);
847
911
  const inNew = newTools.includes(id);
848
912
  const name = resolveTool(id, enrichment);
849
913
  const status = inOld && inNew ? "unchanged" : inOld ? "removed" : "added";
850
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
914
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
851
915
  "div",
852
916
  {
853
917
  className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
854
918
  children: [
855
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToolRef, { toolId: id, name: name === id ? void 0 : name, showId: true }) }),
856
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
919
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToolRef, { toolId: id, name: name === id ? void 0 : name }) }),
920
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
857
921
  "div",
858
922
  {
859
- className: (0, import_design_system7.cn)(
923
+ className: (0, import_design_system8.cn)(
860
924
  "px-3 py-1.5 border-r border-border",
861
925
  status === "removed" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "",
862
926
  status === "added" ? "text-muted-foreground/50" : "",
863
927
  status === "unchanged" ? "text-foreground/80" : ""
864
928
  ),
865
- children: inOld ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToolRef, { toolId: id, name: name === id ? void 0 : name }) : "\u2014"
929
+ children: inOld ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToolRef, { toolId: id, name: name === id ? void 0 : name }) : "\u2014"
866
930
  }
867
931
  ),
868
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
932
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
869
933
  "div",
870
934
  {
871
- className: (0, import_design_system7.cn)(
935
+ className: (0, import_design_system8.cn)(
872
936
  "px-3 py-1.5",
873
937
  status === "added" ? "bg-success/10 text-success-ink bg-success/15" : "",
874
938
  status === "removed" ? "text-muted-foreground/50" : "",
875
939
  status === "unchanged" ? "text-foreground/80" : ""
876
940
  ),
877
- children: inNew ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToolRef, { toolId: id, name: name === id ? void 0 : name }) : "\u2014"
941
+ children: inNew ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ToolRef, { toolId: id, name: name === id ? void 0 : name }) : "\u2014"
878
942
  }
879
943
  )
880
944
  ]
@@ -906,10 +970,10 @@ var ToolsAdapter = {
906
970
  };
907
971
 
908
972
  // versions/react/adapters/VariablesAdapter.tsx
909
- var import_design_system8 = require("@ai-matrx/design-system");
973
+ var import_design_system9 = require("@ai-matrx/design-system");
910
974
  var import_structural3 = require("@ai-matrx/diff/structural");
911
975
  var import_react5 = require("@ai-matrx/diff/react");
912
- var import_jsx_runtime11 = require("react/jsx-runtime");
976
+ var import_jsx_runtime12 = require("react/jsx-runtime");
913
977
  function formatVar(v) {
914
978
  if (!v) return "\u2014";
915
979
  const parts = [`{{${v.name}}}`];
@@ -923,25 +987,25 @@ ${v.helpText}`);
923
987
  }
924
988
  function VariablesDiffRenderer({ node }) {
925
989
  if (node.children && node.children.length > 0) {
926
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: node.children.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(VariableRow, { child }, child.key ?? i)) });
990
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: node.children.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(VariableRow, { child }, child.key ?? i)) });
927
991
  }
928
992
  const oldVars = Array.isArray(node.oldValue) ? node.oldValue : [];
929
993
  const newVars = Array.isArray(node.newValue) ? node.newValue : [];
930
994
  const maxLen = Math.max(oldVars.length, newVars.length);
931
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: Array.from({ length: maxLen }, (_, i) => {
995
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: Array.from({ length: maxLen }, (_, i) => {
932
996
  const oldVar = oldVars[i];
933
997
  const newVar = newVars[i];
934
998
  const changed = JSON.stringify(oldVar) !== JSON.stringify(newVar);
935
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
999
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
936
1000
  "div",
937
1001
  {
938
1002
  className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
939
1003
  children: [
940
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: newVar?.name ?? oldVar?.name ?? `#${i + 1}` }),
941
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1004
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: newVar?.name ?? oldVar?.name ?? `#${i + 1}` }),
1005
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
942
1006
  "div",
943
1007
  {
944
- className: (0, import_design_system8.cn)(
1008
+ className: (0, import_design_system9.cn)(
945
1009
  "px-3 py-1.5 border-r border-border whitespace-pre-wrap",
946
1010
  changed && oldVar ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "text-foreground/80",
947
1011
  !oldVar ? "text-muted-foreground/50" : ""
@@ -949,10 +1013,10 @@ function VariablesDiffRenderer({ node }) {
949
1013
  children: formatVar(oldVar)
950
1014
  }
951
1015
  ),
952
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1016
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
953
1017
  "div",
954
1018
  {
955
- className: (0, import_design_system8.cn)(
1019
+ className: (0, import_design_system9.cn)(
956
1020
  "px-3 py-1.5 whitespace-pre-wrap",
957
1021
  changed && newVar ? "bg-success/10 text-success-ink bg-success/15" : "text-foreground/80",
958
1022
  !newVar ? "text-muted-foreground/50" : ""
@@ -974,18 +1038,18 @@ function VariableRow({ child }) {
974
1038
  const oldText = formatVar(oldVar);
975
1039
  const newText = formatVar(newVar);
976
1040
  if (oldText !== "" && newText !== "") {
977
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30", children: [
978
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
979
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "min-w-0 overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react5.InlineTextDiff, { original: oldText, modified: newText }) })
1041
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30", children: [
1042
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
1043
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "min-w-0 overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.InlineTextDiff, { original: oldText, modified: newText }) })
980
1044
  ] });
981
1045
  }
982
1046
  }
983
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
984
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
985
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1047
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
1048
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
1049
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
986
1050
  "div",
987
1051
  {
988
- className: (0, import_design_system8.cn)(
1052
+ className: (0, import_design_system9.cn)(
989
1053
  "px-3 py-1.5 border-r border-border whitespace-pre-wrap",
990
1054
  child.changeType === "removed" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "",
991
1055
  child.changeType === "modified" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "",
@@ -995,10 +1059,10 @@ function VariableRow({ child }) {
995
1059
  children: formatVar(oldVar)
996
1060
  }
997
1061
  ),
998
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1062
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
999
1063
  "div",
1000
1064
  {
1001
- className: (0, import_design_system8.cn)(
1065
+ className: (0, import_design_system9.cn)(
1002
1066
  "px-3 py-1.5 whitespace-pre-wrap",
1003
1067
  child.changeType === "added" ? "bg-success/10 text-success-ink bg-success/15" : "",
1004
1068
  child.changeType === "modified" ? "bg-success/10 text-success-ink bg-success/15" : "",
@@ -1029,7 +1093,7 @@ var VariablesAdapter = {
1029
1093
  };
1030
1094
 
1031
1095
  // versions/react/AgentDiffViewer.tsx
1032
- var import_jsx_runtime12 = require("react/jsx-runtime");
1096
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1033
1097
  function buildAgentAdapterRegistry() {
1034
1098
  const registry = (0, import_react7.createAdapterRegistry)();
1035
1099
  registry.register("messages", MessagesAdapter);
@@ -1054,9 +1118,9 @@ function buildAgentAdapterRegistry() {
1054
1118
  registry.register("ragAwarenessMode", { ...import_react7.TextFieldAdapter, label: "Knowledge Awareness Mode" });
1055
1119
  registry.register("modelTiers", ModelTiersAdapter);
1056
1120
  registry.register("outputSchema", { ...import_react7.JsonObjectAdapter, label: "Output Schema" });
1057
- registry.register("skillConfig", { ...import_react7.JsonObjectAdapter, label: "Skill Configuration" });
1058
- registry.register("uiGates", { ...import_react7.JsonObjectAdapter, label: "UI Gates" });
1059
- registry.register("matrxDirectives", { ...import_react7.JsonObjectAdapter, label: "Matrx Directives" });
1121
+ registry.register("skillConfig", SkillConfigAdapter);
1122
+ registry.register("uiGates", UiGatesAdapter);
1123
+ registry.register("matrxDirectives", MatrxDirectivesAdapter);
1060
1124
  return registry;
1061
1125
  }
1062
1126
  function AgentDiffViewer({
@@ -1072,7 +1136,7 @@ function AgentDiffViewer({
1072
1136
  }) {
1073
1137
  const adapters = (0, import_react6.useMemo)(() => buildAgentAdapterRegistry(), []);
1074
1138
  const diffResult = (0, import_react6.useMemo)(() => compareAgentDefinitions(oldAgent, newAgent).diffResult, [oldAgent, newAgent]);
1075
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AgentDiffRefsProvider, { refs, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1139
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AgentDiffRefsProvider, { refs, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1076
1140
  import_react7.DiffViewerShell,
1077
1141
  {
1078
1142
  diffResult,
@@ -1092,11 +1156,11 @@ function AgentDiffViewer({
1092
1156
  // versions/react/VersionHistoryTimeline.tsx
1093
1157
  var import_react8 = require("react");
1094
1158
  var import_controls2 = require("@ai-matrx/design-system/controls");
1095
- var import_design_system9 = require("@ai-matrx/design-system");
1096
- var import_data_table = require("@ai-matrx/design-system/data-table");
1097
1159
  var import_design_system10 = require("@ai-matrx/design-system");
1098
- var import_text_case3 = require("@ai-matrx/kit/text-case");
1099
- var import_jsx_runtime13 = require("react/jsx-runtime");
1160
+ var import_data_table = require("@ai-matrx/design-system/data-table");
1161
+ var import_design_system11 = require("@ai-matrx/design-system");
1162
+ var import_text_case4 = require("@ai-matrx/kit/text-case");
1163
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1100
1164
  var SILENT = { success: () => {
1101
1165
  }, error: () => {
1102
1166
  } };
@@ -1128,18 +1192,18 @@ function VersionHistoryTimeline({
1128
1192
  return {
1129
1193
  number: version.version_number,
1130
1194
  versionId: version.version_id,
1131
- idCell: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system10.RecordId, { value: version.version_id, label: "Version" }),
1195
+ idCell: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system11.RecordId, { value: version.version_id, label: "Version" }),
1132
1196
  at: version.changed_at,
1133
1197
  note: version.change_note ?? null,
1134
1198
  loaded: enriched ? version.snapshotLoaded : false,
1135
- changes: enriched ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(VersionChanges, { version, ports: breakPorts }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1", children: [
1136
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ContractBreak, { version, ports: breakPorts }),
1137
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: "Not loaded" })
1199
+ changes: enriched ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(VersionChanges, { version, ports: breakPorts }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-1", children: [
1200
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContractBreak, { version, ports: breakPorts }),
1201
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-muted-foreground", children: "Not loaded" })
1138
1202
  ] }),
1139
- changesText: changedFields.map((n) => (0, import_text_case3.humanizeIdentifier)(n.key) || n.key).join(", ") || null
1203
+ changesText: changedFields.map((n) => (0, import_text_case4.humanizeIdentifier)(n.key) || n.key).join(", ") || null
1140
1204
  };
1141
1205
  });
1142
- const timeline = (enriched) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1206
+ const timeline = (enriched) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1143
1207
  import_data_table.MatrxVersionTimeline,
1144
1208
  {
1145
1209
  tableId: `agent.${agentId}.versions`,
@@ -1152,23 +1216,23 @@ function VersionHistoryTimeline({
1152
1216
  }
1153
1217
  );
1154
1218
  if (versions.length === 0) {
1155
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center justify-center py-12 type-body text-muted-foreground", children: "No version history" });
1219
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center justify-center py-12 type-body text-muted-foreground", children: "No version history" });
1156
1220
  }
1157
1221
  if (!hasEnrichedData && !enrichLoading) {
1158
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 gap-4", children: [
1159
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "text-center", children: [
1160
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "type-title mb-1", children: [
1222
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 gap-4", children: [
1223
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "text-center", children: [
1224
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "type-title mb-1", children: [
1161
1225
  versions.length,
1162
1226
  " version",
1163
1227
  versions.length !== 1 ? "s" : "",
1164
1228
  " ",
1165
1229
  "available"
1166
1230
  ] }),
1167
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "type-secondary text-muted-foreground max-w-[320px]", children: "Load history to see what changed in each version" })
1231
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "type-secondary text-muted-foreground max-w-[320px]", children: "Load history to see what changed in each version" })
1168
1232
  ] }),
1169
- failedVersions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-start gap-2 max-w-[420px] px-3 py-2 rounded-md border border-destructive/30 bg-destructive/10 type-secondary text-destructive-ink", children: [
1170
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AlertTriangle, { className: "w-3.5 h-3.5 mt-0.5 shrink-0" }),
1171
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
1233
+ failedVersions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-start gap-2 max-w-[420px] px-3 py-2 rounded-md border border-destructive/30 bg-destructive/10 type-secondary text-destructive-ink", children: [
1234
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(AlertTriangle, { className: "w-3.5 h-3.5 mt-0.5 shrink-0" }),
1235
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
1172
1236
  failedVersions.length,
1173
1237
  " of ",
1174
1238
  progress.total,
@@ -1178,31 +1242,31 @@ function VersionHistoryTimeline({
1178
1242
  failureReason ? `: ${failureReason}` : ".",
1179
1243
  " Retrying loads the ones that are readable."
1180
1244
  ] }),
1181
- ErrorMenu ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ErrorMenu, {}) : null
1245
+ ErrorMenu ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ErrorMenu, {}) : null
1182
1246
  ] }),
1183
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1247
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1184
1248
  import_controls2.Button,
1185
1249
  {
1186
- icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Atom, {}),
1250
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Atom, {}),
1187
1251
  variant: "primary",
1188
1252
  onClick: () => void fetchEnrichedHistory(),
1189
1253
  children: "Load Full History"
1190
1254
  }
1191
1255
  ),
1192
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-full mt-4 border-t border-border pt-4 px-4", children: timeline(false) }),
1256
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-full mt-4 border-t border-border pt-4 px-4", children: timeline(false) }),
1193
1257
  footer
1194
1258
  ] });
1195
1259
  }
1196
1260
  if (enrichLoading) {
1197
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 gap-3", children: [
1198
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LoaderSpin, { className: "h-8 w-8 text-primary" }),
1199
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "type-body text-muted-foreground", children: [
1261
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col items-center justify-center py-16 gap-3", children: [
1262
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LoaderSpin, { className: "h-8 w-8 text-primary" }),
1263
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "type-body text-muted-foreground", children: [
1200
1264
  "Loading version details... ",
1201
1265
  progress.fetched,
1202
1266
  "/",
1203
1267
  progress.total
1204
1268
  ] }),
1205
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "w-48 h-1.5 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1269
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-48 h-1.5 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1206
1270
  "div",
1207
1271
  {
1208
1272
  className: "h-full bg-primary rounded-full transition-all duration-300",
@@ -1213,43 +1277,43 @@ function VersionHistoryTimeline({
1213
1277
  ) })
1214
1278
  ] });
1215
1279
  }
1216
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "px-4 py-3", children: [
1217
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center justify-between mb-3 pb-3 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "type-secondary text-muted-foreground", children: [
1280
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "px-4 py-3", children: [
1281
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center justify-between mb-3 pb-3 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "type-secondary text-muted-foreground", children: [
1218
1282
  enrichedVersions.filter((v) => v.snapshotLoaded).length,
1219
1283
  " of",
1220
1284
  " ",
1221
1285
  versions.length,
1222
1286
  " versions loaded",
1223
- failedVersions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "text-destructive", children: [
1287
+ failedVersions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "text-destructive", children: [
1224
1288
  " ",
1225
1289
  "\xB7 ",
1226
1290
  failedVersions.length,
1227
1291
  " could not be read",
1228
- ErrorMenu ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ErrorMenu, { error: failureReason ?? "Some version snapshots could not be read" }) : null
1292
+ ErrorMenu ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ErrorMenu, { error: failureReason ?? "Some version snapshots could not be read" }) : null
1229
1293
  ] })
1230
1294
  ] }) }),
1231
1295
  timeline(true),
1232
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-[50dvh]" }),
1296
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-[50dvh]" }),
1233
1297
  footer
1234
1298
  ] });
1235
1299
  }
1236
1300
  function VersionChanges({ version, ports }) {
1237
1301
  const diff = version.diffSummary;
1238
1302
  const changedFields = diff?.root.filter((n) => n.changeType !== "unchanged") ?? [];
1239
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-1", children: [
1240
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ContractBreak, { version, ports }),
1241
- diff && changedFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_controls2.ChipSet, { children: changedFields.map((n) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1303
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-1", children: [
1304
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ContractBreak, { version, ports }),
1305
+ diff && changedFields.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_controls2.ChipSet, { children: changedFields.map((n) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1242
1306
  import_controls2.Chip,
1243
1307
  {
1244
1308
  tone: n.changeType === "added" ? "success" : n.changeType === "removed" ? "destructive" : "warning",
1245
- label: `${(0, import_text_case3.humanizeIdentifier)(n.key) || n.key}${n.changeType === "added" ? " +" : n.changeType === "removed" ? " \u2212" : ""}`
1309
+ label: `${(0, import_text_case4.humanizeIdentifier)(n.key) || n.key}${n.changeType === "added" ? " +" : n.changeType === "removed" ? " \u2212" : ""}`
1246
1310
  },
1247
1311
  n.key
1248
- )) }) : diff && changedFields.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: "No changes" }) : !version.snapshotLoaded ? (
1312
+ )) }) : diff && changedFields.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-muted-foreground", children: "No changes" }) : !version.snapshotLoaded ? (
1249
1313
  // An unread snapshot says so — never a lone contract-break button where the
1250
1314
  // changes belong (walk-core 2026-10-18: v9–v2 showed only the shield).
1251
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: "Not loaded" })
1252
- ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-muted-foreground", children: "First version" })
1315
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-muted-foreground", children: "Not loaded" })
1316
+ ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-muted-foreground", children: "First version" })
1253
1317
  ] });
1254
1318
  }
1255
1319
  function ContractBreak({ version, ports }) {
@@ -1275,8 +1339,8 @@ function ContractBreak({ version, ports }) {
1275
1339
  }
1276
1340
  const autoChange = version.contract_change || null;
1277
1341
  const effectiveChange = declared ?? autoChange;
1278
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
1279
- effectiveChange && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1342
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
1343
+ effectiveChange && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1280
1344
  import_controls2.Badge,
1281
1345
  {
1282
1346
  tone: "warning",
@@ -1284,21 +1348,21 @@ function ContractBreak({ version, ports }) {
1284
1348
  children: `Contract: ${effectiveChange}${declared ? " (declared)" : ""}`
1285
1349
  }
1286
1350
  ),
1287
- ports.onDeclare ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system9.DropdownMenu, { children: [
1288
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system9.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1351
+ ports.onDeclare ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system10.DropdownMenu, { children: [
1352
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system10.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1289
1353
  import_controls2.Button,
1290
1354
  {
1291
- icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ShieldAlert, {}),
1355
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ShieldAlert, {}),
1292
1356
  "aria-label": "Mark this version as a contract break the hashes cannot see (e.g. a prompt-level output change)",
1293
1357
  variant: "quiet",
1294
1358
  title: "Mark this version as a contract break the hashes cannot see (e.g. a prompt-level output change)"
1295
1359
  }
1296
1360
  ) }),
1297
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system9.DropdownMenuContent, { align: "start", children: [
1298
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system9.DropdownMenuItem, { onClick: () => void declareBreak("input"), children: "Declare input break" }),
1299
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system9.DropdownMenuItem, { onClick: () => void declareBreak("output"), children: "Declare output break" }),
1300
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system9.DropdownMenuItem, { onClick: () => void declareBreak("both"), children: "Declare input + output break" }),
1301
- declared && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system9.DropdownMenuItem, { onClick: () => void declareBreak(null), children: "Clear declaration" })
1361
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system10.DropdownMenuContent, { align: "start", children: [
1362
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system10.DropdownMenuItem, { onClick: () => void declareBreak("input"), children: "Declare input break" }),
1363
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system10.DropdownMenuItem, { onClick: () => void declareBreak("output"), children: "Declare output break" }),
1364
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system10.DropdownMenuItem, { onClick: () => void declareBreak("both"), children: "Declare input + output break" }),
1365
+ declared && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system10.DropdownMenuItem, { onClick: () => void declareBreak(null), children: "Clear declaration" })
1302
1366
  ] })
1303
1367
  ] }) : null
1304
1368
  ] });