@ai-matrx/agents 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,12 +39,17 @@ __export(react_exports, {
39
39
  FilterChip: () => FilterChip,
40
40
  HOVER_GRACE_MS: () => HOVER_GRACE_MS,
41
41
  LIST_MAX_HEIGHT: () => LIST_MAX_HEIGHT,
42
+ Music4Icon: () => Music4Icon,
42
43
  OptionRow: () => OptionRow,
43
44
  PANEL_HEIGHT: () => PANEL_HEIGHT,
44
45
  SORT_OPTIONS: () => SORT_OPTIONS,
45
46
  SearchInput: () => SearchInput,
46
47
  SidePanelHeader: () => SidePanelHeader,
47
48
  coerceVisibleTab: () => coerceVisibleTab,
49
+ orchestraDelegatesLine: () => orchestraDelegatesLine,
50
+ orchestraDepthLine: () => orchestraDepthLine,
51
+ orchestraLabel: () => orchestraLabel,
52
+ orchestraModeLabel: () => orchestraModeLabel,
48
53
  useAgentCatalog: () => useAgentCatalog,
49
54
  useAgentCatalogRows: () => useAgentCatalogRows,
50
55
  useAgentCatalogState: () => useAgentCatalogState,
@@ -55,20 +60,25 @@ __export(react_exports, {
55
60
  module.exports = __toCommonJS(react_exports);
56
61
 
57
62
  // catalog/react/context.tsx
63
+ var import_react2 = require("react");
64
+
65
+ // catalog/shared/context.tsx
58
66
  var import_react = require("react");
59
67
  var import_jsx_runtime = require("react/jsx-runtime");
60
68
  var AgentCatalogContext = (0, import_react.createContext)(null);
61
- function AgentCatalogProvider({
69
+ function AgentCatalogProviderCore({
62
70
  catalog,
71
+ platform,
63
72
  children,
64
73
  ...ports
65
74
  }) {
66
75
  const value = (0, import_react.useMemo)(
67
- () => ({ catalog, ...ports }),
76
+ () => ({ catalog, platform, ...ports }),
68
77
  // The ports are plain values a host declares once; re-binding on identity
69
78
  // change is correct and cheap.
70
79
  [
71
80
  catalog,
81
+ platform,
72
82
  ports.navigate,
73
83
  ports.LinkComponent,
74
84
  ports.renderModelRef,
@@ -82,7 +92,7 @@ function useBinding() {
82
92
  const binding = (0, import_react.useContext)(AgentCatalogContext);
83
93
  if (!binding) {
84
94
  throw new Error(
85
- "@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."
86
96
  );
87
97
  }
88
98
  return binding;
@@ -92,29 +102,26 @@ function useAgentCatalog() {
92
102
  }
93
103
  function useAgentCatalogUiPorts() {
94
104
  const binding = useBinding();
105
+ const hostNavigate = binding.navigate;
106
+ const platformNavigate = binding.platform.navigate;
95
107
  const navigate = (0, import_react.useCallback)(
96
108
  (href) => {
97
- if (binding.navigate) {
98
- binding.navigate(href);
109
+ if (hostNavigate) {
110
+ hostNavigate(href);
99
111
  return;
100
112
  }
101
- if (typeof window !== "undefined") window.location.assign(href);
113
+ platformNavigate(href);
102
114
  },
103
- [binding.navigate]
115
+ [hostNavigate, platformNavigate]
104
116
  );
105
117
  return {
106
118
  navigate,
107
- LinkComponent: binding.LinkComponent ?? DefaultLink,
108
- renderModelRef: binding.renderModelRef ?? defaultRenderModelRef,
119
+ LinkComponent: binding.LinkComponent ?? binding.platform.LinkComponent,
120
+ renderModelRef: binding.renderModelRef ?? binding.platform.renderModelRef,
109
121
  openPeek: binding.openPeek,
110
122
  popoverContainer: binding.popoverContainer
111
123
  };
112
124
  }
113
- var DefaultLink = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { ...props, children });
114
- var defaultRenderModelRef = ({
115
- modelId,
116
- className
117
- }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className, children: modelId });
118
125
  function useAgentCatalogState(select) {
119
126
  const catalog = useAgentCatalog();
120
127
  const getSnapshot = (0, import_react.useCallback)(
@@ -128,13 +135,52 @@ function useAgentCatalogRows() {
128
135
  }
129
136
  var selectRows = (state) => state.rows;
130
137
 
131
- // catalog/react/useAgentConsumer.ts
132
- 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");
133
172
 
134
173
  // catalog/types.ts
135
174
  function isMandateAgentId(id) {
136
175
  return id.startsWith("mandate:");
137
176
  }
177
+ var SORT_OPTIONS = [
178
+ { value: "updated-desc", label: "Recent" },
179
+ { value: "created-desc", label: "Created" },
180
+ { value: "name-asc", label: "A \u2192 Z" },
181
+ { value: "name-desc", label: "Z \u2192 A" },
182
+ { value: "category-asc", label: "Category" }
183
+ ];
138
184
  var AGENT_NONE_SENTINEL = "__none__";
139
185
  var DEFAULT_AGENT_CONSUMER_STATE = {
140
186
  tab: "mine",
@@ -153,19 +199,19 @@ var DEFAULT_AGENT_CONSUMER_STATE = {
153
199
  deepSearch: false
154
200
  };
155
201
 
156
- // catalog/react/useAgentConsumer.ts
202
+ // catalog/shared/useAgentConsumer.ts
157
203
  var DEBOUNCE_MS = 250;
158
204
  var MIN_QUERY_LENGTH = 2;
159
205
  function useAgentConsumer(consumerId, options) {
160
206
  const catalog = useAgentCatalog();
161
- const selectConsumer = (0, import_react2.useCallback)(
207
+ const selectConsumer = (0, import_react3.useCallback)(
162
208
  (state) => state.consumers[consumerId] ?? DEFAULT_AGENT_CONSUMER_STATE,
163
209
  [consumerId]
164
210
  );
165
211
  const consumer = useAgentCatalogState(selectConsumer);
166
- const optionsRef = (0, import_react2.useRef)(options);
212
+ const optionsRef = (0, import_react3.useRef)(options);
167
213
  optionsRef.current = options;
168
- (0, import_react2.useEffect)(() => {
214
+ (0, import_react3.useEffect)(() => {
169
215
  const opts = optionsRef.current;
170
216
  catalog.registerConsumer(
171
217
  consumerId,
@@ -177,35 +223,35 @@ function useAgentConsumer(consumerId, options) {
177
223
  }
178
224
  };
179
225
  }, [consumerId, catalog]);
180
- const setSearchTerm = (0, import_react2.useCallback)(
226
+ const setSearchTerm = (0, import_react3.useCallback)(
181
227
  (value) => catalog.setConsumerFilter(consumerId, { searchTerm: value }),
182
228
  [consumerId, catalog]
183
229
  );
184
- const setDeepSearch = (0, import_react2.useCallback)(
230
+ const setDeepSearch = (0, import_react3.useCallback)(
185
231
  (value) => catalog.setConsumerFilter(consumerId, { deepSearch: value }),
186
232
  [consumerId, catalog]
187
233
  );
188
- const setSortBy = (0, import_react2.useCallback)(
234
+ const setSortBy = (0, import_react3.useCallback)(
189
235
  (value) => catalog.setConsumerFilter(consumerId, { sortBy: value }),
190
236
  [consumerId, catalog]
191
237
  );
192
- const setTab = (0, import_react2.useCallback)(
238
+ const setTab = (0, import_react3.useCallback)(
193
239
  (value) => catalog.setConsumerFilter(consumerId, { tab: value }),
194
240
  [consumerId, catalog]
195
241
  );
196
- const setFavFilter = (0, import_react2.useCallback)(
242
+ const setFavFilter = (0, import_react3.useCallback)(
197
243
  (value) => catalog.setConsumerFilter(consumerId, { favFilter: value }),
198
244
  [consumerId, catalog]
199
245
  );
200
- const setArchFilter = (0, import_react2.useCallback)(
246
+ const setArchFilter = (0, import_react3.useCallback)(
201
247
  (value) => catalog.setConsumerFilter(consumerId, { archFilter: value }),
202
248
  [consumerId, catalog]
203
249
  );
204
- const setAccessFilter = (0, import_react2.useCallback)(
250
+ const setAccessFilter = (0, import_react3.useCallback)(
205
251
  (value) => catalog.setConsumerFilter(consumerId, { accessFilter: value }),
206
252
  [consumerId, catalog]
207
253
  );
208
- const toggleCategory = (0, import_react2.useCallback)(
254
+ const toggleCategory = (0, import_react3.useCallback)(
209
255
  (cat) => {
210
256
  const current = catalog.getConsumer(consumerId).includedCats;
211
257
  const next = current.includes(cat) ? current.filter((c) => c !== cat) : [...current, cat];
@@ -213,7 +259,7 @@ function useAgentConsumer(consumerId, options) {
213
259
  },
214
260
  [consumerId, catalog]
215
261
  );
216
- const toggleTag = (0, import_react2.useCallback)(
262
+ const toggleTag = (0, import_react3.useCallback)(
217
263
  (tag) => {
218
264
  const current = catalog.getConsumer(consumerId).includedTags;
219
265
  const next = current.includes(tag) ? current.filter((t) => t !== tag) : [...current, tag];
@@ -221,21 +267,21 @@ function useAgentConsumer(consumerId, options) {
221
267
  },
222
268
  [consumerId, catalog]
223
269
  );
224
- const setIncludedCats = (0, import_react2.useCallback)(
270
+ const setIncludedCats = (0, import_react3.useCallback)(
225
271
  (next) => catalog.setConsumerFilter(consumerId, { includedCats: next }),
226
272
  [consumerId, catalog]
227
273
  );
228
- const setIncludedTags = (0, import_react2.useCallback)(
274
+ const setIncludedTags = (0, import_react3.useCallback)(
229
275
  (next) => catalog.setConsumerFilter(consumerId, { includedTags: next }),
230
276
  [consumerId, catalog]
231
277
  );
232
- const toggleFavoritesFirst = (0, import_react2.useCallback)(
278
+ const toggleFavoritesFirst = (0, import_react3.useCallback)(
233
279
  () => catalog.setConsumerFilter(consumerId, {
234
280
  favoritesFirst: !catalog.getConsumer(consumerId).favoritesFirst
235
281
  }),
236
282
  [consumerId, catalog]
237
283
  );
238
- const loadMoreList = (0, import_react2.useCallback)(
284
+ const loadMoreList = (0, import_react3.useCallback)(
239
285
  () => catalog.setConsumerPage(
240
286
  consumerId,
241
287
  "list",
@@ -243,7 +289,7 @@ function useAgentConsumer(consumerId, options) {
243
289
  ),
244
290
  [consumerId, catalog]
245
291
  );
246
- const loadMoreShared = (0, import_react2.useCallback)(
292
+ const loadMoreShared = (0, import_react3.useCallback)(
247
293
  () => catalog.setConsumerPage(
248
294
  consumerId,
249
295
  "shared",
@@ -251,16 +297,16 @@ function useAgentConsumer(consumerId, options) {
251
297
  ),
252
298
  [consumerId, catalog]
253
299
  );
254
- const resetFilters = (0, import_react2.useCallback)(
300
+ const resetFilters = (0, import_react3.useCallback)(
255
301
  () => catalog.resetConsumerFilters(consumerId),
256
302
  [consumerId, catalog]
257
303
  );
258
- const [isSearching, setIsSearching] = (0, import_react2.useState)(false);
259
- const [matchedIds, setMatchedIds] = (0, import_react2.useState)(null);
260
- 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);
261
307
  const query = consumer.searchTerm;
262
308
  const deep = consumer.deepSearch;
263
- (0, import_react2.useEffect)(() => {
309
+ (0, import_react3.useEffect)(() => {
264
310
  const q = query.trim();
265
311
  if (q.length < MIN_QUERY_LENGTH) {
266
312
  setIsSearching(false);
@@ -286,7 +332,7 @@ function useAgentConsumer(consumerId, options) {
286
332
  }, DEBOUNCE_MS);
287
333
  return () => clearTimeout(timer);
288
334
  }, [query, deep, catalog]);
289
- (0, import_react2.useEffect)(() => {
335
+ (0, import_react3.useEffect)(() => {
290
336
  catalog.setConsumerServerSearch(consumerId, {
291
337
  matchedIds: matchedIds ?? [],
292
338
  isSearching
@@ -327,8 +373,8 @@ function useAgentConsumer(consumerId, options) {
327
373
  };
328
374
  }
329
375
 
330
- // catalog/react/useAgentListCore.ts
331
- var import_react3 = require("react");
376
+ // catalog/shared/useAgentListCore.ts
377
+ var import_react4 = require("react");
332
378
 
333
379
  // catalog/labels.ts
334
380
  function agentListEmptyLabel(tab, labels) {
@@ -616,7 +662,7 @@ var selectTotalFavoriteAgentsCount = memoize1(
616
662
  (agents) => selectUserTypeAgents(agents).filter((a) => a.isFavorite).length
617
663
  );
618
664
 
619
- // catalog/react/useAgentListCore.ts
665
+ // catalog/shared/useAgentListCore.ts
620
666
  var HOVER_GRACE_MS = 900;
621
667
  function coerceVisibleTab(current, allowed, initialTab) {
622
668
  if (allowed.length === 0) return null;
@@ -637,20 +683,20 @@ function useAgentListCore({
637
683
  }) {
638
684
  const catalog = useAgentCatalog();
639
685
  const { navigate } = useAgentCatalogUiPorts();
640
- const hasFetchedRef = (0, import_react3.useRef)(false);
641
- const [hoveredAgent, setHoveredAgent] = (0, import_react3.useState)(null);
642
- const hoverLeaveTimerRef = (0, import_react3.useRef)(null);
643
- const defaultTabAppliedRef = (0, import_react3.useRef)(false);
686
+ const hasFetchedRef = (0, import_react4.useRef)(false);
687
+ const [hoveredAgent, setHoveredAgent] = (0, import_react4.useState)(null);
688
+ const hoverLeaveTimerRef = (0, import_react4.useRef)(null);
689
+ const defaultTabAppliedRef = (0, import_react4.useRef)(false);
644
690
  const consumer = useAgentConsumer(consumerId, { unregisterOnUnmount: true });
645
691
  const rows = useAgentCatalogRows();
646
692
  const userId = catalog.getUserIdOrNull();
647
693
  const ownedCount = selectTotalOwnedAgentsCount(rows);
648
- const selectFiltered = (0, import_react3.useMemo)(
694
+ const selectFiltered = (0, import_react4.useMemo)(
649
695
  () => makeSelectFilteredAgents(includeSystemInAll),
650
696
  [includeSystemInAll]
651
697
  );
652
698
  const filteredAgents = selectFiltered(rows, consumer.state);
653
- const excludedAgentIds = (0, import_react3.useMemo)(
699
+ const excludedAgentIds = (0, import_react4.useMemo)(
654
700
  () => new Set(excludeAgentIds),
655
701
  [excludeAgentIds]
656
702
  );
@@ -669,23 +715,23 @@ function useAgentListCore({
669
715
  };
670
716
  const isLoading = status === "loading";
671
717
  const agentsLoaded = status === "succeeded" || status === "failed";
672
- const ensureLoaded = (0, import_react3.useCallback)(() => {
718
+ const ensureLoaded = (0, import_react4.useCallback)(() => {
673
719
  if (!hasFetchedRef.current) {
674
720
  hasFetchedRef.current = true;
675
721
  void catalog.ensureLoaded().catch(() => {
676
722
  });
677
723
  }
678
724
  }, [catalog]);
679
- const selectDefaultRow = (0, import_react3.useCallback)(
725
+ const selectDefaultRow = (0, import_react4.useCallback)(
680
726
  (state) => defaultMandateKey ? state.defaultRows[defaultMandateKey] : void 0,
681
727
  [defaultMandateKey]
682
728
  );
683
729
  const defaultRow = useAgentCatalogState(selectDefaultRow);
684
- (0, import_react3.useEffect)(() => {
730
+ (0, import_react4.useEffect)(() => {
685
731
  if (!defaultMandateKey) return;
686
732
  catalog.ensureDefaultRow(defaultMandateKey);
687
733
  }, [catalog, defaultMandateKey]);
688
- (0, import_react3.useEffect)(() => {
734
+ (0, import_react4.useEffect)(() => {
689
735
  if (defaultTabAppliedRef.current) return;
690
736
  if (initialTab) {
691
737
  defaultTabAppliedRef.current = true;
@@ -718,7 +764,7 @@ function useAgentListCore({
718
764
  consumer.setTab
719
765
  ]);
720
766
  const allowedTabsKey = visibleTabs ? visibleTabs.join(",") : "";
721
- (0, import_react3.useEffect)(() => {
767
+ (0, import_react4.useEffect)(() => {
722
768
  if (!allowedTabsKey) return;
723
769
  const next = coerceVisibleTab(
724
770
  consumer.tab,
@@ -727,10 +773,10 @@ function useAgentListCore({
727
773
  );
728
774
  if (next) consumer.setTab(next);
729
775
  }, [allowedTabsKey, initialTab, consumer.tab, consumer.setTab]);
730
- (0, import_react3.useEffect)(() => {
776
+ (0, import_react4.useEffect)(() => {
731
777
  ensureLoaded();
732
778
  }, [ensureLoaded]);
733
- const handleSelectAgent = (0, import_react3.useCallback)(
779
+ const handleSelectAgent = (0, import_react4.useCallback)(
734
780
  (agent) => {
735
781
  if (onSelect) {
736
782
  onSelect(agent.id);
@@ -747,7 +793,7 @@ function useAgentListCore({
747
793
  [onSelect, navigateTo, navigate, catalog, consumerId]
748
794
  );
749
795
  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);
750
- const handleAgentHover = (0, import_react3.useCallback)(
796
+ const handleAgentHover = (0, import_react4.useCallback)(
751
797
  (agent, panelOpen) => {
752
798
  if (panelOpen) return;
753
799
  if (hoverLeaveTimerRef.current) {
@@ -758,7 +804,7 @@ function useAgentListCore({
758
804
  },
759
805
  []
760
806
  );
761
- const handleAgentHoverEnd = (0, import_react3.useCallback)(
807
+ const handleAgentHoverEnd = (0, import_react4.useCallback)(
762
808
  (agent, onClear) => {
763
809
  if (hoveredAgent?.id === agent.id) {
764
810
  hoverLeaveTimerRef.current = setTimeout(() => {
@@ -769,19 +815,19 @@ function useAgentListCore({
769
815
  },
770
816
  [hoveredAgent]
771
817
  );
772
- const handleDetailPanelMouseEnter = (0, import_react3.useCallback)(() => {
818
+ const handleDetailPanelMouseEnter = (0, import_react4.useCallback)(() => {
773
819
  if (hoverLeaveTimerRef.current) {
774
820
  clearTimeout(hoverLeaveTimerRef.current);
775
821
  hoverLeaveTimerRef.current = null;
776
822
  }
777
823
  }, []);
778
- const handleDetailPanelMouseLeave = (0, import_react3.useCallback)((onClear) => {
824
+ const handleDetailPanelMouseLeave = (0, import_react4.useCallback)((onClear) => {
779
825
  hoverLeaveTimerRef.current = setTimeout(() => {
780
826
  setHoveredAgent(null);
781
827
  onClear();
782
828
  }, HOVER_GRACE_MS);
783
829
  }, []);
784
- (0, import_react3.useEffect)(
830
+ (0, import_react4.useEffect)(
785
831
  () => () => {
786
832
  if (hoverLeaveTimerRef.current) clearTimeout(hoverLeaveTimerRef.current);
787
833
  },
@@ -812,15 +858,111 @@ var selectStatus = (state) => state.status;
812
858
 
813
859
  // catalog/react/AgentListDropdown.tsx
814
860
  var import_design_system6 = require("@ai-matrx/design-system");
815
- var import_react6 = require("react");
861
+ var import_react7 = require("react");
816
862
 
817
863
  // catalog/react/primitives.tsx
818
864
  var import_design_system = require("@ai-matrx/design-system");
819
865
 
866
+ // catalog/shared/icon-paths.ts
867
+ var SHAPES = {
868
+ star: {
869
+ paths: [
870
+ "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"
871
+ ],
872
+ fillable: true
873
+ },
874
+ chevronRight: { paths: ["m9 18 6-6-6-6"] },
875
+ chevronDown: { paths: ["m6 9 6 6 6-6"] },
876
+ search: {
877
+ paths: ["m21 21-4.3-4.3"],
878
+ circles: [{ cx: 11, cy: 11, r: 8 }]
879
+ },
880
+ x: { paths: ["M18 6 6 18", "m6 6 12 12"] },
881
+ check: { paths: ["M20 6 9 17l-5-5"] },
882
+ arrowUpDown: {
883
+ paths: ["m21 16-4 4-4-4", "M17 20V4", "m3 8 4-4 4 4", "M7 4v16"]
884
+ },
885
+ folder: {
886
+ paths: [
887
+ "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
+ },
890
+ tag: {
891
+ paths: [
892
+ "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"
893
+ ],
894
+ circles: [{ cx: 7.5, cy: 7.5, r: 0.5, filled: true }]
895
+ },
896
+ rotateCcw: {
897
+ paths: [
898
+ "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
899
+ "M3 3v5h5"
900
+ ]
901
+ },
902
+ loader: { paths: ["M21 12a9 9 0 1 1-6.219-8.56"] },
903
+ alertTriangle: {
904
+ paths: [
905
+ "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",
906
+ "M12 9v4",
907
+ "M12 17h.01"
908
+ ]
909
+ },
910
+ /**
911
+ * The Orchestra marker (Lucide `music-4`): the glyph the Workflow Studio's
912
+ * picker used for a conductor, kept identical so the same agent wears the
913
+ * same mark in every client.
914
+ */
915
+ music4: {
916
+ paths: ["M9 18V5l12-2v13", "m9 9 12-2"],
917
+ circles: [
918
+ { cx: 6, cy: 18, r: 3 },
919
+ { cx: 18, cy: 16, r: 3 }
920
+ ]
921
+ },
922
+ clock: {
923
+ paths: ["M12 6v6l4 2"],
924
+ circles: [{ cx: 12, cy: 12, r: 10 }]
925
+ },
926
+ globe: {
927
+ paths: ["M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", "M2 12h20"],
928
+ circles: [{ cx: 12, cy: 12, r: 10 }]
929
+ },
930
+ users: {
931
+ paths: [
932
+ "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
933
+ "M22 21v-2a4 4 0 0 0-3-3.87",
934
+ "M16 3.13a4 4 0 0 1 0 7.75"
935
+ ],
936
+ circles: [{ cx: 9, cy: 7, r: 4 }]
937
+ },
938
+ externalLink: {
939
+ paths: [
940
+ "M15 3h6v6",
941
+ "M10 14 21 3",
942
+ "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
943
+ ]
944
+ },
945
+ messageCircle: { paths: ["M7.9 20A9 9 0 1 0 4 16.1L2 22Z"] },
946
+ rocket: {
947
+ paths: [
948
+ "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",
949
+ "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",
950
+ "M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",
951
+ "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"
952
+ ]
953
+ },
954
+ circleCheck: {
955
+ paths: ["m9 12 2 2 4-4"],
956
+ circles: [{ cx: 12, cy: 12, r: 10 }]
957
+ }
958
+ };
959
+ var ICON_PATHS = SHAPES;
960
+ var ICON_NAMES = Object.keys(ICON_PATHS);
961
+
820
962
  // catalog/react/icons.tsx
821
- var import_jsx_runtime2 = require("react/jsx-runtime");
963
+ var import_jsx_runtime3 = require("react/jsx-runtime");
822
964
  function Svg({ children, ...props }) {
823
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
965
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
824
966
  "svg",
825
967
  {
826
968
  xmlns: "http://www.w3.org/2000/svg",
@@ -836,125 +978,79 @@ function Svg({ children, ...props }) {
836
978
  }
837
979
  );
838
980
  }
981
+ function Shape({ name, filled }) {
982
+ const shape = ICON_PATHS[name];
983
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
984
+ shape.paths.map((d, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
985
+ "path",
986
+ {
987
+ d,
988
+ ...filled && shape.fillable ? { fill: "currentColor" } : {}
989
+ },
990
+ `p${index}`
991
+ )),
992
+ (shape.circles ?? []).map((circle, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
993
+ "circle",
994
+ {
995
+ cx: circle.cx,
996
+ cy: circle.cy,
997
+ r: circle.r,
998
+ ...circle.filled ? { fill: "currentColor" } : {}
999
+ },
1000
+ `c${index}`
1001
+ ))
1002
+ ] });
1003
+ }
1004
+ function makeIcon(name) {
1005
+ return function Icon(props) {
1006
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Shape, { name, filled: false }) });
1007
+ };
1008
+ }
839
1009
  function StarIcon({
840
1010
  filled = false,
841
1011
  ...props
842
1012
  }) {
843
- 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" }) });
844
- }
845
- function ChevronRightIcon(props) {
846
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m9 18 6-6-6-6" }) });
847
- }
848
- function ChevronDownIcon(props) {
849
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 9 6 6 6-6" }) });
850
- }
851
- function SearchIcon(props) {
852
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
853
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
854
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m21 21-4.3-4.3" })
855
- ] });
856
- }
857
- function XIcon(props) {
858
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
859
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M18 6 6 18" }),
860
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 6 12 12" })
861
- ] });
862
- }
863
- function CheckIcon(props) {
864
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Svg, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M20 6 9 17l-5-5" }) });
865
- }
866
- function ArrowUpDownIcon(props) {
867
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
868
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m21 16-4 4-4-4" }),
869
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M17 20V4" }),
870
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3 8 4-4 4 4" }),
871
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7 4v16" })
872
- ] });
873
- }
874
- function FolderIcon(props) {
875
- 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" }) });
876
- }
877
- function TagIcon(props) {
878
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
879
- /* @__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" }),
880
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor" })
881
- ] });
882
- }
883
- function RotateCcwIcon(props) {
884
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
885
- /* @__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" }),
886
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 3v5h5" })
887
- ] });
888
- }
889
- function LoaderIcon(props) {
890
- 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" }) });
1013
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Svg, { ...props, fill: filled ? "currentColor" : "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Shape, { name: "star", filled }) });
891
1014
  }
1015
+ var ChevronRightIcon = makeIcon("chevronRight");
1016
+ var ChevronDownIcon = makeIcon("chevronDown");
1017
+ var SearchIcon = makeIcon("search");
1018
+ var XIcon = makeIcon("x");
1019
+ var CheckIcon = makeIcon("check");
1020
+ var ArrowUpDownIcon = makeIcon("arrowUpDown");
1021
+ var FolderIcon = makeIcon("folder");
1022
+ var TagIcon = makeIcon("tag");
1023
+ var RotateCcwIcon = makeIcon("rotateCcw");
1024
+ var LoaderIcon = makeIcon("loader");
1025
+ var UsersIcon = makeIcon("users");
1026
+ var ClockIcon = makeIcon("clock");
1027
+ var GlobeIcon = makeIcon("globe");
1028
+ var ExternalLinkIcon = makeIcon("externalLink");
1029
+ var MessageCircleIcon = makeIcon("messageCircle");
1030
+ var RocketIcon = makeIcon("rocket");
1031
+ var CircleCheckIcon = makeIcon("circleCheck");
1032
+ var AlertTriangleIcon = makeIcon("alertTriangle");
1033
+ var Music4Icon = makeIcon("music4");
892
1034
  function MousePointerClickIcon(props) {
893
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
894
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 4.1 12 6" }),
895
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m5.1 8-2.9-.8" }),
896
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m6 12-1.9 2" }),
897
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M7.2 2.2 8 5.1" }),
898
- /* @__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" })
899
- ] });
900
- }
901
- function UsersIcon(props) {
902
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
903
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }),
904
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
905
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M22 21v-2a4 4 0 0 0-3-3.87" }),
906
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
907
- ] });
908
- }
909
- function ClockIcon(props) {
910
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
911
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
912
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 6v6l4 2" })
913
- ] });
914
- }
915
- function GlobeIcon(props) {
916
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
917
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
918
- /* @__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" }),
919
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M2 12h20" })
920
- ] });
921
- }
922
- function ExternalLinkIcon(props) {
923
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
924
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M15 3h6v6" }),
925
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M10 14 21 3" }),
926
- /* @__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" })
927
- ] });
928
- }
929
- function MessageCircleIcon(props) {
930
- 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" }) });
931
- }
932
- function RocketIcon(props) {
933
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
934
- /* @__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" }),
935
- /* @__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" }),
936
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0" }),
937
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" })
938
- ] });
939
- }
940
- function AlertTriangleIcon(props) {
941
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Svg, { ...props, children: [
942
- /* @__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" }),
943
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 9v4" }),
944
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 17h.01" })
1035
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Svg, { ...props, children: [
1036
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M14 4.1 12 6" }),
1037
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m5.1 8-2.9-.8" }),
1038
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 12-1.9 2" }),
1039
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7.2 2.2 8 5.1" }),
1040
+ /* @__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" })
945
1041
  ] });
946
1042
  }
947
1043
 
948
1044
  // catalog/react/primitives.tsx
949
- var import_jsx_runtime3 = require("react/jsx-runtime");
1045
+ var import_jsx_runtime4 = require("react/jsx-runtime");
950
1046
  var SearchInput = ({
951
1047
  ref,
952
1048
  value,
953
1049
  onChange,
954
1050
  placeholder
955
- }) => /* @__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: [
956
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SearchIcon, { className: "w-3 h-3 text-muted-foreground shrink-0" }),
957
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1051
+ }) => /* @__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: [
1052
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SearchIcon, { className: "w-3 h-3 text-muted-foreground shrink-0" }),
1053
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
958
1054
  "input",
959
1055
  {
960
1056
  ref,
@@ -966,14 +1062,14 @@ var SearchInput = ({
966
1062
  style: { fontSize: "16px" }
967
1063
  }
968
1064
  ),
969
- value && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1065
+ value && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
970
1066
  "button",
971
1067
  {
972
1068
  type: "button",
973
1069
  onClick: () => onChange(""),
974
1070
  className: "text-muted-foreground hover:text-foreground",
975
1071
  "aria-label": "Clear search",
976
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(XIcon, { className: "w-3 h-3" })
1072
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(XIcon, { className: "w-3 h-3" })
977
1073
  }
978
1074
  )
979
1075
  ] });
@@ -984,7 +1080,7 @@ function FilterChip({
984
1080
  focused,
985
1081
  onClick
986
1082
  }) {
987
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1083
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
988
1084
  "button",
989
1085
  {
990
1086
  type: "button",
@@ -994,8 +1090,8 @@ function FilterChip({
994
1090
  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"
995
1091
  ),
996
1092
  children: [
997
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { className: "w-3 h-3" }),
998
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: label })
1093
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { className: "w-3 h-3" }),
1094
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: label })
999
1095
  ]
1000
1096
  }
1001
1097
  );
@@ -1005,7 +1101,7 @@ function OptionRow({
1005
1101
  selected,
1006
1102
  onClick
1007
1103
  }) {
1008
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1104
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1009
1105
  "button",
1010
1106
  {
1011
1107
  type: "button",
@@ -1016,8 +1112,8 @@ function OptionRow({
1016
1112
  selected && "text-primary font-medium"
1017
1113
  ),
1018
1114
  children: [
1019
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex-1 text-left", children: label }),
1020
- selected && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" })
1115
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 text-left", children: label }),
1116
+ selected && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CheckIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" })
1021
1117
  ]
1022
1118
  }
1023
1119
  );
@@ -1027,24 +1123,24 @@ function CheckRow({
1027
1123
  checked,
1028
1124
  onClick
1029
1125
  }) {
1030
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1126
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1031
1127
  "button",
1032
1128
  {
1033
1129
  type: "button",
1034
1130
  onClick,
1035
1131
  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",
1036
1132
  children: [
1037
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1133
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1038
1134
  "div",
1039
1135
  {
1040
1136
  className: (0, import_design_system.cn)(
1041
1137
  "w-3.5 h-3.5 rounded-sm border flex items-center justify-center shrink-0 transition-colors",
1042
1138
  checked ? "bg-primary border-primary" : "border-muted-foreground/30"
1043
1139
  ),
1044
- children: checked && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckIcon, { className: "w-2.5 h-2.5 text-primary-foreground" })
1140
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CheckIcon, { className: "w-2.5 h-2.5 text-primary-foreground" })
1045
1141
  }
1046
1142
  ),
1047
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex-1 text-left truncate", children: label })
1143
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 text-left truncate", children: label })
1048
1144
  ]
1049
1145
  }
1050
1146
  );
@@ -1053,23 +1149,23 @@ function SidePanelHeader({
1053
1149
  title,
1054
1150
  onClose
1055
1151
  }) {
1056
- 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: [
1057
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-xs font-semibold text-foreground", children: title }),
1058
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1152
+ 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: [
1153
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-xs font-semibold text-foreground", children: title }),
1154
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1059
1155
  "button",
1060
1156
  {
1061
1157
  type: "button",
1062
1158
  onClick: onClose,
1063
1159
  className: "w-5 h-5 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",
1064
1160
  "aria-label": "Close",
1065
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(XIcon, { className: "w-3.5 h-3.5" })
1161
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(XIcon, { className: "w-3.5 h-3.5" })
1066
1162
  }
1067
1163
  )
1068
1164
  ] });
1069
1165
  }
1070
1166
 
1071
1167
  // catalog/react/AgentCategoriesPanel.tsx
1072
- var import_jsx_runtime4 = require("react/jsx-runtime");
1168
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1073
1169
  function AgentCategoriesPanel({
1074
1170
  consumer,
1075
1171
  allCategories,
@@ -1080,9 +1176,9 @@ function AgentCategoriesPanel({
1080
1176
  const filtered = allCategories.filter(
1081
1177
  (c) => !search || c.toLowerCase().includes(search.toLowerCase())
1082
1178
  );
1083
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col h-full", children: [
1084
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SidePanelHeader, { title: "Categories", onClose }),
1085
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1179
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col h-full", children: [
1180
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SidePanelHeader, { title: "Categories", onClose }),
1181
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1086
1182
  SearchInput,
1087
1183
  {
1088
1184
  value: search,
@@ -1090,7 +1186,7 @@ function AgentCategoriesPanel({
1090
1186
  placeholder: "Filter categories..."
1091
1187
  }
1092
1188
  ) }),
1093
- consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1189
+ consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1094
1190
  "button",
1095
1191
  {
1096
1192
  type: "button",
@@ -1103,7 +1199,7 @@ function AgentCategoriesPanel({
1103
1199
  ]
1104
1200
  }
1105
1201
  ),
1106
- /* @__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)(
1202
+ /* @__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)(
1107
1203
  CheckRow,
1108
1204
  {
1109
1205
  label: cat,
@@ -1120,15 +1216,15 @@ var import_design_system3 = require("@ai-matrx/design-system");
1120
1216
 
1121
1217
  // catalog/react/FavoriteAgentButton.tsx
1122
1218
  var import_design_system2 = require("@ai-matrx/design-system");
1123
- var import_react4 = require("react");
1124
- var import_jsx_runtime5 = require("react/jsx-runtime");
1219
+ var import_react5 = require("react");
1220
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1125
1221
  function FavoriteAgentButton({
1126
1222
  id,
1127
1223
  variant = "card",
1128
1224
  disabled
1129
1225
  }) {
1130
1226
  const catalog = useAgentCatalog();
1131
- const select = (0, import_react4.useCallback)(
1227
+ const select = (0, import_react5.useCallback)(
1132
1228
  (state) => state.byId[id],
1133
1229
  [id]
1134
1230
  );
@@ -1143,7 +1239,7 @@ function FavoriteAgentButton({
1143
1239
  };
1144
1240
  const title = isOwner ? isFavorite ? "Remove from favorites" : "Add to favorites" : "Shared \u2014 cannot favorite";
1145
1241
  if (variant === "list") {
1146
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1242
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1147
1243
  "button",
1148
1244
  {
1149
1245
  type: "button",
@@ -1156,7 +1252,7 @@ function FavoriteAgentButton({
1156
1252
  disabled: disabled || !isOwner,
1157
1253
  title,
1158
1254
  "aria-label": isFavorite ? "Remove from favorites" : "Add to favorites",
1159
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1255
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1160
1256
  StarIcon,
1161
1257
  {
1162
1258
  filled: isFavorite,
@@ -1169,7 +1265,7 @@ function FavoriteAgentButton({
1169
1265
  }
1170
1266
  );
1171
1267
  }
1172
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1268
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1173
1269
  "button",
1174
1270
  {
1175
1271
  type: "button",
@@ -1183,13 +1279,40 @@ function FavoriteAgentButton({
1183
1279
  disabled: disabled || !isOwner,
1184
1280
  title,
1185
1281
  "aria-label": isFavorite ? "Remove from favorites" : "Add to favorites",
1186
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StarIcon, { filled: isFavorite, className: "w-4 h-4 transition-all duration-150" })
1282
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StarIcon, { filled: isFavorite, className: "w-4 h-4 transition-all duration-150" })
1187
1283
  }
1188
1284
  );
1189
1285
  }
1190
1286
 
1287
+ // catalog/orchestra.ts
1288
+ var ORCHESTRA_MODE_LABEL = {
1289
+ supervisor: "supervisor",
1290
+ sequential: "in order",
1291
+ parallel: "together",
1292
+ dag: "custom flow"
1293
+ };
1294
+ function orchestraModeLabel(mode) {
1295
+ return ORCHESTRA_MODE_LABEL[mode] ?? mode;
1296
+ }
1297
+ function orchestraLabel(badge) {
1298
+ const n = badge.memberCount;
1299
+ return `Orchestra \xB7 ${orchestraModeLabel(badge.mode)} \xB7 ${n} ${n === 1 ? "member" : "members"}`;
1300
+ }
1301
+ function orchestraDepthLine(badge) {
1302
+ const n = badge.depthBudget;
1303
+ if (typeof n !== "number" || n <= 0) return null;
1304
+ return `Team members can call helpers up to ${n} ${n === 1 ? "level" : "levels"} deep`;
1305
+ }
1306
+ function orchestraDelegatesLine(badge, limit = 3) {
1307
+ const titles = badge.memberTitles;
1308
+ if (titles.length === 0) return null;
1309
+ const shown = titles.slice(0, limit);
1310
+ const extra = titles.length - shown.length;
1311
+ return `Delegates to: ${shown.join(", ")}${extra > 0 ? ` +${extra} more` : ""}`;
1312
+ }
1313
+
1191
1314
  // catalog/react/AgentDetailCard.tsx
1192
- var import_jsx_runtime6 = require("react/jsx-runtime");
1315
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1193
1316
  function AgentDetailCard({ agent, onSelect }) {
1194
1317
  const { LinkComponent, renderModelRef, openPeek } = useAgentCatalogUiPorts();
1195
1318
  const updatedDate = agent.updatedAt ? new Date(agent.updatedAt) : null;
@@ -1203,31 +1326,47 @@ function AgentDetailCard({ agent, onSelect }) {
1203
1326
  year: "numeric"
1204
1327
  });
1205
1328
  };
1206
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col h-full", children: [
1207
- /* @__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: [
1208
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0" }),
1209
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-1 min-w-0", children: [
1210
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "text-sm font-semibold text-foreground leading-tight truncate", children: agent.name || "Untitled" }),
1211
- 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" }) })
1329
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col h-full", children: [
1330
+ /* @__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: [
1331
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0" }),
1332
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 min-w-0", children: [
1333
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h3", { className: "text-sm font-semibold text-foreground leading-tight truncate", children: agent.name || "Untitled" }),
1334
+ 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" }) })
1212
1335
  ] }),
1213
- !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FavoriteAgentButton, { id: agent.id, variant: "list" })
1336
+ !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FavoriteAgentButton, { id: agent.id, variant: "list" })
1214
1337
  ] }) }),
1215
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "h-px bg-border mx-3" }),
1216
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-1 overflow-y-auto px-4 py-3 space-y-3", children: [
1217
- agent.description && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
1218
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Description" }),
1219
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-xs text-foreground/80 leading-relaxed", children: agent.description })
1338
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px bg-border mx-3" }),
1339
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex-1 overflow-y-auto px-4 py-3 space-y-3", children: [
1340
+ 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: [
1341
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1.5", children: [
1342
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Music4Icon, { className: "w-3.5 h-3.5 text-primary shrink-0" }),
1343
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-[11px] font-medium text-primary", children: orchestraLabel(agent.orchestra) })
1344
+ ] }),
1345
+ agent.orchestra.tagline && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-1 text-xs text-foreground/80 leading-relaxed", children: agent.orchestra.tagline }),
1346
+ orchestraDelegatesLine(agent.orchestra) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1347
+ "p",
1348
+ {
1349
+ className: "mt-1 text-[11px] text-muted-foreground",
1350
+ title: `Delegates to: ${agent.orchestra.memberTitles.join(", ")}`,
1351
+ children: orchestraDelegatesLine(agent.orchestra)
1352
+ }
1353
+ ),
1354
+ orchestraDepthLine(agent.orchestra) && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "mt-0.5 text-[11px] text-muted-foreground", children: orchestraDepthLine(agent.orchestra) })
1355
+ ] }),
1356
+ agent.description && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
1357
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-[11px] font-medium text-muted-foreground uppercase tracking-wider mb-1", children: "Description" }),
1358
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-xs text-foreground/80 leading-relaxed", children: agent.description })
1220
1359
  ] }),
1221
- agent.category && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1222
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FolderIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1223
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-xs text-foreground/80", children: agent.category })
1360
+ agent.category && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1361
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FolderIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1362
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-xs text-foreground/80", children: agent.category })
1224
1363
  ] }),
1225
- agent.tags && agent.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
1226
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
1227
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TagIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1228
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Tags" })
1364
+ agent.tags && agent.tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
1365
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1.5 mb-1.5", children: [
1366
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TagIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1367
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-[11px] font-medium text-muted-foreground", children: "Tags" })
1229
1368
  ] }),
1230
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-wrap gap-1", children: agent.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1369
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-wrap gap-1", children: agent.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1231
1370
  "span",
1232
1371
  {
1233
1372
  className: "inline-flex items-center h-5 px-1.5 rounded text-[10px] font-medium bg-muted text-muted-foreground",
@@ -1236,40 +1375,40 @@ function AgentDetailCard({ agent, onSelect }) {
1236
1375
  tag
1237
1376
  )) })
1238
1377
  ] }),
1239
- agent.accessLevel && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1240
- 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" }),
1241
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
1242
- /* @__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}` }),
1243
- agent.sharedByEmail && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-[10px] text-muted-foreground", children: [
1378
+ agent.accessLevel && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1379
+ 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" }),
1380
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col", children: [
1381
+ /* @__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}` }),
1382
+ agent.sharedByEmail && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-[10px] text-muted-foreground", children: [
1244
1383
  "by ",
1245
1384
  agent.sharedByEmail
1246
1385
  ] })
1247
1386
  ] })
1248
1387
  ] }),
1249
- agent.modelId && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center gap-2", children: renderModelRef({
1388
+ agent.modelId && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex items-center gap-2", children: renderModelRef({
1250
1389
  modelId: agent.modelId,
1251
1390
  className: "max-w-full text-xs text-foreground/80"
1252
1391
  }) }),
1253
- (updatedDate || createdDate) && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pt-1 space-y-1", children: [
1254
- updatedDate && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1255
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1256
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-[11px] text-muted-foreground", children: [
1392
+ (updatedDate || createdDate) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "pt-1 space-y-1", children: [
1393
+ updatedDate && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1394
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground shrink-0" }),
1395
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-[11px] text-muted-foreground", children: [
1257
1396
  "Updated ",
1258
1397
  formatDate(updatedDate)
1259
1398
  ] })
1260
1399
  ] }),
1261
- createdDate && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
1262
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground/50 shrink-0" }),
1263
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-[11px] text-muted-foreground/70", children: [
1400
+ createdDate && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [
1401
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ClockIcon, { className: "w-3.5 h-3.5 text-muted-foreground/50 shrink-0" }),
1402
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "text-[11px] text-muted-foreground/70", children: [
1264
1403
  "Created ",
1265
1404
  formatDate(createdDate)
1266
1405
  ] })
1267
1406
  ] })
1268
1407
  ] })
1269
1408
  ] }),
1270
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "h-px bg-border mx-3 mt-auto" }),
1271
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "px-3 py-2 shrink-0 flex items-center gap-1.5", children: [
1272
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1409
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px bg-border mx-3 mt-auto" }),
1410
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "px-3 py-2 shrink-0 flex items-center gap-1.5", children: [
1411
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1273
1412
  "button",
1274
1413
  {
1275
1414
  type: "button",
@@ -1278,7 +1417,7 @@ function AgentDetailCard({ agent, onSelect }) {
1278
1417
  children: "Select"
1279
1418
  }
1280
1419
  ),
1281
- openPeek && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1420
+ openPeek && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1282
1421
  "button",
1283
1422
  {
1284
1423
  type: "button",
@@ -1289,11 +1428,11 @@ function AgentDetailCard({ agent, onSelect }) {
1289
1428
  title: "Sneak Peek",
1290
1429
  "aria-label": "Sneak Peek",
1291
1430
  className: iconButtonClass,
1292
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RocketIcon, { className: "w-3.5 h-3.5" })
1431
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RocketIcon, { className: "w-3.5 h-3.5" })
1293
1432
  }
1294
1433
  ),
1295
- !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
1296
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1434
+ !isDefaultRow && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1435
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1297
1436
  LinkComponent,
1298
1437
  {
1299
1438
  href: `/chat/a/${agent.id}`,
@@ -1301,10 +1440,10 @@ function AgentDetailCard({ agent, onSelect }) {
1301
1440
  title: "Open in chat",
1302
1441
  "aria-label": "Open in chat",
1303
1442
  className: iconButtonClass,
1304
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MessageCircleIcon, { className: "w-3.5 h-3.5" })
1443
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MessageCircleIcon, { className: "w-3.5 h-3.5" })
1305
1444
  }
1306
1445
  ),
1307
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1446
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1308
1447
  LinkComponent,
1309
1448
  {
1310
1449
  href: `/agents/go/${agent.id}`,
@@ -1317,7 +1456,7 @@ function AgentDetailCard({ agent, onSelect }) {
1317
1456
  iconButtonClass,
1318
1457
  "hover:text-foreground"
1319
1458
  ),
1320
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ExternalLinkIcon, { className: "w-3.5 h-3.5" })
1459
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ExternalLinkIcon, { className: "w-3.5 h-3.5" })
1321
1460
  }
1322
1461
  )
1323
1462
  ] })
@@ -1327,21 +1466,14 @@ function AgentDetailCard({ agent, onSelect }) {
1327
1466
  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";
1328
1467
 
1329
1468
  // catalog/react/AgentListContent.tsx
1330
- var import_react5 = require("react");
1469
+ var import_react6 = require("react");
1331
1470
 
1332
1471
  // catalog/react/types.ts
1333
- var SORT_OPTIONS = [
1334
- { value: "updated-desc", label: "Recent" },
1335
- { value: "created-desc", label: "Created" },
1336
- { value: "name-asc", label: "A \u2192 Z" },
1337
- { value: "name-desc", label: "Z \u2192 A" },
1338
- { value: "category-asc", label: "Category" }
1339
- ];
1340
1472
  var PANEL_HEIGHT = "528px";
1341
1473
  var LIST_MAX_HEIGHT = "min(528px, var(--radix-popper-available-height, 528px))";
1342
1474
 
1343
1475
  // catalog/react/AgentFilterBar.tsx
1344
- var import_jsx_runtime7 = require("react/jsx-runtime");
1476
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1345
1477
  function AgentFilterBar({
1346
1478
  consumer,
1347
1479
  allCategories,
@@ -1352,8 +1484,8 @@ function AgentFilterBar({
1352
1484
  onFilterChipClick,
1353
1485
  onReset
1354
1486
  }) {
1355
- 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: [
1356
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1487
+ 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: [
1488
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1357
1489
  FilterChip,
1358
1490
  {
1359
1491
  icon: ArrowUpDownIcon,
@@ -1363,7 +1495,7 @@ function AgentFilterBar({
1363
1495
  onClick: () => onFilterChipClick("sort")
1364
1496
  }
1365
1497
  ),
1366
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1498
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1367
1499
  FilterChip,
1368
1500
  {
1369
1501
  icon: StarIcon,
@@ -1375,7 +1507,7 @@ function AgentFilterBar({
1375
1507
  }
1376
1508
  }
1377
1509
  ),
1378
- allCategories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1510
+ allCategories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1379
1511
  FilterChip,
1380
1512
  {
1381
1513
  icon: FolderIcon,
@@ -1385,7 +1517,7 @@ function AgentFilterBar({
1385
1517
  onClick: () => onFilterChipClick("categories")
1386
1518
  }
1387
1519
  ),
1388
- allTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1520
+ allTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1389
1521
  FilterChip,
1390
1522
  {
1391
1523
  icon: TagIcon,
@@ -1395,14 +1527,14 @@ function AgentFilterBar({
1395
1527
  onClick: () => onFilterChipClick("tags")
1396
1528
  }
1397
1529
  ),
1398
- activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1530
+ activeFilterCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1399
1531
  "button",
1400
1532
  {
1401
1533
  type: "button",
1402
1534
  onClick: onReset,
1403
1535
  "aria-label": "Reset filters",
1404
1536
  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",
1405
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RotateCcwIcon, { className: "w-3 h-3" })
1537
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RotateCcwIcon, { className: "w-3 h-3" })
1406
1538
  }
1407
1539
  )
1408
1540
  ] });
@@ -1410,7 +1542,7 @@ function AgentFilterBar({
1410
1542
 
1411
1543
  // catalog/react/AgentListTabs.tsx
1412
1544
  var import_design_system4 = require("@ai-matrx/design-system");
1413
- var import_jsx_runtime8 = require("react/jsx-runtime");
1545
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1414
1546
  function AgentListTabs({
1415
1547
  consumer,
1416
1548
  tabCounts,
@@ -1424,7 +1556,7 @@ function AgentListTabs({
1424
1556
  { value: "all", label: "All", countKey: "all" },
1425
1557
  { value: "system", label: labels.publicTab, countKey: "system" }
1426
1558
  ];
1427
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1559
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1428
1560
  "div",
1429
1561
  {
1430
1562
  className: "flex items-center gap-0.5 px-2 pb-1 overflow-x-auto matrx-agent-scrollbar-none shrink-0",
@@ -1434,7 +1566,7 @@ function AgentListTabs({
1434
1566
  const label = value === "system" ? systemTabLabel ?? baseLabel : baseLabel;
1435
1567
  const active = consumer.tab === value;
1436
1568
  const count = tabCounts[countKey];
1437
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1569
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1438
1570
  "button",
1439
1571
  {
1440
1572
  type: "button",
@@ -1446,8 +1578,8 @@ function AgentListTabs({
1446
1578
  active ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"
1447
1579
  ),
1448
1580
  children: [
1449
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: label }),
1450
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1581
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: label }),
1582
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1451
1583
  "span",
1452
1584
  {
1453
1585
  className: (0, import_design_system4.cn)("tabular-nums opacity-70", active && "opacity-90"),
@@ -1465,7 +1597,7 @@ function AgentListTabs({
1465
1597
 
1466
1598
  // catalog/react/AgentRow.tsx
1467
1599
  var import_design_system5 = require("@ai-matrx/design-system");
1468
- var import_jsx_runtime9 = require("react/jsx-runtime");
1600
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1469
1601
  function AgentRow({
1470
1602
  agent,
1471
1603
  isActive,
@@ -1480,7 +1612,7 @@ function AgentRow({
1480
1612
  const { LinkComponent } = useAgentCatalogUiPorts();
1481
1613
  const { labels } = useAgentCatalog();
1482
1614
  const rowHref = href ?? `/agents/go/${agent.id}`;
1483
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1615
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1484
1616
  "div",
1485
1617
  {
1486
1618
  className: (0, import_design_system5.cn)(
@@ -1492,7 +1624,7 @@ function AgentRow({
1492
1624
  onMouseEnter: isMobile ? void 0 : onHover,
1493
1625
  onMouseLeave: isMobile ? void 0 : onHoverEnd,
1494
1626
  children: [
1495
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1627
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1496
1628
  LinkComponent,
1497
1629
  {
1498
1630
  href: rowHref,
@@ -1503,8 +1635,8 @@ function AgentRow({
1503
1635
  },
1504
1636
  className: "flex items-center gap-2 flex-1 min-w-0 px-3 py-2",
1505
1637
  children: [
1506
- agent.isFavorite && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(StarIcon, { filled: true, className: "w-3 h-3 matrx-agent-star-on shrink-0" }),
1507
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1638
+ agent.isFavorite && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StarIcon, { filled: true, className: "w-3 h-3 matrx-agent-star-on shrink-0" }),
1639
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1508
1640
  "span",
1509
1641
  {
1510
1642
  className: (0, import_design_system5.cn)(
@@ -1514,11 +1646,22 @@ function AgentRow({
1514
1646
  children: agent.name || "Untitled"
1515
1647
  }
1516
1648
  ),
1517
- 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
1649
+ agent.orchestra && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1650
+ "span",
1651
+ {
1652
+ className: "flex shrink-0 items-center gap-0.5 rounded-sm bg-primary/10 px-1 py-px text-[9px] font-medium text-primary",
1653
+ title: orchestraDelegatesLine(agent.orchestra) ?? orchestraLabel(agent.orchestra),
1654
+ children: [
1655
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Music4Icon, { className: "w-2.5 h-2.5" }),
1656
+ agent.orchestra.memberCount
1657
+ ]
1658
+ }
1659
+ ),
1660
+ 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
1518
1661
  ]
1519
1662
  }
1520
1663
  ),
1521
- isMobile && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1664
+ isMobile && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1522
1665
  "button",
1523
1666
  {
1524
1667
  type: "button",
@@ -1528,7 +1671,7 @@ function AgentRow({
1528
1671
  onDetailPress();
1529
1672
  },
1530
1673
  className: "flex items-center justify-center w-10 h-full shrink-0 text-muted-foreground/40 active:text-muted-foreground",
1531
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ChevronRightIcon, { className: "w-4 h-4" })
1674
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ChevronRightIcon, { className: "w-4 h-4" })
1532
1675
  }
1533
1676
  )
1534
1677
  ]
@@ -1537,7 +1680,7 @@ function AgentRow({
1537
1680
  }
1538
1681
 
1539
1682
  // catalog/react/AgentListContent.tsx
1540
- var import_jsx_runtime10 = require("react/jsx-runtime");
1683
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1541
1684
  function AgentListContent({
1542
1685
  agents,
1543
1686
  isLoading,
@@ -1565,8 +1708,8 @@ function AgentListContent({
1565
1708
  listOpen = false
1566
1709
  }) {
1567
1710
  const catalog = useAgentCatalog();
1568
- const listScrollRef = (0, import_react5.useRef)(null);
1569
- (0, import_react5.useEffect)(() => {
1711
+ const listScrollRef = (0, import_react6.useRef)(null);
1712
+ (0, import_react6.useEffect)(() => {
1570
1713
  if (listOpen && pinnedAgent) {
1571
1714
  listScrollRef.current?.scrollTo({ top: 0 });
1572
1715
  }
@@ -1574,8 +1717,8 @@ function AgentListContent({
1574
1717
  const { labels } = catalog;
1575
1718
  const emptyLabel = agentListEmptyLabel(consumer.tab, labels);
1576
1719
  const defaultAgent = defaultRow?.row ?? null;
1577
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col h-full", children: [
1578
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1720
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col h-full", children: [
1721
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1579
1722
  SearchInput,
1580
1723
  {
1581
1724
  ref: inputRef,
@@ -1584,7 +1727,7 @@ function AgentListContent({
1584
1727
  placeholder: labels.searchPlaceholder
1585
1728
  }
1586
1729
  ) }),
1587
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1730
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1588
1731
  AgentListTabs,
1589
1732
  {
1590
1733
  consumer,
@@ -1593,7 +1736,7 @@ function AgentListContent({
1593
1736
  visibleTabs
1594
1737
  }
1595
1738
  ),
1596
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1739
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1597
1740
  AgentFilterBar,
1598
1741
  {
1599
1742
  consumer,
@@ -1606,46 +1749,46 @@ function AgentListContent({
1606
1749
  onReset
1607
1750
  }
1608
1751
  ),
1609
- defaultRow?.drift && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1752
+ defaultRow?.drift && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1610
1753
  "div",
1611
1754
  {
1612
1755
  role: "status",
1613
1756
  className: "matrx-agent-drift-banner mx-2 mb-1.5 flex items-start gap-2 rounded-md px-2 py-1.5 shrink-0",
1614
1757
  children: [
1615
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1616
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.drift }),
1617
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1758
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1759
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.drift }),
1760
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1618
1761
  "button",
1619
1762
  {
1620
1763
  type: "button",
1621
1764
  "aria-label": "Dismiss",
1622
1765
  onClick: () => catalog.dismissDefaultRowDrift(defaultRow.mandateKey),
1623
1766
  className: "shrink-0 opacity-70 hover:opacity-100",
1624
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(XIcon, { className: "w-3 h-3" })
1767
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(XIcon, { className: "w-3 h-3" })
1625
1768
  }
1626
1769
  )
1627
1770
  ]
1628
1771
  }
1629
1772
  ),
1630
- defaultRow?.error && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1773
+ defaultRow?.error && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1631
1774
  "div",
1632
1775
  {
1633
1776
  role: "alert",
1634
1777
  className: "matrx-agent-drift-banner mx-2 mb-1.5 flex items-start gap-2 rounded-md px-2 py-1.5 shrink-0",
1635
1778
  children: [
1636
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1637
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.error })
1779
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AlertTriangleIcon, { className: "w-3.5 h-3.5 shrink-0 mt-px" }),
1780
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-[11px] leading-snug flex-1", children: defaultRow.error })
1638
1781
  ]
1639
1782
  }
1640
1783
  ),
1641
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px bg-border shrink-0" }),
1642
- /* @__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: [
1643
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LoaderIcon, { className: "w-4 h-4 matrx-agent-spin" }),
1644
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-xs", children: labels.loading })
1645
- ] }) : 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: [
1646
- defaultAgent && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1647
- /* @__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" }) }),
1648
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1784
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-px bg-border shrink-0" }),
1785
+ /* @__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: [
1786
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LoaderIcon, { className: "w-4 h-4 matrx-agent-spin" }),
1787
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-xs", children: labels.loading })
1788
+ ] }) : 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: [
1789
+ defaultAgent && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1790
+ /* @__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" }) }),
1791
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1649
1792
  AgentRow,
1650
1793
  {
1651
1794
  agent: defaultAgent,
@@ -1660,11 +1803,11 @@ function AgentListContent({
1660
1803
  },
1661
1804
  `default-${defaultAgent.id}`
1662
1805
  ),
1663
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1806
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1664
1807
  ] }),
1665
- pinnedAgent && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
1666
- /* @__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 }) }),
1667
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1808
+ pinnedAgent && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1809
+ /* @__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 }) }),
1810
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1668
1811
  AgentRow,
1669
1812
  {
1670
1813
  agent: pinnedAgent,
@@ -1679,9 +1822,9 @@ function AgentListContent({
1679
1822
  },
1680
1823
  `pinned-${pinnedAgent.id}`
1681
1824
  ),
1682
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1825
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mx-2 my-0.5 h-px bg-border" })
1683
1826
  ] }),
1684
- agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1827
+ agents.map((agent) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1685
1828
  AgentRow,
1686
1829
  {
1687
1830
  agent,
@@ -1696,16 +1839,16 @@ function AgentListContent({
1696
1839
  },
1697
1840
  agent.id
1698
1841
  )),
1699
- 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 }) })
1842
+ 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 }) })
1700
1843
  ] }) }),
1701
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-px bg-border shrink-0" }),
1702
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center justify-between px-2.5 py-1.5 shrink-0", children: [
1703
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: [
1844
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-px bg-border shrink-0" }),
1845
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between px-2.5 py-1.5 shrink-0", children: [
1846
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "text-[10px] text-muted-foreground tabular-nums", children: [
1704
1847
  agents.length,
1705
1848
  " agent",
1706
1849
  agents.length !== 1 ? "s" : ""
1707
1850
  ] }),
1708
- consumer.searchTerm && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1851
+ consumer.searchTerm && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1709
1852
  "button",
1710
1853
  {
1711
1854
  type: "button",
@@ -1719,7 +1862,7 @@ function AgentListContent({
1719
1862
  }
1720
1863
 
1721
1864
  // catalog/react/AgentMobileSubView.tsx
1722
- var import_jsx_runtime11 = require("react/jsx-runtime");
1865
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1723
1866
  function AgentMobileSubView({
1724
1867
  view,
1725
1868
  consumer,
@@ -1732,20 +1875,20 @@ function AgentMobileSubView({
1732
1875
  onBack
1733
1876
  }) {
1734
1877
  const title = view === "sort" ? "Sort" : view === "categories" ? "Categories" : "Tags";
1735
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col", children: [
1736
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1878
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col", children: [
1879
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1737
1880
  "button",
1738
1881
  {
1739
1882
  type: "button",
1740
1883
  onClick: onBack,
1741
1884
  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",
1742
1885
  children: [
1743
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
1886
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
1744
1887
  title
1745
1888
  ]
1746
1889
  }
1747
1890
  ),
1748
- view === "sort" && SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1891
+ view === "sort" && SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1749
1892
  OptionRow,
1750
1893
  {
1751
1894
  label: opt.label,
@@ -1757,8 +1900,8 @@ function AgentMobileSubView({
1757
1900
  },
1758
1901
  opt.value
1759
1902
  )),
1760
- view === "categories" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1761
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1903
+ view === "categories" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1904
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1762
1905
  SearchInput,
1763
1906
  {
1764
1907
  value: catSearch,
@@ -1766,7 +1909,7 @@ function AgentMobileSubView({
1766
1909
  placeholder: "Filter categories..."
1767
1910
  }
1768
1911
  ) }),
1769
- consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1912
+ consumer.includedCats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1770
1913
  "button",
1771
1914
  {
1772
1915
  type: "button",
@@ -1779,9 +1922,9 @@ function AgentMobileSubView({
1779
1922
  ]
1780
1923
  }
1781
1924
  ),
1782
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allCategories.filter(
1925
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allCategories.filter(
1783
1926
  (c) => !catSearch || c.toLowerCase().includes(catSearch.toLowerCase())
1784
- ).map((cat) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1927
+ ).map((cat) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1785
1928
  CheckRow,
1786
1929
  {
1787
1930
  label: cat,
@@ -1791,8 +1934,8 @@ function AgentMobileSubView({
1791
1934
  cat
1792
1935
  )) })
1793
1936
  ] }),
1794
- view === "tags" && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1795
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1937
+ view === "tags" && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1938
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "px-2 pt-2 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1796
1939
  SearchInput,
1797
1940
  {
1798
1941
  value: tagSearch,
@@ -1800,7 +1943,7 @@ function AgentMobileSubView({
1800
1943
  placeholder: "Filter tags..."
1801
1944
  }
1802
1945
  ) }),
1803
- consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1946
+ consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1804
1947
  "button",
1805
1948
  {
1806
1949
  type: "button",
@@ -1813,9 +1956,9 @@ function AgentMobileSubView({
1813
1956
  ]
1814
1957
  }
1815
1958
  ),
1816
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allTags.filter(
1959
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "overflow-y-auto max-h-[300px]", children: allTags.filter(
1817
1960
  (t) => !tagSearch || t.toLowerCase().includes(tagSearch.toLowerCase())
1818
- ).map((tag) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1961
+ ).map((tag) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1819
1962
  CheckRow,
1820
1963
  {
1821
1964
  label: tag,
@@ -1829,11 +1972,11 @@ function AgentMobileSubView({
1829
1972
  }
1830
1973
 
1831
1974
  // catalog/react/AgentSortPanel.tsx
1832
- var import_jsx_runtime12 = require("react/jsx-runtime");
1975
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1833
1976
  function AgentSortPanel({ consumer, onClose }) {
1834
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col h-full", children: [
1835
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SidePanelHeader, { title: "Sort By", onClose }),
1836
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "overflow-y-auto flex-1", children: SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1977
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col h-full", children: [
1978
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SidePanelHeader, { title: "Sort By", onClose }),
1979
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "overflow-y-auto flex-1", children: SORT_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1837
1980
  OptionRow,
1838
1981
  {
1839
1982
  label: opt.label,
@@ -1846,7 +1989,7 @@ function AgentSortPanel({ consumer, onClose }) {
1846
1989
  }
1847
1990
 
1848
1991
  // catalog/react/AgentTagsPanel.tsx
1849
- var import_jsx_runtime13 = require("react/jsx-runtime");
1992
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1850
1993
  function AgentTagsPanel({
1851
1994
  consumer,
1852
1995
  allTags,
@@ -1857,9 +2000,9 @@ function AgentTagsPanel({
1857
2000
  const filtered = allTags.filter(
1858
2001
  (t) => !search || t.toLowerCase().includes(search.toLowerCase())
1859
2002
  );
1860
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col h-full", children: [
1861
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SidePanelHeader, { title: "Tags", onClose }),
1862
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2003
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col h-full", children: [
2004
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SidePanelHeader, { title: "Tags", onClose }),
2005
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-2 pt-2 pb-1 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1863
2006
  SearchInput,
1864
2007
  {
1865
2008
  value: search,
@@ -1867,7 +2010,7 @@ function AgentTagsPanel({
1867
2010
  placeholder: "Filter tags..."
1868
2011
  }
1869
2012
  ) }),
1870
- consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2013
+ consumer.includedTags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1871
2014
  "button",
1872
2015
  {
1873
2016
  type: "button",
@@ -1880,7 +2023,7 @@ function AgentTagsPanel({
1880
2023
  ]
1881
2024
  }
1882
2025
  ),
1883
- /* @__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)(
2026
+ /* @__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)(
1884
2027
  CheckRow,
1885
2028
  {
1886
2029
  label: tag,
@@ -1893,7 +2036,7 @@ function AgentTagsPanel({
1893
2036
  }
1894
2037
 
1895
2038
  // catalog/react/AgentListDropdown.tsx
1896
- var import_jsx_runtime14 = require("react/jsx-runtime");
2039
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1897
2040
  var CONSUMER_ID = "agent-list-dropdown";
1898
2041
  function AgentListDropdown({
1899
2042
  onSelect,
@@ -1918,13 +2061,13 @@ function AgentListDropdown({
1918
2061
  const isMobile = (0, import_design_system6.useIsMobile)();
1919
2062
  const { labels } = useAgentCatalog();
1920
2063
  const { popoverContainer } = useAgentCatalogUiPorts();
1921
- const [open, setOpen] = (0, import_react6.useState)(false);
1922
- const [rightPanel, setRightPanel] = (0, import_react6.useState)(null);
1923
- const [catSearch, setCatSearch] = (0, import_react6.useState)("");
1924
- const [tagSearch, setTagSearch] = (0, import_react6.useState)("");
1925
- const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react6.useState)(null);
1926
- const [mobileSubView, setMobileSubView] = (0, import_react6.useState)(null);
1927
- const inputRef = (0, import_react6.useRef)(null);
2064
+ const [open, setOpen] = (0, import_react7.useState)(false);
2065
+ const [rightPanel, setRightPanel] = (0, import_react7.useState)(null);
2066
+ const [catSearch, setCatSearch] = (0, import_react7.useState)("");
2067
+ const [tagSearch, setTagSearch] = (0, import_react7.useState)("");
2068
+ const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react7.useState)(null);
2069
+ const [mobileSubView, setMobileSubView] = (0, import_react7.useState)(null);
2070
+ const inputRef = (0, import_react7.useRef)(null);
1928
2071
  const {
1929
2072
  agents,
1930
2073
  isLoading,
@@ -1987,7 +2130,7 @@ function AgentListDropdown({
1987
2130
  setRightPanel(rightPanel === panel ? null : panel);
1988
2131
  }
1989
2132
  };
1990
- const handleAgentHover = (0, import_react6.useCallback)(
2133
+ const handleAgentHover = (0, import_react7.useCallback)(
1991
2134
  (agent) => {
1992
2135
  if (isMobile) return;
1993
2136
  const filterPanelOpen = rightPanel === "sort" || rightPanel === "categories" || rightPanel === "tags";
@@ -1996,7 +2139,7 @@ function AgentListDropdown({
1996
2139
  },
1997
2140
  [isMobile, rightPanel, coreAgentHover]
1998
2141
  );
1999
- const handleAgentHoverEnd = (0, import_react6.useCallback)(
2142
+ const handleAgentHoverEnd = (0, import_react7.useCallback)(
2000
2143
  (agent) => {
2001
2144
  if (isMobile) return;
2002
2145
  if (rightPanel !== "detail") return;
@@ -2004,16 +2147,16 @@ function AgentListDropdown({
2004
2147
  },
2005
2148
  [isMobile, rightPanel, coreAgentHoverEnd]
2006
2149
  );
2007
- const handleDetailPanelMouseLeave = (0, import_react6.useCallback)(() => {
2150
+ const handleDetailPanelMouseLeave = (0, import_react7.useCallback)(() => {
2008
2151
  coreDetailMouseLeave(() => setRightPanel(null));
2009
2152
  }, [coreDetailMouseLeave]);
2010
- const resolveAgentHref = (0, import_react6.useMemo)(() => {
2153
+ const resolveAgentHref = (0, import_react7.useMemo)(() => {
2011
2154
  if (resolveAgentHrefProp) return resolveAgentHrefProp;
2012
2155
  if (!navigateTo) return void 0;
2013
2156
  return (agent) => navigateTo.replace("{id}", agent.id);
2014
2157
  }, [navigateTo, resolveAgentHrefProp]);
2015
2158
  const hasRightPanel = rightPanel !== null;
2016
- const triggerButton = triggerSlot ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2159
+ const triggerButton = triggerSlot ?? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2017
2160
  "button",
2018
2161
  {
2019
2162
  type: "button",
@@ -2025,22 +2168,22 @@ function AgentListDropdown({
2025
2168
  className
2026
2169
  ),
2027
2170
  children: [
2028
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "min-w-0 max-w-[200px] flex-1 truncate text-left", children: displayLabel }),
2029
- 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 }),
2030
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronDownIcon, { className: "w-3 h-3 text-muted-foreground/60" })
2171
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 max-w-[200px] flex-1 truncate text-left", children: displayLabel }),
2172
+ 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 }),
2173
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronDownIcon, { className: "w-3 h-3 text-muted-foreground/60" })
2031
2174
  ]
2032
2175
  }
2033
2176
  );
2034
2177
  const wrapTrigger = (Trigger) => {
2035
2178
  if (!showAssignedTooltip) {
2036
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Trigger, { asChild: true, children: triggerButton });
2179
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Trigger, { asChild: true, children: triggerButton });
2037
2180
  }
2038
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.Tooltip, { ...open ? { open: false } : {}, children: [
2039
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system6.TooltipTrigger, { asChild: true, children: triggerButton }) }),
2040
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system6.TooltipContent, { side: "bottom", className: "max-w-xs", children: displayLabel })
2181
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.Tooltip, { ...open ? { open: false } : {}, children: [
2182
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system6.TooltipTrigger, { asChild: true, children: triggerButton }) }),
2183
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system6.TooltipContent, { side: "bottom", className: "max-w-xs", children: displayLabel })
2041
2184
  ] });
2042
2185
  };
2043
- const listPanel = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2186
+ const listPanel = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2044
2187
  AgentListContent,
2045
2188
  {
2046
2189
  agents,
@@ -2072,31 +2215,31 @@ function AgentListDropdown({
2072
2215
  }
2073
2216
  );
2074
2217
  if (isMobile) {
2075
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.Drawer, { open, onOpenChange: handleOpen, children: [
2218
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.Drawer, { open, onOpenChange: handleOpen, children: [
2076
2219
  wrapTrigger(import_design_system6.DrawerTrigger),
2077
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.DrawerContent, { className: "h-[85dvh]", children: [
2078
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_design_system6.DrawerTitle, { className: "sr-only", children: "Select Agent" }),
2079
- /* @__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: [
2080
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2220
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.DrawerContent, { className: "h-[85dvh]", children: [
2221
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_design_system6.DrawerTitle, { className: "sr-only", children: "Select Agent" }),
2222
+ /* @__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: [
2223
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2081
2224
  "button",
2082
2225
  {
2083
2226
  type: "button",
2084
2227
  onClick: () => setMobileDetailAgent(null),
2085
2228
  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",
2086
2229
  children: [
2087
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
2230
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRightIcon, { className: "w-4 h-4 rotate-180" }),
2088
2231
  "Back"
2089
2232
  ]
2090
2233
  }
2091
2234
  ),
2092
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2235
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2093
2236
  AgentDetailCard,
2094
2237
  {
2095
2238
  agent: mobileDetailAgent,
2096
2239
  onSelect: () => handleSelectAgent(mobileDetailAgent)
2097
2240
  }
2098
2241
  ) })
2099
- ] }) : mobileSubView ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2242
+ ] }) : mobileSubView ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2100
2243
  AgentMobileSubView,
2101
2244
  {
2102
2245
  view: mobileSubView,
@@ -2117,9 +2260,9 @@ function AgentListDropdown({
2117
2260
  ] })
2118
2261
  ] });
2119
2262
  }
2120
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_design_system6.Popover, { open, onOpenChange: handleOpen, modal: false, children: [
2263
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_design_system6.Popover, { open, onOpenChange: handleOpen, modal: false, children: [
2121
2264
  wrapTrigger(import_design_system6.PopoverTrigger),
2122
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2265
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2123
2266
  import_design_system6.PopoverContent,
2124
2267
  {
2125
2268
  ...contentSide ? { side: contentSide } : {},
@@ -2130,30 +2273,30 @@ function AgentListDropdown({
2130
2273
  ...popoverContainer ? { container: popoverContainer } : {},
2131
2274
  className: "p-0 overflow-hidden w-[680px]",
2132
2275
  style: { height: PANEL_HEIGHT, maxHeight: LIST_MAX_HEIGHT },
2133
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex h-full", children: [
2134
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex flex-col min-w-0 w-[340px] shrink-0 border-r border-border", children: listPanel }),
2135
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2276
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex h-full", children: [
2277
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex flex-col min-w-0 w-[340px] shrink-0 border-r border-border", children: listPanel }),
2278
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2136
2279
  "div",
2137
2280
  {
2138
2281
  className: "h-full w-[340px] shrink-0 overflow-hidden flex flex-col",
2139
2282
  onMouseEnter: rightPanel === "detail" ? handleDetailPanelMouseEnter : void 0,
2140
2283
  onMouseLeave: rightPanel === "detail" ? handleDetailPanelMouseLeave : void 0,
2141
2284
  children: [
2142
- rightPanel === "detail" && hoveredAgent && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "h-full matrx-agent-fade-in", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2285
+ rightPanel === "detail" && hoveredAgent && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-full matrx-agent-fade-in", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2143
2286
  AgentDetailCard,
2144
2287
  {
2145
2288
  agent: hoveredAgent,
2146
2289
  onSelect: () => handleSelectAgent(hoveredAgent)
2147
2290
  }
2148
2291
  ) }, hoveredAgent.id),
2149
- rightPanel === "sort" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2292
+ rightPanel === "sort" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2150
2293
  AgentSortPanel,
2151
2294
  {
2152
2295
  consumer,
2153
2296
  onClose: () => setRightPanel(null)
2154
2297
  }
2155
2298
  ),
2156
- rightPanel === "categories" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2299
+ rightPanel === "categories" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2157
2300
  AgentCategoriesPanel,
2158
2301
  {
2159
2302
  consumer,
@@ -2166,7 +2309,7 @@ function AgentListDropdown({
2166
2309
  }
2167
2310
  }
2168
2311
  ),
2169
- rightPanel === "tags" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2312
+ rightPanel === "tags" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2170
2313
  AgentTagsPanel,
2171
2314
  {
2172
2315
  consumer,
@@ -2179,9 +2322,9 @@ function AgentListDropdown({
2179
2322
  }
2180
2323
  }
2181
2324
  ),
2182
- !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: [
2183
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MousePointerClickIcon, { className: "h-6 w-6 text-muted-foreground/40" }),
2184
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "text-xs text-muted-foreground/70 leading-relaxed", children: labels.hoverHint })
2325
+ !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: [
2326
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MousePointerClickIcon, { className: "h-6 w-6 text-muted-foreground/40" }),
2327
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "text-xs text-muted-foreground/70 leading-relaxed", children: labels.hoverHint })
2185
2328
  ] })
2186
2329
  ]
2187
2330
  }
@@ -2194,8 +2337,8 @@ function AgentListDropdown({
2194
2337
 
2195
2338
  // catalog/react/AgentListInlinePicker.tsx
2196
2339
  var import_design_system7 = require("@ai-matrx/design-system");
2197
- var import_react7 = require("react");
2198
- var import_jsx_runtime15 = require("react/jsx-runtime");
2340
+ var import_react8 = require("react");
2341
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2199
2342
  function AgentListInlinePicker({
2200
2343
  consumerId,
2201
2344
  onSelect,
@@ -2211,11 +2354,11 @@ function AgentListInlinePicker({
2211
2354
  excludeAgentIds,
2212
2355
  defaultMandateKey
2213
2356
  }) {
2214
- const inputRef = (0, import_react7.useRef)(null);
2215
- const [catSearch, setCatSearch] = (0, import_react7.useState)("");
2216
- const [tagSearch, setTagSearch] = (0, import_react7.useState)("");
2217
- const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react7.useState)(null);
2218
- const [mobileSubView, setMobileSubView] = (0, import_react7.useState)(null);
2357
+ const inputRef = (0, import_react8.useRef)(null);
2358
+ const [catSearch, setCatSearch] = (0, import_react8.useState)("");
2359
+ const [tagSearch, setTagSearch] = (0, import_react8.useState)("");
2360
+ const [mobileDetailAgent, setMobileDetailAgent] = (0, import_react8.useState)(null);
2361
+ const [mobileSubView, setMobileSubView] = (0, import_react8.useState)(null);
2219
2362
  const {
2220
2363
  agents,
2221
2364
  isLoading,
@@ -2243,7 +2386,7 @@ function AgentListInlinePicker({
2243
2386
  ...excludeAgentIds ? { excludeAgentIds } : {},
2244
2387
  ...defaultMandateKey ? { defaultMandateKey } : {}
2245
2388
  });
2246
- (0, import_react7.useEffect)(() => {
2389
+ (0, import_react8.useEffect)(() => {
2247
2390
  ensureLoaded();
2248
2391
  if (!autoFocusSearch) return void 0;
2249
2392
  const timer = setTimeout(() => inputRef.current?.focus(), 50);
@@ -2259,20 +2402,20 @@ function AgentListInlinePicker({
2259
2402
  };
2260
2403
  const isMobile = true;
2261
2404
  if (mobileDetailAgent) {
2262
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: [
2263
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2405
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: (0, import_design_system7.cn)("flex h-full min-h-0 flex-col", className), children: [
2406
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
2264
2407
  "button",
2265
2408
  {
2266
2409
  type: "button",
2267
2410
  onClick: () => setMobileDetailAgent(null),
2268
2411
  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",
2269
2412
  children: [
2270
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronRightIcon, { className: "h-4 w-4 rotate-180" }),
2413
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChevronRightIcon, { className: "h-4 w-4 rotate-180" }),
2271
2414
  "Back"
2272
2415
  ]
2273
2416
  }
2274
2417
  ),
2275
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2418
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2276
2419
  AgentDetailCard,
2277
2420
  {
2278
2421
  agent: mobileDetailAgent,
@@ -2282,7 +2425,7 @@ function AgentListInlinePicker({
2282
2425
  ] });
2283
2426
  }
2284
2427
  if (mobileSubView) {
2285
- 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)(
2428
+ 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)(
2286
2429
  AgentMobileSubView,
2287
2430
  {
2288
2431
  view: mobileSubView,
@@ -2301,7 +2444,7 @@ function AgentListInlinePicker({
2301
2444
  }
2302
2445
  ) });
2303
2446
  }
2304
- 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)(
2447
+ 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)(
2305
2448
  AgentListContent,
2306
2449
  {
2307
2450
  agents,