nolo-cli 0.251.0-alpha.1 → 0.252.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.
- package/{_executeModel-55PHWQWB.js → _executeModel-D6G3B45S.js} +44 -44
- package/{action-WZTKEF5H.js → action-QQOQ2LP3.js} +3 -3
- package/{addContentAction-LBVAQUF7.js → addContentAction-MB22YIDV.js} +6 -6
- package/{addDialogAgentAction-6WAUSUSZ.js → addDialogAgentAction-KNTBVVGY.js} +5 -5
- package/{agentDeleteCommand-KEO3KDK3.js → agentDeleteCommand-YCWDGJSF.js} +66 -65
- package/{agentEmailCommands-RWJQQRNT.js → agentEmailCommands-DTWD5FWC.js} +66 -65
- package/{agentListCommands-L3TLPLNH.js → agentListCommands-JTOONLYL.js} +224 -37
- package/{agentMachineCommands-EZWWXWDH.js → agentMachineCommands-25X7OTLQ.js} +29 -27
- package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentRecordCommands-7W2CGHJJ.js → agentRecordCommands-SXE3WV2X.js} +65 -64
- package/{agentRunCommand-POL6B6BO.js → agentRunCommand-QSIED54S.js} +65 -64
- package/{agentRunControl-FKSXBUAF.js → agentRunControl-KNNDEEDI.js} +8 -6
- package/{agentRuntimeLocal-WSHWNIMF.js → agentRuntimeLocal-HVJJMB4W.js} +24 -23
- package/{agentSlice-3G2YLTA4.js → agentSlice-NBUJJVRI.js} +6 -6
- package/{appDeleteCommands-DZZQCVYH.js → appDeleteCommands-YU6TT6VN.js} +31 -29
- package/{appDeployCommands-NJJBVNH5.js → appDeployCommands-4DEIX7YP.js} +31 -29
- package/{appDeployStatusCommands-GBOAFEYG.js → appDeployStatusCommands-3VKS6GBQ.js} +31 -29
- package/{appGetCommands-GOOKYMKO.js → appGetCommands-22FNNROT.js} +31 -29
- package/{appListCommands-OBCGUG3S.js → appListCommands-FVGMLHVU.js} +31 -29
- package/{authCommand-77CRN332.js → authCommand-5DC3ES4Q.js} +12 -12
- package/{chromeOpsCommands-6RLEBBJJ.js → chromeOpsCommands-AA555ANS.js} +1 -1
- package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
- package/chunk-2GAUJDA5.js +594 -0
- package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
- package/{chunk-222CJNC2.js → chunk-2LANL4B5.js} +3 -3
- package/{chunk-PKMDYRAM.js → chunk-2PB653F5.js} +171 -237
- package/{chunk-GMWZRXRM.js → chunk-3272HU62.js} +1 -1
- package/{chunk-3ZWJVKFB.js → chunk-3N3JPQBQ.js} +82 -38
- package/{chunk-LXKK7QFI.js → chunk-4HAOOY6G.js} +53 -23
- package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
- package/{chunk-T4V6C3J3.js → chunk-52M4RYVP.js} +1 -1
- package/{chunk-6UNJ6JGR.js → chunk-5IN2NBDX.js} +4 -4
- package/{chunk-OQCAHPDQ.js → chunk-5QEOTC35.js} +4 -4
- package/{chunk-R7D5SRAZ.js → chunk-5UYDG6HP.js} +17 -0
- package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
- package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
- package/{chunk-UCMUXZJV.js → chunk-7XO73H5X.js} +111 -1
- package/{chunk-N3SEV3CG.js → chunk-7ZOVFB2H.js} +79 -30
- package/{chunk-UR4ZMRV3.js → chunk-A5F6DYP2.js} +1 -1
- package/{chunk-FAFDIQJG.js → chunk-A6VIMCWI.js} +3 -3
- package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
- package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
- package/{chunk-IFJ6OTI6.js → chunk-CO2NXG2J.js} +32 -10
- package/{chunk-D3E5MYXO.js → chunk-CYGFNMCH.js} +1 -1
- package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
- package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-PLS2MJVW.js → chunk-DU3DJYVA.js} +4 -4
- package/{chunk-MTS5DCL2.js → chunk-EG3JTV7H.js} +2 -2
- package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
- package/{chunk-CD64YXRB.js → chunk-F6Q64KRV.js} +1 -1
- package/{chunk-L5HV76QT.js → chunk-FRC2DNTN.js} +1 -1
- package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
- package/{chunk-D35TOEMM.js → chunk-FZI2P64R.js} +137 -53
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-CUYFRVJF.js → chunk-GO7UC5VH.js} +5 -5
- package/{chunk-KZVRPCOR.js → chunk-GVH2IP2M.js} +4 -4
- package/{chunk-KGOBJAWC.js → chunk-GWS2X7TX.js} +206 -93
- package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
- package/{chunk-Q5KZ6F55.js → chunk-HMREADP6.js} +19 -17
- package/{chunk-X337N4D6.js → chunk-ITCOQAHS.js} +3 -3
- package/{chunk-BQ4CZEVZ.js → chunk-ITMBFT35.js} +1 -1
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-IXAGRTAR.js → chunk-JAYPSNGR.js} +1 -1
- package/{chunk-LOXR4TQN.js → chunk-JF5QT3YY.js} +2 -2
- package/{chunk-QLGL43SI.js → chunk-JKALGWDL.js} +2 -2
- package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-3KWJPTVP.js → chunk-LAQC5FAP.js} +4 -4
- package/{chunk-NTNX77FI.js → chunk-LNIA5JVX.js} +6 -6
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-ZSRR6HCH.js → chunk-N2ZAY2DK.js} +1 -1
- package/{chunk-MTM4LRVG.js → chunk-NNUIVAC2.js} +1 -1
- package/{chunk-HD5EKSLF.js → chunk-NPUHKEOB.js} +2 -2
- package/{chunk-OARYOLF3.js → chunk-O6LPLIRS.js} +11 -11
- package/{chunk-HQLCYPL4.js → chunk-OB4FBZXJ.js} +4 -4
- package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
- package/{chunk-IZWGO2ZS.js → chunk-OMIXG25B.js} +1 -1
- package/{chunk-CJ2BP6V7.js → chunk-OOV5JN25.js} +2 -2
- package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
- package/{chunk-K5CIMK3R.js → chunk-P6HMEKLL.js} +114 -56
- package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
- package/{chunk-WZPG63Q4.js → chunk-PIVTQRX6.js} +43 -13
- package/{chunk-KJDN2YRH.js → chunk-QMKWSKWA.js} +4 -4
- package/{chunk-XC5RPSXK.js → chunk-QV32GSVO.js} +2 -2
- package/{chunk-XJSEST7D.js → chunk-SMCKJJXI.js} +2 -2
- package/{chunk-KRAPKTAS.js → chunk-SMZFWEMX.js} +1 -1
- package/{chunk-43VT5PLM.js → chunk-T4VVQHSE.js} +1 -1
- package/{chunk-W2N4OAKM.js → chunk-TDI7ARZO.js} +3 -3
- package/{chunk-TGKAUEV3.js → chunk-TDLZA6LJ.js} +13 -10
- package/{chunk-LMMRWGGJ.js → chunk-TTUIM3PJ.js} +2 -2
- package/{chunk-5IKKSJYX.js → chunk-TTWNTFTO.js} +35 -2
- package/{chunk-ZM5AZTQG.js → chunk-U7BP25PE.js} +18 -6
- package/{chunk-X3OZ655T.js → chunk-UI3Z3HDK.js} +1 -1
- package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-U2OWDHDE.js → chunk-VH7AQEEF.js} +2 -2
- package/{chunk-ZKKJZBNO.js → chunk-WAOHK3NJ.js} +9 -9
- package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
- package/{chunk-JUYI2D7J.js → chunk-WNIBQBOR.js} +1 -1
- package/{chunk-SLUZ6FBJ.js → chunk-XBCADGK2.js} +1 -1
- package/{chunk-6XVPMGXK.js → chunk-YB5D2GK4.js} +9 -3
- package/{chunk-QJ5YDTEF.js → chunk-YQYYYATY.js} +42 -24
- package/{chunk-WQDTSK5U.js → chunk-ZMFA2TLE.js} +1 -1
- package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
- package/{chunk-A55E2OCP.js → chunk-ZNOXY73P.js} +632 -124
- package/{cliAgentConfigHelpers-N6LTB7UY.js → cliAgentConfigHelpers-FKBPFPKR.js} +6 -6
- package/{cliLocalAgentRecordReader-NFNGYOOW.js → cliLocalAgentRecordReader-DWU3LBO2.js} +28 -27
- package/{commandRegistry-OM5DU4DS.js → commandRegistry-7FVATZS2.js} +70 -70
- package/{contentThunks-7URM43ET.js → contentThunks-25XCB7VY.js} +18 -18
- package/{cooldownCommands-JEEV75B7.js → cooldownCommands-PT5L4LNB.js} +3 -3
- package/{createAgentAutomationAction-GGEXIKMC.js → createAgentAutomationAction-FC5RI2LW.js} +18 -18
- package/{createDialogAction-IXXEMFRQ.js → createDialogAction-IL3ISSQQ.js} +19 -19
- package/{createPageAction-IXIVLIOO.js → createPageAction-RVYBEYZV.js} +19 -19
- package/{db-J5KE7XRI.js → db-JMGVD4TB.js} +2 -1
- package/{dbSlice-IE4ADINL.js → dbSlice-WG3ZG6PZ.js} +5 -5
- package/{deleteFile-ZCQESEEQ.js → deleteFile-4TIG54YN.js} +3 -3
- package/{dialogCommands-RPBHOZB6.js → dialogCommands-VUJISJZF.js} +33 -31
- package/{dialogNotifyCommand-ECKI5MMA.js → dialogNotifyCommand-JKYVSR6K.js} +7 -7
- package/{dialogSlice-5FQB2TNN.js → dialogSlice-UMP55UAW.js} +16 -16
- package/{docCreateCommands-XJ2X57DW.js → docCreateCommands-S46F6GKP.js} +30 -28
- package/{docDeleteCommands-45WGFFEB.js → docDeleteCommands-LJG4NK6J.js} +31 -29
- package/{docReadCommands-LRRVDS46.js → docReadCommands-YPAYGHNM.js} +30 -28
- package/{docStore-SUAVM24F.js → docStore-VK3MVJ5Q.js} +6 -6
- package/{docUpdateCommands-QUYX6BVR.js → docUpdateCommands-MPTM6267.js} +30 -28
- package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
- package/{handleSendMessageAction-FDIWBQUB.js → handleSendMessageAction-VPKVNKBU.js} +33 -33
- package/{hostCredentialCreate-CEXQHYT4.js → hostCredentialCreate-K56HWPNY.js} +65 -64
- package/index.js +8 -8
- package/{localDialogRead-USDZXKIL.js → localDialogRead-NXILOV3T.js} +1 -1
- package/{localRuntimeAdapter-O3JBRK6S.js → localRuntimeAdapter-KVU72FWT.js} +64 -63
- package/{machineCommands-I3YA7TNC.js → machineCommands-C3O5RKNJ.js} +65 -64
- package/{machineWsRunDispatch-E5CIE2OJ.js → machineWsRunDispatch-ZLART7ZA.js} +65 -64
- package/{mcpLocalAuthorizeCommand-K5J2VMG6.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +6 -6
- package/{memberThunks-T7EAZE6A.js → memberThunks-7DNR6DRD.js} +7 -7
- package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
- package/package.json +1 -1
- package/{projectArchive-A7E65AZO.js → projectArchive-UBJFYRL7.js} +19 -19
- package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
- package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
- package/{read-BRZHXUJ6.js → read-Z2JOK6F6.js} +3 -3
- package/{readDocTool-N7RVFQEE.js → readDocTool-3QYSVWBT.js} +1 -1
- package/{readlineWorkspace-2O65NBFG.js → readlineWorkspace-TSIYF7C6.js} +610 -206
- package/{removeDialogAgentAction-GRT72HLK.js → removeDialogAgentAction-LRKDU4RI.js} +7 -7
- package/{runAgentClientLoop-NWCZIXCG.js → runAgentClientLoop-YAHGOWXN.js} +41 -41
- package/{runtimeDoctorCommands-26HYHFTK.js → runtimeDoctorCommands-QGZSKNSE.js} +5 -5
- package/{secretCommands-XR72SHLK.js → secretCommands-BXAQEOES.js} +2 -2
- package/{setDialogExtraReferencesAction-CBG3X46B.js → setDialogExtraReferencesAction-KIITOCFP.js} +6 -6
- package/{setPrimaryDialogAgentAction-EWTDZOAX.js → setPrimaryDialogAgentAction-Y36PKFFB.js} +7 -7
- package/{settingThunks-X4PT66J2.js → settingThunks-YQNG5L6K.js} +5 -5
- package/{spaceCommands-EVSNTGRS.js → spaceCommands-P644AAZZ.js} +29 -27
- package/{streamAgentChatTurn-SYP3OEM5.js → streamAgentChatTurn-5CSYAUAY.js} +54 -50
- package/{switchDialogAgentAction-YHPZ7K6E.js → switchDialogAgentAction-U2VLPPVO.js} +5 -5
- package/{tools-2AO2SK4L.js → tools-UZ3CDIR2.js} +34 -34
- package/{tuiRestart-HBQDF4AE.js → tuiRestart-GF4DGAAN.js} +7 -7
- package/{tuiSummaryLlmCaller-Q2PNR63K.js → tuiSummaryLlmCaller-HROLGN4F.js} +12 -12
- package/{updateCommands-6SI7NWVC.js → updateCommands-BZ4YDHNM.js} +3 -3
- package/{updateDialogTitleAction-MWVMBIPZ.js → updateDialogTitleAction-53XCCDK2.js} +18 -18
- package/{usageCommand-D44AOTMH.js → usageCommand-XVJ7ZUTM.js} +1 -1
- package/{usageRebuildCommand-IRIMKDI5.js → usageRebuildCommand-NK6S3D4J.js} +2 -2
- package/{windowsSelfUpdate-BJIJKKIS.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
- package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
- package/chunk-FGHEF6WI.js +0 -34
- package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
- package/{chunk-CDIRKCPD.js → chunk-6HL6E7ZD.js} +152 -152
- 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-
|
|
6
|
+
} from "./chunk-OOV5JN25.js";
|
|
7
7
|
import {
|
|
8
8
|
ALWAYS_EXCLUDED_GLOBS,
|
|
9
9
|
EXECUTION_BACKEND_KINDS
|
|
10
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
38
|
+
} from "./chunk-TTUIM3PJ.js";
|
|
39
39
|
import {
|
|
40
40
|
resolveAgentImageInputSupport,
|
|
41
41
|
resolveToolImagePolicy
|
|
42
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
72
|
+
} from "./chunk-4HAOOY6G.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-
|
|
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-
|
|
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-
|
|
143
|
+
} from "./chunk-6HL6E7ZD.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-
|
|
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-
|
|
180
|
+
} from "./chunk-2FZVXOFX.js";
|
|
181
181
|
import {
|
|
182
182
|
createProviderCallTimingTracker,
|
|
183
183
|
finalizeProviderCallTiming,
|
|
@@ -226,6 +226,9 @@ import {
|
|
|
226
226
|
import {
|
|
227
227
|
estimateTokenCount
|
|
228
228
|
} from "./chunk-PSCNXBYA.js";
|
|
229
|
+
import {
|
|
230
|
+
Mutex
|
|
231
|
+
} from "./chunk-IVK2KT3H.js";
|
|
229
232
|
import {
|
|
230
233
|
isLevelNotFoundError
|
|
231
234
|
} from "./chunk-OW765XBU.js";
|
|
@@ -257,7 +260,7 @@ import {
|
|
|
257
260
|
} from "./chunk-OJKUU3LP.js";
|
|
258
261
|
import {
|
|
259
262
|
resolveLocalUserId
|
|
260
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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
|
|
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) :
|
|
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 =
|
|
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
|
-
|
|
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
|
|
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"
|
|
19255
|
-
const
|
|
19256
|
-
|
|
19257
|
-
|
|
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
|
|
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:
|
|
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
|
|
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-
|
|
23804
|
+
const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-DWU3LBO2.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 ? {
|