nolo-cli 0.241.0-alpha.1 → 0.242.0-alpha.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 (171) hide show
  1. package/README.md +3 -5
  2. package/{_executeModel-UCWDB72C.js → _executeModel-IZ2MCXHO.js} +67 -67
  3. package/{action-24MZYW2B.js → action-VDEW6WLI.js} +9 -9
  4. package/{addContentAction-HEMCSSHT.js → addContentAction-7YVXHIPQ.js} +14 -14
  5. package/{addDialogAgentAction-SQYDOXHA.js → addDialogAgentAction-BX7B47HF.js} +17 -17
  6. package/{agentDeleteCommand-P7O3ACNJ.js → agentDeleteCommand-N7ELXPLD.js} +90 -90
  7. package/{agentEmailCommands-A5BRSYWK.js → agentEmailCommands-OFS477PV.js} +92 -92
  8. package/{agentListCommands-LDRCOOMO.js → agentListCommands-IQQHJSXP.js} +193 -156
  9. package/{agentMachineCommands-AYL53KJV.js → agentMachineCommands-NS65BEW7.js} +43 -41
  10. package/{agentProviderCommands-N5EA3ED2.js → agentProviderCommands-SS6M6VGY.js} +2 -2
  11. package/{agentRecordCommands-FICBZ57C.js → agentRecordCommands-4VE7CNLC.js} +88 -88
  12. package/{agentRunCommand-CTXQGDUM.js → agentRunCommand-2MUXHKNW.js} +89 -89
  13. package/{agentRunControl-CO6BASZF.js → agentRunControl-55GL6Q3M.js} +7 -5
  14. package/{agentRuntimeLocal-5YN4D5WT.js → agentRuntimeLocal-5DB2P4MU.js} +42 -35
  15. package/{agentSlice-DJ5D4DU4.js → agentSlice-5VTAFG43.js} +14 -14
  16. package/{appDeleteCommands-B4E7N7M2.js → appDeleteCommands-EDKUPHJM.js} +43 -41
  17. package/{appDeployCommands-E4DTXRRM.js → appDeployCommands-JO74GW4L.js} +43 -41
  18. package/{appDeployStatusCommands-FCNHYHZM.js → appDeployStatusCommands-U77ZUHX7.js} +43 -41
  19. package/{appGetCommands-4DXSQHUZ.js → appGetCommands-QCMHBYPX.js} +43 -41
  20. package/{appListCommands-2NN5E4F6.js → appListCommands-ZQJYEXI6.js} +43 -41
  21. package/{authCommand-47DR6GZT.js → authCommand-W4KXRZLI.js} +13 -13
  22. package/{authCommands-ZZ3L5IFM.js → authCommands-6AUYO65N.js} +3 -3
  23. package/{builtinSkillRegistry-AYWYQVA4.js → builtinSkillRegistry-GHE3RD3V.js} +7 -7
  24. package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
  25. package/{chromeOpsCommands-VZWAY2KR.js → chromeOpsCommands-TBPM6MR4.js} +1 -1
  26. package/{chunk-7OTNBI77.js → chunk-247AAJRK.js} +1 -1
  27. package/{chunk-BDERPCJW.js → chunk-2N4UBHUU.js} +2 -2
  28. package/{chunk-3V6JT6WN.js → chunk-2T5BHLID.js} +266 -109
  29. package/{chunk-5TJE4QCL.js → chunk-3OQFXODL.js} +2 -2
  30. package/{chunk-UAOFSUG7.js → chunk-3ORFJP2Z.js} +1 -1
  31. package/{chunk-6XBOPKUH.js → chunk-3UNAGTBW.js} +14 -14
  32. package/{chunk-ZTLTDUV6.js → chunk-4F7SWSWO.js} +4 -4
  33. package/{chunk-LT3DMEIB.js → chunk-4UK6UBXF.js} +1 -1
  34. package/{chunk-H6CHPU6M.js → chunk-5GRWWUB4.js} +3 -3
  35. package/{chunk-TTEBPPUV.js → chunk-6326DRQY.js} +1 -1
  36. package/{chunk-TXFYIWAW.js → chunk-6MQWGA5F.js} +10 -10
  37. package/{chunk-TE2XH4KH.js → chunk-6MX6S6TE.js} +3 -3
  38. package/{chunk-QGMIUVBT.js → chunk-6S6CZUXK.js} +19 -19
  39. package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
  40. package/{chunk-6BGJHJRN.js → chunk-6XLWUNZB.js} +27 -27
  41. package/{chunk-BIJTI5SX.js → chunk-7AWKDRXG.js} +2 -2
  42. package/{chunk-YMCSR7PA.js → chunk-7GTXPS3D.js} +8 -8
  43. package/{chunk-G6OPRPXH.js → chunk-7HUHOCIY.js} +35 -29
  44. package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
  45. package/{chunk-C3GOEQJF.js → chunk-BH7CEVOH.js} +1 -1
  46. package/{chunk-B72AFRR2.js → chunk-C4KX626C.js} +4 -4
  47. package/{chunk-EW37CXCQ.js → chunk-CHYYSFFM.js} +6 -6
  48. package/{chunk-ZQUCJBS4.js → chunk-CJTB3OYB.js} +2 -2
  49. package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
  50. package/{chunk-MM73SP4K.js → chunk-DOK7GDRU.js} +1 -1
  51. package/{chunk-Y5RN44VH.js → chunk-DPAIQLAL.js} +16 -16
  52. package/{chunk-LMZRXDWG.js → chunk-EKXPHL7M.js} +3 -3
  53. package/{chunk-NL7J2J5Z.js → chunk-ENYTIRIO.js} +1 -1
  54. package/{chunk-GCVFX6ZL.js → chunk-ER3P6MBT.js} +3 -3
  55. package/{chunk-NQQL2DKF.js → chunk-F4MCAOWN.js} +1 -1
  56. package/{chunk-7NIBQ4HY.js → chunk-FDZ2GBWO.js} +30 -2
  57. package/{chunk-2XMKW2OY.js → chunk-GES5GIAU.js} +8 -8
  58. package/{chunk-25OCZXSX.js → chunk-HQVNO7FH.js} +21 -21
  59. package/{chunk-DVYAFH2Q.js → chunk-HSWEFHFS.js} +1 -1
  60. package/{chunk-FSIEHQNH.js → chunk-IIG3TT73.js} +42 -5
  61. package/{chunk-FPMPWNVQ.js → chunk-IZJFTY4R.js} +3 -3
  62. package/{chunk-QES2NCVM.js → chunk-J25ESVUW.js} +9 -9
  63. package/{chunk-ZBQ5UGYY.js → chunk-J2XZZXIH.js} +3 -3
  64. package/{chunk-NBB2EBQD.js → chunk-JVJ53XCH.js} +1 -1
  65. package/{chunk-OATIWAKN.js → chunk-KC2QVCI7.js} +1 -1
  66. package/{chunk-3NFWMSTA.js → chunk-KF2DWSAH.js} +5 -5
  67. package/{chunk-KGIIZXPL.js → chunk-KLD7K5FD.js} +7 -7
  68. package/{chunk-FCAMGBLY.js → chunk-KMW5CRRM.js} +464 -276
  69. package/{chunk-7U2TFUWW.js → chunk-LZOOUQAZ.js} +4 -4
  70. package/{chunk-OYHJ4TW7.js → chunk-M5EA44QU.js} +2 -2
  71. package/{chunk-WHO3LYDW.js → chunk-MEDPR36J.js} +2 -2
  72. package/{chunk-6D25V6CB.js → chunk-MFXJY44K.js} +4 -4
  73. package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
  74. package/{chunk-FXX6VFMV.js → chunk-ODGSLWLO.js} +63 -63
  75. package/{chunk-YFRJAE3R.js → chunk-OGZE6BZG.js} +12 -4
  76. package/{chunk-F3FQPVHE.js → chunk-OKPC4QNX.js} +2 -2
  77. package/{chunk-DWWUVRB5.js → chunk-ONFFUQYM.js} +1 -1
  78. package/{chunk-IPRPYKBP.js → chunk-P244EH4W.js} +2 -2
  79. package/chunk-P27E22MA.js +203 -0
  80. package/{chunk-24GVXSWK.js → chunk-PK7VT4ZU.js} +2 -2
  81. package/{chunk-TFGGNRT6.js → chunk-QLUYDJST.js} +1 -1
  82. package/{chunk-NWWQY2J5.js → chunk-QUJKDFZW.js} +7 -7
  83. package/{chunk-IUXBKS5L.js → chunk-QXUVCIPB.js} +9 -9
  84. package/{chunk-DLTMAXLF.js → chunk-QYNABNNQ.js} +6 -6
  85. package/{chunk-EIFSCI4C.js → chunk-RGUWOMXU.js} +263 -100
  86. package/{chunk-EBKHA63G.js → chunk-RIMFTQMC.js} +178 -46
  87. package/{chunk-7Q7MKJZN.js → chunk-SBRJOYND.js} +224 -116
  88. package/{chunk-ZT3DYK5T.js → chunk-SBRSXY67.js} +4 -4
  89. package/{chunk-UKSKCDBG.js → chunk-T3WSFTBS.js} +1 -1
  90. package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
  91. package/{chunk-LYDEFPQP.js → chunk-UDT4SI37.js} +1 -1
  92. package/{chunk-T444ENEC.js → chunk-UQXOORR3.js} +5 -5
  93. package/{chunk-CT6GT2BG.js → chunk-UR7555FE.js} +13 -13
  94. package/{chunk-X37RQEA3.js → chunk-UWOCASVL.js} +5 -5
  95. package/{chunk-DIBQXNGW.js → chunk-V2V5Q6DU.js} +2 -2
  96. package/{chunk-LCQJH7KN.js → chunk-VCU5GV42.js} +1 -1
  97. package/{chunk-MDVP5TLI.js → chunk-VMWY7TUA.js} +1 -1
  98. package/{chunk-HNWZJI4N.js → chunk-VNALJT32.js} +1 -1
  99. package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
  100. package/{chunk-X7IA2B7R.js → chunk-WBSJAIZP.js} +7 -3
  101. package/{chunk-BWW6WRX6.js → chunk-WVOZ35E4.js} +6 -6
  102. package/{chunk-XAFOLWLU.js → chunk-XDNXKFWF.js} +4 -4
  103. package/{chunk-KOIDLCAQ.js → chunk-XLN2GD6Z.js} +4 -4
  104. package/{chunk-TXQVH72L.js → chunk-Y5EBOURK.js} +3 -3
  105. package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
  106. package/{chunk-CZLSTOVM.js → chunk-YTEY27GN.js} +2 -2
  107. package/{chunk-C646JEUV.js → chunk-ZCVBIIUE.js} +4 -4
  108. package/{chunk-UAHUJ4HH.js → chunk-ZCZLTJEW.js} +10 -37
  109. package/{cliAgentConfigHelpers-RFR7ZCSK.js → cliAgentConfigHelpers-6OFDHJFT.js} +4 -4
  110. package/{cliLocalAgentRecordReader-AJ4UKHKT.js → cliLocalAgentRecordReader-FHIMCBUK.js} +44 -38
  111. package/{commandRegistry-IHWZVV4G.js → commandRegistry-OKIWAJIS.js} +99 -91
  112. package/{contentThunks-YQRCBDKF.js → contentThunks-VF2DCU46.js} +29 -29
  113. package/{cooldownCommands-W67DE765.js → cooldownCommands-QL6DWGVU.js} +1 -1
  114. package/{createAgentAutomationAction-ERSDNR4R.js → createAgentAutomationAction-BGET7Q6K.js} +30 -30
  115. package/{createDialogAction-QXC7JZPE.js → createDialogAction-XYDQZETK.js} +30 -30
  116. package/{createPageAction-RLZ7776F.js → createPageAction-74S5RO7U.js} +34 -34
  117. package/{dbSlice-7M2ESEUO.js → dbSlice-FI7VNDR5.js} +13 -13
  118. package/{deleteFile-WO6WSSNK.js → deleteFile-GD62MPZW.js} +7 -7
  119. package/{dialogCommands-UIRO4QNN.js → dialogCommands-Y6DHZUAM.js} +45 -44
  120. package/{dialogNotifyCommand-VDUFYBZV.js → dialogNotifyCommand-MKXL4NGL.js} +7 -7
  121. package/{dialogSlice-A4U3C76D.js → dialogSlice-XAUKSWZ4.js} +28 -28
  122. package/{docCreateCommands-MHPYTJWR.js → docCreateCommands-PHDFOQBM.js} +43 -41
  123. package/{docDeleteCommands-VYULMBAQ.js → docDeleteCommands-OSHJM67Y.js} +44 -42
  124. package/{docReadCommands-FV3GGZ7V.js → docReadCommands-E6QYCFMS.js} +43 -41
  125. package/{docStore-AWWI72FA.js → docStore-ZZT2BEBU.js} +15 -15
  126. package/{docUpdateCommands-JNS3HX7F.js → docUpdateCommands-DHIOPK2C.js} +43 -41
  127. package/fetchMessages-TQEUZD7H.js +2 -2
  128. package/{getPricing-U5AR7ZHS.js → getPricing-RNRITFOP.js} +2 -2
  129. package/{handleSendMessageAction-WDJOUDNV.js → handleSendMessageAction-ARUU6CNF.js} +60 -60
  130. package/{hostCredentialCreate-H3FF2SAO.js → hostCredentialCreate-SNQT73H4.js} +88 -88
  131. package/index.js +8 -8
  132. package/keys-RWF7UCB4.js +1 -1
  133. package/{localRuntimeAdapter-JAQQXZJP.js → localRuntimeAdapter-MHI6Y2IZ.js} +96 -96
  134. package/{machineCommands-WYOFNB5I.js → machineCommands-3O6Y27R4.js} +216 -307
  135. package/{machineWsRunDispatch-Y7UIAZNM.js → machineWsRunDispatch-5PFLR5XC.js} +87 -87
  136. package/{mcpLocalAuthorizeCommand-SCYEFLRK.js → mcpLocalAuthorizeCommand-BQCQ2KRJ.js} +10 -10
  137. package/{memberThunks-DIITWU4M.js → memberThunks-TU6A6OBV.js} +17 -17
  138. package/package.json +1 -1
  139. package/{projectArchive-IZJXBW5N.js → projectArchive-X2EVXU3N.js} +34 -34
  140. package/{providerPresetApply-2QWXPJXZ.js → providerPresetApply-HUWNV2NI.js} +3 -3
  141. package/{providerRegistry-W4LCKK6V.js → providerRegistry-7FWKDKZJ.js} +3 -3
  142. package/{read-OBLJNMA2.js → read-QAHEQID5.js} +7 -7
  143. package/{readDocTool-QQZ4DAER.js → readDocTool-KG5DP6EM.js} +1 -1
  144. package/{readlineWorkspace-WF3SWZGR.js → readlineWorkspace-SO3APHVP.js} +482 -374
  145. package/{removeDialogAgentAction-HC3SOY3G.js → removeDialogAgentAction-QZCCVK2G.js} +19 -19
  146. package/{runAgentClientLoop-Z7V6TA3O.js → runAgentClientLoop-FLHHCOVH.js} +67 -67
  147. package/{secretCommands-STRAX275.js → secretCommands-36BCE3UE.js} +2 -2
  148. package/{setDialogExtraReferencesAction-DDZUQPY6.js → setDialogExtraReferencesAction-PDPTYSEW.js} +15 -15
  149. package/{setPrimaryDialogAgentAction-EB67OMAJ.js → setPrimaryDialogAgentAction-DOUIPR66.js} +19 -19
  150. package/{settingThunks-TN6GFASU.js → settingThunks-MHGGP6UE.js} +23 -23
  151. package/{spaceCommands-HBYQUVJI.js → spaceCommands-JH7UYE3K.js} +46 -44
  152. package/{streamAgentChatTurn-CM7QQXOS.js → streamAgentChatTurn-VDDA2TX6.js} +89 -89
  153. package/{switchDialogAgentAction-XY5TKQQE.js → switchDialogAgentAction-7USK3DAP.js} +17 -17
  154. package/{tableCommands-MXFL3JIT.js → tableCommands-UONBFC7L.js} +5 -5
  155. package/{tools-AT6H73LD.js → tools-MIOCXKMG.js} +52 -52
  156. package/{tuiRestart-272SAYSK.js → tuiRestart-ET3QISZ5.js} +6 -6
  157. package/{tuiSummaryLlmCaller-K2OVRVHG.js → tuiSummaryLlmCaller-MSINBP3M.js} +10 -10
  158. package/{updateCommands-O3BOVVVN.js → updateCommands-5OYND6EF.js} +3 -3
  159. package/{updateDialogTitleAction-PGY4UPLH.js → updateDialogTitleAction-2L4CC4YO.js} +30 -30
  160. package/{usageCommand-SCF3ROV2.js → usageCommand-JTKDAG6I.js} +2 -2
  161. package/{usageRebuildCommand-K5WPIBA5.js → usageRebuildCommand-4TFZCKXM.js} +3 -3
  162. package/{windowsSelfUpdate-WJDUZLEO.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
  163. package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-ZCSQCHG3.js} +2 -2
  164. package/chunk-TUSTONB3.js +0 -81
  165. package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
  166. package/{chunk-6X3CS6NJ.js → chunk-RH44TIHX.js} +6 -6
  167. package/{chunk-VMJVAJ6W.js → chunk-TB5KTLNB.js} +3 -3
  168. package/{chunk-LN4ZVSO7.js → chunk-Y22P6ASC.js} +5 -5
  169. package/{chunk-DGUUOHBF.js → chunk-Y3DOUQQQ.js} +3 -3
  170. package/{dialogUsageCommand-SEC6UZWM.js → dialogUsageCommand-BZPKR3DW.js} +3 -3
  171. package/{runtimeDoctorCommands-KX6YLPWV.js → runtimeDoctorCommands-DN3I52C6.js} +2 -2
