minimal-agent 0.12.0 → 0.13.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/package.json +3 -2
- package/plugins/workflow-runner/src/expressions.js +29 -8
- package/plugins/workflow-runner/src/expressions.ts +28 -10
- package/plugins/workflow-runner/src/index.js +45 -17
- package/plugins/workflow-runner/src/index.ts +44 -18
- package/plugins/workflow-runner/src/recovery.js +9 -2
- package/plugins/workflow-runner/src/recovery.ts +9 -2
- package/plugins/workflow-runner/src/runner.js +31 -5
- package/plugins/workflow-runner/src/runner.ts +33 -5
- package/plugins/workflow-runner/src/stepExecutors/assert.js +2 -1
- package/plugins/workflow-runner/src/stepExecutors/assert.ts +3 -1
- package/plugins/workflow-runner/src/stepExecutors/tool.js +29 -10
- package/plugins/workflow-runner/src/stepExecutors/tool.ts +29 -11
- package/plugins/workflow-runner/src/stepExecutors/verify.js +6 -3
- package/plugins/workflow-runner/src/stepExecutors/verify.ts +7 -3
- package/plugins/workflow-runner/src/taskIdentity.js +197 -21
- package/plugins/workflow-runner/src/taskIdentity.ts +201 -20
- package/plugins/workflow-runner/src/types.js +113 -7
- package/plugins/workflow-runner/src/types.ts +111 -7
- package/plugins/workflow-runner/src/workflowState.js +455 -54
- package/plugins/workflow-runner/src/workflowState.ts +508 -63
- package/plugins/workflow-runner/test/cli.e2e.test.ts +20 -0
- package/plugins/workflow-runner/test/e2eNewLayout.test.ts +314 -0
- package/plugins/workflow-runner/test/engineRobustness.test.ts +9 -1
- package/plugins/workflow-runner/test/expressions.test.ts +42 -0
- package/plugins/workflow-runner/test/illustrate.load.test.ts +2 -2
- package/plugins/workflow-runner/test/parseWorkflowArgs.test.ts +19 -0
- package/plugins/workflow-runner/test/ppt.load.test.ts +15 -15
- package/plugins/workflow-runner/test/ralphLoop.e2e.test.ts +3 -2
- package/plugins/workflow-runner/test/research.load.test.ts +328 -0
- package/plugins/workflow-runner/test/runnerPreflight.test.ts +68 -11
- package/plugins/workflow-runner/test/stateLifecycle.test.ts +60 -12
- package/plugins/workflow-runner/test/taskArbitration.test.ts +19 -3
- package/plugins/workflow-runner/test/taskLifecycle.test.ts +61 -7
- package/plugins/workflow-runner/test/webppt.load.test.ts +4 -4
- package/plugins/workflow-runner/test/word.load.test.ts +9 -9
- package/skills/skill-creator/scripts/run_eval.py +3 -2
- package/src/cli/print.js +17 -0
- package/src/cli/print.ts +25 -0
- package/src/config/configService.js +24 -0
- package/src/config/configService.ts +23 -0
- package/src/infra/verification.js +25 -18
- package/src/infra/verification.ts +50 -18
- package/src/plugins/pluginRunner.js +18 -7
- package/src/plugins/pluginRunner.ts +20 -6
- package/src/prompts/policyRegistry.js +28 -1
- package/src/prompts/policyRegistry.ts +28 -1
- package/src/tools/advisor/advisor.js +76 -9
- package/src/tools/advisor/advisor.ts +79 -9
- package/src/tools/bash/bash.js +51 -6
- package/src/tools/bash/bash.ts +56 -7
- package/src/tools/powershell/powershell.js +18 -1
- package/src/tools/powershell/powershell.ts +18 -2
- package/src/tools/read/read.js +9 -4
- package/src/tools/read/read.ts +9 -4
- package/src/tools/shared/permanentDeleteGuard.js +34 -3
- package/src/tools/shared/permanentDeleteGuard.ts +43 -6
- package/src/tools/webbrowser/browserControl.js +5 -1
- package/src/tools/webbrowser/browserControl.ts +7 -1
- package/src/tools/webbrowser/webbrowser.js +8 -4
- package/src/tools/webbrowser/webbrowser.ts +8 -4
- package/src/types.ts +10 -4
- package/workflows/adaptive-research.yaml +5 -5
- package/workflows/book-review-short.yaml +5 -5
- package/workflows/e2e-write-greet.yaml +2 -2
- package/workflows/illustrate.yaml +12 -12
- package/workflows/plan.yaml +18 -18
- package/workflows/ppt.yaml +201 -201
- package/workflows/ralph-loop.yaml +3 -1
- package/workflows/research.md +449 -0
- package/workflows/research.yaml +873 -0
- package/workflows/webppt.yaml +47 -47
- package/workflows/word.yaml +80 -80
- package/workflows/youtube-shorts.yaml +25 -25
package/workflows/plan.yaml
CHANGED
|
@@ -30,7 +30,7 @@ self_heal:
|
|
|
30
30
|
# 3s 级重试必撞同一个故障窗口(2026-06-12 实跑:两次重试全死在拥塞波里)
|
|
31
31
|
|
|
32
32
|
artifacts:
|
|
33
|
-
- PLAN.md # 核心产出:实现计划文档(仅在 stage4 定稿时落盘一次)
|
|
33
|
+
- out/plan/${session}/PLAN.md # 核心产出:实现计划文档(仅在 stage4 定稿时落盘一次)
|
|
34
34
|
|
|
35
35
|
steps:
|
|
36
36
|
# ================================================================
|
|
@@ -129,7 +129,7 @@ steps:
|
|
|
129
129
|
- id: stage2_draft_plan
|
|
130
130
|
title: 阶段2/6·起草实现计划
|
|
131
131
|
llm: |
|
|
132
|
-
你负责把目标和探索结果写成**可直接执行的实现计划正文**(将原样写入
|
|
132
|
+
你负责把目标和探索结果写成**可直接执行的实现计划正文**(将原样写入 out/plan/${session}/out/plan/${session}/PLAN.md)。
|
|
133
133
|
|
|
134
134
|
${learnings_text != '' ? '这是用户方向性打回后的重做。用户审批反馈(必须遵从):\n' + learnings_text : ''}
|
|
135
135
|
|
|
@@ -178,9 +178,9 @@ steps:
|
|
|
178
178
|
|
|
179
179
|
# ----------------------------------------------------------------
|
|
180
180
|
# 阶段 4:方案重构确定 + 人工审批闸门(反馈分类路由)
|
|
181
|
-
# revise 产终版正文 → Write 落盘
|
|
181
|
+
# revise 产终版正文 → Write 落盘 out/plan/${session}/out/plan/${session}/PLAN.md → 审批小循环:
|
|
182
182
|
# 空反馈(选继续)→ 批准放行
|
|
183
|
-
# minor 反馈 → 就地修订 PLAN.md → 下一轮再确认
|
|
183
|
+
# minor 反馈 → 就地修订 out/plan/${session}/PLAN.md → 下一轮再确认
|
|
184
184
|
# fundamental 反馈 → 记入教训 + continue 打回 plan_loop 重新规划
|
|
185
185
|
# ----------------------------------------------------------------
|
|
186
186
|
- id: stage4_revise
|
|
@@ -202,13 +202,13 @@ steps:
|
|
|
202
202
|
max_retries: 2
|
|
203
203
|
|
|
204
204
|
- id: stage4_write_plan
|
|
205
|
-
title: 阶段4/6·写入 PLAN.md
|
|
205
|
+
title: 阶段4/6·写入 out/plan/${session}/PLAN.md
|
|
206
206
|
tool: Write
|
|
207
207
|
args:
|
|
208
|
-
file_path:
|
|
208
|
+
file_path: out/plan/${session}/out/plan/${session}/PLAN.md
|
|
209
209
|
content: "${final_plan_text}"
|
|
210
210
|
artifacts:
|
|
211
|
-
- PLAN.md
|
|
211
|
+
- out/plan/${session}/PLAN.md
|
|
212
212
|
max_retries: 1
|
|
213
213
|
|
|
214
214
|
- id: stage4_approval
|
|
@@ -222,9 +222,9 @@ steps:
|
|
|
222
222
|
type: pause
|
|
223
223
|
free_text: approve # 自由输入不 halt:捕获后由分类步决定走向
|
|
224
224
|
prompt: |
|
|
225
|
-
📋
|
|
225
|
+
📋 计划已定稿:out/plan/${session}/out/plan/${session}/PLAN.md —— 请 review 后选择。
|
|
226
226
|
选「继续执行」进入执行阶段;选「停止」保留现场(同目标重跑可断点续跑);
|
|
227
|
-
选「其他」输入修改意见:小调整会就地改 PLAN.md 再请你确认,
|
|
227
|
+
选「其他」输入修改意见:小调整会就地改 out/plan/${session}/PLAN.md 再请你确认,
|
|
228
228
|
方向性变化会带着你的意见回到规划阶段重来。
|
|
229
229
|
capture:
|
|
230
230
|
free_text: approval_notes
|
|
@@ -281,11 +281,11 @@ steps:
|
|
|
281
281
|
type: continue
|
|
282
282
|
target: plan_loop
|
|
283
283
|
else:
|
|
284
|
-
# 局部调整:就地修订 PLAN.md,审批小循环自然进入下一轮再请确认
|
|
284
|
+
# 局部调整:就地修订 out/plan/${session}/PLAN.md,审批小循环自然进入下一轮再请确认
|
|
285
285
|
- id: revise_with_feedback
|
|
286
286
|
title: 阶段4/6·按反馈修订计划
|
|
287
287
|
llm: |
|
|
288
|
-
用户审批计划时给了修改意见。请把意见合入计划,输出**更新后的完整 PLAN.md 正文**。
|
|
288
|
+
用户审批计划时给了修改意见。请把意见合入计划,输出**更新后的完整 out/plan/${session}/PLAN.md 正文**。
|
|
289
289
|
|
|
290
290
|
## 用户修改意见
|
|
291
291
|
${approval_notes}
|
|
@@ -301,13 +301,13 @@ steps:
|
|
|
301
301
|
text: final_plan_text
|
|
302
302
|
max_retries: 2
|
|
303
303
|
- id: write_revised_plan
|
|
304
|
-
title: 阶段4/6·回写 PLAN.md
|
|
304
|
+
title: 阶段4/6·回写 out/plan/${session}/PLAN.md
|
|
305
305
|
tool: Write
|
|
306
306
|
args:
|
|
307
|
-
file_path:
|
|
307
|
+
file_path: out/plan/${session}/out/plan/${session}/PLAN.md
|
|
308
308
|
content: "${final_plan_text}"
|
|
309
309
|
artifacts:
|
|
310
|
-
- PLAN.md
|
|
310
|
+
- out/plan/${session}/PLAN.md
|
|
311
311
|
max_retries: 1
|
|
312
312
|
|
|
313
313
|
# 审批小循环 5 轮仍无明确同意 → 诚实停(现场保留可续跑)
|
|
@@ -332,7 +332,7 @@ steps:
|
|
|
332
332
|
- id: stage5_execute
|
|
333
333
|
title: 阶段5/6·执行计划
|
|
334
334
|
agent: |
|
|
335
|
-
你是资深工程师,执行一份已通过审批的实现计划。先 Read
|
|
335
|
+
你是资深工程师,执行一份已通过审批的实现计划。先 Read out/plan/${session}/out/plan/${session}/PLAN.md 了解全部步骤。
|
|
336
336
|
|
|
337
337
|
${exec_feedback != '' ? '## ⚠️ 上轮执行验收未通过(本轮必须重点补完,产物已部分存在时增量补齐,不要从零重做)\n' + exec_feedback : ''}
|
|
338
338
|
|
|
@@ -369,7 +369,7 @@ steps:
|
|
|
369
369
|
对照"成功标准"和当前文件系统,判断用户目标是否**真实达成**。
|
|
370
370
|
|
|
371
371
|
请严格执行:
|
|
372
|
-
1. 先 Read
|
|
372
|
+
1. 先 Read out/plan/${session}/out/plan/${session}/PLAN.md,按其中的成功标准和产出物清单核验。
|
|
373
373
|
2. 用 Bash/Read/Glob 亲自核实核心产物是否真实存在、是否满足每条成功标准。
|
|
374
374
|
3. 产物是 pptx/docx/pdf/xlsx 等 OOXML 时,**必须用忠实的 OPC 合规校验**
|
|
375
375
|
(检查无 ZIP 目录条目、[Content_Types].xml 在首位、关系都解析、无 0 字节媒体),
|
|
@@ -383,7 +383,7 @@ steps:
|
|
|
383
383
|
|
|
384
384
|
只输出 JSON 对象本身(不要 markdown、不要解释正文)。
|
|
385
385
|
context_files:
|
|
386
|
-
- path:
|
|
386
|
+
- path: out/plan/${session}/out/plan/${session}/PLAN.md
|
|
387
387
|
hint: 实现计划与产出物清单
|
|
388
388
|
allowed_tools: [Read, Bash, Glob]
|
|
389
389
|
output_schema:
|
|
@@ -443,7 +443,7 @@ steps:
|
|
|
443
443
|
title: 阶段5-6·执行兜底检查
|
|
444
444
|
type: assert
|
|
445
445
|
condition: "qualified == true"
|
|
446
|
-
onFail: "已批准的计划执行 3 轮仍未通过验收,工作流诚实停止(现场与 PLAN.md 保留,重跑同目标可从断点续跑;也可调整目标后重来)。最后阻塞原因:${blocking_reason}"
|
|
446
|
+
onFail: "已批准的计划执行 3 轮仍未通过验收,工作流诚实停止(现场与 out/plan/${session}/PLAN.md 保留,重跑同目标可从断点续跑;也可调整目标后重来)。最后阻塞原因:${blocking_reason}"
|
|
447
447
|
|
|
448
448
|
# ================================================================
|
|
449
449
|
# 出循环后:唯一正常到达路径 = exec_gate 验收通过 break 穿透至此。
|