nolo-cli 0.225.0-alpha.1 → 0.225.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/{_executeModel-L5VHAXSU.js → _executeModel-UCWDB72C.js} +79 -73
- package/{action-CK64LS6S.js → action-24MZYW2B.js} +11 -8
- package/{addContentAction-EQXMFNPR.js → addContentAction-HEMCSSHT.js} +14 -13
- package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-SQYDOXHA.js} +15 -14
- package/{agentDeleteCommand-4WC7INCX.js → agentDeleteCommand-P7O3ACNJ.js} +131 -124
- package/{agentEmailCommands-3XFR6WY7.js → agentEmailCommands-A5BRSYWK.js} +134 -123
- package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
- package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
- package/{agentListCommands-BBCP5XYW.js → agentListCommands-LDRCOOMO.js} +112 -496
- package/{agentMachineCommands-YZDCOLQL.js → agentMachineCommands-AYL53KJV.js} +65 -58
- package/{agentProviderCommands-7BSJH7TO.js → agentProviderCommands-N5EA3ED2.js} +6 -6
- package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-QQQZSC6S.js} +6 -6
- package/agentRecordCommands-FICBZ57C.js +188 -0
- package/{agentRunCommand-NHYBV4G5.js → agentRunCommand-CTXQGDUM.js} +135 -120
- package/{agentRunControl-7A2FOXIJ.js → agentRunControl-CO6BASZF.js} +20 -14
- package/{agentRuntimeLocal-GSTYFEX4.js → agentRuntimeLocal-5YN4D5WT.js} +48 -41
- package/{agentSlice-O6IGTM3Y.js → agentSlice-DJ5D4DU4.js} +18 -17
- package/{appDeleteCommands-L7HL4AWF.js → appDeleteCommands-B4E7N7M2.js} +58 -51
- package/{appDeployCommands-SGSUNFZR.js → appDeployCommands-E4DTXRRM.js} +58 -51
- package/{appDeployStatusCommands-AAA3XD54.js → appDeployStatusCommands-FCNHYHZM.js} +58 -51
- package/{appGetCommands-LN72GAOA.js → appGetCommands-4DXSQHUZ.js} +58 -51
- package/{appListCommands-IJQQ3VND.js → appListCommands-2NN5E4F6.js} +58 -51
- package/{authCommand-7JXW54U4.js → authCommand-47DR6GZT.js} +33 -28
- package/{authCommands-YDNAIDEY.js → authCommands-ZZ3L5IFM.js} +16 -11
- package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-AYWYQVA4.js} +5 -5
- package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-VZWAY2KR.js} +6 -6
- package/{chunk-YDBMZ7FV.js → chunk-24GVXSWK.js} +3 -3
- package/{chunk-JCK3EFZS.js → chunk-25OCZXSX.js} +63 -32
- package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
- package/chunk-2SXN7LAY.js +15 -0
- package/{chunk-N5PQJKCY.js → chunk-2XMKW2OY.js} +13 -12
- package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
- package/{chunk-UKS7D2NL.js → chunk-3NFWMSTA.js} +111 -26
- package/{chunk-TZEP5J4A.js → chunk-3V6JT6WN.js} +2935 -1412
- package/{chunk-SBVTHMEG.js → chunk-4FE3IWRE.js} +1 -1
- package/{chunk-4JVNURX4.js → chunk-4YFC3DWW.js} +68 -16
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
- package/{chunk-VFBVA3U2.js → chunk-5TJE4QCL.js} +131 -40
- package/{chunk-YXMBJ7UH.js → chunk-6BGJHJRN.js} +21 -21
- package/chunk-6D25V6CB.js +133 -0
- package/chunk-6RSNVJGO.js +279 -0
- package/{chunk-IZIN2UNJ.js → chunk-6X3CS6NJ.js} +203 -24
- package/{chunk-XZGQ6ZCV.js → chunk-6XBOPKUH.js} +27 -90
- package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
- package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
- package/chunk-7NIBQ4HY.js +138 -0
- package/{chunk-7Z6EW7AH.js → chunk-7OTNBI77.js} +13 -6
- package/{chunk-HOK3ILHA.js → chunk-7Q7MKJZN.js} +590 -330
- package/{chunk-KZU52OJ5.js → chunk-7U2TFUWW.js} +6 -6
- package/{chunk-IUD7YR3B.js → chunk-B72AFRR2.js} +15 -15
- package/{chunk-4HFTBHBF.js → chunk-BDERPCJW.js} +8 -8
- package/chunk-BEM6LPD2.js +734 -0
- package/chunk-BIDSIRTS.js +307 -0
- package/{chunk-6J4TTPS2.js → chunk-BIJTI5SX.js} +5 -5
- package/chunk-BWW6WRX6.js +1438 -0
- package/{chunk-AGP3YSEC.js → chunk-C3GOEQJF.js} +46 -1
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-MOMR7NMG.js → chunk-C646JEUV.js} +2 -2
- package/{chunk-YI5CDUJD.js → chunk-CT6GT2BG.js} +9 -9
- package/{chunk-PVZY6P3S.js → chunk-CZLSTOVM.js} +2 -2
- package/{chunk-LJSNEV7M.js → chunk-DGUUOHBF.js} +8 -8
- package/{chunk-C4WTX5TU.js → chunk-DIBQXNGW.js} +2 -2
- package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
- package/{chunk-K44HIUBX.js → chunk-DLTMAXLF.js} +13 -13
- package/chunk-DVYAFH2Q.js +103 -0
- package/{chunk-SOG7OEXX.js → chunk-DWWUVRB5.js} +1 -1
- package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
- package/{chunk-GNHMRBYZ.js → chunk-EBKHA63G.js} +106 -14
- package/{chunk-KC4SCKXO.js → chunk-EIFSCI4C.js} +990 -1370
- package/{chunk-F3YK7KIU.js → chunk-EW37CXCQ.js} +4 -4
- package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
- package/{chunk-2VUZSVAS.js → chunk-F3FQPVHE.js} +57 -20
- package/{chunk-ZRAARRA3.js → chunk-FCAMGBLY.js} +1399 -2978
- package/{chunk-AK5O76CC.js → chunk-FPMPWNVQ.js} +3 -3
- package/{chunk-WQEMD4Z4.js → chunk-FSIEHQNH.js} +420 -120
- package/{chunk-FNDSBM4J.js → chunk-FXX6VFMV.js} +571 -348
- package/{chunk-7XS4W5KP.js → chunk-G6OPRPXH.js} +128 -149
- package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
- package/{chunk-2TIQO6TC.js → chunk-GCVFX6ZL.js} +206 -308
- package/{chunk-P25E3CKY.js → chunk-H6CHPU6M.js} +4 -4
- package/chunk-HNWZJI4N.js +33394 -0
- package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
- package/{chunk-KNIIRXHF.js → chunk-IPRPYKBP.js} +46 -8
- package/{chunk-C4VAR65S.js → chunk-IUXBKS5L.js} +200 -120
- package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
- package/{chunk-Z6USB65D.js → chunk-KGIIZXPL.js} +347 -14
- package/chunk-KK3FCYZM.js +647 -0
- package/{chunk-GBZ4YKEO.js → chunk-KOIDLCAQ.js} +8 -8
- package/{chunk-2ZKFCIJJ.js → chunk-LCQJH7KN.js} +1 -1
- package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
- package/{chunk-4NA3YTBC.js → chunk-LMFMV5UC.js} +8 -8
- package/{chunk-XN23AUVU.js → chunk-LMZRXDWG.js} +8 -5
- package/{chunk-EWPDMS4N.js → chunk-LN4ZVSO7.js} +30 -15
- package/{chunk-GOAPXKQU.js → chunk-LT3DMEIB.js} +4 -4
- package/{chunk-GGKNJ42M.js → chunk-LYDEFPQP.js} +18 -108
- package/{chunk-FTQWYWUI.js → chunk-MDVP5TLI.js} +1 -1
- package/{chunk-EOWLBDY6.js → chunk-MM73SP4K.js} +1 -1
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-3QFLXA24.js → chunk-N6EN3HK3.js} +3 -3
- package/{chunk-D726I5AZ.js → chunk-NBB2EBQD.js} +2 -2
- package/{chunk-DISQCYPE.js → chunk-NL7J2J5Z.js} +6 -6
- package/{chunk-JM5C4EUA.js → chunk-NQQL2DKF.js} +6 -6
- package/{chunk-LS2MGTUS.js → chunk-NWWQY2J5.js} +15 -15
- package/{chunk-TXGQ4O5S.js → chunk-OATIWAKN.js} +20 -174
- package/{chunk-KYH7XW3K.js → chunk-OJRTTERA.js} +77 -2
- package/{chunk-VV7TXWOC.js → chunk-OYHJ4TW7.js} +6 -6
- package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
- package/{chunk-2VA6TU4I.js → chunk-QES2NCVM.js} +17 -14
- package/{chunk-WG2LFJYB.js → chunk-QGMIUVBT.js} +39 -30
- package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
- package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-AMEOV5VZ.js → chunk-S25VJYXV.js} +41 -35
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
- package/{chunk-GVGOEMNV.js → chunk-T444ENEC.js} +3 -3
- package/{chunk-67BE44IS.js → chunk-TE2XH4KH.js} +1 -1
- package/{chunk-5RKUPJYL.js → chunk-TFGGNRT6.js} +11 -3
- package/{chunk-ZH6MUQEO.js → chunk-TTEBPPUV.js} +1 -1
- package/{chunk-QVBXJNZ2.js → chunk-TUSTONB3.js} +1 -1
- package/{chunk-AVHRSJUH.js → chunk-TXFYIWAW.js} +32 -25
- package/{chunk-KOXKKHFE.js → chunk-TXQVH72L.js} +9 -4
- package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
- package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
- package/{chunk-KDAGMRDA.js → chunk-UAHUJ4HH.js} +100 -32
- package/{chunk-BGGHA5DV.js → chunk-UAOFSUG7.js} +1 -1
- package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
- package/chunk-UKSKCDBG.js +62 -0
- package/{chunk-KEN3N2TN.js → chunk-VMJVAJ6W.js} +13 -10
- package/{chunk-SOF4OWDM.js → chunk-VS276URX.js} +0 -2
- package/chunk-WDWZPASX.js +29 -0
- package/chunk-WFGNWWJI.js +326 -0
- package/{chunk-UYOICCYG.js → chunk-WHO3LYDW.js} +64 -89
- package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
- package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
- package/{chunk-QLFCTYRH.js → chunk-X37RQEA3.js} +17 -10
- package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
- package/chunk-X7IA2B7R.js +166 -0
- package/{chunk-GIABSSWQ.js → chunk-XAFOLWLU.js} +4 -4
- package/{chunk-45LZIYXB.js → chunk-XNEDFWT4.js} +2 -2
- package/{chunk-EOJZGQAE.js → chunk-Y5RN44VH.js} +103 -100
- package/{chunk-OB6DVWPF.js → chunk-YFRJAE3R.js} +319 -95
- package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
- package/{chunk-3KNEE64G.js → chunk-YMCSR7PA.js} +14 -14
- package/chunk-YUZ2DAIH.js +34 -0
- package/chunk-Z6YTCDU4.js +24 -0
- package/{chunk-XQBIZRGW.js → chunk-ZBQ5UGYY.js} +3 -3
- package/{chunk-VREDDN25.js → chunk-ZQUCJBS4.js} +14 -9
- package/{chunk-UEKXWO7A.js → chunk-ZT3DYK5T.js} +15 -4
- package/{chunk-LM2PS3YS.js → chunk-ZTLTDUV6.js} +24 -11
- package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
- package/{cliAgentConfigHelpers-KICKKNYQ.js → cliAgentConfigHelpers-RFR7ZCSK.js} +12 -12
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
- package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
- package/{cliLocalAgentRecordReader-6FXGFBI3.js → cliLocalAgentRecordReader-AJ4UKHKT.js} +51 -45
- package/{commandRegistry-HJDPQSQ4.js → commandRegistry-IHWZVV4G.js} +98 -94
- package/{contentThunks-I6OR5ENG.js → contentThunks-YQRCBDKF.js} +38 -35
- package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-W67DE765.js} +4 -4
- package/{createAgentAutomationAction-7BCCTWO5.js → createAgentAutomationAction-ERSDNR4R.js} +38 -35
- package/{createDialogAction-CU27KSCJ.js → createDialogAction-QXC7JZPE.js} +39 -37
- package/{createPageAction-CWRTEYVA.js → createPageAction-RLZ7776F.js} +40 -37
- package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
- package/{dbSlice-ZJPDIFER.js → dbSlice-7M2ESEUO.js} +13 -12
- package/{deleteFile-Q3YDB4ML.js → deleteFile-WO6WSSNK.js} +10 -7
- package/{dialogCommands-OPTRZWTE.js → dialogCommands-UIRO4QNN.js} +62 -56
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-77B57PL6.js → dialogNotifyCommand-VDUFYBZV.js} +14 -14
- package/{dialogSlice-XODSLDHY.js → dialogSlice-A4U3C76D.js} +36 -33
- package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-SEC6UZWM.js} +3 -3
- package/{docCreateCommands-36WS33BK.js → docCreateCommands-MHPYTJWR.js} +56 -49
- package/{docDeleteCommands-C4CS4XLF.js → docDeleteCommands-VYULMBAQ.js} +58 -51
- package/{docReadCommands-QZMSFMPN.js → docReadCommands-FV3GGZ7V.js} +56 -49
- package/{docStore-TVN4SNVE.js → docStore-AWWI72FA.js} +15 -14
- package/{docUpdateCommands-BYI64HVV.js → docUpdateCommands-JNS3HX7F.js} +56 -49
- package/fetchMessages-TQEUZD7H.js +2 -2
- package/{getPricing-VNGFM4PN.js → getPricing-U5AR7ZHS.js} +5 -5
- package/{handleSendMessageAction-NSEMVHWX.js → handleSendMessageAction-WDJOUDNV.js} +68 -63
- package/{hostCredentialCreate-WBZY7DZB.js → hostCredentialCreate-H3FF2SAO.js} +123 -111
- package/index.js +56 -18
- package/keys-RWF7UCB4.js +2 -2
- package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
- package/{localDialogRead-SVTPA5GY.js → localDialogRead-3T2KMCRC.js} +1 -1
- package/{localRuntimeAdapter-OAIWERFA.js → localRuntimeAdapter-JAQQXZJP.js} +126 -113
- package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
- package/{machineCommands-OI37ZUQ4.js → machineCommands-WYOFNB5I.js} +146 -120
- package/{machineWsRunDispatch-73HKPV6D.js → machineWsRunDispatch-Y7UIAZNM.js} +118 -107
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/mcpLocalAuthorizeCommand-SCYEFLRK.js +106 -0
- package/{memberThunks-JRYNONYV.js → memberThunks-DIITWU4M.js} +22 -17
- package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
- package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
- package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
- package/package.json +1 -1
- package/{projectArchive-GVEARCOG.js → projectArchive-IZJXBW5N.js} +43 -40
- package/{providerPresetApply-J3WMRPD2.js → providerPresetApply-2QWXPJXZ.js} +6 -6
- package/{providerRegistry-KJGB5XWS.js → providerRegistry-W4LCKK6V.js} +6 -6
- package/{read-Q7GOHGNP.js → read-OBLJNMA2.js} +9 -8
- package/{readDocTool-Z5OQ6422.js → readDocTool-QQZ4DAER.js} +1 -1
- package/{readlineWorkspace-5DWUGNSU.js → readlineWorkspace-WF3SWZGR.js} +7055 -5248
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-HC3SOY3G.js} +17 -16
- package/{runAgentClientLoop-RDXIPF34.js → runAgentClientLoop-Z7V6TA3O.js} +97 -72
- package/{runtimeDoctorCommands-UXKXYBW6.js → runtimeDoctorCommands-KX6YLPWV.js} +17 -17
- package/{secretCommands-LJXOOYA7.js → secretCommands-STRAX275.js} +4 -4
- package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-DDZUQPY6.js} +16 -15
- package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-EB67OMAJ.js} +17 -16
- package/{settingThunks-AXTBX3Q5.js → settingThunks-TN6GFASU.js} +181 -62
- package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
- package/{spaceCommands-GUKMDRWN.js → spaceCommands-HBYQUVJI.js} +61 -54
- package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
- package/{streamAgentChatTurn-XEYQZPDJ.js → streamAgentChatTurn-CM7QQXOS.js} +178 -173
- package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-XY5TKQQE.js} +15 -14
- package/{tableCommands-HITDSLHS.js → tableCommands-MXFL3JIT.js} +13 -10
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-53YMJ2G6.js} +8 -6
- package/{tools-6DFTHCFX.js → tools-AT6H73LD.js} +66 -62
- package/tuiRestart-272SAYSK.js +41 -0
- package/{tuiSummaryLlmCaller-7WLUKNP2.js → tuiSummaryLlmCaller-K2OVRVHG.js} +20 -19
- package/{updateCommands-RJVCRSBP.js → updateCommands-O3BOVVVN.js} +8 -6
- package/{updateDialogTitleAction-AMSBV2H7.js → updateDialogTitleAction-PGY4UPLH.js} +38 -35
- package/{usageCommand-YPJ2ZI2F.js → usageCommand-SCF3ROV2.js} +4 -4
- package/{usageRebuildCommand-FERQO74C.js → usageRebuildCommand-K5WPIBA5.js} +5 -5
- package/webapi-24RZDIIQ.js +2488 -0
- package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-WJDUZLEO.js} +2 -2
- package/workContext-Y3ADAPZU.js +14 -0
- package/workContextAccess-UZHDLBUR.js +11 -0
- package/workContextWriteNotice-YCSSMHN4.js +7 -0
- package/agentRecordCommands-KLYKI4Z7.js +0 -177
- package/chunk-2THCNKE4.js +0 -147
- package/chunk-2WZXXAQD.js +0 -57
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-652XYZGP.js +0 -352
- package/chunk-BJF2MHJ3.js +0 -118
- package/chunk-KEPOVMF4.js +0 -91
- package/chunk-QZI44GWV.js +0 -776
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
- package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
- package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
- package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
- package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
- package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
- package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
gBase64
|
|
3
|
+
} from "./chunk-X7IA2B7R.js";
|
|
1
4
|
import {
|
|
2
5
|
createClientLogger
|
|
3
6
|
} from "./chunk-QQ56R7KS.js";
|
|
@@ -7,6 +10,9 @@ import {
|
|
|
7
10
|
import {
|
|
8
11
|
isAbortError
|
|
9
12
|
} from "./chunk-7DPNBQSV.js";
|
|
13
|
+
import {
|
|
14
|
+
isPublicBuiltinPlatformAgentKey
|
|
15
|
+
} from "./chunk-WRKMXMU7.js";
|
|
10
16
|
import {
|
|
11
17
|
API_ENDPOINTS,
|
|
12
18
|
NOLO_CLUSTER_SERVERS,
|
|
@@ -18,6 +24,39 @@ import {
|
|
|
18
24
|
normalizeServerOrigin
|
|
19
25
|
} from "./chunk-CF7PE763.js";
|
|
20
26
|
|
|
27
|
+
// packages/core/googleSessionScope.ts
|
|
28
|
+
function isGoogleAuthoritySession(token) {
|
|
29
|
+
if (typeof token !== "string") return false;
|
|
30
|
+
try {
|
|
31
|
+
return JSON.parse(gBase64.decode(token.split(".")[0])).authKind === "google-session-v1";
|
|
32
|
+
} catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function googleSessionServer(token, configuredServer) {
|
|
37
|
+
if (!isGoogleAuthoritySession(token)) return void 0;
|
|
38
|
+
const origin = typeof window !== "undefined" ? window.location?.origin : void 0;
|
|
39
|
+
if (typeof origin !== "string" || !/^https?:\/\//.test(origin)) return "";
|
|
40
|
+
return normalizeServerOrigin(origin);
|
|
41
|
+
}
|
|
42
|
+
function scopeGoogleSessionServers(token, configuredServer, servers) {
|
|
43
|
+
const server = googleSessionServer(token, configuredServer);
|
|
44
|
+
return server === void 0 ? servers : server ? [server] : [];
|
|
45
|
+
}
|
|
46
|
+
function googleSessionRequestToken(token, target, allowAnonymousPublic = false) {
|
|
47
|
+
if (!isGoogleAuthoritySession(token)) return token;
|
|
48
|
+
const authority = googleSessionServer(token);
|
|
49
|
+
let origin;
|
|
50
|
+
try {
|
|
51
|
+
origin = new URL(target).origin;
|
|
52
|
+
} catch {
|
|
53
|
+
throw new Error("google_session_origin_blocked");
|
|
54
|
+
}
|
|
55
|
+
if (authority && origin === authority) return token;
|
|
56
|
+
if (allowAnonymousPublic) return void 0;
|
|
57
|
+
throw new Error("google_session_origin_blocked");
|
|
58
|
+
}
|
|
59
|
+
|
|
21
60
|
// packages/app/utils/env.ts
|
|
22
61
|
var processEnv = typeof process !== "undefined" ? process.env : void 0;
|
|
23
62
|
var reactNativeDev = typeof globalThis !== "undefined" && "__DEV__" in globalThis ? globalThis.__DEV__ : void 0;
|
|
@@ -124,6 +163,7 @@ var createReadTimeoutError = (server, dbKey) => {
|
|
|
124
163
|
};
|
|
125
164
|
var isReadTimeoutError = (error) => error instanceof Error && error.name === READ_TIMEOUT_ERROR_NAME;
|
|
126
165
|
var fetchFromServer = async (server, dbKey, token, signal) => {
|
|
166
|
+
const requestToken = googleSessionRequestToken(token, server, isPublicBuiltinPlatformAgentKey(dbKey));
|
|
127
167
|
if (signal?.aborted) {
|
|
128
168
|
throw new DOMException("Aborted", "AbortError");
|
|
129
169
|
}
|
|
@@ -140,9 +180,10 @@ var fetchFromServer = async (server, dbKey, token, signal) => {
|
|
|
140
180
|
`${server}${buildReadUrl(dbKey)}`,
|
|
141
181
|
{
|
|
142
182
|
signal: controller.signal,
|
|
183
|
+
...isGoogleAuthoritySession(token) || !token ? { credentials: "omit", redirect: "error" } : {},
|
|
143
184
|
headers: {
|
|
144
185
|
"Content-Type": "application/json",
|
|
145
|
-
...
|
|
186
|
+
...requestToken && { Authorization: `Bearer ${requestToken}` }
|
|
146
187
|
}
|
|
147
188
|
}
|
|
148
189
|
);
|
|
@@ -173,6 +214,10 @@ var normalizeTimeFields = (data) => ({
|
|
|
173
214
|
});
|
|
174
215
|
|
|
175
216
|
export {
|
|
217
|
+
isGoogleAuthoritySession,
|
|
218
|
+
googleSessionServer,
|
|
219
|
+
scopeGoogleSessionServers,
|
|
220
|
+
googleSessionRequestToken,
|
|
176
221
|
isDevelopment,
|
|
177
222
|
getIsDesktopApp,
|
|
178
223
|
logger,
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyMemoryInterpreterMutation
|
|
3
|
+
} from "./chunk-6RSNVJGO.js";
|
|
4
|
+
import {
|
|
5
|
+
getMemoryEvidenceVNextStrict,
|
|
6
|
+
listMemoryStatesForEntityVNext,
|
|
7
|
+
loadMemoryVNextCatalog
|
|
8
|
+
} from "./chunk-324FWHUA.js";
|
|
9
|
+
|
|
10
|
+
// packages/ai/memory/vnext/workContext.ts
|
|
11
|
+
import { createHash } from "crypto";
|
|
12
|
+
var facet = "work-context";
|
|
13
|
+
var statuses = ["active", "paused", "completed", "cancelled"];
|
|
14
|
+
var hash = (v) => createHash("sha256").update(JSON.stringify(v)).digest("hex");
|
|
15
|
+
var isWorkContextState = (state) => state.facet === facet;
|
|
16
|
+
var bounded = (s, max) => typeof s === "string" && s.trim().length > 0 && s.length <= max;
|
|
17
|
+
var list = (x, maxCount, maxLength) => Array.isArray(x) && x.length <= maxCount && x.every((v) => bounded(v, maxLength));
|
|
18
|
+
var object = (x) => !!x && typeof x === "object" && !Array.isArray(x);
|
|
19
|
+
var validScope = (s) => {
|
|
20
|
+
if (!s || !bounded(s.ownerId, 256) || !bounded(s.dialogId, 512) || !(s.spaceId === null || bounded(s.spaceId, 256))) throw new Error("invalid authorized scope");
|
|
21
|
+
};
|
|
22
|
+
function validValue(v) {
|
|
23
|
+
return object(v) && v.version === 1 && Number.isSafeInteger(v.revision) && v.revision > 0 && statuses.includes(v.status) && bounded(v.goal, 4096) && list(v.constraints, 50, 2048) && list(v.openItems, 50, 2048) && (v.nextStep === void 0 || typeof v.nextStep === "string" && v.nextStep.length <= 4096) && list(v.latestSourceRefs, 20, 2048) && v.latestSourceRefs.length > 0 && (v.spaceId === null || bounded(v.spaceId, 256)) && list(v.dialogIds, 100, 512) && v.dialogIds.length > 0;
|
|
24
|
+
}
|
|
25
|
+
function validPatch(p) {
|
|
26
|
+
if (!object(p) || Object.keys(p).some((k) => !["status", "goal", "constraints", "openItems", "nextStep"].includes(k))) throw new Error("invalid patch");
|
|
27
|
+
if (p.status !== void 0 && !statuses.includes(p.status)) throw new Error("invalid status");
|
|
28
|
+
if (p.goal !== void 0 && !bounded(p.goal, 4096)) throw new Error("invalid goal");
|
|
29
|
+
if (p.nextStep !== void 0 && (typeof p.nextStep !== "string" || p.nextStep.length > 4096)) throw new Error("invalid nextStep");
|
|
30
|
+
for (const a of [p.constraints, p.openItems]) if (a !== void 0 && !list(a, 50, 2048)) throw new Error("invalid list");
|
|
31
|
+
}
|
|
32
|
+
async function updateWorkContext(db, scope, input) {
|
|
33
|
+
validScope(scope);
|
|
34
|
+
if (!object(input) || Object.keys(input).some((k) => !["activityId", "expectedRevision", "itemKey", "originRef", "changeId", "sourceRefs", "patch"].includes(k))) throw new Error("invalid input");
|
|
35
|
+
validPatch(input.patch);
|
|
36
|
+
if (!bounded(input.changeId, 256) || !list(input.sourceRefs, 20, 2048) || !input.sourceRefs.length) throw new Error("source and changeId required");
|
|
37
|
+
const creating = input.activityId === void 0;
|
|
38
|
+
if (creating && (!bounded(input.itemKey, 256) || !bounded(input.originRef, 2048) || input.expectedRevision !== void 0)) throw new Error("origin and itemKey required");
|
|
39
|
+
if (!creating && (!bounded(input.activityId, 256) || !Number.isSafeInteger(input.expectedRevision) || input.expectedRevision < 1 || input.itemKey !== void 0 || input.originRef !== void 0)) throw new Error("activityId and revision required");
|
|
40
|
+
const activityId = creating ? `work-${hash([scope.ownerId, scope.spaceId, input.originRef, input.itemKey])}` : input.activityId;
|
|
41
|
+
const evidenceId = `work-change-${hash([activityId, input.changeId])}`;
|
|
42
|
+
const fingerprint = hash([scope.spaceId, scope.dialogId, input]);
|
|
43
|
+
let result;
|
|
44
|
+
await applyMemoryInterpreterMutation(db, scope.ownerId, async () => {
|
|
45
|
+
const states = (await listMemoryStatesForEntityVNext(db, scope.ownerId, activityId)).filter(isWorkContextState);
|
|
46
|
+
const currents = states.filter((s) => !s.retiredAt);
|
|
47
|
+
if (currents.length > 1 || currents[0] && !validValue(currents[0].value)) throw new Error("invalid work context state");
|
|
48
|
+
const current = currents[0];
|
|
49
|
+
const old = current?.value;
|
|
50
|
+
if (old && old.spaceId !== scope.spaceId) {
|
|
51
|
+
result = { activityId, revision: 0, outcome: "conflict" };
|
|
52
|
+
return { action: "no_op", reason: "scope mismatch" };
|
|
53
|
+
}
|
|
54
|
+
const receipt = await getMemoryEvidenceVNextStrict(db, scope.ownerId, evidenceId);
|
|
55
|
+
if (receipt) {
|
|
56
|
+
const matching = states.find((s) => s.evidenceIds.includes(evidenceId));
|
|
57
|
+
const savedValue = matching && validValue(matching.value) ? matching.value : void 0;
|
|
58
|
+
const match = receipt.text === fingerprint && !!savedValue;
|
|
59
|
+
result = { activityId, revision: match ? savedValue.revision : old?.revision ?? 0, outcome: match ? savedValue.revision === 1 ? "created" : "updated" : "conflict" };
|
|
60
|
+
return { action: "no_op", reason: "duplicate change" };
|
|
61
|
+
}
|
|
62
|
+
if (creating && current || !creating && (!old || old.revision !== input.expectedRevision)) {
|
|
63
|
+
result = { activityId, revision: old?.revision ?? 0, outcome: "conflict" };
|
|
64
|
+
return { action: "no_op", reason: "revision conflict" };
|
|
65
|
+
}
|
|
66
|
+
if (!old && !input.patch.goal) throw new Error("goal required");
|
|
67
|
+
const status = input.patch.status ?? old?.status ?? "active";
|
|
68
|
+
const dialogIds = [.../* @__PURE__ */ new Set([...old?.dialogIds ?? [], scope.dialogId])];
|
|
69
|
+
if (dialogIds.length > 100) throw new Error("dialog association limit exceeded");
|
|
70
|
+
const value = { version: 1, revision: (old?.revision ?? 0) + 1, status, goal: input.patch.goal ?? old.goal, constraints: input.patch.constraints ?? old?.constraints ?? [], openItems: input.patch.openItems ?? old?.openItems ?? [], nextStep: input.patch.nextStep ?? old?.nextStep, latestSourceRefs: input.sourceRefs, spaceId: scope.spaceId, dialogIds };
|
|
71
|
+
const unchanged = !!old && JSON.stringify([old.status, old.goal, old.constraints, old.openItems, old.nextStep]) === JSON.stringify([value.status, value.goal, value.constraints, value.openItems, value.nextStep]);
|
|
72
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
73
|
+
result = { activityId, revision: unchanged ? old.revision : value.revision, outcome: unchanged ? "unchanged" : old ? "updated" : "created" };
|
|
74
|
+
if (unchanged) return { action: "no_op", reason: "unchanged" };
|
|
75
|
+
const evidence = { id: evidenceId, ownerId: scope.ownerId, text: fingerprint, sourceRef: input.sourceRefs[0], confidence: 1, createdAt: now };
|
|
76
|
+
return { action: old ? "update" : "create", reason: "work context", entities: old ? [] : [{ id: activityId, ownerId: scope.ownerId, type: "activity", subtype: facet, name: value.goal, createdAt: now, updatedAt: now }], evidence: [evidence], states: [{ id: `work-state-${hash([activityId, value.revision])}`, ownerId: scope.ownerId, entityId: activityId, facet, value, text: value.goal, evidenceIds: [evidenceId], createdAt: now, updatedAt: now }], supersededStateIds: current ? [current.id] : [] };
|
|
77
|
+
});
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
async function readWorkContexts(db, scope, query = {}) {
|
|
81
|
+
validScope(scope);
|
|
82
|
+
if (!object(query) || Object.keys(query).some((k) => !["activityId", "status", "query", "limit", "discovery"].includes(k))) throw new Error("invalid query");
|
|
83
|
+
const limit = query.limit ?? 20;
|
|
84
|
+
if (typeof limit !== "number" || !Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error("limit must be 1..100");
|
|
85
|
+
if (query.status !== void 0 && query.status !== "all" && !statuses.some((status) => status === query.status)) throw new Error("invalid status");
|
|
86
|
+
if (query.discovery !== void 0 && query.discovery !== "dialog" && query.discovery !== "scope") throw new Error("invalid discovery");
|
|
87
|
+
if (query.activityId !== void 0 && !bounded(query.activityId, 256)) throw new Error("invalid activityId");
|
|
88
|
+
if (query.query !== void 0 && !bounded(query.query, 512)) throw new Error("invalid query text");
|
|
89
|
+
const states = query.activityId ? await listMemoryStatesForEntityVNext(db, scope.ownerId, query.activityId) : (await loadMemoryVNextCatalog(db, scope.ownerId)).states;
|
|
90
|
+
const items = [];
|
|
91
|
+
for (const state of states) {
|
|
92
|
+
if (!isWorkContextState(state) || state.retiredAt) continue;
|
|
93
|
+
if (!validValue(state.value) || !bounded(state.entityId, 256) || !bounded(state.updatedAt, 128)) throw new Error("invalid work context state");
|
|
94
|
+
const value = state.value;
|
|
95
|
+
if (value.spaceId !== scope.spaceId || !query.activityId && query.discovery !== "scope" && !value.dialogIds.includes(scope.dialogId)) continue;
|
|
96
|
+
if (query.status !== "all" && value.status !== (query.status ?? (query.activityId ? value.status : "active"))) continue;
|
|
97
|
+
if (query.query && !JSON.stringify([value.goal, value.constraints, value.openItems, value.nextStep]).toLowerCase().includes(query.query.toLowerCase())) continue;
|
|
98
|
+
items.push({ activityId: state.entityId, value, updatedAt: state.updatedAt });
|
|
99
|
+
}
|
|
100
|
+
items.sort((a, b) => Number(b.value.dialogIds.includes(scope.dialogId)) - Number(a.value.dialogIds.includes(scope.dialogId)) || b.updatedAt.localeCompare(a.updatedAt) || a.activityId.localeCompare(b.activityId));
|
|
101
|
+
return { items: items.slice(0, limit), hasMore: items.length > limit };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
isWorkContextState,
|
|
106
|
+
updateWorkContext,
|
|
107
|
+
readWorkContexts
|
|
108
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_react
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RD3QLZQV.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeSpaceId
|
|
6
6
|
} from "./chunk-UAD2WT54.js";
|
|
7
7
|
import {
|
|
8
8
|
toTimestampMs
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TXFYIWAW.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM
|
|
12
12
|
} from "./chunk-U67V476Y.js";
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
markdownToSlate
|
|
3
|
-
} from "./chunk-FJ23FZXF.js";
|
|
4
1
|
import {
|
|
5
2
|
createEmptyParagraph,
|
|
6
3
|
splitSlateTitleAndBody
|
|
@@ -11,19 +8,22 @@ import {
|
|
|
11
8
|
import {
|
|
12
9
|
buildSkillSummaryMarker
|
|
13
10
|
} from "./chunk-VF4K2QE6.js";
|
|
11
|
+
import {
|
|
12
|
+
markdownToSlate
|
|
13
|
+
} from "./chunk-VIYVRPMJ.js";
|
|
14
14
|
import {
|
|
15
15
|
addContentToSpace,
|
|
16
16
|
resolveCreationSpaceId
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
runtime_default
|
|
20
|
-
} from "./chunk-FNDSBM4J.js";
|
|
17
|
+
} from "./chunk-6BGJHJRN.js";
|
|
21
18
|
import {
|
|
22
19
|
getCurrentSpaceId
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-C646JEUV.js";
|
|
21
|
+
import {
|
|
22
|
+
runtime_default
|
|
23
|
+
} from "./chunk-FXX6VFMV.js";
|
|
24
24
|
import {
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TXFYIWAW.js";
|
|
27
27
|
import {
|
|
28
28
|
selectIdentityUserId
|
|
29
29
|
} from "./chunk-PXYBUFDB.js";
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
patch,
|
|
7
7
|
read
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TXFYIWAW.js";
|
|
9
9
|
import {
|
|
10
10
|
DEVICE_LOCAL_OWNER_ID,
|
|
11
11
|
isDeviceLocalSpaceBody
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-F3FQPVHE.js";
|
|
13
13
|
import {
|
|
14
14
|
selectIdentityUserId
|
|
15
15
|
} from "./chunk-PXYBUFDB.js";
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getApproxPricePerImage
|
|
6
6
|
} from "./chunk-4JH2UMJR.js";
|
|
7
|
-
import {
|
|
8
|
-
getModelConfig
|
|
9
|
-
} from "./chunk-KYH7XW3K.js";
|
|
10
|
-
import {
|
|
11
|
-
isPlatformHostedImageModel,
|
|
12
|
-
isPlatformManagedProvider,
|
|
13
|
-
resolvePlatformEffectiveModel
|
|
14
|
-
} from "./chunk-OBSEKCVK.js";
|
|
15
7
|
import {
|
|
16
8
|
asOptionalPositiveFiniteNumber
|
|
17
9
|
} from "./chunk-U6VC4MU4.js";
|
|
10
|
+
import {
|
|
11
|
+
getModelConfig
|
|
12
|
+
} from "./chunk-OJRTTERA.js";
|
|
18
13
|
import {
|
|
19
14
|
asOptionalFiniteNumber
|
|
20
15
|
} from "./chunk-WWC7I6TA.js";
|
|
16
|
+
import {
|
|
17
|
+
isPlatformHostedImageModel,
|
|
18
|
+
isPlatformManagedProvider,
|
|
19
|
+
resolvePlatformEffectiveModel
|
|
20
|
+
} from "./chunk-U4VSBDO5.js";
|
|
21
21
|
|
|
22
22
|
// packages/ai/llm/getPricing.ts
|
|
23
23
|
var MAX_OUTPUT_TOKENS = 8192;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRuntimeServerContext,
|
|
3
3
|
scheduleDeleteReplication
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F3FQPVHE.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchFromClientDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-C3GOEQJF.js";
|
|
8
8
|
import {
|
|
9
9
|
selectIdentityToken
|
|
10
10
|
} from "./chunk-PXYBUFDB.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// packages/cli/agentCommandSupport.ts
|
|
6
6
|
async function getDefaultCliDb() {
|
|
7
|
-
const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-
|
|
7
|
+
const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-5WZ4RJJO.js");
|
|
8
8
|
return getDefaultCliLocalRuntimeDb();
|
|
9
9
|
}
|
|
10
10
|
function createNullCliDb() {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
upsertSSREntity,
|
|
3
3
|
write
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TXFYIWAW.js";
|
|
5
5
|
import {
|
|
6
6
|
getRuntimeServerContext,
|
|
7
7
|
resolveRecordAuthority
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F3FQPVHE.js";
|
|
9
9
|
import {
|
|
10
10
|
TIMEOUT,
|
|
11
11
|
asyncThunkCreator,
|
|
12
12
|
buildCreateSlice,
|
|
13
13
|
noloRequest
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7OTNBI77.js";
|
|
15
15
|
import {
|
|
16
16
|
applyAgentSecretMigrationUpdates,
|
|
17
17
|
migrateAgentSecrets,
|
|
18
18
|
normalizeAgentRuntimeToolPolicy
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-USGHJSGO.js";
|
|
20
|
+
import {
|
|
21
|
+
createFileCredentialBroker
|
|
22
|
+
} from "./chunk-OQHIVPG4.js";
|
|
20
23
|
import {
|
|
21
24
|
asRecordOrEmpty
|
|
22
25
|
} from "./chunk-KX6YBIHG.js";
|
|
23
|
-
import {
|
|
24
|
-
createFileCredentialBroker
|
|
25
|
-
} from "./chunk-SNBZZPYH.js";
|
|
26
26
|
import {
|
|
27
27
|
isLevelNotFoundError
|
|
28
28
|
} from "./chunk-OW765XBU.js";
|
|
@@ -31,15 +31,15 @@ import {
|
|
|
31
31
|
createUserKey,
|
|
32
32
|
toTrimmedString
|
|
33
33
|
} from "./chunk-SYTHYBMI.js";
|
|
34
|
+
import {
|
|
35
|
+
API_ENDPOINTS
|
|
36
|
+
} from "./chunk-LCBAMY2M.js";
|
|
34
37
|
import {
|
|
35
38
|
asTrimmedString
|
|
36
39
|
} from "./chunk-3EUW3WEO.js";
|
|
37
40
|
import {
|
|
38
41
|
isRecord
|
|
39
42
|
} from "./chunk-KUG52IAP.js";
|
|
40
|
-
import {
|
|
41
|
-
API_ENDPOINTS
|
|
42
|
-
} from "./chunk-LCBAMY2M.js";
|
|
43
43
|
import {
|
|
44
44
|
asOptionalTrimmedString
|
|
45
45
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -458,7 +458,7 @@ var slice = createSliceWithThunks({
|
|
|
458
458
|
const overrides = {};
|
|
459
459
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
460
460
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
461
|
-
const { _executeModel } = await import("./_executeModel-
|
|
461
|
+
const { _executeModel } = await import("./_executeModel-UCWDB72C.js");
|
|
462
462
|
return _executeModel(
|
|
463
463
|
{
|
|
464
464
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -479,7 +479,7 @@ var slice = createSliceWithThunks({
|
|
|
479
479
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
480
480
|
*/
|
|
481
481
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
482
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
482
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-Z7V6TA3O.js");
|
|
483
483
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
484
484
|
{
|
|
485
485
|
agentKey: args.agentKey,
|
|
@@ -495,7 +495,7 @@ var slice = createSliceWithThunks({
|
|
|
495
495
|
* 聊天轮次流式 Agent 调用
|
|
496
496
|
*/
|
|
497
497
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
498
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
498
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-CM7QQXOS.js");
|
|
499
499
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
500
500
|
}),
|
|
501
501
|
/**
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WORKFLOW_GUIDANCE_SKILL_SLUGS
|
|
3
|
+
} from "./chunk-EBKHA63G.js";
|
|
4
|
+
|
|
5
|
+
// packages/ai/policy/types.ts
|
|
6
|
+
var DEFAULT_USER_PREFERENCE_PROFILE = {
|
|
7
|
+
version: 1,
|
|
8
|
+
tone: {
|
|
9
|
+
preset: "default"
|
|
10
|
+
},
|
|
11
|
+
knowledgeCaptureLevel: 2,
|
|
12
|
+
spaceContextLevel: 3
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// packages/ai/skills/userPromptSkills.ts
|
|
16
|
+
var RECOMMENDED_PROMPT_SKILL_SLUGS = ["ub-mode"];
|
|
17
|
+
var ALLOWED_PROMPT_SKILL_SLUGS = new Set(
|
|
18
|
+
RECOMMENDED_PROMPT_SKILL_SLUGS
|
|
19
|
+
);
|
|
20
|
+
function normalizeEnabledPromptSkills(value) {
|
|
21
|
+
if (!Array.isArray(value)) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const result = [];
|
|
25
|
+
const seen = /* @__PURE__ */ new Set();
|
|
26
|
+
for (const item of value) {
|
|
27
|
+
if (typeof item !== "string") {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const trimmed = item.trim();
|
|
31
|
+
if (ALLOWED_PROMPT_SKILL_SLUGS.has(trimmed) && !seen.has(trimmed)) {
|
|
32
|
+
seen.add(trimmed);
|
|
33
|
+
result.push(trimmed);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// packages/ai/skills/userSkills.ts
|
|
40
|
+
var NEW_ACCOUNT_DEFAULT_WORKFLOW_SKILLS = WORKFLOW_GUIDANCE_SKILL_SLUGS;
|
|
41
|
+
function isAccountOnDemandWorkflowSkill(slug) {
|
|
42
|
+
return typeof slug === "string" && NEW_ACCOUNT_DEFAULT_WORKFLOW_SKILLS.some((candidate) => candidate === slug.trim());
|
|
43
|
+
}
|
|
44
|
+
var SUPPORTED_USER_SKILL_SLUGS = [
|
|
45
|
+
"ub-mode",
|
|
46
|
+
"auto-review",
|
|
47
|
+
"code-style",
|
|
48
|
+
"worktree-isolation",
|
|
49
|
+
"systematic-investigation",
|
|
50
|
+
"show-me",
|
|
51
|
+
"caveman",
|
|
52
|
+
"secrets-manager",
|
|
53
|
+
"skill-creator",
|
|
54
|
+
"code-planning",
|
|
55
|
+
"coding",
|
|
56
|
+
"coding-review",
|
|
57
|
+
"android-adb",
|
|
58
|
+
"mihome-assistant",
|
|
59
|
+
"stock-quotes",
|
|
60
|
+
...NEW_ACCOUNT_DEFAULT_WORKFLOW_SKILLS
|
|
61
|
+
];
|
|
62
|
+
var SUPPORTED_USER_SKILL_SLUG_SET = new Set(
|
|
63
|
+
SUPPORTED_USER_SKILL_SLUGS
|
|
64
|
+
);
|
|
65
|
+
function normalizeEnabledSkills(value) {
|
|
66
|
+
if (!Array.isArray(value)) {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
const result = [];
|
|
70
|
+
const seen = /* @__PURE__ */ new Set();
|
|
71
|
+
for (const item of value) {
|
|
72
|
+
if (typeof item !== "string") {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const trimmed = item.trim();
|
|
76
|
+
if (SUPPORTED_USER_SKILL_SLUG_SET.has(trimmed) && !seen.has(trimmed)) {
|
|
77
|
+
seen.add(trimmed);
|
|
78
|
+
result.push(trimmed);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
function resolveUserEnabledSkills(preferences) {
|
|
84
|
+
if (!preferences || typeof preferences !== "object") {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
if (Object.prototype.hasOwnProperty.call(preferences, "enabledSkills")) {
|
|
88
|
+
return normalizeEnabledSkills(preferences.enabledSkills);
|
|
89
|
+
}
|
|
90
|
+
if (Object.prototype.hasOwnProperty.call(preferences, "enabledPromptSkills")) {
|
|
91
|
+
const legacy = normalizeEnabledPromptSkills(preferences.enabledPromptSkills);
|
|
92
|
+
return legacy.filter((slug) => SUPPORTED_USER_SKILL_SLUG_SET.has(slug));
|
|
93
|
+
}
|
|
94
|
+
return [];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export {
|
|
98
|
+
DEFAULT_USER_PREFERENCE_PROFILE,
|
|
99
|
+
normalizeEnabledPromptSkills,
|
|
100
|
+
isAccountOnDemandWorkflowSkill,
|
|
101
|
+
normalizeEnabledSkills,
|
|
102
|
+
resolveUserEnabledSkills
|
|
103
|
+
};
|
|
@@ -4,9 +4,18 @@ import {
|
|
|
4
4
|
normalizeNonNegativeMs,
|
|
5
5
|
parseRetryAfterHeaderMs
|
|
6
6
|
} from "./chunk-3L2WKC3W.js";
|
|
7
|
+
import {
|
|
8
|
+
dialogMessageKey
|
|
9
|
+
} from "./chunk-OJKUU3LP.js";
|
|
7
10
|
import {
|
|
8
11
|
toErrorMessage
|
|
9
12
|
} from "./chunk-HNMXYYJR.js";
|
|
13
|
+
import {
|
|
14
|
+
asOptionalFiniteNumber
|
|
15
|
+
} from "./chunk-WWC7I6TA.js";
|
|
16
|
+
import {
|
|
17
|
+
asOptionalTrimmedString
|
|
18
|
+
} from "./chunk-G3SUCT4W.js";
|
|
10
19
|
import {
|
|
11
20
|
isLoopbackHostname
|
|
12
21
|
} from "./chunk-4SN6J65J.js";
|
|
@@ -124,7 +133,86 @@ async function fetchWithTransientRetry(fetchImpl, input, init, options = {}) {
|
|
|
124
133
|
throw lastError;
|
|
125
134
|
}
|
|
126
135
|
|
|
136
|
+
// packages/core/chat/dialogAttachmentCleanup.ts
|
|
137
|
+
var FILE_CONTENT_RE = /(?:https?:\/\/[^/"'\s]+)?\/api\/v1\/db\/file\/content\/([^?#"'\s)]+)/g;
|
|
138
|
+
function extractFileContentIds(value) {
|
|
139
|
+
const ids = /* @__PURE__ */ new Set();
|
|
140
|
+
const visit = (input) => {
|
|
141
|
+
if (typeof input === "string") {
|
|
142
|
+
for (const match of input.matchAll(FILE_CONTENT_RE)) {
|
|
143
|
+
const fileId = decodeURIComponent(match[1] ?? "").trim();
|
|
144
|
+
if (fileId) ids.add(fileId);
|
|
145
|
+
}
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (Array.isArray(input)) {
|
|
149
|
+
for (const item of input) visit(item);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (input && typeof input === "object") {
|
|
153
|
+
for (const item of Object.values(input)) visit(item);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
visit(value);
|
|
157
|
+
return [...ids];
|
|
158
|
+
}
|
|
159
|
+
function messageDbKey(dialogId, message) {
|
|
160
|
+
const dbKey = asOptionalTrimmedString(message.dbKey);
|
|
161
|
+
if (dbKey) return dbKey;
|
|
162
|
+
const id = asOptionalTrimmedString(message.id);
|
|
163
|
+
if (id) return dialogMessageKey(dialogId, id);
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
function asText(value) {
|
|
167
|
+
return asOptionalTrimmedString(value) ?? null;
|
|
168
|
+
}
|
|
169
|
+
function buildDialogAttachmentPlan(args) {
|
|
170
|
+
const messageKeys = new Set(
|
|
171
|
+
args.messages.map((message) => messageDbKey(args.dialogId, message)).filter((key) => Boolean(key))
|
|
172
|
+
);
|
|
173
|
+
const referencedFileIds = [
|
|
174
|
+
...new Set(args.messages.flatMap((message) => extractFileContentIds(message)))
|
|
175
|
+
];
|
|
176
|
+
const candidates = referencedFileIds.map((fileId) => {
|
|
177
|
+
const metadata = args.metadataByFileId[fileId];
|
|
178
|
+
const ownerType = asText(metadata?.ownerType);
|
|
179
|
+
const ownerId = asText(metadata?.ownerId);
|
|
180
|
+
const ownerDbKey = asText(metadata?.ownerDbKey);
|
|
181
|
+
const fileDbKey = asText(metadata?.dbKey);
|
|
182
|
+
const source = asText(metadata?.source);
|
|
183
|
+
const ownedByDialog = ownerType === "dialog" && ownerId === args.dialogId;
|
|
184
|
+
const ownedByMessage = Boolean(ownerDbKey && messageKeys.has(ownerDbKey));
|
|
185
|
+
const userOwnedReferenced = args.includeUserOwnedReferenced === true && Boolean(args.ownerId) && ownerType === "user" && ownerId === args.ownerId;
|
|
186
|
+
const canDelete = Boolean(fileDbKey && (ownedByDialog || ownedByMessage || userOwnedReferenced));
|
|
187
|
+
return {
|
|
188
|
+
fileId,
|
|
189
|
+
fileDbKey,
|
|
190
|
+
size: asOptionalFiniteNumber(metadata?.size) ?? null,
|
|
191
|
+
ownerType,
|
|
192
|
+
ownerId,
|
|
193
|
+
ownerDbKey,
|
|
194
|
+
source,
|
|
195
|
+
status: canDelete ? "delete" : "retain",
|
|
196
|
+
reason: canDelete ? ownedByMessage ? "ownerDbKey matches a message in this dialog" : userOwnedReferenced ? "user-owned file is referenced by this dialog and explicit referenced-attachment deletion is enabled" : "ownerType/ownerId matches this dialog" : fileDbKey ? "file ownership is not exclusive to this dialog" : "file metadata not found"
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
const deleteCandidates = candidates.filter((candidate) => candidate.status === "delete");
|
|
200
|
+
const retainedCandidates = candidates.filter((candidate) => candidate.status === "retain");
|
|
201
|
+
return {
|
|
202
|
+
dialogId: args.dialogId,
|
|
203
|
+
messageCount: args.messages.length,
|
|
204
|
+
referencedFileIds,
|
|
205
|
+
candidates,
|
|
206
|
+
deleteCandidates,
|
|
207
|
+
retainedCandidates,
|
|
208
|
+
bytesToDelete: deleteCandidates.reduce((sum, candidate) => sum + (candidate.size ?? 0), 0),
|
|
209
|
+
metadataReadFailures: args.metadataReadFailures ?? []
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
|
|
127
213
|
export {
|
|
128
214
|
isTransientFetchError,
|
|
129
|
-
fetchWithTransientRetry
|
|
215
|
+
fetchWithTransientRetry,
|
|
216
|
+
extractFileContentIds,
|
|
217
|
+
buildDialogAttachmentPlan
|
|
130
218
|
};
|