@tea-agent/loop-agent 0.42.0-next.10 → 0.42.0-next.12

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.
@@ -12,7 +12,7 @@ const NODE_PURPOSE_BY_ID = {
12
12
  "implement-pi": "在允许路径内按计划改代码,完成本轮主实现。",
13
13
  "implement-core": "在允许路径内完成核心实现,不越出约定写入范围。",
14
14
  "repair-pi": "只修验证暴露出的可修复问题,不重开需求、不扩大 writeSet。",
15
- "verify-shell": "跑冻结的验证命令,用退出码证明实现是否达标。",
15
+ "verify-shell": "运行预先确定的验证命令,用命令结果判断是否达标。",
16
16
  "soft-verify-shell": "先做软验证,留下证据供过程监督,不立刻判整单失败。",
17
17
  "hard-verify-shell": "硬验证:命令必须通过,作为后续审查与收口的事实。",
18
18
  "review-pi": "对照需求与 diff 做只读审查,给出通过或需修订。",
@@ -35,14 +35,14 @@ const NODE_PURPOSE_BY_ID = {
35
35
  "static-invariant-shell": "跑静态不变量检查,确认约定结构与约束仍成立。",
36
36
  "changeset-impact-shell": "评估本轮 diff 的影响面,标出高风险改动。",
37
37
  "closeout-artifact-shell": "收集收口所需的确定性产物与证据路径。",
38
- "final-verify-shell": "收口前最后一轮冻结验证,作为完成权威。",
38
+ "final-verify-shell": "收尾前运行最后一轮固定验证,作为完成依据。",
39
39
  "closeout-summary-pi": "把验证与交付事实写成简短交接摘要。",
40
40
 
41
41
  "frontend-contract-pi": "把前端需求整理成可追踪契约:页面、状态、验收与边界。",
42
42
  "frontend-contract-import-shell": "导入并固化前端实现契约,供后续设计、写入与验证节点使用。",
43
43
  "frontend-scout-pi": "只读侦察前端结构、组件与接口用法,不改文件。",
44
44
  "frontend-plan-pi": "选定实现与 Mock/API 策略,输出可执行的前端实现契约补丁。",
45
- "frontend-design-policy-shell": "确定前端设计与 Mock/API 策略,冻结后续实现必须遵守的规则。",
45
+ "frontend-design-policy-shell": "确定前端设计和数据对接方案,并保存后续实现必须遵守的规则。",
46
46
  "frontend-design-review-pi": "审查前端计划是否可写:通过则沿用原计划,否则要求修订。",
47
47
  "frontend-plan-revision-pi": "按设计审查意见修订前端契约,不扩大范围。",
48
48
  "frontend-final-design-review-pi": "复核修订后的前端计划,只有通过才能授权写入。",
@@ -51,9 +51,9 @@ const NODE_PURPOSE_BY_ID = {
51
51
  "frontend-lint-baseline-shell": "记录写入前的 lint 基线,供实现后对比,不阻断写入。",
52
52
  "frontend-implement-pi": "按已批准契约改前端代码、状态与交互,留在 writeSet 内。",
53
53
  "frontend-verify-assess-shell": "跑静态/行为/Mock 验证并评估能否有界修复。",
54
- "frontend-verify-shell": "执行冻结的前端验证命令,产出可复查的通过或失败证据。",
54
+ "frontend-verify-shell": "运行预先确定的前端检查,留下可复查的通过或失败结果。",
55
55
  "frontend-repair-pi": "只修评估为可修复的前端失败,不重开需求。",
56
- "frontend-reverify-shell": "修复后用同一套冻结命令复验。",
56
+ "frontend-reverify-shell": "修复后用同一套检查再次验证。",
57
57
  "frontend-review-context-shell": "打包真实 diff 与有效验证证据,供审查节点使用。",
58
58
  "frontend-review-pi": "对照契约审查前端实现与证据,给出通过或需修订。",
59
59
  "frontend-review-gate-shell": "前端审查门禁:结论为通过才进入收口。",
@@ -85,7 +85,7 @@ const NODE_PURPOSE_BY_ID = {
85
85
  "validate-backend-test-environment-shell": "检查 Python/pytest 与测试布局是否可跑,失败则不消耗模型。",
86
86
  "backend-test-analysis-contract-shell": "固化后端测试分析契约与布局。",
87
87
  "backend-test-environment-scout-pi": "侦察后端测试环境与入口,不改业务代码。",
88
- "backend-test-execution-contract-shell": "冻结后端测试如何执行、产物写到哪里。",
88
+ "backend-test-execution-contract-shell": "确定后端测试如何执行、结果保存到哪里。",
89
89
  "generate-backend-md-plan-pi": "生成中文模块索引与用例卡片计划。",
90
90
  "materialize-backend-md-module-manifest-shell": "把 Markdown 模块清单落到磁盘。",
91
91
  "review-and-revise-backend-md-cases-pi": "独立审查并修订 Markdown 用例。",
@@ -145,7 +145,7 @@ function describeFromPattern(nodeId) {
145
145
  return "确定性门禁:核验上游结论,通过才放行后续节点。";
146
146
  }
147
147
  if (id.endsWith("-shell") && id.includes("verify")) {
148
- return "跑冻结验证命令,留下可复查的通过/失败证据。";
148
+ return "运行预先确定的验证命令,留下可复查的通过或失败结果。";
149
149
  }
150
150
  if (id.endsWith("-shell") && (id.includes("report") || id.includes("manifest"))) {
151
151
  return "把本轮证据整理成报告或清单,不改业务代码。";
@@ -181,9 +181,9 @@ function describeFromPattern(nodeId) {
181
181
  }
182
182
 
183
183
  function describeFromExecutor(executor) {
184
- if (executor === "shell") return "运行确定性命令并留下证据。";
185
- if (executor === "pi") return "由模型执行该步骤,范围受节点契约约束。";
186
- if (executor === "static") return "按冻结规则直接给出结果,不调用模型。";
184
+ if (executor === "shell") return "由系统运行预先设置的命令,并保存执行结果。";
185
+ if (executor === "pi") return "由 AI 完成这一步,能做的事情受运行设置限制。";
186
+ if (executor === "static") return "按预先确定的规则直接给出结果,不调用 AI。";
187
187
  return "";
188
188
  }
189
189
 
@@ -132,8 +132,8 @@
132
132
 
133
133
  <section data-view="dag" id="view-dag" class="view" hidden>
134
134
  <div class="view-heading">
135
- <p class="view-kicker">Agent DAG</p>
136
- <h2>DAG 详情</h2>
135
+ <p class="view-kicker">自动执行流程</p>
136
+ <h2>运行详情</h2>
137
137
  </div>
138
138
  <section
139
139
  id="dag-relations"
@@ -240,11 +240,11 @@
240
240
  <section data-view="failures" id="view-failures" class="view" hidden>
241
241
  <div class="view-heading">
242
242
  <p class="view-kicker">Attention Queue</p>
243
- <h2>异常 Task</h2>
243
+ <h2>异常任务</h2>
244
244
  <p>按运行状态和建议跟进项集中处理需要人工介入的 Task。</p>
245
245
  </div>
246
246
  <div id="failures-empty" class="panel empty-state" hidden>
247
- 当前没有异常 Task
247
+ 当前没有异常任务
248
248
  </div>
249
249
  <section id="failures-list" class="panel panel-table"></section>
250
250
  </section>
@@ -1,3 +1,5 @@
1
+ import { attemptFailureLabel } from "./dag-history-labels.js";
2
+
1
3
  export function buildPromptRestartCandidateOptions(
2
4
  frozenPrompt,
3
5
  failedCandidates,
@@ -5,7 +7,7 @@ export function buildPromptRestartCandidateOptions(
5
7
  const options = [
6
8
  {
7
9
  key: "frozen",
8
- label: "冻结原始提示词",
10
+ label: "运行开始时的提示词",
9
11
  prompt: String(frozenPrompt ?? ""),
10
12
  truncated: false,
11
13
  },
@@ -27,7 +29,7 @@ export function buildPromptRestartCandidateOptions(
27
29
  : "unknown";
28
30
  options.push({
29
31
  key: `attempt-${attempt}`,
30
- label: `第 ${attempt} 次失败 · ${failureCategory}`,
32
+ label: `第 ${attempt} 次失败 · ${attemptFailureLabel(failureCategory)}`,
31
33
  prompt: candidate.prompt,
32
34
  truncated: candidate.truncated === true,
33
35
  });
@@ -70,11 +70,11 @@ export function featureLookupState(snapshot, featureId) {
70
70
 
71
71
  export const RELATION_KIND_ORDER = ["feature", "task", "batch", "run", "dag"];
72
72
  export const RELATION_LABELS = {
73
- feature: "Feature",
74
- task: "Task",
75
- batch: "Batch",
76
- run: "Run",
77
- dag: "DAG",
73
+ feature: "需求",
74
+ task: "任务",
75
+ batch: "任务批次",
76
+ run: "执行实例",
77
+ dag: "运行流程",
78
78
  };
79
79
 
80
80
  /**
@@ -1354,6 +1354,57 @@ body.is-resizing-dag-graph {
1354
1354
  padding: var(--space-4);
1355
1355
  overflow: auto;
1356
1356
  overscroll-behavior: contain;
1357
+ container-type: inline-size;
1358
+ }
1359
+ .dag-inspector-content.is-readable-page {
1360
+ display: flex;
1361
+ flex-direction: column;
1362
+ gap: 14px;
1363
+ background: color-mix(in srgb, var(--canvas-soft) 72%, var(--surface));
1364
+ }
1365
+ .inspector-page-lead {
1366
+ position: relative;
1367
+ flex: 0 0 auto;
1368
+ min-width: 0;
1369
+ padding: 13px 15px 14px 20px;
1370
+ border: 1px solid var(--hairline);
1371
+ border-radius: 12px;
1372
+ background: var(--surface);
1373
+ box-shadow: 0 4px 14px rgb(38 37 30 / 4%);
1374
+ overflow: hidden;
1375
+ }
1376
+ .inspector-page-lead::before {
1377
+ position: absolute;
1378
+ top: 0;
1379
+ bottom: 0;
1380
+ left: 0;
1381
+ width: 4px;
1382
+ background: var(--orange);
1383
+ content: "";
1384
+ }
1385
+ .inspector-page-lead h4,
1386
+ .inspector-page-lead p {
1387
+ margin: 0;
1388
+ }
1389
+ .inspector-page-lead h4 {
1390
+ margin-top: 3px;
1391
+ color: var(--ink);
1392
+ font-size: 16px;
1393
+ line-height: 1.35;
1394
+ }
1395
+ .inspector-page-lead p {
1396
+ margin-top: 5px;
1397
+ max-width: 68ch;
1398
+ color: var(--body);
1399
+ font-size: 12px;
1400
+ line-height: 1.55;
1401
+ }
1402
+ .inspector-page-eyebrow {
1403
+ display: block;
1404
+ color: var(--orange-active);
1405
+ font-size: 9px;
1406
+ font-weight: 800;
1407
+ letter-spacing: 0.12em;
1357
1408
  }
1358
1409
  .dag-inspector-attempt-bar {
1359
1410
  position: sticky;
@@ -2343,6 +2394,10 @@ body.is-resizing-dag-graph {
2343
2394
  }
2344
2395
  .node-input-semantics {
2345
2396
  margin: 0;
2397
+ padding: 9px 11px;
2398
+ border: 1px dashed var(--hairline-strong);
2399
+ border-radius: 9px;
2400
+ background: color-mix(in srgb, var(--canvas-soft) 74%, var(--surface));
2346
2401
  font-size: 12px;
2347
2402
  font-weight: 600;
2348
2403
  color: var(--muted);
@@ -2362,6 +2417,31 @@ body.is-resizing-dag-graph {
2362
2417
  font-size: 12px;
2363
2418
  font-weight: 600;
2364
2419
  }
2420
+ .dag-inspector-content.is-readable-page .node-input-section,
2421
+ .dag-inspector-content.is-readable-page .spec-evidence-section,
2422
+ .dag-inspector-content.is-readable-page
2423
+ .node-transparency-root
2424
+ > .node-input-summary {
2425
+ padding: 14px 15px;
2426
+ border: 1px solid var(--hairline);
2427
+ border-radius: 12px;
2428
+ background: var(--surface);
2429
+ box-shadow: 0 3px 12px rgb(38 37 30 / 3%);
2430
+ }
2431
+ .dag-inspector-content.is-readable-page .node-input-section,
2432
+ .dag-inspector-content.is-readable-page .spec-evidence-section {
2433
+ padding-bottom: 14px;
2434
+ }
2435
+ .dag-inspector-content.is-readable-page
2436
+ .spec-evidence-section
2437
+ + .spec-evidence-section {
2438
+ margin-top: 0;
2439
+ }
2440
+ .dag-inspector-content.is-readable-page .node-input-section h4,
2441
+ .dag-inspector-content.is-readable-page .spec-evidence-section h4 {
2442
+ margin-bottom: 10px;
2443
+ font-size: 13px;
2444
+ }
2365
2445
  .node-input-summary {
2366
2446
  display: grid;
2367
2447
  grid-template-columns: max-content 1fr;
@@ -2374,6 +2454,35 @@ body.is-resizing-dag-graph {
2374
2454
  color: var(--muted);
2375
2455
  font-weight: 600;
2376
2456
  }
2457
+ .dag-inspector-content.is-readable-page .node-input-summary dt[title] {
2458
+ cursor: help;
2459
+ text-decoration: underline dotted color-mix(in srgb, var(--muted) 48%, transparent);
2460
+ text-underline-offset: 3px;
2461
+ }
2462
+ .dag-inspector-content.is-readable-page .node-input-summary dt[title]::after {
2463
+ display: inline-grid;
2464
+ place-items: center;
2465
+ width: 13px;
2466
+ height: 13px;
2467
+ margin-left: 4px;
2468
+ border: 1px solid var(--hairline-strong);
2469
+ border-radius: 50%;
2470
+ color: var(--muted);
2471
+ font-size: 9px;
2472
+ font-weight: 800;
2473
+ line-height: 1;
2474
+ content: "?";
2475
+ }
2476
+ .dag-inspector-content.is-readable-page .node-input-summary > dt,
2477
+ .dag-inspector-content.is-readable-page .node-input-summary > dd {
2478
+ padding: 7px 0;
2479
+ border-bottom: 1px solid color-mix(in srgb, var(--hairline) 72%, transparent);
2480
+ }
2481
+ .dag-inspector-content.is-readable-page
2482
+ .node-input-summary
2483
+ > :nth-last-child(-n + 2) {
2484
+ border-bottom: 0;
2485
+ }
2377
2486
  .node-input-summary dd {
2378
2487
  margin: 0;
2379
2488
  color: var(--ink);
@@ -2442,6 +2551,33 @@ body.is-resizing-dag-graph {
2442
2551
  border-radius: var(--radius-md);
2443
2552
  background: var(--surface-2, #f3f1ec);
2444
2553
  }
2554
+
2555
+ @container (max-width: 520px) {
2556
+ .inspector-page-lead {
2557
+ padding: 12px 13px 13px 18px;
2558
+ }
2559
+ .inspector-page-lead h4 {
2560
+ font-size: 15px;
2561
+ }
2562
+ .dag-inspector-content.is-readable-page .node-input-section,
2563
+ .dag-inspector-content.is-readable-page .spec-evidence-section,
2564
+ .dag-inspector-content.is-readable-page
2565
+ .node-transparency-root
2566
+ > .node-input-summary {
2567
+ padding: 12px;
2568
+ }
2569
+ .dag-inspector-content.is-readable-page .node-input-summary {
2570
+ grid-template-columns: minmax(0, 1fr);
2571
+ gap: 0;
2572
+ }
2573
+ .dag-inspector-content.is-readable-page .node-input-summary > dt {
2574
+ padding: 8px 0 2px;
2575
+ border-bottom: 0;
2576
+ }
2577
+ .dag-inspector-content.is-readable-page .node-input-summary > dd {
2578
+ padding: 0 0 8px;
2579
+ }
2580
+ }
2445
2581
  .node-artifact-card.is-consumed {
2446
2582
  border-left: 3px solid var(--blue, #2563eb);
2447
2583
  }
@@ -202,7 +202,7 @@ export function renderDagGraph(dag, dagRunId, existingWrap = null) {
202
202
  width: layout.width,
203
203
  height: layout.height,
204
204
  role: "img",
205
- "aria-label": `DAG 依赖图,共 ${nodes.length} 个节点`,
205
+ "aria-label": `执行步骤关系,共 ${nodes.length} 个步骤`,
206
206
  });
207
207
  const defs = svgEl("defs");
208
208
  const marker = svgEl("marker", {