Cordis
The underlying runtime framework of DeepSeek Harness, designed specifically for AI agent scenarios. Its name derives from the Latin word for 'heart.' Cordis provides three core capabilities: reversible effects, reactive coordination, and real-time reconfiguration, supporting zero-downtime hot-swapping of plugins.
Timeline (last 90 days)
The Cordis framework defines spatial composability as components declaring dependencies and the runtime automatically activating or deactivating them according to dependencies, and temporal composability as automatically reclaiming a component's registered tools, event listeners, timers and other side effects when the component is unloaded.
All Cordis plugins share an application-level context (ctx) exposed by Cordis; plugins provide services by declaring names, other plugins declare dependencies via the inject array, and Cordis accordingly guarantees that dependencies are mounted before their consumers.
DSH actually contains two Cordis applications: the backend and the frontend (the Electron interface itself is also a Cordis application), and the two cooperate through communication.
In Cordis, plugins are loaded via a YAML configuration file: list the plugin ID and name under the insert property; if the plugin has been published as an npm package, fill in the package name, otherwise fill in the absolute path of the plugin file; dsh web --patch can specify a patch file to append plugins on top of the Web configuration.
The security guard plugin uses waterfall events to intercept the tools pre-execution event; if the model calls bash and the command contains rm -rf, it returns a deny object to refuse execution, and returns next to allow it normally.
Cordis plugins have four modes for emitting events: normal emit (fire and forget), waterfall (listeners pass the return value along the chain, which can be terminated midway), serial (wait for the preceding event to complete), and parallel (trigger multiple listeners simultaneously).
In Cordis, plugins can emit events in four ways: normal emit, waterfall, serial, and parallel; plugins can also declare custom new events (for example, the compaction plugin creates a Compaction event).
In the demo, the author used the --patch parameter to append a self-built configuration to the end of the existing Cordis configuration of the web profile, making the three example plugins take effect on the local web client; the greet tool was successfully called, and the rmrf command was intercepted by the guard plugin.
Cordis configuration is layered: the base bundle's Cordis configuration file, patch files, and user configuration (located in profiles under the user directory, distinguished by profile and overriding the previous layers).
In Cordis, plugins are loaded via YAML configuration rather than hard-coded; under the insert property, each plugin is assigned an ID and name, which can be an npm package name or an absolute path to a local file.
22 more timeline events
All Facts (20)
The Cordis framework is derived from a same-named service-container library in the JavaScript ecosystem, originally used for the chatbot framework Koishi.
70%UnverifiedThe underlying layer of DeepSeek Harness is powered by Cordis for shared context, which is responsible for service contributions, typed events, and reversible side effects
70%UnverifiedThe Cordis framework defines spatial composability as components declaring dependencies and the runtime automatically activating or deactivating them according to dependencies, and temporal composability as automatically reclaiming a component's registered tools, event listeners, timers and other side effects when the component is unloaded.
50%UnverifiedAll Cordis plugins share an application-level context (ctx) exposed by Cordis; plugins provide services by declaring names, other plugins declare dependencies via the inject array, and Cordis accordingly guarantees that dependencies are mounted before their consumers.
50%UnverifiedDSH actually contains two Cordis applications: the backend and the frontend (the Electron interface itself is also a Cordis application), and the two cooperate through communication.
50%UnverifiedIn Cordis, plugins are loaded via a YAML configuration file: list the plugin ID and name under the insert property; if the plugin has been published as an npm package, fill in the package name, otherwise fill in the absolute path of the plugin file; dsh web --patch can specify a patch file to append plugins on top of the Web configuration.
50%UnverifiedThe security guard plugin uses waterfall events to intercept the tools pre-execution event; if the model calls bash and the command contains rm -rf, it returns a deny object to refuse execution, and returns next to allow it normally.
50%UnverifiedCordis plugins have four modes for emitting events: normal emit (fire and forget), waterfall (listeners pass the return value along the chain, which can be terminated midway), serial (wait for the preceding event to complete), and parallel (trigger multiple listeners simultaneously).
50%UnverifiedIn Cordis, plugins are loaded via YAML configuration rather than hard-coded; under the insert property, each plugin is assigned an ID and name, which can be an npm package name or an absolute path to a local file.
50%UnverifiedWaterfall events pass the return value of the previous listener as input to the next listener; listeners must explicitly return a next token to let it through, while returning an interrupt object such as deny terminates the chain and blocks the subsequent default flow.
50%UnverifiedCordis configuration is layered: the base bundle's Cordis configuration file, patch files, and user configuration (located in profiles under the user directory, distinguished by profile and overriding the previous layers).
50%UnverifiedIn Cordis, plugins can emit events in four ways: normal emit, waterfall, serial, and parallel; plugins can also declare custom new events (for example, the compaction plugin creates a Compaction event).
50%UnverifiedCordis is the plugin system adopted by DSH; its repository does not belong to DeepSeek, and its first commit predates the founding of DeepSeek by about a year.
50%UnverifiedCordis plugins declare the service names they depend on via the inject field; the framework ensures that dependent plugins finish mounting first, then provides the context capabilities to the current plugin.
50%UnverifiedDSH actually contains two Cordis applications: one for the backend, and the front-end GUI itself is also one, and the two cooperate through communication.
50%UnverifiedCordis's author later joined DeepSeek and participated in DSH development, the official Cordis page points to the DSH project, and the related paper was published by DeepSeek.
50%UnverifiedCordis is a general-purpose dependency injection and plugin container framework that matured in the Koishi ecosystem and was later adopted by DeepSeek Harness as its underlying runtime
50%UnverifiedDSH adopts the philosophy of "everything is a plugin," with LLM adapters, shell, file system, storage backend, agent loop, approval policy, scheduler, and client modules all being replaceable
50%UnverifiedThe underlying layer of the Harness is handled by Cordis, which is responsible for loading dependencies, managing lifecycles, and reclaiming resources
50%UnverifiedIn Cordis, each loaded instance has a fiber state that transitions among pending, loading, active, unloading, and disposed, and may also enter a failed state
50%