Skip to content

The agent that grows with you

feat(desktop): install with +, switch once installed; tier badges on the install dialog (#142708)

Austin Pickett92663ae8054a
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-add-button.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-add-button.tsx
new file mode 100644
index 00000000000..e4b54f951e5
--- /dev/null
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-add-button.tsx
@@ -0,0 +1,43 @@
+import { Button } from '@/components/ui/button'
+import { Tip } from '@/components/ui/tooltip'
+import { useI18n } from '@/i18n'
+import { Check, Loader2, Plus } from '@/lib/icons'
+
+interface CatalogAddButtonProps {
+ name: string
+ installed: boolean
+ installing: boolean
+ disabled: boolean
+ onInstall: () => void
+ /** Hero cards and the detail have room: "+ Install" instead of a bare +. */
+ labeled?: boolean
+}
+
+/** Install is one-way, so it is a button, not a switch: + installs, then the
+ * owner's on/off switch and ⋯ menu take the slot. The check only shows as a
+ * fallback for installed entries whose owner renders no switch. */
+export function CatalogAddButton({ name, installed, installing, disabled, onInstall, labeled }: CatalogAddButtonProps) {
+ const { t } = useI18n()
+
+ // The labeled form says "Install" on its face, so its accessible name and
+ // tooltip-free look match; the bare + keeps the "Add <name>" tooltip.
+ const label = labeled
+ ? `${installed ? t.catalog.installed : t.catalog.install} ${name}`
+ : `${installed ? t.catalog.added : t.catalog.add} ${name}`
+
+ const button = (
+ <Button
+ aria-busy={installing}
+ aria-label={label}
+ disabled={disabled || installing || installed}
+ onClick={onInstall}
+ size={labeled ? 'xs' : 'icon-xs'}
+ variant={labeled ? 'outline' : 'ghost'}
+ >
+ {installing ? <Loader2 className="animate-spin text-(--ui-text-tertiary)" /> : installed ? <Check /> : <Plus />}
+ {labeled && (installing ? t.catalog.installing : installed ? t.catalog.installed : t.catalog.install)}
+ </Button>
+ )
+
+ return labeled ? button : <Tip label={label}>{button}</Tip>
+}
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-browser.test.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-browser.test.tsx
index efdc090e075..da5464be51f 100644
--- a/apps/desktop/src/app/capabilities/catalog/catalog-browser.test.tsx
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-browser.test.tsx
@@ -66,21 +66,19 @@ const card = (name: string) =>
screen.getAllByRole('article').find(article => within(article).queryByRole('button', { name }))!
describe.each(['skills', 'plugins'] as const)('%s catalog layouts', kind => {
- it('defaults to cards, with installed entries already switched on', () => {
+ it('defaults to cards, with installed entries marked added', () => {
const { container } = setup(kind)
expect(screen.getAllByRole('article')).toHaveLength(2)
expect(container.querySelector('[data-catalog-list]')).toBeNull()
expect(screen.getByRole('button', { name: 'List view' })).toBeTruthy()
- expect(
- within(card('beta')).getByRole<HTMLButtonElement>('switch', { name: 'Added beta' }).getAttribute('aria-checked')
- ).toBe('true')
+ expect(within(card('beta')).getByRole<HTMLButtonElement>('button', { name: 'Added beta' }).disabled).toBe(true)
})
- it('installs from the card switch without opening its details', () => {
+ it('installs from the card + without opening its details', () => {
const { entries, onInstall } = setup(kind)
- fireEvent.click(within(card('alpha')).getByRole('switch', { name: 'Add alpha' }))
+ fireEvent.click(within(card('alpha')).getByRole('button', { name: 'Install alpha' }))
expect(onInstall).toHaveBeenCalledExactlyOnceWith(entries[0])
expect(screen.queryByRole('dialog')).toBeNull()
@@ -93,7 +91,7 @@ describe.each(['skills', 'plugins'] as const)('%s catalog layouts', kind => {
expect(within(dialog).getByRole('link', { name: 'Repository' }).getAttribute('href')).toBe(entries[0].sourceUrl)
expect(within(dialog).getByRole('link', { name: 'Documentation' }).getAttribute('href')).toBe(entries[0].docsUrl)
- fireEvent.click(within(dialog).getByRole('switch', { name: 'Add alpha' }))
+ fireEvent.click(within(dialog).getByRole('button', { name: 'Install alpha' }))
expect(onInstall).toHaveBeenCalledExactlyOnceWith(entries[0])
if (kind === 'plugins') {
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx
index 569a6515b19..4fb96201120 100644
--- a/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-browser.tsx
@@ -15,6 +15,7 @@ import { DetailColumn, ListColumn, MasterDetail } from '../../master-detail'
import { PanelEmpty } from '../../overlays/panel'
import { CapabilitySearch } from '../ui/capability-search'
+import { CatalogAddButton } from './catalog-add-button'
import { CatalogAlert } from './catalog-alert'
import { CatalogCard, type CatalogCardVariant } from './catalog-card'
import { type CatalogEntry, type CatalogKind, useCatalog } from './catalog-data'
@@ -22,7 +23,6 @@ import { CatalogDetail } from './catalog-detail'
import { CatalogDetailDialog } from './catalog-detail-dialog'
import { CatalogDiscovery } from './catalog-discovery'
import { CatalogFilterBar } from './catalog-filter-bar'
-import { CatalogInstallSwitch } from './catalog-install-switch'
import { CatalogListRow } from './catalog-list-row'
import { CATALOG_POINTER_ENABLED, trackCatalogPointer } from './catalog-pointer'
import {
@@ -113,6 +113,7 @@ function CatalogEntryInstall({
installedPending,
installing,
kind,
+ labeled,
onInstall
}: {
entry: CatalogEntry
@@ -120,13 +121,15 @@ function CatalogEntryInstall({
installedPending: boolean
installing: boolean
kind: CatalogKind
+ labeled?: boolean
onInstall: () => void
}) {
return (
- <CatalogInstallSwitch
+ <CatalogAddButton
disabled={installedPending || installed || (kind === 'skills' && !entry.installIdentifier)}
installed={installed}
installing={installing}
+ labeled={labeled}
name={entry.name}
onInstall={onInstall}
/>
@@ -387,8 +390,9 @@ export const CatalogBrowser = memo(function CatalogBrowser({
setDetailOpen(true)
}
- // Installed entries get the owner's on/off switch; the rest install one-way.
- const entryAction = (entry: CatalogEntry) =>
+ // Installed entries get the owner's switch + ⋯ menu; the rest get a one-way +.
+ // Hero cards and the detail have room to spell it out: "+ Install".
+ const entryAction = (entry: CatalogEntry, labeled?: boolean) =>
renderInstalledAction?.(entry) || (
<CatalogEntryInstall
entry={entry}
@@ -396,6 +400,7 @@ export const CatalogBrowser = memo(function CatalogBrowser({
installedPending={Boolean(installedPending)}
installing={isInstalling?.(entry) ?? false}
kind={kind}
+ labeled={labeled}
onInstall={() => {
if (kind === 'plugins') {
setDetailOpen(false)
@@ -409,7 +414,7 @@ export const CatalogBrowser = memo(function CatalogBrowser({
const card = (entry: CatalogEntry, accentIndex: number, variant: CatalogCardVariant = 'default', placement?: React.CSSProperties) => (
<CatalogCard
accentIndex={accentIndex}
- action={entryAction(entry)}
+ action={entryAction(entry, variant === 'hero')}
entry={entry}
key={entry.id}
onCategory={filters.chooseCategory}
@@ -423,7 +428,7 @@ export const CatalogBrowser = memo(function CatalogBrowser({
const details = selected ? (
<CatalogDetail
- action={entryAction(selected)}
+ action={entryAction(selected, true)}
dialog={cardView}
entry={selected}
kind={kind}
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx
index a9b774c7cc1..0cac15d1f9d 100644
--- a/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx
+++ b/apps/desktop/src/app/capabilities/catalog/catalog-card.tsx
@@ -85,7 +85,7 @@ function CatalogCardFooter({ entry, action, hero }: { entry: CatalogEntry; actio
<CatalogHeaderMeta entry={entry} />
<span className="flex shrink-0 items-center gap-3">
<CatalogRating entry={entry} />
- {hero && <span className="catalog-hero-action relative shrink-0">{action}</span>}
+ {hero && <span className="catalog-hero-action relative z-10 shrink-0">{action}</span>}
</span>
</div>
)
@@ -107,7 +107,9 @@ export function CatalogCard({ entry, action, accentIndex, onOpen, onCategory, on
{showsCardImage(entry) && <CatalogImage className="catalog-card-image aspect-[2/1]" key={entry.imageUrl!} src={entry.imageUrl!} />}
{variant !== 'default' && <div className="catalog-card-topline">
<span className="min-w-0 truncate" title={entry.author || catalogLabel(entry.source)}>{entry.author || catalogLabel(entry.source)}</span>
- {variant !== 'hero' && <span className="relative shrink-0">{action}</span>}
+ {/* z-10: this slot precedes the title button, whose card-wide ::after
+ would otherwise paint over it and swallow the click. */}
+ {variant !== 'hero' && <span className="relative z-10 shrink-0">{action}</span>}
</div>}
<div className="catalog-card-copy flex min-h-0 w-full flex-col gap-2 p-3">
<div className="flex min-w-0 items-center gap-2.5">
diff --git a/apps/desktop/src/app/capabilities/catalog/catalog-install-switch.tsx b/apps/desktop/src/app/capabilities/catalog/catalog-install-switch.tsx
deleted file mode 100644
index d1abfa71d6d..00000000000
--- a/apps/desktop/src/app/capabilities/catalog/catalog-install-switch.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import { Switch } from '@/components/ui/switch'
-import { Tip } from '@/components/ui/tooltip'
-import { useI18n } from '@/i18n'
-import { Loader2 } from '@/lib/icons'
-
-interface CatalogInstallSwitchProps {
- name: string
- installed: boolean
- installing: boolean
- disabled: boolean
- onInstall: () => void
-}
-
-/** Turning it on installs. Installed entries normally show their owner's on/off
- * switch instead; this one only stays checked (and disabled) as a fallback. */
-export function CatalogInstallSwitch({ name, installed, installing, disabled, onInstall }: CatalogInstallSwitchProps) {
- const { t } = useI18n()
- const label = `${installed ? t.catalog.added : t.catalog.add} ${name}`
-
- return (
- <Tip label={label}>
- <span className="inline-flex items-center gap-2">
- {installing && <Loader2 className="size-3 animate-spin text-(--ui-text-tertiary)" />}
- <span className="text-xs text-(--ui-text-secondary)">{installed ? t.catalog.added : t.catalog.add}</span>
- <Switch
- aria-busy={installing}
- aria-label={label}
- checked={installed}
- disabled={disabled || installing}
- onCheckedChange={checked => checked && onInstall()}
- size="xs"
- />
- </span>
- </Tip>
- )
-}
diff --git a/apps/desktop/src/app/capabilities/index.test.tsx b/apps/desktop/src/app/capabilities/index.test.tsx
index e60d824f847..a65005961d1 100644
--- a/apps/desktop/src/app/capabilities/index.test.tsx
+++ b/apps/desktop/src/app/capabilities/index.test.tsx
@@ -286,10 +286,10 @@ describe('CapabilitiesView toolset management', { timeout: 60_000 }, () => {
)
await screen.findByRole('switch', { name: 'web-research' })
- expect(screen.getByRole<HTMLButtonElement>('switch', { name: 'Added web-research' }).disabled).toBe(true)
- expect(screen.queryByRole('switch', { name: 'Add web-research' })).toBeNull()
+ expect(screen.getByRole<HTMLButtonElement>('button', { name: 'Installed web-research' }).disabled).toBe(true)
+ expect(screen.queryByRole('button', { name: 'Add web-research' })).toBeNull()
const available = screen.getByRole('button', { name: 'gif-search' }).closest('article')!
- fireEvent.click(within(available).getByRole('switch', { name: 'Add gif-search' }))
+ fireEvent.click(within(available).getByRole('button', { name: 'Add gif-search' }))
await waitFor(() =>
expect(installHubSkill).toHaveBeenCalledExactlyOnceWith('official/gifs/gif-search', {
connectionId: 'homelab',
@@ -437,7 +437,7 @@ describe('CapabilitiesView toolset management', { timeout: 60_000 }, () => {
}
})
- it('lists the built-in optional-skills catalog with Add switches that route through the hub pipeline', async () => {
+ it('lists the built-in optional-skills catalog with Add buttons that route through the hub pipeline', async () => {
// Official optional skills merge into the same catalog as installed ones;
// an uninstalled row carries an Add switch that routes through the hub
// action pipeline scoped to the Capabilities profile. A name collision with
@@ -495,10 +495,10 @@ describe('CapabilitiesView toolset management', { timeout: 60_000 }, () => {
// The row settles once installed skills load (the discovery hero can change
// as they merge in), so act on the live, enabled switch.
- await screen.findByRole('switch', { name: 'Add gif-search' })
+ await screen.findByRole('button', { name: 'Add gif-search' })
const install = await waitFor(() => {
- const row = screen.getByRole<HTMLButtonElement>('switch', { name: 'Add gif-search' })
+ const row = screen.getByRole<HTMLButtonElement>('button', { name: 'Add gif-search' })
expect(row.disabled).toBe(false)
@@ -506,8 +506,8 @@ describe('CapabilitiesView toolset management', { timeout: 60_000 }, () => {
})
expect(screen.getByRole('switch', { name: 'web-research' })).toBeTruthy()
- expect(screen.queryByRole('switch', { name: 'Add web-research' })).toBeNull()
- expect(screen.getByRole<HTMLButtonElement>('switch', { name: 'Added ascii-art' }).disabled).toBe(true)
+ expect(screen.queryByRole('button', { name: 'Add web-research' })).toBeNull()
+ expect(screen.getByRole<HTMLButtonElement>('button', { name: 'Added ascii-art' }).disabled).toBe(true)
await act(async () => {
fireEvent.click(install)
@@ -552,7 +552,7 @@ describe('CapabilitiesView toolset management', { timeout: 60_000 }, () => {
// The feed settles first; then only the installed row keeps the name,
// while the distinct community skill stays installable.
- await screen.findByRole('switch', { name: 'Add gif-search' })
+ await screen.findByRole('button', { name: 'Add gif-search' })
expect(screen.getAllByRole('button', { name: 'docx' })).toHaveLength(1)
})
})
diff --git a/apps/desktop/src/app/capabilities/plugins/plugins-tab.test.tsx b/apps/desktop/src/app/capabilities/plugins/plugins-tab.test.tsx
index d4cae460088..120411f01b0 100644
--- a/apps/desktop/src/app/capabilities/plugins/plugins-tab.test.tsx
+++ b/apps/desktop/src/app/capabilities/plugins/plugins-tab.test.tsx
@@ -297,6 +297,31 @@ describe('PluginsTab', () => {
})
})
+ it('badges "Install here" with the catalog tier of the package it came from', async () => {
+ seedCatalog([{ ...weatherEntry, name: 'hermes-media-studio', tier: 'official' }])
+ $pluginRecords.set({
+ media: {
+ id: 'media',
+ name: 'Media Studio',
+ kind: 'disk',
+ status: 'loaded',
+ packageName: 'hermes-media-studio',
+ packageOrigin: {
+ catalogName: 'hermes-media-studio',
+ repo: 'https://github.com/NousResearch/hermes-media-studio.git',
+ sha: 'abc'
+ }
+ }
+ })
+
+ renderPlugins({ profile: 'workbot', scopeLabel: 'workbot' })
+ screen.getByRole('button', { name: 'Install here' }).click()
+
+ await waitFor(() => {
+ expect($pluginInstallRequest.get()).toMatchObject({ catalogName: 'hermes-media-studio', tier: 'official' })
+ })
+ })
+
it('disables "Install here" when the package has no known origin (hand-copied folder)', () => {
$pluginRecords.set({
media: { id: 'media', name: 'Media Studio', kind: 'disk', status: 'loaded', packageName: 'hermes-media-studio' }
@@ -326,7 +351,7 @@ describe('PluginsTab', () => {
await selectCatalogEntry(weatherEntry.name)
expect($pluginInstallRequest.get()).toBeNull()
- fireEvent.click(screen.getByRole('switch', { name: `Add ${weatherEntry.name}` }))
+ fireEvent.click(screen.getByRole('button', { name: `Install ${weatherEntry.name}` }))
expect($pluginInstallRequest.get()).toMatchObject({
catalogName: weatherEntry.name,
@@ -471,7 +496,7 @@ describe('PluginsTab', () => {
renderPlugins({ profile: null })
await selectCatalogEntry(entry.name)
- fireEvent.click(screen.getByRole('switch', { name: `Add ${entry.name}` }))
+ fireEvent.click(screen.getByRole('button', { name: `Install ${entry.name}` }))
expect($pluginInstallRequest.get()).toMatchObject({
catalogName: entry.name,
diff --git a/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx b/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
index 1aa5af7ed5f..3d3d92bb937 100644
--- a/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
+++ b/apps/desktop/src/app/capabilities/plugins/plugins-tab.tsx
@@ -15,7 +15,7 @@ import type { ProfileScope } from '@/hermes'
import { useI18n } from '@/i18n'
import { DESKTOP_PLUGIN_TOOLSETS } from '@/lib/desktop-toolsets'
import { triggerHaptic } from '@/lib/haptics'
-import { CheckCircle2, FolderOpen, Loader2, Monitor, Package, RefreshCw, Trash2 } from '@/lib/icons'
+import { CheckCircle2, FolderOpen, Loader2, Monitor, Package, RefreshCw } from '@/lib/icons'
import { queryClient } from '@/lib/query-client'
import { cn } from '@/lib/utils'
import {
@@ -106,12 +106,22 @@ function installAgentHalfHere(record: PluginRecord, profile: null | string) {
return
}
+ // The package marker carries no tier, so read it from the cached catalog
+ // (a plugin row's `source` is its tier). Not cached: the dialog keeps the
+ // generic Verified badge.
+ const tier = origin.catalogName
+ ? queryClient
+ .getQueryData<CatalogEntry[]>(['public-catalog', 'plugins'])
+ ?.find(entry => entry.name === origin.catalogName)?.source
+ : undefined
+
openPluginInstallRequest({
catalogName: origin.catalogName,
legacyHint: 'agent',
profile,
repo: origin.repo,
- sha: origin.sha
+ sha: origin.sha,
+ tier
})
}
@@ -210,6 +220,39 @@ function Dash() {
)
}
+function UninstallRow({
+ name,
+ note,
+ disabled,
+ onUninstall
+}: {
+ name: string
+ note: string
+ disabled?: boolean
+ onUninstall: () => void
+}) {
+ const { t } = useI18n()
+ const p = t.skills.plugins
+
+ return (
+ <div className="flex items-center gap-3 border-t border-(--ui-stroke-tertiary) pt-4">
+ <div className="min-w-0 flex-1 text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">
+ {note}
+ </div>
+ <Button
+ aria-label={`${p.uninstall}: ${name}`}
+ className="text-destructive hover:text-destructive"
+ disabled={disabled}
+ onClick={onUninstall}
+ size="xs"
+ variant="text"
+ >
+ {p.uninstall}
+ </Button>
+ </div>
+ )
+}
+
function PackageRow({
pkg,
scope,
@@ -390,37 +433,6 @@ function PackageRow({
</Tip>
)}
</span>
- {/* Same fixed-slot treatment for Uninstall: present on every row so the
- halves line up, populated when the agent half is a user install or
- the row is a standalone desktop plugin. */}
- <span className="flex size-7 shrink-0 items-center justify-center">
- {agent && agentRemovable ? (
- <Tip label={p.uninstallTip(pkg.name, scopeLabel)}>
- <Button
- aria-label={`${p.uninstall}: ${pkg.name}`}
- className="text-(--ui-text-tertiary) hover:text-(--ui-danger,#f87171)"
- disabled={busy}
- onClick={() => onAgentRemove(agent)}
- size="icon"
- variant="ghost"
- >
- <Trash2 className="size-3.5" />
- </Button>
- </Tip>
- ) : desktop && desktopRemovable ? (
- <Tip label={p.uninstallDesktopTip(pkg.name)}>
- <Button
- aria-label={`${p.uninstall}: ${pkg.name}`}
- className="text-(--ui-text-tertiary) hover:text-(--ui-danger,#f87171)"
- onClick={() => onDesktopRemove(desktop)}
- size="icon"
- variant="ghost"
- >
- <Trash2 className="size-3.5" />
- </Button>
- </Tip>
- ) : null}
- </span>
</div>
{/* The two halves. Desktop is app-level and reads the same whichever
@@ -497,6 +509,26 @@ function PackageRow({
<Dash />
)}
</HalfCell>
+
+ {/* Uninstall lives here, not on the card: the card only installs (+)
+ and switches. Bundled and pip plugins have no row. */}
+ {agent && agentRemovable ? (
+ <UninstallRow
+ disabled={busy}
+ name={pkg.name}
+ note={p.uninstallTip(pkg.name, scopeLabel)}
+ onUninstall={() => onAgentRemove(agent)}
+ />
+ ) : (
+ desktop &&
+ desktopRemovable && (
+ <UninstallRow
+ name={pkg.name}
+ note={p.uninstallDesktopTip(pkg.name)}
+ onUninstall={() => onDesktopRemove(desktop)}
+ />
+ )
+ )}
</div>
</>
)
@@ -697,7 +729,7 @@ export const PluginsTab = memo(function PluginsTab({
)
// The card switch turns the whole package on or off, like a skill's; per-half
- // switches and uninstall (trash + confirm) live in the detail's PackageRow.
+ // switches and Uninstall (with confirm) live in the detail's PackageRow.
const packageSwitch = (pkg: PluginPackage) => {
const { agent, desktop } = pkg
@@ -742,7 +774,9 @@ export const PluginsTab = memo(function PluginsTab({
kind="plugins"
matchInstalled={matchInstalled}
notice={notice}
- onInstall={entry => openCatalogPluginInstall(entry, scope)}
+ // A plugin row's `source` IS its catalog tier (catalog-data.ts::catalogEntry);
+ // CatalogEntry has no `tier` field, so don't "fix" this to entry.tier.
+ onInstall={entry => openCatalogPluginInstall(entry, scope, { tier: entry.source })}
onQueryChange={onQueryChange}
query={query}
renderInstalledAction={entry => {
diff --git a/apps/desktop/src/app/settings/plugin-install-modal.tsx b/apps/desktop/src/app/settings/plugin-install-modal.tsx
index ffd91018de5..94c07352f20 100644
--- a/apps/desktop/src/app/settings/plugin-install-modal.tsx
+++ b/apps/desktop/src/app/settings/plugin-install-modal.tsx
@@ -184,7 +184,14 @@ export function PluginInstallModal() {
)
}
-/** Name, Verified/Unverified, the one line on what it does, then who reviewed it and where it lands. */
+/** The catalog tier as the badge reads it; an unknown tier keeps the generic Verified. */
+function catalogTierLabel(t: ReturnType<typeof useI18n>['t'], tier: string): string {
+ const labels = t.catalog.tierLabels
+
+ return tier in labels ? labels[tier as keyof typeof labels] : t.settings.plugins.installModal.verified
+}
+
+/** Name, Official/Verified/Unverified, the one line on what it does, then who reviewed it and where it lands. */
function InstallHeader({
line,
probe,
@@ -207,7 +214,9 @@ function InstallHeader({
<div className="min-w-0 space-y-1">
<div className="flex flex-wrap items-center gap-2">
<DialogTitle>{pluginTitle(request, probe)}</DialogTitle>
- <Badge variant={verified ? 'success' : 'warn'}>{verified ? m.verified : m.unverified}</Badge>
+ <Badge variant={!verified ? 'warn' : request.tier === 'community' ? 'muted' : 'success'}>
+ {!verified ? m.unverified : request.tier ? catalogTierLabel(t, request.tier) : m.verified}
+ </Badge>
</div>
<DialogDescription>{request.summary || line}</DialogDescription>
{request.summary && <p className={cn(CAPTION, 'text-(--ui-text-secondary)')}>{line}</p>}
diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.ts
index 348394a4b74..92b8a49d13a 100644
--- a/apps/desktop/src/i18n/ar.ts
+++ b/apps/desktop/src/i18n/ar.ts
@@ -39,6 +39,7 @@ export const arOverrides = {
installing: 'جارٍ التثبيت…',
installComplete: (name: string) => `تم تثبيت «${name}»`,
destinationChanged: 'تغيرت وجهة التثبيت. أغلق هذا الحوار وافتح رابط التثبيت مجددًا.',
+ install: 'تثبيت',
installed: 'المثبتة',
searchSkills: 'البحث في المهارات',
searchPlugins: 'البحث في الإضافات',
diff --git a/apps/desktop/src/i18n/en_catalog.ts b/apps/desktop/src/i18n/en_catalog.ts
index 73fe6a703ff..f61d6cfcd67 100644
--- a/apps/desktop/src/i18n/en_catalog.ts
+++ b/apps/desktop/src/i18n/en_catalog.ts
@@ -25,6 +25,7 @@ export const enCatalog: CatalogTranslations = {
installing: 'Installing…',
installComplete: (name: string) => `“${name}” installed`,
destinationChanged: 'The destination changed. Close this dialog and open the install link again.',
+ install: 'Install',
installed: 'Installed',
searchSkills: 'Search skills',
searchPlugins: 'Search plugins',
diff --git a/apps/desktop/src/i18n/ja_catalog.ts b/apps/desktop/src/i18n/ja_catalog.ts
index 946b602b42b..74d1a765c94 100644
--- a/apps/desktop/src/i18n/ja_catalog.ts
+++ b/apps/desktop/src/i18n/ja_catalog.ts
@@ -27,6 +27,7 @@ export const jaCatalog = {
installComplete: (name: string) => `「${name}」をインストールしました`,
destinationChanged:
'インストール先が変更されました。このダイアログを閉じ、インストールリンクを開き直してください。',
+ install: 'インストール',
installed: 'インストール済み',
searchSkills: 'スキルを検索',
searchPlugins: 'プラグインを検索',
diff --git a/apps/desktop/src/i18n/overlay-gaps.json b/apps/desktop/src/i18n/overlay-gaps.json
index 66d30fa9a82..86205f48973 100644
--- a/apps/desktop/src/i18n/overlay-gaps.json
+++ b/apps/desktop/src/i18n/overlay-gaps.json
@@ -244,6 +244,7 @@
"catalog.installHint": ["de","es","fr"],
"catalog.installTitle": ["de","es","fr"],
"catalog.installTo": ["de","es","fr"],
+ "catalog.install": ["de","es","fr"],
"catalog.installed": ["de","es","fr"],
"catalog.installing": ["de","es","fr"],
"catalog.license": ["de","es","fr"],
diff --git a/apps/desktop/src/i18n/ru_catalog.ts b/apps/desktop/src/i18n/ru_catalog.ts
index cb9b8233dfd..e29349d68db 100644
--- a/apps/desktop/src/i18n/ru_catalog.ts
+++ b/apps/desktop/src/i18n/ru_catalog.ts
@@ -32,6 +32,7 @@ export const ruCatalog = {
installing: 'Установка…',
installComplete: (name: string) => `«${name}» установлен`,
destinationChanged: 'Место установки изменилось. Закройте диалог и снова откройте ссылку установки.',
+ install: 'Установить',
installed: 'Установленные',
searchSkills: 'Поиск навыков',
searchPlugins: 'Поиск плагинов',
diff --git a/apps/desktop/src/i18n/types_catalog.ts b/apps/desktop/src/i18n/types_catalog.ts
index f7a93fb7cd8..dceb7e4166a 100644
--- a/apps/desktop/src/i18n/types_catalog.ts
+++ b/apps/desktop/src/i18n/types_catalog.ts
@@ -23,6 +23,7 @@ export interface CatalogTranslations {
installing: string
installComplete: (name: string) => string
destinationChanged: string
+ install: string
installed: string
searchSkills: string
searchPlugins: string
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index 01b2b52f1cd..20438602b95 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -40,6 +40,7 @@ export const zhHantOverrides = {
installing: '正在安裝…',
installComplete: (name: string) => `已安裝「${name}」`,
destinationChanged: '安裝目標已變更。請關閉此對話框並重新開啟安裝連結。',
+ install: '安裝',
installed: '已安裝',
searchSkills: '搜尋技能',
searchPlugins: '搜尋外掛',
diff --git a/apps/desktop/src/i18n/zh_catalog.ts b/apps/desktop/src/i18n/zh_catalog.ts
index 7553d4af9e6..2cee2349caf 100644
--- a/apps/desktop/src/i18n/zh_catalog.ts
+++ b/apps/desktop/src/i18n/zh_catalog.ts
@@ -25,6 +25,7 @@ export const zhCatalog = {
installing: '正在安装…',
installComplete: (name: string) => `已安装“${name}”`,
destinationChanged: '安装目标已更改。请关闭此对话框并重新打开安装链接。',
+ install: '安装',
installed: '已安装',
searchSkills: '搜索技能',
searchPlugins: '搜索插件',
diff --git a/apps/desktop/src/lib/plugin-catalog.ts b/apps/desktop/src/lib/plugin-catalog.ts
index 82ca094b47f..f9a198dd000 100644
--- a/apps/desktop/src/lib/plugin-catalog.ts
+++ b/apps/desktop/src/lib/plugin-catalog.ts
@@ -48,6 +48,8 @@ export interface PluginCatalogEntry {
subdir?: string
/** The description's first sentence: what the plugin does, in one line. */
summary?: string
+ /** official / verified / community; badges the install dialog. */
+ tier?: string
}
export type PluginCatalogLookupError = 'invalid_name' | 'unavailable' | 'unknown'
@@ -71,7 +73,7 @@ function asEntry(raw: unknown): null | PluginCatalogEntry {
const row = raw as Record<string, unknown>
// A field that is not a string reads as absent.
- const text = (field: 'description' | 'name' | 'repo' | 'sha' | 'subdir'): string | undefined => {
+ const text = (field: 'description' | 'name' | 'repo' | 'sha' | 'subdir' | 'tier'): string | undefined => {
const value = row[field]
return typeof value === 'string' ? value : undefined
@@ -89,7 +91,8 @@ function asEntry(raw: unknown): null | PluginCatalogEntry {
repo,
sha: text('sha') || undefined,
subdir: text('subdir') || undefined,
- summary: firstSentence(text('description') ?? '')
+ summary: firstSentence(text('description') ?? ''),
+ tier: text('tier') || undefined
}
}
diff --git a/apps/desktop/src/store/plugin-catalog-install.ts b/apps/desktop/src/store/plugin-catalog-install.ts
index 8d53b916480..b3921c74041 100644
--- a/apps/desktop/src/store/plugin-catalog-install.ts
+++ b/apps/desktop/src/store/plugin-catalog-install.ts
@@ -15,7 +15,7 @@ import { openPluginInstallRequest, type PluginInstallRequest } from './plugin-in
export function openCatalogPluginInstall(
entry: PluginCatalogEntry,
profile: null | string,
- options: Pick<PluginInstallRequest, 'stayAfterInstall' | 'title'> = {}
+ options: Pick<PluginInstallRequest, 'stayAfterInstall' | 'tier' | 'title'> = {}
): void {
const existing = $agentPlugins.get().find(row => row.catalog_name === entry.name || row.name === entry.name)
@@ -31,6 +31,7 @@ export function openCatalogPluginInstall(
repo: entry.subdir ? `${entry.repo}#${entry.subdir}` : entry.repo,
sha: entry.sha,
summary: entry.summary,
+ tier: entry.tier,
...options
})
}
diff --git a/apps/desktop/src/store/plugin-install-request.ts b/apps/desktop/src/store/plugin-install-request.ts
index 9048d7bfb5b..2fb9cd04393 100644
--- a/apps/desktop/src/store/plugin-install-request.ts
+++ b/apps/desktop/src/store/plugin-install-request.ts
@@ -13,6 +13,9 @@ export interface PluginInstallRequest {
/** Curated-catalog pick: install the agent half by catalog name so the
* backend pins the reviewed SHA and records sidecar provenance. */
catalogName?: string
+ /** Catalog tier (official / verified / community), display only: an
+ * official pick is badged Official rather than Verified. */
+ tier?: string
/** The catalog pin (display only — the backend resolves it itself). */
sha?: string
/** Display name for the dialog heading (the catalog card's title); falls back to the catalog name. */
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.ts
index 560b176c8d3..9f1202e6e7d 100644
--- a/apps/shared/src/gateway-contract.generated.ts
+++ b/apps/shared/src/gateway-contract.generated.ts
@@ -4527,6 +4527,7 @@ export interface PluginCatalogLookupEntry {
repo: string
sha: string
subdir: string
+ tier?: string
}
export interface CanonicalShellExecParams {
session_id: string
diff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.json
index 77180dae52b..72ddb0084a0 100644
--- a/apps/shared/src/gateway-contract.openrpc.json
+++ b/apps/shared/src/gateway-contract.openrpc.json
@@ -27223,6 +27223,11 @@
"subdir": {
"title": "Subdir",
"type": "string"
+ },
+ "tier": {
+ "default": "community",
+ "title": "Tier",
+ "type": "string"
}
},
"required": [
diff --git a/locales/_keys.desktop.json b/locales/_keys.desktop.json
index ff1c153e486..a2b068fe445 100644
--- a/locales/_keys.desktop.json
+++ b/locales/_keys.desktop.json
@@ -590,6 +590,7 @@
"catalog.featured",
"catalog.filters",
"catalog.hooks",
+ "catalog.install",
"catalog.installComplete",
"catalog.installDescription",
"catalog.installHint",
diff --git a/tests/tui_gateway/test_plugins_catalog_lookup.py b/tests/tui_gateway/test_plugins_catalog_lookup.py
index c84a50c6de3..cc3ff3fb248 100644
--- a/tests/tui_gateway/test_plugins_catalog_lookup.py
+++ b/tests/tui_gateway/test_plugins_catalog_lookup.py
@@ -8,9 +8,9 @@ from tui_gateway import server
SHA = "a" * 40
-def _entry(name, repo=None, subdir=""):
+def _entry(name, repo=None, subdir="", tier="community"):
return pc.entry_from_mapping({"name": name, "repo": repo or f"https://github.com/fx/{name}", "sha": SHA,
- "description": "d.", "maintainer": "fx", "subdir": subdir}, name)
+ "description": "d.", "maintainer": "fx", "subdir": subdir, "tier": tier}, name)
def _lookup(name, **extra):
@@ -21,7 +21,7 @@ def _lookup(name, **extra):
@pytest.fixture
def catalog(monkeypatch):
- entries = [_entry("weather"), _entry("aihubmix", "https://github.com/AIhubmix/mono", subdir="aihubmix"),
+ entries = [_entry("weather"), _entry("aihubmix", "https://github.com/AIhubmix/mono", subdir="aihubmix", tier="official"),
_entry("pulled")]
monkeypatch.setattr(pc, "load_catalog_live", lambda: entries)
monkeypatch.setattr(pc, "load_removed_list", lambda catalog_dir=None: [pc.RemovedEntry(name="pulled")])
@@ -31,8 +31,11 @@ def catalog(monkeypatch):
def test_a_listed_name_returns_what_the_install_dialog_needs(catalog):
assert _lookup("aihubmix") == {"status": "found", "entry": {
- "name": "aihubmix", "repo": "https://github.com/AIhubmix/mono", "sha": SHA, "subdir": "aihubmix"}}
+ "name": "aihubmix", "repo": "https://github.com/AIhubmix/mono", "sha": SHA, "subdir": "aihubmix",
+ "tier": "official"}}
+ # The tier rides along so a deep link's dialog badges Official/Verified/Community like an in-app pick.
assert _lookup(" weather ")["entry"]["subdir"] == ""
+ assert _lookup("weather")["entry"]["tier"] == "community"
def test_an_unlisted_or_removed_name_is_unknown_never_a_guess(catalog):
diff --git a/tui_gateway/contracts/tools_mcp_plugins.py b/tui_gateway/contracts/tools_mcp_plugins.py
index fa582886227..594e757c708 100644
--- a/tui_gateway/contracts/tools_mcp_plugins.py
+++ b/tui_gateway/contracts/tools_mcp_plugins.py
@@ -861,6 +861,7 @@ class PluginCatalogLookupEntry(Result):
repo: str
sha: str
subdir: str
+ tier: str = "community"
class PluginCatalogLookupResult(Result):
diff --git a/tui_gateway/methods_plugin_catalog.py b/tui_gateway/methods_plugin_catalog.py
index 5400beec4cb..5a625406b77 100644
--- a/tui_gateway/methods_plugin_catalog.py
+++ b/tui_gateway/methods_plugin_catalog.py
@@ -38,7 +38,7 @@ def _(rid, params: dict) -> dict:
if entry is None or match_removed(entry.name, removed) or match_removed(entry.repo, removed):
return _ok(rid, {"status": "unknown"})
return _ok(rid, {"status": "found", "entry": {"name": entry.name, "repo": entry.repo, "sha": entry.sha,
- "subdir": entry.subdir}})
+ "subdir": entry.subdir, "tier": entry.tier}})
def register(server) -> None: