@linghun/tui 0.1.0 → 0.1.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.
Files changed (208) hide show
  1. package/dist/agent-completion-finalizer.js +3 -3
  2. package/dist/background-control-runtime.js +56 -55
  3. package/dist/cache-command-runtime.js +3 -3
  4. package/dist/capability-runtime.js +35 -34
  5. package/dist/{chunk-TJLC3QAS.js → chunk-36ZWUJQS.js} +1 -1
  6. package/dist/{chunk-JDWXC2OQ.js → chunk-3MRYQO7X.js} +4 -4
  7. package/dist/{chunk-2FVEKTKN.js → chunk-3PG7I3LA.js} +4 -4
  8. package/dist/{chunk-J7ZE2JKP.js → chunk-42ZZUF7P.js} +3 -3
  9. package/dist/{chunk-DTK5NBTV.js → chunk-4BFCUJX6.js} +95 -11
  10. package/dist/{chunk-YH6UIHNF.js → chunk-4QWCNMP6.js} +2 -2
  11. package/dist/{chunk-WKMBK5UP.js → chunk-4TO2LDMP.js} +1 -1
  12. package/dist/chunk-4UER2AKI.js +636 -0
  13. package/dist/{chunk-WHFDDZHY.js → chunk-5IFNLTOF.js} +4 -4
  14. package/dist/{chunk-W3KHJNSH.js → chunk-6CHUZ2NF.js} +2 -2
  15. package/dist/{chunk-I3NTAIMF.js → chunk-6DBBXNEG.js} +3 -3
  16. package/dist/{chunk-GDQQNPBP.js → chunk-6GXIGN5W.js} +1 -1
  17. package/dist/{chunk-QLRTQHTR.js → chunk-6JGRNES6.js} +2 -2
  18. package/dist/{chunk-D7TCSOAZ.js → chunk-7BHMBWG2.js} +3 -3
  19. package/dist/{chunk-KO64OFSG.js → chunk-7C6T7RKJ.js} +1 -1
  20. package/dist/{chunk-4WHZ6JKD.js → chunk-7R4YXN7Z.js} +335 -63
  21. package/dist/{chunk-LDABZV5V.js → chunk-7RZE45OT.js} +1 -1
  22. package/dist/{chunk-MLUIOBKL.js → chunk-7ZMDQZ22.js} +4 -4
  23. package/dist/{chunk-X7A22JHP.js → chunk-A4H3UTJZ.js} +1 -1
  24. package/dist/{chunk-LVIM2PA7.js → chunk-AGI6GFFL.js} +3 -3
  25. package/dist/{chunk-D3UTL2QX.js → chunk-ATY7WBIT.js} +1 -1
  26. package/dist/{chunk-ZOSK2UEU.js → chunk-BBK5BA5C.js} +99 -117
  27. package/dist/{chunk-SRZIA6B4.js → chunk-BNC4F63N.js} +1 -1
  28. package/dist/{chunk-WQMSRO4D.js → chunk-CJRJR7TP.js} +5 -5
  29. package/dist/{chunk-OEYW3JE3.js → chunk-DIDRFIIW.js} +2 -2
  30. package/dist/{chunk-AKPXMCVF.js → chunk-EKYXI6C7.js} +11 -7
  31. package/dist/{chunk-GMUCSNUD.js → chunk-FGGY5KNM.js} +7 -7
  32. package/dist/{chunk-APJIC2O5.js → chunk-GTIZNO5O.js} +84 -0
  33. package/dist/{chunk-UOHZQIVL.js → chunk-GXFYUZAM.js} +1 -1
  34. package/dist/{chunk-DDXS2RDZ.js → chunk-HGCTHBUY.js} +1 -1
  35. package/dist/{chunk-QTDGRZMZ.js → chunk-HJOC5WUV.js} +1 -1
  36. package/dist/{chunk-ECFLCY5V.js → chunk-HPIHFENG.js} +2 -2
  37. package/dist/{chunk-SYBNJZEL.js → chunk-HPMBSOQ4.js} +1 -1
  38. package/dist/{chunk-QB4VWH7W.js → chunk-HPQ2IHOW.js} +4 -4
  39. package/dist/{chunk-RVY34HK4.js → chunk-HZ5XNKWS.js} +5 -2
  40. package/dist/{chunk-4K6UB524.js → chunk-IPZZGDUU.js} +1 -1
  41. package/dist/{chunk-JHGWGH2C.js → chunk-J6CYFWSW.js} +89 -7
  42. package/dist/{chunk-6CI6TKLN.js → chunk-JAVRQ3LM.js} +1 -1
  43. package/dist/{chunk-VCSRBS47.js → chunk-JLAJZPOC.js} +1 -1
  44. package/dist/{chunk-THZBFYAH.js → chunk-JY3LI63F.js} +2 -2
  45. package/dist/{chunk-RMLTVKOY.js → chunk-L4YVE3RG.js} +2 -2
  46. package/dist/{chunk-P277M7Z5.js → chunk-LBC75QAB.js} +1 -1
  47. package/dist/{chunk-F6TVBCZV.js → chunk-LWW2IAFC.js} +1 -1
  48. package/dist/{chunk-64MJP6FK.js → chunk-NK4NMYF5.js} +52 -10
  49. package/dist/{chunk-DNQN74CC.js → chunk-NL4M3V5D.js} +33 -0
  50. package/dist/{chunk-OF3K3CU5.js → chunk-O2U4XQVM.js} +2 -2
  51. package/dist/{chunk-LQTVYUT3.js → chunk-OJTMM5CV.js} +2 -2
  52. package/dist/{chunk-HW2TBXVK.js → chunk-OPVRII63.js} +1 -1
  53. package/dist/{chunk-ZZ2CNCXJ.js → chunk-OSFBVVEP.js} +4 -4
  54. package/dist/{chunk-F43AMWLZ.js → chunk-PDTJVJVD.js} +1 -1
  55. package/dist/{chunk-UDQT5CWK.js → chunk-PI6T2AGS.js} +1 -1
  56. package/dist/{chunk-JO5ANTMR.js → chunk-PPUOHBAK.js} +84 -37
  57. package/dist/{chunk-N7G2X2LK.js → chunk-QD4SCW4A.js} +235 -198
  58. package/dist/{chunk-SOPYWTFV.js → chunk-RRUI3VWQ.js} +1 -1
  59. package/dist/{chunk-IN42UISW.js → chunk-SRJ4XWOR.js} +10 -5
  60. package/dist/{chunk-6RJVTUWI.js → chunk-T6UOCF5D.js} +5 -1
  61. package/dist/{chunk-VTQL23UM.js → chunk-TVNWAEJR.js} +1 -1
  62. package/dist/chunk-TY4KIVA6.js +50 -0
  63. package/dist/{chunk-UT2TYK2A.js → chunk-TYTVAFGB.js} +1 -1
  64. package/dist/{chunk-OMZYPQVA.js → chunk-UGYFQF6M.js} +1 -1
  65. package/dist/{chunk-TYF4GJR3.js → chunk-UIKN3CDF.js} +4 -4
  66. package/dist/{chunk-JGDIO2NF.js → chunk-UO3KYTBU.js} +1 -1
  67. package/dist/{chunk-KI7C6ZOD.js → chunk-VIJ7GDKI.js} +1 -1
  68. package/dist/{chunk-NKFKOEYX.js → chunk-WCMHJ6SS.js} +1 -1
  69. package/dist/{chunk-EORRZP3F.js → chunk-WX2OTJXL.js} +1 -1
  70. package/dist/{chunk-BOV4K7FP.js → chunk-WXTHKLNH.js} +9 -1
  71. package/dist/{chunk-CRQORMFF.js → chunk-X37FSYAX.js} +1 -1
  72. package/dist/{chunk-JQCRCDOC.js → chunk-X7E34LKV.js} +15 -15
  73. package/dist/chunk-X7HMDZZQ.js +85 -0
  74. package/dist/{chunk-B4GQTZMT.js → chunk-YDTJ7UBG.js} +4 -4
  75. package/dist/{chunk-K56D3X7S.js → chunk-YKOXJQGX.js} +34 -2
  76. package/dist/{chunk-3GCIXKCI.js → chunk-YLOJWSHB.js} +9 -5
  77. package/dist/{chunk-GKZYTPN2.js → chunk-YMEMN5FG.js} +1 -1
  78. package/dist/chunk-YQNK7HK3.js +87 -0
  79. package/dist/{chunk-M4AIK2SP.js → chunk-Z265MCGC.js} +15 -11
  80. package/dist/{chunk-FTAEPAVY.js → chunk-ZF36LULR.js} +4 -4
  81. package/dist/{chunk-66BNE332.js → chunk-ZJDPYOTK.js} +4 -4
  82. package/dist/{chunk-RM5QMOFY.js → chunk-ZKPQ4KLK.js} +1 -1
  83. package/dist/command-panel-runtime.js +34 -33
  84. package/dist/compact-cache-command-runtime.js +56 -55
  85. package/dist/compact-preflight-runtime.js +21 -21
  86. package/dist/connector-runtime.js +36 -35
  87. package/dist/deep-compact-runtime.js +6 -6
  88. package/dist/deferred-tools-catalog.js +5 -5
  89. package/dist/details-status-runtime.js +34 -33
  90. package/dist/evidence-runtime.d.ts.map +1 -1
  91. package/dist/evidence-runtime.js +12 -12
  92. package/dist/extension-command-runtime.js +7 -7
  93. package/dist/extension-slash-runtime.js +35 -34
  94. package/dist/failure-learning-command-runtime.js +36 -35
  95. package/dist/failure-learning-presenter.js +4 -4
  96. package/dist/failure-learning-runtime.js +3 -3
  97. package/dist/final-answer-gate.js +2 -2
  98. package/dist/git-command-runtime.js +35 -34
  99. package/dist/handoff-session-runtime.js +8 -8
  100. package/dist/headless-bench-runtime.d.ts +108 -0
  101. package/dist/headless-bench-runtime.d.ts.map +1 -0
  102. package/dist/headless-bench-runtime.js +30 -0
  103. package/dist/index-result-presenter.js +5 -5
  104. package/dist/index-runtime.js +5 -5
  105. package/dist/index.d.ts +31 -0
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +531 -78
  108. package/dist/job-agent-command-runtime.d.ts +2 -1
  109. package/dist/job-agent-command-runtime.d.ts.map +1 -1
  110. package/dist/job-agent-command-runtime.js +34 -33
  111. package/dist/job-runner-presenter.js +3 -3
  112. package/dist/job-runtime.js +9 -9
  113. package/dist/mcp-index-command-runtime.js +5 -5
  114. package/dist/mcp-index-runtime.js +39 -38
  115. package/dist/mcp-sse-runtime.js +3 -3
  116. package/dist/mcp-stdio-runtime.js +4 -4
  117. package/dist/memory-command-runtime.js +36 -35
  118. package/dist/memory-extraction-runtime.js +3 -3
  119. package/dist/memory-rules-runtime.js +3 -3
  120. package/dist/meta-scheduler-runtime.d.ts +10 -0
  121. package/dist/meta-scheduler-runtime.d.ts.map +1 -1
  122. package/dist/meta-scheduler-runtime.js +2 -1
  123. package/dist/model-command-runtime.js +35 -34
  124. package/dist/model-loop-runtime.d.ts +1 -1
  125. package/dist/model-loop-runtime.d.ts.map +1 -1
  126. package/dist/model-loop-runtime.js +1 -1
  127. package/dist/model-prompt-runtime.d.ts.map +1 -1
  128. package/dist/model-prompt-runtime.js +10 -10
  129. package/dist/model-stream-runtime.d.ts +4 -0
  130. package/dist/model-stream-runtime.d.ts.map +1 -1
  131. package/dist/model-stream-runtime.js +56 -55
  132. package/dist/model-tool-runtime.d.ts +3 -2
  133. package/dist/model-tool-runtime.d.ts.map +1 -1
  134. package/dist/model-tool-runtime.js +58 -55
  135. package/dist/pending-details-presenter.js +3 -3
  136. package/dist/permission-approval-runtime.js +56 -55
  137. package/dist/permission-continuation-runtime.d.ts.map +1 -1
  138. package/dist/permission-continuation-runtime.js +4 -4
  139. package/dist/process-command-runtime.d.ts.map +1 -1
  140. package/dist/process-command-runtime.js +4 -4
  141. package/dist/process-guard.d.ts +3 -0
  142. package/dist/process-guard.d.ts.map +1 -1
  143. package/dist/process-guard.js +1 -1
  144. package/dist/provider-loop-runtime.js +3 -3
  145. package/dist/remote-command-runtime.js +35 -34
  146. package/dist/runner-runtime.js +8 -8
  147. package/dist/runtime-status-presenter.js +3 -3
  148. package/dist/runtime-status-snapshot.js +4 -4
  149. package/dist/shell/components/AgentProgressTree.js +2 -2
  150. package/dist/shell/components/BackgroundTaskOverlay.js +2 -2
  151. package/dist/shell/components/BtwPanel.js +2 -2
  152. package/dist/shell/components/CommandPanel.js +2 -2
  153. package/dist/shell/components/Composer.d.ts +16 -2
  154. package/dist/shell/components/Composer.d.ts.map +1 -1
  155. package/dist/shell/components/Composer.js +9 -7
  156. package/dist/shell/components/ConfigPanel.js +2 -2
  157. package/dist/shell/components/HelpPanel.js +2 -2
  158. package/dist/shell/components/HistorySearchPanel.js +2 -2
  159. package/dist/shell/components/MessageMarkdown.d.ts +23 -0
  160. package/dist/shell/components/MessageMarkdown.d.ts.map +1 -1
  161. package/dist/shell/components/MessageMarkdown.js +5 -3
  162. package/dist/shell/components/MouseInputRouter.js +5 -80
  163. package/dist/shell/components/OutputLine.d.ts.map +1 -1
  164. package/dist/shell/components/OutputLine.js +5 -3
  165. package/dist/shell/components/ProductBlock.d.ts.map +1 -1
  166. package/dist/shell/components/ProductBlock.js +5 -5
  167. package/dist/shell/components/ScrollViewport.js +3 -82
  168. package/dist/shell/components/SessionsPanel.js +2 -2
  169. package/dist/shell/components/ShellApp.d.ts.map +1 -1
  170. package/dist/shell/components/ShellApp.js +29 -24
  171. package/dist/shell/components/SlashSuggestions.js +2 -2
  172. package/dist/shell/components/StatusFooter.js +2 -2
  173. package/dist/shell/components/StatusTray.d.ts.map +1 -1
  174. package/dist/shell/components/StatusTray.js +2 -1
  175. package/dist/shell/components/StructuredDiff.js +2 -2
  176. package/dist/shell/components/TaskListView.js +2 -2
  177. package/dist/shell/components/TaskSuggestionBar.js +2 -2
  178. package/dist/shell/components/WorkflowProgressView.js +2 -2
  179. package/dist/shell/components/useAnchoredCursor.d.ts +6 -9
  180. package/dist/shell/components/useAnchoredCursor.d.ts.map +1 -1
  181. package/dist/shell/components/useAnchoredCursor.js +1 -1
  182. package/dist/shell/ink-renderer.d.ts.map +1 -1
  183. package/dist/shell/ink-renderer.js +29 -24
  184. package/dist/shell/models/transcript-selection-state.js +2 -2
  185. package/dist/shell/plain-renderer.d.ts.map +1 -1
  186. package/dist/shell/plain-renderer.js +2 -2
  187. package/dist/shell/text-utils.d.ts +16 -0
  188. package/dist/shell/text-utils.d.ts.map +1 -1
  189. package/dist/shell/text-utils.js +3 -1
  190. package/dist/shell/view-model.js +14 -14
  191. package/dist/slash-command-runtime.js +56 -55
  192. package/dist/slash-dispatch.js +4 -4
  193. package/dist/startup-runtime.js +2 -2
  194. package/dist/tool-output-presenter.d.ts.map +1 -1
  195. package/dist/tool-output-presenter.js +1 -1
  196. package/dist/tui-agent-job-runtime.js +11 -11
  197. package/dist/tui-data-types.d.ts +10 -0
  198. package/dist/tui-data-types.d.ts.map +1 -1
  199. package/dist/tui-details-runtime.js +10 -10
  200. package/dist/tui-memory-runtime.js +5 -5
  201. package/dist/tui-output-surface.js +15 -15
  202. package/dist/tui-permission-runtime.js +5 -5
  203. package/dist/tui-state-runtime.js +4 -4
  204. package/dist/verification-command-runtime.js +12 -12
  205. package/dist/workflow-command-runtime.d.ts.map +1 -1
  206. package/dist/workflow-command-runtime.js +34 -33
  207. package/package.json +5 -5
  208. package/dist/chunk-GW5YDCRZ.js +0 -42
