nolo-cli 0.228.0-alpha.1 → 0.228.0

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 (238) hide show
  1. package/README.md +3 -5
  2. package/{_executeModel-WZKT6XEU.js → _executeModel-GIFVXKDT.js} +89 -82
  3. package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
  4. package/{action-GDZDXPMB.js → action-WZTKEF5H.js} +9 -6
  5. package/{addContentAction-7RO4AMRI.js → addContentAction-MLI6GOBV.js} +14 -13
  6. package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-ARGQM22H.js} +17 -16
  7. package/{agentDeleteCommand-PZWRHNXY.js → agentDeleteCommand-UF7XVELS.js} +120 -111
  8. package/{agentEmailCommands-QTKMEICX.js → agentEmailCommands-SFHRPQYC.js} +120 -107
  9. package/agentListCommands-IXKBP3W5.js +644 -0
  10. package/{agentMachineCommands-7QGICJLM.js → agentMachineCommands-7NX6PWQ6.js} +56 -48
  11. package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-C5T7C5KZ.js} +2 -2
  12. package/{agentPullCommand-KHV4EELF.js → agentPullCommand-4EQZYHU4.js} +1 -1
  13. package/agentRecordCommands-IUNX6XD6.js +188 -0
  14. package/{agentRunCommand-OFQLOF5Y.js → agentRunCommand-LCR4XADM.js} +127 -111
  15. package/{agentRunControl-MBG4U6SL.js → agentRunControl-RN2P6AOD.js} +11 -9
  16. package/{agentRuntimeLocal-TU4LA353.js → agentRuntimeLocal-LVXPQ7QA.js} +57 -43
  17. package/{agentSlice-L4SBGWTB.js → agentSlice-ZGMOH6TE.js} +15 -14
  18. package/{appDeleteCommands-JWP3XPUA.js → appDeleteCommands-BESCJOQM.js} +56 -48
  19. package/{appDeployCommands-6E4TQCWI.js → appDeployCommands-LPTR6IOX.js} +56 -48
  20. package/{appDeployStatusCommands-ALU4SADG.js → appDeployStatusCommands-BZ7KZ5RD.js} +56 -48
  21. package/{appGetCommands-JEY4L6L4.js → appGetCommands-EDWGJV4S.js} +56 -48
  22. package/{appListCommands-PCAVHU7M.js → appListCommands-OPRWYPM6.js} +56 -48
  23. package/{authCommand-CGRIIOOV.js → authCommand-3C3RN4OU.js} +25 -19
  24. package/{authCommands-55OGQGCR.js → authCommands-ZMVEDCQD.js} +12 -6
  25. package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-VRCMQ77Q.js} +7 -7
  26. package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
  27. package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-NZITLHWO.js} +3 -3
  28. package/{chunk-AUAJTAFM.js → chunk-2BKNICGK.js} +4 -4
  29. package/{chunk-QYB23WUH.js → chunk-2FK2KZSL.js} +1 -1
  30. package/chunk-2SXN7LAY.js +15 -0
  31. package/{chunk-H6L2NFHY.js → chunk-3DJJ4CFG.js} +11 -11
  32. package/{chunk-TSPMLCWI.js → chunk-4IQN6FWY.js} +5 -5
  33. package/{chunk-GUXZK7SE.js → chunk-4OXPN3WC.js} +17 -6
  34. package/chunk-4ZCTKB27.js +31 -0
  35. package/chunk-53W5BXLN.js +340 -0
  36. package/{chunk-3P54D2E4.js → chunk-5HUO7SEX.js} +9 -107
  37. package/chunk-6ASGEP5D.js +21 -0
  38. package/{chunk-DDC6P6EH.js → chunk-6CXQ3YNJ.js} +68 -40
  39. package/{chunk-G7IUT2V3.js → chunk-6MTVACLN.js} +365 -64
  40. package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
  41. package/{chunk-XSW4EXQV.js → chunk-6TVYUQRM.js} +55 -18
  42. package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
  43. package/{chunk-7Z6EW7AH.js → chunk-6XVPMGXK.js} +97 -11
  44. package/{chunk-ALAES342.js → chunk-73PZD7JZ.js} +9 -5
  45. package/{chunk-2MCB7CD7.js → chunk-7UVVLYKC.js} +9 -9
  46. package/{chunk-S6FDXXZV.js → chunk-ADOOL3PG.js} +2 -2
  47. package/{chunk-OWKNSIXL.js → chunk-AEZBAFC6.js} +334 -77
  48. package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
  49. package/{chunk-RG2DGNL6.js → chunk-ARFCL53U.js} +5 -5
  50. package/{chunk-SRCCSTIM.js → chunk-AS6L5KSD.js} +4 -4
  51. package/{chunk-GPOV42YM.js → chunk-BAH3BAUZ.js} +8 -8
  52. package/{chunk-N5Z2V73W.js → chunk-BFKJ2RS3.js} +1 -1
  53. package/{chunk-F6Z6ZCUV.js → chunk-BVEDT6DM.js} +3 -3
  54. package/chunk-C5A54QS7.js +108 -0
  55. package/{chunk-CD3RU7XL.js → chunk-CD2DK5JA.js} +120 -14
  56. package/{chunk-BP5ZJ6B4.js → chunk-CD64YXRB.js} +1 -1
  57. package/{chunk-VP3BINY7.js → chunk-CIGCTSBF.js} +31 -1
  58. package/{chunk-D6YNCNM6.js → chunk-CIUZXD5D.js} +12 -12
  59. package/{chunk-EVGU5P4U.js → chunk-CO6E7YK6.js} +1 -1
  60. package/{chunk-VMJVAJ6W.js → chunk-CTIEJRTP.js} +28 -4
  61. package/{chunk-7JGMNKKG.js → chunk-CTWCZKNS.js} +29 -8
  62. package/{chunk-YFLVRVYK.js → chunk-D25ONVOH.js} +1 -1
  63. package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
  64. package/{chunk-262R3XNN.js → chunk-E5RYFR7E.js} +334 -103
  65. package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
  66. package/{chunk-HSSBDZLD.js → chunk-EDT65EUE.js} +6 -6
  67. package/{chunk-IAAIUH64.js → chunk-EQZQUQ33.js} +7 -7
  68. package/{chunk-HBRDSQ3M.js → chunk-ESN4WNWU.js} +3 -2
  69. package/{chunk-2YGBI2XB.js → chunk-FE7G6DSP.js} +11 -1
  70. package/{chunk-547ENH5T.js → chunk-FFFKAOJN.js} +4 -4
  71. package/{chunk-5ZUOVCKT.js → chunk-FGHEF6WI.js} +3 -1
  72. package/{chunk-IXG6YXQM.js → chunk-FTWAOKFU.js} +795 -361
  73. package/chunk-GAHJLSDO.js +107 -0
  74. package/{chunk-2X7WFDT6.js → chunk-GX6DITLQ.js} +1 -1
  75. package/{chunk-GYS5FUYR.js → chunk-HCCQEMTK.js} +28 -28
  76. package/{chunk-CMMI3DAT.js → chunk-HZDK56EK.js} +33 -26
  77. package/{chunk-UE2EVEYS.js → chunk-IIOSZAJX.js} +4 -4
  78. package/chunk-IIRJ4P4I.js +24 -0
  79. package/{chunk-QCB42576.js → chunk-IJZC2KIJ.js} +1 -1
  80. package/{chunk-RYOLWYBK.js → chunk-ITBX27W6.js} +97 -21
  81. package/{chunk-VSYTM22R.js → chunk-J2VIGDJN.js} +6 -6
  82. package/{chunk-QBZCGP34.js → chunk-JEWMQR6J.js} +1 -1
  83. package/{chunk-6QHKRARD.js → chunk-JFRJEPFI.js} +29 -5
  84. package/{chunk-S6K5F3KP.js → chunk-JP2BH4NC.js} +1 -1
  85. package/{chunk-MDZWUD3R.js → chunk-JU7VN4LF.js} +38 -29
  86. package/{chunk-RTHFJZ6M.js → chunk-K26XPZRB.js} +2 -2
  87. package/{chunk-ZYKJBRZ3.js → chunk-K7VIXYTZ.js} +1 -3
  88. package/chunk-KK3FCYZM.js +647 -0
  89. package/chunk-KLAMJNKQ.js +33394 -0
  90. package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
  91. package/chunk-KXOPLLFP.js +190 -0
  92. package/{chunk-GOCSSER3.js → chunk-KZ5OD2MO.js} +4 -4
  93. package/{chunk-ILHQ2AXT.js → chunk-KZAT2M2V.js} +14 -8
  94. package/chunk-LHCGKAFO.js +739 -0
  95. package/{chunk-XJPLSAPJ.js → chunk-LMGFVH65.js} +107 -104
  96. package/{chunk-QRGDJA4B.js → chunk-LTVEOOZL.js} +19 -6
  97. package/{chunk-L32W3PRP.js → chunk-MAA42MMV.js} +233 -17
  98. package/{chunk-ATEKLSLR.js → chunk-MTM4LRVG.js} +14 -9
  99. package/chunk-MVOZ22RZ.js +26 -0
  100. package/{chunk-2NPD3FTX.js → chunk-MYYNZG2M.js} +139 -39
  101. package/{chunk-DBUR22G5.js → chunk-MZVCFV3T.js} +19 -15
  102. package/{chunk-K67C2JUC.js → chunk-N74XL3NI.js} +9 -9
  103. package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
  104. package/{chunk-RBPUNSG5.js → chunk-OAZP4TSA.js} +18 -108
  105. package/{chunk-SMJEXX2S.js → chunk-ODBYGVO2.js} +232 -10
  106. package/{chunk-M4SFKP5L.js → chunk-OHUYN3YU.js} +3 -3
  107. package/{chunk-HYLRQDEE.js → chunk-OLGFIQN2.js} +6 -6
  108. package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
  109. package/chunk-P27E22MA.js +203 -0
  110. package/{chunk-BIWI5M4E.js → chunk-PBPXXMWZ.js} +1 -1
  111. package/{chunk-OBSEKCVK.js → chunk-PQ63BDV3.js} +210 -51
  112. package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
  113. package/{chunk-OG6MQOQG.js → chunk-QMNVV3YM.js} +10 -37
  114. package/{chunk-GACR7H6T.js → chunk-R5NRFXGD.js} +5 -5
  115. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  116. package/{chunk-4WVJLODK.js → chunk-RHBD22LV.js} +9 -4
  117. package/{chunk-EXJK7TQO.js → chunk-RMWDKLBE.js} +1520 -562
  118. package/{chunk-TGNIKIHR.js → chunk-RR3MB26M.js} +2 -2
  119. package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
  120. package/{chunk-STJ6LSQE.js → chunk-SCMYAGQE.js} +1135 -712
  121. package/{chunk-YKY4OVOX.js → chunk-SPU3L3OR.js} +17 -170
  122. package/chunk-SR4FE5VD.js +9 -0
  123. package/{chunk-DUUDXSLX.js → chunk-SX6AWTNK.js} +28 -4
  124. package/{chunk-ZH3KXFHS.js → chunk-TMRJGSK2.js} +1 -1
  125. package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
  126. package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
  127. package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
  128. package/{chunk-3U44JB3O.js → chunk-UF6J7NXV.js} +1 -1
  129. package/{chunk-Q3IVPFVO.js → chunk-UHW6SCVK.js} +1 -1
  130. package/chunk-UOUMPHS5.js +103 -0
  131. package/{chunk-HHFGE2WF.js → chunk-UPOW5HTG.js} +5 -5
  132. package/{chunk-DEA37IUY.js → chunk-V4IYI3SB.js} +2 -2
  133. package/{chunk-UWAIJOF2.js → chunk-VKCPKCSS.js} +66 -92
  134. package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
  135. package/{chunk-OBIC6EG7.js → chunk-VUHKG4KS.js} +3 -3
  136. package/{chunk-EEOOBRA7.js → chunk-W3HSD32M.js} +13 -6
  137. package/{chunk-P2ZLUIW2.js → chunk-W6T4FNZP.js} +351 -26
  138. package/chunk-WDWZPASX.js +29 -0
  139. package/chunk-WFGNWWJI.js +326 -0
  140. package/{chunk-R6Z5S5GA.js → chunk-WQDTSK5U.js} +51 -14
  141. package/{chunk-OYU2MA5S.js → chunk-X22AUZKL.js} +152 -167
  142. package/{chunk-4ZGPHFLE.js → chunk-X3OZ655T.js} +2 -2
  143. package/{chunk-NHY322ZU.js → chunk-XCA4WHX5.js} +588 -64
  144. package/{chunk-TI2EPRHE.js → chunk-XJSEST7D.js} +3 -3
  145. package/{chunk-JUSHVFNF.js → chunk-XNTZD4AE.js} +1230 -1356
  146. package/chunk-XSRSAU3O.js +133 -0
  147. package/{chunk-CYWNWA77.js → chunk-Y4NPF2UN.js} +6 -3
  148. package/{chunk-FJSNBZXR.js → chunk-YDRRGVT5.js} +1 -1
  149. package/{chunk-R3NEQZ53.js → chunk-YFW4H6DL.js} +405 -338
  150. package/{chunk-BNMPUQW6.js → chunk-YGDYYFRX.js} +20 -24
  151. package/{chunk-4N6G2CKP.js → chunk-YHNUDTU4.js} +49 -3
  152. package/chunk-YJPK35HB.js +175 -0
  153. package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
  154. package/{chunk-AGYPUBFW.js → chunk-Z7KE4K3H.js} +195 -123
  155. package/{chunk-DGYCDA6W.js → chunk-ZM5AZTQG.js} +20 -13
  156. package/{chunk-CBUZ6DKA.js → chunk-ZQ6K57FJ.js} +1 -1
  157. package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-37ZNEY5Y.js} +9 -9
  158. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
  159. package/{cliLocalAgentRecordReader-M3F76NIP.js → cliLocalAgentRecordReader-MCQVRWBR.js} +59 -47
  160. package/{commandRegistry-ZLWHQVAI.js → commandRegistry-NTH5IAN5.js} +104 -92
  161. package/{contentThunks-4ZX2TO7C.js → contentThunks-SPXTX5U2.js} +38 -36
  162. package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-TIFCHCUN.js} +1 -1
  163. package/{createAgentAutomationAction-L4CYUZJG.js → createAgentAutomationAction-KUQKCOXB.js} +38 -36
  164. package/{createDialogAction-QTU2R2Q3.js → createDialogAction-HJN5U3XS.js} +39 -37
  165. package/{createPageAction-F3GJTHW2.js → createPageAction-ZAHRDOAU.js} +43 -41
  166. package/{db-M7FU2GNK.js → db-CMUTP3W5.js} +2 -2
  167. package/{dbSlice-XRUZOGSU.js → dbSlice-656PMWR2.js} +13 -12
  168. package/{deleteFile-6URDHYRB.js → deleteFile-ZCQESEEQ.js} +10 -7
  169. package/{dialogCommands-NRLCOPJR.js → dialogCommands-KZTZLWPZ.js} +61 -54
  170. package/dialogMessageRecord-OAV77LT7.js +7 -0
  171. package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-PST75COP.js} +11 -11
  172. package/{dialogSlice-P2S4LXQD.js → dialogSlice-BXIERQHO.js} +39 -37
  173. package/{dialogUsageCommand-W2WCSGKF.js → dialogUsageCommand-6RW2FY6K.js} +5 -5
  174. package/{docCreateCommands-YJRDA3RX.js → docCreateCommands-26HJ5NAY.js} +55 -47
  175. package/{docDeleteCommands-A5QIHZNF.js → docDeleteCommands-UAOHH5XK.js} +57 -49
  176. package/{docReadCommands-CF2LTMYH.js → docReadCommands-4ADG7YE6.js} +55 -47
  177. package/{docStore-6O7NYL6A.js → docStore-FZ75HWP2.js} +15 -14
  178. package/{docUpdateCommands-QRKV4ZXE.js → docUpdateCommands-OGFJZENF.js} +55 -47
  179. package/fetchMessages-TQEUZD7H.js +1 -1
  180. package/{getPricing-LF5C4XSI.js → getPricing-FCHYVRJU.js} +4 -4
  181. package/{handleSendMessageAction-7IHLR37A.js → handleSendMessageAction-KP6GGBFY.js} +84 -79
  182. package/{hostCredentialCreate-VNCQUAFT.js → hostCredentialCreate-23TX56G7.js} +119 -105
  183. package/index.js +8 -8
  184. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  185. package/{localDialogRead-CCOCVGAP.js → localDialogRead-CIOTQM5T.js} +1 -1
  186. package/{localRuntimeAdapter-FOWVNMIK.js → localRuntimeAdapter-MTUWOYPN.js} +126 -111
  187. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-TYHQCTZN.js} +5 -3
  188. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-BO7IVWAZ.js} +1 -1
  189. package/{machineCommands-ZGC3J4JB.js → machineCommands-4WJUJQHW.js} +260 -323
  190. package/{machineWsRunDispatch-KK5U4M3G.js → machineWsRunDispatch-V3U4JM67.js} +115 -102
  191. package/markdownToSlate-KIYM7B3P.js +8 -0
  192. package/mcpLocalAuthorizeCommand-TI656UWC.js +106 -0
  193. package/{memberThunks-7Y3OYSJQ.js → memberThunks-JFYC4Z5L.js} +20 -15
  194. package/{models-H5NNZRLH.js → models-EP7VG6N2.js} +2 -2
  195. package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
  196. package/package.json +1 -1
  197. package/{projectArchive-7ZDYBXAX.js → projectArchive-NU2Z5HOR.js} +45 -43
  198. package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-4H7YP5D7.js} +6 -6
  199. package/{providerRegistry-ZI2KORJ7.js → providerRegistry-F3UPOTIY.js} +6 -6
  200. package/{read-TYMBGEXO.js → read-BRZHXUJ6.js} +9 -8
  201. package/{readDocTool-SKQVHBLO.js → readDocTool-N7RVFQEE.js} +1 -1
  202. package/{readlineWorkspace-YHT4SX2C.js → readlineWorkspace-T56MRMS5.js} +6426 -3669
  203. package/rememberExplicit-CPAPONSI.js +15 -0
  204. package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-J7XU7OUX.js} +19 -18
  205. package/{runAgentClientLoop-H4ED5V3K.js → runAgentClientLoop-O2GRCGRZ.js} +97 -75
  206. package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-RDRJXMXC.js} +8 -8
  207. package/{secretCommands-KZWBZIYS.js → secretCommands-2FEMRUFM.js} +3 -3
  208. package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-Q4V2ZZW2.js} +16 -15
  209. package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-742H5S6T.js} +19 -18
  210. package/{settingThunks-ZRGWVGZD.js → settingThunks-T4FXSV6M.js} +185 -66
  211. package/{skillDiscovery-I37M5KJC.js → skillDiscovery-MDDKPTW3.js} +4 -3
  212. package/{spaceCommands-MEH3HJBC.js → spaceCommands-W5TAVFDT.js} +59 -51
  213. package/{streamAgentChatTurn-ZXPOXU33.js → streamAgentChatTurn-OWDJMU5E.js} +238 -178
  214. package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-HLDLHRRA.js} +17 -16
  215. package/{tableCommands-FTAOCBTX.js → tableCommands-44GC4N6J.js} +8 -5
  216. package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
  217. package/{tools-2MRWA2PP.js → tools-O7SGGVA3.js} +67 -62
  218. package/{tuiRestart-2IL37YIB.js → tuiRestart-EOGC2BYY.js} +10 -10
  219. package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-TM5BU73J.js} +16 -15
  220. package/{updateCommands-CPATDG6J.js → updateCommands-FBYA5WVG.js} +3 -3
  221. package/{updateDialogTitleAction-RZ3KZSGQ.js → updateDialogTitleAction-EXSZGTLL.js} +40 -38
  222. package/{usageCommand-2BF74MKF.js → usageCommand-L4OFWXEU.js} +2 -2
  223. package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-7JR33UHS.js} +3 -3
  224. package/webapi-QVV65DQF.js +2487 -0
  225. package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-M4V77OUB.js} +2 -2
  226. package/workContext-Y3ADAPZU.js +14 -0
  227. package/workContextAccess-VU5I4LKZ.js +11 -0
  228. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  229. package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-ZCSQCHG3.js} +2 -2
  230. package/agentListCommands-GUGMORTK.js +0 -1005
  231. package/agentRecordCommands-SLLADS5C.js +0 -175
  232. package/chunk-2WZXXAQD.js +0 -57
  233. package/chunk-5ZMIIR23.js +0 -265
  234. package/chunk-62HXNQVV.js +0 -134
  235. package/chunk-TUSTONB3.js +0 -81
  236. package/chunk-ZXF6D3I6.js +0 -359
  237. package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
  238. /package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
