nolo-cli 0.54.0 → 0.61.0-alpha.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.
Files changed (158) hide show
  1. package/README.md +3 -3
  2. package/{_executeModel-OPTKYHJA.js → _executeModel-R26QYY66.js} +50 -46
  3. package/{action-ORXWW2ZG.js → action-76JX3JX3.js} +7 -6
  4. package/{addContentAction-53BZ34AE.js → addContentAction-V3NAZRTJ.js} +6 -5
  5. package/{addDialogAgentAction-JRYUS54Y.js → addDialogAgentAction-RZOAF46K.js} +5 -4
  6. package/{agentDeleteCommand-FJIWU2BS.js → agentDeleteCommand-6GNQA4J4.js} +30 -27
  7. package/{agentEmailCommands-CE32L43B.js → agentEmailCommands-HH67CYKD.js} +61 -57
  8. package/{agentGrantCommands-2LEZDADN.js → agentGrantCommands-R3VQEZJR.js} +1 -1
  9. package/{agentListCommands-VJNKULIK.js → agentListCommands-23XW3OPZ.js} +61 -31
  10. package/{agentMachineCommands-HCJ3WQXL.js → agentMachineCommands-HXHASEWO.js} +31 -28
  11. package/{agentPullCommand-M552CYSI.js → agentPullCommand-N7L2CT7L.js} +2 -2
  12. package/{agentRecordCommands-QFWERED4.js → agentRecordCommands-UHTQJVGC.js} +59 -55
  13. package/{agentRunCommand-G3GQMUNN.js → agentRunCommand-OAMT77EX.js} +63 -59
  14. package/{agentRunControl-INKFDXDA.js → agentRunControl-WECMOO6O.js} +11 -6
  15. package/{agentRuntimeLocal-K327ELSL.js → agentRuntimeLocal-QBK4H3T2.js} +26 -23
  16. package/{agentSlice-ODKF4J6M.js → agentSlice-7XJH5WQF.js} +8 -7
  17. package/{appDeleteCommands-XUXMFDI4.js → appDeleteCommands-AX2O6VDV.js} +30 -27
  18. package/{appDeployCommands-37F4GPCU.js → appDeployCommands-L5ZR26CB.js} +30 -27
  19. package/{appDeployStatusCommands-WSPU7TUK.js → appDeployStatusCommands-5HQHELRA.js} +30 -27
  20. package/{appGetCommands-YLOBA3EM.js → appGetCommands-HVSYOS57.js} +30 -27
  21. package/{appListCommands-UD62R5ME.js → appListCommands-XV2FPTWX.js} +30 -27
  22. package/{authCommand-OK6HLHGS.js → authCommand-WOTWLJNF.js} +35 -29
  23. package/{authCommands-2DUIUEMT.js → authCommands-ILTBI6JV.js} +7 -5
  24. package/{chatQueueReduxAdapter-TV2TUOQS.js → chatQueueReduxAdapter-F3R253JE.js} +20 -18
  25. package/{chunk-HPW5MNDQ.js → chunk-22BTGNSP.js} +113 -57
  26. package/{chunk-UNZDCI3O.js → chunk-2KDR4CWE.js} +35 -4
  27. package/{chunk-3ZTR7ZO4.js → chunk-2PGGC63K.js} +1 -1
  28. package/{chunk-EA5OYZVD.js → chunk-37XDGCY7.js} +1 -1
  29. package/chunk-3BLB7QKO.js +433 -0
  30. package/{chunk-CS6TCJ7E.js → chunk-3JQ2NRYU.js} +30 -7
  31. package/{chunk-3LKZRP7E.js → chunk-3QGUVVX5.js} +2 -2
  32. package/{chunk-SSXTSPSG.js → chunk-45YO6H7P.js} +71 -30
  33. package/{chunk-YLCUU3WM.js → chunk-4NJEIGBQ.js} +5 -5
  34. package/{chunk-K4NISKOR.js → chunk-5ZYA4JJ3.js} +47 -17
  35. package/{chunk-6HIGYUBQ.js → chunk-6XIE5ZGI.js} +1 -1
  36. package/{chunk-3Y2K5O2R.js → chunk-7A3RRUCQ.js} +125 -40
  37. package/{chunk-6COJEAYH.js → chunk-7KELZLC2.js} +44 -37
  38. package/chunk-AETZ7AD6.js +274 -0
  39. package/chunk-BFU6C242.js +66 -0
  40. package/{chunk-IA3A5373.js → chunk-C3FZR5EC.js} +1 -1
  41. package/{chunk-IWUMSAQF.js → chunk-CJCJF5XB.js} +26 -3
  42. package/{chunk-UGBHDMHI.js → chunk-CP7VIDZ7.js} +1 -1
  43. package/{chunk-TR4DXUYX.js → chunk-CQ2OZMLQ.js} +1181 -737
  44. package/{chunk-JON2PHYT.js → chunk-CTCW7U7N.js} +1 -1
  45. package/{chunk-7NYDJAQ7.js → chunk-DNNSCSA2.js} +5 -5
  46. package/{chunk-NI2BS6UD.js → chunk-DWUCB2A3.js} +1 -1
  47. package/{chunk-FJHMLRDQ.js → chunk-DWYSDNOH.js} +22 -28
  48. package/{chunk-AA564GBL.js → chunk-E3YVTQWT.js} +2 -2
  49. package/chunk-E4MARS3Q.js +114 -0
  50. package/{chunk-75MSWWUE.js → chunk-E6RGHPDR.js} +5 -3
  51. package/chunk-EDKF7RX4.js +30 -0
  52. package/{chunk-TC6P4NDR.js → chunk-F44FAXP2.js} +6 -6
  53. package/{chunk-SYYUU7EV.js → chunk-FHAGENAS.js} +2 -3
  54. package/{chunk-NJUQBYFJ.js → chunk-FKFMIBTT.js} +3 -1
  55. package/{chunk-INZZJSQF.js → chunk-FZGV4FGK.js} +24 -12
  56. package/{chunk-6HDYSFLO.js → chunk-GSXDRMDO.js} +3 -3
  57. package/{chunk-AUVFJGPC.js → chunk-JX5PJCWS.js} +7 -5
  58. package/{chunk-LYGNQHUW.js → chunk-JYYZCK2Z.js} +2 -4
  59. package/{chunk-EY7V7REW.js → chunk-KHCLMKZZ.js} +6 -280
  60. package/{chunk-EJE33XNR.js → chunk-KSCXMC6U.js} +1521 -565
  61. package/{chunk-XOJRZUPF.js → chunk-KWSQR2KK.js} +14 -29
  62. package/{chunk-2WBFJHQA.js → chunk-L7B47JXR.js} +34 -39
  63. package/{chunk-EICIFHVS.js → chunk-LAFC3B2I.js} +1 -1
  64. package/{chunk-N4JKMCY3.js → chunk-LJKICKVC.js} +2 -2
  65. package/chunk-M3JEW6N6.js +193 -0
  66. package/{chunk-LRGKOI5Y.js → chunk-MBOEV4L2.js} +7 -3
  67. package/{chunk-SVDMVX4G.js → chunk-MMZ6ZTVO.js} +112 -73
  68. package/{chunk-JDSUTNYY.js → chunk-MP64VFGD.js} +2 -2
  69. package/{chunk-NFLA6GSU.js → chunk-MXUDQZXQ.js} +44 -5
  70. package/chunk-N4G4PKQ6.js +23 -0
  71. package/{chunk-WQHGJHAL.js → chunk-N6HLMLKE.js} +732 -726
  72. package/{chunk-YQBXOHE6.js → chunk-NO42UD73.js} +1 -1
  73. package/{chunk-MLEZPE3U.js → chunk-NRRPKMM7.js} +4 -4
  74. package/{chunk-KXKQO4Q6.js → chunk-NTW5GWDM.js} +58 -1
  75. package/chunk-ONXOABJR.js +215 -0
  76. package/{chunk-TY3ADTX5.js → chunk-OZX2IPKM.js} +7 -2
  77. package/{chunk-Q4XZVZPN.js → chunk-P7OOB7QP.js} +1 -1
  78. package/{chunk-XIJZOCSP.js → chunk-PEZJEQAO.js} +1 -1
  79. package/{chunk-SWJGJMTW.js → chunk-PQDIDWGX.js} +1 -1
  80. package/chunk-PSCNXBYA.js +11 -0
  81. package/{chunk-BY2FF2C4.js → chunk-QEFJJS2I.js} +55 -73
  82. package/{chunk-BG7J6Y5X.js → chunk-QEW2MFDQ.js} +1 -1
  83. package/{chunk-KLIBF3BY.js → chunk-RDBARW6T.js} +8 -3
  84. package/{chunk-ZVOHVJI3.js → chunk-RJ2SAFB5.js} +82 -35
  85. package/{chunk-MYMBBB6Q.js → chunk-RVWRKFUB.js} +5 -3
  86. package/{chunk-43CXXVJD.js → chunk-RXX4GDIH.js} +1 -1
  87. package/chunk-SEJ5OS6F.js +49 -0
  88. package/{chunk-JXIP6ZWH.js → chunk-SKIRVYEI.js} +18 -5
  89. package/{chunk-SAJSBPI2.js → chunk-SOJM57FX.js} +5 -2
  90. package/{chunk-EKLRRZIN.js → chunk-SPAQ4PVV.js} +0 -5
  91. package/{chunk-RHMDMTDK.js → chunk-SYNKICCB.js} +2 -2
  92. package/{chunk-YBFJQC2M.js → chunk-TBHAHL33.js} +65 -42
  93. package/{chunk-L7NG2M6H.js → chunk-TRV2MIDW.js} +89 -74
  94. package/{chunk-5UAYZEXO.js → chunk-UZPQSVM6.js} +1 -1
  95. package/{chunk-7FAS3NEF.js → chunk-VAKVNHK5.js} +19 -15
  96. package/{chunk-UOWXD4VN.js → chunk-VHO3TMQZ.js} +336 -244
  97. package/{chunk-SVC3GGUA.js → chunk-VMWYBIXG.js} +7 -5
  98. package/{chunk-ZHXJ6M7T.js → chunk-W7XHHYWM.js} +4 -0
  99. package/{chunk-UR66XPVF.js → chunk-XAVSS3KE.js} +21 -3
  100. package/{chunk-A65UV3M5.js → chunk-XOKOSO35.js} +10 -19
  101. package/{chunk-VZMUOPYG.js → chunk-XTJTN3RW.js} +46 -3
  102. package/{chunk-T5HJEUQN.js → chunk-YCDWJX45.js} +1 -1
  103. package/{chunk-BBTN4NQD.js → chunk-Z4QSJILV.js} +85 -13
  104. package/{chunk-5FCIPEKT.js → chunk-Z5MHFBJZ.js} +1051 -926
  105. package/{chunk-O5FLGN2L.js → chunk-ZRSJ3JEH.js} +6 -2
  106. package/{cliExecutor-BBUVQU4L.js → cliExecutor-HG3S345O.js} +1 -1
  107. package/{codingSkills-BCQXRZOI.js → codingSkills-TKROLCBA.js} +4 -3
  108. package/{contentThunks-KNI6VXLT.js → contentThunks-OZPK5B4Z.js} +21 -19
  109. package/{cooldownCommands-GI5NNWGL.js → cooldownCommands-BSCH2W7P.js} +2 -2
  110. package/{createAgentAutomationAction-OK4L33KF.js → createAgentAutomationAction-LCIBGE5T.js} +23 -21
  111. package/{createDialogAction-JDSMY4AY.js → createDialogAction-JPJZMHJE.js} +25 -22
  112. package/{createPageAction-T7RA3HCG.js → createPageAction-6P2WLNHO.js} +26 -23
  113. package/{dbSlice-TVX6SN2T.js → dbSlice-IBVOBVMS.js} +5 -4
  114. package/{deleteFile-JYKRT7C3.js → deleteFile-FWP2PSBG.js} +3 -2
  115. package/{dialogCommands-UQZYWOOV.js → dialogCommands-WAFKC3KK.js} +30 -27
  116. package/{dialogSlice-TYW2G7IL.js → dialogSlice-R5RZHFTU.js} +20 -18
  117. package/{docCreateCommands-OA6HZBWO.js → docCreateCommands-GHGB42S7.js} +32 -28
  118. package/{docDeleteCommands-KBB3YQI2.js → docDeleteCommands-Y5I7ZEX4.js} +33 -29
  119. package/{docReadCommands-ZLMFVC67.js → docReadCommands-BMXM6J7T.js} +32 -28
  120. package/{docStore-2URPBVCS.js → docStore-DKWZ6XJ5.js} +6 -5
  121. package/{docUpdateCommands-HMH5KUON.js → docUpdateCommands-QNABH3M2.js} +32 -28
  122. package/{getPricing-RFOPUWHY.js → getPricing-NM3NUTAS.js} +4 -4
  123. package/handleSendMessageAction-UQGKM4UX.js +675 -0
  124. package/index.js +79 -88
  125. package/{lib-2ZTNRXR4.js → lib-FRRS27KN.js} +63 -28
  126. package/{localRuntimeAuthority-KQDAE64E.js → localRuntimeAuthority-R5UBODT3.js} +6 -4
  127. package/{localRuntimeDb-PF7CFKDL.js → localRuntimeDb-P37ZTX55.js} +1 -1
  128. package/{machineCommands-RK6L7ZWL.js → machineCommands-YDAIPYU5.js} +298 -80
  129. package/{machineWsRunDispatch-3X64DW2Z.js → machineWsRunDispatch-O6RM2ECT.js} +57 -53
  130. package/{memberThunks-THZYZFSN.js → memberThunks-VZI6G7YZ.js} +10 -8
  131. package/{models-JVKUEER5.js → models-FAMINFZ7.js} +2 -2
  132. package/package.json +3 -2
  133. package/{read-K4JU4MQC.js → read-2BYWW7AA.js} +3 -2
  134. package/{readDocTool-LQGR6FUN.js → readDocTool-LC3A7QTB.js} +1 -1
  135. package/{readlineWorkspace-XUFJV3RS.js → readlineWorkspace-5DP3AJWN.js} +4367 -2796
  136. package/{removeDialogAgentAction-ECHCFB7N.js → removeDialogAgentAction-SFYZXHNK.js} +8 -7
  137. package/{runAgentClientLoop-24GQ2AW6.js → runAgentClientLoop-Y6HWP2PT.js} +51 -46
  138. package/{runtimeDoctorCommands-JKTTN723.js → runtimeDoctorCommands-CROTMULY.js} +7 -5
  139. package/{setDialogExtraReferencesAction-KCVJNGMB.js → setDialogExtraReferencesAction-Q32RGFTA.js} +6 -5
  140. package/{setPrimaryDialogAgentAction-VDOBOMKC.js → setPrimaryDialogAgentAction-BFYJHUJS.js} +8 -7
  141. package/{settingSlice-VR2IJSXC.js → settingSlice-IRUU4VFB.js} +6 -5
  142. package/{skillDiscovery-2QTZINON.js → skillDiscovery-CYUCJMAG.js} +2 -1
  143. package/{spaceCommands-S5YJJXL7.js → spaceCommands-CLN45IE3.js} +33 -215
  144. package/{streamAgentChatTurn-QHKP3ABO.js → streamAgentChatTurn-6WFQJ4DY.js} +107 -74
  145. package/{switchDialogAgentAction-5L4UP7VI.js → switchDialogAgentAction-L2KOKCGG.js} +5 -4
  146. package/{tableCommands-R6WFRDYF.js → tableCommands-SUNTHAYX.js} +1 -1
  147. package/{toolApiClient-53U4UDFF.js → toolApiClient-VGYUB4P5.js} +2 -1
  148. package/{tools-SSXSTC3O.js → tools-RR53D65Q.js} +39 -35
  149. package/{tuiSummaryLlmCaller-URFJHFC5.js → tuiSummaryLlmCaller-F3DPFFZM.js} +15 -13
  150. package/{updateCommands-IYKLF3JX.js → updateCommands-AJYSD73Y.js} +2 -2
  151. package/{updateDialogTitleAction-YFYAEW3T.js → updateDialogTitleAction-WXS3AKOL.js} +23 -21
  152. package/agentSuperviseCommands-5AR3DKNN.js +0 -640
  153. package/chunk-6IGD47IC.js +0 -19
  154. package/chunk-FD36SCCD.js +0 -105
  155. package/chunk-GRFK2XP4.js +0 -230
  156. package/chunk-HJTAGT3W.js +0 -370
  157. package/chunk-SUEIAK5N.js +0 -2574
  158. package/handleSendMessageAction-GO53TY7U.js +0 -409
