nolo-cli 0.249.0-alpha.9 → 0.251.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 (143) hide show
  1. package/{_executeModel-HWAMKGWB.js → _executeModel-55PHWQWB.js} +30 -30
  2. package/{addContentAction-MLI6GOBV.js → addContentAction-LBVAQUF7.js} +2 -2
  3. package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-6WAUSUSZ.js} +1 -1
  4. package/{agentDeleteCommand-B7XG4QD5.js → agentDeleteCommand-KEO3KDK3.js} +59 -55
  5. package/{agentEmailCommands-IWRTGO7J.js → agentEmailCommands-RWJQQRNT.js} +59 -55
  6. package/{agentListCommands-ZJAHAV33.js → agentListCommands-L3TLPLNH.js} +24 -24
  7. package/{agentMachineCommands-ACOBJR4U.js → agentMachineCommands-EZWWXWDH.js} +20 -20
  8. package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-6OCNLVGC.js} +1 -1
  9. package/{agentRecordCommands-NWKL4YUG.js → agentRecordCommands-7W2CGHJJ.js} +58 -54
  10. package/{agentRunCommand-MRDX6DL6.js → agentRunCommand-POL6B6BO.js} +59 -55
  11. package/{agentRunControl-QMWTWV7C.js → agentRunControl-FKSXBUAF.js} +1 -1
  12. package/{agentRuntimeLocal-65F3RVQM.js → agentRuntimeLocal-WSHWNIMF.js} +16 -16
  13. package/{agentSlice-CF3SO4QW.js → agentSlice-3G2YLTA4.js} +3 -3
  14. package/{appDeleteCommands-6ML7IZWP.js → appDeleteCommands-DZZQCVYH.js} +21 -21
  15. package/{appDeployCommands-CZOP3X47.js → appDeployCommands-NJJBVNH5.js} +21 -21
  16. package/{appDeployStatusCommands-T4QEGCMV.js → appDeployStatusCommands-GBOAFEYG.js} +21 -21
  17. package/{appGetCommands-4MWH3GB7.js → appGetCommands-GOOKYMKO.js} +21 -21
  18. package/{appListCommands-EYM6PLZM.js → appListCommands-OBCGUG3S.js} +21 -21
  19. package/{authCommand-3C3RN4OU.js → authCommand-77CRN332.js} +9 -9
  20. package/{authCommands-ZMVEDCQD.js → authCommands-BLXNAUF4.js} +2 -2
  21. package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-6RLEBBJJ.js} +1 -1
  22. package/{chunk-MNXWT3GC.js → chunk-222CJNC2.js} +3 -3
  23. package/chunk-3A5NNQCN.js +64 -0
  24. package/{chunk-OP7UDCGP.js → chunk-3KWJPTVP.js} +3 -3
  25. package/{chunk-5D5C7IFJ.js → chunk-3ZWJVKFB.js} +150 -40
  26. package/{chunk-OLGFIQN2.js → chunk-43VT5PLM.js} +1 -1
  27. package/{chunk-RHBD22LV.js → chunk-5IKKSJYX.js} +4 -2
  28. package/{chunk-JRKQT7ST.js → chunk-6UNJ6JGR.js} +9 -9
  29. package/{chunk-BFKJ2RS3.js → chunk-7RYODZDD.js} +1 -1
  30. package/{chunk-P4HBFHQB.js → chunk-A55E2OCP.js} +16 -16
  31. package/{chunk-3WHVE2XX.js → chunk-BQ4CZEVZ.js} +1 -1
  32. package/{chunk-ITBX27W6.js → chunk-CFDOIIOZ.js} +2 -2
  33. package/{chunk-RNKWM6DL.js → chunk-CUYFRVJF.js} +3 -3
  34. package/{chunk-CUMWQC3F.js → chunk-D35TOEMM.js} +2 -2
  35. package/{chunk-OHUYN3YU.js → chunk-D3E5MYXO.js} +1 -1
  36. package/{chunk-SPU3L3OR.js → chunk-EFM2IPZR.js} +3 -3
  37. package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
  38. package/{chunk-DQFQOKCR.js → chunk-FAFDIQJG.js} +3 -3
  39. package/{chunk-UF6J7NXV.js → chunk-GMWZRXRM.js} +1 -1
  40. package/{chunk-ARFCL53U.js → chunk-HD5EKSLF.js} +3 -3
  41. package/{chunk-4IQN6FWY.js → chunk-HQLCYPL4.js} +1 -1
  42. package/chunk-HZD5HXUO.js +405 -0
  43. package/{chunk-FFFKAOJN.js → chunk-IXAGRTAR.js} +1 -1
  44. package/{chunk-UPOW5HTG.js → chunk-IZWGO2ZS.js} +1 -1
  45. package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
  46. package/{chunk-ZTWDSOXD.js → chunk-JUYI2D7J.js} +1 -1
  47. package/{chunk-5FU7HEII.js → chunk-K5CIMK3R.js} +3 -3
  48. package/{chunk-DKOUQOJ7.js → chunk-KGOBJAWC.js} +54 -52
  49. package/{chunk-CX5BGBCX.js → chunk-KHVTT4WW.js} +1 -1
  50. package/{chunk-L4ES2RVY.js → chunk-KJDN2YRH.js} +1 -1
  51. package/{chunk-JFRJEPFI.js → chunk-KRAPKTAS.js} +1 -1
  52. package/{chunk-Y45F45YH.js → chunk-KZVRPCOR.js} +3 -3
  53. package/{chunk-TMRJGSK2.js → chunk-L5HV76QT.js} +1 -1
  54. package/{chunk-H772FXSL.js → chunk-LOXR4TQN.js} +2 -2
  55. package/{chunk-W6T4FNZP.js → chunk-LUPZLKXL.js} +192 -352
  56. package/{chunk-VOWN2ZQI.js → chunk-LXKK7QFI.js} +1 -1
  57. package/{chunk-73PZD7JZ.js → chunk-MTS5DCL2.js} +2 -2
  58. package/{chunk-LAIWAVKI.js → chunk-N3SEV3CG.js} +35 -27
  59. package/{chunk-KLAMJNKQ.js → chunk-NMXGIRSG.js} +14 -7
  60. package/{chunk-WNIV5BV7.js → chunk-NTNX77FI.js} +8 -8
  61. package/{chunk-BGWCWHWL.js → chunk-OARYOLF3.js} +90 -79
  62. package/{chunk-BAH3BAUZ.js → chunk-OQCAHPDQ.js} +5 -5
  63. package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
  64. package/{chunk-IQAO6IUP.js → chunk-PKMDYRAM.js} +33 -24
  65. package/{chunk-MBJSAYYK.js → chunk-PLS2MJVW.js} +5 -5
  66. package/{chunk-V4D5ZKWF.js → chunk-Q5KZ6F55.js} +11 -11
  67. package/{chunk-RJSITWNF.js → chunk-QJ5YDTEF.js} +7 -7
  68. package/{chunk-V4IYI3SB.js → chunk-QLGL43SI.js} +1 -1
  69. package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
  70. package/{chunk-E5RYFR7E.js → chunk-R7D5SRAZ.js} +2 -0
  71. package/{chunk-YM6L335H.js → chunk-SLUZ6FBJ.js} +1 -1
  72. package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
  73. package/{chunk-D25ONVOH.js → chunk-SSZHE2RK.js} +1 -1
  74. package/{chunk-ADOOL3PG.js → chunk-T4V6C3J3.js} +1 -1
  75. package/{chunk-E2U4I3NK.js → chunk-TGKAUEV3.js} +4 -4
  76. package/chunk-TRRXYFTR.js +46 -0
  77. package/{chunk-BVEDT6DM.js → chunk-U2OWDHDE.js} +3 -3
  78. package/{chunk-YWNCRUBZ.js → chunk-UCMUXZJV.js} +5 -5
  79. package/{chunk-SAXVCWLZ.js → chunk-W2N4OAKM.js} +2 -2
  80. package/{chunk-FNB2XPBD.js → chunk-X337N4D6.js} +3 -3
  81. package/{chunk-6TVYUQRM.js → chunk-XC5RPSXK.js} +1 -1
  82. package/chunk-XRGBJHZX.js +136 -0
  83. package/{chunk-IJZC2KIJ.js → chunk-Z7A2ZQ5X.js} +1 -1
  84. package/{chunk-DGHHJV3T.js → chunk-ZKKJZBNO.js} +6 -6
  85. package/{chunk-SHDJLJWV.js → chunk-ZSRR6HCH.js} +1 -1
  86. package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-N6LTB7UY.js} +2 -2
  87. package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
  88. package/cliAuthorityBrokerProcess-IUCB4XA6.js +22 -0
  89. package/{cliLocalAgentRecordReader-WUSV4VMI.js → cliLocalAgentRecordReader-NFNGYOOW.js} +18 -18
  90. package/{commandRegistry-MR6GOEUC.js → commandRegistry-OM5DU4DS.js} +72 -72
  91. package/{contentThunks-WF73YCYA.js → contentThunks-7URM43ET.js} +10 -10
  92. package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-JEEV75B7.js} +1 -1
  93. package/{createAgentAutomationAction-NUIQOIOW.js → createAgentAutomationAction-GGEXIKMC.js} +10 -10
  94. package/{createDialogAction-IASHJN3H.js → createDialogAction-IXXEMFRQ.js} +11 -11
  95. package/{createPageAction-7YDRLGGF.js → createPageAction-IXIVLIOO.js} +13 -13
  96. package/{db-CMUTP3W5.js → db-J5KE7XRI.js} +3 -2
  97. package/{dbSlice-656PMWR2.js → dbSlice-IE4ADINL.js} +1 -1
  98. package/{dialogCommands-E4KH23LG.js → dialogCommands-RPBHOZB6.js} +30 -26
  99. package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-ECKI5MMA.js} +3 -3
  100. package/{dialogSlice-CTSI7MTT.js → dialogSlice-5FQB2TNN.js} +8 -8
  101. package/{dialogUsageCommand-6RW2FY6K.js → dialogUsageCommand-TBIA2QAF.js} +2 -2
  102. package/{docCreateCommands-3OVVJQ5T.js → docCreateCommands-XJ2X57DW.js} +20 -20
  103. package/{docDeleteCommands-ZY3YVAKQ.js → docDeleteCommands-45WGFFEB.js} +21 -21
  104. package/{docReadCommands-DRKAOI4S.js → docReadCommands-LRRVDS46.js} +20 -20
  105. package/{docStore-6WBQOAXG.js → docStore-SUAVM24F.js} +2 -2
  106. package/{docUpdateCommands-YUOV2EY6.js → docUpdateCommands-QUYX6BVR.js} +20 -20
  107. package/{handleSendMessageAction-N2OMO5G4.js → handleSendMessageAction-FDIWBQUB.js} +65 -23
  108. package/{hostCredentialCreate-7URAYDDW.js → hostCredentialCreate-CEXQHYT4.js} +58 -54
  109. package/index.js +23 -11
  110. package/{localDialogRead-CIOTQM5T.js → localDialogRead-USDZXKIL.js} +1 -1
  111. package/{localRuntimeAdapter-N7UAZM2A.js → localRuntimeAdapter-O3JBRK6S.js} +56 -52
  112. package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-QKWTPBQQ.js} +13 -3
  113. package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-3CIC4SKC.js} +1 -1
  114. package/{machineCommands-37DP3W6M.js → machineCommands-I3YA7TNC.js} +57 -53
  115. package/{machineWsRunDispatch-MWJ3YPHO.js → machineWsRunDispatch-E5CIE2OJ.js} +57 -53
  116. package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
  117. package/{mcpLocalAuthorizeCommand-TI656UWC.js → mcpLocalAuthorizeCommand-K5J2VMG6.js} +10 -6
  118. package/{memberThunks-JFYC4Z5L.js → memberThunks-T7EAZE6A.js} +3 -3
  119. package/package.json +2 -1
  120. package/{projectArchive-LP7LCMCR.js → projectArchive-A7E65AZO.js} +13 -13
  121. package/{readlineWorkspace-VFI2DNJS.js → readlineWorkspace-2O65NBFG.js} +96 -93
  122. package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-GRT72HLK.js} +3 -3
  123. package/{runAgentClientLoop-S5Y42KAZ.js → runAgentClientLoop-NWCZIXCG.js} +28 -28
  124. package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-26HYHFTK.js} +9 -6
  125. package/{secretCommands-2FEMRUFM.js → secretCommands-XR72SHLK.js} +2 -2
  126. package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-CBG3X46B.js} +2 -2
  127. package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-EWTDZOAX.js} +3 -3
  128. package/{settingThunks-IHXUF276.js → settingThunks-X4PT66J2.js} +1 -1
  129. package/{spaceCommands-EKDIDAQD.js → spaceCommands-EVSNTGRS.js} +19 -19
  130. package/{streamAgentChatTurn-IYNNLYI5.js → streamAgentChatTurn-SYP3OEM5.js} +53 -53
  131. package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-YHPZ7K6E.js} +1 -1
  132. package/{tools-GIATFQW5.js → tools-2AO2SK4L.js} +22 -22
  133. package/{tuiRestart-5F2APN66.js → tuiRestart-HBQDF4AE.js} +2 -2
  134. package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-Q2PNR63K.js} +4 -4
  135. package/{updateCommands-FBYA5WVG.js → updateCommands-6SI7NWVC.js} +3 -3
  136. package/{updateDialogTitleAction-PQDJD35N.js → updateDialogTitleAction-MWVMBIPZ.js} +10 -10
  137. package/{usageCommand-L4OFWXEU.js → usageCommand-D44AOTMH.js} +2 -2
  138. package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-IRIMKDI5.js} +3 -3
  139. package/{windowsSelfUpdate-M4V77OUB.js → windowsSelfUpdate-BJIJKKIS.js} +2 -2
  140. package/{chunk-MYYNZG2M.js → chunk-CJ2BP6V7.js} +3 -3
  141. package/{chunk-HZDK56EK.js → chunk-IFJ6OTI6.js} +0 -0
  142. package/{chunk-WMKA2DPK.js → chunk-LMMRWGGJ.js} +3 -3
  143. package/{chunk-EDT65EUE.js → chunk-WZPG63Q4.js} +3 -3
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-GAHJLSDO.js";
9
9
  import {
10
10
  getReadableCliDb
11
- } from "./chunk-D25ONVOH.js";
11
+ } from "./chunk-SSZHE2RK.js";
12
12
  import {
13
13
  INSTABOX_RUN_CONFIG_ENV,
14
14
  buildLocalRunEnv,
@@ -33,7 +33,7 @@ import {
33
33
  resolveServerUrl,
34
34
  validateInstaboxWorkspaceSelection,
35
35
  writeUsage
36
- } from "./chunk-DKOUQOJ7.js";
36
+ } from "./chunk-KGOBJAWC.js";
37
37
  import {
38
38
  boxGlyphs,
39
39
  displayWidth,
@@ -43,7 +43,7 @@ import {
43
43
  stripAnsi,
44
44
  tokenizeAnsiLine,
45
45
  visibleWidth
46
- } from "./chunk-6TVYUQRM.js";
46
+ } from "./chunk-XC5RPSXK.js";
47
47
  import {
48
48
  clearCredentialAvailability,
49
49
  readEffectiveCredentialEntry
@@ -84,16 +84,16 @@ import {
84
84
  import {
85
85
  resolveMachineId
86
86
  } from "./chunk-S73EPYNC.js";
87
- import {
88
- resolveCliLocalRuntimeKeyCapability
89
- } from "./chunk-5D5C7IFJ.js";
90
87
  import {
91
88
  extractGoogleValidationLink
92
89
  } from "./chunk-BMQ2MJUK.js";
90
+ import {
91
+ resolveCliLocalRuntimeKeyCapability
92
+ } from "./chunk-3ZWJVKFB.js";
93
93
  import {
94
94
  parseUiCard,
95
95
  uiCardFallback
96
- } from "./chunk-DGHHJV3T.js";
96
+ } from "./chunk-ZKKJZBNO.js";
97
97
  import {
98
98
  isGatewayHttpStatus
99
99
  } from "./chunk-NF64D32W.js";
@@ -104,7 +104,7 @@ import {
104
104
  loadOwnerItemsFromDb,
105
105
  parseUiAskChoiceContent,
106
106
  resolveAgentMemoryPolicy
107
- } from "./chunk-FNB2XPBD.js";
107
+ } from "./chunk-X337N4D6.js";
108
108
  import {
109
109
  API_REPORTED_COST_MULTIPLIER,
110
110
  estimateMessagesTokens,
@@ -113,14 +113,17 @@ import {
113
113
  resolveAgentContextWindow,
114
114
  resolveOccupancy,
115
115
  resolveOccupancyWindow
116
- } from "./chunk-P4HBFHQB.js";
116
+ } from "./chunk-A55E2OCP.js";
117
+ import {
118
+ getDefaultCliLocalRuntimeDb
119
+ } from "./chunk-7RYODZDD.js";
117
120
  import {
118
121
  parsePositiveFiniteNumberOrFallback
119
122
  } from "./chunk-Y5GCAMGP.js";
