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,45 +1,28 @@
1
1
  import {
2
2
  BROWSER_SHELL_BRIDGE_ENV
3
3
  } from "./chunk-2YGBI2XB.js";
4
- import {
5
- defaultLoopbackRequest
6
- } from "./chunk-VP3BINY7.js";
7
- import {
8
- clearCredentialAvailability,
9
- markCredentialUnavailable,
10
- readCredentialEntry
11
- } from "./chunk-FIYSMXHY.js";
12
- import {
13
- CREDENTIAL_STORE_SESSION_FALLBACK_WARNING,
14
- OAUTH_PROVIDER_REFS,
15
- getSharedSessionCredentialBroker
16
- } from "./chunk-5LQDHFBN.js";
17
- import {
18
- customNativeAuthHeaders,
19
- detectDeclaredCustomNativeWire,
20
- isCallerCancellation,
21
- resolveCustomNativeApiKeyHeader,
22
- resolveCustomNativeEndpoint
23
- } from "./chunk-WOAZVUSN.js";
24
4
  import {
25
5
  adoptRequiredClaudeCodeVersion,
26
6
  anthropicRefresh,
27
7
  cursorRefresh,
8
+ fetchAntigravityAvailableModels,
28
9
  getClaudeCodeUserAgent,
29
10
  refreshAntigravityOAuthToken,
30
11
  refreshOpenAiCodexToken,
31
12
  resolveClaudeCodeVersion,
32
13
  resolveServerSyncConfig,
33
14
  xaiRefresh
34
- } from "./chunk-HYKGIXNO.js";
15
+ } from "./chunk-XSW4EXQV.js";
35
16
  import {
36
- isCursorOAuthAgent
37
- } from "./chunk-VIWDGTDA.js";
17
+ clearCredentialAvailability,
18
+ markCredentialUnavailable,
19
+ readCredentialEntry
20
+ } from "./chunk-WWTSEBDF.js";
38
21
  import {
39
22
  DialogNotifyError,
40
23
  deliverDialogNotification,
41
24
  sha256Hex
42
- } from "./chunk-M3Y4IBIR.js";
25
+ } from "./chunk-M4SFKP5L.js";
43
26
  import {
44
27
  SANDBOX_HELPER_PATH,
45
28
  SANDBOX_OUTPUT_LIMITS,
@@ -56,30 +39,40 @@ import {
56
39
  validateChromeConnectorPayload
57
40
  } from "./chunk-UAIHKQIA.js";
58
41
  import {
59
- extractLastUserText,
60
- localTurnHasSubjectRefs,
61
- resolveLocalUserId,
62
- withResolvedRuntimeToolSurface
63
- } from "./chunk-T5N6NHAT.js";
42
+ customNativeAuthHeaders,
43
+ detectDeclaredCustomNativeWire,
44
+ isCallerCancellation,
45
+ resolveCustomNativeApiKeyHeader,
46
+ resolveCustomNativeEndpoint
47
+ } from "./chunk-WOAZVUSN.js";
64
48
  import {
65
49
  createTuiSummaryLlmCaller
66
- } from "./chunk-SRG5CNLC.js";
50
+ } from "./chunk-TSPMLCWI.js";
67
51
  import {
68
52
  CliProviderQuotaError,
69
53
  executeCli,
70
54
  executeCliStreaming
71
- } from "./chunk-MK2Q7ZJD.js";
55
+ } from "./chunk-R7XWZDOH.js";
56
+ import {
57
+ isCursorOAuthAgent
58
+ } from "./chunk-VIWDGTDA.js";
72
59
  import {
73
60
  buildCliPrompt
74
61
  } from "./chunk-ATNTHIZI.js";
62
+ import {
63
+ extractLastUserText,
64
+ localTurnHasSubjectRefs,
65
+ resolveLocalUserId,
66
+ withResolvedRuntimeToolSurface
67
+ } from "./chunk-HHFGE2WF.js";
75
68
  import {
76
69
  inferCaptureIntent,
77
70
  resolveUserSkillRuntime
78
- } from "./chunk-PXKF5CV4.js";
71
+ } from "./chunk-ZXF6D3I6.js";
79
72
  import {
80
73
  inlineImageUrlsForCustomProvider,
81
74
  prepareTools
82
- } from "./chunk-2SKTCNWO.js";
75
+ } from "./chunk-UE2EVEYS.js";
83
76
  import {
84
77
  getServerProviderSecret
85
78
  } from "./chunk-HS7MLR74.js";
@@ -102,24 +95,20 @@ import {
102
95
  resolveCliLocalSpawnDispatch,
103
96
  resolveRunContextFacts,
104
97
  resolveStartAgentRunCwd
105
- } from "./chunk-LXTC53TN.js";
106
- import {
107
- fetchWithTransientRetry,
108
- isTransientFetchError
109
- } from "./chunk-KFHREHUQ.js";
98
+ } from "./chunk-IXG6YXQM.js";
110
99
  import {
111
100
  deriveCredentialGroup,
112
101
  deriveCustomProviderCredentialGroup
113
- } from "./chunk-F5AY2UZL.js";
102
+ } from "./chunk-NHY322ZU.js";
114
103
  import {
115
104
  normalizeEnabledPromptSkills,
116
105
  resolveUserEnabledSkills
117
- } from "./chunk-GUVXQSFZ.js";
106
+ } from "./chunk-RBPUNSG5.js";
118
107
  import {
119
108
  prepareTokenUsageData,
120
109
  runKeyed,
121
110
  validateAskChoiceInput
122
- } from "./chunk-PVAWNHP5.js";
111
+ } from "./chunk-R3NEQZ53.js";
123
112
  import {
124
113
  applyTokenUsageToDayStats,
125
114
  require_format
@@ -130,7 +119,22 @@ import {
130
119
  } from "./chunk-523DITKR.js";
131
120
  import {
132
121
  fetchServerSyncedCredential
133
- } from "./chunk-ABGULE7H.js";
122
+ } from "./chunk-K67C2JUC.js";
123
+ import {
124
+ defaultLoopbackRequest
125
+ } from "./chunk-VP3BINY7.js";
126
+ import {
127
+ CREDENTIAL_STORE_SESSION_FALLBACK_WARNING,
128
+ OAUTH_PROVIDER_REFS,
129
+ getSharedSessionCredentialBroker
130
+ } from "./chunk-D6YNCNM6.js";
131
+ import {
132
+ fetchWithTransientRetry,
133
+ isTransientFetchError
134
+ } from "./chunk-DXWGFL2Z.js";
135
+ import {
136
+ getDefaultCliLocalRuntimeDb
137
+ } from "./chunk-N5Z2V73W.js";
134
138
  import {
135
139
  _readQueueEntriesLocked,
136
140
  ackRunRecord,
@@ -155,12 +159,12 @@ import {
155
159
  terminateRunProcess,
156
160
  transitionRunToTerminal,
157
161
  withQueueLock
158
- } from "./chunk-XIEYGCN6.js";
162
+ } from "./chunk-OWKNSIXL.js";
159
163
  import {
160
164
  remoteDialogSyncTimeout,
161
165
  resolveRuntimeAuthToken,
162
166
  resolveRuntimeServerUrl
163
- } from "./chunk-UN7HIYMH.js";
167
+ } from "./chunk-2X7WFDT6.js";
164
168
  import {
165
169
  TASK_PREVIEW_MAX,
166
170
  formatControlRunMessageCard,
@@ -177,10 +181,7 @@ import {
177
181
  resolveAgentRunName,
178
182
  resolveRunLabel,
179
183
  shortRunId
180
- } from "./chunk-AXYH4734.js";
181
- import {
182
- getDefaultCliLocalRuntimeDb
183
- } from "./chunk-N5Z2V73W.js";
184
+ } from "./chunk-OOJNQK6V.js";
184
185
  import {
185
186
  isTombstoneRecord
186
187
  } from "./chunk-BV3FLP2L.js";
