@linghun/tui 0.1.1 → 0.1.3
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 +55 -55
- package/dist/cache-command-runtime.js +3 -3
- package/dist/capability-runtime.js +34 -34
- package/dist/{chunk-TJLC3QAS.js → chunk-36ZWUJQS.js} +1 -1
- 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-QG2FJ3NR.js → chunk-5OZEJQBH.js} +3 -3
- package/dist/{chunk-J7ZE2JKP.js → chunk-6C32YAB5.js} +19 -7
- 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-AZU7HXIT.js → chunk-6JPUBF7B.js} +18 -18
- package/dist/{chunk-KO64OFSG.js → chunk-7C6T7RKJ.js} +1 -1
- package/dist/{chunk-LDABZV5V.js → chunk-7RZE45OT.js} +1 -1
- package/dist/{chunk-4E56DWEZ.js → chunk-7XAOTGHZ.js} +5 -5
- package/dist/{chunk-MLUIOBKL.js → chunk-7ZMDQZ22.js} +4 -4
- package/dist/{chunk-X7A22JHP.js → chunk-A4H3UTJZ.js} +1 -1
- package/dist/{chunk-D3UTL2QX.js → chunk-ATY7WBIT.js} +1 -1
- package/dist/{chunk-ZOSK2UEU.js → chunk-BBK5BA5C.js} +99 -117
- package/dist/{chunk-7TYK55JT.js → chunk-BEDD7OFL.js} +5 -5
- package/dist/{chunk-SRZIA6B4.js → chunk-BNC4F63N.js} +1 -1
- package/dist/{chunk-LIPZJNXS.js → chunk-CQCJGMXG.js} +4 -4
- package/dist/{chunk-L2GU3PWU.js → chunk-DEIYY6NI.js} +324 -16
- package/dist/{chunk-5CXN4JLE.js → chunk-EGHM55EV.js} +4 -4
- package/dist/{chunk-HIIYRATQ.js → chunk-ESAACKVG.js} +11 -7
- package/dist/{chunk-O6MKVGVK.js → chunk-G7O26P5X.js} +1 -1
- package/dist/{chunk-APJIC2O5.js → chunk-GTIZNO5O.js} +84 -0
- package/dist/{chunk-UOHZQIVL.js → chunk-GXFYUZAM.js} +1 -1
- package/dist/{chunk-Y5ZV47XC.js → chunk-GYHEUVR2.js} +7 -7
- package/dist/{chunk-QTDGRZMZ.js → chunk-HJOC5WUV.js} +1 -1
- package/dist/{chunk-KOULRCYJ.js → chunk-HMGYFENJ.js} +2 -2
- package/dist/{chunk-SYBNJZEL.js → chunk-HPMBSOQ4.js} +1 -1
- package/dist/{chunk-4K6UB524.js → chunk-IPZZGDUU.js} +1 -1
- package/dist/{chunk-JJQETFCR.js → chunk-IQS34W5A.js} +4 -4
- package/dist/{chunk-WOBNOBB5.js → chunk-J7AAPUTV.js} +3 -3
- package/dist/{chunk-6CI6TKLN.js → chunk-JAVRQ3LM.js} +1 -1
- package/dist/{chunk-VCSRBS47.js → chunk-JLAJZPOC.js} +1 -1
- package/dist/{chunk-CD54BQJ5.js → chunk-JMUAQUQQ.js} +4 -4
- package/dist/{chunk-NL4M3V5D.js → chunk-KKZBBCHK.js} +1 -1
- package/dist/{chunk-RMLTVKOY.js → chunk-L4YVE3RG.js} +2 -2
- package/dist/{chunk-F6TVBCZV.js → chunk-LWW2IAFC.js} +1 -1
- package/dist/{chunk-VAGL7CNR.js → chunk-NMOVU75L.js} +4 -4
- package/dist/{chunk-K56D3X7S.js → chunk-NWZ44SFI.js} +112 -5
- package/dist/{chunk-DYDTLRHB.js → chunk-OH35XDD4.js} +2 -2
- package/dist/{chunk-BOV4K7FP.js → chunk-OI5TZ37D.js} +36 -1
- package/dist/{chunk-LQTVYUT3.js → chunk-OJTMM5CV.js} +2 -2
- package/dist/{chunk-SILJJAK2.js → chunk-OMWSM2DA.js} +2 -2
- package/dist/{chunk-HW2TBXVK.js → chunk-OPVRII63.js} +1 -1
- package/dist/{chunk-XWRHWM4H.js → chunk-OV5OT66G.js} +11 -11
- package/dist/{chunk-F43AMWLZ.js → chunk-PDTJVJVD.js} +1 -1
- package/dist/{chunk-DDXS2RDZ.js → chunk-PHPEPZAA.js} +1 -1
- package/dist/{chunk-UDQT5CWK.js → chunk-PI6T2AGS.js} +1 -1
- package/dist/{chunk-3BPKJMIV.js → chunk-Q57WS7YZ.js} +4 -4
- package/dist/{chunk-33E6RDCY.js → chunk-QD4SCW4A.js} +229 -192
- package/dist/{chunk-QJTET7EZ.js → chunk-QXV2N4F2.js} +4 -4
- package/dist/{chunk-RFSSKGCE.js → chunk-RDTVAQBD.js} +239 -75
- 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-P277M7Z5.js → chunk-TO6IN4LA.js} +201 -5
- 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-JGDIO2NF.js → chunk-UO3KYTBU.js} +1 -1
- package/dist/{chunk-MXPBYB54.js → chunk-UYU4QN3P.js} +2 -2
- package/dist/{chunk-J6CYFWSW.js → chunk-VDQTNA4W.js} +20 -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-CRQORMFF.js → chunk-X37FSYAX.js} +1 -1
- package/dist/chunk-X7HMDZZQ.js +85 -0
- package/dist/{chunk-624A7BBJ.js → chunk-XYY5LRSF.js} +4 -4
- package/dist/{chunk-CDVYF7RU.js → chunk-YBTXLLO5.js} +4 -4
- package/dist/{chunk-UN53MBAR.js → chunk-YGXPS5F2.js} +2 -2
- package/dist/chunk-YQNK7HK3.js +87 -0
- package/dist/{chunk-KJVHLTQR.js → chunk-Z265MCGC.js} +12 -8
- package/dist/{chunk-RM5QMOFY.js → chunk-ZKPQ4KLK.js} +1 -1
- package/dist/{chunk-4UER2AKI.js → chunk-ZPFOP557.js} +190 -0
- package/dist/command-panel-runtime.js +33 -33
- package/dist/compact-cache-command-runtime.js +55 -55
- package/dist/compact-preflight-runtime.js +20 -20
- package/dist/connector-runtime.js +35 -35
- package/dist/deep-compact-runtime.js +6 -6
- package/dist/deferred-tools-catalog.js +5 -5
- package/dist/details-status-runtime.js +33 -33
- package/dist/evidence-runtime.d.ts.map +1 -1
- package/dist/evidence-runtime.js +12 -11
- package/dist/extension-command-runtime.js +7 -7
- package/dist/extension-slash-runtime.js +34 -34
- package/dist/failure-learning-command-runtime.js +35 -35
- package/dist/failure-learning-presenter.js +4 -4
- package/dist/failure-learning-runtime.js +3 -3
- package/dist/final-answer-gate.d.ts +1 -0
- package/dist/final-answer-gate.d.ts.map +1 -1
- package/dist/final-answer-gate.js +4 -2
- package/dist/git-command-runtime.js +34 -34
- package/dist/handoff-session-runtime.js +8 -8
- package/dist/headless-bench-runtime.d.ts +19 -1
- package/dist/headless-bench-runtime.d.ts.map +1 -1
- package/dist/headless-bench-runtime.js +3 -1
- package/dist/index-result-presenter.js +5 -5
- package/dist/index-runtime.js +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +143 -69
- package/dist/job-agent-command-runtime.js +33 -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 +38 -38
- package/dist/mcp-sse-runtime.js +3 -3
- package/dist/mcp-stdio-runtime.js +4 -4
- package/dist/memory-command-runtime.js +35 -35
- package/dist/memory-extraction-runtime.js +3 -3
- package/dist/memory-rules-runtime.js +3 -3
- package/dist/meta-scheduler-runtime.js +2 -2
- package/dist/model-command-runtime.js +34 -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.js +10 -10
- package/dist/model-stream-runtime.d.ts.map +1 -1
- package/dist/model-stream-runtime.js +55 -55
- package/dist/model-tool-runtime.d.ts +1 -0
- package/dist/model-tool-runtime.d.ts.map +1 -1
- package/dist/model-tool-runtime.js +57 -55
- package/dist/pending-details-presenter.js +3 -3
- package/dist/permission-approval-runtime.js +55 -55
- package/dist/permission-continuation-runtime.d.ts.map +1 -1
- package/dist/permission-continuation-runtime.js +4 -4
- 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 +5 -1
- package/dist/provider-loop-runtime.js +3 -3
- package/dist/remote-command-runtime.js +34 -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 +4 -4
- 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 +28 -23
- 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 +28 -23
- 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 +55 -55
- package/dist/slash-dispatch.js +4 -4
- package/dist/startup-runtime.js +2 -2
- package/dist/tool-output-presenter.d.ts +1 -0
- package/dist/tool-output-presenter.d.ts.map +1 -1
- package/dist/tool-output-presenter.js +3 -1
- package/dist/tui-agent-job-runtime.js +11 -11
- package/dist/tui-context-runtime.d.ts +2 -0
- package/dist/tui-context-runtime.d.ts.map +1 -1
- package/dist/tui-data-types.d.ts +1 -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.js +33 -33
- package/package.json +5 -5
- package/dist/chunk-GW5YDCRZ.js +0 -42
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
decideMemoryExtraction,
|
|
4
4
|
refreshAutoMemoryFiles,
|
|
5
5
|
writeAutoMemoryFiles
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TVNWAEJR.js";
|
|
7
7
|
import {
|
|
8
8
|
showCommandPanel
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6JPUBF7B.js";
|
|
10
10
|
import {
|
|
11
11
|
writeErrorLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OH35XDD4.js";
|
|
13
13
|
import {
|
|
14
14
|
createHandoffPacket,
|
|
15
15
|
formatResumePacket,
|
|
16
16
|
hydrateResumeContext,
|
|
17
17
|
validateHandoffPacket
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7ZMDQZ22.js";
|
|
19
19
|
import {
|
|
20
20
|
createEvidenceBackedMemoryCandidates,
|
|
21
21
|
createLinghunMdTemplate,
|
|
@@ -33,15 +33,15 @@ import {
|
|
|
33
33
|
removeMemoryRecord,
|
|
34
34
|
writeMemoryLearningMode,
|
|
35
35
|
writeMemoryRecord
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-OJTMM5CV.js";
|
|
37
37
|
import {
|
|
38
38
|
pathExists,
|
|
39
39
|
summarizeProjectRules
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6JGRNES6.js";
|
|
41
41
|
import {
|
|
42
42
|
formatError,
|
|
43
43
|
writeLine
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-UGYFQF6M.js";
|
|
45
45
|
|
|
46
46
|
// src/memory-command-runtime.ts
|
|
47
47
|
import { writeFile } from "fs/promises";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProcessGuard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VDQTNA4W.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";
|
|
@@ -27,15 +27,15 @@ import {
|
|
|
27
27
|
} from "./chunk-CFXB5SE5.js";
|
|
28
28
|
import {
|
|
29
29
|
showCommandPanel
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6JPUBF7B.js";
|
|
31
31
|
import {
|
|
32
32
|
redactRemoteSummary,
|
|
33
33
|
remoteTranscriptSummary
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6C32YAB5.js";
|
|
35
35
|
import {
|
|
36
36
|
applyRemoteSessionDisables,
|
|
37
37
|
createRemoteState
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6JGRNES6.js";
|
|
39
39
|
import {
|
|
40
40
|
createDefaultReplBridgeSocketPath,
|
|
41
41
|
createReplBridgeState,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
truncateDisplay,
|
|
48
48
|
writeLine
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-UGYFQF6M.js";
|
|
50
50
|
|
|
51
51
|
// src/remote-command-runtime.ts
|
|
52
52
|
import { randomUUID } from "crypto";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
} from "./chunk-NMNOAFFT.js";
|
|
12
12
|
import {
|
|
13
13
|
showCommandPanel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6JPUBF7B.js";
|
|
15
15
|
import {
|
|
16
16
|
snapshotDeferredToolsSummary,
|
|
17
17
|
snapshotDiscoveredDeferredToolsSummary
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6DBBXNEG.js";
|
|
19
19
|
import {
|
|
20
20
|
getContextWindowForModel
|
|
21
21
|
} from "./chunk-K4FSYBSY.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-2YL5VKJ5.js";
|
|
33
33
|
import {
|
|
34
34
|
writeLine
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UGYFQF6M.js";
|
|
36
36
|
|
|
37
37
|
// src/model-command-runtime.ts
|
|
38
38
|
import {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
redactedPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HMGYFENJ.js";
|
|
4
4
|
import {
|
|
5
5
|
formatJobRunnerInline
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PI6T2AGS.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6JGRNES6.js";
|
|
10
10
|
import {
|
|
11
11
|
sanitizeDiagnosticText
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UGYFQF6M.js";
|
|
13
13
|
|
|
14
14
|
// src/runner-runtime.ts
|
|
15
15
|
import { spawn, spawnSync } from "child_process";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
detectEngineeringArtifactTargets,
|
|
6
6
|
formatEngineeringFailureBoundaryHint,
|
|
7
7
|
formatEngineeringProfileStrategyHint
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZPFOP557.js";
|
|
9
9
|
import {
|
|
10
10
|
LINGHUN_AGENT_CHILD_TURNS_AGENT,
|
|
11
11
|
LINGHUN_AGENT_CHILD_TURNS_BASE,
|
|
@@ -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,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatApprovedRunnerSpecLine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JMUAQUQQ.js";
|
|
4
4
|
import {
|
|
5
5
|
formatJobNextAction,
|
|
6
6
|
formatJobRunnerInline,
|
|
7
7
|
formatJobRunnerReportLine
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PI6T2AGS.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6JGRNES6.js";
|
|
12
12
|
import {
|
|
13
13
|
formatDisplayPath,
|
|
14
14
|
sanitizeDisplayPaths,
|
|
15
15
|
truncateDisplay
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UGYFQF6M.js";
|
|
17
17
|
|
|
18
18
|
// src/job-runtime.ts
|
|
19
19
|
import { createHash } from "crypto";
|
|
@@ -20,6 +20,37 @@ function createToolInputSchema(name) {
|
|
|
20
20
|
required: ["path"]
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
+
if (name === "ReadSnippets") {
|
|
24
|
+
return {
|
|
25
|
+
...base,
|
|
26
|
+
properties: {
|
|
27
|
+
ranges: {
|
|
28
|
+
type: "array",
|
|
29
|
+
items: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: {
|
|
32
|
+
path: { type: "string" },
|
|
33
|
+
start: { type: "number" },
|
|
34
|
+
end: { type: "number" }
|
|
35
|
+
},
|
|
36
|
+
required: ["path", "start", "end"],
|
|
37
|
+
additionalProperties: false
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
required: ["ranges"]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
if (name === "SourcePack") {
|
|
45
|
+
return {
|
|
46
|
+
...base,
|
|
47
|
+
properties: {
|
|
48
|
+
query: { type: "string" },
|
|
49
|
+
limit: { type: "number" }
|
|
50
|
+
},
|
|
51
|
+
required: ["query"]
|
|
52
|
+
};
|
|
53
|
+
}
|
|
23
54
|
if (name === "Write") {
|
|
24
55
|
return {
|
|
25
56
|
...base,
|
|
@@ -92,9 +123,84 @@ function createToolInputSchema(name) {
|
|
|
92
123
|
...base,
|
|
93
124
|
properties: {
|
|
94
125
|
command: { type: "string" },
|
|
95
|
-
timeoutMs: { type: "number" }
|
|
96
|
-
|
|
97
|
-
|
|
126
|
+
timeoutMs: { type: "number" },
|
|
127
|
+
runInBackground: { type: "boolean" },
|
|
128
|
+
run_in_background: { type: "boolean" },
|
|
129
|
+
service: {
|
|
130
|
+
type: "object",
|
|
131
|
+
additionalProperties: false,
|
|
132
|
+
anyOf: [
|
|
133
|
+
{ required: ["action", "url"] },
|
|
134
|
+
{ required: ["action", "serviceId"] },
|
|
135
|
+
{ required: ["type", "port"] },
|
|
136
|
+
{ required: ["type", "url"] }
|
|
137
|
+
],
|
|
138
|
+
properties: {
|
|
139
|
+
action: { type: "string", enum: ["status", "probe", "logs", "stop", "fetch"] },
|
|
140
|
+
serviceId: { type: "string" },
|
|
141
|
+
type: { type: "string", enum: ["tcp", "http"] },
|
|
142
|
+
host: { type: "string" },
|
|
143
|
+
port: { type: "number" },
|
|
144
|
+
url: { type: "string" },
|
|
145
|
+
expectStatus: { type: "number" },
|
|
146
|
+
bodyContains: {
|
|
147
|
+
anyOf: [
|
|
148
|
+
{ type: "string" },
|
|
149
|
+
{ type: "array", items: { type: "string" } }
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
timeoutMs: { type: "number" },
|
|
153
|
+
intervalMs: { type: "number" },
|
|
154
|
+
retry: { type: "number" },
|
|
155
|
+
tailBytes: { type: "number" }
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
artifact: {
|
|
159
|
+
type: "object",
|
|
160
|
+
additionalProperties: false,
|
|
161
|
+
required: ["path"],
|
|
162
|
+
properties: {
|
|
163
|
+
path: { type: "string" },
|
|
164
|
+
expectHeader: { type: "string" },
|
|
165
|
+
expectMagic: { type: "string" },
|
|
166
|
+
json: { type: "boolean" },
|
|
167
|
+
executable: { type: "boolean" },
|
|
168
|
+
protectPaths: { type: "array", items: { type: "string" } },
|
|
169
|
+
text: {
|
|
170
|
+
type: "object",
|
|
171
|
+
additionalProperties: false,
|
|
172
|
+
properties: {
|
|
173
|
+
exact: { type: "string" },
|
|
174
|
+
contains: {
|
|
175
|
+
anyOf: [
|
|
176
|
+
{ type: "string" },
|
|
177
|
+
{ type: "array", items: { type: "string" } }
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
lineSet: { type: "array", items: { type: "string" } }
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
preserve: {
|
|
184
|
+
type: "object",
|
|
185
|
+
additionalProperties: false,
|
|
186
|
+
properties: {
|
|
187
|
+
mode: { type: "string", enum: ["rawPreserve", "compareNormalizedHtml"] },
|
|
188
|
+
expectedPath: { type: "string" },
|
|
189
|
+
expectedText: { type: "string" }
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
binary: {
|
|
195
|
+
type: "object",
|
|
196
|
+
additionalProperties: false,
|
|
197
|
+
required: ["path"],
|
|
198
|
+
properties: {
|
|
199
|
+
path: { type: "string" },
|
|
200
|
+
previewBytes: { type: "number" }
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
98
204
|
};
|
|
99
205
|
}
|
|
100
206
|
if (name === "Todo") {
|
|
@@ -156,7 +262,7 @@ var INDEX_OPERATION_TOOL_NAME = "IndexOperation";
|
|
|
156
262
|
var RUN_VERIFICATION_TOOL_NAME = "RunVerification";
|
|
157
263
|
var WRITE_REPORT_TOOL_NAME = "WriteReport";
|
|
158
264
|
var SEARCH_EXTRA_TOOLS_DESCRIPTION = "Discover deferred tools provided by enabled MCP servers, trusted skills, trusted plugins, and codebase-memory. Returns name/kind/description/requiredArgs/executable/reason for each match. Pass a free-text query to filter; pass empty string to list all. Use ExecuteExtraTool to actually invoke a discovered tool.";
|
|
159
|
-
var EXECUTE_EXTRA_TOOL_DESCRIPTION = "Invoke a deferred tool that was previously returned by SearchExtraTools with executable=true. Built-in tools (Read/Edit/Write/Bash/Grep/Glob/Todo) MUST be called directly, not via this wrapper. tool_name must match a discovered tool exactly; params must include all required args.";
|
|
265
|
+
var EXECUTE_EXTRA_TOOL_DESCRIPTION = "Invoke a deferred tool that was previously returned by SearchExtraTools with executable=true. Built-in tools (Read/ReadSnippets/SourcePack/Edit/Write/Bash/Grep/Glob/Todo) MUST be called directly, not via this wrapper. tool_name must match a discovered tool exactly; params must include all required args.";
|
|
160
266
|
var COMMAND_PROPOSAL_DESCRIPTION = "Fallback only: propose an explicit Linghun slash command when the requested capability cannot be executed by an available structured tool. Do not use this as the default path for agent, workflow, index, verification, or report-writing requests.";
|
|
161
267
|
var START_AGENT_DESCRIPTION = "Start a real Linghun agent runtime for user requests such as multi-agent work, explorer/planner/worker/verifier delegation, or /fork-style role work. Supports addressable name/team, safe cwd/worktree isolation, and true background launch. Runs through validation, start/background guard, permission pipeline, sidechain transcript, evidence, and final agent status.";
|
|
162
268
|
var AGENT_CONTROL_DESCRIPTION = "Inspect or cancel existing Linghun agents through the real agent runtime. Use action=cancel when the user asks to stop, close, interrupt, kill, or cancel one background/sub-agent; use action=cancel_all or stop_all when the user asks to stop all agents. This performs the same durable cancellation as /agents cancel and must be preferred over replying with instructions when a matching agent exists.";
|
|
@@ -1103,10 +1209,11 @@ function stripDeferredInternalTokens(text) {
|
|
|
1103
1209
|
function deriveToolSupportsClaims(name, input, output) {
|
|
1104
1210
|
const claims = /* @__PURE__ */ new Set([name]);
|
|
1105
1211
|
const inputObj = input ?? {};
|
|
1106
|
-
if (name === "Read") {
|
|
1212
|
+
if (name === "Read" || name === "ReadSnippets" || name === "SourcePack") {
|
|
1107
1213
|
claims.add("local_read");
|
|
1108
1214
|
const filePath = typeof inputObj.file_path === "string" ? inputObj.file_path : void 0;
|
|
1109
1215
|
if (filePath) claims.add(`file:${filePath}`);
|
|
1216
|
+
if (name === "ReadSnippets" || name === "SourcePack") claims.add("source_snippet");
|
|
1110
1217
|
}
|
|
1111
1218
|
if (name === "Grep") {
|
|
1112
1219
|
claims.add("local_read");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createOutputBlock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ESAACKVG.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";
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
var TODO_OUTPUT_ITEM_LIMIT = 8;
|
|
3
3
|
var BASH_TAIL_LINE_LIMIT = 0;
|
|
4
4
|
var PRIMARY_PREVIEW_LINE_CAP = 5;
|
|
5
|
+
var DIAGNOSTICS_SUMMARY_LIMIT = 3;
|
|
6
|
+
var DIAGNOSTICS_EVIDENCE_LIMIT = 120;
|
|
5
7
|
var RAW_TOOL_USE_PATTERNS = [
|
|
6
8
|
/<tool_use(?:_error)?\b[\s\S]*?<\/tool_use(?:_error)?>/giu,
|
|
7
9
|
/<tool_use(?:_error)?\b[^>]*\/>/giu,
|
|
@@ -62,12 +64,36 @@ function formatToolOutput(name, output, language, evidenceId) {
|
|
|
62
64
|
if (layered.preview) {
|
|
63
65
|
lines.push(layered.preview);
|
|
64
66
|
}
|
|
67
|
+
const diagnostics = formatToolDiagnosticsSummary(output);
|
|
68
|
+
if (diagnostics) {
|
|
69
|
+
lines.push(diagnostics);
|
|
70
|
+
}
|
|
65
71
|
const bashEnd = formatBashEndSummary(name, output, language);
|
|
66
72
|
if (bashEnd) {
|
|
67
73
|
lines.push(bashEnd);
|
|
68
74
|
}
|
|
69
75
|
return lines.join("\n");
|
|
70
76
|
}
|
|
77
|
+
function formatToolDiagnosticsSummary(output) {
|
|
78
|
+
const metadata = output.data && typeof output.data === "object" ? output.data : void 0;
|
|
79
|
+
const diagnostics = Array.isArray(metadata?.diagnostics) ? metadata.diagnostics : [];
|
|
80
|
+
const lines = diagnostics.map(formatCompactDiagnosticLine).filter((line) => Boolean(line)).slice(0, DIAGNOSTICS_SUMMARY_LIMIT);
|
|
81
|
+
if (lines.length === 0) return void 0;
|
|
82
|
+
return ["Linghun diagnostics:", ...lines].join("\n");
|
|
83
|
+
}
|
|
84
|
+
function formatCompactDiagnosticLine(value) {
|
|
85
|
+
if (!value || typeof value !== "object") return void 0;
|
|
86
|
+
const record = value;
|
|
87
|
+
const type = typeof record.type === "string" ? record.type.trim() : "";
|
|
88
|
+
const evidence = typeof record.evidence === "string" ? record.evidence.trim() : "";
|
|
89
|
+
if (!type || !evidence) return void 0;
|
|
90
|
+
return `- ${type}: ${compactDiagnosticEvidence(evidence)}`;
|
|
91
|
+
}
|
|
92
|
+
function compactDiagnosticEvidence(value) {
|
|
93
|
+
const singleLine = value.replace(/\s+/gu, " ").trim();
|
|
94
|
+
if (singleLine.length <= DIAGNOSTICS_EVIDENCE_LIMIT) return singleLine;
|
|
95
|
+
return `${singleLine.slice(0, DIAGNOSTICS_EVIDENCE_LIMIT - 3)}...`;
|
|
96
|
+
}
|
|
71
97
|
function formatPrimaryToolLead(name, output, layered, language) {
|
|
72
98
|
const metadata = output.data && typeof output.data === "object" ? output.data : void 0;
|
|
73
99
|
const count = readNumber(metadata, "count");
|
|
@@ -92,6 +118,8 @@ function formatPrimaryToolLead(name, output, layered, language) {
|
|
|
92
118
|
const lineLabel = `**${totalLines ?? visibleLines}** lines`;
|
|
93
119
|
return readFile ? `Read(${readFile}) ${lineLabel}.` : `Read ${lineLabel}.`;
|
|
94
120
|
}
|
|
121
|
+
if (name === "ReadSnippets") return `ReadSnippets **${count ?? visibleLines}** ranges.`;
|
|
122
|
+
if (name === "SourcePack") return `SourcePack **${count ?? visibleLines}** snippets.`;
|
|
95
123
|
if (name === "Bash") return formatBashLead(metadata, language);
|
|
96
124
|
if (name === "WebSearch") return formatWebSearchLead(output, language);
|
|
97
125
|
if (name === "WebFetch") return formatWebFetchLead(output, language);
|
|
@@ -106,6 +134,8 @@ function formatPrimaryToolLead(name, output, layered, language) {
|
|
|
106
134
|
const lineLabel = `**${totalLines ?? visibleLines}** \u884C`;
|
|
107
135
|
return readFile ? `Read(${readFile}) ${lineLabel}` : `\u8BFB\u53D6 ${lineLabel}`;
|
|
108
136
|
}
|
|
137
|
+
if (name === "ReadSnippets") return `ReadSnippets **${count ?? visibleLines}** \u4E2A\u8303\u56F4`;
|
|
138
|
+
if (name === "SourcePack") return `SourcePack **${count ?? visibleLines}** \u4E2A\u7247\u6BB5`;
|
|
109
139
|
if (name === "Bash") return formatBashLead(metadata, language);
|
|
110
140
|
if (name === "WebSearch") return formatWebSearchLead(output, language);
|
|
111
141
|
if (name === "WebFetch") return formatWebFetchLead(output, language);
|
|
@@ -196,6 +226,10 @@ function formatToolStart(name, input) {
|
|
|
196
226
|
arg = str("command");
|
|
197
227
|
} else if (name === "Read") {
|
|
198
228
|
arg = str("path") ?? str("file_path");
|
|
229
|
+
} else if (name === "ReadSnippets") {
|
|
230
|
+
arg = "ranges";
|
|
231
|
+
} else if (name === "SourcePack") {
|
|
232
|
+
arg = str("query") ?? "query";
|
|
199
233
|
} else if (name === "Write" || name === "Edit" || name === "MultiEdit") {
|
|
200
234
|
arg = str("file_path") ?? str("path");
|
|
201
235
|
} else if (name === "Grep") {
|
|
@@ -450,7 +484,7 @@ function readTodoItems(data) {
|
|
|
450
484
|
});
|
|
451
485
|
}
|
|
452
486
|
function isSummaryFirstTool(name) {
|
|
453
|
-
return name === "Read" || name === "Glob" || name === "Grep" || name === "Bash" || name === "Write" || name === "Edit" || name === "MultiEdit";
|
|
487
|
+
return name === "Read" || name === "ReadSnippets" || name === "SourcePack" || name === "Glob" || name === "Grep" || name === "Bash" || name === "Write" || name === "Edit" || name === "MultiEdit";
|
|
454
488
|
}
|
|
455
489
|
function createSummaryFirstPreview(name, text, language, output) {
|
|
456
490
|
const lines = text.length > 0 ? text.split(/\r?\n/u) : [];
|
|
@@ -581,6 +615,7 @@ function looksLikeMojibake(text) {
|
|
|
581
615
|
export {
|
|
582
616
|
createLayeredToolOutput,
|
|
583
617
|
formatToolOutput,
|
|
618
|
+
formatToolDiagnosticsSummary,
|
|
584
619
|
formatToolStart,
|
|
585
620
|
sanitizeAssistantPrimaryText,
|
|
586
621
|
sanitizeAssistantPrimaryTextWithMetadata,
|
|
@@ -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";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProcessGuard
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VDQTNA4W.js";
|
|
4
4
|
import {
|
|
5
5
|
sanitizeDiagnosticText
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UGYFQF6M.js";
|
|
7
7
|
|
|
8
8
|
// src/mcp-stdio-runtime.ts
|
|
9
9
|
import { spawn } from "child_process";
|
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
isPotentiallyMutatingMcpTool,
|
|
6
6
|
runMcpStdioToolCall,
|
|
7
7
|
runMcpStdioToolList
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OMWSM2DA.js";
|
|
9
9
|
import {
|
|
10
10
|
buildIndexStatusPanel,
|
|
11
11
|
buildMcpStatusPanel,
|
|
12
12
|
formatIndexRefreshSummary,
|
|
13
13
|
formatIndexStatus,
|
|
14
14
|
formatMcpStatus
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UYU4QN3P.js";
|
|
16
16
|
import {
|
|
17
17
|
runMcpSseToolCall
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BNC4F63N.js";
|
|
19
19
|
import {
|
|
20
20
|
createIndexTransientExcludes,
|
|
21
21
|
formatIndexAutoSkipDetails,
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
formatIndexAutoSkipPrimary,
|
|
24
24
|
scanIndexSafety,
|
|
25
25
|
summarizeIndexResult
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6CHUZ2NF.js";
|
|
27
27
|
import {
|
|
28
28
|
showCommandPanel
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6JPUBF7B.js";
|
|
30
30
|
import {
|
|
31
31
|
writeDiagnosticLine
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-OH35XDD4.js";
|
|
33
33
|
import {
|
|
34
34
|
redactedPath,
|
|
35
35
|
runCommandCapture
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-HMGYFENJ.js";
|
|
37
37
|
import {
|
|
38
38
|
findDeferredTool,
|
|
39
39
|
getCodebaseMemoryToolRisk,
|
|
@@ -44,16 +44,16 @@ import {
|
|
|
44
44
|
searchDeferredTools,
|
|
45
45
|
summarizeDeferredToolMatch,
|
|
46
46
|
validateCodebaseMemoryToolExecution
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-6DBBXNEG.js";
|
|
48
48
|
import {
|
|
49
49
|
findCurrentIndexProject,
|
|
50
50
|
readLocalIndexArtifactState
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-TYTVAFGB.js";
|
|
52
52
|
import {
|
|
53
53
|
createMcpState,
|
|
54
54
|
createMcpToolPlaceholders,
|
|
55
55
|
pathExists
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-6JGRNES6.js";
|
|
57
57
|
import {
|
|
58
58
|
diffFreshness
|
|
59
59
|
} from "./chunk-4T5DJW54.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
sanitizeDiagnosticText,
|
|
63
63
|
truncateDisplay,
|
|
64
64
|
writeLine
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-UGYFQF6M.js";
|
|
66
66
|
|
|
67
67
|
// src/mcp-index-runtime.ts
|
|
68
68
|
import { randomUUID } from "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
showCommandPanel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6JPUBF7B.js";
|
|
4
4
|
import {
|
|
5
5
|
createSkillEvolutionCandidate,
|
|
6
6
|
formatExtensionInstallGate,
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
removeExtension,
|
|
15
15
|
updateExtension,
|
|
16
16
|
validateExtensionItems
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5OZEJQBH.js";
|
|
18
18
|
import {
|
|
19
19
|
createHookState,
|
|
20
20
|
createPluginState,
|
|
21
21
|
createSkillState
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6JGRNES6.js";
|
|
23
23
|
import {
|
|
24
24
|
writeLine
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UGYFQF6M.js";
|
|
26
26
|
|
|
27
27
|
// src/extension-slash-runtime.ts
|
|
28
28
|
import { saveExtensionEnablement } from "@linghun/config";
|