0. TL;DR
August 14, 2026 · View on GitHub
DSH is a plugin system: model adapters, the tool registry, the session log, the sandbox, and the
agent loop itself are all plugins, assembled layer-by-layer from cordis.yml. There is no
privileged kernel — the only way to extend DSH is to mount a plugin next to it.
A plugin is a module that exports an apply(ctx) function. The runtime hands you a context
(ctx) through which you register tools, event listeners, commands, and resources. Registrations
are effects — they unwind automatically when the plugin unloads, which is what makes DSH's
plugin model safe to compose and tear down at runtime.
// The entire shape of a DSH plugin.
import type { Context } from '@deepseek-ai/cordis'
export const name = 'my-plugin'
export const inject = ['tools'] // optional: services this plugin needs
export function apply(ctx: Context) {
// register tools, listen to events, mount resources here
}