nolo-cli 0.98.0-alpha.3 → 0.98.0
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 +1 -1
- package/{_executeModel-MA3D2J4W.js → _executeModel-GJK4ZVU6.js} +74 -67
- package/action-PNPQLJHG.js +20 -0
- package/{addContentAction-O7R66HEX.js → addContentAction-RBOUD7SJ.js} +12 -11
- package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-IODCR6TB.js} +18 -19
- package/{agentDeleteCommand-FHUJH5X4.js → agentDeleteCommand-GHRF6CH5.js} +47 -42
- package/{agentEmailCommands-KNYBWNMA.js → agentEmailCommands-O5BTHYZK.js} +97 -87
- package/agentListCommands-3REEM63V.js +742 -0
- package/{agentMachineCommands-N62I3D5Q.js → agentMachineCommands-2GW3CV7Q.js} +48 -43
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-IRNZXVGE.js} +1 -1
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
- package/agentRecordCommands-WYQODWZE.js +138 -0
- package/agentRunCommand-KAN65WPY.js +167 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
- package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-IOFBNVIL.js} +48 -39
- package/{agentSlice-65ETD734.js → agentSlice-I45M32KO.js} +14 -13
- package/{appDeleteCommands-PDZ7HQYH.js → appDeleteCommands-SFS6IZEM.js} +46 -41
- package/{appDeployCommands-KLLW32YA.js → appDeployCommands-YZQESVRQ.js} +46 -41
- package/{appDeployStatusCommands-IPNJ445T.js → appDeployStatusCommands-FKUUDCKP.js} +46 -41
- package/{appGetCommands-QA57XGXS.js → appGetCommands-QUE7OQZC.js} +46 -41
- package/{appListCommands-YBTAUFZS.js → appListCommands-QEETFKMH.js} +46 -41
- package/{authCommand-F4EFRRX6.js → authCommand-NHDLY3IB.js} +118 -24
- package/{authCommands-RGOGCPP6.js → authCommands-UDBJVSZU.js} +7 -5
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-MAR5LPAC.js} +10 -8
- package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
- package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-53HEEOTT.js → chunk-2WJ57RJA.js} +83 -16
- package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
- package/{chunk-ABQYVJBJ.js → chunk-46Y5D2BZ.js} +5 -5
- package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
- package/{chunk-H62HCIUP.js → chunk-4FFUDT6D.js} +24 -21
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-IIVGDG4I.js → chunk-4YSOUKUR.js} +13 -7
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-FSX24MR3.js → chunk-5AUJB66Z.js} +550 -515
- package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
- package/chunk-5J3PYNUP.js +255 -0
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
- package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
- package/{chunk-D2QT5FW4.js → chunk-6XDD7N7P.js} +47 -67
- package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
- package/{chunk-DNCEALKX.js → chunk-7MMSLEPA.js} +22 -29
- package/chunk-A4SQRTZ6.js +15 -0
- package/{chunk-7S4YWN7P.js → chunk-ADBZWMFB.js} +4 -4
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
- package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
- package/{chunk-GZBATRJA.js → chunk-B2DEZY6J.js} +20 -11
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-6YTOJY35.js → chunk-BZ7NPA6G.js} +35 -2
- package/chunk-C4DVDM72.js +13536 -0
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/chunk-DZ7R5V3Y.js +164 -0
- package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
- package/{chunk-V4MJDUSR.js → chunk-E73ON47R.js} +2 -2
- package/{chunk-UY2NBS4V.js → chunk-EIFYNGU4.js} +24 -5
- package/{chunk-KQ4ONNQD.js → chunk-EKPKW6RM.js} +155 -8
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-HJUYAD4A.js → chunk-FJ5BGMNM.js} +5 -5
- package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
- package/{chunk-TDRTS7QW.js → chunk-FY7DCYW7.js} +88 -17
- package/{chunk-J4MOO56S.js → chunk-GARACBQB.js} +10 -2
- package/{chunk-6VFARHZW.js → chunk-GDFA73QZ.js} +934 -1091
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
- package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
- package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-VLTIYV3X.js → chunk-HP57OUJO.js} +4 -4
- package/{chunk-AD2L6YCC.js → chunk-I76SDF7A.js} +10 -10
- package/{chunk-PELKTR62.js → chunk-I7BCBNWZ.js} +24 -77
- package/{chunk-GPCZ7UXG.js → chunk-K6U4NKFJ.js} +1 -1
- package/{chunk-4OEFYTWL.js → chunk-LDCAFLXD.js} +64 -48
- package/{chunk-SNPMM7H3.js → chunk-LNVJHIGA.js} +18 -20
- package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
- package/{chunk-5H7KJX7J.js → chunk-LQ4PDQCI.js} +5 -5
- package/{chunk-GABFWSOQ.js → chunk-M33GWZIZ.js} +67 -45
- package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
- package/chunk-NHDMQZJM.js +7881 -0
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-L5UXH3B2.js → chunk-NNCYNBYV.js} +22 -6
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/chunk-NWENLDMM.js +42 -0
- package/{chunk-76WEAXJB.js → chunk-NZWAO6LH.js} +20 -17
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-N2WELJE7.js → chunk-OU36O6OR.js} +23 -28
- package/chunk-OW4APERY.js +870 -0
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-TVYSVSA2.js → chunk-P5L7VVMT.js} +11 -9
- package/{chunk-TOP2VXOR.js → chunk-PCF3QU5Q.js} +5 -5
- package/{chunk-WV42OMV7.js → chunk-PTDYOADJ.js} +8 -8
- package/{chunk-6D6VBVEW.js → chunk-SNMQMOD2.js} +80 -14
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/{chunk-Z77CRGTW.js → chunk-TVCAR26G.js} +1 -1
- package/chunk-TY3TIUJK.js +89 -0
- package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
- package/{chunk-RG6JBBX5.js → chunk-U7XXEI5R.js} +166 -13
- package/{chunk-UZGQNTVW.js → chunk-UA324D4O.js} +8 -6
- package/chunk-UJXNKP5V.js +760 -0
- package/{chunk-UKZDAFYT.js → chunk-UM4PH574.js} +6 -10
- package/{chunk-BLJWCTRL.js → chunk-UVKDJUTL.js} +3 -3
- package/{chunk-ZCYXJSTU.js → chunk-V5OWQOJZ.js} +19 -88
- package/{chunk-YQTQQX2H.js → chunk-V7Y6KRAH.js} +1 -1
- package/{chunk-3DII57IT.js → chunk-VCAQFMVN.js} +1 -1
- package/{chunk-JRQFUXY7.js → chunk-VEYL5MO5.js} +99 -22
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
- package/{chunk-2FA3ITSX.js → chunk-W3RFFFFF.js} +873 -227
- package/{chunk-BP4XNZRM.js → chunk-W72ISAKC.js} +4 -4
- package/{chunk-DHDMC6FO.js → chunk-WCGC6S77.js} +14 -9
- package/{chunk-QDSINZM3.js → chunk-WJ3B6FX6.js} +1 -14
- package/{chunk-V4I3A7DR.js → chunk-WXHAOL7Y.js} +19 -17
- package/{chunk-FUUHG5LT.js → chunk-X2B2C4XD.js} +1 -1
- package/{chunk-HVURBGF3.js → chunk-XFUBXRVI.js} +6 -6
- package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
- package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
- package/{chunk-QIAVMDHY.js → chunk-YPOPJAKN.js} +4 -4
- package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
- package/chunk-YV25TM3R.js +780 -0
- package/chunk-ZRAU6T47.js +56 -0
- package/commandRegistry-RZNZ37BN.js +833 -0
- package/{contentThunks-Y6FA2TCW.js → contentThunks-DF7ZNCAG.js} +36 -34
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-JXAFQO5V.js → createAgentAutomationAction-KPMOZ53Y.js} +38 -36
- package/createDialogAction-I2UDVAXN.js +69 -0
- package/{createPageAction-GUQDPKO5.js → createPageAction-IF5JXNKV.js} +45 -42
- package/{chunk-ZMD2CQFC.js → cursorProvider-YGGNMVWX.js} +2496 -9897
- package/{dbSlice-XVWBAGYN.js → dbSlice-Q25STFGJ.js} +11 -10
- package/{deleteFile-YG6QMJLU.js → deleteFile-AJ2EZMHT.js} +7 -6
- package/{dialogCommands-JJDASFIL.js → dialogCommands-LWHIIUQD.js} +49 -45
- package/{dialogSlice-J2YJNE6E.js → dialogSlice-74DFPFRV.js} +40 -33
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-OB3X3EQM.js → docCreateCommands-LVXQ6TNZ.js} +48 -43
- package/{docDeleteCommands-WMHRGF22.js → docDeleteCommands-7TVIGCLP.js} +49 -44
- package/{docReadCommands-NWGGLIAZ.js → docReadCommands-KYAXFLQ5.js} +47 -42
- package/{docStore-6KKYKAGQ.js → docStore-2JDRAYXJ.js} +16 -12
- package/{docUpdateCommands-3DDSOLPS.js → docUpdateCommands-TVC5KWPK.js} +48 -43
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-I5ICDDHM.js} +5 -5
- package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +4 -4
- package/{handleSendMessageAction-A4XLEEPU.js → handleSendMessageAction-54GY3XOH.js} +110 -86
- package/index.js +87 -884
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-ZHZ3KXDM.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
- package/{machineCommands-Y64KAIRW.js → machineCommands-54RNLVJE.js} +91 -81
- package/machineWsRunDispatch-WE3VTD57.js +154 -0
- package/{memberThunks-QGFLFVCI.js → memberThunks-R75S3RWP.js} +20 -18
- package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/package.json +1 -1
- package/pdf-U6KSUEZZ.js +26435 -0
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-TEBH7FDX.js} +7 -7
- package/{providerRegistry-757OWH3O.js → providerRegistry-CBJLNCET.js} +11 -7
- package/{read-COE3ZYR6.js → read-SRQMNO26.js} +7 -6
- package/{readDocTool-5USN4A6V.js → readDocTool-RC3JUNJ2.js} +5 -3
- package/{readlineWorkspace-45XNHFXU.js → readlineWorkspace-UK5M5CJI.js} +2704 -2060
- package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-46XQV5Q7.js} +21 -25
- package/{runAgentClientLoop-ADZRHNG6.js → runAgentClientLoop-MTI5OU2W.js} +75 -69
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-J4V5ADQF.js} +15 -13
- package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-UHHV2QZW.js} +22 -26
- package/{chunk-AFUORTY4.js → settingThunks-PPZZZOWN.js} +226 -940
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-E7MQ4VU2.js → spaceCommands-446WWA73.js} +51 -46
- package/{streamAgentChatTurn-TUP7YO3H.js → streamAgentChatTurn-IANOWAKR.js} +199 -104
- package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-A2TMVGAE.js} +18 -19
- package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-EJT6TMFG.js} +3 -3
- package/tools-WZZYTUNF.js +116 -0
- package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-Q65IBDGO.js} +24 -21
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-KSWXWWFT.js → updateDialogTitleAction-Z2JTYLXD.js} +82 -44
- package/action-YVYQEAAV.js +0 -31
- package/agentListCommands-GATRXEMT.js +0 -406
- package/agentRecordCommands-GOC5K27T.js +0 -128
- package/agentRunCommand-JP2U3MQF.js +0 -155
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-5QOW43T4.js +0 -186
- package/chunk-DHDVZFNC.js +0 -18885
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/createDialogAction-O2QABXZF.js +0 -65
- package/machineWsRunDispatch-M366L2LJ.js +0 -144
- package/settingSlice-ZQZVUPKK.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-2VDNDFET.js +0 -110
- package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -4,23 +4,22 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
buildStaticUserPolicyContext,
|
|
6
6
|
resolveSpaceContextPreloadPlan
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VCAQFMVN.js";
|
|
8
8
|
import {
|
|
9
9
|
buildCliPrompt
|
|
10
10
|
} from "./chunk-ATNTHIZI.js";
|
|
11
11
|
import {
|
|
12
12
|
filterAndCleanMessages,
|
|
13
13
|
handleToolCalls,
|
|
14
|
-
parseApiError,
|
|
15
14
|
persistToolMessages,
|
|
16
15
|
readStreamChunk,
|
|
17
16
|
sendOpenAICompletionsRequest,
|
|
18
17
|
updateTotalUsage
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-I7BCBNWZ.js";
|
|
20
19
|
import "./chunk-JEXVIMYZ.js";
|
|
21
20
|
import {
|
|
22
21
|
prepareTools
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-I76SDF7A.js";
|
|
24
23
|
import {
|
|
25
24
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
26
25
|
buildInvalidToolCallSelfHealResult,
|
|
@@ -38,53 +37,64 @@ import {
|
|
|
38
37
|
sanitizeOutboundResponsesInput,
|
|
39
38
|
selectResponsesConversationState,
|
|
40
39
|
updateResponsesConversationState
|
|
41
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-M33GWZIZ.js";
|
|
42
41
|
import "./chunk-EOARMOVD.js";
|
|
43
42
|
import "./chunk-HS7MLR74.js";
|
|
44
43
|
import {
|
|
45
44
|
createSSEParser,
|
|
46
45
|
getAllToolRuns,
|
|
47
46
|
resolveAgentRecommendedSkillNames,
|
|
48
|
-
resolveAgentRequiredPackIds
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
resolveAgentRequiredPackIds,
|
|
48
|
+
selectAiRecentContentLimit,
|
|
49
|
+
selectGlobalPrompt,
|
|
50
|
+
selectKnowledgeCaptureLevel,
|
|
51
|
+
selectMaxExecutionTime,
|
|
52
|
+
selectSpaceContextLevel,
|
|
53
|
+
selectUserTonePreset
|
|
54
|
+
} from "./chunk-5AUJB66Z.js";
|
|
51
55
|
import "./chunk-NF64D32W.js";
|
|
56
|
+
import "./chunk-U7XXEI5R.js";
|
|
57
|
+
import "./chunk-AOTBKDRK.js";
|
|
52
58
|
import "./chunk-3L2WKC3W.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-HJUYAD4A.js";
|
|
59
|
+
import "./chunk-OXME3PEE.js";
|
|
60
|
+
import "./chunk-DZ7R5V3Y.js";
|
|
61
|
+
import "./chunk-GARACBQB.js";
|
|
62
|
+
import "./chunk-FJ5BGMNM.js";
|
|
58
63
|
import {
|
|
59
64
|
getFinalPrice,
|
|
60
65
|
getModelPricing,
|
|
61
66
|
getPrices,
|
|
62
67
|
hasExplicitAgentPricing
|
|
63
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-4DPP773Q.js";
|
|
64
69
|
import {
|
|
65
70
|
getPublicImageAgentDefaultProfile,
|
|
66
71
|
getPublicImageAgentMode
|
|
67
72
|
} from "./chunk-VIDPVFP3.js";
|
|
68
73
|
import {
|
|
69
74
|
resolveToolBaseUrl
|
|
70
|
-
} from "./chunk-
|
|
71
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-HP57OUJO.js";
|
|
76
|
+
import "./chunk-UM4PH574.js";
|
|
77
|
+
import {
|
|
78
|
+
isContextOverflowText,
|
|
79
|
+
parseApiError
|
|
80
|
+
} from "./chunk-OCZKATRC.js";
|
|
72
81
|
import {
|
|
73
82
|
waitForAbortableDelay
|
|
74
83
|
} from "./chunk-N4G4PKQ6.js";
|
|
75
|
-
import "./chunk-
|
|
84
|
+
import "./chunk-NUHHBEJC.js";
|
|
76
85
|
import {
|
|
77
86
|
extractCategorizedMentions
|
|
78
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-AGIM7IMJ.js";
|
|
79
88
|
import "./chunk-63W5N6P3.js";
|
|
80
89
|
import "./chunk-VF4K2QE6.js";
|
|
81
90
|
import {
|
|
82
91
|
getDocState
|
|
83
|
-
} from "./chunk-
|
|
84
|
-
import "./chunk-
|
|
92
|
+
} from "./chunk-B2DEZY6J.js";
|
|
93
|
+
import "./chunk-OU36O6OR.js";
|
|
94
|
+
import "./chunk-E3YWHWCR.js";
|
|
85
95
|
import {
|
|
86
96
|
getTableState
|
|
87
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-6XDD7N7P.js";
|
|
88
98
|
import {
|
|
89
99
|
getCurrentSpaceId,
|
|
90
100
|
getCurrentSpaceIdRaw,
|
|
@@ -106,34 +116,38 @@ import {
|
|
|
106
116
|
selectAllMsgs,
|
|
107
117
|
selectCurrentDialogConfig,
|
|
108
118
|
selectDialogConfigByKey,
|
|
109
|
-
shouldBlockForGptPro,
|
|
110
119
|
updateTokens,
|
|
111
120
|
updateToolMessage
|
|
112
|
-
} from "./chunk-
|
|
113
|
-
import "./chunk-MC4XLIJ7.js";
|
|
114
|
-
import "./chunk-3BMYXEUW.js";
|
|
121
|
+
} from "./chunk-C4DVDM72.js";
|
|
115
122
|
import "./chunk-YYLHWIW6.js";
|
|
123
|
+
import "./chunk-6O4IK4V2.js";
|
|
124
|
+
import "./chunk-523DITKR.js";
|
|
116
125
|
import "./chunk-AGGIDPCZ.js";
|
|
117
|
-
import "./chunk-
|
|
126
|
+
import "./chunk-P5L7VVMT.js";
|
|
118
127
|
import {
|
|
119
128
|
createCliChatTurnStream,
|
|
120
129
|
getCliChatSession,
|
|
121
130
|
startCliChatSession
|
|
122
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-PCF3QU5Q.js";
|
|
123
132
|
import "./chunk-5RGU3J7P.js";
|
|
133
|
+
import "./chunk-ZRAU6T47.js";
|
|
124
134
|
import {
|
|
125
135
|
addActiveController,
|
|
136
|
+
claimDialogTurnPhase,
|
|
137
|
+
clearDialogTurnPhase,
|
|
126
138
|
clearPendingUserInputQueue,
|
|
127
139
|
dequeueUserInput,
|
|
128
140
|
removeActiveController,
|
|
129
141
|
selectActiveControllers,
|
|
130
142
|
selectPendingFiles,
|
|
131
143
|
selectPendingUserInputQueue,
|
|
144
|
+
setDialogTurnPhase,
|
|
132
145
|
tokenUsageLiveUpdate
|
|
133
|
-
} from "./chunk-
|
|
134
|
-
import "./chunk-
|
|
146
|
+
} from "./chunk-BZ7NPA6G.js";
|
|
147
|
+
import "./chunk-4LCOCOR5.js";
|
|
135
148
|
import "./chunk-YDH3FDFQ.js";
|
|
136
|
-
import "./chunk-
|
|
149
|
+
import "./chunk-ADBZWMFB.js";
|
|
150
|
+
import "./chunk-VEYL5MO5.js";
|
|
137
151
|
import {
|
|
138
152
|
TOOL_PACKS,
|
|
139
153
|
addDefaultSystemCapabilityTools,
|
|
@@ -143,8 +157,10 @@ import {
|
|
|
143
157
|
expandEnabledPackPromptPatches,
|
|
144
158
|
expandEnabledPacks,
|
|
145
159
|
resolveEffectiveEnabledPacks
|
|
146
|
-
} from "./chunk-
|
|
147
|
-
import "./chunk-
|
|
160
|
+
} from "./chunk-WCGC6S77.js";
|
|
161
|
+
import "./chunk-WJ3B6FX6.js";
|
|
162
|
+
import "./chunk-AUDNYVRC.js";
|
|
163
|
+
import "./chunk-A4SQRTZ6.js";
|
|
148
164
|
import "./chunk-KHCLMKZZ.js";
|
|
149
165
|
import {
|
|
150
166
|
assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets,
|
|
@@ -153,108 +169,109 @@ import {
|
|
|
153
169
|
projectToolMessageContent,
|
|
154
170
|
resolveAgentContextWindow,
|
|
155
171
|
stripImagePartsForTextOnlyAgent
|
|
156
|
-
} from "./chunk-
|
|
157
|
-
import "./chunk-CQ3WA2NE.js";
|
|
172
|
+
} from "./chunk-LQ4PDQCI.js";
|
|
158
173
|
import "./chunk-5ZUL4CUO.js";
|
|
174
|
+
import "./chunk-CQ3WA2NE.js";
|
|
159
175
|
import "./chunk-N7J63Q6C.js";
|
|
160
|
-
import "./chunk-
|
|
176
|
+
import "./chunk-NNCYNBYV.js";
|
|
161
177
|
import {
|
|
162
178
|
extractImagePartsFromResponseOutput,
|
|
163
179
|
extractTextFromResponseOutput,
|
|
164
180
|
toResponsesTools
|
|
165
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-M7VLQGQP.js";
|
|
166
182
|
import {
|
|
167
183
|
resolveRuntimeToolSurfaceForAgent
|
|
168
|
-
} from "./chunk-
|
|
169
|
-
import "./chunk-
|
|
170
|
-
import "./chunk-UZGQNTVW.js";
|
|
171
|
-
import "./chunk-6OZ36FXI.js";
|
|
184
|
+
} from "./chunk-4YSOUKUR.js";
|
|
185
|
+
import "./chunk-H6A6X4EK.js";
|
|
172
186
|
import {
|
|
173
187
|
getModelContextWindow,
|
|
174
188
|
getModelInfo
|
|
175
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-LDCAFLXD.js";
|
|
176
190
|
import {
|
|
177
191
|
planContextUsage
|
|
178
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-7MMSLEPA.js";
|
|
193
|
+
import "./chunk-5MMAK75Q.js";
|
|
194
|
+
import "./chunk-BYXBJQAS.js";
|
|
195
|
+
import "./chunk-DWLEOOGR.js";
|
|
196
|
+
import "./chunk-XFUBXRVI.js";
|
|
197
|
+
import {
|
|
198
|
+
asRecordOrEmpty
|
|
199
|
+
} from "./chunk-KX6YBIHG.js";
|
|
179
200
|
import {
|
|
180
201
|
estimateTokenCount
|
|
181
202
|
} from "./chunk-PSCNXBYA.js";
|
|
203
|
+
import "./chunk-E73ON47R.js";
|
|
204
|
+
import "./chunk-UAD2WT54.js";
|
|
205
|
+
import {
|
|
206
|
+
patch,
|
|
207
|
+
read,
|
|
208
|
+
selectById,
|
|
209
|
+
write
|
|
210
|
+
} from "./chunk-4FFUDT6D.js";
|
|
211
|
+
import "./chunk-46Y5D2BZ.js";
|
|
212
|
+
import "./chunk-HNGRBWYF.js";
|
|
213
|
+
import {
|
|
214
|
+
buildLinkedSpacesSection,
|
|
215
|
+
buildSpaceContextLayer
|
|
216
|
+
} from "./chunk-HDLLCBRF.js";
|
|
217
|
+
import "./chunk-4VJAC32I.js";
|
|
218
|
+
import {
|
|
219
|
+
canonicalizeToolNames,
|
|
220
|
+
prioritizeToolNames
|
|
221
|
+
} from "./chunk-XUWRURDF.js";
|
|
222
|
+
import "./chunk-5J3PYNUP.js";
|
|
223
|
+
import "./chunk-EKPKW6RM.js";
|
|
224
|
+
import "./chunk-UA324D4O.js";
|
|
225
|
+
import "./chunk-27ONFIEY.js";
|
|
182
226
|
import {
|
|
183
227
|
isOpenAiResponsesModel
|
|
184
|
-
} from "./chunk-
|
|
185
|
-
import "./chunk-BYXBJQAS.js";
|
|
228
|
+
} from "./chunk-7KVZ5LDQ.js";
|
|
186
229
|
import {
|
|
187
230
|
getApiEndpoint,
|
|
188
231
|
getModelConfig,
|
|
189
232
|
getProviderByModelName
|
|
190
|
-
} from "./chunk-
|
|
191
|
-
import "./chunk-DWLEOOGR.js";
|
|
192
|
-
import "./chunk-HVURBGF3.js";
|
|
193
|
-
import "./chunk-ONXOABJR.js";
|
|
233
|
+
} from "./chunk-3BXNTXYI.js";
|
|
194
234
|
import "./chunk-W7XHHYWM.js";
|
|
195
235
|
import {
|
|
196
236
|
toErrorMessage
|
|
197
237
|
} from "./chunk-HNMXYYJR.js";
|
|
238
|
+
import "./chunk-CYSYR67N.js";
|
|
239
|
+
import "./chunk-Y3PMXGLH.js";
|
|
198
240
|
import {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
import "./chunk-2GRGFCF6.js";
|
|
241
|
+
asTrimmedLowercaseString
|
|
242
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
243
|
+
import "./chunk-PTDYOADJ.js";
|
|
203
244
|
import {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
import "./chunk-7S4YWN7P.js";
|
|
208
|
-
import "./chunk-ACTMNVHM.js";
|
|
209
|
-
import "./chunk-Q67DOFOO.js";
|
|
210
|
-
import "./chunk-BP4XNZRM.js";
|
|
245
|
+
selectRuntimeCurrentServer
|
|
246
|
+
} from "./chunk-UJXNKP5V.js";
|
|
247
|
+
import "./chunk-D2MDMY2M.js";
|
|
211
248
|
import {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
selectGlobalPrompt,
|
|
215
|
-
selectKnowledgeCaptureLevel,
|
|
216
|
-
selectMaxExecutionTime,
|
|
217
|
-
selectSpaceContextLevel,
|
|
218
|
-
selectUserTonePreset
|
|
219
|
-
} from "./chunk-AFUORTY4.js";
|
|
220
|
-
import "./chunk-Y5GCAMGP.js";
|
|
221
|
-
import "./chunk-QDSINZM3.js";
|
|
249
|
+
isSystemBuiltinTrustedAgentKey
|
|
250
|
+
} from "./chunk-BNGW5ASC.js";
|
|
222
251
|
import {
|
|
223
|
-
|
|
224
|
-
} from "./chunk-
|
|
225
|
-
import "./chunk-V4MJDUSR.js";
|
|
226
|
-
import "./chunk-UAD2WT54.js";
|
|
252
|
+
extractCustomId
|
|
253
|
+
} from "./chunk-M2EJHDJP.js";
|
|
227
254
|
import {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
255
|
+
isRecord
|
|
256
|
+
} from "./chunk-KUG52IAP.js";
|
|
257
|
+
import "./chunk-W72ISAKC.js";
|
|
258
|
+
import {
|
|
259
|
+
selectCurrentServer
|
|
260
|
+
} from "./chunk-NWENLDMM.js";
|
|
233
261
|
import {
|
|
234
262
|
asNonEmptyStringArray,
|
|
235
263
|
createDialogMessageKeyAndId,
|
|
236
264
|
dialogMessageKey,
|
|
237
265
|
metaKey
|
|
238
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-3AH7LNUB.js";
|
|
239
267
|
import {
|
|
240
268
|
asOptionalFiniteNumber
|
|
241
269
|
} from "./chunk-WWC7I6TA.js";
|
|
242
|
-
import "./chunk-
|
|
243
|
-
import "./chunk-QSJ3HFEF.js";
|
|
244
|
-
import "./chunk-WV42OMV7.js";
|
|
245
|
-
import {
|
|
246
|
-
isSystemBuiltinTrustedAgentKey
|
|
247
|
-
} from "./chunk-BNGW5ASC.js";
|
|
248
|
-
import {
|
|
249
|
-
extractCustomId
|
|
250
|
-
} from "./chunk-M2EJHDJP.js";
|
|
251
|
-
import {
|
|
252
|
-
selectRuntimeCurrentServer
|
|
253
|
-
} from "./chunk-UKWGR5SS.js";
|
|
270
|
+
import "./chunk-VY6VFGKR.js";
|
|
254
271
|
import {
|
|
255
272
|
getIsDesktopApp,
|
|
256
273
|
isAbortError
|
|
257
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-HIM3FCLF.js";
|
|
258
275
|
import "./chunk-OW765XBU.js";
|
|
259
276
|
import {
|
|
260
277
|
getSessionSnapshotForState,
|
|
@@ -263,14 +280,10 @@ import {
|
|
|
263
280
|
selectIdentityUserBalance,
|
|
264
281
|
selectIdentityUserId
|
|
265
282
|
} from "./chunk-SEJ5OS6F.js";
|
|
266
|
-
import "./chunk-
|
|
267
|
-
import {
|
|
268
|
-
isRecord
|
|
269
|
-
} from "./chunk-KUG52IAP.js";
|
|
283
|
+
import "./chunk-U6VC4MU4.js";
|
|
270
284
|
import {
|
|
271
285
|
asTrimmedString
|
|
272
286
|
} from "./chunk-3EUW3WEO.js";
|
|
273
|
-
import "./chunk-U6VC4MU4.js";
|
|
274
287
|
import "./chunk-LCBAMY2M.js";
|
|
275
288
|
import "./chunk-4SN6J65J.js";
|
|
276
289
|
import "./chunk-CF7PE763.js";
|
|
@@ -1788,6 +1801,8 @@ var buildRecentAppToolMemory = (messages, toolRuns) => {
|
|
|
1788
1801
|
// packages/ai/agent/streamAgentChatTurnUtils.ts
|
|
1789
1802
|
var BROWSER_UNAVAILABLE_CORE_TOOLS = {
|
|
1790
1803
|
createAgentAutomation: true,
|
|
1804
|
+
updateAgentAutomation: true,
|
|
1805
|
+
deleteAgentAutomation: true,
|
|
1791
1806
|
notifyUser: true
|
|
1792
1807
|
};
|
|
1793
1808
|
var getRuntimeCoreTools = () => {
|
|
@@ -2336,6 +2351,31 @@ var resolveImageGenerationStreamingState = (agentConfig, args) => {
|
|
|
2336
2351
|
};
|
|
2337
2352
|
};
|
|
2338
2353
|
|
|
2354
|
+
// packages/core/gptProTier.ts
|
|
2355
|
+
var GPT_PRO_REQUIRED_RECHARGE_AMOUNT = 199;
|
|
2356
|
+
function isGptProModel(provider, model) {
|
|
2357
|
+
const normalizedProvider = asTrimmedLowercaseString(provider);
|
|
2358
|
+
const normalizedModel = asTrimmedLowercaseString(model);
|
|
2359
|
+
if (normalizedProvider === "openai") {
|
|
2360
|
+
return /^gpt-[a-z0-9.-]+-pro(?:-|$)/.test(normalizedModel);
|
|
2361
|
+
}
|
|
2362
|
+
if (normalizedProvider === "deepinfra") {
|
|
2363
|
+
return normalizedModel.includes("claude") && (normalizedModel.includes("opus") || normalizedModel.includes("fable"));
|
|
2364
|
+
}
|
|
2365
|
+
if (normalizedProvider === "nolo") {
|
|
2366
|
+
return normalizedModel === "kimi-k3";
|
|
2367
|
+
}
|
|
2368
|
+
return false;
|
|
2369
|
+
}
|
|
2370
|
+
var GPT_PRO_BLOCKED_MESSAGE = `GPT Pro / Kimi K3 \u7B49\u9AD8\u7EA7\u6A21\u578B\u9700\u8981\u5148\u5F00\u901A ${GPT_PRO_REQUIRED_RECHARGE_AMOUNT} \u79EF\u5206\u6863\u4F4D\u3002`;
|
|
2371
|
+
function shouldBlockForGptPro(agent, gptProStatus) {
|
|
2372
|
+
if (!agent) return { blocked: false };
|
|
2373
|
+
if (agent.apiSource === "cli") return { blocked: false };
|
|
2374
|
+
if (!isGptProModel(agent.provider, agent.model)) return { blocked: false };
|
|
2375
|
+
if (gptProStatus === "active") return { blocked: false };
|
|
2376
|
+
return { blocked: true, message: GPT_PRO_BLOCKED_MESSAGE };
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2339
2379
|
// packages/ai/agent/persistMessageWithFixedId.ts
|
|
2340
2380
|
async function persistMessageWithFixedId(dispatch, message) {
|
|
2341
2381
|
dispatch(addUserMessage(message));
|
|
@@ -2418,6 +2458,7 @@ function normalizeDesktopAgentRuntimeTurnError(data) {
|
|
|
2418
2458
|
async function* runDesktopAgentRuntimeTurnStream({
|
|
2419
2459
|
fetchImpl = fetch,
|
|
2420
2460
|
signal,
|
|
2461
|
+
noEventWatchdogMs,
|
|
2421
2462
|
...args
|
|
2422
2463
|
}) {
|
|
2423
2464
|
try {
|
|
@@ -2474,7 +2515,13 @@ async function* runDesktopAgentRuntimeTurnStream({
|
|
|
2474
2515
|
yield { type: "error", error: "The operation was aborted." };
|
|
2475
2516
|
return;
|
|
2476
2517
|
}
|
|
2477
|
-
const { done, value } = await readStreamChunk(reader, {
|
|
2518
|
+
const { done, value } = await readStreamChunk(reader, {
|
|
2519
|
+
signal,
|
|
2520
|
+
...noEventWatchdogMs && noEventWatchdogMs > 0 ? {
|
|
2521
|
+
timeoutMs: noEventWatchdogMs,
|
|
2522
|
+
timeoutErrorMessage: `Desktop turn stream stalled: no event within ${noEventWatchdogMs}ms`
|
|
2523
|
+
} : {}
|
|
2524
|
+
});
|
|
2478
2525
|
if (done) break;
|
|
2479
2526
|
buffer += decoder.decode(value, { stream: true });
|
|
2480
2527
|
const lines = buffer.split("\n");
|
|
@@ -3048,6 +3095,28 @@ function hasInlineExecutedToolCalls(result) {
|
|
|
3048
3095
|
const output = result?.output;
|
|
3049
3096
|
return Array.isArray(output) && output.some((b) => b?.type === "toolCall" && b?.result != null);
|
|
3050
3097
|
}
|
|
3098
|
+
var COMPACTION_TIMEOUT_PATTERN = /compaction[^\n]{0,40}(timed\s*out|timeout|deadline)|(timed\s*out|timeout|deadline)[^\n]{0,40}compaction|summary[^\n]{0,30}(timed\s*out|timeout)/i;
|
|
3099
|
+
var DESKTOP_SSE_NO_EVENT_WATCHDOG_MS = 20 * 60 * 1e3;
|
|
3100
|
+
function classifyLocalTurnStreamError(errorText) {
|
|
3101
|
+
const text = typeof errorText === "string" ? errorText : "";
|
|
3102
|
+
if (COMPACTION_TIMEOUT_PATTERN.test(text)) {
|
|
3103
|
+
return {
|
|
3104
|
+
kind: "compaction_timeout",
|
|
3105
|
+
retryable: true,
|
|
3106
|
+
summary: "\u5386\u53F2\u538B\u7F29\u8D85\u65F6",
|
|
3107
|
+
actionHint: "\u5386\u53F2\u538B\u7F29\u672A\u80FD\u5728\u65F6\u9650\u5185\u5B8C\u6210\uFF0C\u672C\u56DE\u5408\u5DF2\u505C\u6B62\u3002\u4F60\u7684\u6D88\u606F\u4E0E\u9644\u4EF6\u5747\u5DF2\u4FDD\u7559\uFF1B\u53EF\u91CD\u8BD5\u3001\u5F00\u542F\u65B0\u5BF9\u8BDD\uFF0C\u6216\u5207\u6362\u5230\u66F4\u5927\u7A97\u53E3\u7684\u6A21\u578B\u3002\uFF08\u8D85\u65F6\u540E\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u540C\u4E00\u4ED8\u8D39\u8BF7\u6C42\u3002\uFF09"
|
|
3108
|
+
};
|
|
3109
|
+
}
|
|
3110
|
+
if (isContextOverflowText(text)) {
|
|
3111
|
+
return {
|
|
3112
|
+
kind: "context_overflow",
|
|
3113
|
+
retryable: true,
|
|
3114
|
+
summary: "\u4E0A\u4E0B\u6587\u8FC7\u957F",
|
|
3115
|
+
actionHint: "\u5F53\u524D\u4E0A\u4E0B\u6587\u8D85\u51FA\u6A21\u578B\u7A97\u53E3\u3002\u53EF\u81EA\u52A8\u538B\u7F29\u5E76\u91CD\u8BD5\u3001\u5F00\u542F\u65B0\u5BF9\u8BDD\uFF0C\u6216\u5207\u6362\u5230\u66F4\u5927\u7A97\u53E3\u7684\u6A21\u578B\u3002"
|
|
3116
|
+
};
|
|
3117
|
+
}
|
|
3118
|
+
return { kind: "generic", retryable: true, summary: "", actionHint: "" };
|
|
3119
|
+
}
|
|
3051
3120
|
function createRemoteToolEventHandlers(opts) {
|
|
3052
3121
|
const { dialogId, dispatch, messageMetadata } = opts;
|
|
3053
3122
|
const activeToolMessages = /* @__PURE__ */ new Map();
|
|
@@ -3182,6 +3251,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3182
3251
|
thunkApi.signal.addEventListener("abort", onAbort);
|
|
3183
3252
|
let loopKey = null;
|
|
3184
3253
|
let runtimeDialogKey = explicitDialogKey ?? null;
|
|
3254
|
+
let turnPhaseTurnId = null;
|
|
3185
3255
|
let remoteTransientMessageId = null;
|
|
3186
3256
|
let remoteTransientMessageFinalized = false;
|
|
3187
3257
|
let modelRequestStarted = false;
|
|
@@ -3290,8 +3360,10 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3290
3360
|
const configuredBoundMachineId = asTrimmedString(
|
|
3291
3361
|
agentConfig.runtimeBinding?.machineId
|
|
3292
3362
|
);
|
|
3293
|
-
const
|
|
3294
|
-
|
|
3363
|
+
const currentDialog = selectDialogConfigByKey(state, explicitDialogKey) ?? selectCurrentDialogConfig(state);
|
|
3364
|
+
const explicitTarget = runtimeOptions?.runtimeTarget ?? (currentDialog?.runtimeBinding?.target?.kind === "server" || currentDialog?.runtimeBinding?.target?.kind === "machine" ? currentDialog.runtimeBinding.target : void 0);
|
|
3365
|
+
const boundMachineId = explicitTarget ? explicitTarget.kind === "machine" ? asTrimmedString(explicitTarget.machineId) : null : resolveRemoteBoundMachineId(configuredBoundMachineId);
|
|
3366
|
+
if (agentConfig.apiSource === "cli" && !explicitTarget || boundMachineId && !getIsDesktopApp()) {
|
|
3295
3367
|
console.info("[streamAgentChatTurn] Triggered CLI/machine route. apiSource:", agentConfig.apiSource, "boundMachineId:", boundMachineId, "agentKey:", agentKey);
|
|
3296
3368
|
const currentState = getState();
|
|
3297
3369
|
const w2 = typeof globalThis !== "undefined" && globalThis.window ? globalThis.window : null;
|
|
@@ -3375,6 +3447,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3375
3447
|
stream: true,
|
|
3376
3448
|
persistDialog: false,
|
|
3377
3449
|
clientDialogId: dialogId2,
|
|
3450
|
+
...explicitTarget ? { runtimeTarget: explicitTarget } : {},
|
|
3378
3451
|
runtimeContext: {
|
|
3379
3452
|
surface: "web",
|
|
3380
3453
|
host: "browser",
|
|
@@ -3722,7 +3795,6 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3722
3795
|
}
|
|
3723
3796
|
return;
|
|
3724
3797
|
}
|
|
3725
|
-
const currentDialog = selectDialogConfigByKey(state, explicitDialogKey) ?? selectCurrentDialogConfig(state);
|
|
3726
3798
|
const activeDialogKey = currentDialog?.dbKey;
|
|
3727
3799
|
const dialogKey = explicitDialogKey || activeDialogKey;
|
|
3728
3800
|
if (!dialogKey) {
|
|
@@ -3739,6 +3811,8 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3739
3811
|
const w2 = typeof globalThis !== "undefined" && globalThis.window ? globalThis.window : null;
|
|
3740
3812
|
loopKey = `loop:${dialogId}`;
|
|
3741
3813
|
dispatch(addActiveController({ messageId: loopKey, controller: loopController, dialogKey }));
|
|
3814
|
+
turnPhaseTurnId = `turn-phase:${dialogId}:${Date.now().toString(36)}:${Math.random().toString(36).slice(2, 8)}`;
|
|
3815
|
+
claimDialogTurnPhase({ dialogKey, turnId: turnPhaseTurnId });
|
|
3742
3816
|
let currentContent = "";
|
|
3743
3817
|
const assistantSegments = [];
|
|
3744
3818
|
let assistantMessageKeys = null;
|
|
@@ -3811,7 +3885,18 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3811
3885
|
workspaceToolsHint: runtimeOptions?.workspaceToolsHint === true,
|
|
3812
3886
|
agentConfigSnapshot: agentConfig,
|
|
3813
3887
|
dialogMessages: selectAllMsgs(getState(), dialogId),
|
|
3814
|
-
signal: loopController.signal
|
|
3888
|
+
signal: loopController.signal,
|
|
3889
|
+
// SSE 传输层兜底(review 修复 4):此前本调用方从不传
|
|
3890
|
+
// noEventWatchdogMs,watchdog 永远关闭——「已有安全网」只是
|
|
3891
|
+
// 错觉,挂起点若在 provider.complete 之外(resolveProvider /
|
|
3892
|
+
// adapter 内部,runtime 没有任何 deadline)就会无限静默。
|
|
3893
|
+
// 量级必须大于 runtime 自己的 idle 窗(默认 10 分钟无新输出
|
|
3894
|
+
// 才放弃,见 localLoop.DEFAULT_LLM_REQUEST_TIMEOUT_MS),
|
|
3895
|
+
// 否则一个健康的慢思考轮次会被客户端提前判死,用户拿到的是
|
|
3896
|
+
// 未分类的 "stream stalled" 而不是 runtime 的
|
|
3897
|
+
// LLM_REQUEST_TIMEOUT 可操作文案。取 2× = 20 分钟:
|
|
3898
|
+
// 只兜「runtime 完全没 deadline」的真悬挂。
|
|
3899
|
+
noEventWatchdogMs: DESKTOP_SSE_NO_EVENT_WATCHDOG_MS
|
|
3815
3900
|
});
|
|
3816
3901
|
for await (const event of eventStream) {
|
|
3817
3902
|
if (loopController.signal.aborted || thunkApi.signal.aborted) {
|
|
@@ -3884,6 +3969,9 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
3884
3969
|
dispatch(messageStreaming(toolResultMsg));
|
|
3885
3970
|
}
|
|
3886
3971
|
}
|
|
3972
|
+
} else if (event.type === "status") {
|
|
3973
|
+
const phase = event.phase === "validating-context" ? "validating" : event.phase;
|
|
3974
|
+
setDialogTurnPhase({ phase, dialogKey, turnId: turnPhaseTurnId ?? void 0 });
|
|
3887
3975
|
} else if (event.type === "done") {
|
|
3888
3976
|
streamResult = event.result;
|
|
3889
3977
|
} else if (event.type === "error") {
|
|
@@ -4015,8 +4103,12 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
4015
4103
|
setLoopStopReason("error");
|
|
4016
4104
|
};
|
|
4017
4105
|
if (streamError) {
|
|
4018
|
-
|
|
4019
|
-
|
|
4106
|
+
const info = classifyLocalTurnStreamError(streamError);
|
|
4107
|
+
const finalError = info.actionHint ? `${streamError}
|
|
4108
|
+
|
|
4109
|
+
${info.actionHint}` : streamError;
|
|
4110
|
+
await finalizeDesktopTurnOnError(finalError);
|
|
4111
|
+
return rejectWithValue(finalError);
|
|
4020
4112
|
}
|
|
4021
4113
|
if (!streamResult) {
|
|
4022
4114
|
const message = "Local turn stream closed unexpectedly without result";
|
|
@@ -4190,6 +4282,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
4190
4282
|
stream: true,
|
|
4191
4283
|
persistDialog: false,
|
|
4192
4284
|
clientDialogId: dialogId,
|
|
4285
|
+
...explicitTarget ? { runtimeTarget: explicitTarget } : {},
|
|
4193
4286
|
runtimeContext: {
|
|
4194
4287
|
surface: "web",
|
|
4195
4288
|
host: "browser",
|
|
@@ -4982,6 +5075,7 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
4982
5075
|
error?.message || "An unexpected error occurred in streamAgentChatTurn."
|
|
4983
5076
|
);
|
|
4984
5077
|
} finally {
|
|
5078
|
+
clearDialogTurnPhase({ dialogKey: runtimeDialogKey ?? void 0, turnId: turnPhaseTurnId ?? void 0 });
|
|
4985
5079
|
if (loopKey && runtimeDialogKey) {
|
|
4986
5080
|
dispatch(removeActiveController({ messageId: loopKey, dialogKey: runtimeDialogKey }));
|
|
4987
5081
|
} else if (loopKey) {
|
|
@@ -5001,5 +5095,6 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
|
|
|
5001
5095
|
}
|
|
5002
5096
|
};
|
|
5003
5097
|
export {
|
|
5098
|
+
classifyLocalTurnStreamError,
|
|
5004
5099
|
streamAgentChatTurnHandler
|
|
5005
5100
|
};
|
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
formatISO
|
|
3
|
+
} from "./chunk-ZRAU6T47.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
getActiveDialogKey
|
|
6
|
+
} from "./chunk-BZ7NPA6G.js";
|
|
7
|
+
import "./chunk-4LCOCOR5.js";
|
|
7
8
|
import "./chunk-YDH3FDFQ.js";
|
|
8
9
|
import {
|
|
9
10
|
patch,
|
|
10
11
|
selectById
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-WWC7I6TA.js";
|
|
14
|
-
import "./chunk-ABQYVJBJ.js";
|
|
12
|
+
} from "./chunk-4FFUDT6D.js";
|
|
13
|
+
import "./chunk-46Y5D2BZ.js";
|
|
15
14
|
import "./chunk-QSJ3HFEF.js";
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-PTDYOADJ.js";
|
|
16
|
+
import "./chunk-UJXNKP5V.js";
|
|
17
|
+
import "./chunk-D2MDMY2M.js";
|
|
17
18
|
import "./chunk-BNGW5ASC.js";
|
|
18
19
|
import "./chunk-M2EJHDJP.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KUG52IAP.js";
|
|
21
|
+
import "./chunk-3AH7LNUB.js";
|
|
22
|
+
import "./chunk-WWC7I6TA.js";
|
|
23
|
+
import "./chunk-VY6VFGKR.js";
|
|
24
|
+
import "./chunk-HIM3FCLF.js";
|
|
21
25
|
import "./chunk-OW765XBU.js";
|
|
22
26
|
import "./chunk-SEJ5OS6F.js";
|
|
23
|
-
import "./chunk-GBRG75BQ.js";
|
|
24
|
-
import "./chunk-KUG52IAP.js";
|
|
25
|
-
import "./chunk-3EUW3WEO.js";
|
|
26
27
|
import "./chunk-U6VC4MU4.js";
|
|
28
|
+
import "./chunk-3EUW3WEO.js";
|
|
27
29
|
import "./chunk-LCBAMY2M.js";
|
|
28
30
|
import "./chunk-4SN6J65J.js";
|
|
29
31
|
import "./chunk-CF7PE763.js";
|
|
30
32
|
import "./chunk-G3SUCT4W.js";
|
|
31
|
-
import
|
|
32
|
-
__toESM
|
|
33
|
-
} from "./chunk-4VNS5WPM.js";
|
|
33
|
+
import "./chunk-4VNS5WPM.js";
|
|
34
34
|
|
|
35
35
|
// packages/chat/dialog/actions/switchDialogAgentAction.ts
|
|
36
|
-
var import_date_fns = __toESM(require_date_fns());
|
|
37
36
|
var switchDialogAgentAction = async (payload, thunkApi) => {
|
|
38
37
|
const { dispatch, getState } = thunkApi;
|
|
39
38
|
const state = getState();
|
|
@@ -50,7 +49,7 @@ var switchDialogAgentAction = async (payload, thunkApi) => {
|
|
|
50
49
|
}
|
|
51
50
|
const changes = {
|
|
52
51
|
activeAgentKey: payload.agentKey.trim(),
|
|
53
|
-
updatedAt:
|
|
52
|
+
updatedAt: formatISO(/* @__PURE__ */ new Date())
|
|
54
53
|
};
|
|
55
54
|
return await dispatch(
|
|
56
55
|
patch({
|
|
@@ -5,27 +5,27 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
toErrorMessage
|
|
7
7
|
} from "./chunk-HNMXYYJR.js";
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_NOLO_SERVER_URL
|
|
10
|
+
} from "./chunk-OLZBQWZU.js";
|
|
8
11
|
import {
|
|
9
12
|
getCurrentProfile,
|
|
10
13
|
getDefaultProfileConfigPath,
|
|
11
14
|
loadProfileConfig
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TNIX77YM.js";
|
|
13
16
|
import {
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
asTrimmedLowercaseString
|
|
18
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
19
|
+
import {
|
|
20
|
+
isRecord
|
|
21
|
+
} from "./chunk-KUG52IAP.js";
|
|
16
22
|
import {
|
|
17
23
|
asOptionalFiniteNumber
|
|
18
24
|
} from "./chunk-WWC7I6TA.js";
|
|
19
|
-
import {
|
|
20
|
-
asTrimmedLowercaseString
|
|
21
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
22
25
|
import {
|
|
23
26
|
getAllServers
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-HIM3FCLF.js";
|
|
25
28
|
import "./chunk-OW765XBU.js";
|
|
26
|
-
import {
|
|
27
|
-
isRecord
|
|
28
|
-
} from "./chunk-KUG52IAP.js";
|
|
29
29
|
import {
|
|
30
30
|
NOLO_CLUSTER_SERVERS
|
|
31
31
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
getToolRequestContext,
|
|
8
8
|
resolveToolApiBaseUrl,
|
|
9
9
|
resolveToolBaseUrl
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-HP57OUJO.js";
|
|
11
|
+
import "./chunk-BZ7NPA6G.js";
|
|
12
12
|
import "./chunk-YDH3FDFQ.js";
|
|
13
13
|
import "./chunk-DWLEOOGR.js";
|
|
14
14
|
import "./chunk-QSJ3HFEF.js";
|
|
15
15
|
import "./chunk-M2EJHDJP.js";
|
|
16
|
-
import "./chunk-SEJ5OS6F.js";
|
|
17
16
|
import "./chunk-KUG52IAP.js";
|
|
17
|
+
import "./chunk-SEJ5OS6F.js";
|
|
18
18
|
import "./chunk-4VNS5WPM.js";
|
|
19
19
|
export {
|
|
20
20
|
ToolApiError,
|