dsh-plugin-prompt-tool 0.8.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -67
- package/engine/actions/append-context.mjs +49 -0
- package/engine/actions/assembly.mjs +150 -0
- package/engine/actions/catalog.mjs +92 -0
- package/engine/actions/content.mjs +205 -0
- package/engine/actions/decision.mjs +54 -0
- package/engine/actions/examples.mjs +11 -0
- package/engine/actions/guard.mjs +80 -0
- package/engine/actions/inbox-prepend.mjs +37 -0
- package/engine/actions/index.mjs +100 -0
- package/engine/actions/inject-text.mjs +22 -0
- package/engine/actions/pre-step-filter.mjs +55 -0
- package/engine/actions/registration.mjs +168 -0
- package/engine/actions/request-params.mjs +32 -0
- package/engine/actions/sdk-strip.mjs +30 -0
- package/engine/actions/shared.mjs +71 -0
- package/engine/actions.mjs +2 -931
- package/engine/branch.mjs +44 -0
- package/engine/character-tools.mjs +3 -6
- package/engine/compaction-epoch.mjs +31 -13
- package/engine/compositions/library/agent-instructions.yml +1 -1
- package/engine/compositions/library/command-goal.yml +1 -1
- package/engine/compositions/library/compaction.yml +1 -1
- package/engine/compositions/library/delegation-ptc.yml +1 -1
- package/engine/compositions/library/delegation.yml +1 -1
- package/engine/compositions/library/persistent-shell.yml +1 -1
- package/engine/compositions/library/planning.yml +1 -1
- package/engine/compositions/library/skill-filesystem-cordis.yml +1 -1
- package/engine/compositions/library/skill-filesystem.yml +1 -1
- package/engine/compositions/library/tool-ask-user.yml +1 -1
- package/engine/compositions/library/tool-bash.yml +1 -1
- package/engine/compositions/library/tool-cordis.yml +1 -1
- package/engine/compositions/library/tool-fs-search.yml +1 -1
- package/engine/compositions/library/tool-fs.yml +1 -1
- package/engine/compositions/library/tool-goal.yml +1 -1
- package/engine/compositions/library/tool-jobs.yml +1 -1
- package/engine/compositions/library/tool-plugin-manager-disabled.yml +1 -1
- package/engine/compositions/library/tool-plugin-manager.yml +1 -1
- package/engine/compositions/library/tool-present.yml +1 -1
- package/engine/compositions/library/tool-presentation.yml +1 -1
- package/engine/compositions/library/tool-pwsh.yml +1 -1
- package/engine/compositions/library/tool-skill.yml +1 -1
- package/engine/compositions/library/tool-todo.yml +1 -1
- package/engine/compositions/library/tool-web.yml +1 -1
- package/engine/compositions/source/local/dev-tool-search.yml +11 -0
- package/engine/compositions/source/local/instruction-hint.yml +22 -1
- package/engine/compositions/source/local/rule-engine.yml +6 -0
- package/engine/condition.mjs +16 -3
- package/engine/conditions/anchor.mjs +32 -0
- package/engine/conditions/availability.mjs +47 -0
- package/engine/conditions/composite.mjs +83 -0
- package/engine/conditions/count.mjs +140 -0
- package/engine/conditions/evaluation.mjs +41 -0
- package/engine/conditions/examples.mjs +11 -0
- package/engine/conditions/index.mjs +85 -0
- package/engine/conditions/names.mjs +21 -0
- package/engine/conditions/phase.mjs +54 -0
- package/engine/conditions/preset.mjs +94 -0
- package/engine/conditions/scope.mjs +18 -0
- package/engine/conditions/session.mjs +22 -0
- package/engine/conditions/source.mjs +63 -0
- package/engine/conditions/subject.mjs +121 -0
- package/engine/conditions/text.mjs +44 -0
- package/engine/conditions/values.mjs +32 -0
- package/engine/dev-tool-search.mjs +213 -0
- package/engine/executor.mjs +93 -31
- package/engine/fillers.mjs +23 -16
- package/engine/instruction-hint.mjs +39 -23
- package/engine/layers.mjs +171 -77
- package/engine/order.mjs +20 -0
- package/engine/predicates.mjs +2 -753
- package/engine/rule-engine.mjs +40 -0
- package/engine/rule-runtime.mjs +110 -0
- package/engine/rule-spec.mjs +187 -0
- package/engine/schema.mjs +32 -11
- package/engine/session-var-tools.mjs +3 -6
- package/engine/shared.mjs +1 -1
- package/engine/st-render.mjs +8 -4
- package/engine/strategies.mjs +2 -235
- package/engine/subagent-tool-policy-core.mjs +7 -7
- package/engine/subagent-tool-policy.mjs +45 -20
- package/engine/tool-config-engine.mjs +53 -32
- package/engine/trigger-editor-meta.mjs +2 -21
- package/engine/trigger-spec.mjs +49 -133
- package/engine/world-book-tools.mjs +3 -6
- package/lib/client.js +10444 -10886
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +265 -361
- package/lib/index.mjs +1559 -2026
- package/lib/migrate-rules.d.mts +1 -0
- package/lib/migrate-rules.mjs +39 -0
- package/lib/module-package-CHPFweqK.mjs +2 -0
- package/lib/module-package-Cnd1_mwx.mjs +2872 -0
- package/lib/{paths-CY5psBqE.d.mts → paths-CyP0IkaM.d.mts} +388 -231
- package/lib/preset-transfer.d.mts +2 -2
- package/lib/preset-transfer.mjs +3 -2
- package/lib/{preset-package-BnJqrU4R.mjs → rules-migration-DJ6vASB5.mjs} +13825 -15283
- package/modules/ponytail/module.yml +406 -0
- package/modules/skill-surface/module.yml +74 -0
- package/modules/tool-surface/module.yml +67 -0
- package/package.json +50 -80
- package/templates/10-pre-step.yml +26 -22
- package/templates/14-first-turn-anchor.yml +25 -21
- package/templates/15-guide-auto.yml +34 -19
- package/templates/16-custom-fallback.yml +27 -15
- package/templates/18-placeholder-env-facts.yml +23 -14
- package/templates/20-system-section.yml +20 -11
- package/templates/30-runtime-context.yml +13 -7
- package/templates/40-agent-request.yml +11 -8
- package/templates/50-llm-stream.yml +14 -6
- package/templates/60-tool-pipeline.yml +15 -9
- package/templates/65-turn-stop.yml +19 -12
- package/templates/66-subagent-start.yml +12 -7
- package/templates/70-subagent-maintenance.yml +35 -29
- package/templates/75-subagent-end.yml +10 -5
- package/templates/80-tool-surface.yml +66 -0
- package/templates/policies/legacy-defaults.yml +34 -0
- package/templates/tools/50-delegate-worldbook.yml +1 -1
- package/engine/compositions/source/local/prompt-config-engine.yml +0 -7
- package/engine/prompt-config-engine.mjs +0 -104
- package/preset/pt-cordis/preset.yml +0 -43
- package/preset/pt-cordis/skills/cordis-composition-reference/SKILL.md +0 -29
- package/preset/pt-cordis/skills/cordis-composition-reference/references/packages.md +0 -501
- package/preset/pt-cordis/skills/cordis-plugin-development/SKILL.md +0 -38
- package/preset/pt-cordis/skills/cordis-plugin-development/references/host-plugin.md +0 -60
- package/preset/pt-cordis/skills/cordis-plugin-development/references/mcp-bundle.md +0 -5
- package/preset/pt-cordis/skills/cordis-plugin-development/references/ui-plugin.md +0 -13
- package/preset/pt-cordis/skills/cordis-plugin-development/references/verification.md +0 -5
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/client.js +0 -22
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/cordis.patch.yml +0 -3
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/index.js +0 -2
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/package.json +0 -15
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/mcp/cordis.patch.yml +0 -8
- package/preset/pt-cordis/skills/cordis-plugin-development/templates/mcp/package.json +0 -7
- package/preset/pt-cordis/skills/editing-cordis-compositions/SKILL.md +0 -84
- package/preset/pt-custom/preset.yml +0 -15
- package/preset/pt-minimal/preset.yml +0 -27
- package/preset/pt-ptc/preset.yml +0 -45
- package/preset/pt-standard/preset.yml +0 -43
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-prompt-tool",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "DSH 插件:提示词工具,规范模型的思维链与回答内容,提供 Web UI 编辑 preset.md 与 AGENTS.md,并按 skills 目录注册可开关技能。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "lib/index.mjs",
|
|
12
12
|
"types": "lib/index.d.mts",
|
|
13
|
+
"bin": {
|
|
14
|
+
"prompt-tool-migrate-rules": "lib/migrate-rules.mjs"
|
|
15
|
+
},
|
|
13
16
|
"exports": {
|
|
14
17
|
".": {
|
|
15
18
|
"types": "./lib/index.d.mts",
|
|
@@ -43,103 +46,69 @@
|
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
"peerDependencies": {
|
|
46
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
47
|
-
"@deepseek-ai/dsh-agent": "
|
|
48
|
-
"@deepseek-ai/dsh-agent-preset-registry": "
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-alpha.1",
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.7-alpha.1",
|
|
61
|
-
"@deepseek-ai/dsh-commands": "^0.1.7-alpha.1",
|
|
62
|
-
"@deepseek-ai/dsh-fs": "^0.1.7-alpha.1",
|
|
63
|
-
"@deepseek-ai/dsh-host-webserver": "^0.1.7-alpha.1",
|
|
64
|
-
"@deepseek-ai/dsh-scope": "^0.1.7-alpha.1",
|
|
65
|
-
"@deepseek-ai/dsh-settings": "^0.1.7-alpha.1",
|
|
66
|
-
"@deepseek-ai/dsh-skill": "^0.1.7-alpha.1",
|
|
67
|
-
"@deepseek-ai/dsh-skill-filesystem": "^0.1.7-alpha.1",
|
|
68
|
-
"@deepseek-ai/dsh-subagent": "^0.1.7-alpha.1",
|
|
69
|
-
"@deepseek-ai/dsh-system-prompt": "^0.1.7-alpha.1",
|
|
70
|
-
"@deepseek-ai/dsh-tools": "^0.1.7-alpha.1",
|
|
71
|
-
"@deepseek-ai/schemastery": "^3.18.3",
|
|
49
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
50
|
+
"@deepseek-ai/dsh-agent": ">=0.2.0-rc.1",
|
|
51
|
+
"@deepseek-ai/dsh-agent-preset-registry": ">=0.2.0-rc.1",
|
|
52
|
+
"@deepseek-ai/dsh-commands": ">=0.2.0-rc.1",
|
|
53
|
+
"@deepseek-ai/dsh-fs": ">=0.2.0-rc.1",
|
|
54
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.2.0-rc.1",
|
|
55
|
+
"@deepseek-ai/dsh-scope": ">=0.2.0-rc.1",
|
|
56
|
+
"@deepseek-ai/dsh-settings": ">=0.2.0-rc.1",
|
|
57
|
+
"@deepseek-ai/dsh-skill": ">=0.2.0-rc.1",
|
|
58
|
+
"@deepseek-ai/dsh-skill-filesystem": ">=0.2.0-rc.1",
|
|
59
|
+
"@deepseek-ai/dsh-subagent": ">=0.2.0-rc.1",
|
|
60
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.2.0-rc.1",
|
|
61
|
+
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.1",
|
|
72
62
|
"react": "^18.2.0"
|
|
73
63
|
},
|
|
74
64
|
"devDependencies": {
|
|
75
|
-
"@deepseek-ai/cordis": "4.0.
|
|
76
|
-
"@deepseek-ai/dsh-agent": "0.
|
|
77
|
-
"@deepseek-ai/dsh-agent-preset-registry": "0.
|
|
78
|
-
"@deepseek-ai/dsh-api-remotes": "0.
|
|
79
|
-
"@deepseek-ai/dsh-api-session-controller": "0.
|
|
80
|
-
"@deepseek-ai/dsh-client-connection": "0.
|
|
81
|
-
"@deepseek-ai/dsh-client-locale": "0.
|
|
82
|
-
"@deepseek-ai/dsh-client-store": "0.
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-
|
|
84
|
-
"@deepseek-ai/dsh-client-ui-
|
|
85
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.
|
|
86
|
-
"@deepseek-ai/dsh-client-ui-
|
|
87
|
-
"@deepseek-ai/dsh-client-ui-
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-
|
|
89
|
-
"@deepseek-ai/dsh-client-ui-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-
|
|
99
|
-
"@deepseek-ai/dsh-skill": "0.
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
101
|
-
"@deepseek-ai/dsh-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/dsh-
|
|
104
|
-
"@deepseek-ai/dsh-tools": "0.1.7-alpha.1",
|
|
105
|
-
"@shikijs/langs": "^4.3.1",
|
|
65
|
+
"@deepseek-ai/cordis": "4.0.4",
|
|
66
|
+
"@deepseek-ai/dsh-agent": ">=0.2.0-rc.1",
|
|
67
|
+
"@deepseek-ai/dsh-agent-preset-registry": ">=0.2.0-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.2.0-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-api-session-controller": ">=0.2.0-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-client-connection": ">=0.2.0-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-store": ">=0.2.0-rc.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-layout": ">=0.2.0-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.1",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": ">=0.2.0-rc.1",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.0-rc.1",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-session": ">=0.2.0-rc.1",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-workspace": ">=0.2.0-rc.1",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.1",
|
|
80
|
+
"@deepseek-ai/dsh-commands": ">=0.2.0-rc.1",
|
|
81
|
+
"@deepseek-ai/dsh-fs": ">=0.2.0-rc.1",
|
|
82
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.2.0-rc.1",
|
|
83
|
+
"@deepseek-ai/dsh-llm": ">=0.2.0-rc.1",
|
|
84
|
+
"@deepseek-ai/dsh-package-manifest": ">=0.2.0-rc.1",
|
|
85
|
+
"@deepseek-ai/dsh-scope": ">=0.2.0-rc.1",
|
|
86
|
+
"@deepseek-ai/dsh-session": ">=0.2.0-rc.1",
|
|
87
|
+
"@deepseek-ai/dsh-settings": ">=0.2.0-rc.1",
|
|
88
|
+
"@deepseek-ai/dsh-skill": ">=0.2.0-rc.1",
|
|
89
|
+
"@deepseek-ai/dsh-skill-filesystem": ">=0.2.0-rc.1",
|
|
90
|
+
"@deepseek-ai/dsh-subagent": ">=0.2.0-rc.1",
|
|
91
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.2.0-rc.1",
|
|
92
|
+
"@deepseek-ai/dsh-tool-subagent": ">=0.2.0-rc.1",
|
|
93
|
+
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.1",
|
|
106
94
|
"@types/node": "^26.2.0",
|
|
107
95
|
"@types/react": "~18.3.1",
|
|
108
96
|
"@types/react-dom": "^18.3.0",
|
|
109
|
-
"anser": "^2.3.5",
|
|
110
97
|
"clsx": "^2.1.1",
|
|
111
|
-
"diff": "^9.0.0",
|
|
112
|
-
"immer": "^10.1.1",
|
|
113
|
-
"katex": "^0.16.47",
|
|
114
98
|
"lightningcss": "^1.32.0",
|
|
115
|
-
"mdast-util-from-markdown": "^2.0.3",
|
|
116
|
-
"mdast-util-gfm": "^3.1.0",
|
|
117
|
-
"mdast-util-math": "^3.0.0",
|
|
118
|
-
"micromark-core-commonmark": "^2.0.3",
|
|
119
|
-
"micromark-extension-gfm": "^3.0.0",
|
|
120
|
-
"micromark-extension-math": "^3.1.0",
|
|
121
|
-
"micromark-factory-space": "^2.0.1",
|
|
122
|
-
"micromark-util-character": "^2.1.1",
|
|
123
|
-
"micromark-util-classify-character": "^2.0.1",
|
|
124
|
-
"micromark-util-sanitize-uri": "^2.0.1",
|
|
125
|
-
"micromark-util-symbol": "^2.0.1",
|
|
126
|
-
"micromark-util-types": "^2.0.1",
|
|
127
99
|
"oxlint": "^1.78.0",
|
|
128
100
|
"react": "^18.3.1",
|
|
129
101
|
"react-dom": "^18.3.1",
|
|
130
102
|
"semver": "7.8.5",
|
|
131
|
-
"shiki": "^4.3.1",
|
|
132
|
-
"simple-icons": "^16.31.0",
|
|
133
103
|
"tsdown": "^0.22.2",
|
|
134
|
-
"typescript": "^5.9.2"
|
|
135
|
-
"zustand": "~4.4.7"
|
|
104
|
+
"typescript": "^5.9.2"
|
|
136
105
|
},
|
|
137
106
|
"files": [
|
|
138
107
|
"lib",
|
|
139
108
|
"engine",
|
|
140
109
|
"cordis.patch.yml",
|
|
141
110
|
"LICENSE",
|
|
142
|
-
"
|
|
111
|
+
"modules",
|
|
143
112
|
"templates",
|
|
144
113
|
"README.md"
|
|
145
114
|
],
|
|
@@ -150,13 +119,14 @@
|
|
|
150
119
|
"lint": "oxlint src test tsdown.config.ts",
|
|
151
120
|
"test": "node scripts/run-tests.mjs",
|
|
152
121
|
"sync:yaml": "node scripts/sync-yaml-vendor.mjs",
|
|
153
|
-
"rebuild:composition": "node scripts/rebuild-composition.mjs",
|
|
154
122
|
"rebuild:preset-template": "node scripts/rebuild-preset-template.mjs",
|
|
155
123
|
"rematerialize:presets": "node scripts/rematerialize-presets.mjs",
|
|
124
|
+
"migrate:rules": "node lib/migrate-rules.mjs",
|
|
156
125
|
"repair:profile": "node scripts/repair-profile.mjs",
|
|
157
126
|
"verify:host": "node scripts/verify-host-contracts.mjs"
|
|
158
127
|
},
|
|
159
128
|
"dependencies": {
|
|
129
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
160
130
|
"@zip.js/zip.js": "2.15.0",
|
|
161
131
|
"yaml": "^2.9.0"
|
|
162
132
|
}
|
|
@@ -2,30 +2,34 @@
|
|
|
2
2
|
# 本模板覆盖三种字段变体,插入后改字段即可:
|
|
3
3
|
# - mergeMode=merged + texts 多块 → 同 position 配置拼接为一条消息(原 11-merged-a)
|
|
4
4
|
# - configKind=anchor → 固定锚点序,按模块文件相对顺序排所有 ordered 之前(原 13-anchor)
|
|
5
|
-
# 接入:复制本文件到
|
|
6
|
-
# 保存前可 POST /api/prompt-tool/settings/
|
|
5
|
+
# 接入:复制本文件到 模块规则模板目录,或把对象写入 module.yml.rules 数组。
|
|
6
|
+
# 保存前可 POST /api/prompt-tool/settings/rules 做权威校验。
|
|
7
7
|
# audience 为配置项(缺省=公用;main=仅主会话;subagent=仅子代理),模板不锁定。
|
|
8
8
|
id: example-pre-step
|
|
9
9
|
name: 示例:消息批注入
|
|
10
10
|
enabled: false
|
|
11
11
|
layer: pre-step
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
12
|
+
then:
|
|
13
|
+
- id: inject
|
|
14
|
+
kind: inject-text
|
|
15
|
+
config:
|
|
16
|
+
id: example-pre-step
|
|
17
|
+
layer: pre-step
|
|
18
|
+
strategy: static
|
|
19
|
+
position: after-user
|
|
20
|
+
dedupe: session
|
|
21
|
+
configKind: ordered
|
|
22
|
+
order: 0
|
|
23
|
+
role: user
|
|
24
|
+
mergeMode: separate
|
|
25
|
+
sourceKind: ''
|
|
26
|
+
form: notice
|
|
27
|
+
summary: ''
|
|
28
|
+
identity:
|
|
29
|
+
field: plugin
|
|
30
|
+
value: example-pre-step
|
|
31
|
+
text: |
|
|
32
|
+
|
|
33
|
+
variables:
|
|
34
|
+
WHO: ''
|
|
35
|
+
params: {}
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
# 模板:首句锚点(strategy=first-turn-anchor)
|
|
2
2
|
# 首条真实用户消息后按任务类型(build / inspect / deep)注入锚句,每会话一次。
|
|
3
|
-
#
|
|
4
|
-
# 提示:把本文件放入
|
|
3
|
+
# 纯净模板:参数全部留空,由用户自定义;锚句与分类正则由模板或用户配置提供,引擎不提供默认正文。
|
|
4
|
+
# 提示:把本文件放入 模块规则模板目录,或把对象写入 module.yml.rules 数组。
|
|
5
5
|
id: example-first-turn-anchor
|
|
6
6
|
name: 示例:首句锚点
|
|
7
7
|
enabled: false
|
|
8
8
|
layer: pre-step
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
then:
|
|
10
|
+
- id: inject
|
|
11
|
+
kind: inject-text
|
|
12
|
+
config:
|
|
13
|
+
id: example-first-turn-anchor
|
|
14
|
+
layer: pre-step
|
|
15
|
+
strategy: first-turn-anchor
|
|
16
|
+
position: after-user
|
|
17
|
+
dedupe: session
|
|
18
|
+
configKind: ordered
|
|
19
|
+
order: 0
|
|
20
|
+
role: user
|
|
21
|
+
mergeMode: separate
|
|
22
|
+
sourceKind: ''
|
|
23
|
+
form: notice
|
|
24
|
+
params:
|
|
25
|
+
useCustom: false
|
|
26
|
+
text: "" # 自定义锚文本(useCustom=true 时固定注入)
|
|
27
|
+
buildPattern: "" # 构建任务正则;留空 = 该分类不生效
|
|
28
|
+
complexPattern: "" # 复杂任务正则;留空 = 该分类不生效
|
|
29
|
+
firstTurnBuild: "" # 构建任务锚句(留空 = 不注入该类别锚句)
|
|
30
|
+
firstTurnInspect: "" # 排查任务锚句(留空 = 不注入该类别锚句)
|
|
31
|
+
firstTurnDeep: "" # 复杂设计锚句(留空 = 不注入该类别锚句)
|
|
@@ -1,25 +1,40 @@
|
|
|
1
|
+
# 复杂任务判定 fallback 复用锚定卡的 complexPattern;长度判定仅使用显式 complexMinChars;未设置时不按长度分类
|
|
2
|
+
# 简单任务自动引导句(留空 = 不注入该类别引导)
|
|
3
|
+
# 复杂任务自动引导句(留空 = 不注入该类别引导)
|
|
4
|
+
|
|
1
5
|
# 模板:每轮引导(strategy=guide-auto)
|
|
2
6
|
# 晋升后每轮用户消息后按复杂度注入弱/深度引导;modelScope=flash 表示仅 flash 模型会话注入。
|
|
3
|
-
#
|
|
4
|
-
# 提示:把本文件放入
|
|
7
|
+
# 纯净模板:参数全部留空,由用户自定义;引导句由模板或用户配置提供,留空不注入。
|
|
8
|
+
# 提示:把本文件放入 模块规则模板目录,或把对象写入 module.yml.rules 数组。
|
|
5
9
|
id: example-guide-auto
|
|
6
10
|
name: 示例:每轮引导
|
|
7
11
|
enabled: false
|
|
8
12
|
layer: pre-step
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
if:
|
|
14
|
+
all:
|
|
15
|
+
- scope:
|
|
16
|
+
modelScope: flash
|
|
17
|
+
- phase:
|
|
18
|
+
promoted: true
|
|
19
|
+
includeSubagents: false
|
|
20
|
+
then:
|
|
21
|
+
- id: inject
|
|
22
|
+
kind: inject-text
|
|
23
|
+
config:
|
|
24
|
+
id: example-guide-auto
|
|
25
|
+
layer: pre-step
|
|
26
|
+
strategy: guide-auto
|
|
27
|
+
position: after-user
|
|
28
|
+
dedupe: batch
|
|
29
|
+
configKind: ordered
|
|
30
|
+
order: 10
|
|
31
|
+
role: user
|
|
32
|
+
mergeMode: separate
|
|
33
|
+
sourceKind: ''
|
|
34
|
+
form: notice
|
|
35
|
+
params:
|
|
36
|
+
useCustom: false
|
|
37
|
+
text: ""
|
|
38
|
+
guideWeak: ""
|
|
39
|
+
guideDeep: ""
|
|
40
|
+
complexMinChars: 120
|
|
@@ -2,22 +2,34 @@
|
|
|
2
2
|
# 首轮推理命中锚定确认词后注入一次;未命中最多两轮兜底。确认词集合 anchorWords 由
|
|
3
3
|
# writePreset 从锚句自动派生(firstTurnWord 空时);显式 firstTurnWord 覆盖派生。
|
|
4
4
|
# 两者都为空 = 不做词确认,只走未命中兜底注入(引擎不内置确认词)。
|
|
5
|
-
# 提示:把本文件放入
|
|
5
|
+
# 提示:把本文件放入 模块规则模板目录,或把对象写入 module.yml.rules 数组。
|
|
6
6
|
id: example-custom-fallback
|
|
7
7
|
name: 示例:自定义锚词兜底注入
|
|
8
8
|
enabled: false
|
|
9
9
|
layer: pre-step
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
if:
|
|
11
|
+
all:
|
|
12
|
+
- phase:
|
|
13
|
+
promoted: true
|
|
14
|
+
includeSubagents: false
|
|
15
|
+
- anchor:
|
|
16
|
+
keys: []
|
|
17
|
+
fallbackAfter: 1
|
|
18
|
+
then:
|
|
19
|
+
- id: inject
|
|
20
|
+
kind: inject-text
|
|
21
|
+
config:
|
|
22
|
+
id: example-custom-fallback
|
|
23
|
+
layer: pre-step
|
|
24
|
+
strategy: anchor-notice
|
|
25
|
+
position: before-all
|
|
26
|
+
dedupe: session
|
|
27
|
+
configKind: ordered
|
|
28
|
+
order: 20
|
|
29
|
+
role: user
|
|
30
|
+
mergeMode: separate
|
|
31
|
+
sourceKind: plugin
|
|
32
|
+
form: notice
|
|
33
|
+
params:
|
|
34
|
+
text: "" # 注入文本(如 preset.md 内容);留空 = 不注入
|
|
35
|
+
firstTurnWord: "" # 锚定确认词(显式覆盖;空 = 自动派生)
|
|
@@ -6,17 +6,26 @@
|
|
|
6
6
|
# 可用 text 模板 + {{变量}} 完全自定义。
|
|
7
7
|
id: example-placeholder
|
|
8
8
|
layer: pre-step
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
if:
|
|
10
|
+
phase:
|
|
11
|
+
promoted: true
|
|
12
|
+
includeSubagents: true
|
|
13
|
+
then:
|
|
14
|
+
- id: inject
|
|
15
|
+
kind: inject-text
|
|
16
|
+
config:
|
|
17
|
+
id: example-placeholder
|
|
18
|
+
layer: pre-step
|
|
19
|
+
strategy: placeholder
|
|
20
|
+
fill: env-facts
|
|
21
|
+
position: after-all
|
|
22
|
+
dedupe: session
|
|
23
|
+
text: |
|
|
24
|
+
|
|
25
|
+
params:
|
|
26
|
+
envKeys: DSH_HOME,DSH_WORKSPACE # 环境变量白名单(逗号分隔);留空 = 只输出 CWD/WORKSPACE
|
|
27
|
+
limit: 20 # skill-catalog:条目数上限
|
|
28
|
+
fields: name,description # skill-catalog:输出字段
|
|
29
|
+
providers: '' # skill-catalog:提供方过滤
|
|
30
|
+
emptyBehavior: skip # skill-catalog:空结果行为
|
|
31
|
+
emptyText: 当前没有可用技能。 # skill-catalog:emptyBehavior=text 时的提示;留空 = 不注入
|
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
# 人设用法:params.sectionName = deployment:persona-prefix(第一方指导之前)或
|
|
4
4
|
# deployment:persona-suffix(第一方指导之后)时注册为人设段
|
|
5
5
|
# (同名 shadow 全局 persona,模块列表显示「人设」徽标;子代理经 scope 链继承)。
|
|
6
|
-
# - complete: true
|
|
6
|
+
# - complete: true 让本段成为唯一的 system prompt 段(身份注入、人设后缀、工具指南等
|
|
7
|
+
# 其余 system 段全部被抑制;工具链、运行时上下文与变量仍保留)。同一模块只能有一个,
|
|
8
|
+
# 且与顶层人设的「独占」互斥:写盘前由 bridge 拒绝(400),装配前另有一道兜底校验,
|
|
9
|
+
# 手改 YAML / 还原备份 / 导入包同样会被挡住。UI 不做自动收敛,需手动关闭其一。
|
|
7
10
|
# - suppressRuntimeContext: true 抑制动态运行时快照(等价官方 includeRuntimeContext:false)
|
|
8
11
|
id: example-system-section
|
|
9
12
|
name: 示例:system 静态段
|
|
10
13
|
layer: system-section
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
then:
|
|
15
|
+
- id: inject
|
|
16
|
+
kind: inject-text
|
|
17
|
+
config:
|
|
18
|
+
id: example-system-section
|
|
19
|
+
layer: system-section
|
|
20
|
+
strategy: static
|
|
21
|
+
order: -50
|
|
22
|
+
mergeMode: merged
|
|
23
|
+
text: |
|
|
24
|
+
|
|
25
|
+
variables: {}
|
|
26
|
+
params:
|
|
27
|
+
complete: false
|
|
28
|
+
suppressRuntimeContext: false
|
|
29
|
+
sectionName: ''
|
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
# 支持 placeholder 的层级)。
|
|
5
5
|
id: example-runtime-context
|
|
6
6
|
layer: runtime-context
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
then:
|
|
8
|
+
- id: inject
|
|
9
|
+
kind: inject-text
|
|
10
|
+
config:
|
|
11
|
+
id: example-runtime-context
|
|
12
|
+
layer: runtime-context
|
|
13
|
+
strategy: static
|
|
14
|
+
order: 5
|
|
15
|
+
mergeMode: merged
|
|
16
|
+
text: |
|
|
17
|
+
|
|
18
|
+
params:
|
|
19
|
+
contextName: ''
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# 模板:agent-request 调用配置修改(LlmCallConfig 浅合并 / 整体替换)
|
|
2
2
|
id: example-agent-request
|
|
3
3
|
layer: agent-request
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
if:
|
|
5
|
+
scope:
|
|
6
|
+
modelScope: flash
|
|
7
|
+
then:
|
|
8
|
+
- id: request
|
|
9
|
+
kind: request-params
|
|
10
|
+
patch:
|
|
11
|
+
maxTokens: 4096
|
|
12
|
+
temperature: 0.3
|
|
13
|
+
replace: false
|
|
14
|
+
modelScope: all
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# 模板:llm-stream 模型流包装(pass 透传 / replace 用 text 替代整个流)
|
|
2
2
|
id: example-llm-stream
|
|
3
3
|
layer: llm-stream
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
if:
|
|
5
|
+
scope:
|
|
6
|
+
modelScope: flash
|
|
7
|
+
then:
|
|
8
|
+
- id: inject
|
|
9
|
+
kind: inject-text
|
|
10
|
+
config:
|
|
11
|
+
id: example-llm-stream
|
|
12
|
+
layer: llm-stream
|
|
13
|
+
strategy: static
|
|
14
|
+
order: 0
|
|
15
|
+
text: "" # mode=replace 时替代整个模型流的文本
|
|
16
|
+
params:
|
|
17
|
+
mode: pass
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
# postAction=replace/block 时使用的文本
|
|
2
|
+
|
|
1
3
|
# 模板:tool-pipeline 工具行为策略(对已注册工具的 pre/post 改写;
|
|
2
4
|
# 自定义工具定义见工具管理区块——tool-pipeline 层筛选可见)。
|
|
3
5
|
id: example-tool-pipeline
|
|
4
6
|
layer: tool-pipeline
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
then:
|
|
8
|
+
- id: before
|
|
9
|
+
kind: decision
|
|
10
|
+
phase: pre
|
|
11
|
+
decision: allow
|
|
12
|
+
toolNames: bash,run_code
|
|
13
|
+
reason: 该工具被提示词配置禁用
|
|
14
|
+
- id: after
|
|
15
|
+
kind: decision
|
|
16
|
+
phase: post
|
|
17
|
+
action: accept
|
|
18
|
+
toolNames: bash,run_code
|
|
19
|
+
text: ""
|
|
@@ -4,15 +4,22 @@
|
|
|
4
4
|
id: example-turn-stop
|
|
5
5
|
name: 未完成时强制续跑
|
|
6
6
|
layer: turn-stop
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
if:
|
|
8
|
+
text:
|
|
9
|
+
keys:
|
|
10
|
+
- 接下来我会
|
|
11
|
+
- 稍后继续
|
|
12
|
+
- 待办如下
|
|
13
|
+
subject: assistantText
|
|
14
|
+
then:
|
|
15
|
+
- id: inject
|
|
16
|
+
kind: inject-text
|
|
17
|
+
config:
|
|
18
|
+
id: example-turn-stop
|
|
19
|
+
layer: turn-stop
|
|
20
|
+
strategy: static
|
|
21
|
+
order: 0
|
|
22
|
+
text: |-
|
|
23
|
+
上一轮还没有给出完整交付。请继续把当前任务做完:不要停在中途,
|
|
24
|
+
也不要用「接下来我会…」的计划代替实际执行。
|
|
25
|
+
params: {}
|