nolo-cli 0.227.0-alpha.1 → 0.228.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 (197) hide show
  1. package/{_executeModel-JKQGZ3HU.js → _executeModel-WZKT6XEU.js} +76 -77
  2. package/{action-CK64LS6S.js → action-GDZDXPMB.js} +9 -9
  3. package/{addContentAction-CARFID6E.js → addContentAction-7RO4AMRI.js} +14 -14
  4. package/{addDialogAgentAction-APLZLFW5.js → addDialogAgentAction-EVYBGTXB.js} +16 -16
  5. package/{agentDeleteCommand-NVR2V2HH.js → agentDeleteCommand-PZWRHNXY.js} +113 -114
  6. package/{agentEmailCommands-UCVOWD3S.js → agentEmailCommands-QTKMEICX.js} +116 -117
  7. package/{agentFavoriteCommands-4PDOP3GW.js → agentFavoriteCommands-7LOP3HUD.js} +6 -6
  8. package/{agentGrantCommands-FLCEXLUH.js → agentGrantCommands-L6O2HVJI.js} +7 -7
  9. package/{agentListCommands-C65UESYM.js → agentListCommands-GUGMORTK.js} +72 -71
  10. package/{agentMachineCommands-V3DGEJU4.js → agentMachineCommands-7QGICJLM.js} +57 -56
  11. package/{agentProviderCommands-7QBFRFRK.js → agentProviderCommands-STI3DQ6A.js} +7 -7
  12. package/{agentPullCommand-E6JBGBVG.js → agentPullCommand-KHV4EELF.js} +6 -6
  13. package/{agentRecordCommands-6RCJS2EY.js → agentRecordCommands-SLLADS5C.js} +104 -105
  14. package/{agentRunCommand-P3GRKXKS.js → agentRunCommand-OFQLOF5Y.js} +110 -111
  15. package/{agentRunControl-SNZZ5XP4.js → agentRunControl-MBG4U6SL.js} +23 -17
  16. package/{agentRuntimeLocal-GOX2DIY7.js → agentRuntimeLocal-TU4LA353.js} +44 -44
  17. package/{agentSlice-N7H2FRJA.js → agentSlice-L4SBGWTB.js} +17 -17
  18. package/{appDeleteCommands-LZDN26FU.js → appDeleteCommands-JWP3XPUA.js} +52 -51
  19. package/{appDeployCommands-6IO6TTZH.js → appDeployCommands-6E4TQCWI.js} +52 -51
  20. package/{appDeployStatusCommands-FG3LX24J.js → appDeployStatusCommands-ALU4SADG.js} +52 -51
  21. package/{appGetCommands-NAKVDVD4.js → appGetCommands-JEY4L6L4.js} +52 -51
  22. package/{appListCommands-KL56RN73.js → appListCommands-PCAVHU7M.js} +52 -51
  23. package/{authCommand-AUN5MXV2.js → authCommand-CGRIIOOV.js} +30 -31
  24. package/{authCommands-D2IPS6ES.js → authCommands-55OGQGCR.js} +12 -13
  25. package/{builtinSkillRegistry-UQGLKRYP.js → builtinSkillRegistry-BAE2LDXF.js} +4 -4
  26. package/{chromeOpsCommands-UJWN5HWH.js → chromeOpsCommands-WAA45NCS.js} +8 -8
  27. package/{chunk-OB6DVWPF.js → chunk-262R3XNN.js} +16 -2
  28. package/{chunk-KMRKZNGT.js → chunk-2MCB7CD7.js} +13 -12
  29. package/{chunk-YPPKC6FL.js → chunk-2NPD3FTX.js} +3 -3
  30. package/{chunk-UN7HIYMH.js → chunk-2X7WFDT6.js} +1 -1
  31. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  32. package/{chunk-JWXITTQB.js → chunk-3P54D2E4.js} +1 -1
  33. package/{chunk-RU6DULV4.js → chunk-3U44JB3O.js} +1 -1
  34. package/{chunk-EUCFKKDM.js → chunk-4I2MXV5Q.js} +38 -10
  35. package/{chunk-PLPLH2XZ.js → chunk-4ZGPHFLE.js} +2 -2
  36. package/{chunk-NO3VBWTL.js → chunk-547ENH5T.js} +1 -1
  37. package/chunk-5ZUOVCKT.js +32 -0
  38. package/{chunk-XZODOEKU.js → chunk-6QHKRARD.js} +2 -2
  39. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  40. package/{chunk-VPAZ6BEN.js → chunk-7JGMNKKG.js} +18 -14
  41. package/{chunk-3VFYQH3I.js → chunk-AGYPUBFW.js} +14 -39
  42. package/{chunk-5HL4KC4A.js → chunk-ALAES342.js} +57 -86
  43. package/{chunk-VREDDN25.js → chunk-ATEKLSLR.js} +1 -1
  44. package/{chunk-CQVGR3MX.js → chunk-AUAJTAFM.js} +8 -8
  45. package/chunk-BIDSIRTS.js +307 -0
  46. package/chunk-BIWI5M4E.js +62 -0
  47. package/{chunk-L5I543VB.js → chunk-BNMPUQW6.js} +1 -1
  48. package/{chunk-UCFPVYP7.js → chunk-BP5ZJ6B4.js} +1 -1
  49. package/{chunk-2G3YSVO6.js → chunk-CBUZ6DKA.js} +3 -3
  50. package/{chunk-KYH7XW3K.js → chunk-CD3RU7XL.js} +16 -1
  51. package/{chunk-SFTTXGPM.js → chunk-CMMI3DAT.js} +16 -16
  52. package/{chunk-VZW34YUL.js → chunk-CYWNWA77.js} +5 -5
  53. package/{chunk-5LQDHFBN.js → chunk-D6YNCNM6.js} +14 -11
  54. package/{chunk-UVUVQVZ6.js → chunk-DBUR22G5.js} +2 -2
  55. package/{chunk-7Z3WUZ4Q.js → chunk-DDC6P6EH.js} +24 -24
  56. package/{chunk-G6HJUMST.js → chunk-DEA37IUY.js} +2 -2
  57. package/{chunk-5RKRXQ2H.js → chunk-DGYCDA6W.js} +2 -2
  58. package/{chunk-3HTP4WZQ.js → chunk-DUUDXSLX.js} +21 -7
  59. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  60. package/{chunk-TOKPHZ55.js → chunk-EEOOBRA7.js} +5 -5
  61. package/{chunk-UAPNPNSG.js → chunk-EXJK7TQO.js} +1040 -582
  62. package/{chunk-OXA5GWHU.js → chunk-F6Z6ZCUV.js} +2 -2
  63. package/{chunk-X2KRQP7V.js → chunk-FJSNBZXR.js} +1 -1
  64. package/{chunk-KRRE4A7D.js → chunk-G7IUT2V3.js} +3 -2
  65. package/{chunk-VIHDJ3FK.js → chunk-GACR7H6T.js} +14 -14
  66. package/{chunk-GOLPOTG5.js → chunk-GOCSSER3.js} +3 -3
  67. package/{chunk-NAOO4PVX.js → chunk-GPOV42YM.js} +16 -16
  68. package/{chunk-C2B7M567.js → chunk-GUXZK7SE.js} +5 -5
  69. package/{chunk-TINJKQSO.js → chunk-GYS5FUYR.js} +20 -20
  70. package/{chunk-IAJJYHIB.js → chunk-H6L2NFHY.js} +7 -7
  71. package/{chunk-45LZIYXB.js → chunk-HBRDSQ3M.js} +1 -1
  72. package/{chunk-T5N6NHAT.js → chunk-HHFGE2WF.js} +3 -3
  73. package/{chunk-IX2BXN2K.js → chunk-HSSBDZLD.js} +3 -3
  74. package/{chunk-MWHOH4RJ.js → chunk-HYLRQDEE.js} +4 -4
  75. package/{chunk-ZYA2YDB6.js → chunk-IAAIUH64.js} +16 -16
  76. package/{chunk-LXTC53TN.js → chunk-IXG6YXQM.js} +143 -123
  77. package/{chunk-CVERLOJM.js → chunk-JUSHVFNF.js} +236 -182
  78. package/{chunk-ABGULE7H.js → chunk-K67C2JUC.js} +12 -12
  79. package/{chunk-T2BEPTAG.js → chunk-L32W3PRP.js} +47 -17
  80. package/{chunk-M3Y4IBIR.js → chunk-M4SFKP5L.js} +4 -4
  81. package/{chunk-ZI5SZ3MV.js → chunk-MDZWUD3R.js} +20 -20
  82. package/{chunk-F5AY2UZL.js → chunk-NHY322ZU.js} +8 -8
  83. package/{chunk-KJAAPGBE.js → chunk-OBIC6EG7.js} +6 -6
  84. package/{chunk-4OKTPFNX.js → chunk-OG6MQOQG.js} +105 -37
  85. package/{chunk-AXYH4734.js → chunk-OOJNQK6V.js} +13 -13
  86. package/{chunk-XIEYGCN6.js → chunk-OWKNSIXL.js} +149 -48
  87. package/{chunk-JHF6VLVL.js → chunk-OYU2MA5S.js} +29 -29
  88. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  89. package/{chunk-CKT6QUE2.js → chunk-Q3IVPFVO.js} +1 -1
  90. package/{chunk-PHOSZT3E.js → chunk-QBZCGP34.js} +1 -1
  91. package/{chunk-CLCXHIBS.js → chunk-QCB42576.js} +1 -1
  92. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  93. package/{chunk-YQETUZ5V.js → chunk-QRGDJA4B.js} +11 -11
  94. package/{chunk-ULAQPRHX.js → chunk-QYB23WUH.js} +1 -1
  95. package/{chunk-PVAWNHP5.js → chunk-R3NEQZ53.js} +295 -102
  96. package/{chunk-CSW7IPVD.js → chunk-R6Z5S5GA.js} +11 -11
  97. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  98. package/{chunk-GUVXQSFZ.js → chunk-RBPUNSG5.js} +1 -1
  99. package/{chunk-GOQ6ZVTN.js → chunk-RG2DGNL6.js} +3 -3
  100. package/{chunk-6EDAMVG6.js → chunk-RTHFJZ6M.js} +10 -10
  101. package/{chunk-YOT437BH.js → chunk-RYOLWYBK.js} +122 -118
  102. package/{chunk-WJP4TH6U.js → chunk-S6FDXXZV.js} +1 -1
  103. package/{chunk-SW6OD4KE.js → chunk-SMJEXX2S.js} +123 -12
  104. package/{chunk-LJSNEV7M.js → chunk-SRCCSTIM.js} +7 -7
  105. package/{chunk-FKEZOMIF.js → chunk-STJ6LSQE.js} +453 -193
  106. package/{chunk-L42CBKBZ.js → chunk-TGNIKIHR.js} +3 -3
  107. package/{chunk-AK5O76CC.js → chunk-TI2EPRHE.js} +2 -2
  108. package/{chunk-SRG5CNLC.js → chunk-TSPMLCWI.js} +6 -6
  109. package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
  110. package/{chunk-2SKTCNWO.js → chunk-UE2EVEYS.js} +2 -2
  111. package/{chunk-ZADGPNTV.js → chunk-UWAIJOF2.js} +29 -29
  112. package/{chunk-HVUDBOQG.js → chunk-VMJVAJ6W.js} +9 -6
  113. package/{chunk-LA7JYAKF.js → chunk-VSYTM22R.js} +3 -3
  114. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  115. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  116. package/{chunk-GRXSJR2Z.js → chunk-XJPLSAPJ.js} +21 -21
  117. package/{chunk-HYKGIXNO.js → chunk-XSW4EXQV.js} +85 -21
  118. package/{chunk-T43K75CK.js → chunk-YKY4OVOX.js} +15 -15
  119. package/{chunk-5RKUPJYL.js → chunk-ZH3KXFHS.js} +11 -3
  120. package/chunk-ZOHO6MOF.js +376 -0
  121. package/{chunk-PXKF5CV4.js → chunk-ZXF6D3I6.js} +10 -8
  122. package/{cliAgentConfigHelpers-QVSQYTKC.js → cliAgentConfigHelpers-BTRHMPW2.js} +14 -14
  123. package/{cliEnvHelpers-D6HMC46Z.js → cliEnvHelpers-CNMP3RDX.js} +2 -2
  124. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  125. package/{cliLocalAgentRecordReader-SPKAJYME.js → cliLocalAgentRecordReader-M3F76NIP.js} +46 -46
  126. package/{commandRegistry-TKR6OWXP.js → commandRegistry-ZLWHQVAI.js} +93 -93
  127. package/{contentThunks-BQWRPCTM.js → contentThunks-4ZX2TO7C.js} +36 -35
  128. package/{cooldownCommands-FZYQOWI5.js → cooldownCommands-YB5H5BBK.js} +3 -3
  129. package/{createAgentAutomationAction-GFI6SJZV.js → createAgentAutomationAction-L4CYUZJG.js} +36 -35
  130. package/{createDialogAction-MMBIHFFU.js → createDialogAction-QTU2R2Q3.js} +37 -37
  131. package/{createPageAction-EEYUE5FB.js → createPageAction-F3GJTHW2.js} +39 -38
  132. package/{db-CS4ZJQKV.js → db-M7FU2GNK.js} +9 -6
  133. package/{dbSlice-X4Z4E4QU.js → dbSlice-XRUZOGSU.js} +13 -13
  134. package/{deleteFile-QOOP2UK7.js → deleteFile-6URDHYRB.js} +9 -9
  135. package/{dialogCommands-OXBQ73DD.js → dialogCommands-NRLCOPJR.js} +56 -56
  136. package/{dialogNotifyCommand-VWS5G4OO.js → dialogNotifyCommand-SHGPCU22.js} +17 -17
  137. package/{dialogSlice-KGYIABDY.js → dialogSlice-P2S4LXQD.js} +34 -33
  138. package/{dialogUsageCommand-FEWCN7IA.js → dialogUsageCommand-W2WCSGKF.js} +6 -6
  139. package/{docCreateCommands-LS32VKY3.js → docCreateCommands-YJRDA3RX.js} +51 -50
  140. package/{docDeleteCommands-JTYR5RPH.js → docDeleteCommands-A5QIHZNF.js} +53 -52
  141. package/{docReadCommands-E5LTVKWN.js → docReadCommands-CF2LTMYH.js} +51 -50
  142. package/{docStore-TVS2FNER.js → docStore-6O7NYL6A.js} +15 -15
  143. package/{docUpdateCommands-I3J3JDZ2.js → docUpdateCommands-QRKV4ZXE.js} +51 -50
  144. package/{fetchMessages-Q3INLN5F.js → fetchMessages-TQEUZD7H.js} +3 -3
  145. package/{getPricing-VNGFM4PN.js → getPricing-LF5C4XSI.js} +6 -6
  146. package/{handleSendMessageAction-SSON36TJ.js → handleSendMessageAction-7IHLR37A.js} +66 -66
  147. package/{hostCredentialCreate-WTW4THJF.js → hostCredentialCreate-VNCQUAFT.js} +104 -105
  148. package/index.js +54 -16
  149. package/keys-RWF7UCB4.js +1 -1
  150. package/{localDialogRead-V36DX2Q2.js → localDialogRead-CCOCVGAP.js} +2 -2
  151. package/{localRuntimeAdapter-MI2JGXSF.js → localRuntimeAdapter-FOWVNMIK.js} +111 -112
  152. package/{machineCommands-3LROJZDK.js → machineCommands-ZGC3J4JB.js} +115 -116
  153. package/{machineWsRunDispatch-BUUJRUUB.js → machineWsRunDispatch-KK5U4M3G.js} +102 -103
  154. package/{memberThunks-CFEPHAND.js → memberThunks-7Y3OYSJQ.js} +17 -17
  155. package/{memoryCommands-JQMEJO7J.js → memoryCommands-BC6REPQB.js} +6 -6
  156. package/{overlay-THLKYIWY.js → overlay-BBQZXGYI.js} +5 -3
  157. package/package.json +1 -1
  158. package/{projectArchive-3X54XFVN.js → projectArchive-7ZDYBXAX.js} +44 -43
  159. package/{providerPresetApply-FO36N5TX.js → providerPresetApply-WHAMP2D5.js} +9 -9
  160. package/{providerRegistry-U2BSFE6K.js → providerRegistry-ZI2KORJ7.js} +9 -9
  161. package/{read-KA3L2V7O.js → read-TYMBGEXO.js} +9 -9
  162. package/{readDocTool-AMAZAPAW.js → readDocTool-SKQVHBLO.js} +1 -1
  163. package/{readlineWorkspace-Z3YUH4SX.js → readlineWorkspace-YHT4SX2C.js} +4391 -4161
  164. package/{removeDialogAgentAction-JQOJSUM7.js → removeDialogAgentAction-F5QE2O2B.js} +19 -19
  165. package/{runAgentClientLoop-4FCFLMDJ.js → runAgentClientLoop-H4ED5V3K.js} +70 -71
  166. package/{runtimeDoctorCommands-CXOCVDPU.js → runtimeDoctorCommands-RRKPBGVO.js} +16 -16
  167. package/{secretCommands-GGUAWAE7.js → secretCommands-KZWBZIYS.js} +2 -2
  168. package/{setDialogExtraReferencesAction-YXQTGXIN.js → setDialogExtraReferencesAction-72L27ERM.js} +15 -15
  169. package/{setPrimaryDialogAgentAction-YNLB66WE.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +19 -19
  170. package/{settingThunks-E6N7RSSS.js → settingThunks-ZRGWVGZD.js} +18 -18
  171. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-I37M5KJC.js} +3 -3
  172. package/{spaceCommands-DB5DKC2J.js → spaceCommands-MEH3HJBC.js} +53 -52
  173. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  174. package/{streamAgentChatTurn-FCBGMD4D.js → streamAgentChatTurn-ZXPOXU33.js} +91 -92
  175. package/{switchDialogAgentAction-LAHLUECU.js → switchDialogAgentAction-IIJBPND3.js} +16 -16
  176. package/{tableCommands-VNSXHAMG.js → tableCommands-FTAOCBTX.js} +12 -12
  177. package/{tools-6JD36D6K.js → tools-2MRWA2PP.js} +59 -60
  178. package/tuiRestart-2IL37YIB.js +41 -0
  179. package/{tuiSummaryLlmCaller-UHZIPGAX.js → tuiSummaryLlmCaller-W2QN4VAC.js} +21 -21
  180. package/{updateCommands-KZ54HCU5.js → updateCommands-CPATDG6J.js} +8 -6
  181. package/{updateDialogTitleAction-RV3EUEN3.js → updateDialogTitleAction-RZ3KZSGQ.js} +36 -35
  182. package/{usageCommand-KFVV6UL3.js → usageCommand-2BF74MKF.js} +2 -2
  183. package/{usageRebuildCommand-HHFSNK46.js → usageRebuildCommand-UHB55BQM.js} +3 -3
  184. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-ZFD6J5HF.js} +2 -2
  185. package/chunk-BJF2MHJ3.js +0 -118
  186. package/chunk-KEPOVMF4.js +0 -91
  187. package/chunk-PMDVQBGA.js +0 -100
  188. package/chunk-WACI5I6V.js +0 -147
  189. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +4 -4
  190. package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
  191. package/{chunk-VXL2FZTP.js → chunk-HXER7YJF.js} +3 -3
  192. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  193. package/{chunk-SSGTV4FC.js → chunk-USGHJSGO.js} +5 -5
  194. package/{chunk-IC2I373Q.js → chunk-VS276URX.js} +3 -3
  195. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
  196. package/{offlineMarxistsAgentCommand-AGA2X5E4.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +5 -5
  197. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
@@ -1,25 +1,30 @@
1
1
  import {
2
2
  resolveRuntimeAuthToken,
3
3
  resolveRuntimeServerUrl
4
- } from "./chunk-UN7HIYMH.js";
4
+ } from "./chunk-2X7WFDT6.js";
5
5
  import {
6
6
  isAgentRunTerminalStatus,
7
7
  normalizeRunTitle,
8
8
  shortAgentKey
9
- } from "./chunk-AXYH4734.js";
9
+ } from "./chunk-OOJNQK6V.js";
10
10
  import {
11
11
  findPowerShellExecutable
12
- } from "./chunk-HVUDBOQG.js";
12
+ } from "./chunk-VMJVAJ6W.js";
13
13
  import {
14
14
  AUTH_ERROR_PATTERNS
15
15
  } from "./chunk-EWQ3HGNZ.js";
