- Add EN/ZH docs for MCP Connectors and Scheduled Tasks under Application
- Wire two new sidebar groups (above App Guides), collapse existing groups
- Add zh-CN sidebar label translations in current.json
- Bundle product screenshots (mcp/, schedule/) for both locales
- Frontend i18n: extract hardcoded Chinese in connector/scheduled-task UI
and home composer pickers into en/zh locale keys
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds two MySQL tables introduced by the feat/ai_connector branch:
- connector_instance: stores MCP connector instances (encrypted credentials,
transport / extra config JSON, lifecycle status)
- dbgpt_serve_scheduled_task: scheduled cron tasks bound to a connector
(APScheduler expression + tool invocation snapshot)
Files:
- assets/schema/dbgpt.sql: append both tables to keep the baseline current
- assets/schema/upgrade/v0_8_1/upgrade_to_v0.8.1.sql: 0.8.0 -> 0.8.1 delta
- assets/schema/upgrade/v0_8_1/v0.8.1.sql: full baseline snapshot at v0.8.1
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two backend integration bugs surfaced when /construct/connectors loaded:
1. GET /pending-confirms returned {Connector 'pending-confirms' not found}
because the route was defined AFTER GET /{connector_id}, so FastAPI
matched the catch-all first and treated 'pending-confirms' as a
connector_id. HITL polling never reached the queue endpoint.
Move /pending-confirms, /confirm, and ConfirmRequest BEFORE the
/{connector_id} routes so FastAPI matches the fixed paths first.
2. GET /api/v2/serve/connectors (no trailing slash) hit DB-GPT's static
Next-export fallback (404 HTML), because FastAPI registers the list
route as GET / under api_prefix and the auto-redirect was intercepted.
Frontend useConnectors() used the bare base URL.
Add API_BASE_LIST = `${API_BASE}/` constant and use it for the list
(GET /) and create (POST /) calls. Single-resource calls keep the
bare base + "/{id}" form.
The connector module had scan_serve_configs() listed it (line 32) so its
config schema was discovered, but register_serve_apps() never called
system_app.register(ConnectorServe, ...). That left the FastAPI router
unmounted, so all /api/v2/serve/connectors/* requests returned 404 and
the /construct/connectors page was non-functional.
Register the Serve component alongside the other 13 serves (file/flow/
rag/...) after Model Serve.
Pre-existing integration gaps surfaced when running the dev server:
1. use-connector-api.ts used bare fetch() instead of ctx-axios, so all
/api/v2/serve/connectors/* requests hit the Next.js dev server (3000)
instead of the backend (5670) and returned the Next 404 HTML page.
Migrate every helper to axios via @/utils/ctx-axios.
2. useConfirmPolling.ts had the same bare-fetch problem; HITL confirm
polling and resolve calls would never reach the backend.
3. Backend ConnectorResponse exposes connector_id while the frontend
ConnectorInstance type uses id, leaving every c.id undefined. Add a
normalizeConnector boundary in use-connector-api.ts so the rest of
the frontend can keep using id.
4. /construct/connectors had no entry in the side-bar settings menu —
users had to type the URL by hand. Add an "ApiOutlined / 连接器管理"
item next to prompts in the management group.
5. Add the new `connectors` translation key to zh/en common.ts so the
sidebar label resolves and TS strict-key check passes.
- Manager: branch on connector_type == 'custom_mcp', build pack from
extra_config (server_uri + auth_type) instead of catalog. Add
connector_id parameter for restore-from-DB id preservation.
- Service: pass extra_config and connector_id through to manager on both
create and after_start rehydration paths. Rehydration now reads
config_json so custom_mcp connectors survive restart.
- Frontend: align catalog type to backend (auth_fields), add select +
default support, conditional token/header_name fields driven by
auth_type, and submit a config payload alongside credentials for
custom_mcp.
- Confirmation: custom_mcp tools are NOT in any catalog.confirm_actions,
so the existing ConfirmationInterceptor naturally returns False --
custom_mcp writes execute without confirmation (intentional MVP scope).
- useConfirmPolling activated when a connector is attached and Agent is streaming
- Render ConfirmDialog at bottom of Playground; backend pending-confirms now
reach the user as a bottom-right modal
- 300s backend timeout matches dialog countdown — auto-deny on lapse
- Replace single selectedConnector with selectedConnectors array
- Send ext_info.connector_ids (array) to backend (Task C contract)
- Render one tag per selected connector with individual onClose
- Popover stays open after pick; click toggles membership
- Badge shows count; tooltip shows comma-joined names
- ChatMessage.attachedConnectors[] for replay
- Read ext_info.connector_ids (list) at start of _react_agent_stream;
fall back to legacy ext_info.connector_id (string) for older clients
- Filter pack injection to selected ids via get_connector_tools()
- Empty/missing selection no longer leaks all active connectors into prompt
- Warn (not error) on stale ids so users can recover gracefully
- compute_tool_prefix: type-based for built-ins, slug-based for custom, slug
with type-prefix fallback for multi-instance built-ins, id-prefix fallback
- _apply_tool_prefix: rename tools in pack.sub_resources, sync tool_server_map,
annotate description with "(via {display_name})"
- Wire into create_connector after preload_resource