@@ -9,21 +9,21 @@ import {
9
9
  getDurableJobPaths,
10
10
  getDurableJobsRoot,
11
11
  listDurableJobs
12
- } from "./chunk-TYF4GJR3.js";
12
+ } from "./chunk-UIKN3CDF.js";
13
13
  import {
14
14
  formatJobNextAction,
15
15
  mapDurableJobToBackgroundResult,
16
16
  mapDurableJobToBackgroundStatus
17
- } from "./chunk-UDQT5CWK.js";
17
+ } from "./chunk-PI6T2AGS.js";
18
18
  import {
19
19
  MAX_BACKGROUND_TASKS
20
20
  } from "./chunk-RDGM4RUE.js";
21
21
  import {
22
22
  formatIndexRuntimeRef
23
- } from "./chunk-UT2TYK2A.js";
23
+ } from "./chunk-TYTVAFGB.js";
24
24
  import {
25
25
  truncateDisplay
26
- } from "./chunk-OMZYPQVA.js";
26
+ } from "./chunk-UGYFQF6M.js";
27
27
 
28
28
  // src/tui-agent-job-runtime.ts
29
29
  function isAgentType(value) {
@@ -2,7 +2,7 @@ import {
2
2
  displayWidth,
3
3
  fitText,
4
4
  wrapText
5
- } from "./chunk-APJIC2O5.js";
5
+ } from "./chunk-GTIZNO5O.js";
6
6
 
