dsh-plugin-prompt-tool 0.6.2 → 0.7.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 +11 -9
- package/engine/anchor-match.mjs +38 -12
- package/engine/anchor-turn.mjs +68 -0
- package/engine/classify-task.mjs +35 -0
- package/engine/code-presentation.mjs +103 -0
- package/engine/compositions/library/anchor-turn.yml +10 -0
- package/engine/compositions/library/bootstrap-filesystem.yml +1 -1
- package/engine/compositions/library/code-presentation.yml +8 -0
- package/engine/compositions/library/command-goal.yml +11 -0
- package/engine/compositions/library/compaction.yml +1 -1
- package/engine/compositions/library/context-gate.yml +1 -2
- package/engine/compositions/library/cot-drip.yml +11 -0
- package/engine/compositions/library/custom-bash.yml +1 -1
- package/engine/compositions/library/delegation.yml +11 -7
- package/engine/compositions/library/deliberation-gate.yml +11 -0
- package/engine/compositions/library/persistent-shell.yml +25 -2
- package/engine/compositions/library/persona.yml +6 -2
- package/engine/compositions/library/planning.yml +1 -1
- package/engine/compositions/library/prompt-config-engine.yml +1 -1
- package/engine/compositions/library/run-code-env.yml +1 -1
- package/engine/compositions/library/skill-filesystem.yml +1 -1
- package/engine/compositions/library/skill-search.yml +1 -1
- package/engine/compositions/library/str-replace-editor.yml +2 -2
- package/engine/compositions/library/tool-ask-user.yml +1 -1
- package/engine/compositions/library/tool-bash.yml +1 -1
- package/engine/compositions/library/tool-bootstrap.yml +1 -3
- package/engine/compositions/library/tool-config-engine.yml +9 -0
- package/engine/compositions/library/tool-filter.yml +3 -7
- 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 -9
- package/engine/compositions/library/tool-jobs.yml +1 -1
- package/engine/compositions/library/tool-pwsh.yml +1 -1
- package/engine/compositions/library/tool-todo.yml +1 -1
- package/engine/compositions/library/tool-web.yml +2 -2
- package/engine/compositions/source/local/code-presentation.yml +8 -0
- package/engine/compositions/source/local/context-gate.yml +0 -1
- package/engine/compositions/source/local/str-replace-editor.yml +10 -0
- package/engine/compositions/source/local/tool-bootstrap.yml +1 -3
- package/engine/compositions/source/local/tool-config-engine.yml +9 -0
- package/engine/compositions/source/local/tool-filter.yml +8 -0
- package/engine/cot-drip.mjs +137 -0
- package/engine/custom-bash.mjs +73 -21
- package/engine/deliberation-gate.mjs +127 -0
- package/engine/layers.mjs +223 -198
- package/engine/run-code-env.mjs +8 -2
- package/engine/schema.mjs +1 -1
- package/engine/strategies.mjs +25 -14
- package/engine/tool-bootstrap.mjs +185 -59
- package/engine/tool-config-engine.mjs +390 -0
- package/lib/client.js +3840 -2311
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +185 -79
- package/lib/index.mjs +1000 -356
- package/lib/preset-core.d.mts +1 -1
- package/lib/preset-core.mjs +29 -3
- package/lib/{prompt-configs-BgFw_bFf.mjs → prompt-configs-BnQKRHVb.mjs} +211 -136
- package/lib/prompt-configs-CN0sJTUL.d.mts +193 -0
- package/package.json +121 -105
- package/preset/anchored/preset.yml +262 -308
- package/preset/creative/preset.yml +34 -32
- package/preset/custom/preset.yml +0 -1
- package/preset/liangshen/preset.yml +53 -50
- package/preset/minimal/preset.yml +18 -17
- package/preset/ptc/preset.yml +35 -33
- package/preset/standard/preset.yml +34 -32
- package/templates/10-pre-step.yml +18 -15
- package/templates/14-first-turn-anchor.yml +13 -13
- package/templates/15-guide-auto.yml +13 -13
- package/templates/16-custom-fallback.yml +19 -18
- package/templates/18-placeholder-env-facts.yml +13 -2
- package/templates/30-runtime-context.yml +3 -0
- package/templates/40-agent-request.yml +9 -9
- package/templates/60-tool-pipeline.yml +9 -8
- package/templates/tools/10-shell-command.yml +20 -0
- package/templates/tools/20-http-fetch.yml +24 -0
- package/templates/tools/30-fs-read.yml +20 -0
- package/templates/tools/40-delegate-character.yml +15 -0
- package/templates/tools/50-delegate-worldbook.yml +15 -0
- package/templates/tools/60-delegate-session-var.yml +15 -0
- package/templates/tools/70-delegate-worldbook-upsert.yml +36 -0
- package/lib/prompt-configs-B4vH09wx.d.mts +0 -100
- package/templates/11-merged-a.yml +0 -11
- package/templates/13-anchor.yml +0 -19
- package/templates/17-instruction-hint.yml +0 -23
- package/templates/19-placeholder-skill-catalog.yml +0 -19
- package/templates/31-runtime-context-placeholder.yml +0 -18
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
id: creative
|
|
2
|
-
name: 创造模式
|
|
3
|
-
description: 用于创建自定义 Agent preset:具备标准模式的全部能力,并提供运行时检查、插件实验和 preset 创作指导。
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
engineCompat: ">=0.4.2"
|
|
1
|
+
id: creative
|
|
2
|
+
name: 创造模式
|
|
3
|
+
description: 用于创建自定义 Agent preset:具备标准模式的全部能力,并提供运行时检查、插件实验和 preset 创作指导。
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
engineCompat: ">=0.4.2"
|
|
6
6
|
modules:
|
|
7
7
|
- official-agent-instructions
|
|
8
|
-
- official-tool-bash
|
|
9
|
-
- tool-pwsh
|
|
10
|
-
- tool-fs
|
|
11
|
-
- tool-fs-search
|
|
12
|
-
- tool-jobs
|
|
13
|
-
- official-skill-filesystem-cordis
|
|
14
|
-
- official-tool-skill
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- tool-
|
|
21
|
-
- tool-
|
|
8
|
+
- official-tool-bash
|
|
9
|
+
- tool-pwsh
|
|
10
|
+
- tool-fs
|
|
11
|
+
- tool-fs-search
|
|
12
|
+
- tool-jobs
|
|
13
|
+
- official-skill-filesystem-cordis
|
|
14
|
+
- official-tool-skill
|
|
15
|
+
- command-goal
|
|
16
|
+
- tool-goal
|
|
17
|
+
- planning
|
|
18
|
+
- compaction
|
|
19
|
+
- delegation
|
|
20
|
+
- tool-ask-user
|
|
21
|
+
- tool-todo
|
|
22
|
+
- tool-web
|
|
22
23
|
- official-tool-cordis
|
|
23
24
|
- context-gate
|
|
24
25
|
- tool-bootstrap
|
|
26
|
+
- code-presentation
|
|
25
27
|
- prompt-config-engine
|
|
26
|
-
- run-code-env
|
|
28
|
+
- run-code-env
|
|
27
29
|
- custom-bash
|
|
28
30
|
- skill-search
|
|
31
|
+
model:
|
|
32
|
+
provider: ""
|
|
33
|
+
name: ""
|
|
34
|
+
reasoningEffort: ""
|
|
35
|
+
temperature: ""
|
|
36
|
+
maxTokens: ""
|
|
37
|
+
subagentModel:
|
|
38
|
+
provider: ""
|
|
39
|
+
name: ""
|
|
40
|
+
reasoningEffort: ""
|
|
41
|
+
temperature: ""
|
|
42
|
+
maxTokens: ""
|
|
29
43
|
params:
|
|
30
44
|
usePtcMode: false
|
|
31
45
|
bootstrapMaxTokens: 0
|
|
32
46
|
allowKinds: "[skill-invocation, near-anchor, router-guide]"
|
|
33
|
-
# 模型路由与委派 · 主对话与子代理通用(缺省 = 官方默认 / 继承宿主)
|
|
34
|
-
modelProvider: ""
|
|
35
|
-
modelName: ""
|
|
36
|
-
subagentModelProvider: ""
|
|
37
|
-
subagentModelName: ""
|
|
38
|
-
modelReasoningEffort: ""
|
|
39
|
-
modelTemperature: ""
|
|
40
|
-
modelMaxTokens: ""
|
|
41
|
-
subagentReasoningEffort: ""
|
|
42
|
-
subagentTemperature: ""
|
|
43
|
-
subagentMaxTokens: ""
|
|
44
|
-
subagentPersona: ""
|
|
45
47
|
toolFilterAllow: []
|
|
46
48
|
toolFilterDeny: []
|
|
47
49
|
maxDepth: ""
|
package/preset/custom/preset.yml
CHANGED
|
@@ -1,65 +1,68 @@
|
|
|
1
|
-
# liangshen(梁神模式)—— 官方 dsh-web-ui @linxin666/dsh-liangshen 预设的
|
|
2
|
-
# 本插件单文件化拆解:两阶段锚定(首轮 Minimal 双工具 + promoteGate 门控晋升)
|
|
3
|
-
# + PTC 单 run_code 呈现 + 晋升后延迟注入(deferredSources)+ instruction-hint 转换。
|
|
4
|
-
# 全部机制已参数化到引擎模块(tool-bootstrap / context-gate),无本地 .mjs。
|
|
5
|
-
id: liangshen
|
|
6
|
-
name: 梁神模式
|
|
7
|
-
version: 1.0.0
|
|
8
|
-
engineCompat: ">=0.4.2"
|
|
9
|
-
meta:
|
|
10
|
-
name: liangshen
|
|
11
|
-
description: 梁神模式:首轮 Minimal 双工具锚定 + promoteGate 门控晋升 + PTC 单 run_code 呈现。
|
|
12
|
-
order: 4
|
|
1
|
+
# liangshen(梁神模式)—— 官方 dsh-web-ui @linxin666/dsh-liangshen 预设的
|
|
2
|
+
# 本插件单文件化拆解:两阶段锚定(首轮 Minimal 双工具 + promoteGate 门控晋升)
|
|
3
|
+
# + PTC 单 run_code 呈现 + 晋升后延迟注入(deferredSources)+ instruction-hint 转换。
|
|
4
|
+
# 全部机制已参数化到引擎模块(tool-bootstrap / context-gate / code-presentation),无本地 .mjs。
|
|
5
|
+
id: liangshen
|
|
6
|
+
name: 梁神模式
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
engineCompat: ">=0.4.2"
|
|
9
|
+
meta:
|
|
10
|
+
name: liangshen
|
|
11
|
+
description: 梁神模式:首轮 Minimal 双工具锚定 + promoteGate 门控晋升 + PTC 单 run_code 呈现。
|
|
12
|
+
order: 4
|
|
13
13
|
modules:
|
|
14
14
|
- context-gate
|
|
15
15
|
- tool-bootstrap
|
|
16
|
+
- code-presentation
|
|
17
|
+
- prompt-config-engine
|
|
16
18
|
- official-agent-instructions
|
|
17
|
-
- persistent-shell
|
|
18
|
-
- custom-bash
|
|
19
|
-
- str-replace-editor
|
|
20
|
-
- tool-fs
|
|
21
|
-
- tool-fs-search
|
|
22
|
-
- tool-jobs
|
|
23
|
-
- skill-filesystem
|
|
24
|
-
- official-tool-skill
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
19
|
+
- persistent-shell
|
|
20
|
+
- custom-bash
|
|
21
|
+
- str-replace-editor
|
|
22
|
+
- tool-fs
|
|
23
|
+
- tool-fs-search
|
|
24
|
+
- tool-jobs
|
|
25
|
+
- skill-filesystem
|
|
26
|
+
- official-tool-skill
|
|
27
|
+
- command-goal
|
|
28
|
+
- tool-goal
|
|
29
|
+
- planning
|
|
30
|
+
- compaction
|
|
31
|
+
- delegation
|
|
29
32
|
- tool-ask-user
|
|
30
33
|
- tool-todo
|
|
31
34
|
- tool-web
|
|
32
35
|
moduleConfigs:
|
|
33
36
|
tool-bootstrap:
|
|
34
|
-
bootstrapTools: [bash, str_replace_editor]
|
|
35
|
-
includeSubagents: true
|
|
36
|
-
promoteGate: true
|
|
37
|
-
maxPromoteSteps: 4
|
|
38
|
-
promoteAfterFirstResponse: true
|
|
39
|
-
bootstrapMaxTokens: 1024
|
|
40
|
-
compactionTools: [read, write, edit, glob, grep, todo_write, ask_user_question]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
bootstrapTools: [bash, str_replace_editor]
|
|
38
|
+
includeSubagents: true
|
|
39
|
+
promoteGate: true
|
|
40
|
+
maxPromoteSteps: 4
|
|
41
|
+
promoteAfterFirstResponse: true
|
|
42
|
+
bootstrapMaxTokens: 1024
|
|
43
|
+
compactionTools: [read, write, edit, glob, grep, todo_write, ask_user_question]
|
|
44
|
+
personaSectionsOnly: true
|
|
45
|
+
workspaceLine: true
|
|
46
|
+
code-presentation:
|
|
47
|
+
usePtcMode: true
|
|
48
|
+
context-gate:
|
|
49
|
+
messageSources: [user, goal]
|
|
50
|
+
includeSubagents: true
|
|
51
|
+
deferredSources: [agent-instructions, skill-catalog]
|
|
47
52
|
deferredGraceSteps: 1
|
|
48
53
|
instructionHint: true
|
|
49
54
|
params:
|
|
50
55
|
promptConfigs:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
position: before-all
|
|
62
|
-
dedupe: session
|
|
56
|
+
- id: prompt-injector
|
|
57
|
+
name: preset.md 注入
|
|
58
|
+
enabled: true
|
|
59
|
+
strategy: custom-fallback
|
|
60
|
+
layer: pre-step
|
|
61
|
+
configKind: ordered
|
|
62
|
+
order: 20
|
|
63
|
+
role: user
|
|
64
|
+
position: before-all
|
|
65
|
+
dedupe: session
|
|
63
66
|
promotion: main
|
|
64
67
|
sourceKind: plugin
|
|
65
68
|
- id: persona-main
|
|
@@ -69,4 +72,4 @@ promptConfigs:
|
|
|
69
72
|
order: 0
|
|
70
73
|
params:
|
|
71
74
|
sectionName: deployment:persona
|
|
72
|
-
text: "You are a helpful
|
|
75
|
+
text: "You are a helpful software engineer assistant."
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
id: minimal
|
|
2
|
-
name: 极简模式
|
|
3
|
-
description: 仅提供持久 bash 与 str_replace_editor 的双工具编码 Agent。
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
engineCompat: ">=0.4.2"
|
|
1
|
+
id: minimal
|
|
2
|
+
name: 极简模式
|
|
3
|
+
description: 仅提供持久 bash 与 str_replace_editor 的双工具编码 Agent。
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
engineCompat: ">=0.4.2"
|
|
6
6
|
modules:
|
|
7
7
|
- official-persistent-shell
|
|
8
8
|
- bootstrap-filesystem
|
|
9
9
|
- context-gate
|
|
10
10
|
- tool-bootstrap
|
|
11
|
+
- code-presentation
|
|
11
12
|
- prompt-config-engine
|
|
12
13
|
- run-code-env
|
|
13
14
|
- custom-bash
|
|
14
15
|
- skill-search
|
|
16
|
+
model:
|
|
17
|
+
provider: ""
|
|
18
|
+
name: ""
|
|
19
|
+
reasoningEffort: ""
|
|
20
|
+
temperature: ""
|
|
21
|
+
maxTokens: ""
|
|
22
|
+
subagentModel:
|
|
23
|
+
provider: ""
|
|
24
|
+
name: ""
|
|
25
|
+
reasoningEffort: ""
|
|
26
|
+
temperature: ""
|
|
27
|
+
maxTokens: ""
|
|
15
28
|
params:
|
|
16
29
|
usePtcMode: true
|
|
17
30
|
bootstrapMaxTokens: 0
|
|
18
31
|
allowKinds: "[skill-invocation, near-anchor, router-guide]"
|
|
19
|
-
# 模型路由与委派 · 主对话与子代理通用(缺省 = 官方默认 / 继承宿主)
|
|
20
|
-
modelProvider: ""
|
|
21
|
-
modelName: ""
|
|
22
|
-
subagentModelProvider: ""
|
|
23
|
-
subagentModelName: ""
|
|
24
|
-
modelReasoningEffort: ""
|
|
25
|
-
modelTemperature: ""
|
|
26
|
-
modelMaxTokens: ""
|
|
27
|
-
subagentReasoningEffort: ""
|
|
28
|
-
subagentTemperature: ""
|
|
29
|
-
subagentMaxTokens: ""
|
|
30
|
-
subagentPersona: ""
|
|
31
32
|
toolFilterAllow: []
|
|
32
33
|
toolFilterDeny: []
|
|
33
34
|
maxDepth: ""
|
package/preset/ptc/preset.yml
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
id: ptc
|
|
2
|
-
name: PTC 模式
|
|
3
|
-
description: 具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
engineCompat: ">=0.4.2"
|
|
1
|
+
id: ptc
|
|
2
|
+
name: PTC 模式
|
|
3
|
+
description: 具备标准模式的全部能力,并通过 Code Mode SDK 呈现工具,让模型用一个 TypeScript 程序组合多步操作。
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
engineCompat: ">=0.4.2"
|
|
6
6
|
modules:
|
|
7
7
|
- official-agent-instructions
|
|
8
|
-
- official-tool-bash
|
|
9
|
-
- tool-pwsh
|
|
10
|
-
- tool-fs
|
|
11
|
-
- tool-fs-search
|
|
12
|
-
- tool-jobs
|
|
13
|
-
- skill-filesystem
|
|
14
|
-
- official-tool-skill
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- tool-
|
|
21
|
-
- tool-
|
|
22
|
-
-
|
|
8
|
+
- official-tool-bash
|
|
9
|
+
- tool-pwsh
|
|
10
|
+
- tool-fs
|
|
11
|
+
- tool-fs-search
|
|
12
|
+
- tool-jobs
|
|
13
|
+
- skill-filesystem
|
|
14
|
+
- official-tool-skill
|
|
15
|
+
- command-goal
|
|
16
|
+
- tool-goal
|
|
17
|
+
- planning
|
|
18
|
+
- compaction
|
|
19
|
+
- delegation
|
|
20
|
+
- tool-ask-user
|
|
21
|
+
- tool-todo
|
|
22
|
+
- tool-web
|
|
23
|
+
- official-tool-presentation
|
|
23
24
|
- context-gate
|
|
24
25
|
- tool-bootstrap
|
|
26
|
+
- code-presentation
|
|
25
27
|
- prompt-config-engine
|
|
26
|
-
- run-code-env
|
|
28
|
+
- run-code-env
|
|
27
29
|
- custom-bash
|
|
28
30
|
- skill-search
|
|
31
|
+
model:
|
|
32
|
+
provider: ""
|
|
33
|
+
name: ""
|
|
34
|
+
reasoningEffort: ""
|
|
35
|
+
temperature: ""
|
|
36
|
+
maxTokens: ""
|
|
37
|
+
subagentModel:
|
|
38
|
+
provider: ""
|
|
39
|
+
name: ""
|
|
40
|
+
reasoningEffort: ""
|
|
41
|
+
temperature: ""
|
|
42
|
+
maxTokens: ""
|
|
29
43
|
params:
|
|
30
44
|
usePtcMode: true
|
|
31
45
|
bootstrapMaxTokens: 0
|
|
32
46
|
allowKinds: "[skill-invocation, near-anchor, router-guide]"
|
|
33
|
-
# 模型路由与委派 · 主对话与子代理通用(缺省 = 官方默认 / 继承宿主)
|
|
34
|
-
modelProvider: ""
|
|
35
|
-
modelName: ""
|
|
36
|
-
subagentModelProvider: ""
|
|
37
|
-
subagentModelName: ""
|
|
38
|
-
modelReasoningEffort: ""
|
|
39
|
-
modelTemperature: ""
|
|
40
|
-
modelMaxTokens: ""
|
|
41
|
-
subagentReasoningEffort: ""
|
|
42
|
-
subagentTemperature: ""
|
|
43
|
-
subagentMaxTokens: ""
|
|
44
|
-
subagentPersona: ""
|
|
45
47
|
toolFilterAllow: []
|
|
46
48
|
toolFilterDeny: []
|
|
47
49
|
maxDepth: ""
|
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
id: standard
|
|
2
|
-
name: 标准模式
|
|
3
|
-
description: 功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
engineCompat: ">=0.4.2"
|
|
1
|
+
id: standard
|
|
2
|
+
name: 标准模式
|
|
3
|
+
description: 功能完整的编码 Agent,支持文件编辑、Shell、文件与网页检索、Skills、计划、目标、子代理和工作流。
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
engineCompat: ">=0.4.2"
|
|
6
6
|
modules:
|
|
7
7
|
- official-agent-instructions
|
|
8
|
-
- official-tool-bash
|
|
9
|
-
- tool-pwsh
|
|
10
|
-
- tool-fs
|
|
11
|
-
- tool-fs-search
|
|
12
|
-
- tool-jobs
|
|
13
|
-
- skill-filesystem
|
|
14
|
-
- official-tool-skill
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- tool-
|
|
21
|
-
- tool-
|
|
8
|
+
- official-tool-bash
|
|
9
|
+
- tool-pwsh
|
|
10
|
+
- tool-fs
|
|
11
|
+
- tool-fs-search
|
|
12
|
+
- tool-jobs
|
|
13
|
+
- skill-filesystem
|
|
14
|
+
- official-tool-skill
|
|
15
|
+
- command-goal
|
|
16
|
+
- tool-goal
|
|
17
|
+
- planning
|
|
18
|
+
- compaction
|
|
19
|
+
- delegation
|
|
20
|
+
- tool-ask-user
|
|
21
|
+
- tool-todo
|
|
22
|
+
- tool-web
|
|
22
23
|
- context-gate
|
|
23
24
|
- tool-bootstrap
|
|
25
|
+
- code-presentation
|
|
24
26
|
- prompt-config-engine
|
|
25
|
-
- run-code-env
|
|
27
|
+
- run-code-env
|
|
26
28
|
- custom-bash
|
|
27
29
|
- skill-search
|
|
30
|
+
model:
|
|
31
|
+
provider: ""
|
|
32
|
+
name: ""
|
|
33
|
+
reasoningEffort: ""
|
|
34
|
+
temperature: ""
|
|
35
|
+
maxTokens: ""
|
|
36
|
+
subagentModel:
|
|
37
|
+
provider: ""
|
|
38
|
+
name: ""
|
|
39
|
+
reasoningEffort: ""
|
|
40
|
+
temperature: ""
|
|
41
|
+
maxTokens: ""
|
|
28
42
|
params:
|
|
29
43
|
usePtcMode: true
|
|
30
44
|
bootstrapMaxTokens: 0
|
|
31
45
|
allowKinds: "[skill-invocation, near-anchor, router-guide]"
|
|
32
|
-
# 模型路由与委派 · 主对话与子代理通用(缺省 = 官方默认 / 继承宿主)
|
|
33
|
-
modelProvider: ""
|
|
34
|
-
modelName: ""
|
|
35
|
-
subagentModelProvider: ""
|
|
36
|
-
subagentModelName: ""
|
|
37
|
-
modelReasoningEffort: ""
|
|
38
|
-
modelTemperature: ""
|
|
39
|
-
modelMaxTokens: ""
|
|
40
|
-
subagentReasoningEffort: ""
|
|
41
|
-
subagentTemperature: ""
|
|
42
|
-
subagentMaxTokens: ""
|
|
43
|
-
subagentPersona: ""
|
|
44
46
|
toolFilterAllow: []
|
|
45
47
|
toolFilterDeny: []
|
|
46
48
|
maxDepth: ""
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
# 模板:pre-step 消息批注入(完整通用字段示例)
|
|
2
|
+
# 本模板覆盖三种字段变体,插入后改字段即可:
|
|
3
|
+
# - mergeMode=merged + texts 多块 → 同 position 配置拼接为一条消息(原 11-merged-a)
|
|
4
|
+
# - configKind=anchor → 固定锚点序,按模块文件相对顺序排所有 ordered 之前(原 13-anchor)
|
|
2
5
|
# 接入:复制本文件到 promptConfigsDir 目录,或把对象写入 settings.promptConfigs 数组。
|
|
3
6
|
# 保存前可 POST /api/prompt-tool/settings/configs-validate 做权威校验。
|
|
4
7
|
# audience 为配置项(缺省=公用;main=仅主会话;subagent=仅子代理),模板不锁定。
|
|
5
8
|
id: example-pre-step
|
|
6
|
-
name: 示例:消息批注入
|
|
9
|
+
name: 示例:消息批注入
|
|
7
10
|
enabled: false
|
|
8
|
-
layer: pre-step
|
|
9
|
-
strategy: static
|
|
10
|
-
position: after-user
|
|
11
|
-
dedupe: session
|
|
11
|
+
layer: pre-step
|
|
12
|
+
strategy: static
|
|
13
|
+
position: after-user
|
|
14
|
+
dedupe: session
|
|
12
15
|
promotion: none
|
|
13
16
|
modelScope: all
|
|
14
|
-
configKind: ordered
|
|
15
|
-
order: 0
|
|
16
|
-
role: user
|
|
17
|
-
mergeMode: separate
|
|
18
|
-
sourceKind: ''
|
|
19
|
-
form: notice
|
|
20
|
-
summary: ''
|
|
21
|
-
identity:
|
|
22
|
-
field: plugin
|
|
23
|
-
value: example-pre-step
|
|
17
|
+
configKind: ordered
|
|
18
|
+
order: 0
|
|
19
|
+
role: user
|
|
20
|
+
mergeMode: separate
|
|
21
|
+
sourceKind: ''
|
|
22
|
+
form: notice
|
|
23
|
+
summary: ''
|
|
24
|
+
identity:
|
|
25
|
+
field: plugin
|
|
26
|
+
value: example-pre-step
|
|
24
27
|
text: |-
|
|
25
28
|
|
|
26
29
|
variables:
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
# 首条真实用户消息后按任务类型(build / inspect / deep)注入锚句,每会话一次。
|
|
3
3
|
# 纯净模板:参数全部留空,由用户自定义;默认锚句与正则见 anchored 预设 params。
|
|
4
4
|
# 提示:把本文件放入 promptConfigsDir 目录,或把对象写入 settings.promptConfigs 数组。
|
|
5
|
-
id: example-first-turn-anchor
|
|
6
|
-
name: 示例:首句锚点
|
|
5
|
+
id: example-first-turn-anchor
|
|
6
|
+
name: 示例:首句锚点
|
|
7
7
|
enabled: false
|
|
8
|
-
layer: pre-step
|
|
9
|
-
strategy: first-turn-anchor
|
|
10
|
-
position: after-user
|
|
11
|
-
dedupe: session
|
|
8
|
+
layer: pre-step
|
|
9
|
+
strategy: first-turn-anchor
|
|
10
|
+
position: after-user
|
|
11
|
+
dedupe: session
|
|
12
12
|
promotion: none
|
|
13
13
|
modelScope: all
|
|
14
|
-
configKind: ordered
|
|
15
|
-
order: 0
|
|
16
|
-
role: user
|
|
17
|
-
mergeMode: separate
|
|
18
|
-
sourceKind: ''
|
|
19
|
-
form: notice
|
|
14
|
+
configKind: ordered
|
|
15
|
+
order: 0
|
|
16
|
+
role: user
|
|
17
|
+
mergeMode: separate
|
|
18
|
+
sourceKind: ''
|
|
19
|
+
form: notice
|
|
20
20
|
params:
|
|
21
21
|
useCustom: false
|
|
22
|
-
|
|
22
|
+
text: "" # 自定义锚文本(useCustom=true 时固定注入)
|
|
23
23
|
buildPattern: "" # 构建任务正则;留空 = 该分类不生效
|
|
24
24
|
complexPattern: "" # 复杂任务正则;留空 = 该分类不生效
|
|
25
25
|
firstTurnBuild: "" # 构建任务锚句(示例见 anchored preset.yml params.firstTurnBuild)
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
# 晋升后每轮用户消息后按复杂度注入弱/深度引导;modelScope=flash 表示仅 flash 模型会话注入。
|
|
3
3
|
# 纯净模板:参数全部留空,由用户自定义;默认引导句文本见 anchored 预设 params。
|
|
4
4
|
# 提示:把本文件放入 promptConfigsDir 目录,或把对象写入 settings.promptConfigs 数组。
|
|
5
|
-
id: example-guide-auto
|
|
6
|
-
name: 示例:每轮引导
|
|
5
|
+
id: example-guide-auto
|
|
6
|
+
name: 示例:每轮引导
|
|
7
7
|
enabled: false
|
|
8
|
-
layer: pre-step
|
|
9
|
-
strategy: guide-auto
|
|
10
|
-
position: after-user
|
|
11
|
-
dedupe: batch
|
|
8
|
+
layer: pre-step
|
|
9
|
+
strategy: guide-auto
|
|
10
|
+
position: after-user
|
|
11
|
+
dedupe: batch
|
|
12
12
|
promotion: main
|
|
13
13
|
modelScope: flash
|
|
14
|
-
configKind: ordered
|
|
15
|
-
order: 10
|
|
16
|
-
role: user
|
|
17
|
-
mergeMode: separate
|
|
18
|
-
sourceKind: ''
|
|
19
|
-
form: notice
|
|
14
|
+
configKind: ordered
|
|
15
|
+
order: 10
|
|
16
|
+
role: user
|
|
17
|
+
mergeMode: separate
|
|
18
|
+
sourceKind: ''
|
|
19
|
+
form: notice
|
|
20
20
|
params:
|
|
21
21
|
useCustom: false
|
|
22
22
|
text: ""
|
|
23
|
-
|
|
23
|
+
# 复杂任务判定 fallback 复用锚定卡的 complexPattern;留空 = 仅按文本长度 120 判定深/弱
|
|
24
24
|
guideWeak: "" # 简单任务自动引导句(示例见 anchored preset.yml params.guideWeak)
|
|
25
25
|
guideDeep: "" # 复杂任务自动引导句(示例见 anchored preset.yml params.guideDeep)
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
# 模板:自定义锚词兜底注入(strategy=custom-fallback)
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# 模板:自定义锚词兜底注入(strategy=custom-fallback)
|
|
2
|
+
# 首轮推理命中锚定确认词后注入一次;未命中最多两轮兜底。确认词集合 anchorWords 由
|
|
3
|
+
# writePreset 从锚句自动派生(firstTurnWord 空时);显式 firstTurnWord 覆盖派生。
|
|
4
|
+
# 提示:把本文件放入 promptConfigsDir 目录,或把对象写入 settings.promptConfigs 数组。
|
|
5
|
+
id: example-custom-fallback
|
|
6
|
+
name: 示例:自定义锚词兜底注入
|
|
6
7
|
enabled: false
|
|
7
|
-
layer: pre-step
|
|
8
|
-
strategy: custom-fallback
|
|
9
|
-
position: before-all
|
|
10
|
-
dedupe: session
|
|
11
|
-
promotion: main
|
|
12
|
-
modelScope: all
|
|
13
|
-
configKind: ordered
|
|
14
|
-
order: 20
|
|
15
|
-
role: user
|
|
16
|
-
mergeMode: separate
|
|
17
|
-
sourceKind: plugin
|
|
18
|
-
form: notice
|
|
8
|
+
layer: pre-step
|
|
9
|
+
strategy: custom-fallback
|
|
10
|
+
position: before-all
|
|
11
|
+
dedupe: session
|
|
12
|
+
promotion: main
|
|
13
|
+
modelScope: all
|
|
14
|
+
configKind: ordered
|
|
15
|
+
order: 20
|
|
16
|
+
role: user
|
|
17
|
+
mergeMode: separate
|
|
18
|
+
sourceKind: plugin
|
|
19
|
+
form: notice
|
|
19
20
|
params:
|
|
20
21
|
text: "" # 注入文本(如 preset.md 内容);留空 = 不注入
|
|
21
|
-
firstTurnWord: "" #
|
|
22
|
+
firstTurnWord: "" # 锚定确认词(显式覆盖;空 = 自动派生)
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
# 模板:placeholder
|
|
2
|
-
#
|
|
1
|
+
# 模板:placeholder 动态填充位(fill 下拉可切换三种数据源)
|
|
2
|
+
# - env-facts(机器事实):默认输出 Environment facts 列表;envKeys 白名单
|
|
3
|
+
# - skill-catalog(技能目录):宿主 skills 服务(按 skillSwitches 过滤);limit/fields/providers
|
|
4
|
+
# - instruction-hint(指令文件提示):等价快捷写法 strategy=instruction-hint;
|
|
5
|
+
# promotion=include-subagents 子代理晋升后同样注入;sourceKind=instruction-hint + form=hint
|
|
6
|
+
# 可用 text 模板 + {{变量}} 完全自定义。
|
|
3
7
|
id: example-placeholder
|
|
4
8
|
layer: pre-step
|
|
5
9
|
strategy: placeholder
|
|
@@ -7,5 +11,12 @@ fill: env-facts
|
|
|
7
11
|
position: after-all
|
|
8
12
|
dedupe: session
|
|
9
13
|
promotion: include-subagents
|
|
14
|
+
text: |-
|
|
15
|
+
|
|
10
16
|
params:
|
|
11
17
|
envKeys: "" # 环境变量白名单(逗号分隔);留空 = 默认 DSH_HOME,DSH_WORKSPACE
|
|
18
|
+
limit: 20 # skill-catalog:条目数上限
|
|
19
|
+
fields: name,description # skill-catalog:输出字段
|
|
20
|
+
providers: '' # skill-catalog:提供方过滤
|
|
21
|
+
emptyBehavior: skip # skill-catalog:空结果行为
|
|
22
|
+
emptyText: "" # skill-catalog:emptyBehavior=text 时的提示;留空 = 空文本
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
# 模板:runtime-context 动态运行时快照(随会话变化的内容放这里,不要进 system)
|
|
2
|
+
# strategy 可切换:static(静态快照)/ placeholder(动态填充,原 31 号模板——
|
|
3
|
+
# fill=skill-catalog 时演示运行时技能目录;runtime-context 是除 pre-step 外唯一
|
|
4
|
+
# 支持 placeholder 的层级)。
|
|
2
5
|
id: example-runtime-context
|
|
3
6
|
layer: runtime-context
|
|
4
7
|
strategy: static
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# 模板:agent-request 调用配置修改(LlmCallConfig 浅合并 / 整体替换)
|
|
2
|
-
id: example-agent-request
|
|
3
|
-
layer: agent-request
|
|
4
|
-
strategy: static
|
|
1
|
+
# 模板:agent-request 调用配置修改(LlmCallConfig 浅合并 / 整体替换)
|
|
2
|
+
id: example-agent-request
|
|
3
|
+
layer: agent-request
|
|
4
|
+
strategy: static
|
|
5
5
|
modelScope: flash
|
|
6
6
|
order: 0
|
|
7
|
-
params:
|
|
8
|
-
patch:
|
|
9
|
-
maxTokens: 4096
|
|
10
|
-
temperature: 0.3
|
|
11
|
-
replace: false
|
|
7
|
+
params:
|
|
8
|
+
patch:
|
|
9
|
+
maxTokens: 4096
|
|
10
|
+
temperature: 0.3
|
|
11
|
+
replace: false
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
# 模板:tool-pipeline
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
# 模板:tool-pipeline 工具行为策略(对已注册工具的 pre/post 改写;
|
|
2
|
+
# 自定义工具定义见工具管理区块——tool-pipeline 层筛选可见)。
|
|
3
|
+
id: example-tool-pipeline
|
|
4
|
+
layer: tool-pipeline
|
|
5
|
+
strategy: static
|
|
5
6
|
order: 0
|
|
6
7
|
modelScope: all
|
|
7
8
|
text: "" # postAction=replace/block 时使用的文本
|
|
8
9
|
params:
|
|
9
|
-
toolNames: bash,run_code
|
|
10
|
-
preDecision: allow
|
|
11
|
-
denyReason: 该工具被提示词配置禁用
|
|
12
|
-
postAction: accept
|
|
10
|
+
toolNames: bash,run_code
|
|
11
|
+
preDecision: allow
|
|
12
|
+
denyReason: 该工具被提示词配置禁用
|
|
13
|
+
postAction: accept
|