nolo-cli 0.107.0-alpha.4 → 0.107.1

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 (211) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-UDCSOTD2.js → _executeModel-M573MKVE.js} +78 -70
  3. package/action-GVA5ARSJ.js +20 -0
  4. package/{addContentAction-MB2HHMDZ.js → addContentAction-M2WOWZCL.js} +13 -12
  5. package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-QMAQ5Z6N.js} +19 -20
  6. package/{agentDeleteCommand-OWYHN6D6.js → agentDeleteCommand-ZFHYRHBS.js} +118 -43
  7. package/{agentEmailCommands-AU5I4M4W.js → agentEmailCommands-X6AVPIVQ.js} +100 -90
  8. package/agentListCommands-PAD2CI2I.js +741 -0
  9. package/{agentMachineCommands-YMNME2L6.js → agentMachineCommands-UPH6RJCC.js} +50 -46
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-CMVTBY5X.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-UMACPRAF.js +138 -0
  13. package/agentRunCommand-H6KKHHMU.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-N4YGKL7M.js} +44 -40
  16. package/{agentSlice-R7PR6KYM.js → agentSlice-2LPP43XH.js} +15 -14
  17. package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-7DAF33AM.js} +46 -42
  18. package/{appDeployCommands-UTB76XFM.js → appDeployCommands-ZPZSMFGZ.js} +46 -42
  19. package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-FWBDSSS5.js} +46 -42
  20. package/{appGetCommands-PX2BFHOB.js → appGetCommands-SZZOHGEP.js} +46 -42
  21. package/{appListCommands-BSMPTWKC.js → appListCommands-FPMUBDPM.js} +46 -42
  22. package/{authCommand-YW42YZA4.js → authCommand-VL3G26NQ.js} +119 -25
  23. package/{authCommands-RGOGCPP6.js → authCommands-5RTUDYZW.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-ZK4K67Y5.js} +11 -9
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-AU5ZJXBG.js} +289 -37
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-ZYTCMNHG.js} +156 -22
  27. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  28. package/{chunk-HVURBGF3.js → chunk-2U3NHADM.js} +6 -6
  29. package/{chunk-QTGQ2LTL.js → chunk-3DQY5IFB.js} +6 -10
  30. package/{chunk-XT35TTFG.js → chunk-3IXAHOJS.js} +19 -21
  31. package/{chunk-UVA7OYO3.js → chunk-3W67RV75.js} +29 -9
  32. package/chunk-4LCOCOR5.js +50 -0
  33. package/{chunk-JPGCXHNM.js → chunk-4LKMZ3RR.js} +1 -1
  34. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  35. package/{chunk-6D6VBVEW.js → chunk-4W24JM32.js} +80 -14
  36. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  37. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  38. package/{chunk-C3M4465B.js → chunk-5HYJ3DSZ.js} +404 -659
  39. package/chunk-5MMAK75Q.js +15 -0
  40. package/{chunk-7S4YWN7P.js → chunk-5UUIGN6I.js} +4 -4
  41. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  42. package/{chunk-4MK3I7Y4.js → chunk-6MAW4XOF.js} +5 -5
  43. package/{chunk-3UZPUAES.js → chunk-74PPKIY2.js} +1 -1
  44. package/chunk-76HO2DP6.js +15 -0
  45. package/{chunk-ASIFZ2WY.js → chunk-7BBP7ZX3.js} +66 -54
  46. package/{chunk-VLTIYV3X.js → chunk-7I25CBT5.js} +34 -8
  47. package/{chunk-IBOZNTG2.js → chunk-7X5XZ34C.js} +23 -28
  48. package/chunk-AGIM7IMJ.js +147 -0
  49. package/{chunk-5UTFL4QJ.js → chunk-APO5TOXO.js} +1 -1
  50. package/{chunk-EEGDMATE.js → chunk-AZOVPTL6.js} +91 -81
  51. package/{chunk-6OZ36FXI.js → chunk-BIPGGSJS.js} +22 -4
  52. package/{chunk-EYAQT56M.js → chunk-BNQMNUKZ.js} +9 -6
  53. package/{chunk-62CATUYY.js → chunk-CBUMFIFE.js} +834 -962
  54. package/{chunk-OIVSQH2O.js → chunk-CDEEFJXN.js} +308 -11
  55. package/chunk-CHOZJMJS.js +78 -0
  56. package/{chunk-ETI2NYVF.js → chunk-CIP3AAMT.js} +4 -4
  57. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  58. package/{chunk-W7HLWAQ7.js → chunk-DE45KZNH.js} +118 -90
  59. package/{chunk-Q554LLSI.js → chunk-DMXLXZKL.js} +1 -1
  60. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  61. package/{chunk-HKNXJGEC.js → chunk-ECFHBYUW.js} +85 -50
  62. package/{chunk-ACTMNVHM.js → chunk-EHSYSKXV.js} +1 -1
  63. package/{chunk-WV42OMV7.js → chunk-ELUDRSRD.js} +8 -8
  64. package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
  65. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  66. package/{chunk-BFDFRLLQ.js → chunk-EZ4VZHAG.js} +5 -5
  67. package/{chunk-GO3Z72MT.js → chunk-FHLMQIU7.js} +65 -95
  68. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  69. package/{chunk-SH43IESU.js → chunk-GGC55Q32.js} +199 -29
  70. package/chunk-GMZLP5DV.js +82 -0
  71. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  72. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  73. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  74. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  75. package/{chunk-BNGW5ASC.js → chunk-I2RGRVQ7.js} +22 -2
  76. package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
  77. package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
  78. package/{chunk-GQBOR3G6.js → chunk-JBKHQOYK.js} +8 -4
  79. package/{chunk-XD2MJFUG.js → chunk-JEFXP73H.js} +1 -1
  80. package/{chunk-PBA4UJBK.js → chunk-JIXGJTBU.js} +4 -4
  81. package/{chunk-AEOE4Z6Q.js → chunk-K6L5PNXK.js} +39 -15
  82. package/{chunk-Z77CRGTW.js → chunk-KA5O5KQL.js} +1 -1
  83. package/{chunk-GPCZ7UXG.js → chunk-KD6D6BLA.js} +1 -1
  84. package/{chunk-4CR5I7BD.js → chunk-KFWDYYSS.js} +47 -67
  85. package/{chunk-UZGQNTVW.js → chunk-KHKTDMYG.js} +8 -6
  86. package/{chunk-JDPFV2JV.js → chunk-KWUKOQM2.js} +20 -11
  87. package/{chunk-MRIHM22T.js → chunk-LBFL6RZG.js} +58 -9
  88. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  89. package/{chunk-DHDMC6FO.js → chunk-LUBFABMJ.js} +15 -14
  90. package/{chunk-NA35QHCF.js → chunk-LVBFKW65.js} +1 -1
  91. package/chunk-LWLNLZC5.js +265 -0
  92. package/chunk-N4NGJDT6.js +929 -0
  93. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  94. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  95. package/chunk-NWENLDMM.js +42 -0
  96. package/chunk-O7SVKKLY.js +875 -0
  97. package/chunk-OCZKATRC.js +129 -0
  98. package/{chunk-6Z7MY3V7.js → chunk-OEJLGVBL.js} +5 -5
  99. package/{chunk-VMFTFOWF.js → chunk-OKGVNZTL.js} +35 -8
  100. package/{chunk-GEPUP7OO.js → chunk-OR2UWD6X.js} +3 -3
  101. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  102. package/{chunk-J4MOO56S.js → chunk-PNXHPLRU.js} +10 -2
  103. package/{chunk-3BMYXEUW.js → chunk-R5AJODNI.js} +1 -1
  104. package/{chunk-P5EVSOPA.js → chunk-R6EBQEQE.js} +22 -29
  105. package/chunk-RQ6CTX2E.js +164 -0
  106. package/{chunk-MS7TSPZR.js → chunk-RU36ZYSG.js} +19 -17
  107. package/{chunk-ALXHV7NK.js → chunk-RWXLPUKI.js} +40 -4
  108. package/{chunk-KQ4ONNQD.js → chunk-RXA3HAVW.js} +190 -8
  109. package/{chunk-IIVGDG4I.js → chunk-SJKULPGX.js} +13 -7
  110. package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
  111. package/{chunk-JRQFUXY7.js → chunk-TBAXFWOS.js} +99 -22
  112. package/{chunk-PQFHGD77.js → chunk-TBM2RS3U.js} +161 -14
  113. package/{chunk-NOF3HDSN.js → chunk-TFOIJFCM.js} +11 -9
  114. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  115. package/chunk-TY3TIUJK.js +89 -0
  116. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  117. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  118. package/chunk-UM7TA3K4.js +1008 -0
  119. package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
  120. package/{chunk-GL3EHUR4.js → chunk-VHGYUYQ3.js} +69 -47
  121. package/chunk-VIWDGTDA.js +8 -0
  122. package/chunk-VJVNU77E.js +83 -0
  123. package/chunk-VM6IE2GN.js +8004 -0
  124. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  125. package/chunk-VZLO4XJD.js +17 -0
  126. package/chunk-W32HPLTL.js +13692 -0
  127. package/{chunk-AHAHBQMU.js → chunk-WDLSZMTA.js} +2 -2
  128. package/{chunk-53HEEOTT.js → chunk-WF5X57VW.js} +83 -16
  129. package/{chunk-VRTTFDBM.js → chunk-WPHY3VPF.js} +35 -22
  130. package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
  131. package/chunk-YV25TM3R.js +780 -0
  132. package/chunk-ZRAU6T47.js +56 -0
  133. package/{chunk-IBOOZVVD.js → chunk-ZTKZZY2A.js} +851 -279
  134. package/commandRegistry-ASW6IVZ3.js +833 -0
  135. package/{contentThunks-IV2T3EJC.js → contentThunks-4XNVOIR7.js} +39 -36
  136. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  137. package/{createAgentAutomationAction-JCOIEYY4.js → createAgentAutomationAction-NHHTCJMC.js} +40 -37
  138. package/createDialogAction-XEBTHDB3.js +70 -0
  139. package/{createPageAction-D2VOOLP3.js → createPageAction-VR3WW2AQ.js} +47 -43
  140. package/{chunk-FG3HKPQP.js → cursorProvider-YGGNMVWX.js} +2751 -10185
  141. package/{dbSlice-A6C6H32X.js → dbSlice-TG4MZ5EB.js} +12 -11
  142. package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
  143. package/{dialogCommands-H7FPUYUQ.js → dialogCommands-FJWQG3MX.js} +50 -47
  144. package/{dialogSlice-6JZOOTDS.js → dialogSlice-GVRDGCRG.js} +57 -37
  145. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  146. package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-AZSK4NAG.js} +48 -44
  147. package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-DDJMSMFZ.js} +49 -45
  148. package/{docReadCommands-WJN3WT6O.js → docReadCommands-5F5Q6EBZ.js} +47 -43
  149. package/{docStore-HUPQ2FSS.js → docStore-SUZUUWDI.js} +17 -13
  150. package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-XPNPVZOC.js} +48 -44
  151. package/{fetchMessages-EIU7UFFK.js → fetchMessages-3PXAHKCR.js} +5 -5
  152. package/{getPricing-LUSEABA6.js → getPricing-DOBBZLOK.js} +4 -4
  153. package/{handleSendMessageAction-DFPMQ7YM.js → handleSendMessageAction-VC6VTFKS.js} +109 -42
  154. package/index.js +87 -884
  155. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  156. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-UYCKO7YZ.js} +2 -2
  157. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  158. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  159. package/{machineCommands-M2T2I5NF.js → machineCommands-M634V2L3.js} +98 -89
  160. package/machineWsRunDispatch-Z3HUSTFI.js +154 -0
  161. package/{memberThunks-P2ECUJ56.js → memberThunks-5S5D3N4U.js} +20 -18
  162. package/{models-T3SG6MJ5.js → models-PQU25T6Q.js} +2 -2
  163. package/oauthTokenStore-ITEB663N.js +23 -0
  164. package/package.json +1 -1
  165. package/processSpawn-SOAV3FEV.js +11 -0
  166. package/profileConfig-ZGOFORWV.js +43 -0
  167. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-HAQWVAQX.js} +7 -7
  168. package/{providerRegistry-757OWH3O.js → providerRegistry-5FGWB3X5.js} +11 -7
  169. package/{read-COE3ZYR6.js → read-LSYFLSIM.js} +8 -7
  170. package/{readDocTool-5USN4A6V.js → readDocTool-XWRXV3DR.js} +5 -3
  171. package/{readlineWorkspace-XQRDGWRZ.js → readlineWorkspace-J3YD3DNW.js} +2596 -2032
  172. package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-4TEFC3VL.js} +22 -26
  173. package/{runAgentClientLoop-5ZA62FBA.js → runAgentClientLoop-APSMCLAF.js} +79 -72
  174. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  175. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  176. package/{setDialogExtraReferencesAction-WX5VTY6O.js → setDialogExtraReferencesAction-LSEN44OY.js} +16 -14
  177. package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-SR366X5A.js} +23 -27
  178. package/{chunk-GP5LKBUZ.js → settingThunks-CTVPPGIN.js} +226 -940
  179. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  180. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  181. package/{spaceCommands-5GLCWZPO.js → spaceCommands-3UK63WPE.js} +51 -47
  182. package/{streamAgentChatTurn-6UZJMYRB.js → streamAgentChatTurn-DNY2PSRW.js} +215 -115
  183. package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-M6NAFOOU.js} +19 -20
  184. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  185. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-AD7CXTA4.js} +4 -3
  186. package/tools-X5UWATZK.js +117 -0
  187. package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-DEH7ZEM6.js} +25 -23
  188. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  189. package/{updateDialogTitleAction-QTKNIURB.js → updateDialogTitleAction-YSY5BF5A.js} +84 -45
  190. package/action-P4TNFGAD.js +0 -31
  191. package/agentListCommands-B2V4YAC4.js +0 -410
  192. package/agentRecordCommands-G4KK4R7H.js +0 -128
  193. package/agentRunCommand-UTZJA23G.js +0 -156
  194. package/browser-image-compression-MFDTD7K6.js +0 -1763
  195. package/chatQueueReduxAdapter-2P6NFX64.js +0 -186
  196. package/chunk-CQ3WA2NE.js +0 -299
  197. package/chunk-M76ECQRD.js +0 -13658
  198. package/chunk-MEYIRKDN.js +0 -8967
  199. package/chunk-PUOC4YRO.js +0 -394
  200. package/chunk-Q5FJJ6XI.js +0 -103
  201. package/chunk-S7Z2HMCN.js +0 -25
  202. package/chunk-T75QD6AB.js +0 -20923
  203. package/chunk-Y5GCAMGP.js +0 -9
  204. package/chunk-YPREESF4.js +0 -225
  205. package/createDialogAction-NGG7YVNU.js +0 -65
  206. package/machineWsRunDispatch-ISBKOOD7.js +0 -144
  207. package/settingSlice-P4ZW7K5X.js +0 -204
  208. package/syncMapping-N6RGXGBW.js +0 -437
  209. package/tools-KMGFWO43.js +0 -110
  210. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  211. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -5,13 +5,10 @@ import {
5
5
  isRecord
6
6
  } from "./chunk-KUG52IAP.js";
