nolo-cli 0.228.0-alpha.1 → 0.228.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 +3 -5
- package/{_executeModel-WZKT6XEU.js → _executeModel-GIFVXKDT.js} +89 -82
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-GDZDXPMB.js → action-WZTKEF5H.js} +9 -6
- package/{addContentAction-7RO4AMRI.js → addContentAction-MLI6GOBV.js} +14 -13
- package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-ARGQM22H.js} +17 -16
- package/{agentDeleteCommand-PZWRHNXY.js → agentDeleteCommand-UF7XVELS.js} +120 -111
- package/{agentEmailCommands-QTKMEICX.js → agentEmailCommands-SFHRPQYC.js} +120 -107
- package/agentListCommands-IXKBP3W5.js +644 -0
- package/{agentMachineCommands-7QGICJLM.js → agentMachineCommands-7NX6PWQ6.js} +56 -48
- package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-C5T7C5KZ.js} +2 -2
- package/{agentPullCommand-KHV4EELF.js → agentPullCommand-4EQZYHU4.js} +1 -1
- package/agentRecordCommands-IUNX6XD6.js +188 -0
- package/{agentRunCommand-OFQLOF5Y.js → agentRunCommand-LCR4XADM.js} +127 -111
- package/{agentRunControl-MBG4U6SL.js → agentRunControl-RN2P6AOD.js} +11 -9
- package/{agentRuntimeLocal-TU4LA353.js → agentRuntimeLocal-LVXPQ7QA.js} +57 -43
- package/{agentSlice-L4SBGWTB.js → agentSlice-ZGMOH6TE.js} +15 -14
- package/{appDeleteCommands-JWP3XPUA.js → appDeleteCommands-BESCJOQM.js} +56 -48
- package/{appDeployCommands-6E4TQCWI.js → appDeployCommands-LPTR6IOX.js} +56 -48
- package/{appDeployStatusCommands-ALU4SADG.js → appDeployStatusCommands-BZ7KZ5RD.js} +56 -48
- package/{appGetCommands-JEY4L6L4.js → appGetCommands-EDWGJV4S.js} +56 -48
- package/{appListCommands-PCAVHU7M.js → appListCommands-OPRWYPM6.js} +56 -48
- package/{authCommand-CGRIIOOV.js → authCommand-3C3RN4OU.js} +25 -19
- package/{authCommands-55OGQGCR.js → authCommands-ZMVEDCQD.js} +12 -6
- package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-VRCMQ77Q.js} +7 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
- package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-NZITLHWO.js} +3 -3
- package/{chunk-AUAJTAFM.js → chunk-2BKNICGK.js} +4 -4
- package/{chunk-QYB23WUH.js → chunk-2FK2KZSL.js} +1 -1
- package/chunk-2SXN7LAY.js +15 -0
- package/{chunk-H6L2NFHY.js → chunk-3DJJ4CFG.js} +11 -11
- package/{chunk-TSPMLCWI.js → chunk-4IQN6FWY.js} +5 -5
- package/{chunk-GUXZK7SE.js → chunk-4OXPN3WC.js} +17 -6
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-3P54D2E4.js → chunk-5HUO7SEX.js} +9 -107
- package/chunk-6ASGEP5D.js +21 -0
- package/{chunk-DDC6P6EH.js → chunk-6CXQ3YNJ.js} +68 -40
- package/{chunk-G7IUT2V3.js → chunk-6MTVACLN.js} +365 -64
- package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
- package/{chunk-XSW4EXQV.js → chunk-6TVYUQRM.js} +55 -18
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-7Z6EW7AH.js → chunk-6XVPMGXK.js} +97 -11
- package/{chunk-ALAES342.js → chunk-73PZD7JZ.js} +9 -5
- package/{chunk-2MCB7CD7.js → chunk-7UVVLYKC.js} +9 -9
- package/{chunk-S6FDXXZV.js → chunk-ADOOL3PG.js} +2 -2
- package/{chunk-OWKNSIXL.js → chunk-AEZBAFC6.js} +334 -77
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-RG2DGNL6.js → chunk-ARFCL53U.js} +5 -5
- package/{chunk-SRCCSTIM.js → chunk-AS6L5KSD.js} +4 -4
- package/{chunk-GPOV42YM.js → chunk-BAH3BAUZ.js} +8 -8
- package/{chunk-N5Z2V73W.js → chunk-BFKJ2RS3.js} +1 -1
- package/{chunk-F6Z6ZCUV.js → chunk-BVEDT6DM.js} +3 -3
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-CD3RU7XL.js → chunk-CD2DK5JA.js} +120 -14
- package/{chunk-BP5ZJ6B4.js → chunk-CD64YXRB.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-CIGCTSBF.js} +31 -1
- package/{chunk-D6YNCNM6.js → chunk-CIUZXD5D.js} +12 -12
- package/{chunk-EVGU5P4U.js → chunk-CO6E7YK6.js} +1 -1
- package/{chunk-VMJVAJ6W.js → chunk-CTIEJRTP.js} +28 -4
- package/{chunk-7JGMNKKG.js → chunk-CTWCZKNS.js} +29 -8
- package/{chunk-YFLVRVYK.js → chunk-D25ONVOH.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-262R3XNN.js → chunk-E5RYFR7E.js} +334 -103
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/{chunk-HSSBDZLD.js → chunk-EDT65EUE.js} +6 -6
- package/{chunk-IAAIUH64.js → chunk-EQZQUQ33.js} +7 -7
- package/{chunk-HBRDSQ3M.js → chunk-ESN4WNWU.js} +3 -2
- package/{chunk-2YGBI2XB.js → chunk-FE7G6DSP.js} +11 -1
- package/{chunk-547ENH5T.js → chunk-FFFKAOJN.js} +4 -4
- package/{chunk-5ZUOVCKT.js → chunk-FGHEF6WI.js} +3 -1
- package/{chunk-IXG6YXQM.js → chunk-FTWAOKFU.js} +795 -361
- package/chunk-GAHJLSDO.js +107 -0
- package/{chunk-2X7WFDT6.js → chunk-GX6DITLQ.js} +1 -1
- package/{chunk-GYS5FUYR.js → chunk-HCCQEMTK.js} +28 -28
- package/{chunk-CMMI3DAT.js → chunk-HZDK56EK.js} +33 -26
- package/{chunk-UE2EVEYS.js → chunk-IIOSZAJX.js} +4 -4
- package/chunk-IIRJ4P4I.js +24 -0
- package/{chunk-QCB42576.js → chunk-IJZC2KIJ.js} +1 -1
- package/{chunk-RYOLWYBK.js → chunk-ITBX27W6.js} +97 -21
- package/{chunk-VSYTM22R.js → chunk-J2VIGDJN.js} +6 -6
- package/{chunk-QBZCGP34.js → chunk-JEWMQR6J.js} +1 -1
- package/{chunk-6QHKRARD.js → chunk-JFRJEPFI.js} +29 -5
- package/{chunk-S6K5F3KP.js → chunk-JP2BH4NC.js} +1 -1
- package/{chunk-MDZWUD3R.js → chunk-JU7VN4LF.js} +38 -29
- package/{chunk-RTHFJZ6M.js → chunk-K26XPZRB.js} +2 -2
- package/{chunk-ZYKJBRZ3.js → chunk-K7VIXYTZ.js} +1 -3
- package/chunk-KK3FCYZM.js +647 -0
- package/chunk-KLAMJNKQ.js +33394 -0
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/chunk-KXOPLLFP.js +190 -0
- package/{chunk-GOCSSER3.js → chunk-KZ5OD2MO.js} +4 -4
- package/{chunk-ILHQ2AXT.js → chunk-KZAT2M2V.js} +14 -8
- package/chunk-LHCGKAFO.js +739 -0
- package/{chunk-XJPLSAPJ.js → chunk-LMGFVH65.js} +107 -104
- package/{chunk-QRGDJA4B.js → chunk-LTVEOOZL.js} +19 -6
- package/{chunk-L32W3PRP.js → chunk-MAA42MMV.js} +233 -17
- package/{chunk-ATEKLSLR.js → chunk-MTM4LRVG.js} +14 -9
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-2NPD3FTX.js → chunk-MYYNZG2M.js} +139 -39
- package/{chunk-DBUR22G5.js → chunk-MZVCFV3T.js} +19 -15
- package/{chunk-K67C2JUC.js → chunk-N74XL3NI.js} +9 -9
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-RBPUNSG5.js → chunk-OAZP4TSA.js} +18 -108
- package/{chunk-SMJEXX2S.js → chunk-ODBYGVO2.js} +232 -10
- package/{chunk-M4SFKP5L.js → chunk-OHUYN3YU.js} +3 -3
- package/{chunk-HYLRQDEE.js → chunk-OLGFIQN2.js} +6 -6
- package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-BIWI5M4E.js → chunk-PBPXXMWZ.js} +1 -1
- package/{chunk-OBSEKCVK.js → chunk-PQ63BDV3.js} +210 -51
- package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
- package/{chunk-OG6MQOQG.js → chunk-QMNVV3YM.js} +10 -37
- package/{chunk-GACR7H6T.js → chunk-R5NRFXGD.js} +5 -5
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-4WVJLODK.js → chunk-RHBD22LV.js} +9 -4
- package/{chunk-EXJK7TQO.js → chunk-RMWDKLBE.js} +1520 -562
- package/{chunk-TGNIKIHR.js → chunk-RR3MB26M.js} +2 -2
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-STJ6LSQE.js → chunk-SCMYAGQE.js} +1135 -712
- package/{chunk-YKY4OVOX.js → chunk-SPU3L3OR.js} +17 -170
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-DUUDXSLX.js → chunk-SX6AWTNK.js} +28 -4
- package/{chunk-ZH3KXFHS.js → chunk-TMRJGSK2.js} +1 -1
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/{chunk-3U44JB3O.js → chunk-UF6J7NXV.js} +1 -1
- package/{chunk-Q3IVPFVO.js → chunk-UHW6SCVK.js} +1 -1
- package/chunk-UOUMPHS5.js +103 -0
- package/{chunk-HHFGE2WF.js → chunk-UPOW5HTG.js} +5 -5
- package/{chunk-DEA37IUY.js → chunk-V4IYI3SB.js} +2 -2
- package/{chunk-UWAIJOF2.js → chunk-VKCPKCSS.js} +66 -92
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-OBIC6EG7.js → chunk-VUHKG4KS.js} +3 -3
- package/{chunk-EEOOBRA7.js → chunk-W3HSD32M.js} +13 -6
- package/{chunk-P2ZLUIW2.js → chunk-W6T4FNZP.js} +351 -26
- package/chunk-WDWZPASX.js +29 -0
- package/chunk-WFGNWWJI.js +326 -0
- package/{chunk-R6Z5S5GA.js → chunk-WQDTSK5U.js} +51 -14
- package/{chunk-OYU2MA5S.js → chunk-X22AUZKL.js} +152 -167
- package/{chunk-4ZGPHFLE.js → chunk-X3OZ655T.js} +2 -2
- package/{chunk-NHY322ZU.js → chunk-XCA4WHX5.js} +588 -64
- package/{chunk-TI2EPRHE.js → chunk-XJSEST7D.js} +3 -3
- package/{chunk-JUSHVFNF.js → chunk-XNTZD4AE.js} +1230 -1356
- package/chunk-XSRSAU3O.js +133 -0
- package/{chunk-CYWNWA77.js → chunk-Y4NPF2UN.js} +6 -3
- package/{chunk-FJSNBZXR.js → chunk-YDRRGVT5.js} +1 -1
- package/{chunk-R3NEQZ53.js → chunk-YFW4H6DL.js} +405 -338
- package/{chunk-BNMPUQW6.js → chunk-YGDYYFRX.js} +20 -24
- package/{chunk-4N6G2CKP.js → chunk-YHNUDTU4.js} +49 -3
- package/chunk-YJPK35HB.js +175 -0
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-AGYPUBFW.js → chunk-Z7KE4K3H.js} +195 -123
- package/{chunk-DGYCDA6W.js → chunk-ZM5AZTQG.js} +20 -13
- package/{chunk-CBUZ6DKA.js → chunk-ZQ6K57FJ.js} +1 -1
- package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-37ZNEY5Y.js} +9 -9
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliLocalAgentRecordReader-M3F76NIP.js → cliLocalAgentRecordReader-MCQVRWBR.js} +59 -47
- package/{commandRegistry-ZLWHQVAI.js → commandRegistry-NTH5IAN5.js} +104 -92
- package/{contentThunks-4ZX2TO7C.js → contentThunks-SPXTX5U2.js} +38 -36
- package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-TIFCHCUN.js} +1 -1
- package/{createAgentAutomationAction-L4CYUZJG.js → createAgentAutomationAction-KUQKCOXB.js} +38 -36
- package/{createDialogAction-QTU2R2Q3.js → createDialogAction-HJN5U3XS.js} +39 -37
- package/{createPageAction-F3GJTHW2.js → createPageAction-ZAHRDOAU.js} +43 -41
- package/{db-M7FU2GNK.js → db-CMUTP3W5.js} +2 -2
- package/{dbSlice-XRUZOGSU.js → dbSlice-656PMWR2.js} +13 -12
- package/{deleteFile-6URDHYRB.js → deleteFile-ZCQESEEQ.js} +10 -7
- package/{dialogCommands-NRLCOPJR.js → dialogCommands-KZTZLWPZ.js} +61 -54
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-PST75COP.js} +11 -11
- package/{dialogSlice-P2S4LXQD.js → dialogSlice-BXIERQHO.js} +39 -37
- package/{dialogUsageCommand-W2WCSGKF.js → dialogUsageCommand-6RW2FY6K.js} +5 -5
- package/{docCreateCommands-YJRDA3RX.js → docCreateCommands-26HJ5NAY.js} +55 -47
- package/{docDeleteCommands-A5QIHZNF.js → docDeleteCommands-UAOHH5XK.js} +57 -49
- package/{docReadCommands-CF2LTMYH.js → docReadCommands-4ADG7YE6.js} +55 -47
- package/{docStore-6O7NYL6A.js → docStore-FZ75HWP2.js} +15 -14
- package/{docUpdateCommands-QRKV4ZXE.js → docUpdateCommands-OGFJZENF.js} +55 -47
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-FCHYVRJU.js} +4 -4
- package/{handleSendMessageAction-7IHLR37A.js → handleSendMessageAction-KP6GGBFY.js} +84 -79
- package/{hostCredentialCreate-VNCQUAFT.js → hostCredentialCreate-23TX56G7.js} +119 -105
- package/index.js +8 -8
- package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
- package/{localDialogRead-CCOCVGAP.js → localDialogRead-CIOTQM5T.js} +1 -1
- package/{localRuntimeAdapter-FOWVNMIK.js → localRuntimeAdapter-MTUWOYPN.js} +126 -111
- package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-TYHQCTZN.js} +5 -3
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-BO7IVWAZ.js} +1 -1
- package/{machineCommands-ZGC3J4JB.js → machineCommands-4WJUJQHW.js} +260 -323
- package/{machineWsRunDispatch-KK5U4M3G.js → machineWsRunDispatch-V3U4JM67.js} +115 -102
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/mcpLocalAuthorizeCommand-TI656UWC.js +106 -0
- package/{memberThunks-7Y3OYSJQ.js → memberThunks-JFYC4Z5L.js} +20 -15
- package/{models-H5NNZRLH.js → models-EP7VG6N2.js} +2 -2
- package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
- package/package.json +1 -1
- package/{projectArchive-7ZDYBXAX.js → projectArchive-NU2Z5HOR.js} +45 -43
- package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-4H7YP5D7.js} +6 -6
- package/{providerRegistry-ZI2KORJ7.js → providerRegistry-F3UPOTIY.js} +6 -6
- package/{read-TYMBGEXO.js → read-BRZHXUJ6.js} +9 -8
- package/{readDocTool-SKQVHBLO.js → readDocTool-N7RVFQEE.js} +1 -1
- package/{readlineWorkspace-YHT4SX2C.js → readlineWorkspace-T56MRMS5.js} +6426 -3669
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-J7XU7OUX.js} +19 -18
- package/{runAgentClientLoop-H4ED5V3K.js → runAgentClientLoop-O2GRCGRZ.js} +97 -75
- package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-RDRJXMXC.js} +8 -8
- package/{secretCommands-KZWBZIYS.js → secretCommands-2FEMRUFM.js} +3 -3
- package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-Q4V2ZZW2.js} +16 -15
- package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-742H5S6T.js} +19 -18
- package/{settingThunks-ZRGWVGZD.js → settingThunks-T4FXSV6M.js} +185 -66
- package/{skillDiscovery-I37M5KJC.js → skillDiscovery-MDDKPTW3.js} +4 -3
- package/{spaceCommands-MEH3HJBC.js → spaceCommands-W5TAVFDT.js} +59 -51
- package/{streamAgentChatTurn-ZXPOXU33.js → streamAgentChatTurn-OWDJMU5E.js} +238 -178
- package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-HLDLHRRA.js} +17 -16
- package/{tableCommands-FTAOCBTX.js → tableCommands-44GC4N6J.js} +8 -5
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-2MRWA2PP.js → tools-O7SGGVA3.js} +67 -62
- package/{tuiRestart-2IL37YIB.js → tuiRestart-EOGC2BYY.js} +10 -10
- package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-TM5BU73J.js} +16 -15
- package/{updateCommands-CPATDG6J.js → updateCommands-FBYA5WVG.js} +3 -3
- package/{updateDialogTitleAction-RZ3KZSGQ.js → updateDialogTitleAction-EXSZGTLL.js} +40 -38
- package/{usageCommand-2BF74MKF.js → usageCommand-L4OFWXEU.js} +2 -2
- package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-7JR33UHS.js} +3 -3
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-M4V77OUB.js} +2 -2
- package/workContext-Y3ADAPZU.js +14 -0
- package/workContextAccess-VU5I4LKZ.js +11 -0
- package/workContextWriteNotice-YCSSMHN4.js +7 -0
- package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-ZCSQCHG3.js} +2 -2
- package/agentListCommands-GUGMORTK.js +0 -1005
- package/agentRecordCommands-SLLADS5C.js +0 -175
- package/chunk-2WZXXAQD.js +0 -57
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-ZXF6D3I6.js +0 -359
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- /package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
|
@@ -1,75 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildStaticUserPolicyContext,
|
|
3
|
-
resolveSpaceContextPreloadPlan
|
|
4
|
-
} from "./chunk-ZXF6D3I6.js";
|
|
5
1
|
import {
|
|
6
2
|
fetchReferenceContents,
|
|
7
3
|
mergeReferences,
|
|
8
4
|
resolveReferenceAssets,
|
|
9
5
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JU7VN4LF.js";
|
|
11
7
|
import {
|
|
12
8
|
UI_CARD_ENVELOPE_MAX_BYTES,
|
|
13
9
|
getAllToolRuns,
|
|
14
10
|
parseUiCard,
|
|
15
|
-
selectAiRecentContentLimit,
|
|
16
|
-
selectGlobalPrompt,
|
|
17
|
-
selectKnowledgeCaptureLevel,
|
|
18
|
-
selectSpaceContextLevel,
|
|
19
|
-
selectUserTonePreset,
|
|
20
11
|
uiCardFallback
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
resolveToolBaseUrl
|
|
24
|
-
} from "./chunk-4JVNURX4.js";
|
|
12
|
+
} from "./chunk-LMGFVH65.js";
|
|
25
13
|
import {
|
|
26
14
|
getDocState
|
|
27
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-J2VIGDJN.js";
|
|
28
16
|
import {
|
|
29
17
|
getTableState
|
|
30
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HCCQEMTK.js";
|
|
19
|
+
import {
|
|
20
|
+
selectAllMsgs
|
|
21
|
+
} from "./chunk-YFW4H6DL.js";
|
|
31
22
|
import {
|
|
32
23
|
getCurrentSpaceIdRaw,
|
|
33
24
|
getViewMode
|
|
34
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FFFKAOJN.js";
|
|
35
26
|
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
selectAllMsgs
|
|
39
|
-
} from "./chunk-R3NEQZ53.js";
|
|
27
|
+
selectById
|
|
28
|
+
} from "./chunk-HZDK56EK.js";
|
|
40
29
|
import {
|
|
41
|
-
|
|
42
|
-
} from "./chunk-
|
|
30
|
+
resolveToolBaseUrl
|
|
31
|
+
} from "./chunk-KQHEGELM.js";
|
|
43
32
|
import {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} from "./chunk-CMMI3DAT.js";
|
|
33
|
+
selectPendingFiles
|
|
34
|
+
} from "./chunk-U35UUM5K.js";
|
|
47
35
|
import {
|
|
48
36
|
getSessionSnapshotForState,
|
|
49
37
|
selectIdentityUserBalance,
|
|
50
38
|
selectIdentityUserId
|
|
51
39
|
} from "./chunk-PXYBUFDB.js";
|
|
52
|
-
import {
|
|
53
|
-
getFinalPrice,
|
|
54
|
-
getModelPricing,
|
|
55
|
-
getPrices,
|
|
56
|
-
hasExplicitAgentPricing
|
|
57
|
-
} from "./chunk-SRCCSTIM.js";
|
|
58
40
|
import {
|
|
59
41
|
projectToolMessageContent
|
|
60
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-WFGNWWJI.js";
|
|
61
43
|
import {
|
|
62
44
|
resolveAgentRecommendedSkillNames,
|
|
63
45
|
resolveAgentRequiredPackIds
|
|
64
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-YDRRGVT5.js";
|
|
65
47
|
import {
|
|
66
48
|
attachmentKind,
|
|
67
49
|
extractReferenceKeysFromMessage,
|
|
68
50
|
normalizeAttachmentPart
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import {
|
|
71
|
-
getModelContextWindow
|
|
72
|
-
} from "./chunk-L32W3PRP.js";
|
|
51
|
+
} from "./chunk-LTVEOOZL.js";
|
|
73
52
|
import {
|
|
74
53
|
asRecordOrEmpty
|
|
75
54
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -82,40 +61,43 @@ import {
|
|
|
82
61
|
applyDefaultWebToolPacks,
|
|
83
62
|
applyDisabledTools,
|
|
84
63
|
applySystemBuiltinSkillFilter,
|
|
64
|
+
dedupeSkillPromptPatches,
|
|
85
65
|
expandEnabledPackPromptPatches,
|
|
86
66
|
expandEnabledPacks,
|
|
87
67
|
resolveEffectiveEnabledPacks
|
|
88
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-6MTVACLN.js";
|
|
69
|
+
import {
|
|
70
|
+
metaKey
|
|
71
|
+
} from "./chunk-SYTHYBMI.js";
|
|
89
72
|
import {
|
|
90
73
|
canonicalizeToolNames,
|
|
91
74
|
prioritizeToolNames
|
|
92
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-YLAHYLDQ.js";
|
|
93
76
|
import {
|
|
94
77
|
extractCustomId
|
|
95
78
|
} from "./chunk-M2EJHDJP.js";
|
|
96
|
-
import {
|
|
97
|
-
metaKey
|
|
98
|
-
} from "./chunk-SYTHYBMI.js";
|
|
99
79
|
import {
|
|
100
80
|
asNonEmptyStringArray
|
|
101
81
|
} from "./chunk-I42VC5KR.js";
|
|
102
82
|
import {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
83
|
+
getFinalPrice,
|
|
84
|
+
getModelPricing,
|
|
85
|
+
getPrices,
|
|
86
|
+
hasExplicitAgentPricing
|
|
87
|
+
} from "./chunk-AS6L5KSD.js";
|
|
106
88
|
import {
|
|
107
89
|
asTrimmedString
|
|
108
90
|
} from "./chunk-3EUW3WEO.js";
|
|
91
|
+
import {
|
|
92
|
+
asOptionalFiniteNumber
|
|
93
|
+
} from "./chunk-WWC7I6TA.js";
|
|
109
94
|
import {
|
|
110
95
|
getModelConfig,
|
|
111
96
|
getProviderByModelName
|
|
112
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-CD2DK5JA.js";
|
|
113
98
|
import {
|
|
114
99
|
isRecord
|
|
115
100
|
} from "./chunk-KUG52IAP.js";
|
|
116
|
-
import {
|
|
117
|
-
asOptionalFiniteNumber
|
|
118
|
-
} from "./chunk-WWC7I6TA.js";
|
|
119
101
|
import {
|
|
120
102
|
asOptionalTrimmedString
|
|
121
103
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -356,12 +338,12 @@ function parseShellToolTextContent(content) {
|
|
|
356
338
|
...typeof exitCode === "number" && Number.isFinite(exitCode) ? { exitCode } : {}
|
|
357
339
|
};
|
|
358
340
|
}
|
|
359
|
-
function resolveShellCommand(
|
|
360
|
-
return asOptionalTrimmedString(
|
|
341
|
+
function resolveShellCommand(metadata2, argumentsPreview) {
|
|
342
|
+
return asOptionalTrimmedString(metadata2.command) || asOptionalTrimmedString(metadata2.cmd) || asOptionalTrimmedString(argumentsPreview) || "";
|
|
361
343
|
}
|
|
362
344
|
function projectDesktopToolUiContent(args) {
|
|
363
345
|
const toolName = asOptionalTrimmedString(args.toolName) || "tool";
|
|
364
|
-
const
|
|
346
|
+
const metadata2 = isRecord(args.metadata) ? args.metadata : {};
|
|
365
347
|
const rawContent = typeof args.content === "string" ? args.content : typeof args.summary === "string" ? args.summary : typeof args.message === "string" ? args.message : "";
|
|
366
348
|
if (toolName === "show_interaction") {
|
|
367
349
|
try {
|
|
@@ -388,36 +370,36 @@ function projectDesktopToolUiContent(args) {
|
|
|
388
370
|
if (toolName === "execShell") {
|
|
389
371
|
const existing = tryParseJsonRecord(rawContent);
|
|
390
372
|
if (existing && (typeof existing.stdout === "string" || typeof existing.command === "string" || typeof existing.stderr === "string")) {
|
|
391
|
-
const command2 = asOptionalTrimmedString(existing.command) || resolveShellCommand(
|
|
373
|
+
const command2 = asOptionalTrimmedString(existing.command) || resolveShellCommand(metadata2, args.argumentsPreview);
|
|
392
374
|
return JSON.stringify({
|
|
393
375
|
...existing,
|
|
394
376
|
command: command2,
|
|
395
|
-
cwd: asOptionalTrimmedString(existing.cwd) || asOptionalTrimmedString(
|
|
396
|
-
exitCode: asOptionalFiniteNumber(existing.exitCode) ?? asOptionalFiniteNumber(
|
|
377
|
+
cwd: asOptionalTrimmedString(existing.cwd) || asOptionalTrimmedString(metadata2.cwd) || null,
|
|
378
|
+
exitCode: asOptionalFiniteNumber(existing.exitCode) ?? asOptionalFiniteNumber(metadata2.exitCode)
|
|
397
379
|
});
|
|
398
380
|
}
|
|
399
381
|
const parsed = parseShellToolTextContent(rawContent);
|
|
400
|
-
const command = resolveShellCommand(
|
|
382
|
+
const command = resolveShellCommand(metadata2, args.argumentsPreview);
|
|
401
383
|
return JSON.stringify({
|
|
402
384
|
command,
|
|
403
|
-
cwd: asOptionalTrimmedString(
|
|
385
|
+
cwd: asOptionalTrimmedString(metadata2.cwd) || null,
|
|
404
386
|
stdout: clipUiText(parsed.stdout),
|
|
405
387
|
stderr: clipUiText(parsed.stderr),
|
|
406
|
-
exitCode: asOptionalFiniteNumber(
|
|
407
|
-
timedOut:
|
|
408
|
-
blocked:
|
|
388
|
+
exitCode: asOptionalFiniteNumber(metadata2.exitCode) ?? parsed.exitCode,
|
|
389
|
+
timedOut: metadata2.timedOut === true,
|
|
390
|
+
blocked: metadata2.blocked === true
|
|
409
391
|
});
|
|
410
392
|
}
|
|
411
393
|
if (toolName === "readFile" || toolName === "read_file") {
|
|
412
|
-
const filePath = asOptionalTrimmedString(
|
|
394
|
+
const filePath = asOptionalTrimmedString(metadata2.path) || asOptionalTrimmedString(metadata2.filePath) || asOptionalTrimmedString(metadata2.file_path) || asOptionalTrimmedString(args.argumentsPreview) || "";
|
|
413
395
|
const body = typeof args.content === "string" && args.content || typeof args.summary === "string" && args.summary || typeof args.message === "string" && args.message || "";
|
|
414
396
|
return JSON.stringify({
|
|
415
397
|
filePath,
|
|
416
398
|
content: clipUiText(body),
|
|
417
|
-
...asOptionalFiniteNumber(
|
|
418
|
-
...asOptionalFiniteNumber(
|
|
419
|
-
...asOptionalFiniteNumber(
|
|
420
|
-
...
|
|
399
|
+
...asOptionalFiniteNumber(metadata2.startLine) != null ? { startLine: asOptionalFiniteNumber(metadata2.startLine) } : {},
|
|
400
|
+
...asOptionalFiniteNumber(metadata2.endLine) != null ? { endLine: asOptionalFiniteNumber(metadata2.endLine) } : {},
|
|
401
|
+
...asOptionalFiniteNumber(metadata2.totalLines) != null ? { totalLines: asOptionalFiniteNumber(metadata2.totalLines) } : {},
|
|
402
|
+
...metadata2.truncated === true ? { truncated: true } : {}
|
|
421
403
|
});
|
|
422
404
|
}
|
|
423
405
|
const preferred = typeof args.content === "string" && args.content || typeof args.summary === "string" && args.summary || typeof args.message === "string" && args.message || "";
|
|
@@ -633,17 +615,26 @@ var deduplicateContextKeys = (keys) => {
|
|
|
633
615
|
};
|
|
634
616
|
};
|
|
635
617
|
|
|
618
|
+
// packages/ai/policy/runtimePolicy.ts
|
|
619
|
+
var buildStaticUserPolicyContext = (params) => {
|
|
620
|
+
return [
|
|
621
|
+
"\u4E3B\u52A8\u53D1\u73B0\u503C\u5F97\u4FDD\u5B58\u7684\u7ED3\u679C\u5E76\u63D0\u51FA\u7B80\u77ED\u5177\u4F53\u7684\u5EFA\u8BAE\uFF1B\u6301\u4E45\u4FDD\u5B58\u524D\u6309\u73B0\u6709\u6743\u9650\u8FB9\u754C\u53D6\u5F97\u7528\u6237\u540C\u610F\uFF0C\u5DF2\u6709\u660E\u786E\u6388\u6743\u6309\u5176\u8303\u56F4\u6267\u884C\u3002",
|
|
622
|
+
"\u6309\u4EFB\u52A1\u9700\u8981\u8BFB\u53D6\u5F53\u524D\u5DF2\u6388\u6743\u7A7A\u95F4\u7684\u5FC5\u8981\u5185\u5BB9\uFF1B\u9075\u5B88\u672C\u8F6E\u4E0D\u8BFB\u8981\u6C42\uFF0C\u8BBF\u95EE\u88AB\u62D2\u7EDD\u65F6\u505C\u6B62\uFF0C\u4E0D\u7ED5\u8FC7\u6743\u9650\u3002",
|
|
623
|
+
"\u8BF7\u5C3D\u91CF\u4FDD\u7559 agent \u81EA\u8EAB\u89D2\u8272\u8BBE\u5B9A\uFF0C\u540C\u65F6\u6309\u7528\u6237\u504F\u597D\u8C03\u6574\u8868\u8FBE\u548C\u81EA\u52A8\u5316\u7A0B\u5EA6\u3002"
|
|
624
|
+
].join("\n");
|
|
625
|
+
};
|
|
626
|
+
|
|
636
627
|
// packages/ai/agent/canvasEditingContext.ts
|
|
637
628
|
function buildCanvasNodeEditingContextSummary(runtimeOptions) {
|
|
638
629
|
if (runtimeOptions?.editingTarget?.kind !== "canvas_node") return null;
|
|
639
630
|
const editingTarget = runtimeOptions.editingTarget;
|
|
640
|
-
const
|
|
641
|
-
const selectedNodeId = typeof
|
|
642
|
-
const part = typeof
|
|
643
|
-
const nodeType = typeof
|
|
644
|
-
const path = Array.isArray(
|
|
645
|
-
const props = asRecordOrEmpty(
|
|
646
|
-
const style = asRecordOrEmpty(
|
|
631
|
+
const metadata2 = editingTarget.metadata ?? {};
|
|
632
|
+
const selectedNodeId = typeof metadata2.selectedNodeId === "string" ? metadata2.selectedNodeId : editingTarget.key ?? "(\u672A\u77E5\u8282\u70B9)";
|
|
633
|
+
const part = typeof metadata2.part === "string" ? metadata2.part : editingTarget.title ?? selectedNodeId;
|
|
634
|
+
const nodeType = typeof metadata2.type === "string" ? metadata2.type : "(\u672A\u77E5\u7C7B\u578B)";
|
|
635
|
+
const path = Array.isArray(metadata2.path) ? metadata2.path.filter((item) => typeof item === "string") : [];
|
|
636
|
+
const props = asRecordOrEmpty(metadata2.props);
|
|
637
|
+
const style = asRecordOrEmpty(metadata2.style);
|
|
647
638
|
return [
|
|
648
639
|
"\u5F53\u524D\u7F16\u8F91\u76EE\u6807\uFF1ACanvas Tree \u4E2D\u7684\u4E00\u4E2A\u9009\u4E2D\u8282\u70B9\u3002",
|
|
649
640
|
`- \u8282\u70B9 ID: ${selectedNodeId}`,
|
|
@@ -768,9 +759,9 @@ var formatAppConstraintPacks = (packs) => {
|
|
|
768
759
|
};
|
|
769
760
|
function resolveEditingTargetTableIdentity(editingTarget) {
|
|
770
761
|
if (!editingTarget || editingTarget.kind !== "table") return null;
|
|
771
|
-
const
|
|
772
|
-
const tenantId = typeof editingTarget.tenantId === "string" && editingTarget.tenantId || typeof
|
|
773
|
-
const tableId = typeof editingTarget.tableId === "string" && editingTarget.tableId || typeof
|
|
762
|
+
const metadata2 = editingTarget.metadata;
|
|
763
|
+
const tenantId = typeof editingTarget.tenantId === "string" && editingTarget.tenantId || typeof metadata2?.tenantId === "string" && metadata2.tenantId || void 0;
|
|
764
|
+
const tableId = typeof editingTarget.tableId === "string" && editingTarget.tableId || typeof metadata2?.tableId === "string" && metadata2.tableId || void 0;
|
|
774
765
|
if (!tenantId || !tableId) return null;
|
|
775
766
|
return { tenantId, tableId };
|
|
776
767
|
}
|
|
@@ -805,8 +796,8 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
|
|
|
805
796
|
(entity) => entity?.type === "table_row" /* TABLE_ROW */ && entity?.tenantId === tenantId && entity?.tableId === tableId && !entity?.deletedAt
|
|
806
797
|
);
|
|
807
798
|
}
|
|
808
|
-
const
|
|
809
|
-
const focusContext =
|
|
799
|
+
const metadata2 = editingTarget?.metadata;
|
|
800
|
+
const focusContext = metadata2 && typeof metadata2 === "object" ? metadata2.focusContext : null;
|
|
810
801
|
if (!table) return null;
|
|
811
802
|
const columns = Array.isArray(table.columns) ? table.columns : [];
|
|
812
803
|
const columnSummaries = columns.length ? columns.map((c) => {
|
|
@@ -857,8 +848,8 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
|
|
|
857
848
|
}
|
|
858
849
|
if (targetKind === "page" || targetKind === "article") {
|
|
859
850
|
const page = getDocState();
|
|
860
|
-
const
|
|
861
|
-
const focusContext =
|
|
851
|
+
const metadata2 = runtimeOptions?.editingTarget?.metadata;
|
|
852
|
+
const focusContext = metadata2 && typeof metadata2 === "object" ? metadata2.focusContext : null;
|
|
862
853
|
if (!page) return null;
|
|
863
854
|
const title = page.title ?? "(\u672A\u547D\u540D\u9875\u9762)";
|
|
864
855
|
return [
|
|
@@ -879,17 +870,17 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
|
|
|
879
870
|
}
|
|
880
871
|
if (targetKind === "app") {
|
|
881
872
|
const editingTarget = runtimeOptions?.editingTarget;
|
|
882
|
-
const
|
|
873
|
+
const metadata2 = editingTarget?.metadata;
|
|
883
874
|
const appId = editingTarget?.key ?? "(\u672A\u77E5 appId)";
|
|
884
875
|
const title = editingTarget?.title ?? "(\u672A\u547D\u540D\u5E94\u7528)";
|
|
885
|
-
const framework = typeof
|
|
886
|
-
const appUrl = typeof
|
|
887
|
-
const fileNames = Array.isArray(
|
|
888
|
-
const externalImports = Array.isArray(
|
|
876
|
+
const framework = typeof metadata2?.framework === "string" ? metadata2.framework : "worker";
|
|
877
|
+
const appUrl = typeof metadata2?.appUrl === "string" ? metadata2.appUrl : null;
|
|
878
|
+
const fileNames = Array.isArray(metadata2?.fileNames) ? metadata2.fileNames.filter((name) => typeof name === "string") : [];
|
|
879
|
+
const externalImports = Array.isArray(metadata2?.externalImports) ? metadata2.externalImports.filter(
|
|
889
880
|
(name) => typeof name === "string"
|
|
890
881
|
) : [];
|
|
891
882
|
const sourceSummary = asOptionalTrimmedString(editingTarget?.summary) ?? null;
|
|
892
|
-
const selectedNode =
|
|
883
|
+
const selectedNode = metadata2 && typeof metadata2 === "object" && metadata2.selectedNode && typeof metadata2.selectedNode === "object" ? metadata2.selectedNode : null;
|
|
893
884
|
const constraintPacks = buildAppConstraintPacks({
|
|
894
885
|
framework,
|
|
895
886
|
fileNames,
|
|
@@ -942,8 +933,8 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
|
|
|
942
933
|
].join("\n");
|
|
943
934
|
}
|
|
944
935
|
if (targetKind === "local_preview") {
|
|
945
|
-
const
|
|
946
|
-
const selectedNode =
|
|
936
|
+
const metadata2 = runtimeOptions?.editingTarget?.metadata;
|
|
937
|
+
const selectedNode = metadata2 && typeof metadata2 === "object" && metadata2.selectedNode && typeof metadata2.selectedNode === "object" ? metadata2.selectedNode : null;
|
|
947
938
|
if (!selectedNode) return null;
|
|
948
939
|
const readString = (key) => typeof selectedNode[key] === "string" ? selectedNode[key] : "";
|
|
949
940
|
const tagName = readString("tagName") || "\u5143\u7D20";
|
|
@@ -966,12 +957,12 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
|
|
|
966
957
|
}
|
|
967
958
|
if (targetKind === "image" || targetKind === "file") {
|
|
968
959
|
const editingTarget = runtimeOptions?.editingTarget;
|
|
969
|
-
const
|
|
960
|
+
const metadata2 = editingTarget?.metadata;
|
|
970
961
|
const title = editingTarget?.title ?? "(\u672A\u547D\u540D\u5BF9\u8C61)";
|
|
971
962
|
const objectKey = editingTarget?.key ?? "(\u672A\u77E5 key)";
|
|
972
|
-
const fileId = typeof
|
|
973
|
-
const url = typeof
|
|
974
|
-
const size = typeof
|
|
963
|
+
const fileId = typeof metadata2?.fileId === "string" ? metadata2.fileId : null;
|
|
964
|
+
const url = typeof metadata2?.url === "string" ? metadata2.url : null;
|
|
965
|
+
const size = typeof metadata2?.size === "number" ? metadata2.size : null;
|
|
975
966
|
return [
|
|
976
967
|
`\u5F53\u524D\u7F16\u8F91\u76EE\u6807\uFF1A\u4E00\u4E2A${targetKind === "image" ? "\u56FE\u7247" : "\u6587\u4EF6"}\u5BF9\u8C61\uFF08Editing ${targetKind === "image" ? "Image" : "File"}\uFF09\u3002`,
|
|
977
968
|
`- \u5BF9\u8C61 key: ${objectKey}`,
|
|
@@ -989,10 +980,10 @@ var buildEditingContextSummary = (state, runtimeOptions) => {
|
|
|
989
980
|
}
|
|
990
981
|
if (targetKind === "artifact" || targetKind === "html_artifact") {
|
|
991
982
|
const editingTarget = runtimeOptions?.editingTarget;
|
|
992
|
-
const
|
|
993
|
-
const artifactId = typeof editingTarget?.key === "string" && editingTarget.key ? editingTarget.key : typeof
|
|
994
|
-
const title = editingTarget?.title ?? (typeof
|
|
995
|
-
const dialogKey = typeof
|
|
983
|
+
const metadata2 = editingTarget?.metadata;
|
|
984
|
+
const artifactId = typeof editingTarget?.key === "string" && editingTarget.key ? editingTarget.key : typeof metadata2?.artifactId === "string" ? metadata2.artifactId : typeof editingTarget?.artifactId === "string" ? editingTarget.artifactId : null;
|
|
985
|
+
const title = editingTarget?.title ?? (typeof metadata2?.title === "string" ? metadata2.title : "HTML \u7F51\u9875\u6210\u54C1");
|
|
986
|
+
const dialogKey = typeof metadata2?.dialogKey === "string" ? metadata2.dialogKey : typeof editingTarget?.dialogKey === "string" ? editingTarget.dialogKey : null;
|
|
996
987
|
return [
|
|
997
988
|
"\u5F53\u524D\u7F16\u8F91\u76EE\u6807\uFF1A\u5355\u6587\u4EF6 HTML \u7F51\u9875\u6210\u54C1\uFF08Editing HTML Artifact\uFF09\u3002",
|
|
998
989
|
...artifactId ? [`- \u6210\u54C1 ID (artifactId): ${artifactId}`] : ["- \u6210\u54C1 ID: (\u65B0\u5EFA\u4E2D\u6216\u672A\u6307\u5B9A)"],
|
|
@@ -1130,18 +1121,13 @@ var compressOldToolResults = (messages) => {
|
|
|
1130
1121
|
const content = typeof msg.content === "string" ? msg.content : JSON.stringify(msg.content);
|
|
1131
1122
|
const projected = projectToolMessageContent({
|
|
1132
1123
|
content,
|
|
1133
|
-
toolName: msg.name
|
|
1124
|
+
toolName: msg.name,
|
|
1125
|
+
metadata: msg.tool_result_metadata
|
|
1134
1126
|
});
|
|
1135
1127
|
if (projected === content) return msg;
|
|
1136
1128
|
return { ...msg, content: projected };
|
|
1137
1129
|
});
|
|
1138
1130
|
};
|
|
1139
|
-
var createDbSliceTurnContextSource = (dispatch) => ({
|
|
1140
|
-
readRecord: async (dbKey) => {
|
|
1141
|
-
const result = await dispatch(read({ dbKey })).unwrap();
|
|
1142
|
-
return result ?? null;
|
|
1143
|
-
}
|
|
1144
|
-
});
|
|
1145
1131
|
var joinMapValues = (map) => Array.from(map.values()).join("");
|
|
1146
1132
|
var formatCurrentInputContext = (pendingFiles, currentInputMap) => {
|
|
1147
1133
|
if (pendingFiles.length === 0 || currentInputMap.size === 0) {
|
|
@@ -1294,55 +1280,14 @@ var buildStaticContexts = async (state, dispatch, agentConfig, dialogConfig, ref
|
|
|
1294
1280
|
fetchReferences(finalKeys.botInstructionsContext),
|
|
1295
1281
|
fetchReferences(finalKeys.botKnowledgeContext)
|
|
1296
1282
|
]);
|
|
1297
|
-
const
|
|
1298
|
-
const
|
|
1299
|
-
const knowledgeCaptureLevel = selectKnowledgeCaptureLevel(state);
|
|
1300
|
-
const spaceContextLevel = selectSpaceContextLevel(state);
|
|
1301
|
-
const userRecentLimit = selectAiRecentContentLimit(state);
|
|
1302
|
-
const contextWindow = getModelContextWindow(agentConfig.model) || 128e3;
|
|
1303
|
-
const preloadPlan = resolveSpaceContextPreloadPlan(spaceContextLevel);
|
|
1304
|
-
const dynamicLimit = Math.floor(contextWindow * preloadPlan.preloadBudgetRatio / 150);
|
|
1305
|
-
const recentLimit = preloadPlan.includeRecentContent ? Math.max(3, Math.min(userRecentLimit, Math.max(3, dynamicLimit))) : 0;
|
|
1306
|
-
const turnContextSource = createDbSliceTurnContextSource(dispatch);
|
|
1307
|
-
let spaceContext = null;
|
|
1308
|
-
if (spaceContextLevel > 1) {
|
|
1309
|
-
const spaceLayer = await buildSpaceContextLayer({
|
|
1310
|
-
source: turnContextSource,
|
|
1311
|
-
spaceId: dialogConfig?.spaceId,
|
|
1312
|
-
recentContentLimit: recentLimit
|
|
1313
|
-
});
|
|
1314
|
-
spaceContext = spaceLayer ? spaceLayer.content.trim() : null;
|
|
1315
|
-
}
|
|
1316
|
-
const linkedSpaceIds = agentConfig.linkedSpaces || [];
|
|
1317
|
-
if (linkedSpaceIds.length > 0 && spaceContextLevel > 1) {
|
|
1318
|
-
const linkedSection = await buildLinkedSpacesSection({
|
|
1319
|
-
source: turnContextSource,
|
|
1320
|
-
linkedSpaceIds
|
|
1321
|
-
});
|
|
1322
|
-
if (linkedSection) {
|
|
1323
|
-
spaceContext = (spaceContext ?? "") + `
|
|
1324
|
-
|
|
1325
|
-
${linkedSection}`;
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
const dialogPolicyContext = dialogConfig?.category === PERSONALIZATION_DIALOG_CATEGORY ? buildPersonalizationDialogPolicyContext() : null;
|
|
1283
|
+
const spaceContext = null;
|
|
1284
|
+
const globalPrompt = null;
|
|
1329
1285
|
return {
|
|
1330
1286
|
botInstructionsContext: joinMapValues(botInstructionsMap),
|
|
1331
1287
|
botKnowledgeContext: joinMapValues(botKnowledgeMap),
|
|
1332
1288
|
spaceContext,
|
|
1333
1289
|
userGlobalPrompt: globalPrompt,
|
|
1334
|
-
userPolicyContext:
|
|
1335
|
-
buildStaticUserPolicyContext({
|
|
1336
|
-
agentConfig,
|
|
1337
|
-
settingsRecord: {
|
|
1338
|
-
userTonePreset,
|
|
1339
|
-
knowledgeCaptureLevel,
|
|
1340
|
-
spaceContextLevel,
|
|
1341
|
-
enableReadCurrentSpace: spaceContextLevel > 1
|
|
1342
|
-
}
|
|
1343
|
-
}),
|
|
1344
|
-
dialogPolicyContext
|
|
1345
|
-
].filter(Boolean).join("\n")
|
|
1290
|
+
userPolicyContext: buildStaticUserPolicyContext({ agentConfig })
|
|
1346
1291
|
};
|
|
1347
1292
|
};
|
|
1348
1293
|
var buildDynamicContexts = async (state, dispatch, agentConfig, userInput, runtimeOptions, referenceContentCache, dialogKey) => {
|
|
@@ -1453,15 +1398,21 @@ var mergeAgentToolsWithRuntime = (agentConfig, referencedTools, mentionedTools,
|
|
|
1453
1398
|
...userSkills?.recommendedSkillHints ?? []
|
|
1454
1399
|
])
|
|
1455
1400
|
];
|
|
1401
|
+
const runtimeBaseSkillPromptContributions = agentConfig.runtimeBaseSkillPromptContributions ?? agentConfig.skillPromptContributions ?? [];
|
|
1402
|
+
const runtimeBaseSkillPromptPatches = agentConfig.runtimeBaseSkillPromptPatches ?? (agentConfig.skillPromptContributions !== void 0 ? [] : asNonEmptyStringArray(agentConfig.skillPromptPatches));
|
|
1403
|
+
const skillPromptContributions = dedupeSkillPromptPatches([
|
|
1404
|
+
...runtimeBaseSkillPromptContributions,
|
|
1405
|
+
...userSkills?.skillPromptContributions ?? []
|
|
1406
|
+
]);
|
|
1456
1407
|
const skillPromptPatches = [
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
]
|
|
1408
|
+
...runtimeBaseSkillPromptPatches,
|
|
1409
|
+
// 能力包的 promptPatch(方法论文档)与 skill reference 的 patch 走同一条
|
|
1410
|
+
// 注入链(buildSkillGuidanceBlock → buildSkillGuidancePromptBlock),
|
|
1411
|
+
// 让「工具 + 配套纪律」作为一个能力包整体注入 system prompt。
|
|
1412
|
+
...expandEnabledPackPromptPatches(effectiveEnabledPacks),
|
|
1413
|
+
...skillPromptContributions.map((patch) => patch.content),
|
|
1414
|
+
// Legacy callers with no identity metadata remain unmodified prose.
|
|
1415
|
+
...userSkills?.skillPromptContributions === void 0 ? userSkillPromptPatches : []
|
|
1465
1416
|
];
|
|
1466
1417
|
const webPadded = applyDefaultWebToolPacks({
|
|
1467
1418
|
toolNames: baseTools,
|
|
@@ -1506,7 +1457,10 @@ var mergeAgentToolsWithRuntime = (agentConfig, referencedTools, mentionedTools,
|
|
|
1506
1457
|
),
|
|
1507
1458
|
recommendedSkillTools,
|
|
1508
1459
|
recommendedSkillHints,
|
|
1509
|
-
skillPromptPatches
|
|
1460
|
+
skillPromptPatches,
|
|
1461
|
+
runtimeBaseSkillPromptPatches,
|
|
1462
|
+
runtimeBaseSkillPromptContributions,
|
|
1463
|
+
skillPromptContributions
|
|
1510
1464
|
};
|
|
1511
1465
|
};
|
|
1512
1466
|
var applyImageConfigRuntimeOverride = (agentConfig, runtimeOptions) => {
|
|
@@ -1717,7 +1671,8 @@ async function resolveTurnToolContext(input) {
|
|
|
1717
1671
|
referencedTools: refAssets.referencedTools,
|
|
1718
1672
|
recommendedSkillTools: refAssets.recommendedSkillTools,
|
|
1719
1673
|
recommendedSkillHints: refAssets.recommendedSkillHints,
|
|
1720
|
-
skillPromptPatches: refAssets.skillPromptPatches
|
|
1674
|
+
skillPromptPatches: refAssets.skillPromptPatches,
|
|
1675
|
+
skillPromptContributions: refAssets.skillPromptContributions
|
|
1721
1676
|
};
|
|
1722
1677
|
const keySets = await getFullChatContextKeys(
|
|
1723
1678
|
input.state,
|
|
@@ -1774,10 +1729,11 @@ async function resolveTurnToolContext(input) {
|
|
|
1774
1729
|
...refAssets.recommendedSkillHints ?? [],
|
|
1775
1730
|
...contextToolsResult.recommendedSkillHints ?? []
|
|
1776
1731
|
];
|
|
1777
|
-
const
|
|
1778
|
-
...refAssets.
|
|
1779
|
-
...contextToolsResult.
|
|
1780
|
-
];
|
|
1732
|
+
const skillPromptContributions = dedupeSkillPromptPatches([
|
|
1733
|
+
...refAssets.skillPromptContributions ?? [],
|
|
1734
|
+
...contextToolsResult.skillPromptContributions ?? []
|
|
1735
|
+
]);
|
|
1736
|
+
const skillPromptPatches = skillPromptContributions.map((patch) => patch.content);
|
|
1781
1737
|
return {
|
|
1782
1738
|
referencedToolNames,
|
|
1783
1739
|
attachmentToolNames,
|
|
@@ -1790,6 +1746,7 @@ async function resolveTurnToolContext(input) {
|
|
|
1790
1746
|
recommendedSkillTools,
|
|
1791
1747
|
recommendedSkillHints,
|
|
1792
1748
|
skillPromptPatches,
|
|
1749
|
+
skillPromptContributions,
|
|
1793
1750
|
referenceContentCache: refAssets.contentByKey,
|
|
1794
1751
|
mergedContentCache: new Map([
|
|
1795
1752
|
...refAssets.contentByKey,
|
|
@@ -1800,14 +1757,21 @@ async function resolveTurnToolContext(input) {
|
|
|
1800
1757
|
|
|
1801
1758
|
// packages/app/utils/desktopActionGateChannel.ts
|
|
1802
1759
|
function targetForRunKind(kind, ctx = {}) {
|
|
1803
|
-
if (kind === "server-run"
|
|
1804
|
-
return {
|
|
1760
|
+
if (kind === "server-run") {
|
|
1761
|
+
return {
|
|
1762
|
+
kind: "web",
|
|
1763
|
+
server: ctx.server?.trim() ?? "",
|
|
1764
|
+
token: ctx.token ?? null
|
|
1765
|
+
};
|
|
1805
1766
|
}
|
|
1806
1767
|
return { kind: "desktop" };
|
|
1807
1768
|
}
|
|
1808
1769
|
var NEEDS_LOGIN_MESSAGE = "\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
|
|
1770
|
+
var MISSING_SERVER_MESSAGE = "\u672A\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740\uFF0C\u65E0\u6CD5\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
|
|
1809
1771
|
var gates = /* @__PURE__ */ new Map();
|
|
1810
1772
|
var targets = /* @__PURE__ */ new Map();
|
|
1773
|
+
var failures = /* @__PURE__ */ new Map();
|
|
1774
|
+
var metadata = /* @__PURE__ */ new Map();
|
|
1811
1775
|
var errors = /* @__PURE__ */ new Map();
|
|
1812
1776
|
var listeners = /* @__PURE__ */ new Set();
|
|
1813
1777
|
var cachedSnapshot = null;
|
|
@@ -1822,22 +1786,42 @@ function notify() {
|
|
|
1822
1786
|
}
|
|
1823
1787
|
}
|
|
1824
1788
|
}
|
|
1825
|
-
function pushGate(gate, target = { kind: "desktop" }) {
|
|
1789
|
+
function pushGate(gate, target = { kind: "desktop" }, meta) {
|
|
1826
1790
|
if (!gate || typeof gate.id !== "string" || gate.id.length === 0) return;
|
|
1827
|
-
|
|
1791
|
+
failures.delete(gate.id);
|
|
1792
|
+
if (target.kind === "web" && (!target.token || !target.server.trim())) {
|
|
1793
|
+
const message = !target.token ? NEEDS_LOGIN_MESSAGE : MISSING_SERVER_MESSAGE;
|
|
1794
|
+
if (meta) failures.set(gate.id, { gateId: gate.id, meta: { ...meta, storage: "web" }, message });
|
|
1828
1795
|
gates.delete(gate.id);
|
|
1829
1796
|
targets.delete(gate.id);
|
|
1830
|
-
|
|
1797
|
+
metadata.delete(gate.id);
|
|
1798
|
+
errors.set(gate.id, message);
|
|
1831
1799
|
invalidateSnapshot();
|
|
1832
1800
|
notify();
|
|
1833
1801
|
return;
|
|
1834
1802
|
}
|
|
1803
|
+
metadata.delete(gate.id);
|
|
1804
|
+
if (meta && target.kind !== "local") metadata.set(gate.id, { ...meta, storage: target.kind });
|
|
1835
1805
|
errors.delete(gate.id);
|
|
1836
1806
|
targets.set(gate.id, target);
|
|
1837
1807
|
gates.set(gate.id, gate);
|
|
1838
1808
|
invalidateSnapshot();
|
|
1839
1809
|
notify();
|
|
1840
1810
|
}
|
|
1811
|
+
function clearGateTurn(turnId) {
|
|
1812
|
+
for (const [id, failure] of failures) {
|
|
1813
|
+
if (failure.meta.turnId === turnId) failures.delete(id);
|
|
1814
|
+
}
|
|
1815
|
+
for (const [id, meta] of metadata) {
|
|
1816
|
+
if (meta.turnId !== turnId) continue;
|
|
1817
|
+
gates.delete(id);
|
|
1818
|
+
targets.delete(id);
|
|
1819
|
+
metadata.delete(id);
|
|
1820
|
+
errors.delete(id);
|
|
1821
|
+
}
|
|
1822
|
+
invalidateSnapshot();
|
|
1823
|
+
notify();
|
|
1824
|
+
}
|
|
1841
1825
|
|
|
1842
1826
|
export {
|
|
1843
1827
|
buildForegroundTurnAdmissionFetchInit,
|
|
@@ -1854,5 +1838,6 @@ export {
|
|
|
1854
1838
|
resolveImageGenerationStreamingState,
|
|
1855
1839
|
resolveTurnToolContext,
|
|
1856
1840
|
targetForRunKind,
|
|
1857
|
-
pushGate
|
|
1841
|
+
pushGate,
|
|
1842
|
+
clearGateTurn
|
|
1858
1843
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRuntimeServerContext,
|
|
3
3
|
scheduleDeleteReplication
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WQDTSK5U.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchFromClientDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YHNUDTU4.js";
|
|
8
8
|
import {
|
|
9
9
|
selectIdentityToken
|
|
10
10
|
} from "./chunk-PXYBUFDB.js";
|