Skip to content
源码版本47f9438 (dsh@0.1)

Glossary and References

Glossary

TermMeaning
dshCLI command name of DeepSeek Harness, also the project's short name
CordisThe runtime framework of dsh, upstream cordiverse/cordis, developed by Shigma, the author of Koishi
ContextCordis's root container, a Proxy object proxied by ReflectService.handler
FiberThe instance returned by a single ctx.plugin(), a finite state machine (PENDING → LOADING → ACTIVE → UNLOADING → DISPOSED)
ServiceCordis's service base class; registers itself via ctx.reflect.provide(name, self) in its constructor
RegistryRegistryService; uses callback as the identity key to record Plugin.Runtime
Effect"Reversible registration" — ctx.on / ctx.provide etc. are recorded into the fiber's _disposables and run in reverse order on unload
IsolateContext's multi-instance mechanism; the same service name can have different implementations in different isolate subtrees
InterceptContext's config override mechanism, merged along the prototype chain
InjectThe field where a plugin declares the service names it requires; a fiber only transitions LOADING → ACTIVE when all declared services are active
Loadervendor/loader; manages the entry tree + Node's built-in ModuleLoader for ESM/CJS imports
BundleThe YAML patch layers in packages/bundle/* (base / headless / web-app) that compose plugins into ready-to-use modes
ProfileThe user's private pnpm workspace where dsh plugin add writes dependencies
Dynamic PluginA plugin injected at runtime by the agent via the cordis_define tool; session-scoped, not persisted
Host half / Client halfThe two realms of dsh: the host half is the Node process, the client half is the browser React app
SandboxThe sandboxContext of a dynamic plugin; exposes only a whitelist of verbs — not a security boundary, used for cooperative packages
HMRHot Module Replacement; server side uses chokidar + reverse dependency graph, browser side uses stat-poll + SSE
SrcLinkThis site's source-jump component; click to land on the corresponding GitHub line

Framework Events (internal/*)

EventPurpose
internal/pluginPlugin lifecycle logs
internal/statusStatus changes
internal/configConfig interpolation
internal/updateMount point for HMR / Loader persistence (waterfall)
internal/get / internal/setService store reads / writes
internal/listenerPriority routing for the framework's own events
internal/dispatchEvent dispatch

The Five Dispatches

DispatchMode
emitNotification (ignore return)
parallelAggregation (concurrent, wait for all)
serialSequential (one after another)
bailShort-circuit (stop at first return)
waterfallMiddleware (onion model, next() delegation)

Official Resources

  • Source repository: deepseek-ai/deepseek-harness (MIT)
  • Cordis upstream: cordiverse/cordis
  • Official Cordis Primer: docs/cordis-primer.md
  • Official Cordis API docs: docs/cordis-api/{context,events,fiber,registry,service}.md
  • Official Cordis tutorial: docs/cordis-tutorial/01-first-plugin.md ~ 07-into-the-harness.md

Version Pin for This Site

  • commit: 47f943859bef60e4160492346772ded9b24f765a (master @ 2026-08-13)
  • Version: dsh@0.1 (release commit, no release tag)
  • Cordis version: 4.0.1 (upstream 4.0.0-rc.7, vendored)
  • Local modifications: 18 (see vendor/README.md)

Unofficial Statement

This site is a community-driven source-learning resource, not official documentation, and does not replace the official docs. Deep content points to the official docs/cordis-primer and cordis-tutorial. Content is derived from analysis of the MIT-licensed deepseek-ai/deepseek-harness source; all SrcLinks point at public GitHub source lines. See Privacy Policy, Terms of Service, About.

Unofficial community learning site. Content based on the MIT-licensed deepseek-ai/deepseek-harness source. · Privacy · Terms · About