7
7
 
8
- // packages/desktop-chrome-connector/chromeConnector.ts
9
- import { existsSync as existsSync2, readFileSync } from "node:fs";
10
- import { resolve as resolve2 } from "node:path";
11
-
12
8
  // packages/desktop-chrome-connector/uploadSecurity.mjs
13
- import { existsSync, realpathSync, statSync } from "node:fs";
14
- import { isAbsolute, relative, resolve } from "node:path";
9
+ import { existsSync, lstatSync, mkdirSync, realpathSync, statSync } from "node:fs";
10
+ import { homedir } from "node:os";
11
+ import { isAbsolute, join, relative, resolve } from "node:path";
15
12
  var DEFAULT_MAX_FILE_BYTES = 25 * 1024 * 1024;
16
13
  var DEFAULT_MAX_FILES = 10;
17
14
  var UploadSecurityError = class extends Error {
@@ -28,22 +25,106 @@ function isSubpath(parent, child) {
28
25
  const rel = relative(parent, child);
29
26
  return !rel.startsWith("..") && !isAbsolute(rel);
30
27
  }
31
- function parseAllowedRoots(env = process.env) {
32
- const raw = env?.NOLO_CHROME_UPLOAD_ROOTS;
33
- if (!raw || typeof raw !== "string") {
34
- return [];
28
+ var DEFAULT_UPLOAD_ROOT_SUFFIX = join(".nolo", "uploads");
29
+ function resolveDefaultUploadRoot(env = process.env) {
30
+ let home;
31
+ try {
32
+ home = env?.HOME || homedir();
33
+ } catch (err) {
34
+ throw createUploadSecurityError(
35
+ "path_not_allowed",
36
+ `Could not determine the home directory for the default upload root: ${err instanceof Error ? err.message : String(err)}`
37
+ );
35
38
  }
36
- return raw.split(",").map((entry) => entry.trim()).filter(Boolean).filter((entry) => isAbsolute(entry)).map((entry) => {
37
- const resolved = resolve(entry);
38
- if (existsSync(resolved)) {
39
+ if (typeof home !== "string" || !isAbsolute(home)) {
40
+ throw createUploadSecurityError(
41
+ "path_not_allowed",
42
+ `Home directory '${String(home)}' must be an absolute path to derive the default upload root '${DEFAULT_UPLOAD_ROOT_SUFFIX}'.`
43
+ );
44
+ }
45
+ return resolve(join(home, DEFAULT_UPLOAD_ROOT_SUFFIX));
46
+ }
47
+ function splitConfiguredRoots(raw) {
48
+ const entries = typeof raw === "string" ? raw.split(",").map((entry) => entry.trim()).filter(Boolean) : [];
49
+ const absolute = [];
50
+ const dropped = [];
51
+ for (const entry of entries) {
52
+ (isAbsolute(entry) ? absolute : dropped).push(entry);
53
+ }
54
+ return { absolute, dropped };
55
+ }
56
+ function resolveUploadRoots(env = process.env) {
57
+ const raw = env?.NOLO_CHROME_UPLOAD_ROOTS;
58
+ if (raw !== void 0) {
59
+ const { absolute, dropped } = splitConfiguredRoots(raw);
60
+ const roots = absolute.map((entry) => {
61
+ const resolved = resolve(entry);
62
+ if (!existsSync(resolved)) {
63
+ return resolved;
64
+ }
39
65
  try {
40
66
  return realpathSync(resolved);
41
67
  } catch {
42
68
  return resolved;
43
69
  }
70
+ });
71
+ return { configured: true, isDefault: false, roots, dropped };
72
+ }
73
+ const defaultDir = resolveDefaultUploadRoot(env);
74
+ return {
75
+ configured: false,
76
+ isDefault: true,
77
+ roots: [existsSync(defaultDir) ? inspectDefaultUploadRoot(defaultDir) : defaultDir],
78
+ dropped: []
79
+ };
80
+ }
81
+ function ensureDefaultUploadRoot(env = process.env) {
82
+ if (env?.NOLO_CHROME_UPLOAD_ROOTS !== void 0) {
83
+ return resolveUploadRoots(env);
84
+ }
85
+ const defaultDir = resolveDefaultUploadRoot(env);
86
+ if (!existsSync(defaultDir)) {
87
+ try {
88
+ mkdirSync(defaultDir, { recursive: true, mode: 448 });
89
+ } catch (err) {
90
+ throw createUploadSecurityError(
91
+ "path_not_allowed",
92
+ `Default upload root '${defaultDir}' could not be created: ${err instanceof Error ? err.message : String(err)}`
93
+ );
44
94
  }
45
- return resolved;
46
- });
95
+ }
96
+ return { configured: false, isDefault: true, roots: [inspectDefaultUploadRoot(defaultDir)], dropped: [] };
97
+ }
98
+ function inspectDefaultUploadRoot(defaultDir) {
99
+ let lst;
100
+ try {
101
+ lst = lstatSync(defaultDir);
102
+ } catch (err) {
103
+ throw createUploadSecurityError(
104
+ "path_not_allowed",
105
+ `Default upload root '${defaultDir}' could not be inspected: ${err instanceof Error ? err.message : String(err)}`
106
+ );
107
+ }
108
+ if (lst.isSymbolicLink()) {
109
+ throw createUploadSecurityError(
110
+ "path_not_allowed",
111
+ `Default upload root '${defaultDir}' is a symbolic link, which is not permitted. Set NOLO_CHROME_UPLOAD_ROOTS to the real directory if you need a custom location.`
112
+ );
113
+ }
114
+ if (!lst.isDirectory()) {
115
+ throw createUploadSecurityError(
116
+ "path_not_allowed",
117
+ `Default upload root '${defaultDir}' is not a directory.`
118
+ );
119
+ }
120
+ try {
121
+ return realpathSync(defaultDir);
122
+ } catch (err) {
123
+ throw createUploadSecurityError(
124
+ "path_not_allowed",
125
+ `Default upload root '${defaultDir}' canonical path could not be resolved: ${err instanceof Error ? err.message : String(err)}`
126
+ );
127
+ }
47
128
  }
48
129
  function validateUploadFiles(options = {}) {
49
130
  const {
@@ -61,11 +142,14 @@ function validateUploadFiles(options = {}) {
61
142
  `Too many files: ${files.length} provided, maximum allowed is ${maxFiles}.`
62
143
  );
63
144
  }
64
- const allowedRoots = parseAllowedRoots(env);
145
+ const rootsInfo = ensureDefaultUploadRoot(env);
146
+ const allowedRoots = rootsInfo.roots;
65
147
  if (allowedRoots.length === 0) {
148
+ const dropped = rootsInfo.dropped ?? [];
149
+ const droppedHint = dropped.length ? ` Ignored entries: ${dropped.map((entry) => `'${entry}'`).join(", ")} (only absolute paths are accepted; '~' and relative paths are never expanded).` : "";
66
150
  throw createUploadSecurityError(
67
151
  "path_not_allowed",
68
- "Upload roots not configured in NOLO_CHROME_UPLOAD_ROOTS; all uploads are refused."
152
+ `NOLO_CHROME_UPLOAD_ROOTS is set but contains no usable absolute path; all uploads are refused.${droppedHint}`
69
153
  );
70
154
  }
71
155
  const fileStats = [];
@@ -135,8 +219,29 @@ function logUploadAudit(entry, logFn = console.warn) {
135
219
  }
136
220
 
137
221
  // packages/desktop-chrome-connector/chromeConnector.ts
222
+ import { existsSync as existsSync2, readFileSync } from "node:fs";
223
+ import { resolve as resolve2 } from "node:path";
138
224
  var NOLO_CHROME_CONNECTOR_EXTENSION_ID = "ahpdoopadkamnglhlacfjdfnonpjdplg";
225
+ var NOLO_FIREFOX_CONNECTOR_EXTENSION_ID = "nolo-browser-connector@nolo.chat";
226
+ var NOLO_CONNECTOR_EXTENSION_IDS = [
227
+ NOLO_CHROME_CONNECTOR_EXTENSION_ID,
228
+ NOLO_FIREFOX_CONNECTOR_EXTENSION_ID
229
+ ];
139
230
  var NOLO_CHROME_CONNECTOR_PROTOCOL_VERSION = "2";
231
+ var NOLO_CHROME_CONNECTOR_DEFAULT_PORTS = {
232
+ chrome: 38947,
233
+ firefox: 38948
234
+ };
235
+ var CONNECTOR_BROWSER_EXTENSION_IDS = {
236
+ chrome: NOLO_CHROME_CONNECTOR_EXTENSION_ID,
237
+ firefox: NOLO_FIREFOX_CONNECTOR_EXTENSION_ID
238
+ };
239
+ function connectorEndpointForBrowser(browser, env = process.env) {
240
+ const explicitUrl = env.NOLO_CHROME_CONNECTOR_RPC_URL;
241
+ if (explicitUrl) return explicitUrl;
242
+ const port = browser === "firefox" ? env.NOLO_FIREFOX_CONNECTOR_PORT : env.NOLO_CHROME_CONNECTOR_PORT;
243
+ return `http://127.0.0.1:${port || NOLO_CHROME_CONNECTOR_DEFAULT_PORTS[browser]}/rpc`;
244
+ }
140
245
  function defaultTokenPath() {
141
246
  return resolve2(
142
247
  process.env.HOME || "",
@@ -149,6 +254,18 @@ function readConnectorToken(tokenPath = defaultTokenPath()) {
149
254
  return readFileSync(tokenPath, "utf8").trim();
150
255
  }
151
256
  var CHROME_TOOL_ACTIONS = {
257
+ browser_list_tabs: "list_tabs",
258
+ browser_open_tab: "open_tab",
259
+ browser_close_tab: "close_tab",
260
+ browser_read_page: "read_page",
261
+ browser_click_element: "click",
262
+ browser_type: "type",
263
+ browser_press: "press",
264
+ browser_scroll: "scroll",
265
+ browser_screenshot: "screenshot",
266
+ browser_read_console: "read_console",
267
+ browser_read_network: "read_network",
268
+ // Legacy aliases (kept for existing agents/tests).
152
269
  chrome_list_tabs: "list_tabs",
153
270
  chrome_open_tab: "open_tab",
154
271
  chrome_close_tab: "close_tab",
@@ -164,6 +281,12 @@ var CHROME_TOOL_ACTIONS = {
164
281
  chrome_upload_file: "set_files",
165
282
  chrome_upload: "set_files"
166
283
  };
284
+ for (const legacyName of ["chrome_set_files", "chrome_upload_file", "chrome_upload"]) {
285
+ const action = CHROME_TOOL_ACTIONS[legacyName];
286
+ if (action) {
287
+ CHROME_TOOL_ACTIONS[`browser_${legacyName.slice("chrome_".length)}`] = action;
288
+ }
289
+ }
167
290
  function createConnectorError(code, message, details) {
168
291
  const error = new Error(message);
169
292
  error.code = code;
@@ -183,9 +306,13 @@ function parseArguments(raw) {
183
306
  }
184
307
  }
185
308
  function errorPayload(error) {
309
+ const code = error?.code ?? "CHROME_CONNECTOR_ERROR";
186
310
  return {
187
- code: error?.code ?? "CHROME_CONNECTOR_ERROR",
311
+ code,
188
312
  message: toErrorMessage(error),
313
+ ...code === "CHROME_CONNECTOR_UNAVAILABLE" ? {
314
+ hint: "The Nolo Browser Connector is not reachable. It runs inside the user's own Chrome or Firefox \u2014 ask the user to open their browser with the Nolo Browser Connector extension enabled, or install it from https://nolo.chat/downloads (Firefox can install the signed .xpi directly), then retry."
315
+ } : {},
189
316
  ...error?.details !== void 0 ? { details: error.details } : {}
190
317
  };
191
318
  }
@@ -198,7 +325,7 @@ function validateChromeConnectorPayload(action, payload) {
198
325
  if (!tabId) {
199
326
  throw createConnectorError(
200
327
  "TAB_ID_REQUIRED",
201
- `Provide the tabId from chrome_list_tabs before calling ${action}.`
328
+ `Provide the tabId from browser_list_tabs before calling ${action}.`
202
329
  );
203
330
  }
204
331
  if (!TARGET_REQUIRED_ACTIONS.has(action)) return;
@@ -210,7 +337,7 @@ function validateChromeConnectorPayload(action, payload) {
210
337
  if (!elementRef && !selector) {
211
338
  throw createConnectorError(
212
339
  "ELEMENT_TARGET_REQUIRED",
213
- "Provide elementRef from chrome_read_page or a CSS selector."
340
+ "Provide elementRef from browser_read_page or a CSS selector."
214
341
  );
215
342
  }
216
343
  if (action === "set_files") {
@@ -240,8 +367,8 @@ function validateChromeConnectorPayload(action, payload) {
240
367
  }
241
368
  function createChromeConnectorClient(args) {
242
369
  if (args?.request) return { request: args.request };
243
- const defaultPort = process.env.NOLO_CHROME_CONNECTOR_PORT || "38947";
244
- const endpoint = args?.endpoint ?? process.env.NOLO_CHROME_CONNECTOR_RPC_URL ?? `http://127.0.0.1:${defaultPort}/rpc`;
370
+ const browser = args?.browser ?? "chrome";
371
+ const endpoint = args?.endpoint ?? connectorEndpointForBrowser(browser);
245
372
  const fetchImpl = args?.fetchImpl ?? fetch;
246
373
  const token = args?.token ?? readConnectorToken(args?.tokenPath);
247
374
  return {
@@ -285,7 +412,10 @@ var REQUIRED_CHROME_CONNECTOR_FEATURES = {
285
412
  type: ["compact_observation_v2", "action_gate"],
286
413
  press: ["compact_observation_v2", "action_gate"],
287
414
  scroll: ["compact_observation_v2"],
288
- screenshot: ["browser_debug"],
415
+ // Both browsers advertise the dedicated `screenshot` feature: Chrome serves it through
416
+ // Page.captureScreenshot (browser_debug-adjacent) while Firefox falls back to
417
+ // tabs.captureVisibleTab, so gating on browser_debug would wrongly refuse Firefox.
418
+ screenshot: ["screenshot"],
289
419
  read_console: ["browser_debug"],
290
420
  read_network: ["browser_debug"],
291
421
  detach: ["browser_debug"],
@@ -294,19 +424,43 @@ var REQUIRED_CHROME_CONNECTOR_FEATURES = {
294
424
  function requiredFeaturesForConnectorAction(action) {
295
425
  return [...REQUIRED_CHROME_CONNECTOR_FEATURES[action] ?? []];
296
426
  }
427
+ function createChromeConnectorClientResolver(args) {
428
+ const cache = /* @__PURE__ */ new Map();
429
+ const overrides = args?.clients;
430
+ const resolve3 = (selector) => {
431
+ const existing = cache.get(selector);
432
+ if (existing) return existing;
433
+ let client;
434
+ if (selector === "chrome" || selector === "firefox") {
435
+ const inner = overrides?.[selector] ?? createChromeConnectorClient({ browser: selector });
436
+ client = createVerifiedChromeConnectorClient({
437
+ client: inner,
438
+ expectedBrowser: selector
439
+ });
440
+ } else {
441
+ client = overrides?.default ?? createVerifiedChromeConnectorClient({ client: createChromeConnectorClient() });
442
+ }
443
+ cache.set(selector, client);
444
+ return client;
445
+ };
446
+ return resolve3;
447
+ }
297
448
  function createVerifiedChromeConnectorClient(args) {
298
449
  const client = args?.client ?? createChromeConnectorClient();
299
- const expectedExtensionId = args?.expectedExtensionId ?? NOLO_CHROME_CONNECTOR_EXTENSION_ID;
450
+ const expectedExtensionIds = new Set(
451
+ args?.expectedExtensionIds ?? (args?.expectedBrowser ? [CONNECTOR_BROWSER_EXTENSION_IDS[args.expectedBrowser]] : args?.expectedExtensionId ? [args.expectedExtensionId] : NOLO_CONNECTOR_EXTENSION_IDS)
452
+ );
300
453
  let verified = null;
301
454
  let negotiatedFeatures = [];
302
455
  const verify = async () => {
303
456
  const connectorInfo = await client.request("connector_info", {});
304
457
  const receivedExtensionId = connectorInfo?.extensionId;
305
- if (receivedExtensionId !== expectedExtensionId) {
458
+ if (typeof receivedExtensionId !== "string" || !expectedExtensionIds.has(receivedExtensionId)) {
459
+ const expectedList = [...expectedExtensionIds].join(", ");
306
460
  throw createConnectorError(
307
461
  "CHROME_CONNECTOR_EXTENSION_MISMATCH",
308
- `Chrome connector extension id mismatch: expected ${expectedExtensionId}, received ${typeof receivedExtensionId === "string" ? receivedExtensionId : "unknown"}.`,
309
- { expectedExtensionId, receivedExtensionId }
462
+ `Chrome connector extension id mismatch: expected one of ${expectedList}, received ${typeof receivedExtensionId === "string" ? receivedExtensionId : "unknown"}.`,
463
+ { expectedExtensionIds: [...expectedExtensionIds], receivedExtensionId }
310
464
  );
311
465
  }
312
466
  const receivedProtocolVersion = connectorInfo?.protocolVersion;
@@ -366,9 +520,21 @@ async function executeChromeConnectorTool(args) {
366
520
  };
367
521
  }
368
522
  try {
369
- const payload = parseArguments(args.call.arguments);
523
+ const { target: rawTarget, ...payload } = parseArguments(args.call.arguments);
524
+ const target = typeof rawTarget === "string" && rawTarget.trim().length > 0 ? rawTarget.trim().toLowerCase() : void 0;
525
+ if (target !== void 0 && target !== "chrome" && target !== "firefox") {
526
+ throw createConnectorError(
527
+ "INVALID_BROWSER_TARGET",
528
+ `browser target must be "chrome" or "firefox", received "${rawTarget}".`,
529
+ { receivedTarget: rawTarget }
530
+ );
531
+ }
370
532
  validateChromeConnectorPayload(action, payload);
371
- const result = await (args.client ?? createChromeConnectorClient()).request(action, payload);
533
+ const client = args.clientForTarget?.(target) ?? (target ? createVerifiedChromeConnectorClient({
534
+ client: createChromeConnectorClient({ browser: target }),
535
+ expectedBrowser: target
536
+ }) : args.client ?? createVerifiedChromeConnectorClient({ client: createChromeConnectorClient() }));
537
+ const result = await client.request(action, payload);
372
538
  return {
373
539
  content: JSON.stringify({ ok: true, result }),
374
540
  metadata: {
@@ -391,10 +557,14 @@ async function executeChromeConnectorTool(args) {
391
557
  var CHROME_CONNECTOR_TOOL_ACTIONS = { ...CHROME_TOOL_ACTIONS };
392
558
 
393
559
  export {
560
+ resolveUploadRoots,
394
561
  NOLO_CHROME_CONNECTOR_EXTENSION_ID,
562
+ NOLO_FIREFOX_CONNECTOR_EXTENSION_ID,
563
+ NOLO_CONNECTOR_EXTENSION_IDS,
395
564
  NOLO_CHROME_CONNECTOR_PROTOCOL_VERSION,
396
565
  createChromeConnectorClient,
397
566
  REQUIRED_CHROME_CONNECTOR_FEATURES,
567
+ createChromeConnectorClientResolver,
398
568
  createVerifiedChromeConnectorClient,
399
569
  executeChromeConnectorTool
400
570
  };
@@ -0,0 +1,82 @@
1
+ // packages/agent-runtime/sseFrames.ts
2
+ async function* readSseFrames(response) {
3
+ const reader = response.body?.getReader();
4
+ if (!reader) {
5
+ throw new Error("SSE response did not include a readable body.");
6
+ }
7
+ const decoder = new TextDecoder();
8
+ let buffer = "";
9
+ while (true) {
10
+ const { done, value } = await reader.read();
11
+ if (done) break;
12
+ buffer += decoder.decode(value, { stream: true });
13
+ let boundary = findSseFrameBoundary(buffer);
14
+ while (boundary) {
15
+ yield buffer.slice(0, boundary.index);
16
+ buffer = buffer.slice(boundary.index + boundary.separatorLength);
17
+ boundary = findSseFrameBoundary(buffer);
18
+ }
19
+ }
20
+ const remaining = decoder.decode();
21
+ if (remaining) {
22
+ buffer += remaining;
23
+ let boundary = findSseFrameBoundary(buffer);
24
+ while (boundary) {
25
+ yield buffer.slice(0, boundary.index);
26
+ buffer = buffer.slice(boundary.index + boundary.separatorLength);
27
+ boundary = findSseFrameBoundary(buffer);
28
+ }
29
+ }
30
+ if (buffer.trim()) yield buffer;
31
+ }
32
+ function findSseFrameBoundary(buffer) {
33
+ const lfLf = buffer.indexOf("\n\n");
34
+ const crLfCrLf = buffer.indexOf("\r\n\r\n");
35
+ if (lfLf === -1 && crLfCrLf === -1) return null;
36
+ const useLf = lfLf !== -1 && (crLfCrLf === -1 || lfLf < crLfCrLf);
37
+ return useLf ? { index: lfLf, separatorLength: 2 } : { index: crLfCrLf, separatorLength: 4 };
38
+ }
39
+ async function* streamSseDataValues(response, parse) {
40
+ const reader = response.body?.getReader();
41
+ if (!reader) return;
42
+ const decoder = new TextDecoder();
43
+ let buffer = "";
44
+ while (true) {
45
+ const { done, value } = await reader.read();
46
+ if (done) break;
47
+ buffer += decoder.decode(value, { stream: true });
48
+ const lines = buffer.split("\n");
49
+ buffer = lines.pop() ?? "";
50
+ for (const line of lines) {
51
+ const parsed = parse(line);
52
+ if (parsed) yield parsed;
53
+ }
54
+ }
55
+ const remaining = decoder.decode();
56
+ if (remaining) {
57
+ buffer += remaining;
58
+ const lines = buffer.split("\n");
59
+ buffer = lines.pop() ?? "";
60
+ for (const line of lines) {
61
+ const parsed = parse(line);
62
+ if (parsed) yield parsed;
63
+ }
64
+ }
65
+ if (buffer.trim()) {
66
+ const parsed = parse(buffer);
67
+ if (parsed) yield parsed;
68
+ }
69
+ }
70
+ async function readSseDataValues(response, parse) {
71
+ const values = [];
72
+ for await (const value of streamSseDataValues(response, parse)) {
73
+ values.push(value);
74
+ }
75
+ return values;
76
+ }
77
+
78
+ export {
79
+ readSseFrames,
80
+ streamSseDataValues,
81
+ readSseDataValues
82
+ };
@@ -180,6 +180,36 @@ function resolveCooldownGate(input, now) {
180
180
  }
181
181
  return now - lastProbeAt >= PROBE_INTERVAL_MS ? "probe" : "blocked";
182
182
  }
183
+ function resolveCredentialKey(agent) {
184
+ if (!agent || typeof agent !== "object") return void 0;
185
+ for (const field of ["apiKeyRef", "credentialRef"]) {
186
+ const value = agent[field];
187
+ if (typeof value === "string") {
188
+ const trimmed = value.trim();
189
+ if (trimmed) return trimmed;
190
+ }
191
+ }
192
+ return void 0;
193
+ }
194
+ function resolveCredentialKeyWithFallback(agent) {
195
+ const byRef = resolveCredentialKey(agent);
196
+ if (byRef) return byRef;
197
+ if (!agent || typeof agent !== "object") return void 0;
198
+ const endpoint = agent.customProviderUrl;
199
+ if (typeof endpoint === "string") {
200
+ const trimmed = endpoint.trim();
201
+ if (trimmed) {
202
+ try {
203
+ const origin = new URL(trimmed).origin;
204
+ if (origin && origin !== "null") return `custom-endpoint:${origin}`;
205
+ } catch {
206
+ }
207
+ }
208
+ }
209
+ const key = agent.key;
210
+ if (typeof key === "string" && key.trim()) return `custom-agent:${key.trim()}`;
211
+ return void 0;
212
+ }
183
213
 
184
214
  export {
185
215
  QUOTA_ERROR_PATTERNS,
@@ -188,5 +218,6 @@ export {
188
218
  isQuotaLimited403Body,
189
219
  resolveAvailabilityAction,
190
220
  mergeAvailabilityDeadline,
191
- resolveCooldownGate
221
+ resolveCooldownGate,
222
+ resolveCredentialKeyWithFallback
192
223
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MEMORY_USE_GUIDANCE,
3
3
  wrapHistoricalSummaryWithReplayGuard
4
- } from "./chunk-2GRGFCF6.js";
4
+ } from "./chunk-4VJAC32I.js";
5
5
 
6
6
  // packages/agent-runtime/turnContext.ts
7
7
  var DEFAULT_RECENT_CONTENT_LIMIT = 10;
@@ -258,7 +258,6 @@ var normalizeTimeFields = (data) => ({
258
258
  });
259
259
 
260
260
  export {
261
- isProduction,
262
261
  isDevelopment,
263
262
  getIsDesktopApp,
264
263
  createClientLogger,
@@ -206,9 +206,12 @@ export {
206
206
  resolveNoloStateDir,
207
207
  getLegacyCredentialPath,
208
208
  migrateLegacyCredentialFile,
209
+ DEFAULT_REFRESH_SKEW_MS,
209
210
  getCredentialsDir,
211
+ getCredentialPath,
210
212
  readOAuthCredential,
211
213
  writeOAuthCredential,
214
+ removeOAuthCredential,
212
215
  createOAuthTokenStore,
213
216
  isTokenExpired,
214
217
  resolveFreshAccessToken
@@ -209,6 +209,13 @@ var BUILTIN_AGENT_CATALOG = [
209
209
  provider: "nolo",
210
210
  model: "gemini-3.8-flash"
211
211
  },
212
+ {
213
+ id: "01GEM4ARGPB00000001TDQ94E",
214
+ group: "public",
215
+ name: "Gemini 4 Argon",
216
+ provider: "nolo",
217
+ model: "gemini-4-argon"
218
+ },
212
219
  {
213
220
  id: "01GROK46PLAZ00000001PTJZ3K",
214
221
  group: "public",
@@ -296,7 +303,20 @@ var BUILTIN_CHROME_OPERATOR_AGENT_KEY = publicAgentKey(BUILTIN_CHROME_OPERATOR_A
296
303
  var BUILTIN_PLATFORM_AGENT_KEYS = builtinPlatformEntries().map(
297
304
  (e) => publicAgentKey(e.id)
298
305
  );
299
- var BUILTIN_PLATFORM_AGENT_KEY_SET = new Set(BUILTIN_PLATFORM_AGENT_KEYS);
306
+ var BUILTIN_PLATFORM_AGENT_ID_SET = new Set(
307
+ builtinPlatformEntries().map((e) => e.id)
308
+ );
309
+ if (builtinPlatformEntries().some((e) => e.id.includes("-"))) {
310
+ throw new Error("builtin platform agent ids must not contain hyphens");
311
+ }
312
+ var parseBuiltinPlatformAgentId = (key) => {
313
+ if (typeof key !== "string") return null;
314
+ if (key !== key.slice(key.lastIndexOf("-") + 1) && !key.startsWith("agent-")) {
315
+ return null;
316
+ }
317
+ const id = key.slice(key.lastIndexOf("-") + 1);
318
+ return BUILTIN_PLATFORM_AGENT_ID_SET.has(id) ? id : null;
319
+ };
300
320
  var PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID = entry("01DSV4FLASHPB00000000JFPFD").id;
301
321
  var PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY = publicAgentKey(PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID);
302
322
  var PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID = entry("01DSV4PRONPB00000001VIR3EK").id;
@@ -322,7 +342,7 @@ var SYSTEM_BUILTIN_TRUSTED_AGENT_KEY_SET = new Set(
322
342
  SYSTEM_BUILTIN_TRUSTED_AGENT_KEYS
323
343
  );
324
344
  var isSystemBuiltinTrustedAgentKey = (key) => typeof key === "string" && SYSTEM_BUILTIN_TRUSTED_AGENT_KEY_SET.has(key);
325
- var isBuiltinPlatformAgentKey = (key) => typeof key === "string" && BUILTIN_PLATFORM_AGENT_KEY_SET.has(key);
345
+ var isBuiltinPlatformAgentKey = (key) => parseBuiltinPlatformAgentId(key) !== null;
326
346
 
327
347
  export {
328
348
  builtinAgentCatalogEntryById,
@@ -1,5 +1,11 @@
1
+ import {
2
+ CHROME_CONNECTOR_LEGACY_TOOL_ALIASES
3
+ } from "./chunk-LWLNLZC5.js";
4
+
1
5
  // packages/agent-runtime/toolNameAliases.ts
2
6
  var LEGACY_TOOL_NAME_ALIASES = {
7
+ // Nolo Browser Connector: legacy chrome_* → canonical browser_*
8
+ ...CHROME_CONNECTOR_LEGACY_TOOL_ALIASES,
3
9
  createPage: "createDoc",
4
10
  updatePage: "updateDoc",
5
11
  update_page: "updateDoc",
@@ -1,7 +1,3 @@
1
- import {
2
- BUILTIN_NOLO_AGENT_KEY
3
- } from "./chunk-BNGW5ASC.js";
4
-
5
1
  // packages/ai/tools/agentCapabilities.ts
6
2
  var SYSTEM_AGENT_CAPABILITIES = [
7
3
  {
@@ -20,14 +16,6 @@ var SYSTEM_AGENT_CAPABILITIES = [
20
16
  defaultEnabled: false,
21
17
  icon: "\u{1F578}\uFE0F"
22
18
  },
23
- {
24
- id: "conversation-todo",
25
- label: "\u5BF9\u8BDD Todo",
26
- description: "\u5728\u591A\u6B65\u9AA4\u5BF9\u8BDD\u4E2D\u663E\u793A\u548C\u66F4\u65B0\u4EFB\u52A1\u8FDB\u5EA6\u3002\u5173\u95ED\u540E\uFF0CAgent \u4E0D\u4F1A\u4F7F\u7528\u5BF9\u8BDD\u5185 Todo \u5DE5\u5177\u3002",
27
- tools: ["setTodoList"],
28
- defaultEnabled: true,
29
- icon: "\u2611\uFE0F"
30
- },
31
19
  {
32
20
  id: "agent-orchestration",
33
21
  label: "\u591A agent \u7F16\u6392",
@@ -47,17 +35,8 @@ var DEFAULT_SYSTEM_AGENT_CAPABILITIES = Object.fromEntries(
47
35
  ])
48
36
  );
49
37
 
50
- // packages/core/init.ts
51
- var nolotusId = "0e95801d90";
52
- var ADMIN_IDS = /* @__PURE__ */ new Set([nolotusId]);
53
- var isSystemAdmin = (userId) => userId != null && ADMIN_IDS.has(userId);
54
- var noloAgentId = BUILTIN_NOLO_AGENT_KEY;
55
-
56
38
  export {
57
39
  SYSTEM_AGENT_CAPABILITIES,
58
40
  SYSTEM_AGENT_CAPABILITY_IDS,
59
- DEFAULT_SYSTEM_AGENT_CAPABILITIES,
60
- nolotusId,
61
- isSystemAdmin,
62
- noloAgentId
41
+ DEFAULT_SYSTEM_AGENT_CAPABILITIES
63
42
  };
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getModelConfig
3
- } from "./chunk-OIVSQH2O.js";
3
+ } from "./chunk-CDEEFJXN.js";
4
4
  import {
5
5
  isPlatformHostedDeepseekModel,
6
6
  isPlatformHostedOpenAIImageModel,
7
7
  resolvePlatformHostedRouting
8
- } from "./chunk-Q67DOFOO.js";
8
+ } from "./chunk-SZC4REES.js";
9
9
  import {
10
10
  asTrimmedLowercaseString
11
11
  } from "./chunk-QSJ3HFEF.js";
@@ -43,18 +43,22 @@ function isOpenAiResponsesModel(args) {
43
43
  }
44
44
  }
45
45
  if (provider === "deepseek" || provider === "nolo" || provider === "ollama-cloud") {
46
+ const hostedRoute = resolvePlatformHostedRouting(args.model);
47
+ if (hostedRoute) return hostedRoute.wire === "responses";
46
48
  if (isPlatformHostedDeepseekModel(args.model)) return true;
47
49
  if (isPlatformHostedOpenAIImageModel(args.model)) return true;
48
50
  }
49
51
  return false;
50
52
  }
53
+ var PLATFORM_HOSTED_RESPONSES_GATEWAY_MARKER = "nolo-platform-gateway://responses";
54
+ var CLOUDFLARE_ACCOUNT_ID_PLACEHOLDER = "{account}";
51
55
  function resolvePlatformResponsesEndpoint(provider, model) {
52
56
  const normalized = asTrimmedLowercaseString(provider);
53
57
  if (normalized === "openai") return OPENAI_RESPONSES_ENDPOINT;
54
58
  if (normalized === "deepseek" || normalized === "nolo" || normalized === "ollama-cloud") {
55
59
  const route = resolvePlatformHostedRouting(model);
56
60
  if (route && route.wire === "responses") {
57
- return route.endpoint;
61
+ return route.endpoint.includes(CLOUDFLARE_ACCOUNT_ID_PLACEHOLDER) ? PLATFORM_HOSTED_RESPONSES_GATEWAY_MARKER : route.endpoint;
58
62
  }
59
63
  if (!model || isPlatformHostedDeepseekModel(model)) {
60
64
  return DEEPSEEK_RESPONSES_ENDPOINT;
@@ -72,7 +76,7 @@ function resolvePlatformChatCompletionsEndpoint(provider, model) {
72
76
  const aliased = PLATFORM_PROVIDER_ENDPOINT_ALIASES[key] ?? key;
73
77
  if (aliased === "nolo") {
74
78
  const route = resolvePlatformHostedRouting(model);
75
- if (route && route.wire !== "responses") {
79
+ if (route && route.wire === "chat.completions") {
76
80
  return route.endpoint;
77
81
  }
78
82
  return void 0;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_AGENT_BASE_POLICY,
3
3
  DEFAULT_USER_PREFERENCE_PROFILE
4
- } from "./chunk-GP5LKBUZ.js";
4
+ } from "./chunk-RQ6CTX2E.js";
5
5
 
6
6
  // packages/ai/policy/runtimePolicy.ts
7
7
  var clampLevel = (value, fallback) => {