@ai-matrx/agents 0.30.0 → 0.31.0
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 +6 -0
- package/dist/content-transfer/index.cjs.map +1 -1
- package/dist/content-transfer/index.js.map +1 -1
- package/dist/content-transfer/react/index.cjs.map +1 -1
- package/dist/content-transfer/react/index.js.map +1 -1
- package/dist/context/index.cjs.map +1 -1
- package/dist/context/index.d.cts +6 -0
- package/dist/context/index.d.ts +6 -0
- package/dist/context/index.js.map +1 -1
- package/dist/context/react/index.cjs +20 -6
- package/dist/context/react/index.cjs.map +1 -1
- package/dist/context/react/index.d.cts +6 -0
- package/dist/context/react/index.d.ts +6 -0
- package/dist/context/react/index.js +20 -6
- package/dist/context/react/index.js.map +1 -1
- package/dist/mandates/index.cjs +2 -2
- package/dist/mandates/index.cjs.map +1 -1
- package/dist/mandates/index.d.cts +4 -4
- package/dist/mandates/index.d.ts +4 -4
- package/dist/mandates/index.js +2 -2
- package/dist/mandates/index.js.map +1 -1
- package/mandates/snapshots/keys.0.31.0.json +653 -0
- package/package.json +2 -2
|
@@ -85,6 +85,12 @@ interface ContextViewedText {
|
|
|
85
85
|
sha256: string;
|
|
86
86
|
/** `fetched_now`: a `fetchable` text — what the agent gets if it asks now. */
|
|
87
87
|
source: "preview" | "wire" | "conversation_prompt" | "turn_record" | "fetched_now";
|
|
88
|
+
/**
|
|
89
|
+
* `fetchable` only: `false` when the turn's agent cannot call the tool that
|
|
90
|
+
* returns it (tools off, excluded, a structured-output turn). `text` is then
|
|
91
|
+
* `""`; the screen says so with state, never shows content as fetchable.
|
|
92
|
+
*/
|
|
93
|
+
available?: boolean;
|
|
88
94
|
}
|
|
89
95
|
/** The host's door to the viewer API — called only when a person opens a value. */
|
|
90
96
|
type ContextViewLoader = (target: ContextViewTarget) => Promise<ContextViewedText>;
|
|
@@ -85,6 +85,12 @@ interface ContextViewedText {
|
|
|
85
85
|
sha256: string;
|
|
86
86
|
/** `fetched_now`: a `fetchable` text — what the agent gets if it asks now. */
|
|
87
87
|
source: "preview" | "wire" | "conversation_prompt" | "turn_record" | "fetched_now";
|
|
88
|
+
/**
|
|
89
|
+
* `fetchable` only: `false` when the turn's agent cannot call the tool that
|
|
90
|
+
* returns it (tools off, excluded, a structured-output turn). `text` is then
|
|
91
|
+
* `""`; the screen says so with state, never shows content as fetchable.
|
|
92
|
+
*/
|
|
93
|
+
available?: boolean;
|
|
88
94
|
}
|
|
89
95
|
/** The host's door to the viewer API — called only when a person opens a value. */
|
|
90
96
|
type ContextViewLoader = (target: ContextViewTarget) => Promise<ContextViewedText>;
|
|
@@ -407,7 +407,7 @@ function ContextRulesTable({
|
|
|
407
407
|
const comfortable = density === "comfortable";
|
|
408
408
|
const present = GROUPS.filter((g) => rows.some((r) => r.origin === g.origin));
|
|
409
409
|
const grouped = present.length > 1;
|
|
410
|
-
return /* @__PURE__ */ jsx3(TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs3("div", { role: "table", "aria-label": "
|
|
410
|
+
return /* @__PURE__ */ jsx3(TooltipProvider, { delayDuration: 300, titleTooltips: false, children: /* @__PURE__ */ jsxs3("div", { role: "table", "aria-label": "Values", "data-density": density, className: cn2("text-xs", className), children: [
|
|
411
411
|
/* @__PURE__ */ jsxs3(
|
|
412
412
|
"div",
|
|
413
413
|
{
|
|
@@ -424,7 +424,7 @@ function ContextRulesTable({
|
|
|
424
424
|
]
|
|
425
425
|
}
|
|
426
426
|
),
|
|
427
|
-
rows.length === 0 ? /* @__PURE__ */ jsx3("div", { className: "px-2 py-3 text-center text-muted-foreground", children: "
|
|
427
|
+
rows.length === 0 ? /* @__PURE__ */ jsx3("div", { className: "px-2 py-3 text-center text-muted-foreground", children: "None" }) : present.map((g) => /* @__PURE__ */ jsxs3("div", { role: "rowgroup", "aria-label": grouped ? g.label : void 0, children: [
|
|
428
428
|
grouped ? /* @__PURE__ */ jsx3(
|
|
429
429
|
"div",
|
|
430
430
|
{
|
|
@@ -823,7 +823,13 @@ function DeliveredSection({
|
|
|
823
823
|
setLoaded({ state: "loading" });
|
|
824
824
|
load({ kind, key }).then(
|
|
825
825
|
(viewed) => {
|
|
826
|
-
if (live)
|
|
826
|
+
if (live)
|
|
827
|
+
setLoaded({
|
|
828
|
+
state: "done",
|
|
829
|
+
text: viewed.text,
|
|
830
|
+
chars: viewed.chars,
|
|
831
|
+
available: viewed.available !== false
|
|
832
|
+
});
|
|
827
833
|
},
|
|
828
834
|
(error) => {
|
|
829
835
|
if (live)
|
|
@@ -837,12 +843,20 @@ function DeliveredSection({
|
|
|
837
843
|
live = false;
|
|
838
844
|
};
|
|
839
845
|
}, [load, kind, key, attempt]);
|
|
846
|
+
const unavailable = loaded.state === "done" && !loaded.available;
|
|
840
847
|
return /* @__PURE__ */ jsxs5("section", { className: "flex flex-col gap-1", "aria-label": title, "data-view-kind": kind, "data-view-key": key, children: [
|
|
841
848
|
/* @__PURE__ */ jsxs5("div", { className: "flex items-baseline gap-2 text-xs", children: [
|
|
842
849
|
/* @__PURE__ */ jsx5("span", { className: "font-medium", children: title }),
|
|
843
|
-
|
|
850
|
+
unavailable ? /* @__PURE__ */ jsx5(
|
|
851
|
+
"span",
|
|
852
|
+
{
|
|
853
|
+
"data-testid": "context-delivered-unavailable",
|
|
854
|
+
className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
|
|
855
|
+
children: "Not available to this agent"
|
|
856
|
+
}
|
|
857
|
+
) : ref_ || loaded.state === "done" ? /* @__PURE__ */ jsx5("span", { className: "tabular-nums text-muted-foreground", children: `${formatChars(ref_ ? ref_.chars : loaded.state === "done" ? loaded.chars : 0)} chars` }) : null
|
|
844
858
|
] }),
|
|
845
|
-
!load ? /* @__PURE__ */ jsx5("span", { className: "text-xs text-muted-foreground", children: "\u2014" }) : loaded.state === "loading" ? /* @__PURE__ */ jsx5(Skeleton, { "data-testid": "context-delivered-loading", className: "h-16 w-full" }) : loaded.state === "error" ? /* @__PURE__ */ jsxs5(ErrorBox, { as: "div", message: loaded.message, className: "flex items-center gap-2 text-xs text-destructive", children: [
|
|
859
|
+
unavailable ? null : !load ? /* @__PURE__ */ jsx5("span", { className: "text-xs text-muted-foreground", children: "\u2014" }) : loaded.state === "loading" ? /* @__PURE__ */ jsx5(Skeleton, { "data-testid": "context-delivered-loading", className: "h-16 w-full" }) : loaded.state === "error" ? /* @__PURE__ */ jsxs5(ErrorBox, { as: "div", message: loaded.message, className: "flex items-center gap-2 text-xs text-destructive", children: [
|
|
846
860
|
/* @__PURE__ */ jsx5("span", { className: "min-w-0 truncate", title: loaded.message, children: loaded.message }),
|
|
847
861
|
/* @__PURE__ */ jsx5(
|
|
848
862
|
"button",
|
|
@@ -1100,7 +1114,7 @@ function ContextRulesPanelBody({
|
|
|
1100
1114
|
Input2,
|
|
1101
1115
|
{
|
|
1102
1116
|
type: "search",
|
|
1103
|
-
"aria-label": "Search
|
|
1117
|
+
"aria-label": "Search values",
|
|
1104
1118
|
placeholder: "Search",
|
|
1105
1119
|
value: query,
|
|
1106
1120
|
onChange: (e) => setQuery(e.target.value),
|