@@ -2,87 +2,93 @@ import {
2
2
  buildMachinePermissionPromptBlock,
3
3
  handleConnectorRunMessage,
4
4
  resolveMachineRunPermissionPolicy
5
- } from "./chunk-JXIP6ZWH.js";
5
+ } from "./chunk-SKIRVYEI.js";
6
6
  import {
7
7
  isConnectorWebSocketAuthError,
8
8
  isConnectorWebSocketRetryableError,
9
9
  resolveConnectorWebSocketTarget
10
10
  } from "./chunk-ALXHV7NK.js";
11
+ import "./chunk-Z5MHFBJZ.js";
12
+ import "./chunk-MXUDQZXQ.js";
13
+ import "./chunk-EADNWBAZ.js";
14
+ import "./chunk-45YO6H7P.js";
15
+ import "./chunk-DWUCB2A3.js";
16
+ import "./chunk-CTCW7U7N.js";
17
+ import "./chunk-SPAQ4PVV.js";
18
+ import "./chunk-MP64VFGD.js";
11
19
  import {
12
20
  detectMachineInfo
13
21
  } from "./chunk-ESHYE7WU.js";
14
- import "./chunk-5FCIPEKT.js";
15
- import "./chunk-NFLA6GSU.js";
16
- import "./chunk-EADNWBAZ.js";
17
- import "./chunk-NI2BS6UD.js";
18
- import "./chunk-JON2PHYT.js";
19
- import "./chunk-EKLRRZIN.js";
20
- import "./chunk-JDSUTNYY.js";
21
22
  import "./chunk-JBTJAPUF.js";
