feat(mcp): add MCP server support with proxy tool and OAuth flow (#289)

* feat(mcp): add MCP server support with proxy tool and OAuth flow

Add URL-based MCP (Model Context Protocol) server support to the backend:

- DB: McpServer / AgentMcpServer / McpServerCredential models with
  typed JSON columns (auth config, cached tools, stored OAuth tokens,
  pending auth state) and a migration.
- Core (@shumai/core/src/mcp): DB-backed credential store, OAuth
  client provider (authorization_code + client_credentials) with a
  Hono-hosted redirect callback, connection lifecycle manager
  (Streamable HTTP with SSE fallback, lazy connect, 401 -> needs_auth),
  JSON Schema -> AgentTool parameter conversion, in-memory tool registry
  with ranked search, the single 'mcp' proxy AgentTool (search /
  describe / list / call / connect / status / auth-start), per-server
  opt-in direct tools ({server}_{tool}), and McpService (CRUD,
  discovery, OAuth, per-agent assignment via AgentMcpServer, and
  permission gating on tool execution mirroring skills).
- Agent: chat agents receive the 'mcp' proxy tool (plus direct tools
  for opted-in servers) built from their assigned, enabled servers.
- API: /teams/:teamId/mcp/servers CRUD, tools refresh/list, auth
  start/complete/status/remove, test, permission, and the public
  OAuth callback route; Admin authz via new ResourceType.McpServer;
  audit logging.
- DTOs: zod schemas + types for servers, tools, auth, and per-agent
  mcpServerIds.
- Tests: DB store, schema conversion, registry/search, service
  integration against a real in-process MCP server (v2
  @modelcontextprotocol/server), permission gating, rename
  invalidation, direct tools, per-agent assignment, API route tests,
  and workflow E2E (local + temporal) for proxy and direct modes.

* fix(mcp): persist OAuth discovery snapshot and stamp SEP-2352 issuer

The callback leg of the OAuth flow failed with
AuthorizationServerMismatchError ('discoveryState was not available on
the callback leg') because McpDbStore.savePendingAuth overwrote the
entire pendingAuth JSON column, clobbering the discoverySnapshot that
the provider's saveDiscoveryState() had stored inside it.

- McpDbStore.savePendingAuth now preserves an in-flight discovery
  snapshot so the callback leg can satisfy the SEP-2352 authorization-
  server issuer check.
- McpOauthProvider now round-trips the issuer stamp derived from the
  discovery snapshot: saveClientInformation/saveTokens persist it,
  clientInformation()/tokens() return it, and tokens() backfills a
  missing stamp for pre-existing credentials (removes the
  'stored OAuth credential has no issuer stamp' warning).
- Regression tests: savePendingAuth keeps the snapshot; the provider
  stamps/round-trips the issuer on both legs.

* fix(mcp): backfill SEP-2352 issuer stamp on stale OAuth client info

clientInformation() returned stored client info without an issuer field
when it had been dynamically registered before the stamping fix, so the
SDK logged 'stored OAuth credential has no issuer stamp' on every read.
Now the stored branch backfills the issuer from the discovery snapshot
(persisting it) exactly like the tokens() backfill.

* feat(webui): add MCP server configuration and agent assignment UI (#290)

* feat(webui): add MCP server configuration and agent assignment UI

* fix(webui): auto-detect auth for unconfigured MCP servers and show connect button

* fix(mcp): auto-generate state in mcp-oauth-provider when missing in DB

* fix(mcp): persist OAuth discovery snapshot and stamp SEP-2352 issuer

The callback leg of the OAuth flow failed with
AuthorizationServerMismatchError ('discoveryState was not available on
the callback leg') because McpDbStore.savePendingAuth overwrote the
entire pendingAuth JSON column, clobbering the discoverySnapshot that
the provider's saveDiscoveryState() had stored inside it.

- McpDbStore.savePendingAuth now preserves an in-flight discovery
  snapshot so the callback leg can satisfy the SEP-2352 authorization-
  server issuer check.
- McpOauthProvider now round-trips the issuer stamp derived from the
  discovery snapshot: saveClientInformation/saveTokens persist it,
  clientInformation()/tokens() return it, and tokens() backfills a
  missing stamp for pre-existing credentials (removes the
  'stored OAuth credential has no issuer stamp' warning).
- Regression tests: savePendingAuth keeps the snapshot; the provider
  stamps/round-trips the issuer on both legs.

* fix(mcp): backfill SEP-2352 issuer stamp on stale OAuth client info

clientInformation() returned stored client info without an issuer field
when it had been dynamically registered before the stamping fix, so the
SDK logged 'stored OAuth credential has no issuer stamp' on every read.
Now the stored branch backfills the issuer from the discovery snapshot
(persisting it) exactly like the tokens() backfill.

* fix(mcp): attach McpOauthProvider for auto-detected OAuth servers and discover tools on auth completion

* fix(webui): fix flex min-h-0 and max-h scrolling on MCP tools dialog

* fix(webui): set explicit flex height on McpToolsDialog for active scrolling

* feat(webui): make MCP server cards clickable to edit and widen server config dialog

* feat(mcp): agent-level server enablement and auto-detected server metadata (#291)

* feat(mcp): agent-level server enablement and auto-detected server metadata

- Remove the server-level `enabled` column from mcp_servers; enable/disable
  now happens per-agent via the AgentMcpServer join table (mirrors skills).
- Drop the unique (teamId, name) constraint so duplicate server names are allowed.
- Add a `description` column, auto-filled from client.getServerVersion() on
  connect; the server name is auto-filled from the reported title (fallback name)
  with a URL-derived placeholder until first connect.
- Remove manual name input: the create dialog is URL-only, and the edit dialog
  shows the auto-detected name/description read-only.
- Replace the include/exclude raw-text inputs with the tool list in the edit
  dialog, managing only excludeTools; remove includeTools support and the
  separate McpToolsDialog component.
- Sanitize server-reported names into safe direct-tool prefixes (spaces/punctuation
  become underscores) and use the same sanitization in the proxy resolver.

* fix(mcp): give the edit-dialog tool list a definite height

The Shadcn ScrollArea viewport is h-full, which requires a definite height
on the root. Using max-h-64 left the viewport at auto height, so the root
clipped the list at 256px without engaging its own scrollbar — tools past
the cutoff were unreachable. Use a fixed h-64 container (same pattern as
move-copy-dialog) so the inner scroll area scrolls independently of the
dialog's outer scroll.

* refactor(mcp): fixed header/footer with scrollable content in server config dialog

Mirror the skill config dialog layout: the edit dialog now keeps the header
and footer fixed and scrolls only the content area (ScrollArea flex-1
min-h-0 inside an h-[85vh] flex column). The tools list no longer has its
own nested ScrollArea — it flows inside the content-level scroll, so all
tools are reachable without a nested-scroll conflict. The create dialog
stays compact (URL-only) like the skill add dialog.

Verified headlessly that max-height-based ScrollArea roots do not engage
scrolling (viewport height resolves to auto), which is why the previous
nested list clipped; the flex-based definite-height pattern scrolls.

* feat(mcp): make the endpoint URL immutable after creation

Editing a server's URL effectively points it at a different server, and the
create flow is URL-only anyway — so the edit dialog no longer allows changing
it (delete + re-add covers endpoint changes). The URL is displayed read-only
next to the auto-detected name/description, and `url` was removed from the
update DTO and service; auth/transport changes still invalidate credentials
and cached tools.

* refactor(mcp): match MCP server cards to the skill card layout

The settings list cards now share the skill card structure: row 1 is the
server name (with direct-mode/transport badges) plus the three-dot menu,
row 2 is the description (falling back to 'No description provided') with
the endpoint URL and last error as small mono lines, and row 3 holds the
connection-status badge and updated date on the left with the permission
selector and the connect button at the right end.

* fix(mcp): stop card menu clicks from opening the edit dialog

The three-dot menu is portaled, so its item clicks bubble through React's
synthetic events to the card's onClick, which opened the edit dialog before
the delete confirmation appeared. Add e.stopPropagation() to every menu
item (matching the skill card pattern).

* fix(mcp): stop Refresh Tools from submitting/closing the config dialog

The Refresh Tools button lived inside the <form> and, like all buttons
without an explicit type, defaulted to type="submit" — clicking it ran the
form submit (save + close) instead of just refreshing. Set type="button".

Also per UX: while refreshing, the button is disabled with a spinning icon,
the per-tool enable/disable switches are disabled, and the success toast is
removed — the button reverting to its idle state is the success signal
(keep the error toast for failures).

* test(mcp): provide explicit redirectUri in McpOauthProvider test helper

* fix(mcp): scope tool registry to agent-assigned servers

The MCP tool registry was a process-global singleton keyed by server id,
so a chat agent could search, describe, and even call tools belonging to
MCP servers that were not assigned to it (e.g. disabled or unassigned
servers), as long as their metadata had been discovered at some point in
the process. This mirrors the disabled-skill bug: the read path never
checked per-agent enablement.

Replace the singleton with a fresh McpToolRegistry built per
buildAgentTools call and warmed from the persisted McpServer.tools DB
cache. Because the registry only ever contains the agent's assigned
servers, unassigned/disabled servers can neither be suggested, searched,
described, nor executed. Live discovery (lazy connect / connect action)
writes into the per-agent registry via ensureConnected(serverId,
registry?).

Adds test-first coverage: suggestions, search, describe and tool-call
leaks across an unassigned same-team server, staleness after
unassignment, and direct-tools scoping.

* feat(mcp): capture and surface server instructions + server-level refresh (#293)

* feat(mcp): capture and surface server instructions

- Add McpServer.instructions column, populated from getInstructions() at
  connect time (legacy initialize + modern discover results)
- Surface instructions at three levels like pi-mcp-adapter: truncated
  snippet in the mcp proxy tool description, preview in server listings,
  and full text via mcp({ instructions: "name" })
- Fix misleading mcp({ server, connect }) usage line to mcp({ connect })
- Share one renderServerListing helper across list and connect modes
- Expose instructions in McpServerInfo DTO and WebUI config card
- Test server supports instructions; service + API tests updated

* refactor(mcp): server-level refresh endpoint, drop agent connect mode

- Replace POST /mcp/servers/:id/tools/refresh with POST /mcp/servers/:id/refresh
  returning the refreshed McpServerInfo (server-level, not tools-level)
- Add McpService.refreshServer(): force-close the connection, re-discover and
  persist tools, instructions, name/description and status; used by the refresh
  endpoint, Test Connection, and post-OAuth completion (replacing discoverTools)
- Remove discoverTools entirely - refreshServer is the single discovery entry
  point (testServer and completeAuth route through it)
- Remove refreshTools from UpdateMcpServerRequest/PATCH (dead param)
- Remove mcp({ connect: "name" }) from the agent proxy tool: lazy tool calls
  still auto-connect, so agents are unaffected
- WebUI: remove the dialog 'Refresh Tools' button and create-mode background
  auto-refresh; add a server-level Refresh button at the left end of the edit
  dialog footer; i18n mcp_refresh_server (+ success message)

* feat(mcp): add in-flight request tracking and idle connection cleanup (#294)

* feat(mcp): add in-flight request tracking and idle connection cleanup

* feat(mcp): add background idle cleanup timer to McpService

* feat(mcp): update default background idle cleanup check interval to 30s

* feat(webui): improve MCP server card footer, instructions, and refresh dialog freeze (#295)

* feat(webui): improve MCP server list card, instructions dialog, and refresh freeze UI

* feat(webui): refine MCP card action menu items

* docs(webui): update direct tools mode description in i18n messages

* style(webui): refine Direct Tools Mode layout in MCP server config dialog

* feat(webui): remove tool search box from MCP server config dialog

* fix(mcp): make in-flight idle tracking test deterministic

The 'tracks in-flight requests and safely prunes idle connections' test
relied on a wall-clock sleep (10ms) to guess when the tool handler had
started executing on the server. On slow/loaded CI runners the HTTP round
trip through the real MCP client/server stack can exceed that window, so
resolveSlowTool() fired the no-op placeholder, the gated handler never
completed, and callPromise hung until the 5000ms test timeout.

The handler now signals via a deferred promise when it actually starts,
and the test awaits that signal (racing it against the call promise to
surface early failures) before asserting in-flight state and releasing
the gate. Also gives the test an explicit 10s timeout.
This commit is contained in:
Yiling-J
2026-08-11 11:01:38 +08:00
committed by GitHub
parent 1daeaf51ef
commit 1b5cbf936a
149 changed files with 16076 additions and 24 deletions
@@ -2,6 +2,7 @@ import { client } from '@/ui/api/client'
import { Button } from '@/ui/components/ui/button'
import { Input } from '@/ui/components/ui/input'
import { Label } from '@/ui/components/ui/label'
import { Badge } from '@/ui/components/ui/badge'
import {
Dialog,
DialogContent,
@@ -21,7 +22,7 @@ import {
import { Switch } from '@/ui/components/ui/switch'
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import { useForm, useStore } from '@tanstack/react-form'
import { Loader2, Puzzle, Terminal } from 'lucide-react'
import { Loader2, Puzzle, Server, Terminal } from 'lucide-react'
import { useEffect, useMemo } from 'react'
import { m } from '@/ui/paraglide/messages.js'
import { toast } from 'sonner'
@@ -52,6 +53,7 @@ const agentFormSchema = z.object({
thinkingLevel: thinkingLevelSchema.optional(),
systemPrompt: z.string().optional(),
skills: z.array(z.string()).optional(),
mcpServerIds: z.array(z.string()).optional(),
deniedTools: z.array(z.string()).optional(),
})
@@ -144,6 +146,21 @@ export function AgentFormDialog({
const allSkills = skillsData?.skills || []
// Fetch MCP Servers
const { data: mcpData } = useQuery({
queryKey: ['teams', teamId, 'mcp', 'servers'],
queryFn: async () => {
const res = await client.api.teams[':teamId'].mcp.servers.$get({
param: { teamId },
})
if (!res.ok) throw new Error('Failed to fetch MCP servers')
return await res.json()
},
enabled: isOpen,
})
const allMcpServers = mcpData?.servers || []
const schema = useMemo(() => {
return agentFormSchema.superRefine((data, ctx) => {
if (data.type === 'chat' || data.type === 'autofill') {
@@ -176,6 +193,7 @@ export function AgentFormDialog({
thinkingLevel: initialValues?.thinkingLevel || 'off',
systemPrompt: initialValues?.systemPrompt || '',
skills: initialValues?.skills?.map((s) => s.skillId) || ([] as string[]),
mcpServerIds: initialValues?.mcpServerIds || ([] as string[]),
deniedTools: initialValues?.deniedTools || ([] as string[]),
} as AgentFormValues,
validators: {
@@ -563,6 +581,91 @@ export function AgentFormDialog({
</div>
</div>
<div className="space-y-4 border-t border-border pt-6">
<Label className="text-base font-bold flex items-center gap-2">
<Server className="w-5 h-5 text-primary" />
{m.mcp_servers()}
</Label>
<div className="space-y-2">
<form.Field
name="mcpServerIds"
children={(mcpField) => (
<>
{allMcpServers.map((mcpServer) => {
const isEnabled =
mcpField.state.value?.includes(mcpServer.id) || false
const needsAuth =
mcpServer.status === 'needs_auth' ||
(!mcpServer.hasCredential && mcpServer.authType === 'oauth')
return (
<div
key={mcpServer.id}
className="flex items-center justify-between p-3 bg-muted/30 border border-border rounded-lg"
>
<div className="flex items-center gap-3">
<Server className="w-4 h-4 text-muted-foreground" />
<div className="flex flex-col">
<div className="flex items-center gap-2">
<span className="text-sm font-medium">
{mcpServer.name}
</span>
<Badge variant="outline" className="text-[10px]">
{mcpServer.toolCount ?? 0} tools
</Badge>
{needsAuth && (
<Badge
variant="secondary"
className="text-[10px] bg-amber-500/10 text-amber-600 border-amber-500/20"
>
{m.mcp_status_needs_auth()}
</Badge>
)}
</div>
<span className="text-[10px] font-mono text-muted-foreground line-clamp-1">
{mcpServer.url}
</span>
</div>
</div>
<div className="flex items-center gap-2">
<span className="text-xs text-muted-foreground">
{isEnabled ? m.enabled() : m.disabled()}
</span>
<Switch
checked={isEnabled}
onCheckedChange={(checked) => {
if (checked) {
mcpField.handleChange([
...(mcpField.state.value || []),
mcpServer.id,
])
} else {
mcpField.handleChange(
(mcpField.state.value || []).filter(
(id) => id !== mcpServer.id,
),
)
}
}}
/>
</div>
</div>
)
})}
{allMcpServers.length === 0 && (
<div className="text-center py-6 border-2 border-dashed border-border rounded-xl">
<p className="text-xs text-muted-foreground">
{m.no_mcp_servers_installed()}
</p>
</div>
)}
</>
)}
/>
</div>
</div>
<div className="space-y-4 border-t border-border pt-6">
<Label className="text-base font-bold flex items-center gap-2">
<Terminal className="w-5 h-5 text-primary" />
@@ -0,0 +1,487 @@
import React, { useState } from 'react'
import { client } from '@/ui/api/client'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import {
Server,
Loader2,
MoreVertical,
Plus,
Trash2,
Zap,
ShieldCheck,
CheckCircle2,
AlertCircle,
Clock,
Key,
Wrench,
} from 'lucide-react'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/ui/components/ui/card'
import { Button } from '@/ui/components/ui/button'
import { Badge } from '@/ui/components/ui/badge'
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@/ui/components/ui/dropdown-menu'
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from '@/ui/components/ui/alert-dialog'
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/ui/components/ui/select'
import { McpServerInfo, McpServerPermission } from '@shumai/dtos'
import { m } from '@/ui/paraglide/messages.js'
import { usePermissions } from '@/ui/hooks/use-permissions'
import { toast } from 'sonner'
import { McpServerFormDialog } from './McpServerFormDialog'
interface McpConfigCardProps {
teamId: string
}
export const McpConfigCard: React.FC<McpConfigCardProps> = ({ teamId }) => {
const queryClient = useQueryClient()
const { canAdmin } = usePermissions()
const [isAddFormOpen, setIsAddFormOpen] = useState(false)
const [editingServer, setEditingServer] = useState<McpServerInfo | null>(null)
const [deletingServer, setDeletingServer] = useState<McpServerInfo | null>(null)
const [authenticatingServerId, setAuthenticatingServerId] = useState<string | null>(null)
// Fetch MCP Servers
const { data, isLoading } = useQuery({
queryKey: ['teams', teamId, 'mcp', 'servers'],
queryFn: async () => {
const res = await client.api.teams[':teamId'].mcp.servers.$get({ param: { teamId } })
if (!res.ok) throw new Error(m.failed_load_settings())
return await res.json()
},
})
// Delete Server Mutation
const deleteMutation = useMutation({
mutationFn: async (id: string) => {
const res = await client.api.mcp.servers[':id'].$delete({ param: { id } })
if (!res.ok) throw new Error(m.failed_to_delete())
},
onSuccess: () => {
toast.success(m.delete())
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
setDeletingServer(null)
},
onError: (err: Error) => {
toast.error(err.message)
},
})
// Update Permission Mutation
const updatePermissionMutation = useMutation({
mutationFn: async ({ id, permission }: { id: string; permission: McpServerPermission }) => {
const res = await client.api.mcp.servers[':id'].permission.$patch({
param: { id },
json: { permission },
})
if (!res.ok) throw new Error(m.failed_to_update_permission())
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
},
onError: (err: Error) => {
toast.error(err.message)
},
})
// Enable/Disable Mutation
// (Removed: enable/disable now happens per-agent via AgentMcpServer assignment.)
// Disconnect Auth Mutation
const disconnectAuthMutation = useMutation({
mutationFn: async (id: string) => {
const res = await client.api.mcp.servers[':id'].auth.$delete({ param: { id } })
if (!res.ok) throw new Error('Failed to disconnect auth')
},
onSuccess: () => {
toast.success(m.mcp_disconnect_auth())
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
},
onError: (err: Error) => {
toast.error(err.message)
},
})
// Start Auth Flow (OAuth Popup / Bearer)
const handleStartAuth = async (serverId: string) => {
setAuthenticatingServerId(serverId)
try {
const res = await client.api.mcp.servers[':id'].auth.start.$post({
param: { id: serverId },
})
if (!res.ok) {
const err = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(err.error || m.mcp_auth_failed())
}
const data = (await res.json()) as { authorizationUrl?: string; status?: string }
if (data.status === 'authenticated') {
toast.success(m.mcp_auth_success())
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
setAuthenticatingServerId(null)
return
}
if (data.authorizationUrl) {
// Open OAuth popup window
const width = 600
const height = 700
const left = window.screenX + (window.outerWidth - width) / 2
const top = window.screenY + (window.outerHeight - height) / 2
const popup = window.open(
data.authorizationUrl,
'mcp_oauth_popup',
`width=${width},height=${height},left=${left},top=${top},scrollbars=yes`,
)
const handleMessage = (event: MessageEvent) => {
if (event.data?.type === 'mcp-oauth-callback') {
window.removeEventListener('message', handleMessage)
setAuthenticatingServerId(null)
if (event.data.ok) {
toast.success(m.mcp_auth_success())
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
} else {
toast.error(event.data.message || m.mcp_auth_failed())
}
}
}
window.addEventListener('message', handleMessage)
// Monitor popup closure
const checkClosed = setInterval(() => {
if (!popup || popup.closed) {
clearInterval(checkClosed)
window.removeEventListener('message', handleMessage)
setAuthenticatingServerId(null)
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
}
}, 1000)
}
} catch (err) {
toast.error(err instanceof Error ? err.message : m.mcp_auth_failed())
setAuthenticatingServerId(null)
}
}
const servers = data?.servers || []
const renderStatusBadge = (server: McpServerInfo) => {
switch (server.status) {
case 'connected':
return (
<Badge
variant="secondary"
className="gap-1 bg-emerald-500/10 text-emerald-600 border-emerald-500/20 text-[10px]"
>
<CheckCircle2 className="w-3 h-3" />
{m.mcp_status_connected()}
</Badge>
)
case 'needs_auth':
return (
<Badge
variant="secondary"
className="gap-1 bg-amber-500/10 text-amber-600 border-amber-500/20 text-[10px]"
>
<Key className="w-3 h-3" />
{m.mcp_status_needs_auth()}
</Badge>
)
case 'failed':
return (
<Badge
variant="secondary"
className="gap-1 bg-red-500/10 text-red-600 border-red-500/20 text-[10px]"
>
<AlertCircle className="w-3 h-3" />
{m.mcp_status_failed()}
</Badge>
)
default:
return (
<Badge variant="outline" className="gap-1 text-[10px]">
<Clock className="w-3 h-3 text-muted-foreground" />
{m.mcp_status_not_connected()}
</Badge>
)
}
}
return (
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-7">
<div className="flex items-center gap-3">
<div className="p-2 bg-primary/10 text-primary rounded-lg">
<Server className="w-6 h-6" />
</div>
<div>
<CardTitle className="text-xl font-bold">{m.mcp_servers()}</CardTitle>
<CardDescription>{m.mcp_servers_description()}</CardDescription>
</div>
</div>
{canAdmin && (
<Button onClick={() => setIsAddFormOpen(true)} className="gap-2">
<Plus className="w-4 h-4" /> {m.add_mcp_server()}
</Button>
)}
</CardHeader>
<CardContent>
{isLoading ? (
<div className="flex justify-center py-10">
<Loader2 className="w-8 h-8 animate-spin text-primary" />
</div>
) : servers.length === 0 ? (
<div className="text-center py-12 border-2 border-dashed border-border rounded-xl">
<div className="mx-auto w-12 h-12 bg-muted rounded-full flex items-center justify-center mb-4 text-muted-foreground">
<Server className="w-6 h-6" />
</div>
<h3 className="text-base font-semibold">{m.no_mcp_servers_installed()}</h3>
<p className="text-xs text-muted-foreground mt-1 max-w-sm mx-auto">
{m.add_mcp_server_to_get_started()}
</p>
{canAdmin && (
<Button
onClick={() => setIsAddFormOpen(true)}
className="mt-4 gap-2"
variant="outline"
>
<Plus className="w-4 h-4" /> {m.add_mcp_server()}
</Button>
)}
</div>
) : (
<div className="space-y-4">
{servers.map((server) => {
const isDirectMode = server.config?.directTools
const isAuthenticating = authenticatingServerId === server.id
const needsAuth =
server.status === 'needs_auth' ||
(!server.hasCredential && server.authType !== 'none')
return (
<div
key={server.id}
onClick={() => canAdmin && setEditingServer(server)}
className={`p-4 bg-card rounded-xl border border-border flex flex-col justify-between hover:shadow-md transition-all group ${
canAdmin ? 'cursor-pointer' : ''
}`}
>
{/* Row 1: name + three-dot */}
<div className="flex items-start justify-between gap-2 mb-2">
<h4 className="font-bold text-foreground flex items-center gap-2 min-w-0">
<Server className="w-4 h-4 text-muted-foreground shrink-0" />
<span className="truncate">{server.name}</span>
{isDirectMode && (
<Badge
variant="outline"
className="text-[10px] bg-primary/5 text-primary border-primary/20 shrink-0"
>
<Zap className="w-3 h-3 mr-0.5" />
{m.mcp_direct_tools_mode()}
</Badge>
)}
<Badge variant="outline" className="text-[10px] uppercase shrink-0">
{server.transport}
</Badge>
</h4>
{canAdmin && (
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild onClick={(e) => e.stopPropagation()}>
<Button variant="ghost" size="icon" className="h-8 w-8 shrink-0">
<MoreVertical className="w-4 h-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
{server.status !== 'connected' &&
(server.authType !== 'none' || server.hasCredential) ? (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation()
handleStartAuth(server.id)
}}
>
<Key className="w-4 h-4 mr-2" />
{m.mcp_connect_auth()}
</DropdownMenuItem>
) : null}
{server.hasCredential && (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation()
disconnectAuthMutation.mutate(server.id)
}}
className="text-amber-600"
>
<ShieldCheck className="w-4 h-4 mr-2" />
{m.mcp_disconnect_auth()}
</DropdownMenuItem>
)}
{((server.status !== 'connected' &&
(server.authType !== 'none' || server.hasCredential)) ||
server.hasCredential) && <DropdownMenuSeparator />}
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation()
setDeletingServer(server)
}}
className="text-red-600"
>
<Trash2 className="w-4 h-4 mr-2" />
{m.delete()}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)}
</div>
{/* Row 2: description + url + lastError */}
<div className="space-y-1">
<p className="text-sm text-muted-foreground line-clamp-2">
{server.description || m.no_description_provided()}
</p>
<p className="font-mono text-[10px] text-muted-foreground/70 truncate">
{server.url}
</p>
{server.lastError && (
<p className="text-[10px] text-red-500/90 truncate font-mono">
{server.lastError}
</p>
)}
</div>
{/* Row 3: status + updated (left), permission + connect (right) */}
<div className="mt-4 flex items-center justify-between gap-2 pt-2 border-t border-border/50 text-xs">
<div className="flex items-center gap-2 min-w-0">
{renderStatusBadge(server)}
<Badge variant="outline" className="text-[10px] gap-1 shrink-0">
<Wrench className="w-3 h-3 text-muted-foreground" />
{m.mcp_tools_count({ count: server.toolCount })}
</Badge>
<span className="text-[10px] text-muted-foreground uppercase tracking-wider font-semibold whitespace-nowrap">
{m.updated_date()} {new Date(server.updatedAt).toLocaleDateString()}
</span>
</div>
<div
className="flex items-center gap-2 shrink-0"
onClick={(e) => e.stopPropagation()}
>
{canAdmin ? (
<Select
value={server.permission}
onValueChange={(permission) =>
updatePermissionMutation.mutate({
id: server.id,
permission: permission as McpServerPermission,
})
}
>
<SelectTrigger className="h-7 text-xs px-2 bg-background border-border w-[130px]">
<SelectValue />
</SelectTrigger>
<SelectContent align="end">
<SelectItem value="reviewer">{m.permission_all_users()}</SelectItem>
<SelectItem value="editor">
{m.permission_owner_and_editor()}
</SelectItem>
<SelectItem value="owner">{m.permission_owner_only()}</SelectItem>
</SelectContent>
</Select>
) : (
<Badge variant="outline" className="text-[10px]">
{server.permission === 'reviewer'
? m.permission_all_users()
: server.permission === 'editor'
? m.permission_owner_and_editor()
: m.permission_owner_only()}
</Badge>
)}
{/* Connect button — right end of the row */}
{needsAuth && canAdmin && (
<Button
size="sm"
variant="default"
onClick={(e) => {
e.stopPropagation()
handleStartAuth(server.id)
}}
disabled={isAuthenticating}
className="gap-1.5 bg-amber-600 hover:bg-amber-700 text-white text-xs"
>
{isAuthenticating ? (
<Loader2 className="w-3.5 h-3.5 animate-spin" />
) : (
<Key className="w-3.5 h-3.5" />
)}
{m.mcp_connect_auth()}
</Button>
)}
</div>
</div>
</div>
)
})}
</div>
)}
</CardContent>
{/* Form Dialog for Add / Edit */}
<McpServerFormDialog
isOpen={isAddFormOpen || !!editingServer}
onClose={() => {
setIsAddFormOpen(false)
setEditingServer(null)
}}
teamId={teamId}
server={editingServer}
/>
{/* Delete Confirmation Alert */}
<AlertDialog
open={!!deletingServer}
onOpenChange={(open) => !open && setDeletingServer(null)}
>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>{m.delete_mcp_server()}</AlertDialogTitle>
<AlertDialogDescription>
{m.delete_mcp_server_confirmation({ name: deletingServer?.name || '' })}
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>{m.cancel()}</AlertDialogCancel>
<AlertDialogAction
onClick={() => deletingServer && deleteMutation.mutate(deletingServer.id)}
className="bg-red-600 hover:bg-red-700 text-white"
>
{deleteMutation.isPending && <Loader2 className="w-4 h-4 mr-2 animate-spin" />}
{m.delete()}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Card>
)
}
@@ -0,0 +1,657 @@
import React, { useState, useEffect } from 'react'
import { client } from '@/ui/api/client'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/ui/components/ui/dialog'
import { Button } from '@/ui/components/ui/button'
import { Input } from '@/ui/components/ui/input'
import { Label } from '@/ui/components/ui/label'
import { Switch } from '@/ui/components/ui/switch'
import { Badge } from '@/ui/components/ui/badge'
import { ScrollArea } from '@/ui/components/ui/scroll-area'
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/ui/components/ui/select'
import { Loader2, Server, Info, RefreshCw, Wrench, ChevronDown, ChevronRight } from 'lucide-react'
import { m } from '@/ui/paraglide/messages.js'
import { toast } from 'sonner'
import {
McpServerInfo,
McpTransport,
McpServerPermission,
McpServerAuthType,
McpToolInfo,
CreateMcpServerRequest,
UpdateMcpServerRequest,
} from '@shumai/dtos'
interface McpServerFormDialogProps {
isOpen: boolean
onClose: () => void
teamId: string
server?: McpServerInfo | null
}
export const McpServerFormDialog: React.FC<McpServerFormDialogProps> = ({
isOpen,
onClose,
teamId,
server,
}) => {
const queryClient = useQueryClient()
const isEditing = !!server
const [url, setUrl] = useState('')
const [transport, setTransport] = useState<McpTransport>('streamable_http')
const [permission, setPermission] = useState<McpServerPermission>('reviewer')
// Auth config state
const [authType, setAuthType] = useState<McpServerAuthType | 'auto'>('auto')
const [bearerToken, setBearerToken] = useState('')
const [clientId, setClientId] = useState('')
const [clientSecret, setClientSecret] = useState('')
const [scope, setScope] = useState('')
const [grantType, setGrantType] = useState<'authorization_code' | 'client_credentials'>(
'authorization_code',
)
// Config state
const [directTools, setDirectTools] = useState(false)
const [excludedTools, setExcludedTools] = useState<string[]>([])
// Tools inspector state
const [expandedTools, setExpandedTools] = useState<Record<string, boolean>>({})
const [isInstructionsExpanded, setIsInstructionsExpanded] = useState(false)
useEffect(() => {
if (server) {
setUrl(server.url)
setTransport(server.transport || 'streamable_http')
setPermission(server.permission || 'reviewer')
setAuthType(server.authType || 'auto')
setDirectTools(server.config?.directTools ?? false)
setExcludedTools(server.config?.excludeTools ?? [])
setExpandedTools({})
setIsInstructionsExpanded(false)
} else {
setUrl('')
setTransport('streamable_http')
setPermission('reviewer')
setAuthType('auto')
setBearerToken('')
setClientId('')
setClientSecret('')
setScope('')
setGrantType('authorization_code')
setDirectTools(false)
setExcludedTools([])
setExpandedTools({})
setIsInstructionsExpanded(false)
}
}, [server, isOpen])
const buildAuthConfig = () => {
if (authType === 'none') {
return { type: 'none' as const }
}
if (authType === 'bearer') {
return { type: 'bearer' as const, bearerToken: bearerToken || undefined }
}
if (authType === 'oauth') {
return {
type: 'oauth' as const,
oauth: {
grantType,
clientId: clientId || undefined,
clientSecret: clientSecret || undefined,
scope: scope || undefined,
},
}
}
return undefined // 'auto'
}
// Fetch tools (edit mode only)
const {
data: toolsData,
isLoading: isToolsLoading,
refetch: refetchTools,
} = useQuery({
queryKey: ['mcp', 'servers', server?.id, 'tools'],
queryFn: async () => {
if (!server?.id) return { tools: [] as McpToolInfo[] }
const res = await client.api.mcp.servers[':id'].tools.$get({
param: { id: server.id },
})
if (!res.ok) throw new Error('Failed to fetch tools')
return await res.json()
},
enabled: isOpen && isEditing && !!server?.id,
})
const refreshMutation = useMutation({
mutationFn: async () => {
if (!server?.id) return
const res = await client.api.mcp.servers[':id'].refresh.$post({
param: { id: server.id },
})
if (!res.ok) {
const err = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(err.error || 'Failed to refresh server')
}
return await res.json()
},
onSuccess: () => {
toast.success(m.mcp_refresh_server_success())
// The tool list is refetched and the toggles re-enable; the server cards
// re-fetch the updated record (name, description, instructions, status).
refetchTools()
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
},
onError: (err: Error) => {
toast.error(err.message)
},
})
const saveMutation = useMutation({
mutationFn: async () => {
const config = {
directTools,
excludeTools: excludedTools.length > 0 ? excludedTools : undefined,
}
if (isEditing && server) {
const updatePayload: UpdateMcpServerRequest = {
transport,
permission,
authConfig: buildAuthConfig(),
config,
}
const res = await client.api.mcp.servers[':id'].$patch({
param: { id: server.id },
json: updatePayload,
})
if (!res.ok) {
const errData = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || m.failed_to_update_permission())
}
return await res.json()
} else {
const createPayload: CreateMcpServerRequest = {
url: url.trim(),
}
const res = await client.api.teams[':teamId'].mcp.servers.$post({
param: { teamId },
json: createPayload,
})
if (!res.ok) {
const errData = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || m.an_unknown_error_occurred())
}
const created = await res.json()
return created
}
},
onSuccess: () => {
toast.success(isEditing ? m.profile_updated() : m.mcp_servers())
queryClient.invalidateQueries({ queryKey: ['teams', teamId, 'mcp', 'servers'] })
onClose()
},
onError: (err: Error) => {
toast.error(err.message)
},
})
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault()
if (!url.trim()) return
saveMutation.mutate()
}
const tools = toolsData?.tools ?? []
const isToolExcluded = (toolName: string) => excludedTools.includes(toolName)
const toggleToolEnabled = (toolName: string, enabled: boolean) => {
setExcludedTools((prev) => (enabled ? prev.filter((n) => n !== toolName) : [...prev, toolName]))
}
const toggleExpand = (toolName: string) => {
setExpandedTools((prev) => ({ ...prev, [toolName]: !prev[toolName] }))
}
return (
<Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>
{isEditing && server ? (
/* ------------------------------------------------------------------
* Edit / config mode: fixed header + footer, scrollable content.
* Mirrors the skill config dialog layout.
* ------------------------------------------------------------------ */
<DialogContent className="sm:max-w-2xl h-[85vh] flex flex-col p-0 overflow-hidden">
{refreshMutation.isPending && (
<div className="absolute inset-0 bg-background/60 backdrop-blur-[1px] flex flex-col items-center justify-center z-50 rounded-lg">
<Loader2 className="w-8 h-8 animate-spin text-primary mb-2" />
<span className="text-xs font-medium text-muted-foreground">
{m.mcp_refresh_server()}...
</span>
</div>
)}
<DialogHeader className="p-6 pb-4 border-b border-border flex-shrink-0">
<DialogTitle className="flex items-center gap-2 text-xl font-bold">
<Server className="w-5 h-5 text-primary" />
{m.edit_mcp_server()}
</DialogTitle>
<DialogDescription>{m.mcp_servers_description()}</DialogDescription>
</DialogHeader>
<form onSubmit={handleSubmit} className="flex-1 flex flex-col min-h-0 overflow-hidden">
<ScrollArea className="flex-1 min-h-0">
<div className="p-6 space-y-5">
{/* Auto-detected identity (read-only) — the endpoint URL is
set at creation and immutable here (delete + re-add to
change it). */}
<div className="grid grid-cols-1 gap-3 p-3 bg-muted/30 border border-border rounded-lg">
<div className="flex flex-col">
<span className="text-[10px] uppercase tracking-wider text-muted-foreground font-semibold">
{m.mcp_server_name()}
</span>
<span className="text-sm font-medium">{server.name}</span>
</div>
<div className="flex flex-col">
<span className="text-[10px] uppercase tracking-wider text-muted-foreground font-semibold">
{m.mcp_server_url()}
</span>
<span className="text-sm font-mono text-foreground break-all">
{server.url}
</span>
</div>
{server.description && (
<div className="flex flex-col">
<span className="text-[10px] uppercase tracking-wider text-muted-foreground font-semibold">
{m.description()}
</span>
<span className="text-sm text-foreground">{server.description}</span>
</div>
)}
{server.instructions && (
<div className="flex flex-col">
<span className="text-[10px] uppercase tracking-wider text-muted-foreground font-semibold">
{m.mcp_server_instructions()}
</span>
<p
onClick={() => setIsInstructionsExpanded((prev) => !prev)}
className={`text-xs text-muted-foreground cursor-pointer transition-all ${
isInstructionsExpanded ? '' : 'line-clamp-2'
}`}
title={isInstructionsExpanded ? undefined : server.instructions}
>
{server.instructions}
</p>
</div>
)}
<span className="text-[10px] text-muted-foreground flex items-center gap-1.5">
<Info className="w-3 h-3" />
{m.mcp_server_auto_detected()}
</span>
</div>
{/* Transport & Permission */}
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div className="space-y-2">
<Label className="text-xs font-semibold">{m.mcp_transport()}</Label>
<Select
value={transport}
onValueChange={(val) => setTransport(val as McpTransport)}
>
<SelectTrigger>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="streamable_http">Streamable HTTP (Default)</SelectItem>
<SelectItem value="sse">Server-Sent Events (SSE)</SelectItem>
</SelectContent>
</Select>
</div>
<div className="space-y-2">
<Label className="text-xs font-semibold">{m.skill_permission()}</Label>
<Select
value={permission}
onValueChange={(val) => setPermission(val as McpServerPermission)}
>
<SelectTrigger>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="reviewer">{m.permission_all_users()}</SelectItem>
<SelectItem value="editor">{m.permission_owner_and_editor()}</SelectItem>
<SelectItem value="owner">{m.permission_owner_only()}</SelectItem>
</SelectContent>
</Select>
</div>
</div>
{/* Authentication Section */}
<div className="space-y-3 pt-3 border-t border-border">
<Label className="text-xs font-semibold flex items-center justify-between">
<span>{m.mcp_auth_type()}</span>
<span className="text-[10px] text-muted-foreground font-normal">
Configures server connection auth
</span>
</Label>
<Select
value={authType}
onValueChange={(val) => setAuthType(val as McpServerAuthType | 'auto')}
>
<SelectTrigger>
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="auto">{m.mcp_auth_auto()}</SelectItem>
<SelectItem value="none">{m.mcp_auth_none()}</SelectItem>
<SelectItem value="bearer">{m.mcp_auth_bearer()}</SelectItem>
<SelectItem value="oauth">{m.mcp_auth_oauth()}</SelectItem>
</SelectContent>
</Select>
{authType === 'bearer' && (
<div className="space-y-2 pl-1 pt-1">
<Label className="text-xs">{m.mcp_bearer_token()}</Label>
<Input
type="password"
value={bearerToken}
onChange={(e) => setBearerToken(e.target.value)}
placeholder="Bearer token value"
/>
</div>
)}
{authType === 'oauth' && (
<div className="space-y-3 pl-1 pt-1 border-l-2 border-primary/20 pl-3">
<div className="grid grid-cols-1 md:grid-cols-2 gap-3">
<div className="space-y-1.5">
<Label className="text-xs">{m.mcp_oauth_grant_type()}</Label>
<Select
value={grantType}
onValueChange={(val) =>
setGrantType(val as 'authorization_code' | 'client_credentials')
}
>
<SelectTrigger className="h-9 text-xs">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="authorization_code">Authorization Code</SelectItem>
<SelectItem value="client_credentials">Client Credentials</SelectItem>
</SelectContent>
</Select>
</div>
<div className="space-y-1.5">
<Label className="text-xs">{m.mcp_oauth_client_id()}</Label>
<Input
className="h-9 text-xs"
value={clientId}
onChange={(e) => setClientId(e.target.value)}
placeholder="Optional pre-registered Client ID"
/>
</div>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-3">
<div className="space-y-1.5">
<Label className="text-xs">{m.mcp_oauth_client_secret()}</Label>
<Input
className="h-9 text-xs"
type="password"
value={clientSecret}
onChange={(e) => setClientSecret(e.target.value)}
placeholder="Optional Client Secret"
/>
</div>
<div className="space-y-1.5">
<Label className="text-xs">{m.mcp_oauth_scope()}</Label>
<Input
className="h-9 text-xs"
value={scope}
onChange={(e) => setScope(e.target.value)}
placeholder="Optional scope (e.g. read,write)"
/>
</div>
</div>
</div>
)}
</div>
{/* Mode */}
<div className="space-y-3 pt-3 border-t border-border">
<div className="p-3 bg-muted/20 border border-border rounded-lg space-y-1.5">
<div className="flex items-center justify-between">
<span className="text-xs font-semibold text-foreground">
{m.mcp_direct_tools_mode()}
</span>
<Switch checked={directTools} onCheckedChange={setDirectTools} />
</div>
<p className="text-[11px] text-muted-foreground leading-relaxed">
{m.mcp_direct_tools_desc()}
</p>
</div>
</div>
{/* Tools list (excludeTools management) */}
<div className="space-y-3 pt-3 border-t border-border">
<div className="flex items-center justify-between">
<Label className="text-xs font-semibold flex items-center gap-1.5">
<Wrench className="w-3.5 h-3.5" />
{m.mcp_tools()}
</Label>
</div>
<p className="text-[11px] text-muted-foreground">
{m.mcp_tools_count({ count: tools.length })} — {m.mcp_excluded_tools_hint()}
</p>
<div className="space-y-2">
{isToolsLoading ? (
<div className="flex justify-center py-8">
<Loader2 className="w-6 h-6 animate-spin text-primary" />
</div>
) : tools.length === 0 ? (
<div className="text-center py-6 text-muted-foreground text-xs">
{m.no_tools_found()}
</div>
) : (
tools.map((tool) => {
const enabled = !isToolExcluded(tool.name)
const isExpanded = !!expandedTools[tool.name]
const schemaObj = tool.inputSchema as {
properties?: Record<string, { type?: string; description?: string }>
required?: string[]
}
const hasProperties =
schemaObj?.properties && Object.keys(schemaObj.properties).length > 0
return (
<div
key={tool.name}
className={`border border-border rounded-lg p-3 transition-colors ${
enabled ? 'bg-card' : 'bg-muted/30 opacity-70'
}`}
>
<div className="flex items-start justify-between gap-3">
<div
className="flex items-start gap-2 flex-1 min-w-0 cursor-pointer"
onClick={() => hasProperties && toggleExpand(tool.name)}
>
{hasProperties ? (
isExpanded ? (
<ChevronDown className="w-4 h-4 text-muted-foreground mt-0.5 shrink-0" />
) : (
<ChevronRight className="w-4 h-4 text-muted-foreground mt-0.5 shrink-0" />
)
) : (
<div className="w-4 h-4 shrink-0" />
)}
<div className="min-w-0 flex-1">
<div className="flex items-center gap-2 flex-wrap">
<span className="font-mono text-xs font-bold text-foreground break-all">
{tool.name}
</span>
{tool.title && (
<Badge variant="outline" className="text-[10px]">
{tool.title}
</Badge>
)}
</div>
{tool.description && (
<p className="text-xs text-muted-foreground mt-1 break-words line-clamp-3">
{tool.description}
</p>
)}
</div>
</div>
<div className="flex items-center gap-2 shrink-0">
<Switch
checked={enabled}
disabled={refreshMutation.isPending || isToolsLoading}
onCheckedChange={(checked) =>
toggleToolEnabled(tool.name, checked)
}
/>
</div>
</div>
{/* Parameters schema expansion */}
{isExpanded && hasProperties && (
<div className="mt-3 pt-3 border-t border-border/60 pl-6 space-y-2">
<span className="text-[11px] font-semibold text-muted-foreground uppercase tracking-wider">
{m.tool_parameters()}
</span>
<div className="grid grid-cols-1 gap-1.5">
{Object.entries(schemaObj.properties!).map(
([propName, propDef]) => {
const isRequired = schemaObj.required?.includes(propName)
return (
<div
key={propName}
className="flex flex-col sm:flex-row sm:items-baseline justify-between gap-1 sm:gap-2 p-2 bg-muted/20 rounded text-xs min-w-0"
>
<div className="flex items-center gap-1.5 flex-wrap min-w-0">
<span className="font-mono font-semibold break-all">
{propName}
</span>
{isRequired && (
<span className="text-[10px] text-red-500 font-bold">
*
</span>
)}
<Badge
variant="secondary"
className="text-[9px] px-1 py-0"
>
{propDef.type || 'any'}
</Badge>
</div>
{propDef.description && (
<span className="text-[11px] text-muted-foreground break-words sm:max-w-[320px]">
{propDef.description}
</span>
)}
</div>
)
},
)}
</div>
</div>
)}
</div>
)
})
)}
</div>
</div>
</div>
</ScrollArea>
<DialogFooter className="p-6 pt-4 border-t border-border flex-shrink-0">
<Button
type="button"
variant="outline"
onClick={() => refreshMutation.mutate()}
disabled={refreshMutation.isPending || isToolsLoading || saveMutation.isPending}
className="gap-1.5 mr-auto"
>
<RefreshCw
className={`w-4 h-4 ${refreshMutation.isPending ? 'animate-spin' : ''}`}
/>
{m.mcp_refresh_server()}
</Button>
<Button type="button" variant="outline" onClick={onClose}>
{m.cancel()}
</Button>
<Button type="submit" disabled={saveMutation.isPending || !url}>
{saveMutation.isPending && <Loader2 className="w-4 h-4 mr-2 animate-spin" />}
{m.save_changes()}
</Button>
</DialogFooter>
</form>
</DialogContent>
) : (
/* ------------------------------------------------------------------
* Create mode: compact URL-only dialog. Name/description are
* auto-detected from the server after connecting.
* ------------------------------------------------------------------ */
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle className="flex items-center gap-2 text-xl font-bold">
<Server className="w-5 h-5 text-primary" />
{m.add_mcp_server()}
</DialogTitle>
<DialogDescription>{m.mcp_servers_description()}</DialogDescription>
</DialogHeader>
<form onSubmit={handleSubmit} className="space-y-4">
<div className="space-y-2">
<Label className="text-xs font-semibold">{m.mcp_server_url()}</Label>
<Input
value={url}
onChange={(e) => setUrl(e.target.value)}
placeholder="https://mcp.example.com/mcp"
type="url"
required
/>
<p className="text-[11px] text-muted-foreground flex items-center gap-1.5">
<Info className="w-3.5 h-3.5" />
{m.mcp_server_auto_detected()}
</p>
</div>
<DialogFooter>
<Button type="button" variant="outline" onClick={onClose}>
{m.cancel()}
</Button>
<Button type="submit" disabled={saveMutation.isPending || !url}>
{saveMutation.isPending && <Loader2 className="w-4 h-4 mr-2 animate-spin" />}
{m.create()}
</Button>
</DialogFooter>
</form>
</DialogContent>
)}
</Dialog>
)
}
+47
View File
@@ -353,6 +353,53 @@
"github_url_example": "Example: https://github.com/google/gemini-cli",
"configure_skill": "Configure Skill: {name}",
"manage_env_vars_description": "Manage environment variables for this skill instance.",
"mcp_servers": "MCP Servers",
"mcp_servers_description": "Configure Model Context Protocol (MCP) servers and tools for your team.",
"add_mcp_server": "Add MCP Server",
"edit_mcp_server": "Edit MCP Server",
"delete_mcp_server": "Delete MCP Server",
"delete_mcp_server_confirmation": "This action cannot be undone. This will permanently delete the MCP server \"{name}\".",
"mcp_server_name": "Server Name",
"mcp_server_instructions": "Server Instructions",
"mcp_server_url": "Endpoint URL",
"mcp_transport": "Transport Protocol",
"mcp_auth_type": "Authentication Type",
"mcp_auth_auto": "Auto-Detect (Default)",
"mcp_auth_none": "None",
"mcp_auth_bearer": "Bearer Token",
"mcp_auth_oauth": "OAuth 2.0",
"mcp_bearer_token": "Bearer Token",
"mcp_oauth_client_id": "Client ID",
"mcp_oauth_client_secret": "Client Secret",
"mcp_oauth_scope": "Scope",
"mcp_oauth_grant_type": "Grant Type",
"mcp_direct_tools_mode": "Direct Tools Mode",
"mcp_direct_tools_desc": "Exposes MCP tools as native agent tools instead of hiding them behind the MCP proxy. This lets the agent see and call selected MCP tools directly, improving tool discovery and reducing unnecessary searches. Use it for frequently used or important tools; keep large MCP servers behind the proxy to avoid increasing context usage.",
"mcp_tools": "MCP Tools",
"mcp_tools_count": "{count} Tools",
"mcp_status_connected": "Connected",
"mcp_status_not_connected": "Not Connected",
"mcp_status_failed": "Failed",
"mcp_status_needs_auth": "Needs Authentication",
"mcp_connect_auth": "Connect Account",
"mcp_disconnect_auth": "Disconnect Auth",
"mcp_auth_success": "MCP server authenticated successfully",
"mcp_auth_failed": "Failed to authenticate MCP server",
"mcp_test_connection": "Test Connection",
"mcp_test_success": "MCP server test successful",
"mcp_test_failed": "MCP server test failed",
"mcp_refresh_server": "Refresh Server",
"mcp_refresh_server_success": "Server refreshed",
"no_mcp_servers_installed": "No MCP servers configured",
"add_mcp_server_to_get_started": "Add an MCP server to extend your AI agent tools.",
"search_tools_placeholder": "Search tools by name or description...",
"mcp_server_auto_detected": "Name and description are auto-detected from the server after connecting.",
"mcp_excluded_tools_hint": "Disable a tool to exclude it from this server's toolset.",
"view_tools": "View Tools",
"tool_parameters": "Parameters",
"no_tools_found": "No tools found matching your search.",
"mcp_server_requires_auth": "This MCP server requires authentication. Connect in Settings → MCP Servers.",
"no_env_vars_found": "No environment variables found. Click \"Add Variable\" to create one.",
"variable_name": "Variable Name",
"default_value": "Default Value",
+47
View File
@@ -353,6 +353,53 @@
"github_url_example": "示例:https://github.com/google/gemini-cli",
"configure_skill": "配置技能:{name}",
"manage_env_vars_description": "管理此技能实例的环境变量。",
"mcp_servers": "MCP 服务",
"mcp_servers_description": "为团队配置 Model Context Protocol (MCP) 服务与工具。",
"add_mcp_server": "添加 MCP 服务",
"edit_mcp_server": "编辑 MCP 服务",
"delete_mcp_server": "删除 MCP 服务",
"delete_mcp_server_confirmation": "此操作无法撤销。这将永久删除 MCP 服务 \"{name}\"。",
"mcp_server_name": "服务名称",
"mcp_server_instructions": "服务器说明",
"mcp_server_url": "Endpoint URL",
"mcp_transport": "传输协议",
"mcp_auth_type": "身份验证类型",
"mcp_auth_auto": "自动检测 (默认)",
"mcp_auth_none": "无",
"mcp_auth_bearer": "Bearer 令牌",
"mcp_auth_oauth": "OAuth 2.0",
"mcp_bearer_token": "Bearer 令牌",
"mcp_oauth_client_id": "Client ID",
"mcp_oauth_client_secret": "Client Secret",
"mcp_oauth_scope": "作用域 (Scope)",
"mcp_oauth_grant_type": "授权模式 (Grant Type)",
"mcp_direct_tools_mode": "直连工具模式",
"mcp_direct_tools_desc": "将 MCP 工具直接作为智能体原生工具暴露,而非隐匿在 MCP 代理之后。这使得智能体能直接感知并调用选定的 MCP 工具,提高工具发现率并减少不必要的搜索。建议对于高频或关键工具开启此模式;大型 MCP 服务建议保持代理模式以避免增加上下文消耗。",
"mcp_tools": "MCP 工具",
"mcp_tools_count": "{count} 个工具",
"mcp_status_connected": "已连接",
"mcp_status_not_connected": "未连接",
"mcp_status_failed": "连接失败",
"mcp_status_needs_auth": "需要身份验证",
"mcp_connect_auth": "连接账号",
"mcp_disconnect_auth": "断开身份验证",
"mcp_auth_success": "MCP 服务身份验证成功",
"mcp_auth_failed": "MCP 服务身份验证失败",
"mcp_test_connection": "测试连接",
"mcp_test_success": "MCP 服务测试成功",
"mcp_test_failed": "MCP 服务测试失败",
"mcp_refresh_server": "刷新服务器",
"mcp_refresh_server_success": "服务器已刷新",
"no_mcp_servers_installed": "暂未配置 MCP 服务",
"add_mcp_server_to_get_started": "添加 MCP 服务以扩展 AI Agent 的工具能力。",
"search_tools_placeholder": "按名称或描述搜索工具...",
"mcp_server_auto_detected": "连接后将自动从服务端获取名称和描述。",
"mcp_excluded_tools_hint": "关闭某个工具会将其从该服务的工具集中排除。",
"view_tools": "查看工具",
"tool_parameters": "参数列表",
"no_tools_found": "未找到符合搜索条件的工具。",
"mcp_server_requires_auth": "该 MCP 服务需要身份验证,请前往 设置 → MCP 服务 进行连接。",
"no_env_vars_found": "未找到环境变量。点击\"添加变量\"创建一个。",
"variable_name": "变量名称",
"default_value": "默认值",
+46
View File
@@ -336,6 +336,52 @@ export * from "./github_repository_url.js";
export * from "./github_url_example.js";
export * from "./configure_skill.js";
export * from "./manage_env_vars_description.js";
export * from "./mcp_servers.js";
export * from "./mcp_servers_description.js";
export * from "./add_mcp_server.js";
export * from "./edit_mcp_server.js";
export * from "./delete_mcp_server.js";
export * from "./delete_mcp_server_confirmation.js";
export * from "./mcp_server_name.js";
export * from "./mcp_server_instructions.js";
export * from "./mcp_server_url.js";
export * from "./mcp_transport.js";
export * from "./mcp_auth_type.js";
export * from "./mcp_auth_auto.js";
export * from "./mcp_auth_none.js";
export * from "./mcp_auth_bearer.js";
export * from "./mcp_auth_oauth.js";
export * from "./mcp_bearer_token.js";
export * from "./mcp_oauth_client_id.js";
export * from "./mcp_oauth_client_secret.js";
export * from "./mcp_oauth_scope.js";
export * from "./mcp_oauth_grant_type.js";
export * from "./mcp_direct_tools_mode.js";
export * from "./mcp_direct_tools_desc.js";
export * from "./mcp_tools.js";
export * from "./mcp_tools_count.js";
export * from "./mcp_status_connected.js";
export * from "./mcp_status_not_connected.js";
export * from "./mcp_status_failed.js";
export * from "./mcp_status_needs_auth.js";
export * from "./mcp_connect_auth.js";
export * from "./mcp_disconnect_auth.js";
export * from "./mcp_auth_success.js";
export * from "./mcp_auth_failed.js";
export * from "./mcp_test_connection.js";
export * from "./mcp_test_success.js";
export * from "./mcp_test_failed.js";
export * from "./mcp_refresh_server.js";
export * from "./mcp_refresh_server_success.js";
export * from "./no_mcp_servers_installed.js";
export * from "./add_mcp_server_to_get_started.js";
export * from "./search_tools_placeholder.js";
export * from "./mcp_server_auto_detected.js";
export * from "./mcp_excluded_tools_hint.js";
export * from "./view_tools.js";
export * from "./tool_parameters.js";
export * from "./no_tools_found.js";
export * from "./mcp_server_requires_auth.js";
export * from "./no_env_vars_found.js";
export * from "./variable_name.js";
export * from "./default_value.js";
+46
View File
@@ -338,6 +338,52 @@ export * from './github_repository_url.js'
export * from './github_url_example.js'
export * from './configure_skill.js'
export * from './manage_env_vars_description.js'
export * from './mcp_servers.js'
export * from './mcp_servers_description.js'
export * from './add_mcp_server.js'
export * from './edit_mcp_server.js'
export * from './delete_mcp_server.js'
export * from './delete_mcp_server_confirmation.js'
export * from './mcp_server_name.js'
export * from './mcp_server_instructions.js'
export * from './mcp_server_url.js'
export * from './mcp_transport.js'
export * from './mcp_auth_type.js'
export * from './mcp_auth_auto.js'
export * from './mcp_auth_none.js'
export * from './mcp_auth_bearer.js'
export * from './mcp_auth_oauth.js'
export * from './mcp_bearer_token.js'
export * from './mcp_oauth_client_id.js'
export * from './mcp_oauth_client_secret.js'
export * from './mcp_oauth_scope.js'
export * from './mcp_oauth_grant_type.js'
export * from './mcp_direct_tools_mode.js'
export * from './mcp_direct_tools_desc.js'
export * from './mcp_tools.js'
export * from './mcp_tools_count.js'
export * from './mcp_status_connected.js'
export * from './mcp_status_not_connected.js'
export * from './mcp_status_failed.js'
export * from './mcp_status_needs_auth.js'
export * from './mcp_connect_auth.js'
export * from './mcp_disconnect_auth.js'
export * from './mcp_auth_success.js'
export * from './mcp_auth_failed.js'
export * from './mcp_test_connection.js'
export * from './mcp_test_success.js'
export * from './mcp_test_failed.js'
export * from './mcp_refresh_server.js'
export * from './mcp_refresh_server_success.js'
export * from './no_mcp_servers_installed.js'
export * from './add_mcp_server_to_get_started.js'
export * from './search_tools_placeholder.js'
export * from './mcp_server_auto_detected.js'
export * from './mcp_excluded_tools_hint.js'
export * from './view_tools.js'
export * from './tool_parameters.js'
export * from './no_tools_found.js'
export * from './mcp_server_requires_auth.js'
export * from './no_env_vars_found.js'
export * from './variable_name.js'
export * from './default_value.js'
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Add MCP Server" |
*
* @param {Add_Mcp_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_mcp_server: ((inputs?: Add_Mcp_ServerInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_Mcp_ServerInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Add_Mcp_ServerInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Add_Mcp_ServerInputs */
const en_add_mcp_server = /** @type {(inputs: Add_Mcp_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Add MCP Server`)
};
const zh_add_mcp_server = /** @type {(inputs: Add_Mcp_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`添加 MCP 服务`)
};
/**
* | output |
* | --- |
* | "Add MCP Server" |
*
* @param {Add_Mcp_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_mcp_server = /** @type {((inputs?: Add_Mcp_ServerInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_Mcp_ServerInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_add_mcp_server(inputs)
return zh_add_mcp_server(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Add an MCP server to extend your AI agent tools." |
*
* @param {Add_Mcp_Server_To_Get_StartedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_mcp_server_to_get_started: ((inputs?: Add_Mcp_Server_To_Get_StartedInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Add_Mcp_Server_To_Get_StartedInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Add_Mcp_Server_To_Get_StartedInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Add_Mcp_Server_To_Get_StartedInputs */
const en_add_mcp_server_to_get_started = /** @type {(inputs: Add_Mcp_Server_To_Get_StartedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Add an MCP server to extend your AI agent tools.`)
};
const zh_add_mcp_server_to_get_started = /** @type {(inputs: Add_Mcp_Server_To_Get_StartedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`添加 MCP 服务以扩展 AI Agent 的工具能力。`)
};
/**
* | output |
* | --- |
* | "Add an MCP server to extend your AI agent tools." |
*
* @param {Add_Mcp_Server_To_Get_StartedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const add_mcp_server_to_get_started = /** @type {((inputs?: Add_Mcp_Server_To_Get_StartedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Add_Mcp_Server_To_Get_StartedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_add_mcp_server_to_get_started(inputs)
return zh_add_mcp_server_to_get_started(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Delete MCP Server" |
*
* @param {Delete_Mcp_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const delete_mcp_server: ((inputs?: Delete_Mcp_ServerInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Delete_Mcp_ServerInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Delete_Mcp_ServerInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Delete_Mcp_ServerInputs */
const en_delete_mcp_server = /** @type {(inputs: Delete_Mcp_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Delete MCP Server`)
};
const zh_delete_mcp_server = /** @type {(inputs: Delete_Mcp_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`删除 MCP 服务`)
};
/**
* | output |
* | --- |
* | "Delete MCP Server" |
*
* @param {Delete_Mcp_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const delete_mcp_server = /** @type {((inputs?: Delete_Mcp_ServerInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Delete_Mcp_ServerInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_delete_mcp_server(inputs)
return zh_delete_mcp_server(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "This action cannot be undone. This will permanently delete the MCP server \"{name}\"." |
*
* @param {Delete_Mcp_Server_ConfirmationInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const delete_mcp_server_confirmation: ((inputs: Delete_Mcp_Server_ConfirmationInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Delete_Mcp_Server_ConfirmationInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Delete_Mcp_Server_ConfirmationInputs = {
name: NonNullable<unknown>;
};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ name: NonNullable<unknown> }} Delete_Mcp_Server_ConfirmationInputs */
const en_delete_mcp_server_confirmation = /** @type {(inputs: Delete_Mcp_Server_ConfirmationInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`This action cannot be undone. This will permanently delete the MCP server "${i?.name}".`)
};
const zh_delete_mcp_server_confirmation = /** @type {(inputs: Delete_Mcp_Server_ConfirmationInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`此操作无法撤销。这将永久删除 MCP 服务 "${i?.name}"。`)
};
/**
* | output |
* | --- |
* | "This action cannot be undone. This will permanently delete the MCP server \"{name}\"." |
*
* @param {Delete_Mcp_Server_ConfirmationInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const delete_mcp_server_confirmation = /** @type {((inputs: Delete_Mcp_Server_ConfirmationInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Delete_Mcp_Server_ConfirmationInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_delete_mcp_server_confirmation(inputs)
return zh_delete_mcp_server_confirmation(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Edit MCP Server" |
*
* @param {Edit_Mcp_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const edit_mcp_server: ((inputs?: Edit_Mcp_ServerInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Edit_Mcp_ServerInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Edit_Mcp_ServerInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Edit_Mcp_ServerInputs */
const en_edit_mcp_server = /** @type {(inputs: Edit_Mcp_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Edit MCP Server`)
};
const zh_edit_mcp_server = /** @type {(inputs: Edit_Mcp_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`编辑 MCP 服务`)
};
/**
* | output |
* | --- |
* | "Edit MCP Server" |
*
* @param {Edit_Mcp_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const edit_mcp_server = /** @type {((inputs?: Edit_Mcp_ServerInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Edit_Mcp_ServerInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_edit_mcp_server(inputs)
return zh_edit_mcp_server(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Auto-Detect (Default)" |
*
* @param {Mcp_Auth_AutoInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_auto: ((inputs?: Mcp_Auth_AutoInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Auth_AutoInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Auth_AutoInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Auth_AutoInputs */
const en_mcp_auth_auto = /** @type {(inputs: Mcp_Auth_AutoInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Auto-Detect (Default)`)
};
const zh_mcp_auth_auto = /** @type {(inputs: Mcp_Auth_AutoInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`自动检测 (默认)`)
};
/**
* | output |
* | --- |
* | "Auto-Detect (Default)" |
*
* @param {Mcp_Auth_AutoInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_auto = /** @type {((inputs?: Mcp_Auth_AutoInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Auth_AutoInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_auth_auto(inputs)
return zh_mcp_auth_auto(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Bearer Token" |
*
* @param {Mcp_Auth_BearerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_bearer: ((inputs?: Mcp_Auth_BearerInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Auth_BearerInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Auth_BearerInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Auth_BearerInputs */
const en_mcp_auth_bearer = /** @type {(inputs: Mcp_Auth_BearerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Bearer Token`)
};
const zh_mcp_auth_bearer = /** @type {(inputs: Mcp_Auth_BearerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Bearer 令牌`)
};
/**
* | output |
* | --- |
* | "Bearer Token" |
*
* @param {Mcp_Auth_BearerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_bearer = /** @type {((inputs?: Mcp_Auth_BearerInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Auth_BearerInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_auth_bearer(inputs)
return zh_mcp_auth_bearer(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed to authenticate MCP server" |
*
* @param {Mcp_Auth_FailedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_failed: ((inputs?: Mcp_Auth_FailedInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Auth_FailedInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Auth_FailedInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Auth_FailedInputs */
const en_mcp_auth_failed = /** @type {(inputs: Mcp_Auth_FailedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed to authenticate MCP server`)
};
const zh_mcp_auth_failed = /** @type {(inputs: Mcp_Auth_FailedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP 服务身份验证失败`)
};
/**
* | output |
* | --- |
* | "Failed to authenticate MCP server" |
*
* @param {Mcp_Auth_FailedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_failed = /** @type {((inputs?: Mcp_Auth_FailedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Auth_FailedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_auth_failed(inputs)
return zh_mcp_auth_failed(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "None" |
*
* @param {Mcp_Auth_NoneInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_none: ((inputs?: Mcp_Auth_NoneInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Auth_NoneInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Auth_NoneInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Auth_NoneInputs */
const en_mcp_auth_none = /** @type {(inputs: Mcp_Auth_NoneInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`None`)
};
const zh_mcp_auth_none = /** @type {(inputs: Mcp_Auth_NoneInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`无`)
};
/**
* | output |
* | --- |
* | "None" |
*
* @param {Mcp_Auth_NoneInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_none = /** @type {((inputs?: Mcp_Auth_NoneInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Auth_NoneInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_auth_none(inputs)
return zh_mcp_auth_none(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "OAuth 2.0" |
*
* @param {Mcp_Auth_OauthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_oauth: ((inputs?: Mcp_Auth_OauthInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Auth_OauthInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Auth_OauthInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Auth_OauthInputs */
const en_mcp_auth_oauth = /** @type {(inputs: Mcp_Auth_OauthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`OAuth 2.0`)
};
const zh_mcp_auth_oauth = /** @type {(inputs: Mcp_Auth_OauthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`OAuth 2.0`)
};
/**
* | output |
* | --- |
* | "OAuth 2.0" |
*
* @param {Mcp_Auth_OauthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_oauth = /** @type {((inputs?: Mcp_Auth_OauthInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Auth_OauthInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_auth_oauth(inputs)
return zh_mcp_auth_oauth(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "MCP server authenticated successfully" |
*
* @param {Mcp_Auth_SuccessInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_success: ((inputs?: Mcp_Auth_SuccessInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Auth_SuccessInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Auth_SuccessInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Auth_SuccessInputs */
const en_mcp_auth_success = /** @type {(inputs: Mcp_Auth_SuccessInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP server authenticated successfully`)
};
const zh_mcp_auth_success = /** @type {(inputs: Mcp_Auth_SuccessInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP 服务身份验证成功`)
};
/**
* | output |
* | --- |
* | "MCP server authenticated successfully" |
*
* @param {Mcp_Auth_SuccessInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_success = /** @type {((inputs?: Mcp_Auth_SuccessInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Auth_SuccessInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_auth_success(inputs)
return zh_mcp_auth_success(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Authentication Type" |
*
* @param {Mcp_Auth_TypeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_type: ((inputs?: Mcp_Auth_TypeInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Auth_TypeInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Auth_TypeInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Auth_TypeInputs */
const en_mcp_auth_type = /** @type {(inputs: Mcp_Auth_TypeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Authentication Type`)
};
const zh_mcp_auth_type = /** @type {(inputs: Mcp_Auth_TypeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`身份验证类型`)
};
/**
* | output |
* | --- |
* | "Authentication Type" |
*
* @param {Mcp_Auth_TypeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_auth_type = /** @type {((inputs?: Mcp_Auth_TypeInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Auth_TypeInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_auth_type(inputs)
return zh_mcp_auth_type(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Bearer Token" |
*
* @param {Mcp_Bearer_TokenInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_bearer_token: ((inputs?: Mcp_Bearer_TokenInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Bearer_TokenInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Bearer_TokenInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Bearer_TokenInputs */
const en_mcp_bearer_token = /** @type {(inputs: Mcp_Bearer_TokenInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Bearer Token`)
};
const zh_mcp_bearer_token = /** @type {(inputs: Mcp_Bearer_TokenInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Bearer 令牌`)
};
/**
* | output |
* | --- |
* | "Bearer Token" |
*
* @param {Mcp_Bearer_TokenInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_bearer_token = /** @type {((inputs?: Mcp_Bearer_TokenInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Bearer_TokenInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_bearer_token(inputs)
return zh_mcp_bearer_token(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Connect Account" |
*
* @param {Mcp_Connect_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_connect_auth: ((inputs?: Mcp_Connect_AuthInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Connect_AuthInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Connect_AuthInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Connect_AuthInputs */
const en_mcp_connect_auth = /** @type {(inputs: Mcp_Connect_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Connect Account`)
};
const zh_mcp_connect_auth = /** @type {(inputs: Mcp_Connect_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`连接账号`)
};
/**
* | output |
* | --- |
* | "Connect Account" |
*
* @param {Mcp_Connect_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_connect_auth = /** @type {((inputs?: Mcp_Connect_AuthInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Connect_AuthInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_connect_auth(inputs)
return zh_mcp_connect_auth(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Exposes MCP tools as native agent tools instead of hiding them behind the MCP proxy. This lets the agent see and call selected MCP tools directly, improving ..." |
*
* @param {Mcp_Direct_Tools_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_direct_tools_desc: ((inputs?: Mcp_Direct_Tools_DescInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Direct_Tools_DescInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Direct_Tools_DescInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Direct_Tools_DescInputs */
const en_mcp_direct_tools_desc = /** @type {(inputs: Mcp_Direct_Tools_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Exposes MCP tools as native agent tools instead of hiding them behind the MCP proxy. This lets the agent see and call selected MCP tools directly, improving tool discovery and reducing unnecessary searches. Use it for frequently used or important tools; keep large MCP servers behind the proxy to avoid increasing context usage.`)
};
const zh_mcp_direct_tools_desc = /** @type {(inputs: Mcp_Direct_Tools_DescInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`将 MCP 工具直接作为智能体原生工具暴露,而非隐匿在 MCP 代理之后。这使得智能体能直接感知并调用选定的 MCP 工具,提高工具发现率并减少不必要的搜索。建议对于高频或关键工具开启此模式;大型 MCP 服务建议保持代理模式以避免增加上下文消耗。`)
};
/**
* | output |
* | --- |
* | "Exposes MCP tools as native agent tools instead of hiding them behind the MCP proxy. This lets the agent see and call selected MCP tools directly, improving ..." |
*
* @param {Mcp_Direct_Tools_DescInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_direct_tools_desc = /** @type {((inputs?: Mcp_Direct_Tools_DescInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Direct_Tools_DescInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_direct_tools_desc(inputs)
return zh_mcp_direct_tools_desc(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Direct Tools Mode" |
*
* @param {Mcp_Direct_Tools_ModeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_direct_tools_mode: ((inputs?: Mcp_Direct_Tools_ModeInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Direct_Tools_ModeInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Direct_Tools_ModeInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Direct_Tools_ModeInputs */
const en_mcp_direct_tools_mode = /** @type {(inputs: Mcp_Direct_Tools_ModeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Direct Tools Mode`)
};
const zh_mcp_direct_tools_mode = /** @type {(inputs: Mcp_Direct_Tools_ModeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`直连工具模式`)
};
/**
* | output |
* | --- |
* | "Direct Tools Mode" |
*
* @param {Mcp_Direct_Tools_ModeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_direct_tools_mode = /** @type {((inputs?: Mcp_Direct_Tools_ModeInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Direct_Tools_ModeInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_direct_tools_mode(inputs)
return zh_mcp_direct_tools_mode(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Disconnect Auth" |
*
* @param {Mcp_Disconnect_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_disconnect_auth: ((inputs?: Mcp_Disconnect_AuthInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Disconnect_AuthInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Disconnect_AuthInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Disconnect_AuthInputs */
const en_mcp_disconnect_auth = /** @type {(inputs: Mcp_Disconnect_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Disconnect Auth`)
};
const zh_mcp_disconnect_auth = /** @type {(inputs: Mcp_Disconnect_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`断开身份验证`)
};
/**
* | output |
* | --- |
* | "Disconnect Auth" |
*
* @param {Mcp_Disconnect_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_disconnect_auth = /** @type {((inputs?: Mcp_Disconnect_AuthInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Disconnect_AuthInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_disconnect_auth(inputs)
return zh_mcp_disconnect_auth(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Disable a tool to exclude it from this server's toolset." |
*
* @param {Mcp_Excluded_Tools_HintInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_excluded_tools_hint: ((inputs?: Mcp_Excluded_Tools_HintInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Excluded_Tools_HintInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Excluded_Tools_HintInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Excluded_Tools_HintInputs */
const en_mcp_excluded_tools_hint = /** @type {(inputs: Mcp_Excluded_Tools_HintInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Disable a tool to exclude it from this server's toolset.`)
};
const zh_mcp_excluded_tools_hint = /** @type {(inputs: Mcp_Excluded_Tools_HintInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`关闭某个工具会将其从该服务的工具集中排除。`)
};
/**
* | output |
* | --- |
* | "Disable a tool to exclude it from this server's toolset." |
*
* @param {Mcp_Excluded_Tools_HintInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_excluded_tools_hint = /** @type {((inputs?: Mcp_Excluded_Tools_HintInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Excluded_Tools_HintInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_excluded_tools_hint(inputs)
return zh_mcp_excluded_tools_hint(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Client ID" |
*
* @param {Mcp_Oauth_Client_IdInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_client_id: ((inputs?: Mcp_Oauth_Client_IdInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Oauth_Client_IdInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Oauth_Client_IdInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Oauth_Client_IdInputs */
const en_mcp_oauth_client_id = /** @type {(inputs: Mcp_Oauth_Client_IdInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Client ID`)
};
const zh_mcp_oauth_client_id = /** @type {(inputs: Mcp_Oauth_Client_IdInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Client ID`)
};
/**
* | output |
* | --- |
* | "Client ID" |
*
* @param {Mcp_Oauth_Client_IdInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_client_id = /** @type {((inputs?: Mcp_Oauth_Client_IdInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Oauth_Client_IdInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_oauth_client_id(inputs)
return zh_mcp_oauth_client_id(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Client Secret" |
*
* @param {Mcp_Oauth_Client_SecretInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_client_secret: ((inputs?: Mcp_Oauth_Client_SecretInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Oauth_Client_SecretInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Oauth_Client_SecretInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Oauth_Client_SecretInputs */
const en_mcp_oauth_client_secret = /** @type {(inputs: Mcp_Oauth_Client_SecretInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Client Secret`)
};
const zh_mcp_oauth_client_secret = /** @type {(inputs: Mcp_Oauth_Client_SecretInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Client Secret`)
};
/**
* | output |
* | --- |
* | "Client Secret" |
*
* @param {Mcp_Oauth_Client_SecretInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_client_secret = /** @type {((inputs?: Mcp_Oauth_Client_SecretInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Oauth_Client_SecretInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_oauth_client_secret(inputs)
return zh_mcp_oauth_client_secret(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Grant Type" |
*
* @param {Mcp_Oauth_Grant_TypeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_grant_type: ((inputs?: Mcp_Oauth_Grant_TypeInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Oauth_Grant_TypeInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Oauth_Grant_TypeInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Oauth_Grant_TypeInputs */
const en_mcp_oauth_grant_type = /** @type {(inputs: Mcp_Oauth_Grant_TypeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Grant Type`)
};
const zh_mcp_oauth_grant_type = /** @type {(inputs: Mcp_Oauth_Grant_TypeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`授权模式 (Grant Type)`)
};
/**
* | output |
* | --- |
* | "Grant Type" |
*
* @param {Mcp_Oauth_Grant_TypeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_grant_type = /** @type {((inputs?: Mcp_Oauth_Grant_TypeInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Oauth_Grant_TypeInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_oauth_grant_type(inputs)
return zh_mcp_oauth_grant_type(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Scope" |
*
* @param {Mcp_Oauth_ScopeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_scope: ((inputs?: Mcp_Oauth_ScopeInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Oauth_ScopeInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Oauth_ScopeInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Oauth_ScopeInputs */
const en_mcp_oauth_scope = /** @type {(inputs: Mcp_Oauth_ScopeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Scope`)
};
const zh_mcp_oauth_scope = /** @type {(inputs: Mcp_Oauth_ScopeInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`作用域 (Scope)`)
};
/**
* | output |
* | --- |
* | "Scope" |
*
* @param {Mcp_Oauth_ScopeInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_oauth_scope = /** @type {((inputs?: Mcp_Oauth_ScopeInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Oauth_ScopeInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_oauth_scope(inputs)
return zh_mcp_oauth_scope(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Refresh Server" |
*
* @param {Mcp_Refresh_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_refresh_server: ((inputs?: Mcp_Refresh_ServerInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Refresh_ServerInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Refresh_ServerInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Refresh_ServerInputs */
const en_mcp_refresh_server = /** @type {(inputs: Mcp_Refresh_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Refresh Server`)
};
const zh_mcp_refresh_server = /** @type {(inputs: Mcp_Refresh_ServerInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`刷新服务器`)
};
/**
* | output |
* | --- |
* | "Refresh Server" |
*
* @param {Mcp_Refresh_ServerInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_refresh_server = /** @type {((inputs?: Mcp_Refresh_ServerInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Refresh_ServerInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_refresh_server(inputs)
return zh_mcp_refresh_server(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Server refreshed" |
*
* @param {Mcp_Refresh_Server_SuccessInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_refresh_server_success: ((inputs?: Mcp_Refresh_Server_SuccessInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Refresh_Server_SuccessInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Refresh_Server_SuccessInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Refresh_Server_SuccessInputs */
const en_mcp_refresh_server_success = /** @type {(inputs: Mcp_Refresh_Server_SuccessInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Server refreshed`)
};
const zh_mcp_refresh_server_success = /** @type {(inputs: Mcp_Refresh_Server_SuccessInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`服务器已刷新`)
};
/**
* | output |
* | --- |
* | "Server refreshed" |
*
* @param {Mcp_Refresh_Server_SuccessInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_refresh_server_success = /** @type {((inputs?: Mcp_Refresh_Server_SuccessInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Refresh_Server_SuccessInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_refresh_server_success(inputs)
return zh_mcp_refresh_server_success(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Name and description are auto-detected from the server after connecting." |
*
* @param {Mcp_Server_Auto_DetectedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_auto_detected: ((inputs?: Mcp_Server_Auto_DetectedInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Server_Auto_DetectedInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Server_Auto_DetectedInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Server_Auto_DetectedInputs */
const en_mcp_server_auto_detected = /** @type {(inputs: Mcp_Server_Auto_DetectedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Name and description are auto-detected from the server after connecting.`)
};
const zh_mcp_server_auto_detected = /** @type {(inputs: Mcp_Server_Auto_DetectedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`连接后将自动从服务端获取名称和描述。`)
};
/**
* | output |
* | --- |
* | "Name and description are auto-detected from the server after connecting." |
*
* @param {Mcp_Server_Auto_DetectedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_auto_detected = /** @type {((inputs?: Mcp_Server_Auto_DetectedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Server_Auto_DetectedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_server_auto_detected(inputs)
return zh_mcp_server_auto_detected(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Server Instructions" |
*
* @param {Mcp_Server_InstructionsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_instructions: ((inputs?: Mcp_Server_InstructionsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Server_InstructionsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Server_InstructionsInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Server_InstructionsInputs */
const en_mcp_server_instructions = /** @type {(inputs: Mcp_Server_InstructionsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Server Instructions`)
};
const zh_mcp_server_instructions = /** @type {(inputs: Mcp_Server_InstructionsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`服务器说明`)
};
/**
* | output |
* | --- |
* | "Server Instructions" |
*
* @param {Mcp_Server_InstructionsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_instructions = /** @type {((inputs?: Mcp_Server_InstructionsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Server_InstructionsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_server_instructions(inputs)
return zh_mcp_server_instructions(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Server Name" |
*
* @param {Mcp_Server_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_name: ((inputs?: Mcp_Server_NameInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Server_NameInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Server_NameInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Server_NameInputs */
const en_mcp_server_name = /** @type {(inputs: Mcp_Server_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Server Name`)
};
const zh_mcp_server_name = /** @type {(inputs: Mcp_Server_NameInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`服务名称`)
};
/**
* | output |
* | --- |
* | "Server Name" |
*
* @param {Mcp_Server_NameInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_name = /** @type {((inputs?: Mcp_Server_NameInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Server_NameInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_server_name(inputs)
return zh_mcp_server_name(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "This MCP server requires authentication. Connect in Settings → MCP Servers." |
*
* @param {Mcp_Server_Requires_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_requires_auth: ((inputs?: Mcp_Server_Requires_AuthInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Server_Requires_AuthInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Server_Requires_AuthInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Server_Requires_AuthInputs */
const en_mcp_server_requires_auth = /** @type {(inputs: Mcp_Server_Requires_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`This MCP server requires authentication. Connect in Settings → MCP Servers.`)
};
const zh_mcp_server_requires_auth = /** @type {(inputs: Mcp_Server_Requires_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`该 MCP 服务需要身份验证,请前往 设置 → MCP 服务 进行连接。`)
};
/**
* | output |
* | --- |
* | "This MCP server requires authentication. Connect in Settings → MCP Servers." |
*
* @param {Mcp_Server_Requires_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_requires_auth = /** @type {((inputs?: Mcp_Server_Requires_AuthInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Server_Requires_AuthInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_server_requires_auth(inputs)
return zh_mcp_server_requires_auth(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Endpoint URL" |
*
* @param {Mcp_Server_UrlInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_url: ((inputs?: Mcp_Server_UrlInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Server_UrlInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Server_UrlInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Server_UrlInputs */
const en_mcp_server_url = /** @type {(inputs: Mcp_Server_UrlInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Endpoint URL`)
};
const zh_mcp_server_url = /** @type {(inputs: Mcp_Server_UrlInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Endpoint URL`)
};
/**
* | output |
* | --- |
* | "Endpoint URL" |
*
* @param {Mcp_Server_UrlInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_server_url = /** @type {((inputs?: Mcp_Server_UrlInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Server_UrlInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_server_url(inputs)
return zh_mcp_server_url(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "MCP Servers" |
*
* @param {Mcp_ServersInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_servers: ((inputs?: Mcp_ServersInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_ServersInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_ServersInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_ServersInputs */
const en_mcp_servers = /** @type {(inputs: Mcp_ServersInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP Servers`)
};
const zh_mcp_servers = /** @type {(inputs: Mcp_ServersInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP 服务`)
};
/**
* | output |
* | --- |
* | "MCP Servers" |
*
* @param {Mcp_ServersInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_servers = /** @type {((inputs?: Mcp_ServersInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_ServersInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_servers(inputs)
return zh_mcp_servers(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Configure Model Context Protocol (MCP) servers and tools for your team." |
*
* @param {Mcp_Servers_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_servers_description: ((inputs?: Mcp_Servers_DescriptionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Servers_DescriptionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Servers_DescriptionInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Servers_DescriptionInputs */
const en_mcp_servers_description = /** @type {(inputs: Mcp_Servers_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Configure Model Context Protocol (MCP) servers and tools for your team.`)
};
const zh_mcp_servers_description = /** @type {(inputs: Mcp_Servers_DescriptionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`为团队配置 Model Context Protocol (MCP) 服务与工具。`)
};
/**
* | output |
* | --- |
* | "Configure Model Context Protocol (MCP) servers and tools for your team." |
*
* @param {Mcp_Servers_DescriptionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_servers_description = /** @type {((inputs?: Mcp_Servers_DescriptionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Servers_DescriptionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_servers_description(inputs)
return zh_mcp_servers_description(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Connected" |
*
* @param {Mcp_Status_ConnectedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_connected: ((inputs?: Mcp_Status_ConnectedInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Status_ConnectedInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Status_ConnectedInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Status_ConnectedInputs */
const en_mcp_status_connected = /** @type {(inputs: Mcp_Status_ConnectedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Connected`)
};
const zh_mcp_status_connected = /** @type {(inputs: Mcp_Status_ConnectedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`已连接`)
};
/**
* | output |
* | --- |
* | "Connected" |
*
* @param {Mcp_Status_ConnectedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_connected = /** @type {((inputs?: Mcp_Status_ConnectedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Status_ConnectedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_status_connected(inputs)
return zh_mcp_status_connected(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Failed" |
*
* @param {Mcp_Status_FailedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_failed: ((inputs?: Mcp_Status_FailedInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Status_FailedInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Status_FailedInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Status_FailedInputs */
const en_mcp_status_failed = /** @type {(inputs: Mcp_Status_FailedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Failed`)
};
const zh_mcp_status_failed = /** @type {(inputs: Mcp_Status_FailedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`连接失败`)
};
/**
* | output |
* | --- |
* | "Failed" |
*
* @param {Mcp_Status_FailedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_failed = /** @type {((inputs?: Mcp_Status_FailedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Status_FailedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_status_failed(inputs)
return zh_mcp_status_failed(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Needs Authentication" |
*
* @param {Mcp_Status_Needs_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_needs_auth: ((inputs?: Mcp_Status_Needs_AuthInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Status_Needs_AuthInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Status_Needs_AuthInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Status_Needs_AuthInputs */
const en_mcp_status_needs_auth = /** @type {(inputs: Mcp_Status_Needs_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Needs Authentication`)
};
const zh_mcp_status_needs_auth = /** @type {(inputs: Mcp_Status_Needs_AuthInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`需要身份验证`)
};
/**
* | output |
* | --- |
* | "Needs Authentication" |
*
* @param {Mcp_Status_Needs_AuthInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_needs_auth = /** @type {((inputs?: Mcp_Status_Needs_AuthInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Status_Needs_AuthInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_status_needs_auth(inputs)
return zh_mcp_status_needs_auth(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Not Connected" |
*
* @param {Mcp_Status_Not_ConnectedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_not_connected: ((inputs?: Mcp_Status_Not_ConnectedInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Status_Not_ConnectedInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Status_Not_ConnectedInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Status_Not_ConnectedInputs */
const en_mcp_status_not_connected = /** @type {(inputs: Mcp_Status_Not_ConnectedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Not Connected`)
};
const zh_mcp_status_not_connected = /** @type {(inputs: Mcp_Status_Not_ConnectedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`未连接`)
};
/**
* | output |
* | --- |
* | "Not Connected" |
*
* @param {Mcp_Status_Not_ConnectedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_status_not_connected = /** @type {((inputs?: Mcp_Status_Not_ConnectedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Status_Not_ConnectedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_status_not_connected(inputs)
return zh_mcp_status_not_connected(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Test Connection" |
*
* @param {Mcp_Test_ConnectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_test_connection: ((inputs?: Mcp_Test_ConnectionInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Test_ConnectionInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Test_ConnectionInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Test_ConnectionInputs */
const en_mcp_test_connection = /** @type {(inputs: Mcp_Test_ConnectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Test Connection`)
};
const zh_mcp_test_connection = /** @type {(inputs: Mcp_Test_ConnectionInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`测试连接`)
};
/**
* | output |
* | --- |
* | "Test Connection" |
*
* @param {Mcp_Test_ConnectionInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_test_connection = /** @type {((inputs?: Mcp_Test_ConnectionInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Test_ConnectionInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_test_connection(inputs)
return zh_mcp_test_connection(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "MCP server test failed" |
*
* @param {Mcp_Test_FailedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_test_failed: ((inputs?: Mcp_Test_FailedInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Test_FailedInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Test_FailedInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Test_FailedInputs */
const en_mcp_test_failed = /** @type {(inputs: Mcp_Test_FailedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP server test failed`)
};
const zh_mcp_test_failed = /** @type {(inputs: Mcp_Test_FailedInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP 服务测试失败`)
};
/**
* | output |
* | --- |
* | "MCP server test failed" |
*
* @param {Mcp_Test_FailedInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_test_failed = /** @type {((inputs?: Mcp_Test_FailedInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Test_FailedInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_test_failed(inputs)
return zh_mcp_test_failed(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "MCP server test successful" |
*
* @param {Mcp_Test_SuccessInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_test_success: ((inputs?: Mcp_Test_SuccessInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Test_SuccessInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Test_SuccessInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_Test_SuccessInputs */
const en_mcp_test_success = /** @type {(inputs: Mcp_Test_SuccessInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP server test successful`)
};
const zh_mcp_test_success = /** @type {(inputs: Mcp_Test_SuccessInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP 服务测试成功`)
};
/**
* | output |
* | --- |
* | "MCP server test successful" |
*
* @param {Mcp_Test_SuccessInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_test_success = /** @type {((inputs?: Mcp_Test_SuccessInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Test_SuccessInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_test_success(inputs)
return zh_mcp_test_success(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "MCP Tools" |
*
* @param {Mcp_ToolsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_tools: ((inputs?: Mcp_ToolsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_ToolsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_ToolsInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_ToolsInputs */
const en_mcp_tools = /** @type {(inputs: Mcp_ToolsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP Tools`)
};
const zh_mcp_tools = /** @type {(inputs: Mcp_ToolsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`MCP 工具`)
};
/**
* | output |
* | --- |
* | "MCP Tools" |
*
* @param {Mcp_ToolsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_tools = /** @type {((inputs?: Mcp_ToolsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_ToolsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_tools(inputs)
return zh_mcp_tools(inputs)
});
+18
View File
@@ -0,0 +1,18 @@
/**
* | output |
* | --- |
* | "{count} Tools" |
*
* @param {Mcp_Tools_CountInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_tools_count: ((inputs: Mcp_Tools_CountInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_Tools_CountInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_Tools_CountInputs = {
count: NonNullable<unknown>;
};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{ count: NonNullable<unknown> }} Mcp_Tools_CountInputs */
const en_mcp_tools_count = /** @type {(inputs: Mcp_Tools_CountInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} Tools`)
};
const zh_mcp_tools_count = /** @type {(inputs: Mcp_Tools_CountInputs) => LocalizedString} */ (i) => {
return /** @type {LocalizedString} */ (`${i?.count} 个工具`)
};
/**
* | output |
* | --- |
* | "{count} Tools" |
*
* @param {Mcp_Tools_CountInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_tools_count = /** @type {((inputs: Mcp_Tools_CountInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_Tools_CountInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_tools_count(inputs)
return zh_mcp_tools_count(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Transport Protocol" |
*
* @param {Mcp_TransportInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_transport: ((inputs?: Mcp_TransportInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Mcp_TransportInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Mcp_TransportInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Mcp_TransportInputs */
const en_mcp_transport = /** @type {(inputs: Mcp_TransportInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Transport Protocol`)
};
const zh_mcp_transport = /** @type {(inputs: Mcp_TransportInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`传输协议`)
};
/**
* | output |
* | --- |
* | "Transport Protocol" |
*
* @param {Mcp_TransportInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const mcp_transport = /** @type {((inputs?: Mcp_TransportInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Mcp_TransportInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_mcp_transport(inputs)
return zh_mcp_transport(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "No MCP servers configured" |
*
* @param {No_Mcp_Servers_InstalledInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const no_mcp_servers_installed: ((inputs?: No_Mcp_Servers_InstalledInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<No_Mcp_Servers_InstalledInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type No_Mcp_Servers_InstalledInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} No_Mcp_Servers_InstalledInputs */
const en_no_mcp_servers_installed = /** @type {(inputs: No_Mcp_Servers_InstalledInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`No MCP servers configured`)
};
const zh_no_mcp_servers_installed = /** @type {(inputs: No_Mcp_Servers_InstalledInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`暂未配置 MCP 服务`)
};
/**
* | output |
* | --- |
* | "No MCP servers configured" |
*
* @param {No_Mcp_Servers_InstalledInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const no_mcp_servers_installed = /** @type {((inputs?: No_Mcp_Servers_InstalledInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<No_Mcp_Servers_InstalledInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_no_mcp_servers_installed(inputs)
return zh_no_mcp_servers_installed(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "No tools found matching your search." |
*
* @param {No_Tools_FoundInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const no_tools_found: ((inputs?: No_Tools_FoundInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<No_Tools_FoundInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type No_Tools_FoundInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} No_Tools_FoundInputs */
const en_no_tools_found = /** @type {(inputs: No_Tools_FoundInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`No tools found matching your search.`)
};
const zh_no_tools_found = /** @type {(inputs: No_Tools_FoundInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`未找到符合搜索条件的工具。`)
};
/**
* | output |
* | --- |
* | "No tools found matching your search." |
*
* @param {No_Tools_FoundInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const no_tools_found = /** @type {((inputs?: No_Tools_FoundInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<No_Tools_FoundInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_no_tools_found(inputs)
return zh_no_tools_found(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Search tools by name or description..." |
*
* @param {Search_Tools_PlaceholderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const search_tools_placeholder: ((inputs?: Search_Tools_PlaceholderInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Search_Tools_PlaceholderInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Search_Tools_PlaceholderInputs = {};
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Search_Tools_PlaceholderInputs */
const en_search_tools_placeholder = /** @type {(inputs: Search_Tools_PlaceholderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Search tools by name or description...`)
};
const zh_search_tools_placeholder = /** @type {(inputs: Search_Tools_PlaceholderInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`按名称或描述搜索工具...`)
};
/**
* | output |
* | --- |
* | "Search tools by name or description..." |
*
* @param {Search_Tools_PlaceholderInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const search_tools_placeholder = /** @type {((inputs?: Search_Tools_PlaceholderInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Search_Tools_PlaceholderInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_search_tools_placeholder(inputs)
return zh_search_tools_placeholder(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "Parameters" |
*
* @param {Tool_ParametersInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const tool_parameters: ((inputs?: Tool_ParametersInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<Tool_ParametersInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type Tool_ParametersInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} Tool_ParametersInputs */
const en_tool_parameters = /** @type {(inputs: Tool_ParametersInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`Parameters`)
};
const zh_tool_parameters = /** @type {(inputs: Tool_ParametersInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`参数列表`)
};
/**
* | output |
* | --- |
* | "Parameters" |
*
* @param {Tool_ParametersInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const tool_parameters = /** @type {((inputs?: Tool_ParametersInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<Tool_ParametersInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_tool_parameters(inputs)
return zh_tool_parameters(inputs)
});
+16
View File
@@ -0,0 +1,16 @@
/**
* | output |
* | --- |
* | "View Tools" |
*
* @param {View_ToolsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const view_tools: ((inputs?: View_ToolsInputs, options?: {
locale?: "en" | "zh";
}) => LocalizedString) & import("../runtime.js").MessageMetadata<View_ToolsInputs, {
locale?: "en" | "zh";
}, {}>;
export type LocalizedString = import("../runtime.js").LocalizedString;
export type View_ToolsInputs = {};
+29
View File
@@ -0,0 +1,29 @@
/* eslint-disable */
import { getLocale, experimentalStaticLocale } from '../runtime.js';
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
/** @typedef {{}} View_ToolsInputs */
const en_view_tools = /** @type {(inputs: View_ToolsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`View Tools`)
};
const zh_view_tools = /** @type {(inputs: View_ToolsInputs) => LocalizedString} */ () => {
return /** @type {LocalizedString} */ (`查看工具`)
};
/**
* | output |
* | --- |
* | "View Tools" |
*
* @param {View_ToolsInputs} inputs
* @param {{ locale?: "en" | "zh" }} options
* @returns {LocalizedString}
*/
export const view_tools = /** @type {((inputs?: View_ToolsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<View_ToolsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
if (locale === "en") return en_view_tools(inputs)
return zh_view_tools(inputs)
});
@@ -5,12 +5,13 @@ import { AgentsSettings } from '@/ui/components/settings/AgentsSettings'
import { ProvidersSettings } from '@/ui/components/settings/ProvidersSettings'
import { SandboxSettings } from '@/ui/components/settings/SandboxSettings'
import { SkillsConfigCard } from '@/ui/components/settings/SkillsConfigCard'
import { McpConfigCard } from '@/ui/components/settings/McpConfigCard'
import { NotificationSettings } from '@/ui/components/settings/NotificationSettings'
import { DeveloperSettings } from '@/ui/components/settings/DeveloperSettings'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/ui/components/ui/card'
import { cn } from '@/ui/lib/utils'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { Bot, Cpu, Film, Loader2, Puzzle, Shield, User, Bell, Key } from 'lucide-react'
import { Bot, Cpu, Film, Loader2, Puzzle, Server, Shield, User, Bell, Key } from 'lucide-react'
import { useState, useRef, useEffect } from 'react'
import { Avatar, AvatarFallback, AvatarImage } from '@/ui/components/ui/avatar'
import { Input } from '@/ui/components/ui/input'
@@ -32,6 +33,7 @@ type SettingsTab =
| 'general'
| 'transcode'
| 'skills'
| 'mcp'
| 'providers'
| 'agents'
| 'sandbox'
@@ -348,6 +350,22 @@ function TeamSettingsPage() {
)}
</button>
<button
onClick={() => setActiveTab('mcp')}
className={cn(
'w-full flex items-center gap-3 px-4 py-3 text-sm font-medium rounded-lg transition-all',
activeTab === 'mcp'
? 'bg-sidebar-accent text-sidebar-accent-foreground ring-1 ring-sidebar-border'
: 'text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
)}
>
<Server className="w-5 h-5" />
{m.mcp_servers()}
{activeTab === 'mcp' && (
<div className="ml-auto w-1.5 h-1.5 rounded-full bg-sidebar-primary" />
)}
</button>
<button
onClick={() => setActiveTab('agents')}
className={cn(
@@ -393,6 +411,7 @@ function TeamSettingsPage() {
{activeTab === 'general' && m.general_settings()}
{activeTab === 'transcode' && m.media_processing()}
{activeTab === 'skills' && m.skills_management()}
{activeTab === 'mcp' && m.mcp_servers()}
{activeTab === 'providers' && m.ai_providers()}
{activeTab === 'agents' && m.ai_agents()}
{activeTab === 'sandbox' && m.agent_sandbox_settings()}
@@ -403,6 +422,7 @@ function TeamSettingsPage() {
{activeTab === 'general' && m.general_settings_description()}
{activeTab === 'transcode' && m.transcode_description()}
{activeTab === 'skills' && m.skills_description()}
{activeTab === 'mcp' && m.mcp_servers_description()}
{activeTab === 'providers' && m.providers_description()}
{activeTab === 'agents' && m.agents_description()}
{activeTab === 'sandbox' && m.sandbox_description()}
@@ -602,6 +622,12 @@ function TeamSettingsPage() {
</div>
)}
{activeTab === 'mcp' && (
<div className="h-full overflow-y-auto pr-1">
<McpConfigCard teamId={teamId} />
</div>
)}
{activeTab === 'providers' && <ProvidersSettings teamId={teamId} />}
{activeTab === 'agents' && (