nolo-cli 0.251.0-alpha.1 → 0.252.0-alpha.2

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 (169) hide show
  1. package/{_executeModel-55PHWQWB.js → _executeModel-RXHY2BDR.js} +47 -47
  2. package/{action-WZTKEF5H.js → action-4MADDU52.js} +5 -5
  3. package/{addContentAction-LBVAQUF7.js → addContentAction-F4XO3VRF.js} +8 -8
  4. package/{addDialogAgentAction-6WAUSUSZ.js → addDialogAgentAction-NSCVHTZJ.js} +7 -7
  5. package/{agentDeleteCommand-KEO3KDK3.js → agentDeleteCommand-EJAI2VTH.js} +69 -68
  6. package/{agentEmailCommands-RWJQQRNT.js → agentEmailCommands-YBKHZMMZ.js} +69 -68
  7. package/{agentListCommands-L3TLPLNH.js → agentListCommands-M2KYLAOB.js} +226 -39
  8. package/{agentMachineCommands-EZWWXWDH.js → agentMachineCommands-GLY6NJWZ.js} +31 -29
  9. package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
  10. package/{agentRecordCommands-7W2CGHJJ.js → agentRecordCommands-JANPX6XI.js} +68 -67
  11. package/{agentRunCommand-POL6B6BO.js → agentRunCommand-TNLAXLUU.js} +68 -67
  12. package/{agentRunControl-FKSXBUAF.js → agentRunControl-KNNDEEDI.js} +8 -6
  13. package/{agentRuntimeLocal-WSHWNIMF.js → agentRuntimeLocal-EOW6FFXL.js} +26 -25
  14. package/{agentSlice-3G2YLTA4.js → agentSlice-PVFGBJXB.js} +8 -8
  15. package/{appDeleteCommands-DZZQCVYH.js → appDeleteCommands-3VCRRWUX.js} +33 -31
  16. package/{appDeployCommands-NJJBVNH5.js → appDeployCommands-XN6IEMYK.js} +33 -31
  17. package/{appDeployStatusCommands-GBOAFEYG.js → appDeployStatusCommands-ZSJJXMVR.js} +33 -31
  18. package/{appGetCommands-GOOKYMKO.js → appGetCommands-DJ7YQCEE.js} +33 -31
  19. package/{appListCommands-OBCGUG3S.js → appListCommands-4KU5CV5H.js} +33 -31
  20. package/{authCommand-77CRN332.js → authCommand-5DC3ES4Q.js} +12 -12
  21. package/{builtinSkillRegistry-PFTTFPWW.js → builtinSkillRegistry-PQWEXSFW.js} +1 -1
  22. package/{chromeOpsCommands-6RLEBBJJ.js → chromeOpsCommands-AA555ANS.js} +1 -1
  23. package/{chunk-LOXR4TQN.js → chunk-25GCVHBZ.js} +2 -2
  24. package/{chunk-A55E2OCP.js → chunk-26KL6533.js} +639 -125
  25. package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
  26. package/{chunk-CUYFRVJF.js → chunk-2HF6DINU.js} +6 -6
  27. package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
  28. package/{chunk-GMWZRXRM.js → chunk-3272HU62.js} +1 -1
  29. package/{chunk-43VT5PLM.js → chunk-3LL5HRIJ.js} +1 -1
  30. package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
  31. package/{chunk-T4V6C3J3.js → chunk-52M4RYVP.js} +1 -1
  32. package/{chunk-OQCAHPDQ.js → chunk-5QEOTC35.js} +4 -4
  33. package/{chunk-R7D5SRAZ.js → chunk-5UYDG6HP.js} +17 -0
  34. package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
  35. package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
  36. package/{chunk-UCMUXZJV.js → chunk-7XO73H5X.js} +111 -1
  37. package/{chunk-222CJNC2.js → chunk-BLBGVSLB.js} +3 -3
  38. package/{chunk-ZM5AZTQG.js → chunk-BTQU2PRC.js} +19 -7
  39. package/{chunk-QJ5YDTEF.js → chunk-BVCCRSGK.js} +42 -24
  40. package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
  41. package/chunk-CGSIW2KI.js +594 -0
  42. package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
  43. package/{chunk-Q5KZ6F55.js → chunk-CSTCYYCR.js} +19 -17
  44. package/{chunk-D3E5MYXO.js → chunk-CYGFNMCH.js} +1 -1
  45. package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
  46. package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
  47. package/{chunk-MTS5DCL2.js → chunk-EG3JTV7H.js} +2 -2
  48. package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
  49. package/{chunk-D35TOEMM.js → chunk-EPBEZKYK.js} +137 -53
  50. package/{chunk-KJDN2YRH.js → chunk-EQJK6LSN.js} +4 -4
  51. package/{chunk-N3SEV3CG.js → chunk-F6GZFIGR.js} +79 -30
  52. package/{chunk-6UNJ6JGR.js → chunk-FJPVVLP3.js} +4 -4
  53. package/{chunk-L5HV76QT.js → chunk-FRC2DNTN.js} +1 -1
  54. package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
  55. package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
  56. package/{chunk-IFJ6OTI6.js → chunk-GJ4UTSAW.js} +33 -11
  57. package/{chunk-ZKKJZBNO.js → chunk-GUFTHWDO.js} +10 -10
  58. package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
  59. package/{chunk-W2N4OAKM.js → chunk-IQXMWBI6.js} +3 -3
  60. package/chunk-IVK2KT3H.js +209 -0
  61. package/{chunk-PLS2MJVW.js → chunk-J4KLOLYP.js} +4 -4
  62. package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
  63. package/{chunk-CDIRKCPD.js → chunk-JX2IG37T.js} +153 -153
  64. package/{chunk-TGKAUEV3.js → chunk-K7RWY7JH.js} +14 -11
  65. package/{chunk-5IKKSJYX.js → chunk-KHYSFS3W.js} +76 -2
  66. package/{chunk-K5CIMK3R.js → chunk-KO6JNZCF.js} +115 -57
  67. package/{chunk-XJSEST7D.js → chunk-KQBGXCKM.js} +3 -3
  68. package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
  69. package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
  70. package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
  71. package/{chunk-HD5EKSLF.js → chunk-MDWHMQON.js} +3 -3
  72. package/{chunk-X337N4D6.js → chunk-MOAVLCCM.js} +4 -4
  73. package/{chunk-OARYOLF3.js → chunk-N2MDL5AZ.js} +12 -12
  74. package/{chunk-ZSRR6HCH.js → chunk-N2ZAY2DK.js} +1 -1
  75. package/{chunk-X3OZ655T.js → chunk-N7UXTVAR.js} +2 -2
  76. package/{chunk-KGOBJAWC.js → chunk-NJDOID7N.js} +207 -94
  77. package/{chunk-NTNX77FI.js → chunk-NRWZHHOB.js} +6 -6
  78. package/{chunk-3ZWJVKFB.js → chunk-NWZRCUHM.js} +84 -40
  79. package/{chunk-HQLCYPL4.js → chunk-OB4FBZXJ.js} +4 -4
  80. package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
  81. package/{chunk-IZWGO2ZS.js → chunk-OMIXG25B.js} +1 -1
  82. package/{chunk-CJ2BP6V7.js → chunk-OOV5JN25.js} +2 -2
  83. package/{chunk-3KWJPTVP.js → chunk-OQOXDQLB.js} +4 -4
  84. package/{chunk-LXKK7QFI.js → chunk-OTNPEE4G.js} +54 -24
  85. package/{chunk-LMMRWGGJ.js → chunk-OTOPQXP5.js} +2 -2
  86. package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
  87. package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
  88. package/{chunk-WZPG63Q4.js → chunk-PIVTQRX6.js} +43 -13
  89. package/{chunk-SLUZ6FBJ.js → chunk-Q5M27DUE.js} +1 -1
  90. package/{chunk-XC5RPSXK.js → chunk-QV32GSVO.js} +2 -2
  91. package/{chunk-WQDTSK5U.js → chunk-REINTCQF.js} +8 -2
  92. package/{chunk-IXAGRTAR.js → chunk-SBBSUBY3.js} +1 -1
  93. package/{chunk-MTM4LRVG.js → chunk-SCY2O7CU.js} +2 -2
  94. package/{chunk-FAFDIQJG.js → chunk-U3ZK2MXG.js} +3 -3
  95. package/{chunk-PKMDYRAM.js → chunk-UDQZ5JT7.js} +175 -241
  96. package/{chunk-UR4ZMRV3.js → chunk-UGHNYYOE.js} +2 -2
  97. package/{chunk-KZVRPCOR.js → chunk-UTFTXJU3.js} +4 -4
  98. package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
  99. package/{chunk-U2OWDHDE.js → chunk-VH7AQEEF.js} +2 -2
  100. package/{chunk-QLGL43SI.js → chunk-VZWYP7LD.js} +2 -2
  101. package/{chunk-6XVPMGXK.js → chunk-W4S5FQWQ.js} +10 -4
  102. package/{chunk-KRAPKTAS.js → chunk-WJOC3AEM.js} +2 -2
  103. package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
  104. package/{chunk-JUYI2D7J.js → chunk-WNIBQBOR.js} +1 -1
  105. package/{chunk-BQ4CZEVZ.js → chunk-YWLMUFZ5.js} +1 -1
  106. package/{chunk-CD64YXRB.js → chunk-Z47UZT27.js} +1 -1
  107. package/{chunk-75TXQ4GY.js → chunk-ZMWDHPNG.js} +15 -29
  108. package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
  109. package/{cliAgentConfigHelpers-N6LTB7UY.js → cliAgentConfigHelpers-FKBPFPKR.js} +6 -6
  110. package/{cliLocalAgentRecordReader-NFNGYOOW.js → cliLocalAgentRecordReader-OHAC4JTY.js} +30 -29
  111. package/{commandRegistry-OM5DU4DS.js → commandRegistry-YQMAXCLP.js} +81 -81
  112. package/{contentThunks-7URM43ET.js → contentThunks-GSMUNWBA.js} +20 -20
  113. package/{cooldownCommands-JEEV75B7.js → cooldownCommands-PT5L4LNB.js} +3 -3
  114. package/{createAgentAutomationAction-GGEXIKMC.js → createAgentAutomationAction-RMADR4LG.js} +20 -20
  115. package/{createDialogAction-IXXEMFRQ.js → createDialogAction-CM5CBQVH.js} +21 -21
  116. package/{createPageAction-IXIVLIOO.js → createPageAction-JMGVMCTH.js} +21 -21
  117. package/{db-J5KE7XRI.js → db-VR74ADGC.js} +5 -1
  118. package/{dbSlice-IE4ADINL.js → dbSlice-Q637QR4L.js} +7 -7
  119. package/{deleteFile-ZCQESEEQ.js → deleteFile-TP6MKFUX.js} +10 -5
  120. package/{dialogCommands-RPBHOZB6.js → dialogCommands-ULWP5ASX.js} +35 -33
  121. package/{dialogNotifyCommand-ECKI5MMA.js → dialogNotifyCommand-JKYVSR6K.js} +7 -7
  122. package/{dialogSlice-5FQB2TNN.js → dialogSlice-ARQKXXTD.js} +18 -18
  123. package/{docCreateCommands-XJ2X57DW.js → docCreateCommands-ZJFHCZV4.js} +32 -30
  124. package/{docDeleteCommands-45WGFFEB.js → docDeleteCommands-LY5MF2BI.js} +33 -31
  125. package/{docReadCommands-LRRVDS46.js → docReadCommands-4X2DHCNZ.js} +32 -30
  126. package/{docStore-SUAVM24F.js → docStore-QWRVKIRI.js} +8 -8
  127. package/{docUpdateCommands-QUYX6BVR.js → docUpdateCommands-5TIT7DAJ.js} +32 -30
  128. package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
  129. package/{handleSendMessageAction-FDIWBQUB.js → handleSendMessageAction-TVR55KVT.js} +36 -36
  130. package/{hostCredentialCreate-CEXQHYT4.js → hostCredentialCreate-SIRXPUFR.js} +68 -67
  131. package/index.js +8 -8
  132. package/{localDialogRead-USDZXKIL.js → localDialogRead-BJJT3TF5.js} +1 -1
  133. package/{localRuntimeAdapter-O3JBRK6S.js → localRuntimeAdapter-VRB5EDDZ.js} +67 -66
  134. package/{machineCommands-I3YA7TNC.js → machineCommands-MG3BB6XM.js} +68 -67
  135. package/{machineWsRunDispatch-E5CIE2OJ.js → machineWsRunDispatch-3TOO3NCU.js} +68 -67
  136. package/{mcpLocalAuthorizeCommand-K5J2VMG6.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +6 -6
  137. package/{memberThunks-T7EAZE6A.js → memberThunks-IGYRMEQC.js} +9 -9
  138. package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
  139. package/package.json +1 -1
  140. package/{projectArchive-A7E65AZO.js → projectArchive-Q46BYZQ6.js} +21 -21
  141. package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
  142. package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
  143. package/{read-BRZHXUJ6.js → read-MPPXZHAO.js} +10 -5
  144. package/{readDocTool-N7RVFQEE.js → readDocTool-PKZ35PCR.js} +1 -1
  145. package/{readlineWorkspace-2O65NBFG.js → readlineWorkspace-RBH6PSE7.js} +613 -209
  146. package/{removeDialogAgentAction-GRT72HLK.js → removeDialogAgentAction-H6S7VLNA.js} +9 -9
  147. package/{runAgentClientLoop-NWCZIXCG.js → runAgentClientLoop-WZJ4HXOH.js} +44 -44
  148. package/{runtimeDoctorCommands-26HYHFTK.js → runtimeDoctorCommands-QGZSKNSE.js} +5 -5
  149. package/{secretCommands-XR72SHLK.js → secretCommands-BXAQEOES.js} +2 -2
  150. package/{setDialogExtraReferencesAction-CBG3X46B.js → setDialogExtraReferencesAction-CARUTAWS.js} +8 -8
  151. package/{setPrimaryDialogAgentAction-EWTDZOAX.js → setPrimaryDialogAgentAction-VRV56MLG.js} +9 -9
  152. package/{settingThunks-X4PT66J2.js → settingThunks-4FC4HXGN.js} +7 -7
  153. package/{spaceCommands-EVSNTGRS.js → spaceCommands-27Z5JAU3.js} +31 -29
  154. package/{streamAgentChatTurn-SYP3OEM5.js → streamAgentChatTurn-JKMBFM2O.js} +57 -53
  155. package/{switchDialogAgentAction-YHPZ7K6E.js → switchDialogAgentAction-O236K6HB.js} +7 -7
  156. package/{tableCommands-44GC4N6J.js → tableCommands-C3P2HHKK.js} +2 -2
  157. package/{tools-2AO2SK4L.js → tools-4RFLNHUW.js} +37 -37
  158. package/{tuiRestart-HBQDF4AE.js → tuiRestart-GF4DGAAN.js} +7 -7
  159. package/{tuiSummaryLlmCaller-Q2PNR63K.js → tuiSummaryLlmCaller-HROLGN4F.js} +12 -12
  160. package/{updateCommands-6SI7NWVC.js → updateCommands-BZ4YDHNM.js} +3 -3
  161. package/{updateDialogTitleAction-MWVMBIPZ.js → updateDialogTitleAction-F3ONQM3N.js} +20 -20
  162. package/{usageCommand-D44AOTMH.js → usageCommand-XVJ7ZUTM.js} +1 -1
  163. package/{usageRebuildCommand-IRIMKDI5.js → usageRebuildCommand-NK6S3D4J.js} +2 -2
  164. package/{windowsSelfUpdate-BJIJKKIS.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
  165. package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
  166. package/chunk-FGHEF6WI.js +0 -34
  167. package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
  168. package/{chunk-YHNUDTU4.js → chunk-VYRTLHIT.js} +3 -3
  169. package/{dialogUsageCommand-TBIA2QAF.js → dialogUsageCommand-IHAXS7DW.js} +3 -3
@@ -3,11 +3,11 @@ import {
3
3
  DEVIN_CONNECT_URL,
4
4
  parseSseDataLineJson,
5
5
  parseSseDataLineObject
6
- } from "./chunk-CJ2BP6V7.js";
6
+ } from "./chunk-OOV5JN25.js";
7
7
  import {
8
8
  ALWAYS_EXCLUDED_GLOBS,
9
9
  EXECUTION_BACKEND_KINDS
10
- } from "./chunk-ANUP75N2.js";
10
+ } from "./chunk-2E4BYAUE.js";
11
11
  import {
12
12
  formatImageSummary,
13
13
  readLocalImage
@@ -24,7 +24,7 @@ import {
24
24
  flushChatCompletionStream,
25
25
  providerHttpFailure,
26
26
  throwIfChatCompletionStreamFailed
27
- } from "./chunk-WZPG63Q4.js";
27
+ } from "./chunk-PIVTQRX6.js";
28
28
  import {
29
29
  readSseFrames
30
30
  } from "./chunk-HNUWUO75.js";