120
123
  import {
121
124
  readDbRecord,
122
125
  resolveAgentRecordFromHybridStore
123
- } from "./chunk-L4ES2RVY.js";
126
+ } from "./chunk-KJDN2YRH.js";
124
127
  import {
125
128
  isTransientFetchError
126
129
  } from "./chunk-DXWGFL2Z.js";
@@ -144,7 +147,7 @@ import {
144
147
  settleRunTerminalAuthoritatively,
145
148
  spawnLocalBackgroundRun,
146
149
  transitionRunToTerminal
147
- } from "./chunk-YWNCRUBZ.js";
150
+ } from "./chunk-UCMUXZJV.js";
148
151
  import {
149
152
  formatAgentListCard,
150
153
  formatFinishedRunCard,
@@ -163,10 +166,7 @@ import {
163
166
  isCliAuthorityBrokerProtocolError,
164
167
  isCliAuthorityBrokerTimeoutError,
165
168
  isCliAuthorityBrokerUnavailableError
166
- } from "./chunk-KK3FCYZM.js";
167
- import {
168
- getDefaultCliLocalRuntimeDb
169
- } from "./chunk-BFKJ2RS3.js";
169
+ } from "./chunk-SQL7YNED.js";
170
170
  import {
171
171
  LOCAL_AGENT_CONFIG_MISSING_CODE,
172
172
  LOCAL_TURN_ABORTED_CODE,
@@ -178,10 +178,13 @@ import {
178
178
  readActionGate,
179
179
  readAgentsMdLayerFromDisk,
180
180
  registerDialogOwner
181
- } from "./chunk-IQAO6IUP.js";
181
+ } from "./chunk-PKMDYRAM.js";
182
182
  import {
183
183
  resolveAgentRuntimeConfigFromRecord
184
- } from "./chunk-WMKA2DPK.js";
184
+ } from "./chunk-LMMRWGGJ.js";
185
+ import {
186
+ resolveAgentImageInputSupport
187
+ } from "./chunk-SX6AWTNK.js";
185
188
  import {
186
189
  createThinkParserState,
187
190
  flushThinkParser,
@@ -194,9 +197,6 @@ import {
194
197
  resolveAvailabilityAction,
195
198
  resolveCredentialKeyWithFallback
196
199
  } from "./chunk-QJTZ76CP.js";
197
- import {
198
- resolveAgentImageInputSupport
199
- } from "./chunk-SX6AWTNK.js";
200
200
  import {
201
201
  isContextOverflowText
202
202
  } from "./chunk-TLE77UJ5.js";
@@ -255,7 +255,7 @@ import {
255
255
  import {
256
256
  isBuiltinNoloAgentRef,
257
257
  resolveLocalUserId
258
- } from "./chunk-UPOW5HTG.js";
258
+ } from "./chunk-IZWGO2ZS.js";
259
259
  import {
260
260
  isLocalCliAgentKey
261
261
  } from "./chunk-BR3GT6MR.js";
@@ -269,10 +269,12 @@ import {
269
269
  parsePublicAgentId
270
270
  } from "./chunk-M2EJHDJP.js";
271
271
  import {
272
- exitCliFromWatchdog,
272
+ exitCliFromWatchdog
273
+ } from "./chunk-XRGBJHZX.js";
274
+ import {
273
275
  getLogger,
274
276
  normalizeError
275
- } from "./chunk-6XRPBZRS.js";
277
+ } from "./chunk-EYLGAEB4.js";
276
278
  import {
277
279
  RuntimeProtocolMismatchError,
278
280
  RuntimeVersionMismatchError,
@@ -293,7 +295,7 @@ import {
293
295
  toolIcon,
294
296
  toolLabel,
295
297
  toolLabelVariants
296
- } from "./chunk-E5RYFR7E.js";
298
+ } from "./chunk-R7D5SRAZ.js";
297
299
  import {
298
300
  isAntigravityOAuthAgent
299
301
  } from "./chunk-CTWCZKNS.js";