16
+ import {
17
+ AGENT_RUN_PROTOCOL,
18
+ HOST_RUNTIME_CONTENT_IDENTITY,
19
+ RuntimeVersionMismatchError,
20
+ getHostRuntimeExecutable,
21
+ isCompiledBinary,
22
+ resolveCliEntrypointPath,
23
+ resolveExactRuntimeEntrypoint
24
+ } from "./chunk-BIDSIRTS.js";
16
25
  import {
17
26
  isRecord
18
27
  } from "./chunk-KUG52IAP.js";
19
- import {
20
- isCompiledBinary,
21
- resolveCliEntrypointPath
22
- } from "./chunk-WACI5I6V.js";
23
28
 
24
29
  // packages/cli/client/originShellApprovalTransport.ts
25
30
  import { realpathSync } from "node:fs";
@@ -2022,6 +2027,34 @@ function listRunRecords(deps = {}) {
2022
2027
  (a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime()
2023
2028
  );
2024
2029
  }
2030
+ async function listRunRecordsAsync(deps = {}) {
2031
+ const dir = resolveRunsDir(deps.env, deps.homedir);
2032
+ let entries;
2033
+ try {
2034
+ entries = await nodeFs2.promises.readdir(dir);
2035
+ } catch {
2036
+ return [];
2037
+ }
2038
+ const records = new Array(entries.length);
2039
+ let next = 0;
2040
+ const readNext = async () => {
2041
+ while (next < entries.length) {
2042
+ const index = next++;
2043
+ const entry = entries[index];
2044
+ if (!entry.endsWith(".json")) continue;
2045
+ const path = resolveRunRecordPath(entry.slice(0, -5), deps.env, deps.homedir);
2046
+ for (let attempt = 0; attempt < 2; attempt++) {
2047
+ try {
2048
+ records[index] = JSON.parse(await nodeFs2.promises.readFile(path, "utf8"));
2049
+ break;
2050
+ } catch {
2051
+ }
2052
+ }
2053
+ }
2054
+ };
2055
+ await Promise.all(Array.from({ length: Math.min(16, entries.length) }, readNext));
2056
+ return records.filter((record) => Boolean(record)).sort((a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime());
2057
+ }
2025
2058
  function findRunRecordByPid(pid, deps = {}) {
2026
2059
  return listRunRecords(deps).find((record) => record.pid === pid);
2027
2060
  }
@@ -2215,38 +2248,22 @@ function rewriteMsgFileArg(args, messagePath) {
2215
2248
  return result;
2216
2249
  }
2217
2250
  function resolveValidCliEntrypoint(cliEntrypointPath, fs = nodeFs2) {
2218
- if (cliEntrypointPath && fs.existsSync(cliEntrypointPath)) {
2219
- return cliEntrypointPath;
2220
- }
2221
- const fallback = resolveCliEntrypointPath();
2222
- if (fs.existsSync(fallback)) {
2223
- return fallback;
2224
- }
2225
- const candidates = [
2226
- join2(dirname(fallback), "cli", "index.ts"),
2227
- join2(dirname(fallback), "cli", "index.js"),
2228
- join2(dirname(fallback), "..", "packages", "cli", "index.ts"),
2229
- join2(dirname(fallback), "..", "packages", "cli", "index.js"),
2230
- join2(dirname(fallback), "..", "index.js")
2231
- ];
2232
- for (const cand of candidates) {
2233
- if (fs.existsSync(cand)) {
2234
- return cand;
2235
- }
2236
- }
2237
- return fallback;
2251
+ const entrypoint = cliEntrypointPath ?? resolveCliEntrypointPath();
2252
+ if (!fs.existsSync(entrypoint)) throw new RuntimeVersionMismatchError("runtime entrypoint missing");
2253
+ return fs === nodeFs2 ? resolveExactRuntimeEntrypoint(entrypoint) : String(fs.realpathSync?.(entrypoint) ?? entrypoint);
2238
2254
  }
2239
2255
  function buildAgentRunChildCommand(options, deps = {}) {
2240
2256
  const fs = deps.fs ?? nodeFs2;
2241
- const execPath = process.execPath;
2257
+ const execPath = getHostRuntimeExecutable();
2242
2258
  const commandParts = options.commandPath ?? [];
2243
2259
  let strippedArgs = stripBackgroundFlag(options.rawArgs);
2244
2260
  if (options.messagePath) {
2245
2261
  strippedArgs = rewriteMsgFileArg(strippedArgs, options.messagePath);
2246
2262
  }
2247
2263
  strippedArgs = absolutizeSkillArgs(strippedArgs);
2248
- if (isCompiledBinary() || options.cliEntrypointPath === execPath) {
2249
- return { execPath, childArgs: [...commandParts, ...strippedArgs] };
2264
+ if (isCompiledBinary() || options.cliEntrypointPath === process.execPath || options.cliEntrypointPath === execPath) {
2265
+ const fixed = resolveValidCliEntrypoint(isCompiledBinary() ? execPath : options.cliEntrypointPath ?? execPath, fs);
2266
+ return { execPath: fixed, childArgs: [...commandParts, ...strippedArgs] };
2250
2267
  }
2251
2268
  const entrypoint = resolveValidCliEntrypoint(options.cliEntrypointPath, fs);
2252
2269
  if (entrypoint === execPath) {
@@ -2534,6 +2551,48 @@ function releaseUnspawnedLocalWriterClaim(runId, deps) {
2534
2551
  }, { strict: true });
2535
2552
  if (!released) throw new Error(`[local-writer-resource] release lock busy: ${runId}`);
2536
2553
  }
2554
+ async function recordRunStartup(runId, phase, deps = {}) {
2555
+ const attempt = () => withRunRecordLock(runId, deps, () => {
2556
+ const record = readRunRecord(runId, deps);
2557
+ if (!record || isRunTerminalStatus(record.status)) return true;
2558
+ record.startup = { protocol: AGENT_RUN_PROTOCOL, phase };
2559
+ writeRunRecord(record, deps);
2560
+ return true;
2561
+ }, { strict: true });
2562
+ const deadline = Date.now() + 2e3;
2563
+ while (!attempt()) {
2564
+ if (Date.now() >= deadline) throw new Error(`Startup evidence lock busy: ${runId}`);
2565
+ await new Promise((resolve2) => setTimeout(resolve2, 20));
2566
+ }
2567
+ }
2568
+ async function settleBackgroundProcessExit(runId, code, signal, deps = {}) {
2569
+ const deadline = Date.now() + 2e3;
2570
+ while (true) {
2571
+ const settled = withRunRecordLock(runId, deps, () => {
2572
+ const record = readRunRecord(runId, deps);
2573
+ if (!record) return true;
2574
+ if (isRunTerminalStatus(record.status)) {
2575
+ record.processExit = { code, signal };
2576
+ writeRunRecord(record, deps);
2577
+ return true;
2578
+ }
2579
+ return false;
2580
+ }, { strict: true });
2581
+ if (settled === true) return;
2582
+ if (settled === false) {
2583
+ const result = transitionRunToTerminal(runId, {
2584
+ status: signal === "SIGTERM" || signal === "SIGKILL" ? "killed" : "failed",
2585
+ exitCode: code ?? 1,
2586
+ processExit: { code, signal },
2587
+ failureReason: signal === "SIGTERM" || signal === "SIGKILL" ? "cancelled" : "startup_failed",
2588
+ note: `Child exited without terminal result (code=${code}, signal=${signal})`
2589
+ }, deps);
2590
+ if (result.kind !== "contended") return;
2591
+ }
2592
+ if (Date.now() >= deadline) throw new Error(`Process exit settlement lock busy: ${runId}`);
2593
+ await (deps.sleep ?? defaultSleep)(20);
2594
+ }
2595
+ }
2537
2596
  async function spawnLocalBackgroundRun(input, deps = {}) {
2538
2597
  const homedir = deps.homedir ?? nodeHomedir;
2539
2598
  const env = deps.env ?? (deps.homedir ? { ...process.env, NOLO_HOME: join2(homedir(), ".nolo") } : process.env);
@@ -2606,6 +2665,7 @@ async function spawnLocalBackgroundRun(input, deps = {}) {
2606
2665
  ...input.evidenceScope ? { evidenceScope: input.evidenceScope } : {},
2607
2666
  ...input.dispatchSpeedProvenance ? { dispatchSpeedProvenance: input.dispatchSpeedProvenance } : {},
2608
2667
  runId,
2668
+ startup: { protocol: AGENT_RUN_PROTOCOL, phase: "spawn" },
2609
2669
  agentKey: input.agentKey,
2610
2670
  agentName: input.agentName?.trim() || shortAgentKey(input.agentKey),
2611
2671
  ...title ? { title } : {},
@@ -2636,17 +2696,32 @@ async function spawnLocalBackgroundRun(input, deps = {}) {
2636
2696
  const rawArgsWithQueue = (input.rawArgs ?? []).some(
2637
2697
  (arg) => arg === "--queue-file" || arg.startsWith("--queue-file=")
2638
2698
  ) ? input.rawArgs : [...input.rawArgs ?? [], "--queue-file", queuePath];
2639
- const { execPath, childArgs } = buildAgentRunChildCommand(
2640
- {
2641
- rawArgs: rawArgsWithQueue,
2642
- commandPath: input.commandPath,
2643
- cliEntrypointPath: input.cliEntrypointPath,
2644
- messagePath
2645
- },
2646
- deps
2647
- );
2699
+ let childCommand;
2700
+ try {
2701
+ childCommand = buildAgentRunChildCommand(
2702
+ {
2703
+ rawArgs: rawArgsWithQueue,
2704
+ commandPath: input.commandPath,
2705
+ cliEntrypointPath: input.cliEntrypointPath,
2706
+ messagePath
2707
+ },
2708
+ deps
2709
+ );
2710
+ } catch (error) {
2711
+ const result = await settleRunTerminalAuthoritatively(runId, {
2712
+ status: "failed",
2713
+ exitCode: 1,
2714
+ failureReason: error instanceof RuntimeVersionMismatchError ? "runtime_version_mismatch" : "startup_failed",
2715
+ note: String(error)
2716
+ }, resolvedDeps, (id, update, d) => transitionRunToTerminal(id, update, d));
2717
+ if (result.kind === "contended") throw new Error(`Startup settlement lock busy: ${runId}; ${error}`);
2718
+ throw error;
2719
+ }
2720
+ const { execPath, childArgs } = childCommand;
2648
2721
  const childEnv = {
2649
2722
  ...env,
2723
+ NOLO_AGENT_RUN_PROTOCOL: AGENT_RUN_PROTOCOL,
2724
+ NOLO_AGENT_RUN_CONTENT_IDENTITY: HOST_RUNTIME_CONTENT_IDENTITY,
2650
2725
  NOLO_AGENT_RUN_CHILD: "1",
2651
2726
  NOLO_AGENT_RUN_ID: runId,
2652
2727
  ...record.writerLaunch ? { NOLO_WRITER_LAUNCH_ATTEMPT: record.writerLaunch.attemptId } : {}
@@ -2699,24 +2774,42 @@ async function spawnLocalBackgroundRun(input, deps = {}) {
2699
2774
  reservation?.release("spawn_sync_failed");
2700
2775
  if (input.claimLocalWrites) releaseUnspawnedLocalWriterClaim(runId, resolvedDeps);
2701
2776
  } finally {
2702
- finalizeRunRecord(runId, { status: "failed", exitCode: 1, note: String(error) }, resolvedDeps);
2777
+ finalizeRunRecord(runId, { status: "failed", exitCode: 1, failureReason: error instanceof RuntimeVersionMismatchError ? "runtime_version_mismatch" : "startup_failed", note: String(error) }, resolvedDeps);
2703
2778
  }
2704
2779
  throw error;
2705
2780
  } finally {
2706
2781
  fs.closeSync?.(logFd);
2707
2782
  }
2708
2783
  proc.once?.("error", (error) => {
2784
+ let note = String(error);
2709
2785
  try {
2710
2786
  reservation.release("child_error");
2711
2787
  } catch (releaseError) {
2712
- finalizeRunRecord(runId, {
2713
- status: "failed",
2714
- exitCode: 1,
2715
- note: `${error}; reservation release failed: ${releaseError}`
2716
- }, resolvedDeps);
2717
- return;
2788
+ note += `; reservation release failed: ${releaseError}`;
2789
+ }
2790
+ void settleRunTerminalAuthoritatively(runId, {
2791
+ status: "failed",
2792
+ exitCode: 1,
2793
+ failureReason: "startup_failed",
2794
+ note
2795
+ }, resolvedDeps, (id, update, d) => transitionRunToTerminal(id, update, d)).then((result) => {
2796
+ if (result.kind === "contended") throw new Error(`Startup settlement lock busy: ${runId}`);
2797
+ }).catch((error2) => {
2798
+ input.output?.write(`[nolo] background error settlement failed: ${error2}
2799
+ `);
2800
+ });
2801
+ });
2802
+ proc.once?.("exit", (code, signal) => {
2803
+ void settleBackgroundProcessExit(runId, code, signal, resolvedDeps).catch((error) => {
2804
+ input.output?.write(`[nolo] background exit settlement failed: ${error}
2805
+ `);
2806
+ });
2807
+ try {
2808
+ reservation.release("child_exit");
2809
+ } catch (error) {
2810
+ input.output?.write(`[nolo] reservation release failed: ${error}
2811
+ `);
2718
2812
  }
2719
- finalizeRunRecord(runId, { status: "failed", exitCode: 1, note: String(error) }, resolvedDeps);
2720
2813
  });
2721
2814
  const hostMemoryNotice = emitHostMemoryNotice(hostMemory, input.output);
2722
2815
  if (typeof proc.pid === "number") {
@@ -2871,10 +2964,15 @@ function transitionRunToTerminal(runId, update, deps = {}, options = {}) {
2871
2964
  if (!record2) return { kind: "not_found" };
2872
2965
  const orphanCorrection = options.allowOverOrphaned === true && record2.status === "orphaned" && (update.status === "done" || update.status === "failed");
2873
2966
  if (isAgentRunTerminalStatus(record2.status) && !orphanCorrection) {
2967
+ if (update.processExit) {
2968
+ record2.processExit = update.processExit;
2969
+ writeRunRecord(record2, deps);
2970
+ }
2874
2971
  return { kind: "kept", record: record2 };
2875
2972
  }
2876
2973
  const now = deps.now ?? (() => /* @__PURE__ */ new Date());
2877
2974
  record2.status = update.status;
2975
+ if (update.processExit) record2.processExit = update.processExit;
2878
2976
  if (typeof update.exitCode === "number") record2.exitCode = update.exitCode;
2879
2977
  if (update.dialogId) record2.dialogId = update.dialogId;
2880
2978
  if (typeof update.credits === "number" && Number.isFinite(update.credits)) {
@@ -2928,7 +3026,7 @@ function transitionRunToTerminal(runId, update, deps = {}, options = {}) {
2928
3026
  };
2929
3027
  record2.resultArtifacts = [...(record2.resultArtifacts ?? []).filter((a) => a.path !== path), artifact];
2930
3028
  };
2931
- if (typeof update.lastAssistantText === "string" && update.lastAssistantText || update.acceptance?.checks.observations?.length) {
3029
+ if (typeof update.lastAssistantText === "string" && update.lastAssistantText || update.acceptance?.checks.observations?.length || update.failureReason === "startup_failed" || update.failureReason === "runtime_protocol_mismatch" || update.failureReason === "runtime_version_mismatch") {
2932
3030
  try {
2933
3031
  const fs = deps.fs ?? nodeFs2;
2934
3032
  const resultFile = join2(resolveRunsDir(deps.env, deps.homedir), `${runId}.result.md`);
@@ -3678,6 +3776,7 @@ export {
3678
3776
  readRunRecord,
3679
3777
  backfillRunRecordParentDialog,
3680
3778
  listRunRecords,
3779
+ listRunRecordsAsync,
3681
3780
  findRunRecordByPid,
3682
3781
  findRunRecord,
3683
3782
  DEFAULT_LIST_LIMIT,
@@ -3695,6 +3794,8 @@ export {
3695
3794
  awaitLocalWriterChild,
3696
3795
  resolveLocalContinuation,
3697
3796
  registerLocalForegroundWriter,
3797
+ recordRunStartup,
3798
+ settleBackgroundProcessExit,
3698
3799
  spawnLocalBackgroundRun,
3699
3800
  ackRunRecord,
3700
3801
  DEFAULT_ACK_LEASE_TTL_MS,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  buildStaticUserPolicyContext,
3
3
  resolveSpaceContextPreloadPlan
4
- } from "./chunk-PXKF5CV4.js";
4
+ } from "./chunk-ZXF6D3I6.js";
5
5
  import {
6
6
  fetchReferenceContents,
7
7
  mergeReferences,
8
8
  resolveReferenceAssets,
9
9
  resolveToolsFromKeys
10
- } from "./chunk-ZI5SZ3MV.js";
10
+ } from "./chunk-MDZWUD3R.js";
11
11
  import {
12
12
  UI_CARD_ENVELOPE_MAX_BYTES,
13
13
  getAllToolRuns,
@@ -18,32 +18,32 @@ import {
18
18
  selectSpaceContextLevel,
19
19
  selectUserTonePreset,
20
20
  uiCardFallback
21
- } from "./chunk-GRXSJR2Z.js";
22
- import {
23
- getDocState
24
- } from "./chunk-LA7JYAKF.js";
21
+ } from "./chunk-XJPLSAPJ.js";
25
22
  import {
26
23
  resolveToolBaseUrl
27
24
  } from "./chunk-4JVNURX4.js";
25
+ import {
26
+ getDocState
27
+ } from "./chunk-VSYTM22R.js";
28
28
  import {
29
29
  getTableState
30
- } from "./chunk-TINJKQSO.js";
30
+ } from "./chunk-GYS5FUYR.js";
31
+ import {
32
+ getCurrentSpaceIdRaw,
33
+ getViewMode
34
+ } from "./chunk-547ENH5T.js";
31
35
  import {
32
36
  PERSONALIZATION_DIALOG_CATEGORY,
33
37
  buildPersonalizationDialogPolicyContext,
34
38
  selectAllMsgs
35
- } from "./chunk-PVAWNHP5.js";
36
- import {
37
- getCurrentSpaceIdRaw,
38
- getViewMode
39
- } from "./chunk-NO3VBWTL.js";
39
+ } from "./chunk-R3NEQZ53.js";
40
40
  import {
41
41
  selectPendingFiles
42
42
  } from "./chunk-S2NTVGA2.js";
43
43
  import {
44
44
  read,
45
45
  selectById
46
- } from "./chunk-SFTTXGPM.js";
46
+ } from "./chunk-CMMI3DAT.js";
47
47
  import {
48
48
  getSessionSnapshotForState,
49
49
  selectIdentityUserBalance,
@@ -54,22 +54,22 @@ import {
54
54
  getModelPricing,
55
55
  getPrices,
56
56
  hasExplicitAgentPricing
57
- } from "./chunk-LJSNEV7M.js";
57
+ } from "./chunk-SRCCSTIM.js";
58
58
  import {
59
59
  projectToolMessageContent
60
60
  } from "./chunk-2WZXXAQD.js";
61
61
  import {
62
62
  resolveAgentRecommendedSkillNames,
63
63
  resolveAgentRequiredPackIds
64
- } from "./chunk-X2KRQP7V.js";
64
+ } from "./chunk-FJSNBZXR.js";
65
65
  import {
66
66
  attachmentKind,
67
67
  extractReferenceKeysFromMessage,
68
68
  normalizeAttachmentPart
69
- } from "./chunk-YQETUZ5V.js";
69
+ } from "./chunk-QRGDJA4B.js";
70
70
  import {
71
71
  getModelContextWindow
72
- } from "./chunk-T2BEPTAG.js";
72
+ } from "./chunk-L32W3PRP.js";
73
73
  import {
74
74
  asRecordOrEmpty
75
75
  } from "./chunk-KX6YBIHG.js";
@@ -85,7 +85,7 @@ import {
85
85
  expandEnabledPackPromptPatches,
86
86
  expandEnabledPacks,
87
87
  resolveEffectiveEnabledPacks
88
- } from "./chunk-KRRE4A7D.js";
88
+ } from "./chunk-G7IUT2V3.js";
89
89
  import {
90
90
  canonicalizeToolNames,
91
91
  prioritizeToolNames
@@ -93,26 +93,26 @@ import {
93
93
  import {
94
94
  extractCustomId
95
95
  } from "./chunk-M2EJHDJP.js";
96
- import {
97
- getModelConfig,
98
- getProviderByModelName
99
- } from "./chunk-KYH7XW3K.js";
100
- import {
101
- isRecord
102
- } from "./chunk-KUG52IAP.js";
103
- import {
104
- buildLinkedSpacesSection,
105
- buildSpaceContextLayer
106
- } from "./chunk-JWXITTQB.js";
107
96
  import {
108
97
  metaKey
109
98
  } from "./chunk-SYTHYBMI.js";
110
99
  import {
111
100
  asNonEmptyStringArray
112
101
  } from "./chunk-I42VC5KR.js";
102
+ import {
103
+ buildLinkedSpacesSection,
104
+ buildSpaceContextLayer
105
+ } from "./chunk-3P54D2E4.js";
113
106
  import {
114
107
  asTrimmedString
115
108
  } from "./chunk-3EUW3WEO.js";
109
+ import {
110
+ getModelConfig,
111
+ getProviderByModelName
112
+ } from "./chunk-CD3RU7XL.js";
113
+ import {
114
+ isRecord
115
+ } from "./chunk-KUG52IAP.js";
116
116
  import {
117
117
  asOptionalFiniteNumber
118
118
  } from "./chunk-WWC7I6TA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildSkillDocMarkdown
3
- } from "./chunk-AETZ7AD6.js";
3
+ } from "./chunk-W6RFEDN4.js";
4
4
 
5
5
  // packages/cli/docPageHelpers.ts
6
6
  import { readFileSync } from "node:fs";
@@ -5,7 +5,7 @@ import {
5
5
  mapDiscoveredSkillsToCatalogEntries,
6
6
  resolveSkillCatalog,
7
7
  resolveSkillCatalogSync
8
- } from "./chunk-JWXITTQB.js";
8
+ } from "./chunk-3P54D2E4.js";
9
9
  import {
10
10
  load
11
11
  } from "./chunk-KHCLMKZZ.js";
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-5LQDHFBN.js";
5
+ } from "./chunk-D6YNCNM6.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-GBWGPTA7.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-YOT437BH.js";
4
+ } from "./chunk-RYOLWYBK.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
@@ -79,14 +79,17 @@ function mergeWindow(into, win) {
79
79
  existing.source = win.source;
80
80
  }