@@ -35,11 +35,11 @@ import {
35
35
  evaluateRequestBudget,
36
36
  hasImageInRuntimeMessages,
37
37
  stripImagePartsFromMessages
38
- } from "./chunk-LMMRWGGJ.js";
38
+ } from "./chunk-OTOPQXP5.js";
39
39
  import {
40
40
  resolveAgentImageInputSupport,
41
41
  resolveToolImagePolicy
42
- } from "./chunk-SX6AWTNK.js";
42
+ } from "./chunk-BZLGPM5B.js";
43
43
  import {
44
44
  applyShapingCounts,
45
45
  attachProjectionFacts,
@@ -50,7 +50,7 @@ import {
50
50
  projectUserPartForModel,
51
51
  resolveOutboundDiagnosticSink,
52
52
  writeThinkingFacts
53
- } from "./chunk-2FK2KZSL.js";
53
+ } from "./chunk-WLHUANWZ.js";
54
54
  import {
55
55
  createThinkParserState,
56
56
  createToolCallAccumulator,
@@ -69,7 +69,7 @@ import {
69
69
  hashStablePrefixContent,
70
70
  resolveResponseGuidelines,
71
71
  resolveToolGuidedSections
72
- } from "./chunk-LXKK7QFI.js";
72
+ } from "./chunk-OTNPEE4G.js";
73
73
  import {
74
74
  BRIDGE_STREAM_MAX_CHARS,
75
75
  CLI_NOLO_WORKSPACE_TOOL_NAMES,
@@ -84,7 +84,7 @@ import {
84
84
  parseNoloWorkspaceToolArguments,
85
85
  readTextStreamUpToChars,
86
86
  resolveNoloDialogInput
87
- } from "./chunk-CFDOIIOZ.js";
87
+ } from "./chunk-ZMXO5G3E.js";
88
88
  import {
89
89
  classifyUnparsableToolArgs,
90
90
  collectStablePromptPrefix,
@@ -108,7 +108,7 @@ import {
108
108
  toOpenAiCompatibleMessages,
109
109
  toResponsesTools,
110
110
  transferDowngradedToolTurnOrigin
111
- } from "./chunk-W3HSD32M.js";
111
+ } from "./chunk-FXEPZKNJ.js";
112
112
  import {
113
113
  TOOL_HAD_IMAGES,
114
114
  TOOL_IMAGES,
@@ -140,7 +140,7 @@ import {
140
140
  sanitizeToolOutputText,
141
141
  scrubObjectSecrets,
142
142
  scrubSecrets
143
- } from "./chunk-CDIRKCPD.js";
143
+ } from "./chunk-JX2IG37T.js";
144
144
  import {
145
145
  buildDialogFallbackTitleFromUserInput
146
146
  } from "./chunk-2MBTWINN.js";