@@ -0,0 +1,326 @@
1
+ // packages/agent-runtime/toolOutputSanitizer.ts
2
+ var SANITIZE_REPLACEMENT_CHAR = "\uFFFD";
3
+ var MAX_CONTROL_SEQUENCE_CHARS = 256;
4
+ var ESC = 27;
5
+ var BEL = 7;
6
+ var LINE_FEED = 10;
7
+ var TAB = 9;
8
+ var DEL = 127;
9
+ var C1_DCS = 144;
10
+ var C1_SOS = 152;
11
+ var C1_CSI = 155;
12
+ var C1_ST = 156;
13
+ var C1_OSC = 157;
14
+ var C1_PM = 158;
15
+ var C1_APC = 159;
16
+ var HIGH_SURROGATE_MIN = 55296;
17
+ var HIGH_SURROGATE_MAX = 56319;
18
+ var LOW_SURROGATE_MIN = 56320;
19
+ var LOW_SURROGATE_MAX = 57343;
20
+ var NEEDS_SANITIZE_RE = new RegExp("[\\u0000-\\u0008\\u000b-\\u001f\\u007f-\\u009f]|\\p{Cs}", "u");
21
+ function isC1Introducer(code) {
22
+ return code === C1_CSI || code === C1_OSC || code === C1_DCS || code === C1_SOS || code === C1_PM || code === C1_APC;
23
+ }
24
+ var UNTERMINATED_SEQUENCE = -1;
25
+ function skipCsiBody(text, start, limit) {
26
+ let i = start;
27
+ while (i < limit) {
28
+ const code = text.charCodeAt(i);
29
+ if (code >= 64 && code <= 126) return i + 1;
30
+ if (code >= 32 && code <= 63) {
31
+ i += 1;
32
+ continue;
33
+ }
34
+ return i;
35
+ }
36
+ return UNTERMINATED_SEQUENCE;
37
+ }
38
+ function skipControlStringBody(text, start, limit) {
39
+ const length = text.length;
40
+ let i = start;
41
+ while (i < limit) {
42
+ const code = text.charCodeAt(i);
43
+ if (code === BEL || code === C1_ST) return i + 1;
44
+ if (code === ESC && i + 1 < length && text.charCodeAt(i + 1) === 92) {
45
+ return Math.min(i + 2, limit);
46
+ }
47
+ i += 1;
48
+ }
49
+ return UNTERMINATED_SEQUENCE;
50
+ }
51
+ function skipEscapeSequence(text, escIndex) {
52
+ const length = text.length;
53
+ const limit = Math.min(length, escIndex + MAX_CONTROL_SEQUENCE_CHARS);
54
+ const leadIndex = escIndex + 1;
55
+ if (leadIndex >= length) return leadIndex;
56
+ const lead = text.charCodeAt(leadIndex);
57
+ if (lead === 91) {
58
+ const csiEnd = skipCsiBody(text, leadIndex + 1, limit);
59
+ return csiEnd === UNTERMINATED_SEQUENCE ? escIndex + 1 : csiEnd;
60
+ }
61
+ if (lead === 93 || lead === 80 || lead === 88 || lead === 94 || lead === 95) {
62
+ const stringEnd = skipControlStringBody(text, leadIndex + 1, limit);
63
+ return stringEnd === UNTERMINATED_SEQUENCE ? escIndex + 1 : stringEnd;
64
+ }
65
+ let j = leadIndex;
66
+ while (j < limit && text.charCodeAt(j) >= 32 && text.charCodeAt(j) <= 47) {
67
+ j += 1;
68
+ }
69
+ if (j < limit) {
70
+ const final = text.charCodeAt(j);
71
+ if (final >= 48 && final <= 126) return j + 1;
72
+ }
73
+ return escIndex + 1;
74
+ }
75
+ function skipC1Sequence(text, index) {
76
+ const limit = Math.min(text.length, index + MAX_CONTROL_SEQUENCE_CHARS);
77
+ const code = text.charCodeAt(index);
78
+ const bodyEnd = code === C1_CSI ? skipCsiBody(text, index + 1, limit) : skipControlStringBody(text, index + 1, limit);
79
+ return bodyEnd === UNTERMINATED_SEQUENCE ? index + 1 : bodyEnd;
80
+ }
81
+ function sanitizeToolOutputText(text) {
82
+ if (typeof text !== "string" || text.length === 0) return text;
83
+ if (!NEEDS_SANITIZE_RE.test(text)) return text;
84
+ const out = [];
85
+ const length = text.length;
86
+ let plainStart = 0;
87
+ let i = 0;
88
+ const dropRange = (end) => {
89
+ if (plainStart < i) out.push(text.slice(plainStart, i));
90
+ i = end;
91
+ plainStart = end;
92
+ };
93
+ while (i < length) {
94
+ const code = text.charCodeAt(i);
95
+ if (code === LINE_FEED || code === TAB) {
96
+ i += 1;
97
+ continue;
98
+ }
99
+ if (code === ESC) {
100
+ dropRange(skipEscapeSequence(text, i));
101
+ continue;
102
+ }
103
+ if (isC1Introducer(code)) {
104
+ dropRange(skipC1Sequence(text, i));
105
+ continue;
106
+ }
107
+ if (code < 32 || code === DEL || code >= 128 && code <= 159) {
108
+ dropRange(i + 1);
109
+ continue;
110
+ }
111
+ if (code >= HIGH_SURROGATE_MIN && code <= HIGH_SURROGATE_MAX) {
112
+ const low = text.charCodeAt(i + 1);
113
+ if (low >= LOW_SURROGATE_MIN && low <= LOW_SURROGATE_MAX) {
114
+ i += 2;
115
+ continue;
116
+ }
117
+ if (plainStart < i) out.push(text.slice(plainStart, i));
118
+ out.push(SANITIZE_REPLACEMENT_CHAR);
119
+ i += 1;
120
+ plainStart = i;
121
+ continue;
122
+ }
123
+ if (code >= LOW_SURROGATE_MIN && code <= LOW_SURROGATE_MAX) {
124
+ if (plainStart < i) out.push(text.slice(plainStart, i));
125
+ out.push(SANITIZE_REPLACEMENT_CHAR);
126
+ i += 1;
127
+ plainStart = i;
128
+ continue;
129
+ }
130
+ i += 1;
131
+ }
132
+ if (plainStart < length) out.push(text.slice(plainStart));
133
+ return out.join("");
134
+ }
135
+ function sanitizeToolOutputContent(content) {
136
+ return typeof content === "string" ? sanitizeToolOutputText(content) : content;
137
+ }
138
+
139
+ // packages/agent-runtime/secretScrubber.ts
140
+ var SECRET_PATTERNS = [
141
+ // 1. PEM 私钥块(高危硬拦截)
142
+ {
143
+ kind: "PRIVATE_KEY",
144
+ placeholder: "[REDACTED:PRIVATE_KEY]",
145
+ regex: /-----BEGIN (?:[A-Z0-9 ]+)?PRIVATE KEY-----[\s\S]+?-----END (?:[A-Z0-9 ]+)?PRIVATE KEY-----/g
146
+ },
147
+ // 2. Anthropic API Key (sk-ant-...)
148
+ {
149
+ kind: "ANTHROPIC_KEY",
150
+ placeholder: "[REDACTED:ANTHROPIC_KEY]",
151
+ regex: /\bsk-ant-[a-zA-Z0-9_\-]{20,}\b/g
152
+ },
153
+ // 3. OpenAI / DeepSeek / 通用 API Key (sk-...)
154
+ {
155
+ kind: "API_KEY",
156
+ placeholder: "[REDACTED:API_KEY]",
157
+ regex: /\bsk-[a-zA-Z0-9_\-]{24,}\b/g
158
+ },
159
+ // 3b. BigModel / 智谱(GLM)API Key:32 位 hex + "." + 16 位字母数字
160
+ // (2026-11 实证:这类 key 没有任何可辨识前缀,此前漏在清洗与入路隔离之外,
161
+ // 用户贴进对话后明文直接进了 prompt / 历史 / 工具日志。)
162
+ {
163
+ kind: "BIGMODEL_KEY",
164
+ placeholder: "[REDACTED:BIGMODEL_KEY]",
165
+ regex: /\b[0-9a-fA-F]{32}\.[A-Za-z0-9]{16}\b/g
166
+ },
167
+ // 4. GitHub 访问令牌 (ghp_..., gho_..., github_pat_...)
168
+ {
169
+ kind: "GITHUB_TOKEN",
170
+ placeholder: "[REDACTED:GITHUB_TOKEN]",
171
+ regex: /\b(?:gh[pousr]_[a-zA-Z0-9]{30,}|github_pat_[a-zA-Z0-9_]{40,})\b/g
172
+ },
173
+ // 5. Bearer Token (JWT / Authorization Bearer)
174
+ {
175
+ kind: "BEARER_TOKEN",
176
+ placeholder: "Bearer [REDACTED:BEARER_TOKEN]",
177
+ regex: /\bBearer\s+[a-zA-Z0-9_\-\.]{25,}\b/gi
178
+ },
179
+ // 6. 常见环境变量或配置中的密码赋值 (PASSWORD=..., PASSWD=...)
180
+ {
181
+ kind: "PASSWORD",
182
+ placeholder: "$1=[REDACTED:PASSWORD]",
183
+ regex: /\b((?:DB_|DATABASE_|ADMIN_|ROOT_|MYSQL_|POSTGRES_)?(?:PASSWORD|PASSWD|SECRET_KEY))\s*=\s*['"]?([^\s'"]{4,})['"]?/gi
184
+ }
185
+ ];
186
+ var QUICK_PROBE_SUBSTRINGS = [
187
+ "sk-",
188
+ "ghp_",
189
+ "gho_",
190
+ "ghu_",
191
+ "ghs_",
192
+ "ghr_",
193
+ "github_pat_",
194
+ "PRIVATE KEY",
195
+ "Bearer ",
196
+ "bearer ",
197
+ "PASSWORD",
198
+ "password",
199
+ "PASSWD",
200
+ "SECRET_KEY"
201
+ ];
202
+ var UNPREFIXED_PROBE_REGEX = /\b[0-9a-fA-F]{32}\.[A-Za-z0-9]{16}\b/;
203
+ function hasPotentialSecrets(text) {
204
+ if (typeof text !== "string" || text.length === 0) return false;
205
+ if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe))) return true;
206
+ return UNPREFIXED_PROBE_REGEX.test(text);
207
+ }
208
+ function scrubSecrets(text) {
209
+ if (typeof text !== "string" || text.length === 0) {
210
+ return { cleaned: text, redactedCount: 0, matchedKinds: [] };
211
+ }
212
+ if (!hasPotentialSecrets(text)) {
213
+ return { cleaned: text, redactedCount: 0, matchedKinds: [] };
214
+ }
215
+ let cleaned = text;
216
+ let redactedCount = 0;
217
+ const matchedKinds = [];
218
+ for (const pattern of SECRET_PATTERNS) {
219
+ pattern.regex.lastIndex = 0;
220
+ const matches = cleaned.match(pattern.regex);
221
+ if (matches && matches.length > 0) {
222
+ redactedCount += matches.length;
223
+ if (!matchedKinds.includes(pattern.kind)) {
224
+ matchedKinds.push(pattern.kind);
225
+ }
226
+ cleaned = cleaned.replace(pattern.regex, pattern.placeholder);
227
+ }
228
+ }
229
+ return { cleaned, redactedCount, matchedKinds };
230
+ }
231
+ function scrubObjectSecrets(val) {
232
+ if (val === null || val === void 0) return val;
233
+ if (typeof val === "string") {
234
+ return scrubSecrets(val).cleaned;
235
+ }
236
+ if (Array.isArray(val)) {
237
+ return val.map((item) => scrubObjectSecrets(item));
238
+ }
239
+ if (typeof val === "object") {
240
+ if (val instanceof Date || val instanceof RegExp) return val;
241
+ const result = {};
242
+ for (const [k, v] of Object.entries(val)) {
243
+ result[k] = scrubObjectSecrets(v);
244
+ }
245
+ return result;
246
+ }
247
+ return val;
248
+ }
249
+
250
+ // packages/ai/agent/toolOutputPolicy.ts
251
+ var PROJECT_INSTRUCTION_MAX_BYTES = 24 * 1024;
252
+ var PROJECT_INSTRUCTION_MAX_CHARS = PROJECT_INSTRUCTION_MAX_BYTES + 2048;
253
+ function isCompleteInstructionOutput(toolName, metadata, content) {
254
+ return (toolName === "readFile" || toolName === "read_file" || toolName === "readWorkspaceFile") && typeof metadata === "object" && metadata !== null && metadata.projectInstruction === true && content.length <= PROJECT_INSTRUCTION_MAX_CHARS;
255
+ }
256
+ var MAX_IN_TURN_TOOL_CONTENT_CHARS = 4e3;
257
+ var LIST_AGENTS_OUTPUT_BUDGET = 30720;
258
+ var LIST_AGENTS_PAGE_BUDGET = LIST_AGENTS_OUTPUT_BUDGET - 1600;
259
+ var DEFAULT_TOOL_OUTPUT_PROFILE = {
260
+ maxChars: MAX_IN_TURN_TOOL_CONTENT_CHARS,
261
+ headRatio: 0.5
262
+ };
263
+ var TOOL_OUTPUT_PROFILES = {
264
+ listAgents: { maxChars: LIST_AGENTS_OUTPUT_BUDGET, headRatio: 0.5, historicalMaxChars: LIST_AGENTS_OUTPUT_BUDGET },
265
+ readFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
266
+ read_file: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
267
+ readWorkspaceFile: { maxChars: 4800, headRatio: 0.68, historicalMaxChars: 4800 },
268
+ globFiles: { maxChars: 2800, headRatio: 0.85 },
269
+ execShell: { maxChars: 4e3, headRatio: 0.35 },
270
+ runCommand: { maxChars: 4e3, headRatio: 0.35 },
271
+ launchProcess: { maxChars: 2800, headRatio: 0.35 },
272
+ editFile: { maxChars: 1200, headRatio: 0.62 },
273
+ writeFile: { maxChars: 1e3, headRatio: 0.62 },
274
+ readPastedText: { maxChars: 4800, headRatio: 0.5, historicalMaxChars: 4800 },
275
+ // loadSkill 内联的是文档正文(SKILL.md 全文),与 readFile 同类,不该因为工具名未登记就退回
276
+ // DEFAULT 的 4000。历史事故(nolo-plan omitted middle)正是 headRatio 0.5 掐掉中段,把
277
+ // 「MUST / 禁止」所在的中段静默省略。取 4800(与 readFile 同级),不激进放大;headRatio 同 DEFAULT。
278
+ loadSkill: { maxChars: 4800, headRatio: 0.5 }
279
+ };
280
+ function resolveToolOutputProfile(toolName) {
281
+ return (toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0) ?? DEFAULT_TOOL_OUTPUT_PROFILE;
282
+ }
283
+ function resolveHistoricalToolContentCap(toolName, historicalMaxChars) {
284
+ const profile = toolName ? TOOL_OUTPUT_PROFILES[toolName] : void 0;
285
+ return profile?.historicalMaxChars !== void 0 ? Math.max(historicalMaxChars, profile.historicalMaxChars) : historicalMaxChars;
286
+ }
287
+ function projectToolMessageContent(input) {
288
+ const { content, toolName } = input;
289
+ if (isCompleteInstructionOutput(toolName, input.metadata, content)) return scrubSecrets(sanitizeToolOutputText(content)).cleaned;
290
+ const maxChars = resolveToolOutputProfile(toolName).maxChars;
291
+ if (content.length <= maxChars) return content;
292
+ return clipToolText(
293
+ content,
294
+ maxChars,
295
+ resolveToolOutputProfile(toolName).headRatio,
296
+ `
297
+ \u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`
298
+ );
299
+ }
300
+ function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool output middle omitted; head/tail preserved ...]\n\n") {
301
+ const normalized = content.replace(/\r\n/g, "\n").trim();
302
+ if (normalized.length <= maxChars) return normalized;
303
+ if (maxChars <= marker.length + 2) return normalized.slice(0, maxChars);
304
+ const available = maxChars - marker.length;
305
+ const headChars = Math.max(1, Math.floor(available * headRatio));
306
+ const tailChars = Math.max(1, available - headChars);
307
+ return `${normalized.slice(0, headChars)}${marker}${normalized.slice(-tailChars)}`;
308
+ }
309
+
310
+ export {
311
+ sanitizeToolOutputText,
312
+ sanitizeToolOutputContent,
313
+ SECRET_PATTERNS,
314
+ hasPotentialSecrets,
315
+ scrubSecrets,
316
+ scrubObjectSecrets,
317
+ PROJECT_INSTRUCTION_MAX_BYTES,
318
+ PROJECT_INSTRUCTION_MAX_CHARS,
319
+ isCompleteInstructionOutput,
320
+ LIST_AGENTS_OUTPUT_BUDGET,
321
+ LIST_AGENTS_PAGE_BUDGET,
322
+ resolveToolOutputProfile,
323
+ resolveHistoricalToolContentCap,
324
+ projectToolMessageContent,
325
+ clipToolText
326
+ };
@@ -8,11 +8,13 @@ import {
8
8
  noloUploadRequest,
9
9
  noloWriteRequest,
10
10
  syncWithServers
11
- } from "./chunk-7Z6EW7AH.js";
11
+ } from "./chunk-6XVPMGXK.js";
12
12
  import {
13
13
  getAllServers,
14
- getIsDesktopApp
15
- } from "./chunk-4N6G2CKP.js";
14
+ getIsDesktopApp,
15
+ googleSessionServer,
16
+ scopeGoogleSessionServers
17
+ } from "./chunk-YHNUDTU4.js";
16
18
  import {
17
19
  selectIdentityToken,
18
20
  selectIdentityUser,
@@ -88,8 +90,8 @@ var selectRuntimeSnapshot = createSelector(
88
90
  (currentToken, currentUserId, currentServer, syncServers, localRuntimeOrigin) => ({
89
91
  currentToken,
90
92
  currentUserId,
91
- currentServer,
92
- syncServers,
93
+ currentServer: googleSessionServer(currentToken, currentServer) ?? currentServer,
94
+ syncServers: googleSessionServer(currentToken, currentServer) === void 0 ? syncServers : [],
93
95
  localRuntimeOrigin
94
96
  })
95
97
  );
@@ -99,7 +101,7 @@ var selectRuntimeCurrentServer = createSelector(
99
101
  );
100
102
  var selectRuntimeRemoteServers = createSelector(
101
103
  [selectRuntimeSnapshot],
102
- (runtime) => getAllServers(runtime.currentServer, runtime.syncServers)
104
+ (runtime) => scopeGoogleSessionServers(runtime.currentToken, runtime.currentServer, getAllServers(runtime.currentServer, runtime.syncServers))
103
105
  );
104
106
 
105
107
  // packages/database/runtimeServerContext.ts
@@ -116,11 +118,11 @@ var getRuntimeServerContext = (state, preferredServerOrigin) => {
116
118
  currentServer,
117
119
  syncServers,
118
120
  userAuthorityRegistry: resolveRuntimeUserAuthorityRegistry(state),
119
- remoteServers: getAllServers(
121
+ remoteServers: scopeGoogleSessionServers(currentToken, currentServer, getAllServers(
120
122
  currentServer,
121
123
  syncServers,
122
124
  preferredServerOrigin
123
- )
125
+ ))
124
126
  };
125
127
  };
