connectors: merge the catalog page into a row-list Connectors page
Nightly Build / build (push) Successful in 6m57s

The standalone Catalog page added nothing the Connectors page could not
do: drop it (component, route, sidebar entry) and move its affordances
onto the Connectors page — the Add-connector dropdown (marketplace /
manual form, now at #connectors/new) and per-row removal for the admin.

Replace the card grid with a sharper row list (4px radius) built for
scanning status and acting; the marketplace's back link now returns to
#connectors. i18n keys renamed catalog.* -> connectors.add/new/*.
This commit is contained in:
2026-07-27 21:01:32 +01:00
parent 165af19774
commit b198ac923b
13 changed files with 465 additions and 605 deletions
+2 -2
View File
@@ -190,7 +190,7 @@ MCP servers are surfaced to users as **"Connectors"** (UI naming; `mcp`/schema s
**Tables** (see DB section) — registry: `mcp_catalog` (admin-vetted templates; holds only the *schema* of what an activation must supply, never live creds — plus, for OAuth, `oauth_provider` + `oauth_scopes_json` + `deliver_json`), `mcp_global_servers` + `mcp_global_access`, `oauth_providers` (per-provider client creds), `role_capabilities`. Owner: `mcp_user_servers` (per-user activations; `api_key` encrypted at rest — the refresh token for an OAuth one — `catalog_name`/`oauth_provider`/`deliver_json` bare `TEXT` snapshots).
**Endpoints** (`src/frontend/api/mcp.rs`, mounted in `api/mod.rs`) — admin: `/mcp/catalog` (GET/POST/DELETE), `/mcp/global` (list/enable/delete + `/{id}/access` GET/PUT), `/mcp/providers` (GET/POST + DELETE `/{name}` — OAuth provider creds, secret never returned to the browser). User: `/mcp/available`, `/mcp/activate`, `/mcp/activated` (+ DELETE `/{id}` to deactivate), `/mcp/oauth/start` + `/mcp/oauth/complete` (the §15 OAuth login), `/mcp/login/status` + `/mcp/login/reset` (the §15 QR/device login — see below). `connectors.js` (`<connectors-page>`) renders the user view (activate/deactivate + granted globals) always, plus the admin view (catalog + global + per-server access + a **Sign-in providers** modal) when `role_id === 'admin'`; `connector-detail.js` (`<connector-detail-page>`) is a connector's own page and hosts both the OAuth login panel and the QR login panel.
**Endpoints** (`src/frontend/api/mcp.rs`, mounted in `api/mod.rs`) — admin: `/mcp/catalog` (GET/POST/DELETE), `/mcp/global` (list/enable/delete + `/{id}/access` GET/PUT), `/mcp/providers` (GET/POST + DELETE `/{name}` — OAuth provider creds, secret never returned to the browser). User: `/mcp/available`, `/mcp/activate`, `/mcp/activated` (+ DELETE `/{id}` to deactivate), `/mcp/oauth/start` + `/mcp/oauth/complete` (the §15 OAuth login), `/mcp/login/status` + `/mcp/login/reset` (the §15 QR/device login — see below). `connectors.js` (`<connectors-page>`) is the **single** Connectors surface — a row list, one row per connector (there is no separate catalog page): the user view (activate/deactivate + granted globals) always, plus the admin affordances when `role_id === 'admin'` — the **Add connector** dropdown (from the Marketplace, or manually via the `#connectors/new` sub-page), per-row removal from the catalog, and the **Sign-in providers** modal. The Marketplace stays its own page (`marketplace.js`), reached from that dropdown and linking back to `#connectors`. `connector-detail.js` (`<connector-detail-page>`) is a connector's own page and hosts both the OAuth login panel and the QR login panel.
**Dependency reconciler (`mcp::install::ensure_installed`).** Copying a local-script connector's files into a container never installed its deps. `ensure_installed` closes that: a **content-hash reconciler** keyed on the connector's *source* files (not a version string) that, when the hash changed, re-copies the files and installs deps inside the container — `npm ci --omit=dev` (node, from `package.json`) and/or `pip install --target .pydeps` (python, from `requirements.txt`, put on the server's `PYTHONPATH` by `user_row_spec`). Runs at activation **and** on every per-user startup path (`UserContext` build, remount) via `mcp::prepare_local_connector`, so a fresh container installs from scratch, an updated connector re-installs, and an unchanged one is a hash-match no-op. Deps are therefore **never vendored** — connectors ship `package.json`/`requirements.txt`, not `node_modules/`. Authoring contract for connectors lives in `scripts/CONNECTOR_MANIFEST_GUIDE.md`.
@@ -387,7 +387,7 @@ The role editor (`roles-page.js`) sets the default group + an allowed-groups che
| `agent-inbox.js` | `<agent-inbox-page>` | Pending approvals + clarifications from background sessions |
| `approval-rules.js` | `<approval-rules-page>` | Approval rule management |
| `cron-jobs.js` | `<cron-jobs-page>` | Scheduled job management |
| `connectors.js` | `<connectors-page>` | MCP Connectors list (one row per connector): user activate/deactivate + granted globals; admin gets a **Sign-in providers** modal (OAuth client creds) + Catalog/Marketplace nav (§7/§14/§15) |
| `connectors.js` | `<connectors-page>` | MCP Connectors row list (one row per connector): user activate/deactivate + granted globals; admin also gets the **Add connector** dropdown (Marketplace / manual form at `#connectors/new`), per-row removal from the catalog, and the **Sign-in providers** modal (§7/§14/§15) |
| `plugins-page.js` | `<plugins-page>` | `#plugins` — user half: granted plugins + schema-driven per-user config form |
| `plugin-catalog.js` | `<plugin-catalog>` | `#plugin-catalog` — admin status board: one card per plugin (enable toggle + health dot + Configure → `#plugin-detail`) |
| `plugin-detail.js` | `<plugin-detail>` | `#plugin-detail?id=<id>` — one plugin's admin page: instance-config form (`config_schema`) + per-user access checklist (plugin twin of `connector-detail.js`) |
-2
View File
@@ -19,7 +19,6 @@ import { PluginPageHost } from './components/plugin-page-host.js';
import { PluginCatalogPage } from './components/plugin-catalog.js';
import { PluginDetailPage } from './components/plugin-detail.js';
import { MarketplacePage } from './components/marketplace.js';
import { CatalogPage } from './components/catalog.js';
import { ProfilePage } from './components/profile-page.js';
import { ApprovalGroupsPage } from './components/approval-groups.js';
import { ApprovalRulesPage } from './components/approval-rules.js';
@@ -62,7 +61,6 @@ customElements.define('plugin-page-host', PluginPageHost);
customElements.define('plugin-catalog-page', PluginCatalogPage);
customElements.define('plugin-detail-page', PluginDetailPage);
customElements.define('marketplace-page', MarketplacePage);
customElements.define('catalog-page', CatalogPage);
customElements.define('profile-page', ProfilePage);
customElements.define('approval-groups-page', ApprovalGroupsPage);
customElements.define('approval-rules-page', ApprovalRulesPage);
-356
View File
@@ -1,356 +0,0 @@
import { html, nothing } from 'lit';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { LightElement } from '../lib/base.js';
import { t } from '../lib/i18n.js';
// Connector catalog — blueprint §14/§15. Admin only.
//
// One question: **what does this box offer?** The catalog is the shelf; nothing here
// is running. A `global` entry still needs the admin to enable it and a `per_user`
// one still needs each user to activate it — both of which happen on the Connectors
// page, where the runtime lives.
//
// Adding is one intent with two sources, so it is one button with two options rather
// than two distant affordances. Their order mirrors the trust model (§14): the
// marketplace path is vetted and hash-verified, the manual path is the escape hatch
// that puts unvetted code on the box — which is why it needs `mcp.register_local_script`
// and why it sits second.
//
// The manual path is a dedicated page (`#catalog/new`), not a dialog: the form is
// long and technical, a fixed modal grew taller than the viewport with no way to
// scroll, and a click on the overlay discarded everything typed so far. A page
// scrolls, and leaving it is a deliberate navigation.
//
// Reuses the shared `um-*` / bootstrap styling (no page-specific CSS).
const ADMIN_ID = 'admin';
async function jf(url, opts) {
const res = await fetch(url, opts);
if (!res.ok) throw new Error(await res.text() || `HTTP ${res.status}`);
const ct = res.headers.get('content-type') || '';
return ct.includes('application/json') ? res.json() : null;
}
export class CatalogPage extends LightElement {
static get properties() {
return {
_open: { state: true },
_me: { state: true },
_rows: { state: true },
_addOpen: { state: true }, // the "Add connector" chooser
_error: { state: true },
_view: { state: true }, // 'list' | 'new'
_form: { state: true }, // manual-entry fields, when _view === 'new'
};
}
constructor() {
super();
this._open = false;
this._reset();
}
_reset() {
this._me = null;
this._rows = null;
this._addOpen = false;
this._error = null;
this._view = 'list';
this._form = null;
}
connectedCallback() {
super.connectedCallback();
this.__onLocaleChanged = () => this.requestUpdate();
window.addEventListener('locale-changed', this.__onLocaleChanged);
window.addEventListener('llm-page-change', (e) => {
this._open = e.detail.page === 'catalog';
this.style.display = this._open ? 'flex' : 'none';
if (this._open) { this._syncViewFromHash(); this._load(); }
});
window.addEventListener('hashchange', () => {
if (this._open) this._syncViewFromHash();
});
document.addEventListener('click', () => { if (this._addOpen) this._addOpen = false; });
}
disconnectedCallback() {
window.removeEventListener('locale-changed', this.__onLocaleChanged);
super.disconnectedCallback();
}
get _isAdmin() { return this._me?.role_id === ADMIN_ID; }
async _load() {
this._error = null;
try {
this._me = await jf('/api/auth/me');
if (!this._isAdmin) return;
this._rows = await jf('/api/mcp/catalog');
} catch (e) {
this._error = e.message;
}
}
_goMarketplace() {
this._addOpen = false;
history.pushState({ page: 'marketplace' }, '', '#marketplace');
window.dispatchEvent(new CustomEvent('llm-page-change', { detail: { page: 'marketplace' } }));
}
_goConnectors() {
history.pushState({ page: 'connectors' }, '', '#connectors');
window.dispatchEvent(new CustomEvent('llm-page-change', { detail: { page: 'connectors' } }));
}
// ── Manual entry ───────────────────────────────────────────────────────────
// The `new` view is derived from the `#catalog/new` sub-route, so the browser's
// Back/Forward works and a pasted URL lands on the form. Entering the view
// always starts a fresh form.
_syncViewFromHash() {
const parts = location.hash.slice(1).split('/');
const wantsNew = parts[0] === 'catalog' && parts[1] === 'new';
if (wantsNew && this._view !== 'new') {
this._error = null;
this._form = {
name: '', scope: 'per_user', source: 'remote', transport: 'stdio',
command: '', args: '', url: '', script_path: '', config_schema: '',
auth_kind: 'none', friendly_name: '', description: '',
};
}
this._view = wantsNew ? 'new' : 'list';
}
_openManual() {
this._addOpen = false;
history.pushState({ page: 'catalog', view: 'new' }, '', '#catalog/new');
this._syncViewFromHash();
}
_closeNew() {
// Prefer real history so the browser's own Back stays consistent; fall back to
// the list when this page was opened straight from a pasted URL.
if (history.length > 1) { history.back(); return; }
history.pushState({ page: 'catalog' }, '', '#catalog');
this._view = 'list';
}
_patch(field, value) {
this._form = { ...this._form, [field]: value };
}
async _saveManual() {
const f = this._form;
if (!f.name.trim()) { this._error = t('catalog.error.name'); return; }
const listField = (s) => s.split(/[\n,]/).map(x => x.trim()).filter(Boolean);
try {
await jf('/api/mcp/catalog', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: f.name.trim(),
scope: f.scope,
source: f.source,
transport: f.transport,
command: f.command.trim() || null,
args: f.args.trim() ? listField(f.args) : null,
url: f.url.trim() || null,
script_path: f.script_path.trim() || null,
config_schema: f.config_schema.trim() ? listField(f.config_schema) : null,
auth_kind: f.auth_kind,
friendly_name: f.friendly_name.trim() || null,
description: f.description.trim() || null,
}),
});
this._view = 'list';
this._form = null;
history.pushState({ page: 'catalog' }, '', '#catalog');
await this._load();
} catch (e) { this._error = e.message; }
}
async _delete(row) {
if (!confirm(t('catalog.confirm.delete', { name: row.name }))) return;
try {
await jf(`/api/mcp/catalog/${row.id}`, { method: 'DELETE' });
await this._load();
} catch (e) { this._error = e.message; }
}
// ── Render ─────────────────────────────────────────────────────────────────
render() {
if (!this._open) return nothing;
if (this._view === 'new') return this._renderNew();
const rows = this._rows ?? [];
const loading = this._rows === null && !this._error && this._isAdmin;
return html`
<div class="um-page">
<div class="um-header">
<h2 class="um-title"><i class="bi bi-journal-text me-2"></i>${t('catalog.title')}</h2>
<div class="um-header-right">
${this._isAdmin ? this._renderAddButton() : nothing}
</div>
</div>
${this._error ? html`
<div class="alert alert-danger py-2 mx-4" style="font-size:.85rem">${this._error}</div>` : nothing}
<div style="padding:0 1.25rem 1.5rem; overflow:auto">
${this._me && !this._isAdmin ? html`
<div class="um-empty" style="padding:2rem">
<i class="bi bi-shield-lock"></i>
<p>${t('catalog.not_admin')}</p>
<p style="font-size:.8rem;opacity:.7">${unsafeHTML(t('catalog.not_admin_link'))}</p>
</div>
` : loading ? html`
<div class="um-empty" style="padding:1rem"><i class="bi bi-hourglass-split"></i><p>${t('catalog.loading')}</p></div>
` : html`
<div class="text-muted mt-3 mb-3" style="font-size:.8rem">${unsafeHTML(t('catalog.desc'))}</div>
${rows.length === 0 ? this._renderEmpty() : this._renderTable(rows)}
`}
</div>
</div>`;
}
// Bootstrap's own dropdown classes, not a hand-rolled panel: 5.3 themes
// `.dropdown-menu`/`.dropdown-item` from `data-bs-theme`, so this follows the
// light/dark switch for free. `.show` opens it — the state is ours, not
// Bootstrap's JS.
_renderAddButton() {
return html`
<div class="dropdown" style="position:relative" @click=${(e) => e.stopPropagation()}>
<button class="btn btn-sm btn-primary" @click=${() => { this._addOpen = !this._addOpen; }}>
<i class="bi bi-plus-lg me-1"></i>${t('catalog.btn.add')}
<i class="bi bi-chevron-down ms-1" style="font-size:.7rem"></i>
</button>
${this._addOpen ? html`
<div class="dropdown-menu show" style="right:0;left:auto;top:calc(100% + .25rem);min-width:280px">
<button class="dropdown-item" style="white-space:normal" @click=${() => this._goMarketplace()}>
<div style="display:flex;align-items:center;gap:.5rem">
<i class="bi bi-shop"></i><strong style="font-size:.85rem">${t('catalog.dropdown.marketplace')}</strong>
</div>
<div class="text-muted" style="font-size:.7rem;margin-top:.15rem">${t('catalog.dropdown.marketplace_desc')}</div>
</button>
<div class="dropdown-divider"></div>
<button class="dropdown-item" style="white-space:normal" @click=${() => this._openManual()}>
<div style="display:flex;align-items:center;gap:.5rem">
<i class="bi bi-pencil"></i><strong style="font-size:.85rem">${t('catalog.dropdown.manual')}</strong>
</div>
<div class="text-muted" style="font-size:.7rem;margin-top:.15rem">${t('catalog.dropdown.manual_desc')}</div>
</button>
</div>` : nothing}
</div>`;
}
_renderEmpty() {
return html`
<div class="um-empty" style="padding:2rem">
<i class="bi bi-journal"></i>
<p>${t('catalog.empty.title')}</p>
<p style="font-size:.8rem;opacity:.7">${t('catalog.empty.hint')}</p>
<button class="btn btn-sm btn-primary mt-2" @click=${() => this._goMarketplace()}>
<i class="bi bi-shop me-1"></i>${t('catalog.empty.action')}
</button>
</div>`;
}
_renderTable(rows) {
return html`
<table class="um-table">
<thead><tr><th>${t('catalog.table.connector')}</th><th>${t('catalog.table.scope')}</th><th>${t('catalog.table.type')}</th><th>${t('catalog.table.auth')}</th><th></th></tr></thead>
<tbody>
${rows.map(r => html`
<tr>
<td>
<strong>${r.friendly_name || r.name}</strong>
${r.friendly_name ? html` <code class="text-muted" style="font-size:.7rem">${r.name}</code>` : nothing}
${r.description ? html`
<div class="text-muted" style="font-size:.75rem;max-width:44ch;overflow:hidden;
text-overflow:ellipsis;white-space:nowrap" title=${r.description}>${r.description}</div>` : nothing}
</td>
<td><span class="badge ${r.scope === 'global' ? 'bg-info' : 'bg-secondary'}" style="font-size:.65rem">
${r.scope === 'global' ? t('catalog.badge.global') : t('catalog.badge.per_user')}</span></td>
<td><span class="badge ${r.source === 'local_script' ? 'bg-warning text-dark' : 'bg-secondary'}" style="font-size:.65rem">
${r.source === 'local_script' ? t('catalog.badge.local_script') : t('catalog.badge.remote')}</span></td>
<td><span class="text-muted" style="font-size:.78rem">${r.auth_kind}</span></td>
<td><div class="um-actions">
<button class="um-btn-icon" title=${t('catalog.action.remove')} @click=${() => this._delete(r)}>
<i class="bi bi-trash"></i></button>
</div></td>
</tr>`)}
</tbody>
</table>`;
}
_field(label, value, oninput, opts = {}) {
return html`<div class="mb-3">
<label class="form-label">${label}${opts.hint ? html` <span class="text-muted">(${opts.hint})</span>` : nothing}</label>
<input class="form-control ${opts.mono ? 'font-monospace' : ''}" type=${opts.type || 'text'}
placeholder=${opts.placeholder || ''} .value=${value} @input=${oninput} />
</div>`;
}
_area(label, value, oninput, opts = {}) {
return html`<div class="mb-3">
<label class="form-label">${label}${opts.hint ? html` <span class="text-muted">(${opts.hint})</span>` : nothing}</label>
<textarea class="form-control ${opts.mono ? 'font-monospace' : ''}" rows=${opts.rows || 3}
.value=${value} @input=${oninput}></textarea>
</div>`;
}
_select(label, value, options, onchange) {
return html`<div class="mb-3">
<label class="form-label">${label}</label>
<select class="form-select" @change=${onchange}>
${options.map(o => html`<option value=${o} ?selected=${value === o}>${o}</option>`)}
</select>
</div>`;
}
_renderNew() {
const f = this._form;
const isScript = f.source === 'local_script';
return html`
<div class="um-page">
<div class="um-header">
<div class="d-flex align-items-center gap-2" style="min-width:0">
<button class="btn btn-sm btn-outline-secondary" title=${t('catalog.new.back')} @click=${() => this._closeNew()}>
<i class="bi bi-arrow-left"></i>
</button>
<h2 class="um-title" style="min-width:0;overflow:hidden;text-overflow:ellipsis">
<i class="bi bi-pencil me-2"></i>${t('catalog.new.title')}</h2>
</div>
</div>
<div style="padding:0 1.25rem 2rem; overflow:auto">
<div style="max-width:620px">
${this._error ? html`<div class="alert alert-danger py-2 mb-3" style="font-size:.85rem">${this._error}</div>` : nothing}
${isScript ? html`
<div class="alert alert-warning py-2 mb-3" style="font-size:.78rem">${unsafeHTML(t('catalog.new.script_warn'))}</div>` : nothing}
${this._field(t('catalog.new.name'), f.name, e => this._patch('name', e.target.value), { hint: t('catalog.new.name_hint'), mono: true })}
${this._select(t('catalog.new.scope'), f.scope, ['per_user', 'global'], e => this._patch('scope', e.target.value))}
${this._select(t('catalog.new.type'), f.source, ['remote', 'local_script'], e => this._patch('source', e.target.value))}
${this._select(t('catalog.new.transport'), f.transport, ['stdio', 'http', 'sse'], e => this._patch('transport', e.target.value))}
${isScript
? html`${this._field(t('catalog.new.command'), f.command, e => this._patch('command', e.target.value), { placeholder: t('catalog.new.command_ph'), mono: true })}
${this._field(t('catalog.new.script_path'), f.script_path, e => this._patch('script_path', e.target.value), { hint: t('catalog.new.script_path_hint'), mono: true })}`
: this._field(t('catalog.new.url'), f.url, e => this._patch('url', e.target.value), { mono: true })}
${this._area(t('catalog.new.args'), f.args, e => this._patch('args', e.target.value), { hint: t('catalog.new.args_hint'), mono: true })}
${this._area(t('catalog.new.config_schema'), f.config_schema, e => this._patch('config_schema', e.target.value), { hint: t('catalog.new.config_schema_hint'), mono: true })}
${this._select(t('catalog.new.auth'), f.auth_kind, ['none', 'api_key', 'oauth', 'qr', 'ssh_key'], e => this._patch('auth_kind', e.target.value))}
${this._field(t('catalog.new.friendly'), f.friendly_name, e => this._patch('friendly_name', e.target.value))}
${this._area(t('catalog.new.desc'), f.description, e => this._patch('description', e.target.value), { hint: t('catalog.new.desc_hint'), rows: 2 })}
<div class="d-flex justify-content-end gap-2 mt-3">
<button class="btn btn-sm btn-outline-secondary" @click=${() => this._closeNew()}>${t('catalog.new.cancel')}</button>
<button class="btn btn-sm btn-primary" @click=${() => this._saveManual()}>
<i class="bi bi-check-lg me-1"></i>${t('catalog.new.save')}</button>
</div>
</div>
</div>
</div>`;
}
}
+265 -67
View File
@@ -1,4 +1,5 @@
import { html, nothing } from 'lit';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { LightElement } from '../lib/base.js';
import { t } from '../lib/i18n.js';
import { connectorIconUrl, statusOf, STATUS_LABEL, statusText } from './shared/connector-common.js';
@@ -11,14 +12,25 @@ import { connectorIconUrl, statusOf, STATUS_LABEL, statusText } from './shared/c
// old three-section split (Mine / Global / Available) is gone: the same connector
// used to appear twice, once as a template and once as its instance, and the reader
// had to join the two by eye. Here each connector appears exactly once, and its
// state is a chip on the card.
// state is a chip on the row.
//
// The card is a link, not a form. Everything that needs typing lives on the
// This page is also where the admin **curates** the list: adding is one intent with
// two sources, so it is one button with two options rather than two distant
// affordances. Their order mirrors the trust model (§14): the marketplace path is
// vetted and hash-verified, the manual path is the escape hatch that puts unvetted
// code on the box — which is why it needs `mcp.register_local_script` and why it
// sits second. Removing a catalog entry lives on the row itself.
//
// The row is a link, not a form. Everything that needs typing lives on the
// connector's own page (`#connector?name=X`) — an activation form has as many
// fields as the connector declares (EMAIL has a dozen), which a fixed-size dialog
// could never hold.
// could never hold. The manual-add path is a dedicated sub-page (`#connectors/new`)
// for the same reason: the form is long and technical, a fixed modal grew taller
// than the viewport with no way to scroll, and a click on the overlay discarded
// everything typed so far. A page scrolls, and leaving it is a deliberate
// navigation.
//
// Reuses the marketplace's card styling (`web/css/connectors.css`).
// Row-list styling lives in `web/css/connectors.css`.
const ADMIN_ID = 'admin';
@@ -40,6 +52,9 @@ export class ConnectorsPage extends LightElement {
_error: { state: true },
_q: { state: true },
_noIcon: { state: true }, // names whose icon failed to load
_addOpen: { state: true }, // admin: the "Add connector" chooser
_view: { state: true }, // admin: 'list' | 'new'
_form: { state: true }, // admin: manual-entry fields, when _view === 'new'
_providers: { state: true }, // admin: OAuth provider list (modal)
_pForm: { state: true }, // admin: provider being edited, or null
_pError: { state: true },
@@ -59,6 +74,9 @@ export class ConnectorsPage extends LightElement {
this._available = null;
this._activated = null;
this._error = null;
this._addOpen = false;
this._view = 'list';
this._form = null;
this._providers = null;
this._pForm = null;
this._pError = null;
@@ -71,9 +89,13 @@ export class ConnectorsPage extends LightElement {
window.addEventListener('llm-page-change', (e) => {
this._open = e.detail.page === 'connectors';
this.style.display = this._open ? 'flex' : 'none';
if (this._open) this._load();
if (this._open) { this._syncViewFromHash(); this._load(); }
});
window.addEventListener('hashchange', () => {
if (this._open) this._syncViewFromHash();
});
window.addEventListener('connectors-changed', () => { if (this._open) this._load(); });
document.addEventListener('click', () => { if (this._addOpen) this._addOpen = false; });
}
disconnectedCallback() {
@@ -99,6 +121,7 @@ export class ConnectorsPage extends LightElement {
}
_go(page, hash) {
this._addOpen = false;
history.pushState({ page }, '', hash);
window.dispatchEvent(new CustomEvent('llm-page-change', { detail: { page } }));
}
@@ -107,6 +130,81 @@ export class ConnectorsPage extends LightElement {
this._go('connector', `#connector?name=${encodeURIComponent(name)}`);
}
// ── admin: add ───────────────────────────────────────────────────────────────
// The `new` view is derived from the `#connectors/new` sub-route, so the
// browser's Back/Forward works and a pasted URL lands on the form. Entering the
// view always starts a fresh form.
_syncViewFromHash() {
const parts = location.hash.slice(1).split('/');
const wantsNew = parts[0] === 'connectors' && parts[1] === 'new';
if (wantsNew && this._view !== 'new') {
this._error = null;
this._form = {
name: '', scope: 'per_user', source: 'remote', transport: 'stdio',
command: '', args: '', url: '', script_path: '', config_schema: '',
auth_kind: 'none', friendly_name: '', description: '',
};
}
this._view = wantsNew ? 'new' : 'list';
}
_openManual() {
this._addOpen = false;
history.pushState({ page: 'connectors', view: 'new' }, '', '#connectors/new');
this._syncViewFromHash();
}
_closeNew() {
// Prefer real history so the browser's own Back stays consistent; fall back to
// the list when this page was opened straight from a pasted URL.
if (history.length > 1) { history.back(); return; }
history.pushState({ page: 'connectors' }, '', '#connectors');
this._view = 'list';
}
_patch(field, value) {
this._form = { ...this._form, [field]: value };
}
async _saveManual() {
const f = this._form;
if (!f.name.trim()) { this._error = t('connectors.new.error_name'); return; }
const listField = (s) => s.split(/[\n,]/).map(x => x.trim()).filter(Boolean);
try {
await jf('/api/mcp/catalog', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: f.name.trim(),
scope: f.scope,
source: f.source,
transport: f.transport,
command: f.command.trim() || null,
args: f.args.trim() ? listField(f.args) : null,
url: f.url.trim() || null,
script_path: f.script_path.trim() || null,
config_schema: f.config_schema.trim() ? listField(f.config_schema) : null,
auth_kind: f.auth_kind,
friendly_name: f.friendly_name.trim() || null,
description: f.description.trim() || null,
}),
});
this._view = 'list';
this._form = null;
history.pushState({ page: 'connectors' }, '', '#connectors');
await this._load();
} catch (e) { this._error = e.message; }
}
async _delete(row) {
if (!confirm(t('connectors.confirm.remove', { name: row.name }))) return;
try {
await jf(`/api/mcp/catalog/${row.id}`, { method: 'DELETE' });
await this._load();
} catch (e) { this._error = e.message; }
}
// ── admin: OAuth sign-in providers (§15) ─────────────────────────────────────
async _openProviders() {
@@ -240,6 +338,7 @@ export class ConnectorsPage extends LightElement {
render() {
if (!this._open) return nothing;
if (this._view === 'new') return this._renderNew();
const loading = this._available === null && !this._error;
const rows = loading ? [] : this._rows;
@@ -252,12 +351,7 @@ export class ConnectorsPage extends LightElement {
<button class="btn btn-sm btn-outline-secondary" @click=${() => this._openProviders()}>
<i class="bi bi-key me-1"></i>${t('connectors.btn.signin_providers')}
</button>
<button class="btn btn-sm btn-outline-secondary" @click=${() => this._go('catalog', '#catalog')}>
<i class="bi bi-journal-text me-1"></i>${t('connectors.btn.catalog')}
</button>
<button class="btn btn-sm btn-primary" @click=${() => this._go('marketplace', '#marketplace')}>
<i class="bi bi-bag me-1"></i>${t('connectors.btn.marketplace')}
</button>` : nothing}
${this._renderAddButton()}` : nothing}
</div>
</div>
@@ -276,12 +370,171 @@ export class ConnectorsPage extends LightElement {
</div>
</div>
${rows.length === 0 ? this._renderEmpty() : html`
<div class="connector-grid">${rows.map(r => this._renderCard(r))}</div>`}
<div class="connector-list">${rows.map(r => this._renderRow(r))}</div>`}
</div>`}
${this._providers !== null ? this._renderProvidersModal() : nothing}
</div>`;
}
// Bootstrap's own dropdown classes, not a hand-rolled panel: 5.3 themes
// `.dropdown-menu`/`.dropdown-item` from `data-bs-theme`, so this follows the
// light/dark switch for free. `.show` opens it — the state is ours, not
// Bootstrap's JS.
_renderAddButton() {
return html`
<div class="dropdown" style="position:relative" @click=${(e) => e.stopPropagation()}>
<button class="btn btn-sm btn-primary" @click=${() => { this._addOpen = !this._addOpen; }}>
<i class="bi bi-plus-lg me-1"></i>${t('connectors.add.btn')}
<i class="bi bi-chevron-down ms-1" style="font-size:.7rem"></i>
</button>
${this._addOpen ? html`
<div class="dropdown-menu show" style="right:0;left:auto;top:calc(100% + .25rem);min-width:280px">
<button class="dropdown-item" style="white-space:normal" @click=${() => this._go('marketplace', '#marketplace')}>
<div style="display:flex;align-items:center;gap:.5rem">
<i class="bi bi-shop"></i><strong style="font-size:.85rem">${t('connectors.add.marketplace')}</strong>
</div>
<div class="text-muted" style="font-size:.7rem;margin-top:.15rem">${t('connectors.add.marketplace_desc')}</div>
</button>
<div class="dropdown-divider"></div>
<button class="dropdown-item" style="white-space:normal" @click=${() => this._openManual()}>
<div style="display:flex;align-items:center;gap:.5rem">
<i class="bi bi-pencil"></i><strong style="font-size:.85rem">${t('connectors.add.manual')}</strong>
</div>
<div class="text-muted" style="font-size:.7rem;margin-top:.15rem">${t('connectors.add.manual_desc')}</div>
</button>
</div>` : nothing}
</div>`;
}
_renderEmpty() {
if (this._q.trim()) {
return html`<div class="um-empty" style="padding:1rem"><i class="bi bi-search"></i>
<p>${t('connectors.empty.match', { query: this._q })}</p></div>`;
}
return html`
<div class="um-empty" style="padding:1rem"><i class="bi bi-plug"></i>
<p>${this._isAdmin ? t('connectors.empty.installed') : t('connectors.empty.available')}</p>
${this._isAdmin
? html`<p style="font-size:.8rem;opacity:.7">${t('connectors.empty.install_hint')}</p>`
: html`<p style="font-size:.8rem;opacity:.7">${t('connectors.empty.ask_admin')}</p>`}
</div>`;
}
_renderRow(r) {
const status = statusOf(r);
const isGlobal = r.scope === 'global';
const isScript = r.source === 'local_script';
const showIcon = !this._noIcon.has(r.name);
// A synthetic row (a granted global whose catalog entry the caller cannot read)
// has no catalog id, so there is nothing to delete.
const canDelete = this._isAdmin && r.id != null;
return html`
<div class="connector-row" role="button" tabindex="0"
@click=${() => this._openConnector(r.name)}
@keydown=${(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this._openConnector(r.name); } }}>
${showIcon
? html`<img class="connector-card-icon" src=${connectorIconUrl(r.name, 'sm')} alt=""
@error=${() => this._iconFailed(r.name)} />`
: html`<div class="connector-card-icon connector-card-icon--empty"><i class="bi bi-plug"></i></div>`}
<div class="connector-row-main">
<div class="connector-row-name">
<span>${r.friendly_name || r.name}</span>
${r.friendly_name ? html`<span class="connector-row-sub">${r.name}</span>` : nothing}
</div>
${r.description ? html`<div class="connector-row-desc">${r.description}</div>` : nothing}
</div>
<div class="connector-row-chips">
<span class="connector-chip connector-chip--scope">
<i class="bi ${isGlobal ? 'bi-globe' : 'bi-person'}"></i>${isGlobal ? t('connectors.chip.global') : t('connectors.chip.per_user')}
</span>
${isScript ? html`
<span class="connector-chip connector-chip--script">
<i class="bi bi-file-earmark-code"></i>${t('connectors.chip.local_script')}
</span>` : nothing}
${r.auth_kind && r.auth_kind !== 'none' ? html`
<span class="connector-chip"><i class="bi bi-key"></i>${r.auth_kind}</span>` : nothing}
</div>
<span class=${`connector-chip${STATUS_LABEL[status].tone ? ` connector-chip--${STATUS_LABEL[status].tone}` : ''}`}>
${statusText(status)}
</span>
${canDelete ? html`
<button class="um-btn-icon connector-row-remove" title=${t('connectors.action.remove')}
@click=${(e) => { e.stopPropagation(); this._delete(r); }}>
<i class="bi bi-trash"></i>
</button>` : nothing}
</div>`;
}
// ── admin: manual entry ─────────────────────────────────────────────────────
_field(label, value, oninput, opts = {}) {
return html`<div class="mb-3">
<label class="form-label">${label}${opts.hint ? html` <span class="text-muted">(${opts.hint})</span>` : nothing}</label>
<input class="form-control ${opts.mono ? 'font-monospace' : ''}" type=${opts.type || 'text'}
placeholder=${opts.placeholder || ''} .value=${value} @input=${oninput} />
</div>`;
}
_area(label, value, oninput, opts = {}) {
return html`<div class="mb-3">
<label class="form-label">${label}${opts.hint ? html` <span class="text-muted">(${opts.hint})</span>` : nothing}</label>
<textarea class="form-control ${opts.mono ? 'font-monospace' : ''}" rows=${opts.rows || 3}
.value=${value} @input=${oninput}></textarea>
</div>`;
}
_select(label, value, options, onchange) {
return html`<div class="mb-3">
<label class="form-label">${label}</label>
<select class="form-select" @change=${onchange}>
${options.map(o => html`<option value=${o} ?selected=${value === o}>${o}</option>`)}
</select>
</div>`;
}
_renderNew() {
const f = this._form;
const isScript = f.source === 'local_script';
return html`
<div class="um-page">
<div class="um-header">
<div class="d-flex align-items-center gap-2" style="min-width:0">
<button class="btn btn-sm btn-outline-secondary" title=${t('connectors.new.back')} @click=${() => this._closeNew()}>
<i class="bi bi-arrow-left"></i>
</button>
<h2 class="um-title" style="min-width:0;overflow:hidden;text-overflow:ellipsis">
<i class="bi bi-pencil me-2"></i>${t('connectors.new.title')}</h2>
</div>
</div>
<div style="padding:0 1.25rem 2rem; overflow:auto">
<div style="max-width:620px">
${this._error ? html`<div class="alert alert-danger py-2 mb-3" style="font-size:.85rem">${this._error}</div>` : nothing}
${isScript ? html`
<div class="alert alert-warning py-2 mb-3" style="font-size:.78rem">${unsafeHTML(t('connectors.new.script_warn'))}</div>` : nothing}
${this._field(t('connectors.new.name'), f.name, e => this._patch('name', e.target.value), { hint: t('connectors.new.name_hint'), mono: true })}
${this._select(t('connectors.new.scope'), f.scope, ['per_user', 'global'], e => this._patch('scope', e.target.value))}
${this._select(t('connectors.new.type'), f.source, ['remote', 'local_script'], e => this._patch('source', e.target.value))}
${this._select(t('connectors.new.transport'), f.transport, ['stdio', 'http', 'sse'], e => this._patch('transport', e.target.value))}
${isScript
? html`${this._field(t('connectors.new.command'), f.command, e => this._patch('command', e.target.value), { placeholder: t('connectors.new.command_ph'), mono: true })}
${this._field(t('connectors.new.script_path'), f.script_path, e => this._patch('script_path', e.target.value), { hint: t('connectors.new.script_path_hint'), mono: true })}`
: this._field(t('connectors.new.url'), f.url, e => this._patch('url', e.target.value), { mono: true })}
${this._area(t('connectors.new.args'), f.args, e => this._patch('args', e.target.value), { hint: t('connectors.new.args_hint'), mono: true })}
${this._area(t('connectors.new.config_schema'), f.config_schema, e => this._patch('config_schema', e.target.value), { hint: t('connectors.new.config_schema_hint'), mono: true })}
${this._select(t('connectors.new.auth'), f.auth_kind, ['none', 'api_key', 'oauth', 'qr', 'ssh_key'], e => this._patch('auth_kind', e.target.value))}
${this._field(t('connectors.new.friendly'), f.friendly_name, e => this._patch('friendly_name', e.target.value))}
${this._area(t('connectors.new.desc'), f.description, e => this._patch('description', e.target.value), { hint: t('connectors.new.desc_hint'), rows: 2 })}
<div class="d-flex justify-content-end gap-2 mt-3">
<button class="btn btn-sm btn-outline-secondary" @click=${() => this._closeNew()}>${t('connectors.new.cancel')}</button>
<button class="btn btn-sm btn-primary" @click=${() => this._saveManual()}>
<i class="bi bi-check-lg me-1"></i>${t('connectors.new.save')}</button>
</div>
</div>
</div>
</div>`;
}
_renderProvidersModal() {
return html`
<div style="position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1050;
@@ -374,59 +627,4 @@ export class ConnectorsPage extends LightElement {
</button>
</div>`;
}
_renderEmpty() {
if (this._q.trim()) {
return html`<div class="um-empty" style="padding:1rem"><i class="bi bi-search"></i>
<p>${t('connectors.empty.match', { query: this._q })}</p></div>`;
}
return html`
<div class="um-empty" style="padding:1rem"><i class="bi bi-plug"></i>
<p>${this._isAdmin ? t('connectors.empty.installed') : t('connectors.empty.available')}</p>
${this._isAdmin
? html`<p style="font-size:.8rem;opacity:.7">${t('connectors.empty.install_hint')}</p>`
: html`<p style="font-size:.8rem;opacity:.7">${t('connectors.empty.ask_admin')}</p>`}
</div>`;
}
_renderCard(r) {
const status = statusOf(r);
const isGlobal = r.scope === 'global';
const isScript = r.source === 'local_script';
const showIcon = !this._noIcon.has(r.name);
return html`
<div class="connector-card" role="button" tabindex="0"
style="cursor:pointer"
@click=${() => this._openConnector(r.name)}
@keydown=${(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this._openConnector(r.name); } }}>
<div class="connector-card-head">
${showIcon
? html`<img class="connector-card-icon" src=${connectorIconUrl(r.name, 'sm')} alt=""
@error=${() => this._iconFailed(r.name)} />`
: html`<div class="connector-card-icon connector-card-icon--empty"><i class="bi bi-plug"></i></div>`}
<div class="connector-card-title">
<div class="connector-card-name">${r.friendly_name || r.name}</div>
<div class="connector-card-sub">${r.name}</div>
</div>
<span class=${`connector-chip${STATUS_LABEL[status].tone ? ` connector-chip--${STATUS_LABEL[status].tone}` : ''}`}>
${statusText(status)}
</span>
</div>
${r.description ? html`<div class="connector-card-desc">${r.description}</div>` : nothing}
<div class="connector-chips">
<span class="connector-chip connector-chip--scope">
<i class="bi ${isGlobal ? 'bi-globe' : 'bi-person'}"></i>${isGlobal ? t('connectors.chip.global') : t('connectors.chip.per_user')}
</span>
${isScript ? html`
<span class="connector-chip connector-chip--script">
<i class="bi bi-file-earmark-code"></i>${t('connectors.chip.local_script')}
</span>` : nothing}
${r.auth_kind && r.auth_kind !== 'none' ? html`
<span class="connector-chip"><i class="bi bi-key"></i>${r.auth_kind}</span>` : nothing}
</div>
</div>`;
}
}
+1 -1
View File
@@ -78,7 +78,7 @@ export class AppCopilot extends I18nMixin(ChatSession) {
_pageFromHash() {
const m = location.hash.slice(1).match(/^([^/?]+)/);
const seg = m ? m[1] : '';
const known = ['inbox', 'dashboard', 'tasks', 'projects', 'models', 'providers', 'approval', 'agents', 'users', 'roles', 'connectors', 'connector', 'catalog', 'marketplace', 'profile', 'config', 'llm-requests', 'session', 'system-agents', 'file_viewer', 'tool_detail'];
const known = ['inbox', 'dashboard', 'tasks', 'projects', 'models', 'providers', 'approval', 'agents', 'users', 'roles', 'connectors', 'connector', 'marketplace', 'profile', 'config', 'llm-requests', 'session', 'system-agents', 'file_viewer', 'tool_detail'];
return known.includes(seg) ? seg : 'home';
}
+7 -7
View File
@@ -132,11 +132,11 @@ export class MarketplacePage extends LightElement {
});
}
// The marketplace is a destination of the catalog's "Add connector" action, not a
// place of its own — so it goes back where it came from.
_goCatalog() {
history.pushState({ page: 'catalog' }, '', '#catalog');
window.dispatchEvent(new CustomEvent('llm-page-change', { detail: { page: 'catalog' } }));
// The marketplace is a destination of the Connectors page's "Add connector"
// action, not a place of its own — so it goes back where it came from.
_goConnectors() {
history.pushState({ page: 'connectors' }, '', '#connectors');
window.dispatchEvent(new CustomEvent('llm-page-change', { detail: { page: 'connectors' } }));
}
render() {
@@ -148,8 +148,8 @@ export class MarketplacePage extends LightElement {
<div class="um-header">
<h2 class="um-title"><i class="bi bi-shop me-2"></i>${t('marketplace.title')}</h2>
<div class="um-header-right">
<button class="btn btn-sm btn-outline-primary" @click=${() => this._goCatalog()}>
<i class="bi bi-arrow-left me-1"></i>${t('marketplace.btn.catalog')}
<button class="btn btn-sm btn-outline-primary" @click=${() => this._goConnectors()}>
<i class="bi bi-arrow-left me-1"></i>${t('marketplace.btn.connectors')}
</button>
${this._isAdmin ? html`
<button class="um-btn-icon ms-1" title=${t('marketplace.action.refetch')}
+2 -3
View File
@@ -30,7 +30,7 @@ const NAV = [
// Estensioni — what the assistant is made of / can use. Visible to everyone;
// Agents is read-only for non-admins (editable only by the admin server-side).
{ id: 'connectors', group: 'extensions', priority: 10, icon: 'plug', labelKey: 'nav.connectors', aliases: ['connector'] },
{ id: 'connectors', group: 'extensions', priority: 10, icon: 'plug', labelKey: 'nav.connectors', aliases: ['connector', 'marketplace'] },
{ id: 'plugins', group: 'extensions', priority: 20, icon: 'puzzle', labelKey: 'nav.plugins' },
{ id: 'agents', group: 'extensions', priority: 30, icon: 'people', labelKey: 'nav.agents' },
// The background agents the instance runs for you. Visible to everyone: the
@@ -45,7 +45,6 @@ const NAV = [
{ id: 'providers', group: 'config', priority: 40, icon: 'plug', labelKey: 'nav.providers', adminOnly: true },
{ id: 'approval', group: 'config', priority: 50, icon: 'shield-check', labelKey: 'nav.security', adminOnly: true },
{ id: 'plugin-catalog', group: 'config', priority: 70, icon: 'puzzle-fill', labelKey: 'nav.plugin_catalog', adminOnly: true, aliases: ['plugin-detail'] },
{ id: 'catalog', group: 'config', priority: 80, icon: 'journal-text', labelKey: 'nav.catalog', adminOnly: true, aliases: ['marketplace'] },
{ id: 'config', group: 'config', priority: 90, icon: 'gear', labelKey: 'nav.config', adminOnly: true },
// Sviluppo — debug surface, only with the debug flag on.
@@ -229,7 +228,7 @@ export class AppSidebar extends I18nMixin(LightElement) {
return m ? `plugin/${m[1]}/${m[2]}` : 'home';
}
// `connector` (singular) is the per-connector detail page, `connectors` the list.
return ['inbox', 'dashboard', 'tasks', 'projects', 'models', 'providers', 'approval', 'agents', 'users', 'roles', 'shared-folders', 'connectors', 'connector', 'plugins', 'plugin-catalog', 'plugin-detail', 'catalog', 'marketplace', 'profile', 'config', 'llm-requests', 'session', 'system-agents', 'file_viewer', 'tool_detail'].includes(segment) ? segment : 'home';
return ['inbox', 'dashboard', 'tasks', 'projects', 'models', 'providers', 'approval', 'agents', 'users', 'roles', 'shared-folders', 'connectors', 'connector', 'plugins', 'plugin-catalog', 'plugin-detail', 'marketplace', 'profile', 'config', 'llm-requests', 'session', 'system-agents', 'file_viewer', 'tool_detail'].includes(segment) ? segment : 'home';
}
_tasksSectionFromHash() {
+89
View File
@@ -14,6 +14,95 @@
gap: 0.75rem;
}
/* ── Connector row list ───────────────────────────────────────────────────────
*
* The management view (the Connectors page): one row per connector, made for
* scanning status and acting, not browsing. It shares the cards' surface but is
* deliberately sharper — a 4px radius reads as a list, not a deck of cards.
*/
.connector-list {
display: flex;
flex-direction: column;
background: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: 4px;
box-shadow: var(--card-shadow);
}
.connector-row {
display: flex;
align-items: center;
gap: 0.7rem;
padding: 0.5rem 0.75rem;
cursor: pointer;
transition: background 0.15s;
}
.connector-row + .connector-row {
border-top: 1px solid var(--card-border);
}
.connector-row:hover {
background: var(--bs-tertiary-bg);
}
.connector-row .connector-card-icon {
width: 28px;
height: 28px;
}
.connector-row-main {
flex: 1;
min-width: 0;
}
.connector-row-name {
display: flex;
align-items: baseline;
gap: 0.45rem;
min-width: 0;
font-weight: 600;
font-size: 0.88rem;
line-height: 1.25;
}
.connector-row-sub {
font-family: var(--bs-font-monospace, monospace);
font-size: 0.68rem;
font-weight: 400;
color: var(--placeholder-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.connector-row-desc {
font-size: 0.74rem;
color: var(--placeholder-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.connector-row-chips {
display: flex;
gap: 0.3rem;
flex-shrink: 0;
}
.connector-row-remove {
flex-shrink: 0;
}
/* On narrow widths the metadata chips crowd out the name — the status chip and
the detail page still carry that information. */
@media (max-width: 720px) {
.connector-row-chips {
display: none;
}
}
.connector-card {
display: flex;
flex-direction: column;
-1
View File
@@ -82,7 +82,6 @@ plugin-catalog-page,
plugin-detail-page,
plugin-page-host,
marketplace-page,
catalog-page,
profile-page {
display: none; /* toggled by JS */
flex-direction: column;
+33 -55
View File
@@ -22,7 +22,6 @@ export default {
'nav.connectors': 'Connectors',
'nav.plugins': 'Plugins',
'nav.plugin_catalog': 'Plugin Catalog',
'nav.catalog': 'Connectors Catalog',
'nav.config': 'Settings',
'nav.llm_requests': 'LLM Requests',
'nav.system_agents': 'System agents',
@@ -768,8 +767,6 @@ export default {
'connectors.loading': 'Loading…',
'connectors.search': 'Search connectors…',
'connectors.btn.signin_providers': 'Sign-in providers',
'connectors.btn.catalog': 'Catalog',
'connectors.btn.marketplace': 'Marketplace',
'connectors.empty.installed': 'No connectors installed yet.',
'connectors.empty.available': 'Nothing available to you yet.',
'connectors.empty.install_hint': 'Install one from the Marketplace to get started.',
@@ -998,7 +995,7 @@ export default {
// ── Marketplace ─────────────────────────────────────────────────────────────
'marketplace.title': 'Marketplace',
'marketplace.btn.catalog': 'Catalog',
'marketplace.btn.connectors': 'Connectors',
'marketplace.action.refetch': 'Refetch the feed',
'marketplace.not_admin': 'The marketplace is managed by the admin.',
'marketplace.not_admin_link': 'Connectors the admin has installed appear on the <a href="#connectors">Connectors</a> page.',
@@ -1098,60 +1095,41 @@ export default {
'users.confirm.delete': 'Delete user "{username}"? This permanently erases their database and all conversation history.',
// ── Catalog ─────────────────────────────────────────────────────────────────
'catalog.title': 'Connector Catalog',
'catalog.loading': 'Loading…',
'catalog.not_admin': 'The catalog is managed by the admin.',
'catalog.not_admin_link': 'What you can activate is on the <a href="#connectors">Connectors</a> page.',
'catalog.desc': 'What this box offers. Nothing here is running — a global entry still needs enabling, a per-user one still needs each user to activate it, both on the <a href="#connectors">Connectors</a> page.',
'catalog.empty.title': 'The catalog is empty.',
'catalog.empty.hint': 'Add a connector from the marketplace to get started.',
'catalog.empty.action': 'Browse the marketplace',
// ── Connectors: add / manual entry ────────────────────────────────────────────
'connectors.add.btn': 'Add connector',
'connectors.add.marketplace': 'From the marketplace',
'connectors.add.marketplace_desc': 'Vetted connectors, files verified by SHA-256.',
'connectors.add.manual': 'Manually',
'connectors.add.manual_desc': 'You supply the config, and vouch for it yourself.',
'catalog.btn.add': 'Add connector',
'catalog.dropdown.marketplace': 'From the marketplace',
'catalog.dropdown.marketplace_desc': 'Vetted connectors, files verified by SHA-256.',
'catalog.dropdown.manual': 'Manually',
'catalog.dropdown.manual_desc': 'You supply the config, and vouch for it yourself.',
'connectors.action.remove': 'Remove',
'catalog.table.connector': 'Connector',
'catalog.table.scope': 'Scope',
'catalog.table.type': 'Type',
'catalog.table.auth': 'Auth',
'connectors.new.back': 'Back',
'connectors.new.title': 'Add connector manually',
'connectors.new.script_warn': '<i class="bi bi-exclamation-triangle me-1"></i>A local script runs code on this box. Nothing verifies it — unlike the marketplace path, there is no digest to check.',
'connectors.new.name': 'Name',
'connectors.new.name_hint': 'slug',
'connectors.new.scope': 'Scope',
'connectors.new.type': 'Type',
'connectors.new.transport': 'Transport',
'connectors.new.command': 'Command',
'connectors.new.command_ph': 'python3',
'connectors.new.script_path': 'Script path',
'connectors.new.script_path_hint': 'as <connector>/<file>, under ./connectors',
'connectors.new.url': 'URL',
'connectors.new.args': 'Args',
'connectors.new.args_hint': 'one per line',
'connectors.new.config_schema': 'Required secret/env keys',
'connectors.new.config_schema_hint': 'comma/newline',
'connectors.new.auth': 'Auth',
'connectors.new.friendly': 'Friendly name',
'connectors.new.desc': 'Description',
'connectors.new.desc_hint': 'the LLM reads this when deciding to activate the connector',
'connectors.new.cancel': 'Cancel',
'connectors.new.save': 'Add connector',
'catalog.badge.global': 'global',
'catalog.badge.per_user': 'per-user',
'catalog.badge.local_script':'local script',
'catalog.badge.remote': 'remote',
'catalog.action.remove': 'Remove from catalog',
'catalog.new.back': 'Back',
'catalog.new.title': 'Add connector manually',
'catalog.new.script_warn': '<i class="bi bi-exclamation-triangle me-1"></i>A local script runs code on this box. Nothing verifies it — unlike the marketplace path, there is no digest to check.',
'catalog.new.name': 'Name',
'catalog.new.name_hint': 'slug',
'catalog.new.scope': 'Scope',
'catalog.new.type': 'Type',
'catalog.new.transport': 'Transport',
'catalog.new.command': 'Command',
'catalog.new.command_ph': 'python3',
'catalog.new.script_path': 'Script path',
'catalog.new.script_path_hint': 'as <connector>/<file>, under ./connectors',
'catalog.new.url': 'URL',
'catalog.new.args': 'Args',
'catalog.new.args_hint': 'one per line',
'catalog.new.config_schema': 'Required secret/env keys',
'catalog.new.config_schema_hint': 'comma/newline',
'catalog.new.auth': 'Auth',
'catalog.new.friendly': 'Friendly name',
'catalog.new.desc': 'Description',
'catalog.new.desc_hint': 'the LLM reads this when deciding to activate the connector',
'catalog.new.cancel': 'Cancel',
'catalog.new.save': 'Add to catalog',
'catalog.error.name': 'Name is required.',
'catalog.confirm.delete': 'Remove "{name}" from the catalog?\n\nAnything already activated from it keeps running.',
'connectors.new.error_name': 'Name is required.',
'connectors.confirm.remove': 'Remove "{name}"?\n\nAnything already activated from it keeps running.',
// ── Cron ────────────────────────────────────────────────────────────────────
'cron.title': 'Cron Jobs',
+33 -55
View File
@@ -22,7 +22,6 @@ export default {
'nav.connectors': 'Connecteurs',
'nav.plugins': 'Plugins',
'nav.plugin_catalog': 'Catalogue des plugins',
'nav.catalog': 'Catalogue des connecteurs',
'nav.config': 'Paramètres',
'nav.llm_requests': 'Requêtes LLM',
'nav.system_agents': 'Agents système',
@@ -768,8 +767,6 @@ export default {
'connectors.loading': 'Chargement…',
'connectors.search': 'Rechercher des connecteurs…',
'connectors.btn.signin_providers': 'Fournisseurs d\'authentification',
'connectors.btn.catalog': 'Catalogue',
'connectors.btn.marketplace': 'Marketplace',
'connectors.empty.installed': 'Aucun connecteur installé pour le moment.',
'connectors.empty.available': 'Rien de disponible pour vous pour le moment.',
'connectors.empty.install_hint': 'Installez-en un depuis le Marketplace pour commencer.',
@@ -988,7 +985,7 @@ export default {
// ── Marketplace ─────────────────────────────────────────────────────────────
'marketplace.title': 'Marketplace',
'marketplace.btn.catalog': 'Catalogue',
'marketplace.btn.connectors': 'Connecteurs',
'marketplace.action.refetch': 'Recharger le flux',
'marketplace.not_admin': 'Le Marketplace est géré par l\'administrateur.',
'marketplace.not_admin_link': 'Les connecteurs installés par l\'administrateur apparaissent sur la page <a href="#connectors">Connecteurs</a>.',
@@ -1085,60 +1082,41 @@ export default {
'users.confirm.delete': 'Supprimer l\'utilisateur "{username}" ? Cela efface définitivement sa base de données et tout l\'historique des conversations.',
// ── Catalog ─────────────────────────────────────────────────────────────────
'catalog.title': 'Catalogue des connecteurs',
'catalog.loading': 'Chargement…',
'catalog.not_admin': 'Le catalogue est géré par l\'administrateur.',
'catalog.not_admin_link': 'Ce que vous pouvez activer se trouve sur la page <a href="#connectors">Connecteurs</a>.',
'catalog.desc': 'Ce que cette machine offre. Rien ici n\'est en cours d\'exécution — une entrée globale doit encore être activée, une entrée par utilisateur doit encore être activée par chaque utilisateur, les deux sur la page <a href="#connectors">Connecteurs</a>.',
'catalog.empty.title': 'Le catalogue est vide.',
'catalog.empty.hint': 'Ajoutez un connecteur depuis le Marketplace pour commencer.',
'catalog.empty.action': 'Parcourir le Marketplace',
// ── Connecteurs : ajout / saisie manuelle ────────────────────────────────────
'connectors.add.btn': 'Ajouter un connecteur',
'connectors.add.marketplace': 'Depuis le Marketplace',
'connectors.add.marketplace_desc': 'Connecteurs vérifiés, fichiers vérifiés par SHA-256.',
'connectors.add.manual': 'Manuellement',
'connectors.add.manual_desc': 'Vous fournissez la configuration, et vous en portez la responsabilité.',
'catalog.btn.add': 'Ajouter un connecteur',
'catalog.dropdown.marketplace': 'Depuis le Marketplace',
'catalog.dropdown.marketplace_desc': 'Connecteurs vérifiés, fichiers vérifiés par SHA-256.',
'catalog.dropdown.manual': 'Manuellement',
'catalog.dropdown.manual_desc': 'Vous fournissez la configuration, et vous en portez la responsabilité.',
'connectors.action.remove': 'Retirer',
'catalog.table.connector': 'Connecteur',
'catalog.table.scope': 'Portée',
'catalog.table.type': 'Type',
'catalog.table.auth': 'Auth',
'connectors.new.back': 'Retour',
'connectors.new.title': 'Ajouter un connecteur manuellement',
'connectors.new.script_warn': '<i class="bi bi-exclamation-triangle me-1"></i>Un script local exécute du code sur cette machine. Rien ne le vérifie — contrairement au Marketplace, il n\'y a pas de condensé à contrôler.',
'connectors.new.name': 'Nom',
'connectors.new.name_hint': 'slug',
'connectors.new.scope': 'Portée',
'connectors.new.type': 'Type',
'connectors.new.transport': 'Transport',
'connectors.new.command': 'Commande',
'connectors.new.command_ph': 'python3',
'connectors.new.script_path': 'Chemin du script',
'connectors.new.script_path_hint': 'comme <connecteur>/<fichier>, sous ./connectors',
'connectors.new.url': 'URL',
'connectors.new.args': 'Arguments',
'connectors.new.args_hint': 'un par ligne',
'connectors.new.config_schema': 'Clés secrètes/env requises',
'connectors.new.config_schema_hint': 'virgule/nouvelle ligne',
'connectors.new.auth': 'Auth',
'connectors.new.friendly': 'Nom convivial',
'connectors.new.desc': 'Description',
'connectors.new.desc_hint': 'le LLM lit ceci pour décider d\'activer le connecteur',
'connectors.new.cancel': 'Annuler',
'connectors.new.save': 'Ajouter le connecteur',
'catalog.badge.global': 'global',
'catalog.badge.per_user': 'par utilisateur',
'catalog.badge.local_script':'script local',
'catalog.badge.remote': 'distant',
'catalog.action.remove': 'Retirer du catalogue',
'catalog.new.back': 'Retour',
'catalog.new.title': 'Ajouter un connecteur manuellement',
'catalog.new.script_warn': '<i class="bi bi-exclamation-triangle me-1"></i>Un script local exécute du code sur cette machine. Rien ne le vérifie — contrairement au Marketplace, il n\'y a pas de condensé à contrôler.',
'catalog.new.name': 'Nom',
'catalog.new.name_hint': 'slug',
'catalog.new.scope': 'Portée',
'catalog.new.type': 'Type',
'catalog.new.transport': 'Transport',
'catalog.new.command': 'Commande',
'catalog.new.command_ph': 'python3',
'catalog.new.script_path': 'Chemin du script',
'catalog.new.script_path_hint': 'comme <connecteur>/<fichier>, sous ./connectors',
'catalog.new.url': 'URL',
'catalog.new.args': 'Arguments',
'catalog.new.args_hint': 'un par ligne',
'catalog.new.config_schema': 'Clés secrètes/env requises',
'catalog.new.config_schema_hint': 'virgule/nouvelle ligne',
'catalog.new.auth': 'Auth',
'catalog.new.friendly': 'Nom convivial',
'catalog.new.desc': 'Description',
'catalog.new.desc_hint': 'le LLM lit ceci pour décider d\'activer le connecteur',
'catalog.new.cancel': 'Annuler',
'catalog.new.save': 'Ajouter au catalogue',
'catalog.error.name': 'Le nom est requis.',
'catalog.confirm.delete': 'Retirer "{name}" du catalogue ?\n\nTout ce qui a déjà été activé continuera de fonctionner.',
'connectors.new.error_name': 'Le nom est requis.',
'connectors.confirm.remove': 'Retirer "{name}" ?\n\nTout ce qui a déjà été activé continuera de fonctionner.',
// ── Cron ────────────────────────────────────────────────────────────────────
'cron.title': 'Tâches Cron',
+33 -55
View File
@@ -22,7 +22,6 @@ export default {
'nav.connectors': 'Connettori',
'nav.plugins': 'Plugin',
'nav.plugin_catalog': 'Catalogo plugin',
'nav.catalog': 'Catalogo connettori',
'nav.config': 'Impostazioni',
'nav.llm_requests': 'Richieste LLM',
'nav.system_agents': 'Agenti di sistema',
@@ -768,8 +767,6 @@ export default {
'connectors.loading': 'Caricamento…',
'connectors.search': 'Cerca connettori…',
'connectors.btn.signin_providers': 'Provider di accesso',
'connectors.btn.catalog': 'Catalogo',
'connectors.btn.marketplace': 'Marketplace',
'connectors.empty.installed': 'Nessun connettore installato.',
'connectors.empty.available': 'Niente di disponibile per te.',
'connectors.empty.install_hint': 'Installane uno dal Marketplace per iniziare.',
@@ -988,7 +985,7 @@ export default {
// ── Marketplace ──────────────────────────────────────────────────────────────
'marketplace.title': 'Marketplace',
'marketplace.btn.catalog': 'Catalogo',
'marketplace.btn.connectors': 'Connettori',
'marketplace.action.refetch': 'Ricarica il feed',
'marketplace.not_admin': 'Il marketplace è gestito dall\'amministratore.',
'marketplace.not_admin_link': 'I connettori installati dall\'amministratore appaiono nella pagina <a href="#connectors">Connettori</a>.',
@@ -1085,60 +1082,41 @@ export default {
'users.confirm.delete': 'Eliminare l\'utente "{username}"? Questo cancella definitivamente il database e tutta la cronologia delle conversazioni.',
// ── Catalogo ────────────────────────────────────────────────────────────────
'catalog.title': 'Catalogo connettori',
'catalog.loading': 'Caricamento…',
'catalog.not_admin': 'Il catalogo è gestito dall\'amministratore.',
'catalog.not_admin_link': 'Quello che puoi attivare è nella pagina <a href="#connectors">Connettori</a>.',
'catalog.desc': 'Cosa offre questo computer. Niente qui è in esecuzione — una voce globale necessita comunque di essere abilitata, una per utente necessita che ogni utente la attivi, entrambe nella pagina <a href="#connectors">Connettori</a>.',
'catalog.empty.title': 'Il catalogo è vuoto.',
'catalog.empty.hint': 'Aggiungi un connettore dal marketplace per iniziare.',
'catalog.empty.action': 'Sfoglia il marketplace',
// ── Connettori: aggiunta / inserimento manuale ───────────────────────────────
'connectors.add.btn': 'Aggiungi connettore',
'connectors.add.marketplace': 'Dal marketplace',
'connectors.add.marketplace_desc': 'Connettori verificati, file controllati tramite SHA-256.',
'connectors.add.manual': 'Manualmente',
'connectors.add.manual_desc': 'Fornisci tu la configurazione e te ne assumi la responsabilità.',
'catalog.btn.add': 'Aggiungi connettore',
'catalog.dropdown.marketplace': 'Dal marketplace',
'catalog.dropdown.marketplace_desc': 'Connettori verificati, file controllati tramite SHA-256.',
'catalog.dropdown.manual': 'Manualmente',
'catalog.dropdown.manual_desc': 'Fornisci tu la configurazione e te ne assumi la responsabilità.',
'connectors.action.remove': 'Rimuovi',
'catalog.table.connector': 'Connettore',
'catalog.table.scope': 'Ambito',
'catalog.table.type': 'Tipo',
'catalog.table.auth': 'Auth',
'connectors.new.back': 'Indietro',
'connectors.new.title': 'Aggiungi connettore manualmente',
'connectors.new.script_warn': '<i class="bi bi-exclamation-triangle me-1"></i>Uno script locale esegue codice su questo computer. Niente lo verifica — a differenza del marketplace, non c\'è un digest da controllare.',
'connectors.new.name': 'Nome',
'connectors.new.name_hint': 'slug',
'connectors.new.scope': 'Ambito',
'connectors.new.type': 'Tipo',
'connectors.new.transport': 'Trasporto',
'connectors.new.command': 'Comando',
'connectors.new.command_ph': 'python3',
'connectors.new.script_path': 'Percorso script',
'connectors.new.script_path_hint': 'come <connettore>/<file>, sotto ./connectors',
'connectors.new.url': 'URL',
'connectors.new.args': 'Argomenti',
'connectors.new.args_hint': 'uno per riga',
'connectors.new.config_schema': 'Chiavi segrete/env richieste',
'connectors.new.config_schema_hint': 'virgola/nuova riga',
'connectors.new.auth': 'Auth',
'connectors.new.friendly': 'Nome visualizzato',
'connectors.new.desc': 'Descrizione',
'connectors.new.desc_hint': 'l\'LLM legge questo quando decide se attivare il connettore',
'connectors.new.cancel': 'Annulla',
'connectors.new.save': 'Aggiungi connettore',
'catalog.badge.global': 'globale',
'catalog.badge.per_user': 'per utente',
'catalog.badge.local_script':'script locale',
'catalog.badge.remote': 'remoto',
'catalog.action.remove': 'Rimuovi dal catalogo',
'catalog.new.back': 'Indietro',
'catalog.new.title': 'Aggiungi connettore manualmente',
'catalog.new.script_warn': '<i class="bi bi-exclamation-triangle me-1"></i>Uno script locale esegue codice su questo computer. Niente lo verifica — a differenza del marketplace, non c\'è un digest da controllare.',
'catalog.new.name': 'Nome',
'catalog.new.name_hint': 'slug',
'catalog.new.scope': 'Ambito',
'catalog.new.type': 'Tipo',
'catalog.new.transport': 'Trasporto',
'catalog.new.command': 'Comando',
'catalog.new.command_ph': 'python3',
'catalog.new.script_path': 'Percorso script',
'catalog.new.script_path_hint': 'come <connettore>/<file>, sotto ./connectors',
'catalog.new.url': 'URL',
'catalog.new.args': 'Argomenti',
'catalog.new.args_hint': 'uno per riga',
'catalog.new.config_schema': 'Chiavi segrete/env richieste',
'catalog.new.config_schema_hint': 'virgola/nuova riga',
'catalog.new.auth': 'Auth',
'catalog.new.friendly': 'Nome visualizzato',
'catalog.new.desc': 'Descrizione',
'catalog.new.desc_hint': 'l\'LLM legge questo quando decide se attivare il connettore',
'catalog.new.cancel': 'Annulla',
'catalog.new.save': 'Aggiungi al catalogo',
'catalog.error.name': 'Il nome è obbligatorio.',
'catalog.confirm.delete': 'Rimuovere "{name}" dal catalogo?\n\nTutto ciò che è già stato attivato continuerà a funzionare.',
'connectors.new.error_name': 'Il nome è obbligatorio.',
'connectors.confirm.remove': 'Rimuovere "{name}"?\n\nLe attivazioni già fatte continueranno a funzionare.',
// ── Cron ────────────────────────────────────────────────────────────────────
'cron.title': 'Processi pianificati (Cron)',
-1
View File
@@ -101,7 +101,6 @@
<plugin-catalog-page></plugin-catalog-page>
<plugin-detail-page></plugin-detail-page>
<marketplace-page></marketplace-page>
<catalog-page></catalog-page>
<profile-page style="display:none"></profile-page>
<llm-providers-page></llm-providers-page>
<models-hub-page></models-hub-page>