7
7
  // src/shell/components/StructuredDiff.tsx
8
8
  import { Box, Text } from "@linghun/ink-runtime";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  formatDisplayPath,
3
3
  sanitizeDisplayPaths
4
- } from "./chunk-OMZYPQVA.js";
4
+ } from "./chunk-UGYFQF6M.js";
5
5
 
6
6
  // src/job-runner-presenter.ts
7
7
  function formatRunnerDoctor(resolution, expectedProtocol, sanitizeDiagnosticText) {
@@ -1,32 +1,15 @@
1
- import {
2
- createVerificationPlan,
3
- createVerificationUnavailableReport,
4
- runVerificationPlan
5
- } from "./chunk-WQMSRO4D.js";
6
1
  import {
7
2
  bridgeWorkflowPlanToMainChainRequests,
8
3
  decideWorkflowStepCapability
9
4
  } from "./chunk-V7GDHHBL.js";
10
- import {
11
- createLogArtifactRegistry,
12
- findEvidence,
13
- formatAgentDetails,
14
- formatEvidenceDetails,
15
- parseLogArtifactRequest
16
- } from "./chunk-THZBFYAH.js";
17
- import {
18
- createShellBlockOutputForTest,
19
- writeErrorLine
20
- } from "./chunk-ECFLCY5V.js";
21
5
  import {
22
6
  decidePermission
23
- } from "./chunk-DDXS2RDZ.js";
24
- import {
25
- formatModeBehavior
26
- } from "./chunk-4K6UB524.js";
7
+ } from "./chunk-HGCTHBUY.js";
27
8
  import {
28
- createVerificationLevelForReadiness
29
- } from "./chunk-PBIPV4LD.js";
9
+ createVerificationPlan,
10
+ createVerificationUnavailableReport,
11
+ runVerificationPlan
12
+ } from "./chunk-CJRJR7TP.js";
30
13
  import {
31
14
  createAgentBackgroundTask,
32
15
  createAgentContextSummary,
@@ -52,7 +35,24 @@ import {
52
35
  registerBackgroundAbortController,
53
36
  rememberBackgroundTask,
54
37
  upsertJobBackgroundTask
55
- } from "./chunk-ZZ2CNCXJ.js";
38
+ } from "./chunk-OSFBVVEP.js";
39
+ import {
40
+ createLogArtifactRegistry,
41
+ findEvidence,
42
+ formatAgentDetails,
43
+ formatEvidenceDetails,
44
+ parseLogArtifactRequest
45
+ } from "./chunk-JY3LI63F.js";
46
+ import {
47
+ createShellBlockOutputForTest,
48
+ writeErrorLine
49
+ } from "./chunk-HPIHFENG.js";
50
+ import {
51
+ formatModeBehavior
52
+ } from "./chunk-IPZZGDUU.js";
53
+ import {
54
+ createVerificationLevelForReadiness
55
+ } from "./chunk-PBIPV4LD.js";
56
56
  import {
57
57
  JOB_RECOVERY_HEARTBEAT_STALE_MS,
58
58
  appendJobLog,
@@ -68,27 +68,30 @@ import {
68
68
  rescheduleDurableJobAgents,
69
69
  updateDurableJobEffectiveAgentCap,
70
70
  writeDurableJobReport
71
- } from "./chunk-TYF4GJR3.js";
71
+ } from "./chunk-UIKN3CDF.js";
72
72
  import {
73
73
  markJobRunnerTerminal,
74
74
  refreshRunnerStatusForJob,
75
75
  startRunnerForDurableJob,
76
76
  stopRunnerForDurableJob
77
- } from "./chunk-B4GQTZMT.js";
77
+ } from "./chunk-YDTJ7UBG.js";
78
78
  import {
79
79
  formatLogArtifactSlice,
80
80
  readLogArtifactSlice
81
81
  } from "./chunk-L4XXW6Y5.js";
