@linghun/tui 0.1.2 → 0.1.4
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/background-control-runtime.js +37 -37
- package/dist/cache-command-runtime.js +3 -3
- package/dist/capability-runtime.js +24 -24
- package/dist/{chunk-QD4SCW4A.js → chunk-2JFSRRK7.js} +21 -21
- package/dist/{chunk-PPUOHBAK.js → chunk-2JZBPXHF.js} +15 -15
- package/dist/{chunk-7BHMBWG2.js → chunk-33WA4BDG.js} +4 -4
- package/dist/{chunk-YKOXJQGX.js → chunk-3KRRVLS4.js} +111 -3
- package/dist/{chunk-42ZZUF7P.js → chunk-6C32YAB5.js} +17 -5
- package/dist/{chunk-OSFBVVEP.js → chunk-7ODJHN53.js} +2 -2
- package/dist/{chunk-6DBBXNEG.js → chunk-7VGFNZPN.js} +38 -2
- package/dist/{chunk-3PG7I3LA.js → chunk-AFNWUI6R.js} +1 -1
- package/dist/{chunk-YMEMN5FG.js → chunk-BRNV6757.js} +1 -1
- package/dist/{chunk-CJRJR7TP.js → chunk-CL3U56EI.js} +2 -2
- package/dist/{chunk-HPIHFENG.js → chunk-HMGGPN4J.js} +1 -1
- package/dist/{chunk-HZ5XNKWS.js → chunk-HMGYFENJ.js} +1 -1
- package/dist/{chunk-HPQ2IHOW.js → chunk-IU7NZO6B.js} +3 -3
- package/dist/{chunk-3LT6OWQ2.js → chunk-IWBV4CEI.js} +1 -1
- package/dist/{chunk-YDTJ7UBG.js → chunk-JMUAQUQQ.js} +1 -1
- package/dist/{chunk-NK4NMYF5.js → chunk-JY2DO7OF.js} +127 -12
- package/dist/{chunk-X7E34LKV.js → chunk-KI7NO6IF.js} +219 -8
- package/dist/{chunk-UIKN3CDF.js → chunk-NMOVU75L.js} +1 -1
- package/dist/{chunk-ZJDPYOTK.js → chunk-NR3MFRPO.js} +2 -2
- package/dist/{chunk-WXTHKLNH.js → chunk-OI5TZ37D.js} +27 -0
- package/dist/{chunk-DIDRFIIW.js → chunk-OMWSM2DA.js} +1 -1
- package/dist/{chunk-HGCTHBUY.js → chunk-PHPEPZAA.js} +1 -1
- package/dist/{chunk-EKYXI6C7.js → chunk-R7BB45CP.js} +1 -1
- package/dist/{chunk-7R4YXN7Z.js → chunk-RKFC3V6A.js} +178 -67
- package/dist/{chunk-PBIPV4LD.js → chunk-RMXEIZYR.js} +1 -1
- package/dist/{chunk-4TO2LDMP.js → chunk-SEVD3KES.js} +2 -2
- package/dist/{chunk-AGI6GFFL.js → chunk-T2V2USR3.js} +2 -2
- package/dist/{chunk-3MRYQO7X.js → chunk-T7LHFTVM.js} +3 -3
- package/dist/{chunk-7RZE45OT.js → chunk-UN3MMVE4.js} +1 -1
- package/dist/{chunk-LBC75QAB.js → chunk-UUWG4VXV.js} +10 -4
- package/dist/{chunk-FGGY5KNM.js → chunk-UYEVRXUA.js} +3 -3
- package/dist/{chunk-O2U4XQVM.js → chunk-UYU4QN3P.js} +1 -1
- package/dist/{chunk-J6CYFWSW.js → chunk-VDQTNA4W.js} +20 -1
- package/dist/{chunk-RDGM4RUE.js → chunk-VZFP7NWI.js} +1 -1
- package/dist/{chunk-7ZMDQZ22.js → chunk-W6O7KDNM.js} +1 -1
- package/dist/{chunk-2YL5VKJ5.js → chunk-WO56RSMP.js} +1 -1
- package/dist/{chunk-YLOJWSHB.js → chunk-WRVHCSM2.js} +25 -9
- package/dist/{chunk-5IFNLTOF.js → chunk-WXQSF2AS.js} +3 -3
- package/dist/{chunk-JY3LI63F.js → chunk-YGXPS5F2.js} +1 -1
- package/dist/{chunk-ZF36LULR.js → chunk-ZNAYWBBI.js} +2 -2
- package/dist/command-panel-runtime.js +23 -23
- package/dist/compact-cache-command-runtime.js +37 -37
- package/dist/compact-preflight-runtime.js +12 -12
- package/dist/connector-runtime.js +25 -25
- package/dist/deferred-tools-catalog.d.ts +2 -1
- package/dist/deferred-tools-catalog.d.ts.map +1 -1
- package/dist/deferred-tools-catalog.js +3 -1
- package/dist/details-status-runtime.js +23 -23
- package/dist/evidence-runtime.d.ts.map +1 -1
- package/dist/evidence-runtime.js +7 -6
- package/dist/extension-command-runtime.js +5 -5
- package/dist/extension-slash-runtime.js +24 -24
- package/dist/failure-learning-command-runtime.js +24 -24
- package/dist/final-answer-gate.d.ts.map +1 -1
- package/dist/final-answer-gate.js +2 -2
- package/dist/git-command-runtime.js +24 -24
- package/dist/handoff-session-runtime.js +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +103 -45
- package/dist/job-agent-command-runtime.js +23 -23
- package/dist/job-runtime.js +4 -4
- package/dist/mcp-index-command-runtime.js +3 -3
- package/dist/mcp-index-runtime.d.ts +8 -0
- package/dist/mcp-index-runtime.d.ts.map +1 -1
- package/dist/mcp-index-runtime.js +28 -26
- package/dist/mcp-stdio-runtime.js +2 -2
- package/dist/memory-command-runtime.js +24 -24
- package/dist/model-command-runtime.js +24 -24
- package/dist/model-doctor-runtime.d.ts +1 -0
- package/dist/model-doctor-runtime.d.ts.map +1 -1
- package/dist/model-doctor-runtime.js +1 -1
- package/dist/model-loop-runtime.d.ts +15 -1
- package/dist/model-loop-runtime.d.ts.map +1 -1
- package/dist/model-loop-runtime.js +29 -1
- package/dist/model-prompt-runtime.d.ts.map +1 -1
- package/dist/model-prompt-runtime.js +5 -5
- package/dist/model-stream-runtime.d.ts.map +1 -1
- package/dist/model-stream-runtime.js +37 -37
- package/dist/model-tool-runtime.d.ts +7 -0
- package/dist/model-tool-runtime.d.ts.map +1 -1
- package/dist/model-tool-runtime.js +39 -37
- package/dist/permission-approval-runtime.js +37 -37
- package/dist/permission-continuation-runtime.d.ts.map +1 -1
- package/dist/permission-continuation-runtime.js +2 -2
- package/dist/process-command-runtime.js +2 -2
- 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 +24 -24
- package/dist/runner-runtime.js +3 -3
- package/dist/shell/components/ProductBlock.js +2 -2
- package/dist/shell/components/ShellApp.js +12 -12
- package/dist/shell/ink-renderer.js +12 -12
- package/dist/shell/view-model.js +6 -6
- package/dist/slash-command-runtime.js +37 -37
- package/dist/terminal-readiness-runtime.js +3 -3
- 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 +8 -8
- package/dist/tui-context-runtime.d.ts +2 -0
- package/dist/tui-context-runtime.d.ts.map +1 -1
- package/dist/tui-context-runtime.js +3 -3
- 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 +5 -5
- package/dist/tui-model-runtime.js +2 -2
- package/dist/tui-output-surface.js +7 -7
- package/dist/tui-permission-runtime.js +3 -3
- package/dist/verification-command-runtime.js +9 -9
- package/dist/workflow-command-runtime.js +23 -23
- package/package.json +5 -5
- package/dist/{chunk-Z265MCGC.js → chunk-VWEAK3UV.js} +3 -3
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
stopRunnerForDurableJob,
|
|
18
18
|
toggleCommandPanelSelection,
|
|
19
19
|
updateCommandPanelSelection
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RKFC3V6A.js";
|
|
21
21
|
import "./chunk-SJOS5PM6.js";
|
|
22
22
|
import "./chunk-SRJ4XWOR.js";
|
|
23
23
|
import "./chunk-GC55DMZV.js";
|
|
@@ -25,58 +25,58 @@ import "./chunk-DICVLZHH.js";
|
|
|
25
25
|
import "./chunk-3XNUDLOM.js";
|
|
26
26
|
import "./chunk-ZYSN7AWW.js";
|
|
27
27
|
import "./chunk-ZKPQ4KLK.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-SEVD3KES.js";
|
|
29
|
+
import "./chunk-NR3MFRPO.js";
|
|
30
30
|
import "./chunk-UT5BOJKU.js";
|
|
31
31
|
import "./chunk-RM5JDRCW.js";
|
|
32
32
|
import "./chunk-HJOC5WUV.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-UYEVRXUA.js";
|
|
34
34
|
import "./chunk-TVNWAEJR.js";
|
|
35
35
|
import "./chunk-NL4M3V5D.js";
|
|
36
36
|
import "./chunk-KQJHVJZB.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-33WA4BDG.js";
|
|
38
38
|
import "./chunk-NMNOAFFT.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-KI7NO6IF.js";
|
|
40
40
|
import "./chunk-W6NU7ZAV.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-OMWSM2DA.js";
|
|
42
|
+
import "./chunk-UYU4QN3P.js";
|
|
43
43
|
import "./chunk-BNC4F63N.js";
|
|
44
44
|
import "./chunk-CRW3636S.js";
|
|
45
45
|
import "./chunk-6CHUZ2NF.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-UUWG4VXV.js";
|
|
47
|
+
import "./chunk-BRNV6757.js";
|
|
48
48
|
import "./chunk-GTP2KPLY.js";
|
|
49
49
|
import "./chunk-7ZE5JFAZ.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-ZNAYWBBI.js";
|
|
51
|
+
import "./chunk-AFNWUI6R.js";
|
|
52
52
|
import "./chunk-A4H3UTJZ.js";
|
|
53
53
|
import "./chunk-WJWYRBWH.js";
|
|
54
54
|
import "./chunk-CFXB5SE5.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-WXQSF2AS.js";
|
|
56
56
|
import "./chunk-WVAQYKGL.js";
|
|
57
57
|
import "./chunk-QIU3FJPC.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-UN3MMVE4.js";
|
|
59
|
+
import "./chunk-2JZBPXHF.js";
|
|
60
60
|
import "./chunk-V7GDHHBL.js";
|
|
61
61
|
import "./chunk-GCMH5P4W.js";
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-PHPEPZAA.js";
|
|
63
|
+
import "./chunk-CL3U56EI.js";
|
|
64
|
+
import "./chunk-7ODJHN53.js";
|
|
65
|
+
import "./chunk-YGXPS5F2.js";
|
|
66
|
+
import "./chunk-HMGGPN4J.js";
|
|
67
67
|
import "./chunk-IPZZGDUU.js";
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-RMXEIZYR.js";
|
|
69
|
+
import "./chunk-NMOVU75L.js";
|
|
70
|
+
import "./chunk-JMUAQUQQ.js";
|
|
71
71
|
import "./chunk-L4XXW6Y5.js";
|
|
72
72
|
import "./chunk-CRSLDQOA.js";
|
|
73
73
|
import "./chunk-VIBENDE3.js";
|
|
74
74
|
import "./chunk-4UER2AKI.js";
|
|
75
|
-
import "./chunk-
|
|
76
|
-
import "./chunk-
|
|
77
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-T2V2USR3.js";
|
|
76
|
+
import "./chunk-HMGYFENJ.js";
|
|
77
|
+
import "./chunk-VDQTNA4W.js";
|
|
78
78
|
import "./chunk-E72U7WW7.js";
|
|
79
|
-
import "./chunk-
|
|
79
|
+
import "./chunk-R7BB45CP.js";
|
|
80
80
|
import "./chunk-WCMHJ6SS.js";
|
|
81
81
|
import "./chunk-3AKXDMVS.js";
|
|
82
82
|
import "./chunk-H3T4EF5F.js";
|
|
@@ -84,21 +84,21 @@ import "./chunk-NSIKYD3X.js";
|
|
|
84
84
|
import "./chunk-FRIMDSRU.js";
|
|
85
85
|
import "./chunk-RBOQJFIZ.js";
|
|
86
86
|
import "./chunk-VIJ7GDKI.js";
|
|
87
|
-
import "./chunk-
|
|
88
|
-
import "./chunk-
|
|
89
|
-
import "./chunk-WXTHKLNH.js";
|
|
87
|
+
import "./chunk-WRVHCSM2.js";
|
|
88
|
+
import "./chunk-6C32YAB5.js";
|
|
90
89
|
import "./chunk-KTWV5JC5.js";
|
|
91
90
|
import "./chunk-PGNALDEH.js";
|
|
92
91
|
import "./chunk-PI6T2AGS.js";
|
|
93
92
|
import "./chunk-6SMM5CMP.js";
|
|
94
|
-
import "./chunk-
|
|
95
|
-
import "./chunk-
|
|
96
|
-
import "./chunk-
|
|
93
|
+
import "./chunk-7VGFNZPN.js";
|
|
94
|
+
import "./chunk-JY2DO7OF.js";
|
|
95
|
+
import "./chunk-VZFP7NWI.js";
|
|
97
96
|
import "./chunk-O7S3HYE6.js";
|
|
97
|
+
import "./chunk-OI5TZ37D.js";
|
|
98
98
|
import "./chunk-IWUIOLMF.js";
|
|
99
|
-
import "./chunk-
|
|
99
|
+
import "./chunk-W6O7KDNM.js";
|
|
100
100
|
import "./chunk-OJTMM5CV.js";
|
|
101
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-3KRRVLS4.js";
|
|
102
102
|
import "./chunk-BFVPLGAC.js";
|
|
103
103
|
import "./chunk-6USL33ZO.js";
|
|
104
104
|
import "./chunk-4EIC5BCT.js";
|
|
@@ -113,8 +113,8 @@ import "./chunk-4EP3TUFF.js";
|
|
|
113
113
|
import "./chunk-WX2OTJXL.js";
|
|
114
114
|
import "./chunk-QBCGAIU7.js";
|
|
115
115
|
import "./chunk-K4FSYBSY.js";
|
|
116
|
-
import "./chunk-
|
|
117
|
-
import "./chunk-
|
|
116
|
+
import "./chunk-IWBV4CEI.js";
|
|
117
|
+
import "./chunk-WO56RSMP.js";
|
|
118
118
|
import "./chunk-EBACIBJP.js";
|
|
119
119
|
import "./chunk-OZMX3E35.js";
|
|
120
120
|
import "./chunk-URNQUECO.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
formatWorkspaceSnapshotLiteStatus,
|
|
10
10
|
writeLightHints,
|
|
11
11
|
writeLightHintsForTest
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UN3MMVE4.js";
|
|
13
13
|
import "./chunk-QBCGAIU7.js";
|
|
14
14
|
import "./chunk-K4FSYBSY.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-IWBV4CEI.js";
|
|
16
|
+
import "./chunk-WO56RSMP.js";
|
|
17
17
|
import "./chunk-EBACIBJP.js";
|
|
18
18
|
import "./chunk-OZMX3E35.js";
|
|
19
19
|
import "./chunk-4T5DJW54.js";
|
|
@@ -11,28 +11,28 @@ import {
|
|
|
11
11
|
resolveCapabilityConnection,
|
|
12
12
|
setCapabilityConnectionResolver,
|
|
13
13
|
unregisterCapabilitiesByApp
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-IU7NZO6B.js";
|
|
15
|
+
import "./chunk-2JZBPXHF.js";
|
|
16
16
|
import "./chunk-V7GDHHBL.js";
|
|
17
17
|
import "./chunk-GCMH5P4W.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-PHPEPZAA.js";
|
|
19
|
+
import "./chunk-CL3U56EI.js";
|
|
20
|
+
import "./chunk-7ODJHN53.js";
|
|
21
|
+
import "./chunk-YGXPS5F2.js";
|
|
22
|
+
import "./chunk-HMGGPN4J.js";
|
|
23
23
|
import "./chunk-IPZZGDUU.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-RMXEIZYR.js";
|
|
25
|
+
import "./chunk-NMOVU75L.js";
|
|
26
|
+
import "./chunk-JMUAQUQQ.js";
|
|
27
27
|
import "./chunk-L4XXW6Y5.js";
|
|
28
28
|
import "./chunk-CRSLDQOA.js";
|
|
29
29
|
import "./chunk-VIBENDE3.js";
|
|
30
30
|
import "./chunk-4UER2AKI.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-T2V2USR3.js";
|
|
32
|
+
import "./chunk-HMGYFENJ.js";
|
|
33
|
+
import "./chunk-VDQTNA4W.js";
|
|
34
34
|
import "./chunk-E72U7WW7.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-R7BB45CP.js";
|
|
36
36
|
import "./chunk-WCMHJ6SS.js";
|
|
37
37
|
import "./chunk-3AKXDMVS.js";
|
|
38
38
|
import "./chunk-H3T4EF5F.js";
|
|
@@ -40,21 +40,21 @@ import "./chunk-NSIKYD3X.js";
|
|
|
40
40
|
import "./chunk-FRIMDSRU.js";
|
|
41
41
|
import "./chunk-RBOQJFIZ.js";
|
|
42
42
|
import "./chunk-VIJ7GDKI.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-WXTHKLNH.js";
|
|
43
|
+
import "./chunk-WRVHCSM2.js";
|
|
44
|
+
import "./chunk-6C32YAB5.js";
|
|
46
45
|
import "./chunk-KTWV5JC5.js";
|
|
47
46
|
import "./chunk-PGNALDEH.js";
|
|
48
47
|
import "./chunk-PI6T2AGS.js";
|
|
49
48
|
import "./chunk-6SMM5CMP.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-7VGFNZPN.js";
|
|
50
|
+
import "./chunk-JY2DO7OF.js";
|
|
51
|
+
import "./chunk-VZFP7NWI.js";
|
|
53
52
|
import "./chunk-O7S3HYE6.js";
|
|
53
|
+
import "./chunk-OI5TZ37D.js";
|
|
54
54
|
import "./chunk-IWUIOLMF.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-W6O7KDNM.js";
|
|
56
56
|
import "./chunk-OJTMM5CV.js";
|
|
57
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-3KRRVLS4.js";
|
|
58
58
|
import "./chunk-BFVPLGAC.js";
|
|
59
59
|
import "./chunk-6USL33ZO.js";
|
|
60
60
|
import "./chunk-4EIC5BCT.js";
|
|
@@ -69,8 +69,8 @@ import "./chunk-4EP3TUFF.js";
|
|
|
69
69
|
import "./chunk-WX2OTJXL.js";
|
|
70
70
|
import "./chunk-QBCGAIU7.js";
|
|
71
71
|
import "./chunk-K4FSYBSY.js";
|
|
72
|
-
import "./chunk-
|
|
73
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-IWBV4CEI.js";
|
|
73
|
+
import "./chunk-WO56RSMP.js";
|
|
74
74
|
import "./chunk-EBACIBJP.js";
|
|
75
75
|
import "./chunk-OZMX3E35.js";
|
|
76
76
|
import "./chunk-URNQUECO.js";
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UnseenMessagePill
|
|
3
|
+
} from "./chunk-SQIBPLLV.js";
|
|
4
|
+
import {
|
|
5
|
+
WorkflowProgressView
|
|
6
|
+
} from "./chunk-7C6T7RKJ.js";
|
|
1
7
|
import {
|
|
2
8
|
StatusFooter
|
|
3
9
|
} from "./chunk-RRUI3VWQ.js";
|
|
@@ -11,23 +17,32 @@ import {
|
|
|
11
17
|
TaskSuggestionBar
|
|
12
18
|
} from "./chunk-X37FSYAX.js";
|
|
13
19
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
WorkflowProgressView
|
|
18
|
-
} from "./chunk-7C6T7RKJ.js";
|
|
20
|
+
MouseInputRouter
|
|
21
|
+
} from "./chunk-X7HMDZZQ.js";
|
|
19
22
|
import {
|
|
20
23
|
NotificationStack
|
|
21
24
|
} from "./chunk-JLCPHVBN.js";
|
|
22
25
|
import {
|
|
23
26
|
ProductBlock
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-VWEAK3UV.js";
|
|
28
|
+
import {
|
|
29
|
+
StreamingMarkdown
|
|
30
|
+
} from "./chunk-4BFCUJX6.js";
|
|
25
31
|
import {
|
|
26
32
|
TranscriptViewport
|
|
27
33
|
} from "./chunk-YQNK7HK3.js";
|
|
28
34
|
import {
|
|
29
35
|
SessionsPanel
|
|
30
36
|
} from "./chunk-4QWCNMP6.js";
|
|
37
|
+
import {
|
|
38
|
+
BackgroundTaskOverlay
|
|
39
|
+
} from "./chunk-JAVRQ3LM.js";
|
|
40
|
+
import {
|
|
41
|
+
BtwPanel
|
|
42
|
+
} from "./chunk-LWW2IAFC.js";
|
|
43
|
+
import {
|
|
44
|
+
CommandPanel
|
|
45
|
+
} from "./chunk-GXFYUZAM.js";
|
|
31
46
|
import {
|
|
32
47
|
Composer
|
|
33
48
|
} from "./chunk-BBK5BA5C.js";
|
|
@@ -37,24 +52,9 @@ import {
|
|
|
37
52
|
import {
|
|
38
53
|
HelpPanel
|
|
39
54
|
} from "./chunk-ATY7WBIT.js";
|
|
40
|
-
import {
|
|
41
|
-
StreamingMarkdown
|
|
42
|
-
} from "./chunk-4BFCUJX6.js";
|
|
43
|
-
import {
|
|
44
|
-
MouseInputRouter
|
|
45
|
-
} from "./chunk-X7HMDZZQ.js";
|
|
46
55
|
import {
|
|
47
56
|
AgentProgressTree
|
|
48
57
|
} from "./chunk-36ZWUJQS.js";
|
|
49
|
-
import {
|
|
50
|
-
BackgroundTaskOverlay
|
|
51
|
-
} from "./chunk-JAVRQ3LM.js";
|
|
52
|
-
import {
|
|
53
|
-
BtwPanel
|
|
54
|
-
} from "./chunk-LWW2IAFC.js";
|
|
55
|
-
import {
|
|
56
|
-
CommandPanel
|
|
57
|
-
} from "./chunk-GXFYUZAM.js";
|
|
58
58
|
import {
|
|
59
59
|
bindTerminalInteractionSignals,
|
|
60
60
|
createTerminalInteractionSession,
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./chunk-V7GDHHBL.js";
|
|
5
5
|
import {
|
|
6
6
|
decidePermission
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PHPEPZAA.js";
|
|
8
8
|
import {
|
|
9
9
|
createVerificationPlan,
|
|
10
10
|
createVerificationUnavailableReport,
|
|
11
11
|
runVerificationPlan
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CL3U56EI.js";
|
|
13
13
|
import {
|
|
14
14
|
createAgentBackgroundTask,
|
|
15
15
|
createAgentContextSummary,
|
|
@@ -35,24 +35,24 @@ import {
|
|
|
35
35
|
registerBackgroundAbortController,
|
|
36
36
|
rememberBackgroundTask,
|
|
37
37
|
upsertJobBackgroundTask
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-7ODJHN53.js";
|
|
39
39
|
import {
|
|
40
40
|
createLogArtifactRegistry,
|
|
41
41
|
findEvidence,
|
|
42
42
|
formatAgentDetails,
|
|
43
43
|
formatEvidenceDetails,
|
|
44
44
|
parseLogArtifactRequest
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-YGXPS5F2.js";
|
|
46
46
|
import {
|
|
47
47
|
createShellBlockOutputForTest,
|
|
48
48
|
writeErrorLine
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-HMGGPN4J.js";
|
|
50
50
|
import {
|
|
51
51
|
formatModeBehavior
|
|
52
52
|
} from "./chunk-IPZZGDUU.js";
|
|
53
53
|
import {
|
|
54
54
|
createVerificationLevelForReadiness
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-RMXEIZYR.js";
|
|
56
56
|
import {
|
|
57
57
|
JOB_RECOVERY_HEARTBEAT_STALE_MS,
|
|
58
58
|
appendJobLog,
|
|
@@ -68,13 +68,13 @@ import {
|
|
|
68
68
|
rescheduleDurableJobAgents,
|
|
69
69
|
updateDurableJobEffectiveAgentCap,
|
|
70
70
|
writeDurableJobReport
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-NMOVU75L.js";
|
|
72
72
|
import {
|
|
73
73
|
markJobRunnerTerminal,
|
|
74
74
|
refreshRunnerStatusForJob,
|
|
75
75
|
startRunnerForDurableJob,
|
|
76
76
|
stopRunnerForDurableJob
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-JMUAQUQQ.js";
|
|
78
78
|
import {
|
|
79
79
|
formatLogArtifactSlice,
|
|
80
80
|
readLogArtifactSlice
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
} from "./chunk-4UER2AKI.js";
|
|
85
85
|
import {
|
|
86
86
|
formatWorkflows
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-T2V2USR3.js";
|
|
88
88
|
import {
|
|
89
89
|
messages
|
|
90
90
|
} from "./chunk-RBOQJFIZ.js";
|
|
@@ -105,24 +105,24 @@ import {
|
|
|
105
105
|
appendToolResultEvent,
|
|
106
106
|
createEvidenceRecord,
|
|
107
107
|
createToolEndEvent
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-JY2DO7OF.js";
|
|
109
109
|
import {
|
|
110
110
|
WORKFLOW_ARCHITECTURE_REVIEW_FILE_LIMIT
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-VZFP7NWI.js";
|
|
112
112
|
import {
|
|
113
113
|
LINGHUN_MAX_AGENT_CHILD_TURNS
|
|
114
114
|
} from "./chunk-IWUIOLMF.js";
|
|
115
115
|
import {
|
|
116
116
|
loadOrCreateHandoffPacket,
|
|
117
117
|
validateHandoffPacket
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-W6O7KDNM.js";
|
|
119
119
|
import {
|
|
120
120
|
AGENT_CONTROL_DESCRIPTION,
|
|
121
121
|
AGENT_CONTROL_TOOL_NAME,
|
|
122
122
|
createAgentControlInputSchema,
|
|
123
123
|
createModelToolDefinitionsForTools,
|
|
124
124
|
evaluateStructuredFinalAnswerClaims
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-3KRRVLS4.js";
|
|
126
126
|
import {
|
|
127
127
|
summarizeWorktreeCreateOutcome
|
|
128
128
|
} from "./chunk-6USL33ZO.js";
|
|
@@ -149,11 +149,11 @@ import {
|
|
|
149
149
|
getRuntimeStatusProvider,
|
|
150
150
|
getSelectedModelRuntime,
|
|
151
151
|
resolveRoleRoute
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-IWBV4CEI.js";
|
|
153
153
|
import {
|
|
154
154
|
getRoleRoute,
|
|
155
155
|
inferProviderForRouteModel
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-WO56RSMP.js";
|
|
157
157
|
import {
|
|
158
158
|
checkProviderCooldown,
|
|
159
159
|
clearProviderBreaker,
|
|
@@ -11,25 +11,25 @@ import {
|
|
|
11
11
|
} from "./chunk-NMNOAFFT.js";
|
|
12
12
|
import {
|
|
13
13
|
showCommandPanel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2JZBPXHF.js";
|
|
15
15
|
import {
|
|
16
16
|
snapshotDeferredToolsSummary,
|
|
17
17
|
snapshotDiscoveredDeferredToolsSummary
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7VGFNZPN.js";
|
|
19
19
|
import {
|
|
20
20
|
getContextWindowForModel
|
|
21
21
|
} from "./chunk-K4FSYBSY.js";
|
|
22
22
|
import {
|
|
23
23
|
getSelectedModelRuntime,
|
|
24
24
|
resolveInitialModel
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-IWBV4CEI.js";
|
|
26
26
|
import {
|
|
27
27
|
formatModelRouteDoctor,
|
|
28
28
|
formatModelRouteSummary,
|
|
29
29
|
formatModelRoutes,
|
|
30
30
|
getRoleRoute,
|
|
31
31
|
isModelRole
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WO56RSMP.js";
|
|
33
33
|
import {
|
|
34
34
|
writeLine
|
|
35
35
|
} from "./chunk-UGYFQF6M.js";
|
|
@@ -123,7 +123,10 @@ function createToolInputSchema(name) {
|
|
|
123
123
|
...base,
|
|
124
124
|
properties: {
|
|
125
125
|
command: { type: "string" },
|
|
126
|
-
|
|
126
|
+
description: { type: "string" },
|
|
127
|
+
timeoutMs: { type: "number" },
|
|
128
|
+
runInBackground: { type: "boolean" },
|
|
129
|
+
run_in_background: { type: "boolean" }
|
|
127
130
|
},
|
|
128
131
|
required: ["command"]
|
|
129
132
|
};
|
|
@@ -178,6 +181,10 @@ function createToolInputSchema(name) {
|
|
|
178
181
|
}
|
|
179
182
|
var SEARCH_EXTRA_TOOLS_NAME = "SearchExtraTools";
|
|
180
183
|
var EXECUTE_EXTRA_TOOL_NAME = "ExecuteExtraTool";
|
|
184
|
+
var PRE_CONTEXT_TOOL_NAME = "pre_context";
|
|
185
|
+
var PRE_IMPACT_TOOL_NAME = "pre_impact";
|
|
186
|
+
var PRE_PLAN_TOOL_NAME = "pre_plan";
|
|
187
|
+
var PRE_VERIFY_TOOL_NAME = "pre_verify";
|
|
181
188
|
var COMMAND_PROPOSAL_TOOL_NAME = "CommandProposal";
|
|
182
189
|
var START_AGENT_TOOL_NAME = "StartAgent";
|
|
183
190
|
var AGENT_CONTROL_TOOL_NAME = "AgentControl";
|
|
@@ -186,8 +193,12 @@ var RUN_WORKFLOW_TOOL_NAME = "RunWorkflow";
|
|
|
186
193
|
var INDEX_OPERATION_TOOL_NAME = "IndexOperation";
|
|
187
194
|
var RUN_VERIFICATION_TOOL_NAME = "RunVerification";
|
|
188
195
|
var WRITE_REPORT_TOOL_NAME = "WriteReport";
|
|
189
|
-
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.";
|
|
196
|
+
var SEARCH_EXTRA_TOOLS_DESCRIPTION = "Discover deferred tools provided by enabled MCP servers, trusted skills, trusted plugins, codebase-memory, and pre-engine repository analysis. Use this before broad manual exploration when a task needs repository code understanding, impact analysis, edit planning, or quick verification. When a codebase-memory index is ready, prefer index-backed search/graph/architecture tools for broad repository discovery, then use pre-engine for AST precision; when the index is missing or stale, use pre-engine as the fast repository-analysis entry. 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.";
|
|
190
197
|
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.";
|
|
198
|
+
var PRE_CONTEXT_DESCRIPTION = "Fast readonly repository analysis: return AST-based definition, references, callees, callers, signature facts, and an answer_pack with entry points, affected files, related tests, risks, missing evidence, and suggested minimal line-window reads. Use after index-backed search/graph tools narrow candidate symbols, or before broad Grep/Read exploration when the index is missing, stale, or insufficient. If answer_pack has high/medium confidence and little missing evidence, answer from it and use ReadSnippets on suggested_minimal_reads line windows or specific gaps instead of broad Grep/full-file Read. For abstract architecture or impact questions without a concrete change list, use this on likely anchor symbols to map the relevant entry points.";
|
|
199
|
+
var PRE_IMPACT_DESCRIPTION = "Fast readonly repository impact analysis: given planned file/symbol changes, return affected files, functions, and related tests from AST cross-references. Use after you already have planned changes; if the task is abstract and no changes are known yet, call pre_context on anchor symbols first.";
|
|
200
|
+
var PRE_PLAN_DESCRIPTION = "Fast readonly repository edit planning: produce deterministic implementation hints, file order, dependency constraints, and an answer_pack for repository-analysis triage. Use this when no concrete target symbol is known yet; if the task already names a function, class, method, command, or file-level anchor, prefer pre_context on that anchor first. If no target files or symbols are known, use discovery mode to get anchor symbols, candidate files, related tests, risks, and suggested next calls before broad manual search.";
|
|
201
|
+
var PRE_VERIFY_DESCRIPTION = "Fast readonly repository verification: check changed files for structural issues such as signatures, imports, and exports before or after edits.";
|
|
191
202
|
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.";
|
|
192
203
|
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.";
|
|
193
204
|
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.";
|
|
@@ -217,6 +228,61 @@ function createExecuteExtraToolInputSchema() {
|
|
|
217
228
|
required: ["tool_name"]
|
|
218
229
|
};
|
|
219
230
|
}
|
|
231
|
+
function createPreContextInputSchema() {
|
|
232
|
+
return {
|
|
233
|
+
type: "object",
|
|
234
|
+
additionalProperties: false,
|
|
235
|
+
properties: {
|
|
236
|
+
symbol: { type: "string" },
|
|
237
|
+
path: { type: "string" },
|
|
238
|
+
depth: { type: "number" }
|
|
239
|
+
},
|
|
240
|
+
required: ["symbol"]
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function createPreImpactInputSchema() {
|
|
244
|
+
return {
|
|
245
|
+
type: "object",
|
|
246
|
+
additionalProperties: false,
|
|
247
|
+
properties: {
|
|
248
|
+
changes: {
|
|
249
|
+
type: "array",
|
|
250
|
+
items: {
|
|
251
|
+
type: "object",
|
|
252
|
+
additionalProperties: false,
|
|
253
|
+
properties: {
|
|
254
|
+
path: { type: "string" },
|
|
255
|
+
symbols: { type: "array", items: { type: "string" } }
|
|
256
|
+
},
|
|
257
|
+
required: ["path"]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
required: ["changes"]
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function createPrePlanInputSchema() {
|
|
265
|
+
return {
|
|
266
|
+
type: "object",
|
|
267
|
+
additionalProperties: false,
|
|
268
|
+
properties: {
|
|
269
|
+
task: { type: "string" },
|
|
270
|
+
target_symbols: { type: "array", items: { type: "string" } },
|
|
271
|
+
target_files: { type: "array", items: { type: "string" } }
|
|
272
|
+
},
|
|
273
|
+
required: ["task"]
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function createPreVerifyInputSchema() {
|
|
277
|
+
return {
|
|
278
|
+
type: "object",
|
|
279
|
+
additionalProperties: false,
|
|
280
|
+
properties: {
|
|
281
|
+
changed_files: { type: "array", items: { type: "string" } }
|
|
282
|
+
},
|
|
283
|
+
required: ["changed_files"]
|
|
284
|
+
};
|
|
285
|
+
}
|
|
220
286
|
function createCommandProposalInputSchema() {
|
|
221
287
|
return {
|
|
222
288
|
type: "object",
|
|
@@ -353,12 +419,40 @@ function createDeferredToolDispatchDefinitions() {
|
|
|
353
419
|
}
|
|
354
420
|
];
|
|
355
421
|
}
|
|
422
|
+
function createPreEngineToolDefinitions() {
|
|
423
|
+
return [
|
|
424
|
+
{
|
|
425
|
+
name: PRE_CONTEXT_TOOL_NAME,
|
|
426
|
+
description: PRE_CONTEXT_DESCRIPTION,
|
|
427
|
+
inputSchema: createPreContextInputSchema()
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: PRE_IMPACT_TOOL_NAME,
|
|
431
|
+
description: PRE_IMPACT_DESCRIPTION,
|
|
432
|
+
inputSchema: createPreImpactInputSchema()
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
name: PRE_PLAN_TOOL_NAME,
|
|
436
|
+
description: PRE_PLAN_DESCRIPTION,
|
|
437
|
+
inputSchema: createPrePlanInputSchema()
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: PRE_VERIFY_TOOL_NAME,
|
|
441
|
+
description: PRE_VERIFY_DESCRIPTION,
|
|
442
|
+
inputSchema: createPreVerifyInputSchema()
|
|
443
|
+
}
|
|
444
|
+
];
|
|
445
|
+
}
|
|
446
|
+
function isPreEngineToolName(name) {
|
|
447
|
+
return name === PRE_CONTEXT_TOOL_NAME || name === PRE_IMPACT_TOOL_NAME || name === PRE_PLAN_TOOL_NAME || name === PRE_VERIFY_TOOL_NAME;
|
|
448
|
+
}
|
|
356
449
|
function createModelToolDefinitions() {
|
|
357
450
|
return [
|
|
451
|
+
...createPreEngineToolDefinitions(),
|
|
452
|
+
...createDeferredToolDispatchDefinitions(),
|
|
358
453
|
...createModelToolDefinitionsForTools(
|
|
359
454
|
Object.values(builtInTools)
|
|
360
455
|
),
|
|
361
|
-
...createDeferredToolDispatchDefinitions(),
|
|
362
456
|
{
|
|
363
457
|
name: START_AGENT_TOOL_NAME,
|
|
364
458
|
description: START_AGENT_DESCRIPTION,
|
|
@@ -1191,6 +1285,10 @@ export {
|
|
|
1191
1285
|
createToolInputSchema,
|
|
1192
1286
|
SEARCH_EXTRA_TOOLS_NAME,
|
|
1193
1287
|
EXECUTE_EXTRA_TOOL_NAME,
|
|
1288
|
+
PRE_CONTEXT_TOOL_NAME,
|
|
1289
|
+
PRE_IMPACT_TOOL_NAME,
|
|
1290
|
+
PRE_PLAN_TOOL_NAME,
|
|
1291
|
+
PRE_VERIFY_TOOL_NAME,
|
|
1194
1292
|
COMMAND_PROPOSAL_TOOL_NAME,
|
|
1195
1293
|
START_AGENT_TOOL_NAME,
|
|
1196
1294
|
AGENT_CONTROL_TOOL_NAME,
|
|
@@ -1201,6 +1299,10 @@ export {
|
|
|
1201
1299
|
WRITE_REPORT_TOOL_NAME,
|
|
1202
1300
|
SEARCH_EXTRA_TOOLS_DESCRIPTION,
|
|
1203
1301
|
EXECUTE_EXTRA_TOOL_DESCRIPTION,
|
|
1302
|
+
PRE_CONTEXT_DESCRIPTION,
|
|
1303
|
+
PRE_IMPACT_DESCRIPTION,
|
|
1304
|
+
PRE_PLAN_DESCRIPTION,
|
|
1305
|
+
PRE_VERIFY_DESCRIPTION,
|
|
1204
1306
|
COMMAND_PROPOSAL_DESCRIPTION,
|
|
1205
1307
|
START_AGENT_DESCRIPTION,
|
|
1206
1308
|
AGENT_CONTROL_DESCRIPTION,
|
|
@@ -1211,6 +1313,10 @@ export {
|
|
|
1211
1313
|
WRITE_REPORT_DESCRIPTION,
|
|
1212
1314
|
createSearchExtraToolsInputSchema,
|
|
1213
1315
|
createExecuteExtraToolInputSchema,
|
|
1316
|
+
createPreContextInputSchema,
|
|
1317
|
+
createPreImpactInputSchema,
|
|
1318
|
+
createPrePlanInputSchema,
|
|
1319
|
+
createPreVerifyInputSchema,
|
|
1214
1320
|
createCommandProposalInputSchema,
|
|
1215
1321
|
createStartAgentInputSchema,
|
|
1216
1322
|
createAgentControlInputSchema,
|
|
@@ -1220,6 +1326,8 @@ export {
|
|
|
1220
1326
|
createRunVerificationInputSchema,
|
|
1221
1327
|
createWriteReportInputSchema,
|
|
1222
1328
|
createDeferredToolDispatchDefinitions,
|
|
1329
|
+
createPreEngineToolDefinitions,
|
|
1330
|
+
isPreEngineToolName,
|
|
1223
1331
|
createModelToolDefinitions,
|
|
1224
1332
|
createModelToolDefinitionsForTools,
|
|
1225
1333
|
createModelToolDefinitionsForReportGuard,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
formatToolOutput
|
|
3
|
-
} from "./chunk-WXTHKLNH.js";
|
|
4
1
|
import {
|
|
5
2
|
getPlatformPathDenyReason
|
|
6
3
|
} from "./chunk-KTWV5JC5.js";
|
|
4
|
+
import {
|
|
5
|
+
formatToolOutput
|
|
6
|
+
} from "./chunk-OI5TZ37D.js";
|
|
7
7
|
import {
|
|
8
8
|
truncateDisplay
|
|
9
9
|
} from "./chunk-UGYFQF6M.js";
|
|
@@ -67,10 +67,10 @@ function getHardDenyReason(name, input, files, workspaceRoot) {
|
|
|
67
67
|
}
|
|
68
68
|
if (name === "Bash") {
|
|
69
69
|
const command = typeof input === "object" && input !== null ? input.command : "";
|
|
70
|
-
if (typeof command !== "string" || !command.trim()) {
|
|
70
|
+
if ((typeof command !== "string" || !command.trim()) && !hasExplicitBashNonCommandMode(input)) {
|
|
71
71
|
return "Bash \u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A\u3002";
|
|
72
72
|
}
|
|
73
|
-
if (/(rm\s+-rf|curl\s+[^|]+\|\s*(sh|bash)|wget\s+[^|]+\|\s*(sh|bash)|mkfs|shutdown|reboot)/i.test(
|
|
73
|
+
if (typeof command === "string" && /(rm\s+-rf|curl\s+[^|]+\|\s*(sh|bash)|wget\s+[^|]+\|\s*(sh|bash)|mkfs|shutdown|reboot)/i.test(
|
|
74
74
|
command
|
|
75
75
|
)) {
|
|
76
76
|
return "\u5B89\u5168\u4FDD\u62A4\uFF1A\u62D2\u7EDD\u9AD8\u98CE\u9669\u5220\u9664\u3001\u8FDC\u7A0B\u811A\u672C\u6267\u884C\u6216\u7CFB\u7EDF\u7EA7\u547D\u4EE4\u3002";
|
|
@@ -78,6 +78,18 @@ function getHardDenyReason(name, input, files, workspaceRoot) {
|
|
|
78
78
|
}
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
|
+
function hasExplicitBashNonCommandMode(input) {
|
|
82
|
+
if (!input || typeof input !== "object" || Array.isArray(input)) return false;
|
|
83
|
+
const record = input;
|
|
84
|
+
return isRecord(record.artifact) || isRecord(record.binary) || isBashServiceAction(record.service);
|
|
85
|
+
}
|
|
86
|
+
function isBashServiceAction(value) {
|
|
87
|
+
if (!isRecord(value)) return false;
|
|
88
|
+
return typeof value.action === "string";
|
|
89
|
+
}
|
|
90
|
+
function isRecord(value) {
|
|
91
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
92
|
+
}
|
|
81
93
|
function findPermissionRule(rules, name, risk) {
|
|
82
94
|
return rules.find(
|
|
83
95
|
(rule) => (rule.toolName === "*" || rule.toolName === name) && (!rule.risk || rule.risk === risk)
|