dsh-matrix-rain
awa-123-cw
DeepSeek Harness WebUI 动效美化插件:聊天背景黑客帝国代码雨,雨字内容 = 当前会话 AI 思考链(流式实时),设置页调色盘 + 全套 DIY
PROJECT TOPICS
PROJECT README
English | 中文
Bridge web/Electron/Tauri/Node applications to DeepSeek Harness (DSH) agents in real time — expose your app's frontend tools to AI agents over a loopback WebSocket.

Most agent tooling is built around the file system. Yet countless applications and systems are built on frontend technologies — places agents cannot reach by reading and writing files.
dsh-frontend-tools flips the model: instead of granting the agent direct access to underlying data, the connected application becomes a stand-in for a human operator. The agent works through the app's own interaction entry points, exactly like a person sitting in front of the screen.
Inspired by the frontend tools of CopilotKit. The goal: on top of the DSH harness, let any frontend application or system plug into agents — quickly and elegantly.
dsh-frontend-tools is a two-package project that lets any JavaScript application (browser page, Electron renderer, Tauri app, Node process) register its own functions as tools available to a DSH agent, and receive real-time tool calls from the agent back to the application.
ctx.tools and forwards model calls back. Supports multiple applications simultaneously via KEY-based namespace isolation.WebSocket.┌─────────────────────┐ WebSocket (127.0.0.1) ┌──────────────────────┐
│ Your Application │ ─────────────────────────▶ │ DSH + Bridge │
│ │ ◀───────────────────────── │ (dsh-frontend- │
│ - generate KEY │ register tools / calls │ tools-bridge) │
│ - register tools │ │ - multi-app by KEY │
│ - execute calls │ │ - admin tools │
└─────────────────────┘ └──────────────────────┘
In your DSH cordis.yml, add:
plugins:
- import: dsh-frontend-tools-bridge
config:
port: 31870 # optional, default 31870
maxTools: 200 # optional, total tool budget across all apps
Then install the package:
pnpm add dsh-frontend-tools-bridge
npm install dsh-frontend-tools-client
# or pnpm / yarn
import { createFrontendToolsClient, generateClientKey } from 'dsh-frontend-tools-client'
// Generate a KEY once, persist it (localStorage or similar)
const key = localStorage.getItem('dsh-key') ?? generateClientKey()
localStorage.setItem('dsh-key', key)
const client = createFrontendToolsClient({ url: 'ws://127.0.0.1:31870', key })
await client.connect()
// Register a tool
await client.registerTools([{
name: 'get_current_page',
description: 'Get information about the current page the user is viewing.',
parametersSchema: { type: 'object', properties: {} },
readOnly: true, // read-only tools run without interruption
async execute() {
return { url: location.href, title: document.title }
},
}])
// Tools WITHOUT `readOnly: true` are WRITE operations: every call clears
// DSH's human approval before it is forwarded to your app (fail-safe
// default — undeclared means write).
buildClientKeyClipboardText() for a ready-to-paste format).frontend_tools_register_client to register the KEY against a namespace.See dsh-frontend-tools-client for full SDK documentation and dsh-frontend-tools-bridge for bridge configuration, admin tools, and protocol details.
pnpm install
pnpm run build # build both packages
pnpm run typecheck # type-check all sources
pnpm run test # run 175 unit tests
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。