dsh-extra-plan 0.0.0-stage → 1.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/LICENSE +21 -0
- package/README.md +179 -2
- package/assets/presets/extra-plan/agent.cordis.yml +580 -0
- package/assets/presets/extra-plan/preset-definition-extra-plan-executor.generated.yml +115 -0
- package/assets/presets/extra-plan/preset-definition-extra-plan-planner.generated.yml +113 -0
- package/assets/presets/extra-plan/preset-definition-extra-plan-prober.generated.yml +107 -0
- package/assets/presets/extra-plan/preset-definition-extra-plan-reviewer.generated.yml +115 -0
- package/assets/presets/extra-plan/preset-definition.generated.yml +335 -0
- package/assets/presets/extra-plan/preset.yml +2 -0
- package/cordis.patch.yml +7 -0
- package/index.js +1671 -0
- package/lib/agent-runtime.js +172 -0
- package/lib/agent-session.js +65 -0
- package/lib/assembly-presentation.js +267 -0
- package/lib/client-carrier.js +7 -0
- package/lib/client.js +314 -0
- package/lib/extra-plan-gate-tool.js +387 -0
- package/lib/gate-decisions.js +744 -0
- package/lib/gate-words.js +108 -0
- package/lib/live-config.js +293 -0
- package/lib/log-retention.js +132 -0
- package/lib/model-routing.js +648 -0
- package/lib/path-policy.js +464 -0
- package/lib/plan-draft-tool.js +294 -0
- package/lib/planner-budget.js +136 -0
- package/lib/preset-defaults.generated.js +17 -0
- package/lib/preset-settings.js +3 -0
- package/lib/preset-sync.js +809 -0
- package/lib/preset-yaml.js +438 -0
- package/lib/role-contract.js +11 -0
- package/lib/run-code-scanner.js +360 -0
- package/lib/run-code-static.js +621 -0
- package/lib/runtime-diagnostics.js +89 -0
- package/lib/runtime-lifecycle.js +162 -0
- package/lib/runtime-static.js +23 -0
- package/lib/save-contract.js +263 -0
- package/lib/save-persistence.js +223 -0
- package/lib/save-plan-markdown-parser.js +369 -0
- package/lib/save-plan-validation-diagnostics.js +49 -0
- package/lib/save-plan-validation.js +812 -0
- package/lib/save-probe-validation.js +173 -0
- package/lib/save-source-verification.js +195 -0
- package/lib/save-tool-factories.js +270 -0
- package/lib/sdk-text-cache.js +161 -0
- package/lib/settings-contract.js +191 -0
- package/lib/settings.js +369 -0
- package/lib/shell-mutation.js +484 -0
- package/lib/usage-ledger-background.js +214 -0
- package/lib/usage-ledger-worker.js +116 -0
- package/lib/usage-ledger.js +1393 -0
- package/locale/en.json +6 -0
- package/locale/settings/en.json +6 -0
- package/locale/settings/zh.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +56 -4
- package/scripts/generate-runtime-defaults.mjs +796 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# GENERATED FILE - DO NOT EDIT.
|
|
2
|
+
# Generated by scripts/generate-runtime-defaults.mjs(源:agent.cordis.yml 第二文档)。
|
|
3
|
+
# 角色预设 definition:dsh-persona 取 personaPrefix 原文,dsh-extra-plan 的行 config 由主预设同 id 行逐字复制,
|
|
4
|
+
# 其余为角色 tools 行,plugins 末尾固定追加恰一行 executor(id/name 按主 definition 的 executor 行 id 派生,无 config)。
|
|
5
|
+
# 角色人设与工具面在这里承载;主预设保留 persona,主委派 config 通过 agentPreset 引用角色,不写 persona/toolFilter/backgroundMode。
|
|
6
|
+
id: extra-plan-executor
|
|
7
|
+
name: '按需规划模式-执行者'
|
|
8
|
+
description: '执行委派任务并在完工前自验证;可写工作区,越界需求写进汇报'
|
|
9
|
+
order: 101
|
|
10
|
+
plugins:
|
|
11
|
+
- id: persona
|
|
12
|
+
name: '@deepseek-ai/dsh-persona'
|
|
13
|
+
config:
|
|
14
|
+
prefix: >-
|
|
15
|
+
你是一个执行者(executor)。专注完成主会话委派的具体任务;不重新规划整体方案,不修改未授权文件
|
|
16
|
+
|
|
17
|
+
工作方式:
|
|
18
|
+
1. 检查 prompt 是否提供执行组、任务 ID、允许修改的文件、方案文件与任务范围、验收文件与任务/检查范围。必要信息缺失或互相矛盾时,停止并汇报;不得读取整份工件自行补齐
|
|
19
|
+
2. 先按“方案文件 + 指定行号范围”读取领取任务。多个范围逐项读取,不先读取整份方案。提取每个主文件或关联文件的文件操作、修改点、修改位置、定位锚点和具体动作
|
|
20
|
+
3. 再按“验收文件 + 指定行号范围”读取对应验收任务和引用检查。验收文件只用于理解客观期望、禁止项和自检要求,不得据此新增方案外修改
|
|
21
|
+
4. 对“修改”操作,以“主文件/关联文件 + 修改位置”为定位组合,局部读取目标文件,并用定位锚点确认具体修改点。读取一律显式给出 offset 与 limit:单次不超过 200 行,同一文件累计不超过 6 次,同一段落不重复读取;需要文件整体结构时先用 grep 或 glob 取得行号,不整读文件。允许对同一文件分次续读,这是正常路径,不得据此判定信息缺失。累计达上限仍未定位时停止并汇报阻塞。位置与锚点不一致时停止并汇报源文件漂移。新建、删除或生成操作按任务声明执行
|
|
22
|
+
5. 严格按方案实施并按验收范围自检。验收清单是最低验收边界,不代表完整正确性的上限;仍须检查语法、错误路径、兼容性和意外改动。禁止为了通过验收而删改、绕过或弱化检查
|
|
23
|
+
|
|
24
|
+
汇报格式(不超过 15 行):
|
|
25
|
+
1. 完成清单——任务、文件、修改点和关键结果
|
|
26
|
+
2. 自验证结论——逐项通过/不通过,并附一行证据
|
|
27
|
+
3. 阻塞或越界需求——如有则说明原因、目标和预期内容
|
|
28
|
+
|
|
29
|
+
写工作区之外的路径必然被拒绝;不要尝试设置 sandbox_permissions。使用简体中文思考和回复
|
|
30
|
+
- id: extra-plan
|
|
31
|
+
name: 'dsh-extra-plan'
|
|
32
|
+
config:
|
|
33
|
+
anchoredBootstrap: true
|
|
34
|
+
creativeMode: false
|
|
35
|
+
webFetch: false
|
|
36
|
+
runcodeCatchGate: false
|
|
37
|
+
bootstrapPersona: '你是一位乐于助人的软件工程师助手,使用简体中文思考和回复。'
|
|
38
|
+
bootstrapShellTools: [bash, pwsh]
|
|
39
|
+
bootstrapCommonTools: [read]
|
|
40
|
+
# F 段(HP 首轮)tool:read 的手写文案(借宿主段名覆盖 text):空串/非字符串时插件用内置同文案兜底。
|
|
41
|
+
# 除代码外用中文;要点保留:工具名 read 与程序内 tools.read(...) 调用形态、file_path 必填。
|
|
42
|
+
# 参数默认值与返回形状由宿主 read 契约(dsh-tool-fs)单独承载,不写进本文案。
|
|
43
|
+
# 文案不再由官方 renderer 生成,与宿主 read 契约(dsh-tool-fs)的人工核对见 pe-test/docs/ai-宿主耦合台账.md HS26。
|
|
44
|
+
# 闸门关键词:唯一人工编辑位置(6 个字段集中于此;改后普通重启即生效,
|
|
45
|
+
# 旧词不再推进状态机)。persona 正文只引用 {{extra_plan_*}} 变量,不维护第二份词值。
|
|
46
|
+
# 校验(JS 侧只有 schema 没有默认值):单次入参整组严格——插件 apply 对本行 config 同步校验,
|
|
47
|
+
# 非法即抛错、阻止该预设被使用;非法具体条件=非对象/数组、键集合不等于 6 键、非字符串、空串、
|
|
48
|
+
# 首尾空白、含 CR/LF、6 值重复、以 (Recommended)/(Recommended)/(推荐)/(推荐)结尾。
|
|
49
|
+
# 持久值(settings 行)与 11 项普通设置同口径:属性缺失或显式对象非法都回落本资产默认并整组补齐,
|
|
50
|
+
# 旧的键随写盘删除;只有本资产自身损坏(本行缺失/本值非法)才严格失败且零写。
|
|
51
|
+
# 字段 ↔ prompt variable:routeMain=extra_plan_route_main、
|
|
52
|
+
# routeExecutor=extra_plan_route_executor、routePlan=extra_plan_route_plan、
|
|
53
|
+
# routeDisagree=extra_plan_route_disagree、purposeRefine=extra_plan_purpose_refine、
|
|
54
|
+
# purposeRedo=extra_plan_purpose_redo。
|
|
55
|
+
gateWords:
|
|
56
|
+
routeMain: '主会话执行'
|
|
57
|
+
routeExecutor: '执行者执行'
|
|
58
|
+
routePlan: '规划者分析'
|
|
59
|
+
routeDisagree: '不同意'
|
|
60
|
+
purposeRefine: '完善方案'
|
|
61
|
+
purposeRedo: '重新规划'
|
|
62
|
+
# planner 模型名:仅 planner 使用;置空=继承主会话模型;非空且主会话 provider 目录明确不含该模型时
|
|
63
|
+
# 静默降级为主会话模型(T2 判定:目录为空/取不到目录则保守沿用,目录是 advisory);
|
|
64
|
+
# provider/maxTokens 继承父会话。默认值仅在该键缺失时生效(键存在即为用户值)。
|
|
65
|
+
plannerModel: deepseek-v4-pro
|
|
66
|
+
# False 保留旧单 provider 目录流程;True 才对 planner 与非 planner child 做串行真实 OK 探针并严格验证 fallback。
|
|
67
|
+
crossProviderPlannerModel: false
|
|
68
|
+
planTool: subagent_plan
|
|
69
|
+
exploreBudget: 18
|
|
70
|
+
otherAgentModel: ''
|
|
71
|
+
# 非 planner child(executor/reviewer/probe/workflow/ralph worker)优先使用该模型;空/未匹配/真实探针失败回退主会话。
|
|
72
|
+
# 验收者模型开关:开启时验收者复用规划者模型与跨提供方解析(优先 plannerModel);
|
|
73
|
+
# 关闭时沿用其他子代理模型(otherAgentModel)。该叶值被逐字复制进四个角色 definition,故只写在此处。
|
|
74
|
+
reviewerUsesPlannerModel: false
|
|
75
|
+
savePlanDir: '.extra-plan'
|
|
76
|
+
plannerPromptSuffix: '你的深度思考部分需要以"好了,现在我以全局视角来看待这个问题"开头'
|
|
77
|
+
usageLedger:
|
|
78
|
+
enabled: true
|
|
79
|
+
# 唯一账本为 ledger-v2.archive.jsonl(仅由启动扫描覆盖式维护);ledger-v2.jsonl(active)与 .cursor.json 已废弃、不再读写。
|
|
80
|
+
path: !!js dshHomePath('usage-ledger', 'ledger-v2.archive.jsonl')
|
|
81
|
+
- id: agent-instructions
|
|
82
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
83
|
+
config:
|
|
84
|
+
maxBytes: 65536
|
|
85
|
+
- id: tool-fs
|
|
86
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
87
|
+
config:
|
|
88
|
+
readLimit: 200
|
|
89
|
+
- id: tool-fs-search
|
|
90
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
91
|
+
config:
|
|
92
|
+
sampleOverCapGlobResults: false
|
|
93
|
+
- id: tool-skill
|
|
94
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
95
|
+
- id: skill-filesystem
|
|
96
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
97
|
+
config:
|
|
98
|
+
watch: false
|
|
99
|
+
- id: tool-jobs
|
|
100
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
101
|
+
- id: tool-pwsh
|
|
102
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
103
|
+
disabled: !!js process.platform !== 'win32'
|
|
104
|
+
- id: tool-bash
|
|
105
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
106
|
+
disabled: !!js process.platform === 'win32'
|
|
107
|
+
- id: tool-web
|
|
108
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
109
|
+
config:
|
|
110
|
+
fetch: false
|
|
111
|
+
searchTimeoutMs: 60000
|
|
112
|
+
- id: tool-cordis
|
|
113
|
+
name: '@deepseek-ai/dsh-tool-cordis'
|
|
114
|
+
- id: tool-executor-native
|
|
115
|
+
name: '@deepseek-ai/dsh-tool-executor-native'
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# GENERATED FILE - DO NOT EDIT.
|
|
2
|
+
# Generated by scripts/generate-runtime-defaults.mjs(源:agent.cordis.yml 第二文档)。
|
|
3
|
+
# 角色预设 definition:dsh-persona 取 personaPrefix 原文,dsh-extra-plan 的行 config 由主预设同 id 行逐字复制,
|
|
4
|
+
# 其余为角色 tools 行,plugins 末尾固定追加恰一行 executor(id/name 按主 definition 的 executor 行 id 派生,无 config)。
|
|
5
|
+
# 角色人设与工具面在这里承载;主预设保留 persona,主委派 config 通过 agentPreset 引用角色,不写 persona/toolFilter/backgroundMode。
|
|
6
|
+
id: extra-plan-planner
|
|
7
|
+
name: '按需规划模式-规划者'
|
|
8
|
+
description: '只读探查并用 save_plan 落盘方案与验收清单,禁止执行任务或修改文件'
|
|
9
|
+
order: 102
|
|
10
|
+
plugins:
|
|
11
|
+
- id: persona
|
|
12
|
+
name: '@deepseek-ai/dsh-persona'
|
|
13
|
+
config:
|
|
14
|
+
prefix: >-
|
|
15
|
+
你是规划子代理(planner)。只读探查并用 save_plan 落盘方案与验收清单;禁止执行任务或修改文件
|
|
16
|
+
工作方式:
|
|
17
|
+
1. 先读主会话提供的线索,逐个确认线索是否对任务有帮助。并补查任务相关缺口
|
|
18
|
+
2. 遇到阻塞性关键疑问(影响方案正确性、方向性,且只有用户能回答):输出阻塞疑问
|
|
19
|
+
3. 尚有未核实项或预算耗尽时,输出「申请继续探查:<待查项> — <原因>」并停止;全部核实后调用 save_plan
|
|
20
|
+
4. 产出内容:
|
|
21
|
+
- 方案:写明目标、步骤、文件、命令、风险与回滚,并保留精确位置和数值,任务块的修改位置跨度不超过 120 行,超出拆成多个 M 点。自行核实标【已探查核实】;引用探查者证据标【探查者已核实】并写「证据:<路径>」
|
|
22
|
+
- 验收:清单每条以「[任务N]」开头,写明文件、精确期望和禁止项;不以「跑完整回归」代替针对性检查
|
|
23
|
+
- 产出的 方案、验收 不得引用其他 方案、验收 内容
|
|
24
|
+
- 如因方案内容过多导致字数超限额,允许落盘多个独立方案
|
|
25
|
+
5. 成功后在最终回复中返回两个文件路径、涉及文件数和任务数(2-3行)
|
|
26
|
+
使用简体中文思考和回复
|
|
27
|
+
- id: extra-plan
|
|
28
|
+
name: 'dsh-extra-plan'
|
|
29
|
+
config:
|
|
30
|
+
anchoredBootstrap: true
|
|
31
|
+
creativeMode: false
|
|
32
|
+
webFetch: false
|
|
33
|
+
runcodeCatchGate: false
|
|
34
|
+
bootstrapPersona: '你是一位乐于助人的软件工程师助手,使用简体中文思考和回复。'
|
|
35
|
+
bootstrapShellTools: [bash, pwsh]
|
|
36
|
+
bootstrapCommonTools: [read]
|
|
37
|
+
# F 段(HP 首轮)tool:read 的手写文案(借宿主段名覆盖 text):空串/非字符串时插件用内置同文案兜底。
|
|
38
|
+
# 除代码外用中文;要点保留:工具名 read 与程序内 tools.read(...) 调用形态、file_path 必填。
|
|
39
|
+
# 参数默认值与返回形状由宿主 read 契约(dsh-tool-fs)单独承载,不写进本文案。
|
|
40
|
+
# 文案不再由官方 renderer 生成,与宿主 read 契约(dsh-tool-fs)的人工核对见 pe-test/docs/ai-宿主耦合台账.md HS26。
|
|
41
|
+
# 闸门关键词:唯一人工编辑位置(6 个字段集中于此;改后普通重启即生效,
|
|
42
|
+
# 旧词不再推进状态机)。persona 正文只引用 {{extra_plan_*}} 变量,不维护第二份词值。
|
|
43
|
+
# 校验(JS 侧只有 schema 没有默认值):单次入参整组严格——插件 apply 对本行 config 同步校验,
|
|
44
|
+
# 非法即抛错、阻止该预设被使用;非法具体条件=非对象/数组、键集合不等于 6 键、非字符串、空串、
|
|
45
|
+
# 首尾空白、含 CR/LF、6 值重复、以 (Recommended)/(Recommended)/(推荐)/(推荐)结尾。
|
|
46
|
+
# 持久值(settings 行)与 11 项普通设置同口径:属性缺失或显式对象非法都回落本资产默认并整组补齐,
|
|
47
|
+
# 旧的键随写盘删除;只有本资产自身损坏(本行缺失/本值非法)才严格失败且零写。
|
|
48
|
+
# 字段 ↔ prompt variable:routeMain=extra_plan_route_main、
|
|
49
|
+
# routeExecutor=extra_plan_route_executor、routePlan=extra_plan_route_plan、
|
|
50
|
+
# routeDisagree=extra_plan_route_disagree、purposeRefine=extra_plan_purpose_refine、
|
|
51
|
+
# purposeRedo=extra_plan_purpose_redo。
|
|
52
|
+
gateWords:
|
|
53
|
+
routeMain: '主会话执行'
|
|
54
|
+
routeExecutor: '执行者执行'
|
|
55
|
+
routePlan: '规划者分析'
|
|
56
|
+
routeDisagree: '不同意'
|
|
57
|
+
purposeRefine: '完善方案'
|
|
58
|
+
purposeRedo: '重新规划'
|
|
59
|
+
# planner 模型名:仅 planner 使用;置空=继承主会话模型;非空且主会话 provider 目录明确不含该模型时
|
|
60
|
+
# 静默降级为主会话模型(T2 判定:目录为空/取不到目录则保守沿用,目录是 advisory);
|
|
61
|
+
# provider/maxTokens 继承父会话。默认值仅在该键缺失时生效(键存在即为用户值)。
|
|
62
|
+
plannerModel: deepseek-v4-pro
|
|
63
|
+
# False 保留旧单 provider 目录流程;True 才对 planner 与非 planner child 做串行真实 OK 探针并严格验证 fallback。
|
|
64
|
+
crossProviderPlannerModel: false
|
|
65
|
+
planTool: subagent_plan
|
|
66
|
+
exploreBudget: 18
|
|
67
|
+
otherAgentModel: ''
|
|
68
|
+
# 非 planner child(executor/reviewer/probe/workflow/ralph worker)优先使用该模型;空/未匹配/真实探针失败回退主会话。
|
|
69
|
+
# 验收者模型开关:开启时验收者复用规划者模型与跨提供方解析(优先 plannerModel);
|
|
70
|
+
# 关闭时沿用其他子代理模型(otherAgentModel)。该叶值被逐字复制进四个角色 definition,故只写在此处。
|
|
71
|
+
reviewerUsesPlannerModel: false
|
|
72
|
+
savePlanDir: '.extra-plan'
|
|
73
|
+
plannerPromptSuffix: '你的深度思考部分需要以"好了,现在我以全局视角来看待这个问题"开头'
|
|
74
|
+
usageLedger:
|
|
75
|
+
enabled: true
|
|
76
|
+
# 唯一账本为 ledger-v2.archive.jsonl(仅由启动扫描覆盖式维护);ledger-v2.jsonl(active)与 .cursor.json 已废弃、不再读写。
|
|
77
|
+
path: !!js dshHomePath('usage-ledger', 'ledger-v2.archive.jsonl')
|
|
78
|
+
- id: agent-instructions
|
|
79
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
80
|
+
config:
|
|
81
|
+
maxBytes: 65536
|
|
82
|
+
- id: tool-fs
|
|
83
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
84
|
+
config:
|
|
85
|
+
write: false
|
|
86
|
+
edit: false
|
|
87
|
+
- id: tool-fs-search
|
|
88
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
89
|
+
config:
|
|
90
|
+
sampleOverCapGlobResults: false
|
|
91
|
+
- id: tool-skill
|
|
92
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
93
|
+
- id: skill-filesystem
|
|
94
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
95
|
+
config:
|
|
96
|
+
watch: false
|
|
97
|
+
- id: tool-jobs
|
|
98
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
99
|
+
- id: tool-pwsh
|
|
100
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
101
|
+
disabled: !!js process.platform !== 'win32'
|
|
102
|
+
- id: tool-bash
|
|
103
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
104
|
+
disabled: !!js process.platform === 'win32'
|
|
105
|
+
- id: tool-web
|
|
106
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
107
|
+
config:
|
|
108
|
+
fetch: false
|
|
109
|
+
searchTimeoutMs: 60000
|
|
110
|
+
- id: tool-cordis
|
|
111
|
+
name: '@deepseek-ai/dsh-tool-cordis'
|
|
112
|
+
- id: tool-executor-native
|
|
113
|
+
name: '@deepseek-ai/dsh-tool-executor-native'
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# GENERATED FILE - DO NOT EDIT.
|
|
2
|
+
# Generated by scripts/generate-runtime-defaults.mjs(源:agent.cordis.yml 第二文档)。
|
|
3
|
+
# 角色预设 definition:dsh-persona 取 personaPrefix 原文,dsh-extra-plan 的行 config 由主预设同 id 行逐字复制,
|
|
4
|
+
# 其余为角色 tools 行,plugins 末尾固定追加恰一行 executor(id/name 按主 definition 的 executor 行 id 派生,无 config)。
|
|
5
|
+
# 角色人设与工具面在这里承载;主预设保留 persona,主委派 config 通过 agentPreset 引用角色,不写 persona/toolFilter/backgroundMode。
|
|
6
|
+
id: extra-plan-prober
|
|
7
|
+
name: '按需规划模式-探查者'
|
|
8
|
+
description: '只读探查并把证据落盘为证据报告,回主会话只给路径与摘要'
|
|
9
|
+
order: 104
|
|
10
|
+
plugins:
|
|
11
|
+
- id: persona
|
|
12
|
+
name: '@deepseek-ai/dsh-persona'
|
|
13
|
+
config:
|
|
14
|
+
prefix: >-
|
|
15
|
+
你是探查子代理(probe)。只读探查,不执行任务或修改文件
|
|
16
|
+
工作方式:
|
|
17
|
+
1. 仅检查任务相关范围;可用 read、glob、grep、web_search 和只读 shell,禁止无目的或重复扫描
|
|
18
|
+
2. 完成后调用 save_probe,必须传非空 evidence 生成证据报告;证据逐条照录已核实的路径、单行行号、数值或原文,参数格式与上限以工具说明为准
|
|
19
|
+
3. 最终仅返回证据报告路径和 2-3 行摘要
|
|
20
|
+
使用简体中文思考和回复
|
|
21
|
+
- id: extra-plan
|
|
22
|
+
name: 'dsh-extra-plan'
|
|
23
|
+
config:
|
|
24
|
+
anchoredBootstrap: true
|
|
25
|
+
creativeMode: false
|
|
26
|
+
webFetch: false
|
|
27
|
+
runcodeCatchGate: false
|
|
28
|
+
bootstrapPersona: '你是一位乐于助人的软件工程师助手,使用简体中文思考和回复。'
|
|
29
|
+
bootstrapShellTools: [bash, pwsh]
|
|
30
|
+
bootstrapCommonTools: [read]
|
|
31
|
+
# F 段(HP 首轮)tool:read 的手写文案(借宿主段名覆盖 text):空串/非字符串时插件用内置同文案兜底。
|
|
32
|
+
# 除代码外用中文;要点保留:工具名 read 与程序内 tools.read(...) 调用形态、file_path 必填。
|
|
33
|
+
# 参数默认值与返回形状由宿主 read 契约(dsh-tool-fs)单独承载,不写进本文案。
|
|
34
|
+
# 文案不再由官方 renderer 生成,与宿主 read 契约(dsh-tool-fs)的人工核对见 pe-test/docs/ai-宿主耦合台账.md HS26。
|
|
35
|
+
# 闸门关键词:唯一人工编辑位置(6 个字段集中于此;改后普通重启即生效,
|
|
36
|
+
# 旧词不再推进状态机)。persona 正文只引用 {{extra_plan_*}} 变量,不维护第二份词值。
|
|
37
|
+
# 校验(JS 侧只有 schema 没有默认值):单次入参整组严格——插件 apply 对本行 config 同步校验,
|
|
38
|
+
# 非法即抛错、阻止该预设被使用;非法具体条件=非对象/数组、键集合不等于 6 键、非字符串、空串、
|
|
39
|
+
# 首尾空白、含 CR/LF、6 值重复、以 (Recommended)/(Recommended)/(推荐)/(推荐)结尾。
|
|
40
|
+
# 持久值(settings 行)与 11 项普通设置同口径:属性缺失或显式对象非法都回落本资产默认并整组补齐,
|
|
41
|
+
# 旧的键随写盘删除;只有本资产自身损坏(本行缺失/本值非法)才严格失败且零写。
|
|
42
|
+
# 字段 ↔ prompt variable:routeMain=extra_plan_route_main、
|
|
43
|
+
# routeExecutor=extra_plan_route_executor、routePlan=extra_plan_route_plan、
|
|
44
|
+
# routeDisagree=extra_plan_route_disagree、purposeRefine=extra_plan_purpose_refine、
|
|
45
|
+
# purposeRedo=extra_plan_purpose_redo。
|
|
46
|
+
gateWords:
|
|
47
|
+
routeMain: '主会话执行'
|
|
48
|
+
routeExecutor: '执行者执行'
|
|
49
|
+
routePlan: '规划者分析'
|
|
50
|
+
routeDisagree: '不同意'
|
|
51
|
+
purposeRefine: '完善方案'
|
|
52
|
+
purposeRedo: '重新规划'
|
|
53
|
+
# planner 模型名:仅 planner 使用;置空=继承主会话模型;非空且主会话 provider 目录明确不含该模型时
|
|
54
|
+
# 静默降级为主会话模型(T2 判定:目录为空/取不到目录则保守沿用,目录是 advisory);
|
|
55
|
+
# provider/maxTokens 继承父会话。默认值仅在该键缺失时生效(键存在即为用户值)。
|
|
56
|
+
plannerModel: deepseek-v4-pro
|
|
57
|
+
# False 保留旧单 provider 目录流程;True 才对 planner 与非 planner child 做串行真实 OK 探针并严格验证 fallback。
|
|
58
|
+
crossProviderPlannerModel: false
|
|
59
|
+
planTool: subagent_plan
|
|
60
|
+
exploreBudget: 18
|
|
61
|
+
otherAgentModel: ''
|
|
62
|
+
# 非 planner child(executor/reviewer/probe/workflow/ralph worker)优先使用该模型;空/未匹配/真实探针失败回退主会话。
|
|
63
|
+
# 验收者模型开关:开启时验收者复用规划者模型与跨提供方解析(优先 plannerModel);
|
|
64
|
+
# 关闭时沿用其他子代理模型(otherAgentModel)。该叶值被逐字复制进四个角色 definition,故只写在此处。
|
|
65
|
+
reviewerUsesPlannerModel: false
|
|
66
|
+
savePlanDir: '.extra-plan'
|
|
67
|
+
plannerPromptSuffix: '你的深度思考部分需要以"好了,现在我以全局视角来看待这个问题"开头'
|
|
68
|
+
usageLedger:
|
|
69
|
+
enabled: true
|
|
70
|
+
# 唯一账本为 ledger-v2.archive.jsonl(仅由启动扫描覆盖式维护);ledger-v2.jsonl(active)与 .cursor.json 已废弃、不再读写。
|
|
71
|
+
path: !!js dshHomePath('usage-ledger', 'ledger-v2.archive.jsonl')
|
|
72
|
+
- id: agent-instructions
|
|
73
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
74
|
+
config:
|
|
75
|
+
maxBytes: 65536
|
|
76
|
+
- id: tool-fs
|
|
77
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
78
|
+
config:
|
|
79
|
+
write: false
|
|
80
|
+
edit: false
|
|
81
|
+
- id: tool-fs-search
|
|
82
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
83
|
+
config:
|
|
84
|
+
sampleOverCapGlobResults: false
|
|
85
|
+
- id: tool-skill
|
|
86
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
87
|
+
- id: skill-filesystem
|
|
88
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
89
|
+
config:
|
|
90
|
+
watch: false
|
|
91
|
+
- id: tool-jobs
|
|
92
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
93
|
+
- id: tool-pwsh
|
|
94
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
95
|
+
disabled: !!js process.platform !== 'win32'
|
|
96
|
+
- id: tool-bash
|
|
97
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
98
|
+
disabled: !!js process.platform === 'win32'
|
|
99
|
+
- id: tool-web
|
|
100
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
101
|
+
config:
|
|
102
|
+
fetch: false
|
|
103
|
+
searchTimeoutMs: 60000
|
|
104
|
+
- id: tool-cordis
|
|
105
|
+
name: '@deepseek-ai/dsh-tool-cordis'
|
|
106
|
+
- id: tool-executor-native
|
|
107
|
+
name: '@deepseek-ai/dsh-tool-executor-native'
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# GENERATED FILE - DO NOT EDIT.
|
|
2
|
+
# Generated by scripts/generate-runtime-defaults.mjs(源:agent.cordis.yml 第二文档)。
|
|
3
|
+
# 角色预设 definition:dsh-persona 取 personaPrefix 原文,dsh-extra-plan 的行 config 由主预设同 id 行逐字复制,
|
|
4
|
+
# 其余为角色 tools 行,plugins 末尾固定追加恰一行 executor(id/name 按主 definition 的 executor 行 id 派生,无 config)。
|
|
5
|
+
# 角色人设与工具面在这里承载;主预设保留 persona,主委派 config 通过 agentPreset 引用角色,不写 persona/toolFilter/backgroundMode。
|
|
6
|
+
id: extra-plan-reviewer
|
|
7
|
+
name: '按需规划模式-验收者'
|
|
8
|
+
description: '按验收文件逐条机械核对指定执行组的产出,只读不写,给出单一结论'
|
|
9
|
+
order: 103
|
|
10
|
+
plugins:
|
|
11
|
+
- id: persona
|
|
12
|
+
name: '@deepseek-ai/dsh-persona'
|
|
13
|
+
config:
|
|
14
|
+
prefix: >-
|
|
15
|
+
你是一个验收复核者(reviewer)。唯一职责是独立核对指定执行组的产出;只读不写、不规划、不代执行任务
|
|
16
|
+
|
|
17
|
+
工作方式:
|
|
18
|
+
1. 检查 prompt 是否提供执行组、任务 ID、检查 ID、验收文件与对应范围、执行者产出、证据位置和冻结状态。必要信息缺失时判为 INCOMPLETE;不得读取整份工件自行补齐
|
|
19
|
+
2. 只按“验收文件 + 指定行号范围”读取对应验收任务和引用检查。多个范围逐项读取,不读取整份验收文件
|
|
20
|
+
3. 从验收范围提取每个主文件或关联文件的文件操作、修改点、验收定位、客观期望、禁止项和正式检查
|
|
21
|
+
4. 以“主文件/关联文件 + 验收定位”为定位组合:先用 grep 定位符号、结构或文案,再用 read 局部读取必要内容;行为条件按检查和原始证据判定。不得使用修改前的修改位置,也不得读取整个目标文件
|
|
22
|
+
5. 独立复核目标文件和原始证据,不直接采信执行者的自验证。核对期望、禁止项、意外改动和证据冻结状态;只验收指定执行组,跨组冲突只记录、不裁决
|
|
23
|
+
|
|
24
|
+
输出格式(不超过 20 行):
|
|
25
|
+
- 每项输出“通过/不通过/INCOMPLETE + 一行证据”
|
|
26
|
+
- 最后一行输出“验收通过”“验收不通过:N 项问题”或“验收未完成:N 项 INCOMPLETE”。输出同时存在失败与 INCOMPLETE 时,应明确失败优先
|
|
27
|
+
|
|
28
|
+
使用简体中文思考和回复
|
|
29
|
+
- id: extra-plan
|
|
30
|
+
name: 'dsh-extra-plan'
|
|
31
|
+
config:
|
|
32
|
+
anchoredBootstrap: true
|
|
33
|
+
creativeMode: false
|
|
34
|
+
webFetch: false
|
|
35
|
+
runcodeCatchGate: false
|
|
36
|
+
bootstrapPersona: '你是一位乐于助人的软件工程师助手,使用简体中文思考和回复。'
|
|
37
|
+
bootstrapShellTools: [bash, pwsh]
|
|
38
|
+
bootstrapCommonTools: [read]
|
|
39
|
+
# F 段(HP 首轮)tool:read 的手写文案(借宿主段名覆盖 text):空串/非字符串时插件用内置同文案兜底。
|
|
40
|
+
# 除代码外用中文;要点保留:工具名 read 与程序内 tools.read(...) 调用形态、file_path 必填。
|
|
41
|
+
# 参数默认值与返回形状由宿主 read 契约(dsh-tool-fs)单独承载,不写进本文案。
|
|
42
|
+
# 文案不再由官方 renderer 生成,与宿主 read 契约(dsh-tool-fs)的人工核对见 pe-test/docs/ai-宿主耦合台账.md HS26。
|
|
43
|
+
# 闸门关键词:唯一人工编辑位置(6 个字段集中于此;改后普通重启即生效,
|
|
44
|
+
# 旧词不再推进状态机)。persona 正文只引用 {{extra_plan_*}} 变量,不维护第二份词值。
|
|
45
|
+
# 校验(JS 侧只有 schema 没有默认值):单次入参整组严格——插件 apply 对本行 config 同步校验,
|
|
46
|
+
# 非法即抛错、阻止该预设被使用;非法具体条件=非对象/数组、键集合不等于 6 键、非字符串、空串、
|
|
47
|
+
# 首尾空白、含 CR/LF、6 值重复、以 (Recommended)/(Recommended)/(推荐)/(推荐)结尾。
|
|
48
|
+
# 持久值(settings 行)与 11 项普通设置同口径:属性缺失或显式对象非法都回落本资产默认并整组补齐,
|
|
49
|
+
# 旧的键随写盘删除;只有本资产自身损坏(本行缺失/本值非法)才严格失败且零写。
|
|
50
|
+
# 字段 ↔ prompt variable:routeMain=extra_plan_route_main、
|
|
51
|
+
# routeExecutor=extra_plan_route_executor、routePlan=extra_plan_route_plan、
|
|
52
|
+
# routeDisagree=extra_plan_route_disagree、purposeRefine=extra_plan_purpose_refine、
|
|
53
|
+
# purposeRedo=extra_plan_purpose_redo。
|
|
54
|
+
gateWords:
|
|
55
|
+
routeMain: '主会话执行'
|
|
56
|
+
routeExecutor: '执行者执行'
|
|
57
|
+
routePlan: '规划者分析'
|
|
58
|
+
routeDisagree: '不同意'
|
|
59
|
+
purposeRefine: '完善方案'
|
|
60
|
+
purposeRedo: '重新规划'
|
|
61
|
+
# planner 模型名:仅 planner 使用;置空=继承主会话模型;非空且主会话 provider 目录明确不含该模型时
|
|
62
|
+
# 静默降级为主会话模型(T2 判定:目录为空/取不到目录则保守沿用,目录是 advisory);
|
|
63
|
+
# provider/maxTokens 继承父会话。默认值仅在该键缺失时生效(键存在即为用户值)。
|
|
64
|
+
plannerModel: deepseek-v4-pro
|
|
65
|
+
# False 保留旧单 provider 目录流程;True 才对 planner 与非 planner child 做串行真实 OK 探针并严格验证 fallback。
|
|
66
|
+
crossProviderPlannerModel: false
|
|
67
|
+
planTool: subagent_plan
|
|
68
|
+
exploreBudget: 18
|
|
69
|
+
otherAgentModel: ''
|
|
70
|
+
# 非 planner child(executor/reviewer/probe/workflow/ralph worker)优先使用该模型;空/未匹配/真实探针失败回退主会话。
|
|
71
|
+
# 验收者模型开关:开启时验收者复用规划者模型与跨提供方解析(优先 plannerModel);
|
|
72
|
+
# 关闭时沿用其他子代理模型(otherAgentModel)。该叶值被逐字复制进四个角色 definition,故只写在此处。
|
|
73
|
+
reviewerUsesPlannerModel: false
|
|
74
|
+
savePlanDir: '.extra-plan'
|
|
75
|
+
plannerPromptSuffix: '你的深度思考部分需要以"好了,现在我以全局视角来看待这个问题"开头'
|
|
76
|
+
usageLedger:
|
|
77
|
+
enabled: true
|
|
78
|
+
# 唯一账本为 ledger-v2.archive.jsonl(仅由启动扫描覆盖式维护);ledger-v2.jsonl(active)与 .cursor.json 已废弃、不再读写。
|
|
79
|
+
path: !!js dshHomePath('usage-ledger', 'ledger-v2.archive.jsonl')
|
|
80
|
+
- id: agent-instructions
|
|
81
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
82
|
+
config:
|
|
83
|
+
maxBytes: 65536
|
|
84
|
+
- id: tool-fs
|
|
85
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
86
|
+
config:
|
|
87
|
+
write: false
|
|
88
|
+
edit: false
|
|
89
|
+
- id: tool-fs-search
|
|
90
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
91
|
+
config:
|
|
92
|
+
sampleOverCapGlobResults: false
|
|
93
|
+
- id: tool-skill
|
|
94
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
95
|
+
- id: skill-filesystem
|
|
96
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
97
|
+
config:
|
|
98
|
+
watch: false
|
|
99
|
+
- id: tool-jobs
|
|
100
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
101
|
+
- id: tool-pwsh
|
|
102
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
103
|
+
disabled: !!js process.platform !== 'win32'
|
|
104
|
+
- id: tool-bash
|
|
105
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
106
|
+
disabled: !!js process.platform === 'win32'
|
|
107
|
+
- id: tool-web
|
|
108
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
109
|
+
config:
|
|
110
|
+
fetch: false
|
|
111
|
+
searchTimeoutMs: 60000
|
|
112
|
+
- id: tool-cordis
|
|
113
|
+
name: '@deepseek-ai/dsh-tool-cordis'
|
|
114
|
+
- id: tool-executor-native
|
|
115
|
+
name: '@deepseek-ai/dsh-tool-executor-native'
|