@tea-agent/loop-agent 0.29.0 → 0.29.2
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/CHANGELOG.md +47 -0
- package/dist/commands/init.js +1 -1
- package/dist/executors/dag-pi-executor.js +38 -11
- package/dist/executors/pi-playwright-cli-tool.js +14 -8
- package/dist/executors/shell-executor.js +153 -0
- package/dist/task/config-types.js +21 -0
- package/dist/workflows/dag/backend-test-writer-completeness.js +98 -14
- package/dist/workflows/dag/frontend-test-case-checklist.js +94 -15
- package/dist/workflows/dag/frontend-test-case-manifest.js +104 -0
- package/dist/workflows/dag/frontend-test-html-report.js +106 -24
- package/dist/workflows/dag/frontend-test-result-contract.js +3 -0
- package/dist/workflows/dag/init-hybrid.js +167 -102
- package/dist/workflows/dag/node-execution.js +41 -2
- package/dist/workflows/dag/types.js +40 -0
- package/dist/workflows/dag/validate.js +4 -1
- package/docs/templates/README.md +1 -0
- package/docs/templates/agent-dag.schema.json +6 -1
- package/docs/templates/frontend-test-case-checklist.md +1 -1
- package/docs/templates/frontend-test-dag.generate-cases.prompt.md +9 -1
- package/docs/templates/frontend-test-dag.json +125 -267
- package/docs/templates/frontend-test-dag.retrieve-context.prompt.md +7 -1
- package/docs/templates/frontend-test-dag.review-cases.prompt.md +1 -1
- package/docs/templates/frontend-test-standard-scenarios.v1.json +114 -0
- package/package.json +1 -1
- package/skills/playwright-cli/SKILL.md +1 -1
- package/skills/playwright-cli-case-generator/SKILL.md +1 -1
package/docs/templates/README.md
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
Pi writer writeSet 不包含 final manifest(文件名 manifest.json)。依赖 checklist 的 exclusive shell materializer 是 final manifest 的唯一写入者,以 temp+rename 原子生成 final,后续 map 只消费该 materializer 输出。
|
|
49
49
|
- `frontend-test-dag.retrieve-context.prompt.md`、`frontend-test-dag.generate-cases.prompt.md`、`frontend-test-dag.review-cases.prompt.md`、`frontend-test-dag.review-execution.prompt.md`、`frontend-test-dag.retrospect.prompt.md` — 上下文、用例、审查、执行审查和复盘提示。
|
|
50
50
|
- `frontend-test-case-checklist.md` — 前端测试用例检查清单。
|
|
51
|
+
- `frontend-test-standard-scenarios.v1.json` — frontend-test 标准场景规范(generate 覆盖 must 场景;运行时可物化到目标项目 testcase/frontend/rag 下的 standard-scenarios.v1.json)。
|
|
51
52
|
|
|
52
53
|
## 知识同步与配置
|
|
53
54
|
|
|
@@ -56,7 +56,12 @@
|
|
|
56
56
|
"type": "array",
|
|
57
57
|
"items": { "type": "string", "minLength": 1 }
|
|
58
58
|
},
|
|
59
|
-
"writePolicy": { "$ref": "#/$defs/writePolicy" }
|
|
59
|
+
"writePolicy": { "$ref": "#/$defs/writePolicy" },
|
|
60
|
+
"writeGuardPolicy": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": ["full", "tools-only"],
|
|
63
|
+
"description": "full (default): git baseline + post-diff write-guard. tools-only: keep tool sandbox only (frontend-test)."
|
|
64
|
+
}
|
|
60
65
|
}
|
|
61
66
|
},
|
|
62
67
|
"skillsByRole": {
|
|
@@ -7,7 +7,7 @@ LLM review (when `frontendTest.reviewMode=blocking`) must not invent blocking ru
|
|
|
7
7
|
|
|
8
8
|
| ruleId | Rule |
|
|
9
9
|
|---|---|
|
|
10
|
-
| `open-prefix` | Each case body includes `playwright-cli open --browser=chrome --
|
|
10
|
+
| `open-prefix` | Each case body includes `playwright-cli open --browser=chrome --headless <absolute-http(s)-url>` |
|
|
11
11
|
| `production-url` | Open URL must not look like a production host |
|
|
12
12
|
| `ac-mapping` | Manifest entry has non-empty `acIds` (**acceptance** ids, not case ids) |
|
|
13
13
|
| `ac-id-shape` | Each `acIds[]` entry matches `AC-*` / `AC-FE-*` |
|
|
@@ -18,7 +18,7 @@ Each case is independently executable and includes AC mapping (`acIds`), precond
|
|
|
18
18
|
|
|
19
19
|
Every case must copy the **controller-frozen** absolute base URL supplied by the DAG. `testcase/frontend/rag/context.md` may reference that value, but model-authored context/case prose cannot establish or override the origin. Do not leave a base-url placeholder.
|
|
20
20
|
|
|
21
|
-
Every case must start with `playwright-cli open --browser=chrome --
|
|
21
|
+
Every case must start with `playwright-cli open --browser=chrome --headless` followed by the concrete controller-frozen URL supplied by the DAG. Do not copy an angle-bracket URL placeholder into a generated executable case line.
|
|
22
22
|
|
|
23
23
|
### Dynamic element refs (hard)
|
|
24
24
|
|
|
@@ -53,3 +53,11 @@ Each case must require the executor to persist, even when blocked:
|
|
|
53
53
|
- `testcase/frontend/evidence/<case-id>/case-result.json`
|
|
54
54
|
|
|
55
55
|
`case-result.json` must be valid JSON containing the matching `caseId`, `status` (`passed`, `failed`, or `blocked`), and an `evidencePaths` array. A blocked result must include a non-empty `blockedReason`, such as `isolated-test-environment-unavailable` or `token-budget-exhausted`, and must never claim or imply a pass. `execution.md` records attempted or blocked steps, base-URL safety decision, fixture/reset and request-observation availability, timestamps, and the evidence-file list. Available evidence files are required only when actually produced and must stay under the same case evidence directory.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Standard scenarios (controller)
|
|
59
|
+
|
|
60
|
+
- Read `testcase/frontend/rag/standard-scenarios.v1.json` when present.
|
|
61
|
+
- Cover each `priority=must` scenario with at least one case or record an explicit GAP in coverage-map.
|
|
62
|
+
- Each case Markdown SHOULD include `## 测试点` and `## 测试步骤` sections.
|
|
63
|
+
- Prefer linking cases via `standardScenarioIds` in manifest.draft notes when possible.
|