@ai-matrx/agents 0.9.0 → 0.9.2

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.
@@ -271,53 +271,27 @@ var import_react4 = require("react");
271
271
 
272
272
  // catalog/shared/useAgentConsumer.ts
273
273
  var import_react3 = require("react");
274
-
275
- // catalog/types.ts
276
- function isMandateAgentId(id) {
277
- return id.startsWith("mandate:");
278
- }
279
- var SORT_OPTIONS = [
280
- { value: "updated-desc", label: "Recent" },
281
- { value: "created-desc", label: "Created" },
282
- { value: "name-asc", label: "A \u2192 Z" },
283
- { value: "name-desc", label: "Z \u2192 A" },
284
- { value: "category-asc", label: "Category" }
285
- ];
286
- var AGENT_NONE_SENTINEL = "__none__";
287
- var DEFAULT_AGENT_CONSUMER_STATE = {
288
- tab: "mine",
289
- sortBy: "updated-desc",
290
- searchTerm: "",
291
- includedCats: [],
292
- includedTags: [],
293
- favFilter: "all",
294
- archFilter: "active",
295
- accessFilter: "any",
296
- favoritesFirst: true,
297
- listPage: 1,
298
- sharedPage: 1,
299
- serverMatchedIds: [],
300
- isServerSearching: false,
301
- deepSearch: false
302
- };
303
-
304
- // catalog/shared/useAgentConsumer.ts
305
274
  var DEBOUNCE_MS = 250;
306
275
  var MIN_QUERY_LENGTH = 2;
