nolo-cli 0.54.0 → 0.61.0-alpha.2

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