dsh-weknora
Tencent/WeKnora把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己带引用的 RAG 或 ReAct agent 回答(含可续聊的 session id)。
通过官方 unity CLI 在 DSH 中操作 Unity 编辑器:实时场景命令、编辑器内 C# 求值、运行时命令发现,均复用常驻的 unity shell 会话;另有原始 CLI 通道用于建工程、跑测试与构建。同时挂载 Unity 官方技能集,以及插件自带的 Unity 工作流与 Asset Store 技能。
English | 中文
Build Unity games with an AI agent. This plugin connects DeepSeek Harness to the Unity Game Engine, so you can describe what you want in plain language and the agent does the work inside the Unity Editor: creating projects, building scenes, writing and attaching C# scripts, importing your Asset Store purchases, running tests, and producing builds.
It talks to the Editor through Unity's official unity command-line tool, so everything happens in a real, running Editor and stays in sync with what you see on screen.
Before installing, make sure you have:
unity auth status
unity license statusEach project you want the agent to drive needs the com.unity.pipeline package. You do not have to add it by hand: the agent can install it for you, or you can run it once yourself:
unity pipeline install --project-path /path/to/MyGameAdd the plugin to the DeepSeek Harness profile you use:
dsh plugin --profile <name> add @opdsh/unity-plugin
dsh --profile <name>That's it. Start the harness and ask the agent to make a Unity game.
Other install sources (GitHub or a local checkout)
dsh plugin --profile <name> add github:opdsh/unity-plugin # from GitHub
dsh plugin --profile <name> add /path/to/unity-plugin # local checkoutInstalling from GitHub builds the package on install, which pnpm blocks until the package is allowlisted. If the first attempt fails with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED, add this to the profile's pnpm-workspace.yaml and run the command again:
onlyBuiltDependencies:
- "@opdsh/unity-plugin"A local checkout installs as a link and needs no allowlist entry, but you must build it first with pnpm install && pnpm build.
To confirm the plugin loaded, run dsh --profile --dump-config and look for the # == unity-plugin section.
Open the project at C:\Games\SpaceRunner, add a Player capsule at the origin with a Rigidbody, and write a script that moves it with WASD.
Tips:
-automated flag so no dialog boxes block it. If you open the Editor yourself, that's fine too; the agent will find it.Everything you have bought or claimed on the Unity Asset Store is available to the agent. It signs in with the same Unity account the unity CLI and Unity Hub already use, so there is nothing extra to set up.
Ask for an asset by name or by description:
Add the 2D Game Kit to this project.
Find a low-poly nature pack in my assets and import it.
The agent then:
.unitypackage from Unity's servers.Assets/ the files landed in.Only assets you already own are available this way. To use something new, buy or claim it on the Asset Store in your browser and it appears in your library right away. If your Unity sign-in has expired, the agent will ask you to run unity auth login or sign in through the Unity Hub, then continue.
The Asset Store feature works on Windows and macOS and needs Python 3.9 or newer.
Most people never need to change anything. If you do:
In the web GUI: open Plugins in the sidebar and select @opdsh/unity-plugin. Its page has every setting: the unity executable and default project path, the timeouts and output cap, the warm shell, and the Unity skill collection (on/off, repository, ref, cache directory). Changes are saved to the profile's cordis.patch.yml and apply immediately without a restart; empty fields fall back to the defaults.
In the profile: CI credentials (env) are only set here, so they never reach the browser; every other setting can be set here too. Edit the profile's cordis.patch.yml. A patch replaces the plugin's whole config block, so include every key you want to keep:
- insert:
- id: unity
name: '@opdsh/unity-plugin'
config:
unityBin: unity # path to the unity CLI if it is not on PATH
projectPath: /abs/path/to/MyGame # default project for Editor commands
commandTimeoutMs: 120000 # per Editor command; must be > 0
cliTimeoutMs: 600000 # for builds, tests, and other CLI calls; must be > 0
graceMs: 5000
outputMaxBytes: 512000 # must be > 0
env: {} # e.g. UNITY_SERVICE_ACCOUNT_ID / SECRET for CI
warmShell: true # keep one `unity shell` alive for fast Editor commands
shellIdleMs: 300000 # close the idle shell after this long
unitySkillsDownload: true # false skips Unity's skill collection
unitySkillsRepo: https://github.com/Unity-Technologies/skills # '' also disables the download
unitySkillsRef: 87fac23d66a1f44f5e06c2935eccce0b40b9715a # or a branch such as mainunitySkillsRef pins the version of Unity's official skills. The default is a tested commit; set it to main to follow the latest content. Skills are downloaded once per ref into /cache/unity-plugin/unity-skills; if the download fails, an existing cache keeps working.
Symptom · What to do The agent says no Editor instance was found (STATUS_NO_INSTANCES) · Open the project in Unity 6, and make sure unity pipeline install has been run for it. A CLI call fails with exit code 3 · Sign in again with unity auth login. A CLI call fails with exit code 4 · No license is available. Check unity license status. Note that an open Editor holds a license seat until it closes. Asset Store search reports AUTH_EXPIRED or AUTH_NOT_FOUND · Sign in with unity auth login or through the Unity Hub, then ask the agent to try again. Asset Store on Linux · Not supported yet; the token store is read only on Windows and macOS. Something else went wrong · Ask the agent to run unity doctor or show the Editor logs (unity logs).
Agent tools
Tool · Purpose unity_status · List running Editors the plugin can talk to. unity_list_commands · Discover the connected Editor's commands and their parameters. unity_command · Run one live Editor command, such as create_gameobject, get_scene_hierarchy, or save_scene. unity_eval · Run C# inside the Editor with full UnityEngine and UnityEditor access. unity_cli · Everything else the CLI offers: projects create, open, pipeline install, templates list, editors, test, build, auth, license, logs.
Skills
A project- or user-level skill with the same name overrides a bundled one.
Building and running from source
pnpm install
pnpm typecheck
pnpm buildThe build emits lib/index.mjs (the Node half the dsh Loader imports) and lib/client.js (the browser half, declared via dsh.client in package.json and served by the web GUI at /plugins/@opdsh/unity-plugin/client.js). The browser half loads only when the plugin is installed into a profile by package name; an absolute-path --patch overlay loads the Node half only.
To load from source against a deepseek-harness checkout without installing, write a patch overlay pointing at this checkout's entry point (absolute path; run pnpm install here first):
# dev.cordis.yml
- insert:
- id: unity
name: '/abs/path/to/unity-plugin/src/index.ts'Then, from the deepseek-harness checkout:
pnpm dsh web --patch /abs/path/to/dev.cordis.ymlDesign notes
subprocess service: argv only, never shell-interpreted; bounded collected output; tree-scoped termination; the abort signal is forwarded so tool timeouts kill the whole process tree.unity_status, unity_list_commands, unity_command, unity_eval) share a warm unity shell --protocol ndjson session per working directory, cutting per-call latency from roughly 600 ms of CLI start-up to single-digit milliseconds. Requests serialize per session; a timeout or cancellation mid-request kills the session and the next call respawns it; idle sessions are disposed after shellIdleMs. Set warmShell: false to fall back to one process per call. unity_cli always spawns per call because builds and tests run long and want raw streams.--non-interactive, so a command that needs interactive input fails loudly instead of hanging the agent.env config field.commandTimeoutMs, cliTimeoutMs, shellIdleMs, and outputMaxBytes must be greater than zero, graceMs at least zero, and every duration at most 2147483647 ms (the longest delay a Node timer honours). The settings form refuses to save invalid values, and the Loader keeps the running values when an edited config fails validation.{ success, command, data, errors, warnings }) as structured output, so they compose with Code Mode.unity mcp). Pointing @deepseek-ai/dsh-mcp-client at it works with zero code but forfeits render cards, config validation, and curated tool descriptions. This plugin exists to provide those.unity_cli starts one CLI process per call by design; only the four live-Editor tools use the warm session.