@@ -13064,7 +13066,7 @@ function isBalanceExhaustedError(error) {
13064
13066
 
13065
13067
  // packages/cli/client/agentRun.ts
13066
13068
  async function loadRunLocalAgentTurn() {
13067
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-65F3RVQM.js");
13069
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-WSHWNIMF.js");
13068
13070
  return runLocalAgentTurn;
13069
13071
  }
13070
13072
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -13843,6 +13845,10 @@ function describeLocalRunFailure(message, rawError) {
13843
13845
  const details = parseContextLengthDetails(message);
13844
13846
  const shownMessage = details.requested && details.max ? t("contextLengthExceeded", details.requested, details.max) : details.max ? t("contextLengthExceededLimitOnly", details.max) : t("contextLengthExceededGeneric");
13845
13847
  return `[nolo] ${shownMessage}
13848
+ `;
13849
+ }
13850
+ if (/CLI authority broker upgrade requires exit/i.test(message)) {
13851
+ return `${RUN_UNAVAILABLE_PREFIX} (${stripDebugNoise(message)})
13846
13852
  `;
13847
13853
  }
13848
13854
  if (isCliAuthorityBrokerTimeoutError(rawError) || /CLI authority broker .* timed out/i.test(message)) {
@@ -17412,7 +17418,8 @@ async function runAgentRunCommandImpl(args, deps) {
17412
17418
  if (hasRegistry && (parsed.runtimeKey?.trim() === "local" || locatedExecution?.state === "known")) {
17413
17419
  const implicitReadonlyHost = !parsed.runtimeKey && args.includes("--read-only") && locatedExecution?.state === "known" && locatedExecution.runtimeKey === "local" && locatedExecution.permissions.readOnly;
17414
17420
  if (parsed.runtimeKey?.trim() !== "local" && !implicitReadonlyHost) throw new Error("[local-writer-resource] child binding runtime mismatch");
17415
- await awaitLocalWriterChild(childRunId, parsed.cwd ?? process.cwd(), hostPolicy(), { env, homedir: deps.homedir, fs: deps.fs });
17421
+ const { blockedToolNames } = await awaitLocalWriterChild(childRunId, parsed.cwd ?? process.cwd(), hostPolicy(), { env, homedir: deps.homedir, fs: deps.fs });
17422
+ parsed.blockedToolNames = blockedToolNames;
17416
17423
  }
17417
17424
  if (hasRegistry && parsed.runtimeKey?.trim() !== "local" && locatedExecution?.state !== "known") reportRunProcessIdentity(childRunId, { env, homedir: deps.homedir, fs: deps.fs, now: deps.now });
17418
17425
  const processExit = deps.processExit ?? ((code) => process.exit(code));
@@ -17746,7 +17753,8 @@ async function runAgentRunCommandImpl(args, deps) {
17746
17753
  if (hostRuntimeLocal && !parsed.background) {
17747
17754
  const policy = { ...hostPolicy(), ...skillAllowedToolOverride !== void 0 ? { allowedToolNames: skillAllowedToolOverride } : {} };
17748
17755
  if (hasRegistry) {
17749
- await awaitLocalWriterChild(childRunId, localRuntimeCwd, policy, { env, homedir: deps.homedir, fs: deps.fs });
17756
+ const { blockedToolNames } = await awaitLocalWriterChild(childRunId, localRuntimeCwd, policy, { env, homedir: deps.homedir, fs: deps.fs });
17757
+ parsed.blockedToolNames = blockedToolNames;
17750
17758
  } else if (!policy.readOnly) {
17751
17759
  childRunId = registerLocalForegroundWriter(localRuntimeCwd, policy, agentKey, { env, homedir: deps.homedir, fs: deps.fs, now: deps.now });
17752
17760
  hasRegistry = true;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createCliLocalMcpConnectionRevisionWriter,
3
3
  getDefaultCliLocalRuntimeAuthority
4
- } from "./chunk-W6T4FNZP.js";
4
+ } from "./chunk-HZD5HXUO.js";
5
5
  import {
6
6
  createStrictHostCredentialBroker
7
7
  } from "./chunk-LHCGKAFO.js";
@@ -8098,7 +8098,10 @@ function createMcpNetworkPolicy(options) {
8098
8098
  const url2 = urlOf(req ? req.url : String(input));
8099
8099
  const signal = AbortSignal.any([...init?.signal ?? req?.signal ? [init?.signal ?? req.signal] : [], AbortSignal.timeout(timeoutMs)]);
8100
8100
  signal?.throwIfAborted();
8101
- if (options.placement.kind === "server" && url2.protocol !== "https:") throw new Error("network_denied");
8101
+ const isExactOperatorLoopback = Boolean(
8102
+ options.allowOperatorLoopback && url2.origin === saved.origin && (saved.hostname === "127.0.0.1" || saved.hostname === "[::1]" || saved.hostname === "::1")
8103
+ );
8104
+ if (options.placement.kind === "server" && url2.protocol !== "https:" && !isExactOperatorLoopback) throw new Error("network_denied");
8102
8105
  const host = url2.hostname.replace(/^\[|\]$/g, "");
8103
8106
  const addresses = isIP(host) ? [{ address: host, family: isIP(host) }] : await new Promise((done, reject) => {
8104
8107
  const abort = () => reject(new Error(signal.reason?.name === "TimeoutError" ? "timeout" : "cancelled"));
@@ -8110,6 +8113,7 @@ function createMcpNetworkPolicy(options) {
8110
8113
  for (const entry of addresses) {
8111
8114
  if (entry.family !== isIP(entry.address) || !entry.family) throw new Error("network_denied");
8112
8115
  if (isMcpPublicAddress(entry.address)) continue;
8116
+ if (isExactOperatorLoopback && (entry.address === "127.0.0.1" || entry.address === "::1")) continue;
8113
8117
  const lan = new BlockList();
8114
8118
  for (const [ip, bits] of [["10.0.0.0", 8], ["127.0.0.0", 8], ["172.16.0.0", 12], ["192.168.0.0", 16]]) lan.addSubnet(ip, bits, "ipv4");
8115
8119
  lan.addAddress("::1", "ipv6");
@@ -33156,7 +33160,7 @@ function createMcpRemoteClient(deps) {
33156
33160
  if (c.schemaVersion !== 1) return fail2("unsupported_version");
33157
33161
  if (!sameMcpPlacement(c.placement, deps.placement)) return fail2("placement_unavailable");
33158
33162
  if (c.transport.kind !== "streamable-http") return fail2("placement_unavailable");
33159
- if (!c.enabled) return fail2("disabled");
33163
+ if (!c.enabled && !deps.discoverUnfiltered) return fail2("disabled");
33160
33164
  if (c.ownerUserId !== context.authenticatedUserId) return fail2("forbidden");
33161
33165
  if (context.signal.aborted) return fail2("cancelled");
33162
33166
  const timeout = AbortSignal.timeout(limits.timeoutMs);
@@ -33185,7 +33189,7 @@ function createMcpRemoteClient(deps) {
33185
33189
  if (!live.enabled) throw new Error("disabled");
33186
33190
  if (live.revision !== c.revision) throw new Error("revision_conflict");
33187
33191
  if (!permitsMcpRead(live, message.params?.name, message.params?.arguments ?? {})) throw new Error("forbidden");
33188
- }, placement: deps.placement, savedEndpoint: endpoint, resolve: deps.resolveDns, timeoutMs: limits.timeoutMs, maxResponseBytes: limits.maxResponseBytes });
33192
+ }, placement: deps.placement, savedEndpoint: endpoint, resolve: deps.resolveDns, allowOperatorLoopback: deps.allowOperatorLoopback, timeoutMs: limits.timeoutMs, maxResponseBytes: limits.maxResponseBytes });
33189
33193
  let networkError;
33190
33194
  const fetch2 = async (input, init) => {
33191
33195
  try {
@@ -33256,9 +33260,11 @@ function createMcpRemoteClient(deps) {
33256
33260
  for (const tool of result.tools) {
33257
33261
  if (!tool.name || tool.name.length > 256 || names.has(tool.name)) throw new Error("untrusted_schema");
33258
33262
  names.add(tool.name);
33259
- if (!permitsMcpRead(context.connection, tool.name)) continue;
33260
- validator.getValidator(tool.inputSchema);
33261
- if (tool.outputSchema) validator.getValidator(tool.outputSchema);
33263
+ if (!deps.discoverUnfiltered) {
33264
+ if (!permitsMcpRead(context.connection, tool.name)) continue;
33265
+ validator.getValidator(tool.inputSchema);
33266
+ if (tool.outputSchema) validator.getValidator(tool.outputSchema);
33267
+ }
33262
33268
  tools.push({ name: tool.name, ...tool.description !== void 0 ? { description: tool.description } : {}, inputSchema: tool.inputSchema, ...tool.outputSchema !== void 0 ? { outputSchema: tool.outputSchema } : {}, ...tool.annotations !== void 0 ? { annotations: tool.annotations } : {} });
33263
33269
  if (tools.length > limits.maxTools) throw new Error("limit_exceeded");
33264
33270
  }
@@ -33299,6 +33305,7 @@ function createMcpRemoteClient(deps) {
33299
33305
  });
33300
33306
  },
33301
33307
  async callTool(context, input) {
33308
+ if (deps.discoverUnfiltered) return fail2("forbidden");
33302
33309
  const parsed = parseMcpCallToolInput(input);
33303
33310
  if (!parsed.ok) return parsed;
33304
33311
  input = parsed.value;
@@ -7,13 +7,13 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-3WHVE2XX.js";
10
+ } from "./chunk-BQ4CZEVZ.js";
11
11
  import {
12
12
  parsePositiveFiniteNumberOrFallback
13
13
  } from "./chunk-Y5GCAMGP.js";
14
14
  import {
15
15
  loadLocalRunChildDialogIds
16
- } from "./chunk-SHDJLJWV.js";
16
+ } from "./chunk-ZSRR6HCH.js";
17
17
  import {
18
18
  buildDialogAttachmentPlan,
19
19
  extractFileContentIds,
@@ -28,10 +28,10 @@ import {
28
28
  } from "./chunk-QQ56R7KS.js";
29
29
  import {
30
30
  getDefaultCliLocalRuntimeDb
31
- } from "./chunk-W6T4FNZP.js";
31
+ } from "./chunk-HZD5HXUO.js";
32
32
  import {
33
33
  isLevelLockError
34
- } from "./chunk-K7VIXYTZ.js";
34
+ } from "./chunk-TRRXYFTR.js";
35
35
  import {
36
36
  resolveLocalDialogDbCandidates,
37
37
  resolveNoloHome,
@@ -41,7 +41,7 @@ import {
41
41
  boundSummaryText,
42
42
  buildDialogReadEnvelope,
43
43
  projectDialogReadForAgent
44
- } from "./chunk-ITBX27W6.js";
44
+ } from "./chunk-CFDOIIOZ.js";
45
45
  import {
46
46
  asRecordOrEmpty
47
47
  } from "./chunk-KX6YBIHG.js";
@@ -68,7 +68,7 @@ import {
68
68
  } from "./chunk-BIDSIRTS.js";
69
69
  import {
70
70
  t
71
- } from "./chunk-E5RYFR7E.js";
71
+ } from "./chunk-R7D5SRAZ.js";
72
72
  import {
73
73
  toErrorMessage
74
74
  } from "./chunk-HNMXYYJR.js";
@@ -825,7 +825,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
825
825
  return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
826
826
  }
827
827
  async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
828
- const reader = readLocalDialog ?? (await import("./localDialogRead-CIOTQM5T.js")).readDialogFromLocalDb;
828
+ const reader = readLocalDialog ?? (await import("./localDialogRead-USDZXKIL.js")).readDialogFromLocalDb;
829
829
  const result = await reader({ dialogKey, dialogId, limit });
830
830
  return {
831
831
  ...result,
@@ -840,7 +840,7 @@ async function readLocalDialogAtDbPathDefault(args) {
840
840
  );
841
841
  }
842
842
  const db = await getDefaultCliLocalRuntimeDb();
843
- const { readDialogFromLocalDb: reader } = await import("./localDialogRead-CIOTQM5T.js");
843
+ const { readDialogFromLocalDb: reader } = await import("./localDialogRead-USDZXKIL.js");
844
844
  return reader({ ...args, db });
845
845
  }
846
846
  async function readDialogFromLocalDbWithFallback(args) {
@@ -3,29 +3,29 @@ import {
3
3
  mergeReferences,
4
4
  resolveReferenceAssets,
5
5
  resolveToolsFromKeys
6
- } from "./chunk-RNKWM6DL.js";
6
+ } from "./chunk-CUYFRVJF.js";
7
7
  import {
8
8
  UI_CARD_ENVELOPE_MAX_BYTES,
9
9
  getAllToolRuns,
10
10
  parseUiCard,
11
11
  uiCardFallback
12
- } from "./chunk-DGHHJV3T.js";
12
+ } from "./chunk-ZKKJZBNO.js";
13
13
  import {
14
14
  getDocState
15
- } from "./chunk-DQFQOKCR.js";
15
+ } from "./chunk-FAFDIQJG.js";
16
16
  import {
17
17
  getTableState
18
- } from "./chunk-E2U4I3NK.js";
18
+ } from "./chunk-TGKAUEV3.js";
19
19
  import {
20
20
  selectAllMsgs
21
- } from "./chunk-P4HBFHQB.js";
21
+ } from "./chunk-A55E2OCP.js";
22
22
  import {
23
23
  getCurrentSpaceIdRaw,
24
24
  getViewMode
25
- } from "./chunk-FFFKAOJN.js";
25
+ } from "./chunk-IXAGRTAR.js";
26
26
  import {
27
27
  selectById
28
- } from "./chunk-HZDK56EK.js";
28
+ } from "./chunk-IFJ6OTI6.js";
29
29
  import {
30
30
  resolveToolBaseUrl
31
31
  } from "./chunk-KQHEGELM.js";