@@ -1,13 +1,13 @@
1
- import {
2
- resolveRuntimeAuthToken
3
- } from "./chunk-4FE3IWRE.js";
4
1
  import {
5
2
  NOLO_DEFAULT_AGENT_ID,
6
3
  NOLO_DEFAULT_AGENT_KEY
7
4
  } from "./chunk-BR3GT6MR.js";
8
5
  import {
9
6
  resolveRuntimeToolSurfaceForAgent
10
- } from "./chunk-VS276URX.js";
7
+ } from "./chunk-NEG5LYK5.js";
8
+ import {
9
+ resolveRuntimeAuthToken
10
+ } from "./chunk-4FE3IWRE.js";
11
11
  import {
12
12
  isSystemBuiltinTrustedAgentKey
13
13
  } from "./chunk-WRKMXMU7.js";
@@ -28,10 +28,10 @@ import {
28
28
  stablePromptCacheKey,
29
29
  toOpenAiCompatibleMessages,
30
30
  toResponsesTools
31
- } from "./chunk-NQQL2DKF.js";
31
+ } from "./chunk-F4MCAOWN.js";
32
32
  import {
33
33
  resolveToolImagePolicy
34
- } from "./chunk-IPRPYKBP.js";
34
+ } from "./chunk-P244EH4W.js";
35
35
  import {
36
36
  isMeaningfulChatCompletionOutput,
37
37
  isMeaningfulResponsesOutput
@@ -12,10 +12,10 @@ import {
12
12
  } from "./chunk-4O22PGNQ.js";
13
13
  import {
14
14
  scheduleWindowsSelfUpdate
15
- } from "./chunk-TFGGNRT6.js";
15
+ } from "./chunk-QLUYDJST.js";
16
16
  import {
17
17
  t
18
- } from "./chunk-YFRJAE3R.js";
18
+ } from "./chunk-OGZE6BZG.js";
19
19
  import {
20
20
  normalizeServerOrigin
21
21
  } from "./chunk-CF7PE763.js";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  isAccountOnDemandWorkflowSkill,