@@ -189,7 +190,7 @@ import {
189
190
  readDialogMessageRecords,
190
191
  readDialogMessages,
191
192
  resolveBuiltinLocalCliAgentConfig
192
- } from "./chunk-KMRKZNGT.js";
193
+ } from "./chunk-2MCB7CD7.js";
193
194
  import {
194
195
  LOCAL_CODEX_AGENT_KEY,
195
196
  isLocalCliAgentKey,
@@ -231,6 +232,7 @@ import {
231
232
  isLineRangeCovered,
232
233
  isStableSessionIdentityEnabled,
233
234
  normalizeLocalToolName,
235
+ orderDialogHistory,
234
236
  parseSyncServersEnv,
235
237
  projectToolExecutionLocation,
236
238
  readDevinUpstreamFailure,
@@ -244,7 +246,7 @@ import {
244
246
  runExecShellGates,
245
247
  validateConfiguredRootExecutionLease,
246
248
  verifyOwnerRouteAck
247
- } from "./chunk-CVERLOJM.js";
249
+ } from "./chunk-JUSHVFNF.js";
248
250
  import {
249
251
  accumulateGeminiChunks,
250
252
  buildGeminiGenerateContentRequest,
@@ -256,7 +258,10 @@ import {
256
258
  resolveAntigravityFinishReason,
257
259
  resolveGeminiModelQuirks,
258
260
  shouldUseGeminiNativeToolRoute
259
- } from "./chunk-YPPKC6FL.js";
261
+ } from "./chunk-2NPD3FTX.js";
262
+ import {
263
+ readLocalImage
264
+ } from "./chunk-AL3TYDIF.js";
260
265
  import {
261
266
  PlatformStreamInterruptedError,
262
267
  buildPlatformChatCompletionRequest,
@@ -268,7 +273,7 @@ import {
268
273
  readPlatformChatSseCompletion,
269
274
  resolvePlatformChatProviderConfig,
270
275
  shouldUsePlatformChatProvider
271
- } from "./chunk-IX2BXN2K.js";
276
+ } from "./chunk-HSSBDZLD.js";
272
277
  import {
273
278
  readSseDataValues,
274
279
  readSseFrames
@@ -277,45 +282,53 @@ import {
277
282
  resolveHistoricalToolContentCap
278
283
  } from "./chunk-2WZXXAQD.js";
279
284
  import {
280
- resolveToolImagePolicy
281
- } from "./chunk-3HTP4WZQ.js";
285
+ resolveAgentImageInputSupport,
286
+ resolveCatalogImageSupport,
287
+ resolveToolImagePolicy,
288
+ withLiveImageSupport
289
+ } from "./chunk-DUUDXSLX.js";
290
+ import {
291
+ collectStablePromptPrefix,
292
+ convertMessagesToResponsesInput,
293
+ findAgentStatePairingIssues,
294
+ stablePromptCacheKey,
295
+ toResponsesTools
296
+ } from "./chunk-EEOOBRA7.js";
297
+ import {
298
+ EMPTY_TOOL_RESULT_TEXT,
299
+ MAX_TOOL_IMAGES_PER_REQUEST,
300
+ MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST,
301
+ createToolImageBudget,
302
+ hadToolImages,
303
+ toolImageNotices,
304
+ toolImageOmission,
305
+ toolImageSource,
306
+ toolImages
307
+ } from "./chunk-X4O7FJF5.js";
282
308
  import {
283
309
  assertDispatchSelectionAdmission,
284
310
  buildNoloWorkspaceOpenAiTools,
285
311
  filterClientNoloWorkspaceToolNames,
286
312
  parseNoloWorkspaceToolArguments
287
- } from "./chunk-YOT437BH.js";
313
+ } from "./chunk-RYOLWYBK.js";
288
314
  import {
289
315
  extractQuotaSnapshot,
290
316
  isCapacitySaturatedRateLimit,
291
317
  mergeAvailabilityDeadline,
292
318
  resolveAvailabilityAction,
293
319
  resolveCredentialKeyWithFallback
294
- } from "./chunk-HOCHUZQ7.js";
320
+ } from "./chunk-QJTZ76CP.js";
295
321
  import {
296
322
  HIGH_RISK_MUTATION_TOOL_NAMES,
297
323
  resolveRequestToolSurface
298
- } from "./chunk-IC2I373Q.js";
324
+ } from "./chunk-VS276URX.js";
299
325
  import {
300
- collectStablePromptPrefix,
301
- convertMessagesToResponsesInput,
302
- findAgentStatePairingIssues,
303
- stablePromptCacheKey,
304
- toResponsesTools
305
- } from "./chunk-TOKPHZ55.js";
306
- import {
307
- EMPTY_TOOL_RESULT_TEXT,
308
- createToolImageBudget,
309
- hadToolImages,
310
- toolImageNotices,
311
- toolImageOmission,
312
- toolImageSource,
313
- toolImages
314
- } from "./chunk-E2BESSAW.js";
326
+ resolveAgentCallPlan
327
+ } from "./chunk-OBIC6EG7.js";
315
328
  import {
316
329
  resolveAgentRequiredPackIds,
317
330
  resolveAgentSkillConfig
318
- } from "./chunk-X2KRQP7V.js";
331
+ } from "./chunk-FJSNBZXR.js";
319
332
  import {
320
333
  buildDialogFallbackTitleFromUserInput,
321
334
  normalizeDialogTitle
@@ -329,13 +342,13 @@ import {
329
342
  isCodexOAuthAgent,
330
343
  markCodexOAuthCatalogFailure,
331
344
  resolveCodexOAuthEffectiveModel
332
- } from "./chunk-YQETUZ5V.js";
345
+ } from "./chunk-QRGDJA4B.js";
333
346
  import {
334
347
  isDevinOAuthAgent
335
348
  } from "./chunk-5ZUL4CUO.js";
336
349
  import {
337
350
  normalizeUsage
338
- } from "./chunk-T2BEPTAG.js";
351
+ } from "./chunk-L32W3PRP.js";
339
352
  import {
340
353
  createProviderCallTimingTracker,
341
354
  finalizeProviderCallTiming,
@@ -353,7 +366,7 @@ import {
353
366
  resolveCurrentRunRuntimeToolPolicy,
354
367
  resolveLocalWorkspaceExecutorOptionsFromPolicy,
355
368
  resolveRequestedRuntimeToolNames
356
- } from "./chunk-SSGTV4FC.js";
369
+ } from "./chunk-USGHJSGO.js";
357
370
  import {
358
371
  asRecordOrEmpty
359
372
  } from "./chunk-KX6YBIHG.js";
@@ -365,20 +378,16 @@ import {
365
378
  } from "./chunk-DWLEOOGR.js";
366
379
  import {
367
380
  withShellChildEnvironment
368
- } from "./chunk-HVUDBOQG.js";
381
+ } from "./chunk-VMJVAJ6W.js";
369
382
  import {
370
383
  estimateTokenCount
371
384
  } from "./chunk-PSCNXBYA.js";
372
385
  import {
373
- isAntigravityOAuthAgent
374
- } from "./chunk-VPAZ6BEN.js";
375
- import {
376
- buildProviderSessionHeaders,
377
- resolvePlatformAuthToken
378
- } from "./chunk-6EDAMVG6.js";
379
- import {
380
- toErrorMessage
381
- } from "./chunk-HNMXYYJR.js";
386
+ createOAuthTokenStore,
387
+ isTokenExpired,
388
+ readOAuthCredential,
389
+ resolveFreshAccessToken
390
+ } from "./chunk-G7Y4GXTY.js";
382
391
  import {
383
392
  FORCED_TOOLS,
384
393
  addDefaultLightWebToolsForConfiguredAgents,
@@ -390,85 +399,111 @@ import {
390
399
  expandEnabledPacks,
391
400
  resolveBuiltinSkillEntry,
392
401
  resolveEffectiveEnabledPacks
393
- } from "./chunk-KRRE4A7D.js";
402
+ } from "./chunk-G7IUT2V3.js";
394
403
  import {
395
404
  CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES,
396
405
  canonicalizeChromeConnectorToolNames,
397
406
  canonicalizeToolNames
398
407
  } from "./chunk-6OVNSQHN.js";
399
408
  import {
400
- anthropicOAuthModelMaxOutputTokens,
401
- findModelConfig,
402
- isAdaptiveThinkingModelId
403
- } from "./chunk-KYH7XW3K.js";
409
+ createTokenDialogIndexKey,
410
+ createTokenKey,
411
+ createTokenStatsKey,
412
+ createUserKey
413
+ } from "./chunk-SYTHYBMI.js";
404
414
  import {
405
- CLI_PROVIDER_VALUES,
406
- isCliProvider
407
- } from "./chunk-JRTNUU5Z.js";
415
+ dialogMessageKey
416
+ } from "./chunk-OJKUU3LP.js";
408
417
  import {
409
- isRecord
410
- } from "./chunk-KUG52IAP.js";
418
+ dialogIdFromKey
419
+ } from "./chunk-YZMNK53S.js";
411
420
  import {
412
- asTrimmedLowercaseString
413
- } from "./chunk-QSJ3HFEF.js";
421
+ asOptionalPositiveFiniteNumber
422
+ } from "./chunk-U6VC4MU4.js";
414
423
  import {
415
424
  classifyDialogSyncFailure,
416
425
  getLogger,
417
426
  startOwnedDialogSync
418
- } from "./chunk-YGMBIXCF.js";
427
+ } from "./chunk-6XRPBZRS.js";
419
428
  import {
429
+ getHostRuntimeExecutable,
420
430
  isCompiledBinary,
421
431
  parseUserIdFromAuthToken,
422
432
  resolveAuthToken,
423
433
  resolveServerUrl
424
- } from "./chunk-WACI5I6V.js";
434
+ } from "./chunk-BIDSIRTS.js";
425
435
  import {
426
436
  DEFAULT_NOLO_SERVER_URL
427
437
  } from "./chunk-OLZBQWZU.js";
