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

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/dist/build-stamp.json +3 -3
  3. package/dist/worker/console/chat/routes.js +14 -11
  4. package/dist/worker/console/chat/sdd-data-alignment.js +13 -2
  5. package/dist/worker/console/chat/session-store.js +5 -1
  6. package/dist/worker/console/chat/turn-process.js +1 -0
  7. package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-CcS17TBr.js → abnfDiagram-N423BO3Z-BGMbAdAG.js} +1 -1
  8. package/dist/worker/console/static/assets/{arc-COptKq2S.js → arc-CJu1LND8.js} +1 -1
  9. package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-h4LKMHjP.js → architectureDiagram-T3A2C74G-BmJh9gMQ.js} +1 -1
  10. package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-COA1MOH0.js → blockDiagram-VBNYF7ZC-BWjaX3ZF.js} +1 -1
  11. package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-DJUf0QPm.js → c4Diagram-5PPSVZJV-CLEOAxLB.js} +1 -1
  12. package/dist/worker/console/static/assets/channel-DOsaUk1k.js +1 -0
  13. package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-mtWfKrUX.js → chunk-2GRJ4B5K-CydnyQUX.js} +1 -1
  14. package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-B8pXsxDQ.js → chunk-2Q5K7J3B-tjJ1IoZ1.js} +1 -1
  15. package/dist/worker/console/static/assets/{chunk-5RXB4S5H-ipKzByl1.js → chunk-5RXB4S5H-DR358Phd.js} +1 -1
  16. package/dist/worker/console/static/assets/{chunk-5VM5RSS4-DYi3Ald_.js → chunk-5VM5RSS4-B-LuWFZD.js} +1 -1
  17. package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-DQtGYoty.js → chunk-6Q2QTUOP-FG53fA6v.js} +1 -1
  18. package/dist/worker/console/static/assets/{chunk-GF5L2VYU-BU0qS2YV.js → chunk-GF5L2VYU-Bkt-w8SZ.js} +1 -1
  19. package/dist/worker/console/static/assets/{chunk-JWPE2WC7-DVH9dIGE.js → chunk-JWPE2WC7-WxHo0z2I.js} +1 -1
  20. package/dist/worker/console/static/assets/{chunk-KBJHAD2P-Dt60SmgM.js → chunk-KBJHAD2P-CqHrBJhp.js} +1 -1
  21. package/dist/worker/console/static/assets/{chunk-RYQCIY6F-BoaUGuEY.js → chunk-RYQCIY6F-D4MVae_f.js} +1 -1
  22. package/dist/worker/console/static/assets/{chunk-XXDRQBXY-_WHFDTp2.js → chunk-XXDRQBXY-CamBh0Ll.js} +1 -1
  23. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-D4-D49vY.js +1 -0
  24. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-D4-D49vY.js +1 -0
  25. package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BxkbTIRd.js → cose-bilkent-JH36ORCC-C3qheCuW.js} +1 -1
  26. package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-Bf2UVnoG.js → cynefin-VYW2F7L2-DQlWfkS7.js} +1 -1
  27. package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-Bo23q1J_.js → cynefinDiagram-MW4NZA55-BAxa9rFb.js} +1 -1
  28. package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-Dd_UU49i.js → dagre-VZM6K2ZE-YM09nLJw.js} +1 -1
  29. package/dist/worker/console/static/assets/{diagram-7IWD3JNH-ebUa1a9y.js → diagram-7IWD3JNH-I4W9EJj2.js} +1 -1
  30. package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-BucthU8r.js → diagram-B4RE2ZJO-DH8eJ8Ff.js} +1 -1
  31. package/dist/worker/console/static/assets/{diagram-LBJQPF4R-BgqNpAkm.js → diagram-LBJQPF4R-D0D0ntDW.js} +1 -1
  32. package/dist/worker/console/static/assets/{diagram-Q27KOJAE-DC4q5NGa.js → diagram-Q27KOJAE-BIISKq1s.js} +1 -1
  33. package/dist/worker/console/static/assets/{diagram-UB23O5K3-CBqCaMeb.js → diagram-UB23O5K3--xyAWj0w.js} +1 -1
  34. package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-CGtnbQ3-.js → ebnfDiagram-BXEA7PRR-B3sYXLJ4.js} +1 -1
  35. package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-CG3LUao5.js → erDiagram-JOGREHBK-zRSYWhJP.js} +1 -1
  36. package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-D2ZVgoFS.js → flowDiagram-UKHOOZJN-BUYlie03.js} +1 -1
  37. package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-DoYFZiKt.js → ganttDiagram-PKOTCBZU-DP4kzzrM.js} +1 -1
  38. package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-CKoP1s6j.js → gitGraphDiagram-DS77QQ5N-CAPoUxTF.js} +1 -1
  39. package/dist/worker/console/static/assets/index-CWhTyxvc.js +449 -0
  40. package/dist/worker/console/static/assets/{index-CAZ2fC_X.css → index-Dh0Gh4X0.css} +1 -1
  41. package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-Duofv8p2.js → infoDiagram-6WML65LV-BXPfjekV.js} +1 -1
  42. package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-D2nlCkA1.js → ishikawaDiagram-WSZJBQD7-aOI3pV6t.js} +1 -1
  43. package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-Dd4IHdus.js → journeyDiagram-NVQOT4AX-DAPZuvi4.js} +1 -1
  44. package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-Bi20AOdt.js → kanban-definition-27J2QSJJ-atwDzL3C.js} +1 -1
  45. package/dist/worker/console/static/assets/{linear-D59YJ9kB.js → linear-D5E09qji.js} +1 -1
  46. package/dist/worker/console/static/assets/{mermaid.core-Bl13LpNa.js → mermaid.core-CE4idY-s.js} +5 -5
  47. package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-C6DLP5eY.js → mindmap-definition-FAOFIHXS-CbZxtPca.js} +1 -1
  48. package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-BjO4cy64.js → pegDiagram-VL7TDLO6-De-FYEte.js} +1 -1
  49. package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-D7i2qZTG.js → pieDiagram-7S7Q4E2Y-Bs0USobz.js} +1 -1
  50. package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-Dx8o_h0y.js → quadrantDiagram-CIZ2JOQS-Bq3ZrGCJ.js} +1 -1
  51. package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-B55orI_t.js → railroadDiagram-AXF67PYL-Bk8ojyIj.js} +1 -1
  52. package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-zWaehp6f.js → requirementDiagram-LRYGKXZP-CGhoyws1.js} +1 -1
  53. package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-CcA-pjvD.js → sankeyDiagram-W5VNT64P-DmVSQs3b.js} +1 -1
  54. package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-BOFbzNHI.js → sequenceDiagram-SI44F4Z6-C80h1u0Q.js} +1 -1
  55. package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-BjAejah1.js → sizeCapture-X5ZJPWSS-CcbksQVZ.js} +1 -1
  56. package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-DXYwxJwZ.js → stateDiagram-OKZ733FA-CFTTTQKj.js} +1 -1
  57. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-C4YCesmi.js +1 -0
  58. package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-OYiOch8n.js → swimlanes-SLNWSIFB-Cw7Jr7Tg.js} +2 -2
  59. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-lN2U_DLl.js +8 -0
  60. package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-cZfH3nmU.js → timeline-definition-Z64GVDOM-CVcdTVa5.js} +1 -1
  61. package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-BDE7b3E1.js → vennDiagram-T6HMQDX7-BpLbmWp9.js} +1 -1
  62. package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-kyyGy9WJ.js → wardleyDiagram-T6FBY63Y-6PXfbwj-.js} +1 -1
  63. package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-CJj6VTog.js → xychartDiagram-ELKLHX3M-Bjkcz4ih.js} +1 -1
  64. package/dist/worker/console/static/index.html +2 -2
  65. package/dist/worker/console/static-src/chat-view-types.js +1 -1
  66. package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +23 -0
  67. package/dist/worker/console/static-src/operator-chat/pending-user-message.js +32 -0
  68. package/dist/worker/console/static-src/operator-chat/turn-stream-controller.js +2 -0
  69. package/dist/worker/console/static-src/operator-chat/useChatStream.js +30 -14
  70. package/dist/worker/console/static-src/operator-chat/useChatThread.js +21 -1
  71. package/dist/worker/console/static-src/shell/workspace-route.js +4 -0
  72. package/dist/worker/observe/static/styles.css +42 -7
  73. package/dist/worker/observe/static/views/dag-inspector.js +8 -1
  74. package/dist/workflows/dag/frontend-implementation-contract.js +21 -0
  75. package/dist/workflows/dag/frontend-recovery-run.js +36 -1
  76. package/harness.json +1 -1
  77. package/package.json +1 -1
  78. package/skills/frontend-plan/references/decision-contract.md +22 -0
  79. package/dist/worker/console/static/assets/channel-DdBCaOJ6.js +0 -1
  80. package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-DZFra1GO.js +0 -1
  81. package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-DZFra1GO.js +0 -1
  82. package/dist/worker/console/static/assets/index-vbTcFnFs.js +0 -449
  83. package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-Clg3V9t1.js +0 -1
  84. package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-DX1dxAAW.js +0 -8
