@ai-matrx/agents 0.8.0 → 0.9.1

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.
@@ -60,20 +60,25 @@ __export(react_exports, {
60
60
  module.exports = __toCommonJS(react_exports);
61
61
 
62
62
  // catalog/react/context.tsx
63
+ var import_react2 = require("react");
64
+
65
+ // catalog/shared/context.tsx
63
66
  var import_react = require("react");
64
67
  var import_jsx_runtime = require("react/jsx-runtime");
65
68
  var AgentCatalogContext = (0, import_react.createContext)(null);
66
- function AgentCatalogProvider({
69
+ function AgentCatalogProviderCore({
67
70
  catalog,
71
+ platform,
68
72
  children,
69
73
  ...ports
70
74
  }) {
71
75
  const value = (0, import_react.useMemo)(
72
- () => ({ catalog, ...ports }),
76
+ () => ({ catalog, platform, ...ports }),
73
77
  // The ports are plain values a host declares once; re-binding on identity
74
78
  // change is correct and cheap.
75
79
  [
76
80
  catalog,
81
+ platform,
77
82
  ports.navigate,
78
83
  ports.LinkComponent,
79
84
  ports.renderModelRef,
@@ -87,7 +92,7 @@ function useBinding() {
87
92
  const binding = (0, import_react.useContext)(AgentCatalogContext);
88
93
  if (!binding) {
89
94
  throw new Error(
90
- "@ai-matrx/agents/catalog/react: no <AgentCatalogProvider> is mounted above this component. Create the catalog once with createAgentCatalog({ client, identity }) and mount <AgentCatalogProvider catalog={catalog}> at the top of your tree."
95
+ "@ai-matrx/agents/catalog: no <AgentCatalogProvider> is mounted above this component. Create the catalog once with createAgentCatalog({ client, identity }) and mount <AgentCatalogProvider catalog={catalog}> at the top of your tree."
91
96
  );
92
97
  }
93
98
  return binding;
@@ -97,29 +102,26 @@ function useAgentCatalog() {
97
102
  }
98
103
  function useAgentCatalogUiPorts() {
99
104
  const binding = useBinding();
105
+ const hostNavigate = binding.navigate;
106
+ const platformNavigate = binding.platform.navigate;
100
107
  const navigate = (0, import_react.useCallback)(
101
108
  (href) => {
102
- if (binding.navigate) {
103
- binding.navigate(href);
109
+ if (hostNavigate) {
110
+ hostNavigate(href);
104
111
  return;
105
112
  }
106
- if (typeof window !== "undefined") window.location.assign(href);
113
+ platformNavigate(href);
107
114
  },
108
- [binding.navigate]
115
+ [hostNavigate, platformNavigate]
109
116
  );
110
117
  return {
111
118
  navigate,
112
- LinkComponent: binding.LinkComponent ?? DefaultLink,
113
- renderModelRef: binding.renderModelRef ?? defaultRenderModelRef,
119
+ LinkComponent: binding.LinkComponent ?? binding.platform.LinkComponent,
120
+ renderModelRef: binding.renderModelRef ?? binding.platform.renderModelRef,
114
121
  openPeek: binding.openPeek,
115
122
  popoverContainer: binding.popoverContainer
116
123
  };
117
124
  }
118
- var DefaultLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { ...props, children });
119
- var defaultRenderModelRef = ({
120
- modelId,
121
- className
122
- }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className, children: modelId });
123
125
  function useAgentCatalogState(select) {
124
126
  const catalog = useAgentCatalog();
125
127
  const getSnapshot = (0, import_react.useCallback)(
@@ -133,8 +135,40 @@ function useAgentCatalogRows() {
133
135
  }
134
136
  var selectRows = (state) => state.rows;
135
137
 
136
- // catalog/react/useAgentConsumer.ts
137
- var import_react2 = require("react");
138
+ // catalog/react/context.tsx
139
+ var import_jsx_runtime2 = require("react/jsx-runtime");
140
+ var DefaultLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { ...props, children });
141
+ var defaultRenderModelRef = ({
142
+ modelId,
143
+ className
144
+ }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className, children: modelId });
145
+ var webNavigate = (href) => {
146
+ if (typeof window !== "undefined") window.location.assign(href);
147
+ };
148
+ var WEB_PLATFORM_DEFAULTS = {
149
+ navigate: webNavigate,
150
+ LinkComponent: DefaultLink,
151
+ renderModelRef: defaultRenderModelRef
152
+ };
153
+ function AgentCatalogProvider({
154
+ catalog,
155
+ children,
156
+ ...ports
157
+ }) {
158
+ const platform = (0, import_react2.useMemo)(() => WEB_PLATFORM_DEFAULTS, []);
159
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
160
+ AgentCatalogProviderCore,
161
+ {
162
+ catalog,
163
+ platform,
164
+ ...ports,
165
+ children
166
+ }
167
+ );
168
+ }
169
+
170
+ // catalog/shared/useAgentConsumer.ts
171
+ var import_react3 = require("react");
138
172
 
139
173
  // catalog/types.ts
140
174
  function isMandateAgentId(id) {
@@ -165,19 +199,19 @@ var DEFAULT_AGENT_CONSUMER_STATE = {
165
199
  deepSearch: false
166
200
  };
167
201
 
168
- // catalog/react/useAgentConsumer.ts
202
+ // catalog/shared/useAgentConsumer.ts
169
203
  var DEBOUNCE_MS = 250;
170
204
  var MIN_QUERY_LENGTH = 2;
171
205
  function useAgentConsumer(consumerId, options) {
172
206
  const catalog = useAgentCatalog();
173
- const selectConsumer = (0, import_react2.useCallback)(
207
+ const selectConsumer = (0, import_react3.useCallback)(
174
208
  (state) => state.consumers[consumerId] ?? DEFAULT_AGENT_CONSUMER_STATE,
175
209
  [consumerId]
176
210
  );
177
211
  const consumer = useAgentCatalogState(selectConsumer);
178
- const optionsRef = (0, import_react2.useRef)(options);
212
+ const optionsRef = (0, import_react3.useRef)(options);
179
213
  optionsRef.current = options;
180
- (0, import_react2.useEffect)(() => {
214
+ (0, import_react3.useEffect)(() => {
181
215
  const opts = optionsRef.current;
182
216
  catalog.registerConsumer(
183
217
  consumerId,
@@ -189,35 +223,35 @@ function useAgentConsumer(consumerId, options) {
189
223
  }
190
224
  };
191
225
  }, [consumerId, catalog]);
192
- const setSearchTerm = (0, import_react2.useCallback)(
226
+ const setSearchTerm = (0, import_react3.useCallback)(
193
227
  (value) => catalog.setConsumerFilter(consumerId, { searchTerm: value }),
194
228
  [consumerId, catalog]
195
229
  );
196
- const setDeepSearch = (0, import_react2.useCallback)(
230
+ const setDeepSearch = (0, import_react3.useCallback)(
197
231
  (value) => catalog.setConsumerFilter(consumerId, { deepSearch: value }),
198
232
  [consumerId, catalog]
199
233
  );
200
- const setSortBy = (0, import_react2.useCallback)(
234
+ const setSortBy = (0, import_react3.useCallback)(
201
235
  (value) => catalog.setConsumerFilter(consumerId, { sortBy: value }),
202
236
  [consumerId, catalog]
203
237
  );
204
- const setTab = (0, import_react2.useCallback)(
238
+ const setTab = (0, import_react3.useCallback)(
205
239
  (value) => catalog.setConsumerFilter(consumerId, { tab: value }),
206
240
  [consumerId, catalog]
207
241
  );
208
- const setFavFilter = (0, import_react2.useCallback)(
242
+ const setFavFilter = (0, import_react3.useCallback)(
209
243
  (value) => catalog.setConsumerFilter(consumerId, { favFilter: value }),
210
244
  [consumerId, catalog]
211
245
  );
212
- const setArchFilter = (0, import_react2.useCallback)(
246
+ const setArchFilter = (0, import_react3.useCallback)(
213
247
  (value) => catalog.setConsumerFilter(consumerId, { archFilter: value }),
214
248
  [consumerId, catalog]
215
249
  );
216
- const setAccessFilter = (0, import_react2.useCallback)(
250
+ const setAccessFilter = (0, import_react3.useCallback)(
217
251
  (value) => catalog.setConsumerFilter(consumerId, { accessFilter: value }),
218
252
  [consumerId, catalog]
219
253
  );
220
- const toggleCategory = (0, import_react2.useCallback)(
254
+ const toggleCategory = (0, import_react3.useCallback)(
221
255
  (cat) => {
222
256
  const current = catalog.getConsumer(consumerId).includedCats;
223
257
  const next = current.includes(cat) ? current.filter((c) => c !== cat) : [...current, cat];
@@ -225,7 +259,7 @@ function useAgentConsumer(consumerId, options) {
225
259
  },
226
260
  [consumerId, catalog]
227
261
  );
228
- const toggleTag = (0, import_react2.useCallback)(
262
+ const toggleTag = (0, import_react3.useCallback)(
229
263
  (tag) => {
230
264
  const current = catalog.getConsumer(consumerId).includedTags;
231
265
  const next = current.includes(tag) ? current.filter((t) => t !== tag) : [...current, tag];
@@ -233,21 +267,21 @@ function useAgentConsumer(consumerId, options) {
233
267
  },
234
268
  [consumerId, catalog]
235
269
  );
236
- const setIncludedCats = (0, import_react2.useCallback)(
270
+ const setIncludedCats = (0, import_react3.useCallback)(
237
271
  (next) => catalog.setConsumerFilter(consumerId, { includedCats: next }),
238
272
  [consumerId, catalog]
239
273
  );
240
- const setIncludedTags = (0, import_react2.useCallback)(
274
+ const setIncludedTags = (0, import_react3.useCallback)(
241
275
  (next) => catalog.setConsumerFilter(consumerId, { includedTags: next }),
242
276
  [consumerId, catalog]
243
277
  );
244
- const toggleFavoritesFirst = (0, import_react2.useCallback)(
278
+ const toggleFavoritesFirst = (0, import_react3.useCallback)(
245
279
  () => catalog.setConsumerFilter(consumerId, {
246
280
  favoritesFirst: !catalog.getConsumer(consumerId).favoritesFirst
247
281
  }),
248
282
  [consumerId, catalog]
249
283
  );
250
- const loadMoreList = (0, import_react2.useCallback)(
284
+ const loadMoreList = (0, import_react3.useCallback)(
251
285
  () => catalog.setConsumerPage(
252
286
  consumerId,
253
287
  "list",
@@ -255,7 +289,7 @@ function useAgentConsumer(consumerId, options) {
255
289
  ),
256
290
  [consumerId, catalog]
257
291
  );
258
- const loadMoreShared = (0, import_react2.useCallback)(
292
+ const loadMoreShared = (0, import_react3.useCallback)(
259
293
  () => catalog.setConsumerPage(
260
294
  consumerId,
261
295
  "shared",
@@ -263,16 +297,16 @@ function useAgentConsumer(consumerId, options) {
263
297
  ),
264
298
  [consumerId, catalog]
265
299
  );
266
- const resetFilters = (0, import_react2.useCallback)(
300
+ const resetFilters = (0, import_react3.useCallback)(
267
301
  () => catalog.resetConsumerFilters(consumerId),
268
302
  [consumerId, catalog]
269
303
  );
270
- const [isSearching, setIsSearching] = (0, import_react2.useState)(false);
271
- const [matchedIds, setMatchedIds] = (0, import_react2.useState)(null);
272
- const requestSeq = (0, import_react2.useRef)(0);
304
+ const [isSearching, setIsSearching] = (0, import_react3.useState)(false);
305
+ const [matchedIds, setMatchedIds] = (0, import_react3.useState)(null);
306
+ const requestSeq = (0, import_react3.useRef)(0);
273
307
  const query = consumer.searchTerm;
274
308
  const deep = consumer.deepSearch;
275
- (0, import_react2.useEffect)(() => {
309
+ (0, import_react3.useEffect)(() => {
276
310
  const q = query.trim();
277
311
  if (q.length < MIN_QUERY_LENGTH) {
278
312
  setIsSearching(false);
@@ -298,7 +332,7 @@ function useAgentConsumer(consumerId, options) {
298
332
  }, DEBOUNCE_MS);
299
333
  return () => clearTimeout(timer);
300
334
  }, [query, deep, catalog]);
301
- (0, import_react2.useEffect)(() => {
335
+ (0, import_react3.useEffect)(() => {
302
336
  catalog.setConsumerServerSearch(consumerId, {
303
337
  matchedIds: matchedIds ?? [],
304
338
  isSearching
@@ -339,8 +373,8 @@ function useAgentConsumer(consumerId, options) {
339
373
  };
340
374
  }
341
375
 
342
- // catalog/react/useAgentListCore.ts
343
- var import_react3 = require("react");
376
+ // catalog/shared/useAgentListCore.ts
377
+ var import_react4 = require("react");
344
378
 
345
379
  // catalog/labels.ts
346
380
  function agentListEmptyLabel(tab, labels) {
@@ -434,7 +468,19 @@ function memoize2(fn) {
434
468
  return last;
435
469
  };
436
470
  }
471
+ function compareAgentIds(a, b) {
472
+ const idA = a.id ?? "";
473
+ const idB = b.id ?? "";
474
+ if (idA < idB) return -1;
475
+ if (idA > idB) return 1;
476
+ return 0;
477
+ }
437
478
  function applyAgentSortComparator(a, b, sortBy) {
479
+ const primary = compareAgentSortKey(a, b, sortBy);
480
+ if (!Number.isFinite(primary) || primary === 0) return compareAgentIds(a, b);
481
+ return primary;
482
+ }
483
+ function compareAgentSortKey(a, b, sortBy) {
438
484
  switch (sortBy) {
439
485
  case "name-asc":
440
486
  return (a.name ?? "").localeCompare(b.name ?? "");
@@ -610,25 +656,49 @@ var makeSelectFilteredAgents = (includeSystemInAll = false) => memoize2(
610
656
  return filterUserTypeAgents(userAgents, consumer);
611
657
  }
612
658
  );
659
+ function agentMatchesArchiveFilter(agent, archFilter) {
660
+ if (archFilter === "active") return !agent.isArchived;
661
+ if (archFilter === "archived") return Boolean(agent.isArchived);
662
+ return true;
663
+ }
664
+ function countUserRows(agents, archFilter, predicate) {
665
+ let n = 0;
666
+ for (const a of agents) {
667
+ if (a.agentType !== "user") continue;
668
+ if (!agentMatchesArchiveFilter(a, archFilter)) continue;
669
+ if (predicate(a)) n += 1;
670
+ }
671
+ return n;
672
+ }
673
+ var isOwned = (a) => a.isOwner === true;
674
+ var isShared = (a) => a.isOwner === false && a.accessLevel != null;
675
+ var isAny = () => true;
676
+ var isFavorite = (a) => Boolean(a.isFavorite);
677
+ var selectAgentTabCounts = memoize2(
678
+ (agents, archFilter) => ({
679
+ mine: countUserRows(agents, archFilter, isOwned),
680
+ shared: countUserRows(agents, archFilter, isShared),
681
+ all: countUserRows(agents, archFilter, isAny),
682
+ system: selectBuiltinTypeAgents(agents).length
683
+ })
684
+ );
613
685
  var selectTotalUserAgentsCount = memoize1(
614
- (agents) => selectUserTypeAgents(agents).length
686
+ (agents) => countUserRows(agents, "active", isAny)
615
687
  );
616
688
  var selectTotalOwnedAgentsCount = memoize1(
617
- (agents) => selectUserTypeAgents(agents).filter((a) => a.isOwner === true).length
689
+ (agents) => countUserRows(agents, "active", isOwned)
618
690
  );
619
691
  var selectTotalSharedAgentsCount = memoize1(
620
- (agents) => selectUserTypeAgents(agents).filter(
621
- (a) => a.isOwner === false && a.accessLevel != null
622
- ).length
692
+ (agents) => countUserRows(agents, "active", isShared)
623
693
  );
624
694
  var selectTotalBuiltinAgentsCount = memoize1(
625
695
  (agents) => selectBuiltinTypeAgents(agents).length
626
696
  );
627
697
  var selectTotalFavoriteAgentsCount = memoize1(
628
- (agents) => selectUserTypeAgents(agents).filter((a) => a.isFavorite).length
698
+ (agents) => countUserRows(agents, "active", isFavorite)
629
699
  );
630
700
 
631
- // catalog/react/useAgentListCore.ts
701
+ // catalog/shared/useAgentListCore.ts
632
702
  var HOVER_GRACE_MS = 900;
633
703
  function coerceVisibleTab(current, allowed, initialTab) {
634
704
  if (allowed.length === 0) return null;
@@ -649,20 +719,21 @@ function useAgentListCore({
649
719
  }) {
650
720
  const catalog = useAgentCatalog();
651
721
  const { navigate } = useAgentCatalogUiPorts();
652
- const hasFetchedRef = (0, import_react3.useRef)(false);
653
- const [hoveredAgent, setHoveredAgent] = (0, import_react3.useState)(null);
654
- const hoverLeaveTimerRef = (0, import_react3.useRef)(null);
655
- const defaultTabAppliedRef = (0, import_react3.useRef)(false);
722
+ const hasFetchedRef = (0, import_react4.useRef)(false);
723
+ const [hoveredAgent, setHoveredAgent] = (0, import_react4.useState)(null);
724
+ const hoverLeaveTimerRef = (0, import_react4.useRef)(null);
725
+ const defaultTabAppliedRef = (0, import_react4.useRef)(false);
656
726
  const consumer = useAgentConsumer(consumerId, { unregisterOnUnmount: true });
657
727
  const rows = useAgentCatalogRows();
658
728
  const userId = catalog.getUserIdOrNull();
659
- const ownedCount = selectTotalOwnedAgentsCount(rows);
660
- const selectFiltered = (0, import_react3.useMemo)(
729
+ const tabCountsForFilter = selectAgentTabCounts(rows, consumer.state.archFilter);
730
+ const ownedCount = tabCountsForFilter.mine;
731
+ const selectFiltered = (0, import_react4.useMemo)(
661
732
  () => makeSelectFilteredAgents(includeSystemInAll),
662
733
  [includeSystemInAll]
663
734
  );
664
735
  const filteredAgents = selectFiltered(rows, consumer.state);
665
- const excludedAgentIds = (0, import_react3.useMemo)(
736
+ const excludedAgentIds = (0, import_react4.useMemo)(
666
737
  () => new Set(excludeAgentIds),
667
738
  [excludeAgentIds]
668
739
  );
@@ -673,31 +744,26 @@ function useAgentListCore({
673
744
  const onSystemTab = consumer.tab === "system";
674
745
  const allCategories = onSystemTab ? selectAllSystemAgentCategories(rows) : selectAllAgentCategories(rows);
675
746
  const allTags = onSystemTab ? selectAllSystemAgentTags(rows) : selectAllAgentTags(rows);
676
- const tabCounts = {
677
- mine: ownedCount,
678
- shared: selectTotalSharedAgentsCount(rows),
679
- all: selectTotalUserAgentsCount(rows),
680
- system: selectTotalBuiltinAgentsCount(rows)
681
- };
747
+ const tabCounts = tabCountsForFilter;
682
748
  const isLoading = status === "loading";
683
749
  const agentsLoaded = status === "succeeded" || status === "failed";
684
- const ensureLoaded = (0, import_react3.useCallback)(() => {
750
+ const ensureLoaded = (0, import_react4.useCallback)(() => {
685
751
  if (!hasFetchedRef.current) {
686
752
  hasFetchedRef.current = true;
687
753
  void catalog.ensureLoaded().catch(() => {
688
754
  });
689
755
  }
690
756
  }, [catalog]);
691
- const selectDefaultRow = (0, import_react3.useCallback)(
757
+ const selectDefaultRow = (0, import_react4.useCallback)(
692
758
  (state) => defaultMandateKey ? state.defaultRows[defaultMandateKey] : void 0,
693
759
  [defaultMandateKey]
694
760
  );
695
761
  const defaultRow = useAgentCatalogState(selectDefaultRow);
696
- (0, import_react3.useEffect)(() => {
762
+ (0, import_react4.useEffect)(() => {
697
763
  if (!defaultMandateKey) return;
698
764
  catalog.ensureDefaultRow(defaultMandateKey);
699
765
  }, [catalog, defaultMandateKey]);
700
- (0, import_react3.useEffect)(() => {
766
+ (0, import_react4.useEffect)(() => {
701
767
  if (defaultTabAppliedRef.current) return;
702
768
  if (initialTab) {
703
769
  defaultTabAppliedRef.current = true;
@@ -730,7 +796,7 @@ function useAgentListCore({
730
796
  consumer.setTab
731
797
  ]);
732
798
  const allowedTabsKey = visibleTabs ? visibleTabs.join(",") : "";
733
- (0, import_react3.useEffect)(() => {
799
+ (0, import_react4.useEffect)(() => {
734
800
  if (!allowedTabsKey) return;
735
801
  const next = coerceVisibleTab(
736
802
  consumer.tab,
@@ -739,10 +805,10 @@ function useAgentListCore({
739
805
  );
740
806
  if (next) consumer.setTab(next);
741
807
  }, [allowedTabsKey, initialTab, consumer.tab, consumer.setTab]);
742
- (0, import_react3.useEffect)(() => {
808
+ (0, import_react4.useEffect)(() => {
743
809
  ensureLoaded();
744
810
  }, [ensureLoaded]);
745
- const handleSelectAgent = (0, import_react3.useCallback)(
811
+ const handleSelectAgent = (0, import_react4.useCallback)(
746
812
  (agent) => {
747
813
  if (onSelect) {
748
814
  onSelect(agent.id);
@@ -759,7 +825,7 @@ function useAgentListCore({
759
825
  [onSelect, navigateTo, navigate, catalog, consumerId]
760
826
  );
761
827
  const activeFilterCount = (consumer.sortBy !== "updated-desc" ? 1 : 0) + (consumer.includedCats.length > 0 ? 1 : 0) + (consumer.includedTags.length > 0 ? 1 : 0) + (consumer.favFilter !== "all" ? 1 : 0);
762
- const handleAgentHover = (0, import_react3.useCallback)(
828
+ const handleAgentHover = (0, import_react4.useCallback)(
763
829
  (agent, panelOpen) => {
764
830
  if (panelOpen) return;
765
831
  if (hoverLeaveTimerRef.current) {
@@ -770,7 +836,7 @@ function useAgentListCore({
770
836
  },
771
837
  []
772
838
  );
773
- const handleAgentHoverEnd = (0, import_react3.useCallback)(
839
+ const handleAgentHoverEnd = (0, import_react4.useCallback)(
774
840
  (agent, onClear) => {
775
841
  if (hoveredAgent?.id === agent.id) {
776
842
  hoverLeaveTimerRef.current = setTimeout(() => {
@@ -781,19 +847,19 @@ function useAgentListCore({
781
847
  },
782
848
  [hoveredAgent]
783
849
  );
784
- const handleDetailPanelMouseEnter = (0, import_react3.useCallback)(() => {
850
+ const handleDetailPanelMouseEnter = (0, import_react4.useCallback)(() => {
785
851
  if (hoverLeaveTimerRef.current) {
786
852
  clearTimeout(hoverLeaveTimerRef.current);
787
853
  hoverLeaveTimerRef.current = null;
788
854
  }
789
855
  }, []);
790
- const handleDetailPanelMouseLeave = (0, import_react3.useCallback)((onClear) => {
856
+ const handleDetailPanelMouseLeave = (0, import_react4.useCallback)((onClear) => {
791
857
  hoverLeaveTimerRef.current = setTimeout(() => {
792
858
  setHoveredAgent(null);
793
859
  onClear();
794
860
  }, HOVER_GRACE_MS);
795
861
  }, []);
796
- (0, import_react3.useEffect)(
862
+ (0, import_react4.useEffect)(
797
863
  () => () => {
798
864
  if (hoverLeaveTimerRef.current) clearTimeout(hoverLeaveTimerRef.current);
799
865
  },
@@ -824,15 +890,111 @@ var selectStatus = (state) => state.status;
824
890
 
825
891
  // catalog/react/AgentListDropdown.tsx
826
892
  var import_design_system6 = require("@ai-matrx/design-system");
827
- var import_react6 = require("react");
893
+ var import_react7 = require("react");
828
894
 
829
895
  // catalog/react/primitives.tsx
830
896
  var import_design_system = require("@ai-matrx/design-system");
831
897
 
898
+ // catalog/shared/icon-paths.ts
899
+ var SHAPES = {
900
+ star: {
901
+ paths: [
902
+ "M11.5 3.2a.6.6 0 0 1 1 0l2.3 4.7 5.2.8a.6.6 0 0 1 .3 1l-3.8 3.7.9 5.2a.6.6 0 0 1-.9.6L12 16.8l-4.6 2.4a.6.6 0 0 1-.9-.6l.9-5.2-3.8-3.7a.6.6 0 0 1 .3-1l5.2-.8Z"
903
+ ],
904
+ fillable: true
905
+ },
906
+ chevronRight: { paths: ["m9 18 6-6-6-6"] },
907
+ chevronDown: { paths: ["m6 9 6 6 6-6"] },
908
+ search: {
909
+ paths: ["m21 21-4.3-4.3"],
910
+ circles: [{ cx: 11, cy: 11, r: 8 }]
911
+ },
912
+ x: { paths: ["M18 6 6 18", "m6 6 12 12"] },
913
+ check: { paths: ["M20 6 9 17l-5-5"] },
914
+ arrowUpDown: {
915
+ paths: ["m21 16-4 4-4-4", "M17 20V4", "m3 8 4-4 4 4", "M7 4v16"]
916
+ },
917
+ folder: {
918
+ paths: [
919
+ "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"
920
+ ]
921
+ },
922
+ tag: {
923
+ paths: [
924
+ "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"
925
+ ],
926
+ circles: [{ cx: 7.5, cy: 7.5, r: 0.5, filled: true }]
927
+ },
928
+ rotateCcw: {
929
+ paths: [
930
+ "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
931
+ "M3 3v5h5"
932
+ ]
933
+ },
934
+ loader: { paths: ["M21 12a9 9 0 1 1-6.219-8.56"] },
935
+ alertTriangle: {
936
+ paths: [
937
+ "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
938
+ "M12 9v4",
939
+ "M12 17h.01"
940
+ ]
941
+ },
942
+ /**
943
+ * The Orchestra marker (Lucide `music-4`): the glyph the Workflow Studio's
944
+ * picker used for a conductor, kept identical so the same agent wears the
945
+ * same mark in every client.
946
+ */
947
+ music4: {
948
+ paths: ["M9 18V5l12-2v13", "m9 9 12-2"],
949
+ circles: [
950
+ { cx: 6, cy: 18, r: 3 },
951
+ { cx: 18, cy: 16, r: 3 }
952
+ ]
953
+ },
954
+ clock: {
955
+ paths: ["M12 6v6l4 2"],
956
+ circles: [{ cx: 12, cy: 12, r: 10 }]
957
+ },
958
+ globe: {
959
+ paths: ["M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", "M2 12h20"],
960
+ circles: [{ cx: 12, cy: 12, r: 10 }]
961
+ },
962
+ users: {
963
+ paths: [
964
+ "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
965
+ "M22 21v-2a4 4 0 0 0-3-3.87",
966
+ "M16 3.13a4 4 0 0 1 0 7.75"
967
+ ],
968
+ circles: [{ cx: 9, cy: 7, r: 4 }]
969
+ },
970
+ externalLink: {
971
+ paths: [
972
+ "M15 3h6v6",
973
+ "M10 14 21 3",
974
+ "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
975
+ ]
976
+ },
977
+ messageCircle: { paths: ["M7.9 20A9 9 0 1 0 4 16.1L2 22Z"] },
978
+ rocket: {
979
+ paths: [
980
+ "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91 0",
981
+ "m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2",
982
+ "M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",
983
+ "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"
984
+ ]
985
+ },
986
+ circleCheck: {
987
+ paths: ["m9 12 2 2 4-4"],
988
+ circles: [{ cx: 12, cy: 12, r: 10 }]
989
+ }
990
+ };
991
+ var ICON_PATHS = SHAPES;
992
+ var ICON_NAMES = Object.keys(ICON_PATHS);
993
+
832
994
  // catalog/react/icons.tsx
833
- var import_jsx_runtime2 = require("react/jsx-runtime");
995
+ var import_jsx_runtime3 = require("react/jsx-runtime");
834
996
  function Svg({ children, ...props }) {
835
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
997
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
836
998
  "svg",
837
999
  {
838
1000
  xmlns: "http://www.w3.org/2000/svg",
@@ -848,133 +1010,79 @@ function Svg({ children, ...props }) {
848
1010
  }
849
1011
  );
850
1012
  }
1013
+ function Shape({ name, filled }) {
1014
+ const shape = ICON_PATHS[name];
1015
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1016
+ shape.paths.map((d, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1017
+ "path",
1018
+ {
1019
+ d,
1020
+ ...filled && shape.fillable ? { fill: "currentColor" } : {}
1021
+ },
1022
+ `p${index}`
1023
+ )),
1024
+ (shape.circles ?? []).map((circle, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1025
+ "circle",
1026
+ {
1027
+ cx: circle.cx,
1028
+ cy: circle.cy,
1029
+ r: circle.r,
1030
+ ...circle.filled ? { fill: "currentColor" } : {}
1031
+ },
1032
+ `c${index}`
1033
+ ))
1034
+ ] });
1035
+ }
1036
+ function makeIcon(name) {
1037
+ return function Icon(props) {
1038
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Shape, { name, filled: false }) });
1039
+ };
1040
+ }
851
1041
  function StarIcon({
852
1042
  filled = false,
853
1043
  ...props
854
1044
  }) {
855
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, fill: filled ? "currentColor" : "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M11.5 3.2a.6.6 0 0 1 1 0l2.3 4.7 5.2.8a.6.6 0 0 1 .3 1l-3.8 3.7.9 5.2a.6.6 0 0 1-.9.6L12 16.8l-4.6 2.4a.6.6 0 0 1-.9-.6l.9-5.2-3.8-3.7a.6.6 0 0 1 .3-1l5.2-.8Z" }) });
856
- }
857
- function ChevronRightIcon(props) {
858
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9 18 6-6-6-6" }) });
859
- }
860
- function ChevronDownIcon(props) {
861
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 9 6 6 6-6" }) });
862
- }
863
- function SearchIcon(props) {
864
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
865
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
866
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m21 21-4.3-4.3" })
867
- ] });
868
- }
869
- function XIcon(props) {
870
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
871
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M18 6 6 18" }),
872
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 6 12 12" })
873
- ] });
874
- }
875
- function CheckIcon(props) {
876
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M20 6 9 17l-5-5" }) });
877
- }
878
- function ArrowUpDownIcon(props) {
879
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
880
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m21 16-4 4-4-4" }),
881
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M17 20V4" }),
882
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3 8 4-4 4 4" }),
883
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 4v16" })
884
- ] });
885
- }
886
- function FolderIcon(props) {
887
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }) });
888
- }
889
- function TagIcon(props) {
890
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
891
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }),
892
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" })
893
- ] });
894
- }
895
- function RotateCcwIcon(props) {
896
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
897
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
898
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 3v5h5" })
899
- ] });
900
- }
901
- function LoaderIcon(props) {
902
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) });
1045
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Svg, { ...props, fill: filled ? "currentColor" : "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Shape, { name: "star", filled }) });
903
1046
  }
1047
+ var ChevronRightIcon = makeIcon("chevronRight");
1048
+ var ChevronDownIcon = makeIcon("chevronDown");
1049
+ var SearchIcon = makeIcon("search");
1050
+ var XIcon = makeIcon("x");
1051
+ var CheckIcon = makeIcon("check");
1052
+ var ArrowUpDownIcon = makeIcon("arrowUpDown");
1053
+ var FolderIcon = makeIcon("folder");
1054
+ var TagIcon = makeIcon("tag");
1055
+ var RotateCcwIcon = makeIcon("rotateCcw");
1056
+ var LoaderIcon = makeIcon("loader");
1057
+ var UsersIcon = makeIcon("users");
1058
+ var ClockIcon = makeIcon("clock");
1059
+ var GlobeIcon = makeIcon("globe");
1060
+ var ExternalLinkIcon = makeIcon("externalLink");
1061
+ var MessageCircleIcon = makeIcon("messageCircle");
1062
+ var RocketIcon = makeIcon("rocket");
1063
+ var CircleCheckIcon = makeIcon("circleCheck");
1064
+ var AlertTriangleIcon = makeIcon("alertTriangle");
1065
+ var Music4Icon = makeIcon("music4");
904
1066
  function MousePointerClickIcon(props) {
905
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
906
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 4.1 12 6" }),
907
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m5.1 8-2.9-.8" }),
908
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 12-1.9 2" }),
909
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7.2 2.2 8 5.1" }),
910
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z" })
911
- ] });
912
- }
913
- function UsersIcon(props) {
914
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
915
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
916
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
917
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
918
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
919
- ] });
920
- }
921
- function ClockIcon(props) {
922
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
923
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
924
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 6v6l4 2" })
925
- ] });
926
- }
927
- function GlobeIcon(props) {
928
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
929
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
930
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
931
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M2 12h20" })
932
- ] });
933
- }
934
- function ExternalLinkIcon(props) {
935
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
936
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M15 3h6v6" }),
937
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 14 21 3" }),
938
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
939
- ] });
940
- }
941
- function MessageCircleIcon(props) {
942
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z" }) });
943
- }
944
- function RocketIcon(props) {
945
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
946
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91 0" }),
947
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2" }),
948
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0" }),
949
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" })
950
- ] });
951
- }
952
- function AlertTriangleIcon(props) {
953
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
954
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
955
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 9v4" }),
956
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 17h.01" })
957
- ] });
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" })
1067
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg, { ...props, children: [
1068
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 4.1 12 6" }),
1069
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5.1 8-2.9-.8" }),
1070
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 12-1.9 2" }),
1071
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7.2 2.2 8 5.1" }),
1072
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z" })
965
1073
  ] });
966
1074
  }
967
1075
 
968
1076
  // catalog/react/primitives.tsx
969
- var import_jsx_runtime3 = require("react/jsx-runtime");
1077
+ var import_jsx_runtime4 = require("react/jsx-runtime");
970
1078
  var SearchInput = ({
971
1079
  ref,
972
1080
  value,
973
1081
  onChange,
974
1082
  placeholder
975
- }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-1.5 h-7 px-2 rounded-md bg-muted/40 border border-border/50", children: [
976
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SearchIcon, { className: "w-3 h-3 text-muted-foreground shrink-0" }),
977
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1083
+ }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1.5 h-7 px-2 rounded-md bg-muted/40 border border-border/50", children: [
1084
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SearchIcon, { className: "w-3 h-3 text-muted-foreground shrink-0" }),
1085
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
978
1086
  "input",
979
1087
  {
980
1088
  ref,
@@ -986,14 +1094,14 @@ var SearchInput = ({
986
1094
  style: { fontSize: "16px" }
987
1095
  }
988
1096
  ),
989
- value && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1097
+ value && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
990
1098
  "button",
991
1099
  {
992
1100
  type: "button",
993
1101
  onClick: () => onChange(""),
994
1102
  className: "text-muted-foreground hover:text-foreground",
995
1103
  "aria-label": "Clear search",
996
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(XIcon, { className: "w-3 h-3" })
1104
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(XIcon, { className: "w-3 h-3" })
997
1105
  }
998
1106
  )
999
1107
  ] });
@@ -1004,7 +1112,7 @@ function FilterChip({
1004
1112
  focused,
1005
1113
  onClick
1006
1114
  }) {
1007
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1115
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1008
1116
  "button",
1009
1117
  {
1010
1118
  type: "button",
@@ -1014,8 +1122,8 @@ function FilterChip({
1014
1122
  focused ? "bg-primary/15 text-primary border border-primary/30 ring-1 ring-primary/20" : active ? "bg-primary/10 text-primary border border-primary/20" : "text-muted-foreground hover:text-foreground hover:bg-muted/50 border border-transparent"
1015
1123
  ),
1016
1124
  children: [
1017
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { className: "w-3 h-3" }),
1018
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: label })
1125
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { className: "w-3 h-3" }),
1126
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
1019
1127
  ]
1020
1128
  }
1021
1129
  );
@@ -1025,7 +1133,7 @@ function OptionRow({
1025
1133
  selected,
1026
1134
  onClick
1027
1135
  }) {
1028
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1136
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1029
1137
  "button",
1030
1138
  {
1031
1139
  type: "button",
@@ -1036,8 +1144,8 @@ function OptionRow({
1036
1144
  selected && "text-primary font-medium"
1037
1145
  ),
1038
1146
  children: [
1039
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex-1 text-left", children: label }),
1040
- selected && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" })
1147
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 text-left", children: label }),
1148
+ selected && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CheckIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" })
1041
1149
  ]
1042
1150
  }
1043
1151
  );
@@ -1047,24 +1155,24 @@ function CheckRow({
1047
1155
  checked,
1048
1156
  onClick
1049
1157
  }) {
1050
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1158
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1051
1159
  "button",
1052
1160
  {
1053
1161
  type: "button",
1054
1162
  onClick,
1055
1163
  className: "flex items-center gap-2 w-full px-3 py-1.5 text-xs hover:bg-muted/50 active:bg-muted/70 transition-colors",
1056
1164
  children: [
1057
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1165
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1058
1166
  "div",
1059
1167
  {
1060
1168
  className: (0, import_design_system.cn)(
1061
1169
  "w-3.5 h-3.5 rounded-sm border flex items-center justify-center shrink-0 transition-colors",
1062
1170
  checked ? "bg-primary border-primary" : "border-muted-foreground/30"
1063
1171
  ),
1064
- children: checked && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, { className: "w-2.5 h-2.5 text-primary-foreground" })
1172
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CheckIcon, { className: "w-2.5 h-2.5 text-primary-foreground" })
1065
1173
  }
1066
1174
  ),
1067
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex-1 text-left truncate", children: label })
1175
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 text-left truncate", children: label })
1068
1176
  ]
1069
1177
  }
1070
1178
  );
@@ -1073,23 +1181,23 @@ function SidePanelHeader({
1073
1181
  title,
1074
1182
  onClose
1075
1183
  }) {
1076
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between px-3 py-2 border-b border-border shrink-0", children: [
1077
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs font-semibold text-foreground", children: title }),
1078
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1184
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between px-3 py-2 border-b border-border shrink-0", children: [
1185
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs font-semibold text-foreground", children: title }),
1186
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1079
1187
  "button",
1080
1188
  {
1081
1189
  type: "button",
1082
1190
  onClick: onClose,
1083
1191
  className: "w-5 h-5 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",
1084
1192
  "aria-label": "Close",
1085
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(XIcon, { className: "w-3.5 h-3.5" })
1193
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(XIcon, { className: "w-3.5 h-3.5" })
1086
1194
  }
1087
1195
  )
1088
1196
  ] });
1089
1197
  }
1090
1198
 
1091
1199
  // catalog/react/AgentCategoriesPanel.tsx
1092
- var import_jsx_runtime4 = require("react/jsx-runtime");
1200
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1093
1201
  function AgentCategoriesPanel({
1094
1202
  consumer,
1095
1203
  allCategories,
@@ -1100,9 +1208,9 @@ function AgentCategoriesPanel({
1100
1208
  const filtered = allCategories.filter(
1101
1209
  (c) => !search || c.toLowerCase().includes(search.toLowerCase())
1102
1210
  );
1103
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col h-full", children: [
1104
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SidePanelHeader, { title: "Categories", onClose }),
1105
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1211
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col h-full", children: [
1212
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SidePanelHeader, { title: "Categories", onClose }),
1213
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1106
1214
  SearchInput,
1107
1215
  {
1108
1216
  value: search,
@@ -1110,7 +1218,7 @@ function AgentCategoriesPanel({
1110
1218
  placeholder: "Filter categories..."
1111
1219
  }
1112
1220
  ) }),
1113
- consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1221
+ consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1114
1222
  "button",
1115
1223
  {
1116
1224
  type: "button",
@@ -1123,7 +1231,7 @@ function AgentCategoriesPanel({
1123
1231
  ]
1124
1232
  }
1125
1233
  ),
1126
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "overflow-y-auto flex-1", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-xs text-muted-foreground text-center py-6", children: "No categories" }) : filtered.map((cat) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1234
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "overflow-y-auto flex-1", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-xs text-muted-foreground text-center py-6", children: "No categories" }) : filtered.map((cat) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1127
1235
  CheckRow,
1128
1236
  {
1129
1237
  label: cat,
@@ -1140,30 +1248,30 @@ var import_design_system3 = require("@ai-matrx/design-system");
1140
1248
 
1141
1249
  // catalog/react/FavoriteAgentButton.tsx
1142
1250
  var import_design_system2 = require("@ai-matrx/design-system");
1143
- var import_react4 = require("react");
1144
- var import_jsx_runtime5 = require("react/jsx-runtime");
1251
+ var import_react5 = require("react");
1252
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1145
1253
  function FavoriteAgentButton({
1146
1254
  id,
1147
1255
  variant = "card",
1148
1256
  disabled
1149
1257
  }) {
1150
1258
  const catalog = useAgentCatalog();
1151
- const select = (0, import_react4.useCallback)(
1259
+ const select = (0, import_react5.useCallback)(
1152
1260
  (state) => state.byId[id],
1153
1261
  [id]
1154
1262
  );
1155
1263
  const record = useAgentCatalogState(select);
1156
- const isFavorite = record?.isFavorite ?? false;
1264
+ const isFavorite2 = record?.isFavorite ?? false;
1157
1265
  const isOwner = record?.isOwner ?? true;
1158
1266
  const handleClick = (e) => {
1159
1267
  e.stopPropagation();
1160
1268
  if (disabled || !isOwner) return;
1161
- void catalog.setFavorite(id, !isFavorite).catch(() => {
1269
+ void catalog.setFavorite(id, !isFavorite2).catch(() => {
1162
1270
  });
1163
1271
  };
1164
- const title = isOwner ? isFavorite ? "Remove from favorites" : "Add to favorites" : "Shared \u2014 cannot favorite";
1272
+ const title = isOwner ? isFavorite2 ? "Remove from favorites" : "Add to favorites" : "Shared \u2014 cannot favorite";
1165
1273
  if (variant === "list") {
1166
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1274
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1167
1275
  "button",
1168
1276
  {
1169
1277
  type: "button",
@@ -1175,21 +1283,21 @@ function FavoriteAgentButton({
1175
1283
  onClick: handleClick,
1176
1284
  disabled: disabled || !isOwner,
1177
1285
  title,
1178
- "aria-label": isFavorite ? "Remove from favorites" : "Add to favorites",
1179
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1286
+ "aria-label": isFavorite2 ? "Remove from favorites" : "Add to favorites",
1287
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1180
1288
  StarIcon,
1181
1289
  {
1182
- filled: isFavorite,
1290
+ filled: isFavorite2,
1183
1291
  className: (0, import_design_system2.cn)(
1184
1292
  "h-3.5 w-3.5 transition-all duration-150",
1185
- isFavorite ? "matrx-agent-star-on" : "text-muted-foreground/40 hover:matrx-agent-star-on"
1293
+ isFavorite2 ? "matrx-agent-star-on" : "text-muted-foreground/40 hover:matrx-agent-star-on"
1186
1294
  )
1187
1295
  }
1188
1296
  )
1189
1297
  }
1190
1298
  );
1191
1299
  }
1192
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1300
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1193
1301
  "button",
1194
1302
  {
1195
1303
  type: "button",
@@ -1197,13 +1305,13 @@ function FavoriteAgentButton({
1197
1305
  "absolute top-2.5 right-2.5 z-10 p-0.5 rounded transition-all duration-150",
1198
1306
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",
1199
1307
  disabled || !isOwner ? "cursor-not-allowed" : "hover:scale-110 cursor-pointer",
1200
- isFavorite ? "matrx-agent-star-on" : "text-muted-foreground/40 hover:matrx-agent-star-on"
1308
+ isFavorite2 ? "matrx-agent-star-on" : "text-muted-foreground/40 hover:matrx-agent-star-on"
1201
1309
  ),
1202
1310
  onClick: handleClick,
1203
1311
  disabled: disabled || !isOwner,
1204
1312
  title,
1205
- "aria-label": isFavorite ? "Remove from favorites" : "Add to favorites",
1206
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StarIcon, { filled: isFavorite, className: "w-4 h-4 transition-all duration-150" })
1313
+ "aria-label": isFavorite2 ? "Remove from favorites" : "Add to favorites",
1314
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StarIcon, { filled: isFavorite2, className: "w-4 h-4 transition-all duration-150" })
1207
1315
  }
1208
1316
  );
1209
1317
  }
@@ -1236,7 +1344,7 @@ function orchestraDelegatesLine(badge, limit = 3) {
1236
1344
  }
1237
1345
 
1238
1346
  // catalog/react/AgentDetailCard.tsx
1239
- var import_jsx_runtime6 = require("react/jsx-runtime");
1347
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1240
1348
  function AgentDetailCard({ agent, onSelect }) {
1241
1349
  const { LinkComponent, renderModelRef, openPeek } = useAgentCatalogUiPorts();
1242
1350
  const updatedDate = agent.updatedAt ? new Date(agent.updatedAt) : null;
@@ -1250,24 +1358,24 @@ function AgentDetailCard({ agent, onSelect }) {
1250
1358
  year: "numeric"
1251
1359
  });
1252
1360
  };
1253
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col h-full", children: [
1254
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "px-4 pt-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-3", children: [
1255
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0" }),
1256
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-1 min-w-0", children: [
1257
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-sm font-semibold text-foreground leading-tight truncate", children: agent.name || "Untitled" }),
1258
- agent.isFavorite && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center gap-1 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] matrx-agent-star-on", children: "Pinned to favorites" }) })
1361
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col h-full", children: [
1362
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-4 pt-4 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-start gap-3", children: [
1363
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0" }),
1364
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 min-w-0", children: [
1365
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-sm font-semibold text-foreground leading-tight truncate", children: agent.name || "Untitled" }),
1366
+ agent.isFavorite && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center gap-1 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-[11px] matrx-agent-star-on", children: "Pinned to favorites" }) })
1259
1367
  ] }),
1260
- !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FavoriteAgentButton, { id: agent.id, variant: "list" })
1368
+ !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FavoriteAgentButton, { id: agent.id, variant: "list" })
1261
1369
  ] }) }),
1262
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "h-px bg-border mx-3" }),
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) })
1370
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px bg-border mx-3" }),
1371
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 overflow-y-auto px-4 py-3 space-y-3", children: [
1372
+ agent.orchestra && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "rounded-md border border-primary/20 bg-primary/5 px-2.5 py-2", children: [
1373
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1.5", children: [
1374
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Music4Icon, { className: "w-3.5 h-3.5 text-primary shrink-0" }),
1375
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-[11px] font-medium text-primary", children: orchestraLabel(agent.orchestra) })
1268
1376
  ] }),
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)(
1377
+ agent.orchestra.tagline && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-1 text-xs text-foreground/80 leading-relaxed", children: agent.orchestra.tagline }),
1378
+ orchestraDelegatesLine(agent.orchestra) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1271
1379
  "p",
1272
1380
  {
1273
1381
  className: "mt-1 text-[11px] text-muted-foreground",
@@ -1275,22 +1383,22 @@ function AgentDetailCard({ agent, onSelect }) {
1275
1383
  children: orchestraDelegatesLine(agent.orchestra)
1276
1384
  }
1277
1385
  ),
1278
- orchestraDepthLine(agent.orchestra) && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mt-0.5 text-[11px] text-muted-foreground", children: orchestraDepthLine(agent.orchestra) })
1386
+ orchestraDepthLine(agent.orchestra) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-0.5 text-[11px] text-muted-foreground", children: orchestraDepthLine(agent.orchestra) })
1279
1387
  ] }),