82
+ import {
83
+ formatEngineeringProfileStrategyHint
84
+ } from "./chunk-4UER2AKI.js";
82
85
  import {
83
86
  formatWorkflows
84
- } from "./chunk-LVIM2PA7.js";
87
+ } from "./chunk-AGI6GFFL.js";
85
88
  import {
86
89
  messages
87
90
  } from "./chunk-RBOQJFIZ.js";
88
91
  import {
89
92
  formatPermissionModeLabel,
90
93
  formatRuntimeStatusLine
91
- } from "./chunk-KI7C6ZOD.js";
94
+ } from "./chunk-VIJ7GDKI.js";
92
95
  import {
93
96
  formatBackgroundDetails,
94
97
  formatBackgroundOutputDetails,
@@ -96,13 +99,13 @@ import {
96
99
  formatBackgroundTaskPanelDetails,
97
100
  formatBackgroundTaskPanelRow,
98
101
  formatJobRunnerInline
99
- } from "./chunk-UDQT5CWK.js";
102
+ } from "./chunk-PI6T2AGS.js";
100
103
  import {
101
104
  appendSystemEvent,
102
105
  appendToolResultEvent,
103
106
  createEvidenceRecord,
104
107
  createToolEndEvent
105
- } from "./chunk-64MJP6FK.js";
108
+ } from "./chunk-NK4NMYF5.js";
106
109
  import {
107
110
  WORKFLOW_ARCHITECTURE_REVIEW_FILE_LIMIT
108
111
  } from "./chunk-RDGM4RUE.js";
