feat(ai): 完善工具目录与远程 MCP 接入指引

- 新增 inspect_ai_tool_catalog 工具,返回内置探针流程、参数提示和 MCP 工具摘要

- 拆分 AI 内置工具目录配置,降低 AIBuiltinToolsCatalog 体积

- 补充 OpenClaw/Hermans 远程 MCP Streamable HTTP 配置说明

- 增加 Linux CJK 字体缺失检测与 Ubuntu 安装提示
This commit is contained in:
Syngnat
2026-06-10 23:52:19 +08:00
parent 11156c941c
commit b11b662071
17 changed files with 650 additions and 222 deletions

View File

@@ -161,6 +161,19 @@ export const buildRemoteMCPClientGuide = (
status?: Pick<AIMCPClientInstallStatus, 'displayName' | 'message'> | null,
): string => {
const displayName = String(status?.displayName || '远程 Agent').trim();
const streamableHTTPConfig = [
'{',
' "mcpServers": {',
' "gonavi": {',
' "type": "streamable-http",',
' "url": "https://<你的域名或隧道地址>/mcp",',
' "headers": {',
' "Authorization": "Bearer <随机token>"',
' }',
' }',
' }',
'}',
];
return [
`GoNavi MCP 远程接入说明 - ${displayName}`,
'',
@@ -179,6 +192,13 @@ export const buildRemoteMCPClientGuide = (
`3. 在 ${displayName} 中添加远程 MCP Servertransport 选择 Streamable HTTPURL 填隧道/反向代理后的 /mcp 地址,并设置 Authorization: Bearer <随机token>。`,
'4. 先调用 get_connections 获取 connectionId再调用表结构工具不要把数据库 host/user/password 写进云端 Agent 配置。',
'',
'可复制配置片段(适用于支持 mcpServers JSON 的 Agent',
...streamableHTTPConfig,
'',
'CLI / 服务启动命令:',
'GoNavi.exe mcp-server http --addr 127.0.0.1:8765 --path /mcp --token <随机token>',
'或设置环境变量GONAVI_MCP_HTTP_TOKEN=<随机token> 后运行 gonavi-mcp-server http --addr 127.0.0.1:8765 --path /mcp',
'',
status?.message ? `当前提示:${status.message}` : '',
].filter((line, index, lines) => line || index < lines.length - 1).join('\n');
};