1280
- agent.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
1281
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Description" }),
1282
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-xs text-foreground/80 leading-relaxed", children: agent.description })
1388
+ agent.description && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
1389
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Description" }),
1390
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-xs text-foreground/80 leading-relaxed", children: agent.description })
1283
1391
  ] }),
1284
- agent.category && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1285
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FolderIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1286
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-xs text-foreground/80", children: agent.category })
1392
+ agent.category && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1393
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FolderIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1394
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-foreground/80", children: agent.category })
1287
1395
  ] }),
1288
- agent.tags && agent.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
1289
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
1290
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TagIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1291
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Tags" })
1396
+ agent.tags && agent.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
1397
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
1398
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TagIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1399
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Tags" })
1292
1400
  ] }),
1293
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-wrap gap-1", children: agent.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1401
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-wrap gap-1", children: agent.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1294
1402
  "span",
1295
1403
  {
1296
1404
  className: "inline-flex items-center h-5 px-1.5 rounded text-[10px] font-medium bg-muted text-muted-foreground",
@@ -1299,40 +1407,40 @@ function AgentDetailCard({ agent, onSelect }) {
1299
1407
  tag
1300
1408
  )) })
1301
1409
  ] }),
1302
- agent.accessLevel && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1303
- agent.isOwner === false ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(UsersIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GlobeIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1304
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
1305
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-xs text-foreground/80 capitalize", children: agent.accessLevel === "owner" ? "You own this" : `Shared \u2014 ${agent.accessLevel}` }),
1306
- agent.sharedByEmail && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-[10px] text-muted-foreground", children: [
1410
+ agent.accessLevel && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1411
+ agent.isOwner === false ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(UsersIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(GlobeIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1412
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col", children: [
1413
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-foreground/80 capitalize", children: agent.accessLevel === "owner" ? "You own this" : `Shared \u2014 ${agent.accessLevel}` }),
1414
+ agent.sharedByEmail && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-[10px] text-muted-foreground", children: [
1307
1415
  "by ",
1308
1416
  agent.sharedByEmail
1309
1417
  ] })