@@ -1051,7 +1051,14 @@ function appendMetaRow(dl, label, value, source) {
1051
1051
  copy.help ? `含义:${copy.help}` : null,
1052
1052
  copy.rawLabel ? `技术字段:${copy.rawLabel}` : null,
1053
1053
  ].filter(Boolean);
1054
- if (labelHelp.length > 0) dt.setAttribute("title", labelHelp.join("\n"));
1054
+ if (labelHelp.length > 0) {
1055
+ const tooltipText = labelHelp.join("\n");
1056
+ const help = el("span", "node-input-summary-help", "?");
1057
+ help.tabIndex = 0;
1058
+ help.setAttribute("data-tooltip", tooltipText);
1059
+ help.setAttribute("aria-label", tooltipText);
1060
+ dt.appendChild(help);
1061
+ }
1055
1062
  if (copy.rawValue) dd.setAttribute("title", `原始值:${copy.rawValue}`);
1056
1063
  const inherited = sourceLabel(source);
1057
1064
  if (inherited) {
@@ -843,6 +843,27 @@ export const frontendImplementationContractSchema = z
843
843
  });
844
844
  }
845
845
  }
846
+ // Behavior evidence must be anchored to be machine-traceable: a
847
+ // behavior target that names no requirement and no UI state produces
848
+ // coverage the trace gate and review cannot verify. Contracts that
849
+ // declare no UI state and no interaction (pure-logic) are exempt from
850
+ // the UI-state half — the schema allows `uiStates: []` there.
851
+ if (target.mode === "behavior" && target.requirementIds.length === 0) {
852
+ ctx.addIssue({
853
+ code: "custom",
854
+ message: `behavior verification target ${target.id} must reference at least one requirement`,
855
+ path: ["verificationTargets"],
856
+ });
857
+ }
858
+ if (target.mode === "behavior" &&
859
+ target.uiStates.length === 0 &&
860
+ (value.uiStates.length > 0 || value.interactions.length > 0)) {
861
+ ctx.addIssue({
862
+ code: "custom",
863
+ message: `behavior verification target ${target.id} must reference at least one declared UI state`,
864
+ path: ["verificationTargets"],
865
+ });
866
+ }
846
867
  }