@@ -152,7 +152,7 @@ import {
152
152
  resolveEmptyAssistantFallbackMessage,
153
153
  resolveEmptyAssistantOutcome,
154
154
  resolveTruncatedReasoningTailLog
155
- } from "./chunk-LTVEOOZL.js";
155
+ } from "./chunk-CIAV4WK2.js";
156
156
  import {
157
157
  COMPACTION_SUMMARY_SCHEMA_VERSION,
158
158
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
@@ -177,7 +177,7 @@ import {
177
177
  runSummaryWithContract,
178
178
  summaryCompletionTokens,
179
179
  truncateToolOutputForContext
180
- } from "./chunk-MAA42MMV.js";
180
+ } from "./chunk-2FZVXOFX.js";
181
181
  import {
182
182
  createProviderCallTimingTracker,
183
183
  finalizeProviderCallTiming,
@@ -227,11 +227,14 @@ import {
227
227
  estimateTokenCount
228
228
  } from "./chunk-PSCNXBYA.js";
229
229
  import {
230
- isLevelNotFoundError
231
- } from "./chunk-OW765XBU.js";
230
+ Mutex
231
+ } from "./chunk-IVK2KT3H.js";
232
232
  import {
233
233
  isAbortError
234
234
  } from "./chunk-7DPNBQSV.js";
235
+ import {
236
+ isLevelNotFoundError
237
+ } from "./chunk-OW765XBU.js";
235
238
  import {
236
239
  buildAgentsMdLayer,
237
240
  buildAgentsMdLayerHeader,
@@ -257,7 +260,7 @@ import {
257
260
  } from "./chunk-OJKUU3LP.js";
258
261
  import {
259
262
  resolveLocalUserId
260
- } from "./chunk-IZWGO2ZS.js";
263
+ } from "./chunk-OMIXG25B.js";
261
264
  import {
262
265
  applyToolSurfaceConstraints
263
266
  } from "./chunk-JCQ3WCQ3.js";