1310
1418
  ] })
1311
1419
  ] }),
1312
- agent.modelId && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center gap-2", children: renderModelRef({
1420
+ agent.modelId && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center gap-2", children: renderModelRef({
1313
1421
  modelId: agent.modelId,
1314
1422
  className: "max-w-full text-xs text-foreground/80"
1315
1423
  }) }),
1316
- (updatedDate || createdDate) && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pt-1 space-y-1", children: [
1317
- updatedDate && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1318
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1319
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-[11px] text-muted-foreground", children: [
1424
+ (updatedDate || createdDate) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "pt-1 space-y-1", children: [
1425
+ updatedDate && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1426
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1427
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-[11px] text-muted-foreground", children: [
1320
1428
  "Updated ",
1321
1429
  formatDate(updatedDate)
1322
1430
  ] })
1323
1431
  ] }),
1324
- createdDate && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1325
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground/50 shrink-0" }),
1326
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-[11px] text-muted-foreground/70", children: [
1432
+ createdDate && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1433
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground/50 shrink-0" }),
1434
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-[11px] text-muted-foreground/70", children: [
1327
1435
  "Created ",
1328
1436
  formatDate(createdDate)
1329
1437
  ] })
1330
1438
  ] })
1331
1439
  ] })