22
- import "./chunk-SSXTSPSG.js";
23
- import "./chunk-EICIFHVS.js";
23
+ import "./chunk-LAFC3B2I.js";
24
24
  import "./chunk-ATNTHIZI.js";
25
- import "./chunk-RHMDMTDK.js";
25
+ import "./chunk-SYNKICCB.js";
26
26
  import "./chunk-HS7MLR74.js";
27
- import "./chunk-BG7J6Y5X.js";
28
- import "./chunk-TR4DXUYX.js";
27
+ import "./chunk-CQ2OZMLQ.js";
29
28
  import "./chunk-5XTOKQLW.js";
30
29
  import "./chunk-NF64D32W.js";
31
30
  import {
32
31
  CORE_DRAIN_REASON
33
32
  } from "./chunk-3L2WKC3W.js";
34
- import "./chunk-GRFK2XP4.js";
33
+ import "./chunk-NTW5GWDM.js";
34
+ import "./chunk-3BLB7QKO.js";
35
35
  import "./chunk-KQHGZWSV.js";
36
- import "./chunk-3ZTR7ZO4.js";
37
- import "./chunk-KXKQO4Q6.js";
38
- import "./chunk-LRGKOI5Y.js";
39
- import "./chunk-TY3ADTX5.js";
40
- import "./chunk-UGBHDMHI.js";
41
- import "./chunk-INZZJSQF.js";
36
+ import "./chunk-2PGGC63K.js";
37
+ import "./chunk-MBOEV4L2.js";
38
+ import "./chunk-OZX2IPKM.js";
39
+ import "./chunk-CP7VIDZ7.js";
40
+ import "./chunk-N4G4PKQ6.js";
41
+ import "./chunk-FZGV4FGK.js";
42
42
  import "./chunk-MEYIRKDN.js";
