@tea-agent/loop-agent 0.16.19 → 0.16.21
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 +28 -5
- package/README.md +8 -0
- package/dist/cli/command-definitions.js +4 -2
- package/dist/cli/program.js +2 -1
- package/dist/cli/update/init-surface-notifier.js +167 -0
- package/dist/cli/update/policy.js +36 -1
- package/dist/cli/update/runtime-activity.js +29 -0
- package/dist/cli.js +14 -2
- package/dist/commands/init.js +85 -2
- package/dist/executors/shell-executor.js +92 -66
- package/dist/executors/shell-write-guard.js +5 -0
- package/dist/shared/runtime-activity.js +6 -0
- package/dist/worker/observability/read-model.js +10 -7
- package/dist/worker/observe/static/views/session-timeline.js +1 -1
- package/dist/workflows/dag/backend-test-case-manifest.js +13 -3
- package/dist/workflows/dag/backend-test-classification-contract.js +38 -0
- package/dist/workflows/dag/backend-test-contract-envelope.js +167 -0
- package/dist/workflows/dag/backend-test-semantic-review-contract.js +2 -2
- package/dist/workflows/dag/init-hybrid.js +64 -409
- package/dist/workflows/dag/node-execution.js +4 -3
- package/dist/workflows/dag/types.js +1 -5
- package/docs/README.md +1 -0
- package/docs/templates/agent-dag.schema.json +1 -1
- package/docs/templates/backend-test-case-manifest.schema.json +35 -2
- package/docs/templates/backend-test-dag.json +39 -340
- package/docs/templates/backend-test-dag.review-cases.prompt.md +4 -4
- package/package.json +1 -1
- package/skills/loop-agent/references/command-reference.md +4 -0
- package/skills/loop-agent/references/hybrid-dag.md +2 -2
- package/dist/workflows/dag/backend-test-repair-contract.js +0 -94
|
@@ -422,9 +422,10 @@ export async function executeDagNode(input) {
|
|
|
422
422
|
node.structuredArtifactSha256 = createHash("sha256").update(bytes).digest("hex");
|
|
423
423
|
node.structuredArtifactSchemaId = task.shell.jsonArtifactGate.schemaId;
|
|
424
424
|
}
|
|
425
|
-
else if (task.shell?.backendTestPipeline === "
|
|
426
|
-
//
|
|
427
|
-
//
|
|
425
|
+
else if (task.shell?.backendTestPipeline === "classification-result-context") {
|
|
426
|
+
// The current 15-node single-run pipeline materializes the canonical
|
|
427
|
+
// contracts/backend-test-result.json without jsonArtifactGate. Bind it
|
|
428
|
+
// so Outcome adapters project kind=backend-test-result for Ready Planner.
|
|
428
429
|
const artifactPath = path.join(runDir, "contracts", "backend-test-result.json");
|
|
429
430
|
if (existsSync(artifactPath)) {
|
|
430
431
|
const bytes = await readFile(artifactPath);
|
|
@@ -145,12 +145,8 @@ export const dagNodeStatusSchema = z.enum([
|
|
|
145
145
|
export const dagBackendTestPipelineSchema = z.enum([
|
|
146
146
|
"contracts",
|
|
147
147
|
"semantic-initial",
|
|
148
|
-
"semantic-final",
|
|
149
|
-
"semantic-effective",
|
|
150
148
|
"execute-parse-initial",
|
|
151
|
-
"classification-
|
|
152
|
-
"repair-safety-traceability",
|
|
153
|
-
"finalize-effective-result",
|
|
149
|
+
"classification-result-context",
|
|
154
150
|
]);
|
|
155
151
|
export const dagShellConfigSchema = z.object({
|
|
156
152
|
commands: z.array(z.string()).default([]),
|
package/docs/README.md
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
- `agent-dag-runner.md` — Agent DAG runner 指南
|
|
30
30
|
- `agent-dag-recovery-playbook.md` — DAG 失败分类、recovery action 与 operator 处置手册
|
|
31
31
|
- `design/frontend-mock-data-workflow.md` — 已实现的前端 Mock 数据节点、触发条件、规范证据、验证与失败路由
|
|
32
|
+
- `design/backend-test-workflow.md` — 已实现的 backend-test 15 节点单次执行全流程、pass-only 评审门禁、run-owned artifacts 与最终 outcome
|
|
32
33
|
- `design/dag-source-binding-and-recovery.md` — 新生成 DAG 的权威任务源绑定、前端需求编号覆盖门禁与中断恢复规则
|
|
33
34
|
- `cursor-prompt-sidecar.md` — `cursor-prompt` one-shot sidecar 用法(非受治理 writer)
|
|
34
35
|
- `init-surface.manifest.json` — npm 包范围、目标项目初始化投影与 `init check-update` surface 分类的机器校验契约
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
"backendTestPipeline": {
|
|
254
|
-
"enum": ["contracts", "semantic-initial", "
|
|
254
|
+
"enum": ["contracts", "semantic-initial", "execute-parse-initial", "classification-result-context"]
|
|
255
255
|
},
|
|
256
256
|
"verifyEvidence": { "$ref": "#/$defs/shellVerifyEvidence" },
|
|
257
257
|
"repairArtifactGate": { "$ref": "#/$defs/repairArtifactGate" },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://tea-agent.dev/schemas/backend-test-case-manifest-v1.json",
|
|
4
4
|
"title": "Backend Test Case Manifest v1",
|
|
5
|
-
"description": "Run-owned AC → BE-* case → automation mapping.
|
|
5
|
+
"description": "Run-owned AC → BE-* case → automation mapping. coverageSummary is controller-computed by the shell materializer from sourceBinding/cases/evidenceGaps and is non-authoritative when present in model output; models must not emit coverageSummary or invent percentages. Conditional required fields mirror Zod: generated requires file+symbol; skipped|unsupported requires gapReason; each evidence gap requires acId and/or caseId.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["schemaVersion", "sourceBinding", "cases", "evidenceGaps"],
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
158
|
"coverageSummary": {
|
|
159
|
+
"description": "Canonical coverage counts written only by the shell materializer (computeCaseManifestCoverageSummary). Optional on the artifact/output schema; models must omit this field. Input materialization strips any model-provided top-level coverageSummary after secret scan and always recomputes. Canonical output always includes flat counters plus dual-scope buckets global/inScope and crossDomainGapCount.",
|
|
159
160
|
"type": "object",
|
|
160
161
|
"additionalProperties": false,
|
|
161
162
|
"required": [
|
|
@@ -167,7 +168,10 @@
|
|
|
167
168
|
"plannedCount",
|
|
168
169
|
"skippedCount",
|
|
169
170
|
"unsupportedCount",
|
|
170
|
-
"acCoverageRatio"
|
|
171
|
+
"acCoverageRatio",
|
|
172
|
+
"global",
|
|
173
|
+
"inScope",
|
|
174
|
+
"crossDomainGapCount"
|
|
171
175
|
],
|
|
172
176
|
"properties": {
|
|
173
177
|
"explicitAcCount": { "type": "integer", "minimum": 0 },
|
|
@@ -183,6 +187,35 @@
|
|
|
183
187
|
"minimum": 0,
|
|
184
188
|
"maximum": 1,
|
|
185
189
|
"description": "Deterministic coveredAcCount/explicitAcCount (or 1 when no explicit AC)"
|
|
190
|
+
},
|
|
191
|
+
"global": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"description": "All explicit AC coverage (total/covered/gapped/ratio)",
|
|
195
|
+
"required": ["total", "covered", "gapped", "ratio"],
|
|
196
|
+
"properties": {
|
|
197
|
+
"total": { "type": "integer", "minimum": 0 },
|
|
198
|
+
"covered": { "type": "integer", "minimum": 0 },
|
|
199
|
+
"gapped": { "type": "integer", "minimum": 0 },
|
|
200
|
+
"ratio": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"inScope": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"description": "Explicit AC coverage excluding cross-domain gaps",
|
|
207
|
+
"required": ["total", "covered", "gapped", "ratio"],
|
|
208
|
+
"properties": {
|
|
209
|
+
"total": { "type": "integer", "minimum": 0 },
|
|
210
|
+
"covered": { "type": "integer", "minimum": 0 },
|
|
211
|
+
"gapped": { "type": "integer", "minimum": 0 },
|
|
212
|
+
"ratio": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"crossDomainGapCount": {
|
|
216
|
+
"type": "integer",
|
|
217
|
+
"minimum": 0,
|
|
218
|
+
"description": "Count of evidence gaps classified as cross-domain (frontend/flyway/migration/browser/e2e/etc.)"
|
|
186
219
|
}
|
|
187
220
|
}
|
|
188
221
|
}
|