1332
1440
  ] }),
1333
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "h-px bg-border mx-3 mt-auto" }),
1334
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "px-3 py-2 shrink-0 flex items-center gap-1.5", children: [
1335
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1441
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px bg-border mx-3 mt-auto" }),
1442
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "px-3 py-2 shrink-0 flex items-center gap-1.5", children: [
1443
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1336
1444
  "button",
1337
1445
  {
1338
1446
  type: "button",
@@ -1341,7 +1449,7 @@ function AgentDetailCard({ agent, onSelect }) {
1341
1449
  children: "Select"
1342
1450
  }
1343
1451
  ),
1344
- openPeek && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1452
+ openPeek && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1345
1453
  "button",
1346
1454
  {
1347
1455
  type: "button",
@@ -1352,11 +1460,11 @@ function AgentDetailCard({ agent, onSelect }) {
1352
1460
  title: "Sneak Peek",
1353
1461
  "aria-label": "Sneak Peek",
1354
1462
  className: iconButtonClass,
1355
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RocketIcon, { className: "w-3.5 h-3.5" })
1463
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RocketIcon, { className: "w-3.5 h-3.5" })
1356
1464
  }
1357
1465
  ),
1358
- !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1359
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1466
+ !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1467
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1360
1468
  LinkComponent,