3
3
  resolveUserEnabledSkills
4
- } from "./chunk-DVYAFH2Q.js";
4
+ } from "./chunk-HSWEFHFS.js";
5
5
  import {
6
6
  collectAgentSkillConfigIssues,
7
7
  describeAgentSkillModeValue,
8
8
  isAgentSkillDisabled,
9
9
  resolveAgentSkillConfig
10
- } from "./chunk-MM73SP4K.js";
10
+ } from "./chunk-DOK7GDRU.js";
11
11
  import {
12
12
  dedupeSkillPromptPatches,
13
13
  resolveBuiltinSkillEntry,
14
14
  resolveBuiltinSkillPage,
15
15
  resolveSkillGraphFromRoots
16
- } from "./chunk-EBKHA63G.js";
16
+ } from "./chunk-RIMFTQMC.js";
17
17
  import {
18
18
  parseSkillDocProtocol
19
- } from "./chunk-W6RFEDN4.js";
19
+ } from "./chunk-AETZ7AD6.js";
20
20
 
21
21
  // packages/ai/skills/agentSkillPreferenceDiagnostics.ts
22
22
  var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  canonicalizeToolName
3
- } from "./chunk-6OVNSQHN.js";
3
+ } from "./chunk-YLAHYLDQ.js";
4
4
  import {
5
5
  isOwnedAgentKey
6
6
  } from "./chunk-M2EJHDJP.js";