43
43
  import "./chunk-63W5N6P3.js";
44
44
  import "./chunk-VF4K2QE6.js";
45
- import "./chunk-6HDYSFLO.js";
46
- import "./chunk-FJHMLRDQ.js";
47
- import "./chunk-WQHGJHAL.js";
45
+ import "./chunk-GSXDRMDO.js";
46
+ import "./chunk-DWYSDNOH.js";
47
+ import "./chunk-N6HLMLKE.js";
48
48
  import "./chunk-ZJ7UHBJS.js";
49
- import "./chunk-YBFJQC2M.js";
49
+ import "./chunk-TBHAHL33.js";
50
50
  import "./chunk-EVBFYPDC.js";
51
51
  import "./chunk-HQUORJTM.js";
52
52
  import "./chunk-YYLHWIW6.js";
53
53
  import "./chunk-AGGIDPCZ.js";
54
- import "./chunk-TC6P4NDR.js";
55
- import "./chunk-YLCUU3WM.js";
54
+ import "./chunk-F44FAXP2.js";
55
+ import "./chunk-4NJEIGBQ.js";
56
56
  import "./chunk-5RGU3J7P.js";
57
57
  import "./chunk-6YTOJY35.js";
58
58
  import "./chunk-M76ECQRD.js";
59
59
  import "./chunk-YDH3FDFQ.js";
60
- import "./chunk-IA3A5373.js";
60
+ import "./chunk-C3FZR5EC.js";
61
61
  import "./chunk-GLKOYSRU.js";