1361
1469
  {
1362
1470
  href: `/chat/a/${agent.id}`,
@@ -1364,10 +1472,10 @@ function AgentDetailCard({ agent, onSelect }) {
1364
1472
  title: "Open in chat",
1365
1473
  "aria-label": "Open in chat",
1366
1474
  className: iconButtonClass,
1367
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MessageCircleIcon, { className: "w-3.5 h-3.5" })
1475
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MessageCircleIcon, { className: "w-3.5 h-3.5" })
1368
1476
  }
1369
1477
  ),
1370
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1478
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1371
1479
  LinkComponent,
1372
1480
  {
1373
1481
  href: `/agents/go/${agent.id}`,
@@ -1380,7 +1488,7 @@ function AgentDetailCard({ agent, onSelect }) {
1380
1488
  iconButtonClass,
1381
1489
  "hover:text-foreground"
1382
1490
  ),
1383
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ExternalLinkIcon, { className: "w-3.5 h-3.5" })
1491
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ExternalLinkIcon, { className: "w-3.5 h-3.5" })
1384
1492
  }
1385
1493
  )
1386
1494
  ] })
@@ -1390,14 +1498,14 @@ function AgentDetailCard({ agent, onSelect }) {
1390
1498
  var iconButtonClass = "flex items-center justify-center h-7 w-7 rounded-md border border-border bg-background text-muted-foreground hover:text-primary hover:bg-muted/50 transition-colors shrink-0";
1391
1499
 
1392
1500
  // catalog/react/AgentListContent.tsx
1393
- var import_react5 = require("react");
1501
+ var import_react6 = require("react");
1394
1502
 
1395
1503
  // catalog/react/types.ts
1396
1504
  var PANEL_HEIGHT = "528px";
1397
1505
  var LIST_MAX_HEIGHT = "min(528px, var(--radix-popper-available-height, 528px))";
1398
1506
 
1399
1507
  // catalog/react/AgentFilterBar.tsx
1400
- var import_jsx_runtime7 = require("react/jsx-runtime");
1508
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1401
1509
  function AgentFilterBar({
1402
1510
  consumer,
1403
1511
  allCategories,
@@ -1408,8 +1516,8 @@ function AgentFilterBar({
1408
1516
  onFilterChipClick,
1409
1517
  onReset
1410
1518
  }) {
1411
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1 px-2 pb-1.5 overflow-x-auto matrx-agent-scrollbar-none shrink-0", children: [
1412
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1519
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-1 px-2 pb-1.5 overflow-x-auto matrx-agent-scrollbar-none shrink-0", children: [
1520
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1413
1521
  FilterChip,
1414
1522
  {
1415
1523
  icon: ArrowUpDownIcon,
@@ -1419,7 +1527,7 @@ function AgentFilterBar({
1419
1527
  onClick: () => onFilterChipClick("sort")
1420
1528
  }
1421
1529
  ),
1422
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1530
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1423
1531
  FilterChip,
1424
1532
  {
1425
1533
  icon: StarIcon,
@@ -1431,7 +1539,7 @@ function AgentFilterBar({
1431
1539
  }
1432
1540
  }
1433
1541
  ),
1434
- allCategories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1542
+ allCategories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1435
1543
  FilterChip,
1436
1544
  {
1437
1545
  icon: FolderIcon,
@@ -1441,7 +1549,7 @@ function AgentFilterBar({
1441
1549
  onClick: () => onFilterChipClick("categories")
1442
1550
  }
1443
1551
  ),
1444
- allTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1552
+ allTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1445
1553
  FilterChip,
1446
1554
  {
1447
1555
  icon: TagIcon,
@@ -1451,14 +1559,14 @@ function AgentFilterBar({
1451
1559
  onClick: () => onFilterChipClick("tags")
1452
1560
  }
1453
1561
  ),
1454
- activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1562
+ activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1455
1563
  "button",
1456
1564
  {
1457
1565
  type: "button",
1458
1566
  onClick: onReset,
1459
1567
  "aria-label": "Reset filters",
1460
1568
  className: "flex items-center gap-0.5 h-6 px-1.5 rounded text-[11px] text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors shrink-0",
1461
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RotateCcwIcon, { className: "w-3 h-3" })
1569
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RotateCcwIcon, { className: "w-3 h-3" })
1462
1570
  }
1463
1571
  )
1464
1572
  ] });
@@ -1466,7 +1574,7 @@ function AgentFilterBar({
1466
1574
 
1467
1575
  // catalog/react/AgentListTabs.tsx
1468
1576
  var import_design_system4 = require("@ai-matrx/design-system");
1469
- var import_jsx_runtime8 = require("react/jsx-runtime");
1577
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1470
1578
  function AgentListTabs({
1471
1579
  consumer,
1472
1580
  tabCounts,
@@ -1480,7 +1588,7 @@ function AgentListTabs({
1480
1588
  { value: "all", label: "All", countKey: "all" },
1481
1589
  { value: "system", label: labels.publicTab, countKey: "system" }
1482
1590
  ];
1483
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1591
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1484
1592
  "div",
1485
1593
  {
1486
1594
  className: "flex items-center gap-0.5 px-2 pb-1 overflow-x-auto matrx-agent-scrollbar-none shrink-0",
@@ -1490,7 +1598,7 @@ function AgentListTabs({
1490
1598
  const label = value === "system" ? systemTabLabel ?? baseLabel : baseLabel;
1491
1599
  const active = consumer.tab === value;
1492
1600
  const count = tabCounts[countKey];
1493
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1601
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1494
1602
  "button",
1495
1603
  {
1496
1604
  type: "button",
@@ -1502,8 +1610,8 @@ function AgentListTabs({
1502
1610
  active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"
1503
1611
  ),
1504
1612
  children: [
1505
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label }),
1506
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1613
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: label }),
1614
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1507
1615
  "span",
1508
1616
  {
1509
1617
  className: (0, import_design_system4.cn)("tabular-nums opacity-70", active && "opacity-90"),
@@ -1521,7 +1629,7 @@ function AgentListTabs({
1521
1629
 
1522
1630
  // catalog/react/AgentRow.tsx
1523
1631
  var import_design_system5 = require("@ai-matrx/design-system");
1524
- var import_jsx_runtime9 = require("react/jsx-runtime");
1632
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1525
1633
  function AgentRow({
1526
1634
  agent,
1527
1635
  isActive,
@@ -1536,9 +1644,10 @@ function AgentRow({
1536
1644
  const { LinkComponent } = useAgentCatalogUiPorts();
1537
1645
  const { labels } = useAgentCatalog();
1538
1646
  const rowHref = href ?? `/agents/go/${agent.id}`;
1539
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1647
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1540
1648
  "div",
1541
1649
  {
1650
+ "data-testid": `agent-row-${agent.id}`,
1542
1651
  className: (0, import_design_system5.cn)(
1543
1652
  "flex items-center w-full text-left transition-colors group",
1544
1653
  "hover:bg-muted/50 active:bg-muted/70",
@@ -1548,7 +1657,7 @@ function AgentRow({
1548
1657
  onMouseEnter: isMobile ? void 0 : onHover,
1549
1658
  onMouseLeave: isMobile ? void 0 : onHoverEnd,
1550
1659
  children: [
1551
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1660
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1552
1661
  LinkComponent,
1553
1662
  {
1554
1663
  href: rowHref,
@@ -1559,8 +1668,8 @@ function AgentRow({
1559
1668
  },
1560
1669
  className: "flex items-center gap-2 flex-1 min-w-0 px-3 py-2",
1561
1670
  children: [
1562
- agent.isFavorite && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(StarIcon, { filled: true, className: "w-3 h-3 matrx-agent-star-on shrink-0" }),
1563
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1671
+ agent.isFavorite && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StarIcon, { filled: true, className: "w-3 h-3 matrx-agent-star-on shrink-0" }),
1672
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1564
1673
  "span",
1565
1674
  {
1566
1675
  className: (0, import_design_system5.cn)(
@@ -1570,22 +1679,22 @@ function AgentRow({
1570
1679
  children: agent.name || "Untitled"
1571
1680
  }
1572
1681
  ),
1573
- agent.orchestra && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1682
+ agent.orchestra && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1574
1683
  "span",
1575
1684
  {
1576
1685
  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
1686
  title: orchestraDelegatesLine(agent.orchestra) ?? orchestraLabel(agent.orchestra),
1578
1687
  children: [
1579
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Music4Icon, { className: "w-2.5 h-2.5" }),
1688
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Music4Icon, { className: "w-2.5 h-2.5" }),
1580
1689
  agent.orchestra.memberCount
1581
1690
  ]
1582
1691
  }
1583
1692
  ),
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
1693
+ agent.agentType === "builtin" ? /* @__PURE__ */ (0, import_jsx_runtime10.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_runtime10.jsx)("span", { className: "text-[9px] text-muted-foreground bg-muted px-1 py-px rounded shrink-0 ml-auto", children: "shared" }) : null
1585
1694
  ]
1586
1695
  }
1587
1696
  ),
1588
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1697
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1589
1698
  "button",
1590
1699
  {
1591
1700
  type: "button",
@@ -1595,7 +1704,7 @@ function AgentRow({
1595
1704
  onDetailPress();
1596
1705
  },
1597
1706
  className: "flex items-center justify-center w-10 h-full shrink-0 text-muted-foreground/40 active:text-muted-foreground",
1598
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ChevronRightIcon, { className: "w-4 h-4" })
1707
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ChevronRightIcon, { className: "w-4 h-4" })
1599
1708
  }
1600
1709
  )
1601
1710
  ]
@@ -1604,7 +1713,7 @@ function AgentRow({
1604
1713
  }
1605
1714
 
1606
1715
  // catalog/react/AgentListContent.tsx
1607
- var import_jsx_runtime10 = require("react/jsx-runtime");
1716
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1608
1717
  function AgentListContent({
1609
1718
  agents,
1610
1719
  isLoading,
@@ -1632,8 +1741,8 @@ function AgentListContent({
1632
1741
  listOpen = false
1633
1742
  }) {
1634
1743
  const catalog = useAgentCatalog();
1635
- const listScrollRef = (0, import_react5.useRef)(null);
1636
- (0, import_react5.useEffect)(() => {
1744
+ const listScrollRef = (0, import_react6.useRef)(null);
1745
+ (0, import_react6.useEffect)(() => {
1637
1746
  if (listOpen && pinnedAgent) {
1638
1747
  listScrollRef.current?.scrollTo({ top: 0 });
1639
1748
  }
@@ -1641,8 +1750,8 @@ function AgentListContent({
1641
1750
  const { labels } = catalog;
1642
1751
  const emptyLabel = agentListEmptyLabel(consumer.tab, labels);
1643
1752
  const defaultAgent = defaultRow?.row ?? null;
1644
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col h-full", children: [
1645
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1753
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col h-full", children: [
1754
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1646
1755
  SearchInput,
1647
1756
  {
1648
1757
  ref: inputRef,
@@ -1651,7 +1760,7 @@ function AgentListContent({
1651
1760
  placeholder: labels.searchPlaceholder
1652
1761
  }
1653
1762
  ) }),
1654
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1763
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1655
1764
  AgentListTabs,
1656
1765
  {
1657
1766
  consumer,
@@ -1660,7 +1769,7 @@ function AgentListContent({
1660
1769
  visibleTabs
1661
1770
  }
1662
1771
  ),
1663
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1772
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1664
1773
  AgentFilterBar,
1665
1774
  {
1666
1775
  consumer,
@@ -1673,46 +1782,46 @@ function AgentListContent({
1673
1782
  onReset
1674
1783
  }
1675
1784
  ),
1676
- defaultRow?.drift && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1785
+ defaultRow?.drift && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1677
1786
  "div",
1678
1787
  {
1679
1788
  role: "status",
1680
1789
  className: "matrx-agent-drift-banner mx-2 mb-1.5 flex items-start gap-2 rounded-md px-2 py-1.5 shrink-0",
1681
1790
  children: [
1682
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1683
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.drift }),
1684
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1791
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1792
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.drift }),
1793
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1685
1794
  "button",
1686
1795
  {
1687
1796
  type: "button",
1688
1797
  "aria-label": "Dismiss",
1689
1798
  onClick: () => catalog.dismissDefaultRowDrift(defaultRow.mandateKey),
1690
1799
  className: "shrink-0 opacity-70 hover:opacity-100",
1691
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(XIcon, { className: "w-3 h-3" })
1800
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(XIcon, { className: "w-3 h-3" })
1692
1801
  }
1693
1802
  )
1694
1803
  ]
1695
1804
  }
1696
1805
  ),
1697
- defaultRow?.error && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1806
+ defaultRow?.error && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1698
1807
  "div",
1699
1808
  {
1700
1809
  role: "alert",
1701
1810
  className: "matrx-agent-drift-banner mx-2 mb-1.5 flex items-start gap-2 rounded-md px-2 py-1.5 shrink-0",
1702
1811
  children: [
1703
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1704
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.error })
1812
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1813
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.error })
1705
1814
  ]
1706
1815
  }
1707
1816
  ),
1708
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px bg-border shrink-0" }),
1709
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref: listScrollRef, className: "overflow-y-auto flex-1 min-h-0", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-center py-8 gap-2 text-muted-foreground", children: [
1710
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LoaderIcon, { className: "w-4 h-4 matrx-agent-spin" }),
1711
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-xs", children: labels.loading })
1712
- ] }) : agents.length === 0 && !pinnedAgent && !defaultAgent ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col items-center py-8 text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-xs", children: emptyLabel }) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "py-0.5", children: [
1713
- defaultAgent && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1714
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: "Default" }) }),
1715
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1817
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-px bg-border shrink-0" }),
1818
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref: listScrollRef, className: "overflow-y-auto flex-1 min-h-0", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-center py-8 gap-2 text-muted-foreground", children: [
1819
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LoaderIcon, { className: "w-4 h-4 matrx-agent-spin" }),
1820
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-xs", children: labels.loading })
1821
+ ] }) : agents.length === 0 && !pinnedAgent && !defaultAgent ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex flex-col items-center py-8 text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-xs", children: emptyLabel }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "py-0.5", children: [
1822
+ defaultAgent && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1823
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: "Default" }) }),
1824
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1716
1825
  AgentRow,
