nolo-cli 0.228.0 → 0.228.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-GIFVXKDT.js → _executeModel-AKCTHGMP.js} +62 -61
- package/{action-WZTKEF5H.js → action-C6IQAKN4.js} +6 -6
- package/{addContentAction-MLI6GOBV.js → addContentAction-53364YDW.js} +10 -10
- package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-U5DD5EN5.js} +9 -9
- package/{agentDeleteCommand-UF7XVELS.js → agentDeleteCommand-2E5FAGUO.js} +99 -93
- package/{agentEmailCommands-SFHRPQYC.js → agentEmailCommands-UGZZAH7E.js} +99 -93
- package/{agentListCommands-IXKBP3W5.js → agentListCommands-JCTW3J2K.js} +240 -52
- package/{agentMachineCommands-7NX6PWQ6.js → agentMachineCommands-QPG5ZXF4.js} +45 -41
- package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-2EYJ5ENC.js} +1 -1
- package/{agentRecordCommands-IUNX6XD6.js → agentRecordCommands-4NTVR6MZ.js} +98 -92
- package/{agentRunCommand-LCR4XADM.js → agentRunCommand-VHF34PYC.js} +103 -94
- package/{agentRunControl-RN2P6AOD.js → agentRunControl-QYTXUQGY.js} +10 -7
- package/{agentRuntimeLocal-LVXPQ7QA.js → agentRuntimeLocal-U54AKHXH.js} +38 -36
- package/{agentSlice-ZGMOH6TE.js → agentSlice-4JGDEXWK.js} +10 -10
- package/{appDeleteCommands-BESCJOQM.js → appDeleteCommands-XBE5QJ6P.js} +46 -42
- package/{appDeployCommands-LPTR6IOX.js → appDeployCommands-QIYLXXGA.js} +46 -42
- package/{appDeployStatusCommands-BZ7KZ5RD.js → appDeployStatusCommands-JXS6ZQZZ.js} +46 -42
- package/{appGetCommands-EDWGJV4S.js → appGetCommands-SZS7SJPK.js} +46 -42
- package/{appListCommands-OPRWYPM6.js → appListCommands-B3GBJSNV.js} +46 -42
- package/{authCommand-3C3RN4OU.js → authCommand-V6EOMZX6.js} +15 -15
- package/{authCommands-ZMVEDCQD.js → authCommands-T5FODCEG.js} +2 -2
- package/{builtinSkillRegistry-VRCMQ77Q.js → builtinSkillRegistry-ZQC3IIO2.js} +4 -3
- package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-OFX7ZGKP.js} +2 -2
- package/{chunk-MZVCFV3T.js → chunk-223KZUJ6.js} +4 -4
- package/{chunk-UF6J7NXV.js → chunk-2C5VN7NH.js} +1 -1
- package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
- package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
- package/chunk-3A5NNQCN.js +64 -0
- package/chunk-3F2FRLIO.js +372 -0
- package/{chunk-V4IYI3SB.js → chunk-46FETNLF.js} +2 -2
- package/{chunk-RR3MB26M.js → chunk-4GYVS4PM.js} +8 -6
- package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
- package/{chunk-Y4NPF2UN.js → chunk-5AYP5QBB.js} +5 -5
- package/{chunk-4OXPN3WC.js → chunk-5ISNPTQH.js} +4 -4
- package/{chunk-CO6E7YK6.js → chunk-5P3PPQVP.js} +1 -1
- package/{chunk-6TVYUQRM.js → chunk-6BMTKYAO.js} +2 -2
- package/{chunk-KLAMJNKQ.js → chunk-6PAHSSD2.js} +15 -8
- package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
- package/{chunk-ARFCL53U.js → chunk-6VEO7Z3Y.js} +5 -5
- package/{chunk-ZM5AZTQG.js → chunk-7BIJFGKS.js} +20 -8
- package/{chunk-BAH3BAUZ.js → chunk-7OVOZRZF.js} +5 -5
- package/{chunk-N74XL3NI.js → chunk-7PON4LBY.js} +42 -24
- package/{chunk-LTVEOOZL.js → chunk-7WHCIA5V.js} +16 -3
- package/{chunk-HZDK56EK.js → chunk-ADYWV732.js} +34 -12
- package/{chunk-2FK2KZSL.js → chunk-AIFQKNPP.js} +1 -1
- package/{chunk-VTHWBTRE.js → chunk-BPB3T5EU.js} +5 -8
- package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
- package/{chunk-MTM4LRVG.js → chunk-BZMDWGQQ.js} +2 -2
- package/{chunk-JP2BH4NC.js → chunk-CEKRIR22.js} +1 -1
- package/{chunk-5HUO7SEX.js → chunk-D634SL2Y.js} +1 -1
- package/{chunk-SCMYAGQE.js → chunk-DHRPLRIR.js} +294 -159
- package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-X22AUZKL.js → chunk-E3LSO6EI.js} +189 -88
- package/{chunk-LHCGKAFO.js → chunk-EHFBP6IK.js} +100 -48
- package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
- package/{chunk-2BKNICGK.js → chunk-EL5NRJHI.js} +1 -1
- package/chunk-EUGTFFO6.js +42 -0
- package/{chunk-YFW4H6DL.js → chunk-EVHTYVD2.js} +821 -131
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-E5RYFR7E.js → chunk-FEIVARWR.js} +49 -15
- package/{chunk-3DJJ4CFG.js → chunk-FLBJ7IJI.js} +9 -9
- package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
- package/{chunk-VKCPKCSS.js → chunk-FYAMUU55.js} +625 -62
- package/{chunk-JEWMQR6J.js → chunk-FZANZZ63.js} +1 -1
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-YHNUDTU4.js → chunk-HDKMVYNJ.js} +4 -4
- package/chunk-HEVRQGGH.js +106 -0
- package/{chunk-PBPXXMWZ.js → chunk-HFHJPHFK.js} +1 -1
- package/{chunk-WQDTSK5U.js → chunk-HPDLPEUG.js} +11 -5
- package/{chunk-SPU3L3OR.js → chunk-HQUGB2HM.js} +3 -3
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-73PZD7JZ.js → chunk-IYLUK67R.js} +2 -2
- package/{chunk-BFKJ2RS3.js → chunk-J55F3IEZ.js} +1 -1
- package/{chunk-ADOOL3PG.js → chunk-J7JRCOIW.js} +1 -1
- package/{chunk-AEZBAFC6.js → chunk-JAKRY74O.js} +138 -8
- package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
- package/{chunk-W6T4FNZP.js → chunk-JLZJL3WC.js} +219 -351
- package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
- package/{chunk-IIOSZAJX.js → chunk-KDBDOXOM.js} +137 -53
- package/{chunk-CIGCTSBF.js → chunk-KDDHQMSH.js} +1 -1
- package/{chunk-OAZP4TSA.js → chunk-KG27JIG4.js} +2 -2
- package/{chunk-RHBD22LV.js → chunk-KHYSFS3W.js} +80 -4
- package/{chunk-7UVVLYKC.js → chunk-KKIQAVDR.js} +5 -5
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-OLGFIQN2.js → chunk-LLUBUHNT.js} +1 -1
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-XJSEST7D.js → chunk-MNFUKRRU.js} +3 -3
- package/{chunk-R5NRFXGD.js → chunk-O3A2CHAL.js} +5 -5
- package/{chunk-4IQN6FWY.js → chunk-OB4FBZXJ.js} +4 -4
- package/{chunk-J2VIGDJN.js → chunk-OJSJJKHF.js} +3 -3
- package/{chunk-OHUYN3YU.js → chunk-OKAXQFON.js} +1 -1
- package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
- package/{chunk-MYYNZG2M.js → chunk-OOV5JN25.js} +4 -4
- package/{chunk-TMRJGSK2.js → chunk-OOVOAG4Q.js} +1 -1
- package/chunk-OQFOE4SJ.js +405 -0
- package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
- package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-EDT65EUE.js → chunk-PIVTQRX6.js} +45 -15
- package/{chunk-QMNVV3YM.js → chunk-PJL7OJRC.js} +12 -11
- package/{chunk-XCA4WHX5.js → chunk-PNLDLUMO.js} +315 -360
- package/{chunk-UPOW5HTG.js → chunk-QGFLVQ6E.js} +3 -3
- package/{chunk-JU7VN4LF.js → chunk-QONAOHVW.js} +6 -6
- package/{chunk-UOUMPHS5.js → chunk-R3FZHW4Q.js} +13 -13
- package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- package/{chunk-KZAT2M2V.js → chunk-RIWKZT7E.js} +22 -0
- package/{chunk-RMWDKLBE.js → chunk-S7H4KTMB.js} +1099 -71
- package/{chunk-IJZC2KIJ.js → chunk-SA356NGW.js} +1 -1
- package/{chunk-BVEDT6DM.js → chunk-SCAC3NM5.js} +3 -3
- package/{chunk-EQZQUQ33.js → chunk-SLUN7W6S.js} +5 -5
- package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
- package/{chunk-LMGFVH65.js → chunk-SSOR2EDT.js} +10 -10
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-XNTZD4AE.js → chunk-TUOHSUK5.js} +19367 -17503
- package/chunk-TYJCIA2O.js +835 -0
- package/{chunk-FTWAOKFU.js → chunk-U3BUWDUP.js} +415 -1962
- package/{chunk-CD64YXRB.js → chunk-U6QNVOR5.js} +1 -1
- package/chunk-UAF5VQCE.js +77 -0
- package/{chunk-CIUZXD5D.js → chunk-UFGUJ2IH.js} +5 -5
- package/{chunk-CTIEJRTP.js → chunk-UP7KBWLE.js} +81 -29
- package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-UHW6SCVK.js → chunk-UZKBVQUX.js} +1 -1
- package/{chunk-XSRSAU3O.js → chunk-V5TI7HJH.js} +3 -3
- package/{chunk-WFGNWWJI.js → chunk-VH7UO6E5.js} +252 -114
- package/{chunk-ITBX27W6.js → chunk-VJFDG3ZG.js} +30 -122
- package/{chunk-6MTVACLN.js → chunk-WC3J5SL2.js} +277 -293
- package/{chunk-HCCQEMTK.js → chunk-WD5547ZF.js} +15 -12
- package/{chunk-X3OZ655T.js → chunk-WS36XPJD.js} +2 -2
- package/{chunk-JFRJEPFI.js → chunk-WSLL7VV4.js} +2 -2
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-KZ5OD2MO.js → chunk-Y2KWJTOZ.js} +3 -3
- package/{dialogUsageCommand-6RW2FY6K.js → chunk-Y2TCTNUD.js} +24 -17
- package/{chunk-FFFKAOJN.js → chunk-YN23INFZ.js} +1 -1
- package/{chunk-ODBYGVO2.js → chunk-YXK3GJF5.js} +5 -5
- package/{chunk-6CXQ3YNJ.js → chunk-Z2OWAYMI.js} +53 -31
- package/{chunk-6XVPMGXK.js → chunk-ZTHAJU3O.js} +10 -4
- package/{chunk-D25ONVOH.js → chunk-ZYPXOQS2.js} +1 -1
- package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-BXHQ3PXP.js} +8 -8
- package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +22 -0
- package/{cliLocalAgentRecordReader-MCQVRWBR.js → cliLocalAgentRecordReader-47PXMHPH.js} +43 -41
- package/{commandRegistry-NTH5IAN5.js → commandRegistry-CTMPAQH2.js} +93 -156
- package/{contentThunks-SPXTX5U2.js → contentThunks-CAHIIZO5.js} +25 -25
- package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-WDOI5VD7.js} +3 -3
- package/{createAgentAutomationAction-KUQKCOXB.js → createAgentAutomationAction-M25XZSPD.js} +25 -25
- package/{createDialogAction-HJN5U3XS.js → createDialogAction-4SN7FKI7.js} +26 -26
- package/{createPageAction-ZAHRDOAU.js → createPageAction-N7QPDN3M.js} +28 -28
- package/{db-CMUTP3W5.js → db-VR74ADGC.js} +7 -2
- package/{dbSlice-656PMWR2.js → dbSlice-RWPSVHBC.js} +9 -9
- package/{deleteFile-ZCQESEEQ.js → deleteFile-ECU6FU5C.js} +12 -7
- package/{dialogCommands-KZTZLWPZ.js → dialogCommands-BBHWCKDP.js} +57 -47
- package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-IASQGEMW.js} +9 -9
- package/{dialogSlice-BXIERQHO.js → dialogSlice-JI3J22RV.js} +23 -23
- package/dialogTraceCommand-EW2KK6A4.js +961 -0
- package/dialogUsageCommand-WJ3U6KZU.js +27 -0
- package/{docCreateCommands-26HJ5NAY.js → docCreateCommands-QSX3X5U4.js} +45 -41
- package/{docDeleteCommands-UAOHH5XK.js → docDeleteCommands-63JBG2HQ.js} +46 -42
- package/{docReadCommands-4ADG7YE6.js → docReadCommands-CQFKRQUI.js} +45 -41
- package/{docStore-FZ75HWP2.js → docStore-XLBKGGNM.js} +10 -10
- package/{docUpdateCommands-OGFJZENF.js → docUpdateCommands-534LUK25.js} +45 -41
- package/ebookDownloaderAgentCommand-DYSKF5ZY.js +677 -0
- package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
- package/{handleSendMessageAction-KP6GGBFY.js → handleSendMessageAction-Q2VMEVOR.js} +90 -48
- package/{hostCredentialCreate-23TX56G7.js → hostCredentialCreate-C57T7YPE.js} +99 -93
- package/index.js +23 -11
- package/{localDialogRead-CIOTQM5T.js → localDialogRead-BJJT3TF5.js} +1 -1
- package/{localRuntimeAdapter-MTUWOYPN.js → localRuntimeAdapter-OALZPFZU.js} +96 -90
- package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-UF2DAQ3F.js} +13 -3
- package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-ZJFGNHML.js} +1 -1
- package/{machineCommands-4WJUJQHW.js → machineCommands-N6IVWRZT.js} +109 -92
- package/{machineWsRunDispatch-V3U4JM67.js → machineWsRunDispatch-PDWYB33B.js} +97 -91
- package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
- package/{mcpLocalAuthorizeCommand-TI656UWC.js → mcpLocalAuthorizeCommand-KYI4EGF5.js} +17 -13
- package/{memberThunks-JFYC4Z5L.js → memberThunks-43B7UYC5.js} +11 -11
- package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
- package/package.json +2 -1
- package/{projectArchive-NU2Z5HOR.js → projectArchive-TJNW5DLM.js} +28 -28
- package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
- package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
- package/{read-BRZHXUJ6.js → read-KG6INYUT.js} +12 -7
- package/{readDocTool-N7RVFQEE.js → readDocTool-N3GA52JR.js} +1 -1
- package/{readlineWorkspace-T56MRMS5.js → readlineWorkspace-PJZJVGA5.js} +1296 -1056
- package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-EEVSOQOJ.js} +11 -11
- package/{runAgentClientLoop-O2GRCGRZ.js → runAgentClientLoop-3VC5TCDW.js} +69 -58
- package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-V3M3JTUV.js} +14 -11
- package/{secretCommands-2FEMRUFM.js → secretCommands-KVVZS7A6.js} +2 -2
- package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-DNO5POHA.js} +10 -10
- package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-QABBEO4C.js} +11 -11
- package/{settingThunks-T4FXSV6M.js → settingThunks-DVKG4X4S.js} +13 -17
- package/{skillDiscovery-MDDKPTW3.js → skillDiscovery-ZMJH36AK.js} +3 -3
- package/{spaceCommands-W5TAVFDT.js → spaceCommands-AGGZXPY3.js} +218 -77
- package/{streamAgentChatTurn-OWDJMU5E.js → streamAgentChatTurn-4GTLL2OF.js} +111 -95
- package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-KYWJSGOO.js} +9 -9
- package/{tableCommands-44GC4N6J.js → tableCommands-EFA754RE.js} +3 -3
- package/{tools-O7SGGVA3.js → tools-5AGPOPLW.js} +48 -47
- package/{tuiRestart-EOGC2BYY.js → tuiRestart-77E7PL4R.js} +9 -8
- package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-HROLGN4F.js} +12 -12
- package/{updateCommands-FBYA5WVG.js → updateCommands-GJGRS6JK.js} +3 -3
- package/{updateDialogTitleAction-EXSZGTLL.js → updateDialogTitleAction-5OSEDGRK.js} +25 -25
- package/{usageCommand-L4OFWXEU.js → usageCommand-WI6SQOPB.js} +2 -2
- package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-WQRLLZAT.js} +3 -3
- package/{windowsSelfUpdate-M4V77OUB.js → windowsSelfUpdate-C7LGVWYX.js} +2 -2
- package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-P2SJVV3S.js} +2 -2
- package/chunk-FGHEF6WI.js +0 -34
- package/chunk-U5LOKQ2R.js +0 -176
- package/chunk-YDRRGVT5.js +0 -142
- package/chunk-YGDYYFRX.js +0 -86
- package/chunk-Z7KE4K3H.js +0 -758
- package/lib-62SWPXNF.js +0 -21042
- /package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
scheduleExistingRecordReplication,
|
|
8
8
|
shouldReplaceLocalWithRemoteRecord,
|
|
9
9
|
shouldReplicateLocalRecord
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HPDLPEUG.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchFromClientDb,
|
|
13
13
|
fetchFromServer,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isReadTimeoutError,
|
|
17
17
|
logger,
|
|
18
18
|
scopeGoogleSessionServers
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HDKMVYNJ.js";
|
|
20
20
|
import {
|
|
21
21
|
isAbortError
|
|
22
22
|
} from "./chunk-7DPNBQSV.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
isBuiltinPlatformAgentKey,
|
|
28
28
|
isPublicBuiltinPlatformAgentKey
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-RIWKZT7E.js";
|
|
30
30
|
import {
|
|
31
31
|
NOLO_CLUSTER_SERVERS,
|
|
32
32
|
normalizeKnownServerOrigin
|
|
@@ -192,6 +192,8 @@ var saveRemoteDataToClientDb = async (clientDb, dbKey, remoteData, serverOrigin)
|
|
|
192
192
|
} catch (err) {
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
|
+
var REJECTED_RECORD = Symbol("rejected read record");
|
|
196
|
+
var hasRejectedRecord = (results) => results.some((result) => result.status === "fulfilled" && result.value === REJECTED_RECORD);
|
|
195
197
|
var processRemoteDataInBackground = async (clientDb, dbKey, remotePromises, remoteServers, localData, replicationContext) => {
|
|
196
198
|
if (!clientDb) return;
|
|
197
199
|
try {
|
|
@@ -214,7 +216,7 @@ var processRemoteDataInBackground = async (clientDb, dbKey, remotePromises, remo
|
|
|
214
216
|
localData
|
|
215
217
|
);
|
|
216
218
|
}
|
|
217
|
-
if (shouldReplicateLocalRecord({
|
|
219
|
+
if (!hasRejectedRecord(settledResults) && shouldReplicateLocalRecord({
|
|
218
220
|
localData,
|
|
219
221
|
remoteData: validRemoteData,
|
|
220
222
|
remoteTargetCount: remotePromises.length
|
|
@@ -251,10 +253,16 @@ var readAction = async (payload, thunkApi) => {
|
|
|
251
253
|
userAuthorityRegistry
|
|
252
254
|
} = getRuntimeServerContext(state, preferredServerOrigin);
|
|
253
255
|
const allServers = resolveAgentReadServers({ dbKey, configuredServers });
|
|
254
|
-
const
|
|
256
|
+
const { validateRecord } = payload;
|
|
257
|
+
const fetchScopedFromServer = async (server, key, token, signal2) => {
|
|
258
|
+
const record = await fetchFromServer(server, key, googleSessionRequestToken(token, server, isPublicBuiltinPlatformAgentKey(key)), signal2);
|
|
259
|
+
return record && validateRecord && !validateRecord(record, "remote") ? REJECTED_RECORD : record;
|
|
260
|
+
};
|
|
255
261
|
const isLoggedIn = !!currentToken;
|
|
256
262
|
const now = Date.now();
|
|
257
|
-
const
|
|
263
|
+
const rawLocalData = await fetchFromClientDb(clientDb, dbKey);
|
|
264
|
+
const localRejected = !!rawLocalData && !!validateRecord && !validateRecord(rawLocalData, "local");
|
|
265
|
+
const localData = localRejected ? null : rawLocalData;
|
|
258
266
|
if (isDialogKey) {
|
|
259
267
|
console.info("[readAction-perf] dialog local-read", {
|
|
260
268
|
dbKey,
|
|
@@ -316,6 +324,7 @@ var readAction = async (payload, thunkApi) => {
|
|
|
316
324
|
}
|
|
317
325
|
return normalizeReadRecord(dbKey, localData);
|
|
318
326
|
}
|
|
327
|
+
if (localRejected) return null;
|
|
319
328
|
readRequestManager.markMiss(dbKey, now);
|
|
320
329
|
throw new Error(
|
|
321
330
|
`Failed to fetch data for key "${dbKey}" because network is offline and no local data is available.`
|
|
@@ -363,6 +372,7 @@ var readAction = async (payload, thunkApi) => {
|
|
|
363
372
|
preferredServer = authoritativeServerOrigin;
|
|
364
373
|
fallbackServers = [];
|
|
365
374
|
}
|
|
375
|
+
let preferredRejected = false;
|
|
366
376
|
if (preferredServer) {
|
|
367
377
|
try {
|
|
368
378
|
const preferredRemoteData = await fetchScopedFromServer(
|
|
@@ -371,7 +381,8 @@ var readAction = async (payload, thunkApi) => {
|
|
|
371
381
|
isLoggedIn ? currentToken : void 0,
|
|
372
382
|
signal
|
|
373
383
|
);
|
|
374
|
-
|
|
384
|
+
preferredRejected = preferredRemoteData === REJECTED_RECORD;
|
|
385
|
+
if (preferredRemoteData && !preferredRejected) {
|
|
375
386
|
await saveRemoteDataToClientDb(
|
|
376
387
|
clientDb,
|
|
377
388
|
dbKey,
|
|
@@ -439,12 +450,13 @@ var readAction = async (payload, thunkApi) => {
|
|
|
439
450
|
const remoteData = serverOrigin ? { ...validRemoteData, dbKey, serverOrigin } : { ...validRemoteData, dbKey };
|
|
440
451
|
return normalizeReadRecord(dbKey, remoteData);
|
|
441
452
|
}
|
|
453
|
+
if (localRejected || preferredRejected || hasRejectedRecord(settledResults)) return null;
|
|
442
454
|
readRequestManager.markMiss(dbKey, Date.now());
|
|
443
455
|
throw new Error(
|
|
444
456
|
`Failed to fetch data for key "${dbKey}" from all sources.`
|
|
445
457
|
);
|
|
446
458
|
};
|
|
447
|
-
const canDedup = !signal;
|
|
459
|
+
const canDedup = !signal && !payload.validateRecord;
|
|
448
460
|
if (canDedup) {
|
|
449
461
|
const existing = readRequestManager.getInFlight(dbKey);
|
|
450
462
|
if (existing) return existing;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultOpenBrowser
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HQUGB2HM.js";
|
|
4
4
|
import {
|
|
5
5
|
generateCloudflareEmailRoutingToken,
|
|
6
6
|
parseFlagWithOptionalValue,
|
|
7
7
|
runCloudflareOAuthLogin,
|
|
8
8
|
upsertEnvVariable
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2C5VN7NH.js";
|
|
10
10
|
import {
|
|
11
11
|
ANTHROPIC_OAUTH_AUTHORIZE_URL,
|
|
12
12
|
ANTHROPIC_OAUTH_CALLBACK_PORT,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
startCallbackServer,
|
|
51
51
|
validateXAIEndpoint,
|
|
52
52
|
xaiOAuthDiscovery
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6BMTKYAO.js";
|
|
54
54
|
import {
|
|
55
55
|
extractGoogleValidationLink
|
|
56
56
|
} from "./chunk-BMQ2MJUK.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
detectLocalDevinCredentials,
|
|
61
61
|
extractDevinToken,
|
|
62
62
|
fetchAntigravityCloudCodeCompletion
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-OOV5JN25.js";
|
|
64
64
|
import {
|
|
65
65
|
createOAuthTokenStore,
|
|
66
66
|
resolveFreshAccessToken
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
} from "./chunk-R5GO3YZP.js";
|
|
75
75
|
import {
|
|
76
76
|
t
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-FEIVARWR.js";
|
|
78
78
|
import {
|
|
79
79
|
toErrorMessage
|
|
80
80
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
upsertSSREntity,
|
|
3
3
|
write
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ADYWV732.js";
|
|
5
5
|
import {
|
|
6
6
|
getRuntimeServerContext,
|
|
7
7
|
resolveRecordAuthority
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HPDLPEUG.js";
|
|
9
9
|
import {
|
|
10
10
|
TIMEOUT,
|
|
11
11
|
asyncThunkCreator,
|
|
12
12
|
buildCreateSlice,
|
|
13
13
|
noloRequest
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZTHAJU3O.js";
|
|
15
15
|
import {
|
|
16
16
|
applyAgentSecretMigrationUpdates,
|
|
17
|
+
buildAgentApiKeyCredentialRef,
|
|
17
18
|
migrateAgentSecrets,
|
|
18
19
|
normalizeAgentRuntimeToolPolicy
|
|
19
20
|
} from "./chunk-USGHJSGO.js";
|
|
@@ -104,6 +105,13 @@ async function agentRequest(server, state, path, method, body) {
|
|
|
104
105
|
clearTimeout(timeout);
|
|
105
106
|
}
|
|
106
107
|
}
|
|
108
|
+
var AGENT_CHANNEL_FIELDS = ["provider", "apiSource", "apiKeyRef", "customProviderUrl"];
|
|
109
|
+
function clearQuotaOnAgentChannelChange(previous, saved) {
|
|
110
|
+
if (!AGENT_CHANNEL_FIELDS.some((field) => (previous[field] ?? void 0) !== (saved[field] ?? void 0))) return;
|
|
111
|
+
delete saved.quota;
|
|
112
|
+
delete saved.quotaExhaustion;
|
|
113
|
+
delete saved.nextAvailableAt;
|
|
114
|
+
}
|
|
107
115
|
async function updateAgentRecord(options) {
|
|
108
116
|
const { server, state, dbKey, changes } = options;
|
|
109
117
|
if (dbKey.startsWith("agent-local-")) {
|
|
@@ -129,6 +137,7 @@ async function updateAgentRecord(options) {
|
|
|
129
137
|
return result2;
|
|
130
138
|
};
|
|
131
139
|
const saved = merge(previous, { ...changes, isPublic: false, userId: "local" });
|
|
140
|
+
clearQuotaOnAgentChannelChange(previous, saved);
|
|
132
141
|
saved.updatedAt = Date.now();
|
|
133
142
|
try {
|
|
134
143
|
await options.localDb.put(dbKey, saved);
|
|
@@ -261,6 +270,7 @@ var migrateRawApiKeyForAgent = async (args) => {
|
|
|
261
270
|
var createSliceWithThunks = buildCreateSlice({
|
|
262
271
|
creators: { asyncThunk: asyncThunkCreator }
|
|
263
272
|
});
|
|
273
|
+
var pendingCreateIds = /* @__PURE__ */ new WeakMap();
|
|
264
274
|
var initialState = {};
|
|
265
275
|
var normalizeAgentReferences = (references) => {
|
|
266
276
|
if (!Array.isArray(references)) return [];
|
|
@@ -342,6 +352,9 @@ var processAgentUpdateChanges = (data, userId, previousAgent) => {
|
|
|
342
352
|
if ("apiKey" in data) {
|
|
343
353
|
changes.apiKey = (data.apiKey ?? "").trim();
|
|
344
354
|
}
|
|
355
|
+
if (data.enableThinking !== void 0) {
|
|
356
|
+
changes.enableThinking = data.enableThinking;
|
|
357
|
+
}
|
|
345
358
|
if ("hasVision" in data && data.hasVision !== void 0) {
|
|
346
359
|
changes.hasVision = !!data.hasVision;
|
|
347
360
|
}
|
|
@@ -458,7 +471,7 @@ var slice = createSliceWithThunks({
|
|
|
458
471
|
const overrides = {};
|
|
459
472
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
460
473
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
461
|
-
const { _executeModel } = await import("./_executeModel-
|
|
474
|
+
const { _executeModel } = await import("./_executeModel-AKCTHGMP.js");
|
|
462
475
|
return _executeModel(
|
|
463
476
|
{
|
|
464
477
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -479,7 +492,7 @@ var slice = createSliceWithThunks({
|
|
|
479
492
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
480
493
|
*/
|
|
481
494
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
482
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
495
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-3VC5TCDW.js");
|
|
483
496
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
484
497
|
{
|
|
485
498
|
agentKey: args.agentKey,
|
|
@@ -495,7 +508,7 @@ var slice = createSliceWithThunks({
|
|
|
495
508
|
* 聊天轮次流式 Agent 调用
|
|
496
509
|
*/
|
|
497
510
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
498
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
511
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-4GTLL2OF.js");
|
|
499
512
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
500
513
|
}),
|
|
501
514
|
/**
|
|
@@ -505,11 +518,19 @@ var slice = createSliceWithThunks({
|
|
|
505
518
|
* - 返回完整 Agent 对象(包含 id / meta 字段)
|
|
506
519
|
*/
|
|
507
520
|
createAgent: create.asyncThunk(
|
|
508
|
-
async ({ userId, formData, spaceId }, thunkApi) => {
|
|
521
|
+
async ({ userId, formData, spaceId, createAttempt }, thunkApi) => {
|
|
509
522
|
const effectiveUserId = asOptionalTrimmedString(userId) ?? "local";
|
|
510
523
|
const processed = processAgentCreateForm(formData, effectiveUserId);
|
|
511
524
|
const now = Date.now();
|
|
512
|
-
const
|
|
525
|
+
const previous = createAttempt && pendingCreateIds.get(createAttempt);
|
|
526
|
+
const pending = previous?.owner === effectiveUserId ? previous : {
|
|
527
|
+
owner: effectiveUserId,
|
|
528
|
+
id: ulid(),
|
|
529
|
+
usesPerAgentRef: false
|
|
530
|
+
};
|
|
531
|
+
pending.usesPerAgentRef ||= formData.credentialSynced === true;
|
|
532
|
+
if (createAttempt) pendingCreateIds.set(createAttempt, pending);
|
|
533
|
+
const { id } = pending;
|
|
513
534
|
const privateKey = createAgentKey.private(effectiveUserId, id);
|
|
514
535
|
const publicKey = createAgentKey.public(id);
|
|
515
536
|
let agent = {
|
|
@@ -544,9 +565,20 @@ var slice = createSliceWithThunks({
|
|
|
544
565
|
agentKey: privateKey,
|
|
545
566
|
apiKey: createRawApiKey,
|
|
546
567
|
apiKeyRef: agent.apiKeyRef,
|
|
547
|
-
credentialRef: agent.credentialRef
|
|
568
|
+
credentialRef: pending.usesPerAgentRef ? buildAgentApiKeyCredentialRef(privateKey) : agent.credentialRef
|
|
548
569
|
});
|
|
549
570
|
}
|
|
571
|
+
if (agent.credentialSynced === true) {
|
|
572
|
+
const ctx = getRuntimeServerContext(thunkApi.getState());
|
|
573
|
+
const ref = agent.credentialRef;
|
|
574
|
+
if (!createRawApiKey || !ctx.currentServer || !ctx.currentToken || !ref?.startsWith("api-key:") || !await pushServerSyncedCredential(
|
|
575
|
+
{ currentServer: ctx.currentServer, authToken: ctx.currentToken },
|
|
576
|
+
ref,
|
|
577
|
+
createRawApiKey
|
|
578
|
+
)) {
|
|
579
|
+
throw new Error("agent_credential_sync_failed");
|
|
580
|
+
}
|
|
581
|
+
}
|
|
550
582
|
await thunkApi.dispatch(
|
|
551
583
|
write({
|
|
552
584
|
data: agent,
|
|
@@ -567,21 +599,6 @@ var slice = createSliceWithThunks({
|
|
|
567
599
|
})
|
|
568
600
|
).unwrap();
|
|
569
601
|
}
|
|
570
|
-
if (agent.credentialSynced && createRawApiKey) {
|
|
571
|
-
const ctx = getRuntimeServerContext(thunkApi.getState());
|
|
572
|
-
const credentialRef = agent.credentialRef;
|
|
573
|
-
if (ctx.currentToken && credentialRef) {
|
|
574
|
-
try {
|
|
575
|
-
await pushServerSyncedCredential(
|
|
576
|
-
{ currentServer: ctx.currentServer ?? "", authToken: ctx.currentToken },
|
|
577
|
-
credentialRef,
|
|
578
|
-
createRawApiKey
|
|
579
|
-
);
|
|
580
|
-
} catch (error) {
|
|
581
|
-
console.error("[agent-credential-sync] push failed", error instanceof Error ? error.message : "unknown error");
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
602
|
try {
|
|
586
603
|
const { localFirstLog } = await import("./localFirstLog-OIETGK66.js");
|
|
587
604
|
localFirstLog("agent.create.done", {
|
|
@@ -595,6 +612,7 @@ var slice = createSliceWithThunks({
|
|
|
595
612
|
});
|
|
596
613
|
} catch {
|
|
597
614
|
}
|
|
615
|
+
if (createAttempt) pendingCreateIds.delete(createAttempt);
|
|
598
616
|
return agent;
|
|
599
617
|
}
|
|
600
618
|
),
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-5ZUL4CUO.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelContextWindow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2FZVXOFX.js";
|
|
7
7
|
import {
|
|
8
8
|
isPageKey,
|
|
9
9
|
isTableMetaKey
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-OJKUU3LP.js";
|
|
14
14
|
import {
|
|
15
15
|
BUILTIN_NOLO_AGENT_KEY
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RIWKZT7E.js";
|
|
17
17
|
import {
|
|
18
18
|
asTrimmedString
|
|
19
19
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -23,13 +23,24 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
asOptionalTrimmedString
|
|
25
25
|
} from "./chunk-G3SUCT4W.js";
|
|
26
|
+
import {
|
|
27
|
+
asTrimmedLowercaseString
|
|
28
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
29
|
+
|
|
30
|
+
// packages/integrations/openai/responsesPromptLayout.ts
|
|
31
|
+
function isGpt62DeveloperPrefixModel(model) {
|
|
32
|
+
return /^gpt-6\.2-(astra|sol)$/.test(model);
|
|
33
|
+
}
|
|
26
34
|
|
|
27
35
|
// packages/agent-runtime/codexOAuthPure.ts
|
|
28
36
|
function isCodexOAuthAgent(agent) {
|
|
29
37
|
if (!agent) return false;
|
|
30
|
-
const ref = agent.apiKeyRef
|
|
38
|
+
const ref = asTrimmedLowercaseString(agent.apiKeyRef);
|
|
31
39
|
return ref === "chatgpt";
|
|
32
40
|
}
|
|
41
|
+
function usesCodexDeveloperPrefix(agent, model) {
|
|
42
|
+
return !agent.customProviderUrl && isGpt62DeveloperPrefixModel(asTrimmedLowercaseString(model).replace(/^openai\//, ""));
|
|
43
|
+
}
|
|
33
44
|
|
|
34
45
|
// packages/agent-runtime/codexOAuthModelAliases.ts
|
|
35
46
|
var CODEX_OAUTH_MODEL_ALIASES = {
|
|
@@ -506,7 +517,9 @@ function resolveTruncatedReasoningTailLog(reason, reasoning_content) {
|
|
|
506
517
|
}
|
|
507
518
|
|
|
508
519
|
export {
|
|
520
|
+
isGpt62DeveloperPrefixModel,
|
|
509
521
|
isCodexOAuthAgent,
|
|
522
|
+
usesCodexDeveloperPrefix,
|
|
510
523
|
resolveCodexOAuthEffectiveModel,
|
|
511
524
|
CODEX_OAUTH_CATALOG_TTL_MS,
|
|
512
525
|
CODEX_OAUTH_CATALOG_RETRY_FLOOR_MS,
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
loadFileFromIndexedDb,
|
|
7
7
|
removeAction,
|
|
8
8
|
saveFileToIndexedDb
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WS36XPJD.js";
|
|
10
10
|
import {
|
|
11
11
|
readAction,
|
|
12
12
|
readRequestManager,
|
|
13
13
|
resolveAgentReadServers
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7BIJFGKS.js";
|
|
15
15
|
import {
|
|
16
16
|
beginWriteAck,
|
|
17
17
|
compareRemoteRecordsByComparableTime,
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
shouldReplaceLocalWithRemoteRecord,
|
|
30
30
|
shouldReplicateLocalRecord,
|
|
31
31
|
uploadToCurrentServer
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HPDLPEUG.js";
|
|
33
33
|
import {
|
|
34
34
|
asyncThunkCreator,
|
|
35
35
|
buildCreateSlice,
|
|
36
36
|
createEntityAdapter,
|
|
37
37
|
noloDeleteRequest
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZTHAJU3O.js";
|
|
39
39
|
import {
|
|
40
40
|
fetchFromClientDb,
|
|
41
41
|
fetchFromServer,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
logger,
|
|
45
45
|
normalizeTimeFields,
|
|
46
46
|
scopeGoogleSessionServers
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-HDKMVYNJ.js";
|
|
48
48
|
import {
|
|
49
49
|
isTombstoneRecord
|
|
50
50
|
} from "./chunk-BV3FLP2L.js";
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./chunk-OJKUU3LP.js";
|
|
58
58
|
import {
|
|
59
59
|
isPublicBuiltinPlatformAgentKey
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-RIWKZT7E.js";
|
|
61
61
|
import {
|
|
62
62
|
API_ENDPOINTS
|
|
63
63
|
} from "./chunk-LCBAMY2M.js";
|
|
@@ -1265,6 +1265,15 @@ var upsertAction = async (upsertConfig, thunkApi) => {
|
|
|
1265
1265
|
}
|
|
1266
1266
|
};
|
|
1267
1267
|
|
|
1268
|
+
// packages/database/spaceUploadFileMapping.ts
|
|
1269
|
+
function mappings(db) {
|
|
1270
|
+
return db?.sublevel?.("web-space-upload-file-ids", { valueEncoding: "utf8" });
|
|
1271
|
+
}
|
|
1272
|
+
var mappingKey = (userId, pageKey) => JSON.stringify([userId, pageKey]);
|
|
1273
|
+
async function recordWebSpaceUploadFileId(db, userId, pageKey, fileId) {
|
|
1274
|
+
await mappings(db)?.put(mappingKey(userId, pageKey), fileId);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1268
1277
|
// packages/database/actions/upload.ts
|
|
1269
1278
|
var saveToClientDb2 = async (clientDb, dbKey, metadata) => {
|
|
1270
1279
|
if (!clientDb) {
|
|
@@ -1289,7 +1298,7 @@ var uploadFileAction = async (uploadConfig, thunkApi) => {
|
|
|
1289
1298
|
const { db: clientDb } = thunkApi.extra;
|
|
1290
1299
|
const state = thunkApi.getState();
|
|
1291
1300
|
const { currentServer, syncServers, currentUserId } = getRuntimeServerContext(state);
|
|
1292
|
-
const { file, customKey, onProgress, signal } = uploadConfig;
|
|
1301
|
+
const { file, customKey, onProgress, signal, ownerType, spaceId } = uploadConfig;
|
|
1293
1302
|
const userId = uploadConfig.userId || currentUserId;
|
|
1294
1303
|
if (!file) {
|
|
1295
1304
|
const errorMsg = "Invalid arguments for uploadFileAction: file is required.";
|
|
@@ -1344,7 +1353,11 @@ var uploadFileAction = async (uploadConfig, thunkApi) => {
|
|
|
1344
1353
|
file,
|
|
1345
1354
|
metadata: fileMetadata,
|
|
1346
1355
|
customKey: finalDbKey,
|
|
1347
|
-
userId
|
|
1356
|
+
userId,
|
|
1357
|
+
// 归属声明一律由调用方显式给出(例如 Space 上传传 ownerType:"space");
|
|
1358
|
+
// 服务端 uploadOwnership.ts 会重新校验,声明本身不构成授权。
|
|
1359
|
+
...ownerType ? { ownerType } : {},
|
|
1360
|
+
...spaceId ? { spaceId } : {}
|
|
1348
1361
|
};
|
|
1349
1362
|
const uploadServers = resolveUploadReplicationServers({
|
|
1350
1363
|
currentServer,
|
|
@@ -1365,8 +1378,16 @@ var uploadFileAction = async (uploadConfig, thunkApi) => {
|
|
|
1365
1378
|
await localCachePromise;
|
|
1366
1379
|
}
|
|
1367
1380
|
if (primaryUploadServer && !primaryUploadSucceeded) {
|
|
1381
|
+
if (ownerType === "space") {
|
|
1382
|
+
throw new Error(
|
|
1383
|
+
`Upload into Space "${spaceId}" failed on ${primaryUploadServer}: the Space may not be synced to that server, or you are not allowed to upload into it there. Sync the Space to ${primaryUploadServer} (or use another upload server) and retry. Ownership is server-decided and is never downgraded to a personal file.`
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1368
1386
|
throw new Error(`Primary upload failed on authority server ${primaryUploadServer}`);
|
|
1369
1387
|
}
|
|
1388
|
+
if (ownerType === "space" && userId && finalDbKey === customKey) {
|
|
1389
|
+
await recordWebSpaceUploadFileId(clientDb, userId, finalDbKey, fileId);
|
|
1390
|
+
}
|
|
1370
1391
|
const serversToUse = scheduleUploadReplication({
|
|
1371
1392
|
currentServer,
|
|
1372
1393
|
syncServers,
|
|
@@ -1403,12 +1424,13 @@ var resolveLocalFileId = (fileId) => {
|
|
|
1403
1424
|
};
|
|
1404
1425
|
var readFileContentAction = async ({
|
|
1405
1426
|
fileId,
|
|
1406
|
-
useServerFallback = true
|
|
1427
|
+
useServerFallback = true,
|
|
1428
|
+
localFileId
|
|
1407
1429
|
}, thunkApi) => {
|
|
1408
1430
|
if (!fileId || typeof fileId !== "string") {
|
|
1409
1431
|
throw new Error("readFileContentAction requires a valid fileId string.");
|
|
1410
1432
|
}
|
|
1411
|
-
const localId = resolveLocalFileId(fileId);
|
|
1433
|
+
const localId = localFileId || resolveLocalFileId(fileId);
|
|
1412
1434
|
const localRecord = await loadFileFromIndexedDb(localId);
|
|
1413
1435
|
if (localRecord) {
|
|
1414
1436
|
return {
|
|
@@ -1494,7 +1516,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
1494
1516
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
1495
1517
|
read: create.asyncThunk(
|
|
1496
1518
|
async (payload, thunkApi) => {
|
|
1497
|
-
const { readAction: readAction2 } = await import("./read-
|
|
1519
|
+
const { readAction: readAction2 } = await import("./read-KG6INYUT.js");
|
|
1498
1520
|
return readAction2(payload, thunkApi);
|
|
1499
1521
|
},
|
|
1500
1522
|
{
|
|
@@ -1568,7 +1590,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
1568
1590
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
1569
1591
|
share: create.asyncThunk(
|
|
1570
1592
|
async (config, thunkApi) => {
|
|
1571
|
-
const { shareResourceAction } = await import("./action-
|
|
1593
|
+
const { shareResourceAction } = await import("./action-C6IQAKN4.js");
|
|
1572
1594
|
return shareResourceAction(config, thunkApi);
|
|
1573
1595
|
}
|
|
1574
1596
|
),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ALWAYS_EXCLUDED_GLOBS,
|
|
3
3
|
buildExecutionTicket
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2E4BYAUE.js";
|
|
5
5
|
|
|
6
6
|
// packages/agent-runtime/docker/executionTicket.ts
|
|
7
7
|
function buildPrimaryExecutionTicket(runGrant, executionClass = "session") {
|
|
@@ -85,20 +85,17 @@ var QUICK_PROBE_SUBSTRINGS = [
|
|
|
85
85
|
"ghs_",
|
|
86
86
|
"ghr_",
|
|
87
87
|
"github_pat_",
|
|
88
|
-
"PRIVATE KEY"
|
|
89
|
-
"Bearer ",
|
|
90
|
-
"bearer ",
|
|
91
|
-
"PASSWORD",
|
|
92
|
-
"password",
|
|
93
|
-
"PASSWD",
|
|
94
|
-
"SECRET_KEY"
|
|
88
|
+
"PRIVATE KEY"
|
|
95
89
|
];
|
|
90
|
+
var CASE_INSENSITIVE_PROBE_REGEX = /bearer|password|passwd|secret_key/i;
|
|
96
91
|
var UNPREFIXED_PROBE_REGEX = /\\b[0-9a-fA-F]{32}\\.[A-Za-z0-9]{16}\\b/;
|
|
97
92
|
function hasPotentialSecrets(text) {
|
|
98
93
|
if (typeof text !== "string" || text.length === 0)
|
|
99
94
|
return false;
|
|
100
95
|
if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe)))
|
|
101
96
|
return true;
|
|
97
|
+
if (CASE_INSENSITIVE_PROBE_REGEX.test(text))
|
|
98
|
+
return true;
|
|
102
99
|
return UNPREFIXED_PROBE_REGEX.test(text);
|
|
103
100
|
}
|
|
104
101
|
function scrubSecrets(text) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAgentCallPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DNNPARJK.js";
|
|
4
4
|
import {
|
|
5
5
|
CUSTOM_API_KEY_TEMPLATES,
|
|
6
6
|
SUBSCRIPTION_OAUTH_PROVIDERS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6SOWMEAY.js";
|
|
8
8
|
import {
|
|
9
9
|
findModelConfig,
|
|
10
10
|
getProviderByModelName
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OKH74FML.js";
|
|
12
12
|
import {
|
|
13
13
|
asOptionalTrimmedString
|
|
14
14
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSelector
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZTHAJU3O.js";
|
|
4
4
|
import {
|
|
5
5
|
getAllServers,
|
|
6
6
|
getIsDesktopApp,
|
|
7
7
|
googleSessionServer,
|
|
8
8
|
scopeGoogleSessionServers
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HDKMVYNJ.js";
|
|
10
10
|
import {
|
|
11
11
|
selectIdentityToken
|
|
12
12
|
} from "./chunk-PXYBUFDB.js";
|