847
868
  for (const requirement of value.requirements) {
848
869
  if (!known.has(requirement.id))
@@ -5,6 +5,8 @@ import { sha256Hex } from "./frontend-implementation-contract.js";
5
5
  import { FRONTEND_RECOVERY_IMPORT_MANIFEST_REL_PATH, FRONTEND_RECOVERY_INTENT_REL_DIR, FRONTEND_RECOVERY_STAGING_PREFIX, computeFrontendRecoveryPlan, computeFrontendRecoveryPlanForSource, } from "./frontend-recovery-plan.js";
6
6
  import { dagRunDirExists, getDagRunDir, locateDagRun, readDagRunSpec, readDagRunState, transferDagRunDir, writeDagRunState, } from "./lifecycle.js";
7
7
  import { buildDagRunId } from "./runner.js";
8
+ import { buildFrontendTopologyBinding } from "./frontend-shape.js";
9
+ import { FRONTEND_SHAPE_BOUNDARIES, isCanonicalFrontendShapeDag, } from "./frontend-shape-facts.js";
8
10
  import { prepareRunDir, writeNodeRecord } from "./run-store.js";
9
11
  import { FRONTEND_WRITER_ADMISSION_RESULT_ARTIFACT, readFrontendWriterAdmissionResult, } from "./scheduler.js";
10
12
  import { topoSortToRanks } from "./topo.js";
@@ -394,6 +396,22 @@ async function materializeChildStaging(input) {
394
396
  newRunDir: stagingDir,
395
397
  relativePath: FRONTEND_WRITER_ADMISSION_RESULT_ARTIFACT,
396
398
  });
