nolo-cli 0.33.0-alpha.9 → 0.34.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-2WR4RTZZ.js → _executeModel-BUYCXZCQ.js} +65 -65
- package/{action-OQWPNKAH.js → action-KMBZ3LCZ.js} +12 -12
- package/{addContentAction-YVINZQTF.js → addContentAction-KQ44UT2U.js} +10 -10
- package/{addDialogAgentAction-6IOCIEPI.js → addDialogAgentAction-ILSDCMYL.js} +9 -9
- package/{agentDeleteCommand-H22WRYC6.js → agentDeleteCommand-WSS2IJVM.js} +40 -39
- package/{agentEmailCommands-DGJVCMCG.js → agentEmailCommands-SHTPJTSX.js} +75 -75
- package/{agentListCommands-6NWMLIMQ.js → agentListCommands-GV6UYVAF.js} +47 -37
- package/{agentMachineCommands-5MUO6RDI.js → agentMachineCommands-FLD7TAFH.js} +37 -36
- package/agentProviderCommands-65ZC2WB4.js +122 -0
- package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-TSWAJPS2.js} +1 -1
- package/agentRecordCommands-57W6R7QW.js +113 -0
- package/{agentRunCommand-LYEMVQJH.js → agentRunCommand-HJGXSMDN.js} +78 -76
- package/{agentRunControl-SCIVRZWX.js → agentRunControl-GXOB47YI.js} +5 -1
- package/{agentRuntimeLocal-PRAR3NCW.js → agentRuntimeLocal-G7ZV55I6.js} +33 -33
- package/{agentSlice-AMDSTXP5.js → agentSlice-HFR7SP3B.js} +12 -12
- package/agentSuperviseCommands-Q64S5SPG.js +640 -0
- package/{appDeleteCommands-L5PKC42V.js → appDeleteCommands-SHHE56Y2.js} +35 -34
- package/{appDeployCommands-3J7Z4XWV.js → appDeployCommands-WUMSO2VS.js} +35 -34
- package/{appDeployStatusCommands-YTRPXE72.js → appDeployStatusCommands-VZSVN6SR.js} +35 -34
- package/{appGetCommands-JVXV5WXD.js → appGetCommands-ZJ2C3A5Y.js} +35 -34
- package/{appListCommands-7KDEOJSO.js → appListCommands-W33L6U5X.js} +35 -34
- package/{authCommand-6Y5LTMZB.js → authCommand-B2XRHNJH.js} +19 -19
- package/{authCommands-EAPFGNHN.js → authCommands-GWABTFMR.js} +6 -6
- package/{chatQueueReduxAdapter-ZKSS6XRV.js → chatQueueReduxAdapter-SYIX4ODY.js} +28 -28
- package/{chunk-UM4H3URE.js → chunk-23KKIMD5.js} +7 -7
- package/{chunk-HUCT7HID.js → chunk-2KO5QQFV.js} +2 -2
- package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
- package/{chunk-EMW55KKX.js → chunk-3LWZNEGQ.js} +1 -1
- package/{chunk-MQWVAOIU.js → chunk-3XZUNRYF.js} +33 -158
- package/{chunk-M2YMQOLC.js → chunk-4APLX2RT.js} +75 -10
- package/{chunk-ZHYK3N56.js → chunk-4AWH4LQA.js} +3 -1
- package/{chunk-3GZXL6FM.js → chunk-4DMPISV6.js} +7 -3
- package/chunk-4HOXB6SY.js +297 -0
- package/{chunk-OIQPORYI.js → chunk-64KIQZA2.js} +175 -2
- package/{chunk-BQ3OHLR5.js → chunk-6KYCG5GW.js} +1216 -690
- package/chunk-6XG52ZQ6.js +146 -0
- package/{chunk-GOIDVXK5.js → chunk-74IQ5RRO.js} +21 -8
- package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
- package/{chunk-DSBGWT2C.js → chunk-7YDKVLAE.js} +10 -10
- package/{chunk-5X4GQ53C.js → chunk-AUH2LTIY.js} +7 -7
- package/{chunk-UNOTBWZZ.js → chunk-B6H5XCT2.js} +8 -8
- package/{chunk-NNWHHCVP.js → chunk-BMB563Y6.js} +10 -4
- package/{chunk-DFUPZE6V.js → chunk-C6ELZQ7H.js} +249 -34
- package/{chunk-BXPBZVRE.js → chunk-DX6BP4K7.js} +285 -251
- package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
- package/{chunk-JZPBVBIY.js → chunk-FD36SCCD.js} +19 -8
- package/{chunk-7L5CQQIT.js → chunk-FDKEDU7R.js} +14 -14
- package/{chunk-DKMOY3QI.js → chunk-FGLKRJDI.js} +54 -3
- package/{chunk-2QTEYCR7.js → chunk-FTM4KUOZ.js} +17 -17
- package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
- package/{chunk-7YYHKBJP.js → chunk-GKHV4UH5.js} +1 -1
- package/{chunk-2IVEXF7P.js → chunk-GUYMR3JL.js} +6 -33
- package/{chunk-YDTYDA5W.js → chunk-GZRMWK5R.js} +6 -4
- package/{chunk-VWY2CZD2.js → chunk-HDT2RB7T.js} +3 -3
- package/{chunk-X664KVEV.js → chunk-HHBXCRJS.js} +204 -123
- package/{chunk-75U775RZ.js → chunk-IFS5CUEH.js} +1 -1
- package/{chunk-WLH5BAKX.js → chunk-IIOHYLIG.js} +9 -4
- package/{chunk-ADLYMQB6.js → chunk-IZCHPD7T.js} +52 -3
- package/{chunk-ITIA6OAQ.js → chunk-IZNJDUJ4.js} +5 -5
- package/{chunk-X2DAEZ3X.js → chunk-J5NMOM35.js} +1 -1
- package/{chunk-RPRRIFXV.js → chunk-JI2TIPLP.js} +1 -1
- package/{chunk-EGRJC4ZN.js → chunk-JIADXJYU.js} +1 -1
- package/{chunk-IHEC7VBF.js → chunk-K4KIFRIN.js} +1 -1
- package/{chunk-7INB7NXF.js → chunk-KCBK4MDT.js} +294 -54
- package/{chunk-WJSW43QZ.js → chunk-L3JWI7WX.js} +0 -1
- package/{chunk-XLLTJXAD.js → chunk-LAUUAYLK.js} +39 -2672
- package/{chunk-3RUW3ONU.js → chunk-LD6Y6RJY.js} +4 -4
- package/{chunk-AN7DGYMW.js → chunk-LQ6PUHW6.js} +5077 -3588
- package/chunk-M3JQWYBC.js +387 -0
- package/{chunk-GM6PU7B6.js → chunk-MEYIRKDN.js} +0 -1
- package/{chunk-6YXDOOSH.js → chunk-MGIHZ5CJ.js} +4 -4
- package/chunk-MI2J67UU.js +43 -0
- package/{chunk-4F5M2MW5.js → chunk-MJWX4JQO.js} +2 -2
- package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
- package/{chunk-5CS33IBL.js → chunk-NQ4N4IGO.js} +11 -12
- package/{chunk-ZZ2MH7LE.js → chunk-O6OSWFZQ.js} +0 -1
- package/{chunk-ZURFOV5J.js → chunk-OFZPJ3NT.js} +13 -4
- package/{chunk-RJKIB55Y.js → chunk-OSCSEJJR.js} +15 -8
- package/{chunk-SCUETSRP.js → chunk-PV734VZX.js} +1 -1
- package/{chunk-7E72JMBB.js → chunk-SMPAUSX5.js} +46 -5
- package/{chunk-ASDXPOJH.js → chunk-U6QQLXWI.js} +1 -1
- package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
- package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
- package/{chunk-CPYYM4RJ.js → chunk-V5GA74HI.js} +19 -5
- package/{chunk-UEAUAXYS.js → chunk-VBD7W4Q6.js} +2057 -212
- package/{chunk-DNQK7M7K.js → chunk-VD2SO4RG.js} +4 -4
- package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
- package/{chunk-7KNERA53.js → chunk-VSA6QAGV.js} +47 -3
- package/{chunk-G7E4NWFE.js → chunk-W445DPVT.js} +1 -1
- package/{chunk-3UG2IIZ3.js → chunk-WN5AJG5I.js} +1 -1
- package/{chunk-KSRFVP36.js → chunk-WRN7L5CS.js} +1 -1
- package/{chunk-GJXRIOLS.js → chunk-WRP5TTM6.js} +4 -84
- package/chunk-X2K2JSO4.js +163 -0
- package/{chunk-OR2HNLVO.js → chunk-X6EN3KJX.js} +279 -477
- package/{chunk-IKWTTKWG.js → chunk-XQES6LXQ.js} +2 -2
- package/{chunk-IR6W62Q6.js → chunk-XT73C4VH.js} +18 -21
- package/{chunk-RY57GLGW.js → chunk-YPREESF4.js} +42 -5
- package/{chunk-WNHST4IE.js → chunk-YRP7LG4R.js} +4527 -4080
- package/{chunk-BQXOGBFN.js → chunk-YZ2WE6CW.js} +2 -2
- package/{chunk-3WXRAHCG.js → chunk-ZBB3MZR3.js} +3 -3
- package/{cliExecutor-DW3PHGEL.js → cliExecutor-BBUVQU4L.js} +2 -2
- package/{clipboardy-MMBYVRLF.js → clipboardy-PRUHGPGC.js} +4 -3
- package/{codingSkills-DY5MINPG.js → codingSkills-H6N5EKSX.js} +3 -3
- package/cooldownCommands-C2SZLEEO.js +90 -0
- package/{createAgentAutomationAction-GVSJL2CI.js → createAgentAutomationAction-BH3D2L2H.js} +28 -30
- package/{createDialogAction-VVR46Q2A.js → createDialogAction-U4LDV2RW.js} +31 -33
- package/{createPageAction-M2VDKBYS.js → createPageAction-Q2ANG535.js} +30 -32
- package/{dbSlice-UI2VCBLG.js → dbSlice-PIQGICNM.js} +9 -9
- package/{deleteFile-XQXPBFFB.js → deleteFile-NPZ64DFN.js} +4 -4
- package/{dialogCommands-26DBYNBT.js → dialogCommands-C556D6WD.js} +37 -36
- package/{dialogSlice-FFGLRCBL.js → dialogSlice-P2VSKG2X.js} +27 -27
- package/dist-VODFSGNG.js +7442 -0
- package/{docCreateCommands-F2ASWG6B.js → docCreateCommands-AAVGLQWE.js} +36 -35
- package/{docDeleteCommands-A4URDZPI.js → docDeleteCommands-PKMKSQD2.js} +37 -36
- package/{docReadCommands-DO6VHDZD.js → docReadCommands-2WUH7UXC.js} +36 -35
- package/{docStore-EDAE7RNT.js → docStore-J5UWRBB4.js} +29 -31
- package/{docUpdateCommands-ZTXZ3RTP.js → docUpdateCommands-B2N4E5HQ.js} +38 -37
- package/{fetchMessages-7QRCCRYK.js → fetchMessages-CUEFN4GQ.js} +4 -4
- package/{getPricing-L2ENXWHV.js → getPricing-P3E2WRIH.js} +5 -5
- package/{handleSendMessageAction-CIRLGHOC.js → handleSendMessageAction-RRZ53YYH.js} +29 -29
- package/index.js +92 -77
- package/{localDialogRead-SLMPV5SK.js → localDialogRead-P7CHFMIC.js} +1 -1
- package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
- package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
- package/{machineCommands-NIQNCYJV.js → machineCommands-CWKMJG33.js} +77 -77
- package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
- package/{machineWsRunDispatch-EMTSQGAR.js → machineWsRunDispatch-UYNVNX4A.js} +69 -69
- package/{models-OX2S5C6Q.js → models-L7S2EKPM.js} +2 -2
- package/package.json +1 -1
- package/{read-2VHEHCAN.js → read-6C2XD3YZ.js} +5 -5
- package/{readDocTool-CSWD6NPC.js → readDocTool-Y7AB365O.js} +1 -1
- package/{readlineWorkspace-A2JBJWLI.js → readlineWorkspace-VYELP22P.js} +2851 -1515
- package/{removeDialogAgentAction-2T7BPM3T.js → removeDialogAgentAction-KG5WMJRZ.js} +13 -13
- package/{runAgentClientLoop-BV4736ED.js → runAgentClientLoop-35GKZDOZ.js} +62 -61
- package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-HT4O2PXL.js} +6 -6
- package/{setDialogExtraReferencesAction-GPT37HTW.js → setDialogExtraReferencesAction-O2NLXMSM.js} +10 -10
- package/{setPrimaryDialogAgentAction-3746P7IW.js → setPrimaryDialogAgentAction-FYYUY7PB.js} +13 -13
- package/{settingSlice-FIFOQ6OR.js → settingSlice-GPLI6E3M.js} +11 -11
- package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-COX56OBO.js} +3 -3
- package/{slateUtils-VO2FU36K.js → slateUtils-RIZES3PV.js} +1 -1
- package/{spaceCommands-AYZQHDB3.js → spaceCommands-AAKQM2PM.js} +223 -37
- package/{spaceSlice-43BNF22B.js → spaceSlice-NSNGR4Y2.js} +28 -30
- package/{streamAgentChatTurn-OLLRSITV.js → streamAgentChatTurn-D5IDHXMV.js} +116 -129
- package/{switchDialogAgentAction-MQTUTQHL.js → switchDialogAgentAction-GH5P6Q3Z.js} +9 -9
- package/{chunk-IDAU4UFS.js → syncMapping-N6RGXGBW.js} +11 -11
- package/{tableCommands-QE47K72R.js → tableCommands-PQUJ55AS.js} +3 -3
- package/{tools-2SI3FXLL.js → tools-JQOETZP5.js} +44 -45
- package/{tuiSummaryLlmCaller-EAWQ3IZX.js → tuiSummaryLlmCaller-LH7F2SP7.js} +18 -18
- package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
- package/{updateDialogTitleAction-YJEQFYOA.js → updateDialogTitleAction-WOTSDSFQ.js} +31 -33
- package/agentRecordCommands-YMGKT2WF.js +0 -113
- package/chunk-D5JI6VDM.js +0 -1800
- package/chunk-M3JEW6N6.js +0 -193
- package/chunk-ZWS6DUHX.js +0 -480
- package/syncMapping-RK2MANUX.js +0 -43
- package/{chunk-KMSZPTM6.js → chunk-2WKUUY2E.js} +3 -3
- package/{chunk-CWMSB67P.js → chunk-AGGIDPCZ.js} +0 -0
- package/{chunk-SAQQLJZ5.js → chunk-JDSUTNYY.js} +3 -3
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createChatQueueRuntime,
|
|
3
3
|
createTurnRequest
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YPREESF4.js";
|
|
5
5
|
import {
|
|
6
6
|
handleSendMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DX6BP4K7.js";
|
|
8
8
|
import "./chunk-RCFIB45Q.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-JIADXJYU.js";
|
|
10
10
|
import "./chunk-YYLHWIW6.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-AGGIDPCZ.js";
|
|
12
|
+
import "./chunk-AUH2LTIY.js";
|
|
13
|
+
import "./chunk-MGIHZ5CJ.js";
|
|
14
14
|
import "./chunk-5RGU3J7P.js";
|
|
15
15
|
import "./chunk-M76ECQRD.js";
|
|
16
|
-
import "./chunk-KSRFVP36.js";
|
|
17
|
-
import "./chunk-GJXRIOLS.js";
|
|
18
|
-
import "./chunk-DKMOY3QI.js";
|
|
19
|
-
import "./chunk-CPYYM4RJ.js";
|
|
20
|
-
import "./chunk-DFUPZE6V.js";
|
|
21
|
-
import "./chunk-5CS33IBL.js";
|
|
22
|
-
import "./chunk-JZPBVBIY.js";
|
|
23
|
-
import "./chunk-ZHXJ6M7T.js";
|
|
24
16
|
import {
|
|
25
17
|
clearPendingUserInputQueue,
|
|
26
18
|
dequeueUserInput,
|
|
@@ -28,30 +20,38 @@ import {
|
|
|
28
20
|
getLoopStopReason,
|
|
29
21
|
getPendingUserInputQueue
|
|
30
22
|
} from "./chunk-MRWGHF56.js";
|
|
23
|
+
import "./chunk-WRP5TTM6.js";
|
|
24
|
+
import "./chunk-FGLKRJDI.js";
|
|
25
|
+
import "./chunk-V5GA74HI.js";
|
|
26
|
+
import "./chunk-C6ELZQ7H.js";
|
|
31
27
|
import "./chunk-DWLEOOGR.js";
|
|
28
|
+
import "./chunk-NQ4N4IGO.js";
|
|
29
|
+
import "./chunk-FD36SCCD.js";
|
|
30
|
+
import "./chunk-ZHXJ6M7T.js";
|
|
32
31
|
import "./chunk-HNMXYYJR.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-WRN7L5CS.js";
|
|
33
|
+
import "./chunk-FTM4KUOZ.js";
|
|
34
|
+
import "./chunk-X6EN3KJX.js";
|
|
35
|
+
import "./chunk-B6H5XCT2.js";
|
|
36
36
|
import "./chunk-Y5GCAMGP.js";
|
|
37
|
-
import "./chunk-KX6YBIHG.js";
|
|
38
37
|
import "./chunk-UZ6XXCVR.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-WWC7I6TA.js";
|
|
38
|
+
import "./chunk-KX6YBIHG.js";
|
|
39
|
+
import "./chunk-MJWX4JQO.js";
|
|
40
|
+
import "./chunk-23KKIMD5.js";
|
|
41
|
+
import "./chunk-2WKUUY2E.js";
|
|
44
42
|
import "./chunk-I42VC5KR.js";
|
|
43
|
+
import "./chunk-YZ2WE6CW.js";
|
|
44
|
+
import "./chunk-WWC7I6TA.js";
|
|
45
45
|
import "./chunk-QSJ3HFEF.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-XT73C4VH.js";
|
|
47
|
+
import "./chunk-BJIRLHJR.js";
|
|
48
|
+
import "./chunk-HHBXCRJS.js";
|
|
49
|
+
import "./chunk-L3JWI7WX.js";
|
|
49
50
|
import "./chunk-GBRG75BQ.js";
|
|
51
|
+
import "./chunk-KUG52IAP.js";
|
|
50
52
|
import "./chunk-OW765XBU.js";
|
|
51
53
|
import "./chunk-3EUW3WEO.js";
|
|
52
54
|
import "./chunk-U6VC4MU4.js";
|
|
53
|
-
import "./chunk-BJIRLHJR.js";
|
|
54
|
-
import "./chunk-KUG52IAP.js";
|
|
55
55
|
import "./chunk-LCBAMY2M.js";
|
|
56
56
|
import "./chunk-4SN6J65J.js";
|
|
57
57
|
import "./chunk-CF7PE763.js";
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
fileKey,
|
|
4
4
|
getFileIdFromKey,
|
|
5
5
|
ulid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2WKUUY2E.js";
|
|
7
7
|
import {
|
|
8
8
|
loadFileFromIndexedDb,
|
|
9
9
|
removeAction,
|
|
10
10
|
saveFileToIndexedDb
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YZ2WE6CW.js";
|
|
12
12
|
import {
|
|
13
13
|
readAction,
|
|
14
14
|
readRequestManager,
|
|
15
15
|
resolveAgentReadServers
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XT73C4VH.js";
|
|
17
17
|
import {
|
|
18
18
|
asyncThunkCreator,
|
|
19
19
|
buildCreateSlice,
|
|
@@ -33,13 +33,13 @@ import {
|
|
|
33
33
|
shouldReplaceLocalWithRemoteRecord,
|
|
34
34
|
shouldReplicateLocalRecord,
|
|
35
35
|
uploadToCurrentServer
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-HHBXCRJS.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchFromClientDb,
|
|
39
39
|
fetchFromServer,
|
|
40
40
|
logger,
|
|
41
41
|
normalizeTimeFields
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-L3JWI7WX.js";
|
|
43
43
|
import {
|
|
44
44
|
isTombstoneRecord
|
|
45
45
|
} from "./chunk-GBRG75BQ.js";
|
|
@@ -707,7 +707,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
707
707
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
708
708
|
read: create.asyncThunk(
|
|
709
709
|
async (payload, thunkApi) => {
|
|
710
|
-
const { readAction: readAction2 } = await import("./read-
|
|
710
|
+
const { readAction: readAction2 } = await import("./read-6C2XD3YZ.js");
|
|
711
711
|
return readAction2(payload, thunkApi);
|
|
712
712
|
},
|
|
713
713
|
{
|
|
@@ -781,7 +781,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
781
781
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
782
782
|
share: create.asyncThunk(
|
|
783
783
|
async (config, thunkApi) => {
|
|
784
|
-
const { shareResourceAction } = await import("./action-
|
|
784
|
+
const { shareResourceAction } = await import("./action-KMBZ3LCZ.js");
|
|
785
785
|
return shareResourceAction(config, thunkApi);
|
|
786
786
|
}
|
|
787
787
|
),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TOOL_PACKS,
|
|
3
3
|
buildCodeWorkDiscipline
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IIOHYLIG.js";
|
|
5
5
|
import {
|
|
6
6
|
buildSkillDocMarkdown,
|
|
7
7
|
resolvePageSkillMetadata
|
|
8
8
|
} from "./chunk-AETZ7AD6.js";
|
|
9
9
|
import {
|
|
10
10
|
canonicalizeToolNames
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-O6OSWFZQ.js";
|
|
12
12
|
import {
|
|
13
13
|
asNonEmptyStringArray
|
|
14
14
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getPublicImageAgentMode
|
|
3
|
-
} from "./chunk-VIDPVFP3.js";
|
|
4
1
|
import {
|
|
5
2
|
clipHeadAndTail
|
|
6
3
|
} from "./chunk-JEXVIMYZ.js";
|
|
@@ -8,10 +5,14 @@ import {
|
|
|
8
5
|
inlineImageUrlsForCustomProvider,
|
|
9
6
|
prepareTools,
|
|
10
7
|
shouldInlineImageUrlsForAgent
|
|
11
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HDT2RB7T.js";
|
|
12
9
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
11
|
+
buildInvalidToolCallSelfHealResult,
|
|
12
|
+
parseToolCallArguments,
|
|
13
|
+
performFetchRequest,
|
|
14
|
+
sanitizeOutboundMessages
|
|
15
|
+
} from "./chunk-KCBK4MDT.js";
|
|
15
16
|
import {
|
|
16
17
|
createSSEParser,
|
|
17
18
|
createToolRunId,
|
|
@@ -22,22 +23,30 @@ import {
|
|
|
22
23
|
toolRunSetPending,
|
|
23
24
|
toolRunStarted,
|
|
24
25
|
toolRunSucceeded
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6KYCG5GW.js";
|
|
27
|
+
import {
|
|
28
|
+
getPublicImageAgentMode
|
|
29
|
+
} from "./chunk-VIDPVFP3.js";
|
|
26
30
|
import {
|
|
27
31
|
getCurrentSpaceId
|
|
28
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-LAUUAYLK.js";
|
|
29
33
|
import {
|
|
30
34
|
addToolMessage,
|
|
31
35
|
messageStreamEnd,
|
|
32
36
|
messageStreaming,
|
|
33
37
|
updateToolMessage
|
|
34
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-DX6BP4K7.js";
|
|
35
39
|
import {
|
|
36
40
|
streamAgentChatTurn
|
|
37
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-AUH2LTIY.js";
|
|
42
|
+
import {
|
|
43
|
+
addActiveController,
|
|
44
|
+
removeActiveController,
|
|
45
|
+
tokenUsageLiveUpdate
|
|
46
|
+
} from "./chunk-MRWGHF56.js";
|
|
38
47
|
import {
|
|
39
48
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
40
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-MI2J67UU.js";
|
|
41
50
|
import {
|
|
42
51
|
accumulateToolCallDelta,
|
|
43
52
|
createThinkParserState,
|
|
@@ -49,45 +58,40 @@ import {
|
|
|
49
58
|
} from "./chunk-N7J63Q6C.js";
|
|
50
59
|
import {
|
|
51
60
|
getModelInfo
|
|
52
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-WRP5TTM6.js";
|
|
53
62
|
import {
|
|
54
63
|
getApiEndpoint
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import {
|
|
57
|
-
addActiveController,
|
|
58
|
-
removeActiveController,
|
|
59
|
-
tokenUsageLiveUpdate
|
|
60
|
-
} from "./chunk-MRWGHF56.js";
|
|
64
|
+
} from "./chunk-C6ELZQ7H.js";
|
|
61
65
|
import {
|
|
62
66
|
toErrorMessage
|
|
63
67
|
} from "./chunk-HNMXYYJR.js";
|
|
64
68
|
import {
|
|
65
69
|
selectCurrentServer
|
|
66
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-B6H5XCT2.js";
|
|
67
71
|
import {
|
|
68
72
|
write
|
|
69
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-23KKIMD5.js";
|
|
70
74
|
import {
|
|
71
75
|
createDialogMessageKeyAndId,
|
|
72
76
|
dialogMessageKey,
|
|
73
77
|
toTrimmedString
|
|
74
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-2WKUUY2E.js";
|
|
79
|
+
import {
|
|
80
|
+
extractCustomId
|
|
81
|
+
} from "./chunk-BJIRLHJR.js";
|
|
75
82
|
import {
|
|
76
83
|
createAsyncThunk,
|
|
77
84
|
selectIdentityToken
|
|
78
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-HHBXCRJS.js";
|
|
79
86
|
import {
|
|
80
87
|
isAbortError
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import {
|
|
83
|
-
asTrimmedString
|
|
84
|
-
} from "./chunk-3EUW3WEO.js";
|
|
85
|
-
import {
|
|
86
|
-
extractCustomId
|
|
87
|
-
} from "./chunk-BJIRLHJR.js";
|
|
88
|
+
} from "./chunk-L3JWI7WX.js";
|
|
88
89
|
import {
|
|
89
90
|
isRecord
|
|
90
91
|
} from "./chunk-KUG52IAP.js";
|
|
92
|
+
import {
|
|
93
|
+
asTrimmedString
|
|
94
|
+
} from "./chunk-3EUW3WEO.js";
|
|
91
95
|
import {
|
|
92
96
|
asOptionalTrimmedString
|
|
93
97
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -851,131 +855,6 @@ function accumulateToolCallChunks(currentAccumulatedCalls, toolCallChunks) {
|
|
|
851
855
|
}));
|
|
852
856
|
}
|
|
853
857
|
|
|
854
|
-
// packages/ai/chat/toolCallArgumentGuard.ts
|
|
855
|
-
var INVALID_TOOL_ARGS_REPLACEMENT = '{"_invalid":true,"_reason":"arguments truncated or malformed"}';
|
|
856
|
-
var INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT = '{"_invalid":true}';
|
|
857
|
-
var INVALID_TOOL_RESULT_HINT = "\u5DE5\u5177\u53C2\u6570 JSON \u88AB\u622A\u65AD\uFF08\u5927\u6982\u7387\u8D85\u51FA\u8F93\u51FA\u957F\u5EA6\uFF09\u3002\u4E0D\u8981\u628A\u5B8C\u6574\u6E90\u7801\u585E\u8FDB\u4E00\u6B21\u5DE5\u5177\u8C03\u7528\uFF1A\u5148\u7528 appFileWrite \u5206\u6587\u4EF6\u591A\u6B21\u5199\u5165\uFF0C\u518D\u8C03\u7528\u4E0D\u5E26\u5185\u8054\u5927\u53C2\u6570\u7684 appPreflight/appDeploy\u3002";
|
|
858
|
-
var ORPHAN_TOOL_RESULT_PLACEHOLDER = '{"error":"tool call was interrupted"}';
|
|
859
|
-
function parseToolCallArguments(args) {
|
|
860
|
-
if (isRecord(args)) {
|
|
861
|
-
return { valid: true, parsed: args };
|
|
862
|
-
}
|
|
863
|
-
if (typeof args !== "string") return { valid: false };
|
|
864
|
-
const trimmed = args.trim();
|
|
865
|
-
if (!trimmed) return { valid: false };
|
|
866
|
-
try {
|
|
867
|
-
const parsed = JSON.parse(trimmed);
|
|
868
|
-
if (!isRecord(parsed)) {
|
|
869
|
-
return { valid: false };
|
|
870
|
-
}
|
|
871
|
-
return { valid: true, parsed };
|
|
872
|
-
} catch {
|
|
873
|
-
return { valid: false };
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
function buildInvalidToolCallSelfHealResult(callId, toolName) {
|
|
877
|
-
return JSON.stringify({
|
|
878
|
-
error: true,
|
|
879
|
-
toolCallId: callId,
|
|
880
|
-
...toolName ? { toolName } : {},
|
|
881
|
-
message: INVALID_TOOL_RESULT_HINT
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
function normalizeToolCallArgumentsInPlace(call, replacement) {
|
|
885
|
-
if (!call || typeof call !== "object") return;
|
|
886
|
-
const fn = call.function;
|
|
887
|
-
if (!fn || typeof fn !== "object") return;
|
|
888
|
-
const { valid } = parseToolCallArguments(fn.arguments);
|
|
889
|
-
if (!valid) {
|
|
890
|
-
fn.arguments = replacement;
|
|
891
|
-
} else if (typeof fn.arguments !== "string") {
|
|
892
|
-
try {
|
|
893
|
-
fn.arguments = JSON.stringify(fn.arguments);
|
|
894
|
-
} catch {
|
|
895
|
-
fn.arguments = replacement;
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
function sanitizeOutboundMessages(messages, opts = {}) {
|
|
900
|
-
if (!Array.isArray(messages) || messages.length === 0) return messages ?? [];
|
|
901
|
-
const argsReplacement = opts.argsReplacement ?? INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT;
|
|
902
|
-
const orphanReplacement = opts.orphanReplacement ?? ORPHAN_TOOL_RESULT_PLACEHOLDER;
|
|
903
|
-
const cloned = messages.map((msg) => ({ ...msg }));
|
|
904
|
-
const answeredCallIds = /* @__PURE__ */ new Set();
|
|
905
|
-
for (const msg of cloned) {
|
|
906
|
-
if (msg?.role === "tool" && typeof msg.tool_call_id === "string") {
|
|
907
|
-
answeredCallIds.add(msg.tool_call_id);
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
const result = [];
|
|
911
|
-
for (const msg of cloned) {
|
|
912
|
-
if (msg?.role === "assistant" && Array.isArray(msg.tool_calls)) {
|
|
913
|
-
msg.tool_calls = msg.tool_calls.map((call) => ({
|
|
914
|
-
...call,
|
|
915
|
-
function: { ...call?.function ?? {} }
|
|
916
|
-
}));
|
|
917
|
-
for (const call of msg.tool_calls) {
|
|
918
|
-
normalizeToolCallArgumentsInPlace(call, argsReplacement);
|
|
919
|
-
}
|
|
920
|
-
result.push(msg);
|
|
921
|
-
for (const call of msg.tool_calls) {
|
|
922
|
-
const callId = typeof call?.id === "string" ? call.id : void 0;
|
|
923
|
-
if (!callId) continue;
|
|
924
|
-
if (answeredCallIds.has(callId)) continue;
|
|
925
|
-
answeredCallIds.add(callId);
|
|
926
|
-
result.push({
|
|
927
|
-
role: "tool",
|
|
928
|
-
tool_call_id: callId,
|
|
929
|
-
content: orphanReplacement
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
continue;
|
|
933
|
-
}
|
|
934
|
-
result.push(msg);
|
|
935
|
-
}
|
|
936
|
-
return result;
|
|
937
|
-
}
|
|
938
|
-
function sanitizeOutboundResponsesInput(input, opts = {}) {
|
|
939
|
-
if (!Array.isArray(input) || input.length === 0) return input ?? [];
|
|
940
|
-
const argsReplacement = opts.argsReplacement ?? INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT;
|
|
941
|
-
const orphanReplacement = opts.orphanReplacement ?? ORPHAN_TOOL_RESULT_PLACEHOLDER;
|
|
942
|
-
const answeredCallIds = /* @__PURE__ */ new Set();
|
|
943
|
-
for (const item of input) {
|
|
944
|
-
if (item?.type === "function_call_output" && typeof item.call_id === "string") {
|
|
945
|
-
answeredCallIds.add(item.call_id);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
const result = [];
|
|
949
|
-
for (const item of input) {
|
|
950
|
-
if (item?.type === "function_call") {
|
|
951
|
-
const cloned = { ...item };
|
|
952
|
-
const { valid } = parseToolCallArguments(cloned.arguments);
|
|
953
|
-
if (!valid) {
|
|
954
|
-
cloned.arguments = argsReplacement;
|
|
955
|
-
} else if (typeof cloned.arguments !== "string") {
|
|
956
|
-
try {
|
|
957
|
-
cloned.arguments = JSON.stringify(cloned.arguments);
|
|
958
|
-
} catch {
|
|
959
|
-
cloned.arguments = argsReplacement;
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
result.push(cloned);
|
|
963
|
-
const callId = typeof cloned.call_id === "string" ? cloned.call_id : void 0;
|
|
964
|
-
if (callId && !answeredCallIds.has(callId)) {
|
|
965
|
-
answeredCallIds.add(callId);
|
|
966
|
-
result.push({
|
|
967
|
-
type: "function_call_output",
|
|
968
|
-
call_id: callId,
|
|
969
|
-
output: orphanReplacement
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
|
-
continue;
|
|
973
|
-
}
|
|
974
|
-
result.push(item);
|
|
975
|
-
}
|
|
976
|
-
return result;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
858
|
// packages/ai/chat/streamReader.ts
|
|
980
859
|
function createAbortError(message = "The operation was aborted.") {
|
|
981
860
|
return new DOMException(message, "AbortError");
|
|
@@ -1946,10 +1825,6 @@ export {
|
|
|
1946
1825
|
handleToolCalls,
|
|
1947
1826
|
parseApiError,
|
|
1948
1827
|
updateTotalUsage,
|
|
1949
|
-
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
1950
|
-
parseToolCallArguments,
|
|
1951
|
-
buildInvalidToolCallSelfHealResult,
|
|
1952
|
-
sanitizeOutboundResponsesInput,
|
|
1953
1828
|
readStreamChunk,
|
|
1954
1829
|
sendOpenAICompletionsRequest
|
|
1955
1830
|
};
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-K4KIFRIN.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JIADXJYU.js";
|
|
15
15
|
import {
|
|
16
16
|
isLevelLockError
|
|
17
17
|
} from "./chunk-URMS4XY2.js";
|
|
@@ -36,6 +36,9 @@ import {
|
|
|
36
36
|
asNonEmptyStringArray,
|
|
37
37
|
asTrimmedNonEmptyStringArray
|
|
38
38
|
} from "./chunk-I42VC5KR.js";
|
|
39
|
+
import {
|
|
40
|
+
isRecord
|
|
41
|
+
} from "./chunk-KUG52IAP.js";
|
|
39
42
|
import {
|
|
40
43
|
isLevelNotFoundError
|
|
41
44
|
} from "./chunk-OW765XBU.js";
|
|
@@ -43,8 +46,8 @@ import {
|
|
|
43
46
|
asTrimmedString
|
|
44
47
|
} from "./chunk-3EUW3WEO.js";
|
|
45
48
|
import {
|
|
46
|
-
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
DEFAULT_LOCAL_API_ORIGIN
|
|
50
|
+
} from "./chunk-4SN6J65J.js";
|
|
48
51
|
import {
|
|
49
52
|
asOptionalTrimmedString
|
|
50
53
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -545,6 +548,7 @@ async function readDialogOverHttp(args) {
|
|
|
545
548
|
Authorization: `Bearer ${args.authToken}`,
|
|
546
549
|
"Content-Type": "application/json"
|
|
547
550
|
};
|
|
551
|
+
const buildGetConvMsgsBody = () => JSON.stringify({ dialogId: args.dialogId, dialogKey: args.dialogKey, limit: args.limit });
|
|
548
552
|
const readViaBridge = async () => {
|
|
549
553
|
const bridgeRes = await args.fetchImpl(`${args.base}/api/dialog-read`, {
|
|
550
554
|
method: "POST",
|
|
@@ -574,6 +578,21 @@ async function readDialogOverHttp(args) {
|
|
|
574
578
|
source: "http"
|
|
575
579
|
};
|
|
576
580
|
};
|
|
581
|
+
if (args.messagesOnly) {
|
|
582
|
+
const msgsOnlyRes = await args.fetchImpl(`${args.base}/rpc/getConvMsgs`, {
|
|
583
|
+
method: "POST",
|
|
584
|
+
headers: authHeaders,
|
|
585
|
+
body: buildGetConvMsgsBody()
|
|
586
|
+
});
|
|
587
|
+
if (!msgsOnlyRes.ok) {
|
|
588
|
+
if (msgsOnlyRes.status === 401 || msgsOnlyRes.status === 403) return readViaBridge();
|
|
589
|
+
throw Object.assign(new Error(`read dialog messages failed: HTTP ${msgsOnlyRes.status}`), {
|
|
590
|
+
status: msgsOnlyRes.status,
|
|
591
|
+
base: args.base
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
return { meta: null, msgs: await msgsOnlyRes.json(), source: "http" };
|
|
595
|
+
}
|
|
577
596
|
const metaRes = await args.fetchImpl(
|
|
578
597
|
`${args.base}/api/v1/db/read/${encodeURIComponent(args.dialogKey)}`,
|
|
579
598
|
{ headers: { Authorization: `Bearer ${args.authToken}` } }
|
|
@@ -589,7 +608,7 @@ async function readDialogOverHttp(args) {
|
|
|
589
608
|
const msgsRes = await args.fetchImpl(`${args.base}/rpc/getConvMsgs`, {
|
|
590
609
|
method: "POST",
|
|
591
610
|
headers: authHeaders,
|
|
592
|
-
body:
|
|
611
|
+
body: buildGetConvMsgsBody()
|
|
593
612
|
});
|
|
594
613
|
if (!msgsRes.ok) {
|
|
595
614
|
if (msgsRes.status === 401 || msgsRes.status === 403) return readViaBridge();
|
|
@@ -623,7 +642,7 @@ async function tryHttpDialogCandidates(args) {
|
|
|
623
642
|
throw Object.assign(new Error("All HTTP dialog reads failed"), { attempts });
|
|
624
643
|
}
|
|
625
644
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
|
|
626
|
-
const reader = readLocalDialog ?? (await import("./localDialogRead-
|
|
645
|
+
const reader = readLocalDialog ?? (await import("./localDialogRead-P7CHFMIC.js")).readDialogFromLocalDb;
|
|
627
646
|
const result = await reader({ dialogKey, dialogId, limit });
|
|
628
647
|
return {
|
|
629
648
|
...result,
|
|
@@ -631,7 +650,10 @@ async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog
|
|
|
631
650
|
};
|
|
632
651
|
}
|
|
633
652
|
async function readDialogSnapshot(args) {
|
|
634
|
-
const candidateBases =
|
|
653
|
+
const candidateBases = [
|
|
654
|
+
...resolveServerCandidates({ NOLO_SERVER: args.base }, args.base),
|
|
655
|
+
DEFAULT_LOCAL_API_ORIGIN
|
|
656
|
+
].filter((value, index, all) => all.indexOf(value) === index);
|
|
635
657
|
try {
|
|
636
658
|
const local = await readDialogFromLocalDb(
|
|
637
659
|
args.dialogKey,
|
|
@@ -662,7 +684,8 @@ async function readDialogSnapshot(args) {
|
|
|
662
684
|
dialogId: args.dialogId,
|
|
663
685
|
limit: args.limit,
|
|
664
686
|
authToken: args.authToken,
|
|
665
|
-
fetchImpl: args.fetchImpl
|
|
687
|
+
fetchImpl: args.fetchImpl,
|
|
688
|
+
messagesOnly: args.messagesOnly
|
|
666
689
|
});
|
|
667
690
|
return { ...result, candidateBases };
|
|
668
691
|
}
|
|
@@ -899,6 +922,48 @@ async function readSpaceDialogRecords(args) {
|
|
|
899
922
|
const failures = [...spaceRead.failures, ...dialogResult.failures];
|
|
900
923
|
return { spaceId, records, failures };
|
|
901
924
|
}
|
|
925
|
+
var MAX_ATTEMPT_LINES = 5;
|
|
926
|
+
function formatDialogReadFailure(error) {
|
|
927
|
+
const message = toErrorMessage(error);
|
|
928
|
+
const attempts = typeof error === "object" && error !== null && Array.isArray(error.attempts) ? error.attempts : [];
|
|
929
|
+
const lines = [`[nolo] dialog read failed: ${message}`];
|
|
930
|
+
if (attempts.length > 0) {
|
|
931
|
+
const seen = /* @__PURE__ */ new Set();
|
|
932
|
+
const deduped = [];
|
|
933
|
+
for (const attempt of attempts) {
|
|
934
|
+
const key = `${attempt.base}|${attempt.status ?? ""}|${attempt.message ?? ""}`;
|
|
935
|
+
if (seen.has(key)) continue;
|
|
936
|
+
seen.add(key);
|
|
937
|
+
deduped.push(attempt);
|
|
938
|
+
if (deduped.length >= MAX_ATTEMPT_LINES) break;
|
|
939
|
+
}
|
|
940
|
+
lines.push(" attempts:");
|
|
941
|
+
for (const attempt of deduped) {
|
|
942
|
+
const status = attempt.status != null ? ` HTTP ${attempt.status}` : "";
|
|
943
|
+
const detail = attempt.message ? ` \u2014 ${attempt.message}` : "";
|
|
944
|
+
lines.push(` - ${attempt.base}${status}${detail}`);
|
|
945
|
+
}
|
|
946
|
+
if (attempts.length > deduped.length) {
|
|
947
|
+
lines.push(` \u2026 and ${attempts.length - deduped.length} more`);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
const allNotFound = attempts.length > 0 && attempts.every((attempt) => attempt.status === 404);
|
|
951
|
+
const hasConnRefusedOrTimeout = attempts.some((attempt) => {
|
|
952
|
+
const text = `${attempt.status ?? ""} ${attempt.message ?? ""}`.toLowerCase();
|
|
953
|
+
return text.includes("connection refused") || text.includes("econnrefused") || text.includes("enotfound") || text.includes("getaddrinfo") || text.includes("timeout") || text.includes("timed out") || text.includes("fetch failed") || // bun fetch 对连接失败的真实文案(无 refused/timeout 关键词)。
|
|
954
|
+
text.includes("unable to connect");
|
|
955
|
+
});
|
|
956
|
+
if (allNotFound) {
|
|
957
|
+
lines.push(
|
|
958
|
+
" next-step: \u76EE\u6807 dialog \u53EF\u80FD\u4E0D\u5728\u8FD9\u4E9B server \u4E0A\uFF1B\u672C\u5730 run \u7684\u5BF9\u8BDD\u5728\u672C\u5730\u5E93\uFF08<cwd>/data/leveldb\uFF09\uFF0C\u8BF7\u7528\u5B58\u50A8\u65B9\u5BF9\u5E94\u73AF\u5883/\u670D\u52A1\u8BFB\u53D6\uFF0C\u8FD0\u884C\u4E2D run \u53EF\u7528 `nolo agent status <runId|pid>` \u6216 dialog \u7684 status \u6A21\u5F0F\u67E5\u6458\u8981\u3002"
|
|
959
|
+
);
|
|
960
|
+
} else if (hasConnRefusedOrTimeout) {
|
|
961
|
+
lines.push(
|
|
962
|
+
" next-step: \u5B58\u5728\u8FDE\u63A5\u62D2\u7EDD/\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5 NOLO_SERVER/--server \u6307\u5411\u7684 server \u662F\u5426\u53EF\u8FBE\u3001\u662F\u5426\u5728\u8FD0\u884C\u3002"
|
|
963
|
+
);
|
|
964
|
+
}
|
|
965
|
+
return lines.join("\n");
|
|
966
|
+
}
|
|
902
967
|
async function runDialogReadCommand(args, deps = {}) {
|
|
903
968
|
const env = deps.env ?? process.env;
|
|
904
969
|
const output = deps.output ?? process.stdout;
|
|
@@ -915,7 +980,7 @@ async function runDialogReadCommand(args, deps = {}) {
|
|
|
915
980
|
try {
|
|
916
981
|
target = resolveDialogReadTarget(args, env, authToken);
|
|
917
982
|
} catch (error) {
|
|
918
|
-
output.write(
|
|
983
|
+
output.write(`${formatDialogReadFailure(error)}
|
|
919
984
|
`);
|
|
920
985
|
return 1;
|
|
921
986
|
}
|
|
@@ -992,7 +1057,7 @@ async function runDialogReadCommand(args, deps = {}) {
|
|
|
992
1057
|
output.write("\n");
|
|
993
1058
|
return 0;
|
|
994
1059
|
} catch (error) {
|
|
995
|
-
output.write(
|
|
1060
|
+
output.write(`${formatDialogReadFailure(error)}
|
|
996
1061
|
`);
|
|
997
1062
|
return 1;
|
|
998
1063
|
}
|
|
@@ -138,7 +138,7 @@ function writeUsage(output, commandPath) {
|
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
output.write(
|
|
141
|
-
"Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--allowed-child-agent <agent>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
|
|
141
|
+
"Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--allowed-child-agent <agent>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
144
|
function parseAgentRunArgs(args, options = {}) {
|
|
@@ -180,6 +180,7 @@ function parseAgentRunArgs(args, options = {}) {
|
|
|
180
180
|
const ephemeral = args.includes("--ephemeral") || args.includes("--memory-only");
|
|
181
181
|
const workflowRef = readFlagValue(args, "--workflow");
|
|
182
182
|
const skillRefs = readRepeatedFlagValues(args, "--skill").map((v) => v.trim()).filter(Boolean);
|
|
183
|
+
const dodCommands = readRepeatedFlagValues(args, "--dod").map((v) => v.trim()).filter(Boolean);
|
|
183
184
|
const taskRowDbKey = readFlagValue(args, "--task-row-dbkey");
|
|
184
185
|
const artifactIds = readFlagValue(args, "--artifact-ids")?.split(",").map((item) => item.trim()).filter(Boolean);
|
|
185
186
|
return {
|
|
@@ -215,6 +216,7 @@ function parseAgentRunArgs(args, options = {}) {
|
|
|
215
216
|
...allowedToolNames.length ? { allowedToolNames } : {},
|
|
216
217
|
...cwd ? { cwd } : {},
|
|
217
218
|
...blockedToolNames.length ? { blockedToolNames } : {},
|
|
219
|
+
...dodCommands.length ? { dodCommands } : {},
|
|
218
220
|
...typeof timeoutMs === "number" ? { timeoutMs } : {}
|
|
219
221
|
};
|
|
220
222
|
}
|
|
@@ -3,10 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-VIDPVFP3.js";
|
|
4
4
|
import {
|
|
5
5
|
getApproxPricePerImage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AGGIDPCZ.js";
|
|
7
7
|
import {
|
|
8
8
|
getModelConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-C6ELZQ7H.js";
|
|
10
|
+
import {
|
|
11
|
+
isPlatformHostedImageModel
|
|
12
|
+
} from "./chunk-X6EN3KJX.js";
|
|
10
13
|
import {
|
|
11
14
|
asOptionalFiniteNumber
|
|
12
15
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -66,7 +69,8 @@ var getAgentPriceHint = (agent) => {
|
|
|
66
69
|
const imagePriceModel = agent.imageModel ?? agent.model;
|
|
67
70
|
if (agent.imageConfig?.enabled && agent.provider && imagePriceModel) {
|
|
68
71
|
try {
|
|
69
|
-
const
|
|
72
|
+
const imageModelProvider = isPlatformHostedImageModel(imagePriceModel) ? "nolo" : agent.provider;
|
|
73
|
+
const model = getModelConfig(imageModelProvider, imagePriceModel);
|
|
70
74
|
const mode = agent.imageWorkflow;
|
|
71
75
|
if (mode === "generate") {
|
|
72
76
|
const defaultProfile = getPublicImageAgentDefaultProfile("generate");
|