@@ -10,18 +10,37 @@ import {
10
10
  } from "./chunk-523DITKR.js";
11
11
  import {
12
12
  runLlm
13
- } from "./chunk-DLTMAXLF.js";
14
- import {
15
- isMediaToolConfirmation
16
- } from "./chunk-QYPE3TS3.js";
13
+ } from "./chunk-QYNABNNQ.js";
17
14
  import {
18
15
  cleanupCliSessionForDialog
19
- } from "./chunk-T444ENEC.js";
16
+ } from "./chunk-UQXOORR3.js";
20
17
  import {
21
18
  getActiveDialogAgentId,
22
19
  getDialogAgentIds,
23
20
  getPrimaryDialogAgentId
24
21
  } from "./chunk-5RGU3J7P.js";
22
+ import {
23
+ addContentAction
24
+ } from "./chunk-YTEY27GN.js";
25
+ import {
26
+ patch,
27
+ read,
28
+ remove,
29
+ selectById,
30
+ upload,
31
+ write
32
+ } from "./chunk-6MQWGA5F.js";
33
+ import {
34
+ fetchMessages
35
+ } from "./chunk-HXER7YJF.js";
36
+ import {
37
+ buildDialogAttachmentPlan,
38
+ extractFileContentIds,
39
+ fetchWithTransientRetry
40
+ } from "./chunk-DXWGFL2Z.js";
41
+ import {
42
+ isMediaToolConfirmation
43
+ } from "./chunk-QYPE3TS3.js";
25
44
  import {
26
45
  abortActiveControllers,
27
46
  addPageReferenceToRuntime,
@@ -41,58 +60,33 @@ import {
41
60
  import {
42
61
  require_react
43
62
  } from "./chunk-RD3QLZQV.js";
44
- import {
45
- fetchMessages
46
- } from "./chunk-HXER7YJF.js";
47
- import {
48
- buildDialogAttachmentPlan,
49
- extractFileContentIds,
50
- fetchWithTransientRetry
51
- } from "./chunk-DXWGFL2Z.js";
52
- import {
53
- addContentAction
54
- } from "./chunk-CZLSTOVM.js";
55
- import {
56
- patch,
57
- read,
58
- remove,
59
- selectById,
60
- upload,
61
- write
62
- } from "./chunk-TXFYIWAW.js";
63
63
  import {
64
64
  getRuntimeServerContext,
65
65
  parseOwnerUserIdFromDbKey,
66
66
  resolveUserAuthorityServer,
67
67
  scheduleDeleteReplication,
68
68
  waitForWriteAck
69
- } from "./chunk-F3FQPVHE.js";
69
+ } from "./chunk-OKPC4QNX.js";
70
70
  import {
71
71
  asyncThunkCreator,
72
72
  buildCreateSlice,
73
73
  createAsyncThunk,
74
74
  createEntityAdapter,
75
75
  createSelector
76
- } from "./chunk-7OTNBI77.js";
76
+ } from "./chunk-247AAJRK.js";
77
77
  import {
78
78
  googleSessionRequestToken,
79
79
  isGoogleAuthoritySession,
80
80
  normalizeTimeFields
81
- } from "./chunk-C3GOEQJF.js";
81
+ } from "./chunk-BH7CEVOH.js";
82
+ import {
83
+ createClientLogger
84
+ } from "./chunk-QQ56R7KS.js";
82
85
  import {
83
86
  selectIdentityToken,
84
87
  selectIdentityUser,
85
88
  selectIdentityUserId
86
89
  } from "./chunk-PXYBUFDB.js";
87
- import {
88
- createClientLogger
89
- } from "./chunk-QQ56R7KS.js";
90
- import {
91
- getRecordTimestamp,
92
- getTombstoneTimestamp,
93
- isTombstoneRecord,
94
- shouldReplaceWithNextRecord
95
- } from "./chunk-BV3FLP2L.js";
96
90
  import {
97
91
  applyBuiltinAgentRuntimeOverride,
98
92
  resolveBuiltinPlatformAgentRecord
@@ -111,7 +105,7 @@ import {
111
105
  isCodexOAuthAgent,
112
106
  normalizeAttachmentPart,
113
107
  resolveAutoExecutionProfile
114
- } from "./chunk-ZTLTDUV6.js";
108
+ } from "./chunk-4F7SWSWO.js";
115
109
  import {
116
110
  isDevinOAuthAgent
117
111
  } from "./chunk-5ZUL4CUO.js";
