@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.
- package/dist/agent-completion-finalizer.js +3 -3
- package/dist/background-control-runtime.js +56 -55
- package/dist/cache-command-runtime.js +3 -3
- package/dist/capability-runtime.js +35 -34
- package/dist/{chunk-TJLC3QAS.js → chunk-36ZWUJQS.js} +1 -1
- package/dist/{chunk-JDWXC2OQ.js → chunk-3MRYQO7X.js} +4 -4
- package/dist/{chunk-2FVEKTKN.js → chunk-3PG7I3LA.js} +4 -4
- package/dist/{chunk-J7ZE2JKP.js → chunk-42ZZUF7P.js} +3 -3
- package/dist/{chunk-DTK5NBTV.js → chunk-4BFCUJX6.js} +95 -11
- package/dist/{chunk-YH6UIHNF.js → chunk-4QWCNMP6.js} +2 -2
- package/dist/{chunk-WKMBK5UP.js → chunk-4TO2LDMP.js} +1 -1
- package/dist/chunk-4UER2AKI.js +636 -0
- package/dist/{chunk-WHFDDZHY.js → chunk-5IFNLTOF.js} +4 -4
- package/dist/{chunk-W3KHJNSH.js → chunk-6CHUZ2NF.js} +2 -2
- package/dist/{chunk-I3NTAIMF.js → chunk-6DBBXNEG.js} +3 -3
- package/dist/{chunk-GDQQNPBP.js → chunk-6GXIGN5W.js} +1 -1
- package/dist/{chunk-QLRTQHTR.js → chunk-6JGRNES6.js} +2 -2
- package/dist/{chunk-D7TCSOAZ.js → chunk-7BHMBWG2.js} +3 -3
- package/dist/{chunk-KO64OFSG.js → chunk-7C6T7RKJ.js} +1 -1
- package/dist/{chunk-4WHZ6JKD.js → chunk-7R4YXN7Z.js} +335 -63
- package/dist/{chunk-LDABZV5V.js → chunk-7RZE45OT.js} +1 -1
- package/dist/{chunk-MLUIOBKL.js → chunk-7ZMDQZ22.js} +4 -4
- package/dist/{chunk-X7A22JHP.js → chunk-A4H3UTJZ.js} +1 -1
- package/dist/{chunk-LVIM2PA7.js → chunk-AGI6GFFL.js} +3 -3
- package/dist/{chunk-D3UTL2QX.js → chunk-ATY7WBIT.js} +1 -1
- package/dist/{chunk-ZOSK2UEU.js → chunk-BBK5BA5C.js} +99 -117
- package/dist/{chunk-SRZIA6B4.js → chunk-BNC4F63N.js} +1 -1
- package/dist/{chunk-WQMSRO4D.js → chunk-CJRJR7TP.js} +5 -5
- package/dist/{chunk-OEYW3JE3.js → chunk-DIDRFIIW.js} +2 -2
- package/dist/{chunk-AKPXMCVF.js → chunk-EKYXI6C7.js} +11 -7
- package/dist/{chunk-GMUCSNUD.js → chunk-FGGY5KNM.js} +7 -7
- package/dist/{chunk-APJIC2O5.js → chunk-GTIZNO5O.js} +84 -0
- package/dist/{chunk-UOHZQIVL.js → chunk-GXFYUZAM.js} +1 -1
- package/dist/{chunk-DDXS2RDZ.js → chunk-HGCTHBUY.js} +1 -1
- package/dist/{chunk-QTDGRZMZ.js → chunk-HJOC5WUV.js} +1 -1
- package/dist/{chunk-ECFLCY5V.js → chunk-HPIHFENG.js} +2 -2
- package/dist/{chunk-SYBNJZEL.js → chunk-HPMBSOQ4.js} +1 -1
- package/dist/{chunk-QB4VWH7W.js → chunk-HPQ2IHOW.js} +4 -4
- package/dist/{chunk-RVY34HK4.js → chunk-HZ5XNKWS.js} +5 -2
- package/dist/{chunk-4K6UB524.js → chunk-IPZZGDUU.js} +1 -1
- package/dist/{chunk-JHGWGH2C.js → chunk-J6CYFWSW.js} +89 -7
- package/dist/{chunk-6CI6TKLN.js → chunk-JAVRQ3LM.js} +1 -1
- package/dist/{chunk-VCSRBS47.js → chunk-JLAJZPOC.js} +1 -1
- package/dist/{chunk-THZBFYAH.js → chunk-JY3LI63F.js} +2 -2
- package/dist/{chunk-RMLTVKOY.js → chunk-L4YVE3RG.js} +2 -2
- package/dist/{chunk-P277M7Z5.js → chunk-LBC75QAB.js} +1 -1
- package/dist/{chunk-F6TVBCZV.js → chunk-LWW2IAFC.js} +1 -1
- package/dist/{chunk-64MJP6FK.js → chunk-NK4NMYF5.js} +52 -10
- package/dist/{chunk-DNQN74CC.js → chunk-NL4M3V5D.js} +33 -0
- package/dist/{chunk-OF3K3CU5.js → chunk-O2U4XQVM.js} +2 -2
- package/dist/{chunk-LQTVYUT3.js → chunk-OJTMM5CV.js} +2 -2
- package/dist/{chunk-HW2TBXVK.js → chunk-OPVRII63.js} +1 -1
- package/dist/{chunk-ZZ2CNCXJ.js → chunk-OSFBVVEP.js} +4 -4
- package/dist/{chunk-F43AMWLZ.js → chunk-PDTJVJVD.js} +1 -1
- package/dist/{chunk-UDQT5CWK.js → chunk-PI6T2AGS.js} +1 -1
- package/dist/{chunk-JO5ANTMR.js → chunk-PPUOHBAK.js} +84 -37
- package/dist/{chunk-N7G2X2LK.js → chunk-QD4SCW4A.js} +235 -198
- package/dist/{chunk-SOPYWTFV.js → chunk-RRUI3VWQ.js} +1 -1
- package/dist/{chunk-IN42UISW.js → chunk-SRJ4XWOR.js} +10 -5
- package/dist/{chunk-6RJVTUWI.js → chunk-T6UOCF5D.js} +5 -1
- package/dist/{chunk-VTQL23UM.js → chunk-TVNWAEJR.js} +1 -1
- package/dist/chunk-TY4KIVA6.js +50 -0
- package/dist/{chunk-UT2TYK2A.js → chunk-TYTVAFGB.js} +1 -1
- package/dist/{chunk-OMZYPQVA.js → chunk-UGYFQF6M.js} +1 -1
- package/dist/{chunk-TYF4GJR3.js → chunk-UIKN3CDF.js} +4 -4
- package/dist/{chunk-JGDIO2NF.js → chunk-UO3KYTBU.js} +1 -1
- package/dist/{chunk-KI7C6ZOD.js → chunk-VIJ7GDKI.js} +1 -1
- package/dist/{chunk-NKFKOEYX.js → chunk-WCMHJ6SS.js} +1 -1
- package/dist/{chunk-EORRZP3F.js → chunk-WX2OTJXL.js} +1 -1
- package/dist/{chunk-BOV4K7FP.js → chunk-WXTHKLNH.js} +9 -1
- package/dist/{chunk-CRQORMFF.js → chunk-X37FSYAX.js} +1 -1
- package/dist/{chunk-JQCRCDOC.js → chunk-X7E34LKV.js} +15 -15
- package/dist/chunk-X7HMDZZQ.js +85 -0
- package/dist/{chunk-B4GQTZMT.js → chunk-YDTJ7UBG.js} +4 -4
- package/dist/{chunk-K56D3X7S.js → chunk-YKOXJQGX.js} +34 -2
- package/dist/{chunk-3GCIXKCI.js → chunk-YLOJWSHB.js} +9 -5
- package/dist/{chunk-GKZYTPN2.js → chunk-YMEMN5FG.js} +1 -1
- package/dist/chunk-YQNK7HK3.js +87 -0
- package/dist/{chunk-M4AIK2SP.js → chunk-Z265MCGC.js} +15 -11
- package/dist/{chunk-FTAEPAVY.js → chunk-ZF36LULR.js} +4 -4
- package/dist/{chunk-66BNE332.js → chunk-ZJDPYOTK.js} +4 -4
- package/dist/{chunk-RM5QMOFY.js → chunk-ZKPQ4KLK.js} +1 -1
- package/dist/command-panel-runtime.js +34 -33
- package/dist/compact-cache-command-runtime.js +56 -55
- package/dist/compact-preflight-runtime.js +21 -21
- package/dist/connector-runtime.js +36 -35
- package/dist/deep-compact-runtime.js +6 -6
- package/dist/deferred-tools-catalog.js +5 -5
- package/dist/details-status-runtime.js +34 -33
- package/dist/evidence-runtime.d.ts.map +1 -1
- package/dist/evidence-runtime.js +12 -12
- package/dist/extension-command-runtime.js +7 -7
- package/dist/extension-slash-runtime.js +35 -34
- package/dist/failure-learning-command-runtime.js +36 -35
- package/dist/failure-learning-presenter.js +4 -4
- package/dist/failure-learning-runtime.js +3 -3
- package/dist/final-answer-gate.js +2 -2
- package/dist/git-command-runtime.js +35 -34
- package/dist/handoff-session-runtime.js +8 -8
- package/dist/headless-bench-runtime.d.ts +108 -0
- package/dist/headless-bench-runtime.d.ts.map +1 -0
- package/dist/headless-bench-runtime.js +30 -0
- package/dist/index-result-presenter.js +5 -5
- package/dist/index-runtime.js +5 -5
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +531 -78
- package/dist/job-agent-command-runtime.d.ts +2 -1
- package/dist/job-agent-command-runtime.d.ts.map +1 -1
- package/dist/job-agent-command-runtime.js +34 -33
- package/dist/job-runner-presenter.js +3 -3
- package/dist/job-runtime.js +9 -9
- package/dist/mcp-index-command-runtime.js +5 -5
- package/dist/mcp-index-runtime.js +39 -38
- package/dist/mcp-sse-runtime.js +3 -3
- package/dist/mcp-stdio-runtime.js +4 -4
- package/dist/memory-command-runtime.js +36 -35
- package/dist/memory-extraction-runtime.js +3 -3
- package/dist/memory-rules-runtime.js +3 -3
- package/dist/meta-scheduler-runtime.d.ts +10 -0
- package/dist/meta-scheduler-runtime.d.ts.map +1 -1
- package/dist/meta-scheduler-runtime.js +2 -1
- package/dist/model-command-runtime.js +35 -34
- package/dist/model-loop-runtime.d.ts +1 -1
- package/dist/model-loop-runtime.d.ts.map +1 -1
- package/dist/model-loop-runtime.js +1 -1
- package/dist/model-prompt-runtime.d.ts.map +1 -1
- package/dist/model-prompt-runtime.js +10 -10
- package/dist/model-stream-runtime.d.ts +4 -0
- package/dist/model-stream-runtime.d.ts.map +1 -1
- package/dist/model-stream-runtime.js +56 -55
- package/dist/model-tool-runtime.d.ts +3 -2
- package/dist/model-tool-runtime.d.ts.map +1 -1
- package/dist/model-tool-runtime.js +58 -55
- package/dist/pending-details-presenter.js +3 -3
- package/dist/permission-approval-runtime.js +56 -55
- package/dist/permission-continuation-runtime.d.ts.map +1 -1
- package/dist/permission-continuation-runtime.js +4 -4
- package/dist/process-command-runtime.d.ts.map +1 -1
- package/dist/process-command-runtime.js +4 -4
- package/dist/process-guard.d.ts +3 -0
- package/dist/process-guard.d.ts.map +1 -1
- package/dist/process-guard.js +1 -1
- package/dist/provider-loop-runtime.js +3 -3
- package/dist/remote-command-runtime.js +35 -34
- package/dist/runner-runtime.js +8 -8
- package/dist/runtime-status-presenter.js +3 -3
- package/dist/runtime-status-snapshot.js +4 -4
- package/dist/shell/components/AgentProgressTree.js +2 -2
- package/dist/shell/components/BackgroundTaskOverlay.js +2 -2
- package/dist/shell/components/BtwPanel.js +2 -2
- package/dist/shell/components/CommandPanel.js +2 -2
- package/dist/shell/components/Composer.d.ts +16 -2
- package/dist/shell/components/Composer.d.ts.map +1 -1
- package/dist/shell/components/Composer.js +9 -7
- package/dist/shell/components/ConfigPanel.js +2 -2
- package/dist/shell/components/HelpPanel.js +2 -2
- package/dist/shell/components/HistorySearchPanel.js +2 -2
- package/dist/shell/components/MessageMarkdown.d.ts +23 -0
- package/dist/shell/components/MessageMarkdown.d.ts.map +1 -1
- package/dist/shell/components/MessageMarkdown.js +5 -3
- package/dist/shell/components/MouseInputRouter.js +5 -80
- package/dist/shell/components/OutputLine.d.ts.map +1 -1
- package/dist/shell/components/OutputLine.js +5 -3
- package/dist/shell/components/ProductBlock.d.ts.map +1 -1
- package/dist/shell/components/ProductBlock.js +5 -5
- package/dist/shell/components/ScrollViewport.js +3 -82
- package/dist/shell/components/SessionsPanel.js +2 -2
- package/dist/shell/components/ShellApp.d.ts.map +1 -1
- package/dist/shell/components/ShellApp.js +29 -24
- package/dist/shell/components/SlashSuggestions.js +2 -2
- package/dist/shell/components/StatusFooter.js +2 -2
- package/dist/shell/components/StatusTray.d.ts.map +1 -1
- package/dist/shell/components/StatusTray.js +2 -1
- package/dist/shell/components/StructuredDiff.js +2 -2
- package/dist/shell/components/TaskListView.js +2 -2
- package/dist/shell/components/TaskSuggestionBar.js +2 -2
- package/dist/shell/components/WorkflowProgressView.js +2 -2
- package/dist/shell/components/useAnchoredCursor.d.ts +6 -9
- package/dist/shell/components/useAnchoredCursor.d.ts.map +1 -1
- package/dist/shell/components/useAnchoredCursor.js +1 -1
- package/dist/shell/ink-renderer.d.ts.map +1 -1
- package/dist/shell/ink-renderer.js +29 -24
- package/dist/shell/models/transcript-selection-state.js +2 -2
- package/dist/shell/plain-renderer.d.ts.map +1 -1
- package/dist/shell/plain-renderer.js +2 -2
- package/dist/shell/text-utils.d.ts +16 -0
- package/dist/shell/text-utils.d.ts.map +1 -1
- package/dist/shell/text-utils.js +3 -1
- package/dist/shell/view-model.js +14 -14
- package/dist/slash-command-runtime.js +56 -55
- package/dist/slash-dispatch.js +4 -4
- package/dist/startup-runtime.js +2 -2
- package/dist/tool-output-presenter.d.ts.map +1 -1
- package/dist/tool-output-presenter.js +1 -1
- package/dist/tui-agent-job-runtime.js +11 -11
- package/dist/tui-data-types.d.ts +10 -0
- package/dist/tui-data-types.d.ts.map +1 -1
- package/dist/tui-details-runtime.js +10 -10
- package/dist/tui-memory-runtime.js +5 -5
- package/dist/tui-output-surface.js +15 -15
- package/dist/tui-permission-runtime.js +5 -5
- package/dist/tui-state-runtime.js +4 -4
- package/dist/verification-command-runtime.js +12 -12
- package/dist/workflow-command-runtime.d.ts.map +1 -1
- package/dist/workflow-command-runtime.js +34 -33
- package/package.json +5 -5
- package/dist/chunk-GW5YDCRZ.js +0 -42
|
@@ -47,6 +47,89 @@ function displayWidth(value) {
|
|
|
47
47
|
for (const char of value) width += charWidth(char);
|
|
48
48
|
return width;
|
|
49
49
|
}
|
|
50
|
+
function computeWrappedInputState(input) {
|
|
51
|
+
const normalizedText = String(input.text ?? "").replace(/\r/g, "");
|
|
52
|
+
const chars = Array.from(normalizedText);
|
|
53
|
+
const cursorOffset = clamp(input.cursorOffset, 0, chars.length);
|
|
54
|
+
const safeWidth = Math.max(0, Math.floor(Number.isFinite(input.width) ? input.width : 0));
|
|
55
|
+
const safePrefixWidth = Math.max(0, Math.floor(input.prefixWidth ?? 0));
|
|
56
|
+
const safePaddingLeft = Math.max(0, Math.floor(input.paddingLeft ?? 0));
|
|
57
|
+
const safePaddingRight = Math.max(0, Math.floor(input.paddingRight ?? 0));
|
|
58
|
+
const safeMinContentWidth = Math.max(0, Math.floor(input.minContentWidth ?? 0));
|
|
59
|
+
const contentWidth = Math.max(
|
|
60
|
+
safeMinContentWidth,
|
|
61
|
+
safeWidth - safePaddingLeft - safePaddingRight
|
|
62
|
+
);
|
|
63
|
+
const firstLineWidth = Math.max(1, contentWidth - safePrefixWidth);
|
|
64
|
+
const wrappedLines = [];
|
|
65
|
+
let cursorRow = 0;
|
|
66
|
+
let cursorCol = 0;
|
|
67
|
+
let cursorResolved = false;
|
|
68
|
+
const logicalLines = normalizedText.split("\n");
|
|
69
|
+
let logicalLineStart = 0;
|
|
70
|
+
let fallbackLineStart = 0;
|
|
71
|
+
let fallbackLineChars = [];
|
|
72
|
+
for (let logicalIndex = 0; logicalIndex < logicalLines.length; logicalIndex += 1) {
|
|
73
|
+
const lineText = logicalLines[logicalIndex] ?? "";
|
|
74
|
+
const lineChars = Array.from(lineText);
|
|
75
|
+
const lineStartOffset = logicalLineStart;
|
|
76
|
+
const lineEndOffset = lineStartOffset + lineChars.length;
|
|
77
|
+
const wrapWidth = logicalIndex === 0 ? firstLineWidth : Math.max(1, contentWidth);
|
|
78
|
+
const segments = wrapInputLine(lineChars, wrapWidth);
|
|
79
|
+
fallbackLineStart = lineStartOffset;
|
|
80
|
+
fallbackLineChars = lineChars;
|
|
81
|
+
for (const segment of segments) {
|
|
82
|
+
const segmentText = lineChars.slice(segment.start, segment.end).join("");
|
|
83
|
+
wrappedLines.push(segmentText);
|
|
84
|
+
if (!cursorResolved && cursorOffset >= lineStartOffset && cursorOffset <= lineEndOffset) {
|
|
85
|
+
const lineCursorOffset = cursorOffset - lineStartOffset;
|
|
86
|
+
if (lineCursorOffset >= segment.start && lineCursorOffset <= segment.end) {
|
|
87
|
+
cursorRow = wrappedLines.length - 1;
|
|
88
|
+
cursorCol = displayWidth(lineChars.slice(segment.start, lineCursorOffset).join(""));
|
|
89
|
+
cursorResolved = true;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
logicalLineStart += lineChars.length + 1;
|
|
94
|
+
}
|
|
95
|
+
if (!cursorResolved) {
|
|
96
|
+
cursorRow = Math.max(0, wrappedLines.length - 1);
|
|
97
|
+
cursorCol = displayWidth(
|
|
98
|
+
fallbackLineChars.slice(0, clamp(cursorOffset - fallbackLineStart, 0, fallbackLineChars.length)).join("")
|
|
99
|
+
);
|
|
100
|
+
if (chars.length === 0) cursorCol = 0;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
lines: wrappedLines.length > 0 ? wrappedLines : [""],
|
|
104
|
+
cursorRow,
|
|
105
|
+
cursorCol,
|
|
106
|
+
contentWidth
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function wrapInputLine(chars, wrapWidth) {
|
|
110
|
+
const safeWrapWidth = Math.max(1, Math.floor(wrapWidth));
|
|
111
|
+
const segments = [];
|
|
112
|
+
let start = 0;
|
|
113
|
+
while (start < chars.length || chars.length === 0 && start === 0) {
|
|
114
|
+
let end = start;
|
|
115
|
+
let width = 0;
|
|
116
|
+
while (end < chars.length) {
|
|
117
|
+
const nextWidth = charWidth(chars[end] ?? "");
|
|
118
|
+
if (width > 0 && width + nextWidth > safeWrapWidth) break;
|
|
119
|
+
width += nextWidth;
|
|
120
|
+
end += 1;
|
|
121
|
+
}
|
|
122
|
+
if (end === start && chars.length > 0) end += 1;
|
|
123
|
+
segments.push({ start, end });
|
|
124
|
+
if (chars.length === 0) break;
|
|
125
|
+
start = end;
|
|
126
|
+
}
|
|
127
|
+
return segments;
|
|
128
|
+
}
|
|
129
|
+
function clamp(value, min, max) {
|
|
130
|
+
if (!Number.isFinite(value)) return min;
|
|
131
|
+
return Math.min(max, Math.max(min, Math.floor(value)));
|
|
132
|
+
}
|
|
50
133
|
function truncateDisplay(value, max) {
|
|
51
134
|
const normalized = String(value || "").replace(/\s+/gu, " ").trim();
|
|
52
135
|
if (displayWidth(normalized) <= max) return normalized;
|
|
@@ -140,6 +223,7 @@ export {
|
|
|
140
223
|
wrapText,
|
|
141
224
|
charWidth,
|
|
142
225
|
displayWidth,
|
|
226
|
+
computeWrappedInputState,
|
|
143
227
|
truncateDisplay,
|
|
144
228
|
truncateMiddle,
|
|
145
229
|
composerMaxWidth,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createOutputBlock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EKYXI6C7.js";
|
|
4
4
|
import {
|
|
5
5
|
writeLine
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UGYFQF6M.js";
|
|
7
7
|
|
|
8
8
|
// src/tui-output-surface.ts
|
|
9
9
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureSession,
|
|
3
3
|
showCommandPanel
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PPUOHBAK.js";
|
|
5
5
|
import {
|
|
6
6
|
decidePermission
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HGCTHBUY.js";
|
|
8
8
|
import {
|
|
9
9
|
appendSystemEvent,
|
|
10
10
|
budgetToolResultTranscriptContent,
|
|
11
11
|
createEvidenceRecord,
|
|
12
12
|
rememberEvidence
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NK4NMYF5.js";
|
|
14
14
|
import {
|
|
15
15
|
sanitizeDiagnosticText,
|
|
16
16
|
truncateDisplay,
|
|
17
17
|
writeLine
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UGYFQF6M.js";
|
|
19
19
|
|
|
20
20
|
// src/capability-runtime.ts
|
|
21
21
|
import { randomUUID } from "crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProcessGuard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J6CYFWSW.js";
|
|
4
4
|
import {
|
|
5
5
|
sanitizeDiagnosticText,
|
|
6
6
|
truncateDisplay
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UGYFQF6M.js";
|
|
8
8
|
|
|
9
9
|
// src/process-command-runtime.ts
|
|
10
10
|
import { spawn } from "child_process";
|
|
@@ -37,6 +37,9 @@ async function runCommandCapture(command, args, cwd, timeoutMs) {
|
|
|
37
37
|
const stderr = [];
|
|
38
38
|
const timer = setTimeout(() => {
|
|
39
39
|
guard.requestStop(false);
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
guard.requestStop(true);
|
|
42
|
+
}, 1e3).unref();
|
|
40
43
|
resolvePromise({
|
|
41
44
|
exitCode: 124,
|
|
42
45
|
stdout: Buffer.concat(stdout).toString("utf8"),
|
|
@@ -17,9 +17,20 @@ var ProcessGuardRegistry = class {
|
|
|
17
17
|
child,
|
|
18
18
|
pid,
|
|
19
19
|
detached: options.detached === true,
|
|
20
|
-
label: options.label
|
|
20
|
+
label: options.label,
|
|
21
|
+
cwd: options.cwd,
|
|
22
|
+
retainAfterExit: options.retainAfterExit === true,
|
|
23
|
+
childExited: false,
|
|
24
|
+
workspaceSweep: options.workspaceSweep === true
|
|
21
25
|
});
|
|
22
|
-
const cleanup = () =>
|
|
26
|
+
const cleanup = () => {
|
|
27
|
+
const entry = this.tracked.get(pid);
|
|
28
|
+
if (!entry) return;
|
|
29
|
+
entry.childExited = true;
|
|
30
|
+
if (!entry.retainAfterExit) {
|
|
31
|
+
this.untrack(pid);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
23
34
|
child.once("exit", cleanup);
|
|
24
35
|
child.once("close", cleanup);
|
|
25
36
|
return true;
|
|
@@ -45,11 +56,17 @@ var ProcessGuardRegistry = class {
|
|
|
45
56
|
skipped: 0,
|
|
46
57
|
failures: []
|
|
47
58
|
};
|
|
59
|
+
const removePids = [];
|
|
48
60
|
for (const entry of this.tracked.values()) {
|
|
49
61
|
if (onlyPids && !onlyPids.has(entry.pid)) {
|
|
50
62
|
continue;
|
|
51
63
|
}
|
|
52
|
-
stopEntry(entry, force, deps, allowAsyncWindowsTreeKill, result)
|
|
64
|
+
if (stopEntry(entry, force, deps, allowAsyncWindowsTreeKill, result)) {
|
|
65
|
+
removePids.push(entry.pid);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
for (const pid of removePids) {
|
|
69
|
+
this.untrack(pid);
|
|
53
70
|
}
|
|
54
71
|
return result;
|
|
55
72
|
}
|
|
@@ -127,15 +144,15 @@ function recordStopResult(result) {
|
|
|
127
144
|
function stopEntry(entry, force, deps, allowAsyncWindowsTreeKill, result) {
|
|
128
145
|
if (entry.stopState === "force" || entry.stopState === "graceful" && !force) {
|
|
129
146
|
result.skipped += 1;
|
|
130
|
-
return;
|
|
147
|
+
return false;
|
|
131
148
|
}
|
|
132
149
|
entry.stopState = force ? "force" : "graceful";
|
|
133
150
|
result.attempted += 1;
|
|
134
151
|
if (deps.platform === "win32" && allowAsyncWindowsTreeKill) {
|
|
135
152
|
stopWindowsTree(entry, force, deps, result);
|
|
136
|
-
return;
|
|
153
|
+
return force;
|
|
137
154
|
}
|
|
138
|
-
stopWithSignal(entry, force, deps, result);
|
|
155
|
+
return stopWithSignal(entry, force, deps, result);
|
|
139
156
|
}
|
|
140
157
|
function stopWindowsTree(entry, force, deps, result) {
|
|
141
158
|
const args = ["/pid", String(entry.pid), "/t"];
|
|
@@ -152,19 +169,84 @@ function stopWindowsTree(entry, force, deps, result) {
|
|
|
152
169
|
result.failures.push({ pid: entry.pid, message: formatError(error) });
|
|
153
170
|
stopWithSignal(entry, force, deps, result);
|
|
154
171
|
}
|
|
172
|
+
if (force && entry.cwd && shouldRunWindowsWorkspaceSweep(entry)) {
|
|
173
|
+
stopWindowsWorkspaceProcesses(entry.pid, entry.cwd, deps);
|
|
174
|
+
}
|
|
155
175
|
}
|
|
156
176
|
function stopWithSignal(entry, force, deps, result) {
|
|
157
177
|
const signal = force ? "SIGKILL" : "SIGTERM";
|
|
158
178
|
try {
|
|
159
179
|
if (deps.platform !== "win32" && entry.detached) {
|
|
160
180
|
deps.kill(-entry.pid, signal);
|
|
161
|
-
return;
|
|
181
|
+
return force;
|
|
162
182
|
}
|
|
163
183
|
entry.child.kill(signal);
|
|
184
|
+
return force;
|
|
164
185
|
} catch (error) {
|
|
186
|
+
if (isProcessGone(error)) {
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
165
189
|
result.failures.push({ pid: entry.pid, message: formatError(error) });
|
|
190
|
+
return false;
|
|
166
191
|
}
|
|
167
192
|
}
|
|
193
|
+
function stopWindowsWorkspaceProcesses(rootPid, cwd, deps) {
|
|
194
|
+
const script = `
|
|
195
|
+
$rootPid = ${rootPid}
|
|
196
|
+
$cwd = ${JSON.stringify(cwd)}
|
|
197
|
+
$cwdLower = $cwd.ToLowerInvariant()
|
|
198
|
+
$rows = @(Get-CimInstance Win32_Process | Select-Object ProcessId,ParentProcessId,CommandLine)
|
|
199
|
+
$byPid = @{}
|
|
200
|
+
$children = @{}
|
|
201
|
+
foreach ($row in $rows) {
|
|
202
|
+
$pidInt = [int]$row.ProcessId
|
|
203
|
+
$parentInt = [int]$row.ParentProcessId
|
|
204
|
+
$byPid[$pidInt] = $row
|
|
205
|
+
if (-not $children.ContainsKey($parentInt)) { $children[$parentInt] = @() }
|
|
206
|
+
$children[$parentInt] += $pidInt
|
|
207
|
+
}
|
|
208
|
+
$protected = New-Object 'System.Collections.Generic.HashSet[int]'
|
|
209
|
+
$cursor = $PID
|
|
210
|
+
while ($cursor -gt 0 -and $byPid.ContainsKey($cursor)) {
|
|
211
|
+
[void]$protected.Add($cursor)
|
|
212
|
+
$cursor = [int]$byPid[$cursor].ParentProcessId
|
|
213
|
+
}
|
|
214
|
+
$targets = New-Object 'System.Collections.Generic.HashSet[int]'
|
|
215
|
+
$queue = New-Object 'System.Collections.Generic.Queue[int]'
|
|
216
|
+
$queue.Enqueue($rootPid)
|
|
217
|
+
while ($queue.Count -gt 0) {
|
|
218
|
+
$pid = $queue.Dequeue()
|
|
219
|
+
if (-not $targets.Add($pid)) { continue }
|
|
220
|
+
if ($children.ContainsKey($pid)) {
|
|
221
|
+
foreach ($childPid in $children[$pid]) { $queue.Enqueue($childPid) }
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
foreach ($row in $rows) {
|
|
225
|
+
$cmd = [string]$row.CommandLine
|
|
226
|
+
if ($cmd.ToLowerInvariant().Contains($cwdLower)) {
|
|
227
|
+
[void]$targets.Add([int]$row.ProcessId)
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
foreach ($targetPid in $targets) {
|
|
231
|
+
if ($targetPid -gt 0 -and -not $protected.Contains($targetPid)) {
|
|
232
|
+
Stop-Process -Id $targetPid -Force -ErrorAction SilentlyContinue
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
`;
|
|
236
|
+
try {
|
|
237
|
+
deps.spawn("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", script], {
|
|
238
|
+
windowsHide: true,
|
|
239
|
+
stdio: "ignore"
|
|
240
|
+
});
|
|
241
|
+
} catch {
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function isProcessGone(error) {
|
|
245
|
+
return typeof error === "object" && error !== null && "code" in error && error.code === "ESRCH";
|
|
246
|
+
}
|
|
247
|
+
function shouldRunWindowsWorkspaceSweep(entry) {
|
|
248
|
+
return entry.workspaceSweep || process.env.LINGHUN_PROCESS_GUARD_WORKSPACE_SWEEP === "1";
|
|
249
|
+
}
|
|
168
250
|
function formatError(error) {
|
|
169
251
|
return error instanceof Error ? error.message : String(error);
|
|
170
252
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deriveAgentDisplayName
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UIKN3CDF.js";
|
|
4
4
|
import {
|
|
5
5
|
formatDisplayPath,
|
|
6
6
|
sanitizeDisplayPaths,
|
|
7
7
|
truncateDisplay
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UGYFQF6M.js";
|
|
9
9
|
|
|
10
10
|
// src/tui-details-runtime.ts
|
|
11
11
|
import { join } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatIndexRuntimeRef
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TYTVAFGB.js";
|
|
4
4
|
import {
|
|
5
5
|
withProviderRetry
|
|
6
6
|
} from "./chunk-EBACIBJP.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
sanitizeDiagnosticText,
|
|
15
15
|
sanitizeDisplayPaths,
|
|
16
16
|
truncateDisplay
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UGYFQF6M.js";
|
|
18
18
|
|
|
19
19
|
// src/deep-compact-runtime.ts
|
|
20
20
|
import { randomUUID } from "crypto";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MAX_EVIDENCE_RECORDS
|
|
3
|
+
} from "./chunk-RDGM4RUE.js";
|
|
1
4
|
import {
|
|
2
5
|
applyToolResultBudgetToMessages,
|
|
3
6
|
formatToolResultBudgetEvidenceSummary,
|
|
4
7
|
formatToolResultBudgetSystemEvent
|
|
5
8
|
} from "./chunk-O7S3HYE6.js";
|
|
6
|
-
import {
|
|
7
|
-
MAX_EVIDENCE_RECORDS
|
|
8
|
-
} from "./chunk-RDGM4RUE.js";
|
|
9
9
|
import {
|
|
10
10
|
LINGHUN_DEFAULT_TOOL_RESULT_CHARS,
|
|
11
11
|
LINGHUN_MAX_TOOL_RESULT_BYTES
|
|
12
12
|
} from "./chunk-IWUIOLMF.js";
|
|
13
13
|
import {
|
|
14
14
|
writeHandoffPacket
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7ZMDQZ22.js";
|
|
16
16
|
import {
|
|
17
17
|
deriveToolSupportsClaims
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YKOXJQGX.js";
|
|
19
19
|
import {
|
|
20
20
|
mergeFailureRecord,
|
|
21
21
|
writeFailureRecord
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6GXIGN5W.js";
|
|
23
23
|
import {
|
|
24
24
|
classifyProviderFailure
|
|
25
25
|
} from "./chunk-OZMX3E35.js";
|
|
26
26
|
import {
|
|
27
27
|
truncateDisplay
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UGYFQF6M.js";
|
|
29
29
|
import {
|
|
30
30
|
summarizeArchitectureCard
|
|
31
31
|
} from "./chunk-MVONSJEN.js";
|
|
@@ -215,11 +215,11 @@ async function recordArchitectureRuntimeCard(context, sessionId, card) {
|
|
|
215
215
|
return evidence;
|
|
216
216
|
}
|
|
217
217
|
async function recordToolEvidence(context, sessionId, name, output, input) {
|
|
218
|
-
const kind = name === "Read" ? "file_read" : name === "Grep" || name === "Glob" ? "grep_result" : name === "Bash" || name === "Write" || name === "Edit" || name === "MultiEdit" ? "command_output" : null;
|
|
218
|
+
const kind = name === "Read" || name === "ReadSnippets" || name === "SourcePack" ? "file_read" : name === "Grep" || name === "Glob" ? "grep_result" : name === "Bash" || name === "Write" || name === "Edit" || name === "MultiEdit" ? "command_output" : null;
|
|
219
219
|
if (!kind) {
|
|
220
220
|
return null;
|
|
221
221
|
}
|
|
222
|
-
const readOnlyEvidence = name === "Read" || name === "Grep" || name === "Glob";
|
|
222
|
+
const readOnlyEvidence = name === "Read" || name === "ReadSnippets" || name === "SourcePack" || name === "Grep" || name === "Glob";
|
|
223
223
|
const evidence = createEvidenceRecord(
|
|
224
224
|
kind,
|
|
225
225
|
readOnlyEvidence ? formatReadOnlyToolEvidenceSummary(name, output, input) : `${name}: ${truncateDisplay(output.text.replace(/\s+/g, " "), 120)}`,
|
|
@@ -237,11 +237,44 @@ async function recordToolEvidence(context, sessionId, name, output, input) {
|
|
|
237
237
|
return evidence;
|
|
238
238
|
}
|
|
239
239
|
function formatReadOnlyToolEvidenceSummary(name, output, input) {
|
|
240
|
-
const target = readToolEvidenceTarget(input);
|
|
240
|
+
const target = name === "SourcePack" ? sourcePackEvidenceTarget(input, output) : name === "ReadSnippets" ? readSnippetsEvidenceTarget(input) : readToolEvidenceTarget(input);
|
|
241
241
|
const artifact = output.fullOutputPath ? "artifact=yes" : "artifact=no";
|
|
242
242
|
const bytes = output.text.length;
|
|
243
243
|
return `${name}: ${target}; output_chars=${bytes}; ${artifact}`;
|
|
244
244
|
}
|
|
245
|
+
function sourcePackEvidenceTarget(input, output) {
|
|
246
|
+
const query = readStringField(input, "query");
|
|
247
|
+
const paths = extractOutputCandidatePaths(output.data);
|
|
248
|
+
const pathText = paths.length > 0 ? `; paths=${truncateDisplay(paths.slice(0, 4).join(","), 120)}` : "";
|
|
249
|
+
return `query=${truncateDisplay((query ?? "unspecified").replace(/\s+/g, " "), 90)}${pathText}`;
|
|
250
|
+
}
|
|
251
|
+
function readSnippetsEvidenceTarget(input) {
|
|
252
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) return "ranges=unspecified";
|
|
253
|
+
const ranges = input.ranges;
|
|
254
|
+
if (!Array.isArray(ranges)) return "ranges=unspecified";
|
|
255
|
+
const paths = ranges.map(
|
|
256
|
+
(item) => item && typeof item === "object" && typeof item.path === "string" ? item.path : void 0
|
|
257
|
+
).filter((item) => Boolean(item));
|
|
258
|
+
return paths.length > 0 ? `ranges=${truncateDisplay(paths.slice(0, 4).join(","), 120)}` : "ranges=unspecified";
|
|
259
|
+
}
|
|
260
|
+
function readStringField(input, key) {
|
|
261
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) return void 0;
|
|
262
|
+
const value = input[key];
|
|
263
|
+
return typeof value === "string" && value.trim() ? value : void 0;
|
|
264
|
+
}
|
|
265
|
+
function extractOutputCandidatePaths(data) {
|
|
266
|
+
if (!data || typeof data !== "object" || Array.isArray(data)) return [];
|
|
267
|
+
const record = data;
|
|
268
|
+
const candidatePaths = record.candidatePaths;
|
|
269
|
+
if (Array.isArray(candidatePaths)) {
|
|
270
|
+
return candidatePaths.filter((item) => typeof item === "string");
|
|
271
|
+
}
|
|
272
|
+
const snippets = record.snippets;
|
|
273
|
+
if (!Array.isArray(snippets)) return [];
|
|
274
|
+
return snippets.map(
|
|
275
|
+
(item) => item && typeof item === "object" && typeof item.path === "string" ? item.path : void 0
|
|
276
|
+
).filter((item) => Boolean(item));
|
|
277
|
+
}
|
|
245
278
|
function readToolEvidenceTarget(input) {
|
|
246
279
|
if (!input || typeof input !== "object" || Array.isArray(input)) return "target=unspecified";
|
|
247
280
|
const record = input;
|
|
@@ -258,6 +291,15 @@ function readToolEvidenceTarget(input) {
|
|
|
258
291
|
return `paths=${truncateDisplay(values.slice(0, 3).join(","), 90)}`;
|
|
259
292
|
}
|
|
260
293
|
}
|
|
294
|
+
const ranges = record.ranges;
|
|
295
|
+
if (Array.isArray(ranges)) {
|
|
296
|
+
const values = ranges.map(
|
|
297
|
+
(item) => item && typeof item === "object" && typeof item.path === "string" ? item.path : void 0
|
|
298
|
+
).filter((item) => Boolean(item));
|
|
299
|
+
if (values.length > 0) {
|
|
300
|
+
return `ranges=${truncateDisplay(values.slice(0, 3).join(","), 90)}`;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
261
303
|
return "target=unspecified";
|
|
262
304
|
}
|
|
263
305
|
async function recordVerificationEvidence(context, sessionId, report) {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
evaluateUserStateSignal
|
|
3
3
|
} from "./chunk-KQJHVJZB.js";
|
|
4
|
+
import {
|
|
5
|
+
detectEngineeringArtifactTargets,
|
|
6
|
+
formatEngineeringFailureBoundaryHint,
|
|
7
|
+
formatEngineeringProfileStrategyHint
|
|
8
|
+
} from "./chunk-4UER2AKI.js";
|
|
4
9
|
import {
|
|
5
10
|
LINGHUN_AGENT_CHILD_TURNS_AGENT,
|
|
6
11
|
LINGHUN_AGENT_CHILD_TURNS_BASE,
|
|
@@ -119,6 +124,23 @@ function evaluateMetaScheduler(input) {
|
|
|
119
124
|
const suggestedRole = highRiskClaim ? "verifier" : taskKind === "workflow" || taskKind === "agent" ? "planner" : void 0;
|
|
120
125
|
const recentDeniedCount = input.recentDeniedCount ?? 0;
|
|
121
126
|
const providerPlan = input.providerCooldownBlocked ? "cooldownBlocked" : providerFailure ? "fallbackCandidate" : "keepCurrent";
|
|
127
|
+
const engineeringProfile = input.engineeringProfile ?? "generic";
|
|
128
|
+
const inferredFailureCategory = input.engineeringFailureCategory ?? inferEngineeringFailureCategory({
|
|
129
|
+
providerFailure,
|
|
130
|
+
lastVerificationStatus: input.lastVerificationStatus,
|
|
131
|
+
lastToolFailure: input.lastToolFailure
|
|
132
|
+
});
|
|
133
|
+
const finalBoundaryHint = formatEngineeringFailureBoundaryHint({
|
|
134
|
+
profile: engineeringProfile,
|
|
135
|
+
failureCategory: inferredFailureCategory
|
|
136
|
+
});
|
|
137
|
+
const engineeringSignal = {
|
|
138
|
+
profile: engineeringProfile,
|
|
139
|
+
strategyHint: formatEngineeringProfileStrategyHint(engineeringProfile),
|
|
140
|
+
artifactTargets: detectEngineeringArtifactTargets(input.userText),
|
|
141
|
+
...inferredFailureCategory ? { failureCategory: inferredFailureCategory } : {},
|
|
142
|
+
...finalBoundaryHint ? { finalBoundaryHint } : {}
|
|
143
|
+
};
|
|
122
144
|
const trustScore = input.trustScore ?? 50;
|
|
123
145
|
const consecutiveFailures = input.consecutiveFailures ?? 0;
|
|
124
146
|
const consecutiveSuccesses = input.consecutiveSuccesses ?? 0;
|
|
@@ -230,6 +252,7 @@ function evaluateMetaScheduler(input) {
|
|
|
230
252
|
userState: adjustedUserStateDecision,
|
|
231
253
|
capabilityPlan,
|
|
232
254
|
userStatePersistence,
|
|
255
|
+
engineeringSignal,
|
|
233
256
|
permissionSignal: {
|
|
234
257
|
permissionMode: input.permissionMode ?? "default",
|
|
235
258
|
recentDenied: recentDeniedCount > 0,
|
|
@@ -364,6 +387,7 @@ function formatMetaSchedulerDirective(decision) {
|
|
|
364
387
|
"MetaSchedulerForModel:",
|
|
365
388
|
...decision.directives.map((item) => `- ${item}`),
|
|
366
389
|
`- Typed policy route: task ${decision.policyDecision.taskKind}; risk ${decision.policyDecision.riskLevel}; budget ${decision.suggestedMaxTodoRounds} rounds; agent-max-turns ${decision.suggestedMaxAgentChildTurns}; agent-tool-rounds ${decision.suggestedMaxAgentToolRounds}; bg-concurrency ${decision.suggestedBackgroundConcurrency}; provider ${decision.policyDecision.providerPlan}; source-first ${decision.policyDecision.executionPlan.preferSourceFirst ? "yes" : "no"}; verification ${decision.policyDecision.executionPlan.requireVerification ? "required" : "normal"}; explicit-gate ${decision.policyDecision.permissionPlan.requireExplicitGate ? "required" : "normal"}; user-state ${decision.policyDecision.userState.kind}; capability ${decision.policyDecision.capabilitySignal.active ? "candidate" : "none"}.`,
|
|
390
|
+
`- EngineeringTaskProfile: profile=${decision.policyDecision.engineeringSignal.profile}; strategy=${decision.policyDecision.engineeringSignal.strategyHint}; failure=${decision.policyDecision.engineeringSignal.failureCategory ?? "none"}; final-boundary=${decision.policyDecision.engineeringSignal.finalBoundaryHint ?? "normal"}.`,
|
|
367
391
|
...decision.policyDecision.executionPlan.preferAgent || decision.policyDecision.executionPlan.preferWorkflow ? ["- Action: this is an agent/workflow-classified task. Delegate execution via StartAgent or RunWorkflow tools. Do not serial-Todo-plan every step yourself; use the extended planning budget to set up delegation, then call the tool."] : [],
|
|
368
392
|
"- Keep RuntimeStatusForModel, UserStateDecision, capabilitySignal, capabilityPlan, CapabilityExecutionRequest, CapabilityExecutionResult, raw capability payload, interactionPlan, verificationPlan, notificationPlan, confidence, gateId, raw evidence, raw tool_result, and internal scheduler labels out of the user-visible final answer."
|
|
369
393
|
].join("\n");
|
|
@@ -832,6 +856,14 @@ function classifyVerificationLevel(input) {
|
|
|
832
856
|
function isRiskyVerificationStatus(status) {
|
|
833
857
|
return status === "fail" || status === "partial" || status === "stale" || status === "cancelled" || status === "timeout";
|
|
834
858
|
}
|
|
859
|
+
function inferEngineeringFailureCategory(input) {
|
|
860
|
+
if (input.providerFailure) return "provider_error";
|
|
861
|
+
if (input.lastVerificationStatus === "timeout") return "test_timeout";
|
|
862
|
+
if (input.lastToolFailure && /missing artifact|missing required artifact|no such file|not found/iu.test(input.lastToolFailure.summary)) {
|
|
863
|
+
return "missing_artifact";
|
|
864
|
+
}
|
|
865
|
+
return void 0;
|
|
866
|
+
}
|
|
835
867
|
function summarizeRuntimeSignal(input, evidenceFreshness) {
|
|
836
868
|
let runningAgents = 0;
|
|
837
869
|
let runningJobs = 0;
|
|
@@ -1097,6 +1129,7 @@ function createPolicyDecision(input) {
|
|
|
1097
1129
|
permission: input.capabilityPlan.permission,
|
|
1098
1130
|
riskLevel: input.capabilityPlan.riskLevel
|
|
1099
1131
|
},
|
|
1132
|
+
engineeringSignal: input.engineeringSignal,
|
|
1100
1133
|
capabilityPlan: input.capabilityPlan,
|
|
1101
1134
|
runtimeSignal: input.runtimeSignal,
|
|
1102
1135
|
userState: input.userState,
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
normalizeMemoryStatus,
|
|
3
3
|
pathExists,
|
|
4
4
|
summarizeProjectRules
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6JGRNES6.js";
|
|
6
6
|
import {
|
|
7
7
|
MEMORY_LEARNING_STATE_FILE
|
|
8
8
|
} from "./chunk-5H7RRF7C.js";
|
|
9
9
|
import {
|
|
10
10
|
formatDisplayPath,
|
|
11
11
|
truncateDisplay
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UGYFQF6M.js";
|
|
13
13
|
|
|
14
14
|
// src/tui-memory-runtime.ts
|
|
15
15
|
import { randomUUID } from "crypto";
|