81
81
  function parseQuotaWindowScope(scope) {
82
- const matched = /^(gemini|3p)-(.+)$/.exec(scope);
82
+ const matched = /^(gemini|3p|hydrogen|argon)-(.+)$/.exec(scope);
83
83
  return matched ? { family: matched[1], period: matched[2] } : { period: scope };
84
84
  }
85
85
  function resolveQuotaWindowFamily(model) {
86
86
  if (typeof model !== "string" || !model.trim()) return void 0;
87
+ if (/(?:^|[/-])gemini-[^/]*hydrogen(?:-|$)/i.test(model)) return "hydrogen";
88
+ if (/(?:^|[/-])gemini-[^/]*argon(?:-|$)/i.test(model)) return "argon";
87
89
  return /gemini/i.test(model) ? "gemini" : "3p";
88
90
  }
89
- function isQuotaWindowRelevantToFamily(scope, family) {
91
+ function isQuotaWindowRelevantToFamily(scope, family, source) {
92
+ if (scope === "gemini-5h" && source?.endsWith(":fetchAvailableModels")) return false;
90
93
  if (typeof scope !== "string") return true;
91
94
  const scopeFamily = parseQuotaWindowScope(scope).family;
92
95
  return scopeFamily === void 0 || family === void 0 || scopeFamily === family;
@@ -95,7 +98,7 @@ function selectQuotaWindowsForModel(quota, now, model) {
95
98
  if (!quota || !Array.isArray(quota.windows)) return [];
96
99
  const family = resolveQuotaWindowFamily(model);
97
100
  return quota.windows.filter(
98
- (window) => !isQuotaWindowExpired(window, now) && isQuotaWindowRelevantToFamily(window?.scope, family)
101
+ (window) => !isQuotaWindowExpired(window, now) && isQuotaWindowRelevantToFamily(window?.scope, family, window?.source)
99
102
  );
100
103
  }
101
104
  function isQuotaWindowExpired(window, now) {
@@ -373,7 +376,7 @@ function shouldClearCooldownFromQuota(entry, quota, now, options) {
373
376
  if (!quota || !(quota.observedAt > entry.markedAt)) return false;
374
377
  const family = resolveQuotaWindowFamily(options?.model);
375
378
  const relevantWindows = quota.windows.filter(
376
- (window) => isQuotaWindowRelevantToFamily(window.scope, family)
379
+ (window) => isQuotaWindowRelevantToFamily(window.scope, family, window.source)
377
380
  );
378
381
  const subscriptionWindows = relevantWindows.filter(isSubscriptionPeriodWindow);
379
382
  if (subscriptionWindows.length === 0) return false;
@@ -409,7 +412,7 @@ function resolveAgentAvailability(agent, now = Date.now()) {
409
412
  const hasObservedAt = Boolean(quota) && typeof quota?.observedAt === "number" && Number.isFinite(quota.observedAt);
410
413
  const family = resolveQuotaWindowFamily(agent?.model);
411
414
  const relevantWindows = (quota?.windows ?? []).filter(
412
- (window) => isQuotaWindowRelevantToFamily(window?.scope, family)
415
+ (window) => isQuotaWindowRelevantToFamily(window?.scope, family, window?.source)
413
416
  );
414
417
  const hasWindows = relevantWindows.length > 0;
415
418
  const hasValidQuota = isAdmissible && hasWindows;
@@ -647,6 +650,7 @@ function resolveCredentialCandidateKeys(key) {
647
650
  if (!key) return [];
648
651
  const trimmed = key.trim();
649
652
  if (!trimmed) return [];
653
+ if (/\|quota:(?:gemini|3p|hydrogen|argon)$/.test(trimmed)) return [trimmed];
650
654
  const candidates = [trimmed];
651
655
  const atIndex = trimmed.lastIndexOf("@");
652
656
  if (atIndex > 0) {
@@ -677,7 +681,21 @@ function resolveCredentialKey(agent) {
677
681
  function resolveCredentialKeyWithFallback(agent) {
678
682
  if (isPublicOrSystemAgentRecord(agent)) return void 0;
679
683
  const byRef = resolveCredentialKey(agent);
680
- if (byRef) return byRef;
684
+ if (byRef) {
685
+ const ref = byRef.split("@")[0]?.trim().toLowerCase();
686
+ const provider = agent?.provider;
687
+ let cloudCode = false;
688
+ try {
689
+ const host = new URL(String(agent?.customProviderUrl ?? "")).hostname;
690
+ cloudCode = /^(?:daily-|daily-sandbox-)?cloudcode-pa\.googleapis\.com$/.test(host);
691
+ } catch {
692
+ }
693
+ if (ref === "antigravity" || ref === "gemini" || provider === "google-antigravity" || cloudCode) {
694
+ const family = resolveQuotaWindowFamily(typeof agent?.model === "string" ? agent.model : void 0);
695
+ if (family) return `${byRef}|quota:${family}`;
696
+ }
697
+ return byRef;
698
+ }
681
699
  if (!agent || typeof agent !== "object") return void 0;
682
700
  const endpoint = agent.customProviderUrl;
683
701
  if (typeof endpoint === "string") {
@@ -3,13 +3,10 @@ import {
3
3
  } from "./chunk-5ZUL4CUO.js";
4
4
  import {
5
5
  getModelContextWindow
6
- } from "./chunk-T2BEPTAG.js";
6
+ } from "./chunk-L32W3PRP.js";
7
7
  import {
8
8
  BUILTIN_NOLO_AGENT_KEY
9
9
  } from "./chunk-ILHQ2AXT.js";
10
- import {
11
- isRecord
12
- } from "./chunk-KUG52IAP.js";
13
10
  import {
14
11
  isPageKey,
15
12
  isTableMetaKey
@@ -20,6 +17,9 @@ import {
20
17
  import {
21
18
  asTrimmedString
22
19
  } from "./chunk-3EUW3WEO.js";
20
+ import {
21
+ isRecord
22
+ } from "./chunk-KUG52IAP.js";
23
23
  import {
24
24
  asOptionalTrimmedString
25
25
  } from "./chunk-G3SUCT4W.js";
@@ -493,13 +493,6 @@ function resolveTruncatedReasoningTailLog(reason, reasoning_content) {
493
493
  }
494
494
 
495
495
  export {
496
- DEFAULT_AUTO_EXECUTION_PROFILE,
497
- resolveAutoExecutionProfile,
498
- ATTACHMENT_PART_TYPE,
499
- ATTACHMENT_PART_VERSION,
500
- normalizeAttachmentPart,
501
- attachmentKind,
502
- describeAttachmentForModel,
503
496
  isCodexOAuthAgent,
504
497
  resolveCodexOAuthEffectiveModel,
505
498
  CODEX_OAUTH_CATALOG_TTL_MS,
@@ -511,6 +504,13 @@ export {
511
504
  codexOAuthCatalogWindow,
512
505
  devinChannelContextWindow,
513
506
  resolveAgentContextWindow,
507
+ DEFAULT_AUTO_EXECUTION_PROFILE,
508
+ resolveAutoExecutionProfile,
509
+ ATTACHMENT_PART_TYPE,
510
+ ATTACHMENT_PART_VERSION,
511
+ normalizeAttachmentPart,
512
+ attachmentKind,
513
+ describeAttachmentForModel,
514
514
  asOptionalJsonRecord,
515
515
  extractReferenceKeysFromMessage,
516
516
  EMPTY_ASSISTANT_REPAIR_PROMPT,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describeAttachmentForModel
3
- } from "./chunk-YQETUZ5V.js";
3
+ } from "./chunk-QRGDJA4B.js";
4
4
 
5
5
  // packages/ai/attachments/projectUserPart.ts
6
6
  var isRecord = (value) => typeof value === "object" && value !== null;