126
128
  var resolveRuntimeUserAuthorityRegistry = (state) => {
@@ -173,6 +175,18 @@ var resolveCandidateOwnerFromKeyRemainder = (remainder, candidateOwnerUserIds) =
173
175
  }
174
176
  return null;
175
177
  };
178
+ var isMalformedAgentAutomationKey = (dbKey) => {
179
+ const normalized = cleanSegment(dbKey);
180
+ if (!normalized) return false;
181
+ if (normalized !== "agent-automation" && !normalized.startsWith("agent-automation-")) {
182
+ return false;
183
+ }
184
+ const parts = normalized.split("-");
185
+ if (parts[2] === "owner" && parts[3] === "idx") {
186
+ return parts.length < 5 || !cleanSegment(parts[4]) || !cleanSegment(parts[parts.length - 1]);
187
+ }
188
+ return parts.length < 4 || !cleanSegment(parts[2]) || !cleanSegment(parts[parts.length - 1]);
189
+ };
176
190
  var parseOwnerUserIdFromDbKey = (dbKey, options = {}) => {
177
191
  const normalized = cleanSegment(dbKey);
178
192
  if (!normalized) return null;
@@ -187,6 +201,29 @@ var parseOwnerUserIdFromDbKey = (dbKey, options = {}) => {
187
201
  }
188
202
  return null;
189
203
  }
