api.ts routes each call to the session's machine or the cloud proxy.
One module turns server payloads into card props and card answers into wire messages.
Approval surface:
- MCP cards show the full argument envelope (expandable JSON) and the real
destination ("leaves this computer → host", stamped from the user's own
config); the long-tail card path never silently truncates any argument —
values the one-liner can't show whole render as labeled complete blocks
(the old 96-char cut hid email bodies past char 96).
- The MCP grant ladder: Allow once / Allow for this request (EXTERNAL
family; tooltip states the trade — later calls in this answer run unseen,
nothing survives the answer) / Always allow this tool (durable, revocable
on the server page) / Deny. Session-wide grants stay hidden where the
server refuses them — no button that lies.
- One renderer for parked approvals: a redelivered (reconnect/navigation)
approval maps back into the real card component — evidence and buttons
can never drift from the live card again. Transcript origin chips name
their source: your trust rule vs the legacy server flag vs a run grant.
Connectors/MCP management:
- Connect-time tool review: per-tool checkboxes; first review is an
explicit "Keep these tools" consent moment (creates the include list and
locks in fail-closed growth), later toggles auto-save with a receipt;
"new" badges only tools the server added since review (declines are
remembered via the exclude list, never badged).
- Trust surface: right-aligned "always allowed · Revoke" chip per trusted
tool (idle-dimmed when the tool is unchecked — standing rules never
vanish from the screen that audits them); header counts granted
authority; loud banner + one-click migration for the legacy server flag.
- One tool-review dialect: shared row/chip/count primitives across MCP and
catalog-connector pages; read/asks-first chips explain themselves
(offered only where our own code pins the kind — MCP rows carry no risk
chips, a server's word is not evidence; the page states "every tool asks
unless always-allowed" once instead).
- Clarity passes from live testing: one healthy status word (Ready);
group headers count their own rows; adding/connecting a server lands on
the detail page where the review ceremony waits (curated offers live in
Available, never among servers you own); Test shows Testing…/a transient
result at the button with the durable receipt in the header; the
per-server Configuration mirror is replaced by one "Show mcp.json"
reveal-in-file-manager affordance; lifecycle controls carry explanatory
tooltips. en+zh throughout.
Introduces react-i18next across the GUI (fixes the frontend portion of #121):
all user-facing strings in ~50 components move from hardcoded English
literals to t() keys, with complete en and zh-Hans locale files under
src/locales/. English remains the default; the language follows the system
locale unless the user picks one explicitly in the new Settings > General
language switcher. Vitest initializes i18n with the English resources so
existing assertions keep passing.
Imported from andrewyng/aisuite@1b4bbf303e
(contents of its platform/ directory, hoisted to the repo root).
Development history prior to this commit lives in that repository.
Co-authored-by: Devika <devikaverma11@gmail.com>