@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.
- package/CHANGELOG.md +12 -6
- 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/generated/stream-events.d.cts +27 -2
- package/dist/generated/stream-events.d.ts +27 -2
- 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/models/index.cjs +23 -0
- package/dist/models/index.d.cts +25 -1
- package/dist/models/index.d.ts +25 -1
- package/dist/models/index.js +23 -0
- package/dist/versions/index.cjs +11 -0
- package/dist/versions/index.d.cts +15 -2
- package/dist/versions/index.d.ts +15 -2
- package/dist/versions/index.js +11 -0
- package/dist/versions/react/index.cjs +159 -95
- package/dist/versions/react/index.js +158 -94
- package/package.json +6 -6
|
@@ -630,7 +630,6 @@ function ModelDiffRenderer({ node, enrichment }) {
|
|
|
630
630
|
{
|
|
631
631
|
modelId: oldId,
|
|
632
632
|
name: oldName,
|
|
633
|
-
showId: true,
|
|
634
633
|
className: cn5(
|
|
635
634
|
node.changeType !== "unchanged" ? "text-destructive" : "text-foreground/80"
|
|
636
635
|
)
|
|
@@ -650,7 +649,6 @@ function ModelDiffRenderer({ node, enrichment }) {
|
|
|
650
649
|
{
|
|
651
650
|
modelId: newId,
|
|
652
651
|
name: newName,
|
|
653
|
-
showId: true,
|
|
654
652
|
className: cn5(
|
|
655
653
|
node.changeType !== "unchanged" ? "text-success" : "text-foreground/80"
|
|
656
654
|
)
|
|
@@ -703,7 +701,7 @@ function ModelTierIdentityList({ value }) {
|
|
|
703
701
|
}
|
|
704
702
|
return /* @__PURE__ */ jsx8("span", { className: "flex flex-col gap-1.5", children: identities.map((identity) => /* @__PURE__ */ jsxs8("span", { className: "grid min-w-0 grid-cols-[5rem_minmax(0,1fr)] items-start gap-2", children: [
|
|
705
703
|
/* @__PURE__ */ jsx8("span", { className: "text-muted-foreground", children: identity.role }),
|
|
706
|
-
/* @__PURE__ */ jsx8(ModelRef, { modelId: identity.modelId
|
|
704
|
+
/* @__PURE__ */ jsx8(ModelRef, { modelId: identity.modelId })
|
|
707
705
|
] }, identity.key)) });
|
|
708
706
|
}
|
|
709
707
|
function ModelTiersDiffRenderer({ node }) {
|
|
@@ -728,14 +726,80 @@ var ModelTiersAdapter = {
|
|
|
728
726
|
toSummaryText: (node, enrichment) => `${summarizeTiers(node.oldValue, enrichment)} \u2192 ${summarizeTiers(node.newValue, enrichment)}`
|
|
729
727
|
};
|
|
730
728
|
|
|
731
|
-
// versions/react/adapters/
|
|
729
|
+
// versions/react/adapters/RecordFieldsAdapter.tsx
|
|
732
730
|
import { cn as cn6 } from "@ai-matrx/design-system";
|
|
731
|
+
import { humanizeIdentifier as humanizeIdentifier2 } from "@ai-matrx/kit/text-case";
|
|
732
|
+
import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
733
|
+
var asRecord = (v) => v && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
734
|
+
function recordValueText(value) {
|
|
735
|
+
if (value === void 0 || value === null || value === "") return "\u2014";
|
|
736
|
+
if (typeof value === "boolean") return value ? "Yes" : "No";
|
|
737
|
+
if (Array.isArray(value)) return value.length === 0 ? "None" : value.map((v) => typeof v === "string" ? v : JSON.stringify(v)).join(", ");
|
|
738
|
+
if (typeof value === "object") return JSON.stringify(value);
|
|
739
|
+
return String(value);
|
|
740
|
+
}
|
|
741
|
+
function recordRows(node, keyLabels) {
|
|
742
|
+
const oldRec = asRecord(node.oldValue);
|
|
743
|
+
const newRec = asRecord(node.newValue);
|
|
744
|
+
const known = Object.keys(keyLabels);
|
|
745
|
+
const extra = [.../* @__PURE__ */ new Set([...Object.keys(oldRec), ...Object.keys(newRec)])].filter((k) => !known.includes(k)).sort();
|
|
746
|
+
return [...known, ...extra].filter((key) => key in oldRec || key in newRec).map((key) => {
|
|
747
|
+
const oldText = recordValueText(oldRec[key]);
|
|
748
|
+
const newText = recordValueText(newRec[key]);
|
|
749
|
+
return { key, label: keyLabels[key] ?? humanizeIdentifier2(key), oldText, newText, changed: oldText !== newText };
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
function createRecordFieldsAdapter(spec) {
|
|
753
|
+
function RecordFieldsDiff({ node }) {
|
|
754
|
+
const rows = recordRows(node, spec.keyLabels);
|
|
755
|
+
if (rows.length === 0) {
|
|
756
|
+
return /* @__PURE__ */ jsxs9("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
|
|
757
|
+
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 border-r border-border" }),
|
|
758
|
+
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground", children: "Nothing set" }),
|
|
759
|
+
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 text-muted-foreground", children: "Nothing set" })
|
|
760
|
+
] });
|
|
761
|
+
}
|
|
762
|
+
return /* @__PURE__ */ jsx9(Fragment5, { children: rows.map((r) => /* @__PURE__ */ jsxs9("div", { "data-diff-record-key": r.key, className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
|
|
763
|
+
/* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8", children: r.label }),
|
|
764
|
+
/* @__PURE__ */ jsx9("div", { className: cn6("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 }),
|
|
765
|
+
/* @__PURE__ */ jsx9("div", { className: cn6("px-3 py-1.5 whitespace-pre-wrap break-words", r.changed ? "bg-success/15 text-success-ink" : "text-foreground/80"), children: r.newText })
|
|
766
|
+
] }, r.key)) });
|
|
767
|
+
}
|
|
768
|
+
return {
|
|
769
|
+
label: spec.label,
|
|
770
|
+
icon: spec.icon,
|
|
771
|
+
renderDiff: RecordFieldsDiff,
|
|
772
|
+
toSummaryText: (node) => {
|
|
773
|
+
const changed = recordRows(node, spec.keyLabels).filter((r) => r.changed);
|
|
774
|
+
if (changed.length === 1) {
|
|
775
|
+
const c = changed[0];
|
|
776
|
+
return `${c.label}: ${c.oldText} \u2192 ${c.newText}`;
|
|
777
|
+
}
|
|
778
|
+
return changed.length === 0 ? `${spec.label} unchanged` : `${changed.length} ${spec.label.toLowerCase()} values changed`;
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
var SkillConfigAdapter = createRecordFieldsAdapter({
|
|
783
|
+
label: "Skill Configuration",
|
|
784
|
+
keyLabels: { included: "Always included", listed: "Listed", forbidden: "Never used", disabled: "Skills turned off" }
|
|
785
|
+
});
|
|
786
|
+
var UiGatesAdapter = createRecordFieldsAdapter({
|
|
787
|
+
label: "UI Gates",
|
|
788
|
+
keyLabels: { image_urls: "Image links", file_urls: "File links", youtube_videos: "YouTube videos", tools: "Tools" }
|
|
789
|
+
});
|
|
790
|
+
var MatrxDirectivesAdapter = createRecordFieldsAdapter({
|
|
791
|
+
label: "Matrx Directives",
|
|
792
|
+
keyLabels: { actions: "Actions", apply_policy: "Apply policy", auto_apply: "Auto-apply all", allow: "Auto-apply only", directive: "Legacy directive" }
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
// versions/react/adapters/SettingsAdapter.tsx
|
|
796
|
+
import { cn as cn7 } from "@ai-matrx/design-system";
|
|
733
797
|
import {
|
|
734
798
|
filterChanges,
|
|
735
799
|
formatValue
|
|
736
800
|
} from "@ai-matrx/diff/structural";
|
|
737
|
-
import { humanizeIdentifier as
|
|
738
|
-
import { Fragment as
|
|
801
|
+
import { humanizeIdentifier as humanizeIdentifier3 } from "@ai-matrx/kit/text-case";
|
|
802
|
+
import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
739
803
|
function SettingsDiffRenderer({ node }) {
|
|
740
804
|
const entries = node.children ?? buildEntries();
|
|
741
805
|
function buildEntries() {
|
|
@@ -752,20 +816,20 @@ function SettingsDiffRenderer({ node }) {
|
|
|
752
816
|
newValue: newSettings[key]
|
|
753
817
|
}));
|
|
754
818
|
}
|
|
755
|
-
return /* @__PURE__ */
|
|
819
|
+
return /* @__PURE__ */ jsx10(Fragment6, { children: entries.map((child) => {
|
|
756
820
|
const oldVal = child.oldValue != null ? formatValue(child.oldValue) : "\u2014";
|
|
757
821
|
const newVal = child.newValue != null ? formatValue(child.newValue) : "\u2014";
|
|
758
822
|
const changed = child.changeType !== "unchanged";
|
|
759
|
-
return /* @__PURE__ */
|
|
823
|
+
return /* @__PURE__ */ jsxs10(
|
|
760
824
|
"div",
|
|
761
825
|
{
|
|
762
826
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
763
827
|
children: [
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ jsx10("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8", children: humanizeIdentifier3(child.key) }),
|
|
829
|
+
/* @__PURE__ */ jsx10(
|
|
766
830
|
"div",
|
|
767
831
|
{
|
|
768
|
-
className:
|
|
832
|
+
className: cn7(
|
|
769
833
|
"px-3 py-1.5 border-r border-border",
|
|
770
834
|
changed && child.changeType !== "added" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "text-foreground/80",
|
|
771
835
|
child.changeType === "added" ? "text-muted-foreground/50" : ""
|
|
@@ -773,10 +837,10 @@ function SettingsDiffRenderer({ node }) {
|
|
|
773
837
|
children: oldVal
|
|
774
838
|
}
|
|
775
839
|
),
|
|
776
|
-
/* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ jsx10(
|
|
777
841
|
"div",
|
|
778
842
|
{
|
|
779
|
-
className:
|
|
843
|
+
className: cn7(
|
|
780
844
|
"px-3 py-1.5",
|
|
781
845
|
changed && child.changeType !== "removed" ? "bg-success/10 text-success-ink bg-success/15" : "text-foreground/80",
|
|
782
846
|
child.changeType === "removed" ? "text-muted-foreground/50" : ""
|
|
@@ -808,8 +872,8 @@ var SettingsAdapter = {
|
|
|
808
872
|
};
|
|
809
873
|
|
|
810
874
|
// versions/react/adapters/ToolsAdapter.tsx
|
|
811
|
-
import { cn as
|
|
812
|
-
import { Fragment as
|
|
875
|
+
import { cn as cn8 } from "@ai-matrx/design-system";
|
|
876
|
+
import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
813
877
|
function resolveTool(id, enrichment) {
|
|
814
878
|
return enrichment?.resolveToolId(id) ?? id;
|
|
815
879
|
}
|
|
@@ -822,39 +886,39 @@ function ToolsDiffRenderer({ node, enrichment }) {
|
|
|
822
886
|
const oldTools = Array.isArray(node.oldValue) ? node.oldValue : [];
|
|
823
887
|
const newTools = Array.isArray(node.newValue) ? node.newValue : [];
|
|
824
888
|
const allToolIds = [.../* @__PURE__ */ new Set([...oldTools, ...newTools])];
|
|
825
|
-
return /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ jsx11(Fragment7, { children: allToolIds.map((id) => {
|
|
826
890
|
const inOld = oldTools.includes(id);
|
|
827
891
|
const inNew = newTools.includes(id);
|
|
828
892
|
const name = resolveTool(id, enrichment);
|
|
829
893
|
const status = inOld && inNew ? "unchanged" : inOld ? "removed" : "added";
|
|
830
|
-
return /* @__PURE__ */
|
|
894
|
+
return /* @__PURE__ */ jsxs11(
|
|
831
895
|
"div",
|
|
832
896
|
{
|
|
833
897
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
834
898
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ jsx11("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 min-w-0", children: /* @__PURE__ */ jsx11(ToolRef, { toolId: id, name: name === id ? void 0 : name }) }),
|
|
900
|
+
/* @__PURE__ */ jsx11(
|
|
837
901
|
"div",
|
|
838
902
|
{
|
|
839
|
-
className:
|
|
903
|
+
className: cn8(
|
|
840
904
|
"px-3 py-1.5 border-r border-border",
|
|
841
905
|
status === "removed" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "",
|
|
842
906
|
status === "added" ? "text-muted-foreground/50" : "",
|
|
843
907
|
status === "unchanged" ? "text-foreground/80" : ""
|
|
844
908
|
),
|
|
845
|
-
children: inOld ? /* @__PURE__ */
|
|
909
|
+
children: inOld ? /* @__PURE__ */ jsx11(ToolRef, { toolId: id, name: name === id ? void 0 : name }) : "\u2014"
|
|
846
910
|
}
|
|
847
911
|
),
|
|
848
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ jsx11(
|
|
849
913
|
"div",
|
|
850
914
|
{
|
|
851
|
-
className:
|
|
915
|
+
className: cn8(
|
|
852
916
|
"px-3 py-1.5",
|
|
853
917
|
status === "added" ? "bg-success/10 text-success-ink bg-success/15" : "",
|
|
854
918
|
status === "removed" ? "text-muted-foreground/50" : "",
|
|
855
919
|
status === "unchanged" ? "text-foreground/80" : ""
|
|
856
920
|
),
|
|
857
|
-
children: inNew ? /* @__PURE__ */
|
|
921
|
+
children: inNew ? /* @__PURE__ */ jsx11(ToolRef, { toolId: id, name: name === id ? void 0 : name }) : "\u2014"
|
|
858
922
|
}
|
|
859
923
|
)
|
|
860
924
|
]
|
|
@@ -886,12 +950,12 @@ var ToolsAdapter = {
|
|
|
886
950
|
};
|
|
887
951
|
|
|
888
952
|
// versions/react/adapters/VariablesAdapter.tsx
|
|
889
|
-
import { cn as
|
|
953
|
+
import { cn as cn9 } from "@ai-matrx/design-system";
|
|
890
954
|
import {
|
|
891
955
|
formatValue as formatValue2
|
|
892
956
|
} from "@ai-matrx/diff/structural";
|
|
893
957
|
import { InlineTextDiff as InlineTextDiff4 } from "@ai-matrx/diff/react";
|
|
894
|
-
import { Fragment as
|
|
958
|
+
import { Fragment as Fragment8, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
895
959
|
function formatVar(v) {
|
|
896
960
|
if (!v) return "\u2014";
|
|
897
961
|
const parts = [`{{${v.name}}}`];
|
|
@@ -905,25 +969,25 @@ ${v.helpText}`);
|
|
|
905
969
|
}
|
|
906
970
|
function VariablesDiffRenderer({ node }) {
|
|
907
971
|
if (node.children && node.children.length > 0) {
|
|
908
|
-
return /* @__PURE__ */
|
|
972
|
+
return /* @__PURE__ */ jsx12(Fragment8, { children: node.children.map((child, i) => /* @__PURE__ */ jsx12(VariableRow, { child }, child.key ?? i)) });
|
|
909
973
|
}
|
|
910
974
|
const oldVars = Array.isArray(node.oldValue) ? node.oldValue : [];
|
|
911
975
|
const newVars = Array.isArray(node.newValue) ? node.newValue : [];
|
|
912
976
|
const maxLen = Math.max(oldVars.length, newVars.length);
|
|
913
|
-
return /* @__PURE__ */
|
|
977
|
+
return /* @__PURE__ */ jsx12(Fragment8, { children: Array.from({ length: maxLen }, (_, i) => {
|
|
914
978
|
const oldVar = oldVars[i];
|
|
915
979
|
const newVar = newVars[i];
|
|
916
980
|
const changed = JSON.stringify(oldVar) !== JSON.stringify(newVar);
|
|
917
|
-
return /* @__PURE__ */
|
|
981
|
+
return /* @__PURE__ */ jsxs12(
|
|
918
982
|
"div",
|
|
919
983
|
{
|
|
920
984
|
className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30",
|
|
921
985
|
children: [
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
/* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ jsx12("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}` }),
|
|
987
|
+
/* @__PURE__ */ jsx12(
|
|
924
988
|
"div",
|
|
925
989
|
{
|
|
926
|
-
className:
|
|
990
|
+
className: cn9(
|
|
927
991
|
"px-3 py-1.5 border-r border-border whitespace-pre-wrap",
|
|
928
992
|
changed && oldVar ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "text-foreground/80",
|
|
929
993
|
!oldVar ? "text-muted-foreground/50" : ""
|
|
@@ -931,10 +995,10 @@ function VariablesDiffRenderer({ node }) {
|
|
|
931
995
|
children: formatVar(oldVar)
|
|
932
996
|
}
|
|
933
997
|
),
|
|
934
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ jsx12(
|
|
935
999
|
"div",
|
|
936
1000
|
{
|
|
937
|
-
className:
|
|
1001
|
+
className: cn9(
|
|
938
1002
|
"px-3 py-1.5 whitespace-pre-wrap",
|
|
939
1003
|
changed && newVar ? "bg-success/10 text-success-ink bg-success/15" : "text-foreground/80",
|
|
940
1004
|
!newVar ? "text-muted-foreground/50" : ""
|
|
@@ -956,18 +1020,18 @@ function VariableRow({ child }) {
|
|
|
956
1020
|
const oldText = formatVar(oldVar);
|
|
957
1021
|
const newText = formatVar(newVar);
|
|
958
1022
|
if (oldText !== "" && newText !== "") {
|
|
959
|
-
return /* @__PURE__ */
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
1023
|
+
return /* @__PURE__ */ jsxs12("div", { className: "grid grid-cols-[200px_1fr] type-secondary border-t border-border/30", children: [
|
|
1024
|
+
/* @__PURE__ */ jsx12("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
|
|
1025
|
+
/* @__PURE__ */ jsx12("div", { className: "min-w-0 overflow-x-auto", children: /* @__PURE__ */ jsx12(InlineTextDiff4, { original: oldText, modified: newText }) })
|
|
962
1026
|
] });
|
|
963
1027
|
}
|
|
964
1028
|
}
|
|
965
|
-
return /* @__PURE__ */
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1029
|
+
return /* @__PURE__ */ jsxs12("div", { className: "grid grid-cols-[200px_1fr_1fr] type-secondary border-t border-border/30", children: [
|
|
1030
|
+
/* @__PURE__ */ jsx12("div", { className: "px-3 py-1.5 border-r border-border text-muted-foreground pl-8 font-mono", children: "{{" + varName + "}}" }),
|
|
1031
|
+
/* @__PURE__ */ jsx12(
|
|
968
1032
|
"div",
|
|
969
1033
|
{
|
|
970
|
-
className:
|
|
1034
|
+
className: cn9(
|
|
971
1035
|
"px-3 py-1.5 border-r border-border whitespace-pre-wrap",
|
|
972
1036
|
child.changeType === "removed" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "",
|
|
973
1037
|
child.changeType === "modified" ? "bg-destructive/10 text-destructive-ink bg-destructive/15" : "",
|
|
@@ -977,10 +1041,10 @@ function VariableRow({ child }) {
|
|
|
977
1041
|
children: formatVar(oldVar)
|
|
978
1042
|
}
|
|
979
1043
|
),
|
|
980
|
-
/* @__PURE__ */
|
|
1044
|
+
/* @__PURE__ */ jsx12(
|
|
981
1045
|
"div",
|
|
982
1046
|
{
|
|
983
|
-
className:
|
|
1047
|
+
className: cn9(
|
|
984
1048
|
"px-3 py-1.5 whitespace-pre-wrap",
|
|
985
1049
|
child.changeType === "added" ? "bg-success/10 text-success-ink bg-success/15" : "",
|
|
986
1050
|
child.changeType === "modified" ? "bg-success/10 text-success-ink bg-success/15" : "",
|
|
@@ -1011,7 +1075,7 @@ var VariablesAdapter = {
|
|
|
1011
1075
|
};
|
|
1012
1076
|
|
|
1013
1077
|
// versions/react/AgentDiffViewer.tsx
|
|
1014
|
-
import { jsx as
|
|
1078
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1015
1079
|
function buildAgentAdapterRegistry() {
|
|
1016
1080
|
const registry = createAdapterRegistry();
|
|
1017
1081
|
registry.register("messages", MessagesAdapter);
|
|
@@ -1036,9 +1100,9 @@ function buildAgentAdapterRegistry() {
|
|
|
1036
1100
|
registry.register("ragAwarenessMode", { ...TextFieldAdapter, label: "Knowledge Awareness Mode" });
|
|
1037
1101
|
registry.register("modelTiers", ModelTiersAdapter);
|
|
1038
1102
|
registry.register("outputSchema", { ...JsonObjectAdapter, label: "Output Schema" });
|
|
1039
|
-
registry.register("skillConfig",
|
|
1040
|
-
registry.register("uiGates",
|
|
1041
|
-
registry.register("matrxDirectives",
|
|
1103
|
+
registry.register("skillConfig", SkillConfigAdapter);
|
|
1104
|
+
registry.register("uiGates", UiGatesAdapter);
|
|
1105
|
+
registry.register("matrxDirectives", MatrxDirectivesAdapter);
|
|
1042
1106
|
return registry;
|
|
1043
1107
|
}
|
|
1044
1108
|
function AgentDiffViewer({
|
|
@@ -1054,7 +1118,7 @@ function AgentDiffViewer({
|
|
|
1054
1118
|
}) {
|
|
1055
1119
|
const adapters = useMemo(() => buildAgentAdapterRegistry(), []);
|
|
1056
1120
|
const diffResult = useMemo(() => compareAgentDefinitions(oldAgent, newAgent).diffResult, [oldAgent, newAgent]);
|
|
1057
|
-
return /* @__PURE__ */
|
|
1121
|
+
return /* @__PURE__ */ jsx13(AgentDiffRefsProvider, { refs, children: /* @__PURE__ */ jsx13(
|
|
1058
1122
|
DiffViewerShell,
|
|
1059
1123
|
{
|
|
1060
1124
|
diffResult,
|
|
@@ -1084,8 +1148,8 @@ import {
|
|
|
1084
1148
|
MatrxVersionTimeline
|
|
1085
1149
|
} from "@ai-matrx/design-system/data-table";
|
|
1086
1150
|
import { RecordId } from "@ai-matrx/design-system";
|
|
1087
|
-
import { humanizeIdentifier as
|
|
1088
|
-
import { jsx as
|
|
1151
|
+
import { humanizeIdentifier as humanizeIdentifier4 } from "@ai-matrx/kit/text-case";
|
|
1152
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1089
1153
|
var SILENT = { success: () => {
|
|
1090
1154
|
}, error: () => {
|
|
1091
1155
|
} };
|
|
@@ -1117,18 +1181,18 @@ function VersionHistoryTimeline({
|
|
|
1117
1181
|
return {
|
|
1118
1182
|
number: version.version_number,
|
|
1119
1183
|
versionId: version.version_id,
|
|
1120
|
-
idCell: /* @__PURE__ */
|
|
1184
|
+
idCell: /* @__PURE__ */ jsx14(RecordId, { value: version.version_id, label: "Version" }),
|
|
1121
1185
|
at: version.changed_at,
|
|
1122
1186
|
note: version.change_note ?? null,
|
|
1123
1187
|
loaded: enriched ? version.snapshotLoaded : false,
|
|
1124
|
-
changes: enriched ? /* @__PURE__ */
|
|
1125
|
-
/* @__PURE__ */
|
|
1126
|
-
/* @__PURE__ */
|
|
1188
|
+
changes: enriched ? /* @__PURE__ */ jsx14(VersionChanges, { version, ports: breakPorts }) : /* @__PURE__ */ jsxs13("div", { className: "space-y-1", children: [
|
|
1189
|
+
/* @__PURE__ */ jsx14(ContractBreak, { version, ports: breakPorts }),
|
|
1190
|
+
/* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Not loaded" })
|
|
1127
1191
|
] }),
|
|
1128
|
-
changesText: changedFields.map((n) =>
|
|
1192
|
+
changesText: changedFields.map((n) => humanizeIdentifier4(n.key) || n.key).join(", ") || null
|
|
1129
1193
|
};
|
|
1130
1194
|
});
|
|
1131
|
-
const timeline = (enriched) => /* @__PURE__ */
|
|
1195
|
+
const timeline = (enriched) => /* @__PURE__ */ jsx14(
|
|
1132
1196
|
MatrxVersionTimeline,
|
|
1133
1197
|
{
|
|
1134
1198
|
tableId: `agent.${agentId}.versions`,
|
|
@@ -1141,23 +1205,23 @@ function VersionHistoryTimeline({
|
|
|
1141
1205
|
}
|
|
1142
1206
|
);
|
|
1143
1207
|
if (versions.length === 0) {
|
|
1144
|
-
return /* @__PURE__ */
|
|
1208
|
+
return /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-center py-12 type-body text-muted-foreground", children: "No version history" });
|
|
1145
1209
|
}
|
|
1146
1210
|
if (!hasEnrichedData && !enrichLoading) {
|
|
1147
|
-
return /* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col items-center justify-center py-16 gap-4", children: [
|
|
1212
|
+
/* @__PURE__ */ jsxs13("div", { className: "text-center", children: [
|
|
1213
|
+
/* @__PURE__ */ jsxs13("div", { className: "type-title mb-1", children: [
|
|
1150
1214
|
versions.length,
|
|
1151
1215
|
" version",
|
|
1152
1216
|
versions.length !== 1 ? "s" : "",
|
|
1153
1217
|
" ",
|
|
1154
1218
|
"available"
|
|
1155
1219
|
] }),
|
|
1156
|
-
/* @__PURE__ */
|
|
1220
|
+
/* @__PURE__ */ jsx14("p", { className: "type-secondary text-muted-foreground max-w-[320px]", children: "Load history to see what changed in each version" })
|
|
1157
1221
|
] }),
|
|
1158
|
-
failedVersions.length > 0 && /* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1222
|
+
failedVersions.length > 0 && /* @__PURE__ */ jsxs13("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: [
|
|
1223
|
+
/* @__PURE__ */ jsx14(AlertTriangle, { className: "w-3.5 h-3.5 mt-0.5 shrink-0" }),
|
|
1224
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
1161
1225
|
failedVersions.length,
|
|
1162
1226
|
" of ",
|
|
1163
1227
|
progress.total,
|
|
@@ -1167,31 +1231,31 @@ function VersionHistoryTimeline({
|
|
|
1167
1231
|
failureReason ? `: ${failureReason}` : ".",
|
|
1168
1232
|
" Retrying loads the ones that are readable."
|
|
1169
1233
|
] }),
|
|
1170
|
-
ErrorMenu ? /* @__PURE__ */
|
|
1234
|
+
ErrorMenu ? /* @__PURE__ */ jsx14(ErrorMenu, {}) : null
|
|
1171
1235
|
] }),
|
|
1172
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ jsx14(
|
|
1173
1237
|
Button,
|
|
1174
1238
|
{
|
|
1175
|
-
icon: /* @__PURE__ */
|
|
1239
|
+
icon: /* @__PURE__ */ jsx14(Atom, {}),
|
|
1176
1240
|
variant: "primary",
|
|
1177
1241
|
onClick: () => void fetchEnrichedHistory(),
|
|
1178
1242
|
children: "Load Full History"
|
|
1179
1243
|
}
|
|
1180
1244
|
),
|
|
1181
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ jsx14("div", { className: "w-full mt-4 border-t border-border pt-4 px-4", children: timeline(false) }),
|
|
1182
1246
|
footer
|
|
1183
1247
|
] });
|
|
1184
1248
|
}
|
|
1185
1249
|
if (enrichLoading) {
|
|
1186
|
-
return /* @__PURE__ */
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
/* @__PURE__ */
|
|
1250
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col items-center justify-center py-16 gap-3", children: [
|
|
1251
|
+
/* @__PURE__ */ jsx14(LoaderSpin, { className: "h-8 w-8 text-primary" }),
|
|
1252
|
+
/* @__PURE__ */ jsxs13("div", { className: "type-body text-muted-foreground", children: [
|
|
1189
1253
|
"Loading version details... ",
|
|
1190
1254
|
progress.fetched,
|
|
1191
1255
|
"/",
|
|
1192
1256
|
progress.total
|
|
1193
1257
|
] }),
|
|
1194
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ jsx14("div", { className: "w-48 h-1.5 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx14(
|
|
1195
1259
|
"div",
|
|
1196
1260
|
{
|
|
1197
1261
|
className: "h-full bg-primary rounded-full transition-all duration-300",
|
|
@@ -1202,43 +1266,43 @@ function VersionHistoryTimeline({
|
|
|
1202
1266
|
) })
|
|
1203
1267
|
] });
|
|
1204
1268
|
}
|
|
1205
|
-
return /* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ jsxs13("div", { className: "px-4 py-3", children: [
|
|
1270
|
+
/* @__PURE__ */ jsx14("div", { className: "flex items-center justify-between mb-3 pb-3 border-b border-border", children: /* @__PURE__ */ jsxs13("div", { className: "type-secondary text-muted-foreground", children: [
|
|
1207
1271
|
enrichedVersions.filter((v) => v.snapshotLoaded).length,
|
|
1208
1272
|
" of",
|
|
1209
1273
|
" ",
|
|
1210
1274
|
versions.length,
|
|
1211
1275
|
" versions loaded",
|
|
1212
|
-
failedVersions.length > 0 && /* @__PURE__ */
|
|
1276
|
+
failedVersions.length > 0 && /* @__PURE__ */ jsxs13("span", { className: "text-destructive", children: [
|
|
1213
1277
|
" ",
|
|
1214
1278
|
"\xB7 ",
|
|
1215
1279
|
failedVersions.length,
|
|
1216
1280
|
" could not be read",
|
|
1217
|
-
ErrorMenu ? /* @__PURE__ */
|
|
1281
|
+
ErrorMenu ? /* @__PURE__ */ jsx14(ErrorMenu, { error: failureReason ?? "Some version snapshots could not be read" }) : null
|
|
1218
1282
|
] })
|
|
1219
1283
|
] }) }),
|
|
1220
1284
|
timeline(true),
|
|
1221
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ jsx14("div", { className: "h-[50dvh]" }),
|
|
1222
1286
|
footer
|
|
1223
1287
|
] });
|
|
1224
1288
|
}
|
|
1225
1289
|
function VersionChanges({ version, ports }) {
|
|
1226
1290
|
const diff = version.diffSummary;
|
|
1227
1291
|
const changedFields = diff?.root.filter((n) => n.changeType !== "unchanged") ?? [];
|
|
1228
|
-
return /* @__PURE__ */
|
|
1229
|
-
/* @__PURE__ */
|
|
1230
|
-
diff && changedFields.length > 0 ? /* @__PURE__ */
|
|
1292
|
+
return /* @__PURE__ */ jsxs13("div", { className: "space-y-1", children: [
|
|
1293
|
+
/* @__PURE__ */ jsx14(ContractBreak, { version, ports }),
|
|
1294
|
+
diff && changedFields.length > 0 ? /* @__PURE__ */ jsx14(ChipSet, { children: changedFields.map((n) => /* @__PURE__ */ jsx14(
|
|
1231
1295
|
Chip,
|
|
1232
1296
|
{
|
|
1233
1297
|
tone: n.changeType === "added" ? "success" : n.changeType === "removed" ? "destructive" : "warning",
|
|
1234
|
-
label: `${
|
|
1298
|
+
label: `${humanizeIdentifier4(n.key) || n.key}${n.changeType === "added" ? " +" : n.changeType === "removed" ? " \u2212" : ""}`
|
|
1235
1299
|
},
|
|
1236
1300
|
n.key
|
|
1237
|
-
)) }) : diff && changedFields.length === 0 ? /* @__PURE__ */
|
|
1301
|
+
)) }) : diff && changedFields.length === 0 ? /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "No changes" }) : !version.snapshotLoaded ? (
|
|
1238
1302
|
// An unread snapshot says so — never a lone contract-break button where the
|
|
1239
1303
|
// changes belong (walk-core 2026-10-18: v9–v2 showed only the shield).
|
|
1240
|
-
/* @__PURE__ */
|
|
1241
|
-
) : /* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Not loaded" })
|
|
1305
|
+
) : /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "First version" })
|
|
1242
1306
|
] });
|
|
1243
1307
|
}
|
|
1244
1308
|
function ContractBreak({ version, ports }) {
|
|
@@ -1264,8 +1328,8 @@ function ContractBreak({ version, ports }) {
|
|
|
1264
1328
|
}
|
|
1265
1329
|
const autoChange = version.contract_change || null;
|
|
1266
1330
|
const effectiveChange = declared ?? autoChange;
|
|
1267
|
-
return /* @__PURE__ */
|
|
1268
|
-
effectiveChange && /* @__PURE__ */
|
|
1331
|
+
return /* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1332
|
+
effectiveChange && /* @__PURE__ */ jsx14(
|
|
1269
1333
|
Badge2,
|
|
1270
1334
|
{
|
|
1271
1335
|
tone: "warning",
|
|
@@ -1273,21 +1337,21 @@ function ContractBreak({ version, ports }) {
|
|
|
1273
1337
|
children: `Contract: ${effectiveChange}${declared ? " (declared)" : ""}`
|
|
1274
1338
|
}
|
|
1275
1339
|
),
|
|
1276
|
-
ports.onDeclare ? /* @__PURE__ */
|
|
1277
|
-
/* @__PURE__ */
|
|
1340
|
+
ports.onDeclare ? /* @__PURE__ */ jsxs13(DropdownMenu, { children: [
|
|
1341
|
+
/* @__PURE__ */ jsx14(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
|
|
1278
1342
|
Button,
|
|
1279
1343
|
{
|
|
1280
|
-
icon: /* @__PURE__ */
|
|
1344
|
+
icon: /* @__PURE__ */ jsx14(ShieldAlert, {}),
|
|
1281
1345
|
"aria-label": "Mark this version as a contract break the hashes cannot see (e.g. a prompt-level output change)",
|
|
1282
1346
|
variant: "quiet",
|
|
1283
1347
|
title: "Mark this version as a contract break the hashes cannot see (e.g. a prompt-level output change)"
|
|
1284
1348
|
}
|
|
1285
1349
|
) }),
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
declared && /* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ jsxs13(DropdownMenuContent, { align: "start", children: [
|
|
1351
|
+
/* @__PURE__ */ jsx14(DropdownMenuItem, { onClick: () => void declareBreak("input"), children: "Declare input break" }),
|
|
1352
|
+
/* @__PURE__ */ jsx14(DropdownMenuItem, { onClick: () => void declareBreak("output"), children: "Declare output break" }),
|
|
1353
|
+
/* @__PURE__ */ jsx14(DropdownMenuItem, { onClick: () => void declareBreak("both"), children: "Declare input + output break" }),
|
|
1354
|
+
declared && /* @__PURE__ */ jsx14(DropdownMenuItem, { onClick: () => void declareBreak(null), children: "Clear declaration" })
|
|
1291
1355
|
] })
|
|
1292
1356
|
] }) : null
|
|
1293
1357
|
] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/agents",
|
|
3
|
-
"version": "0.59.
|
|
3
|
+
"version": "0.59.181",
|
|
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",
|
|
@@ -509,14 +509,14 @@
|
|
|
509
509
|
"sideEffects": false,
|
|
510
510
|
"dependencies": {
|
|
511
511
|
"@ai-matrx/alchemy": "latest",
|
|
512
|
-
"@ai-matrx/associations": "latest",
|
|
513
512
|
"@ai-matrx/api": "latest",
|
|
513
|
+
"@ai-matrx/associations": "latest",
|
|
514
|
+
"@ai-matrx/data": "latest",
|
|
514
515
|
"@ai-matrx/content-ir": "latest",
|
|
515
516
|
"@ai-matrx/design-system": "latest",
|
|
516
|
-
"@ai-matrx/data": "latest",
|
|
517
517
|
"@ai-matrx/diff": "latest",
|
|
518
|
-
"@ai-matrx/
|
|
519
|
-
"@ai-matrx/
|
|
518
|
+
"@ai-matrx/icons": "latest",
|
|
519
|
+
"@ai-matrx/kit": "latest"
|
|
520
520
|
},
|
|
521
521
|
"peerDependencies": {
|
|
522
522
|
"react": ">=18.0.0",
|
|
@@ -561,5 +561,5 @@
|
|
|
561
561
|
"verify:tarball": "node ./scripts/verify-tarball.mjs",
|
|
562
562
|
"typegen:self-test": "node scripts/typegen/drop-guard.self-test.mjs && node scripts/typegen/check-api-types-fresh.mjs --self-test"
|
|
563
563
|
},
|
|
564
|
-
"gitHead": "
|
|
564
|
+
"gitHead": "b50b1b48e7c1eab250e3abcd099fe98d9988facb"
|
|
565
565
|
}
|