diff --git a/docs/docs/features/plugins.md b/docs/docs/features/plugins.md
index dde1d20ce..aa4e2e050 100644
--- a/docs/docs/features/plugins.md
+++ b/docs/docs/features/plugins.md
@@ -13,11 +13,10 @@ npm package of a local MCP server, which goes through the same package cache and
integrity check as the [extension library's local package servers](./agent-extensions.md#local-package-servers).
:::note Work in progress
-This page describes the plugin **manifest**, the official plugin registry and
-how an administrator **installs** a plugin through the API. The Plugins page,
-applying contributions to runs, OAuth connections, handlers, webhooks and
-commands are added by later releases; until then an installed plugin's state
-is stored and served but has no effect on runs.
+This page describes the plugin **manifest**, the official plugin registry, the
+[Plugins page](#the-plugins-page) and the installation API. A plugin's
+generated settings form, handlers, webhooks and commands are added by later
+releases.
:::
## Where plugins live
@@ -168,6 +167,74 @@ npm run plugins:check -- --online [--registry https://registry.npmjs.org]
also asks the npm registry for each package server's version and compares the
recorded `integrity` value. It needs network access and is not run in CI.
+## The Plugins page
+
+**Plugins** (`/plugins`) is where an administrator installs a plugin and makes
+it work without knowing what it contributes internally. It is in the sidebar
+(on mobile, under **More**) and linked from **Settings → Agent Extensions &
+Packages → Skills & MCP servers**, and only durable administrators with
+`instance.manage_settings` see it. Everything on the page is drawn by ProPR
+from the manifest: manifest text is shown as plain text, links appear only for
+`https` URLs, and no code, image or markup supplied by the plugin runs in the
+browser.
+
+### Catalog
+
+The catalog shows one card per plugin: an icon for its category, its name,
+one-line description, category and a state badge. Filter by **Category** or
+type in **Search by name**.
+
+| Badge | Meaning |
+| --- | --- |
+| Not installed | Available in this ProPR, not installed. |
+| Off | Installed, every connection set, not enabled. |
+| Needs connection | Installed and not enabled, with a connection still to set or sign in. |
+| Enabled | Enabled, every connection set. |
+| Needs approval | An upgrade asks for permissions or a secret acknowledgement not yet approved. |
+| Degraded | Enabled while a connection is missing or needs a new sign-in, or no longer in this ProPR's registry. |
+
+### Walkthrough
+
+Open a card to see the plugin's steps, always in this order, each marked
+**Done** or **To do**:
+
+1. **Install.** The step says what the plugin adds in plain words, for example
+ "Adds 1 MCP server the agent can read from", "Runs 1 local server inside
+ the task container" or "Adds the /deploy command", and lists the
+ permissions it asks for, each with a one-line explanation. When a local
+ package server receives secret variables, the step shows the package, its
+ exact version and the variable names, with a required checkbox confirming
+ that those secrets are readable inside the task container. **Install**
+ stays unavailable until it is ticked. After an upgrade that needs approval,
+ the step lists what is new and offers **Approve**.
+2. **Connect.** One row per connection with its state, the manifest's help text
+ and a **How to get it** link. An OAuth connection has **Connect**,
+ **Reconnect** and **Disconnect**, the same controls as an OAuth server in
+ Skills & MCP servers; sign-in opens in a new tab and the page refreshes when
+ you come back. A `token` or `signing_secret` connection has a write-only
+ field: once saved, the page only says who stored it and when, and offers
+ **Replace** and **Clear**. A required connection cannot be cleared while
+ the plugin is enabled.
+3. **Configure.** **Limit to repositories** picks the repositories the plugin
+ applies in; leave every box unchecked for all repositories. The form for
+ the plugin's own settings is added by a later release.
+4. **Enable.** A single **Enabled** checkbox. While a required connection,
+ required setting or secret acknowledgement is missing it cannot be ticked,
+ and the step lists what is missing, for example "Connection Example API
+ token (example-token) is not set". Untick it to disable the plugin; its
+ settings and connections are kept.
+
+Below the steps, **What it added** lists the plugin's managed MCP servers and
+skills, with a link to Skills & MCP servers where they are listed, and its
+automation templates, each with whether it applies now.
+
+**Uninstall** is a separate action. Its confirmation lists what is removed:
+the settings and repository limit, each connection and stored credential, the
+managed library items and the templates. The audit trail is kept. When an
+automation still adds one of the plugin's managed items, the API refuses the
+uninstall and the page shows its message, which names the automation; remove
+the item from that automation and try again.
+
## Installing a plugin
A plugin is **available** when it is in this ProPR's registry, **installed**
diff --git a/docs/docs/features/web-ui.md b/docs/docs/features/web-ui.md
index 816eebeb2..3ff06510f 100644
--- a/docs/docs/features/web-ui.md
+++ b/docs/docs/features/web-ui.md
@@ -9,7 +9,7 @@ The ProPR Web UI configures repositories and agents, launches work, and shows pr
## Navigation And Chrome
-The sidebar's work area contains **Dashboard**, **Inbox**, **Tasks**, **Goals**, **Automations** and **Plans**. The system area contains **Repositories**, **Coding Agents** (administrators), **Analytics**, the collapsible **Logs** group, **Settings** and **Access** (administrators). Count badges show current work and unread Inbox items. Agent Tank usage appears below navigation when enabled.
+The sidebar's work area contains **Dashboard**, **Inbox**, **Tasks**, **Goals**, **Automations** and **Plans**. The system area contains **Repositories**, **Coding Agents** (administrators), **Analytics**, the collapsible **Logs** group, **Settings**, **Plugins** and **Access** (administrators). Count badges show current work and unread Inbox items. Agent Tank usage appears below navigation when enabled.
The header includes search (`Cmd/Ctrl+K`), activity/review controls, quick add to-do (`Alt+T`) and system health. Search opens a command palette that groups matching repositories, plans and tasks, with a preview of the highlighted item beside the list on wider screens. Tab and Shift+Tab switch between the **All**, **Repos**, **Plans** and **Tasks** tabs, Enter opens the highlighted item, Cmd/Ctrl+Enter opens it on GitHub, and **Search all tasks** runs the term as a full Tasks search. **New Task** is the default creation action. It becomes **New Plan** in Plans/Planner Studio, **New Goal** in Goals and **New Automation** in Automations; the adjacent menu offers the other actions. See [Launching work](./launching-work.md) to choose between them. After quick add confirms **To-Do added**, choose **Add another** to enter the next item without closing the popover. Desktop puts application information in **About ProPR** rather than the sidebar footer.
@@ -122,6 +122,17 @@ for the operator walkthrough and the log's filters.

+## Plugins
+
+**Plugins** (`/plugins`) installs and manages [plugins](./plugins.md#the-plugins-page). It appears in the sidebar (on mobile, under **More**) and as an **Open Plugins** link above **Skills & MCP servers** in Settings, only for durable administrators with `instance.manage_settings`; anyone else who opens the address sees *Administrator access required*.
+
+1. The catalog shows a card per plugin with its name, description, category and a state badge (**Not installed**, **Enabled**, **Off**, **Needs connection**, **Needs approval** or **Degraded**). Filter by category or search by name, then open a card.
+2. **Install** lists what the plugin adds and the permissions it asks for. If a local package server receives secret variables, tick the acknowledgement that names its package, version and variables, then choose **Install**.
+3. **Connect** has one row per connection: **Connect** for an OAuth sign-in (it opens in a new tab), or a write-only field for an API token or signing secret.
+4. **Configure** offers **Limit to repositories**; leave it empty to apply everywhere.
+5. Tick **Enabled**. While something is missing, the checkbox is unavailable and the step lists what to do first. Untick it to disable the plugin and keep its settings.
+6. **What it added** links the plugin's managed items in Skills & MCP servers. **Uninstall…** lists what will be removed before you confirm, and shows the API's message if an automation still uses one of the plugin's items.
+
## Access
**Access** (`/admin/members`) is available to administrators. It creates durable `admin` and `member` role assignments using stable GitHub user IDs, shows environment administrators configured through `PROPR_ADMIN_USERS`, surfaces recent role-audit events, and prevents removal or demotion of the last durable administrator. On a new installation, sign in as a configured environment administrator and use **Store my administrator role** before removing that username from `PROPR_ADMIN_USERS`.
diff --git a/propr-ui/e2e/plugins.pw.ts b/propr-ui/e2e/plugins.pw.ts
new file mode 100644
index 000000000..ae627a5ee
--- /dev/null
+++ b/propr-ui/e2e/plugins.pw.ts
@@ -0,0 +1,196 @@
+import { expect, test, type Page } from '@playwright/test';
+import { mkdir } from 'node:fs/promises';
+import path from 'node:path';
+
+/**
+ * The Plugins page end to end against a stateful plugin API fixture: the
+ * example plugin is installed, connected, limited to a repository, enabled,
+ * disabled and uninstalled entirely from the page. With PROPR_CAPTURE_PREVIEWS
+ * set it also captures the catalog and the detail steps at desktop and phone widths.
+ */
+
+const NOW = Date.parse('2026-11-14T09:00:00.000Z');
+const BASE = '/api/instance/plugins/v1';
+const REFUSAL = 'Automations add items of plugin example-pack explicitly; remove them from "Weekly digest" (example-remote) before uninstalling';
+
+const MANIFEST = {
+ id: 'example-pack', name: 'Example pack', version: '0.1.0', category: 'other',
+ description: 'A small development plugin that exercises every manifest section: one remote MCP server, one pinned package server, one skill and one automation template.',
+ homepage: 'https://github.com/integry/propr/tree/main/packages/plugins/example-pack',
+ permissions: [
+ { name: 'events.read', description: 'Receive ProPR task, pull request and automation events' },
+ { name: 'tasks.read', description: 'Read tasks and their status' },
+ ],
+ connections: [
+ { type: 'oauth', name: 'example-account', label: 'Example account', help: 'Sign in with the example service account that the remote MCP server should act as.', helpUrl: 'https://example.com/docs/oauth' },
+ { type: 'token', name: 'example-token', label: 'Example API token', help: 'Create a read-only API token in the example service settings and paste it here.', helpUrl: 'https://example.com/docs/tokens' },
+ ],
+ settings: { type: 'object', properties: {}, required: [] },
+ outboundHosts: ['api.example.com'],
+ contributes: {
+ mcpServers: [
+ { kind: 'https', name: 'example-remote', url: 'https://mcp.example.com/mcp', tools: ['search', 'fetch'], capability: 'read', authentication: 'oauth', connection: 'example-account' },
+ { kind: 'package', name: 'example-local', ecosystem: 'npm', package: 'propr-fixture-mcp', version: '1.0.0', tools: ['echo'], capability: 'read', secretEnv: [{ name: 'FIXTURE_TOKEN', connection: 'example-token' }] },
+ ],
+ skills: ['example-notes'], automationTemplates: ['example-weekly-digest'], commands: [], subscriptions: [], webhooks: [],
+ },
+};
+const OTHERS = [
+ { id: 'team-chat', name: 'Team chat', category: 'messaging', description: 'Posts task and pull request updates to a chat channel.' },
+ { id: 'deploy-hooks', name: 'Deploy hooks', category: 'deployment', description: 'Adds the /deploy command and reports deployment status.' },
+];
+
+interface State { installed: boolean; enabled: boolean; token: boolean; oauth: boolean; repositories: string[] | null; refuseUninstall: boolean }
+
+function view(state: State) {
+ const active = state.enabled;
+ const library = '/api/instance/extensions/v1';
+ return {
+ id: 'example-pack', available: true, manifest: MANIFEST,
+ state: !state.installed ? 'available' : state.enabled ? 'enabled' : 'installed',
+ installation: state.installed ? {
+ installedVersion: '0.1.0', enabled: state.enabled, settings: {}, repositories: state.repositories, grantedPermissions: ['events.read', 'tasks.read'],
+ acknowledgements: { 'example-local': { actor: '1042', at: NOW, package: 'propr-fixture-mcp', version: '1.0.0', secretEnv: ['FIXTURE_TOKEN'] } },
+ installedBy: '1042', installedAt: NOW, updatedBy: '1042', updatedAt: NOW,
+ } : null,
+ connections: [
+ { name: 'example-account', type: 'oauth', label: 'Example account', state: state.oauth ? 'connected' : 'not_connected', required: false },
+ { name: 'example-token', type: 'token', label: 'Example API token', state: state.token ? 'connected' : 'not_connected', required: true, ...(state.token ? { setBy: '1042', setAt: NOW } : {}) },
+ ],
+ needsApproval: false, pendingPermissions: [], pendingAcknowledgements: [],
+ enableBlockers: state.installed && !state.token ? ['Connection Example API token (example-token) is not set'] : [],
+ contributions: {
+ mcpServers: [
+ { name: 'example-remote', kind: 'https', managed: state.installed ? { kind: 'server', name: 'example-remote', enabled: true, active } : null, href: library },
+ { name: 'example-local', kind: 'package', managed: state.installed ? { kind: 'server', name: 'example-local', enabled: true, active } : null, href: library },
+ ],
+ skills: [{ name: 'example-notes', managed: state.installed ? { kind: 'skill', bundleId: 'bundle-1', enabled: true, active } : null, href: library }],
+ automationTemplates: [{ id: 'example-weekly-digest', catalogId: 'example-weekly-digest', available: state.enabled, href: '/api/automation-definitions/templates' }],
+ },
+ };
+}
+const otherView = (other: typeof OTHERS[number], enabled: boolean) => ({
+ ...view({ installed: enabled, enabled, token: true, oauth: true, repositories: null, refuseUninstall: false }),
+ id: other.id, manifest: { ...MANIFEST, ...other, connections: [], contributes: { ...MANIFEST.contributes, mcpServers: [] } }, connections: [],
+});
+
+async function installFixture(page: Page, state: State): Promise {
+ await page.routeWebSocket('**/socket.io/**', socket => socket.close());
+ await page.route('**/api/**', async route => {
+ const request = route.request();
+ const { pathname } = new URL(request.url());
+ const method = request.method();
+ if (method !== 'GET' && request.headers()['x-propr-plugins'] !== '1') return route.fulfill({ status: 403, json: { error: 'Plugin changes require the preflight-protected JSON contract' } });
+ const body = method === 'GET' ? {} : request.postDataJSON() as Record;
+ const reply = () => route.fulfill({ json: { plugin: view(state) } });
+ if (pathname === BASE) return route.fulfill({ json: { plugins: [view(state), otherView(OTHERS[0], true), otherView(OTHERS[1], false)] } });
+ if (pathname === `${BASE}/example-pack`) return route.fulfill({ json: { plugin: { ...view(state), audit: [] } } });
+ if (pathname === `${BASE}/example-pack/install`) {
+ if (!(body.acknowledgements as string[] | undefined)?.includes('example-local')) return route.fulfill({ status: 400, json: { error: 'Confirm that the secret variables of example-local are readable' } });
+ state.installed = true; return reply();
+ }
+ if (pathname === `${BASE}/example-pack/connections/example-token`) { state.token = body.value !== null; return reply(); }
+ if (pathname === `${BASE}/example-pack/repositories`) { state.repositories = body.repositories as string[] | null; return reply(); }
+ if (pathname === `${BASE}/example-pack/enabled`) { state.enabled = body.enabled === true; return reply(); }
+ if (pathname === `${BASE}/example-pack/uninstall`) {
+ if (state.refuseUninstall) { state.refuseUninstall = false; return route.fulfill({ status: 409, json: { error: REFUSAL } }); }
+ Object.assign(state, { installed: false, enabled: false, token: false, oauth: false, repositories: null }); return reply();
+ }
+ const responses: Record = {
+ '/api/auth/demo-mode': { demoMode: false },
+ '/api/auth/user': {
+ id: '1042', login: 'preview', username: 'preview', displayName: 'Preview Operator', email: null, avatarUrl: null, role: 'admin',
+ permissions: ['instance.manage_settings', 'instance.manage_members', 'instance.manage_agents'], authorizationSource: 'local',
+ },
+ '/api/instance/catalog': { agents: [], repositories: [{ name: 'integry/propr' }, { name: 'integry/propr-docs' }] },
+ '/api/instance/extensions/v1': { oauth: { redirectUri: 'https://propr.example.com/api/instance/extensions/v1/oauth/callback', clientMetadataUrl: null, connections: {} } },
+ '/api/notifications/unread-count': { unreadCount: 0 },
+ '/api/notifications/config': { push: { configured: false, vapidPublicKey: null } },
+ };
+ if (pathname in responses) return route.fulfill({ json: responses[pathname] });
+ return route.fulfill({ status: 503, json: { error: 'Unavailable in the plugins fixture' } });
+ });
+}
+
+/** The app scrolls inside its own container, so a capture scrolls the part it shows into view first. */
+async function capture(page: Page, name: string, focus?: ReturnType): Promise {
+ if (!process.env.PROPR_CAPTURE_PREVIEWS) return;
+ if (focus) await focus.evaluate(element => element.scrollIntoView({ block: 'start' }));
+ const directory = path.resolve('../.propr/previews');
+ await mkdir(directory, { recursive: true });
+ await page.screenshot({ animations: 'disabled', path: path.join(directory, `${name}.png`) });
+}
+
+const step = (page: Page, title: string) => page.getByRole('region', { name: new RegExp(`^\\d\\. ${title}`) });
+const badge = (page: Page) => page.getByRole('heading', { level: 1 }).getByTestId('plugin-state');
+
+test('installs, connects, limits, enables, disables and uninstalls the example plugin from the page', async ({ page }) => {
+ const state: State = { installed: false, enabled: false, token: false, oauth: false, repositories: null, refuseUninstall: true };
+ await page.setViewportSize({ width: 1440, height: 900 });
+ await installFixture(page, state);
+ await page.goto('/plugins');
+
+ await expect(page.getByRole('navigation').getByRole('link', { name: 'Plugins' })).toHaveAttribute('href', '/plugins');
+ await expect(page.getByTestId('plugin-card')).toHaveCount(3);
+ await capture(page, 'plugins-catalog-desktop');
+ await page.getByLabel('Category').selectOption('messaging');
+ await expect(page.getByTestId('plugin-card')).toHaveCount(1);
+ await page.getByLabel('Category').selectOption('');
+ await page.getByRole('link', { name: 'Example pack: open' }).click();
+
+ const install = step(page, 'Install');
+ await expect(install.getByRole('button', { name: 'Install' })).toBeDisabled();
+ await expect(install.getByTestId('plugin-secret-acknowledgement')).toContainText('FIXTURE_TOKEN');
+ await capture(page, 'plugins-install-step-desktop', install.getByText('Permissions it asks for'));
+ await install.getByRole('checkbox', { name: /propr-fixture-mcp@1\.0\.0/ }).check();
+ await install.getByRole('button', { name: 'Install' }).click();
+ await expect(badge(page)).toHaveText('Needs connection');
+
+ const enable = step(page, 'Enable');
+ await expect(enable.getByRole('checkbox', { name: /Enabled/ })).toBeDisabled();
+ await expect(enable.getByRole('status')).toContainText('Connection Example API token (example-token) is not set');
+ await capture(page, 'plugins-connect-and-enable-blocked-desktop', step(page, 'Connect'));
+
+ const token = step(page, 'Connect').getByTestId('plugin-connection').nth(1);
+ await token.getByLabel('Example API token').fill('tok_preview_value');
+ await token.getByRole('button', { name: 'Save' }).click();
+ await expect(token).toContainText('Stored by administrator 1042');
+ await expect(token.getByLabel('Replace Example API token')).toHaveValue('');
+
+ const configure = step(page, 'Configure');
+ await configure.getByRole('checkbox', { name: 'integry/propr', exact: true }).check();
+ await configure.getByRole('button', { name: 'Save repositories' }).click();
+ await expect(page.getByTestId('plugin-repository-limit')).toHaveText('Limited to integry/propr.');
+ expect(state.repositories).toEqual(['integry/propr']);
+
+ await enable.getByRole('checkbox', { name: /Enabled/ }).check();
+ await expect(badge(page)).toHaveText('Degraded'); // the OAuth account is still to sign in
+ await expect(page.getByTestId('plugin-contributions')).toContainText('MCP server example-remote · Active');
+ state.oauth = true;
+ await page.reload();
+ await expect(badge(page)).toHaveText('Enabled');
+ await capture(page, 'plugins-enabled-desktop', step(page, 'Configure'));
+
+ await step(page, 'Enable').getByRole('checkbox', { name: /Enabled/ }).uncheck();
+ await expect(badge(page)).toHaveText('Off');
+
+ await page.getByRole('button', { name: 'Uninstall…' }).click();
+ await expect(page.getByTestId('plugin-uninstall-confirm')).toContainText('Skill example-notes from Skills & MCP servers');
+ await page.getByRole('button', { name: 'Uninstall Example pack' }).click();
+ await expect(page.getByTestId('plugin-uninstall-error')).toHaveText(REFUSAL);
+ await capture(page, 'plugins-uninstall-refused-desktop', page.getByTestId('plugin-contributions'));
+ await page.getByRole('button', { name: 'Uninstall Example pack' }).click();
+ await expect(badge(page)).toHaveText('Not installed');
+});
+
+test('keeps the plugin steps usable on a phone', async ({ page }) => {
+ const state: State = { installed: true, enabled: false, token: false, oauth: false, repositories: null, refuseUninstall: false };
+ await page.setViewportSize({ width: 390, height: 844 });
+ await installFixture(page, state);
+ await page.goto('/plugins/example-pack');
+ await expect(badge(page)).toHaveText('Needs connection');
+ const overflow = await page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
+ expect(overflow).toBeLessThanOrEqual(0);
+ await capture(page, 'plugins-detail-phone');
+ await capture(page, 'plugins-enable-blocked-phone', step(page, 'Enable'));
+});
diff --git a/propr-ui/src/App.tsx b/propr-ui/src/App.tsx
index 7b795925b..c26ced19c 100644
--- a/propr-ui/src/App.tsx
+++ b/propr-ui/src/App.tsx
@@ -45,6 +45,7 @@ import {
LoginPage,
McpLogsPage,
PlansPage,
+ PluginsPage,
PlanStudioPage,
RepositoriesPage,
RevertPage,
@@ -280,6 +281,7 @@ const AppContent: React.FC = () => {
}
/>
+ } />
{
}
/>
-
-
-
-
-
- }
- />
+ } />
;
+export type PluginConnectionView = PluginView['connections'][number];
+
+/** The refusal text the API returned, kept so the page can show it verbatim. */
+export class PluginApiError extends Error {
+ constructor(readonly status: number, message: string) { super(message); this.name = 'PluginApiError'; }
+}
+
+async function request(path: string, init?: { method: 'POST' | 'PUT'; body: unknown }): Promise {
+ const response = await apiFetch(`${API_BASE_URL}${PLUGIN_API_BASE}${path}`, {
+ credentials: 'include', cache: 'no-store',
+ ...(init ? { method: init.method, headers: { 'Content-Type': 'application/json', 'X-ProPR-Plugins': '1' }, body: JSON.stringify(init.body) } : {}),
+ });
+ if (response.ok) return response.json() as Promise;
+ const failure = await response.json().catch(() => null) as { code?: string; message?: string; error?: string } | null;
+ // The read-only demo explains why plugins are not shown.
+ if (response.status === 403 && failure?.code === 'DEMO_MODE_LIVE_DATA_UNAVAILABLE' && failure.message) throw new PluginApiError(403, failure.message);
+ if (typeof failure?.error === 'string' && failure.error) throw new PluginApiError(response.status, failure.error);
+ if (response.status === 403) throw new PluginApiError(403, 'A current durable instance administrator is required.');
+ throw new PluginApiError(response.status, 'Plugin operation unavailable. Check the configuration and try again.');
+}
+
+const segment = (value: string) => `/${encodeURIComponent(value)}`;
+const plugin = (id: string, rest = '') => `${segment(id)}${rest}`;
+const connection = (id: string, name: string, rest = '') => plugin(id, `/connections${segment(name)}${rest}`);
+type Plugin = Promise;
+
+export const listPlugins = () => request('');
+export const getPlugin = (id: string) => request(plugin(id));
+/** `acknowledgements` names the package servers whose secret variables the administrator confirmed are readable in the task container. */
+export const installPlugin = (id: string, acknowledgements: string[]): Plugin =>
+ request(plugin(id, '/install'), { method: 'POST', body: acknowledgements.length ? { acknowledgements } : {} });
+/** Approve permissions and acknowledgements a newer manifest asks for. */
+export const approvePlugin = (id: string, acknowledgements: string[]): Plugin =>
+ request(plugin(id, '/approve'), { method: 'POST', body: acknowledgements.length ? { acknowledgements } : {} });
+/** `null` (or an empty list) for all repositories. */
+export const setPluginRepositories = (id: string, repositories: string[] | null): Plugin =>
+ request(plugin(id, '/repositories'), { method: 'PUT', body: { repositories: repositories?.length ? repositories : null } satisfies ProprApi.PluginRepositoriesRequest });
+export const setPluginEnabled = (id: string, enabled: boolean): Plugin =>
+ request(plugin(id, '/enabled'), { method: 'PUT', body: { enabled } satisfies ProprApi.PluginEnabledRequest });
+/** Set (`value`) or clear (`null`) a `token` or `signing_secret` connection. */
+export const setPluginConnection = (id: string, name: string, value: string | null): Plugin =>
+ request(connection(id, name), { method: 'PUT', body: { value } });
+/** The uninstall must repeat the plugin id. */
+export const uninstallPlugin = (id: string): Plugin =>
+ request(plugin(id, '/uninstall'), { method: 'POST', body: { confirm: id } satisfies ProprApi.PluginUninstallRequest });
+export const startPluginOAuth = (id: string, name: string) =>
+ request(connection(id, name, '/oauth/start'), { method: 'POST', body: {} });
+export const disconnectPluginOAuth = (id: string, name: string): Plugin =>
+ request(connection(id, name, '/oauth/disconnect'), { method: 'POST', body: {} });
diff --git a/propr-ui/src/components/Layout.tsx b/propr-ui/src/components/Layout.tsx
index ad7d2f787..014bbbdb9 100644
--- a/propr-ui/src/components/Layout.tsx
+++ b/propr-ui/src/components/Layout.tsx
@@ -23,6 +23,7 @@ import UserAvatar from './UserAvatar';
import VoiceBriefingControl from './VoiceBriefingControl';
import { HeaderScopeSlotContext } from './headerScopeSlot';
import { SidebarNavigation, type NavigationState } from './SidebarNavigation';
+import { canManagePlugins } from '../pages/SettingsPage/settingsPermissions';
interface LayoutProps {
children: React.ReactNode;
@@ -75,6 +76,7 @@ const Layout: React.FC = ({ children }) => {
canManageMembers: userHasPermission(user, 'instance.manage_members'),
// The MCP access log needs the permission its admin endpoints require.
canReadMcpLog: userHasPermission(user, 'instance.manage_settings'),
+ canManagePlugins: canManagePlugins(user),
};
const navigationState: NavigationState = {
currentPath: location.pathname,
diff --git a/propr-ui/src/components/MobileBottomNavigation.test.tsx b/propr-ui/src/components/MobileBottomNavigation.test.tsx
index 576303508..603b26323 100644
--- a/propr-ui/src/components/MobileBottomNavigation.test.tsx
+++ b/propr-ui/src/components/MobileBottomNavigation.test.tsx
@@ -301,6 +301,19 @@ describe('MobileBottomNavigation', () => {
expect(screen.queryByRole('link', { name: 'MCP Log' })).not.toBeInTheDocument();
});
+ it('offers Plugins only to administrators who may change instance settings', () => {
+ renderNavigation('/plugins/example-pack', vi.fn(), { ...user, permissions: ['instance.manage_settings'] });
+ expect(screen.getByRole('button', { name: 'More' })).toHaveAttribute('aria-current', 'page');
+ fireEvent.click(screen.getByRole('button', { name: 'More' }));
+ expect(screen.getByRole('link', { name: 'Plugins' })).toHaveAttribute('href', '/plugins');
+ });
+
+ it('hides Plugins from members and from administrators without the settings permission', () => {
+ renderNavigation('/tasks', vi.fn(), { ...user, role: 'member', permissions: ['instance.manage_settings'] });
+ fireEvent.click(screen.getByRole('button', { name: 'More' }));
+ expect(screen.queryByRole('link', { name: 'Plugins' })).not.toBeInTheDocument();
+ });
+
it('hides Access without member management permission', () => {
renderNavigation('/tasks', vi.fn(), {
...user,
diff --git a/propr-ui/src/components/MobileBottomNavigation.tsx b/propr-ui/src/components/MobileBottomNavigation.tsx
index 094200922..f52d51351 100644
--- a/propr-ui/src/components/MobileBottomNavigation.tsx
+++ b/propr-ui/src/components/MobileBottomNavigation.tsx
@@ -13,6 +13,7 @@ import {
ListTodo,
MoreHorizontal,
Plug,
+ Puzzle,
Plus,
ScrollText,
Settings,
@@ -24,6 +25,7 @@ import {
import type { HeaderStats } from '../hooks/useHeaderStats';
import type { CurrentUser } from '../api/proprTypes';
import { userHasPermission } from '../contexts/AuthContext';
+import { canManagePlugins } from '../pages/SettingsPage/settingsPermissions';
import { publicAssetUrl } from '../config/runtimeMode';
import AgentTankSidebar from './AgentTankSidebar';
import QuickAddTodo from './QuickAddTodo';
@@ -67,7 +69,8 @@ const getNavigationState = (pathname: string, search: string) => {
pathMatches(pathname, '/repositories') || pathMatches(pathname, '/summaries') ||
pathMatches(pathname, '/analytics') || pathMatches(pathname, '/llm-logs') ||
pathMatches(pathname, '/mcp-logs') || pathMatches(pathname, '/ai-agents') ||
- pathMatches(pathname, '/settings') || pathMatches(pathname, '/admin/members')
+ pathMatches(pathname, '/settings') || pathMatches(pathname, '/admin/members') ||
+ pathMatches(pathname, '/plugins')
),
};
};
@@ -99,6 +102,9 @@ const getMoreGroups = (user: CurrentUser | null) => ({
? [{ label: 'Coding Agents', to: '/ai-agents', icon: Bot }]
: []),
{ label: 'Settings', to: '/settings', icon: Settings },
+ ...(canManagePlugins(user)
+ ? [{ label: 'Plugins', to: '/plugins', icon: Puzzle }]
+ : []),
...(userHasPermission(user, 'instance.manage_members')
? [{ label: 'Access', to: '/admin/members', icon: ShieldCheck }]
: []),
diff --git a/propr-ui/src/components/SidebarNavigation.test.tsx b/propr-ui/src/components/SidebarNavigation.test.tsx
new file mode 100644
index 000000000..bf3577280
--- /dev/null
+++ b/propr-ui/src/components/SidebarNavigation.test.tsx
@@ -0,0 +1,26 @@
+import { render, screen } from '@testing-library/react';
+import { MemoryRouter } from 'react-router-dom';
+import { describe, expect, it } from 'vitest';
+import { SidebarNavigation, type NavigationState } from './SidebarNavigation';
+
+const state: NavigationState = {
+ currentPath: '/plugins', desktop: false, hasAgents: true, hasRepos: true, hasTasks: true,
+ taskCount: 0, goalCount: 0, generatingPlansCount: 0, unreadCount: null,
+};
+const renderSidebar = (canManagePlugins?: boolean) => render(
+
+
+ ,
+);
+
+describe('SidebarNavigation', () => {
+ it('links Plugins for administrators who may manage plugins', () => {
+ renderSidebar(true);
+ expect(screen.getByRole('link', { name: /Plugins/ })).toHaveAttribute('href', '/plugins');
+ });
+
+ it('hides Plugins from everyone else', () => {
+ renderSidebar(false);
+ expect(screen.queryByRole('link', { name: /Plugins/ })).not.toBeInTheDocument();
+ });
+});
diff --git a/propr-ui/src/components/SidebarNavigation.tsx b/propr-ui/src/components/SidebarNavigation.tsx
index 0166d03b6..336a2c23c 100644
--- a/propr-ui/src/components/SidebarNavigation.tsx
+++ b/propr-ui/src/components/SidebarNavigation.tsx
@@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import { Link } from 'react-router-dom';
import {
LayoutDashboard, ScrollText, ListTodo, BookMarked, Bot, ChartColumn, ChevronDown, ChevronRight,
- Cpu, Logs, Plug, Settings, ShieldCheck, Inbox, Target, TriangleAlert, Workflow,
+ Cpu, Logs, Plug, Puzzle, Settings, ShieldCheck, Inbox, Target, TriangleAlert, Workflow,
} from 'lucide-react';
import { SIDEBAR_ICON_STROKE_WIDTH, SIDEBAR_ICON_STROKE_CLASS } from './icons/sidebarIconStroke';
@@ -59,6 +59,7 @@ function getResourceNavigation(
canManageAgents: boolean,
canManageMembers: boolean,
canReadMcpLog: boolean,
+ canManagePlugins = false,
): NavEntry[] {
const navigation: NavEntry[] = [{ name: 'Repositories', href: '/repositories', icon: BookMarked }];
if (canManageAgents) navigation.push({ name: 'Coding Agents', href: '/ai-agents', icon: Bot });
@@ -71,6 +72,8 @@ function getResourceNavigation(
{ name: 'Logs', icon: Logs, items: logs },
{ name: 'Settings', href: '/settings', icon: Settings },
);
+ // Plugins need a durable administrator who may change instance settings, as their API does.
+ if (canManagePlugins) navigation.push({ name: 'Plugins', href: '/plugins', icon: Puzzle });
if (canManageMembers) navigation.push({ name: 'Access', href: '/admin/members', icon: ShieldCheck });
return navigation;
}
@@ -279,12 +282,13 @@ function NavigationEntry({ entry, state }: { entry: NavEntry; state: NavigationS
*/
export function SidebarNavigation({ state, permissions }: {
state: NavigationState;
- permissions: { canManageAgents: boolean; canManageMembers: boolean; canReadMcpLog: boolean };
+ permissions: { canManageAgents: boolean; canManageMembers: boolean; canReadMcpLog: boolean; canManagePlugins?: boolean };
}) {
const resources = getResourceNavigation(
permissions.canManageAgents,
permissions.canManageMembers,
permissions.canReadMcpLog,
+ permissions.canManagePlugins,
);
return (
} />
+
+
+ ,
+ );
+}
diff --git a/propr-ui/src/pages/PluginsPage/pluginUi.test.ts b/propr-ui/src/pages/PluginsPage/pluginUi.test.ts
new file mode 100644
index 000000000..63889c1b4
--- /dev/null
+++ b/propr-ui/src/pages/PluginsPage/pluginUi.test.ts
@@ -0,0 +1,37 @@
+import { describe, expect, it } from 'vitest';
+import { describePluginContributions, pluginBadge, safeHttpsUrl, secretAcknowledgementText } from './pluginUi';
+import { exampleAt, examplePlugin } from './pluginFixtures.testUtils';
+
+describe('plugin page helpers', () => {
+ it('follows each step with the state badge', () => {
+ expect(pluginBadge(examplePlugin())).toBe('not_installed');
+ expect(pluginBadge(exampleAt('installed'))).toBe('needs_connection');
+ expect(pluginBadge(exampleAt('connected'))).toBe('off');
+ expect(pluginBadge(exampleAt('enabled'))).toBe('enabled');
+ const enabled = exampleAt('enabled');
+ expect(pluginBadge({ ...enabled, connections: enabled.connections.map(c => ({ ...c, state: 'needs_sign_in' as const })) })).toBe('degraded');
+ expect(pluginBadge({ ...enabled, available: false })).toBe('degraded');
+ expect(pluginBadge({ ...enabled, needsApproval: true })).toBe('needs_approval');
+ });
+
+ it('describes what the plugin adds in plain words', () => {
+ expect(describePluginContributions(examplePlugin().manifest!)).toEqual([
+ 'Adds 1 MCP server the agent can read from',
+ 'Runs 1 local server inside the task container',
+ 'Adds 1 skill the agent reads when relevant: example-notes',
+ 'Adds 1 automation template: example-weekly-digest',
+ 'Adds the /deploy command',
+ 'Sends requests to api.example.com',
+ ]);
+ });
+
+ it('links only https URLs', () => {
+ expect(safeHttpsUrl('https://example.com/docs')).toBe('https://example.com/docs');
+ for (const url of ['http://example.com', 'javascript:alert(1)', 'data:text/html,x', 'not a url', undefined]) expect(safeHttpsUrl(url)).toBeNull();
+ });
+
+ it('names the package, exact version and variables in the acknowledgement', () => {
+ expect(secretAcknowledgementText({ package: 'pkg', version: '1.2.3', secretEnv: ['A', 'B'] }))
+ .toBe('I understand that pkg@1.2.3 receives the secret variables A, B, and that they are readable by the agent CLI, its shell tools and repository setup scripts inside the task container.');
+ });
+});
diff --git a/propr-ui/src/pages/PluginsPage/pluginUi.ts b/propr-ui/src/pages/PluginsPage/pluginUi.ts
new file mode 100644
index 000000000..a29fd1d8a
--- /dev/null
+++ b/propr-ui/src/pages/PluginsPage/pluginUi.ts
@@ -0,0 +1,84 @@
+import type { PublicPluginMcpServer } from '@propr/shared';
+import type { PluginManifestView, PluginView } from '../../api/pluginsApi';
+
+export { buttonClass, dangerButtonClass, inputClass, primaryButtonClass } from '../SettingsPage/extensions/extensionUi';
+
+export { canManagePlugins } from '../SettingsPage/settingsPermissions';
+
+/** Where an enabled plugin's managed items are listed and edited. */
+export const EXTENSION_LIBRARY_PATH = '/settings?tab=agent-extensions';
+export const PLUGINS_PATH = '/plugins';
+export const pluginPath = (id: string) => `${PLUGINS_PATH}/${encodeURIComponent(id)}`;
+
+export const CATEGORY_LABELS: Record = {
+ messaging: 'Messaging', 'issue-tracking': 'Issue tracking', observability: 'Observability',
+ deployment: 'Deployment', context: 'Context', other: 'Other',
+};
+
+export type PluginBadge = 'not_installed' | 'enabled' | 'off' | 'needs_connection' | 'needs_approval' | 'degraded';
+export const BADGES: Record = {
+ not_installed: { label: 'Not installed', className: 'bg-slate-100 text-slate-700' },
+ enabled: { label: 'Enabled', className: 'bg-teal-50 text-teal-800' },
+ off: { label: 'Off', className: 'bg-slate-200 text-slate-700' },
+ needs_connection: { label: 'Needs connection', className: 'bg-amber-100 text-amber-900' },
+ needs_approval: { label: 'Needs approval', className: 'bg-amber-100 text-amber-900' },
+ degraded: { label: 'Degraded', className: 'bg-red-50 text-red-800' },
+};
+
+const disconnected = (view: PluginView) => view.connections.some(c => c.state !== 'connected');
+
+/**
+ * The one state badge of a plugin. An upgrade awaiting approval wins; an
+ * enabled plugin missing a connection, or no longer in the registry, is
+ * degraded; a disabled one missing a connection needs it.
+ */
+export function pluginBadge(view: PluginView): PluginBadge {
+ if (!view.installation) return 'not_installed';
+ if (view.needsApproval) return 'needs_approval';
+ if (!view.available) return 'degraded';
+ if (view.installation.enabled) return disconnected(view) ? 'degraded' : 'enabled';
+ return disconnected(view) ? 'needs_connection' : 'off';
+}
+
+/** Only `https` URLs become links; anything else from a manifest is shown as text or not at all. */
+export function safeHttpsUrl(value: unknown): string | null {
+ if (typeof value !== 'string') return null;
+ try { return new URL(value).protocol === 'https:' ? value : null; } catch { return null; }
+}
+
+const count = (n: number, one: string, many: string) => `${n} ${n === 1 ? one : many}`;
+export const mcpServersOf = (manifest: PluginManifestView) => manifest.contributes.mcpServers as unknown as PublicPluginMcpServer[];
+export type PluginPackageSecretServer = Extract;
+/** Package servers that hand secret variables to the task container. */
+export const packageSecretServers = (manifest: PluginManifestView): PluginPackageSecretServer[] =>
+ mcpServersOf(manifest).flatMap(server => (server.kind === 'package' && server.secretEnv.length ? [server] : []));
+
+/** What a plugin adds, in plain words, generated from its manifest. */
+export function describePluginContributions(manifest: PluginManifestView): string[] {
+ const servers = mcpServersOf(manifest);
+ const remote = servers.filter(s => s.kind === 'https');
+ const read = remote.filter(s => s.capability === 'read').length;
+ const write = remote.length - read;
+ const local = servers.filter(s => s.kind === 'package').length;
+ const { skills, automationTemplates, commands, subscriptions, webhooks } = manifest.contributes;
+ const lines: string[] = [];
+ if (read) lines.push(`Adds ${count(read, 'MCP server', 'MCP servers')} the agent can read from`);
+ if (write) lines.push(`Adds ${count(write, 'MCP server', 'MCP servers')} the agent can read from and write to`);
+ if (local) lines.push(`Runs ${count(local, 'local server', 'local servers')} inside the task container`);
+ if (skills.length) lines.push(`Adds ${count(skills.length, 'skill', 'skills')} the agent reads when relevant: ${skills.join(', ')}`);
+ if (automationTemplates.length) lines.push(`Adds ${count(automationTemplates.length, 'automation template', 'automation templates')}: ${automationTemplates.join(', ')}`);
+ for (const command of commands) lines.push(`Adds the /${command.name} command`);
+ if (subscriptions.length) lines.push(`Receives ProPR events: ${subscriptions.join(', ')}`);
+ if (webhooks.length) lines.push(`Receives ${count(webhooks.length, 'webhook', 'webhooks')} from a service`);
+ if (manifest.outboundHosts.length) lines.push(`Sends requests to ${manifest.outboundHosts.join(', ')}`);
+ return lines.length ? lines : ['Adds nothing the agent uses yet'];
+}
+
+/** The acknowledgement text of one package server: its package, exact version and variable names. */
+export function secretAcknowledgementText(server: { package: string; version: string; secretEnv: string[] }) {
+ const variables = server.secretEnv.join(', ');
+ return `I understand that ${server.package}@${server.version} receives ${server.secretEnv.length === 1 ? 'the secret variable' : 'the secret variables'} ${variables}, `
+ + 'and that they are readable by the agent CLI, its shell tools and repository setup scripts inside the task container.';
+}
+
+export const formatWhen = (at: number) => new Date(at).toLocaleString();
diff --git a/propr-ui/src/pages/PluginsPage/usePluginDetail.ts b/propr-ui/src/pages/PluginsPage/usePluginDetail.ts
new file mode 100644
index 000000000..3c379e4d3
--- /dev/null
+++ b/propr-ui/src/pages/PluginsPage/usePluginDetail.ts
@@ -0,0 +1,124 @@
+import { useCallback, useEffect, useRef, useState } from 'react';
+import { getExtensionLibrary } from '../../api/extensionProfilesApi';
+import {
+ approvePlugin, disconnectPluginOAuth, getPlugin, installPlugin, setPluginConnection, setPluginEnabled, setPluginRepositories,
+ startPluginOAuth, uninstallPlugin, type PluginView,
+} from '../../api/pluginsApi';
+
+/** The sign-in result page posts on this channel when the API shares the page's origin. */
+const OAUTH_CHANNEL = 'propr-extension-oauth';
+/** Connect stays available when the redirect URI could not be read; the API then explains a refusal. */
+const UNKNOWN_REDIRECT = 'unknown';
+
+type Area = 'general' | 'uninstall';
+const message = (error: unknown) => (error instanceof Error ? error.message : 'Plugin operation unavailable.');
+
+/** The redirect URI of the extension OAuth sign-in, read only when the plugin has an OAuth connection. */
+function useRedirectUri(view: PluginView | null) {
+ const needed = Boolean(view?.installation && view.connections.some(c => c.type === 'oauth'));
+ const [redirectUri, setRedirectUri] = useState(UNKNOWN_REDIRECT);
+ useEffect(() => {
+ if (!needed) return;
+ let active = true;
+ void getExtensionLibrary().then(result => { if (active && result.oauth) setRedirectUri(result.oauth.redirectUri); }).catch(() => {});
+ return () => { active = false; };
+ }, [needed]);
+ return redirectUri;
+}
+
+/** Load one plugin and run each step's action, keeping the latest plugin read. */
+export function usePluginDetail(id: string) {
+ const [view, setView] = useState(null);
+ const [loadError, setLoadError] = useState('');
+ const [errors, setErrors] = useState>({ general: '', uninstall: '' });
+ const [notice, setNotice] = useState('');
+ const [busy, setBusy] = useState(false);
+ const [oauthBusy, setOAuthBusy] = useState(null);
+ const [signingIn, setSigningIn] = useState(false);
+ const current = useRef(id);
+ current.current = id;
+
+ // Every read and every mutation boundary takes the next number; a read applies only while it is still the latest,
+ // so a read started before (or during) a mutation never replaces the state that mutation returned.
+ const sequence = useRef(0);
+ // One plugin mutation at a time, claimed synchronously so a second click cannot start before the re-render.
+ const mutating = useRef(false);
+
+ const reload = useCallback(async () => {
+ const at = ++sequence.current;
+ const latest = () => current.current === id && sequence.current === at && !mutating.current;
+ try {
+ const { plugin } = await getPlugin(id);
+ if (latest()) { setView(plugin); setLoadError(''); }
+ } catch (error) { if (latest()) setLoadError(message(error)); }
+ }, [id]);
+ useEffect(() => { setView(null); setLoadError(''); void reload(); }, [reload]);
+
+ // Refresh after a sign-in in another tab: on focus, on return to the tab, or when the result page posts.
+ useEffect(() => {
+ if (!signingIn) return;
+ const refresh = () => { if (document.visibilityState !== 'hidden') void reload(); };
+ window.addEventListener('focus', refresh);
+ document.addEventListener('visibilitychange', refresh);
+ const channel = typeof BroadcastChannel === 'undefined' ? null : new BroadcastChannel(OAUTH_CHANNEL);
+ if (channel) channel.onmessage = refresh;
+ return () => { window.removeEventListener('focus', refresh); document.removeEventListener('visibilitychange', refresh); channel?.close(); };
+ }, [signingIn, reload]);
+
+ const run = useCallback(async (work: () => Promise<{ plugin: PluginView }>, done: string, area: Area = 'general') => {
+ if (mutating.current) return false;
+ mutating.current = true; sequence.current += 1;
+ setBusy(true); setErrors({ general: '', uninstall: '' }); setNotice('');
+ let failed = false;
+ try {
+ const { plugin } = await work();
+ setView(plugin); setNotice(done);
+ return true;
+ } catch (error) {
+ failed = true;
+ setErrors(values => ({ ...values, [area]: message(error) }));
+ return false;
+ } finally {
+ // Reads that started before or during the mutation are now stale.
+ sequence.current += 1; mutating.current = false;
+ setBusy(false);
+ // A refused mutation returns no plugin: read the current state again instead of keeping a dropped read's gap.
+ if (failed) void reload();
+ }
+ }, [reload]);
+
+ /** Open the provider's sign-in page in a new tab, inside the click so it is not blocked, detached from this page. */
+ const connectOAuth = useCallback(async (name: string) => {
+ const tab = window.open('', '_blank');
+ if (tab) tab.opener = null;
+ setOAuthBusy(name); setErrors({ general: '', uninstall: '' }); setNotice('');
+ try {
+ const { authorizationUrl } = await startPluginOAuth(id, name);
+ if (tab) tab.location.href = authorizationUrl; else window.open(authorizationUrl, '_blank', 'noopener,noreferrer');
+ setSigningIn(true);
+ setNotice('Finish signing in in the new tab. This page refreshes when you come back.');
+ } catch (error) {
+ tab?.close();
+ setErrors(values => ({ ...values, general: `The sign-in could not start: ${message(error)}` }));
+ } finally { setOAuthBusy(null); }
+ }, [id]);
+ const disconnectOAuth = useCallback(async (name: string) => {
+ if (mutating.current) return;
+ setOAuthBusy(name);
+ try { await run(() => disconnectPluginOAuth(id, name), 'Disconnected. Its stored tokens were deleted.'); } finally { setOAuthBusy(null); }
+ }, [id, run]);
+
+ return {
+ view, loadError, errors, notice, busy, reload,
+ redirectUri: useRedirectUri(view),
+ // Another plugin mutation also holds the OAuth controls, so a disconnect cannot race it.
+ oauthBusy: (name: string) => busy || oauthBusy === name,
+ connectOAuth, disconnectOAuth,
+ install: (acknowledged: string[]) => run(() => installPlugin(id, acknowledged), 'Installed. Connect it, then enable it.'),
+ approve: (acknowledged: string[]) => run(() => approvePlugin(id, acknowledged), 'Approved.'),
+ setSecret: (name: string, value: string | null) => run(() => setPluginConnection(id, name, value), value === null ? 'Connection cleared.' : 'Connection saved.'),
+ setRepositories: (repositories: string[]) => run(() => setPluginRepositories(id, repositories), 'Repository limit saved.'),
+ setEnabled: (enabled: boolean) => run(() => setPluginEnabled(id, enabled), enabled ? 'Enabled.' : 'Disabled. Its settings and connections are kept.'),
+ uninstall: () => run(() => uninstallPlugin(id), 'Uninstalled.', 'uninstall'),
+ };
+}
diff --git a/propr-ui/src/pages/SettingsPage/AgentExtensionsSection.tsx b/propr-ui/src/pages/SettingsPage/AgentExtensionsSection.tsx
index 52424cdf8..c3f4c8e2c 100644
--- a/propr-ui/src/pages/SettingsPage/AgentExtensionsSection.tsx
+++ b/propr-ui/src/pages/SettingsPage/AgentExtensionsSection.tsx
@@ -1,4 +1,7 @@
import { useState } from 'react';
+import { Link, useInRouterContext } from 'react-router-dom';
+import { useCurrentUser } from '../../contexts/AuthContext';
+import { canManagePlugins } from './settingsPermissions';
import type { ExtensionLibraryRevision } from '@propr/shared';
import { extensionLibraryHistory, validateExtensionLibrary } from '../../api/extensionProfilesApi';
import { SettingsSection } from './SettingsLayout';
@@ -46,6 +49,19 @@ function LibraryTools({ state, library }: { state: ExtensionLibraryState; librar
);
}
+/** Instance Settings links administrators to the Plugins page, which adds managed items here. */
+function PluginsLink() {
+ const user = useCurrentUser();
+ const routed = useInRouterContext();
+ if (!routed || !canManagePlugins(user)) return null;
+ return (
+
+ Plugins add MCP servers, skills and automation templates in one place, with their connections.{' '}
+ Open Plugins
+
+ );
+}
+
/** Instance Settings → Skills & MCP servers: the extension library as two flat lists. */
export default function AgentExtensionsSection() {
const state = useExtensionLibrary();
@@ -53,6 +69,7 @@ export default function AgentExtensionsSection() {
return (
}>
+
{state.error &&
{state.error}
}
{state.notice &&
{state.notice}
}
{!library && !state.error &&
Loading the extension library…
}
diff --git a/propr-ui/src/pages/SettingsPage/settingsPermissions.ts b/propr-ui/src/pages/SettingsPage/settingsPermissions.ts
index eff81fa9a..7912e8a15 100644
--- a/propr-ui/src/pages/SettingsPage/settingsPermissions.ts
+++ b/propr-ui/src/pages/SettingsPage/settingsPermissions.ts
@@ -8,3 +8,7 @@ export const canManageInstanceStorage = (user: CurrentUser | null): user is Curr
/** Follow-up handoffs held for an operator. */
export const canManageHeldFollowups = (user: CurrentUser | null): user is CurrentUser =>
user?.role === 'admin' && userHasPermission(user, 'instance.manage_runtime');
+
+/** Plugins: a durable administrator who may change instance settings, as the plugin API requires. */
+export const canManagePlugins = (user: CurrentUser | null): user is CurrentUser =>
+ user?.role === 'admin' && userHasPermission(user, 'instance.manage_settings');
diff --git a/propr-ui/src/routeChunks.ts b/propr-ui/src/routeChunks.ts
index bad479aa2..0908e112e 100644
--- a/propr-ui/src/routeChunks.ts
+++ b/propr-ui/src/routeChunks.ts
@@ -18,6 +18,7 @@ const loadInboxPage = preloadable(() => import('./pages/InboxPage'));
const loadLoginPage = preloadable(() => import('./pages/LoginPage'));
const loadDesktopPairingPage = preloadable(() => import('./pages/DesktopPairingPage'));
const loadPlansPage = preloadable(() => import('./pages/PlansPage'));
+const loadPluginsPage = preloadable(() => import('./pages/PluginsPage'));
const loadPlanStudioPage = preloadable(() => import('./pages/PlanStudioPage'));
const loadRepositoriesPage = preloadable(() => import('./pages/RepositoriesPage'));
const loadRevertPage = preloadable(() => import('./pages/RevertPage'));
@@ -37,6 +38,7 @@ export const InboxPage = lazy(loadInboxPage);
export const LoginPage = lazy(loadLoginPage);
export const DesktopPairingPage = lazy(loadDesktopPairingPage);
export const PlansPage = lazy(loadPlansPage);
+export const PluginsPage = lazy(loadPluginsPage);
export const PlanStudioPage = lazy(loadPlanStudioPage);
export const RepositoriesPage = lazy(loadRepositoriesPage);
export const RevertPage = lazy(loadRevertPage);
@@ -64,6 +66,7 @@ const initialRouteChunks: Array<{
{ matches: pathname => pathname === '/ai-agents', load: loadAiAgentsPage },
{ matches: pathname => pathname === '/settings', load: loadSettingsPage },
{ matches: pathname => pathname === '/admin/members', load: loadAccessManagementPage },
+ { matches: pathname => pathname === '/plugins' || pathname.startsWith('/plugins/'), load: loadPluginsPage },
{ matches: pathname => pathname.startsWith('/summaries/'), load: loadSummaryBrowserPage },
{ matches: pathname => pathname === '/llm-logs', load: loadLlmLogsPage },
{ matches: pathname => pathname === '/mcp-logs', load: loadMcpLogsPage },