Introduction¶
DeepSeek Harness (DSH) is an “everything is a plugin” client framework. Integrating external services into it typically requires writing your own proxy or redrawing the UI. If you already have an Agent2API running locally and want to open its native admin panel directly in the DSH sidebar without duplicating development effort, this plugin is designed for exactly that use case.
It doesn’t act as a gateway or forwarder — it simply “transports” the interface: via a same-origin reverse proxy on the host side, it embeds the entire Agent2API site into DSH as an iframe, preserving all native interactions and functionality.
What It Is¶
- Plugin name: dsh-a2a-panel
- Maintainer: ymf2317-tech
- Category: Client
- Purpose: Brings the native Agent2API admin panel into the DeepSeek Harness sidebar via a host-side same-origin reverse proxy + iframe, fully usable on mobile.
Core Capabilities¶
-
Same-Origin Reverse Proxy & Iframe Embedding
- Access/a2a-panel/ui/*in DSH Web; the host-side reverse proxy routes it to Agent2API’s/ui.
- The iframe runs the original page, making all modules available: dashboards, accounts, check-ins, routes, model management, gateway keys, request logs, scheduled tasks, and more.
- Eliminates the mixed-content issue that occurs when DSH is served over HTTPS and embeds HTTP content, preventing blank screens on mobile. -
Path Shim &
<base>Tag Injection
- The panel’s frontend uses absolute paths like/api/xxxfor API calls. The reverse proxy injects a shim into the HTML that rewritesfetch,XMLHttpRequest,EventSource, andlocation.replace/assignabsolute paths under the/a2a-panel/uiprefix.
- Injects a<base>tag so relative resources (app.js,m/mobile.js) resolve correctly. -
Login Redirect Fallback
- When the panel 302-redirects to/loginor redirects to/after login, these jumps escape the iframe. The reverse proxy layer rewrites theLocationheader; the frontend, on theloadevent, re-prefixes the target path and reloads — up to 8 retries.
- This resolves the “blank screen / fallback to DSH main UI after login” issue and the mobile “session expired → go to login → bounced back to entry point” infinite loop. -
Cookie Path Isolation
- ThePathattribute of session cookies is scoped to/a2a-panel/ui/, so it doesn’t interfere with DSH’s own session. -
Mobile Adaptation
- When the container width is below 820px, it automatically switches to the upstream mobile version at/m/. After a narrow-screen login, the user is redirected back to/m/, forming a closed loop. -
Lightweight Health Probes
- Two endpoints are provided:GET /a2a-panel/api/snapshot: Aggregated snapshot with a 3-second cache.GET /a2a-panel/api/health: Lightweight liveness check.
Installation & Setup¶
Prerequisite: You must have a running Agent2API instance (default: 127.0.0.1:3065 on the local machine).
- Clone the plugin repository to a location visible to your DSH profile:
git clone https://github.com/<you>/dsh-a2a-panel.git D:/dsh-workspace/packages/dsh-a2a-panel
- Register it in your profile’s
package.json(using a local directory link):
{
"dependencies": {
"dsh-a2a-panel": "link:D:/dsh-workspace/packages/dsh-a2a-panel"
},
"dsh.profile.bundles": ["dsh-a2a-panel", ...]
}
- Create a symlink to avoid module resolution failures before
pnpm install:
<profile>/node_modules/dsh-a2a-panel -> the directory above
- After modifying host-side code, restart DSH Web. If you only changed
lib/client.js, simply toggle the plugin off and on.
Configuration¶
Set the following fields in cordis.patch.yml:
| Key | Description |
|---|---|
apiBase |
Agent2API address, default http://127.0.0.1:3065 |
gatewayKey |
Optional. Some panel /api/* endpoints (accounts, keys, logs) accept a gateway key sk-a2a-...; the environment variable A2A_GATEWAY_KEY takes precedence — never commit real keys to the repository |
timeoutMs |
Per-request upstream timeout, default 20000 ms (the initial page load pulls several MB, so leave ample headroom) |
Typical Usage¶
- Make sure Agent2API is running (default port 3065).
- Install and enable the plugin following the steps above.
- Visit
/a2a-panel/uiin DSH Web — you’ll see the native admin panel login page. - Log in once inside the iframe. The session cookie persists afterward, allowing direct access to dashboards, accounts, routes, models, gateway keys, request logs, scheduled tasks, and other modules.
Use Cases & Caveats¶
- Ideal for users who already have Agent2API running and want a unified panel management experience within DSH.
- The plugin reverse-proxies a user-installed and user-operated Agent2API instance (upstream is AGPL-3.0). It does not include, link, or bundle any upstream code; all upstream panel files are always served by Agent2API itself.
- The reverse proxy is a “pass-through” with no additional authentication: anyone who can open DSH can operate the panel.
- If a panel upgrade introduces new absolute-path request patterns (e.g., WebSocket, service workers), the
SHIMinlib/index.jsmust be updated accordingly. - Redirecting back to
/m/after a narrow-screen login is upstream layout behavior and has not been modified.
In Short¶
If you’re already using Agent2API and want to manage its panel conveniently from within DSH, this plugin offers a path that requires no custom proxy or UI reimplementation. Through a host-side same-origin reverse proxy + iframe, it brings the entire native interaction into DSH, making it well-suited for scenarios where you need direct access to panel details.
- Directory page: https://www.skillhub.cn/plugins/ymf2317-tech/dsh-a2a-panel
- GitHub: https://github.com/ymf2317-tech/dsh-a2a-panel