@@ -131,29 +125,28 @@ import {
131
125
  runSummaryWithContract,
132
126
  selectSummaryRoute,
133
127
  serializeMessageContent
134
- } from "./chunk-6X3CS6NJ.js";
128
+ } from "./chunk-RH44TIHX.js";
135
129
  import {
136
130
  isOAuthApiKeyRef
137
131
  } from "./chunk-UKZX3NHN.js";
138
132
  import {
139
133
  asRecordOrEmpty
140
134
  } from "./chunk-KX6YBIHG.js";
135
+ import {
136
+ estimateTokenCount
137
+ } from "./chunk-PSCNXBYA.js";
141
138
  import {
142
139
  isAbortError
143
140
  } from "./chunk-7DPNBQSV.js";
144
141
  import {
145
- estimateTokenCount
146
- } from "./chunk-PSCNXBYA.js";
142
+ getRecordTimestamp,
143
+ getTombstoneTimestamp,
144
+ isTombstoneRecord,
145
+ shouldReplaceWithNextRecord
146
+ } from "./chunk-BV3FLP2L.js";
147
147
  import {
148
148
  nolotusId
149
149
  } from "./chunk-ZVOL2MAJ.js";
150
- import {
151
- isBuiltinPlatformAgentKey
152
- } from "./chunk-WRKMXMU7.js";
153
- import {
154
- extractCustomId,
155
- extractUserId
156
- } from "./chunk-M2EJHDJP.js";
157
150
  import {
158
151
  buildDialogAgentListIndexDeleteOps,
159
152
  createKey,
@@ -164,6 +157,13 @@ import {
164
157
  createDialogMessageKeyAndId,
165
158
  dialogMessageKey
166
159
  } from "./chunk-OJKUU3LP.js";
160
+ import {
161
+ isBuiltinPlatformAgentKey
162
+ } from "./chunk-WRKMXMU7.js";
163
+ import {
164
+ extractCustomId,
165
+ extractUserId
166
+ } from "./chunk-M2EJHDJP.js";
167
167
  import {
168
168
  getApproxPricePerImage
169
169
  } from "./chunk-4JH2UMJR.js";
@@ -176,6 +176,9 @@ import {
176
176
  import {
177
177
  asTrimmedString
178
178
  } from "./chunk-3EUW3WEO.js";
179
+ import {
180
+ asOptionalFiniteNumber
181
+ } from "./chunk-WWC7I6TA.js";
179
182
  import {
180
183
  findModelConfig,
181
184
  getModelConfig
@@ -183,9 +186,6 @@ import {
183
186
  import {
184
187
  isRecord
185
188
  } from "./chunk-KUG52IAP.js";
186
- import {
187
- asOptionalFiniteNumber
188
- } from "./chunk-WWC7I6TA.js";
189
189
  import {
190
190
  asOptionalTrimmedString
191
191
  } from "./chunk-G3SUCT4W.js";
@@ -14656,7 +14656,7 @@ var messageSlice = createSliceWithThunks({
14656
14656
  runtimeOptions: args.runtimeOptions
14657
14657
  });
14658
14658
  if (agentKeyToUse) {
14659
- const { streamAgentChatTurn } = await import("./agentSlice-DJ5D4DU4.js");
14659
+ const { streamAgentChatTurn } = await import("./agentSlice-5VTAFG43.js");
14660
14660
  await dispatch(
14661
14661
  streamAgentChatTurn({
14662
14662
  agentKey: agentKeyToUse,
@@ -15727,7 +15727,7 @@ var deleteOwnedDialogAttachments = async (args) => {
15727
15727
  metadataReadFailures
15728
15728
  });
15729
15729
  if (!plan.deleteCandidates.length) return plan;
15730
- const { deleteFileAction } = await import("./deleteFile-WO6WSSNK.js");
15730
+ const { deleteFileAction } = await import("./deleteFile-GD62MPZW.js");
15731
15731
  for (const candidate of plan.deleteCandidates) {
15732
15732
  if (candidate.fileDbKey) {
15733
15733
  await deleteFileAction(candidate.fileDbKey, args.thunkApi);
@@ -15789,7 +15789,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
15789
15789
  }
15790
15790
  if (isCurrentDialog) {
15791
15791
  await thunkApi.dispatch(resetMsgs());
15792
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-A4U3C76D.js");
15792
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-XAUKSWZ4.js");
15793
15793
  dispatch(clearPendingAttachments2());
15794
15794
  }
15795
15795
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -15797,39 +15797,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
15797
15797
 
15798
15798
  // packages/chat/dialog/dialogSlice.ts
15799
15799
  var runCreateDialogAction = async (args, thunkApi) => {
15800
- const { createDialogAction } = await import("./createDialogAction-QXC7JZPE.js");
15800
+ const { createDialogAction } = await import("./createDialogAction-XYDQZETK.js");
15801
15801
  return createDialogAction(args, thunkApi);
15802
15802
  };
15803
15803
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
15804
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-ERSDNR4R.js");
15804
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-BGET7Q6K.js");
15805
15805
  return createAgentAutomationAction(args, thunkApi);
15806
15806
  };
15807
15807
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
15808
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-PGY4UPLH.js");
15808
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-2L4CC4YO.js");
15809
15809
  return updateDialogTitleAction(args, thunkApi);
15810
15810
  };
15811
15811
  var runAddDialogAgentAction = async (args, thunkApi) => {
15812
- const { addDialogAgentAction } = await import("./addDialogAgentAction-SQYDOXHA.js");
15812
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-BX7B47HF.js");
15813
15813
  return addDialogAgentAction(args, thunkApi);
15814
15814
  };
15815
15815
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
15816
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-HC3SOY3G.js");
15816
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-QZCCVK2G.js");
15817
15817
  return removeDialogAgentAction(args, thunkApi);
15818
15818
  };
15819
15819
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
15820
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-EB67OMAJ.js");
15820
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-DOUIPR66.js");
15821
15821
  return setPrimaryDialogAgentAction(args, thunkApi);
15822
15822
  };
15823
15823
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
15824
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-XY5TKQQE.js");
15824
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-7USK3DAP.js");
15825
15825
  return switchDialogAgentAction(args, thunkApi);
15826
15826
  };
15827
15827
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
15828
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-DDZUQPY6.js");
15828
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-PDPTYSEW.js");
15829
15829
  return setDialogExtraReferencesAction(args, thunkApi);
15830
15830
  };
15831
15831
  var runHandleSendMessageAction = async (args, thunkApi) => {
15832
- const { handleSendMessageAction } = await import("./handleSendMessageAction-WDJOUDNV.js");
15832
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-ARUU6CNF.js");
15833
15833
  return handleSendMessageAction(args, thunkApi);
15834
15834
  };
15835
15835
  function clearDialogState() {
@@ -15842,7 +15842,7 @@ var createPageAndAddReference = createAsyncThunk(
15842
15842
  async (payload, { dispatch, getState, rejectWithValue }) => {
15843
15843
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
15844
15844
  try {
15845
- const { createDocState } = await import("./docStore-AWWI72FA.js");
15845
+ const { createDocState } = await import("./docStore-ZZT2BEBU.js");
15846
15846
  const pageKey = await createDocState(
15847
15847
  { slateData, title },
15848
15848
  { dispatch, getState }
@@ -78,8 +78,8 @@ var turnStrings = {
78
78
  zh: "\u5DF2\u505C\u6B62\u7B49\u5F85\u3002{0} \u53EF\u80FD\u4ECD\u5728\u540E\u53F0\u5B8C\u6210\uFF0C\u5176\u7ED3\u679C\u4E0D\u4F1A\u8BA1\u5165\u672C\u6B21\u5BF9\u8BDD\u3002"
79
79
  },
80
80
  wakeQueuedWhileStopped: {
81
- en: "Stopped. {0} queued background result(s) are waiting \u2014 press Enter to continue (Ctrl+S sends all at once).",
82
- zh: "\u5DF2\u505C\u6B62\u3002\u8FD8\u6709 {0} \u9879\u540E\u53F0\u7ED3\u679C\u5728\u961F\u5217\u91CC\u7B49\u7740\u2014\u2014\u6309 Enter \u7EE7\u7EED\uFF08Ctrl+S \u5408\u5E76\u53D1\u9001\uFF09\u3002"
81
+ en: "Stopped. {0} queued background result(s) waiting \u2014 press Enter to merge and continue.",
82
+ zh: "\u5DF2\u505C\u6B62\u3002\u8FD8\u6709 {0} \u9879\u540E\u53F0\u7ED3\u679C\u5F85\u5904\u7406\u2014\u2014\u6309 Enter \u5408\u5E76\u7EE7\u7EED\u3002"
83
83
  },
84
84
  turnStopping: {
85
85
  en: "Stopping\u2026 press Esc again to force",
@@ -3357,6 +3357,10 @@ var COMMAND_DESCRIPTIONS = {
3357
3357
  en: "Reload the connector extension through the running native host",
3358
3358
  zh: "\u901A\u8FC7\u8FD0\u884C\u4E2D\u7684\u539F\u751F host \u91CD\u8F7D\u8FDE\u63A5\u5668\u6269\u5C55"
3359
3359
  },
3360
+ "browser doctor": {
3361
+ en: "Run end-to-end Browser Connector diagnostics and print recovery steps (--browser chrome|firefox [--json])",
3362
+ zh: "\u7AEF\u5230\u7AEF\u8BCA\u65AD\u6D4F\u89C8\u5668\u8FDE\u63A5\u5668\u5E76\u8F93\u51FA\u4FEE\u590D\u6B65\u9AA4\uFF08--browser chrome|firefox [--json]\uFF09"
3363
+ },
3360
3364
  "browser list-tabs": {
3361
3365
  en: "List controllable browser tabs",
3362
3366
  zh: "\u5217\u51FA\u53EF\u63A7\u5236\u7684\u6D4F\u89C8\u5668\u6807\u7B7E\u9875"
@@ -3425,6 +3429,10 @@ var COMMAND_DESCRIPTIONS = {
3425
3429
  en: "Reload the connector extension through the running native host (Compatibility alias of `nolo browser reload`)",
3426
3430
  zh: "\u901A\u8FC7\u8FD0\u884C\u4E2D\u7684\u539F\u751F host \u91CD\u8F7D\u8FDE\u63A5\u5668\u6269\u5C55\uFF08`nolo browser reload` \u7684\u517C\u5BB9\u522B\u540D\uFF09"
3427
3431
  },
3432
+ "chrome doctor": {
3433
+ en: "Run end-to-end Browser Connector diagnostics and print recovery steps (--browser chrome|firefox [--json]) (Compatibility alias of `nolo browser doctor`)",
3434
+ zh: "\u7AEF\u5230\u7AEF\u8BCA\u65AD\u6D4F\u89C8\u5668\u8FDE\u63A5\u5668\u5E76\u8F93\u51FA\u4FEE\u590D\u6B65\u9AA4\uFF08--browser chrome|firefox [--json]\uFF09\uFF08`nolo browser doctor` \u7684\u517C\u5BB9\u522B\u540D\uFF09"
3435
+ },
3428
3436
  "chrome list-tabs": {
3429
3437
  en: "List controllable browser tabs (Compatibility alias of `nolo browser list-tabs`)",
3430
3438
  zh: "\u5217\u51FA\u53EF\u63A7\u5236\u7684\u6D4F\u89C8\u5668\u6807\u7B7E\u9875\uFF08`nolo browser list-tabs` \u7684\u517C\u5BB9\u522B\u540D\uFF09"
@@ -3510,8 +3518,8 @@ var COMMAND_DESCRIPTIONS = {
3510
3518
  zh: "\u663E\u793A\u5F53\u524D\u767B\u5F55\u72B6\u6001"
3511
3519
  },
3512
3520
  "connect": {
3513
- en: "Send machine heartbeats or hold a connector websocket",
3514
- zh: "\u53D1\u9001\u673A\u5668\u5FC3\u8DF3\u6216\u4FDD\u6301\u8FDE\u63A5\u5668 WebSocket"
3521
+ en: "Hold a connector websocket for this machine",
3522
+ zh: "\u4E3A\u5F53\u524D\u673A\u5668\u4FDD\u6301\u8FDE\u63A5\u5668 WebSocket"
3515
3523
  },
3516
3524
  "daemon": {
3517
3525
  en: "Run the connector daemon shortcut",
@@ -8,13 +8,13 @@ import {
8
8
  noloUploadRequest,
9
9
  noloWriteRequest,
10
10
  syncWithServers
11
- } from "./chunk-7OTNBI77.js";
11
+ } from "./chunk-247AAJRK.js";
12
12
  import {
13
13
  getAllServers,
14
14
  getIsDesktopApp,
15
15
  googleSessionServer,
16
16
  scopeGoogleSessionServers
17
- } from "./chunk-C3GOEQJF.js";
17
+ } from "./chunk-BH7CEVOH.js";
18
18
  import {
19
19
  selectIdentityToken,
20
20
  selectIdentityUser,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describeAttachmentForModel
3
- } from "./chunk-ZTLTDUV6.js";
3
+ } from "./chunk-4F7SWSWO.js";
4
4
 
5
5
  // packages/ai/attachments/projectUserPart.ts
6
6
  var isRecord = (value) => typeof value === "object" && value !== null;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  resolveAgentCallPlan
3
- } from "./chunk-NL7J2J5Z.js";
3
+ } from "./chunk-ENYTIRIO.js";
4
4
  import {
5
5
  CUSTOM_API_KEY_TEMPLATES,
6
6
  SUBSCRIPTION_OAUTH_PROVIDERS
7
- } from "./chunk-LN4ZVSO7.js";
7
+ } from "./chunk-Y22P6ASC.js";
8
8
  import {
9
9
  findModelConfig,
10
10
  getProviderByModelName
@@ -0,0 +1,203 @@
1
+ import {
2
+ parseUserIdFromAuthToken,
3
+ resolveAuthToken,
4
+ resolveServerUrl
5
+ } from "./chunk-BIDSIRTS.js";
6
+
7
+ // packages/cli/subscriptionQuotaRefresh.ts
8
+ import {
9
+ mkdirSync,
10
+ readFileSync,
11
+ renameSync,
12
+ writeFileSync
13
+ } from "node:fs";
14
+ import { dirname, join } from "node:path";
15
+ var CATALOG_QUOTA_REFRESH_TIMEOUT_MS = 2e3;
16
+ var FRESH_QUOTA_TTL_MS = 45e3;
17
+ var CACHE_ENTRY_RETENTION_MS = 10 * 6e4;
18
+ var EMPTY_REFRESH_BACKOFF_MS = 5 * 6e4;
19
+ var lastRefreshEmptyAt = 0;
20
+ function hasPendingReset(quota, now) {
21
+ if (!quota || !Array.isArray(quota.windows)) return false;
22
+ const observedAt = typeof quota.observedAt === "number" && Number.isFinite(quota.observedAt) ? quota.observedAt : void 0;
23
+ return quota.windows.some((win) => {
24
+ if (typeof win?.resetAt !== "number" || !Number.isFinite(win.resetAt)) {
25
+ return false;
26
+ }
27
+ if (win.resetAt > now) return false;
28
+ if (observedAt !== void 0 && observedAt < win.resetAt) return true;
29
+ return typeof win.utilization === "number" && win.utilization >= 1 || win.remaining === 0;
30
+ });
31
+ }
32
+ function quotaSnapshotIsFresh(quota, now) {
33
+ const observedAt = quota?.observedAt;
34
+ if (typeof observedAt !== "number" || !Number.isFinite(observedAt)) return false;
35
+ if (now - observedAt >= FRESH_QUOTA_TTL_MS) return false;
36
+ return !hasPendingReset(quota, now);
37
+ }
38
+ function resolveQuotaCachePath(env, hasCustomFetch) {
39
+ const explicitNoloHome = env.NOLO_HOME?.trim();
40
+ const noloHome = explicitNoloHome || (!hasCustomFetch && env.HOME?.trim() ? `${env.HOME.trim()}/.nolo` : "");
41
+ return noloHome ? join(noloHome, "cache", "subscription-quota-refresh.json") : void 0;
42
+ }
43
+ function readQuotaDiskCache(cachePath) {
44
+ if (!cachePath) return {};
45
+ try {
46
+ const parsed = JSON.parse(readFileSync(cachePath, "utf8"));
47
+ return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
48
+ } catch {
49
+ return {};
50
+ }
51
+ }
52
+ function writeQuotaDiskCache(cachePath, cacheKey, quotas, wholeBatch, checkedKeys, now) {
53
+ if (!cachePath) return;
54
+ try {
55
+ const current = readQuotaDiskCache(cachePath);
56
+ const prevScope = current[cacheKey] ?? {};
57
+ const mergedQuotas = {};
58
+ for (const [k, v] of Object.entries(prevScope.quotas ?? {})) {
59
+ if (v && typeof v.observedAt === "number" && Number.isFinite(v.observedAt) && now - v.observedAt < CACHE_ENTRY_RETENTION_MS) {
60
+ mergedQuotas[k] = v;
61
+ }
62
+ }
63
+ for (const [k, v] of Object.entries(quotas)) {
64
+ if (v && Array.isArray(v.windows)) {
65
+ mergedQuotas[k] = v;
66
+ }
67
+ }
68
+ const prevBatchFresh = typeof prevScope.lastBatchRefreshAt === "number" && now - prevScope.lastBatchRefreshAt < FRESH_QUOTA_TTL_MS;
69
+ const mergedCheckedKeys = wholeBatch ? Array.from(
70
+ /* @__PURE__ */ new Set([
71
+ ...prevBatchFresh && Array.isArray(prevScope.checkedKeys) ? prevScope.checkedKeys : [],
72
+ ...checkedKeys
73
+ ])
74
+ ) : prevScope.checkedKeys;
75
+ current[cacheKey] = {
76
+ lastBatchRefreshAt: wholeBatch ? now : prevScope.lastBatchRefreshAt,
77
+ ...mergedCheckedKeys ? { checkedKeys: mergedCheckedKeys } : {},
78
+ quotas: mergedQuotas
79
+ };
80
+ mkdirSync(dirname(cachePath), { recursive: true });
81
+ const tmpPath = `${cachePath}.tmp-${process.pid}-${Date.now()}`;
82
+ writeFileSync(tmpPath, JSON.stringify(current), "utf8");
83
+ renameSync(tmpPath, cachePath);
84
+ } catch {
85
+ }
86
+ }
87
+ function pickNewerQuota(a, b) {
88
+ if (!a) return b;
89
+ if (!b) return a;
90
+ const ta = typeof a.observedAt === "number" && Number.isFinite(a.observedAt) ? a.observedAt : -1;
91
+ const tb = typeof b.observedAt === "number" && Number.isFinite(b.observedAt) ? b.observedAt : -1;
92
+ return tb > ta ? b : a;
93
+ }
94
+ async function refreshSubscriptionQuotas(args) {
95
+ const fresh = {};
96
+ try {
97
+ const now = Date.now();
98
+ const env = args.env ?? process.env;
99
+ const authToken = resolveAuthToken(args.cliArgs ?? [], env);
100
+ if (!authToken) return fresh;
101
+ const wholeBatch = !args.onlyKeys || args.onlyKeys.length === 0;
102
+ const serverUrl = resolveServerUrl(args.cliArgs ?? [], env);
103
+ const cachePath = resolveQuotaCachePath(
104
+ env,
105
+ Boolean(args.fetchImpl && args.fetchImpl !== fetch)
106
+ );
107
+ const userId = parseUserIdFromAuthToken(authToken) ?? "anon";
108
+ const cacheKey = `${serverUrl}::${userId}`;
109
+ const diskCache = !args.forceRefresh ? readQuotaDiskCache(cachePath) : {};
110
+ const scopeCache = diskCache[cacheKey];
111
+ const targetEntries = args.entries.filter(
112
+ (entry) => entry.probeable !== false && (!args.onlyKeys || args.onlyKeys.includes(entry.key))
113
+ );
114
+ const staleTargetKeys = [];
115
+ if (!args.forceRefresh) {
116
+ const batchWindowFresh = wholeBatch && typeof scopeCache?.lastBatchRefreshAt === "number" && now - scopeCache.lastBatchRefreshAt < FRESH_QUOTA_TTL_MS;
117
+ const checkedKeySet = batchWindowFresh ? new Set(Array.isArray(scopeCache?.checkedKeys) ? scopeCache.checkedKeys : []) : null;
118
+ for (const entry of targetEntries) {
119
+ const cachedQuota = scopeCache?.quotas?.[entry.key];
120
+ const bestQuota = pickNewerQuota(entry.quota, cachedQuota);
121
+ if (hasPendingReset(bestQuota, now)) {
122
+ staleTargetKeys.push(entry.key);
123
+ continue;
124
+ }
125
+ if (quotaSnapshotIsFresh(bestQuota, now)) {
126
+ if (cachedQuota && bestQuota === cachedQuota && (!entry.quota || typeof entry.quota.observedAt !== "number" || !Number.isFinite(entry.quota.observedAt) || cachedQuota.observedAt > entry.quota.observedAt)) {
127
+ fresh[entry.key] = cachedQuota;
128
+ }
129
+ continue;
130
+ }
131
+ if (checkedKeySet?.has(entry.key)) {
132
+ continue;
133
+ }
134
+ staleTargetKeys.push(entry.key);
135
+ }
136
+ if (staleTargetKeys.length === 0) return fresh;
137
+ if (wholeBatch && lastRefreshEmptyAt && now - lastRefreshEmptyAt < EMPTY_REFRESH_BACKOFF_MS) {
138
+ return fresh;
139
+ }
140
+ }
141
+ const requestAgentKeys = args.onlyKeys && args.onlyKeys.length > 0 ? args.onlyKeys : !args.forceRefresh && staleTargetKeys.length > 0 && staleTargetKeys.length < targetEntries.length ? staleTargetKeys : void 0;
142
+ const isFullBatchProbe = wholeBatch && !requestAgentKeys;
143
+ const fetchImpl = args.fetchImpl ?? fetch;
144
+ const refreshPromise = (async () => {
145
+ const res = await fetchImpl(
146
+ `${serverUrl}/api/agents/quota/refresh`,
147
+ {
148
+ method: "POST",
149
+ headers: {
150
+ "Content-Type": "application/json",
151
+ Authorization: `Bearer ${authToken}`
152
+ },
153
+ body: JSON.stringify(
154
+ requestAgentKeys && requestAgentKeys.length > 0 ? { agentKeys: requestAgentKeys } : {}
155
+ ),
156
+ signal: AbortSignal.timeout(CATALOG_QUOTA_REFRESH_TIMEOUT_MS)
157
+ }
158
+ );
159
+ if (!res.ok) return;
160
+ const payload = await res.json().catch(() => null);
161
+ const quotas = payload?.quotas;
162
+ if (!quotas || typeof quotas !== "object") return;
163
+ const probed = typeof payload?.probed === "number" ? payload.probed : 0;
164
+ const completedAt = Date.now();
165
+ if (probed === 0 && Object.keys(quotas).length === 0) {
166
+ if (isFullBatchProbe) lastRefreshEmptyAt = completedAt;
167
+ return;
168
+ }
169
+ if (wholeBatch) lastRefreshEmptyAt = 0;
170
+ writeQuotaDiskCache(
171
+ cachePath,
172
+ cacheKey,
173
+ quotas,
174
+ wholeBatch,
175
+ requestAgentKeys ?? targetEntries.map((entry) => entry.key),
176
+ completedAt
177
+ );
178
+ for (const entry of args.entries) {
179
+ const quota = quotas[entry.key];
180
+ if (quota && Array.isArray(quota.windows)) {
181
+ fresh[entry.key] = quota;
182
+ }
183
+ }
184
+ })();
185
+ let timer;
186
+ await Promise.race([
187
+ refreshPromise,
188
+ new Promise((resolve) => {
189
+ timer = setTimeout(resolve, CATALOG_QUOTA_REFRESH_TIMEOUT_MS);
190
+ })
191
+ ]).catch(() => {
192
+ });
193
+ if (timer) clearTimeout(timer);
194
+ refreshPromise.catch(() => {
195
+ });
196
+ } catch {
197
+ }
198
+ return fresh;
199
+ }
200
+
201
+ export {
202
+ refreshSubscriptionQuotas
203
+ };
@@ -11658,7 +11658,7 @@ async function runUsageCommand(args, deps) {
11658
11658
  const output = deps.output ?? process.stdout;
11659
11659
  const errorOutput = deps.errorOutput ?? process.stderr;
11660
11660
  if (args[0] === "rebuild") {
11661
- const { runUsageRebuildCommand } = await import("./usageRebuildCommand-K5WPIBA5.js");
11661
+ const { runUsageRebuildCommand } = await import("./usageRebuildCommand-4TFZCKXM.js");
11662
11662
  return runUsageRebuildCommand(args.slice(1), deps);
11663
11663
  }
11664
11664
  if (hasFlag(args, "-h") || hasFlag(args, "--help")) {
@@ -11729,7 +11729,7 @@ async function runUsageCommand(args, deps) {
11729
11729
  return 0;
11730
11730
  }
11731
11731
  async function resolveUsageUserId(env) {
11732
- const { resolveLocalUserId } = await import("./cliAgentConfigHelpers-RFR7ZCSK.js");
11732
+ const { resolveLocalUserId } = await import("./cliAgentConfigHelpers-6OFDHJFT.js");
11733
11733
  return resolveLocalUserId(env);
11734
11734
  }
11735
11735
  function isLocalDbMissingError(error) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  t
3
- } from "./chunk-YFRJAE3R.js";
3
+ } from "./chunk-OGZE6BZG.js";
4
4
 
5
5
  // packages/cli/windowsSelfUpdate.ts
6
6
  import { spawn } from "node:child_process";