@tea-agent/loop-agent 0.42.0-next.10 → 0.42.0-next.11
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 +2 -0
- package/dist/build-stamp.json +3 -3
- package/dist/executors/dag-pi-executor.js +33 -1
- package/dist/executors/pi-extension-resolver.js +14 -2
- package/dist/worker/observe/static/constants.js +22 -22
- package/dist/worker/observe/static/dag-context-reason-labels.js +19 -0
- package/dist/worker/observe/static/dag-history-labels.js +1 -0
- package/dist/worker/observe/static/dag-inspector-humanize.d.ts +16 -0
- package/dist/worker/observe/static/dag-inspector-humanize.js +339 -0
- package/dist/worker/observe/static/dag-node-purpose.js +10 -10
- package/dist/worker/observe/static/index.html +4 -4
- package/dist/worker/observe/static/prompt-restart-candidates.js +4 -2
- package/dist/worker/observe/static/relations.js +5 -5
- package/dist/worker/observe/static/styles.css +136 -0
- package/dist/worker/observe/static/views/dag-graph.js +1 -1
- package/dist/worker/observe/static/views/dag-inspector.js +322 -174
- package/dist/worker/observe/static/views/dag.js +16 -12
- package/dist/worker/observe/static/views/session-timeline.js +5 -3
- package/dist/workflows/dag/backend-test-plan-protocol.js +104 -0
- package/dist/workflows/dag/init-hybrid.js +4 -3
- package/dist/workflows/dag/node-execution.js +26 -0
- package/dist/workflows/dag/retry-policy.js +11 -0
- package/docs/templates/backend-test-dag.json +6 -4
- package/package.json +1 -1
|
@@ -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"
|
|
136
|
-
<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
|
|
243
|
+
<h2>异常任务</h2>
|
|
244
244
|
<p>按运行状态和建议跟进项集中处理需要人工介入的 Task。</p>
|
|
245
245
|
</div>
|
|
246
246
|
<div id="failures-empty" class="panel empty-state" hidden>
|
|
247
|
-
|
|
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: "
|
|
74
|
-
task: "
|
|
75
|
-
batch: "
|
|
76
|
-
run: "
|
|
77
|
-
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":
|
|
205
|
+
"aria-label": `执行步骤关系,共 ${nodes.length} 个步骤`,
|
|
206
206
|
});
|
|
207
207
|
const defs = svgEl("defs");
|
|
208
208
|
const marker = svgEl("marker", {
|