62
- import "./chunk-AA564GBL.js";
63
- import "./chunk-O5FLGN2L.js";
64
- import "./chunk-EY7V7REW.js";
65
- import "./chunk-EJE33XNR.js";
62
+ import "./chunk-E3YVTQWT.js";
63
+ import "./chunk-ZRSJ3JEH.js";
64
+ import "./chunk-AETZ7AD6.js";
65
+ import "./chunk-KHCLMKZZ.js";
66
+ import {
67
+ PATH_FIELD_ALIASES,
68
+ createLocalWorkspaceToolExecutors
69
+ } from "./chunk-KSCXMC6U.js";
70
+ import "./chunk-7A3RRUCQ.js";
66
71
  import "./chunk-ZNFJWEN4.js";
67
- import "./chunk-3Y2K5O2R.js";
68
- import "./chunk-A65UV3M5.js";
72
+ import "./chunk-XOKOSO35.js";
69
73
  import "./chunk-2QDDKFG5.js";
70
74
  import "./chunk-N7J63Q6C.js";
71
- import "./chunk-BY2FF2C4.js";
72
- import "./chunk-VZMUOPYG.js";
73
- import "./chunk-KLIBF3BY.js";
74
- import "./chunk-ZVOHVJI3.js";
75
- import "./chunk-IWUMSAQF.js";
75
+ import "./chunk-QEFJJS2I.js";
76
+ import "./chunk-XTJTN3RW.js";
77
+ import "./chunk-QEW2MFDQ.js";
78
+ import "./chunk-RDBARW6T.js";
79
+ import "./chunk-RJ2SAFB5.js";
80
+ import "./chunk-CJCJF5XB.js";
76
81
  import "./chunk-2MBTWINN.js";
77
- import "./chunk-K4NISKOR.js";
78
- import "./chunk-BBTN4NQD.js";
79
- import "./chunk-N4JKMCY3.js";
82
+ import "./chunk-5ZYA4JJ3.js";
83
+ import "./chunk-Z4QSJILV.js";
84
+ import "./chunk-LJKICKVC.js";
85
+ import "./chunk-PSCNXBYA.js";
80
86
  import "./chunk-BYXBJQAS.js";
81
- import "./chunk-SVDMVX4G.js";
87
+ import "./chunk-MMZ6ZTVO.js";
82
88
  import "./chunk-DWLEOOGR.js";
83
- import "./chunk-CS6TCJ7E.js";
84
- import "./chunk-FD36SCCD.js";
85
- import "./chunk-ZHXJ6M7T.js";
89
+ import "./chunk-3JQ2NRYU.js";
90
+ import "./chunk-ONXOABJR.js";
91
+ import "./chunk-W7XHHYWM.js";
86
92
  import {
87
93
  toErrorMessage
88
94
  } from "./chunk-HNMXYYJR.js";
