@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
@@ -0,0 +1,636 @@
1
+ // src/headless-bench-runtime.ts
2
+ import { spawn } from "child_process";
3
+ import { constants } from "fs";
4
+ import { access, mkdir, readdir, readFile, writeFile } from "fs/promises";
5
+ import { join, resolve } from "path";
6
+ var DEFAULT_TEST_TIMEOUT_MS = 6e5;
7
+ var DEFAULT_MAX_REPAIR_ATTEMPTS = 1;
8
+ var DEFAULT_ENVIRONMENT_SETUP_RETRIES = 1;
9
+ var MAX_REPAIR_ATTEMPTS = 2;
10
+ var MAX_ENVIRONMENT_SETUP_RETRIES = 3;
11
+ var OUTPUT_LIMIT = 24e3;
12
+ var SUMMARY_LIMIT = 4e3;
13
+ async function resolveHeadlessBenchConfig(input) {
14
+ const env = input.env ?? process.env;
15
+ const promptLooksLikeTerminalBench = /Terminal-Bench task container/iu.test(input.prompt);
16
+ const defaultTestCommand = await detectOfficialTestCommand(input.projectPath, env);
17
+ const envEnabled = parseBoolean(env.LINGHUN_HEADLESS_BENCH ?? env.LINGHUN_HEADLESS_VERIFY);
18
+ const enabled = input.options?.enabled ?? envEnabled ?? (promptLooksLikeTerminalBench && Boolean(defaultTestCommand));
19
+ const optionTestTimeoutMs = input.options?.testTimeoutMs;
20
+ const testTimeoutMs = clampPositiveInteger(
21
+ optionTestTimeoutMs ?? parsePositiveInteger(env.LINGHUN_HEADLESS_TEST_TIMEOUT_MS),
22
+ DEFAULT_TEST_TIMEOUT_MS,
23
+ optionTestTimeoutMs === void 0 ? 3e4 : 1,
24
+ 18e5
25
+ );
26
+ const maxRepairAttempts = clampPositiveInteger(
27
+ input.options?.maxRepairAttempts ?? parsePositiveInteger(env.LINGHUN_HEADLESS_MAX_REPAIRS),
28
+ DEFAULT_MAX_REPAIR_ATTEMPTS,
29
+ 0,
30
+ MAX_REPAIR_ATTEMPTS
31
+ );
32
+ const environmentSetupRetries = clampPositiveInteger(
33
+ input.options?.environmentSetupRetries ?? parsePositiveInteger(env.LINGHUN_HEADLESS_ENV_SETUP_RETRIES),
34
+ DEFAULT_ENVIRONMENT_SETUP_RETRIES,
35
+ 0,
36
+ MAX_ENVIRONMENT_SETUP_RETRIES
37
+ );
38
+ const configuredArtifacts = splitList(env.LINGHUN_HEADLESS_REQUIRED_ARTIFACTS);
39
+ const requiredArtifacts = uniqueStrings([
40
+ ...input.options?.requiredArtifacts ?? [],
41
+ ...configuredArtifacts,
42
+ ...detectRequiredArtifacts(input.prompt)
43
+ ]);
44
+ const testCommand = input.options?.testCommand ?? env.LINGHUN_HEADLESS_TEST_COMMAND ?? defaultTestCommand;
45
+ const profile = await detectHeadlessBenchTaskProfile({
46
+ prompt: input.prompt,
47
+ projectPath: input.projectPath,
48
+ requiredArtifacts,
49
+ testCommand
50
+ });
51
+ return {
52
+ enabled,
53
+ profile,
54
+ ...testCommand ? { testCommand } : {},
55
+ testTimeoutMs,
56
+ maxRepairAttempts,
57
+ requiredArtifacts,
58
+ preflight: input.options?.preflight ?? parseBoolean(env.LINGHUN_HEADLESS_PREFLIGHT) ?? true,
59
+ environmentSetupRetries
60
+ };
61
+ }
62
+ async function runHeadlessEnvironmentPreflight(projectPath) {
63
+ const checkedTools = ["rg", "git", "grep", "find", "sed", "awk", "python3", "python", "node", "cmake", "g++"];
64
+ const missingTools = [];
65
+ for (const tool of checkedTools) {
66
+ if (!await isToolAvailable(tool, projectPath)) {
67
+ missingTools.push(tool);
68
+ }
69
+ }
70
+ const fallbackNote = missingTools.includes("rg") ? "rg missing; use grep/find fallback. Do not treat missing rg as task failure." : "rg available.";
71
+ return {
72
+ checkedTools,
73
+ missingTools,
74
+ summary: `tools checked: ${checkedTools.length}; missing: ${missingTools.join(", ") || "none"}; ${fallbackNote}`
75
+ };
76
+ }
77
+ function createHeadlessBenchInitialPrompt(input) {
78
+ if (!input.config.enabled) return input.originalPrompt;
79
+ const required = input.config.requiredArtifacts.length ? `Required artifacts detected: ${input.config.requiredArtifacts.join(", ")}. Verify they exist and are readable before final.` : "No explicit output artifact path was detected; still verify observable task completion.";
80
+ const test = input.config.testCommand ? `Official test command available: ${input.config.testCommand}. Prefer it over ad-hoc smoke tests before final.` : "No official test command was detected; use the strongest task-local verification available.";
81
+ const preflight = input.preflight ? `Environment preflight: ${input.preflight.summary}` : "";
82
+ return [
83
+ input.originalPrompt,
84
+ "",
85
+ "[Linghun headless bench guard]",
86
+ test,
87
+ required,
88
+ preflight,
89
+ formatInitialProfileStrategy(input.config.profile),
90
+ "If rg is unavailable, use grep/find/sed/awk fallbacks instead of failing the task.",
91
+ "Do not claim completion from a self-written smoke test when an official test entrypoint is available."
92
+ ].filter(Boolean).join("\n");
93
+ }
94
+ async function validateHeadlessBenchCompletion(input) {
95
+ const artifactResult = await validateRequiredArtifacts(input.projectPath, input.config.requiredArtifacts);
96
+ if (!artifactResult.ok) {
97
+ return {
98
+ ok: false,
99
+ failure: {
100
+ category: "missing_artifact",
101
+ summary: `Missing required artifact(s): ${artifactResult.missing.join(", ")}`,
102
+ missingArtifacts: artifactResult.missing
103
+ }
104
+ };
105
+ }
106
+ if (!input.config.testCommand) {
107
+ return {
108
+ ok: true,
109
+ testRan: false,
110
+ summary: input.config.requiredArtifacts.length ? "required artifacts exist; no official test command detected" : "no official test command or explicit artifact requirement detected"
111
+ };
112
+ }
113
+ let result;
114
+ let setupRetry = 0;
115
+ while (setupRetry <= input.config.environmentSetupRetries) {
116
+ result = await runOfficialTestCommand({
117
+ projectPath: input.projectPath,
118
+ command: input.config.testCommand,
119
+ timeoutMs: input.config.testTimeoutMs
120
+ });
121
+ const setupFailure = classifyEnvironmentSetupFailure(result.output);
122
+ if (result.exitCode === 0 || result.outcome !== "completed" || !setupFailure.retryable || setupRetry >= input.config.environmentSetupRetries) {
123
+ break;
124
+ }
125
+ setupRetry += 1;
126
+ await sleep(Math.min(500 * 2 ** (setupRetry - 1), 2e3));
127
+ }
128
+ if (!result) {
129
+ throw new Error("headless validation did not run");
130
+ }
131
+ if (result.exitCode === 0 && result.outcome === "completed") {
132
+ return {
133
+ ok: true,
134
+ testRan: true,
135
+ summary: `official test passed: ${input.config.testCommand}`,
136
+ logPath: result.logPath
137
+ };
138
+ }
139
+ const category = classifyHeadlessFailure({
140
+ output: result.output,
141
+ outcome: result.outcome,
142
+ exitCode: result.exitCode
143
+ });
144
+ return {
145
+ ok: false,
146
+ failure: {
147
+ category,
148
+ command: input.config.testCommand,
149
+ exitCode: result.exitCode,
150
+ logPath: result.logPath,
151
+ summary: summarizeFailureOutput(result.output, category)
152
+ }
153
+ };
154
+ }
155
+ async function collectHeadlessArtifactChecklist(input) {
156
+ const requiredArtifacts = [];
157
+ for (const artifact of input.config.requiredArtifacts) {
158
+ const target = artifact.startsWith("/") ? artifact : resolve(input.projectPath, artifact);
159
+ requiredArtifacts.push({ path: artifact, present: await canRead(target) });
160
+ }
161
+ const failedValidation = input.lastValidation && !input.lastValidation.ok ? input.lastValidation.failure : void 0;
162
+ const gitAvailable = await isToolAvailable("git", input.projectPath).catch(() => "unknown");
163
+ const verificationRan = input.lastValidation?.ok === true && input.lastValidation.testRan || Boolean(failedValidation?.command);
164
+ const lastVerificationExitCode = failedValidation?.exitCode;
165
+ const summary = [
166
+ `artifacts=${requiredArtifacts.length}`,
167
+ `artifactsPresent=${requiredArtifacts.filter((item) => item.present).length}/${requiredArtifacts.length}`,
168
+ `changedFiles=${input.changedFiles.length}`,
169
+ `verificationRan=${verificationRan ? "yes" : "no"}`,
170
+ `lastVerificationExitCode=${lastVerificationExitCode ?? "none"}`,
171
+ `git=${gitAvailable}`
172
+ ].join("; ");
173
+ return {
174
+ requiredArtifacts,
175
+ changedFiles: [...input.changedFiles],
176
+ verificationRan,
177
+ ...lastVerificationExitCode === void 0 ? {} : { lastVerificationExitCode },
178
+ gitAvailable,
179
+ summary
180
+ };
181
+ }
182
+ function classifyEnvironmentSetupFailure(output) {
183
+ const text = output.toLowerCase();
184
+ if (!/docker|containerd|image|pull|registry|hub\.docker|manifest|unauthorized/u.test(text)) {
185
+ return { category: "none", retryable: false, reason: "no environment setup signature" };
186
+ }
187
+ if (/unexpected eof|connection reset|connection refused|tls handshake timeout|i\/o timeout|net\/http|temporary failure|temporary name resolution|dial tcp|context deadline exceeded|service unavailable|gateway timeout|too many requests|toomanyrequests|rate limit/u.test(
188
+ text
189
+ )) {
190
+ return {
191
+ category: "network_pull_error",
192
+ retryable: true,
193
+ reason: "transient docker pull or registry network failure"
194
+ };
195
+ }
196
+ if (/no space left|disk quota|cannot allocate memory|out of memory|oom/u.test(text)) {
197
+ return {
198
+ category: "environment_error",
199
+ retryable: false,
200
+ reason: "local environment resource failure"
201
+ };
202
+ }
203
+ if (/manifest unknown|not found|pull access denied|unauthorized|authentication required|repository does not exist/u.test(text)) {
204
+ return {
205
+ category: "environment_error",
206
+ retryable: false,
207
+ reason: "non-retryable docker image or registry access failure"
208
+ };
209
+ }
210
+ return { category: "environment_error", retryable: false, reason: "environment setup failure" };
211
+ }
212
+ function createHeadlessBenchRepairPrompt(input) {
213
+ const artifactLine = input.failure.missingArtifacts?.length ? `Missing artifacts: ${input.failure.missingArtifacts.join(", ")}` : "";
214
+ const logLine = input.failure.logPath ? `Full failure log: ${input.failure.logPath}` : "";
215
+ return [
216
+ `Headless verification failed (${input.failure.category}) on repair attempt ${input.attempt}/${input.maxAttempts}.`,
217
+ "Continue from the current workspace. Do not restart from scratch unless necessary.",
218
+ "Use the official test failure and current files to make the smallest fix, then rerun the official test or artifact check.",
219
+ formatRepairProfileStrategy(input.failure.category, input.profile ?? "generic"),
220
+ input.preflight?.missingTools.includes("rg") ? "rg is missing in this environment; use grep/find/sed/awk fallbacks." : "",
221
+ artifactLine,
222
+ logLine,
223
+ "",
224
+ "Failure summary:",
225
+ input.failure.summary,
226
+ "",
227
+ "Original task:",
228
+ input.originalPrompt
229
+ ].filter(Boolean).join("\n");
230
+ }
231
+ async function detectHeadlessBenchTaskProfile(input) {
232
+ const files = await listProjectFiles(input.projectPath, 220);
233
+ const haystack = `${input.prompt}
234
+ ${input.testCommand ?? ""}
235
+ ${files.join("\n")}`.toLowerCase();
236
+ const requiredArtifacts = input.requiredArtifacts ?? detectRequiredArtifacts(input.prompt);
237
+ if (/qemu|systemd|daemon|server|service|\bport\b|localhost|healthcheck|http server|socket/u.test(haystack)) {
238
+ return "qemu_or_service";
239
+ }
240
+ if (/ctf|crypto|exploit|vulnerab|network|packet|pcap|tls|ssh|jwt|xss|sql injection/u.test(haystack)) {
241
+ return "security_or_network";
242
+ }
243
+ if (/model|train|dataset|csv|parquet|numpy|pandas|sklearn|torch|tensorflow|notebook|\.ipynb/u.test(haystack)) {
244
+ return "ml_or_data";
245
+ }
246
+ if (requiredArtifacts.length > 0 || /binary|artifact|out\.txt|hexdump|strings|elf|file command|ldd|\.bin|\.so|\.exe/u.test(haystack)) {
247
+ return "binary_or_artifact";
248
+ }
249
+ if (/cmakelists\.txt|\.hpp|\.hxx|\.cc|\.cpp|g\+\+|c\+\+|catch2|gtest|polyglot_cpp/u.test(haystack)) {
250
+ return "polyglot_cpp";
251
+ }
252
+ if (/polyglot|exercism|canonical-data|\.go|\.rs|\.java|\.rb|\.js/u.test(haystack)) {
253
+ return "polyglot_simple";
254
+ }
255
+ if (/django|flask|fastapi|pyproject\.toml|setup\.py|tox\.ini|pytest|requirements\.txt/u.test(haystack)) {
256
+ const pythonFiles = files.filter((file) => file.endsWith(".py")).length;
257
+ return pythonFiles > 25 || /large|monorepo|package|src\//u.test(haystack) ? "large_python_project" : "swe_python";
258
+ }
259
+ return "generic";
260
+ }
261
+ async function detectEngineeringTaskProfile(input) {
262
+ if (!looksLikeEngineeringProfilePrompt(input.prompt)) return "generic";
263
+ return detectHeadlessBenchTaskProfile(input);
264
+ }
265
+ function looksLikeEngineeringProfilePrompt(prompt) {
266
+ return /(?:fix|implement|debug|test|build|compile|artifact|binary|service|server|port|pytest|cmake|c\+\+|python|修|改|实现|调试|测试|构建|编译|产物|服务|端口|智能体|工作流|验证)/iu.test(
267
+ prompt
268
+ );
269
+ }
270
+ function classifyHeadlessFailure(input) {
271
+ const text = input.output.toLowerCase();
272
+ if (input.outcome === "timeout" || /timed out|timeout after|test command timed out/u.test(text)) {
273
+ return "test_timeout";
274
+ }
275
+ const setupFailure = classifyEnvironmentSetupFailure(input.output);
276
+ if (setupFailure.category !== "none") {
277
+ return setupFailure.category;
278
+ }
279
+ if (/rate limit|provider|api key|upstream|stream interrupted|connection reset|econnreset|fetch failed/u.test(text)) {
280
+ return "provider_error";
281
+ }
282
+ if (/no space left|cannot allocate memory|out of memory|oom|resource temporarily unavailable/u.test(text)) {
283
+ return "resource_exhausted";
284
+ }
285
+ if (/cmake|g\+\+|undefined reference|compile error|build failed|make: \*\*\*/u.test(text)) {
286
+ return "model_patch_failed";
287
+ }
288
+ if (/command not found|not found:|no such file or directory/u.test(text) && /\brg\b|cmake|g\+\+|python|node/u.test(text)) {
289
+ return "environment_missing_tool";
290
+ }
291
+ if (/no short test summary|error parsing results|harness|post-test|parse/u.test(text)) {
292
+ return "parse_or_harness_error";
293
+ }
294
+ if (/agent timed out|agent_timeout/u.test(text)) {
295
+ return "agent_timeout";
296
+ }
297
+ if (/unknown_agent_error|uncaught|unhandled|internal error/u.test(text)) {
298
+ return "unknown_agent_error";
299
+ }
300
+ return "model_patch_failed";
301
+ }
302
+ function sleep(ms) {
303
+ return new Promise((resolveSleep) => setTimeout(resolveSleep, ms));
304
+ }
305
+ function formatInitialProfileStrategy(profile) {
306
+ switch (profile) {
307
+ case "polyglot_cpp":
308
+ return "Profile polyglot_cpp: read headers and official tests first; match signatures exactly; prefer official CMake/tests over ad-hoc g++ smoke.";
309
+ case "polyglot_simple":
310
+ return "Profile polyglot_simple: read the canonical tests and target API first; run focused tests before the final official test.";
311
+ case "swe_python":
312
+ case "large_python_project":
313
+ return "Profile python_swe: read relevant tests and target modules first; use focused pytest/tests before any expensive full run; avoid unrelated architecture edits.";
314
+ case "binary_or_artifact":
315
+ return "Profile binary_or_artifact: identify file/strings/hexdump/ldd/run mode first; verify required artifacts exist and are non-empty before final.";
316
+ case "qemu_or_service":
317
+ case "security_or_network":
318
+ return "Profile service_security: confirm service, ports, logs, and health checks; wrap long commands with timeouts and clean background processes.";
319
+ case "ml_or_data":
320
+ return "Profile ml_or_data: inspect data size and script parameters first; prefer small-sample or focused validation over unbounded training.";
321
+ case "generic":
322
+ return "Profile generic: read task-local tests and changed files first; use focused verification before final official validation.";
323
+ }
324
+ }
325
+ function formatEngineeringProfileStrategyHint(profile) {
326
+ switch (profile) {
327
+ case "polyglot_cpp":
328
+ return "read headers/tests first, align signatures exactly, then verify with the project test entrypoint";
329
+ case "polyglot_simple":
330
+ return "read canonical tests and target API first, then run focused verification before final";
331
+ case "swe_python":
332
+ case "large_python_project":
333
+ return "read relevant tests and target modules first, prefer focused tests, and do not imply full-suite pass from focused evidence";
334
+ case "binary_or_artifact":
335
+ return "identify artifact expectations early and verify required files exist, are readable, and are non-empty before final";
336
+ case "qemu_or_service":
337
+ case "security_or_network":
338
+ return "verify service, port, logs, or health checks before claiming runtime success; avoid leaving background processes";
339
+ case "ml_or_data":
340
+ return "inspect data size and script parameters first, use bounded sample validation before expensive runs";
341
+ case "generic":
342
+ return "read task-local sources/tests first and use focused verification before final claims";
343
+ }
344
+ }
345
+ function formatEngineeringFailureBoundaryHint(input) {
346
+ if (input.failureCategory === "missing_artifact") {
347
+ return "final must be downgraded until the required artifact exists and is readable/non-empty";
348
+ }
349
+ if (input.failureCategory === "test_timeout") {
350
+ return "final must state timeout or partial verification; do not present focused checks as full pass";
351
+ }
352
+ if (input.failureCategory === "provider_error") {
353
+ return "final must state provider interruption if completion relies on interrupted model output";
354
+ }
355
+ if (input.profile === "binary_or_artifact") {
356
+ return "final should include artifact existence/non-empty verification status";
357
+ }
358
+ if (input.profile === "swe_python" || input.profile === "large_python_project") {
359
+ return "final should distinguish focused tests from full test-suite verification";
360
+ }
361
+ if (input.profile === "qemu_or_service" || input.profile === "security_or_network") {
362
+ return "final should state whether service/port/log/health checks were actually verified";
363
+ }
364
+ return void 0;
365
+ }
366
+ function formatRepairProfileStrategy(category, profile) {
367
+ if (category === "missing_artifact") {
368
+ return "Repair route: generate or write the required artifact now, then verify it exists, is readable, and is non-empty.";
369
+ }
370
+ if (category === "test_timeout") {
371
+ return "Repair route: narrow validation to focused tests or logs first; avoid repeatedly launching full expensive runs.";
372
+ }
373
+ if (category === "provider_error") {
374
+ return "Repair route: continue from existing files and evidence; do not redo unrelated exploration.";
375
+ }
376
+ if (category === "model_patch_failed" && profile === "polyglot_cpp") {
377
+ return "Repair route: align header/test signatures, types, missing symbols, and CMake linkage before changing broader logic.";
378
+ }
379
+ if (category === "model_patch_failed") {
380
+ return "Repair route: fix the concrete compile/assertion failure with the smallest patch, then rerun focused verification.";
381
+ }
382
+ return "";
383
+ }
384
+ async function detectOfficialTestCommand(projectPath, env) {
385
+ if (env.LINGHUN_HEADLESS_TEST_COMMAND) return env.LINGHUN_HEADLESS_TEST_COMMAND;
386
+ const candidates = [
387
+ "/tests/run-tests.sh",
388
+ join(projectPath, "tests", "run-tests.sh"),
389
+ join(projectPath, "run-tests.sh")
390
+ ];
391
+ for (const candidate of candidates) {
392
+ if (await canRead(candidate)) {
393
+ return candidate.endsWith(".sh") ? `bash ${shellQuote(candidate)}` : shellQuote(candidate);
394
+ }
395
+ }
396
+ return void 0;
397
+ }
398
+ async function listProjectFiles(projectPath, limit) {
399
+ const results = [];
400
+ const ignored = /* @__PURE__ */ new Set([".git", "node_modules", ".linghun", "__pycache__", ".pytest_cache", "dist", "build"]);
401
+ async function walk(dir, prefix) {
402
+ if (results.length >= limit) return;
403
+ let entries;
404
+ try {
405
+ entries = await readdir(dir, { withFileTypes: true });
406
+ } catch {
407
+ return;
408
+ }
409
+ for (const entry of entries) {
410
+ if (results.length >= limit || ignored.has(entry.name)) continue;
411
+ const relative = prefix ? `${prefix}/${entry.name}` : entry.name;
412
+ const fullPath = join(dir, entry.name);
413
+ if (entry.isDirectory()) {
414
+ await walk(fullPath, relative);
415
+ } else if (entry.isFile()) {
416
+ results.push(relative);
417
+ }
418
+ }
419
+ }
420
+ await walk(projectPath, "");
421
+ return results;
422
+ }
423
+ function detectEngineeringArtifactTargets(prompt) {
424
+ const artifacts = [];
425
+ const absolutePathPattern = /(?:\b(?:write|save|print|output|store|create|generate|return|place|put)\b|写入|保存|输出|生成|创建|放到|放入|返回)[\s\S]{0,120}?[`"']?(\/[A-Za-z0-9._/-]+\.[A-Za-z0-9._-]+)[`"']?/giu;
426
+ for (const match of prompt.matchAll(absolutePathPattern)) {
427
+ artifacts.push(match[1]);
428
+ }
429
+ const namedFilePattern = /(?:\b(?:file called|file named|called|named|to a file|write .*? to)\b|文件名为|文件叫|写到文件|输出到文件)\s+[`"']?([A-Za-z0-9._/-]+\.[A-Za-z0-9._-]+)[`"']?/giu;
430
+ for (const match of prompt.matchAll(namedFilePattern)) {
431
+ artifacts.push(match[1]);
432
+ }
433
+ return uniqueStrings(
434
+ artifacts.map(normalizeArtifactPath).filter((artifact) => !artifact.includes("*") && !artifact.endsWith(".sh"))
435
+ );
436
+ }
437
+ function detectRequiredArtifacts(prompt) {
438
+ return detectEngineeringArtifactTargets(prompt);
439
+ }
440
+ function normalizeArtifactPath(value) {
441
+ return value.replace(/[),.;:!?]+$/u, "");
442
+ }
443
+ async function validateRequiredArtifacts(projectPath, artifacts) {
444
+ const missing = [];
445
+ for (const artifact of artifacts) {
446
+ const target = artifact.startsWith("/") ? artifact : resolve(projectPath, artifact);
447
+ try {
448
+ await access(target, constants.R_OK);
449
+ const content = await readFile(target, "utf8").catch(() => "");
450
+ if (content.length === 0) {
451
+ missing.push(`${artifact} (empty or unreadable text)`);
452
+ }
453
+ } catch {
454
+ missing.push(artifact);
455
+ }
456
+ }
457
+ return missing.length ? { ok: false, missing } : { ok: true };
458
+ }
459
+ async function runOfficialTestCommand(input) {
460
+ const result = await runShellCommand(input.command, input.projectPath, input.timeoutMs);
461
+ const postTestLog = result.exitCode === 0 ? "" : await readPostTestFailureLog(input.projectPath);
462
+ const output = postTestLog ? `${result.output}
463
+
464
+ [post-test/tests.log]
465
+ ${postTestLog}` : result.output;
466
+ const logPath = await writeHeadlessLog(input.projectPath, "official-test.log", output);
467
+ return { ...result, output, logPath };
468
+ }
469
+ function runShellCommand(command, cwd, timeoutMs) {
470
+ return new Promise((resolvePromise) => {
471
+ const detached = process.platform !== "win32";
472
+ const child = spawn(command, {
473
+ cwd,
474
+ shell: true,
475
+ windowsHide: true,
476
+ detached,
477
+ env: createSanitizedChildEnv(process.env)
478
+ });
479
+ let output = "";
480
+ let settled = false;
481
+ const append = (chunk) => {
482
+ output += chunk.toString();
483
+ if (output.length > OUTPUT_LIMIT) {
484
+ output = output.slice(output.length - OUTPUT_LIMIT);
485
+ }
486
+ };
487
+ const finish = (exitCode, outcome = "completed") => {
488
+ if (settled) return;
489
+ settled = true;
490
+ clearTimeout(timer);
491
+ resolvePromise({ exitCode, output, outcome });
492
+ };
493
+ const timer = setTimeout(() => {
494
+ append(`
495
+ Command timed out after ${timeoutMs}ms.`);
496
+ killShellProcess(child.pid);
497
+ finish(1, "timeout");
498
+ }, timeoutMs);
499
+ child.stdout.on("data", append);
500
+ child.stderr.on("data", append);
501
+ child.on("error", (error) => {
502
+ append(`
503
+ Command failed to start: ${error.message}`);
504
+ finish(1);
505
+ });
506
+ child.on("close", (code) => finish(code ?? 1));
507
+ });
508
+ }
509
+ function createSanitizedChildEnv(env) {
510
+ const next = {};
511
+ for (const [key, value] of Object.entries(env)) {
512
+ if (isSecretEnvKey(key)) continue;
513
+ next[key] = value;
514
+ }
515
+ return next;
516
+ }
517
+ function isSecretEnvKey(key) {
518
+ return /(?:API[_-]?KEY|TOKEN|SECRET|PASSWORD|AUTHORIZATION|BEARER|CREDENTIAL)/iu.test(key);
519
+ }
520
+ function killShellProcess(pid) {
521
+ if (!pid) return;
522
+ try {
523
+ if (process.platform === "win32") {
524
+ spawn("taskkill", ["/pid", String(pid), "/t", "/f"], {
525
+ stdio: "ignore",
526
+ windowsHide: true
527
+ }).unref();
528
+ process.kill(pid);
529
+ } else {
530
+ process.kill(-pid, "SIGTERM");
531
+ setTimeout(() => {
532
+ try {
533
+ process.kill(-pid, "SIGKILL");
534
+ } catch {
535
+ }
536
+ }, 1e3).unref();
537
+ }
538
+ } catch {
539
+ try {
540
+ process.kill(pid);
541
+ } catch {
542
+ }
543
+ }
544
+ }
545
+ async function isToolAvailable(tool, cwd) {
546
+ const command = process.platform === "win32" ? `where ${cmdQuote(tool)} >nul 2>nul` : `command -v ${shellQuote(tool)} >/dev/null 2>&1`;
547
+ const result = await runShellCommand(command, cwd, 5e3);
548
+ return result.exitCode === 0;
549
+ }
550
+ async function writeHeadlessLog(projectPath, name, content) {
551
+ const dir = join(projectPath, ".linghun", "headless");
552
+ await mkdir(dir, { recursive: true });
553
+ const target = join(dir, name);
554
+ await writeFile(target, content, "utf8");
555
+ return target;
556
+ }
557
+ async function readPostTestFailureLog(projectPath) {
558
+ const candidates = [
559
+ join(projectPath, "post-test", "tests.log"),
560
+ join(projectPath, "post_test", "tests.log"),
561
+ join(projectPath, "tests.log"),
562
+ "/post-test/tests.log"
563
+ ];
564
+ for (const candidate of candidates) {
565
+ try {
566
+ const content = await readFile(candidate, "utf8");
567
+ return content.length > OUTPUT_LIMIT ? content.slice(content.length - OUTPUT_LIMIT) : content;
568
+ } catch {
569
+ }
570
+ }
571
+ return "";
572
+ }
573
+ function summarizeFailureOutput(output, category) {
574
+ const lines = output.split(/\r?\n/u).map((line) => line.trimEnd()).filter((line) => line.trim().length > 0);
575
+ const interesting = lines.filter(
576
+ (line) => /error|failed|failure|assert|expected|actual|traceback|exception|undefined reference|no such file|not found|timeout|cmake|g\+\+|make|pytest|test/u.test(
577
+ line.toLowerCase()
578
+ )
579
+ );
580
+ const selected = (interesting.length ? interesting : lines).slice(-60).join("\n");
581
+ const summary = selected.length > SUMMARY_LIMIT ? selected.slice(selected.length - SUMMARY_LIMIT) : selected;
582
+ return `[${category}]
583
+ ${summary || "No failure output captured."}`;
584
+ }
585
+ function parseBoolean(value) {
586
+ if (value === void 0) return void 0;
587
+ if (/^(1|true|yes|on)$/iu.test(value)) return true;
588
+ if (/^(0|false|no|off)$/iu.test(value)) return false;
589
+ return void 0;
590
+ }
591
+ function parsePositiveInteger(value) {
592
+ if (!value) return void 0;
593
+ const parsed = Number.parseInt(value, 10);
594
+ return Number.isFinite(parsed) ? parsed : void 0;
595
+ }
596
+ function clampPositiveInteger(value, fallback, min, max) {
597
+ const next = value ?? fallback;
598
+ return Math.max(min, Math.min(max, next));
599
+ }
600
+ function splitList(value) {
601
+ return value ? value.split(/[;,]/u).map((item) => item.trim()).filter(Boolean) : [];
602
+ }
603
+ function uniqueStrings(values) {
604
+ return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
605
+ }
606
+ async function canRead(path) {
607
+ try {
608
+ await access(path, constants.R_OK);
609
+ return true;
610
+ } catch {
611
+ return false;
612
+ }
613
+ }
614
+ function shellQuote(value) {
615
+ if (/^[A-Za-z0-9_./:-]+$/u.test(value)) return value;
616
+ return `'${value.replace(/'/gu, "'\\''")}'`;
617
+ }
618
+ function cmdQuote(value) {
619
+ return /^[A-Za-z0-9_.+-]+$/u.test(value) ? value : `"${value.replace(/"/gu, '\\"')}"`;
620
+ }
621
+
622
+ export {
623
+ resolveHeadlessBenchConfig,
624
+ runHeadlessEnvironmentPreflight,
625
+ createHeadlessBenchInitialPrompt,
626
+ validateHeadlessBenchCompletion,
627
+ collectHeadlessArtifactChecklist,
628
+ classifyEnvironmentSetupFailure,
629
+ createHeadlessBenchRepairPrompt,
630
+ detectHeadlessBenchTaskProfile,
631
+ detectEngineeringTaskProfile,
632
+ classifyHeadlessFailure,
633
+ formatEngineeringProfileStrategyHint,
634
+ formatEngineeringFailureBoundaryHint,
635
+ detectEngineeringArtifactTargets
636
+ };
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  createCompactBoundaryBlock
3
- } from "./chunk-AKPXMCVF.js";
3
+ } from "./chunk-EKYXI6C7.js";
4
4
  import {
5
5
  createEvidenceRecord,
6
6
  rememberEvidence
7
- } from "./chunk-64MJP6FK.js";
7
+ } from "./chunk-NK4NMYF5.js";
8
8
  import {
9
9
  applyToolResultBudgetToMessages
10
10
  } from "./chunk-O7S3HYE6.js";