307
276
  function useAgentConsumer(consumerId, options) {
308
277
  const catalog = useAgentCatalog();
278
+ const defaults = catalog.consumerDefaults;
309
279
  const selectConsumer = (0, import_react3.useCallback)(
310
- (state) => state.consumers[consumerId] ?? DEFAULT_AGENT_CONSUMER_STATE,
311
- [consumerId]
280
+ (state) => state.consumers[consumerId] ?? defaults,
281
+ [consumerId, defaults]
312
282
  );
313
283
  const consumer = useAgentCatalogState(selectConsumer);
314
284
  const optionsRef = (0, import_react3.useRef)(options);
315
285
  optionsRef.current = options;
316
286
  (0, import_react3.useEffect)(() => {
317
287
  const opts = optionsRef.current;
288
+ const initial = {
289
+ ...opts?.initialTab ? { tab: opts.initialTab } : {},
290
+ ...opts?.initialArchFilter ? { archFilter: opts.initialArchFilter } : {}
291
+ };
318
292
  catalog.registerConsumer(
319
293
  consumerId,
320
- opts?.initialTab ? { tab: opts.initialTab } : void 0
294
+ Object.keys(initial).length > 0 ? initial : void 0
321
295
  );
322
296
  return () => {
323
297
  if (optionsRef.current?.unregisterOnUnmount) {
@@ -440,7 +414,10 @@ function useAgentConsumer(consumerId, options) {
440
414
  isSearching
441
415
  });
442
416
  }, [consumerId, catalog, matchedIds, isSearching]);
443
- const hasActiveFilters = consumer.searchTerm !== "" || consumer.includedCats.length > 0 || consumer.includedTags.length > 0 || consumer.favFilter !== "all" || consumer.archFilter !== "active" || consumer.accessFilter !== "any" || !consumer.favoritesFirst;
417
+ const hasActiveFilters = consumer.searchTerm !== "" || consumer.includedCats.length > 0 || consumer.includedTags.length > 0 || consumer.favFilter !== "all" || // The archive filter is compared to THIS CATALOG'S default, not to the
418
+ // hardcoded platform one: a host that legitimately defaults to "show all"
419
+ // must not have the reset control permanently lit.
420
+ consumer.archFilter !== defaults.archFilter || consumer.accessFilter !== "any" || !consumer.favoritesFirst;
444
421
  return {
445
422
  tab: consumer.tab,
446
423
  sortBy: consumer.sortBy,
@@ -449,6 +426,7 @@ function useAgentConsumer(consumerId, options) {
449
426
  includedTags: consumer.includedTags,
450
427
  favFilter: consumer.favFilter,
451
428
  archFilter: consumer.archFilter,
429
+ archFilterDefault: defaults.archFilter,
452
430
  accessFilter: consumer.accessFilter,
453
431
  favoritesFirst: consumer.favoritesFirst,
454
432
  listPage: consumer.listPage,
@@ -475,6 +453,34 @@ function useAgentConsumer(consumerId, options) {
475
453
  };
476
454
  }
477
455
 
456
+ // catalog/types.ts
457
+ function isMandateAgentId(id) {
458
+ return id.startsWith("mandate:");
459
+ }
460
+ var SORT_OPTIONS = [
461
+ { value: "updated-desc", label: "Recent" },
462
+ { value: "created-desc", label: "Created" },
463
+ { value: "name-asc", label: "A \u2192 Z" },
464
+ { value: "name-desc", label: "Z \u2192 A" },
465
+ { value: "category-asc", label: "Category" }
466
+ ];
467
+ var ARCHIVE_FILTER_ORDER = [
468
+ "active",
469
+ "both",
470
+ "archived"
471
+ ];
472
+ var ARCHIVE_FILTER_OPTIONS = [
473
+ { value: "active", label: "Hide archived", chip: "Archive" },
474
+ { value: "both", label: "Show all", chip: "All + archived" },
475
+ { value: "archived", label: "Archived only", chip: "Archived only" }
476
+ ];
477
+ function nextArchFilter(current) {
478
+ const index = ARCHIVE_FILTER_ORDER.indexOf(current);
479
+ if (index < 0) return ARCHIVE_FILTER_ORDER[0];
480
+ return ARCHIVE_FILTER_ORDER[(index + 1) % ARCHIVE_FILTER_ORDER.length];
481
+ }
482
+ var AGENT_NONE_SENTINEL = "__none__";
483
+
478
484
  // catalog/labels.ts
479
485
  function agentListEmptyLabel(tab, labels) {
480
486
  switch (tab) {
@@ -491,6 +497,26 @@ function shouldDefaultAgentListToPublicTab(args) {
491
497
  if (!args.agentsLoaded) return false;
492
498
  return args.ownedCount === 0;
493
499
  }
500
+ function agentArchiveFilterChipLabel(archFilter) {
501
+ return ARCHIVE_FILTER_OPTIONS.find((o) => o.value === archFilter)?.chip ?? "Archive";
502
+ }
503
+ function agentArchiveFilterStateLabel(archFilter) {
504
+ return ARCHIVE_FILTER_OPTIONS.find((o) => o.value === archFilter)?.label ?? "Hide archived";
505
+ }
506
+ function agentArchiveFilterControlLabel(archFilter) {
507
+ return `Archive filter: ${agentArchiveFilterStateLabel(
508
+ archFilter
509
+ ).toLowerCase()}. Click for ${agentArchiveFilterStateLabel(
510
+ nextArchFilter(archFilter)
511
+ ).toLowerCase()}`;
512
+ }
513
+ function agentListFooterLabel(args) {
514
+ const { count, archFilter, archivedHiddenCount } = args;
515
+ if (archFilter === "archived") return `${count} archived shown`;
516
+ const base = `${count} agent${count !== 1 ? "s" : ""}`;
517
+ if (archFilter === "both") return `${base} \xB7 archived shown`;
518
+ return archivedHiddenCount > 0 ? `${base} \xB7 ${archivedHiddenCount} archived hidden` : base;
519
+ }
494
520
 
495
521
  // catalog/score.ts
496
522
  function computeAgentSearchScore(agent, query) {
@@ -567,7 +593,19 @@ function memoize2(fn) {
567
593
  return last;
568
594
  };
569
595
  }
596
+ function compareAgentIds(a, b) {
597
+ const idA = a.id ?? "";
598
+ const idB = b.id ?? "";
599
+ if (idA < idB) return -1;
600
+ if (idA > idB) return 1;
601
+ return 0;
602
+ }
570
603
  function applyAgentSortComparator(a, b, sortBy) {
604
+ const primary = compareAgentSortKey(a, b, sortBy);
605
+ if (!Number.isFinite(primary) || primary === 0) return compareAgentIds(a, b);
606
+ return primary;
607
+ }
608
+ function compareAgentSortKey(a, b, sortBy) {
571
609
  switch (sortBy) {
572
610
  case "name-asc":
573
611
  return (a.name ?? "").localeCompare(b.name ?? "");
@@ -669,8 +707,7 @@ function filterUserTypeAgents(agents, consumer) {
669
707
  if (tab === "mine" && agent.isOwner !== true) return false;
670
708
  if (tab === "shared" && !(agent.isOwner === false && agent.accessLevel != null))
671
709
  return false;
672
- if (archFilter === "active" && agent.isArchived) return false;
673
- if (archFilter === "archived" && !agent.isArchived) return false;
710
+ if (!agentMatchesArchiveFilter(agent, archFilter)) return false;
674
711
  if (favFilter === "yes" && !agent.isFavorite) return false;
675
712
  if (favFilter === "no" && agent.isFavorite) return false;
676
713
  if (accessFilter === "owned" && agent.isOwner !== true) return false;
@@ -700,9 +737,10 @@ function filterUserTypeAgents(agents, consumer) {
700
737
  return sortFilteredAgents(filtered, consumer);
701
738
  }
702
739
  function filterBuiltinTypeAgents(agents, consumer) {
703
- const { searchTerm, favFilter, includedCats, includedTags } = consumer;
740
+ const { searchTerm, favFilter, archFilter, includedCats, includedTags } = consumer;
704
741
  const serverMatched = new Set(consumer.serverMatchedIds);
705
742
  const filtered = agents.filter((agent) => {
743
+ if (!agentMatchesArchiveFilter(agent, archFilter)) return false;
706
744
  if (favFilter === "yes" && !agent.isFavorite) return false;
707
745
  if (favFilter === "no" && agent.isFavorite) return false;
708
746
  if (includedCats.length > 0) {
@@ -743,22 +781,55 @@ var makeSelectFilteredAgents = (includeSystemInAll = false) => memoize2(
743
781
  return filterUserTypeAgents(userAgents, consumer);
744
782
  }
745
783
  );
784
+ function agentMatchesArchiveFilter(agent, archFilter) {
785
+ if (archFilter === "active") return !agent.isArchived;
786
+ if (archFilter === "archived") return Boolean(agent.isArchived);
787
+ return true;
788
+ }
789
+ function countBuiltinRows(agents, archFilter) {
790
+ let n = 0;
791
+ for (const a of agents) {
792
+ if (a.agentType !== "builtin") continue;
793
+ if (!agentMatchesArchiveFilter(a, archFilter)) continue;
794
+ n += 1;
795
+ }
796
+ return n;
797
+ }
798
+ function countUserRows(agents, archFilter, predicate) {
799
+ let n = 0;
800
+ for (const a of agents) {
801
+ if (a.agentType !== "user") continue;
802
+ if (!agentMatchesArchiveFilter(a, archFilter)) continue;
803
+ if (predicate(a)) n += 1;
804
+ }
805
+ return n;
806
+ }
807
+ var isOwned = (a) => a.isOwner === true;
808
+ var isShared = (a) => a.isOwner === false && a.accessLevel != null;
809
+ var isAny = () => true;
810
+ var isFavorite = (a) => Boolean(a.isFavorite);
811
+ var selectAgentTabCounts = memoize2(
812
+ (agents, archFilter) => ({
813
+ mine: countUserRows(agents, archFilter, isOwned),
814
+ shared: countUserRows(agents, archFilter, isShared),
815
+ all: countUserRows(agents, archFilter, isAny),
816
+ system: countBuiltinRows(agents, archFilter)
817
+ })
818
+ );
746
819
  var selectTotalUserAgentsCount = memoize1(
747
- (agents) => selectUserTypeAgents(agents).length
820
+ (agents) => countUserRows(agents, "active", isAny)
748
821
  );
749
822
  var selectTotalOwnedAgentsCount = memoize1(
750
- (agents) => selectUserTypeAgents(agents).filter((a) => a.isOwner === true).length
823
+ (agents) => countUserRows(agents, "active", isOwned)
751
824
  );
752
825
  var selectTotalSharedAgentsCount = memoize1(
753
- (agents) => selectUserTypeAgents(agents).filter(
754
- (a) => a.isOwner === false && a.accessLevel != null
755
- ).length
826
+ (agents) => countUserRows(agents, "active", isShared)
756
827
  );
757
828
  var selectTotalBuiltinAgentsCount = memoize1(
758
- (agents) => selectBuiltinTypeAgents(agents).length
829
+ (agents) => countBuiltinRows(agents, "active")
759
830
  );
760
831
  var selectTotalFavoriteAgentsCount = memoize1(
761
- (agents) => selectUserTypeAgents(agents).filter((a) => a.isFavorite).length
832
+ (agents) => countUserRows(agents, "active", isFavorite)
762
833
  );
763
834
 
764
835
  // catalog/shared/useAgentListCore.ts
@@ -777,6 +848,7 @@ function useAgentListCore({
777
848
  initialTab,
778
849
  includeSystemInAll = false,
779
850
  visibleTabs,
851
+ initialArchFilter,
780
852
  excludeAgentIds = EMPTY_EXCLUDES,
781
853
  defaultMandateKey
782
854
  }) {
@@ -786,10 +858,14 @@ function useAgentListCore({
786
858
  const [hoveredAgent, setHoveredAgent] = (0, import_react4.useState)(null);
787
859
  const hoverLeaveTimerRef = (0, import_react4.useRef)(null);
788
860
  const defaultTabAppliedRef = (0, import_react4.useRef)(false);
789
- const consumer = useAgentConsumer(consumerId, { unregisterOnUnmount: true });
861
+ const consumer = useAgentConsumer(consumerId, {
862
+ unregisterOnUnmount: true,
863
+ ...initialArchFilter ? { initialArchFilter } : {}
864
+ });
790
865
  const rows = useAgentCatalogRows();
791
866
  const userId = catalog.getUserIdOrNull();
792
- const ownedCount = selectTotalOwnedAgentsCount(rows);
867
+ const tabCountsForFilter = selectAgentTabCounts(rows, consumer.state.archFilter);
868
+ const ownedCount = tabCountsForFilter.mine;
793
869
  const selectFiltered = (0, import_react4.useMemo)(
794
870
  () => makeSelectFilteredAgents(includeSystemInAll),
795
871
  [includeSystemInAll]
@@ -799,19 +875,27 @@ function useAgentListCore({
799
875
  () => new Set(excludeAgentIds),
800
876
  [excludeAgentIds]
801
877
  );
802
- const agents = excludedAgentIds.size === 0 ? filteredAgents : filteredAgents.filter((agent) => !excludedAgentIds.has(agent.id));
878
+ const applyExcludes = (0, import_react4.useCallback)(
879
+ (list) => excludedAgentIds.size === 0 ? list : list.filter((agent) => !excludedAgentIds.has(agent.id)),
880
+ [excludedAgentIds]
881
+ );
882
+ const agents = applyExcludes(filteredAgents);
883
+ const selectArchivedProbe = (0, import_react4.useMemo)(
884
+ () => makeSelectFilteredAgents(includeSystemInAll),
885
+ [includeSystemInAll]
886
+ );
887
+ const archiveProbeState = (0, import_react4.useMemo)(
888
+ () => ({ ...consumer.state, archFilter: "archived" }),
889
+ [consumer.state]
890
+ );
891
+ const archivedHiddenCount = consumer.archFilter === "active" ? applyExcludes(selectArchivedProbe(rows, archiveProbeState)).length : 0;
803
892
  const status = useAgentCatalogState(selectStatus);
804
893
  const activeAgentId = activeAgentIdOverride ?? null;
805
894
  const pinnedAgent = activeAgentId ? catalog.getAgent(activeAgentId) : void 0;
806
895
  const onSystemTab = consumer.tab === "system";
807
896
  const allCategories = onSystemTab ? selectAllSystemAgentCategories(rows) : selectAllAgentCategories(rows);
808
897
  const allTags = onSystemTab ? selectAllSystemAgentTags(rows) : selectAllAgentTags(rows);
809
- const tabCounts = {
810
- mine: ownedCount,
811
- shared: selectTotalSharedAgentsCount(rows),
812
- all: selectTotalUserAgentsCount(rows),
813
- system: selectTotalBuiltinAgentsCount(rows)
814
- };
898
+ const tabCounts = tabCountsForFilter;
815
899
  const isLoading = status === "loading";
816
900
  const agentsLoaded = status === "succeeded" || status === "failed";
817
901
  const ensureLoaded = (0, import_react4.useCallback)(() => {
@@ -891,7 +975,9 @@ function useAgentListCore({
891
975
  },
892
976
  [onSelect, navigateTo, navigate, catalog, consumerId]
893
977
  );
894
- 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);
978
+ 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) + // The archive filter counts like every other filter, so a list showing
979
+ // archived rows offers the reset control that puts them away again.
980
+ (consumer.archFilter !== consumer.archFilterDefault ? 1 : 0);
895
981
  const handleAgentHover = (0, import_react4.useCallback)(
896
982
  (agent, panelOpen) => {
897
983
  if (panelOpen) return;
@@ -932,8 +1018,15 @@ function useAgentListCore({
932
1018
  },
933
1019
  []
934
1020
  );
1021
+ const footerLabel = agentListFooterLabel({
1022
+ count: agents.length,
1023
+ archFilter: consumer.archFilter,
1024
+ archivedHiddenCount
1025
+ });
935
1026
  return {
936
1027
  agents,
1028
+ archivedHiddenCount,
1029
+ footerLabel,
937
1030
  isLoading,
938
1031
  activeAgentId,
939
1032
  pinnedAgent: pinnedAgent ?? null,
@@ -1076,6 +1169,18 @@ var SHAPES = {
1076
1169
  "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"
1077
1170
  ]
1078
1171
  },
1172
+ /**
1173
+ * THE ARCHIVE GLYPH (Lucide `archive`) — the ONE mark of the platform
1174
+ * archive filter, drawn identically in every Matrx client so the control a
1175
+ * person learns on one surface is recognisable on all of them.
1176
+ */
1177
+ archive: {
1178
+ paths: [
1179
+ "M3 3h18a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z",
1180
+ "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",
1181
+ "M10 12h4"
1182
+ ]
1183
+ },
1079
1184
  circleCheck: {
1080
1185
  paths: ["m9 12 2 2 4-4"],
1081
1186
  circles: [{ cx: 12, cy: 12, r: 10 }]
@@ -1145,6 +1250,7 @@ var TEXT_GLYPHS = {
1145
1250
  folder: "\u25A4",
1146
1251
  tag: "\u2317",
1147
1252
  rotateCcw: "\u21BA",
1253
+ archive: "\u25A3",
1148
1254
  loader: "\u25CC",
1149
1255
  alertTriangle: "\u26A0",
1150
1256
  music4: "\u266A",
@@ -1227,31 +1333,31 @@ function FavoriteAgentButton({
1227
1333
  const theme = useAgentCatalogNativeTheme();
1228
1334
  const select = (0, import_react5.useCallback)((state) => state.byId[id], [id]);
1229
1335
  const record = useAgentCatalogState(select);
1230
- const isFavorite = record?.isFavorite ?? false;
1336
+ const isFavorite2 = record?.isFavorite ?? false;
1231
1337
  const isOwner = record?.isOwner ?? true;
1232
1338
  const inert = Boolean(disabled) || !isOwner;
1233
- const title = isOwner ? isFavorite ? "Remove from favorites" : "Add to favorites" : "Shared \u2014 cannot favorite";
1339
+ const title = isOwner ? isFavorite2 ? "Remove from favorites" : "Add to favorites" : "Shared \u2014 cannot favorite";
1234
1340
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1235
1341
  import_react_native3.Pressable,
1236
1342
  {
1237
1343
  onPress: () => {
1238
1344
  if (inert) return;
1239
- void catalog.setFavorite(id, !isFavorite).catch(() => {
1345
+ void catalog.setFavorite(id, !isFavorite2).catch(() => {
1240
1346
  });
1241
1347
  },
1242
1348
  disabled: inert,
1243
1349
  hitSlop: 8,
1244
1350
  accessibilityRole: "button",
1245
1351
  accessibilityLabel: title,
1246
- accessibilityState: { disabled: inert, selected: isFavorite },
1352
+ accessibilityState: { disabled: inert, selected: isFavorite2 },
1247
1353
  style: { opacity: inert ? 0.4 : 1 },
1248
1354
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1249
1355
  AgentIcon,
1250
1356
  {
1251
1357
  name: "star",
1252
1358
  size,
1253
- filled: isFavorite,
1254
- color: isFavorite ? theme.colors.favorite : theme.colors.textFaint,
1359
+ filled: isFavorite2,
1360
+ color: isFavorite2 ? theme.colors.favorite : theme.colors.textFaint,
1255
1361
  report: catalog.errorSink
1256
1362
  }
1257
1363
  )
@@ -1658,7 +1764,9 @@ function FilterChip({
1658
1764
  icon,
1659
1765
  label,
1660
1766
  active,
1661
- onPress
1767
+ onPress,
1768
+ accessibilityLabel,
1769
+ testID
1662
1770
  }) {
1663
1771
  const theme = useAgentCatalogNativeTheme();
1664
1772
  const { errorSink } = useAgentCatalog();
@@ -1669,7 +1777,8 @@ function FilterChip({
1669
1777
  onPress,
1670
1778
  accessibilityRole: "button",
1671
1779
  accessibilityState: { selected: active },
1672
- accessibilityLabel: label,
1780
+ accessibilityLabel: accessibilityLabel ?? label,
1781
+ ...testID ? { testID } : {},
1673
1782
  style: ({ pressed }) => [
1674
1783
  styles2.chip,
1675
1784
  {
@@ -1928,6 +2037,17 @@ function AgentFilterBar({
1928
2037
  }
1929
2038
  }
1930
2039
  ),
2040
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2041
+ FilterChip,
2042
+ {
2043
+ icon: "archive",
2044
+ label: agentArchiveFilterChipLabel(consumer.archFilter),
2045
+ active: consumer.archFilter !== consumer.archFilterDefault,
2046
+ accessibilityLabel: agentArchiveFilterControlLabel(consumer.archFilter),
2047
+ testID: "agent-archive-filter",
2048
+ onPress: () => consumer.setArchFilter(nextArchFilter(consumer.archFilter))
2049
+ }
2050
+ ),
1931
2051
  allCategories.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1932
2052
  FilterChip,
1933
2053
  {
@@ -2274,7 +2394,8 @@ function AgentListContent({
2274
2394
  systemTabLabel,
2275
2395
  pinnedAgent = null,
2276
2396
  defaultRow = null,
2277
- autoFocusSearch = false
2397
+ autoFocusSearch = false,
2398
+ archivedHiddenCount = 0
2278
2399
  }) {
2279
2400
  const catalog = useAgentCatalog();
2280
2401
  const theme = useAgentCatalogNativeTheme();
@@ -2502,19 +2623,20 @@ function AgentListContent({
2502
2623
  ),
2503
2624
  /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.View, { style: hairline }),
2504
2625
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: [styles6.footer, { paddingHorizontal: theme.spacing.md }], children: [
2505
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
2626
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2506
2627
  import_react_native9.Text,
2507
2628
  {
2629
+ testID: "agent-list-footer",
2508
2630
  style: {
2509
2631
  color: theme.colors.textMuted,
2510
2632
  fontSize: theme.fontSize.xs,
2511
2633
  fontVariant: ["tabular-nums"]
2512
2634
  },
2513
- children: [
2514
- agents.length,
2515
- " agent",
2516
- agents.length !== 1 ? "s" : ""
2517
- ]
2635
+ children: agentListFooterLabel({
2636
+ count: agents.length,
2637
+ archFilter: consumer.archFilter,
2638
+ archivedHiddenCount
2639
+ })
2518
2640
  }
2519
2641
  ),
2520
2642
  consumer.searchTerm.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
@@ -2681,6 +2803,7 @@ function AgentPickerBody({
2681
2803
  const [panelSearch, setPanelSearch] = (0, import_react6.useState)("");
2682
2804
  const {
2683
2805
  agents,
2806
+ archivedHiddenCount,
2684
2807
  isLoading,
2685
2808
  allCategories,
2686
2809
  allTags,
@@ -2752,6 +2875,7 @@ function AgentPickerBody({
2752
2875
  onReset: consumer.resetFilters,
2753
2876
  activeFilterCount,
2754
2877
  tabCounts,
2878
+ archivedHiddenCount,
2755
2879
  ...visibleTabs ? { visibleTabs } : {},
2756
2880
  ...systemTabLabel ?? (includeSystemInAll ? "System" : void 0) ? {
2757
2881
  systemTabLabel: systemTabLabel ?? (includeSystemInAll ? "System" : void 0)