@@ -100,6 +100,84 @@ import {
100
100
  asOptionalTrimmedString
101
101
  } from "./chunk-G3SUCT4W.js";
102
102
 
103
+ // packages/app/utils/desktopActionGateChannel.ts
104
+ function targetForRunKind(kind, ctx = {}) {
105
+ if (kind === "server-run") {
106
+ return {
107
+ kind: "web",
108
+ server: ctx.server?.trim() ?? "",
109
+ token: ctx.token ?? null
110
+ };
111
+ }
112
+ return { kind: "desktop" };
113
+ }
114
+ var NEEDS_LOGIN_MESSAGE = "\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
115
+ var MISSING_SERVER_MESSAGE = "\u672A\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740\uFF0C\u65E0\u6CD5\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
116
+ var gates = /* @__PURE__ */ new Map();
117
+ var targets = /* @__PURE__ */ new Map();
118
+ var failures = /* @__PURE__ */ new Map();
119
+ var metadata = /* @__PURE__ */ new Map();
120
+ var errors = /* @__PURE__ */ new Map();
121
+ var listeners = /* @__PURE__ */ new Set();
122
+ var cachedSnapshot = null;
123
+ function invalidateSnapshot() {
124
+ cachedSnapshot = null;
125
+ }
126
+ function notify() {
127
+ for (const listener of listeners) {
128
+ try {
129
+ listener();
130
+ } catch {
131
+ }
132
+ }
133
+ }
134
+ function pushGate(gate, target = { kind: "desktop" }, meta) {
135
+ if (!gate || typeof gate.id !== "string" || gate.id.length === 0) return;
136
+ failures.delete(gate.id);
137
+ if (target.kind === "web" && (!target.token || !target.server.trim())) {
138
+ const message = !target.token ? NEEDS_LOGIN_MESSAGE : MISSING_SERVER_MESSAGE;
139
+ if (meta) failures.set(gate.id, { gateId: gate.id, meta: { ...meta, storage: "web" }, message });
140
+ gates.delete(gate.id);
141
+ targets.delete(gate.id);
142
+ metadata.delete(gate.id);
143
+ errors.set(gate.id, message);
144
+ invalidateSnapshot();
145
+ notify();
146
+ return;
147
+ }
148
+ metadata.delete(gate.id);
149
+ if (meta && target.kind !== "local") metadata.set(gate.id, { ...meta, storage: target.kind });
150
+ errors.delete(gate.id);
151
+ targets.set(gate.id, target);
152
+ gates.set(gate.id, gate);
153
+ invalidateSnapshot();
154
+ notify();
155
+ }
156
+ function clearGateTurn(turnId) {
157
+ for (const [id, failure] of failures) {
158
+ if (failure.meta.turnId === turnId) failures.delete(id);
159
+ }
160
+ for (const [id, meta] of metadata) {
161
+ if (meta.turnId !== turnId) continue;
162
+ gates.delete(id);
163
+ targets.delete(id);
164
+ metadata.delete(id);
165
+ errors.delete(id);
166
+ }
167
+ invalidateSnapshot();
168
+ notify();
169
+ }
170
+ function getSnapshot() {
171
+ if (!cachedSnapshot) {
172
+ cachedSnapshot = {
173
+ gates: [...gates.values()],
174
+ failures: [...failures.values()],
175
+ errors: Object.fromEntries(errors)
176
+ };
177
+ }
178
+ return cachedSnapshot;
179
+ }
180
+
103
181
  // packages/ai/agent/foregroundTurnAdmissionFetch.ts