11
11
  import {
12
12
  injectDeepCompactSummary,
13
13
  maybeRunDeepCompactBeforeProvider
14
- } from "./chunk-RMLTVKOY.js";
14
+ } from "./chunk-L4YVE3RG.js";
15
15
  import {
16
16
  getContextWindowForModel
17
17
  } from "./chunk-K4FSYBSY.js";
@@ -28,7 +28,7 @@ import {
28
28
  sanitizeDiagnosticText,
29
29
  sanitizeDisplayPaths,
30
30
  truncateDisplay
31
- } from "./chunk-OMZYPQVA.js";
31
+ } from "./chunk-UGYFQF6M.js";
32
32
 
33
33
  // src/compact-preflight-runtime.ts
34
34
  import "@linghun/providers";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  isRecord
3
- } from "./chunk-QLRTQHTR.js";
3
+ } from "./chunk-6JGRNES6.js";
4
4
  import {
5
5
  stableStringify
6
6
  } from "./chunk-4T5DJW54.js";
7
7
  import {
8
8
  truncateDisplay
9
- } from "./chunk-OMZYPQVA.js";
9
+ } from "./chunk-UGYFQF6M.js";
10
10
 
11
11
  // src/index-result-presenter.ts
12
12
  import { readFile, readdir, stat } from "fs/promises";