@@ -112,14 +115,14 @@ import {
112
115
  import {
113
116
  loadOrCreateHandoffPacket,
114
117
  validateHandoffPacket
115
- } from "./chunk-MLUIOBKL.js";
118
+ } from "./chunk-7ZMDQZ22.js";
116
119
  import {
117
120
  AGENT_CONTROL_DESCRIPTION,
118
121
  AGENT_CONTROL_TOOL_NAME,
119
122
  createAgentControlInputSchema,
120
123
  createModelToolDefinitionsForTools,
121
124
  evaluateStructuredFinalAnswerClaims
122
- } from "./chunk-K56D3X7S.js";
125
+ } from "./chunk-YKOXJQGX.js";
123
126
  import {
124
127
  summarizeWorktreeCreateOutcome
125
128
  } from "./chunk-6USL33ZO.js";
@@ -129,7 +132,7 @@ import {
129
132
  import {
130
133
  createIndexStatusSnapshot,
131
134
  formatIndexRuntimeRef
132
- } from "./chunk-UT2TYK2A.js";
135
+ } from "./chunk-TYTVAFGB.js";
133
136
  import {
134
137
  isFallbackWorkspaceReferenceSnapshot
135
138
  } from "./chunk-ZJK25VFP.js";
@@ -168,14 +171,14 @@ import {
168
171
  enqueueAgentCompletionNotice,
169
172
  formatAgentCompletionDigest,
170
173
  markAgentCompletionNoticeReported
171
- } from "./chunk-SYBNJZEL.js";
174
+ } from "./chunk-HPMBSOQ4.js";
172
175
  import {
173
176
  formatError,
174
177
  sanitizeDiagnosticText,
175
178
  sanitizeDisplayPaths,
176
179
  truncateDisplay,
177
180
  writeLine
178
- } from "./chunk-OMZYPQVA.js";
181
+ } from "./chunk-UGYFQF6M.js";
179
182
  import {
180
183
  checkBoundaries,
181
184
  estimateFileMetrics
@@ -413,6 +416,17 @@ function buildWorkflowPlannerContextInput(context) {
413
416
  } : {}
414
417
  };