1717
1826
  {
1718
1827
  agent: defaultAgent,
@@ -1727,11 +1836,11 @@ function AgentListContent({
1727
1836
  },
1728
1837
  `default-${defaultAgent.id}`
1729
1838
  ),
1730
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1839
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1731
1840
  ] }),
1732
- pinnedAgent && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1733
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: labels.currentAgentHeading }) }),
1734
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1841
+ pinnedAgent && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1842
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 pt-1.5 pb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[10px] font-medium uppercase tracking-wide text-muted-foreground", children: labels.currentAgentHeading }) }),
1843
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1735
1844
  AgentRow,
1736
1845
  {
1737
1846
  agent: pinnedAgent,
@@ -1746,9 +1855,9 @@ function AgentListContent({
1746
1855
  },
1747
1856
  `pinned-${pinnedAgent.id}`
1748
1857
  ),
1749
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1858
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1750
1859
  ] }),
1751
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1860
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1752
1861
  AgentRow,
1753
1862
  {
1754
1863
  agent,
@@ -1763,16 +1872,16 @@ function AgentListContent({
1763
1872
  },
1764
1873
  agent.id
1765
1874
  )),
1766
- agents.length === 0 && (pinnedAgent || defaultAgent) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex flex-col items-center py-4 text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-xs", children: emptyLabel }) })
1875
+ agents.length === 0 && (pinnedAgent || defaultAgent) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex flex-col items-center py-4 text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-xs", children: emptyLabel }) })
1767
1876
  ] }) }),