428
438
  import {
429
439
  NOLO_CLUSTER_SERVERS
430
440
  } from "./chunk-LCBAMY2M.js";
431
- import {
432
- isLoopbackUrl
433
- } from "./chunk-4SN6J65J.js";
434
- import {
435
- normalizeServerOrigin
436
- } from "./chunk-CF7PE763.js";
437
441
  import {
438
442
  agentRunCardLabels,
439
443
  t
440
- } from "./chunk-OB6DVWPF.js";
441
- import {
442
- createOAuthTokenStore,
443
- isTokenExpired,
444
- readOAuthCredential,
445
- resolveFreshAccessToken
446
- } from "./chunk-G7Y4GXTY.js";
444
+ } from "./chunk-262R3XNN.js";
447
445
  import {
448
- createTokenDialogIndexKey,
449
- createTokenKey,
450
- createTokenStatsKey,
451
- createUserKey
452
- } from "./chunk-SYTHYBMI.js";
446
+ isAntigravityOAuthAgent
447
+ } from "./chunk-7JGMNKKG.js";
453
448
  import {
454
- dialogMessageKey
455
- } from "./chunk-OJKUU3LP.js";
449
+ buildProviderSessionHeaders,
450
+ resolvePlatformAuthToken
451
+ } from "./chunk-RTHFJZ6M.js";
456
452
  import {
457
- dialogIdFromKey
458
- } from "./chunk-YZMNK53S.js";
453
+ toErrorMessage
454
+ } from "./chunk-HNMXYYJR.js";
459
455
  import {
460
456
  asTrimmedString
461
457
  } from "./chunk-3EUW3WEO.js";
462
458
  import {
463
- asOptionalPositiveFiniteNumber
464
- } from "./chunk-U6VC4MU4.js";
459
+ anthropicOAuthModelMaxOutputTokens,
460
+ findModelConfig,
461
+ isAdaptiveThinkingModelId
462
+ } from "./chunk-CD3RU7XL.js";
463
+ import {
464
+ CLI_PROVIDER_VALUES,
465
+ isCliProvider
466
+ } from "./chunk-JRTNUU5Z.js";
467
+ import {
468
+ isRecord
469
+ } from "./chunk-KUG52IAP.js";
465
470
  import {
466
471
  asOptionalTrimmedString
467
472
  } from "./chunk-G3SUCT4W.js";
473
+ import {
474
+ isLoopbackUrl
475
+ } from "./chunk-4SN6J65J.js";
476
+ import {
477
+ normalizeServerOrigin
478
+ } from "./chunk-CF7PE763.js";
479
+ import {
480
+ asTrimmedLowercaseString
481
+ } from "./chunk-QSJ3HFEF.js";
468
482
  import {
469
483
  __toESM
470
484
  } from "./chunk-U67V476Y.js";
471
485
 
486
+ // packages/cli/client/liveImageSupport.ts
487
+ function createLiveImageSupportResolver(userId, discover, timeoutMs = 5e3) {
488
+ let discovery;
489
+ return async (config) => {
490
+ if (resolveCatalogImageSupport(config) !== void 0) return config;
491
+ const plan = resolveAgentCallPlan({ ...config, key: config.key ?? "" });
492
+ if (plan.authMethod.kind !== "oauth" || plan.authMethod.ref !== "antigravity") return config;
493
+ const raw = config.rawRecord ?? config;
494
+ const owner = typeof raw.userId === "string" && raw.userId.trim() ? raw.userId.trim() : typeof raw.ownerUserId === "string" ? raw.ownerUserId.trim() : void 0;
495
+ if (!userId || owner !== userId) return withLiveImageSupport(config, false);
496
+ discovery ??= new Promise((resolve7) => {
497
+ const timer = setTimeout(() => resolve7({}), timeoutMs);
498
+ Promise.resolve().then(discover).then(resolve7, () => resolve7({})).finally(() => clearTimeout(timer));
499
+ });
500
+ const models = await discovery;
501
+ const model = config.model?.trim() ?? "";
502
+ const entry = Object.hasOwn(models, model) ? models[model] : void 0;
503
+ return withLiveImageSupport(config, entry?.supportsImages === true && entry.disabled !== true);
504
+ };
505
+ }
506
+
472
507
  // packages/agent-runtime/anthropicMessagesProvider.ts
473
508
  import { randomUUID } from "node:crypto";
474
509
 
