nolo-cli 0.228.0-alpha.2 → 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/README.md +3 -5
- package/{_executeModel-VYCHHZVT.js → _executeModel-AKCTHGMP.js} +89 -83
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-GDZDXPMB.js → action-C6IQAKN4.js} +8 -5
- package/{addContentAction-7RO4AMRI.js → addContentAction-53364YDW.js} +13 -12
- package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-U5DD5EN5.js} +16 -15
- package/{agentDeleteCommand-QWQKT54A.js → agentDeleteCommand-2E5FAGUO.js} +128 -115
- package/{agentEmailCommands-EISMBIRE.js → agentEmailCommands-UGZZAH7E.js} +128 -111
- package/{agentListCommands-4WLG32IW.js → agentListCommands-JCTW3J2K.js} +398 -179
- package/{agentMachineCommands-DC6NKWTU.js → agentMachineCommands-QPG5ZXF4.js} +58 -47
- package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-KHV4EELF.js → agentPullCommand-2EYJ5ENC.js} +1 -1
- package/agentRecordCommands-4NTVR6MZ.js +194 -0
- package/agentRunCommand-VHF34PYC.js +232 -0
- package/{agentRunControl-MBG4U6SL.js → agentRunControl-QYTXUQGY.js} +14 -9
- package/{agentRuntimeLocal-HOXKWCYO.js → agentRuntimeLocal-U54AKHXH.js} +58 -43
- package/{agentSlice-UG76KEBH.js → agentSlice-4JGDEXWK.js} +14 -13
- package/{appDeleteCommands-WWCC6WA5.js → appDeleteCommands-XBE5QJ6P.js} +58 -47
- package/{appDeployCommands-AU4IUN33.js → appDeployCommands-QIYLXXGA.js} +58 -47
- package/{appDeployStatusCommands-STUW7WXL.js → appDeployStatusCommands-JXS6ZQZZ.js} +58 -47
- package/{appGetCommands-BGTLIQ4K.js → appGetCommands-SZS7SJPK.js} +58 -47
- package/{appListCommands-CUCPRUXW.js → appListCommands-B3GBJSNV.js} +58 -47
- package/{authCommand-OZ2KTP4Z.js → authCommand-V6EOMZX6.js} +25 -19
- package/{authCommands-55OGQGCR.js → authCommands-T5FODCEG.js} +12 -6
- package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-ZQC3IIO2.js} +8 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
- package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-OFX7ZGKP.js} +3 -3
- package/{chunk-DBUR22G5.js → chunk-223KZUJ6.js} +19 -15
- package/{chunk-3U44JB3O.js → chunk-2C5VN7NH.js} +1 -1
- package/{chunk-PWTNI4N7.js → chunk-2E4BYAUE.js} +22 -0
- package/{chunk-L32W3PRP.js → chunk-2FZVXOFX.js} +234 -18
- package/{chunk-HBRDSQ3M.js → chunk-2JHGUL5K.js} +3 -2
- package/chunk-2SXN7LAY.js +15 -0
- package/chunk-3A5NNQCN.js +64 -0
- package/chunk-3F2FRLIO.js +372 -0
- package/{chunk-DEA37IUY.js → chunk-46FETNLF.js} +2 -2
- package/{chunk-ZEVQHCLM.js → chunk-4GYVS4PM.js} +8 -6
- package/{chunk-CBUZ6DKA.js → chunk-4YPH5KRA.js} +1 -1
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-7FEP5USX.js → chunk-5AYP5QBB.js} +5 -5
- package/{chunk-XAG3FWBE.js → chunk-5ISNPTQH.js} +5 -5
- package/{chunk-EVGU5P4U.js → chunk-5P3PPQVP.js} +1 -1
- package/{chunk-XSW4EXQV.js → chunk-6BMTKYAO.js} +55 -18
- package/chunk-6PAHSSD2.js +33401 -0
- package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
- package/{chunk-7JGMNKKG.js → chunk-6SOWMEAY.js} +30 -9
- package/{chunk-RG2DGNL6.js → chunk-6VEO7Z3Y.js} +3 -3
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-DGYCDA6W.js → chunk-7BIJFGKS.js} +36 -17
- package/{chunk-WFDNADFX.js → chunk-7OVOZRZF.js} +8 -8
- package/{chunk-WCFFRBL5.js → chunk-7PON4LBY.js} +45 -27
- package/{chunk-QRGDJA4B.js → chunk-7WHCIA5V.js} +33 -7
- package/{chunk-CMMI3DAT.js → chunk-ADYWV732.js} +59 -30
- package/{chunk-QYB23WUH.js → chunk-AIFQKNPP.js} +1 -1
- package/{chunk-HGDKT2D6.js → chunk-BPB3T5EU.js} +174 -1
- package/{chunk-DUUDXSLX.js → chunk-BZLGPM5B.js} +28 -4
- package/{chunk-ATEKLSLR.js → chunk-BZMDWGQQ.js} +14 -9
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-S6K5F3KP.js → chunk-CEKRIR22.js} +1 -1
- package/{chunk-42OKN2LI.js → chunk-D634SL2Y.js} +9 -107
- package/{chunk-DLXMMTGM.js → chunk-DHRPLRIR.js} +1283 -786
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-OBIC6EG7.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-X3E6EHJW.js → chunk-E3LSO6EI.js} +292 -207
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/chunk-EHFBP6IK.js +791 -0
- package/chunk-EJQE5HB7.js +21 -0
- package/{chunk-VQ5N5GSV.js → chunk-EL5NRJHI.js} +4 -4
- package/chunk-EUGTFFO6.js +42 -0
- package/{chunk-7BCG67EI.js → chunk-EVHTYVD2.js} +1199 -442
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-262R3XNN.js → chunk-FEIVARWR.js} +377 -112
- package/{chunk-3VZLEKV2.js → chunk-FLBJ7IJI.js} +14 -14
- package/{chunk-EEOOBRA7.js → chunk-FXEPZKNJ.js} +13 -6
- package/{chunk-XTJKU3Z4.js → chunk-FYAMUU55.js} +677 -140
- package/{chunk-M3OZRQNH.js → chunk-FZANZZ63.js} +1 -1
- package/chunk-GAHJLSDO.js +107 -0
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-4N6G2CKP.js → chunk-HDKMVYNJ.js} +47 -1
- package/chunk-HEVRQGGH.js +106 -0
- package/{chunk-BIWI5M4E.js → chunk-HFHJPHFK.js} +1 -1
- package/{chunk-R6Z5S5GA.js → chunk-HPDLPEUG.js} +60 -17
- package/{chunk-YKY4OVOX.js → chunk-HQUGB2HM.js} +17 -170
- package/chunk-IIRJ4P4I.js +24 -0
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-ALAES342.js → chunk-IYLUK67R.js} +9 -5
- package/{chunk-N5Z2V73W.js → chunk-J55F3IEZ.js} +1 -1
- package/{chunk-S6FDXXZV.js → chunk-J7JRCOIW.js} +2 -2
- package/{chunk-OWKNSIXL.js → chunk-JAKRY74O.js} +470 -83
- package/{chunk-VS276URX.js → chunk-JCQ3WCQ3.js} +4 -2
- package/chunk-JLZJL3WC.js +988 -0
- package/{chunk-OBSEKCVK.js → chunk-JPXACKSW.js} +219 -52
- package/{chunk-OTKSESZR.js → chunk-KDBDOXOM.js} +138 -54
- package/{chunk-VP3BINY7.js → chunk-KDDHQMSH.js} +31 -1
- package/{chunk-RBPUNSG5.js → chunk-KG27JIG4.js} +18 -108
- package/{chunk-4WVJLODK.js → chunk-KHYSFS3W.js} +88 -7
- package/{chunk-TCZ2VJZQ.js → chunk-KKIQAVDR.js} +9 -9
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/chunk-KXOPLLFP.js +190 -0
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-HYLRQDEE.js → chunk-LLUBUHNT.js} +6 -6
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-RTHFJZ6M.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-TI2EPRHE.js → chunk-MNFUKRRU.js} +3 -3
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-CNMY2XM6.js → chunk-O3A2CHAL.js} +6 -6
- package/{chunk-TSPMLCWI.js → chunk-OB4FBZXJ.js} +5 -5
- package/{chunk-LYD6C7OU.js → chunk-OJSJJKHF.js} +6 -6
- package/{chunk-M4SFKP5L.js → chunk-OKAXQFON.js} +3 -3
- package/{chunk-CD3RU7XL.js → chunk-OKH74FML.js} +121 -14
- package/{chunk-U2HBB7RS.js → chunk-OOV5JN25.js} +130 -30
- package/{chunk-ZH3KXFHS.js → chunk-OOVOAG4Q.js} +1 -1
- package/chunk-OQFOE4SJ.js +405 -0
- package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-SRCCSTIM.js → chunk-P4R5KXU7.js} +4 -4
- package/{chunk-FJ23FZXF.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-HSSBDZLD.js → chunk-PIVTQRX6.js} +43 -13
- package/{chunk-XFXFPUO7.js → chunk-PJL7OJRC.js} +13 -39
- package/{chunk-RRDRQOEC.js → chunk-PNLDLUMO.js} +276 -303
- package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
- package/{chunk-HHFGE2WF.js → chunk-QGFLVQ6E.js} +5 -5
- package/{chunk-EGHP7KOY.js → chunk-QONAOHVW.js} +38 -29
- package/chunk-R3FZHW4Q.js +103 -0
- package/{chunk-ZYKJBRZ3.js → chunk-R3MV2GII.js} +1 -47
- package/chunk-R72QWIFO.js +50 -0
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-ILHQ2AXT.js → chunk-RIWKZT7E.js} +36 -8
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-45CAVC35.js → chunk-S7H4KTMB.js} +2568 -337
- package/{chunk-OJ45MEEI.js → chunk-SA356NGW.js} +1 -1
- package/{chunk-F6Z6ZCUV.js → chunk-SCAC3NM5.js} +3 -3
- package/{chunk-YVFH2MFB.js → chunk-SLUN7W6S.js} +7 -7
- package/chunk-SQL7YNED.js +650 -0
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-HF7BLF3F.js → chunk-SSOR2EDT.js} +107 -104
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-3QIYD3VM.js → chunk-TUOHSUK5.js} +20068 -18402
- package/chunk-TYJCIA2O.js +835 -0
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-GAYNXB6T.js → chunk-U3BUWDUP.js} +1031 -2155
- package/{chunk-BP5ZJ6B4.js → chunk-U6QNVOR5.js} +1 -1
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/chunk-UAF5VQCE.js +77 -0
- package/{chunk-TQEKUOTI.js → chunk-UFGUJ2IH.js} +12 -12
- package/{chunk-VMJVAJ6W.js → chunk-UP7KBWLE.js} +109 -33
- package/{chunk-2X7WFDT6.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-5YMA6DDZ.js → chunk-UZKBVQUX.js} +1 -1
- package/chunk-V5TI7HJH.js +133 -0
- package/{chunk-WFGNWWJI.js → chunk-VH7UO6E5.js} +252 -114
- package/{chunk-MNEZUL5S.js → chunk-VJFDG3ZG.js} +63 -94
- package/{chunk-G7IUT2V3.js → chunk-WC3J5SL2.js} +635 -350
- package/{chunk-HXB4VDGK.js → chunk-WD5547ZF.js} +33 -30
- package/chunk-WDWZPASX.js +29 -0
- package/{chunk-4ZGPHFLE.js → chunk-WS36XPJD.js} +2 -2
- package/{chunk-6QHKRARD.js → chunk-WSLL7VV4.js} +29 -5
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-MZG5CETE.js → chunk-Y2KWJTOZ.js} +4 -4
- package/{dialogUsageCommand-W2WCSGKF.js → chunk-Y2TCTNUD.js} +27 -20
- package/chunk-YJPK35HB.js +175 -0
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-547ENH5T.js → chunk-YN23INFZ.js} +4 -4
- package/{chunk-4QYJPWHH.js → chunk-YXK3GJF5.js} +232 -10
- package/{chunk-MJI3UAXN.js → chunk-Z2OWAYMI.js} +77 -51
- package/{chunk-7Z6EW7AH.js → chunk-ZTHAJU3O.js} +106 -14
- package/{chunk-YFLVRVYK.js → chunk-ZYPXOQS2.js} +1 -1
- package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-BXHQ3PXP.js} +9 -9
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +22 -0
- package/cliLocalAgentRecordReader-47PXMHPH.js +104 -0
- package/{commandRegistry-FVYPE2IN.js → commandRegistry-CTMPAQH2.js} +111 -162
- package/{contentThunks-GNFPG32S.js → contentThunks-CAHIIZO5.js} +38 -36
- package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-WDOI5VD7.js} +3 -3
- package/{createAgentAutomationAction-PB4QIFQ4.js → createAgentAutomationAction-M25XZSPD.js} +38 -36
- package/{createDialogAction-EVTOPY7A.js → createDialogAction-4SN7FKI7.js} +39 -37
- package/{createPageAction-2UYF2IDZ.js → createPageAction-N7QPDN3M.js} +43 -41
- package/{db-M7FU2GNK.js → db-VR74ADGC.js} +7 -2
- package/{dbSlice-XRUZOGSU.js → dbSlice-RWPSVHBC.js} +12 -11
- package/{deleteFile-6URDHYRB.js → deleteFile-ECU6FU5C.js} +15 -7
- package/{dialogCommands-6SZD4TYP.js → dialogCommands-BBHWCKDP.js} +69 -53
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-IASQGEMW.js} +11 -11
- package/{dialogSlice-5EQ2A6LY.js → dialogSlice-JI3J22RV.js} +39 -37
- package/dialogTraceCommand-EW2KK6A4.js +961 -0
- package/dialogUsageCommand-WJ3U6KZU.js +27 -0
- package/{docCreateCommands-25E6PGN3.js → docCreateCommands-QSX3X5U4.js} +57 -46
- package/{docDeleteCommands-F7ZVGEHW.js → docDeleteCommands-63JBG2HQ.js} +59 -48
- package/{docReadCommands-JY2E5XEN.js → docReadCommands-CQFKRQUI.js} +57 -46
- package/{docStore-OKKIKLT3.js → docStore-XLBKGGNM.js} +14 -13
- package/{docUpdateCommands-OZ4CUSIQ.js → docUpdateCommands-534LUK25.js} +57 -46
- package/ebookDownloaderAgentCommand-DYSKF5ZY.js +677 -0
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-5BLZRPTM.js} +4 -4
- package/{handleSendMessageAction-LNT7SZND.js → handleSendMessageAction-Q2VMEVOR.js} +127 -81
- package/{hostCredentialCreate-XUU2CSHI.js → hostCredentialCreate-C57T7YPE.js} +127 -109
- package/index.js +23 -11
- package/{localDialogRead-CCOCVGAP.js → localDialogRead-BJJT3TF5.js} +1 -1
- package/{localRuntimeAdapter-IBSTMSX7.js → localRuntimeAdapter-OALZPFZU.js} +134 -115
- package/localRuntimeAuthority-UF2DAQ3F.js +28 -0
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-ZJFGNHML.js} +1 -1
- package/{machineCommands-HSQHDHOT.js → machineCommands-N6IVWRZT.js} +262 -325
- package/machineWsRunDispatch-PDWYB33B.js +209 -0
- package/markdownToSlate-PXYAIBVL.js +8 -0
- package/mcpLocalAuthorizeCommand-KYI4EGF5.js +110 -0
- package/{memberThunks-7Y3OYSJQ.js → memberThunks-43B7UYC5.js} +21 -16
- package/{models-H5NNZRLH.js → models-ZX2BYIMB.js} +2 -2
- package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
- package/package.json +2 -1
- package/{projectArchive-FQO654Z3.js → projectArchive-TJNW5DLM.js} +46 -44
- package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-NTJUINI6.js} +36 -17
- package/{providerRegistry-ZI2KORJ7.js → providerRegistry-W45SLUV6.js} +6 -6
- package/{read-TYMBGEXO.js → read-KG6INYUT.js} +13 -7
- package/{readDocTool-SKQVHBLO.js → readDocTool-N3GA52JR.js} +1 -1
- package/{readlineWorkspace-7U272DSA.js → readlineWorkspace-PJZJVGA5.js} +7486 -4492
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-EEVSOQOJ.js} +18 -17
- package/{runAgentClientLoop-AF4JQIJ7.js → runAgentClientLoop-3VC5TCDW.js} +107 -76
- package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-V3M3JTUV.js} +14 -11
- package/{secretCommands-KZWBZIYS.js → secretCommands-KVVZS7A6.js} +3 -3
- package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-DNO5POHA.js} +15 -14
- package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-QABBEO4C.js} +18 -17
- package/{settingThunks-ZRGWVGZD.js → settingThunks-DVKG4X4S.js} +181 -66
- package/{skillDiscovery-BHHPCUHZ.js → skillDiscovery-ZMJH36AK.js} +4 -3
- package/{spaceCommands-5VNWMDBE.js → spaceCommands-AGGZXPY3.js} +235 -87
- package/{streamAgentChatTurn-YSPEFY4K.js → streamAgentChatTurn-4GTLL2OF.js} +242 -169
- package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-KYWJSGOO.js} +16 -15
- package/{tableCommands-FTAOCBTX.js → tableCommands-EFA754RE.js} +7 -4
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-M35PTIFB.js → tools-5AGPOPLW.js} +69 -65
- package/{tuiRestart-2IL37YIB.js → tuiRestart-77E7PL4R.js} +11 -10
- package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-HROLGN4F.js} +16 -15
- package/{updateCommands-CPATDG6J.js → updateCommands-GJGRS6JK.js} +3 -3
- package/{updateDialogTitleAction-IMIRJRQQ.js → updateDialogTitleAction-5OSEDGRK.js} +40 -38
- package/{usageCommand-2BF74MKF.js → usageCommand-WI6SQOPB.js} +2 -2
- package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-WQRLLZAT.js} +3 -3
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-C7LGVWYX.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-P2SJVV3S.js} +2 -2
- package/agentRecordCommands-IZYUVHME.js +0 -177
- package/agentRunCommand-QM7ETUTX.js +0 -209
- package/chunk-2YGBI2XB.js +0 -30
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-5ZUOVCKT.js +0 -32
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-FJSNBZXR.js +0 -142
- package/chunk-FPBJM2BW.js +0 -689
- package/chunk-JQZRSXS5.js +0 -90
- package/chunk-P2ZLUIW2.js +0 -795
- package/chunk-PPJYZRSQ.js +0 -160
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-ZXF6D3I6.js +0 -359
- package/cliLocalAgentRecordReader-H3HYQRRR.js +0 -91
- package/lib-OT5OTXRU.js +0 -21046
- package/localRuntimeAuthority-IBJAT62G.js +0 -16
- package/machineWsRunDispatch-L6H7J66T.js +0 -192
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// packages/core/githubAuthContract.ts
|
|
2
|
+
var GITHUB_SESSION_KIND = "github-session-v1";
|
|
3
|
+
var isExternalSessionKind = (kind) => kind === "google-session-v1" || kind === GITHUB_SESSION_KIND;
|
|
4
|
+
|
|
5
|
+
// node_modules/js-base64/base64.mjs
|
|
6
|
+
var version = "3.9.7";
|
|
7
|
+
var VERSION = version;
|
|
8
|
+
var _TD = typeof TextDecoder === "function" ? new TextDecoder("utf-8", { ignoreBOM: true }) : void 0;
|
|
9
|
+
var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
|
|
10
|
+
var b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
11
|
+
var b64chs = Array.prototype.slice.call(b64ch);
|
|
12
|
+
var b64tab = ((a) => {
|
|
13
|
+
let tab = {};
|
|
14
|
+
a.forEach((c, i) => tab[c] = i);
|
|
15
|
+
return tab;
|
|
16
|
+
})(b64chs);
|
|
17
|
+
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
18
|
+
var _fromCC = String.fromCharCode.bind(String);
|
|
19
|
+
var _mkUriSafe = (src) => src.replace(/=/g, "").replace(/[+\/]/g, (m0) => m0 == "+" ? "-" : "_");
|
|
20
|
+
var _tidyB64 = (s) => s.replace(/[^A-Za-z0-9\+\/]/g, "");
|
|
21
|
+
var btoaPolyfill = (bin) => {
|
|
22
|
+
let u32, c0, c1, c2, asc = "";
|
|
23
|
+
const pad = bin.length % 3;
|
|
24
|
+
for (let i = 0; i < bin.length; ) {
|
|
25
|
+
if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255)
|
|
26
|
+
throw new TypeError("invalid character found");
|
|
27
|
+
u32 = c0 << 16 | c1 << 8 | c2;
|
|
28
|
+
asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];
|
|
29
|
+
}
|
|
30
|
+
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
31
|
+
};
|
|
32
|
+
var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : btoaPolyfill;
|
|
33
|
+
var _fromUint8Array = typeof Uint8Array.prototype.toBase64 === "function" ? Function.prototype.call.bind(Uint8Array.prototype.toBase64) : (u8a) => {
|
|
34
|
+
const maxargs = 4096;
|
|
35
|
+
let strs = [];
|
|
36
|
+
for (let i = 0, l = u8a.length; i < l; i += maxargs) {
|
|
37
|
+
strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));
|
|
38
|
+
}
|
|
39
|
+
return _btoa(strs.join(""));
|
|
40
|
+
};
|
|
41
|
+
var fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);
|
|
42
|
+
var cb_utob = (c) => {
|
|
43
|
+
if (c.length < 2) {
|
|
44
|
+
var cc = c.charCodeAt(0);
|
|
45
|
+
return cc < 128 ? c : cc < 2048 ? _fromCC(192 | cc >>> 6) + _fromCC(128 | cc & 63) : _fromCC(224 | cc >>> 12 & 15) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
46
|
+
} else {
|
|
47
|
+
var cc = 65536 + (c.charCodeAt(0) - 55296) * 1024 + (c.charCodeAt(1) - 56320);
|
|
48
|
+
return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
|
|
52
|
+
var utob = (u) => u.replace(re_utob, cb_utob);
|
|
53
|
+
var _encode = _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
|
|
54
|
+
var encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);
|
|
55
|
+
var encodeURI = (src) => encode(src, true);
|
|
56
|
+
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
57
|
+
var cb_btou = (cccc) => {
|
|
58
|
+
switch (cccc.length) {
|
|
59
|
+
case 4:
|
|
60
|
+
var cp = (7 & cccc.charCodeAt(0)) << 18 | (63 & cccc.charCodeAt(1)) << 12 | (63 & cccc.charCodeAt(2)) << 6 | 63 & cccc.charCodeAt(3), offset = cp - 65536;
|
|
61
|
+
return _fromCC((offset >>> 10) + 55296) + _fromCC((offset & 1023) + 56320);
|
|
62
|
+
case 3:
|
|
63
|
+
return _fromCC((15 & cccc.charCodeAt(0)) << 12 | (63 & cccc.charCodeAt(1)) << 6 | 63 & cccc.charCodeAt(2));
|
|
64
|
+
default:
|
|
65
|
+
return _fromCC((31 & cccc.charCodeAt(0)) << 6 | 63 & cccc.charCodeAt(1));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var btou = (b) => b.replace(re_btou, cb_btou);
|
|
69
|
+
var atobPolyfill = (asc) => {
|
|
70
|
+
asc = asc.replace(/\s+/g, "");
|
|
71
|
+
if (!b64re.test(asc))
|
|
72
|
+
throw new TypeError("malformed base64.");
|
|
73
|
+
asc += "==".slice(2 - (asc.length & 3));
|
|
74
|
+
let u24, r1, r2;
|
|
75
|
+
let binArray = [];
|
|
76
|
+
for (let i = 0; i < asc.length; ) {
|
|
77
|
+
u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);
|
|
78
|
+
if (r1 === 64) {
|
|
79
|
+
binArray.push(_fromCC(u24 >> 16 & 255));
|
|
80
|
+
} else if (r2 === 64) {
|
|
81
|
+
binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255));
|
|
82
|
+
} else {
|
|
83
|
+
binArray.push(_fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return binArray.join("");
|
|
87
|
+
};
|
|
88
|
+
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : atobPolyfill;
|
|
89
|
+
var _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8Array.fromBase64(a) : (a) => {
|
|
90
|
+
const bin = _atob(a), l = bin.length, u8a = new Uint8Array(l);
|
|
91
|
+
for (let i = 0; i < l; i++)
|
|
92
|
+
u8a[i] = bin.charCodeAt(i);
|
|
93
|
+
return u8a;
|
|
94
|
+
};
|
|
95
|
+
var toUint8Array = (a) => _toUint8Array(_unURI(a));
|
|
96
|
+
var _decode = _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
|
|
97
|
+
var _unURI = (a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/"));
|
|
98
|
+
var decode = (src) => _decode(_unURI(src));
|
|
99
|
+
var isValid = (src) => {
|
|
100
|
+
if (typeof src !== "string")
|
|
101
|
+
return false;
|
|
102
|
+
const s = src.replace(/\s+/g, "").replace(/={0,2}$/, "");
|
|
103
|
+
if (s.length % 4 === 1)
|
|
104
|
+
return false;
|
|
105
|
+
return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
|
|
106
|
+
};
|
|
107
|
+
var _noEnum = (v) => {
|
|
108
|
+
return {
|
|
109
|
+
value: v,
|
|
110
|
+
enumerable: false,
|
|
111
|
+
writable: true,
|
|
112
|
+
configurable: true
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
var extendString = function() {
|
|
116
|
+
const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));
|
|
117
|
+
_add("fromBase64", function() {
|
|
118
|
+
return decode(this);
|
|
119
|
+
});
|
|
120
|
+
_add("toBase64", function(urlsafe) {
|
|
121
|
+
return encode(this, urlsafe);
|
|
122
|
+
});
|
|
123
|
+
_add("toBase64URI", function() {
|
|
124
|
+
return encode(this, true);
|
|
125
|
+
});
|
|
126
|
+
_add("toBase64URL", function() {
|
|
127
|
+
return encode(this, true);
|
|
128
|
+
});
|
|
129
|
+
_add("toUint8Array", function() {
|
|
130
|
+
return toUint8Array(this);
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
var extendUint8Array = function() {
|
|
134
|
+
const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));
|
|
135
|
+
_add("toBase64", function(urlsafe) {
|
|
136
|
+
return fromUint8Array(this, urlsafe);
|
|
137
|
+
});
|
|
138
|
+
_add("toBase64URI", function() {
|
|
139
|
+
return fromUint8Array(this, true);
|
|
140
|
+
});
|
|
141
|
+
_add("toBase64URL", function() {
|
|
142
|
+
return fromUint8Array(this, true);
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
var extendBuiltins = () => {
|
|
146
|
+
extendString();
|
|
147
|
+
extendUint8Array();
|
|
148
|
+
};
|
|
149
|
+
var gBase64 = {
|
|
150
|
+
version,
|
|
151
|
+
VERSION,
|
|
152
|
+
atob: _atob,
|
|
153
|
+
atobPolyfill,
|
|
154
|
+
btoa: _btoa,
|
|
155
|
+
btoaPolyfill,
|
|
156
|
+
fromBase64: decode,
|
|
157
|
+
toBase64: encode,
|
|
158
|
+
encode,
|
|
159
|
+
encodeURI,
|
|
160
|
+
encodeURL: encodeURI,
|
|
161
|
+
utob,
|
|
162
|
+
btou,
|
|
163
|
+
decode,
|
|
164
|
+
isValid,
|
|
165
|
+
fromUint8Array,
|
|
166
|
+
toUint8Array,
|
|
167
|
+
extendString,
|
|
168
|
+
extendUint8Array,
|
|
169
|
+
extendBuiltins
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export {
|
|
173
|
+
isExternalSessionKind,
|
|
174
|
+
gBase64
|
|
175
|
+
};
|
|
@@ -352,6 +352,11 @@ var LEGACY_TOOL_NAME_ALIASES = {
|
|
|
352
352
|
edit: "editFile",
|
|
353
353
|
write: "writeFile",
|
|
354
354
|
glob: "globFiles",
|
|
355
|
+
grep: "searchFiles",
|
|
356
|
+
rg: "searchFiles",
|
|
357
|
+
grepFiles: "searchFiles",
|
|
358
|
+
grep_files: "searchFiles",
|
|
359
|
+
search_files: "searchFiles",
|
|
355
360
|
// 联网搜索别名
|
|
356
361
|
web_search: "exa_search",
|
|
357
362
|
websearch: "exa_search",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_react
|
|
3
|
-
} from "./chunk-5FUN7EG4.js";
|
|
4
1
|
import {
|
|
5
2
|
normalizeSpaceId
|
|
6
3
|
} from "./chunk-UAD2WT54.js";
|
|
7
4
|
import {
|
|
8
5
|
toTimestampMs
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ADYWV732.js";
|
|
7
|
+
import {
|
|
8
|
+
require_react
|
|
9
|
+
} from "./chunk-RD3QLZQV.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM
|
|
12
12
|
} from "./chunk-U67V476Y.js";
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WD5547ZF.js";
|
|
4
4
|
import {
|
|
5
|
-
prepareAndPersistMessage
|
|
6
|
-
|
|
7
|
-
uiAskChoiceFunctionSchema
|
|
8
|
-
} from "./chunk-7BCG67EI.js";
|
|
5
|
+
prepareAndPersistMessage
|
|
6
|
+
} from "./chunk-EVHTYVD2.js";
|
|
9
7
|
import {
|
|
10
8
|
require_format
|
|
11
9
|
} from "./chunk-BUDVRYES.js";
|
|
@@ -18,16 +16,13 @@ import {
|
|
|
18
16
|
removeCachedEntity,
|
|
19
17
|
upsertSSREntity,
|
|
20
18
|
write
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ADYWV732.js";
|
|
22
20
|
import {
|
|
23
21
|
isDevelopment
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HDKMVYNJ.js";
|
|
25
23
|
import {
|
|
26
24
|
selectIdentityUserId
|
|
27
25
|
} from "./chunk-PXYBUFDB.js";
|
|
28
|
-
import {
|
|
29
|
-
extractCustomId
|
|
30
|
-
} from "./chunk-M2EJHDJP.js";
|
|
31
26
|
import {
|
|
32
27
|
createMemoryKey,
|
|
33
28
|
memoryOwnerRange,
|
|
@@ -37,6 +32,9 @@ import {
|
|
|
37
32
|
createDialogKey,
|
|
38
33
|
dialogMessageRange
|
|
39
34
|
} from "./chunk-OJKUU3LP.js";
|
|
35
|
+
import {
|
|
36
|
+
extractCustomId
|
|
37
|
+
} from "./chunk-M2EJHDJP.js";
|
|
40
38
|
import {
|
|
41
39
|
asOptionalPositiveFiniteNumber
|
|
42
40
|
} from "./chunk-U6VC4MU4.js";
|
|
@@ -57,6 +55,226 @@ import {
|
|
|
57
55
|
var import_format = __toESM(require_format());
|
|
58
56
|
var import_formatISO = __toESM(require_formatISO());
|
|
59
57
|
|
|
58
|
+
// packages/ai/tools/uiAskChoiceTool.ts
|
|
59
|
+
var uiAskChoiceFunctionSchema = {
|
|
60
|
+
name: "ask_user",
|
|
61
|
+
description: "\u8BA9\u7528\u6237\u5728\u4E00\u7EC4\u9009\u9879\u4E4B\u95F4\u505A\u9009\u62E9\uFF08\u5355\u9009\u6216\u591A\u9009\uFF09\u7684\u901A\u7528\u201C\u51FA\u9009\u9879\u201D\u5DE5\u5177\uFF08\u9700\u6C42\u6A21\u7CCA\u3001\u5206\u652F\u51B3\u7B56\u3001\u95EE\u5377\u7B49\uFF09\u3002\u672C\u5DE5\u5177\u7528\u4E8E\u7EAF\u63D0\u95EE\u3001\u7B49\u5F85\u7528\u6237\u56DE\u7B54\u7684\u573A\u666F\uFF08blocking:false \u65F6\u4E0D\u6682\u505C\u7B49\u5F85\uFF09\uFF1B\u82E5\u9700\u8981\u540C\u65F6\u5C55\u793A\u7ED3\u6784\u5316\u5BF9\u6BD4/\u6307\u6807\u5E76\u8BA9\u7528\u6237\u5728\u540C\u4E00\u5757\u91CC\u9009\u62E9\uFF0C\u8D70 show_interaction\u3002\u8C03\u7528\u524D\u987B\u5148\u5728\u666E\u901A\u56DE\u590D\u6587\u672C\u91CC\u89E3\u91CA\u80CC\u666F\u4E0E\u6743\u8861\uFF08\u5148\u89E3\u91CA\uFF0C\u518D\u8C03\u7528\uFF09\u3002\u591A\u95EE\u9898\u4F20 questions\uFF0C\u5355\u95EE\u9898\u4F20 question+choices\u3002\u754C\u9762\u9ED8\u8BA4\u63D0\u4F9B\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF08allowOther:false \u53EF\u5173\uFF09\uFF0C\u7528\u6237\u8F93\u5165\u968F\u7B54\u6848\u56DE\u4F20\uFF1B\u4E0D\u8981\u81EA\u5EFA\u201C\u5176\u4ED6/\u81EA\u5DF1\u5199\u201D\u4E4B\u7C7B\u7684\u9009\u9879\u2014\u2014\u70B9\u666E\u901A\u9009\u9879\u53EA\u56DE\u4F20\u8BE5\u9009\u9879\u6587\u6848\uFF0C\u7528\u6237\u65E0\u5904\u586B\u5199\u3002",
|
|
62
|
+
parameters: {
|
|
63
|
+
type: "object",
|
|
64
|
+
properties: {
|
|
65
|
+
question: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "\u5C55\u793A\u7ED9\u7528\u6237\u7684\u95EE\u9898\u6587\u6848\uFF08\u5355\u95EE\u9898\u6A21\u5F0F\uFF09\u3002\u4E0E questions \u4E8C\u9009\u4E00\u3002"
|
|
68
|
+
},
|
|
69
|
+
choices: {
|
|
70
|
+
type: "array",
|
|
71
|
+
description: "\u5907\u9009\u9879\u5217\u8868\uFF0C\u6E32\u67D3\u4E3A\u6309\u94AE\u4F9B\u7528\u6237\u70B9\u51FB\u3002",
|
|
72
|
+
items: {
|
|
73
|
+
type: "object",
|
|
74
|
+
properties: {
|
|
75
|
+
id: {
|
|
76
|
+
type: "string",
|
|
77
|
+
description: "\u9009\u9879\u6807\u8BC6\u3002"
|
|
78
|
+
},
|
|
79
|
+
label: {
|
|
80
|
+
type: "string",
|
|
81
|
+
description: "\u6309\u94AE\u6587\u5B57\uFF0C\u5982\u201C\u751F\u6210\u672C\u5468\u5468\u62A5\u201D\u3002"
|
|
82
|
+
},
|
|
83
|
+
detail: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
|
|
86
|
+
},
|
|
87
|
+
userMessage: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "\u70B9\u51FB\u540E\u4F5C\u4E3A\u4E0B\u4E00\u6761 user \u6D88\u606F\u53D1\u9001\u7684\u6587\u6848\uFF08\u7559\u7A7A\u9ED8\u8BA4\u7528 label\uFF09\u3002"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
required: ["id", "label"]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
questions: {
|
|
96
|
+
type: "array",
|
|
97
|
+
description: "\u591A\u95EE\u9898\u6A21\u5F0F\uFF08\u591A tab \u6E32\u67D3\uFF0C\u4E0E question+choices \u4E8C\u9009\u4E00\uFF09\u3002",
|
|
98
|
+
items: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {
|
|
101
|
+
id: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "\u95EE\u9898\u6807\u8BC6\u3002"
|
|
104
|
+
},
|
|
105
|
+
header: {
|
|
106
|
+
type: "string",
|
|
107
|
+
description: "\u591A\u95EE\u9898 tab \u680F\u663E\u793A\u7684\u77ED\u6807\u7B7E\uFF08\u226412 \u5B57\u7B26\uFF0C\u5982\u201C\u683C\u5F0F/\u8BED\u8A00/\u8303\u56F4\u201D\uFF09\uFF0C\u7F3A\u7701\u7528 Qn\u3002"
|
|
108
|
+
},
|
|
109
|
+
question: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "\u95EE\u9898\u6587\u6848\u3002"
|
|
112
|
+
},
|
|
113
|
+
choices: {
|
|
114
|
+
type: "array",
|
|
115
|
+
description: "\u8BE5\u95EE\u9898\u7684\u5907\u9009\u9879\u3002",
|
|
116
|
+
items: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: {
|
|
119
|
+
id: { type: "string" },
|
|
120
|
+
label: { type: "string" },
|
|
121
|
+
detail: {
|
|
122
|
+
type: "string",
|
|
123
|
+
description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
|
|
124
|
+
},
|
|
125
|
+
userMessage: { type: "string" }
|
|
126
|
+
},
|
|
127
|
+
required: ["id", "label"]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
multiSelect: {
|
|
131
|
+
type: "boolean",
|
|
132
|
+
description: "\u5141\u8BB8\u591A\u9009\uFF0C\u9ED8\u8BA4 false\u3002"
|
|
133
|
+
},
|
|
134
|
+
allowOther: {
|
|
135
|
+
type: "boolean",
|
|
136
|
+
description: "\u663E\u793A\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF0C\u9ED8\u8BA4 true\u3002"
|
|
137
|
+
},
|
|
138
|
+
required: {
|
|
139
|
+
type: "boolean",
|
|
140
|
+
description: "\u662F\u5426\u5FC5\u987B\u56DE\u7B54\u624D\u80FD\u63D0\u4EA4\uFF0C\u9ED8\u8BA4 true\u3002"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
required: ["id", "question", "choices"]
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
blocking: {
|
|
147
|
+
type: "boolean",
|
|
148
|
+
description: "\u662F\u5426\u7B49\u5F85\u7528\u6237\u9009\u62E9\u540E\u518D\u7EE7\u7EED\u6D41\u7A0B\uFF0C\u9ED8\u8BA4 true\u3002"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
required: []
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
function validateChoiceList(choices, scopeLabel) {
|
|
155
|
+
const seenChoiceIds = /* @__PURE__ */ new Set();
|
|
156
|
+
for (let index = 0; index < choices.length; index += 1) {
|
|
157
|
+
const entry = choices[index];
|
|
158
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
159
|
+
return `${scopeLabel}.choices[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
|
|
160
|
+
}
|
|
161
|
+
const choice = entry;
|
|
162
|
+
if (typeof choice.label !== "string" || !choice.label.trim()) {
|
|
163
|
+
return `${scopeLabel}.choices[${index}].label \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
|
|
164
|
+
}
|
|
165
|
+
if (choice.id !== void 0 && typeof choice.id !== "string") {
|
|
166
|
+
return `${scopeLabel}.choices[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
|
|
167
|
+
}
|
|
168
|
+
const choiceId = typeof choice.id === "string" ? choice.id.trim() : "";
|
|
169
|
+
if (choiceId && seenChoiceIds.has(choiceId)) {
|
|
170
|
+
return `${scopeLabel} \u5185\u7684\u9009\u9879 id "${choiceId}" \u91CD\u590D\u3002`;
|
|
171
|
+
}
|
|
172
|
+
if (choiceId) seenChoiceIds.add(choiceId);
|
|
173
|
+
}
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
function validateAskChoiceInput(raw) {
|
|
177
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
178
|
+
return "ask_user \u9700\u8981\u4E00\u4E2A\u5BF9\u8C61\u53C2\u6570\u3002";
|
|
179
|
+
}
|
|
180
|
+
const args = raw;
|
|
181
|
+
if (args.blocking !== void 0 && typeof args.blocking !== "boolean") {
|
|
182
|
+
return "ask_user \u7684 blocking \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002";
|
|
183
|
+
}
|
|
184
|
+
const rawQuestions = args.questions;
|
|
185
|
+
if (rawQuestions !== void 0 && !Array.isArray(rawQuestions)) {
|
|
186
|
+
return "ask_user \u7684 questions \u5FC5\u987B\u662F\u6570\u7EC4\u3002";
|
|
187
|
+
}
|
|
188
|
+
const questions = rawQuestions;
|
|
189
|
+
if (questions && questions.length > 0) {
|
|
190
|
+
const seenQuestionIds = /* @__PURE__ */ new Set();
|
|
191
|
+
for (let index = 0; index < questions.length; index += 1) {
|
|
192
|
+
const entry = questions[index];
|
|
193
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
194
|
+
return `questions[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
|
|
195
|
+
}
|
|
196
|
+
const question = entry;
|
|
197
|
+
if (question.id !== void 0 && typeof question.id !== "string") {
|
|
198
|
+
return `questions[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
|
|
199
|
+
}
|
|
200
|
+
const questionId = typeof question.id === "string" ? question.id.trim() : "";
|
|
201
|
+
if (questionId && seenQuestionIds.has(questionId)) {
|
|
202
|
+
return `\u95EE\u9898 id "${questionId}" \u91CD\u590D\u3002`;
|
|
203
|
+
}
|
|
204
|
+
if (questionId) seenQuestionIds.add(questionId);
|
|
205
|
+
if (typeof question.question !== "string" || !question.question.trim()) {
|
|
206
|
+
return `questions[${index}].question \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
|
|
207
|
+
}
|
|
208
|
+
for (const flag of ["multiSelect", "allowOther", "required"]) {
|
|
209
|
+
if (question[flag] !== void 0 && typeof question[flag] !== "boolean") {
|
|
210
|
+
return `questions[${index}].${flag} \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002`;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const choices = question.choices;
|
|
214
|
+
if (!Array.isArray(choices)) {
|
|
215
|
+
return `questions[${index}].choices \u5FC5\u987B\u662F\u6570\u7EC4\u3002`;
|
|
216
|
+
}
|
|
217
|
+
const choiceError = validateChoiceList(choices, `questions[${index}]`);
|
|
218
|
+
if (choiceError) return choiceError;
|
|
219
|
+
if (choices.length === 0 && question.allowOther === false) {
|
|
220
|
+
return `questions[${index}] \u6CA1\u6709\u4EFB\u4F55\u9009\u9879\u4E14 allowOther \u4E3A false\uFF0C\u7528\u6237\u65E0\u6CD5\u4F5C\u7B54\u3002`;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
if (typeof args.question !== "string" || !args.question.trim()) {
|
|
226
|
+
return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
|
|
227
|
+
}
|
|
228
|
+
if (!Array.isArray(args.choices) || args.choices.length === 0) {
|
|
229
|
+
return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
|
|
230
|
+
}
|
|
231
|
+
return validateChoiceList(args.choices, "ask_user");
|
|
232
|
+
}
|
|
233
|
+
async function uiAskChoiceFunc(args, _thunkApi) {
|
|
234
|
+
const invalid = validateAskChoiceInput(args);
|
|
235
|
+
if (invalid) throw new Error(invalid);
|
|
236
|
+
const blocking = args?.blocking !== false;
|
|
237
|
+
if (Array.isArray(args?.questions) && args.questions.length > 0) {
|
|
238
|
+
const firstQ = args.questions[0];
|
|
239
|
+
return {
|
|
240
|
+
rawData: {
|
|
241
|
+
type: "ask_user",
|
|
242
|
+
question: firstQ?.question ?? "",
|
|
243
|
+
choices: firstQ?.choices ?? [],
|
|
244
|
+
blocking,
|
|
245
|
+
questions: args.questions
|
|
246
|
+
},
|
|
247
|
+
displayData: args.questions.map((q) => q.question).join(" / ")
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const question = String(args?.question ?? "").trim();
|
|
251
|
+
const choices = Array.isArray(args?.choices) ? args.choices : [];
|
|
252
|
+
if (!question || choices.length === 0) {
|
|
253
|
+
throw new Error("ask_user \u9700\u8981 question+choices \u6216 questions\u3002");
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
rawData: {
|
|
257
|
+
type: "ask_user",
|
|
258
|
+
question,
|
|
259
|
+
choices,
|
|
260
|
+
blocking
|
|
261
|
+
},
|
|
262
|
+
displayData: question
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
function parseUiAskChoiceContent(rawContent) {
|
|
266
|
+
const parsed = typeof rawContent === "string" ? (() => {
|
|
267
|
+
try {
|
|
268
|
+
return JSON.parse(rawContent);
|
|
269
|
+
} catch {
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
})() : rawContent;
|
|
273
|
+
if (!parsed || typeof parsed !== "object") return null;
|
|
274
|
+
if (parsed.type !== "ask_user") return null;
|
|
275
|
+
return parsed;
|
|
276
|
+
}
|
|
277
|
+
|
|
60
278
|
// packages/ai/memory/policy.ts
|
|
61
279
|
function isPublicAgentKey(agentKey) {
|
|
62
280
|
return typeof agentKey === "string" && /^agent-pub-/i.test(agentKey.trim());
|
|
@@ -852,6 +1070,10 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
852
1070
|
};
|
|
853
1071
|
|
|
854
1072
|
export {
|
|
1073
|
+
uiAskChoiceFunctionSchema,
|
|
1074
|
+
validateAskChoiceInput,
|
|
1075
|
+
uiAskChoiceFunc,
|
|
1076
|
+
parseUiAskChoiceContent,
|
|
855
1077
|
resolveAgentMemoryPolicy,
|
|
856
1078
|
buildMemorySubjectsForAgent,
|
|
857
1079
|
chooseMemoryOwners,
|