104
182
  var FOREGROUND_TURN_KEEPALIVE_MAX_BODY_BYTES = 60 * 1024;
105
183
  function getUtf8ByteLength(value) {
@@ -1753,75 +1831,11 @@ async function resolveTurnToolContext(input) {
1753
1831
  };
1754
1832
  }
1755
1833
 
1756
- // packages/app/utils/desktopActionGateChannel.ts
1757
- function targetForRunKind(kind, ctx = {}) {
1758
- if (kind === "server-run") {
1759
- return {
1760
- kind: "web",
1761
- server: ctx.server?.trim() ?? "",
1762
- token: ctx.token ?? null
1763
- };
1764
- }
1765
- return { kind: "desktop" };
1766
- }
1767
- var NEEDS_LOGIN_MESSAGE = "\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
1768
- var MISSING_SERVER_MESSAGE = "\u672A\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740\uFF0C\u65E0\u6CD5\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
1769
- var gates = /* @__PURE__ */ new Map();
1770
- var targets = /* @__PURE__ */ new Map();
1771
- var failures = /* @__PURE__ */ new Map();
1772
- var metadata = /* @__PURE__ */ new Map();
1773
- var errors = /* @__PURE__ */ new Map();
1774
- var listeners = /* @__PURE__ */ new Set();
1775
- var cachedSnapshot = null;
1776
- function invalidateSnapshot() {
1777
- cachedSnapshot = null;
1778
- }
1779
- function notify() {
1780
- for (const listener of listeners) {
1781
- try {
1782
- listener();
1783
- } catch {
1784
- }
1785
- }
1786
- }
1787
- function pushGate(gate, target = { kind: "desktop" }, meta) {
1788
- if (!gate || typeof gate.id !== "string" || gate.id.length === 0) return;
1789
- failures.delete(gate.id);
1790
- if (target.kind === "web" && (!target.token || !target.server.trim())) {
1791
- const message = !target.token ? NEEDS_LOGIN_MESSAGE : MISSING_SERVER_MESSAGE;
1792
- if (meta) failures.set(gate.id, { gateId: gate.id, meta: { ...meta, storage: "web" }, message });
1793
- gates.delete(gate.id);
1794
- targets.delete(gate.id);
1795
- metadata.delete(gate.id);
1796
- errors.set(gate.id, message);
1797
- invalidateSnapshot();
1798
- notify();
1799
- return;
1800
- }
1801
- metadata.delete(gate.id);
1802
- if (meta && target.kind !== "local") metadata.set(gate.id, { ...meta, storage: target.kind });
1803
- errors.delete(gate.id);
1804
- targets.set(gate.id, target);
1805
- gates.set(gate.id, gate);
1806
- invalidateSnapshot();
1807
- notify();
1808
- }
1809
- function clearGateTurn(turnId) {
1810
- for (const [id, failure] of failures) {
1811
- if (failure.meta.turnId === turnId) failures.delete(id);
1812
- }
1813
- for (const [id, meta] of metadata) {
1814
- if (meta.turnId !== turnId) continue;
1815
- gates.delete(id);
1816
- targets.delete(id);
1817
- metadata.delete(id);
1818
- errors.delete(id);
1819
- }
1820
- invalidateSnapshot();
1821
- notify();
1822
- }
1823
-
1824
1834
  export {
1835
+ targetForRunKind,
1836
+ pushGate,
1837
+ clearGateTurn,
1838
+ getSnapshot,
1825
1839
  buildForegroundTurnAdmissionFetchInit,
1826
1840
  consumeAgentRunStream,
1827
1841
  projectDesktopToolUiContent,
@@ -1834,8 +1848,5 @@ export {
1834
1848
  mergeAgentToolsWithRuntime,
1835
1849
  applyImageConfigRuntimeOverride,
1836
1850
  resolveImageGenerationStreamingState,
1837
- resolveTurnToolContext,
1838
- targetForRunKind,
1839
- pushGate,
1840
- clearGateTurn
1851
+ resolveTurnToolContext
1841
1852
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  defaultOpenBrowser
3
- } from "./chunk-SPU3L3OR.js";
3
+ } from "./chunk-EFM2IPZR.js";
4
4
  import {
5
5
  generateCloudflareEmailRoutingToken,
6
6
  parseFlagWithOptionalValue,
7
7
  runCloudflareOAuthLogin,
8
8
  upsertEnvVariable
9
- } from "./chunk-UF6J7NXV.js";
9
+ } from "./chunk-GMWZRXRM.js";
10
10
  import {
11
11
  ANTHROPIC_OAUTH_AUTHORIZE_URL,
12
12
  ANTHROPIC_OAUTH_CALLBACK_PORT,
@@ -50,7 +50,7 @@ import {
50
50
  startCallbackServer,
51
51
  validateXAIEndpoint,
52
52
  xaiOAuthDiscovery
53
- } from "./chunk-6TVYUQRM.js";
53
+ } from "./chunk-XC5RPSXK.js";
54
54
  import {
55
55
  extractGoogleValidationLink
56
56
  } from "./chunk-BMQ2MJUK.js";