204
+ if (prefix === "agent" && parts[1] === "automation") {
205
+ if (isMalformedAgentAutomationKey(normalized)) return null;
206
+ if (parts[2] === "owner" && parts[3] === "idx") {
207
+ const ownerAndRest3 = parts.slice(4).join("-");
208
+ const candidateOwner3 = resolveCandidateOwnerFromKeyRemainder(
209
+ ownerAndRest3,
210
+ options.candidateOwnerUserIds
211
+ );
212
+ if (candidateOwner3) return candidateOwner3;
213
+ const ownerUserId3 = cleanSegment(parts[4]);
214
+ if (!ownerUserId3 || PUBLIC_OWNER_SENTINELS.has(ownerUserId3)) return null;
215
+ return ownerUserId3;
216
+ }
217
+ const ownerAndRest2 = parts.slice(2).join("-");
218
+ const candidateOwner2 = resolveCandidateOwnerFromKeyRemainder(
219
+ ownerAndRest2,
220
+ options.candidateOwnerUserIds
221
+ );
222
+ if (candidateOwner2) return candidateOwner2;
223
+ const ownerUserId2 = cleanSegment(parts[2]);
224
+ if (!ownerUserId2 || PUBLIC_OWNER_SENTINELS.has(ownerUserId2)) return null;
225
+ return ownerUserId2;
226
+ }
190
227
  if (prefix === "dialog") {
191
228
  const messageSeparator = normalized.lastIndexOf("-msg-");
192
229
  if (messageSeparator !== -1) {
@@ -585,11 +622,11 @@ var resolveAuthorityReplicationServers = ({
585
622
  if (isDeviceLocalOwnerId(authority.ownerUserId) || isDeviceLocalOwnerId(record?.userId) || isDeviceLocalDbKey(dbKey)) {
586
623
  return [];
587
624
  }
588
- return planAuthorityReadServers({
625
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, planAuthorityReadServers({
589
626
  allServers,
590
627
  authorityServer: preferredServerOrigin ?? authority.authorityServer,
591
628
  serverOrigin: authority.serverOrigin
592
- });
629
+ }));
593
630
  };
594
631
  var scheduleWriteReplication = (servers, request, state) => {
595
632
  if (servers.length === 0) return null;
@@ -680,17 +717,17 @@ var resolveUploadReplicationServers = ({
680
717
  userAuthorityRegistry: state?.settings?.userAuthorityRegistry ?? selectIdentityUser(state)?.authorityRegistry
681
718
  });
682
719
  if (authority.ownerUserId || authority.authorityServer) {
683
- return planAuthorityReadServers({
720
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, planAuthorityReadServers({
684
721
  allServers,
685
722
  authorityServer: authority.authorityServer,
686
723
  serverOrigin: authority.serverOrigin
687
- });
724
+ }));
688
725
  }
689
- return resolveTenantReplicationServers({
726
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, resolveTenantReplicationServers({
690
727
  currentServer,
691
728
  syncServers,
692
729
  tenantId
693
- });
730
+ }));
694
731
  };
695
732
  var scheduleExistingRecordReplication = ({
696
733
  currentServer,