@@ -277,7 +280,7 @@ import {
277
280
  import {
278
281
  buildProviderAuthHeaders,
279
282
  buildProviderExecutionPlan
280
- } from "./chunk-K26XPZRB.js";
283
+ } from "./chunk-LVZVSLKO.js";
281
284
  import {
282
285
  asTrimmedString
283
286
  } from "./chunk-3EUW3WEO.js";
@@ -292,7 +295,7 @@ import {
292
295
  } from "./chunk-CF7PE763.js";
293
296
  import {
294
297
  PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL
295
- } from "./chunk-PQ63BDV3.js";
298
+ } from "./chunk-JPXACKSW.js";
296
299
  import {
297
300
  asTrimmedLowercaseString
298
301
  } from "./chunk-QSJ3HFEF.js";
@@ -5124,7 +5127,7 @@ var makeCachedUnsafe = (self, ttlMillis) => {
5124
5127
  let expiresAt = 0;
5125
5128
  let exit3;
5126
5129
  let current;
5127
- const join3 = (fiber3, run2) => {
5130
+ const join4 = (fiber3, run2) => {
5128
5131
  run2.awaiters++;
5129
5132
  onExitUnsafe(fiber3, () => {
5130
5133
  if (--run2.awaiters > 0 || run2.done) return;
@@ -5135,7 +5138,7 @@ var makeCachedUnsafe = (self, ttlMillis) => {
5135
5138
  };
5136
5139
  return [withFiber((fiber3) => {
5137
5140
  if (current !== void 0) {
5138
- return fiber3 === current.fiber ? fiberJoin(current.fiber) : join3(fiber3, current);
5141
+ return fiber3 === current.fiber ? fiberJoin(current.fiber) : join4(fiber3, current);
5139
5142
  }
5140
5143
  if (exit3 !== void 0 && (expiresAt === Infinity || fiber3.getRef(ClockRef).currentTimeMillisUnsafe() < expiresAt)) {
5141
5144
  return exit3;
@@ -5148,7 +5151,7 @@ var makeCachedUnsafe = (self, ttlMillis) => {
5148
5151
  done: false
5149
5152
  };
5150
5153
  current = run2;
5151
- const joined = join3(fiber3, run2);
5154
+ const joined = join4(fiber3, run2);
5152
5155
  run2.fiber.evaluate(onExitPrimitive(self, (exit_) => {
5153
5156
  run2.done = true;
5154
5157
  if (current !== run2) return;
@@ -13220,8 +13223,8 @@ function createLoopTiming() {
13220
13223
  if (!lines) return;
13221
13224
  if (LOOP_TIMING_FILE) {
13222
13225
  try {
13223
- const { appendFileSync } = await import("node:fs");
13224
- appendFileSync(LOOP_TIMING_FILE, lines + "\n");
13226
+ const { appendFileSync: appendFileSync2 } = await import("node:fs");
13227
+ appendFileSync2(LOOP_TIMING_FILE, lines + "\n");
13225
13228
  } catch {
13226
13229
  }
13227
13230
  } else {
@@ -16119,7 +16122,7 @@ function buildWorkspacePathProperty() {
16119
16122
  };
16120
16123
  }
16121
16124
  function buildReadWorkspaceDescription() {
16122
- return "Read a UTF-8 text file inside the workspace. For multiple files, call readFile concurrently in the same turn. Absolute paths and ~/ are also accepted (runtime spill files can be read directly). Use lines for focused range reads after search to save tokens. A range already delivered earlier for an unchanged file answers with a short notice instead of resending (force:true refetches).";
16125
+ return "Read a UTF-8 text file inside the workspace. For multiple known targets, call readFile concurrently in the same turn (use available search or glob tools first when paths or line ranges are uncertain). Absolute paths and ~/ are also accepted (runtime spill files can be read directly). Use lines for focused range reads after search to save tokens. A range already delivered earlier for an unchanged file answers with a short notice instead of resending (force:true refetches).";
16123
16126
  }
16124
16127
  function buildReadWorkspaceParameters() {
16125
16128
  const path = buildWorkspacePathProperty();
@@ -19251,10 +19254,13 @@ async function executeToolCall(args2) {
19251
19254
  }
19252
19255
  if (!toolResult) {
19253
19256
  let runtimeContext = input.runtimeContext;
19254
- if (args2.getDirectWorkSource && !runtimeContext?.userMessageId && toolName === "rememberMemory" && parseNoloWorkspaceToolArguments(unwrappedArguments).mode === "work") {
19255
- const id = await args2.getDirectWorkSource();
19256
- throwIfAborted(input);
19257
- if (id) runtimeContext = { ...runtimeContext, userMessageId: id };
19257
+ if (args2.getDirectWorkSource && !runtimeContext?.userMessageId && (toolName === "rememberMemory" || toolName === "queryMemory")) {
19258
+ const memoryArgs = parseNoloWorkspaceToolArguments(unwrappedArguments);
19259
+ if (memoryArgs.mode === "work" && (toolName === "rememberMemory" || memoryArgs.storage === void 0 || memoryArgs.storage === "local")) {
19260
+ const id = await args2.getDirectWorkSource();
19261
+ throwIfAborted(input);
19262
+ if (id) runtimeContext = { ...runtimeContext, userMessageId: id };
19263
+ }
19258
19264
  }
19259
19265
  const executePromise = input.adapter.executeTool({
19260
19266
  id: toolCall.id,
@@ -19644,7 +19650,7 @@ function createSubtaskSoftBudgetAdvisor(options) {
19644
19650
  }
19645
19651
 
19646
19652
  // packages/agent-runtime/leafFinalHandoff.ts
19647
- var LEAF_FINAL_HANDOFF_INSTRUCTIONS = `Leaf subtask final: return only the result, blockers/findings, and minimal evidence the parent needs. Do not narrate your process or restate the task. Keep success concise without dropping the current delivery scope, unresolved blockers or evidence references; on failure include the blocker, severity when relevant, and an evidence reference (file:line, test command, commit, artifact, or run/dialog). If the task explicitly requires a long-form deliverable (document, translation, dataset, code, or other artifact), provide that deliverable in full and keep only the handoff around it concise. During execution, follow the brief as given: keep progress updates incremental to the brief; the final report must stand alone with the complete current delivery scope, unresolved blockers and evidence references, including on continuation; only when new evidence would materially change the goal, risk, irreversibility, or DoD should you surface it as a blocker/finding \u2014 do not silently expand scope or re-litigate the settled direction. Own investigation, implementation, related checks and failure fixes within the brief\u2019s scope and budget; leave goals and critical decisions to the parent. For required DoD checks, include the worktree, checked version (including uncommitted change scope), command, check scope, pass/fail and original-output reference; explicitly mark checks not run or evidence unavailable. Reuse valid same-version evidence; additional checks are warranted for version changes, missing/conflicting evidence or integration risk. Do not invent version metadata. Process done/exit 0 and assistant claims do not establish passing tests, user acceptance, independent review approval, integration or release; runtime acceptance is observations only and unknown remains unknown. Preserve a requested reviewer JSON/checkVerdict format; do not wrap it in another report. Keep success concise without omitting required evidence.`;
19653
+ var LEAF_FINAL_HANDOFF_INSTRUCTIONS = `Leaf subtask final: return only the result, blockers/findings, and minimal evidence the parent needs. Do not narrate your process or restate the task. Keep success concise without dropping the current delivery scope, unresolved blockers or evidence references; on failure include the blocker, severity when relevant, and an evidence reference (file:line, test command, commit, artifact, or run/dialog). If the task explicitly requires a long-form deliverable (document, translation, dataset, code, or other artifact), provide that deliverable in full and keep only the handoff around it concise. During execution, follow the brief as given: keep progress updates incremental to the brief; the final report must stand alone with the complete current delivery scope, unresolved blockers and evidence references, including on continuation; only when new evidence would materially change the goal, risk, irreversibility, or DoD should you surface it as a blocker/finding \u2014 do not silently expand scope or re-litigate the settled direction. Own investigation, implementation, related checks and failure fixes within the brief\u2019s scope and budget; leave goals and critical decisions to the parent. Escalate instead of patching blindly: if the root cause falls outside the brief's stated scope, or the same problem is still unconverged after two consecutive fix attempts, stop and return need_escalation in the final report with the verified facts, failed attempts and evidence references, so the parent can pick a stronger tier or change approach. For required DoD checks, include the worktree, checked version (including uncommitted change scope), command, check scope, pass/fail and original-output reference; explicitly mark checks not run or evidence unavailable. Reuse valid same-version evidence; additional checks are warranted for version changes, missing/conflicting evidence or integration risk. Do not invent version metadata. Process done/exit 0 and assistant claims do not establish passing tests, user acceptance, independent review approval, integration or release; runtime acceptance is observations only and unknown remains unknown. Preserve a requested reviewer JSON/checkVerdict format; do not wrap it in another report. Keep success concise without omitting required evidence.`;
19648
19654
 
19649
19655
  // packages/agent-runtime/contextBlockScope.ts
19650
19656
  var isContextBlockScope = (value) => {
@@ -19688,6 +19694,40 @@ function resolveProviderInputItemLimit(args2) {
19688
19694
  )?.maxInputItems;
19689
19695
  }
19690
19696
 
19697
+ // packages/agent-runtime/compactionTelemetryLog.ts
19698
+ import { appendFileSync, mkdirSync } from "node:fs";
19699
+ import { dirname as dirname3, join as join3 } from "node:path";
19700
+ var COMPACTION_TELEMETRY_SCHEMA_VERSION = 1;
19701
+ function isTestEnvironment() {
19702
+ if (typeof process === "undefined") return false;
19703
+ return process.env?.NODE_ENV === "test" || process.env?.BUN_ENV === "test";
19704
+ }
19705
+ function resolveCompactionTelemetryLogPath(opts) {
19706
+ if (typeof process !== "undefined" && process.env?.NOLO_COMPACTION_LOG_DISABLE === "1") {
19707
+ return null;
19708
+ }
19709
+ const explicit = opts?.logFile?.trim();
19710
+ if (explicit) return explicit;
19711
+ const envFile = typeof process !== "undefined" ? process.env?.NOLO_COMPACTION_LOG_FILE?.trim() : void 0;
19712
+ if (envFile) return envFile;
19713
+ const noloHome = typeof process !== "undefined" ? process.env?.NOLO_HOME?.trim() : void 0;
19714
+ if (isTestEnvironment() && !noloHome && !opts?.allowDefaultInTest) {
19715
+ return null;
19716
+ }
19717
+ return join3(resolveNoloStateDir("telemetry"), "compaction.jsonl");
19718
+ }
19719
+ function appendCompactionTelemetryRecord(record2, opts) {
19720
+ const file = resolveCompactionTelemetryLogPath(opts);
19721
+ if (!file) return false;
19722
+ try {
19723
+ mkdirSync(dirname3(file), { recursive: true });
19724
+ appendFileSync(file, JSON.stringify(record2) + "\n", "utf8");
19725
+ return true;
19726
+ } catch {
19727
+ return false;
19728
+ }
19729
+ }
19730
+
19691
19731
  // packages/agent-runtime/localAutoCompaction.ts
19692
19732
  import { randomUUID } from "node:crypto";
19693
19733
  function toPlanCompressionMessages(history) {
@@ -20046,12 +20086,48 @@ async function maybeAutoCompactLocalHistory(args2) {
20046
20086
  contextWindow,
20047
20087
  canonicalizeToolName
20048
20088
  });
20089
+ const telemetryTrigger = invalidSummary ? "invalid-summary" : args2.force ? "budget-rescue" : plan.diagnostics?.triggeredByItemLimit ? "item-limit" : plan.diagnostics?.triggeredByRealUsage ? "real-usage" : plan.diagnostics?.triggeredByEstimate ? "estimate" : "unknown";
20090
+ const telemetryPromptTokens = typeof args2.triggerPromptTokens === "number" && Number.isFinite(args2.triggerPromptTokens) && args2.triggerPromptTokens > 0 ? Math.round(args2.triggerPromptTokens) : null;
20091
+ const telemetryLogOpts = args2.telemetryLogFile ? { logFile: args2.telemetryLogFile } : void 0;
20049
20092
  if (bounded3.status === "blocked") {
20050
20093
  const detail = `bounded compaction blocked: ${bounded3.reason}`;
20051
20094
  console.warn(
20052
20095
  `[localLoop] ${detail}`,
20053
20096
  ...bounded3.diagnostics ? [bounded3.diagnostics] : []
20054
20097
  );
20098
+ appendCompactionTelemetryRecord(
20099
+ {
20100
+ schemaVersion: COMPACTION_TELEMETRY_SCHEMA_VERSION,
20101
+ ts: new Date(args2.now?.() ?? Date.now()).toISOString(),
20102
+ dialogId,
20103
+ outcome: "blocked",
20104
+ trigger: telemetryTrigger,
20105
+ attempts: 0,
20106
+ model: args2.model ?? null,
20107
+ provider: args2.provider ?? null,
20108
+ contextWindow,
20109
+ triggerPromptTokens: telemetryPromptTokens,
20110
+ realUsageRatio: plan.diagnostics?.realUsageRatio ?? null,
20111
+ estimatedTokens: plan.diagnostics?.totalUsed ?? null,
20112
+ elapsedMs: null,
20113
+ primaryElapsedMs: null,
20114
+ saveElapsedMs: null,
20115
+ summaryInputTokens: null,
20116
+ summaryInputCapTokens: bounded3.diagnostics?.cap ?? null,
20117
+ summaryExpandedMessages: bounded3.diagnostics?.expandedMessages ?? null,
20118
+ summaryOmittedMessages: null,
20119
+ pendingMessageCount: plan.diagnostics?.pendingMsgCount ?? null,
20120
+ compressedCount: null,
20121
+ retainedCount: null,
20122
+ compressedTokens: null,
20123
+ newSummaryTokens: null,
20124
+ residentReductionTokens: null,
20125
+ beforeProjectedTokens: null,
20126
+ afterProjectedTokens: null,
20127
+ finishReason: null
20128
+ },
20129
+ telemetryLogOpts
20130
+ );
20055
20131
  return {
20056
20132
  ...projectExisting(),
20057
20133
  decision: { outcome: "skipped", skipReason: "bounded-request-blocked", detail }
@@ -20064,7 +20140,9 @@ async function maybeAutoCompactLocalHistory(args2) {
20064
20140
  let retryCount = 0;
20065
20141
  let attemptRoute = "current";
20066
20142
  let attemptTimingLogged = false;
20067
- let compactionT0 = Date.now();
20143
+ let telemetryWritten = false;
20144
+ const compactionEventT0 = Date.now();
20145
+ let compactionT0 = compactionEventT0;
20068
20146
  let compactionInputTokens;
20069
20147
  let compactionPrevSummaryTokens;
20070
20148
  let compactionInputSource;
@@ -20078,6 +20156,45 @@ async function maybeAutoCompactLocalHistory(args2) {
20078
20156
  let summaryDiagnostics = {
20079
20157
  maxOutputTokens: bounded3.outputTokenBudget
20080
20158
  };
20159
+ const writeCompactionTelemetryOnce = (outcome, fields = {}) => {
20160
+ if (telemetryWritten) return;
20161
+ telemetryWritten = true;
20162
+ const m = fields.metrics;
20163
+ const isSuccess6 = outcome === "success";
20164
+ appendCompactionTelemetryRecord(
20165
+ {
20166
+ schemaVersion: COMPACTION_TELEMETRY_SCHEMA_VERSION,
20167
+ ts: new Date(args2.now?.() ?? Date.now()).toISOString(),
20168
+ dialogId,
20169
+ outcome,
20170
+ trigger: telemetryTrigger,
20171
+ attempts: attempt,
20172
+ model: fields.model ?? summaryModel ?? null,
20173
+ provider: summaryProvider ?? null,
20174
+ contextWindow,
20175
+ triggerPromptTokens: telemetryPromptTokens,
20176
+ realUsageRatio: plan.diagnostics?.realUsageRatio ?? null,
20177
+ estimatedTokens: plan.diagnostics?.totalUsed ?? null,
20178
+ elapsedMs: Date.now() - compactionEventT0,
20179
+ primaryElapsedMs: primaryElapsedMs ?? null,
20180
+ saveElapsedMs: saveElapsedMs ?? null,
20181
+ summaryInputTokens: m?.summaryInputTokens ?? bounded3.inputTokens ?? null,
20182
+ summaryInputCapTokens: m?.summaryInputCapTokens ?? bounded3.capTokens ?? null,
20183
+ summaryExpandedMessages: m?.summaryExpandedMessages ?? bounded3.expandedMessages ?? null,
20184
+ summaryOmittedMessages: isSuccess6 ? m?.summaryOmittedMessages ?? bounded3.omittedMessages ?? null : null,
20185
+ pendingMessageCount: m?.pendingMessageCount ?? plan.diagnostics?.pendingMsgCount ?? null,
20186
+ compressedCount: m?.compressedCount ?? null,
20187
+ retainedCount: m?.retainedCount ?? null,
20188
+ compressedTokens: m?.compressedTokens ?? null,
20189
+ newSummaryTokens: m?.newSummaryTokens ?? null,
20190
+ residentReductionTokens: m?.residentReductionTokens ?? null,
20191
+ beforeProjectedTokens: fields.beforeProjectedTokens ?? null,
20192
+ afterProjectedTokens: fields.afterProjectedTokens ?? null,
20193
+ finishReason: summaryDiagnostics.finishReason ?? null
20194
+ },
20195
+ telemetryLogOpts
20196
+ );
20197
+ };
20081
20198
  const logCompactionTiming = (outcome, fields) => {
20082
20199
  if (attemptTimingLogged) return;
20083
20200
  attemptTimingLogged = true;
@@ -20087,6 +20204,8 @@ async function maybeAutoCompactLocalHistory(args2) {
20087
20204
  if (compactionPrevSummaryTokens === void 0 && compactionPrevSummarySource !== void 0) {
20088
20205
  compactionPrevSummaryTokens = estimateTokenCount(compactionPrevSummarySource);
20089
20206
  }
20207
+ const elapsedMs = Date.now() - compactionT0;
20208
+ const resolvedModel = fields.model ?? summaryModel ?? null;
20090
20209
  console.log(
20091
20210
  `[compaction-timing] ${JSON.stringify({
20092
20211
  attemptId: compactionAttemptId,
@@ -20094,7 +20213,7 @@ async function maybeAutoCompactLocalHistory(args2) {
20094
20213
  maxAttempts,
20095
20214
  physicalAttempts: attempt,
20096
20215
  route: attemptRoute,
20097
- model: fields.model ?? summaryModel ?? null,
20216
+ model: resolvedModel,
20098
20217
  provider: summaryProvider ?? null,
20099
20218
  inputTokens: compactionInputTokens ?? null,
20100
20219
  prevSummaryTokens: compactionPrevSummaryTokens ?? null,
@@ -20104,7 +20223,7 @@ async function maybeAutoCompactLocalHistory(args2) {
20104
20223
  incompleteReason: summaryDiagnostics.incompleteReason ?? null,
20105
20224
  maxOutputTokens: summaryDiagnostics.maxOutputTokens ?? null,
20106
20225
  completionTokens: summaryDiagnostics.completionTokens ?? null,
20107
- elapsedMs: Date.now() - compactionT0,
20226
+ elapsedMs,
20108
20227
  primaryElapsedMs: primaryElapsedMs ?? null,
20109
20228
  fallbackElapsedMs: fallbackElapsedMs ?? null,
20110
20229
  saveElapsedMs: saveElapsedMs ?? null,
@@ -20305,6 +20424,7 @@ async function maybeAutoCompactLocalHistory(args2) {
20305
20424
  if (!newSummary) {
20306
20425
  recordCompactionFailure(dialogId, args2.now?.() ?? Date.now());
20307
20426
  logCompactionTiming("empty", { model: result4?.model });
20427
+ writeCompactionTelemetryOnce("empty", { model: result4?.model });
20308
20428
  emitPhase({ kind: "compaction-end" });
20309
20429
  return { ...projectExisting(), failureMessage: "Summary empty", failureReason: "provider-error", decision: { outcome: "failed", reason: "provider-error", detail: "Summary empty", ...itemDiagnostics } };
20310
20430
  }
@@ -20366,6 +20486,11 @@ async function maybeAutoCompactLocalHistory(args2) {
20366
20486
  console.warn(`[localLoop] ${failureMessage}`);
20367
20487
  recordCompactionFailure(dialogId, args2.now?.() ?? Date.now());
20368
20488
  logCompactionTiming("empty", {});
20489
+ writeCompactionTelemetryOnce("unsafe-projection", {
20490
+ model: result4?.model ?? args2.model ?? null,
20491
+ beforeProjectedTokens,
20492
+ afterProjectedTokens: projectedTokens
20493
+ });
20369
20494
  emitPhase({ kind: "compaction-end" });
20370
20495
  return {
20371
20496
  ...oldProjection,
@@ -20417,6 +20542,12 @@ async function maybeAutoCompactLocalHistory(args2) {
20417
20542
  model: result4?.model ?? args2.model ?? null,
20418
20543
  outputChars: newSummary.length
20419
20544
  });
20545
+ writeCompactionTelemetryOnce("success", {
20546
+ model: result4?.model ?? args2.model ?? null,
20547
+ metrics,
20548
+ beforeProjectedTokens,
20549
+ afterProjectedTokens: projectedTokens
20550
+ });
20420
20551
  emitPhase({ kind: "compaction-end" });
20421
20552
  return {
20422
20553
  history: projectedHistory,
@@ -20465,6 +20596,7 @@ async function maybeAutoCompactLocalHistory(args2) {
20465
20596
  ...safe.outputChars === void 0 ? {} : { outputChars: safe.outputChars }
20466
20597
  };
20467
20598
  logCompactionTiming(failureReason, {});
20599
+ writeCompactionTelemetryOnce(failureReason, {});
20468
20600
  const failureNow = args2.now?.() ?? Date.now();
20469
20601
  if (failureReason !== "aborted") recordCompactionFailure(dialogId, failureNow);
20470
20602
  if (failureReason === "aborted") emitPhase({ kind: "compaction-end" });
@@ -20543,6 +20675,7 @@ function createTurnCompactionController(args2) {
20543
20675
  const compactionDialogId = args2.continueDialogId ?? ephemeralDialogId;
20544
20676
  const runCompaction = async (history, force) => {
20545
20677
  let realContextUsagePercent;
20678
+ let triggerPromptTokens;
20546
20679
  if (args2.continueDialogId && typeof args2.adapter.loadLastContextUsage === "function") {
20547
20680
  try {
20548
20681
  const usage = await args2.adapter.loadLastContextUsage(
@@ -20550,6 +20683,7 @@ function createTurnCompactionController(args2) {
20550
20683
  );
20551
20684
  const inputTokens = usage?.inputTokens;
20552
20685
  if (typeof inputTokens === "number" && Number.isFinite(inputTokens) && inputTokens > 0 && typeof args2.contextWindow === "number" && Number.isFinite(args2.contextWindow) && args2.contextWindow > 0) {
20686
+ triggerPromptTokens = inputTokens;
20553
20687
  realContextUsagePercent = Math.min(
20554
20688
  1,
20555
20689
  Math.max(0, inputTokens / args2.contextWindow)
@@ -20571,6 +20705,7 @@ function createTurnCompactionController(args2) {
20571
20705
  resolveProvider: args2.resolveProvider,
20572
20706
  contextWindow: args2.contextWindow,
20573
20707
  realContextUsagePercent,
20708
+ ...triggerPromptTokens !== void 0 ? { triggerPromptTokens } : {},
20574
20709
  force,
20575
20710
  abortSignal: args2.abortSignal,
20576
20711
  timeoutMs: args2.timeoutMs,
@@ -20627,6 +20762,7 @@ function createTurnCompactionController(args2) {
20627
20762
  contextWindow: args2.contextWindow,
20628
20763
  ...force ? { force: true } : {},
20629
20764
  ...ratio !== void 0 ? { realContextUsagePercent: ratio } : {},
20765
+ ...inputTokens > 0 ? { triggerPromptTokens: inputTokens } : {},
20630
20766
  abortSignal: args2.abortSignal,
20631
20767
  timeoutMs: args2.timeoutMs,
20632
20768
  summaryFallback: args2.summaryFallback,
@@ -21183,7 +21319,11 @@ async function runLocalAgentTurn(input) {
21183
21319
  dispatchIntent: detectDispatchIntentFromMessages(history) || detectDispatchIntent(
21184
21320
  typeof input.input === "string" ? input.input : void 0
21185
21321
  ),
21186
- runKind: input.runKind
21322
+ runKind: input.runKind,
21323
+ // 主 Agent 强弱姿态:本地宿主能直读当前会话模型(agentConfig.model,会话内
21324
+ // 恒定),显式透传后由 resolveToolGuidedSections 按档位追加一句短指引;
21325
+ // 模型缺失/推不出档位时不追加文本,前缀缓存稳定性不受影响。
21326
+ callerModel: agentConfig.model
21187
21327
  });
21188
21328
  const callerScopes = normalizeContextBlockScopes(
21189
21329
  input.contextBlocks,
@@ -23530,212 +23670,6 @@ var DEFAULT_HOSTED_SANDBOX_RESOURCE_LIMITS = {
23530
23670
  };
23531
23671
  var BWRAP_PROBE_TTL_MS = 5 * 6e4;
23532
23672
 
23533
- // node_modules/async-mutex/index.mjs
23534
- var E_TIMEOUT = new Error("timeout while waiting for mutex to become available");
23535
- var E_ALREADY_LOCKED = new Error("mutex already locked");
23536
- var E_CANCELED = new Error("request for lock canceled");
23537
- var __awaiter$2 = function(thisArg, _arguments, P, generator) {
23538
- function adopt(value) {
23539
- return value instanceof P ? value : new P(function(resolve7) {
23540
- resolve7(value);
23541
- });
23542
- }
23543
- return new (P || (P = Promise))(function(resolve7, reject) {
23544
- function fulfilled(value) {
23545
- try {
23546
- step(generator.next(value));
23547
- } catch (e) {
23548
- reject(e);
23549
- }
23550
- }
23551
- function rejected(value) {
23552
- try {
23553
- step(generator["throw"](value));
23554
- } catch (e) {
23555
- reject(e);
23556
- }
23557
- }
23558
- function step(result4) {
23559
- result4.done ? resolve7(result4.value) : adopt(result4.value).then(fulfilled, rejected);
23560
- }
23561
- step((generator = generator.apply(thisArg, _arguments || [])).next());
23562
- });
23563
- };
23564
- var Semaphore = class {
23565
- constructor(_value, _cancelError = E_CANCELED) {
23566
- this._value = _value;
23567
- this._cancelError = _cancelError;
23568
- this._queue = [];
23569
- this._weightedWaiters = [];
23570
- }
23571
- acquire(weight = 1, priority = 0) {
23572
- if (weight <= 0)
23573
- throw new Error(`invalid weight ${weight}: must be positive`);
23574
- return new Promise((resolve7, reject) => {
23575
- const task = { resolve: resolve7, reject, weight, priority };
23576
- const i = findIndexFromEnd(this._queue, (other) => priority <= other.priority);
23577
- if (i === -1 && weight <= this._value) {
23578
- this._dispatchItem(task);
23579
- } else {
23580
- this._queue.splice(i + 1, 0, task);
23581
- }
23582
- });
23583
- }
23584
- runExclusive(callback_1) {
23585
- return __awaiter$2(this, arguments, void 0, function* (callback4, weight = 1, priority = 0) {
23586
- const [value, release3] = yield this.acquire(weight, priority);
23587
- try {
23588
- return yield callback4(value);
23589
- } finally {
23590
- release3();
23591
- }
23592
- });
23593
- }
23594
- waitForUnlock(weight = 1, priority = 0) {
23595
- if (weight <= 0)
23596
- throw new Error(`invalid weight ${weight}: must be positive`);
23597
- if (this._couldLockImmediately(weight, priority)) {
23598
- return Promise.resolve();
23599
- } else {
23600
- return new Promise((resolve7) => {
23601
- if (!this._weightedWaiters[weight - 1])
23602
- this._weightedWaiters[weight - 1] = [];
23603
- insertSorted(this._weightedWaiters[weight - 1], { resolve: resolve7, priority });
23604
- });
23605
- }
23606
- }
23607
- isLocked() {
23608
- return this._value <= 0;
23609
- }
23610
- getValue() {
23611
- return this._value;
23612
- }
23613
- setValue(value) {
23614
- this._value = value;
23615
- this._dispatchQueue();
23616
- }
23617
- release(weight = 1) {
23618
- if (weight <= 0)
23619
- throw new Error(`invalid weight ${weight}: must be positive`);
23620
- this._value += weight;
23621
- this._dispatchQueue();
23622
- }
23623
- cancel() {
23624
- this._queue.forEach((entry) => entry.reject(this._cancelError));
23625
- this._queue = [];
23626
- }
23627
- _dispatchQueue() {
23628
- this._drainUnlockWaiters();
23629
- while (this._queue.length > 0 && this._queue[0].weight <= this._value) {
23630
- this._dispatchItem(this._queue.shift());
23631
- this._drainUnlockWaiters();
23632
- }
23633
- }
23634
- _dispatchItem(item) {
23635
- const previousValue = this._value;
23636
- this._value -= item.weight;
23637
- item.resolve([previousValue, this._newReleaser(item.weight)]);
23638
- }
23639
- _newReleaser(weight) {
23640
- let called = false;
23641
- return () => {
23642
- if (called)
23643
- return;
23644
- called = true;
23645
- this.release(weight);
23646
- };
23647
- }
23648
- _drainUnlockWaiters() {
23649
- if (this._queue.length === 0) {
23650
- for (let weight = this._value; weight > 0; weight--) {
23651
- const waiters = this._weightedWaiters[weight - 1];
23652
- if (!waiters)
23653
- continue;
23654
- waiters.forEach((waiter) => waiter.resolve());
23655
- this._weightedWaiters[weight - 1] = [];
23656
- }
23657
- } else {
23658
- const queuedPriority = this._queue[0].priority;
23659
- for (let weight = this._value; weight > 0; weight--) {
23660
- const waiters = this._weightedWaiters[weight - 1];
23661
- if (!waiters)
23662
- continue;
23663
- const i = waiters.findIndex((waiter) => waiter.priority <= queuedPriority);
23664
- (i === -1 ? waiters : waiters.splice(0, i)).forEach((waiter) => waiter.resolve());
23665
- }
23666
- }
23667
- }
23668
- _couldLockImmediately(weight, priority) {
23669
- return (this._queue.length === 0 || this._queue[0].priority < priority) && weight <= this._value;
23670
- }
23671
- };
23672
- function insertSorted(a, v) {
23673
- const i = findIndexFromEnd(a, (other) => v.priority <= other.priority);
23674
- a.splice(i + 1, 0, v);
23675
- }
23676
- function findIndexFromEnd(a, predicate) {
23677
- for (let i = a.length - 1; i >= 0; i--) {
23678
- if (predicate(a[i])) {
23679
- return i;
23680
- }
23681
- }
23682
- return -1;
23683
- }
23684
- var __awaiter$1 = function(thisArg, _arguments, P, generator) {
23685
- function adopt(value) {
23686
- return value instanceof P ? value : new P(function(resolve7) {
23687
- resolve7(value);
23688
- });
23689
- }
23690
- return new (P || (P = Promise))(function(resolve7, reject) {
23691
- function fulfilled(value) {
23692
- try {
23693
- step(generator.next(value));
23694
- } catch (e) {
23695
- reject(e);
23696
- }
23697
- }
23698
- function rejected(value) {
23699
- try {
23700
- step(generator["throw"](value));
23701
- } catch (e) {
23702
- reject(e);
23703
- }
23704
- }
23705
- function step(result4) {
23706
- result4.done ? resolve7(result4.value) : adopt(result4.value).then(fulfilled, rejected);
23707
- }
23708
- step((generator = generator.apply(thisArg, _arguments || [])).next());
23709
- });
23710
- };
23711
- var Mutex = class {
23712
- constructor(cancelError) {
23713
- this._semaphore = new Semaphore(1, cancelError);
23714
- }
23715
- acquire() {
23716
- return __awaiter$1(this, arguments, void 0, function* (priority = 0) {
23717
- const [, releaser] = yield this._semaphore.acquire(1, priority);
23718
- return releaser;
23719
- });
23720
- }
23721
- runExclusive(callback4, priority = 0) {
23722
- return this._semaphore.runExclusive(() => callback4(), 1, priority);
23723
- }
23724
- isLocked() {
23725
- return this._semaphore.isLocked();
23726
- }
23727
- waitForUnlock(priority = 0) {
23728
- return this._semaphore.waitForUnlock(1, priority);
23729
- }
23730
- release() {
23731
- if (this._semaphore.isLocked())
23732
- this._semaphore.release();
23733
- }
23734
- cancel() {
23735
- return this._semaphore.cancel();
23736
- }
23737
- };
23738
-
23739
23673
  // packages/database-engine/dialogOwner.ts
23740
23674
  var dialogOwnerKey = (dialogId) => `dialogown-${dialogId}`;
23741
23675
  var locks = /* @__PURE__ */ new Map();
@@ -23867,7 +23801,7 @@ async function saveCliPendingUserMessages(args2) {
23867
23801
  if (ops.length) await args2.store.batch(ops);
23868
23802
  }
23869
23803
  async function readCliPendingUserMessages(store, dialogId) {
23870
- const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-NFNGYOOW.js");
23804
+ const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-OHAC4JTY.js");
23871
23805
  const rows = await readDialogMessageRecords({ store, dialogId });
23872
23806
  const uncertain = rows.filter(({ record: record2 }) => record2.metadata?.cliBatchPhase === "requested" && !record2.metadata?.cliBatchResolution);
23873
23807
  const recovery = uncertain.length ? {
@@ -24169,7 +24103,7 @@ function buildLoadSkillExecutor(args2) {
24169
24103
  const { resolveSkillByName } = await import("./skillDiscovery-MDDKPTW3.js");
24170
24104
  const resolved = resolveSkillByName(args2.cwd, name);
24171
24105
  if (!resolved) {
24172
- const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-PFTTFPWW.js");
24106
+ const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-PQWEXSFW.js");
24173
24107
  const builtin = resolveBuiltinSkillByName(name);
24174
24108
  if (builtin) {
24175
24109
  const denied = await rejectDisabledBuiltin(args2.agentSkillSource, builtin.slug, name, args2.resolveAgentSkillSource);
@@ -24248,7 +24182,7 @@ async function loadPreciseSkill(cwd, parsed, agentSkillSource, resolveAgentSkill
24248
24182
  if (!nonEmpty(parsed.slug) || has2("projectBinding") || has2("relativePath")) {
24249
24183
  return reject("builtin requires only an exact slug.");
24250
24184
  }
24251
- const { listBuiltinSkills } = await import("./builtinSkillRegistry-PFTTFPWW.js");
24185
+ const { listBuiltinSkills } = await import("./builtinSkillRegistry-PQWEXSFW.js");
24252
24186
  const builtin = listBuiltinSkills().find((entry) => entry.slug === parsed.slug);
24253
24187
  if (!builtin) return reject("builtin slug not found.");
24254
24188
  const denied = await rejectDisabledBuiltin(agentSkillSource, builtin.slug, builtin.slug, resolveAgentSkillSource);