@@ -60,7 +60,7 @@ import {
60
60
  detectLocalDevinCredentials,
61
61
  extractDevinToken,
62
62
  fetchAntigravityCloudCodeCompletion
63
- } from "./chunk-MYYNZG2M.js";
63
+ } from "./chunk-CJ2BP6V7.js";
64
64
  import {
65
65
  createOAuthTokenStore,
66
66
  resolveFreshAccessToken
@@ -74,7 +74,7 @@ import {
74
74
  } from "./chunk-R5GO3YZP.js";
75
75
  import {
76
76
  t
77
- } from "./chunk-E5RYFR7E.js";
77
+ } from "./chunk-R7D5SRAZ.js";
78
78
  import {
79
79
  toErrorMessage
80
80
  } from "./chunk-HNMXYYJR.js";
@@ -7405,9 +7405,7 @@ function findAndReplace(tree, list2, options) {
7405
7405
  if (typeof value === "string") {
7406
7406
  value = value.length > 0 ? { type: "text", value } : void 0;
7407
7407
  }
7408
- if (value === false) {
7409
- find.lastIndex = position2 + 1;
7410
- } else {
7408
+ if (value !== false) {
7411
7409
  if (start !== position2) {
7412
7410
  add({ type: "text", value: node2.value.slice(start, position2) });
7413
7411
  }
@@ -7419,6 +7417,10 @@ function findAndReplace(tree, list2, options) {
7419
7417
  start = position2 + match[0].length;
7420
7418
  change = true;
7421
7419
  }
7420
+ if (value === false || match[0].length === 0) {
7421
+ const code2 = node2.value.codePointAt(position2) || 0;
7422
+ find.lastIndex = position2 + (/[uv]/.test(find.flags) && code2 > 65535 ? 2 : 1);
7423
+ }
7422
7424
  if (!find.global) {
7423
7425
  break;
7424
7426
  }