@@ -4326,9 +4361,14 @@ function resolveProviderResolveOverrides(agentConfig, options) {
4326
4361
  // packages/cli/client/localRuntimePaths.ts
4327
4362
  import { dirname, extname, join } from "node:path";
4328
4363
  import { fileURLToPath } from "node:url";
4364
+ import { existsSync, realpathSync } from "node:fs";
4329
4365
  function resolveLocalRuntimePaths(moduleUrl, compiled, execPath) {
4330
- if (compiled) return { cliDir: dirname(execPath), cliEntrypoint: execPath };
4331
- const modulePath = fileURLToPath(moduleUrl);
4366
+ if (compiled) {
4367
+ const entry = execPath === process.execPath ? getHostRuntimeExecutable() : realpathSync(execPath);
4368
+ return { cliDir: dirname(entry), cliEntrypoint: entry };
4369
+ }
4370
+ const path = fileURLToPath(moduleUrl);
4371
+ const modulePath = existsSync(path) ? realpathSync(path) : path;
4332
4372
  const extension = extname(modulePath) === ".js" ? ".js" : ".ts";
4333
4373
  const cliDir = extension === ".js" ? dirname(modulePath) : dirname(dirname(modulePath));
4334
4374
  return { cliDir, cliEntrypoint: join(cliDir, `index${extension}`) };
@@ -5024,13 +5064,68 @@ function mergeNoticeGroup(turns, noticeTasks, styleContent) {
5024
5064
  }
5025
5065
 
5026
5066
  // packages/cli/client/cliRemoteDialogSync.ts
5027
- function prepareRemoteDialogEvidenceRecord(key, value) {
5067
+ var RESERVED_AUTHORITY_FIELDS = [
5068
+ "userBatchOwner",
5069
+ "userBatchPhase",
5070
+ "userBatchReceipt",
5071
+ "acceptedUserBatchId"
5072
+ ];
5073
+ function hasReservedBatchAuthority(metadata) {
5074
+ if (!isRecord(metadata)) return false;
5075
+ return Object.keys(metadata).some((key) => RESERVED_AUTHORITY_FIELDS.some(
5076
+ (field) => key === field || key.startsWith(`${field}.`) || key === `metadata.${field}` || key.startsWith(`metadata.${field}.`)
5077
+ ));
5078
+ }
5079
+ function prepareRemoteDialogEvidenceRecord(key, value, options) {
5028
5080
  const record = isRecord(value) ? { ...value } : {};
5029
5081
  if (key.includes("-msg-") && typeof record.type !== "string") {
5030
5082
  record.type = "msg";
5031
5083
  }
5084
+ const metadata = record.metadata;
5085
+ if (key.includes("-msg-") && record.role === "user" && isRecord(metadata) && metadata.queueState === "accepted" && (metadata.cliBatchPhase === "requested" || metadata.cliBatchPhase === "completed" || typeof metadata.cliBatchId === "string" && metadata.cliBatchId.length > 0 || options?.isAcceptedBatchMember === true) && !hasReservedBatchAuthority(metadata)) {
5086
+ const { queueState: _localQueueState, ...evidenceMetadata } = metadata;
5087
+ record.metadata = evidenceMetadata;
5088
+ }
5032
5089
  return record;
5033
5090
  }
5091
+ async function collectAcceptedUserBatchMessageKeys(ops, localStore) {
5092
+ const memberKeys = /* @__PURE__ */ new Set();
5093
+ const collectReceipt = (op) => {
5094
+ if (op.type !== "put" || !op.key.includes("-msg-")) return;
5095
+ const record = op.value;
5096
+ if (!isRecord(record) || record.role !== "user" || !isRecord(record.metadata)) return;
5097
+ const metadata = record.metadata;
5098
+ if (metadata.cliBatchPhase !== "requested" && metadata.cliBatchPhase !== "completed") {
5099
+ return;
5100
+ }
5101
+ if (hasReservedBatchAuthority(record) || hasReservedBatchAuthority(metadata)) return;
5102
+ if (!Array.isArray(metadata.acceptedUserMessageIds)) return;
5103
+ const match = /^((?:dialog-[^]+?)-msg-)[^]+$/.exec(op.key);
5104
+ if (!match) return;
5105
+ const prefix = match[1];
5106
+ for (const memberId of metadata.acceptedUserMessageIds) {
5107
+ if (typeof memberId === "string" && memberId.length > 0) {
5108
+ memberKeys.add(`${prefix}${memberId}`);
5109
+ }
5110
+ }
5111
+ };
5112
+ for (const op of ops) collectReceipt(op);
5113
+ const prefixes = /* @__PURE__ */ new Set();
5114
+ for (const op of ops) {
5115
+ const record = op.value;
5116
+ if (op.type !== "put" || memberKeys.has(op.key) || record?.role !== "user" || record?.metadata?.queueState !== "accepted" || hasReservedBatchAuthority(record.metadata) || record.metadata.cliBatchPhase === "requested" || record.metadata.cliBatchPhase === "completed" || typeof record.metadata.cliBatchId === "string" && record.metadata.cliBatchId.length > 0) continue;
5117
+ const prefix = typeof record.dialogId === "string" ? `dialog-${record.dialogId}-msg-` : /^((?:dialog-[^]+?)-msg-)[^]+$/.exec(op.key)?.[1];
5118
+ if (prefix && op.key.startsWith(prefix)) prefixes.add(prefix);
5119
+ }
5120
+ if (localStore) {
5121
+ for (const prefix of prefixes) {
5122
+ for await (const [key, value] of localStore.iterator({ gte: prefix, lt: `${prefix}\uFFFF` })) {
5123
+ if (key.startsWith(prefix)) collectReceipt({ type: "put", key, value });
5124
+ }
5125
+ }
5126
+ }
5127
+ return memberKeys;
5128
+ }
5034
5129
  function normalizeRemoteSubjectRef(value) {
5035
5130
  if (!isRecord(value)) return null;
5036
5131
  const kind = asOptionalTrimmedString(value.kind);
@@ -5123,7 +5218,9 @@ async function postRemoteRecord(args) {
5123
5218
  body: JSON.stringify({
5124
5219
  customKey: args.key,
5125
5220
  userId: args.userId,
5126
- data: prepareRemoteDialogEvidenceRecord(args.key, args.data)
5221
+ data: prepareRemoteDialogEvidenceRecord(args.key, args.data, {
5222
+ isAcceptedBatchMember: args.isAcceptedBatchMember
5223
+ })
5127
5224
  }),
5128
5225
  signal: AbortSignal.timeout(remoteDialogSyncTimeout())
5129
5226
  },
@@ -5256,12 +5353,14 @@ async function syncLocalDialogEvidenceToRemote(args) {
5256
5353
  }
5257
5354
  }
5258
5355
  orderedOps.push(...nonMsgOps);
5356
+ const acceptedBatchKeys = await collectAcceptedUserBatchMessageKeys(orderedOps, args.localStore);
5259
5357
  await runThrottledBatches(
5260
5358
  orderedOps.filter((op) => op.type === "put"),
5261
5359
  (op) => postRemoteRecord({
5262
5360
  authToken,
5263
5361
  data: op.value,
5264
5362
  fetchImpl: args.fetchImpl,
5363
+ isAcceptedBatchMember: acceptedBatchKeys.has(op.key),
5265
5364
  key: op.key,
5266
5365
  serverUrl,
5267
5366
  userId: args.userId
@@ -5567,7 +5666,7 @@ function entriesToMessages(entries) {
5567
5666
  const message = dialogMessageRecordToAgentRuntimeMessage(entry.record);
5568
5667
  if (message) messages.push(message);
5569
5668
  }
5570
- return messages;
5669
+ return orderDialogHistory(messages);
5571
5670
  }
5572
5671
  async function persistIncompleteState(args) {
5573
5672
  const persisted = await writeCliDialogHistoryState({
@@ -5668,7 +5767,7 @@ function analyzeRemoteDialogRecords(args) {
5668
5767
  }
5669
5768
  entries.push({ key, messageId, record, message });
5670
5769
  }
5671
- const messages = entries.map((entry) => entry.message);
5770
+ const messages = orderDialogHistory(entries.map((entry) => entry.message));
5672
5771
  for (const detail of findAgentStatePairingIssues(messages)) {
5673
5772
  issues.push({ code: "tool-pairing", detail });
5674
5773
  }
@@ -6460,7 +6559,7 @@ function buildServerPlatformToolExecutors(args) {
6460
6559
  }
6461
6560
  const remoteItems = Array.isArray(remote?.selectedItems) ? remote.selectedItems : [];
6462
6561
  const [{ loadMemoryVNextCatalog }, { recallMemoryVNextLocal }] = await Promise.all([
6463
- import("./store-JRVN62NM.js"),
6562
+ import("./store-Z53ICFL3.js"),
6464
6563
  import("./localRecall-BDYKXB46.js")
6465
6564
  ]);
6466
6565
  const catalog = await loadMemoryVNextCatalog(ctx.db, ctx.principal);
@@ -6511,7 +6610,7 @@ function buildServerPlatformToolExecutors(args) {
6511
6610
  for (let i = ordered.length - 1; i >= 0; i -= 1) {
6512
6611
  if (isTombstoneRecord2(ordered[i])) ordered.splice(i, 1);
6513
6612
  }
6514
- const { buildMemoryOverlay, DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET } = await import("./overlay-THLKYIWY.js");
6613
+ const { buildMemoryOverlay, DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET } = await import("./overlay-BBQZXGYI.js");
6515
6614
  const promptBlock = buildMemoryOverlay(ordered, {
6516
6615
  maxTokens: DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET
6517
6616
  });
@@ -6521,7 +6620,7 @@ function buildServerPlatformToolExecutors(args) {
6521
6620
  const ctx = await localMemoryContext();
6522
6621
  if (!ctx) return false;
6523
6622
  const [{ putMemoryEntityVNext, putMemoryStateVNext, putMemoryEvidenceVNext }, { buildLegacyMemoryEvidence }] = await Promise.all([
6524
- import("./store-JRVN62NM.js"),
6623
+ import("./store-Z53ICFL3.js"),
6525
6624
  import("./legacyMigration-TF4SYJCZ.js")
6526
6625
  ]);
6527
6626
  const contentKey = `mem-${shortHash(
@@ -6574,7 +6673,7 @@ function buildServerPlatformToolExecutors(args) {
6574
6673
  const retireLocalMemory = async (filter) => {
6575
6674
  const ctx = await localMemoryContext();
6576
6675
  if (!ctx) return { retired: 0, localOnlyRetired: 0, skippedRemoteMiss: 0 };
6577
- const { loadMemoryVNextCatalog, retireMemoryStateVNext } = await import("./store-JRVN62NM.js");
6676
+ const { loadMemoryVNextCatalog, retireMemoryStateVNext } = await import("./store-Z53ICFL3.js");
6578
6677
  const catalog = await loadMemoryVNextCatalog(ctx.db, ctx.principal);
6579
6678
  if (catalog.states.length === 0) {
6580
6679
  return { retired: 0, localOnlyRetired: 0, skippedRemoteMiss: 0 };
@@ -6813,9 +6912,45 @@ function buildServerPlatformToolExecutors(args) {
6813
6912
  };
6814
6913
  }
6815
6914
 
6915
+ // packages/cli/client/childRunImages.ts
6916
+ import { isAbsolute } from "node:path";
6917
+ function validateChildImagePaths(value) {
6918
+ if (value === void 0) return [];
6919
+ if (!Array.isArray(value) || value.length < 1 || value.length > MAX_TOOL_IMAGES_PER_REQUEST || value.some((path) => typeof path !== "string" || !isAbsolute(path) || path.includes("\0"))) {
6920
+ throw new Error("image_input_invalid: expected 1\u20134 absolute local image paths");
6921
+ }
6922
+ return value;
6923
+ }
6924
+ async function validateChildImages(paths) {
6925
+ let total = 0;
6926
+ const urls = [];
6927
+ for (let index = 0; index < paths.length; index++) {
6928
+ try {
6929
+ const result = await readLocalImage(paths[index]);
6930
+ const image = result.images?.[0];
6931
+ if (!image) throw new Error();
6932
+ total += image.dataBase64.length;
6933
+ if (total > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) throw new Error();
6934
+ urls.push(`data:${image.mimeType};base64,${image.dataBase64}`);
6935
+ } catch (error) {
6936
+ const code = error?.code;
6937
+ const reason = code === "ENOENT" ? "not found" : code === "EACCES" || code === "EPERM" ? "not accessible" : "invalid type/content or exceeds image budget";
6938
+ throw new Error(`image_input_invalid: image ${index + 1} unreadable (${reason})`);
6939
+ }
6940
+ }
6941
+ return urls;
6942
+ }
6943
+ async function normalizeCliRunImages(inputs, normalizeRemote) {
6944
+ const local = inputs.filter((input) => !/^(https?:|data:|file:)/i.test(input));
6945
+ if (local.length > MAX_TOOL_IMAGES_PER_REQUEST) throw new Error("image_input_invalid: expected at most 4 local images");
6946
+ const urls = await validateChildImages(local);
6947
+ let index = 0;
6948
+ return inputs.map((input) => /^(https?:|data:|file:)/i.test(input) ? normalizeRemote(input) : urls[index++]);
6949
+ }
6950
+
6816
6951
  // packages/cli/agentRunArgs.ts
6817
6952
  import { readFileSync } from "node:fs";
6818
- import { isAbsolute } from "node:path";
6953
+ import { isAbsolute as isAbsolute2 } from "node:path";
6819
6954
  function readFlagValue(args, flag) {
6820
6955
  const index = args.indexOf(flag);
6821
6956
  if (index < 0) return void 0;
@@ -7017,7 +7152,7 @@ function parseAgentRunArgs(args, options = {}) {
7017
7152
  if (!rawInstaboxArtifactDir) {
7018
7153
  throw new Error("--runtime-key instabox \u5FC5\u987B\u6307\u5B9A --instabox-artifact-dir <\u7EDD\u5BF9\u8DEF\u5F84>");
7019
7154
  }
7020
- if (!isAbsolute(rawInstaboxArtifactDir) || rawInstaboxArtifactDir.includes("\0") || rawInstaboxArtifactDir.split("/").includes("..")) {
7155
+ if (!isAbsolute2(rawInstaboxArtifactDir) || rawInstaboxArtifactDir.includes("\0") || rawInstaboxArtifactDir.split("/").includes("..")) {
7021
7156
  throw new Error(`--instabox-artifact-dir \u5FC5\u987B\u4E3A\u5408\u6CD5\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u4E14\u4E0D\u80FD\u5305\u542B .. \u6216\u7A7A\u5B57\u7B26: "${rawInstaboxArtifactDir}"`);
7022
7157
  }
7023
7158
  if (rawInstaboxWorkspace === "snapshot" && !rawInstaboxManifest) {
@@ -7186,7 +7321,7 @@ function waitForRunTerminal(args) {
7186
7321
  }
7187
7322
 
7188
7323
  // packages/cli/client/cliAgentRunToolExecutors.ts
7189
- import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
7324
+ import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
7190
7325
 
7191
7326
  // packages/cli/client/agentRunSnapshot.ts
7192
7327
  function readString(value) {
@@ -7432,14 +7567,14 @@ function deriveAgentRunTodoStatus(input) {
7432
7567
  }
7433
7568
 
7434
7569
  // packages/cli/client/fileSystemStores.ts
7435
- import { existsSync, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
7570
+ import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
7436
7571
  import { homedir as nodeHomedir } from "node:os";
7437
7572
  import { dirname as dirname2, join as join2 } from "node:path";
7438
7573
  var nodeFs = {
7439
7574
  mkdirSync,
7440
7575
  writeFileSync,
7441
7576
  readFileSync: readFileSync2,
7442
- existsSync
7577
+ existsSync: existsSync2
7443
7578
  };
7444
7579
  function resolveNoloHome(env, homedir2) {
7445
7580
  const custom = env?.NOLO_HOME;
@@ -7539,8 +7674,8 @@ function createFileSystemTodoStore(opts = {}) {
7539
7674
  }
7540
7675
 
7541
7676
  // packages/cli/client/instaboxRunConfig.ts
7542
- import { lstatSync, readFileSync as readFileSync3, realpathSync } from "node:fs";
7543
- import { isAbsolute as isAbsolute2, normalize, resolve as resolve2 } from "node:path";
7677
+ import { lstatSync, readFileSync as readFileSync3, realpathSync as realpathSync2 } from "node:fs";
7678
+ import { isAbsolute as isAbsolute3, normalize, resolve as resolve2 } from "node:path";
7544
7679
 
7545
7680
  // packages/cli/client/localInstaboxWorkspaceDelivery.ts
7546
7681
  import { constants } from "node:fs";
@@ -8902,7 +9037,7 @@ function resolveInstaboxRunConfigPath(options) {
8902
9037
  }
8903
9038
  const runsDir = options?.runsDir ?? resolveRunsDir(env);
8904
9039
  const normalizedRunsDir = normalize(resolve2(runsDir));
8905
- const resolvedTarget = isAbsolute2(explicitPath) ? normalize(explicitPath) : normalize(resolve2(normalizedRunsDir, explicitPath));
9040
+ const resolvedTarget = isAbsolute3(explicitPath) ? normalize(explicitPath) : normalize(resolve2(normalizedRunsDir, explicitPath));
8906
9041
  if (resolvedTarget !== normalizedRunsDir && !resolvedTarget.startsWith(normalizedRunsDir.endsWith("/") ? normalizedRunsDir : `${normalizedRunsDir}/`)) {
8907
9042
  fail2("path_traversal", `\u914D\u7F6E\u8DEF\u5F84 "${explicitPath}" \u8D8A\u51FA\u4E86\u9650\u5B9A\u7684 runs \u76EE\u5F55 "${normalizedRunsDir}"`);
8908
9043
  }
@@ -8922,8 +9057,8 @@ function resolveInstaboxRunConfigPath(options) {
8922
9057
  fail2("file_too_large", `\u914D\u7F6E\u6587\u4EF6\u5927\u5C0F (${stats.size} \u5B57\u8282) \u8D85\u8FC7\u4E0A\u9650 (${INSTABOX_RUN_CONFIG_MAX_BYTES} \u5B57\u8282)`);
8923
9058
  }
8924
9059
  try {
8925
- const realTarget = realpathSync(resolvedTarget);
8926
- const realRuns = realpathSync(normalizedRunsDir);
9060
+ const realTarget = realpathSync2(resolvedTarget);
9061
+ const realRuns = realpathSync2(normalizedRunsDir);
8927
9062
  if (realTarget !== realRuns && !realTarget.startsWith(realRuns.endsWith("/") ? realRuns : `${realRuns}/`)) {
8928
9063
  fail2("symlink_traversal", `\u914D\u7F6E\u771F\u5B9E\u8DEF\u5F84 "${realTarget}" \u8D8A\u51FA runs \u771F\u5B9E\u76EE\u5F55 "${realRuns}"`);
8929
9064
  }
@@ -8984,7 +9119,7 @@ function loadInstaboxRunConfig(options) {
8984
9119
  if (!artifactRootRaw) {
8985
9120
  fail2("missing_artifact_root", "artifactRoot (artifact\u76EE\u7684\u76EE\u5F55) \u5FC5\u987B\u4E3A\u975E\u7A7A\u5B57\u7B26\u4E32\uFF0C\u672A\u914D\u7F6E\u6216\u9ED8\u8BA4\u5747\u88AB\u62D2\u7EDD");
8986
9121
  }
8987
- if (!isAbsolute2(artifactRootRaw) || artifactRootRaw.includes("\0") || artifactRootRaw.split("/").includes("..")) {
9122
+ if (!isAbsolute3(artifactRootRaw) || artifactRootRaw.includes("\0") || artifactRootRaw.split("/").includes("..")) {
8988
9123
  fail2("invalid_artifact_root", `artifactRoot \u5FC5\u987B\u4E3A\u5408\u6CD5\u7EDD\u5BF9\u8DEF\u5F84: "${artifactRootRaw}"`);
8989
9124
  }
8990
9125
  const artifactRoot = normalize(artifactRootRaw);
@@ -9217,7 +9352,7 @@ var parseCallArgs = (call) => {
9217
9352
  return {};
9218
9353
  }
9219
9354
  };
9220
- var resolveFs = (deps) => deps.fs ?? { existsSync: existsSync2, readFileSync: readFileSync4 };
9355
+ var resolveFs = (deps) => deps.fs ?? { existsSync: existsSync3, readFileSync: readFileSync4 };
9221
9356
  var probeRunCwd = (deps) => {
9222
9357
  const fs = deps.fs;
9223
9358
  const stat = fs?.statSync ?? nodeFs2.statSync;
@@ -9302,6 +9437,8 @@ function buildRunStatusPayload(reconciled, deps, opts = {}) {
9302
9437
  // 排在 2000 字 lastAssistantText 之后的键会被整段省略,模型连路径都看
9303
9438
  // 不到。挂在头部才能保证「结论在哪」永远可见。
9304
9439
  ...reconciled.resultFile ? { resultFile: reconciled.resultFile } : {},
9440
+ ...reconciled.continuedFrom ? { continuedFrom: reconciled.continuedFrom } : {},
9441
+ ...isAgentRunTerminalStatus(reconciled.status) ? { resultNote: "Process terminal status is not delivery, test, review, user acceptance or integration/release approval. lastAssistantText is a preview, not a complete report; read resultFile for current scope, blockers and evidence. Runtime acceptance contains observations only; unknown stays unknown. continuedFrom is lineage, not inherited approval." } : {},
9305
9442
  ...typeof reconciled.toolCallCount === "number" ? { toolCallCount: reconciled.toolCallCount } : {},
9306
9443
  ...reconciled.lastAssistantText ? { lastAssistantText: reconciled.lastAssistantText } : {},
9307
9444
  // Non-ephemeral runs expose dialogId so the caller can read the
@@ -9373,6 +9510,8 @@ async function assertCredentialFanoutAllowed(deps, args) {
9373
9510
  function createCliStartAgentRunExecutor(deps = {}) {
9374
9511
  return async (call) => {
9375
9512
  const args = parseCallArgs(call);
9513
+ const imagePaths = validateChildImagePaths(args.imagePaths);
9514
+ if (imagePaths.length && args.runtimeKey !== "local") throw new Error("image_backend_unsupported: imagePaths requires explicit host-local runtimeKey=local");
9376
9515
  const continueDialogId = normalizeContinueDialogId(args.continueDialogId);
9377
9516
  const continuedRecord = continueDialogId ? await deps.dialogExistsForCurrentUser?.(continueDialogId) : void 0;
9378
9517
  if (continueDialogId && !continuedRecord) {
@@ -9490,6 +9629,15 @@ function createCliStartAgentRunExecutor(deps = {}) {
9490
9629
  selectedModel = await deps.resolveAgentModel?.(agentKey);
9491
9630
  } catch {
9492
9631
  }
9632
+ if (imagePaths.length) {
9633
+ let imageSupport = false;
9634
+ try {
9635
+ imageSupport = await deps.resolveAgentImageSupport?.(agentKey) === true;
9636
+ } catch {
9637
+ }
9638
+ if (!imageSupport) throw new Error("image_model_unsupported: child model image capability is unsupported or unknown");
9639
+ await validateChildImages(imagePaths);
9640
+ }
9493
9641
  const selectionCheck = assertDispatchSelectionAdmission({
9494
9642
  dimension: args.dimension,
9495
9643
  difficulty: args.difficulty,
@@ -9542,7 +9690,8 @@ function createCliStartAgentRunExecutor(deps = {}) {
9542
9690
  // 执行后端(默认 docker 沙盒;只读派发留宿主):唯一产出 `--runtime-key`
9543
9691
  // 的地方,成对不变式在 buildCliLocalRuntimeForwardArgs 内机械断言。
9544
9692
  ...buildCliLocalRuntimeForwardArgs(dispatch),
9545
- ...instaboxArgs
9693
+ ...instaboxArgs,
9694
+ ...imagePaths.flatMap((path) => ["--image", path])
9546
9695
  ];
9547
9696
  const agentName = await resolveAgentRunName(
9548
9697
  agentKey,
@@ -10269,6 +10418,7 @@ function pickAgentRunResolverDeps(args) {
10269
10418
  return {
10270
10419
  ...args.resolveAgentCredentialGroup ? { resolveAgentCredentialGroup: args.resolveAgentCredentialGroup } : {},
10271
10420
  ...args.dialogExistsForCurrentUser ? { dialogExistsForCurrentUser: args.dialogExistsForCurrentUser } : {},
10421
+ ...args.resolveAgentImageSupport ? { resolveAgentImageSupport: args.resolveAgentImageSupport } : {},
10272
10422
  ...args.resolveAgentModel ? { resolveAgentModel: args.resolveAgentModel } : {},
10273
10423
  ...args.resolveAgentDisplayName ? { resolveAgentDisplayName: args.resolveAgentDisplayName } : {},
10274
10424
  ...args.resolveAgentRuntimeBindingMachineId ? { resolveAgentRuntimeBindingMachineId: args.resolveAgentRuntimeBindingMachineId } : {},
@@ -10645,7 +10795,7 @@ function createOAuthApiKeyRefResolver(options = {}) {
10645
10795
  }
10646
10796
 
10647
10797
  // packages/agent-runtime/localSandboxWorkload.ts
10648
- import { existsSync as existsSync3 } from "node:fs";
10798
+ import { existsSync as existsSync4 } from "node:fs";
10649
10799
  import { resolve as resolve5 } from "node:path";
10650
10800
 
10651
10801
  // packages/agent-runtime/executionChannel.ts
@@ -10737,7 +10887,7 @@ import {
10737
10887
  } from "node:fs";
10738
10888
  import { access } from "node:fs/promises";
10739
10889
  import { tmpdir } from "node:os";
10740
- import { isAbsolute as isAbsolute3, join as join4, relative, resolve as resolve4 } from "node:path";
10890
+ import { isAbsolute as isAbsolute4, join as join4, relative, resolve as resolve4 } from "node:path";
10741
10891
 
10742
10892
  // packages/agent-runtime/linuxSandboxSeccomp.ts
10743
10893
  var AUDIT_ARCH_X86_64 = 3221225534;
@@ -10831,10 +10981,10 @@ var PSEUDO_FS = ["/proc", "/sys", "/dev", "/run"];
10831
10981
  var SANDBOX_MOUNTS = ["/", "/usr", "/bin", "/lib", "/lib64", "/tmp"];
10832
10982
  var inside = (parent, child) => {
10833
10983
  const rel = relative(parent, child);
10834
- return rel === "" || rel !== ".." && !rel.startsWith("../") && !isAbsolute3(rel);
10984
+ return rel === "" || rel !== ".." && !rel.startsWith("../") && !isAbsolute4(rel);
10835
10985
  };
10836
10986
  function openRootHandle(path) {
10837
- if (typeof path !== "string" || !isAbsolute3(path) || path.includes("\0")) {
10987
+ if (typeof path !== "string" || !isAbsolute4(path) || path.includes("\0")) {
10838
10988
  throw new Error("Sandbox root must be absolute");
10839
10989
  }
10840
10990
  const expected = resolve4(path);
@@ -11020,7 +11170,7 @@ var LinuxBubblewrapBackend = class {
11020
11170
  if (request.timeoutMs !== void 0 && (!Number.isFinite(request.timeoutMs) || request.timeoutMs <= 0)) {
11021
11171
  throw new Error("Sandbox timeout must be finite and positive");
11022
11172
  }
11023
- if (request.cwd && !active.writable.some(({ path: root }) => isAbsolute3(request.cwd) && inside(root, resolve4(request.cwd)))) {
11173
+ if (request.cwd && !active.writable.some(({ path: root }) => isAbsolute4(request.cwd) && inside(root, resolve4(request.cwd)))) {
11024
11174
  throw new Error("Command cwd outside writable sandbox roots");
11025
11175
  }
11026
11176
  if (!validateConfiguredRootExecutionLease(active.ticket, active.lease)) {
@@ -11225,7 +11375,7 @@ async function createLocalSandboxWorkload(args) {
11225
11375
  if (canonicalToolName(toolName) !== EXECUTION_SHELL_TOOL) return null;
11226
11376
  const callArgs = toolArgs ?? {};
11227
11377
  const command = typeof callArgs.command === "string" ? callArgs.command : "";
11228
- const mountedBins = readableRoots.map((root) => `${root}/bin`).filter((dir) => existsSync3(dir));
11378
+ const mountedBins = readableRoots.map((root) => `${root}/bin`).filter((dir) => existsSync4(dir));
11229
11379
  const sandboxPath = [
11230
11380
  ...mountedBins,
11231
11381
  process.env.PATH ?? "/usr/local/bin:/usr/bin:/bin"
@@ -12071,8 +12221,8 @@ async function createLocalDockerWorkload(args) {
12071
12221
  }
12072
12222
  const createLifecycle = args.createLifecycle ?? (async () => {
12073
12223
  const [{ DockerWorkloadLifecycle, createDockerBindingAuthorizer }, accounts] = await Promise.all([
12074
- import("./workloadLifecycle-O2I3NZ2Q.js"),
12075
- import("./accountResolver-EK2S4PWF.js")
12224
+ import("./workloadLifecycle-HFJIN5IZ.js"),
12225
+ import("./accountResolver-QETKNC7T.js")
12076
12226
  ]);
12077
12227
  const resolveAccount = args.resolveAccount ?? accounts.createDockerAccountResolver({
12078
12228
  env: args.env,
@@ -13890,6 +14040,75 @@ var import_format = __toESM(require_format(), 1);
13890
14040
  import { appendFileSync, mkdirSync as mkdirSync3 } from "fs";
13891
14041
  import { homedir } from "os";
13892
14042
  import { join as join7 } from "path";
14043
+
14044
+ // packages/cli/client/cliCompletedTurnCapture.ts
14045
+ async function readCliCaptureSources(args) {
14046
+ if (args.input.result.stopReason !== "done" || args.input.result.error) return [];
14047
+ const explicitIds = args.input.cliCaptureUserMessageIds;
14048
+ const ids = [...new Set([
14049
+ ...args.input.messages.filter((message) => message.role === "user").map((message) => message.cliMessageId),
14050
+ ...Array.isArray(explicitIds) ? explicitIds : [],
14051
+ ...args.persistedUserMessageIds ?? []
14052
+ ].filter((id) => typeof id === "string" && /^[A-Za-z0-9_-]{1,128}$/.test(id)))];
14053
+ const sources = [];
14054
+ for (const id of ids) {
14055
+ const key = `dialog-${args.dialogId}-msg-${id}`;
14056
+ const record = await args.read(key);
14057
+ if (record?.id !== id || record?.dialogId !== args.dialogId || record?.userId !== args.userId || record?.role !== "user" || isTombstoneRecord(record) || typeof record?.content !== "string" || !record.content.trim() || typeof record?.createdAt !== "string" || !Number.isFinite(Date.parse(record.createdAt))) continue;
14058
+ sources.push({ type: "put", key, value: record });
14059
+ }
14060
+ return sources;
14061
+ }
14062
+ async function captureCliCompletedTurn(args) {
14063
+ if (args.input.result.stopReason !== "done" || args.input.result.error) {
14064
+ return [{ status: "skipped", reason: "turn_not_completed" }];
14065
+ }
14066
+ if (!args.sources.length) return [{ status: "deferred", reason: "missing_persisted_source" }];
14067
+ const serverUrl = resolveRuntimeServerUrl(args.env);
14068
+ if (!serverUrl) return [{ status: "deferred", reason: "server_not_configured" }];
14069
+ const authToken = resolveRuntimeAuthToken(args.env);
14070
+ if (!authToken) return [{ status: "deferred", reason: "not_authenticated" }];
14071
+ const results = [];
14072
+ for (const source of args.sources) {
14073
+ const userMessageId = source.value.id;
14074
+ try {
14075
+ const response = await fetchWithTransientRetry(
14076
+ args.fetchImpl,
14077
+ `${serverUrl}/api/memory/capture-turn`,
14078
+ {
14079
+ method: "POST",
14080
+ headers: { "Content-Type": "application/json", Authorization: `Bearer ${authToken}` },
14081
+ // The transitional validator requires nonempty userInput; native capture ignores it.
14082
+ // A short inert marker also avoids legacy text extraction on older servers.
14083
+ body: JSON.stringify({
14084
+ agentKey: args.input.agentKey,
14085
+ dialogId: args.dialogId,
14086
+ userMessageId,
14087
+ userInput: "native source"
14088
+ }),
14089
+ signal: AbortSignal.timeout(remoteDialogSyncTimeout())
14090
+ },
14091
+ { retryableStatuses: /* @__PURE__ */ new Set([429, 502, 503]) }
14092
+ );
14093
+ if (!response.ok) {
14094
+ results.push({ status: "deferred", reason: `http_${response.status}`, userMessageId });
14095
+ continue;
14096
+ }
14097
+ const body = await response.json();
14098
+ const native = body?.protocol === "native" ? body.nativeCapture : null;
14099
+ if (!native || !["captured", "skipped"].includes(native.capture) || !["applied", "no_op", "deferred", "failed"].includes(native.formation)) {
14100
+ results.push({ status: "deferred", reason: "native_capture_unconfirmed", userMessageId });
14101
+ } else {
14102
+ results.push({ status: native.capture, reason: `formation_${native.formation}`, userMessageId });
14103
+ }
14104
+ } catch {
14105
+ results.push({ status: "deferred", reason: "transport_or_response_error", userMessageId });
14106
+ }
14107
+ }
14108
+ return results;
14109
+ }
14110
+
14111
+ // packages/cli/client/localRuntimeDialog.ts
13893
14112
  var diagLog = {
13894
14113
  warn: (msg) => getLogger("cli.localRuntimeDialog").warn(msg),
13895
14114
  info: (msg) => getLogger("cli.localRuntimeDialog").info(msg)
@@ -14187,6 +14406,16 @@ async function writeDialog(args) {
14187
14406
  existingDialog,
14188
14407
  cwd: args.cwd
14189
14408
  });
14409
+ for (const id of plan.captureUserMessageIds) {
14410
+ const op = plan.ops.find((op2) => op2.value.id === id && op2.value.role === "user");
14411
+ const existing = await args.store.read(op.key, { remote: false });
14412
+ if (existing) {
14413
+ if (existing.id !== id || existing.dialogId !== plan.dialogId || existing.userId !== args.userId || existing.role !== "user" || JSON.stringify(existing.content) !== JSON.stringify(op.value.content)) {
14414
+ throw new Error("CLI persisted turn source conflict");
14415
+ }
14416
+ op.value = existing;
14417
+ }
14418
+ }
14190
14419
  const lastInputTokens = extractLastProviderInputTokens(args.input) ?? (typeof existingDialog?.lastInputTokens === "number" && Number.isFinite(existingDialog.lastInputTokens) && existingDialog.lastInputTokens > 0 ? existingDialog.lastInputTokens : void 0);
14191
14420
  if (typeof lastInputTokens === "number" && lastInputTokens > 0) {
14192
14421
  const dialogOp = plan.ops.find(
@@ -14235,40 +14464,56 @@ async function writeDialog(args) {
14235
14464
  diagLog.info(`perf writeDialog D:token-record (cumulative): ${ms}ms`);
14236
14465
  }
14237
14466
  const hasSubjectRefs = localTurnHasSubjectRefs(args.input);
14238
- const isLocalUser = args.userId === "local";
14239
- let remoteSyncPromise;
14240
- if (!isLocalUser) {
14241
- if (hasSubjectRefs) {
14242
- remoteSyncPromise = (async () => {
14243
- const syncResult = await syncLocalDialogEvidenceToRemote({
14244
- env: args.env,
14245
- fetchImpl: args.fetchImpl,
14246
- input: args.input,
14247
- ops: [...plan.ops, ...tokenOps],
14248
- output: args.output,
14249
- userId: args.userId
14250
- });
14251
- if (!syncResult.attempted) {
14252
- args.output?.write(
14253
- "[nolo] Local dialog evidence is local-only; set NOLO_SERVER and AUTH_TOKEN to make subjectRefs remotely queryable.\n"
14254
- );
14255
- }
14256
- })();
14257
- await remoteSyncPromise;
14258
- } else {
14259
- remoteSyncPromise = startOwnedDialogSync(args.fetchImpl, (fetchImpl) => syncLocalDialogEvidenceToRemote({
14467
+ let memoryCaptureResults = [];
14468
+ const reportCapture = (results) => {
14469
+ memoryCaptureResults = results;
14470
+ for (const result of results) {
14471
+ diagLog.info(`memory_capture ${result.status}: ${result.reason}`);
14472
+ }
14473
+ };
14474
+ const captureSources = await readCliCaptureSources({
14475
+ input: args.input,
14476
+ dialogId: plan.dialogId,
14477
+ userId: args.userId,
14478
+ persistedUserMessageIds: plan.captureUserMessageIds,
14479
+ read: (key) => args.store.read(key, { remote: false })
14480
+ }).catch(() => []);
14481
+ const syncAndCapture = async (fetchImpl) => {
14482
+ try {
14483
+ const syncResult = args.userId === "local" ? { attempted: false } : await syncLocalDialogEvidenceToRemote({
14260
14484
  env: args.env,
14261
14485
  fetchImpl,
14262
14486
  input: args.input,
14263
- ops: [...plan.ops, ...tokenOps],
14487
+ ops: [...plan.ops, ...tokenOps, ...captureSources],
14488
+ localStore: args.store,
14264
14489
  output: args.output,
14265
14490
  userId: args.userId
14266
- })).catch((error) => {
14267
- args.output?.write(`[nolo] Remote dialog evidence sync failed; class=${classifyDialogSyncFailure(error)}; local history retained; remote sync incomplete.
14268
- `);
14269
14491
  });
14492
+ if (!syncResult.attempted) {
14493
+ if (hasSubjectRefs) args.output?.write(
14494
+ "[nolo] Local dialog evidence is local-only; set NOLO_SERVER and AUTH_TOKEN to make subjectRefs remotely queryable.\n"
14495
+ );
14496
+ const result = args.input.result.stopReason !== "done" || args.input.result.error ? { status: "skipped", reason: "turn_not_completed" } : { status: "deferred", reason: !resolveRuntimeServerUrl(args.env) ? "server_not_configured" : args.userId === "local" || !resolveRuntimeAuthToken(args.env) ? "not_authenticated" : "remote_sync_unavailable" };
14497
+ reportCapture([result]);
14498
+ return;
14499
+ }
14500
+ reportCapture(await captureCliCompletedTurn({
14501
+ input: args.input,
14502
+ dialogId: plan.dialogId,
14503
+ sources: captureSources,
14504
+ env: args.env,
14505
+ fetchImpl
14506
+ }));
14507
+ } catch (error) {
14508
+ reportCapture([{ status: "deferred", reason: "remote_sync_failed" }]);
14509
+ throw error;
14270
14510
  }
14271
- }
14511
+ };
14512
+ const remoteSyncPromise = hasSubjectRefs ? syncAndCapture(args.fetchImpl) : startOwnedDialogSync(args.fetchImpl, syncAndCapture).catch((error) => {
14513
+ args.output?.write(`[nolo] Remote dialog evidence sync failed; class=${classifyDialogSyncFailure(error)}; local history retained; remote sync incomplete.
14514
+ `);
14515
+ });
14516
+ if (hasSubjectRefs) await remoteSyncPromise;
14272
14517
  let titlePatchPromise;
14273
14518
  if (titlePromise) {
14274
14519
  const dialogKey = `dialog-${args.userId}-${plan.dialogId}`;
@@ -14296,7 +14541,9 @@ async function writeDialog(args) {
14296
14541
  const ms = (performance.now() - __perfT0).toFixed(1);
14297
14542
  diagLog.info(`perf writeDialog total (blocking): ${ms}ms`);
14298
14543
  }
14299
- return { dialogId: plan.dialogId, title: plan.title, titlePatchPromise, remoteSyncPromise };
14544
+ return { dialogId: plan.dialogId, title: plan.title, titlePatchPromise, remoteSyncPromise, get memoryCaptureResults() {
14545
+ return memoryCaptureResults;
14546
+ } };
14300
14547
  }
14301
14548
  function resolveCliDialogRecordKey(userId, dialogId) {
14302
14549
  if (dialogId.startsWith("dialog-") && !dialogId.includes("-msg-")) {
@@ -14616,6 +14863,14 @@ function createCliLocalRuntimeAdapter(deps) {
14616
14863
  const defaultCompactionSummary = createTuiSummaryLlmCaller(deps.env, { fetchImpl, platformPrimary: true });
14617
14864
  const loopbackRequest = deps.loopbackRequest ?? (deps.fetchImpl ? void 0 : defaultLoopbackRequest);
14618
14865
  const userId = resolveLocalUserId(deps.env);
14866
+ const resolveLiveImageSupport = createLiveImageSupportResolver(userId, async () => {
14867
+ const token = await createOAuthApiKeyRefResolver({
14868
+ migration: { enableLegacyMigration: true },
14869
+ localUserId: userId
14870
+ })("antigravity");
14871
+ if (!token) return {};
14872
+ return fetchAntigravityAvailableModels(fetchImpl, token);
14873
+ });
14619
14874
  const localToolBudgets = parseLocalToolBudgets(deps.env);
14620
14875
  const localToolUsage = /* @__PURE__ */ new Map();
14621
14876
  const buildProviderOpenAiTools = deps.buildProviderOpenAiTools ?? buildOpenAiTools;
@@ -14784,7 +15039,7 @@ function createCliLocalRuntimeAdapter(deps) {
14784
15039
  emitRunIsolationNotice(fact, { runId });
14785
15040
  try {
14786
15041
  const { writeFileSync: writeFileSync4, mkdirSync: mkdirSync4 } = await import("node:fs");
14787
- const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SNZZ5XP4.js");
15042
+ const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-MBG4U6SL.js");
14788
15043
  recordLocalRunExecutionIsolation({
14789
15044
  runId,
14790
15045
  runsDir: resolveRunsDir2(deps.env),
@@ -14809,7 +15064,7 @@ function createCliLocalRuntimeAdapter(deps) {
14809
15064
  dockerWorkloadReleased = true;
14810
15065
  dockerWorkloadLoad = null;
14811
15066
  if (loaded) {
14812
- const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-SNZZ5XP4.js");
15067
+ const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-MBG4U6SL.js");
14813
15068
  const exportRunDiff = deps.exportDockerRunDiffArtifact ?? exportDockerRunDiffArtifact;
14814
15069
  const warn = (message) => process.stderr.write(`[nolo] ${message}
14815
15070
  `);
@@ -14924,6 +15179,10 @@ function createCliLocalRuntimeAdapter(deps) {
14924
15179
  const deleted = Boolean(rec?.deletedAt || rec?.deleted || rec?.isDeleted);
14925
15180
  return !deleted && typeof rec?.name === "string" && rec.name.trim() ? rec.name.trim() : void 0;
14926
15181
  },
15182
+ resolveAgentImageSupport: async (agentRef) => {
15183
+ const record = await readAgentFromStore({ agentRef, store: await getOrCreateSharedStore(deps), userId });
15184
+ return !!record && resolveAgentImageInputSupport(await resolveLiveImageSupport({ ...record, hasVision: record.hasVision ?? false }));
15185
+ },
14927
15186
  resolveAgentModel,
14928
15187
  dialogExistsForCurrentUser: async (dialogId) => {
14929
15188
  const store = await getOrCreateSharedStore(deps);
@@ -15109,7 +15368,7 @@ function createCliLocalRuntimeAdapter(deps) {
15109
15368
  runtimeToolExecutionLimits = cached.runtimeToolExecutionLimits;
15110
15369
  reviewAgentConfig = cached.agentConfig;
15111
15370
  localToolExecutors = buildCurrentToolExecutors(cached.agentConfig);
15112
- return cached.agentConfig;
15371
+ return resolveLiveImageSupport(cached.agentConfig);
15113
15372
  }
15114
15373
  }
15115
15374
  const storedAgentConfig = await readAgentFromStore({
@@ -15195,7 +15454,7 @@ function createCliLocalRuntimeAdapter(deps) {
15195
15454
  runtimeToolExecutionLimits
15196
15455
  });
15197
15456
  }
15198
- return exposedAgentConfig;
15457
+ return exposedAgentConfig ? resolveLiveImageSupport(exposedAgentConfig) : exposedAgentConfig;
15199
15458
  },
15200
15459
  loadDialogHistory: async (dialogId) => {
15201
15460
  const loaded = await loadCliDialogHistoryWithSource({
@@ -15655,12 +15914,6 @@ function createCliLocalRuntimeAdapter(deps) {
15655
15914
  }
15656
15915
 
15657
15916
  export {
15658
- readTimestamp,
15659
- parseAgentRunEvent,
15660
- isLiveAgentRunObservation,
15661
- formatApprovalRemaining,
15662
- createHostApprovalCardQueue,
15663
- registerHostApprovalRenderer,
15664
15917
  matchContextualFragment,
15665
15918
  renderNoticeElements,
15666
15919
  renderCliNotice,
@@ -15669,6 +15922,12 @@ export {
15669
15922
  buildNoticeTasksFromRuns,
15670
15923
  setTurnNoticeMeta,
15671
15924
  mergeNoticeGroup,
15925
+ readTimestamp,
15926
+ parseAgentRunEvent,
15927
+ isLiveAgentRunObservation,
15928
+ formatApprovalRemaining,
15929
+ createHostApprovalCardQueue,
15930
+ registerHostApprovalRenderer,
15672
15931
  isSubtaskRun,
15673
15932
  RUN_WAKE_CHANNEL_ENV,
15674
15933
  createOriginShellGrant,
@@ -15713,6 +15972,7 @@ export {
15713
15972
  resolveBoundMachineId,
15714
15973
  isCliProviderAgentConfig,
15715
15974
  detectCurrentMachineId,
15975
+ normalizeCliRunImages,
15716
15976
  readFlagValue,
15717
15977
  isFullstackCodingAgentRef,
15718
15978
  positionalArgs,