415
418
  }
419
+ function snapshotEngineeringSignal(context) {
420
+ const signal = context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal;
421
+ if (!signal) return void 0;
422
+ return {
423
+ profile: signal.profile,
424
+ strategyHint: signal.strategyHint,
425
+ artifactTargets: signal.artifactTargets.slice(),
426
+ ...signal.failureCategory ? { failureCategory: signal.failureCategory } : {},
427
+ ...signal.finalBoundaryHint ? { finalBoundaryHint: signal.finalBoundaryHint } : {}
428
+ };
429
+ }
416
430
  function syncSelectedWorkflowRun(context) {
417
431
  const runs = context.workflows.activeRuns ?? [];
418
432
  if (runs.length === 0) {
@@ -559,6 +573,7 @@ function recoverWorkflowRunState(state) {
559
573
  startedAt: state.startedAt,
560
574
  endedAt: state.endedAt,
561
575
  result: status === "completed" ? "partial" : status === "stale" ? "stale" : state.result,
576
+ ...state.engineeringSignal ? { engineeringSignal: state.engineeringSignal } : {},
562
577
  phaseGateConfirmed: state.phaseGateConfirmed === true,
563
578
  confirmedPhaseStopPoints: Array.isArray(state.confirmedPhaseStopPoints) ? state.confirmedPhaseStopPoints.filter((item) => typeof item === "string") : []
564
579
  };
@@ -795,6 +810,7 @@ async function runWorkflowPlanSteps(goal, plan, context, output, options = {}) {
795
810
  }),
796
811
  nextAction: "\u7B49\u5F85 step_result\uFF1B\u5931\u8D25\u65F6\u67E5\u770B /failures \u548C transcript\u3002"
797
812
  };
