nolo-cli 0.241.0-alpha.1 → 0.242.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/README.md +3 -5
- package/{_executeModel-UCWDB72C.js → _executeModel-IZ2MCXHO.js} +67 -67
- package/{action-24MZYW2B.js → action-VDEW6WLI.js} +9 -9
- package/{addContentAction-HEMCSSHT.js → addContentAction-7YVXHIPQ.js} +14 -14
- package/{addDialogAgentAction-SQYDOXHA.js → addDialogAgentAction-BX7B47HF.js} +17 -17
- package/{agentDeleteCommand-P7O3ACNJ.js → agentDeleteCommand-N7ELXPLD.js} +90 -90
- package/{agentEmailCommands-A5BRSYWK.js → agentEmailCommands-OFS477PV.js} +92 -92
- package/{agentListCommands-LDRCOOMO.js → agentListCommands-IQQHJSXP.js} +193 -156
- package/{agentMachineCommands-AYL53KJV.js → agentMachineCommands-NS65BEW7.js} +43 -41
- package/{agentProviderCommands-N5EA3ED2.js → agentProviderCommands-SS6M6VGY.js} +2 -2
- package/{agentRecordCommands-FICBZ57C.js → agentRecordCommands-4VE7CNLC.js} +88 -88
- package/{agentRunCommand-CTXQGDUM.js → agentRunCommand-2MUXHKNW.js} +89 -89
- package/{agentRunControl-CO6BASZF.js → agentRunControl-55GL6Q3M.js} +7 -5
- package/{agentRuntimeLocal-5YN4D5WT.js → agentRuntimeLocal-5DB2P4MU.js} +42 -35
- package/{agentSlice-DJ5D4DU4.js → agentSlice-5VTAFG43.js} +14 -14
- package/{appDeleteCommands-B4E7N7M2.js → appDeleteCommands-EDKUPHJM.js} +43 -41
- package/{appDeployCommands-E4DTXRRM.js → appDeployCommands-JO74GW4L.js} +43 -41
- package/{appDeployStatusCommands-FCNHYHZM.js → appDeployStatusCommands-U77ZUHX7.js} +43 -41
- package/{appGetCommands-4DXSQHUZ.js → appGetCommands-QCMHBYPX.js} +43 -41
- package/{appListCommands-2NN5E4F6.js → appListCommands-ZQJYEXI6.js} +43 -41
- package/{authCommand-47DR6GZT.js → authCommand-W4KXRZLI.js} +13 -13
- package/{authCommands-ZZ3L5IFM.js → authCommands-6AUYO65N.js} +3 -3
- package/{builtinSkillRegistry-AYWYQVA4.js → builtinSkillRegistry-GHE3RD3V.js} +7 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-VZWAY2KR.js → chromeOpsCommands-TBPM6MR4.js} +1 -1
- package/{chunk-7OTNBI77.js → chunk-247AAJRK.js} +1 -1
- package/{chunk-BDERPCJW.js → chunk-2N4UBHUU.js} +2 -2
- package/{chunk-3V6JT6WN.js → chunk-2T5BHLID.js} +266 -109
- package/{chunk-5TJE4QCL.js → chunk-3OQFXODL.js} +2 -2
- package/{chunk-UAOFSUG7.js → chunk-3ORFJP2Z.js} +1 -1
- package/{chunk-6XBOPKUH.js → chunk-3UNAGTBW.js} +14 -14
- package/{chunk-ZTLTDUV6.js → chunk-4F7SWSWO.js} +4 -4
- package/{chunk-LT3DMEIB.js → chunk-4UK6UBXF.js} +1 -1
- package/{chunk-H6CHPU6M.js → chunk-5GRWWUB4.js} +3 -3
- package/{chunk-TTEBPPUV.js → chunk-6326DRQY.js} +1 -1
- package/{chunk-TXFYIWAW.js → chunk-6MQWGA5F.js} +10 -10
- package/{chunk-TE2XH4KH.js → chunk-6MX6S6TE.js} +3 -3
- package/{chunk-QGMIUVBT.js → chunk-6S6CZUXK.js} +19 -19
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-6BGJHJRN.js → chunk-6XLWUNZB.js} +27 -27
- package/{chunk-BIJTI5SX.js → chunk-7AWKDRXG.js} +2 -2
- package/{chunk-YMCSR7PA.js → chunk-7GTXPS3D.js} +8 -8
- package/{chunk-G6OPRPXH.js → chunk-7HUHOCIY.js} +35 -29
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-C3GOEQJF.js → chunk-BH7CEVOH.js} +1 -1
- package/{chunk-B72AFRR2.js → chunk-C4KX626C.js} +4 -4
- package/{chunk-EW37CXCQ.js → chunk-CHYYSFFM.js} +6 -6
- package/{chunk-ZQUCJBS4.js → chunk-CJTB3OYB.js} +2 -2
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-MM73SP4K.js → chunk-DOK7GDRU.js} +1 -1
- package/{chunk-Y5RN44VH.js → chunk-DPAIQLAL.js} +16 -16
- package/{chunk-LMZRXDWG.js → chunk-EKXPHL7M.js} +3 -3
- package/{chunk-NL7J2J5Z.js → chunk-ENYTIRIO.js} +1 -1
- package/{chunk-GCVFX6ZL.js → chunk-ER3P6MBT.js} +3 -3
- package/{chunk-NQQL2DKF.js → chunk-F4MCAOWN.js} +1 -1
- package/{chunk-7NIBQ4HY.js → chunk-FDZ2GBWO.js} +30 -2
- package/{chunk-2XMKW2OY.js → chunk-GES5GIAU.js} +8 -8
- package/{chunk-25OCZXSX.js → chunk-HQVNO7FH.js} +21 -21
- package/{chunk-DVYAFH2Q.js → chunk-HSWEFHFS.js} +1 -1
- package/{chunk-FSIEHQNH.js → chunk-IIG3TT73.js} +42 -5
- package/{chunk-FPMPWNVQ.js → chunk-IZJFTY4R.js} +3 -3
- package/{chunk-QES2NCVM.js → chunk-J25ESVUW.js} +9 -9
- package/{chunk-ZBQ5UGYY.js → chunk-J2XZZXIH.js} +3 -3
- package/{chunk-NBB2EBQD.js → chunk-JVJ53XCH.js} +1 -1
- package/{chunk-OATIWAKN.js → chunk-KC2QVCI7.js} +1 -1
- package/{chunk-3NFWMSTA.js → chunk-KF2DWSAH.js} +5 -5
- package/{chunk-KGIIZXPL.js → chunk-KLD7K5FD.js} +7 -7
- package/{chunk-FCAMGBLY.js → chunk-KMW5CRRM.js} +464 -276
- package/{chunk-7U2TFUWW.js → chunk-LZOOUQAZ.js} +4 -4
- package/{chunk-OYHJ4TW7.js → chunk-M5EA44QU.js} +2 -2
- package/{chunk-WHO3LYDW.js → chunk-MEDPR36J.js} +2 -2
- package/{chunk-6D25V6CB.js → chunk-MFXJY44K.js} +4 -4
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-FXX6VFMV.js → chunk-ODGSLWLO.js} +63 -63
- package/{chunk-YFRJAE3R.js → chunk-OGZE6BZG.js} +12 -4
- package/{chunk-F3FQPVHE.js → chunk-OKPC4QNX.js} +2 -2
- package/{chunk-DWWUVRB5.js → chunk-ONFFUQYM.js} +1 -1
- package/{chunk-IPRPYKBP.js → chunk-P244EH4W.js} +2 -2
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-24GVXSWK.js → chunk-PK7VT4ZU.js} +2 -2
- package/{chunk-TFGGNRT6.js → chunk-QLUYDJST.js} +1 -1
- package/{chunk-NWWQY2J5.js → chunk-QUJKDFZW.js} +7 -7
- package/{chunk-IUXBKS5L.js → chunk-QXUVCIPB.js} +9 -9
- package/{chunk-DLTMAXLF.js → chunk-QYNABNNQ.js} +6 -6
- package/{chunk-EIFSCI4C.js → chunk-RGUWOMXU.js} +263 -100
- package/{chunk-EBKHA63G.js → chunk-RIMFTQMC.js} +178 -46
- package/{chunk-7Q7MKJZN.js → chunk-SBRJOYND.js} +224 -116
- package/{chunk-ZT3DYK5T.js → chunk-SBRSXY67.js} +4 -4
- package/{chunk-UKSKCDBG.js → chunk-T3WSFTBS.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
- package/{chunk-LYDEFPQP.js → chunk-UDT4SI37.js} +1 -1
- package/{chunk-T444ENEC.js → chunk-UQXOORR3.js} +5 -5
- package/{chunk-CT6GT2BG.js → chunk-UR7555FE.js} +13 -13
- package/{chunk-X37RQEA3.js → chunk-UWOCASVL.js} +5 -5
- package/{chunk-DIBQXNGW.js → chunk-V2V5Q6DU.js} +2 -2
- package/{chunk-LCQJH7KN.js → chunk-VCU5GV42.js} +1 -1
- package/{chunk-MDVP5TLI.js → chunk-VMWY7TUA.js} +1 -1
- package/{chunk-HNWZJI4N.js → chunk-VNALJT32.js} +1 -1
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-X7IA2B7R.js → chunk-WBSJAIZP.js} +7 -3
- package/{chunk-BWW6WRX6.js → chunk-WVOZ35E4.js} +6 -6
- package/{chunk-XAFOLWLU.js → chunk-XDNXKFWF.js} +4 -4
- package/{chunk-KOIDLCAQ.js → chunk-XLN2GD6Z.js} +4 -4
- package/{chunk-TXQVH72L.js → chunk-Y5EBOURK.js} +3 -3
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-CZLSTOVM.js → chunk-YTEY27GN.js} +2 -2
- package/{chunk-C646JEUV.js → chunk-ZCVBIIUE.js} +4 -4
- package/{chunk-UAHUJ4HH.js → chunk-ZCZLTJEW.js} +10 -37
- package/{cliAgentConfigHelpers-RFR7ZCSK.js → cliAgentConfigHelpers-6OFDHJFT.js} +4 -4
- package/{cliLocalAgentRecordReader-AJ4UKHKT.js → cliLocalAgentRecordReader-FHIMCBUK.js} +44 -38
- package/{commandRegistry-IHWZVV4G.js → commandRegistry-OKIWAJIS.js} +99 -91
- package/{contentThunks-YQRCBDKF.js → contentThunks-VF2DCU46.js} +29 -29
- package/{cooldownCommands-W67DE765.js → cooldownCommands-QL6DWGVU.js} +1 -1
- package/{createAgentAutomationAction-ERSDNR4R.js → createAgentAutomationAction-BGET7Q6K.js} +30 -30
- package/{createDialogAction-QXC7JZPE.js → createDialogAction-XYDQZETK.js} +30 -30
- package/{createPageAction-RLZ7776F.js → createPageAction-74S5RO7U.js} +34 -34
- package/{dbSlice-7M2ESEUO.js → dbSlice-FI7VNDR5.js} +13 -13
- package/{deleteFile-WO6WSSNK.js → deleteFile-GD62MPZW.js} +7 -7
- package/{dialogCommands-UIRO4QNN.js → dialogCommands-Y6DHZUAM.js} +45 -44
- package/{dialogNotifyCommand-VDUFYBZV.js → dialogNotifyCommand-MKXL4NGL.js} +7 -7
- package/{dialogSlice-A4U3C76D.js → dialogSlice-XAUKSWZ4.js} +28 -28
- package/{docCreateCommands-MHPYTJWR.js → docCreateCommands-PHDFOQBM.js} +43 -41
- package/{docDeleteCommands-VYULMBAQ.js → docDeleteCommands-OSHJM67Y.js} +44 -42
- package/{docReadCommands-FV3GGZ7V.js → docReadCommands-E6QYCFMS.js} +43 -41
- package/{docStore-AWWI72FA.js → docStore-ZZT2BEBU.js} +15 -15
- package/{docUpdateCommands-JNS3HX7F.js → docUpdateCommands-DHIOPK2C.js} +43 -41
- package/fetchMessages-TQEUZD7H.js +2 -2
- package/{getPricing-U5AR7ZHS.js → getPricing-RNRITFOP.js} +2 -2
- package/{handleSendMessageAction-WDJOUDNV.js → handleSendMessageAction-ARUU6CNF.js} +60 -60
- package/{hostCredentialCreate-H3FF2SAO.js → hostCredentialCreate-SNQT73H4.js} +88 -88
- package/index.js +8 -8
- package/keys-RWF7UCB4.js +1 -1
- package/{localRuntimeAdapter-JAQQXZJP.js → localRuntimeAdapter-MHI6Y2IZ.js} +96 -96
- package/{machineCommands-WYOFNB5I.js → machineCommands-3O6Y27R4.js} +216 -307
- package/{machineWsRunDispatch-Y7UIAZNM.js → machineWsRunDispatch-5PFLR5XC.js} +87 -87
- package/{mcpLocalAuthorizeCommand-SCYEFLRK.js → mcpLocalAuthorizeCommand-BQCQ2KRJ.js} +10 -10
- package/{memberThunks-DIITWU4M.js → memberThunks-TU6A6OBV.js} +17 -17
- package/package.json +1 -1
- package/{projectArchive-IZJXBW5N.js → projectArchive-X2EVXU3N.js} +34 -34
- package/{providerPresetApply-2QWXPJXZ.js → providerPresetApply-HUWNV2NI.js} +3 -3
- package/{providerRegistry-W4LCKK6V.js → providerRegistry-7FWKDKZJ.js} +3 -3
- package/{read-OBLJNMA2.js → read-QAHEQID5.js} +7 -7
- package/{readDocTool-QQZ4DAER.js → readDocTool-KG5DP6EM.js} +1 -1
- package/{readlineWorkspace-WF3SWZGR.js → readlineWorkspace-SO3APHVP.js} +482 -374
- package/{removeDialogAgentAction-HC3SOY3G.js → removeDialogAgentAction-QZCCVK2G.js} +19 -19
- package/{runAgentClientLoop-Z7V6TA3O.js → runAgentClientLoop-FLHHCOVH.js} +67 -67
- package/{secretCommands-STRAX275.js → secretCommands-36BCE3UE.js} +2 -2
- package/{setDialogExtraReferencesAction-DDZUQPY6.js → setDialogExtraReferencesAction-PDPTYSEW.js} +15 -15
- package/{setPrimaryDialogAgentAction-EB67OMAJ.js → setPrimaryDialogAgentAction-DOUIPR66.js} +19 -19
- package/{settingThunks-TN6GFASU.js → settingThunks-MHGGP6UE.js} +23 -23
- package/{spaceCommands-HBYQUVJI.js → spaceCommands-JH7UYE3K.js} +46 -44
- package/{streamAgentChatTurn-CM7QQXOS.js → streamAgentChatTurn-VDDA2TX6.js} +89 -89
- package/{switchDialogAgentAction-XY5TKQQE.js → switchDialogAgentAction-7USK3DAP.js} +17 -17
- package/{tableCommands-MXFL3JIT.js → tableCommands-UONBFC7L.js} +5 -5
- package/{tools-AT6H73LD.js → tools-MIOCXKMG.js} +52 -52
- package/{tuiRestart-272SAYSK.js → tuiRestart-ET3QISZ5.js} +6 -6
- package/{tuiSummaryLlmCaller-K2OVRVHG.js → tuiSummaryLlmCaller-MSINBP3M.js} +10 -10
- package/{updateCommands-O3BOVVVN.js → updateCommands-5OYND6EF.js} +3 -3
- package/{updateDialogTitleAction-PGY4UPLH.js → updateDialogTitleAction-2L4CC4YO.js} +30 -30
- package/{usageCommand-SCF3ROV2.js → usageCommand-JTKDAG6I.js} +2 -2
- package/{usageRebuildCommand-K5WPIBA5.js → usageRebuildCommand-4TFZCKXM.js} +3 -3
- package/{windowsSelfUpdate-WJDUZLEO.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
- package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-ZCSQCHG3.js} +2 -2
- package/chunk-TUSTONB3.js +0 -81
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- package/{chunk-6X3CS6NJ.js → chunk-RH44TIHX.js} +6 -6
- package/{chunk-VMJVAJ6W.js → chunk-TB5KTLNB.js} +3 -3
- package/{chunk-LN4ZVSO7.js → chunk-Y22P6ASC.js} +5 -5
- package/{chunk-DGUUOHBF.js → chunk-Y3DOUQQQ.js} +3 -3
- package/{dialogUsageCommand-SEC6UZWM.js → dialogUsageCommand-BZPKR3DW.js} +3 -3
- package/{runtimeDoctorCommands-KX6YLPWV.js → runtimeDoctorCommands-DN3I52C6.js} +2 -2
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
DEVIN_CONNECT_URL,
|
|
4
4
|
parseSseDataLineJson,
|
|
5
5
|
parseSseDataLineObject
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3OQFXODL.js";
|
|
7
7
|
import {
|
|
8
|
+
ALWAYS_EXCLUDED_GLOBS,
|
|
8
9
|
EXECUTION_BACKEND_KINDS
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ANUP75N2.js";
|
|
10
11
|
import {
|
|
11
12
|
formatImageSummary,
|
|
12
13
|
readLocalImage
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
flushChatCompletionStream,
|
|
20
21
|
providerHttpFailure,
|
|
21
22
|
throwIfChatCompletionStreamFailed
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-M5EA44QU.js";
|
|
23
24
|
import {
|
|
24
25
|
readSseFrames
|
|
25
26
|
} from "./chunk-HNUWUO75.js";
|
|
@@ -31,7 +32,7 @@ import {
|
|
|
31
32
|
evaluateRequestBudget,
|
|
32
33
|
hasImageInRuntimeMessages,
|
|
33
34
|
stripImagePartsFromMessages
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-SBRSXY67.js";
|
|
35
36
|
import {
|
|
36
37
|
applyShapingCounts,
|
|
37
38
|
attachProjectionFacts,
|
|
@@ -42,7 +43,7 @@ import {
|
|
|
42
43
|
projectUserPartForModel,
|
|
43
44
|
resolveOutboundDiagnosticSink,
|
|
44
45
|
writeThinkingFacts
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-ONFFUQYM.js";
|
|
46
47
|
import {
|
|
47
48
|
createThinkParserState,
|
|
48
49
|
createToolCallAccumulator,
|
|
@@ -61,7 +62,7 @@ import {
|
|
|
61
62
|
hashStablePrefixContent,
|
|
62
63
|
resolveResponseGuidelines,
|
|
63
64
|
resolveToolGuidedSections
|
|
64
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-ER3P6MBT.js";
|
|
65
66
|
import {
|
|
66
67
|
BRIDGE_STREAM_MAX_CHARS,
|
|
67
68
|
CLI_NOLO_WORKSPACE_TOOL_NAMES,
|
|
@@ -76,10 +77,7 @@ import {
|
|
|
76
77
|
parseNoloWorkspaceToolArguments,
|
|
77
78
|
readTextStreamUpToChars,
|
|
78
79
|
resolveNoloDialogInput
|
|
79
|
-
} from "./chunk-
|
|
80
|
-
import {
|
|
81
|
-
applyToolSurfaceConstraints
|
|
82
|
-
} from "./chunk-VS276URX.js";
|
|
80
|
+
} from "./chunk-QXUVCIPB.js";
|
|
83
81
|
import {
|
|
84
82
|
classifyUnparsableToolArgs,
|
|
85
83
|
collectStablePromptPrefix,
|
|
@@ -103,7 +101,7 @@ import {
|
|
|
103
101
|
toOpenAiCompatibleMessages,
|
|
104
102
|
toResponsesTools,
|
|
105
103
|
transferDowngradedToolTurnOrigin
|
|
106
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-F4MCAOWN.js";
|
|
107
105
|
import {
|
|
108
106
|
TOOL_HAD_IMAGES,
|
|
109
107
|
TOOL_IMAGES,
|
|
@@ -119,11 +117,11 @@ import {
|
|
|
119
117
|
} from "./chunk-X4O7FJF5.js";
|
|
120
118
|
import {
|
|
121
119
|
resolveToolExecutionContract
|
|
122
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-DMPZMYH4.js";
|
|
123
121
|
import {
|
|
124
122
|
resolveAgentImageInputSupport,
|
|
125
123
|
resolveToolImagePolicy
|
|
126
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-P244EH4W.js";
|
|
127
125
|
import {
|
|
128
126
|
isContextOverflowText,
|
|
129
127
|
isQuotaExhaustedError
|
|
@@ -144,7 +142,7 @@ import {
|
|
|
144
142
|
} from "./chunk-WFGNWWJI.js";
|
|
145
143
|
import {
|
|
146
144
|
isAgentSkillDisabled
|
|
147
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-DOK7GDRU.js";
|
|
148
146
|
import {
|
|
149
147
|
buildDialogFallbackTitleFromUserInput
|
|
150
148
|
} from "./chunk-2MBTWINN.js";
|
|
@@ -156,7 +154,7 @@ import {
|
|
|
156
154
|
resolveEmptyAssistantFallbackMessage,
|
|
157
155
|
resolveEmptyAssistantOutcome,
|
|
158
156
|
resolveTruncatedReasoningTailLog
|
|
159
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-4F7SWSWO.js";
|
|
160
158
|
import {
|
|
161
159
|
COMPACTION_SUMMARY_SCHEMA_VERSION,
|
|
162
160
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
@@ -181,7 +179,7 @@ import {
|
|
|
181
179
|
runSummaryWithContract,
|
|
182
180
|
summaryCompletionTokens,
|
|
183
181
|
truncateToolOutputForContext
|
|
184
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-RH44TIHX.js";
|
|
185
183
|
import {
|
|
186
184
|
createProviderCallTimingTracker,
|
|
187
185
|
finalizeProviderCallTiming,
|
|
@@ -198,12 +196,6 @@ import {
|
|
|
198
196
|
import {
|
|
199
197
|
asRecordOrEmpty
|
|
200
198
|
} from "./chunk-KX6YBIHG.js";
|
|
201
|
-
import {
|
|
202
|
-
isLevelNotFoundError
|
|
203
|
-
} from "./chunk-OW765XBU.js";
|
|
204
|
-
import {
|
|
205
|
-
isAbortError
|
|
206
|
-
} from "./chunk-7DPNBQSV.js";
|
|
207
199
|
import {
|
|
208
200
|
TOOL_OUTPUT_SPILL_BYTES,
|
|
209
201
|
TOOL_OUTPUT_SPILL_LINES,
|
|
@@ -231,24 +223,49 @@ import {
|
|
|
231
223
|
spillToolOutput,
|
|
232
224
|
toProcessTaskView,
|
|
233
225
|
truncateToolOutput
|
|
234
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-TB5KTLNB.js";
|
|
235
227
|
import {
|
|
236
228
|
estimateTokenCount
|
|
237
229
|
} from "./chunk-PSCNXBYA.js";
|
|
230
|
+
import {
|
|
231
|
+
isLevelNotFoundError
|
|
232
|
+
} from "./chunk-OW765XBU.js";
|
|
233
|
+
import {
|
|
234
|
+
isAbortError
|
|
235
|
+
} from "./chunk-7DPNBQSV.js";
|
|
236
|
+
import {
|
|
237
|
+
buildAgentsMdLayer,
|
|
238
|
+
buildAgentsMdLayerHeader,
|
|
239
|
+
buildDialogSummaryLayer,
|
|
240
|
+
hasMemoryTools
|
|
241
|
+
} from "./chunk-5HUO7SEX.js";
|
|
242
|
+
import {
|
|
243
|
+
MEMORY_USE_GUIDANCE,
|
|
244
|
+
buildUserResponseLanguageContext
|
|
245
|
+
} from "./chunk-YGDYYFRX.js";
|
|
238
246
|
import {
|
|
239
247
|
resolveNoloStateDir
|
|
240
248
|
} from "./chunk-6UBGXX2W.js";
|
|
249
|
+
import {
|
|
250
|
+
isTombstoneRecord
|
|
251
|
+
} from "./chunk-BV3FLP2L.js";
|
|
241
252
|
import {
|
|
242
253
|
dialogMessageRecordToAgentRuntimeMessage
|
|
243
254
|
} from "./chunk-4ZCTKB27.js";
|
|
244
|
-
import {
|
|
245
|
-
canonicalizeToolName,
|
|
246
|
-
canonicalizeToolNames
|
|
247
|
-
} from "./chunk-6OVNSQHN.js";
|
|
248
255
|
import {
|
|
249
256
|
dialogMessageKey,
|
|
250
257
|
dialogMessageRange
|
|
251
258
|
} from "./chunk-OJKUU3LP.js";
|
|
259
|
+
import {
|
|
260
|
+
resolveLocalUserId
|
|
261
|
+
} from "./chunk-LZOOUQAZ.js";
|
|
262
|
+
import {
|
|
263
|
+
applyToolSurfaceConstraints
|
|
264
|
+
} from "./chunk-NEG5LYK5.js";
|
|
265
|
+
import {
|
|
266
|
+
canonicalizeToolName,
|
|
267
|
+
canonicalizeToolNames
|
|
268
|
+
} from "./chunk-YLAHYLDQ.js";
|
|
252
269
|
import {
|
|
253
270
|
asTrimmedNonEmptyStringArray
|
|
254
271
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -256,22 +273,12 @@ import {
|
|
|
256
273
|
asOptionalPositiveFiniteNumber
|
|
257
274
|
} from "./chunk-U6VC4MU4.js";
|
|
258
275
|
import {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
buildDialogSummaryLayer,
|
|
262
|
-
hasMemoryTools
|
|
263
|
-
} from "./chunk-5HUO7SEX.js";
|
|
264
|
-
import {
|
|
265
|
-
MEMORY_USE_GUIDANCE,
|
|
266
|
-
buildUserResponseLanguageContext
|
|
267
|
-
} from "./chunk-YGDYYFRX.js";
|
|
276
|
+
toErrorMessage
|
|
277
|
+
} from "./chunk-HNMXYYJR.js";
|
|
268
278
|
import {
|
|
269
279
|
buildProviderAuthHeaders,
|
|
270
280
|
buildProviderExecutionPlan
|
|
271
281
|
} from "./chunk-LMFMV5UC.js";
|
|
272
|
-
import {
|
|
273
|
-
toErrorMessage
|
|
274
|
-
} from "./chunk-HNMXYYJR.js";
|
|
275
282
|
import {
|
|
276
283
|
asTrimmedString
|
|
277
284
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -13893,7 +13900,7 @@ function buildToolResultsSignature(toolExecutions) {
|
|
|
13893
13900
|
function resolveProgressGuardConfig(options, env = typeof process !== "undefined" ? process.env : {}) {
|
|
13894
13901
|
const envDisabled = env.NOLO_LOOP_PROGRESS_GUARD_DISABLED === "true" || env.NOLO_LOOP_PROGRESS_GUARD_DISABLED === "1";
|
|
13895
13902
|
const disabled = options?.disabled ?? envDisabled ?? false;
|
|
13896
|
-
const parsePositiveInt = (val,
|
|
13903
|
+
const parsePositiveInt = (val, fallback2) => {
|
|
13897
13904
|
if (typeof val === "number" && Number.isFinite(val) && val >= 1) {
|
|
13898
13905
|
return Math.floor(val);
|
|
13899
13906
|
}
|
|
@@ -13903,7 +13910,7 @@ function resolveProgressGuardConfig(options, env = typeof process !== "undefined
|
|
|
13903
13910
|
return parsed;
|
|
13904
13911
|
}
|
|
13905
13912
|
}
|
|
13906
|
-
return
|
|
13913
|
+
return fallback2;
|
|
13907
13914
|
};
|
|
13908
13915
|
const maxConsecutiveIdenticalRounds = parsePositiveInt(
|
|
13909
13916
|
options?.maxConsecutiveIdenticalRounds ?? env.NOLO_LOOP_MAX_IDENTICAL_ROUNDS,
|
|
@@ -14661,9 +14668,9 @@ function normalizeExecShellInput(input) {
|
|
|
14661
14668
|
const record2 = input;
|
|
14662
14669
|
let rawCommand = resolveShellCommandArg(record2);
|
|
14663
14670
|
if (typeof rawCommand !== "string" || !rawCommand.trim()) {
|
|
14664
|
-
const
|
|
14665
|
-
if (typeof
|
|
14666
|
-
rawCommand =
|
|
14671
|
+
const fallback2 = record2.command ?? record2.cmd;
|
|
14672
|
+
if (typeof fallback2 === "string" && fallback2.trim()) {
|
|
14673
|
+
rawCommand = fallback2;
|
|
14667
14674
|
}
|
|
14668
14675
|
}
|
|
14669
14676
|
const command = typeof rawCommand === "string" ? rawCommand.trim() : "";
|
|
@@ -15553,6 +15560,8 @@ async function hasRootGitignore(workspaceRoot) {
|
|
|
15553
15560
|
var normalizePath = (value) => value.replaceAll("\\", "/");
|
|
15554
15561
|
var pathFor = (root, file, absolute = false) => absolute ? normalizePath(file) : normalizePath(relative2(root, file) || basename2(file));
|
|
15555
15562
|
var COMMAND_LIMIT_HEADROOM = 1;
|
|
15563
|
+
var MAX_SEARCH_FILE_BYTES = 8 * 1024 * 1024;
|
|
15564
|
+
var MAX_SEARCH_LINE_CHARS = 2e3;
|
|
15556
15565
|
async function runCommand(binary, args2, cwd, maxResults) {
|
|
15557
15566
|
const recordLimit = maxResults === void 0 ? 0 : Math.max(0, maxResults) + COMMAND_LIMIT_HEADROOM;
|
|
15558
15567
|
return await new Promise((done4) => {
|
|
@@ -15560,7 +15569,12 @@ async function runCommand(binary, args2, cwd, maxResults) {
|
|
|
15560
15569
|
try {
|
|
15561
15570
|
const child = spawnChildProcess(binary, args2, { cwd, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });
|
|
15562
15571
|
child.stdout.on("data", (chunk) => {
|
|
15563
|
-
|
|
15572
|
+
const room = MAX_SEARCH_FILE_BYTES - stdout.length;
|
|
15573
|
+
stdout += chunk.toString().slice(0, Math.max(0, room));
|
|
15574
|
+
if (stdout.length >= MAX_SEARCH_FILE_BYTES && !stopped) {
|
|
15575
|
+
stopped = true;
|
|
15576
|
+
child.kill();
|
|
15577
|
+
}
|
|
15564
15578
|
recordCount = parseMatches(cwd, stdout).length;
|
|
15565
15579
|
if (recordLimit > 0 && recordCount >= recordLimit && !stopped) {
|
|
15566
15580
|
stopped = true;
|
|
@@ -15590,14 +15604,14 @@ function isGrepExpressibleExclude(pattern) {
|
|
|
15590
15604
|
}
|
|
15591
15605
|
function commandArgs(o, binary, target) {
|
|
15592
15606
|
const args2 = binary === "rg" ? ["--line-number", "--no-heading", "--color", "never", "--null"] : ["-RIn", "--binary-files=without-match", "--null"];
|
|
15593
|
-
if (binary === "rg") args2.push("--no-require-git");
|
|
15607
|
+
if (binary === "rg") args2.push("--no-require-git", "--max-columns", String(MAX_SEARCH_LINE_CHARS), "--max-columns-preview");
|
|
15594
15608
|
if (o.regex !== true) args2.push(binary === "rg" ? "--fixed-strings" : "-F");
|
|
15595
15609
|
else if (binary === "grep") args2.push("-E");
|
|
15596
15610
|
if (o.caseSensitive === false) args2.push("-i");
|
|
15597
15611
|
if (binary === "rg") {
|
|
15598
15612
|
if (o.includeIgnored) args2.push("--no-ignore");
|
|
15599
15613
|
for (const x of o.exclude ?? []) args2.push("--glob", `!${x}`);
|
|
15600
|
-
if (o.include) args2.push("--
|
|
15614
|
+
if (o.include) args2.push("--type-add", `noloSearch:${o.include}`, "--type", "noloSearch");
|
|
15601
15615
|
} else {
|
|
15602
15616
|
for (const x of o.exclude ?? []) {
|
|
15603
15617
|
const clean = extractGrepExcludeDir(x);
|
|
@@ -15617,24 +15631,32 @@ function parseMatches(root, output) {
|
|
|
15617
15631
|
return records;
|
|
15618
15632
|
}
|
|
15619
15633
|
async function decorate(root, raw, context3, absolute = false) {
|
|
15620
|
-
const
|
|
15634
|
+
const out = [];
|
|
15621
15635
|
for (const x of raw) {
|
|
15622
|
-
let lines =
|
|
15623
|
-
if (
|
|
15636
|
+
let lines = [];
|
|
15637
|
+
if (context3 > 0) {
|
|
15624
15638
|
try {
|
|
15625
|
-
|
|
15639
|
+
if ((await stat3(x.file)).size <= MAX_SEARCH_FILE_BYTES) {
|
|
15640
|
+
lines = (await readFile3(x.file, "utf8")).split(/\r\n|\r|\n/);
|
|
15641
|
+
}
|
|
15626
15642
|
} catch {
|
|
15627
|
-
continue;
|
|
15628
15643
|
}
|
|
15629
|
-
cache.set(x.file, lines);
|
|
15630
15644
|
}
|
|
15631
15645
|
const i = x.line - 1;
|
|
15632
|
-
out.push({
|
|
15646
|
+
out.push({
|
|
15647
|
+
path: pathFor(root, x.file, absolute),
|
|
15648
|
+
line: x.line,
|
|
15649
|
+
text: (lines[i] ?? x.text).slice(0, MAX_SEARCH_LINE_CHARS),
|
|
15650
|
+
before: lines.slice(Math.max(0, i - context3), i).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)),
|
|
15651
|
+
after: lines.slice(i + 1, i + context3 + 1).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS))
|
|
15652
|
+
});
|
|
15633
15653
|
}
|
|
15634
15654
|
return out;
|
|
15635
15655
|
}
|
|
15636
15656
|
function globMatch(pattern, value) {
|
|
15637
15657
|
const p = normalizePath(pattern).replace(/^!/, "");
|
|
15658
|
+
const brace = /\{([^{}]+)\}/.exec(p);
|
|
15659
|
+
if (brace) return brace[1].split(",").some((part) => globMatch(p.slice(0, brace.index) + part + p.slice(brace.index + brace[0].length), value));
|
|
15638
15660
|
let source = "";
|
|
15639
15661
|
for (let i = 0; i < p.length; i++) {
|
|
15640
15662
|
const c = p[i];
|
|
@@ -15684,6 +15706,8 @@ async function jsSearch(o, targetPath) {
|
|
|
15684
15706
|
const needle = o.caseSensitive === false ? o.query.toLowerCase() : o.query;
|
|
15685
15707
|
const out = [], context3 = o.contextLines ?? 0;
|
|
15686
15708
|
for (const file of files) {
|
|
15709
|
+
const info = await stat3(file).catch(() => null);
|
|
15710
|
+
if (!info || info.size > MAX_SEARCH_FILE_BYTES) continue;
|
|
15687
15711
|
const text2 = await readText(file);
|
|
15688
15712
|
if (!text2 || text2.includes("\0")) continue;
|
|
15689
15713
|
const lines = text2.split(/\r\n|\r|\n/);
|
|
@@ -15692,7 +15716,7 @@ async function jsSearch(o, targetPath) {
|
|
|
15692
15716
|
const hit = matcher ? matcher.test(line) : o.caseSensitive === false ? line.toLowerCase().includes(needle) : line.includes(needle);
|
|
15693
15717
|
if (!hit) continue;
|
|
15694
15718
|
if (out.length >= max4) return { matches: out, totalMatches: max4, truncated: true, engine: "js" };
|
|
15695
|
-
out.push({ path: pathFor(o.root, file, o.absolutePaths === true), line: i + 1, text: line, before: lines.slice(Math.max(0, i - context3), i), after: lines.slice(i + 1, i + context3 + 1) });
|
|
15719
|
+
out.push({ path: pathFor(o.root, file, o.absolutePaths === true), line: i + 1, text: line.slice(0, MAX_SEARCH_LINE_CHARS), before: lines.slice(Math.max(0, i - context3), i).map((line2) => line2.slice(0, MAX_SEARCH_LINE_CHARS)), after: lines.slice(i + 1, i + context3 + 1).map((line2) => line2.slice(0, MAX_SEARCH_LINE_CHARS)) });
|
|
15696
15720
|
}
|
|
15697
15721
|
}
|
|
15698
15722
|
return { matches: out, totalMatches: out.length, truncated: false, engine: "js" };
|
|
@@ -15725,6 +15749,7 @@ async function searchFileTextMatches(o) {
|
|
|
15725
15749
|
if (targetStat.isFile()) return jsSearch(o, targetPath);
|
|
15726
15750
|
const run2 = o.runCommand ?? runCommand, max4 = o.maxResults;
|
|
15727
15751
|
for (const entry of COMMAND_ENGINES) {
|
|
15752
|
+
if (entry.engine === "ripgrep" && o.include && /[/\\]/.test(o.include)) continue;
|
|
15728
15753
|
if (entry.engine === "grep" && !await canGrepFulfillOptions(o)) continue;
|
|
15729
15754
|
const injectedResolver = o[entry.binaryOption];
|
|
15730
15755
|
const binary = injectedResolver ? injectedResolver() : resolveExecutableOnPath(entry.binaryName);
|
|
@@ -15772,6 +15797,7 @@ var TASK_WAIT_DEFAULT_TIMEOUT_MS = 5 * 6e4;
|
|
|
15772
15797
|
var TASK_WAIT_MAX_TIMEOUT_MS = 5 * 6e4;
|
|
15773
15798
|
var TASK_WAIT_POLL_INTERVAL_MS = 250;
|
|
15774
15799
|
var TASK_STOP_GRACE_MS = 2e3;
|
|
15800
|
+
var TASK_STOP_POLL_INTERVAL_MS = 40;
|
|
15775
15801
|
function resolveCleanupReport(evidence, previousStatus) {
|
|
15776
15802
|
const diagnostic = evidence.diagnostic ? { diagnostic: evidence.diagnostic } : {};
|
|
15777
15803
|
if (evidence.confirmedStopped) {
|
|
@@ -15993,8 +16019,17 @@ async function runTaskStop(args2) {
|
|
|
15993
16019
|
)
|
|
15994
16020
|
};
|
|
15995
16021
|
}
|
|
15996
|
-
|
|
15997
|
-
if (
|
|
16022
|
+
let alive = isProcessGroupAlive(record2.pgid, kill);
|
|
16023
|
+
if (alive && graceMs > 0) {
|
|
16024
|
+
let remaining = graceMs;
|
|
16025
|
+
while (remaining > 0 && alive) {
|
|
16026
|
+
const step = Math.min(TASK_STOP_POLL_INTERVAL_MS, remaining);
|
|
16027
|
+
await sleep3(step);
|
|
16028
|
+
remaining -= step;
|
|
16029
|
+
alive = isProcessGroupAlive(record2.pgid, kill);
|
|
16030
|
+
}
|
|
16031
|
+
}
|
|
16032
|
+
if (!alive) {
|
|
15998
16033
|
return {
|
|
15999
16034
|
outcome: "stopped",
|
|
16000
16035
|
taskId,
|
|
@@ -16039,6 +16074,7 @@ var WORKSPACE_TOOL_NAMES = [
|
|
|
16039
16074
|
"writeFile",
|
|
16040
16075
|
"editFile",
|
|
16041
16076
|
"globFiles",
|
|
16077
|
+
"searchFiles",
|
|
16042
16078
|
"captureVisualState",
|
|
16043
16079
|
"execShell",
|
|
16044
16080
|
"launchProcess",
|
|
@@ -16388,6 +16424,31 @@ function buildWorkspaceToolDefinition(toolName) {
|
|
|
16388
16424
|
if (toolName === "editFile") {
|
|
16389
16425
|
return buildReplaceWorkspaceTextTool();
|
|
16390
16426
|
}
|
|
16427
|
+
if (toolName === "searchFiles") {
|
|
16428
|
+
return {
|
|
16429
|
+
type: "function",
|
|
16430
|
+
function: {
|
|
16431
|
+
name: "searchFiles",
|
|
16432
|
+
description: "Search UTF-8 text files in the workspace by literal string or regex (works across code, docs, notes, and data files on Windows/macOS/Linux; respects .gitignore by default and stops early at maxResults). Prefer searchFiles over shell grep/rg/Select-String.",
|
|
16433
|
+
parameters: {
|
|
16434
|
+
type: "object",
|
|
16435
|
+
properties: {
|
|
16436
|
+
query: { type: "string", minLength: 1, description: "Search text. Also accepts pattern when query is omitted (grep/rg alias compatibility)." },
|
|
16437
|
+
path: buildWorkspacePathProperty(),
|
|
16438
|
+
regex: { type: "boolean", description: "Default false: search for a literal string. Set true for regex." },
|
|
16439
|
+
caseSensitive: { type: "boolean", description: "Default true." },
|
|
16440
|
+
include: { type: "string", description: "File glob filter, e.g. *.{ts,md}." },
|
|
16441
|
+
exclude: { type: "array", items: { type: "string" } },
|
|
16442
|
+
contextLines: { type: "integer", minimum: 0, maximum: 5 },
|
|
16443
|
+
maxResults: { type: "integer", minimum: 1, maximum: 1e3, description: "Default 100; stop early after this many matches." },
|
|
16444
|
+
includeIgnored: { type: "boolean", description: "Default false: respect .gitignore." }
|
|
16445
|
+
},
|
|
16446
|
+
required: ["query"],
|
|
16447
|
+
additionalProperties: false
|
|
16448
|
+
}
|
|
16449
|
+
}
|
|
16450
|
+
};
|
|
16451
|
+
}
|
|
16391
16452
|
if (toolName === "globFiles") {
|
|
16392
16453
|
return buildGlobWorkspaceFilesTool();
|
|
16393
16454
|
}
|
|
@@ -16716,25 +16777,6 @@ async function readRootGitignorePatterns2(workspaceRoot) {
|
|
|
16716
16777
|
return readRootGitignorePatterns(workspaceRoot);
|
|
16717
16778
|
}
|
|
16718
16779
|
var DEFAULT_LOCAL_API_ORIGIN = "http://127.0.0.1:38123";
|
|
16719
|
-
var ALWAYS_EXCLUDED_GLOBS = [
|
|
16720
|
-
".git/**",
|
|
16721
|
-
".nolo/**",
|
|
16722
|
-
"node_modules/**",
|
|
16723
|
-
"*.tsbuildinfo",
|
|
16724
|
-
"dist/**",
|
|
16725
|
-
"build/**",
|
|
16726
|
-
"out/**",
|
|
16727
|
-
"coverage/**",
|
|
16728
|
-
".next/**",
|
|
16729
|
-
".turbo/**",
|
|
16730
|
-
"public/assets/**",
|
|
16731
|
-
"*.min.js",
|
|
16732
|
-
"*.min.css",
|
|
16733
|
-
"*.map",
|
|
16734
|
-
"*.lock",
|
|
16735
|
-
"bun.lockb",
|
|
16736
|
-
"*.ldb"
|
|
16737
|
-
];
|
|
16738
16780
|
function readTrimmedString(value) {
|
|
16739
16781
|
return asOptionalTrimmedString(value);
|
|
16740
16782
|
}
|
|
@@ -17611,22 +17653,24 @@ async function internalSearchWorkspace(args2) {
|
|
|
17611
17653
|
root: inside ? workspaceRoot : searchPath,
|
|
17612
17654
|
target: inside ? normalizeWorkspaceRelativePath({ workspaceRoot, targetPath: searchPath }) : ".",
|
|
17613
17655
|
query: args2.query,
|
|
17614
|
-
regex: true,
|
|
17656
|
+
regex: args2.regex ?? true,
|
|
17615
17657
|
caseSensitive: args2.caseSensitive !== false,
|
|
17616
17658
|
contextLines: args2.contextLines,
|
|
17617
17659
|
maxResults: args2.maxResults ?? 200,
|
|
17618
|
-
includeIgnored: args2.workspaceRoot.includes(".worktrees") || !inside,
|
|
17660
|
+
includeIgnored: args2.includeIgnored ?? (args2.workspaceRoot.includes(".worktrees") || !inside),
|
|
17619
17661
|
absolutePaths: !inside,
|
|
17620
|
-
exclude: inside ?
|
|
17662
|
+
exclude: [...inside ? ALWAYS_EXCLUDED_GLOBS : [], ...args2.exclude ?? []],
|
|
17663
|
+
include: args2.include,
|
|
17664
|
+
resolveRipgrepBinary: args2.resolveRipgrepBinary,
|
|
17665
|
+
resolveGrepBinary: args2.resolveGrepBinary
|
|
17621
17666
|
});
|
|
17622
17667
|
const outputLines = result4.matches.flatMap((match7) => [
|
|
17623
17668
|
...match7.before.map((line, index) => `${match7.path}:${Math.max(1, match7.line - match7.before.length + index)}-${line}`),
|
|
17624
17669
|
`${match7.path}:${match7.line}:${match7.text}`,
|
|
17625
17670
|
...match7.after.map((line, index) => `${match7.path}:${match7.line + index + 1}-${line}`)
|
|
17626
17671
|
]);
|
|
17627
|
-
const rawContent = outputLines.join("\n");
|
|
17672
|
+
const rawContent = scrubSecrets(outputLines.join("\n")).cleaned;
|
|
17628
17673
|
const content = truncateToolOutput(rawContent, SEARCH_OUTPUT_CHAR_LIMIT);
|
|
17629
|
-
const matchLines = result4.matches.map((match7) => `${match7.path}:${match7.line}:${match7.text}`);
|
|
17630
17674
|
return {
|
|
17631
17675
|
content,
|
|
17632
17676
|
metadata: {
|
|
@@ -17635,6 +17679,7 @@ async function internalSearchWorkspace(args2) {
|
|
|
17635
17679
|
searchedPath: inside ? normalizeWorkspaceRelativePath({ workspaceRoot, targetPath: searchPath }) : ".",
|
|
17636
17680
|
count: outputLines.length,
|
|
17637
17681
|
matchCount: result4.totalMatches,
|
|
17682
|
+
totalMatches: result4.totalMatches,
|
|
17638
17683
|
matchedFiles: Array.from(new Set(result4.matches.map((match7) => match7.path))),
|
|
17639
17684
|
truncated: result4.truncated || content.length !== rawContent.length,
|
|
17640
17685
|
limitedByMaxResults: result4.truncated,
|
|
@@ -18251,6 +18296,36 @@ function createLocalWorkspaceToolExecutors(args2) {
|
|
|
18251
18296
|
workspaceRoot: args2.workspaceRoot,
|
|
18252
18297
|
...fileAccess
|
|
18253
18298
|
}),
|
|
18299
|
+
searchFiles: async (call) => {
|
|
18300
|
+
const parsed = parseWorkspaceToolArguments(call.arguments);
|
|
18301
|
+
const query = parsed.query === void 0 ? parsed.pattern : parsed.query;
|
|
18302
|
+
if (typeof query !== "string" || !query.length) throw new Error("searchFiles requires a non-empty query.");
|
|
18303
|
+
for (const key of ["regex", "caseSensitive", "includeIgnored"]) {
|
|
18304
|
+
if (parsed[key] !== void 0 && typeof parsed[key] !== "boolean") throw new Error(`${key} must be a boolean.`);
|
|
18305
|
+
}
|
|
18306
|
+
for (const key of ["path", "include"]) {
|
|
18307
|
+
if (parsed[key] !== void 0 && typeof parsed[key] !== "string") throw new Error(`${key} must be a string.`);
|
|
18308
|
+
}
|
|
18309
|
+
if (parsed.exclude !== void 0 && (!Array.isArray(parsed.exclude) || !parsed.exclude.every((item) => typeof item === "string"))) throw new Error("exclude must be an array of strings.");
|
|
18310
|
+
for (const [key, min4, max4] of [["contextLines", 0, 5], ["maxResults", 1, 1e3]]) {
|
|
18311
|
+
if (parsed[key] !== void 0 && (!Number.isInteger(parsed[key]) || Number(parsed[key]) < min4 || Number(parsed[key]) > max4)) throw new Error(`${key} must be an integer from ${min4} to ${max4}.`);
|
|
18312
|
+
}
|
|
18313
|
+
return internalSearchWorkspace({
|
|
18314
|
+
workspaceRoot: args2.workspaceRoot,
|
|
18315
|
+
query,
|
|
18316
|
+
path: parsed.path,
|
|
18317
|
+
regex: parsed.regex === true,
|
|
18318
|
+
caseSensitive: parsed.caseSensitive !== false,
|
|
18319
|
+
include: parsed.include,
|
|
18320
|
+
exclude: parsed.exclude ?? [],
|
|
18321
|
+
contextLines: parsed.contextLines,
|
|
18322
|
+
maxResults: parsed.maxResults ?? 100,
|
|
18323
|
+
includeIgnored: parsed.includeIgnored === true,
|
|
18324
|
+
confirmExternalFileAccess: args2.confirmExternalFileAccess,
|
|
18325
|
+
resolveRipgrepBinary: args2.resolveRipgrepBinary,
|
|
18326
|
+
resolveGrepBinary: args2.resolveGrepBinary
|
|
18327
|
+
});
|
|
18328
|
+
},
|
|
18254
18329
|
globFiles: (call) => globFilesTool({
|
|
18255
18330
|
call,
|
|
18256
18331
|
workspaceRoot: args2.workspaceRoot,
|
|
@@ -18471,6 +18546,9 @@ function validateToolArguments(args2) {
|
|
|
18471
18546
|
}
|
|
18472
18547
|
record2 = parsed;
|
|
18473
18548
|
}
|
|
18549
|
+
if (toolName === "searchFiles" && record2.query === void 0 && typeof record2.pattern === "string" && record2.pattern.length) {
|
|
18550
|
+
record2 = { ...record2, query: record2.pattern };
|
|
18551
|
+
}
|
|
18474
18552
|
for (const field of requiredFields) {
|
|
18475
18553
|
if (record2[field] !== void 0) continue;
|
|
18476
18554
|
if (isAliasSatisfied(record2, field)) continue;
|
|
@@ -18555,6 +18633,7 @@ var DEFAULT_LOCAL_TOOLS = /* @__PURE__ */ new Set([
|
|
|
18555
18633
|
"writeFile",
|
|
18556
18634
|
"editFile",
|
|
18557
18635
|
"globFiles",
|
|
18636
|
+
"searchFiles",
|
|
18558
18637
|
"execShell",
|
|
18559
18638
|
"launchProcess",
|
|
18560
18639
|
"listProcesses",
|
|
@@ -19991,20 +20070,20 @@ async function maybeAutoCompactLocalHistory(args2) {
|
|
|
19991
20070
|
});
|
|
19992
20071
|
}
|
|
19993
20072
|
};
|
|
19994
|
-
const
|
|
20073
|
+
const fallback2 = args2.summaryFallback?.preferPlatform ? args2.summaryFallback : void 0;
|
|
19995
20074
|
let eligibility;
|
|
19996
|
-
const routedFallback =
|
|
20075
|
+
const routedFallback = fallback2 ? Object.assign(
|
|
19997
20076
|
async (content, options) => {
|
|
19998
20077
|
summaryModel = PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL;
|
|
19999
20078
|
summaryProvider = "nolo";
|
|
20000
|
-
return physicalRequest("platform", () =>
|
|
20079
|
+
return physicalRequest("platform", () => fallback2(content, { ...options, attemptId: compactionAttemptId }));
|
|
20001
20080
|
},
|
|
20002
20081
|
{
|
|
20003
|
-
preferPlatform: (options) => eligibility ??=
|
|
20004
|
-
...
|
|
20082
|
+
preferPlatform: (options) => eligibility ??= fallback2.preferPlatform(options),
|
|
20083
|
+
...fallback2.complete ? { complete: async (content, options) => {
|
|
20005
20084
|
summaryModel = PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL;
|
|
20006
20085
|
summaryProvider = "nolo";
|
|
20007
|
-
return physicalRequest("platform", () =>
|
|
20086
|
+
return physicalRequest("platform", () => fallback2.complete(content, { ...options, attemptId: compactionAttemptId }));
|
|
20008
20087
|
} } : {}
|
|
20009
20088
|
}
|
|
20010
20089
|
) : void 0;
|
|
@@ -23639,7 +23718,7 @@ async function saveCliPendingUserMessages(args2) {
|
|
|
23639
23718
|
if (ops.length) await args2.store.batch(ops);
|
|
23640
23719
|
}
|
|
23641
23720
|
async function readCliPendingUserMessages(store, dialogId) {
|
|
23642
|
-
const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-
|
|
23721
|
+
const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-FHIMCBUK.js");
|
|
23643
23722
|
const rows = await readDialogMessageRecords({ store, dialogId });
|
|
23644
23723
|
const uncertain = rows.filter(({ record: record2 }) => record2.metadata?.cliBatchPhase === "requested" && !record2.metadata?.cliBatchResolution);
|
|
23645
23724
|
const recovery = uncertain.length ? {
|
|
@@ -23768,7 +23847,15 @@ async function runNoloWorkspaceCliTool(call, args2) {
|
|
|
23768
23847
|
}
|
|
23769
23848
|
};
|
|
23770
23849
|
}
|
|
23771
|
-
|
|
23850
|
+
function isLocalExclusiveDialog(dialogId, meta, localChildDialogIds) {
|
|
23851
|
+
if (localChildDialogIds?.has(dialogId)) return true;
|
|
23852
|
+
const record2 = meta;
|
|
23853
|
+
if (!record2 || typeof record2 !== "object") return false;
|
|
23854
|
+
if (record2.triggerType === "cli-agent-run") return true;
|
|
23855
|
+
return Boolean(record2.localRuntime) && record2.executionMode === "background";
|
|
23856
|
+
}
|
|
23857
|
+
var fallback = (reason) => ({ outcome: "fallback", reason });
|
|
23858
|
+
async function readDialogInProcess(call, store, ctx) {
|
|
23772
23859
|
const args2 = parseNoloWorkspaceToolArguments(call.arguments);
|
|
23773
23860
|
const dialogInput = noloStringArg(args2.dialog ?? args2.dialogId ?? args2.id);
|
|
23774
23861
|
if (!dialogInput) throw new Error("readDialog requires dialog.");
|
|
@@ -23776,9 +23863,18 @@ async function readDialogInProcess(call, store, env) {
|
|
|
23776
23863
|
if (mode && mode !== "full" && mode !== "status") {
|
|
23777
23864
|
throw new Error(`readDialog mode must be "full" or "status", got "${mode}".`);
|
|
23778
23865
|
}
|
|
23779
|
-
|
|
23780
|
-
|
|
23781
|
-
const
|
|
23866
|
+
if (noloStringArg(args2.user ?? args2.userId ?? args2.owner)) return fallback("explicit-user");
|
|
23867
|
+
if (noloStringArg(args2.server ?? args2.serverBase ?? args2.serverUrl)) return fallback("explicit-server");
|
|
23868
|
+
const currentUserId = ctx.currentUserId;
|
|
23869
|
+
if (!currentUserId) return fallback("no-current-user");
|
|
23870
|
+
const { dbKey: dialogKey, dialogId, ownerId } = resolveNoloDialogInput(dialogInput, currentUserId);
|
|
23871
|
+
if (ownerId !== currentUserId) return fallback("foreign-owner");
|
|
23872
|
+
const meta = await store.read(dialogKey);
|
|
23873
|
+
if (!meta) return fallback("local-miss");
|
|
23874
|
+
if (isTombstoneRecord(meta)) return fallback("tombstone");
|
|
23875
|
+
if (!isLocalExclusiveDialog(dialogId, meta, ctx.localChildDialogIds)) {
|
|
23876
|
+
return fallback("cross-device-sync");
|
|
23877
|
+
}
|
|
23782
23878
|
if (mode === "status") {
|
|
23783
23879
|
const result4 = {
|
|
23784
23880
|
dialogId,
|
|
@@ -23789,8 +23885,11 @@ async function readDialogInProcess(call, store, env) {
|
|
|
23789
23885
|
source: "in-process"
|
|
23790
23886
|
};
|
|
23791
23887
|
return {
|
|
23792
|
-
|
|
23793
|
-
|
|
23888
|
+
outcome: "hit",
|
|
23889
|
+
result: {
|
|
23890
|
+
content: JSON.stringify(result4, null, 2),
|
|
23891
|
+
metadata: { noloWorkspaceTool: true, readDialog: true, inProcess: true, mode: "status" }
|
|
23892
|
+
}
|
|
23794
23893
|
};
|
|
23795
23894
|
}
|
|
23796
23895
|
const limitNum = noloPositiveIntegerString(args2.limit);
|
|
@@ -23799,15 +23898,18 @@ async function readDialogInProcess(call, store, env) {
|
|
|
23799
23898
|
maxResponseChars: DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
|
|
23800
23899
|
...limit !== void 0 ? { maxMessages: limit } : {}
|
|
23801
23900
|
});
|
|
23901
|
+
let hasMessages = false;
|
|
23802
23902
|
if (store.iterator) {
|
|
23803
23903
|
const { start, end: end3 } = dialogMessageRange(dialogId);
|
|
23804
23904
|
for await (const [, value] of store.iterator({ gte: start, lte: end3 })) {
|
|
23805
23905
|
const message = localDialogMessageRecordToRuntimeMessage(value) ?? value;
|
|
23806
23906
|
if (message) {
|
|
23907
|
+
hasMessages = true;
|
|
23807
23908
|
projector.addMessage(message);
|
|
23808
23909
|
}
|
|
23809
23910
|
}
|
|
23810
23911
|
}
|
|
23912
|
+
if (!hasMessages) return fallback("no-local-messages");
|
|
23811
23913
|
const projected = projector.finish(meta);
|
|
23812
23914
|
const built = buildDialogReadEnvelope({
|
|
23813
23915
|
meta: projected.meta,
|
|
@@ -23821,22 +23923,83 @@ async function readDialogInProcess(call, store, env) {
|
|
|
23821
23923
|
}
|
|
23822
23924
|
});
|
|
23823
23925
|
return {
|
|
23824
|
-
|
|
23825
|
-
|
|
23926
|
+
outcome: "hit",
|
|
23927
|
+
result: {
|
|
23928
|
+
content: built.serialized,
|
|
23929
|
+
metadata: { noloWorkspaceTool: true, readDialog: true, inProcess: true }
|
|
23930
|
+
}
|
|
23826
23931
|
};
|
|
23827
23932
|
}
|
|
23828
23933
|
function buildNoloWorkspaceCliToolExecutors(args2) {
|
|
23829
23934
|
const executors = {};
|
|
23830
23935
|
for (const toolName of CLI_NOLO_WORKSPACE_TOOL_NAMES) {
|
|
23831
23936
|
if (toolName === "loadSkill") continue;
|
|
23832
|
-
|
|
23833
|
-
|
|
23937
|
+
const inProcess = args2.inProcessExecutors?.[toolName];
|
|
23938
|
+
const storeBackedRead = toolName === "readDialog" && Boolean(args2.store || args2.resolveDialogStore);
|
|
23939
|
+
if (inProcess || storeBackedRead) {
|
|
23940
|
+
executors[toolName] = createInProcessWithCliFallback(args2, inProcess);
|
|
23834
23941
|
continue;
|
|
23835
23942
|
}
|
|
23836
23943
|
executors[toolName] = (call) => runNoloWorkspaceCliTool(call, args2);
|
|
23837
23944
|
}
|
|
23838
23945
|
return executors;
|
|
23839
23946
|
}
|
|
23947
|
+
function createInProcessWithCliFallback(args2, inProcess) {
|
|
23948
|
+
return async (call) => {
|
|
23949
|
+
let fallbackReason;
|
|
23950
|
+
try {
|
|
23951
|
+
if (inProcess) {
|
|
23952
|
+
const result4 = await inProcess(call, { env: args2.env });
|
|
23953
|
+
if (result4) return result4;
|
|
23954
|
+
fallbackReason = "local-miss";
|
|
23955
|
+
} else {
|
|
23956
|
+
const currentUserId = resolveHostCurrentUserId(args2);
|
|
23957
|
+
const store = await resolveInProcessDialogStore(args2);
|
|
23958
|
+
const outcome = store ? await readDialogInProcess(call, store, {
|
|
23959
|
+
env: args2.env,
|
|
23960
|
+
currentUserId,
|
|
23961
|
+
localChildDialogIds: resolveLocalChildDialogIds(args2)
|
|
23962
|
+
}) : { outcome: "fallback", reason: "no-store" };
|
|
23963
|
+
if (outcome.outcome === "hit") return outcome.result;
|
|
23964
|
+
fallbackReason = outcome.reason;
|
|
23965
|
+
}
|
|
23966
|
+
} catch (error) {
|
|
23967
|
+
fallbackReason = error instanceof Error ? error.message : String(error);
|
|
23968
|
+
}
|
|
23969
|
+
const bridged = await runNoloWorkspaceCliTool(call, args2);
|
|
23970
|
+
return {
|
|
23971
|
+
...bridged,
|
|
23972
|
+
metadata: { ...bridged.metadata, inProcessFallback: fallbackReason }
|
|
23973
|
+
};
|
|
23974
|
+
};
|
|
23975
|
+
}
|
|
23976
|
+
async function resolveInProcessDialogStore(args2) {
|
|
23977
|
+
if (args2.store) return args2.store;
|
|
23978
|
+
if (!args2.resolveDialogStore) return void 0;
|
|
23979
|
+
try {
|
|
23980
|
+
return await args2.resolveDialogStore();
|
|
23981
|
+
} catch {
|
|
23982
|
+
return void 0;
|
|
23983
|
+
}
|
|
23984
|
+
}
|
|
23985
|
+
function resolveLocalChildDialogIds(args2) {
|
|
23986
|
+
try {
|
|
23987
|
+
return args2.resolveLocalChildDialogIds?.();
|
|
23988
|
+
} catch {
|
|
23989
|
+
return void 0;
|
|
23990
|
+
}
|
|
23991
|
+
}
|
|
23992
|
+
function resolveHostCurrentUserId(args2) {
|
|
23993
|
+
try {
|
|
23994
|
+
const injected = args2.resolveCurrentUserId?.();
|
|
23995
|
+
if (injected && injected.trim()) return injected.trim();
|
|
23996
|
+
if (args2.resolveCurrentUserId) return void 0;
|
|
23997
|
+
const derived = resolveLocalUserId(args2.env ?? {});
|
|
23998
|
+
return derived && derived.trim() ? derived.trim() : void 0;
|
|
23999
|
+
} catch {
|
|
24000
|
+
return void 0;
|
|
24001
|
+
}
|
|
24002
|
+
}
|
|
23840
24003
|
var nodeSpawnFallback = (options) => {
|
|
23841
24004
|
return spawnToWebStreams({ cmd: options.cmd, env: options.env });
|
|
23842
24005
|
};
|
|
@@ -23857,7 +24020,7 @@ function buildLoadSkillExecutor(args2) {
|
|
|
23857
24020
|
const { resolveSkillByName } = await import("./skillDiscovery-MDDKPTW3.js");
|
|
23858
24021
|
const resolved = resolveSkillByName(args2.cwd, name);
|
|
23859
24022
|
if (!resolved) {
|
|
23860
|
-
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-
|
|
24023
|
+
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-GHE3RD3V.js");
|
|
23861
24024
|
const builtin = resolveBuiltinSkillByName(name);
|
|
23862
24025
|
if (builtin) {
|
|
23863
24026
|
const denied = await rejectDisabledBuiltin(args2.agentSkillSource, builtin.slug, name, args2.resolveAgentSkillSource);
|
|
@@ -23936,7 +24099,7 @@ async function loadPreciseSkill(cwd, parsed, agentSkillSource, resolveAgentSkill
|
|
|
23936
24099
|
if (!nonEmpty(parsed.slug) || has2("projectBinding") || has2("relativePath")) {
|
|
23937
24100
|
return reject("builtin requires only an exact slug.");
|
|
23938
24101
|
}
|
|
23939
|
-
const { listBuiltinSkills } = await import("./builtinSkillRegistry-
|
|
24102
|
+
const { listBuiltinSkills } = await import("./builtinSkillRegistry-GHE3RD3V.js");
|
|
23940
24103
|
const builtin = listBuiltinSkills().find((entry) => entry.slug === parsed.slug);
|
|
23941
24104
|
if (!builtin) return reject("builtin slug not found.");
|
|
23942
24105
|
const denied = await rejectDisabledBuiltin(agentSkillSource, builtin.slug, builtin.slug, resolveAgentSkillSource);
|