@@ -97,28 +103,29 @@ import {
97
103
  import {
98
104
  DEFAULT_NOLO_SERVER_URL
99
105
  } from "./chunk-OLZBQWZU.js";
100
- import "./chunk-NJUQBYFJ.js";
101
- import "./chunk-HPW5MNDQ.js";
102
- import "./chunk-AUVFJGPC.js";
103
- import "./chunk-SVC3GGUA.js";
106
+ import "./chunk-FKFMIBTT.js";
107
+ import "./chunk-22BTGNSP.js";
108
+ import "./chunk-JX5PJCWS.js";
109
+ import "./chunk-VMWYBIXG.js";
104
110
  import {
105
111
  parsePositiveFiniteNumberOrFallback
106
112
  } from "./chunk-Y5GCAMGP.js";
107
113
  import "./chunk-UZ6XXCVR.js";
108
114
  import "./chunk-KX6YBIHG.js";
109
- import "./chunk-MYMBBB6Q.js";
115
+ import "./chunk-RVWRKFUB.js";
110
116
  import "./chunk-UAD2WT54.js";
111
- import "./chunk-7NYDJAQ7.js";
117
+ import "./chunk-DNNSCSA2.js";
112
118
  import "./chunk-NHRQCXIQ.js";
113
119
  import "./chunk-WWC7I6TA.js";
114
120
  import "./chunk-I42VC5KR.js";
115
- import "./chunk-SAJSBPI2.js";
121
+ import "./chunk-SOJM57FX.js";
116
122
  import "./chunk-QSJ3HFEF.js";
117
- import "./chunk-2WBFJHQA.js";
123
+ import "./chunk-L7B47JXR.js";
118
124
  import "./chunk-BJIRLHJR.js";
119
- import "./chunk-XOJRZUPF.js";
125
+ import "./chunk-KWSQR2KK.js";
120
126
  import "./chunk-QOKAKDPE.js";
121
127
  import "./chunk-OW765XBU.js";
128
+ import "./chunk-SEJ5OS6F.js";
122
129
  import "./chunk-GBRG75BQ.js";
123
130
  import {
124
131
  asTrimmedString
@@ -136,7 +143,7 @@ import "./chunk-G3SUCT4W.js";
136
143
  import "./chunk-4VNS5WPM.js";
137
144
 
138
145
  // packages/connector-experimental/heartbeatLoop.ts
139
- var defaultSleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
146
+ var defaultSleep = (ms) => new Promise((resolve3) => setTimeout(resolve3, ms));
140
147
  async function runHeartbeatLoop(options) {
141
148
  const sleep = options.sleep ?? defaultSleep;
142
149
  let beats = 0;
@@ -353,6 +360,201 @@ async function runMachineWatchCommand(deps) {
353
360
  }
354
361
  }
355
362
 
363
+ // packages/cli/machineToolInvokeDispatch.ts
364
+ import { lstat, realpath } from "node:fs/promises";
365
+ import { dirname as dirname2, isAbsolute as isAbsolute2, relative as relative2, resolve as resolve2, sep } from "node:path";
366
+ var MACHINE_TOOL_INVOKE_V1_TOOL_NAMES = ["readFile", "globFiles"];
367
+ var V1_ALLOWED_TOOL_NAMES = new Set(MACHINE_TOOL_INVOKE_V1_TOOL_NAMES);
368
+ var DEFAULT_TOOL_INVOKE_TIMEOUT_MS = 3e4;
369
+ var TOOL_RESULT_MESSAGE_MAX_CHARS = 1e6;
370
+ var TOOL_NOT_ALLOWED_MESSAGE = "tool not allowed in v1 (read-only)";
371
+ var TOOL_PAYLOAD_MALFORMED_MESSAGE = "malformed tool.invoke payload (payload object required)";
372
+ var TOOL_ARGS_MALFORMED_MESSAGE = "malformed tool.invoke args (args object required)";
373
+ function createMachineToolInvokeHandlers(args) {
374
+ const executors = (args.createToolExecutors ?? createLocalWorkspaceToolExecutors)({
375
+ workspaceRoot: args.workspaceRoot,
376
+ // v1 硬 containment:localWorkspaceTools 在无确认回调时对工作区外路径
377
+ // 默认放行(交互式 TUI 语义)。机器侧是无人值守的 server 驱动调用,
378
+ // 一律拒绝外部路径 —— 该回调只对「未走 spill 例外」的工作区外路径触发,
379
+ // 是纵深防御的第二层;第一层是 dispatch 入口的 machinePathPreflight
380
+ // (词法 + realpath 双检,spill 路径同样被拒,confirm 不可达)。
381
+ confirmExternalFileAccess: async () => false,
382
+ // 机器协议 v1(M3 修复):TUI 的 readFile 去重 ledger 面向「同一会话的
383
+ // 重复读提示」,daemon 长生命周期会让它跨越多个 server 会话 —— 新会话
384
+ // 重读同一文件会拿到去重文案而非内容。readFileNoLedger 关闭去重 ledger,
385
+ // 机器侧 readFile 每次都返回真实内容,语义等价于 TUI 的 force:true。
386
+ readFileNoLedger: true
387
+ });
388
+ const executorMap = executors;
389
+ const invokeWithTimeout = async (toolName, executorArgs, timeoutMs, workspaceRoot) => {
390
+ const call = {
391
+ id: "machine-tool-invoke",
392
+ name: toolName,
393
+ arguments: typeof executorArgs === "string" ? executorArgs : JSON.stringify(executorArgs ?? {})
394
+ };
395
+ const requestPath = extractMachineToolRequestPath(executorArgs);
396
+ if (requestPath !== null) {
397
+ const preflightError = await machinePathPreflight({
398
+ workspaceRoot,
399
+ request: requestPath
400
+ });
401
+ if (preflightError) return { error: preflightError };
402
+ }
403
+ let timer = null;
404
+ try {
405
+ const outcome = await Promise.race([
406
+ executorMap[toolName](call),
407
+ new Promise((_, reject) => {
408
+ timer = setTimeout(() => reject(new Error(`tool.invoke timed out after ${timeoutMs}ms`)), timeoutMs);
409
+ })
410
+ ]);
411
+ const content = typeof outcome?.content === "string" ? outcome.content : "";
412
+ if (content.length > TOOL_RESULT_MESSAGE_MAX_CHARS) {
413
+ return {
414
+ result: content.slice(0, TOOL_RESULT_MESSAGE_MAX_CHARS) + `
415
+
416
+ [... output truncated at ${TOOL_RESULT_MESSAGE_MAX_CHARS} chars ...]`
417
+ };
418
+ }
419
+ return { result: content };
420
+ } catch (error) {
421
+ return { error: toMessage(error) };
422
+ } finally {
423
+ if (timer) clearTimeout(timer);
424
+ }
425
+ };
426
+ const invokeMachineTool = async (requestId, toolName, toolArgs, timeoutMs) => {
427
+ if (!V1_ALLOWED_TOOL_NAMES.has(toolName)) {
428
+ return { error: TOOL_NOT_ALLOWED_MESSAGE };
429
+ }
430
+ const resolvedTimeout = resolveTimeoutMs(timeoutMs);
431
+ return invokeWithTimeout(toolName, toolArgs, resolvedTimeout, args.workspaceRoot);
432
+ };
433
+ return {
434
+ handleToolInvokeMessage: async (message, send) => {
435
+ const frame = parseToolInvokeFrame(message);
436
+ if (!frame) return null;
437
+ const { requestId, payload } = frame;
438
+ if (frame.payloadMalformed) {
439
+ send(
440
+ JSON.stringify({ type: "tool.result", requestId, error: TOOL_PAYLOAD_MALFORMED_MESSAGE })
441
+ );
442
+ return JSON.stringify({ type: "tool.result", requestId, error: TOOL_PAYLOAD_MALFORMED_MESSAGE });
443
+ }
444
+ if (!isRecord2(payload.args)) {
445
+ send(
446
+ JSON.stringify({ type: "tool.result", requestId, error: TOOL_ARGS_MALFORMED_MESSAGE })
447
+ );
448
+ return JSON.stringify({ type: "tool.result", requestId, error: TOOL_ARGS_MALFORMED_MESSAGE });
449
+ }
450
+ const outcome = await invokeMachineTool(
451
+ requestId,
452
+ payload.tool,
453
+ payload.args,
454
+ payload.timeoutMs
455
+ );
456
+ send(
457
+ JSON.stringify(
458
+ outcome.error !== void 0 ? { type: "tool.result", requestId, error: outcome.error } : { type: "tool.result", requestId, result: outcome.result ?? "" }
459
+ )
460
+ );
461
+ return JSON.stringify(
462
+ outcome.error !== void 0 ? { type: "tool.result", requestId, error: outcome.error } : { type: "tool.result", requestId, result: outcome.result ?? "" }
463
+ );
464
+ },
465
+ invokeMachineTool
466
+ };
467
+ }
468
+ function resolveTimeoutMs(value) {
469
+ const parsed = Number(value);
470
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_TOOL_INVOKE_TIMEOUT_MS;
471
+ }
472
+ function toMessage(error) {
473
+ if (error instanceof Error && error.message) return error.message;
474
+ if (typeof error === "string" && error) return error;
475
+ return "tool.invoke failed";
476
+ }
477
+ function isLexicallyInsideRoot(root, targetPath) {
478
+ const rel = relative2(resolve2(root), resolve2(targetPath));
479
+ return rel === "" || rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute2(rel);
480
+ }
481
+ async function machinePathPreflight(args) {
482
+ const workspaceRoot = resolve2(args.workspaceRoot);
483
+ const lexicalPath = resolve2(workspaceRoot, args.request);
484
+ if (!isLexicallyInsideRoot(workspaceRoot, lexicalPath)) {
485
+ return `path outside workspace root: ${args.request}`;
486
+ }
487
+ let current = lexicalPath;
488
+ const symlinks = [];
489
+ while (true) {
490
+ const stats = await lstat(current).catch(() => void 0);
491
+ if (!stats) {
492
+ return null;
493
+ }
494
+ if (!stats.isSymbolicLink()) break;
495
+ const target = await realpath(current).catch(() => void 0);
496
+ if (!target) return null;
497
+ symlinks.push({ link: current, target });
498
+ current = resolve2(current, "..");
499
+ if (current === dirname2(current)) break;
500
+ }
501
+ try {
502
+ const [realRequest, realRoot] = await Promise.all([realpath(lexicalPath), realpath(workspaceRoot)]);
503
+ if (!isLexicallyInsideRoot(realRoot, realRequest)) {
504
+ return `path outside workspace root after symlink resolution: ${args.request}`;
505
+ }
506
+ } catch (error) {
507
+ if (symlinks.length === 0) return null;
508
+ return `path outside workspace root after symlink resolution: ${args.request}`;
509
+ }
510
+ return null;
511
+ }
512
+ function extractMachineToolRequestPath(executorArgs) {
513
+ const rawArgs = typeof executorArgs === "string" ? executorArgs : executorArgs !== void 0 && executorArgs !== null ? JSON.stringify(executorArgs) : null;
514
+ if (rawArgs === null) return null;
515
+ let parsed;
516
+ try {
517
+ parsed = JSON.parse(rawArgs);
518
+ } catch {
519
+ return null;
520
+ }
521
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
522
+ for (const key of PATH_FIELD_ALIASES) {
523
+ const value = parsed[key];
524
+ if (typeof value === "string" && value.length > 0) return value.trim();
525
+ }
526
+ return null;
527
+ }
528
+ function parseToolInvokeFrame(message) {
529
+ let parsed;
530
+ try {
531
+ parsed = JSON.parse(message);
532
+ } catch {
533
+ return null;
534
+ }
535
+ if (!isRecord2(parsed) || parsed.type !== "tool.invoke") return null;
536
+ if (typeof parsed.requestId !== "string" || parsed.requestId.length === 0) return null;
537
+ if (!isRecord2(parsed.payload)) {
538
+ return {
539
+ requestId: parsed.requestId,
540
+ payload: { tool: "", args: {}, timeoutMs: void 0 },
541
+ payloadMalformed: true
542
+ };
543
+ }
544
+ const payload = parsed.payload;
545
+ return {
546
+ requestId: parsed.requestId,
547
+ payload: {
548
+ tool: typeof payload.tool === "string" ? payload.tool : "",
549
+ args: payload.args,
550
+ timeoutMs: payload.timeoutMs
551
+ }
552
+ };
553
+ }
554
+ function isRecord2(value) {
555
+ return typeof value === "object" && value !== null && !Array.isArray(value);
556
+ }
557
+
356
558
  // packages/cli/machineWsSession.ts
357
559
  var CONNECTOR_WS_KEEPALIVE_MS = 25e3;
358
560
  function buildConnectorKeepaliveMessage() {
@@ -369,7 +571,7 @@ async function defaultConnectWebSocket(url, options) {
369
571
  if (!WebSocketCtor) {
370
572
  throw new Error("WebSocket is not available in this runtime");
371
573
  }
372
- await new Promise((resolve2, reject) => {
574
+ await new Promise((resolve3, reject) => {
373
575
  const ws = new WebSocketCtor(url, {
374
576
  headers: options.headers
375
577
  });
@@ -388,7 +590,7 @@ async function defaultConnectWebSocket(url, options) {
388
590
  try {
389
591
  ws.close();
390
592
  } catch {
391
- resolve2();
593
+ resolve3();
392
594
  }
393
595
  };
394
596
  options.signal?.addEventListener("abort", handleAbort, { once: true });
@@ -409,7 +611,7 @@ async function defaultConnectWebSocket(url, options) {
409
611
  ws.addEventListener("error", () => {
410
612
  clearKeepalive();
411
613
  if (aborted) {
412
- resolve2();
614
+ resolve3();
413
615
  return;
414
616
  }
415
617
  reject(new Error("connector websocket failed"));
@@ -418,7 +620,7 @@ async function defaultConnectWebSocket(url, options) {
418
620
  "close",
419
621
  () => {
420
622
  clearKeepalive();
421
- if (opened || aborted) resolve2();
623
+ if (opened || aborted) resolve3();
422
624
  else reject(new Error("connector websocket closed before opening"));
423
625
  },
424
626
  { once: true }
@@ -471,12 +673,12 @@ async function runMachineWsSession(options) {
471
673
  sentMessages.push(response);
472
674
  })
473
675
  });
474
- const abortPromise = options.signal ? new Promise((resolve2) => {
676
+ const abortPromise = options.signal ? new Promise((resolve3) => {
475
677
  if (options.signal?.aborted) {
476
- resolve2("aborted");
678
+ resolve3("aborted");
477
679
  return;
478
680
  }
479
- options.signal?.addEventListener("abort", () => resolve2("aborted"), { once: true });
681
+ options.signal?.addEventListener("abort", () => resolve3("aborted"), { once: true });
480
682
  }) : null;
481
683
  const raceResult = await Promise.race(
482
684
  [websocketPromise, heartbeatMonitorPromise, abortPromise].filter(Boolean)
@@ -586,6 +788,14 @@ ${text}
586
788
  }
587
789
 
588
790
  // packages/cli/machineCommands.ts
791
+ async function handleMachineWsMessageDemux(message, send, handlers, runConnectorMessage) {
792
+ try {
793
+ const toolResult = await handlers.toolInvoke.handleToolInvokeMessage(message, send);
794
+ if (toolResult !== null) return;
795
+ } catch {
796
+ }
797
+ await runConnectorMessage();
798
+ }
589
799
  function resolveAuthToken2(env) {
590
800
  return env.AUTH_TOKEN || env.AUTH || "";
591
801
  }
@@ -619,7 +829,7 @@ function resolveConnectServerUrl(args, env) {
619
829
  function resolveConnectAuthToken(args, env) {
620
830
  return readOption(args, "--machine-key") || readOption(args, "--token") || resolveAuthToken2(env);
621
831
  }
622
- var defaultSleep2 = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
832
+ var defaultSleep2 = (ms) => new Promise((resolve3) => setTimeout(resolve3, ms));
623
833
  async function sleepWithAbort(ms, sleep, signal) {
624
834
  if (!signal) {
625
835
  await sleep(ms);
@@ -628,8 +838,8 @@ async function sleepWithAbort(ms, sleep, signal) {
628
838
  if (signal.aborted) return;
629
839
  await Promise.race([
630
840
  sleep(ms),
631
- new Promise((resolve2) => {
632
- signal.addEventListener("abort", () => resolve2(), { once: true });
841
+ new Promise((resolve3) => {
842
+ signal.addEventListener("abort", () => resolve3(), { once: true });
633
843
  })
634
844
  ]);
635
845
  }
@@ -638,7 +848,7 @@ function resolveConnectorReconnectDelayMs(env) {
638
848
  return Number.isFinite(raw) && raw >= 0 ? raw : 5e3;
639
849
  }
640
850
  async function defaultExecuteCli(provider, prompt, options) {
641
- const { executeCli } = await import("./cliExecutor-BBUVQU4L.js");
851
+ const { executeCli } = await import("./cliExecutor-HG3S345O.js");
642
852
  return executeCli(provider, prompt, options);
643
853
  }
644
854
  function detectLaunchableMachineInfo() {
@@ -731,6 +941,9 @@ ${text}`);
731
941
  const maxAttempts = deps.maxConnectorAttempts ?? Infinity;
732
942
  const sleep = deps.sleep ?? defaultSleep2;
733
943
  const reconnectDelayMs = resolveConnectorReconnectDelayMs(env);
944
+ const toolInvokeHandlers = createMachineToolInvokeHandlers({
945
+ workspaceRoot: process.cwd()
946
+ });
734
947
  for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
735
948
  if (deps.signal?.aborted) {
736
949
  return 0;
@@ -750,22 +963,27 @@ ${text}`);
750
963
  ...options,
751
964
  fetchImpl
752
965
  }),
753
- onMessage: (message, send) => handleConnectorRunMessage(
966
+ onMessage: (message, send) => handleMachineWsMessageDemux(
754
967
  message,
755
968
  send,
756
- deps.executeCli ?? defaultExecuteCli,
757
- {
758
- ...env,
759
- NOLO_SERVER: runtimeServerUrl,
760
- NOLO_SERVER_URL: runtimeServerUrl,
761
- BASE_URL: runtimeServerUrl,
762
- AUTH_TOKEN: authToken,
763
- NOLO_MACHINE_API_KEY: authToken
764
- },
765
- fetchImpl,
766
- {
767
- buildConnectorCliPrompt
768
- }
969
+ { toolInvoke: toolInvokeHandlers },
970
+ () => handleConnectorRunMessage(
971
+ message,
972
+ send,
973
+ deps.executeCli ?? defaultExecuteCli,
974
+ {
975
+ ...env,
976
+ NOLO_SERVER: runtimeServerUrl,
977
+ NOLO_SERVER_URL: runtimeServerUrl,
978
+ BASE_URL: runtimeServerUrl,
979
+ AUTH_TOKEN: authToken,
980
+ NOLO_MACHINE_API_KEY: authToken
981
+ },
982
+ fetchImpl,
983
+ {
984
+ buildConnectorCliPrompt
985
+ }
986
+ )
769
987
  )
770
988
  });
771
989
  const exitCode = sessionResult.exitCode;