813
+ const engineeringSignal = snapshotEngineeringSignal(context);
798
814
  const workflowRun = upsertWorkflowRun(context, {
799
815
  id: runId,
800
816
  goal,
@@ -803,6 +819,7 @@ async function runWorkflowPlanSteps(goal, plan, context, output, options = {}) {
803
819
  steps: stepStates,
804
820
  startedAt,
805
821
  result: "partial",
822
+ ...engineeringSignal ? { engineeringSignal } : {},
806
823
  phaseGateConfirmed: true,
807
824
  confirmedPhaseStopPoints,
808
825
  multiAgent: options.multiAgent === true
@@ -1028,6 +1045,7 @@ async function runRegistryWorkflow(workflow, goal, runInBackground, context, out
1028
1045
  }),
1029
1046
  nextAction: "\u67E5\u770B /workflows registry\u3001/background \u6216 /details background\u3002"
1030
1047
  };
1048
+ const engineeringSignal = snapshotEngineeringSignal(context);
1031
1049
  const workflowRun = upsertWorkflowRun(context, {
1032
1050
  id: runId,
1033
1051
  goal: goal || workflow.description,
@@ -1036,6 +1054,7 @@ async function runRegistryWorkflow(workflow, goal, runInBackground, context, out
1036
1054
  steps: stepStates,
1037
1055
  startedAt,
1038
1056
  result: "partial",
1057
+ ...engineeringSignal ? { engineeringSignal } : {},
1039
1058
  phaseGateConfirmed: true,
1040
1059
  confirmedPhaseStopPoints: [workflow.id]
1041
1060
  });
@@ -1157,6 +1176,7 @@ async function executeRegistryWorkflowRun(workflow, goal, runId, stepStates, tas
1157
1176
  async function executeRegistryWorkflowStep(workflow, step, goal, context, output, workflowRunId) {
1158
1177
  const beforeEvidence = context.evidence.map((item) => item.id);
1159
1178
  let handledKnownAction = false;
1179
+ const run = workflowRunId ? getWorkflowRun(context, workflowRunId) : context.workflows.activeRun;
1160
1180
  try {
1161
1181
  const isRegistryMutating = step.action === "write" || step.action === "bash" || step.action === "agent";
1162
1182
  if (isRegistryMutating) {
@@ -1172,7 +1192,6 @@ async function executeRegistryWorkflowStep(workflow, step, goal, context, output
1172
1192
  evidenceRefs: []
1173
1193
  };
1174
1194
  }
1175
- const run = workflowRunId ? getWorkflowRun(context, workflowRunId) : context.workflows.activeRun;
1176
1195
  if (!run?.confirmedPhaseStopPoints?.includes(workflow.id)) {
1177
1196
  return {
1178
1197
  status: "blocked",
@@ -1191,7 +1210,10 @@ async function executeRegistryWorkflowStep(workflow, step, goal, context, output
1191
1210
  const role = step.role ?? "worker";
1192
1211
  const task = step.task ?? (goal || workflow.description);
1193
1212
  const previousAgentIds = new Set(context.agents.map((agent2) => agent2.id));
1194
- await handleForkCommand([role, task], context, output);
1213
+ await handleForkCommand([role, task], context, output, {
1214
+ ...workflowRunId ? { workflowRunId } : {},
1215
+ ...run?.engineeringSignal ? { engineeringSignal: run.engineeringSignal } : {}
1216
+ });
1195
1217
  const agent = context.agents.find((item) => !previousAgentIds.has(item.id));
1196
1218
  if (!agent) {
1197
1219
  return {
@@ -1379,7 +1401,10 @@ async function executeWorkflowStep(request, context, output, workflowRunId, work
1379
1401
  };
1380
1402
  }
1381
1403
  const previousAgentIds = new Set(context.agents.map((agent2) => agent2.id));
1382
- await handleForkCommand([req.role, req.task], context, output, { workflowRunId });
1404
+ await handleForkCommand([req.role, req.task], context, output, {
1405
+ workflowRunId,
1406
+ ...run?.engineeringSignal ? { engineeringSignal: run.engineeringSignal } : {}
1407
+ });
1383
1408
  const agent = context.agents.find((item) => !previousAgentIds.has(item.id));
1384
1409
  const agentTask = agent ? context.backgroundTasks.find((task) => task.id === agent.id) : void 0;
1385
1410
  if (agentTask && workflowRunId) {
@@ -2611,6 +2636,22 @@ var AGENT_ASSIGNABLE_STATUSES = /* @__PURE__ */ new Set(["running", "idle", "com
2611
2636
  function getAgentRunsDir(context) {
2612
2637
  return resolveStoragePaths2(context.config, context.projectPath).agentRuns;
2613
2638
  }
2639
+ function snapshotEngineeringSignal2(context) {
2640
+ const signal = context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal;
2641
+ if (!signal) {
2642
+ return {
2643
+ profile: "generic",
2644
+ strategyHint: formatEngineeringProfileStrategyHint("generic")
2645
+ };
2646
+ }
2647
+ return {
2648
+ profile: signal.profile,
2649
+ strategyHint: signal.strategyHint,
2650
+ artifactTargets: signal.artifactTargets.slice(),
2651
+ ...signal.failureCategory ? { failureCategory: signal.failureCategory } : {},
2652
+ ...signal.finalBoundaryHint ? { finalBoundaryHint: signal.finalBoundaryHint } : {}
2653
+ };
2654
+ }
2614
2655
  function formatAgentCompletionSummary(agent, context) {
2615
2656
  const text = messages[context.language];
2616
2657
  const elapsed = Date.now() - Date.parse(agent.startedAt);
@@ -3381,6 +3422,7 @@ async function startDurableJobAgentRun(context, job, assignment, output) {
3381
3422
  parentSessionId,
3382
3423
  forkedFrom: packet.id,
3383
3424
  task,
3425
+ engineeringSignal: snapshotEngineeringSignal2(context),
3384
3426
  model: effectiveModel,
3385
3427
  permissionMode: getAgentPermissionMode(assignment.type, context.permissionMode),
3386
3428
  status: routeUsable ? "running" : "blocked",
@@ -4114,6 +4156,7 @@ async function handleForkCommand(args, context, output, runtimeOptions = {}) {
4114
4156
  return;
4115
4157
  }
4116
4158
  const workflowTaskId = runtimeOptions.workflowRunId ?? getWorkflowRuns(context).find((run) => run.status === "running")?.id;
4159
+ const engineeringSignal = runtimeOptions.engineeringSignal ?? snapshotEngineeringSignal2(context);
4117
4160
  const guard = deps().checkBackgroundStartGuard(context, "agent", false, workflowTaskId);
4118
4161
  if (guard) {
4119
4162
  writeLine(output, guard);
@@ -4171,6 +4214,7 @@ Task: ${task}` : task;
4171
4214
  parentSessionId,
4172
4215
  forkedFrom: packet.id,
4173
4216
  task: effectiveTask,
4217
+ engineeringSignal,
4174
4218
  model: effectiveModel,
4175
4219
  ...registryAgent ? { registryAgentId: registryAgent.id } : {},
4176
4220
  ...registryAllowedTools ? { allowedTools: registryAllowedTools } : {},
@@ -5138,6 +5182,8 @@ async function denyAgentToolUse(agent, toolCall, toolName, context, parentSessio
5138
5182
  }
5139
5183
  function createAgentLoopSystemPrompt(agent, context) {
5140
5184
  const readonlyAuditHint = createReadonlyAuditToolHint(agent);
5185
+ const engineeringProfile = agent.engineeringSignal?.profile ?? context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal.profile ?? "generic";
5186
+ const engineeringStrategy = agent.engineeringSignal?.strategyHint ?? context.lastMetaSchedulerDecision?.policyDecision.engineeringSignal.strategyHint ?? formatEngineeringProfileStrategyHint(engineeringProfile);
5141
5187
  const roleHint = agent.type === "explorer" ? "Explore with read-only tools first. Return concise findings and evidence." : agent.type === "planner" ? "Build a practical plan. Use Todo when it helps, but do not stop at a stub." : agent.type === "worker" ? "Execute the assigned work with real tools. Stop and report blocked if permission is required." : "Verify with real project commands and report PASS/FAIL/PARTIAL honestly.";
5142
5188
  return [
5143
5189
  `You are a Linghun ${agent.type} child agent running in an isolated sidechain transcript.`,
@@ -5151,6 +5197,7 @@ function createAgentLoopSystemPrompt(agent, context) {
5151
5197
  "Use structured tools only; never write raw tool_use/tool_result protocol as text.",
5152
5198
  readonlyAuditHint,
5153
5199
  "Respect the actual OS/shell before Bash. On Windows/PowerShell, prefer PowerShell cmdlets or Node one-liners; avoid Unix-only find|sed|head pipelines unless verified available.",
5200
+ `EngineeringTaskProfile: profile=${engineeringProfile}; strategy=${engineeringStrategy}; not validation evidence.`,
5154
5201
  "If a required tool is denied, asks for approval, or fails, report blocked instead of claiming completion."
5155
5202
  ].join("\n");
5156
5203
  }