1768
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px bg-border shrink-0" }),
1769
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between px-2.5 py-1.5 shrink-0", children: [
1770
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: [
1877
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-px bg-border shrink-0" }),
1878
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between px-2.5 py-1.5 shrink-0", children: [
1879
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: [
1771
1880
  agents.length,
1772
1881
  " agent",
1773
1882
  agents.length !== 1 ? "s" : ""
1774
1883
  ] }),
1775
- consumer.searchTerm && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1884
+ consumer.searchTerm && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1776
1885
  "button",
1777
1886
  {
1778
1887
  type: "button",
@@ -1786,7 +1895,7 @@ function AgentListContent({
1786
1895
  }
1787
1896
 
1788
1897
  // catalog/react/AgentMobileSubView.tsx
1789
- var import_jsx_runtime11 = require("react/jsx-runtime");
1898
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1790
1899
  function AgentMobileSubView({
1791
1900
  view,
1792
1901
  consumer,
@@ -1799,20 +1908,20 @@ function AgentMobileSubView({
1799
1908
  onBack
1800
1909
  }) {
1801
1910
  const title = view === "sort" ? "Sort" : view === "categories" ? "Categories" : "Tags";
1802
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col", children: [
1803
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1911
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col", children: [
1912
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1804
1913
  "button",
1805
1914
  {
1806
1915
  type: "button",
1807
1916
  onClick: onBack,
1808
1917
  className: "flex items-center gap-1.5 px-3 py-2.5 text-sm font-medium text-primary hover:bg-muted/30 transition-colors border-b border-border shrink-0",
1809
1918
  children: [
1810
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
1919
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
1811
1920
  title
1812
1921
  ]
1813
1922
  }
1814
1923
  ),
1815
- view === "sort" && SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1924
+ view === "sort" && SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1816
1925
  OptionRow,
1817
1926
  {
1818
1927
  label: opt.label,
@@ -1824,8 +1933,8 @@ function AgentMobileSubView({
1824
1933
  },
1825
1934
  opt.value
1826
1935
  )),
1827
- view === "categories" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1828
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1936
+ view === "categories" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1937
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1829
1938
  SearchInput,
1830
1939
  {
1831
1940
  value: catSearch,
@@ -1833,7 +1942,7 @@ function AgentMobileSubView({
1833
1942
  placeholder: "Filter categories..."
1834
1943
  }
1835
1944
  ) }),
1836
- consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1945
+ consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1837
1946
  "button",
1838
1947
  {
1839
1948
  type: "button",
@@ -1846,9 +1955,9 @@ function AgentMobileSubView({
1846
1955
  ]
1847
1956
  }
1848
1957
  ),
1849
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allCategories.filter(
1958
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allCategories.filter(
1850
1959
  (c) => !catSearch || c.toLowerCase().includes(catSearch.toLowerCase())
1851
- ).map((cat) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1960
+ ).map((cat) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1852
1961
  CheckRow,
1853
1962
  {
1854
1963
  label: cat,
@@ -1858,8 +1967,8 @@ function AgentMobileSubView({
1858
1967
  cat
1859
1968
  )) })
1860
1969
  ] }),
1861
- view === "tags" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1862
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1970
+ view === "tags" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1971
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1863
1972
  SearchInput,
1864
1973
  {
1865
1974
  value: tagSearch,
@@ -1867,7 +1976,7 @@ function AgentMobileSubView({
1867
1976
  placeholder: "Filter tags..."
1868
1977
  }
1869
1978
  ) }),
1870
- consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1979
+ consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1871
1980
  "button",
1872
1981
  {
1873
1982
  type: "button",
@@ -1880,9 +1989,9 @@ function AgentMobileSubView({
1880
1989
  ]
1881
1990
  }
1882
1991
  ),
1883
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allTags.filter(
1992
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allTags.filter(
1884
1993
  (t) => !tagSearch || t.toLowerCase().includes(tagSearch.toLowerCase())
1885
- ).map((tag) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1994
+ ).map((tag) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1886
1995
  CheckRow,
1887
1996
  {
1888
1997
  label: tag,
@@ -1896,11 +2005,11 @@ function AgentMobileSubView({
1896
2005
  }
1897
2006
 
1898
2007
  // catalog/react/AgentSortPanel.tsx
1899
- var import_jsx_runtime12 = require("react/jsx-runtime");
2008
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1900
2009
  function AgentSortPanel({ consumer, onClose }) {
1901
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col h-full", children: [
1902
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidePanelHeader, { title: "Sort By", onClose }),
1903
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "overflow-y-auto flex-1", children: SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2010
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col h-full", children: [
2011
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SidePanelHeader, { title: "Sort By", onClose }),
2012
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "overflow-y-auto flex-1", children: SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1904
2013
  OptionRow,
1905
2014
  {
1906
2015
  label: opt.label,
@@ -1913,7 +2022,7 @@ function AgentSortPanel({ consumer, onClose }) {
1913
2022
  }
1914
2023
 
1915
2024
  // catalog/react/AgentTagsPanel.tsx
1916
- var import_jsx_runtime13 = require("react/jsx-runtime");
2025
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1917
2026
  function AgentTagsPanel({
1918
2027
  consumer,
1919
2028
  allTags,
@@ -1924,9 +2033,9 @@ function AgentTagsPanel({
1924
2033
  const filtered = allTags.filter(
1925
2034
  (t) => !search || t.toLowerCase().includes(search.toLowerCase())
1926
2035
  );
1927
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col h-full", children: [
1928
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SidePanelHeader, { title: "Tags", onClose }),
1929
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2036
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col h-full", children: [
2037
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidePanelHeader, { title: "Tags", onClose }),
2038
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1930
2039
  SearchInput,
1931
2040
  {
1932
2041
  value: search,
@@ -1934,7 +2043,7 @@ function AgentTagsPanel({
1934
2043
  placeholder: "Filter tags..."
1935
2044
  }
1936
2045
  ) }),
1937
- consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2046
+ consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1938
2047
  "button",
1939
2048
  {
1940
2049
  type: "button",
@@ -1947,7 +2056,7 @@ function AgentTagsPanel({
1947
2056
  ]
1948
2057
  }
1949
2058
  ),
1950
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "overflow-y-auto flex-1", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs text-muted-foreground text-center py-6", children: "No tags" }) : filtered.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2059
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-y-auto flex-1", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground text-center py-6", children: "No tags" }) : filtered.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1951
2060
  CheckRow,
1952
2061
  {
1953
2062
  label: tag,
@@ -1960,7 +2069,7 @@ function AgentTagsPanel({
1960
2069
  }
1961
2070
 
1962
2071
  // catalog/react/AgentListDropdown.tsx
1963
- var import_jsx_runtime14 = require("react/jsx-runtime");
2072
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1964
2073
  var CONSUMER_ID = "agent-list-dropdown";
1965
2074
  function AgentListDropdown({
1966
2075
  onSelect,
@@ -1985,13 +2094,13 @@ function AgentListDropdown({
1985
2094
  const isMobile = (0, import_design_system6.useIsMobile)();
1986
2095
  const { labels } = useAgentCatalog();
1987
2096
  const { popoverContainer } = useAgentCatalogUiPorts();
1988
- const [open, setOpen] = (0, import_react6.useState)(false);
1989
- const [rightPanel, setRightPanel] = (0, import_react6.useState)(null);
1990
- const [catSearch, setCatSearch] = (0, import_react6.useState)("");
1991
- const [tagSearch, setTagSearch] = (0, import_react6.useState)("");
1992
- const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react6.useState)(null);
1993
- const [mobileSubView, setMobileSubView] = (0, import_react6.useState)(null);
1994
- const inputRef = (0, import_react6.useRef)(null);
2097
+ const [open, setOpen] = (0, import_react7.useState)(false);
2098
+ const [rightPanel, setRightPanel] = (0, import_react7.useState)(null);
2099
+ const [catSearch, setCatSearch] = (0, import_react7.useState)("");
2100
+ const [tagSearch, setTagSearch] = (0, import_react7.useState)("");
2101
+ const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react7.useState)(null);
2102
+ const [mobileSubView, setMobileSubView] = (0, import_react7.useState)(null);
2103
+ const inputRef = (0, import_react7.useRef)(null);
1995
2104
  const {
1996
2105
  agents,
1997
2106
  isLoading,
@@ -2054,7 +2163,7 @@ function AgentListDropdown({
2054
2163
  setRightPanel(rightPanel === panel ? null : panel);
2055
2164
  }
2056
2165
  };
2057
- const handleAgentHover = (0, import_react6.useCallback)(
2166
+ const handleAgentHover = (0, import_react7.useCallback)(
2058
2167
  (agent) => {
2059
2168
  if (isMobile) return;
2060
2169
  const filterPanelOpen = rightPanel === "sort" || rightPanel === "categories" || rightPanel === "tags";
@@ -2063,7 +2172,7 @@ function AgentListDropdown({
2063
2172
  },
2064
2173
  [isMobile, rightPanel, coreAgentHover]
2065
2174
  );
2066
- const handleAgentHoverEnd = (0, import_react6.useCallback)(
2175
+ const handleAgentHoverEnd = (0, import_react7.useCallback)(
2067
2176
  (agent) => {
2068
2177
  if (isMobile) return;
2069
2178
  if (rightPanel !== "detail") return;
@@ -2071,16 +2180,16 @@ function AgentListDropdown({
2071
2180
  },
2072
2181
  [isMobile, rightPanel, coreAgentHoverEnd]
2073
2182
  );
2074
- const handleDetailPanelMouseLeave = (0, import_react6.useCallback)(() => {
2183
+ const handleDetailPanelMouseLeave = (0, import_react7.useCallback)(() => {
2075
2184
  coreDetailMouseLeave(() => setRightPanel(null));
2076
2185
  }, [coreDetailMouseLeave]);
2077
- const resolveAgentHref = (0, import_react6.useMemo)(() => {
2186
+ const resolveAgentHref = (0, import_react7.useMemo)(() => {
2078
2187
  if (resolveAgentHrefProp) return resolveAgentHrefProp;
2079
2188
  if (!navigateTo) return void 0;
2080
2189
  return (agent) => navigateTo.replace("{id}", agent.id);
2081
2190
  }, [navigateTo, resolveAgentHrefProp]);
2082
2191
  const hasRightPanel = rightPanel !== null;
2083
- const triggerButton = triggerSlot ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2192
+ const triggerButton = triggerSlot ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2084
2193
  "button",
2085
2194
  {
2086
2195
  type: "button",
@@ -2092,22 +2201,22 @@ function AgentListDropdown({
2092
2201
  className
2093
2202
  ),
2094
2203
  children: [
2095
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "min-w-0 max-w-[200px] flex-1 truncate text-left", children: displayLabel }),
2096
- activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "flex items-center justify-center w-4 h-4 rounded-md bg-primary text-primary-foreground text-[10px]", children: activeFilterCount }),
2097
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronDownIcon, { className: "w-3 h-3 text-muted-foreground/60" })
2204
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 max-w-[200px] flex-1 truncate text-left", children: displayLabel }),
2205
+ activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex items-center justify-center w-4 h-4 rounded-md bg-primary text-primary-foreground text-[10px]", children: activeFilterCount }),
2206
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronDownIcon, { className: "w-3 h-3 text-muted-foreground/60" })
2098
2207
  ]
2099
2208
  }
2100
2209
  );
2101
2210
  const wrapTrigger = (Trigger) => {
2102
2211
  if (!showAssignedTooltip) {
2103
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Trigger, { asChild: true, children: triggerButton });
2212
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Trigger, { asChild: true, children: triggerButton });
2104
2213
  }
2105
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.Tooltip, { ...open ? { open: false } : {}, children: [
2106
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system6.TooltipTrigger, { asChild: true, children: triggerButton }) }),
2107
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system6.TooltipContent, { side: "bottom", className: "max-w-xs", children: displayLabel })
2214
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.Tooltip, { ...open ? { open: false } : {}, children: [
2215
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system6.TooltipTrigger, { asChild: true, children: triggerButton }) }),
2216
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system6.TooltipContent, { side: "bottom", className: "max-w-xs", children: displayLabel })
2108
2217
  ] });
2109
2218
  };
2110
- const listPanel = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2219
+ const listPanel = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2111
2220
  AgentListContent,
2112
2221
  {
2113
2222
  agents,
@@ -2139,31 +2248,31 @@ function AgentListDropdown({
2139
2248
  }
2140
2249
  );
2141
2250
  if (isMobile) {
2142
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.Drawer, { open, onOpenChange: handleOpen, children: [
2251
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.Drawer, { open, onOpenChange: handleOpen, children: [
2143
2252
  wrapTrigger(import_design_system6.DrawerTrigger),
2144
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.DrawerContent, { className: "h-[85dvh]", children: [
2145
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system6.DrawerTitle, { className: "sr-only", children: "Select Agent" }),
2146
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col overflow-hidden flex-1 min-h-0", children: mobileDetailAgent ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col overflow-hidden", children: [
2147
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2253
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.DrawerContent, { className: "h-[85dvh]", children: [
2254
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system6.DrawerTitle, { className: "sr-only", children: "Select Agent" }),
2255
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-col overflow-hidden flex-1 min-h-0", children: mobileDetailAgent ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col overflow-hidden", children: [
2256
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2148
2257
  "button",
2149
2258
  {
2150
2259
  type: "button",
2151
2260
  onClick: () => setMobileDetailAgent(null),
2152
2261
  className: "flex items-center gap-1.5 px-3 py-2.5 text-sm font-medium text-primary hover:bg-muted/30 transition-colors border-b border-border shrink-0",
2153
2262
  children: [
2154
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
2263
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
2155
2264
  "Back"
2156
2265
  ]
2157
2266
  }
2158
2267
  ),
2159
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2268
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2160
2269
  AgentDetailCard,
2161
2270
  {
2162
2271
  agent: mobileDetailAgent,
2163
2272
  onSelect: () => handleSelectAgent(mobileDetailAgent)
2164
2273
  }
2165
2274
  ) })
2166
- ] }) : mobileSubView ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2275
+ ] }) : mobileSubView ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2167
2276
  AgentMobileSubView,
2168
2277
  {
2169
2278
  view: mobileSubView,
@@ -2184,9 +2293,9 @@ function AgentListDropdown({
2184
2293
  ] })
2185
2294
  ] });
