Skip to content

About

A version‑aware adapter registry that decouples third‑party Cordis plugins from dsh’s internal service names, paths, and RPC internals. 基于版本感知适配器注册表,为 dsh Cordis 插件提供运行时兼容层,使第三方插件与内部服务名、模块路径及 RPC 细节解耦。

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Banner

dshloader

Patch-specific dsh adapters, owned resources, and declarative plugin configuration.

English | 简体中文

DSH Plugin Build Status Version License

English

dsh-loader 2.0.0 provides independent adapters for dsh patch releases, stable host capability facades, client UI helpers, and a new configuration API with centrally generated forms.

Supported patch families: 0.1.5, 0.1.6, 0.1.7, 0.2.0, 0.2.1, 0.2.2, including prereleases. The published release inventory and dependency resolution are frozen on 2026-10-30. Unknown patches, majors, and older versions are rejected. Requires Node >=24.9.0.

Install

npm run build
npm pack
node bin/dshloader.mjs setup <profile-name>
npm install --prefix <profile-directory> <absolute-path-to-dsh-plugin-dsh-loader-2.0.0.tgz>

setup writes the dependency and Cordis patch to the named profile. Install the locally packed archive into that same profile, then restart dsh. These commands do not publish the package.

Inject dshLoader to access config, settings, web, services, registry, llm, dsh, and patch. The client entry is @dsh-plugin/dsh-loader/client; host module subpaths have explicit ESM and CJS exports.

Configuration

Register a JSON template through config.register(ownerCtx, template). Values persist at <profile>/config/<pluginID>/config.json, independently of host settings and exposeAllNamespaces. Templates support groups, objects, arrays, passwords, validation, and declarative visibility.

Templates can also declare transient operation panels with host handlers registered through handle.registerOperation(): async options, selection-to-editor bindings, editing/import, read-only Markdown/list/JSON results, cancellable long tasks, and resource revision conflicts. Operation drafts never enter the configuration file.

Fields can also open custom dialogs registered by the client through dshLoaderUi.config.registerDialog(). Plugins provide a React UI and a data reader; .save() and the Confirm button share revision-checked configuration persistence, retaining editor contents on failure.

Before dsh 0.1.6-alpha.2, forms appear under More → Settings → Plugin configuration. Newer versions use the corresponding native plugin detail page. Every plugin has a collapsed card with measured equal-width labels and fieldset groups. Save, cancel, and restore-defaults work per card; failed or conflicting saves preserve drafts.

Validate

npm run typecheck
npm run build
npm test
npm run test:package
npm run test:browser

The browser fixture uses .cache/browser/profile, not a user profile. Matrix tests use committed npm dependency and contract snapshots. See the support document for refresh instructions. Existing plugin configuration files are not migrated automatically; build and test never publish the package.

About

A version‑aware adapter registry that decouples third‑party Cordis plugins from dsh’s internal service names, paths, and RPC internals. 基于版本感知适配器注册表,为 dsh Cordis 插件提供运行时兼容层,使第三方插件与内部服务名、模块路径及 RPC 细节解耦。

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages