@ai-matrx/agents 0.7.1 → 0.8.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 +90 -0
- package/dist/catalog/index.cjs +69 -3
- package/dist/catalog/index.cjs.map +1 -1
- package/dist/catalog/index.d.cts +102 -2
- package/dist/catalog/index.d.ts +102 -2
- package/dist/catalog/index.js +69 -3
- package/dist/catalog/index.js.map +1 -1
- package/dist/catalog/react/index.cjs +74 -7
- package/dist/catalog/react/index.cjs.map +1 -1
- package/dist/catalog/react/index.d.cts +108 -7
- package/dist/catalog/react/index.d.ts +108 -7
- package/dist/catalog/react/index.js +74 -7
- package/dist/catalog/react/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -39,12 +39,17 @@ __export(react_exports, {
|
|
|
39
39
|
FilterChip: () => FilterChip,
|
|
40
40
|
HOVER_GRACE_MS: () => HOVER_GRACE_MS,
|
|
41
41
|
LIST_MAX_HEIGHT: () => LIST_MAX_HEIGHT,
|
|
42
|
+
Music4Icon: () => Music4Icon,
|
|
42
43
|
OptionRow: () => OptionRow,
|
|
43
44
|
PANEL_HEIGHT: () => PANEL_HEIGHT,
|
|
44
45
|
SORT_OPTIONS: () => SORT_OPTIONS,
|
|
45
46
|
SearchInput: () => SearchInput,
|
|
46
47
|
SidePanelHeader: () => SidePanelHeader,
|
|
47
48
|
coerceVisibleTab: () => coerceVisibleTab,
|
|
49
|
+
orchestraDelegatesLine: () => orchestraDelegatesLine,
|
|
50
|
+
orchestraDepthLine: () => orchestraDepthLine,
|
|
51
|
+
orchestraLabel: () => orchestraLabel,
|
|
52
|
+
orchestraModeLabel: () => orchestraModeLabel,
|
|
48
53
|
useAgentCatalog: () => useAgentCatalog,
|
|
49
54
|
useAgentCatalogRows: () => useAgentCatalogRows,
|
|
50
55
|
useAgentCatalogState: () => useAgentCatalogState,
|
|
@@ -135,6 +140,13 @@ var import_react2 = require("react");
|
|
|
135
140
|
function isMandateAgentId(id) {
|
|
136
141
|
return id.startsWith("mandate:");
|
|
137
142
|
}
|
|
143
|
+
var SORT_OPTIONS = [
|
|
144
|
+
{ value: "updated-desc", label: "Recent" },
|
|
145
|
+
{ value: "created-desc", label: "Created" },
|
|
146
|
+
{ value: "name-asc", label: "A \u2192 Z" },
|
|
147
|
+
{ value: "name-desc", label: "Z \u2192 A" },
|
|
148
|
+
{ value: "category-asc", label: "Category" }
|
|
149
|
+
];
|
|
138
150
|
var AGENT_NONE_SENTINEL = "__none__";
|
|
139
151
|
var DEFAULT_AGENT_CONSUMER_STATE = {
|
|
140
152
|
tab: "mine",
|
|
@@ -944,6 +956,14 @@ function AlertTriangleIcon(props) {
|
|
|
944
956
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 17h.01" })
|
|
945
957
|
] });
|
|
946
958
|
}
|
|
959
|
+
function Music4Icon(props) {
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 18V5l12-2v13" }),
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9 9 12-2" }),
|
|
963
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "6", cy: "18", r: "3" }),
|
|
964
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "18", cy: "16", r: "3" })
|
|
965
|
+
] });
|
|
966
|
+
}
|
|
947
967
|
|
|
948
968
|
// catalog/react/primitives.tsx
|
|
949
969
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
@@ -1188,6 +1208,33 @@ function FavoriteAgentButton({
|
|
|
1188
1208
|
);
|
|
1189
1209
|
}
|
|
1190
1210
|
|
|
1211
|
+
// catalog/orchestra.ts
|
|
1212
|
+
var ORCHESTRA_MODE_LABEL = {
|
|
1213
|
+
supervisor: "supervisor",
|
|
1214
|
+
sequential: "in order",
|
|
1215
|
+
parallel: "together",
|
|
1216
|
+
dag: "custom flow"
|
|
1217
|
+
};
|
|
1218
|
+
function orchestraModeLabel(mode) {
|
|
1219
|
+
return ORCHESTRA_MODE_LABEL[mode] ?? mode;
|
|
1220
|
+
}
|
|
1221
|
+
function orchestraLabel(badge) {
|
|
1222
|
+
const n = badge.memberCount;
|
|
1223
|
+
return `Orchestra \xB7 ${orchestraModeLabel(badge.mode)} \xB7 ${n} ${n === 1 ? "member" : "members"}`;
|
|
1224
|
+
}
|
|
1225
|
+
function orchestraDepthLine(badge) {
|
|
1226
|
+
const n = badge.depthBudget;
|
|
1227
|
+
if (typeof n !== "number" || n <= 0) return null;
|
|
1228
|
+
return `Team members can call helpers up to ${n} ${n === 1 ? "level" : "levels"} deep`;
|
|
1229
|
+
}
|
|
1230
|
+
function orchestraDelegatesLine(badge, limit = 3) {
|
|
1231
|
+
const titles = badge.memberTitles;
|
|
1232
|
+
if (titles.length === 0) return null;
|
|
1233
|
+
const shown = titles.slice(0, limit);
|
|
1234
|
+
const extra = titles.length - shown.length;
|
|
1235
|
+
return `Delegates to: ${shown.join(", ")}${extra > 0 ? ` +${extra} more` : ""}`;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1191
1238
|
// catalog/react/AgentDetailCard.tsx
|
|
1192
1239
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1193
1240
|
function AgentDetailCard({ agent, onSelect }) {
|
|
@@ -1214,6 +1261,22 @@ function AgentDetailCard({ agent, onSelect }) {
|
|
|
1214
1261
|
] }) }),
|
|
1215
1262
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "h-px bg-border mx-3" }),
|
|
1216
1263
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-1 overflow-y-auto px-4 py-3 space-y-3", children: [
|
|
1264
|
+
agent.orchestra && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "rounded-md border border-primary/20 bg-primary/5 px-2.5 py-2", children: [
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Music4Icon, { className: "w-3.5 h-3.5 text-primary shrink-0" }),
|
|
1267
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] font-medium text-primary", children: orchestraLabel(agent.orchestra) })
|
|
1268
|
+
] }),
|
|
1269
|
+
agent.orchestra.tagline && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mt-1 text-xs text-foreground/80 leading-relaxed", children: agent.orchestra.tagline }),
|
|
1270
|
+
orchestraDelegatesLine(agent.orchestra) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1271
|
+
"p",
|
|
1272
|
+
{
|
|
1273
|
+
className: "mt-1 text-[11px] text-muted-foreground",
|
|
1274
|
+
title: `Delegates to: ${agent.orchestra.memberTitles.join(", ")}`,
|
|
1275
|
+
children: orchestraDelegatesLine(agent.orchestra)
|
|
1276
|
+
}
|
|
1277
|
+
),
|
|
1278
|
+
orchestraDepthLine(agent.orchestra) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mt-0.5 text-[11px] text-muted-foreground", children: orchestraDepthLine(agent.orchestra) })
|
|
1279
|
+
] }),
|
|
1217
1280
|
agent.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
1218
1281
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Description" }),
|
|
1219
1282
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-xs text-foreground/80 leading-relaxed", children: agent.description })
|
|
@@ -1330,13 +1393,6 @@ var iconButtonClass = "flex items-center justify-center h-7 w-7 rounded-md borde
|
|
|
1330
1393
|
var import_react5 = require("react");
|
|
1331
1394
|
|
|
1332
1395
|
// catalog/react/types.ts
|
|
1333
|
-
var SORT_OPTIONS = [
|
|
1334
|
-
{ value: "updated-desc", label: "Recent" },
|
|
1335
|
-
{ value: "created-desc", label: "Created" },
|
|
1336
|
-
{ value: "name-asc", label: "A \u2192 Z" },
|
|
1337
|
-
{ value: "name-desc", label: "Z \u2192 A" },
|
|
1338
|
-
{ value: "category-asc", label: "Category" }
|
|
1339
|
-
];
|
|
1340
1396
|
var PANEL_HEIGHT = "528px";
|
|
1341
1397
|
var LIST_MAX_HEIGHT = "min(528px, var(--radix-popper-available-height, 528px))";
|
|
1342
1398
|
|
|
@@ -1514,6 +1570,17 @@ function AgentRow({
|
|
|
1514
1570
|
children: agent.name || "Untitled"
|
|
1515
1571
|
}
|
|
1516
1572
|
),
|
|
1573
|
+
agent.orchestra && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1574
|
+
"span",
|
|
1575
|
+
{
|
|
1576
|
+
className: "flex shrink-0 items-center gap-0.5 rounded-sm bg-primary/10 px-1 py-px text-[9px] font-medium text-primary",
|
|
1577
|
+
title: orchestraDelegatesLine(agent.orchestra) ?? orchestraLabel(agent.orchestra),
|
|
1578
|
+
children: [
|
|
1579
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Music4Icon, { className: "w-2.5 h-2.5" }),
|
|
1580
|
+
agent.orchestra.memberCount
|
|
1581
|
+
]
|
|
1582
|
+
}
|
|
1583
|
+
),
|
|
1517
1584
|
agent.agentType === "builtin" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-[9px] font-medium text-primary bg-primary/10 px-1 py-px rounded shrink-0 ml-auto", children: labels.systemBadge }) : agent.isOwner === false ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-[9px] text-muted-foreground bg-muted px-1 py-px rounded shrink-0 ml-auto", children: "shared" }) : null
|
|
1518
1585
|
]
|
|
1519
1586
|
}
|