blake-r/dsh-plugins--packages-dsh-assembly-rewrite ↗★ 0
@blake-r/dsh-assembly-rewrite
根据配置重写系统提示词中的命名装配插入项 适合需要通过配置文件动态修改系统提示词中工具、上下文等元素的用户。
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗@blake-r/dsh-assembly-rewrite
Rewrite named system-prompt assembly inserts (tools, sections, contexts, variables) from config.
Install
From npm (published):
dsh plugin --profile web add @blake-r/dsh-assembly-rewrite
From the GitHub repo (selective, subdirectory):
dsh plugin --profile web add github:blake-r/dsh-plugins#path:packages/dsh-assembly-rewrite
What it does
A generic, config-driven plugin for the web profile. It reads a map of
overrides from this row's config and, in the system-prompt/assemble
waterfall, rewrites any named insert whose name appears in the config — across
all four assembly namespaces: tools, sections, contexts, and variables.
No code changes are needed to add or tweak an override.
Config shape (see the profile's cordis.patch.yml):
config:
tools:
:
description:
parameters:
:
description:
sections:
:
text:
before: # insert a NEW section before this anchor
after: # insert a NEW section after this anchor
contexts:
:
text:
variables:
:
A config key addresses an insert only within its own namespace, so names may
collide across namespaces without conflict. The listener runs first in the
waterfall (prepend: true), so rewritten tool descriptions are captured into
skill bodies by dsh-skill-from-tools.
Sections: a sections. entry whose name already exists overwrites that
section's text in place. A name that does NOT exist inserts a NEW section —
positioned before/after the named anchor section via before/after, or at
the end of the section list when no anchor is given (or the anchor is missing).
before wins over after; an existing section is never duplicated.
See the header comment in src/dsh-assembly-rewrite.mjs for full behavior.