@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.
@@ -0,0 +1,655 @@
1
+ import * as react from 'react';
2
+ import { ComponentType, ReactNode } from 'react';
3
+ import { t as AgentCatalogNavigate, v as AgentCatalogOpenPeek, n as AgentCatalog, A as AgentSummary, z as AgentCatalogState, f as AgentTab, i as AgentSortOption, E as AgentFavFilter, m as AgentArchFilter, k as AgentAccessFilter, h as AgentConsumerState, J as DefaultRowState } from '../../orchestra-BWJM2MWP.cjs';
4
+ export { O as OrchestraBadge, W as orchestraDelegatesLine, X as orchestraDepthLine, Y as orchestraLabel, Z as orchestraModeLabel } from '../../orchestra-BWJM2MWP.cjs';
5
+
6
+ /**
7
+ * The anchor a row renders for cmd/ctrl-click. DEFAULT (web): a plain `<a>` —
8
+ * which is a REAL, working link in every framework. A Next.js host passes
9
+ * `next/link`; a TanStack host passes its own `Link`. On React Native the
10
+ * default is a pressable `Text` that routes through `navigate`.
11
+ */
12
+ /**
13
+ * What a row's link handler receives. A DOM `React.MouseEvent` satisfies this
14
+ * structurally, and the native default link supplies the two methods itself —
15
+ * so a shared component can call `preventDefault()` on either platform
16
+ * without a platform check.
17
+ */
18
+ interface AgentCatalogLinkClickEvent {
19
+ metaKey?: boolean;
20
+ ctrlKey?: boolean;
21
+ preventDefault(): void;
22
+ stopPropagation(): void;
23
+ }
24
+ type AgentCatalogLinkComponent = ComponentType<{
25
+ href: string;
26
+ className?: string;
27
+ target?: string;
28
+ rel?: string;
29
+ title?: string;
30
+ "aria-label"?: string;
31
+ onClick?: (e: AgentCatalogLinkClickEvent) => void;
32
+ children: ReactNode;
33
+ }>;
34
+ /** Render a model id as whatever door the host has. DEFAULT: plain text. */
35
+ type AgentCatalogRenderModelRef = (args: {
36
+ modelId: string;
37
+ className?: string;
38
+ }) => ReactNode;
39
+ interface AgentCatalogUiPorts {
40
+ /** DEFAULT (web): `window.location.assign`. DEFAULT (native): a reporting no-op. */
41
+ navigate?: AgentCatalogNavigate;
42
+ /** DEFAULT: a plain `<a>` (web) / a pressable `Text` (native). */
43
+ LinkComponent?: AgentCatalogLinkComponent;
44
+ /** DEFAULT: the model id as plain text. */
45
+ renderModelRef?: AgentCatalogRenderModelRef;
46
+ /** ABSENT: the sneak-peek affordance is HIDDEN — never a dead button. */
47
+ openPeek?: AgentCatalogOpenPeek;
48
+ /**
49
+ * Portal container for the desktop popover, when the picker is mounted
50
+ * inside a dialog. DEFAULT: the document body (Radix's own default).
51
+ * Web only — the native entry ignores it.
52
+ */
53
+ popoverContainer?: HTMLElement | null;
54
+ }
55
+ /**
56
+ * The three defaults a PLATFORM supplies. Never a host concern: a host
57
+ * overrides an individual port through `AgentCatalogUiPorts`, and whatever it
58
+ * leaves unset falls back to the platform's own working answer.
59
+ */
60
+ interface AgentCatalogPlatformDefaults {
61
+ navigate: AgentCatalogNavigate;
62
+ LinkComponent: AgentCatalogLinkComponent;
63
+ renderModelRef: AgentCatalogRenderModelRef;
64
+ }
65
+ /** The headless catalog this tree is bound to. Throws with no provider. */
66
+ declare function useAgentCatalog(): AgentCatalog;
67
+ /** The UI ports this tree is bound to, with every default already applied. */
68
+ declare function useAgentCatalogUiPorts(): Required<Pick<AgentCatalogUiPorts, "navigate" | "LinkComponent" | "renderModelRef">> & {
69
+ openPeek: AgentCatalogOpenPeek | undefined;
70
+ popoverContainer: HTMLElement | null | undefined;
71
+ };
72
+ /**
73
+ * Subscribe to a slice of catalog state. `useSyncExternalStore` because the
74
+ * catalog is an external store and React 18/19 concurrency must not tear it.
75
+ * `select` MUST return a stable reference for unchanged state — every
76
+ * selector in `../selectors` does.
77
+ */
78
+ declare function useAgentCatalogState<T>(select: (state: AgentCatalogState) => T): T;
79
+ /** Every row currently in the catalogue, as one stable array. */
80
+ declare function useAgentCatalogRows(): AgentSummary[];
81
+
82
+ /**
83
+ * catalog/native/theme.ts — @ai-matrx/agents/catalog/native
84
+ *
85
+ * 🚨 C26 ON A PLATFORM WITH NO CSS. The web picker consumes colour ONLY
86
+ * through named semantic tokens (`--matrx-agent-*` plus the design system's
87
+ * `--primary`, `--muted-foreground`, …), and `catalog/styles.css` ships their
88
+ * DEFAULT VALUES so the picker renders correctly unthemed in a fresh app.
89
+ * React Native has no custom properties and no cascade, so the identical
90
+ * contract is expressed as a plain object: the package ships every default
91
+ * value, and a host re-brands by passing `theme` to `AgentCatalogProvider`.
92
+ *
93
+ * Every name below is the native twin of a token the web sheet defines, so a
94
+ * colour changed in one place is findable in the other. NOTHING in the native
95
+ * components hardcodes a colour — they read this object and nothing else.
96
+ */
97
+ /** The colour half of the contract. Every value is host-overridable. */
98
+ interface AgentCatalogNativeColors {
99
+ /** Sheet / list background. Web twin: `--background`. */
100
+ background: string;
101
+ /** Cards, inputs and chips sitting on the background. Web twin: `--muted`. */
102
+ surface: string;
103
+ /** A pressed/hovered row. Web twin: `bg-muted/50`. */
104
+ surfacePressed: string;
105
+ /** Primary text. Web twin: `--foreground`. */
106
+ text: string;
107
+ /** Secondary text. Web twin: `--muted-foreground`. */
108
+ textMuted: string;
109
+ /** Tertiary text (timestamps, hints). Web twin: `--muted-foreground/70`. */
110
+ textFaint: string;
111
+ /** Hairlines. Web twin: `--border`. */
112
+ border: string;
113
+ /** The accent. Web twin: `--primary`. */
114
+ primary: string;
115
+ /** Text ON the accent. Web twin: `--primary-foreground`. */
116
+ primaryForeground: string;
117
+ /** A tinted accent surface (active tab, badges). Web twin: `bg-primary/10`. */
118
+ primarySoft: string;
119
+ /** The favourite star. Web twin: `--matrx-agent-favorite`. */
120
+ favorite: string;
121
+ /** The drift banner. Web twins: `--matrx-agent-drift-{bg,fg,border}`. */
122
+ driftBackground: string;
123
+ driftForeground: string;
124
+ driftBorder: string;
125
+ }
126
+ interface AgentCatalogNativeTheme {
127
+ colors: AgentCatalogNativeColors;
128
+ /** Corner radii, in points. */
129
+ radius: {
130
+ sm: number;
131
+ md: number;
132
+ lg: number;
133
+ };
134
+ /** The one spacing scale the picker uses, in points. */
135
+ spacing: {
136
+ xs: number;
137
+ sm: number;
138
+ md: number;
139
+ lg: number;
140
+ };
141
+ /** Font sizes, in points. The web picker's 10/11/12/13px ladder. */
142
+ fontSize: {
143
+ xs: number;
144
+ sm: number;
145
+ md: number;
146
+ lg: number;
147
+ };
148
+ }
149
+ /**
150
+ * The DEFAULT theme, mirroring `catalog/styles.css` plus the dark palette the
151
+ * web picker inherits from the design system. Dark by default is deliberate:
152
+ * it is what every Matrx mobile surface renders, and a light host overrides
153
+ * `theme` rather than fighting a half-applied palette.
154
+ */
155
+ declare const DEFAULT_AGENT_CATALOG_NATIVE_THEME: AgentCatalogNativeTheme;
156
+ /**
157
+ * The light default, offered so a light host is one prop away rather than a
158
+ * fifteen-value object away. Values mirror `catalog/styles.css`'s `:root`.
159
+ */
160
+ declare const LIGHT_AGENT_CATALOG_NATIVE_THEME: AgentCatalogNativeTheme;
161
+ /** A host may override any subset; everything it omits keeps its default. */
162
+ type AgentCatalogNativeThemeOverride = {
163
+ colors?: Partial<AgentCatalogNativeColors>;
164
+ radius?: Partial<AgentCatalogNativeTheme["radius"]>;
165
+ spacing?: Partial<AgentCatalogNativeTheme["spacing"]>;
166
+ fontSize?: Partial<AgentCatalogNativeTheme["fontSize"]>;
167
+ };
168
+ /** Merge a host override onto a base theme. Pure; never mutates either. */
169
+ declare function resolveAgentCatalogNativeTheme(override?: AgentCatalogNativeThemeOverride, base?: AgentCatalogNativeTheme): AgentCatalogNativeTheme;
170
+
171
+ /** The resolved theme for this tree. Never throws — there is always a default. */
172
+ declare function useAgentCatalogNativeTheme(): AgentCatalogNativeTheme;
173
+ interface AgentCatalogNativeProviderProps extends AgentCatalogUiPorts {
174
+ catalog: AgentCatalog;
175
+ /**
176
+ * Brand overrides for the picker's token values (C26). Anything omitted
177
+ * keeps the shipped default, so an unthemed app still renders correctly.
178
+ */
179
+ theme?: AgentCatalogNativeThemeOverride;
180
+ children: ReactNode;
181
+ }
182
+ declare function AgentCatalogProvider({ catalog, theme, children, ...ports }: AgentCatalogNativeProviderProps): react.JSX.Element;
183
+
184
+ interface AgentPickerProps {
185
+ /** Unique consumer id for filter/tab state (see `useAgentConsumer`). */
186
+ consumerId: string;
187
+ /** THE ONLY CONTRACT BACK TO THE HOST (ruling D1). */
188
+ onSelect: (agentId: string) => void;
189
+ activeAgentId?: string | null;
190
+ /** Focus the search field on mount. Default false on native — a keyboard
191
+ * that opens with the sheet covers the list it was meant to filter. */
192
+ autoFocusSearch?: boolean;
193
+ /** Tab to open on. Admin surfaces that manage system agents pass `"system"`. */
194
+ initialTab?: AgentTab;
195
+ /** ADMIN variant: blend system agents into the "All" tab. */
196
+ includeSystemInAll?: boolean;
197
+ /** Restrict which ownership tabs this call site may reach. Enforced, not decorated. */
198
+ visibleTabs?: readonly AgentTab[];
199
+ /** Label override for the builtin-agent tab. Admin surfaces use "System". */
200
+ systemTabLabel?: string;
201
+ /** Show the host's active agent above the filtered list. Default true. */
202
+ showPinnedAgent?: boolean;
203
+ /** Hide records that are invalid for this call site. */
204
+ excludeAgentIds?: readonly string[];
205
+ /** Offer the mandate's live-resolved default agent at the top of the list. */
206
+ defaultMandateKey?: string;
207
+ /** Compact spacing for a short sheet. */
208
+ compact?: boolean;
209
+ /** Called after a selection, so a sheet shell can close itself. */
210
+ onAfterSelect?: () => void;
211
+ }
212
+ declare function AgentPickerBody({ consumerId, onSelect, activeAgentId, autoFocusSearch, initialTab, includeSystemInAll, visibleTabs, systemTabLabel, showPinnedAgent, excludeAgentIds, defaultMandateKey, compact, onAfterSelect, }: AgentPickerProps): react.JSX.Element;
213
+
214
+ interface AgentListSheetProps extends AgentPickerProps {
215
+ /**
216
+ * Heading above the picker. Omit it when the host's sheet chrome already
217
+ * prints one — two titles is worse than none.
218
+ */
219
+ title?: string;
220
+ }
221
+ declare function AgentListSheet({ title, ...props }: AgentListSheetProps): react.JSX.Element;
222
+
223
+ type AgentListInlinePickerProps = AgentPickerProps;
224
+ declare function AgentListInlinePicker(props: AgentListInlinePickerProps): react.JSX.Element;
225
+
226
+ /**
227
+ * catalog/shared/useAgentConsumer.ts — VERBATIM port of matrx-frontend
228
+ * `features/agents/hooks/useAgentConsumer.ts`.
229
+ *
230
+ * Wraps a single consumer slot identified by `consumerId`. Registers the slot
231
+ * on mount, optionally unregisters on unmount, and returns every filter/sort/
232
+ * pagination value plus stable write helpers.
233
+ *
234
+ * Two seams inverted, nothing else:
235
+ * - `useAppSelector`/`useAppDispatch` → `useAgentCatalog()` + the store's
236
+ * own methods.
237
+ * - `useServerAgentSearch` (a separate frontend hook) is folded IN, because
238
+ * it was already wired here and nowhere else: EVERY agent surface that
239
+ * uses a consumer searches the full server-side set. A local-only search
240
+ * over a paginated list reports "no results" for agents that were merely
241
+ * never fetched — a wrong answer, not a missing feature.
242
+ */
243
+
244
+ interface UseAgentConsumerReturn {
245
+ tab: AgentTab;
246
+ sortBy: AgentSortOption;
247
+ searchTerm: string;
248
+ includedCats: string[];
249
+ includedTags: string[];
250
+ favFilter: AgentFavFilter;
251
+ archFilter: AgentArchFilter;
252
+ accessFilter: AgentAccessFilter;
253
+ favoritesFirst: boolean;
254
+ listPage: number;
255
+ sharedPage: number;
256
+ /** The whole slot, for the selectors that take a consumer state. */
257
+ state: AgentConsumerState;
258
+ /** True if any filter differs from its default value. */
259
+ hasActiveFilters: boolean;
260
+ /** Tier 2 search — also match against agent prompt content. */
261
+ deepSearch: boolean;
262
+ /** True while a server-side search is in flight. */
263
+ isServerSearching: boolean;
264
+ setSearchTerm: (value: string) => void;
265
+ setDeepSearch: (value: boolean) => void;
266
+ setSortBy: (value: AgentSortOption) => void;
267
+ setTab: (value: AgentTab) => void;
268
+ setFavFilter: (value: AgentFavFilter) => void;
269
+ setArchFilter: (value: AgentArchFilter) => void;
270
+ setAccessFilter: (value: AgentAccessFilter) => void;
271
+ /** Add category to inclusion set; if already present, remove (toggle). */
272
+ toggleCategory: (cat: string) => void;
273
+ /** Add tag to inclusion set; if already present, remove (toggle). */
274
+ toggleTag: (tag: string) => void;
275
+ /**
276
+ * Replace the WHOLE category inclusion set in one write.
277
+ *
278
+ * Prefer this over looping `toggleCategory` whenever more than one value
279
+ * changes. Each `toggleCategory` call computes its next array from the
280
+ * `includedCats` captured in the CURRENT render, so two toggles fired in the
281
+ * same tick both start from the same snapshot and the second one's patch
282
+ * overwrites the first — a "Clear filter" click with three categories active
283
+ * removes only one. One write of the final set cannot drift that way.
284
+ */
285
+ setIncludedCats: (next: string[]) => void;
286
+ /** Replace the WHOLE tag inclusion set in one write. See setIncludedCats. */
287
+ setIncludedTags: (next: string[]) => void;
288
+ toggleFavoritesFirst: () => void;
289
+ loadMoreList: () => void;
290
+ loadMoreShared: () => void;
291
+ resetFilters: () => void;
292
+ }
293
+ declare function useAgentConsumer(consumerId: string, options?: {
294
+ /** Delete the slot on unmount. Default false — persistent consumers keep state. */
295
+ unregisterOnUnmount?: boolean;
296
+ /** Applied only when the consumer is first registered (idempotent). */
297
+ initialTab?: AgentTab;
298
+ }): UseAgentConsumerReturn;
299
+
300
+ /**
301
+ * The four ownership counts a tab strip prints. Declared HERE, beside the code
302
+ * that computes them, so both the web tab strip and the native one name the
303
+ * same shape (0.9.0 — it used to live in the web-only `AgentListTabs`).
304
+ */
305
+ interface AgentListTabCounts {
306
+ mine: number;
307
+ shared: number;
308
+ all: number;
309
+ system: number;
310
+ }
311
+ interface AgentListCoreOptions {
312
+ consumerId: string;
313
+ onSelect?: (agentId: string) => void;
314
+ navigateTo?: string;
315
+ /** Route-scoped agent id (chat/builder headers). `undefined` = nothing pinned. */
316
+ activeAgentIdOverride?: string | null;
317
+ /**
318
+ * Tab this surface opens on, applied once on first mount. Admin surfaces
319
+ * that manage system agents pass `"system"`. When omitted the normal
320
+ * user heuristic applies (a user with no agents of their own lands on the
321
+ * public/system catalogue).
322
+ */
323
+ initialTab?: AgentTab;
324
+ /**
325
+ * ADMIN reading of the "All" tab: blend system agents into it instead of
326
+ * keeping them to their own tab. See `makeSelectFilteredAgents`.
327
+ */
328
+ includeSystemInAll?: boolean;
329
+ /**
330
+ * 🚨 THE OWNERSHIP TABS THIS CALL SITE MAY REACH — a HARD restriction, not a
331
+ * default.
332
+ *
333
+ * `AgentListTabs` already hides the buttons this list omits, but hiding a
334
+ * button never emptied the list behind it: the active tab lives in the
335
+ * consumer's REMEMBERED state, and `initialTab` is applied exactly once per
336
+ * mount (`defaultTabAppliedRef`). So a person who had been on "Mine" and
337
+ * then moved a control that narrows the picker got the personal catalogue
338
+ * with the tab bar removed — the forbidden list, and no way to see that it
339
+ * was forbidden. That is the defect Arman named on the mandate binding
340
+ * screen's global rung (VISION-RECONCILIATION D2, 2026-08-31: the picker
341
+ * opened on "Mine · 40").
342
+ *
343
+ * Given here, the tab is COERCED into the allowed set on every change of it,
344
+ * not just at mount — so a restriction that arrives later is enforced later.
345
+ */
346
+ visibleTabs?: readonly AgentTab[];
347
+ /** Hide records that are invalid for this call site. */
348
+ excludeAgentIds?: readonly string[];
349
+ /**
350
+ * Show the platform DEFAULT agent for this mandate key at the top of the
351
+ * list, resolved live through the server (never a hardcoded name). Requires
352
+ * the catalog to have been built with a `transport`.
353
+ */
354
+ defaultMandateKey?: string;
355
+ }
356
+ /**
357
+ * How long the hover-preview detail panel stays open after the cursor leaves
358
+ * an agent row (or the panel itself) before it closes. Generous on purpose:
359
+ * the panel renders to the side of the list, so the user needs ample time to
360
+ * travel the cursor across the gap to reach it without it vanishing. Paired
361
+ * with a reserved, non-resizing popover width so the target never moves.
362
+ */
363
+ declare const HOVER_GRACE_MS = 900;
364
+ /**
365
+ * THE RULE, ALONE AND TESTABLE: which tab a restricted picker must land on.
366
+ *
367
+ * Returns `null` when the current tab is already allowed (nothing to do), and
368
+ * otherwise the tab to switch to — `initialTab` when that is itself allowed,
369
+ * else the first allowed tab.
370
+ */
371
+ declare function coerceVisibleTab(current: AgentTab, allowed: readonly AgentTab[], initialTab?: AgentTab): AgentTab | null;
372
+ declare function useAgentListCore({ consumerId, onSelect, navigateTo, activeAgentIdOverride, initialTab, includeSystemInAll, visibleTabs, excludeAgentIds, defaultMandateKey, }: AgentListCoreOptions): {
373
+ agents: AgentSummary[];
374
+ isLoading: boolean;
375
+ activeAgentId: string | null;
376
+ pinnedAgent: AgentSummary | null;
377
+ defaultRow: DefaultRowState | null;
378
+ allCategories: string[];
379
+ allTags: string[];
380
+ consumer: UseAgentConsumerReturn;
381
+ tabCounts: AgentListTabCounts;
382
+ activeFilterCount: number;
383
+ hoveredAgent: AgentSummary | null;
384
+ setHoveredAgent: react.Dispatch<react.SetStateAction<AgentSummary | null>>;
385
+ ensureLoaded: () => void;
386
+ handleSelectAgent: (agent: AgentSummary) => void;
387
+ handleAgentHover: (agent: AgentSummary, panelOpen: boolean) => void;
388
+ handleAgentHoverEnd: (agent: AgentSummary, onClear: () => void) => void;
389
+ handleDetailPanelMouseEnter: () => void;
390
+ handleDetailPanelMouseLeave: (onClear: () => void) => void;
391
+ };
392
+
393
+ interface AgentListContentProps {
394
+ agents: AgentSummary[];
395
+ isLoading: boolean;
396
+ consumer: UseAgentConsumerReturn;
397
+ activeAgentId: string | null;
398
+ allCategories: string[];
399
+ allTags: string[];
400
+ onSelectAgent: (agent: AgentSummary) => void;
401
+ onDetailPress: (agent: AgentSummary) => void;
402
+ onFilterChipPress: (panel: "sort" | "categories" | "tags") => void;
403
+ onReset: () => void;
404
+ activeFilterCount: number;
405
+ tabCounts: AgentListTabCounts;
406
+ visibleTabs?: readonly AgentTab[] | undefined;
407
+ systemTabLabel?: string | undefined;
408
+ pinnedAgent?: AgentSummary | null | undefined;
409
+ defaultRow?: DefaultRowState | null | undefined;
410
+ autoFocusSearch?: boolean;
411
+ }
412
+ declare function AgentListContent({ agents, isLoading, consumer, activeAgentId, allCategories, allTags, onSelectAgent, onDetailPress, onFilterChipPress, onReset, activeFilterCount, tabCounts, visibleTabs, systemTabLabel, pinnedAgent, defaultRow, autoFocusSearch, }: AgentListContentProps): react.JSX.Element;
413
+
414
+ interface AgentListTabsProps {
415
+ consumer: UseAgentConsumerReturn;
416
+ tabCounts: AgentListTabCounts;
417
+ visibleTabs?: readonly AgentTab[] | undefined;
418
+ /** Label for the builtin tab. Users see "Public"; admin surfaces "System". */
419
+ systemTabLabel?: string | undefined;
420
+ }
421
+ declare function AgentListTabs({ consumer, tabCounts, visibleTabs, systemTabLabel, }: AgentListTabsProps): react.JSX.Element;
422
+
423
+ interface AgentFilterBarProps {
424
+ consumer: UseAgentConsumerReturn;
425
+ allCategories: string[];
426
+ allTags: string[];
427
+ activeFilterCount: number;
428
+ onFilterChipPress: (panel: "sort" | "categories" | "tags") => void;
429
+ onReset: () => void;
430
+ }
431
+ declare function AgentFilterBar({ consumer, allCategories, allTags, activeFilterCount, onFilterChipPress, onReset, }: AgentFilterBarProps): react.JSX.Element;
432
+
433
+ interface AgentRowProps {
434
+ agent: AgentSummary;
435
+ isActive: boolean;
436
+ onPress: () => void;
437
+ onDetailPress: () => void;
438
+ }
439
+ declare function AgentRow({ agent, isActive, onPress, onDetailPress, }: AgentRowProps): react.JSX.Element;
440
+
441
+ interface AgentDetailCardProps {
442
+ agent: AgentSummary;
443
+ onSelect: () => void;
444
+ }
445
+ declare function AgentDetailCard({ agent, onSelect }: AgentDetailCardProps): react.JSX.Element;
446
+
447
+ type AgentSubViewName = "sort" | "categories" | "tags";
448
+ interface AgentSubViewProps {
449
+ view: AgentSubViewName;
450
+ consumer: UseAgentConsumerReturn;
451
+ allCategories: string[];
452
+ allTags: string[];
453
+ search: string;
454
+ setSearch: (value: string) => void;
455
+ onBack: () => void;
456
+ }
457
+ declare function AgentSubView({ view, consumer, allCategories, allTags, search, setSearch, onBack, }: AgentSubViewProps): react.JSX.Element;
458
+
459
+ /**
460
+ * catalog/native/FavoriteAgentButton.tsx — the native twin of
461
+ * `catalog/react/FavoriteAgentButton.tsx`. Same one write
462
+ * (`catalog.setFavorite`, optimistic and rolled back by the store), same
463
+ * ownership rule: a row you do not own cannot be favourited, and the control
464
+ * says so instead of silently doing nothing.
465
+ */
466
+ interface FavoriteAgentButtonProps {
467
+ id: string;
468
+ size?: number;
469
+ disabled?: boolean;
470
+ }
471
+ declare function FavoriteAgentButton({ id, size, disabled, }: FavoriteAgentButtonProps): react.JSX.Element;
472
+
473
+ declare const SHAPES: {
474
+ star: {
475
+ paths: string[];
476
+ fillable: true;
477
+ };
478
+ chevronRight: {
479
+ paths: string[];
480
+ };
481
+ chevronDown: {
482
+ paths: string[];
483
+ };
484
+ search: {
485
+ paths: string[];
486
+ circles: {
487
+ cx: number;
488
+ cy: number;
489
+ r: number;
490
+ }[];
491
+ };
492
+ x: {
493
+ paths: string[];
494
+ };
495
+ check: {
496
+ paths: string[];
497
+ };
498
+ arrowUpDown: {
499
+ paths: string[];
500
+ };
501
+ folder: {
502
+ paths: string[];
503
+ };
504
+ tag: {
505
+ paths: string[];
506
+ circles: {
507
+ cx: number;
508
+ cy: number;
509
+ r: number;
510
+ filled: true;
511
+ }[];
512
+ };
513
+ rotateCcw: {
514
+ paths: string[];
515
+ };
516
+ loader: {
517
+ paths: string[];
518
+ };
519
+ alertTriangle: {
520
+ paths: string[];
521
+ };
522
+ /**
523
+ * The Orchestra marker (Lucide `music-4`): the glyph the Workflow Studio's
524
+ * picker used for a conductor, kept identical so the same agent wears the
525
+ * same mark in every client.
526
+ */
527
+ music4: {
528
+ paths: string[];
529
+ circles: {
530
+ cx: number;
531
+ cy: number;
532
+ r: number;
533
+ }[];
534
+ };
535
+ clock: {
536
+ paths: string[];
537
+ circles: {
538
+ cx: number;
539
+ cy: number;
540
+ r: number;
541
+ }[];
542
+ };
543
+ globe: {
544
+ paths: string[];
545
+ circles: {
546
+ cx: number;
547
+ cy: number;
548
+ r: number;
549
+ }[];
550
+ };
551
+ users: {
552
+ paths: string[];
553
+ circles: {
554
+ cx: number;
555
+ cy: number;
556
+ r: number;
557
+ }[];
558
+ };
559
+ externalLink: {
560
+ paths: string[];
561
+ };
562
+ messageCircle: {
563
+ paths: string[];
564
+ };
565
+ rocket: {
566
+ paths: string[];
567
+ };
568
+ circleCheck: {
569
+ paths: string[];
570
+ circles: {
571
+ cx: number;
572
+ cy: number;
573
+ r: number;
574
+ }[];
575
+ };
576
+ };
577
+ type AgentCatalogIconName = keyof typeof SHAPES;
578
+
579
+ /** The `react-native-svg` surface this package uses, structurally. */
580
+ interface SvgModuleLike {
581
+ default: unknown;
582
+ Svg?: unknown;
583
+ Path: unknown;
584
+ Circle: unknown;
585
+ }
586
+ /** Test seam: forget the probe so a test can exercise both paths. */
587
+ declare function _resetNativeIconState(svg?: SvgModuleLike | null): void;
588
+ /**
589
+ * Resolve `react-native-svg` once. Kept inside a function (not at module
590
+ * scope) so importing this file never throws in an environment that has no
591
+ * such module — an import-time throw would take the whole picker down instead
592
+ * of degrading it.
593
+ */
594
+ declare function resolveSvgModule(): SvgModuleLike | null;
595
+ /**
596
+ * The degradation announcement. Fires ONCE per process, with the remedy.
597
+ * `report` is the catalog's own `errorSink` — the picker passes it down so
598
+ * this file never reaches for a console of its own.
599
+ */
600
+ declare function announceMissingSvgOnce(report: (event: {
601
+ code: string;
602
+ message: string;
603
+ context?: object;
604
+ }) => void): void;
605
+ interface AgentIconProps {
606
+ name: AgentCatalogIconName;
607
+ /** Points. Default 14 — the web picker's `w-3.5`. */
608
+ size?: number;
609
+ color: string;
610
+ /** Paint the shape (the favourite star's "on" state). */
611
+ filled?: boolean;
612
+ /**
613
+ * Where the degradation is reported. REQUIRED so nothing here can fail
614
+ * silently; every call site already holds the catalog's `errorSink`.
615
+ */
616
+ report: (event: {
617
+ code: string;
618
+ message: string;
619
+ context?: object;
620
+ }) => void;
621
+ }
622
+ /**
623
+ * ONE icon component. `name` picks the shape from the shared path table, so
624
+ * the native picker can never wear a glyph the web picker does not have.
625
+ */
626
+ declare function AgentIcon({ name, size, color, filled, report, }: AgentIconProps): react.JSX.Element;
627
+
628
+ declare function SearchInput({ value, onChange, placeholder, autoFocus, }: {
629
+ value: string;
630
+ onChange: (v: string) => void;
631
+ placeholder: string;
632
+ autoFocus?: boolean;
633
+ }): react.JSX.Element;
634
+ declare function FilterChip({ icon, label, active, onPress, }: {
635
+ icon: AgentCatalogIconName;
636
+ label: string;
637
+ active: boolean;
638
+ onPress: () => void;
639
+ }): react.JSX.Element;
640
+ declare function OptionRow({ label, selected, onPress, }: {
641
+ label: string;
642
+ selected: boolean;
643
+ onPress: () => void;
644
+ }): react.JSX.Element;
645
+ declare function CheckRow({ label, checked, onPress, }: {
646
+ label: string;
647
+ checked: boolean;
648
+ onPress: () => void;
649
+ }): react.JSX.Element;
650
+ declare function SidePanelHeader({ title, onClose, }: {
651
+ title: string;
652
+ onClose: () => void;
653
+ }): react.JSX.Element;
654
+
655
+ export { type AgentCatalogIconName, type AgentCatalogLinkComponent, type AgentCatalogNativeColors, type AgentCatalogNativeProviderProps, type AgentCatalogNativeTheme, type AgentCatalogNativeThemeOverride, type AgentCatalogPlatformDefaults, AgentCatalogProvider, type AgentCatalogRenderModelRef, type AgentCatalogUiPorts, AgentDetailCard, type AgentDetailCardProps, AgentFilterBar, type AgentFilterBarProps, AgentIcon, type AgentIconProps, AgentListContent, type AgentListContentProps, type AgentListCoreOptions, AgentListInlinePicker, type AgentListInlinePickerProps, AgentListSheet, type AgentListSheetProps, type AgentListTabCounts, AgentListTabs, type AgentListTabsProps, AgentPickerBody, type AgentPickerProps, AgentRow, type AgentRowProps, AgentSubView, type AgentSubViewName, type AgentSubViewProps, CheckRow, DEFAULT_AGENT_CATALOG_NATIVE_THEME, FavoriteAgentButton, type FavoriteAgentButtonProps, FilterChip, HOVER_GRACE_MS, LIGHT_AGENT_CATALOG_NATIVE_THEME, OptionRow, SearchInput, SidePanelHeader, type UseAgentConsumerReturn, _resetNativeIconState, announceMissingSvgOnce, coerceVisibleTab, resolveAgentCatalogNativeTheme, resolveSvgModule, useAgentCatalog, useAgentCatalogNativeTheme, useAgentCatalogRows, useAgentCatalogState, useAgentCatalogUiPorts, useAgentConsumer, useAgentListCore };