399
+ // The scheduler gates every shape boundary by its committed fact once the
400
+ // boundary's source node is FINISHED. Imported nodes stay FINISHED in the
401
+ // child, so their boundaries must inherit the parent's committed facts or
402
+ // the child hard-blocks at the first gated rank. Reset boundaries re-commit
403
+ // their own facts when their source nodes re-run.
404
+ const inheritedCommittedFacts = {};
405
+ if (isCanonicalFrontendShapeDag(new Map(childSpec.tasks.map((task) => [task.id, task])))) {
406
+ for (const entry of FRONTEND_SHAPE_BOUNDARIES) {
407
+ if (!importedSet.has(entry.sourceNodeId))
408
+ continue;
409
+ const parentFact = parentState.frontendShapeState?.committedFacts[entry.boundary];
410
+ if (parentFact) {
411
+ inheritedCommittedFacts[entry.boundary] = structuredClone(parentFact);
412
+ }
413
+ }
414
+ }
397
415
  const childState = {
398
416
  version: 1,
399
417
  title: parentSpec.title,
@@ -403,6 +421,18 @@ async function materializeChildStaging(input) {
403
421
  status: "pending",
404
422
  ranks,
405
423
  nodes,
424
+ // Mirror createInitialRunState: a canonical frontend child must carry its
425
+ // own frozen topology binding or executeDag's binding assert rejects the
426
+ // staged child before its first node runs.
427
+ ...(isCanonicalFrontendShapeDag(new Map(childSpec.tasks.map((task) => [task.id, task])))
428
+ ? {
429
+ frontendShapeState: {
430
+ frozenTopology: buildFrontendTopologyBinding(childSpec.tasks.map((task) => task.id)),
431
+ revision: 0,
432
+ committedFacts: inheritedCommittedFacts,
433
+ },
434
+ }
435
+ : {}),
406
436
  frontendRecoveryState: {
407
437
  schemaVersion: 1,
408
438
  phase: "child-running",
@@ -579,8 +609,13 @@ export async function stageRecoveryChild(options) {
579
609
  // buildDagRunId is deterministic for the same task title on the same day. A
580
610
  // recovery child must never reuse its still-active parent directory, or the
581
611
  // staging path aliases the parent and the required import manifest is absent.
612
+ // The default builder must receive `{ cwd }` (its options object), not the
613
+ // bare string: only the options form enables the collision-safe `-rN`
614
+ // suffix across active/completed/paused runs.
582
615
  const childRunId = recovery.childRunId ?? await (async () => {
583
- const generatedChildRunId = await (options.buildChildRunId ?? buildDagRunId)(parentSpec, cwd);
616
+ const generatedChildRunId = options.buildChildRunId
617
+ ? await options.buildChildRunId(parentSpec, cwd)
618
+ : await buildDagRunId(parentSpec, { cwd });
584
619
  return generatedChildRunId === parentRunId
585
620
  ? `${generatedChildRunId}-recovery-${requestId.slice(0, 8)}`
586
621
  : generatedChildRunId;
package/harness.json CHANGED
@@ -82,7 +82,7 @@
82
82
  "executors": {
83
83
  "pi": {
84
84
  "description": "Pi 负责规划、评审、诊断;当 DAG toolProfile=write 时也可做有界写入。模型按复杂度三档配置,支持 provider/model 字符串或带 thinking 的对象;斜杠前为 Pi provider,后为 modelId,勿只写裸 modelId。",
85
- "LOW": "wizard-local/minimax-m3",
85
+ "LOW": "wizard-local/glm-5.3-flash",
86
86
  "MED": "wizard-local/glm-5.3",
87
87
  "HIGH": "wizard-local/gpt-5.6-sol"
88
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tea-agent/loop-agent",
3
- "version": "0.42.0-next.12",
3
+ "version": "0.42.0-next.14",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "loop-agent": "bin/loop-agent.js",
@@ -14,6 +14,28 @@
14
14
  - Static targets are for project-wide commands and are traced by file and command
15
15
  only.
16
16
 
17
+ ### Behavior target shape (canonical example)
18
+
19
+ Behavior targets are machine-traced evidence: each one must name the requirements
20
+ it proves and the declared UI states it exercises. Empty `requirementIds` or empty
21
+ `uiStates` (when the contract declares any UI state or interaction) is rejected at
22
+ plan validation — fix the mapping, do not resubmit unchanged. State names must be
23
+ copied verbatim from the declared `uiStates`; never invent synonyms.
24
+
25
+ ```json
26
+ {
27
+ "id": "VT-COUNTER-LOCAL-CONSTRAINTS",
28
+ "file": "src/App.test.tsx",
29
+ "requirementIds": ["AC-FE-001", "AC-FE-005"],
30
+ "uiStates": ["disabled-minus", "default"]
31
+ }
32
+ ```
33
+
34
+ `stylingStrategy` describes how the frozen look is achieved; it must stay inside
35
+ the task's declared scope. Capabilities the task source lists as non-goals (e.g.
36
+ responsive/mobile layout, animations) must not be promised here, and themes or
37
+ CSS conventions must not be claimed without a Scout-confirmed repository fact.
38
+
17
39
  ## Global decisions
18
40
 
19
41
  Keep route/component placement, Mock/data strategy, and dependency/deviation policy
@@ -1 +0,0 @@
1
- import{ag as o,ah as n}from"./mermaid.core-Bl13LpNa.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-GF5L2VYU-BU0qS2YV.js";import{_ as i}from"./mermaid.core-Bl13LpNa.js";import"./chunk-5VM5RSS4-DYi3Ald_.js";import"./chunk-XXDRQBXY-_WHFDTp2.js";import"./chunk-KBJHAD2P-Dt60SmgM.js";import"./chunk-2GRJ4B5K-mtWfKrUX.js";import"./index-vbTcFnFs.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-GF5L2VYU-BU0qS2YV.js";import{_ as i}from"./mermaid.core-Bl13LpNa.js";import"./chunk-5VM5RSS4-DYi3Ald_.js";import"./chunk-XXDRQBXY-_WHFDTp2.js";import"./chunk-KBJHAD2P-Dt60SmgM.js";import"./chunk-2GRJ4B5K-mtWfKrUX.js";import"./index-vbTcFnFs.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};