2186
2295
  }
2187
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.Popover, { open, onOpenChange: handleOpen, modal: false, children: [
2296
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.Popover, { open, onOpenChange: handleOpen, modal: false, children: [
2188
2297
  wrapTrigger(import_design_system6.PopoverTrigger),
2189
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2298
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2190
2299
  import_design_system6.PopoverContent,
2191
2300
  {
2192
2301
  ...contentSide ? { side: contentSide } : {},
@@ -2197,30 +2306,30 @@ function AgentListDropdown({
2197
2306
  ...popoverContainer ? { container: popoverContainer } : {},
2198
2307
  className: "p-0 overflow-hidden w-[680px]",
2199
2308
  style: { height: PANEL_HEIGHT, maxHeight: LIST_MAX_HEIGHT },
2200
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex h-full", children: [
2201
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col min-w-0 w-[340px] shrink-0 border-r border-border", children: listPanel }),
2202
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2309
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex h-full", children: [
2310
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-col min-w-0 w-[340px] shrink-0 border-r border-border", children: listPanel }),
2311
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2203
2312
  "div",
2204
2313
  {
2205
2314
  className: "h-full w-[340px] shrink-0 overflow-hidden flex flex-col",
2206
2315
  onMouseEnter: rightPanel === "detail" ? handleDetailPanelMouseEnter : void 0,
2207
2316
  onMouseLeave: rightPanel === "detail" ? handleDetailPanelMouseLeave : void 0,
2208
2317
  children: [
2209
- rightPanel === "detail" && hoveredAgent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-full matrx-agent-fade-in", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2318
+ rightPanel === "detail" && hoveredAgent && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-full matrx-agent-fade-in", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2210
2319
  AgentDetailCard,
2211
2320
  {
2212
2321
  agent: hoveredAgent,
2213
2322
  onSelect: () => handleSelectAgent(hoveredAgent)
2214
2323
  }
2215
2324
  ) }, hoveredAgent.id),
2216
- rightPanel === "sort" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2325
+ rightPanel === "sort" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2217
2326
  AgentSortPanel,
2218
2327
  {
2219
2328
  consumer,
2220
2329
  onClose: () => setRightPanel(null)
2221
2330
  }
2222
2331
  ),
2223
- rightPanel === "categories" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2332
+ rightPanel === "categories" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2224
2333
  AgentCategoriesPanel,
2225
2334
  {
2226
2335
  consumer,
@@ -2233,7 +2342,7 @@ function AgentListDropdown({
2233
2342
  }
2234
2343
  }
2235
2344
  ),
2236
- rightPanel === "tags" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2345
+ rightPanel === "tags" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2237
2346
  AgentTagsPanel,
2238
2347
  {
2239
2348
  consumer,
@@ -2246,9 +2355,9 @@ function AgentListDropdown({
2246
2355
  }
2247
2356
  }
2248
2357
  ),
2249
- !hasRightPanel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center", children: [
2250
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MousePointerClickIcon, { className: "h-6 w-6 text-muted-foreground/40" }),
2251
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground/70 leading-relaxed", children: labels.hoverHint })
2358
+ !hasRightPanel && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center", children: [
2359
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MousePointerClickIcon, { className: "h-6 w-6 text-muted-foreground/40" }),
2360
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-xs text-muted-foreground/70 leading-relaxed", children: labels.hoverHint })
2252
2361
  ] })
2253
2362
  ]
2254
2363
  }
@@ -2261,8 +2370,8 @@ function AgentListDropdown({
2261
2370
 
2262
2371
  // catalog/react/AgentListInlinePicker.tsx
2263
2372
  var import_design_system7 = require("@ai-matrx/design-system");
2264
- var import_react7 = require("react");
2265
- var import_jsx_runtime15 = require("react/jsx-runtime");
2373
+ var import_react8 = require("react");
2374
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2266
2375
  function AgentListInlinePicker({
2267
2376
  consumerId,
2268
2377
  onSelect,
@@ -2278,11 +2387,11 @@ function AgentListInlinePicker({
2278
2387
  excludeAgentIds,
2279
2388
  defaultMandateKey
2280
2389
  }) {
2281
- const inputRef = (0, import_react7.useRef)(null);
2282
- const [catSearch, setCatSearch] = (0, import_react7.useState)("");
2283
- const [tagSearch, setTagSearch] = (0, import_react7.useState)("");
2284
- const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react7.useState)(null);
2285
- const [mobileSubView, setMobileSubView] = (0, import_react7.useState)(null);
2390
+ const inputRef = (0, import_react8.useRef)(null);
2391
+ const [catSearch, setCatSearch] = (0, import_react8.useState)("");
2392
+ const [tagSearch, setTagSearch] = (0, import_react8.useState)("");
2393
+ const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react8.useState)(null);
2394
+ const [mobileSubView, setMobileSubView] = (0, import_react8.useState)(null);
2286
2395
  const {
2287
2396
  agents,
2288
2397
  isLoading,
@@ -2310,7 +2419,7 @@ function AgentListInlinePicker({
2310
2419
  ...excludeAgentIds ? { excludeAgentIds } : {},
2311
2420
  ...defaultMandateKey ? { defaultMandateKey } : {}
2312
2421
  });
2313
- (0, import_react7.useEffect)(() => {
2422
+ (0, import_react8.useEffect)(() => {
2314
2423
  ensureLoaded();
2315
2424
  if (!autoFocusSearch) return void 0;
2316
2425
  const timer = setTimeout(() => inputRef.current?.focus(), 50);
@@ -2326,20 +2435,20 @@ function AgentListInlinePicker({
2326
2435
  };
2327
2436
  const isMobile = true;
2328
2437
  if (mobileDetailAgent) {
2329
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: [
2330
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2438
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: [
2439
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2331
2440
  "button",
2332
2441
  {
2333
2442
  type: "button",
2334
2443
  onClick: () => setMobileDetailAgent(null),
2335
2444
  className: "flex shrink-0 items-center gap-1.5 border-b border-border px-3 py-2 text-sm font-medium text-primary transition-colors hover:bg-muted/30",
2336
2445
  children: [
2337
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRightIcon, { className: "h-4 w-4 rotate-180" }),
2446
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronRightIcon, { className: "h-4 w-4 rotate-180" }),
2338
2447
  "Back"
2339
2448
  ]
2340
2449
  }
2341
2450
  ),
2342
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2451
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2343
2452
  AgentDetailCard,
2344
2453
  {
2345
2454
  agent: mobileDetailAgent,
@@ -2349,7 +2458,7 @@ function AgentListInlinePicker({
2349
2458
  ] });
2350
2459
  }
2351
2460
  if (mobileSubView) {
2352
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2461
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2353
2462
  AgentMobileSubView,
2354
2463
  {
2355
2464
  view: mobileSubView,
@@ -2368,7 +2477,7 @@ function AgentListInlinePicker({
2368
2477
  }
2369
2478
  ) });
2370
2479
  }
2371
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2480
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2372
2481
  AgentListContent,
2373
2482
  {
2374
2483
  agents,