nolo-cli 0.241.0-alpha.1 → 0.243.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-QLKALBXT.js} +75 -75
- package/{action-24MZYW2B.js → action-4V2UISXC.js} +9 -9
- package/{addContentAction-HEMCSSHT.js → addContentAction-5MZDMGI6.js} +14 -14
- package/{addDialogAgentAction-SQYDOXHA.js → addDialogAgentAction-ONVFHUOL.js} +17 -17
- package/{agentDeleteCommand-P7O3ACNJ.js → agentDeleteCommand-AUYYX4MU.js} +97 -97
- package/{agentEmailCommands-A5BRSYWK.js → agentEmailCommands-TZPXTTII.js} +98 -98
- package/{agentListCommands-LDRCOOMO.js → agentListCommands-7Z74VVSY.js} +198 -161
- package/{agentMachineCommands-AYL53KJV.js → agentMachineCommands-7JQ45EPE.js} +48 -46
- package/{agentProviderCommands-N5EA3ED2.js → agentProviderCommands-BQP2IK4C.js} +2 -2
- package/{agentRecordCommands-FICBZ57C.js → agentRecordCommands-OGOEBWLK.js} +95 -95
- package/{agentRunCommand-CTXQGDUM.js → agentRunCommand-ZKTHUSE5.js} +96 -96
- package/{agentRunControl-CO6BASZF.js → agentRunControl-CVCHDDDC.js} +10 -8
- package/{agentRuntimeLocal-5YN4D5WT.js → agentRuntimeLocal-ODDHRQ3M.js} +48 -41
- package/{agentSlice-DJ5D4DU4.js → agentSlice-ITLJEJAW.js} +14 -14
- package/{appDeleteCommands-B4E7N7M2.js → appDeleteCommands-QM6AWGQ5.js} +49 -47
- package/{appDeployCommands-E4DTXRRM.js → appDeployCommands-6XA2ONV6.js} +49 -47
- package/{appDeployStatusCommands-FCNHYHZM.js → appDeployStatusCommands-E75X542I.js} +49 -47
- package/{appGetCommands-4DXSQHUZ.js → appGetCommands-VKC2FHBH.js} +49 -47
- package/{appListCommands-2NN5E4F6.js → appListCommands-CICA4AQI.js} +49 -47
- package/{authCommand-47DR6GZT.js → authCommand-KVLFWXDS.js} +16 -16
- package/{authCommands-ZZ3L5IFM.js → authCommands-6AUYO65N.js} +3 -3
- package/{builtinSkillRegistry-AYWYQVA4.js → builtinSkillRegistry-LRVAQCPW.js} +8 -8
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
- package/{chromeOpsCommands-VZWAY2KR.js → chromeOpsCommands-TBPM6MR4.js} +1 -1
- package/{chunk-FPMPWNVQ.js → chunk-3IQ5GP5Y.js} +3 -3
- package/{chunk-NWWQY2J5.js → chunk-3S52WBJS.js} +7 -7
- package/chunk-4JFSDWTN.js +21 -0
- package/{chunk-C3GOEQJF.js → chunk-5PASH2MB.js} +2 -2
- package/{chunk-7Q7MKJZN.js → chunk-5UY2WQJ6.js} +323 -124
- package/{chunk-DVYAFH2Q.js → chunk-6PXFEPHL.js} +1 -1
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-H6CHPU6M.js → chunk-6ZQXUJGM.js} +4 -4
- package/{chunk-QGMIUVBT.js → chunk-76OIOVDN.js} +19 -19
- package/{chunk-KOIDLCAQ.js → chunk-7Y3L3IDA.js} +4 -4
- package/{chunk-DWWUVRB5.js → chunk-A4RK66EV.js} +1 -1
- package/{chunk-ZT3DYK5T.js → chunk-AERVJIZ2.js} +4 -4
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-TTEBPPUV.js → chunk-B5U64NZU.js} +1 -1
- package/{chunk-UKSKCDBG.js → chunk-BEJ243X3.js} +1 -1
- package/{chunk-TE2XH4KH.js → chunk-BZLF2LAP.js} +3 -3
- package/{chunk-ZVOL2MAJ.js → chunk-CO6E7YK6.js} +1 -1
- package/{chunk-NQQL2DKF.js → chunk-CQG24S2Q.js} +13 -6
- package/{chunk-25OCZXSX.js → chunk-CYAEPGKY.js} +23 -23
- package/{chunk-X37RQEA3.js → chunk-DEOPZE4S.js} +6 -6
- package/{chunk-B72AFRR2.js → chunk-DHRYMWMY.js} +4 -4
- package/{chunk-FXX6VFMV.js → chunk-DM323UA6.js} +84 -71
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-CT6GT2BG.js → chunk-DOCK6V3Z.js} +13 -13
- package/{chunk-ZTLTDUV6.js → chunk-FBVN3B5T.js} +4 -4
- package/{chunk-7NIBQ4HY.js → chunk-FDZ2GBWO.js} +30 -2
- package/{chunk-LMFMV5UC.js → chunk-FQFSLPNJ.js} +2 -2
- package/{chunk-ZQUCJBS4.js → chunk-G3SJCNHX.js} +2 -2
- package/{chunk-7U2TFUWW.js → chunk-GEKRDIMM.js} +5 -5
- package/{chunk-LT3DMEIB.js → chunk-GEY2UH2I.js} +17 -13
- package/{chunk-DLTMAXLF.js → chunk-GFBBHM53.js} +6 -6
- package/{chunk-OYHJ4TW7.js → chunk-HBO6UW3O.js} +4 -4
- package/{chunk-BDERPCJW.js → chunk-HKT7KOIX.js} +4 -4
- package/{chunk-3NFWMSTA.js → chunk-HTENYMO3.js} +5 -5
- package/{chunk-BWW6WRX6.js → chunk-HZN5VE32.js} +16 -13
- package/{chunk-G6OPRPXH.js → chunk-I27WRAPF.js} +37 -31
- package/{chunk-OJRTTERA.js → chunk-IBQHHCQE.js} +2 -1
- package/{chunk-LN4ZVSO7.js → chunk-JFGKVVLB.js} +8 -8
- package/{chunk-EIFSCI4C.js → chunk-JHHAIL34.js} +265 -102
- package/{chunk-JBWXPACD.js → chunk-JP2BH4NC.js} +1 -1
- package/{chunk-MM73SP4K.js → chunk-JV5FHHF7.js} +1 -1
- package/{chunk-NBB2EBQD.js → chunk-JVJ53XCH.js} +1 -1
- package/{chunk-Y5RN44VH.js → chunk-K3GJXP2N.js} +16 -16
- package/{chunk-OATIWAKN.js → chunk-KC2QVCI7.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-KMIDT4SW.js} +31 -1
- package/{chunk-IPRPYKBP.js → chunk-KOTJT7CY.js} +3 -3
- package/{chunk-4YFC3DWW.js → chunk-KQHEGELM.js} +1 -1
- package/{chunk-5TJE4QCL.js → chunk-KV5FDJOD.js} +2 -2
- package/{chunk-WRKMXMU7.js → chunk-KZAT2M2V.js} +12 -8
- package/{chunk-DGUUOHBF.js → chunk-LNFCR5IA.js} +4 -4
- package/{chunk-3V6JT6WN.js → chunk-MAURG3J4.js} +269 -112
- package/{chunk-WHO3LYDW.js → chunk-MEDPR36J.js} +2 -2
- package/{chunk-EW37CXCQ.js → chunk-NCJZUXRA.js} +6 -6
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-6D25V6CB.js → chunk-NJJK3PDA.js} +4 -4
- package/{chunk-U4VSBDO5.js → chunk-O5MEXHJW.js} +65 -46
- package/{chunk-YFRJAE3R.js → chunk-OGZE6BZG.js} +12 -4
- package/{chunk-KGIIZXPL.js → chunk-ORVM574D.js} +7 -7
- package/{chunk-YUZ2DAIH.js → chunk-OXFJWWOT.js} +1 -1
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-BIJTI5SX.js → chunk-Q25LWFGP.js} +2 -2
- package/{chunk-TFGGNRT6.js → chunk-QLUYDJST.js} +1 -1
- package/{chunk-IUXBKS5L.js → chunk-QXUVCIPB.js} +9 -9
- package/{chunk-XNEDFWT4.js → chunk-RRYDDDV7.js} +2 -2
- package/{chunk-24GVXSWK.js → chunk-RXCP7AIJ.js} +2 -2
- package/{chunk-UAOFSUG7.js → chunk-SEDJEJBH.js} +1 -1
- package/{chunk-LYDEFPQP.js → chunk-SF4GMDZO.js} +2 -2
- package/{chunk-CZLSTOVM.js → chunk-SGI2FIGK.js} +2 -2
- package/{chunk-FSIEHQNH.js → chunk-SMYUQDYW.js} +42 -5
- package/{chunk-7OTNBI77.js → chunk-T3CUXNV4.js} +1 -1
- package/{chunk-EBKHA63G.js → chunk-TKE4OJ4B.js} +179 -47
- package/{chunk-T444ENEC.js → chunk-TRN54YTP.js} +5 -5
- package/{chunk-2XMKW2OY.js → chunk-TT4JI6QR.js} +9 -9
- package/{chunk-I2OYPD3Y.js → chunk-U35UUM5K.js} +1 -0
- package/{chunk-6X3CS6NJ.js → chunk-V2COUWMQ.js} +8 -8
- package/{chunk-LCQJH7KN.js → chunk-VCU5GV42.js} +1 -1
- package/{chunk-ZBQ5UGYY.js → chunk-VF7F3ADU.js} +4 -4
- package/{chunk-HNWZJI4N.js → chunk-VNALJT32.js} +1 -1
- package/{chunk-TXFYIWAW.js → chunk-VTB6V4UF.js} +10 -10
- package/{chunk-QES2NCVM.js → chunk-VTDC64JY.js} +10 -10
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-YMCSR7PA.js → chunk-VVNP722P.js} +8 -8
- package/{chunk-N6EN3HK3.js → chunk-W4EAF272.js} +1 -1
- package/{chunk-X7IA2B7R.js → chunk-WBSJAIZP.js} +7 -3
- package/{chunk-LMZRXDWG.js → chunk-WDDZCQ6V.js} +3 -3
- package/{chunk-TXQVH72L.js → chunk-WIRH2ZLI.js} +3 -3
- package/{chunk-C646JEUV.js → chunk-WXZZQRAH.js} +4 -4
- package/{chunk-6BGJHJRN.js → chunk-X66UVBL3.js} +28 -28
- package/{chunk-UAHUJ4HH.js → chunk-XBWZ3SPO.js} +10 -37
- package/{chunk-4FE3IWRE.js → chunk-XRFUYUS7.js} +1 -1
- package/{chunk-XAFOLWLU.js → chunk-YDTLGWBU.js} +4 -4
- package/{chunk-FCAMGBLY.js → chunk-YDWMJOCW.js} +467 -279
- package/{chunk-GCVFX6ZL.js → chunk-YFDLRLW7.js} +3 -3
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-DIBQXNGW.js → chunk-YO4DCVD2.js} +2 -2
- package/{chunk-NL7J2J5Z.js → chunk-YTYVSOY4.js} +3 -3
- package/{chunk-6XBOPKUH.js → chunk-Z5C2EICZ.js} +16 -16
- package/{chunk-MDVP5TLI.js → chunk-ZCFOIOZ6.js} +1 -1
- package/{chunk-F3FQPVHE.js → chunk-ZGHHY2PV.js} +2 -2
- package/{cliAgentConfigHelpers-RFR7ZCSK.js → cliAgentConfigHelpers-H3VR6JID.js} +9 -9
- package/{cliLocalAgentRecordReader-AJ4UKHKT.js → cliLocalAgentRecordReader-SQCTHOXC.js} +50 -44
- package/{commandRegistry-IHWZVV4G.js → commandRegistry-6P4GP7SY.js} +99 -91
- package/{contentThunks-YQRCBDKF.js → contentThunks-74IO72TZ.js} +34 -34
- package/{cooldownCommands-W67DE765.js → cooldownCommands-QL6DWGVU.js} +1 -1
- package/{createAgentAutomationAction-ERSDNR4R.js → createAgentAutomationAction-KRNQVWCA.js} +35 -35
- package/{createDialogAction-QXC7JZPE.js → createDialogAction-TWFKJNUJ.js} +35 -35
- package/{createPageAction-RLZ7776F.js → createPageAction-2O2RMNQH.js} +39 -39
- package/{dbSlice-7M2ESEUO.js → dbSlice-JBLCCYKC.js} +13 -13
- package/{deleteFile-WO6WSSNK.js → deleteFile-KV5VTKAT.js} +8 -8
- package/{dialogCommands-UIRO4QNN.js → dialogCommands-OILEFOMW.js} +51 -50
- package/{dialogNotifyCommand-VDUFYBZV.js → dialogNotifyCommand-KOKWBD5H.js} +11 -11
- package/{dialogSlice-A4U3C76D.js → dialogSlice-BZKPV4FB.js} +34 -34
- package/{docCreateCommands-MHPYTJWR.js → docCreateCommands-43U55CVY.js} +48 -46
- package/{docDeleteCommands-VYULMBAQ.js → docDeleteCommands-BFTJFJAV.js} +50 -48
- package/{docReadCommands-FV3GGZ7V.js → docReadCommands-PU3VWGCG.js} +48 -46
- package/{docStore-AWWI72FA.js → docStore-JTAXVIUB.js} +15 -15
- package/{docUpdateCommands-JNS3HX7F.js → docUpdateCommands-7JRDXTSJ.js} +48 -46
- package/fetchMessages-TQEUZD7H.js +2 -2
- package/{getPricing-U5AR7ZHS.js → getPricing-XZXEWFPY.js} +4 -4
- package/{handleSendMessageAction-WDJOUDNV.js → handleSendMessageAction-BCNWPO3U.js} +67 -67
- package/{hostCredentialCreate-H3FF2SAO.js → hostCredentialCreate-LKNAX2SV.js} +95 -95
- package/index.js +8 -8
- package/keys-RWF7UCB4.js +1 -1
- package/{localRuntimeAdapter-JAQQXZJP.js → localRuntimeAdapter-I5HVICYM.js} +103 -103
- package/{machineCommands-WYOFNB5I.js → machineCommands-PUOM4XEL.js} +222 -313
- package/{machineWsRunDispatch-Y7UIAZNM.js → machineWsRunDispatch-SOAAV7PQ.js} +94 -94
- package/{mcpLocalAuthorizeCommand-SCYEFLRK.js → mcpLocalAuthorizeCommand-TMBUP7FX.js} +14 -14
- package/{memberThunks-DIITWU4M.js → memberThunks-TWB77UHJ.js} +17 -17
- package/{models-CINY5UZR.js → models-RIKQRH6B.js} +2 -2
- package/package.json +1 -1
- package/{projectArchive-IZJXBW5N.js → projectArchive-3V5DIVKP.js} +39 -39
- package/{providerPresetApply-2QWXPJXZ.js → providerPresetApply-JBCXP3JP.js} +6 -6
- package/{providerRegistry-W4LCKK6V.js → providerRegistry-AMR7WUWQ.js} +6 -6
- package/{read-OBLJNMA2.js → read-CO6HMH5W.js} +8 -8
- package/{readDocTool-QQZ4DAER.js → readDocTool-P4MDVRNW.js} +1 -1
- package/{readlineWorkspace-WF3SWZGR.js → readlineWorkspace-NHVNU4DY.js} +491 -383
- package/{removeDialogAgentAction-HC3SOY3G.js → removeDialogAgentAction-D3R3QNPD.js} +19 -19
- package/{runAgentClientLoop-Z7V6TA3O.js → runAgentClientLoop-EWZ4UOXT.js} +74 -74
- package/{runtimeDoctorCommands-KX6YLPWV.js → runtimeDoctorCommands-EQS62LQV.js} +5 -5
- package/{secretCommands-STRAX275.js → secretCommands-36BCE3UE.js} +2 -2
- package/{setDialogExtraReferencesAction-DDZUQPY6.js → setDialogExtraReferencesAction-VORDLM57.js} +16 -16
- package/{setPrimaryDialogAgentAction-EB67OMAJ.js → setPrimaryDialogAgentAction-P5A65M32.js} +19 -19
- package/{settingThunks-TN6GFASU.js → settingThunks-JGBSDOC6.js} +24 -24
- package/{spaceCommands-HBYQUVJI.js → spaceCommands-SRICYK6S.js} +51 -49
- package/{streamAgentChatTurn-CM7QQXOS.js → streamAgentChatTurn-GHPLOX5L.js} +140 -125
- package/{switchDialogAgentAction-XY5TKQQE.js → switchDialogAgentAction-DMMWH5FG.js} +17 -17
- package/{tableCommands-MXFL3JIT.js → tableCommands-UHEA5QNL.js} +6 -6
- package/{toolApiClient-53YMJ2G6.js → toolApiClient-N5PYW2R3.js} +2 -2
- package/{tools-AT6H73LD.js → tools-ZSQGRWKI.js} +59 -59
- package/{tuiRestart-272SAYSK.js → tuiRestart-RATR636G.js} +9 -9
- package/{tuiSummaryLlmCaller-K2OVRVHG.js → tuiSummaryLlmCaller-J5HB4XVS.js} +14 -14
- package/{updateCommands-O3BOVVVN.js → updateCommands-5OYND6EF.js} +3 -3
- package/{updateDialogTitleAction-PGY4UPLH.js → updateDialogTitleAction-MEKAI3YO.js} +36 -36
- package/{usageCommand-SCF3ROV2.js → usageCommand-WW22APZ6.js} +2 -2
- package/{usageRebuildCommand-K5WPIBA5.js → usageRebuildCommand-B3S67JXH.js} +3 -3
- package/{windowsSelfUpdate-WJDUZLEO.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
- package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-ZCSQCHG3.js} +2 -2
- package/chunk-776CXKMX.js +0 -134
- package/chunk-TUSTONB3.js +0 -81
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- package/{chunk-VMJVAJ6W.js → chunk-TB5KTLNB.js} +3 -3
- package/{dialogUsageCommand-SEC6UZWM.js → dialogUsageCommand-BZPKR3DW.js} +3 -3
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
loadFileFromIndexedDb,
|
|
7
7
|
removeAction,
|
|
8
8
|
saveFileToIndexedDb
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YO4DCVD2.js";
|
|
10
10
|
import {
|
|
11
11
|
readAction,
|
|
12
12
|
readRequestManager,
|
|
13
13
|
resolveAgentReadServers
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DEOPZE4S.js";
|
|
15
15
|
import {
|
|
16
16
|
beginWriteAck,
|
|
17
17
|
compareRemoteRecordsByComparableTime,
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
shouldReplaceLocalWithRemoteRecord,
|
|
30
30
|
shouldReplicateLocalRecord,
|
|
31
31
|
uploadToCurrentServer
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZGHHY2PV.js";
|
|
33
33
|
import {
|
|
34
34
|
asyncThunkCreator,
|
|
35
35
|
buildCreateSlice,
|
|
36
36
|
createEntityAdapter,
|
|
37
37
|
noloDeleteRequest
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-T3CUXNV4.js";
|
|
39
39
|
import {
|
|
40
40
|
fetchFromClientDb,
|
|
41
41
|
fetchFromServer,
|
|
@@ -44,13 +44,10 @@ import {
|
|
|
44
44
|
logger,
|
|
45
45
|
normalizeTimeFields,
|
|
46
46
|
scopeGoogleSessionServers
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-5PASH2MB.js";
|
|
48
48
|
import {
|
|
49
49
|
isTombstoneRecord
|
|
50
50
|
} from "./chunk-BV3FLP2L.js";
|
|
51
|
-
import {
|
|
52
|
-
isPublicBuiltinPlatformAgentKey
|
|
53
|
-
} from "./chunk-WRKMXMU7.js";
|
|
54
51
|
import {
|
|
55
52
|
fileKey,
|
|
56
53
|
getFileIdFromKey
|
|
@@ -58,6 +55,9 @@ import {
|
|
|
58
55
|
import {
|
|
59
56
|
ulid
|
|
60
57
|
} from "./chunk-OJKUU3LP.js";
|
|
58
|
+
import {
|
|
59
|
+
isPublicBuiltinPlatformAgentKey
|
|
60
|
+
} from "./chunk-KZAT2M2V.js";
|
|
61
61
|
import {
|
|
62
62
|
API_ENDPOINTS
|
|
63
63
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -1494,7 +1494,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
1494
1494
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
1495
1495
|
read: create.asyncThunk(
|
|
1496
1496
|
async (payload, thunkApi) => {
|
|
1497
|
-
const { readAction: readAction2 } = await import("./read-
|
|
1497
|
+
const { readAction: readAction2 } = await import("./read-CO6HMH5W.js");
|
|
1498
1498
|
return readAction2(payload, thunkApi);
|
|
1499
1499
|
},
|
|
1500
1500
|
{
|
|
@@ -1568,7 +1568,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
1568
1568
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
1569
1569
|
share: create.asyncThunk(
|
|
1570
1570
|
async (config, thunkApi) => {
|
|
1571
|
-
const { shareResourceAction } = await import("./action-
|
|
1571
|
+
const { shareResourceAction } = await import("./action-4V2UISXC.js");
|
|
1572
1572
|
return shareResourceAction(config, thunkApi);
|
|
1573
1573
|
}
|
|
1574
1574
|
),
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultReasoningEffort
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
buildRestorePatch
|
|
6
|
-
} from "./chunk-BV3FLP2L.js";
|
|
3
|
+
} from "./chunk-OXFJWWOT.js";
|
|
7
4
|
import {
|
|
8
5
|
buildLocalAgentLookupKeys,
|
|
9
6
|
shouldReadAgentKeyRemotely
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
resolveCliAgentKeyInput
|
|
13
|
-
} from "./chunk-BR3GT6MR.js";
|
|
7
|
+
} from "./chunk-VCU5GV42.js";
|
|
14
8
|
import {
|
|
15
9
|
createHostCredentialBrokerChain,
|
|
16
10
|
createStrictHostCredentialBroker
|
|
@@ -20,7 +14,7 @@ import {
|
|
|
20
14
|
formatInvalidAgentSkillModeMessage,
|
|
21
15
|
formatInvalidAgentSkillModesFieldMessage,
|
|
22
16
|
isAgentSkillModesFieldShapeValid
|
|
23
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JV5FHHF7.js";
|
|
24
18
|
import {
|
|
25
19
|
buildAgentApiKeyCredentialRef,
|
|
26
20
|
migrateAgentSecrets
|
|
@@ -29,9 +23,15 @@ import {
|
|
|
29
23
|
assertCredentialRef,
|
|
30
24
|
createFileCredentialBroker
|
|
31
25
|
} from "./chunk-OQHIVPG4.js";
|
|
26
|
+
import {
|
|
27
|
+
buildRestorePatch
|
|
28
|
+
} from "./chunk-BV3FLP2L.js";
|
|
32
29
|
import {
|
|
33
30
|
createAgentKey
|
|
34
31
|
} from "./chunk-SYTHYBMI.js";
|
|
32
|
+
import {
|
|
33
|
+
resolveCliAgentKeyInput
|
|
34
|
+
} from "./chunk-BR3GT6MR.js";
|
|
35
35
|
import {
|
|
36
36
|
parseUserIdFromAuthToken,
|
|
37
37
|
readOption,
|
|
@@ -766,7 +766,7 @@ async function buildCreatedAgentRecord(args) {
|
|
|
766
766
|
const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
|
|
767
767
|
const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
|
|
768
768
|
if (args.parsed.presetId) {
|
|
769
|
-
const { resolveProviderPresetFields } = await import("./providerPresetApply-
|
|
769
|
+
const { resolveProviderPresetFields } = await import("./providerPresetApply-JBCXP3JP.js");
|
|
770
770
|
const fields = resolveProviderPresetFields(args.parsed.presetId);
|
|
771
771
|
if (fields.kind === "manual") {
|
|
772
772
|
throw new Error(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ALWAYS_EXCLUDED_GLOBS,
|
|
2
3
|
buildExecutionTicket
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ANUP75N2.js";
|
|
4
5
|
|
|
5
6
|
// packages/agent-runtime/docker/executionTicket.ts
|
|
6
7
|
function buildPrimaryExecutionTicket(runGrant, executionClass = "session") {
|
|
@@ -35,6 +36,126 @@ var isDestructiveShellCommand = (params) => {
|
|
|
35
36
|
|
|
36
37
|
// packages/agent-runtime/docker/sandboxWorkspaceHelper.ts
|
|
37
38
|
import * as path from "node:path";
|
|
39
|
+
|
|
40
|
+
// packages/agent-runtime/docker/sandboxSearchKernel.generated.ts
|
|
41
|
+
var SANDBOX_SEARCH_KERNEL_JS = '// packages/agent-runtime/fileTextSearch.ts\nimport { readdir, readFile as readFile2, stat as stat2 } from "node:fs/promises";\nimport { basename, relative, resolve as resolve2 } from "node:path";\nimport { spawn as spawnChildProcess } from "node:child_process";\n\n// packages/agent-runtime/runtimeCompat.ts\nimport { existsSync, readdirSync, statSync } from "node:fs";\nimport { join } from "node:path";\nvar IS_WINDOWS = process.platform === "win32";\nfunction isExecutableFile(candidate) {\n if (!existsSync(candidate))\n return false;\n try {\n return statSync(candidate).isFile();\n } catch {\n return false;\n }\n}\nfunction resolveExecutableOnPath(name) {\n if (IS_WINDOWS && !/\\.[a-z]+$/i.test(name)) {\n const exts = (process.env.PATHEXT || ".EXE;.CMD;.BAT").split(";").filter(Boolean);\n for (const ext of exts) {\n const found = resolveExecutableOnPath(name + ext);\n if (found)\n return found;\n }\n return null;\n }\n const pathEnv = process.env.PATH ?? "";\n const sep = pathEnv.includes(";") && IS_WINDOWS ? ";" : ":";\n const pathDirs = pathEnv.split(sep).filter(Boolean);\n const fallbackDirs = IS_WINDOWS ? [] : [\n "/opt/homebrew/bin",\n "/usr/local/bin",\n "/usr/bin",\n "/bin",\n `${process.env.HOME ?? ""}/.local/bin`\n ].filter(Boolean);\n for (const dir of [...pathDirs, ...fallbackDirs]) {\n const candidate = join(dir, name);\n if (isExecutableFile(candidate))\n return candidate;\n }\n return null;\n}\n\n// packages/agent-runtime/gitignore.ts\nimport { readFile, stat } from "node:fs/promises";\nimport { resolve } from "node:path";\nfunction isIgnorableFsError(err) {\n if (err && typeof err === "object" && "code" in err) {\n const code = err.code;\n return code === "ENOENT" || code === "ENOTDIR";\n }\n return false;\n}\nasync function readRootGitignorePatterns(workspaceRoot) {\n let content;\n try {\n content = await readFile(resolve(workspaceRoot, ".gitignore"), "utf8");\n } catch (err) {\n if (isIgnorableFsError(err))\n return [];\n throw err;\n }\n return content.split(/\\r?\\n/).map((line) => line.trim()).filter((line) => line && !line.startsWith("#") && !line.startsWith("!")).flatMap((line) => {\n const unanchored = line.replace(/^\\//, "");\n if (unanchored.endsWith("/"))\n return [`${unanchored}**`];\n if (unanchored.includes("**"))\n return [unanchored];\n return [unanchored, `${unanchored}/**`];\n });\n}\n\n// packages/agent-runtime/fileTextSearch.ts\nvar normalizePath = (value) => value.replaceAll("\\\\", "/");\nvar pathFor = (root, file, absolute = false) => absolute ? normalizePath(file) : normalizePath(relative(root, file) || basename(file));\nvar COMMAND_LIMIT_HEADROOM = 1;\nvar MAX_SEARCH_FILE_BYTES = 8 * 1024 * 1024;\nvar MAX_SEARCH_LINE_CHARS = 2000;\nasync function runCommand(binary, args, cwd, maxResults) {\n const recordLimit = maxResults === undefined ? 0 : Math.max(0, maxResults) + COMMAND_LIMIT_HEADROOM;\n return await new Promise((done) => {\n let stdout = "", stderr = "", recordCount = 0, stopped = false;\n try {\n const child = spawnChildProcess(binary, args, { cwd, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });\n child.stdout.on("data", (chunk) => {\n const room = MAX_SEARCH_FILE_BYTES - stdout.length;\n stdout += chunk.toString().slice(0, Math.max(0, room));\n if (stdout.length >= MAX_SEARCH_FILE_BYTES && !stopped) {\n stopped = true;\n child.kill();\n }\n recordCount = parseMatches(cwd, stdout).length;\n if (recordLimit > 0 && recordCount >= recordLimit && !stopped) {\n stopped = true;\n child.kill();\n }\n });\n child.stderr.on("data", (chunk) => {\n stderr += chunk.toString();\n });\n child.on("error", () => done({ stdout, stderr, outcome: { kind: "spawn-failed" } }));\n child.on("close", (exitCode) => done({ stdout, stderr, outcome: stopped ? { kind: "stopped-by-limit" } : { kind: "completed", exitCode } }));\n } catch {\n done({ stdout, stderr, outcome: { kind: "spawn-failed" } });\n }\n });\n}\nfunction extractGrepExcludeDir(pattern) {\n const p = pattern.replaceAll("\\\\", "/");\n if (!p)\n return null;\n if (!/\\/(\\*{1,2})?$/.test(p))\n return null;\n const clean = p.replace(/\\/(\\*{1,2})?$/, "");\n if (!clean || clean.includes("/") || /[*?{}[\\]]/.test(clean))\n return null;\n return clean;\n}\nfunction isGrepExpressibleExclude(pattern) {\n return extractGrepExcludeDir(pattern) !== null;\n}\nfunction commandArgs(o, binary, target) {\n const args = binary === "rg" ? ["--line-number", "--no-heading", "--color", "never", "--null"] : ["-RIn", "--binary-files=without-match", "--null"];\n if (binary === "rg")\n args.push("--no-require-git", "--max-columns", String(MAX_SEARCH_LINE_CHARS), "--max-columns-preview");\n if (o.regex !== true)\n args.push(binary === "rg" ? "--fixed-strings" : "-F");\n else if (binary === "grep")\n args.push("-E");\n if (o.caseSensitive === false)\n args.push("-i");\n if (binary === "rg") {\n if (o.includeIgnored)\n args.push("--no-ignore");\n for (const x of o.exclude ?? [])\n args.push("--glob", `!${x}`);\n if (o.include)\n args.push("--type-add", `noloSearch:${o.include}`, "--type", "noloSearch");\n } else {\n for (const x of o.exclude ?? []) {\n const clean = extractGrepExcludeDir(x);\n if (clean)\n args.push("--exclude-dir", clean);\n }\n if (o.include)\n args.push("--include", o.include);\n }\n args.push("--", o.query, target);\n return args;\n}\nfunction parseMatches(root, output) {\n const records = [];\n const pattern = /(?:^|\\n)([^\\0\\n]+)\\0(\\d+):(.*?)(?=\\n[^\\0\\n]+\\0|$)/gs;\n for (const match of output.matchAll(pattern)) {\n records.push({ file: resolve2(root, match[1] ?? ""), line: Number(match[2]), text: (match[3] ?? "").replace(/\\n$/, "") });\n }\n return records;\n}\nasync function decorate(root, raw, context, absolute = false) {\n const out = [];\n for (const x of raw) {\n let lines = [];\n if (context > 0) {\n try {\n if ((await stat2(x.file)).size <= MAX_SEARCH_FILE_BYTES) {\n lines = (await readFile2(x.file, "utf8")).split(/\\r\\n|\\r|\\n/);\n }\n } catch {}\n }\n const i = x.line - 1;\n out.push({\n path: pathFor(root, x.file, absolute),\n line: x.line,\n text: (lines[i] ?? x.text).slice(0, MAX_SEARCH_LINE_CHARS),\n before: lines.slice(Math.max(0, i - context), i).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)),\n after: lines.slice(i + 1, i + context + 1).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS))\n });\n }\n return out;\n}\nfunction globMatch(pattern, value) {\n const p = normalizePath(pattern).replace(/^!/, "");\n const brace = /\\{([^{}]+)\\}/.exec(p);\n if (brace)\n return brace[1].split(",").some((part) => globMatch(p.slice(0, brace.index) + part + p.slice(brace.index + brace[0].length), value));\n let source = "";\n for (let i = 0;i < p.length; i++) {\n const c = p[i];\n if (c === "*" && p[i + 1] === "*") {\n i++;\n if (p[i + 1] === "/") {\n i++;\n source += "(?:.*/)?";\n } else\n source += ".*";\n } else if (c === "*")\n source += "[^/]*";\n else if (c === "?")\n source += "[^/]";\n else\n source += c.replace(/[.+^${}()|[\\]\\\\]/g, "\\\\$&");\n }\n const r = new RegExp(`^${source}$`);\n return r.test(value) || r.test(basename(value));\n}\nvar defaultReadTextFile = (filePath) => readFile2(filePath, "utf8").catch(() => "");\nasync function jsSearch(o, targetPath) {\n const max = o.maxResults ?? Number.MAX_SAFE_INTEGER;\n const excludes = o.exclude ?? [];\n const readText = o.readTextFile ?? defaultReadTextFile;\n const files = [];\n const targetStat = await stat2(targetPath).catch(() => null);\n if (!targetStat)\n return { matches: [], totalMatches: 0, truncated: false, engine: "js" };\n const ignorePatterns = o.includeIgnored ? [] : await readRootGitignorePatterns(o.root);\n const isIgnored = (rel) => ignorePatterns.some((pattern) => globMatch(pattern, rel));\n const isSearchableFile = (filePath) => {\n const rel = pathFor(o.root, filePath);\n return !excludes.some((pattern) => globMatch(pattern, rel)) && !isIgnored(rel) && (!o.include || globMatch(o.include, rel));\n };\n if (targetStat.isFile()) {\n if (isSearchableFile(targetPath))\n files.push(targetPath);\n } else {\n const walk = async (dir) => {\n for (const e of await readdir(dir, { withFileTypes: true })) {\n const f = resolve2(dir, e.name), rel = pathFor(o.root, f);\n if (e.isDirectory()) {\n if (!excludes.some((p) => globMatch(p, rel)))\n await walk(f);\n } else if (e.isFile() && !excludes.some((p) => globMatch(p, rel)) && !isIgnored(rel) && (!o.include || globMatch(o.include, rel))) {\n files.push(f);\n }\n }\n };\n await walk(targetPath);\n }\n const matcher = o.regex ? new RegExp(o.query, o.caseSensitive === false ? "i" : "") : null;\n const needle = o.caseSensitive === false ? o.query.toLowerCase() : o.query;\n const out = [], context = o.contextLines ?? 0;\n for (const file of files) {\n const info = await stat2(file).catch(() => null);\n if (!info || info.size > MAX_SEARCH_FILE_BYTES)\n continue;\n const text = await readText(file);\n if (!text || text.includes("\\x00"))\n continue;\n const lines = text.split(/\\r\\n|\\r|\\n/);\n for (let i = 0;i < lines.length; i++) {\n const line = lines[i] ?? "";\n const hit = matcher ? matcher.test(line) : o.caseSensitive === false ? line.toLowerCase().includes(needle) : line.includes(needle);\n if (!hit)\n continue;\n if (out.length >= max)\n return { matches: out, totalMatches: max, truncated: true, engine: "js" };\n 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 - context), i).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)), after: lines.slice(i + 1, i + context + 1).map((line) => line.slice(0, MAX_SEARCH_LINE_CHARS)) });\n }\n }\n return { matches: out, totalMatches: out.length, truncated: false, engine: "js" };\n}\nasync function canGrepFulfillOptions(o) {\n if (!o.includeIgnored) {\n const gitignorePatterns = await readRootGitignorePatterns(o.root);\n if (gitignorePatterns.length > 0)\n return false;\n }\n if (o.include) {\n if (o.include.includes("/") || o.include.includes("\\\\") || o.include.includes("**") || /[{}[\\]]/.test(o.include)) {\n return false;\n }\n }\n if (o.exclude && o.exclude.length > 0) {\n for (const pattern of o.exclude) {\n if (!isGrepExpressibleExclude(pattern))\n return false;\n }\n }\n return true;\n}\nvar COMMAND_ENGINES = [\n { engine: "ripgrep", binaryOption: "resolveRipgrepBinary", binaryName: "rg", argsKey: "rg" },\n { engine: "grep", binaryOption: "resolveGrepBinary", binaryName: "grep", argsKey: "grep" }\n];\nasync function searchFileTextMatches(o) {\n const targetPath = resolve2(o.root, o.target || ".");\n const targetStat = await stat2(targetPath).catch(() => null);\n if (!targetStat)\n return { matches: [], totalMatches: 0, truncated: false, engine: "js" };\n if (targetStat.isFile())\n return jsSearch(o, targetPath);\n const run = o.runCommand ?? runCommand, max = o.maxResults;\n for (const entry of COMMAND_ENGINES) {\n if (entry.engine === "ripgrep" && o.include && /[/\\\\]/.test(o.include))\n continue;\n if (entry.engine === "grep" && !await canGrepFulfillOptions(o))\n continue;\n const injectedResolver = o[entry.binaryOption];\n const binary = injectedResolver ? injectedResolver() : resolveExecutableOnPath(entry.binaryName);\n if (!binary)\n continue;\n const result = await run(binary, commandArgs(o, entry.argsKey, o.target || "."), o.root, max);\n const raw = parseMatches(o.root, result.stdout);\n const hardFailed = result.outcome.kind === "spawn-failed" || result.outcome.kind === "completed" && result.outcome.exitCode !== 0 && result.outcome.exitCode !== 1;\n if (hardFailed)\n continue;\n const truncated = raw.length > (max ?? Number.MAX_SAFE_INTEGER);\n const matches = await decorate(o.root, raw.slice(0, max), o.contextLines ?? 0, o.absolutePaths === true);\n return {\n matches,\n totalMatches: truncated ? matches.length : raw.length,\n truncated,\n engine: entry.engine\n };\n }\n return jsSearch(o, targetPath);\n}\nexport {\n canGrepFulfillOptions,\n extractGrepExcludeDir,\n isGrepExpressibleExclude,\n searchFileTextMatches\n};\n';
|
|
42
|
+
var SANDBOX_SCRUBBER_JS = `// packages/agent-runtime/secretScrubber.ts
|
|
43
|
+
var SECRET_PATTERNS = [
|
|
44
|
+
{
|
|
45
|
+
kind: "PRIVATE_KEY",
|
|
46
|
+
placeholder: "[REDACTED:PRIVATE_KEY]",
|
|
47
|
+
regex: /-----BEGIN (?:[A-Z0-9 ]+)?PRIVATE KEY-----[\\s\\S]+?-----END (?:[A-Z0-9 ]+)?PRIVATE KEY-----/g
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
kind: "ANTHROPIC_KEY",
|
|
51
|
+
placeholder: "[REDACTED:ANTHROPIC_KEY]",
|
|
52
|
+
regex: /\\bsk-ant-[a-zA-Z0-9_\\-]{20,}\\b/g
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
kind: "API_KEY",
|
|
56
|
+
placeholder: "[REDACTED:API_KEY]",
|
|
57
|
+
regex: /\\bsk-[a-zA-Z0-9_\\-]{24,}\\b/g
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: "BIGMODEL_KEY",
|
|
61
|
+
placeholder: "[REDACTED:BIGMODEL_KEY]",
|
|
62
|
+
regex: /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/g
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
kind: "GITHUB_TOKEN",
|
|
66
|
+
placeholder: "[REDACTED:GITHUB_TOKEN]",
|
|
67
|
+
regex: /\\b(?:gh[pousr]_[a-zA-Z0-9]{30,}|github_pat_[a-zA-Z0-9_]{40,})\\b/g
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
kind: "BEARER_TOKEN",
|
|
71
|
+
placeholder: "Bearer [REDACTED:BEARER_TOKEN]",
|
|
72
|
+
regex: /\\bBearer\\s+[a-zA-Z0-9_\\-\\.]{25,}\\b/gi
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "PASSWORD",
|
|
76
|
+
placeholder: "$1=[REDACTED:PASSWORD]",
|
|
77
|
+
regex: /\\b((?:DB_|DATABASE_|ADMIN_|ROOT_|MYSQL_|POSTGRES_)?(?:PASSWORD|PASSWD|SECRET_KEY))\\s*=\\s*['"]?([^\\s'"]{4,})['"]?/gi
|
|
78
|
+
}
|
|
79
|
+
];
|
|
80
|
+
var QUICK_PROBE_SUBSTRINGS = [
|
|
81
|
+
"sk-",
|
|
82
|
+
"ghp_",
|
|
83
|
+
"gho_",
|
|
84
|
+
"ghu_",
|
|
85
|
+
"ghs_",
|
|
86
|
+
"ghr_",
|
|
87
|
+
"github_pat_",
|
|
88
|
+
"PRIVATE KEY",
|
|
89
|
+
"Bearer ",
|
|
90
|
+
"bearer ",
|
|
91
|
+
"PASSWORD",
|
|
92
|
+
"password",
|
|
93
|
+
"PASSWD",
|
|
94
|
+
"SECRET_KEY"
|
|
95
|
+
];
|
|
96
|
+
var UNPREFIXED_PROBE_REGEX = /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/;
|
|
97
|
+
function hasPotentialSecrets(text) {
|
|
98
|
+
if (typeof text !== "string" || text.length === 0)
|
|
99
|
+
return false;
|
|
100
|
+
if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe)))
|
|
101
|
+
return true;
|
|
102
|
+
return UNPREFIXED_PROBE_REGEX.test(text);
|
|
103
|
+
}
|
|
104
|
+
function scrubSecrets(text) {
|
|
105
|
+
if (typeof text !== "string" || text.length === 0) {
|
|
106
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
107
|
+
}
|
|
108
|
+
if (!hasPotentialSecrets(text)) {
|
|
109
|
+
return { cleaned: text, redactedCount: 0, matchedKinds: [] };
|
|
110
|
+
}
|
|
111
|
+
let cleaned = text;
|
|
112
|
+
let redactedCount = 0;
|
|
113
|
+
const matchedKinds = [];
|
|
114
|
+
for (const pattern of SECRET_PATTERNS) {
|
|
115
|
+
pattern.regex.lastIndex = 0;
|
|
116
|
+
const matches = cleaned.match(pattern.regex);
|
|
117
|
+
if (matches && matches.length > 0) {
|
|
118
|
+
redactedCount += matches.length;
|
|
119
|
+
if (!matchedKinds.includes(pattern.kind)) {
|
|
120
|
+
matchedKinds.push(pattern.kind);
|
|
121
|
+
}
|
|
122
|
+
cleaned = cleaned.replace(pattern.regex, pattern.placeholder);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return { cleaned, redactedCount, matchedKinds };
|
|
126
|
+
}
|
|
127
|
+
function scrubObjectSecrets(val) {
|
|
128
|
+
if (val === null || val === undefined)
|
|
129
|
+
return val;
|
|
130
|
+
if (typeof val === "string") {
|
|
131
|
+
return scrubSecrets(val).cleaned;
|
|
132
|
+
}
|
|
133
|
+
if (Array.isArray(val)) {
|
|
134
|
+
return val.map((item) => scrubObjectSecrets(item));
|
|
135
|
+
}
|
|
136
|
+
if (typeof val === "object") {
|
|
137
|
+
if (val instanceof Date || val instanceof RegExp)
|
|
138
|
+
return val;
|
|
139
|
+
const result = {};
|
|
140
|
+
for (const [k, v] of Object.entries(val)) {
|
|
141
|
+
result[k] = scrubObjectSecrets(v);
|
|
142
|
+
}
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
145
|
+
return val;
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
SECRET_PATTERNS,
|
|
149
|
+
hasPotentialSecrets,
|
|
150
|
+
scrubObjectSecrets,
|
|
151
|
+
scrubSecrets
|
|
152
|
+
};
|
|
153
|
+
`;
|
|
154
|
+
|
|
155
|
+
// packages/agent-runtime/docker/sandboxWorkspaceHelper.ts
|
|
156
|
+
function toJavascriptDataUrl(jsSource) {
|
|
157
|
+
return "data:text/javascript;base64," + Buffer.from(jsSource, "utf8").toString("base64");
|
|
158
|
+
}
|
|
38
159
|
var SANDBOX_WORKSPACE_ROOT = "/home/bun/app";
|
|
39
160
|
var SANDBOX_HELPER_PATH = "/tmp/nolo-tools/workspace-tool.mjs";
|
|
40
161
|
function posixQuote(value) {
|
|
@@ -98,6 +219,9 @@ function buildWorkspaceHelperSource() {
|
|
|
98
219
|
import path from "node:path";
|
|
99
220
|
|
|
100
221
|
const ROOT = "${SANDBOX_WORKSPACE_ROOT}";
|
|
222
|
+
const SEARCH_EXCLUDES = ${JSON.stringify(ALWAYS_EXCLUDED_GLOBS)};
|
|
223
|
+
const SEARCH_KERNEL_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SEARCH_KERNEL_JS))};
|
|
224
|
+
const SCRUBBER_URL = ${JSON.stringify(toJavascriptDataUrl(SANDBOX_SCRUBBER_JS))};
|
|
101
225
|
const MAX_SERIALIZED_CHARS = ${SANDBOX_OUTPUT_LIMITS.maxSerializedChars};
|
|
102
226
|
const READ_HEAD_CHARS = ${SANDBOX_OUTPUT_LIMITS.readHeadChars};
|
|
103
227
|
const READ_TAIL_CHARS = ${SANDBOX_OUTPUT_LIMITS.readTailChars};
|
|
@@ -325,6 +449,31 @@ async function main() {
|
|
|
325
449
|
return emitValue(withMarker(capped.items, capped.omitted));
|
|
326
450
|
}
|
|
327
451
|
|
|
452
|
+
case "searchFiles": {
|
|
453
|
+
const p = resolvePath(args.path || ROOT);
|
|
454
|
+
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
455
|
+
const { searchFileTextMatches } = await import(SEARCH_KERNEL_URL);
|
|
456
|
+
const { scrubSecrets } = await import(SCRUBBER_URL);
|
|
457
|
+
const query = args.query === undefined ? args.pattern : args.query;
|
|
458
|
+
if (typeof query !== "string" || !query.length) throw new Error("missing_query");
|
|
459
|
+
const result = await searchFileTextMatches({ root: ROOT, target: p.path, query,
|
|
460
|
+
regex: args.regex === true, caseSensitive: args.caseSensitive !== false,
|
|
461
|
+
include: typeof args.include === "string" ? args.include : undefined,
|
|
462
|
+
exclude: [...SEARCH_EXCLUDES, ...(Array.isArray(args.exclude) ? args.exclude.filter((x) => typeof x === "string") : [])],
|
|
463
|
+
contextLines: Number.isInteger(args.contextLines) && args.contextLines >= 0 && args.contextLines <= 5 ? args.contextLines : 0,
|
|
464
|
+
maxResults: Number.isInteger(args.maxResults) && args.maxResults >= 1 && args.maxResults <= 1000 ? args.maxResults : 100,
|
|
465
|
+
includeIgnored: args.includeIgnored === true });
|
|
466
|
+
const lines = result.matches.flatMap((m) => [
|
|
467
|
+
...m.before.map((text, i) => m.path + ":" + (m.line - m.before.length + i) + "-" + text),
|
|
468
|
+
m.path + ":" + m.line + ":" + m.text,
|
|
469
|
+
...m.after.map((text, i) => m.path + ":" + (m.line + i + 1) + "-" + text),
|
|
470
|
+
]);
|
|
471
|
+
const raw = scrubSecrets(lines.join(NL)).cleaned;
|
|
472
|
+
const content = raw.slice(0, ARRAY_CHAR_BUDGET);
|
|
473
|
+
return emitValue({ content, metadata: { searchEngine: result.engine, count: lines.length,
|
|
474
|
+
totalMatches: result.totalMatches, matchCount: result.totalMatches,
|
|
475
|
+
truncated: result.truncated || content.length !== raw.length, limitedByMaxResults: result.truncated } });
|
|
476
|
+
}
|
|
328
477
|
case "mkdir": {
|
|
329
478
|
const p = resolvePath(args.path);
|
|
330
479
|
if (!p.ok) return console.log(JSON.stringify({ ok: false, error: p.error }));
|
|
@@ -414,6 +563,32 @@ function buildToolInvocation(toolName, args) {
|
|
|
414
563
|
}
|
|
415
564
|
break;
|
|
416
565
|
}
|
|
566
|
+
case "searchFiles": {
|
|
567
|
+
const query = args.query === void 0 ? args.pattern : args.query;
|
|
568
|
+
if (typeof query !== "string" || !query.length) return { ok: false, error: "missing_query" };
|
|
569
|
+
const res = resolveSandboxPath(typeof args.path === "string" ? args.path : ".");
|
|
570
|
+
if (!res.ok) return { ok: false, error: res.error };
|
|
571
|
+
for (const key of ["regex", "caseSensitive", "includeIgnored"]) {
|
|
572
|
+
if (args[key] !== void 0 && typeof args[key] !== "boolean") return { ok: false, error: "invalid_" + key };
|
|
573
|
+
}
|
|
574
|
+
if (args.path !== void 0 && typeof args.path !== "string") return { ok: false, error: "invalid_path" };
|
|
575
|
+
if (args.include !== void 0 && typeof args.include !== "string") return { ok: false, error: "invalid_include" };
|
|
576
|
+
if (args.exclude !== void 0 && (!Array.isArray(args.exclude) || !args.exclude.every((x) => typeof x === "string"))) return { ok: false, error: "invalid_exclude" };
|
|
577
|
+
for (const [key, min, max] of [["contextLines", 0, 5], ["maxResults", 1, 1e3]]) {
|
|
578
|
+
if (args[key] !== void 0 && (!Number.isInteger(args[key]) || Number(args[key]) < min || Number(args[key]) > max)) return { ok: false, error: "invalid_" + key };
|
|
579
|
+
}
|
|
580
|
+
op = "searchFiles";
|
|
581
|
+
validatedArgs.path = res.path;
|
|
582
|
+
validatedArgs.query = query;
|
|
583
|
+
validatedArgs.regex = args.regex === true;
|
|
584
|
+
validatedArgs.caseSensitive = args.caseSensitive !== false;
|
|
585
|
+
validatedArgs.include = args.include;
|
|
586
|
+
validatedArgs.exclude = args.exclude;
|
|
587
|
+
validatedArgs.contextLines = args.contextLines;
|
|
588
|
+
validatedArgs.maxResults = args.maxResults ?? 100;
|
|
589
|
+
validatedArgs.includeIgnored = args.includeIgnored === true;
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
417
592
|
case "grep":
|
|
418
593
|
case "grepFiles": {
|
|
419
594
|
if (typeof args.pattern !== "string" || !args.pattern.trim()) {
|
|
@@ -510,6 +685,7 @@ var dockerExecutionToolNames = [
|
|
|
510
685
|
"writeFile",
|
|
511
686
|
"editFile",
|
|
512
687
|
"globFiles",
|
|
688
|
+
"searchFiles",
|
|
513
689
|
"grepFiles"
|
|
514
690
|
];
|
|
515
691
|
var deny = (error) => JSON.stringify({ ok: false, error, workloadLocation: "docker" });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultOpenBrowser
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KC2QVCI7.js";
|
|
4
4
|
import {
|
|
5
5
|
generateCloudflareEmailRoutingToken,
|
|
6
6
|
parseFlagWithOptionalValue,
|
|
7
7
|
runCloudflareOAuthLogin,
|
|
8
8
|
upsertEnvVariable
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B5U64NZU.js";
|
|
10
10
|
import {
|
|
11
11
|
ANTHROPIC_OAUTH_AUTHORIZE_URL,
|
|
12
12
|
ANTHROPIC_OAUTH_CALLBACK_PORT,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
startCallbackServer,
|
|
51
51
|
validateXAIEndpoint,
|
|
52
52
|
xaiOAuthDiscovery
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-HTENYMO3.js";
|
|
54
54
|
import {
|
|
55
55
|
extractGoogleValidationLink
|
|
56
56
|
} from "./chunk-BMQ2MJUK.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
detectLocalDevinCredentials,
|
|
61
61
|
extractDevinToken,
|
|
62
62
|
fetchAntigravityCloudCodeCompletion
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-KV5FDJOD.js";
|
|
64
64
|
import {
|
|
65
65
|
createOAuthTokenStore,
|
|
66
66
|
resolveFreshAccessToken
|
|
@@ -74,19 +74,19 @@ import {
|
|
|
74
74
|
} from "./chunk-R5GO3YZP.js";
|
|
75
75
|
import {
|
|
76
76
|
t
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-OGZE6BZG.js";
|
|
78
78
|
import {
|
|
79
79
|
toErrorMessage
|
|
80
80
|
} from "./chunk-HNMXYYJR.js";
|
|
81
81
|
import {
|
|
82
82
|
asTrimmedString
|
|
83
83
|
} from "./chunk-3EUW3WEO.js";
|
|
84
|
-
import {
|
|
85
|
-
isRecord
|
|
86
|
-
} from "./chunk-KUG52IAP.js";
|
|
87
84
|
import {
|
|
88
85
|
asOptionalFiniteNumber
|
|
89
86
|
} from "./chunk-WWC7I6TA.js";
|
|
87
|
+
import {
|
|
88
|
+
isRecord
|
|
89
|
+
} from "./chunk-KUG52IAP.js";
|
|
90
90
|
|
|
91
91
|
// packages/cli/oauth/flows/xai.ts
|
|
92
92
|
function buildXAIAuthorizeUrl(opts) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// node_modules/js-base64/base64.mjs
|
|
2
|
-
var version = "3.9.
|
|
2
|
+
var version = "3.9.7";
|
|
3
3
|
var VERSION = version;
|
|
4
4
|
var _TD = typeof TextDecoder === "function" ? new TextDecoder("utf-8", { ignoreBOM: true }) : void 0;
|
|
5
5
|
var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
|
|
@@ -12,7 +12,6 @@ var b64tab = ((a) => {
|
|
|
12
12
|
})(b64chs);
|
|
13
13
|
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
14
14
|
var _fromCC = String.fromCharCode.bind(String);
|
|
15
|
-
var _U8Afrom = typeof Uint8Array.from === "function" ? Uint8Array.from.bind(Uint8Array) : (it) => new Uint8Array(Array.prototype.slice.call(it, 0));
|
|
16
15
|
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
|
|
17
16
|
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
|
|
18
17
|
var btoaPolyfill = (bin) => {
|
|
@@ -83,7 +82,12 @@ var atobPolyfill = (asc) => {
|
|
|
83
82
|
return binArray.join("");
|
|
84
83
|
};
|
|
85
84
|
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : atobPolyfill;
|
|
86
|
-
var _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8Array.fromBase64(a) : (a) =>
|
|
85
|
+
var _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8Array.fromBase64(a) : (a) => {
|
|
86
|
+
const bin = _atob(a), l = bin.length, u8a = new Uint8Array(l);
|
|
87
|
+
for (let i = 0; i < l; i++)
|
|
88
|
+
u8a[i] = bin.charCodeAt(i);
|
|
89
|
+
return u8a;
|
|
90
|
+
};
|
|
87
91
|
var toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
88
92
|
var _decode = _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
|
|
89
93
|
var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deriveCredentialGroup
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HZN5VE32.js";
|
|
4
4
|
import {
|
|
5
5
|
listUserRecordsFromServers,
|
|
6
6
|
readLiveDbRecordAfterTombstoneMerge
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZCFOIOZ6.js";
|
|
8
8
|
import {
|
|
9
9
|
agentRecordHasConfiguredCredential
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VTDC64JY.js";
|
|
11
11
|
import {
|
|
12
12
|
isTombstoneRecord
|
|
13
13
|
} from "./chunk-BV3FLP2L.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getCurrentSpaceIdRaw,
|
|
3
3
|
setCurrentSpaceBoth,
|
|
4
4
|
setSpaceInitialized
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WXZZQRAH.js";
|
|
6
6
|
import {
|
|
7
7
|
createSpaceKey,
|
|
8
8
|
normalizeSpaceId
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
googleSessionRequestToken,
|
|
14
14
|
isGoogleAuthoritySession,
|
|
15
15
|
scopeGoogleSessionServers
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5PASH2MB.js";
|
|
17
17
|
import {
|
|
18
18
|
selectIdentityToken,
|
|
19
19
|
selectIdentityUserId
|
|
@@ -54,7 +54,7 @@ async function fetchMembershipsFromServer(server, token, userId, timeoutMs) {
|
|
|
54
54
|
Authorization: `Bearer ${token}`,
|
|
55
55
|
"Content-Type": "application/json"
|
|
56
56
|
},
|
|
57
|
-
body: JSON.stringify({ userId }),
|
|
57
|
+
body: JSON.stringify({ userId, pureRead: true }),
|
|
58
58
|
signal: controller.signal
|
|
59
59
|
});
|
|
60
60
|
clearTimeout(timeoutId);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_react
|
|
3
|
-
} from "./chunk-RD3QLZQV.js";
|
|
4
1
|
import {
|
|
5
2
|
normalizeSpaceId
|
|
6
3
|
} from "./chunk-UAD2WT54.js";
|
|
7
4
|
import {
|
|
8
5
|
toTimestampMs
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VTB6V4UF.js";
|
|
7
|
+
import {
|
|
8
|
+
require_react
|
|
9
|
+
} from "./chunk-RD3QLZQV.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM
|
|
12
12
|
} from "./chunk-U67V476Y.js";
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deleteDialog,
|
|
3
|
+
runtime_default,
|
|
4
|
+
toast
|
|
5
|
+
} from "./chunk-DM323UA6.js";
|
|
1
6
|
import {
|
|
2
7
|
getAllMemberSpaces,
|
|
3
8
|
getCurrentSpaceId,
|
|
4
9
|
getCurrentSpaceIdRaw,
|
|
5
10
|
updateCurrentSpaceIfMatch
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
deleteDialog,
|
|
9
|
-
runtime_default,
|
|
10
|
-
toast
|
|
11
|
-
} from "./chunk-FXX6VFMV.js";
|
|
11
|
+
} from "./chunk-WXZZQRAH.js";
|
|
12
12
|
import {
|
|
13
13
|
require_formatISO
|
|
14
14
|
} from "./chunk-UVLYNWIE.js";
|
|
15
|
-
import {
|
|
16
|
-
require_react
|
|
17
|
-
} from "./chunk-RD3QLZQV.js";
|
|
18
15
|
import {
|
|
19
16
|
UNCATEGORIZED_ID,
|
|
20
17
|
addContentAction,
|
|
@@ -26,7 +23,7 @@ import {
|
|
|
26
23
|
patchIndividualContentRecord,
|
|
27
24
|
readContentRecordForSpaceSync,
|
|
28
25
|
syncContentRecordSpaceId
|
|
29
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SGI2FIGK.js";
|
|
30
27
|
import {
|
|
31
28
|
createSpaceKey,
|
|
32
29
|
normalizeSpaceId
|
|
@@ -39,10 +36,13 @@ import {
|
|
|
39
36
|
uploadFileAction,
|
|
40
37
|
upsertSSREntity,
|
|
41
38
|
write
|
|
42
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-VTB6V4UF.js";
|
|
43
40
|
import {
|
|
44
41
|
resolveFileCategory
|
|
45
42
|
} from "./chunk-3PVYUPXK.js";
|
|
43
|
+
import {
|
|
44
|
+
require_react
|
|
45
|
+
} from "./chunk-RD3QLZQV.js";
|
|
46
46
|
import {
|
|
47
47
|
DEVICE_LOCAL_OWNER_ID,
|
|
48
48
|
getRuntimeServerContext,
|
|
@@ -50,22 +50,19 @@ import {
|
|
|
50
50
|
resolveReplicationServers,
|
|
51
51
|
scheduleDeleteReplication,
|
|
52
52
|
scheduleWriteReplication
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-ZGHHY2PV.js";
|
|
54
54
|
import {
|
|
55
55
|
createAsyncThunk
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-T3CUXNV4.js";
|
|
57
57
|
import {
|
|
58
58
|
getIsDesktopApp
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import {
|
|
61
|
-
selectIdentityUserId
|
|
62
|
-
} from "./chunk-PXYBUFDB.js";
|
|
59
|
+
} from "./chunk-5PASH2MB.js";
|
|
63
60
|
import {
|
|
64
61
|
createClientLogger
|
|
65
62
|
} from "./chunk-QQ56R7KS.js";
|
|
66
63
|
import {
|
|
67
|
-
|
|
68
|
-
} from "./chunk-
|
|
64
|
+
selectIdentityUserId
|
|
65
|
+
} from "./chunk-PXYBUFDB.js";
|
|
69
66
|
import {
|
|
70
67
|
asRecordOrEmpty
|
|
71
68
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -73,11 +70,11 @@ import {
|
|
|
73
70
|
isAbortError
|
|
74
71
|
} from "./chunk-7DPNBQSV.js";
|
|
75
72
|
import {
|
|
76
|
-
|
|
77
|
-
} from "./chunk-
|
|
73
|
+
buildTombstoneRecord
|
|
74
|
+
} from "./chunk-BV3FLP2L.js";
|
|
78
75
|
import {
|
|
79
|
-
|
|
80
|
-
} from "./chunk-
|
|
76
|
+
isSystemAdmin
|
|
77
|
+
} from "./chunk-CO6E7YK6.js";
|
|
81
78
|
import {
|
|
82
79
|
SEPARATOR,
|
|
83
80
|
createKey,
|
|
@@ -91,6 +88,9 @@ import {
|
|
|
91
88
|
import {
|
|
92
89
|
ulid
|
|
93
90
|
} from "./chunk-OJKUU3LP.js";
|
|
91
|
+
import {
|
|
92
|
+
extractUserId
|
|
93
|
+
} from "./chunk-M2EJHDJP.js";
|
|
94
94
|
import {
|
|
95
95
|
asTrimmedNonEmptyStringArray
|
|
96
96
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -100,12 +100,12 @@ import {
|
|
|
100
100
|
import {
|
|
101
101
|
asTrimmedString
|
|
102
102
|
} from "./chunk-3EUW3WEO.js";
|
|
103
|
-
import {
|
|
104
|
-
isRecord
|
|
105
|
-
} from "./chunk-KUG52IAP.js";
|
|
106
103
|
import {
|
|
107
104
|
asOptionalFiniteNumber
|
|
108
105
|
} from "./chunk-WWC7I6TA.js";
|
|
106
|
+
import {
|
|
107
|
+
isRecord
|
|
108
|
+
} from "./chunk-KUG52IAP.js";
|
|
109
109
|
import {
|
|
110
110
|
asOptionalTrimmedString
|
|
111
111
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -1513,11 +1513,11 @@ var ENTITY_DELETE_STRATEGIES = {
|
|
|
1513
1513
|
await dispatch(deleteTable({ dbKey: key })).unwrap();
|
|
1514
1514
|
},
|
|
1515
1515
|
file: async (key, { thunkAPI }) => {
|
|
1516
|
-
const { deleteFileAction } = await import("./deleteFile-
|
|
1516
|
+
const { deleteFileAction } = await import("./deleteFile-KV5VTKAT.js");
|
|
1517
1517
|
await deleteFileAction(key, thunkAPI);
|
|
1518
1518
|
},
|
|
1519
1519
|
image: async (key, { thunkAPI }) => {
|
|
1520
|
-
const { deleteFileAction } = await import("./deleteFile-
|
|
1520
|
+
const { deleteFileAction } = await import("./deleteFile-KV5VTKAT.js");
|
|
1521
1521
|
await deleteFileAction(key, thunkAPI);
|
|
1522
1522
|
},
|
|
1523
1523
|
agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
|