nolo-cli 0.213.0 → 0.219.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/{_executeModel-CUJLCFWR.js → _executeModel-WW57SJN4.js} +111 -82
- package/{accountResolver-4LKIHEKL.js → accountResolver-EK2S4PWF.js} +6 -6
- package/{action-DF5UYSJF.js → action-CK64LS6S.js} +12 -11
- package/{addContentAction-WERAONNY.js → addContentAction-EQXMFNPR.js} +18 -17
- package/{addDialogAgentAction-7VI7YRML.js → addDialogAgentAction-RSDZDASD.js} +21 -20
- package/{agentDeleteCommand-XJORXPGU.js → agentDeleteCommand-X2VWEKUA.js} +127 -118
- package/{agentEmailCommands-XTYYFR6Z.js → agentEmailCommands-6IE773VW.js} +132 -124
- package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-2LKGKSUD.js} +7 -8
- package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-QQV4N4JW.js} +5 -5
- package/{agentListCommands-OBLRBLHS.js → agentListCommands-5UNM7CGG.js} +155 -92
- package/{agentMachineCommands-5FMT3OT5.js → agentMachineCommands-EVWFKK6Q.js} +62 -54
- package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-ZCH37KAL.js} +5 -5
- package/{agentPullCommand-6EM3URVK.js → agentPullCommand-XN6ZPBUW.js} +7 -7
- package/agentRecordCommands-DX2WE6BH.js +176 -0
- package/agentRunCommand-KGOT2AFB.js +206 -0
- package/{agentRunControl-TAMHJQSR.js → agentRunControl-QDFW5P2T.js} +30 -15
- package/{agentRuntimeLocal-SOO2OPJG.js → agentRuntimeLocal-SD7U2EGY.js} +52 -45
- package/{agentSlice-CHR6KOZN.js → agentSlice-ACZGTZVW.js} +20 -19
- package/{appDeleteCommands-GUP6P5YE.js → appDeleteCommands-NE3NQQJL.js} +61 -53
- package/{appDeployCommands-MH2FX4O5.js → appDeployCommands-2BAHY522.js} +61 -53
- package/{appDeployStatusCommands-SUHN3HPJ.js → appDeployStatusCommands-JTW6LZNC.js} +61 -53
- package/{appGetCommands-YWDEX6Z4.js → appGetCommands-WKFEJO6A.js} +61 -53
- package/{appListCommands-ZQVMLPAY.js → appListCommands-HNAZZLFX.js} +61 -53
- package/{authCommand-PWX2ZNUP.js → authCommand-4FDPL7WG.js} +29 -28
- package/{authCommands-HV3EAU3V.js → authCommands-GAJ3NIXO.js} +14 -13
- package/{builtinSkillRegistry-2QETTQPM.js → builtinSkillRegistry-PXH7EGQB.js} +11 -13
- package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
- package/{chromeOpsCommands-DIVM2K3T.js → chromeOpsCommands-YKX2QX3A.js} +20 -10
- package/chunk-2KTUDBG7.js +675 -0
- package/{chunk-TCZHTTUU.js → chunk-2OLYKYNY.js} +8 -8
- package/{chunk-PYRUW7XN.js → chunk-2VUZSVAS.js} +136 -54
- package/{chunk-YB3YZK56.js → chunk-2WZXXAQD.js} +1 -67
- package/chunk-2YGBI2XB.js +30 -0
- package/chunk-2ZKFCIJJ.js +13 -0
- package/{chunk-G2BQWAVT.js → chunk-3ESU44FG.js} +4 -4
- package/{chunk-HUBHAQK2.js → chunk-3N4ASIP6.js} +29 -29
- package/{chunk-4KB6WQUL.js → chunk-4A2JIXR2.js} +1 -1
- package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
- package/{chunk-H7PPIYWP.js → chunk-4NMHE7CX.js} +20 -20
- package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
- package/chunk-5OZC7R7Y.js +97 -0
- package/chunk-5R63B62U.js +364 -0
- package/{chunk-INUFILG6.js → chunk-5RKUPJYL.js} +1 -1
- package/{chunk-ZNWI6OVT.js → chunk-652XYZGP.js} +80 -11
- package/{chunk-QHPRUL4O.js → chunk-65XXHYZ5.js} +4 -4
- package/{chunk-MOIJOHA5.js → chunk-6D7NVU66.js} +36 -25
- package/{chunk-CRHOO2ZR.js → chunk-6NKA6RKF.js} +2 -2
- package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
- package/{chunk-H2TJUNCH.js → chunk-6RQFZCKH.js} +18 -18
- package/{chunk-LLRPJECG.js → chunk-7UH3DGV6.js} +17 -159
- package/{chunk-X7SDOJUM.js → chunk-7WPAI5JJ.js} +14 -14
- package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
- package/{chunk-VO4WSAVP.js → chunk-AFHOCBSP.js} +3 -3
- package/{chunk-HPFCI4SK.js → chunk-AK5O76CC.js} +3 -3
- package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
- package/{chunk-ALQ3657A.js → chunk-AMEOV5VZ.js} +32 -12
- package/chunk-AVHRSJUH.js +1621 -0
- package/{chunk-RLBNLZVC.js → chunk-BGGHA5DV.js} +1 -1
- package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
- package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
- package/{chunk-SVYO6AO7.js → chunk-BV3FLP2L.js} +41 -1
- package/{chunk-RZOV7OMV.js → chunk-C4VAR65S.js} +83 -141
- package/{chunk-COFEN36Z.js → chunk-C4WTX5TU.js} +2 -2
- package/{chunk-F6UUQOG6.js → chunk-CKT6QUE2.js} +4 -4
- package/{chunk-6VLJ6YA7.js → chunk-CXDPIPZ4.js} +9 -9
- package/{secretCommands-LXDWOLZ6.js → chunk-D726I5AZ.js} +191 -16
- package/{chunk-OQPKUBPB.js → chunk-DJSTBAOU.js} +19 -7
- package/chunk-DVQH4BTR.js +1137 -0
- package/{chunk-7OCO4TDT.js → chunk-EGXPAWLG.js} +1 -1
- package/chunk-EOWLBDY6.js +142 -0
- package/chunk-EUCFKKDM.js +247 -0
- package/chunk-EWQ3HGNZ.js +90 -0
- package/{chunk-7Y4YTDQF.js → chunk-F3TQURKK.js} +281 -159
- package/{chunk-YTF4WH7J.js → chunk-FIYSMXHY.js} +1 -1
- package/{chunk-75XIDFBW.js → chunk-FJ23FZXF.js} +72 -28
- package/{chunk-5MQRBSMW.js → chunk-FRSBYNWI.js} +111 -113
- package/{chunk-ZXOUUDCG.js → chunk-FVZW66K4.js} +3657 -233
- package/{chunk-YUA6OAH5.js → chunk-G2EJ7NL4.js} +2 -2
- package/{chunk-PCLE46CE.js → chunk-GBWGPTA7.js} +2 -1
- package/{chunk-R5O4QAWG.js → chunk-GGKNJ42M.js} +11 -77
- package/{chunk-TAKB25RM.js → chunk-GIABSSWQ.js} +4 -4
- package/{chunk-WRYQ35LQ.js → chunk-GNHMRBYZ.js} +859 -57
- package/{chunk-NJLL224W.js → chunk-GVGOEMNV.js} +2 -2
- package/{chunk-J2NHJ7WX.js → chunk-H7R3365N.js} +4 -4
- package/{chunk-7BT37FK3.js → chunk-HCJFGH6Y.js} +648 -131
- package/{chunk-3UKL3HPD.js → chunk-HOCHUZQ7.js} +8 -78
- package/{chunk-EHSZD5OI.js → chunk-HXER7YJF.js} +4 -4
- package/{chunk-CTPXME7U.js → chunk-IWH5SOU4.js} +29 -6
- package/{chunk-INN4LTAJ.js → chunk-IWQAOW2X.js} +2 -2
- package/{chunk-RPQXPZZF.js → chunk-J6T25AJ6.js} +908 -13
- package/{chunk-KIM6CLW5.js → chunk-JC5XLWZK.js} +42 -15
- package/chunk-JVRQ6YVK.js +99 -0
- package/{chunk-ZRSNONOB.js → chunk-JWXITTQB.js} +8 -3
- package/{chunk-NSAPDIN2.js → chunk-K5FNYHZC.js} +541 -31
- package/{chunk-TX5EYMGT.js → chunk-KAVGK4ES.js} +30 -254
- package/{chunk-H4UOTUOX.js → chunk-KEN3N2TN.js} +148 -18
- package/{chunk-LEC5ALIN.js → chunk-KEPOVMF4.js} +1 -1
- package/{chunk-Y6ORVLSS.js → chunk-KN3HEZIQ.js} +1 -1
- package/{chunk-UYD5HQ6T.js → chunk-KO63FPG3.js} +5429 -1752
- package/{chunk-IXNGOHV5.js → chunk-KOXKKHFE.js} +11 -152
- package/{chunk-4VJAC32I.js → chunk-L5I543VB.js} +3 -2
- package/{chunk-SM3NSZJV.js → chunk-LE6LGAJE.js} +20 -1
- package/chunk-LKA64WH4.js +227 -0
- package/{chunk-VL5KOY2C.js → chunk-MK2Q7ZJD.js} +67 -5
- package/{chunk-YJAFKXMU.js → chunk-MKQ2UTTX.js} +50 -48
- package/chunk-MOMR7NMG.js +226 -0
- package/{chunk-4T2WNOY7.js → chunk-N3J4VDGV.js} +33 -22
- package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
- package/{chunk-6DWMYIUY.js → chunk-N7HVLYOY.js} +14 -9
- package/{chunk-7QTZCMKL.js → chunk-O2CYENYJ.js} +1204 -1651
- package/{chunk-VNYYOX3V.js → chunk-OB6DVWPF.js} +141 -48
- package/{chunk-HRMJUN5J.js → chunk-OGHP3CTL.js} +1 -1
- package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
- package/{chunk-G7MLNNEX.js → chunk-OOF7XDZF.js} +5 -5
- package/{chunk-QG4AOSON.js → chunk-OXKUPBAQ.js} +13 -32
- package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
- package/{chunk-H5HF7TJA.js → chunk-PFJNLBRU.js} +2 -2
- package/{chunk-A7TFUNZO.js → chunk-PPJYZRSQ.js} +6 -2
- package/chunk-PVZY6P3S.js +271 -0
- package/{chunk-ZL5RAEEB.js → chunk-Q6HOUF4O.js} +1 -1
- package/{chunk-FUGMREBO.js → chunk-Q7WP5RPC.js} +5 -5
- package/chunk-QHEN7NZ7.js +46 -0
- package/{chunk-O2TZF4AI.js → chunk-QLFCTYRH.js} +3 -3
- package/{chunk-YGILMZ7N.js → chunk-QVBXJNZ2.js} +1 -1
- package/{chunk-KFLT5KAD.js → chunk-QWYFFHCJ.js} +20 -20
- package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
- package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
- package/{chunk-BBJ22CLB.js → chunk-S7SB7L2I.js} +60 -30
- package/{chunk-W4S457LU.js → chunk-SASHAZ67.js} +41 -5
- package/{chunk-KC4XDTT3.js → chunk-SOF4OWDM.js} +6 -4
- package/{chunk-YWSEPJ7C.js → chunk-SRL56PI2.js} +3 -3
- package/{chunk-WMTBPBMP.js → chunk-SYQR7FQS.js} +52 -50
- package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
- package/{chunk-XHQC4PXX.js → chunk-T3O6BLYU.js} +426 -196
- package/chunk-TLE77UJ5.js +230 -0
- package/{chunk-T43B7LB2.js → chunk-TRWT3EE3.js} +1 -1
- package/{chunk-RSHTSUEG.js → chunk-TVFRV3UQ.js} +2060 -602
- package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
- package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
- package/{chunk-LOEO7LRC.js → chunk-UJKTI5PG.js} +10 -7
- package/{chunk-UHJGXRJ4.js → chunk-UMRI2IRY.js} +3 -3
- package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
- package/{chunk-NOKUNJON.js → chunk-UYOICCYG.js} +29 -19
- package/{chunk-GOO6G4PY.js → chunk-VALBGPM6.js} +106 -50
- package/{chunk-MDB67IWP.js → chunk-VHPAA6MT.js} +10 -10
- package/{chunk-4I7ERB7F.js → chunk-VREDDN25.js} +1 -1
- package/{chunk-WYDI6TGM.js → chunk-XFJ4ZPFC.js} +91 -132
- package/{chunk-TY3TIUJK.js → chunk-XI2BWJM5.js} +65 -0
- package/{chunk-V5Y3R6BT.js → chunk-XWGDCWXY.js} +213 -210
- package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
- package/{chunk-EYLGAEB4.js → chunk-YGMBIXCF.js} +132 -0
- package/chunk-YL3EFYL3.js +199 -0
- package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
- package/chunk-YZMNK53S.js +68 -0
- package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
- package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-PO3MVDME.js} +15 -16
- package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
- package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
- package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-VPSJ4XWC.js} +3 -3
- package/{cliExecutor-BWBF2MTI.js → cliExecutor-4MAX3PZL.js} +2 -2
- package/cliLocalAgentRecordReader-Z7CH4K4R.js +90 -0
- package/{commandRegistry-W63CYRZJ.js → commandRegistry-SDSYBKMC.js} +105 -97
- package/{contentThunks-U7PL5MQD.js → contentThunks-G3TRPEAU.js} +47 -43
- package/{cooldownCommands-TIGUHXTD.js → cooldownCommands-X7P5M2V5.js} +5 -4
- package/{createAgentAutomationAction-OLBQDD6R.js → createAgentAutomationAction-KHA4MXUJ.js} +51 -49
- package/{createDialogAction-SVH6B3SB.js → createDialogAction-KWSBNAPJ.js} +46 -48
- package/{createPageAction-F4DIWZ2Z.js → createPageAction-HXKJ7OFG.js} +50 -48
- package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
- package/{db-HUCI5R4G.js → db-CS4ZJQKV.js} +1 -1
- package/{dbSlice-BVH2YZPQ.js → dbSlice-ZJPDIFER.js} +17 -16
- package/{deleteFile-5YOEKV4U.js → deleteFile-Q3YDB4ML.js} +9 -9
- package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
- package/{dialogCommands-KHIEPY3M.js → dialogCommands-6KQEBHSG.js} +64 -57
- package/dialogNotifyCommand-WIZFFEY3.js +36 -0
- package/{dialogSlice-ZCTDV2PZ.js → dialogSlice-HXPKFGRL.js} +42 -40
- package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-HTVPR2CX.js} +11 -10
- package/{docCreateCommands-DPMZI7G5.js → docCreateCommands-XZOLWBRC.js} +61 -55
- package/{docDeleteCommands-IRQQLUBT.js → docDeleteCommands-ZSO4LGWE.js} +63 -57
- package/{docReadCommands-LK37XH6L.js → docReadCommands-TTMXCDER.js} +61 -55
- package/{docStore-V2KECILA.js → docStore-A2B3GH33.js} +21 -20
- package/{docUpdateCommands-O6T3HJHH.js → docUpdateCommands-PRG6WOXL.js} +64 -58
- package/{fetchMessages-NR4KNQLO.js → fetchMessages-TQEUZD7H.js} +8 -7
- package/{getPricing-2MNMXEVG.js → getPricing-YH3VMSVU.js} +6 -6
- package/{handleSendMessageAction-2PE25WM3.js → handleSendMessageAction-NWYG3Q72.js} +194 -302
- package/{hostCredentialCreate-S233UMAP.js → hostCredentialCreate-WS6D3EHT.js} +123 -114
- package/index.js +29 -29
- package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
- package/legacyMigration-TF4SYJCZ.js +19 -0
- package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
- package/{localDialogRead-7NNDVVF7.js → localDialogRead-SVTPA5GY.js} +3 -3
- package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
- package/localRecall-2J6QPOK2.js +15 -0
- package/{localRuntimeAdapter-KY6WXNBR.js → localRuntimeAdapter-TFYOA6YE.js} +119 -110
- package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
- package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
- package/{machineCommands-Q6HA3IXF.js → machineCommands-WFWV25IR.js} +128 -119
- package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
- package/machineWsRunDispatch-ZGXC3F2R.js +191 -0
- package/{memberThunks-7EDJADWU.js → memberThunks-JRYNONYV.js} +29 -28
- package/{memoryCommands-ASCE5STX.js → memoryCommands-5WC3T66U.js} +4 -4
- package/models-CXINDUJA.js +9 -0
- package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
- package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-4IC3Y4C6.js} +4 -4
- package/overlay-THLKYIWY.js +11 -0
- package/package.json +2 -2
- package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
- package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
- package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
- package/{projectArchive-DRTDIMEV.js → projectArchive-ULJDLUA6.js} +52 -50
- package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-SHT2SUVB.js} +19 -12
- package/{providerRegistry-S6UL6UNA.js → providerRegistry-TA7EGCVZ.js} +10 -10
- package/{read-4V2RMG7N.js → read-Q7GOHGNP.js} +10 -10
- package/{readDocTool-BH6ATGQO.js → readDocTool-Z5OQ6422.js} +2 -2
- package/{readlineWorkspace-2W4WRCOU.js → readlineWorkspace-LTCV2BFW.js} +7982 -6274
- package/{removeDialogAgentAction-LYAZGNKW.js → removeDialogAgentAction-U3F2MNAY.js} +23 -22
- package/{runAgentClientLoop-J2VQBS2Z.js → runAgentClientLoop-BVIEQUB3.js} +81 -79
- package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-I47JN4HS.js} +12 -12
- package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
- package/secretCommands-LJXOOYA7.js +24 -0
- package/{setDialogExtraReferencesAction-OCRPGPYH.js → setDialogExtraReferencesAction-G3WSJ7EM.js} +22 -21
- package/{setPrimaryDialogAgentAction-HFJDQIBU.js → setPrimaryDialogAgentAction-6FHAHZBB.js} +23 -22
- package/{settingThunks-RAMHMTGM.js → settingThunks-AXTBX3Q5.js} +97 -88
- package/{skillDiscovery-XKHROSH2.js → skillDiscovery-B5V23AXP.js} +4 -4
- package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
- package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
- package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
- package/{spaceCommands-KVJZVKVO.js → spaceCommands-IB6FKWIC.js} +61 -53
- package/store-JRVN62NM.js +46 -0
- package/{streamAgentChatTurn-GHBMJJ6S.js → streamAgentChatTurn-DNYFHBJM.js} +875 -618
- package/{switchDialogAgentAction-EBRMW3RA.js → switchDialogAgentAction-UOFIAGPL.js} +21 -20
- package/{tableCommands-MP6VFSVT.js → tableCommands-HITDSLHS.js} +10 -10
- package/tombstones-FQQMEDOW.js +32 -0
- package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
- package/{tools-EWKCPKMS.js → tools-JVOJ5HC4.js} +75 -74
- package/tuiSummaryLlmCaller-7LWYTHLM.js +44 -0
- package/{updateCommands-ZQYU6SCI.js → updateCommands-RJVCRSBP.js} +10 -8
- package/{updateDialogTitleAction-5GGMBTDF.js → updateDialogTitleAction-Q57BOSXG.js} +48 -46
- package/{usageCommand-F4IPVMIZ.js → usageCommand-RVKHEPLU.js} +11 -10
- package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-GRAFOZF2.js} +12 -11
- package/userDataMerge-HT2ZVHBJ.js +13 -0
- package/{windowsSelfUpdate-257DV2T6.js → windowsSelfUpdate-KERHIAB4.js} +3 -3
- package/{workloadLifecycle-4C42SVBD.js → workloadLifecycle-O2I3NZ2Q.js} +6 -6
- package/agentRecordCommands-ZQ7SVYGG.js +0 -167
- package/agentRunCommand-WS7IGO2W.js +0 -196
- package/chunk-3CGG2PAL.js +0 -594
- package/chunk-5XBUWM6I.js +0 -89
- package/chunk-CJEIOP3E.js +0 -0
- package/chunk-EHGEOAHI.js +0 -636
- package/chunk-FW6YHHLI.js +0 -842
- package/chunk-GPVRUGGY.js +0 -115
- package/chunk-HSVBJRF4.js +0 -339
- package/chunk-WJZOQR2J.js +0 -151
- package/chunk-ZCWRMUWT.js +0 -89
- package/dist-M676ULYG.js +0 -7314
- package/machineWsRunDispatch-WWJQ6WR3.js +0 -182
- package/models-PJBE6JDV.js +0 -9
- package/tuiSummaryLlmCaller-ALQYUUWB.js +0 -189
- package/{chunk-WACI5I6V.js → chunk-2THCNKE4.js} +3 -3
- package/{chunk-2QHFH3DR.js → chunk-47ITIXO7.js} +6 -6
- package/{chunk-OQHIVPG4.js → chunk-SNBZZPYH.js} +3 -3
- package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildLocalAgentLookupKeys
|
|
3
|
+
} from "./chunk-2ZKFCIJJ.js";
|
|
4
|
+
import {
|
|
5
|
+
LOCAL_CODEX_AGENT_ID,
|
|
6
|
+
LOCAL_CODEX_AGENT_KEY
|
|
7
|
+
} from "./chunk-BR3GT6MR.js";
|
|
8
|
+
import {
|
|
9
|
+
applyPublicAgentCatalogOverride
|
|
10
|
+
} from "./chunk-6RQFZCKH.js";
|
|
11
|
+
import {
|
|
12
|
+
applyBuiltinAgentRuntimeOverride,
|
|
13
|
+
resolveBuiltinPlatformAgentConfig
|
|
14
|
+
} from "./chunk-JVRQ6YVK.js";
|
|
15
|
+
import {
|
|
16
|
+
localDialogMessageRecordToRuntimeMessage
|
|
17
|
+
} from "./chunk-TVFRV3UQ.js";
|
|
18
|
+
import {
|
|
19
|
+
resolveAgentRuntimeConfigFromRecord
|
|
20
|
+
} from "./chunk-SASHAZ67.js";
|
|
21
|
+
import {
|
|
22
|
+
dialogMessagePrefix,
|
|
23
|
+
dialogMessageRange
|
|
24
|
+
} from "./chunk-OJKUU3LP.js";
|
|
25
|
+
|
|
26
|
+
// packages/cli/client/cliLocalAgentRecordReader.ts
|
|
27
|
+
function resolveBuiltinLocalCliAgentConfig(agentRef, userId) {
|
|
28
|
+
const normalized = agentRef.trim();
|
|
29
|
+
if (normalized === LOCAL_CODEX_AGENT_KEY || normalized === LOCAL_CODEX_AGENT_ID) {
|
|
30
|
+
return {
|
|
31
|
+
key: LOCAL_CODEX_AGENT_KEY,
|
|
32
|
+
name: "Local Codex",
|
|
33
|
+
prompt: "You are a local Codex CLI coding agent. Use the workspace and dialog evidence available to you, keep changes scoped, run relevant checks, and report worktree, branch, commit or dirty diff, tests, and blockers.",
|
|
34
|
+
apiSource: "cli",
|
|
35
|
+
provider: "cli",
|
|
36
|
+
cliProvider: "codex",
|
|
37
|
+
toolNames: ["readFile", "execShell", "fetchWebpage", "exa_search"],
|
|
38
|
+
rawRecord: {
|
|
39
|
+
dbKey: LOCAL_CODEX_AGENT_KEY,
|
|
40
|
+
id: LOCAL_CODEX_AGENT_ID,
|
|
41
|
+
userId,
|
|
42
|
+
type: "agent",
|
|
43
|
+
name: "Local Codex",
|
|
44
|
+
apiSource: "cli",
|
|
45
|
+
provider: "cli",
|
|
46
|
+
cliProvider: "codex"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
async function readAgentFromStore(args) {
|
|
53
|
+
for (const key of buildLocalAgentLookupKeys(args)) {
|
|
54
|
+
const record = await args.store.read(key);
|
|
55
|
+
if (!record || typeof record !== "object") continue;
|
|
56
|
+
return applyBuiltinAgentRuntimeOverride(
|
|
57
|
+
args.agentRef,
|
|
58
|
+
resolveAgentRuntimeConfigFromRecord(
|
|
59
|
+
key,
|
|
60
|
+
applyPublicAgentCatalogOverride(record)
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
return resolveBuiltinPlatformAgentConfig(args.agentRef);
|
|
65
|
+
}
|
|
66
|
+
async function readDialogMessageRecords(args) {
|
|
67
|
+
const entries = [];
|
|
68
|
+
const { start, end } = dialogMessageRange(args.dialogId);
|
|
69
|
+
const messagePrefix = `${dialogMessagePrefix(args.dialogId)}-`;
|
|
70
|
+
const iterator = args.store.iterator({ gte: start, lte: end });
|
|
71
|
+
for await (const [key, value] of iterator) {
|
|
72
|
+
if (!value || typeof value !== "object") continue;
|
|
73
|
+
entries.push({
|
|
74
|
+
key,
|
|
75
|
+
messageId: key.startsWith(messagePrefix) ? key.slice(messagePrefix.length) : String(value.id ?? ""),
|
|
76
|
+
record: value
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return entries;
|
|
80
|
+
}
|
|
81
|
+
async function readDialogMessages(args) {
|
|
82
|
+
const messages = [];
|
|
83
|
+
const entries = await readDialogMessageRecords(args);
|
|
84
|
+
for (const entry of entries) {
|
|
85
|
+
if (entry.record.metadata?.queueState === "pending") continue;
|
|
86
|
+
const message = localDialogMessageRecordToRuntimeMessage(entry.record);
|
|
87
|
+
if (message) messages.push({ ...message, cliMessageId: entry.messageId });
|
|
88
|
+
}
|
|
89
|
+
return messages;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
resolveBuiltinLocalCliAgentConfig,
|
|
94
|
+
readAgentFromStore,
|
|
95
|
+
readDialogMessageRecords,
|
|
96
|
+
readDialogMessages
|
|
97
|
+
};
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import {
|
|
2
|
+
authRoutes
|
|
3
|
+
} from "./chunk-M3JEW6N6.js";
|
|
4
|
+
import {
|
|
5
|
+
BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
|
|
6
|
+
BUILTIN_SUMMARY_LLM_CONFIG
|
|
7
|
+
} from "./chunk-523DITKR.js";
|
|
8
|
+
import {
|
|
9
|
+
buildPlatformChatCompletionRequest,
|
|
10
|
+
canUsePlatformChatProvider,
|
|
11
|
+
parsePlatformChatCompletionResponse,
|
|
12
|
+
resolvePlatformChatProviderConfig
|
|
13
|
+
} from "./chunk-DJSTBAOU.js";
|
|
14
|
+
import {
|
|
15
|
+
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
16
|
+
classifySummaryError,
|
|
17
|
+
createSummaryBudget,
|
|
18
|
+
isTruncatedCompletion,
|
|
19
|
+
selectSummaryRoute,
|
|
20
|
+
summaryCompletionTokens
|
|
21
|
+
} from "./chunk-HCJFGH6Y.js";
|
|
22
|
+
import {
|
|
23
|
+
isAbortError
|
|
24
|
+
} from "./chunk-7DPNBQSV.js";
|
|
25
|
+
import {
|
|
26
|
+
resolvePlatformAuthToken,
|
|
27
|
+
resolvePlatformServerUrl
|
|
28
|
+
} from "./chunk-2OLYKYNY.js";
|
|
29
|
+
import {
|
|
30
|
+
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL
|
|
31
|
+
} from "./chunk-VALBGPM6.js";
|
|
32
|
+
import {
|
|
33
|
+
parseUserIdFromAuthToken
|
|
34
|
+
} from "./chunk-2THCNKE4.js";
|
|
35
|
+
|
|
36
|
+
// packages/core/accountSession/fetchAccountProfile.ts
|
|
37
|
+
async function fetchAccountProfile(input) {
|
|
38
|
+
const serverUrl = input.serverUrl?.trim();
|
|
39
|
+
const token = input.token?.trim();
|
|
40
|
+
const userId = input.userId?.trim();
|
|
41
|
+
if (!serverUrl || !token || !userId) {
|
|
42
|
+
throw new Error("missing_profile_request_params");
|
|
43
|
+
}
|
|
44
|
+
const path = authRoutes.users.detail.createPath({ userId });
|
|
45
|
+
const fetchImpl = input.fetchImpl ?? ((url, init) => fetch(url, init));
|
|
46
|
+
const response = await fetchImpl(`${serverUrl}${path}`, {
|
|
47
|
+
method: authRoutes.users.detail.method,
|
|
48
|
+
headers: {
|
|
49
|
+
Authorization: `Bearer ${token}`
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
const errorText = await response.text().catch(() => "");
|
|
54
|
+
throw new Error(`profile_fetch_failed: ${response.status} ${errorText}`);
|
|
55
|
+
}
|
|
56
|
+
const profileData = await response.json().catch(() => ({}));
|
|
57
|
+
return {
|
|
58
|
+
userId,
|
|
59
|
+
balance: profileData.balance,
|
|
60
|
+
gptProAccess: profileData.gptProAccess,
|
|
61
|
+
adminPermissions: profileData.adminPermissions
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// packages/cli/client/tuiSummaryLlmCaller.ts
|
|
66
|
+
import { randomUUID } from "node:crypto";
|
|
67
|
+
var TUI_SUMMARY_MAX_OUTPUT_TOKENS = 8192;
|
|
68
|
+
function createTuiSummaryLlmCaller(env, options) {
|
|
69
|
+
const fetchImpl = options?.fetchImpl ?? fetch;
|
|
70
|
+
const configuredTimeout = options?.timeoutMs;
|
|
71
|
+
const timeoutMs = typeof configuredTimeout === "number" && Number.isFinite(configuredTimeout) && configuredTimeout > 0 ? Math.min(configuredTimeout, 3e4) : 3e4;
|
|
72
|
+
const resolveProviderConfig = options?.resolveProviderConfig ?? resolvePlatformChatProviderConfig;
|
|
73
|
+
const caller = async (content, callOptions) => {
|
|
74
|
+
if (callOptions?.signal?.aborted) throw new DOMException("Summary cancelled", "AbortError");
|
|
75
|
+
if (!canUsePlatformChatProvider(env)) return null;
|
|
76
|
+
const requestedOutputTokens = callOptions?.maxOutputTokens;
|
|
77
|
+
if (requestedOutputTokens !== void 0 && (!Number.isFinite(requestedOutputTokens) || requestedOutputTokens < 1)) return null;
|
|
78
|
+
const maxOutputTokens = requestedOutputTokens === void 0 ? TUI_SUMMARY_MAX_OUTPUT_TOKENS : Math.min(TUI_SUMMARY_MAX_OUTPUT_TOKENS, Math.floor(requestedOutputTokens));
|
|
79
|
+
const deadlineMs = Math.min(Date.now() + timeoutMs, callOptions?.deadlineMs ?? Infinity);
|
|
80
|
+
const remainingMs = deadlineMs - Date.now();
|
|
81
|
+
if (!(remainingMs > 0)) return null;
|
|
82
|
+
const controller = new AbortController();
|
|
83
|
+
const parentSignal = callOptions?.signal;
|
|
84
|
+
const onAbort = () => controller.abort(parentSignal?.reason);
|
|
85
|
+
parentSignal?.addEventListener("abort", onAbort, { once: true });
|
|
86
|
+
if (parentSignal?.aborted) onAbort();
|
|
87
|
+
const timer = setTimeout(() => controller.abort(new DOMException("Summary deadline exceeded", "TimeoutError")), remainingMs);
|
|
88
|
+
const signal = controller.signal;
|
|
89
|
+
const attemptId = callOptions?.attemptId ?? randomUUID();
|
|
90
|
+
const attempt = async (model, budgetMs) => {
|
|
91
|
+
if (signal.aborted || !(budgetMs > 0)) return null;
|
|
92
|
+
const attemptController = new AbortController();
|
|
93
|
+
const attemptSignal = attemptController.signal;
|
|
94
|
+
const attemptDeadlineMs = Date.now() + budgetMs;
|
|
95
|
+
const onStop = () => attemptController.abort(signal.reason);
|
|
96
|
+
signal.addEventListener("abort", onStop, { once: true });
|
|
97
|
+
if (signal.aborted) onStop();
|
|
98
|
+
const attemptTimer = setTimeout(() => attemptController.abort(
|
|
99
|
+
new DOMException("Summary attempt budget exceeded", "TimeoutError")
|
|
100
|
+
), budgetMs);
|
|
101
|
+
let onAttemptAbort = () => {
|
|
102
|
+
};
|
|
103
|
+
const stopped = new Promise((resolve) => {
|
|
104
|
+
onAttemptAbort = () => resolve(null);
|
|
105
|
+
if (attemptSignal.aborted) resolve(null);
|
|
106
|
+
else attemptSignal.addEventListener("abort", onAttemptAbort, { once: true });
|
|
107
|
+
});
|
|
108
|
+
const isStopped = () => attemptSignal.aborted || Date.now() >= attemptDeadlineMs;
|
|
109
|
+
let stage = "resolve";
|
|
110
|
+
let operationStage = "resolve";
|
|
111
|
+
let errorKind = null;
|
|
112
|
+
let httpStatus = null;
|
|
113
|
+
const startedAt = Date.now();
|
|
114
|
+
const work = async () => {
|
|
115
|
+
try {
|
|
116
|
+
const providerConfig = await resolveProviderConfig({
|
|
117
|
+
agentConfig: { ...BUILTIN_SUMMARY_LLM_CONFIG, model, key: BUILTIN_SUMMARY_LLM_CONFIG.id },
|
|
118
|
+
env,
|
|
119
|
+
apiKeyRefResolver: options?.apiKeyRefResolver,
|
|
120
|
+
credentialBroker: options?.credentialBroker
|
|
121
|
+
});
|
|
122
|
+
if (isStopped()) return null;
|
|
123
|
+
operationStage = "build";
|
|
124
|
+
if (!providerConfig?.authToken) {
|
|
125
|
+
stage = "auth";
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
stage = "build";
|
|
129
|
+
const messages = [
|
|
130
|
+
{ role: "system", content: COMPACTION_SUMMARY_SYSTEM_PROMPT },
|
|
131
|
+
{ role: "user", content }
|
|
132
|
+
];
|
|
133
|
+
const request = buildPlatformChatCompletionRequest({
|
|
134
|
+
providerConfig: {
|
|
135
|
+
...providerConfig,
|
|
136
|
+
requestOptions: { ...providerConfig.requestOptions, max_tokens: maxOutputTokens, reasoning_effort: "low" }
|
|
137
|
+
},
|
|
138
|
+
messages,
|
|
139
|
+
stream: false,
|
|
140
|
+
requestId: attemptId
|
|
141
|
+
});
|
|
142
|
+
stage = "http";
|
|
143
|
+
operationStage = "http";
|
|
144
|
+
if (isStopped()) return null;
|
|
145
|
+
const response = await fetchImpl(request.url, { ...request.init, signal: attemptSignal });
|
|
146
|
+
httpStatus = response.status;
|
|
147
|
+
if (isStopped() || !response.ok) return null;
|
|
148
|
+
stage = "body";
|
|
149
|
+
operationStage = "body";
|
|
150
|
+
let responseText;
|
|
151
|
+
try {
|
|
152
|
+
responseText = await response.text();
|
|
153
|
+
} catch (error) {
|
|
154
|
+
if (isAbortError(error)) throw error;
|
|
155
|
+
errorKind = "body";
|
|
156
|
+
throw new Error("body-read-failed");
|
|
157
|
+
}
|
|
158
|
+
if (isStopped()) return null;
|
|
159
|
+
operationStage = "parse";
|
|
160
|
+
let data;
|
|
161
|
+
try {
|
|
162
|
+
data = JSON.parse(responseText);
|
|
163
|
+
} catch {
|
|
164
|
+
errorKind = "parse";
|
|
165
|
+
throw new Error("response-json-invalid");
|
|
166
|
+
}
|
|
167
|
+
if (isStopped()) return null;
|
|
168
|
+
stage = "parse";
|
|
169
|
+
const parsed = parsePlatformChatCompletionResponse({ providerConfig, data, trace: [] });
|
|
170
|
+
if (isTruncatedCompletion({
|
|
171
|
+
finishReason: parsed.finish_reason,
|
|
172
|
+
responseStatus: data?.status,
|
|
173
|
+
incompleteReason: data?.incomplete_details?.reason,
|
|
174
|
+
truncated: !!data?.incomplete_details
|
|
175
|
+
})) {
|
|
176
|
+
stage = "truncated";
|
|
177
|
+
throw {
|
|
178
|
+
code: "SUMMARY_TRUNCATED",
|
|
179
|
+
stage: "decode",
|
|
180
|
+
finishReason: parsed.finish_reason,
|
|
181
|
+
responseStatus: data?.status,
|
|
182
|
+
incompleteReason: data?.incomplete_details?.reason,
|
|
183
|
+
maxOutputTokens,
|
|
184
|
+
completionTokens: summaryCompletionTokens(parsed.usage),
|
|
185
|
+
outputChars: parsed.content?.length,
|
|
186
|
+
model,
|
|
187
|
+
provider: "nolo",
|
|
188
|
+
attemptId
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
const summary = parsed?.content?.trim() || null;
|
|
192
|
+
stage = summary ? "done" : "empty";
|
|
193
|
+
return summary;
|
|
194
|
+
} catch (error) {
|
|
195
|
+
if (parentSignal?.aborted || isAbortError(error) && !attemptSignal.aborted) {
|
|
196
|
+
throw new DOMException("Summary cancelled", "AbortError");
|
|
197
|
+
}
|
|
198
|
+
if (error?.code === "SUMMARY_TRUNCATED") {
|
|
199
|
+
const safe = classifySummaryError(error);
|
|
200
|
+
throw Object.assign(new Error(safe.message), safe);
|
|
201
|
+
}
|
|
202
|
+
if (errorKind === null) errorKind = operationStage === "resolve" ? "resolve" : operationStage === "http" ? "http" : null;
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
try {
|
|
207
|
+
const result = await Promise.race([work(), stopped]);
|
|
208
|
+
if (parentSignal?.aborted) throw new DOMException("Summary cancelled", "AbortError");
|
|
209
|
+
if (!result) console.warn("[tuiSummary] summary attempt failed", {
|
|
210
|
+
attemptId,
|
|
211
|
+
model,
|
|
212
|
+
stage: parentSignal?.aborted ? "cancelled" : signal.aborted || Date.now() >= deadlineMs ? "deadline" : isStopped() ? "attempt-budget" : stage,
|
|
213
|
+
operationStage,
|
|
214
|
+
elapsedMs: Math.max(0, Date.now() - startedAt),
|
|
215
|
+
...errorKind ? { errorKind } : {},
|
|
216
|
+
...httpStatus !== null ? { httpStatus } : {}
|
|
217
|
+
});
|
|
218
|
+
return result;
|
|
219
|
+
} finally {
|
|
220
|
+
clearTimeout(attemptTimer);
|
|
221
|
+
signal.removeEventListener("abort", onStop);
|
|
222
|
+
attemptSignal.removeEventListener("abort", onAttemptAbort);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
try {
|
|
226
|
+
const primary = await attempt(options?.platformPrimary ? PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL : BUILTIN_SUMMARY_LLM_CONFIG.model, deadlineMs - Date.now());
|
|
227
|
+
if (options?.platformPrimary) return primary;
|
|
228
|
+
if (primary || signal.aborted || parentSignal?.aborted || Date.now() >= deadlineMs) return primary;
|
|
229
|
+
return await attempt(BUILTIN_DIALOG_LLM_FALLBACK_MODEL, deadlineMs - Date.now());
|
|
230
|
+
} finally {
|
|
231
|
+
clearTimeout(timer);
|
|
232
|
+
parentSignal?.removeEventListener("abort", onAbort);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
return Object.assign(caller, {
|
|
236
|
+
complete: async (content, callOptions) => {
|
|
237
|
+
const configured = typeof configuredTimeout === "number" && Number.isFinite(configuredTimeout) && configuredTimeout > 0 ? Date.now() + configuredTimeout : Infinity;
|
|
238
|
+
const budget = createSummaryBudget({
|
|
239
|
+
mode: "manual",
|
|
240
|
+
signal: callOptions?.signal,
|
|
241
|
+
deadlineMs: Math.min(callOptions?.deadlineMs ?? Date.now() + 6e4, configured)
|
|
242
|
+
});
|
|
243
|
+
const model = PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL;
|
|
244
|
+
const attemptId = callOptions?.attemptId ?? randomUUID();
|
|
245
|
+
let stage = "resolve";
|
|
246
|
+
let httpStatus;
|
|
247
|
+
try {
|
|
248
|
+
return await budget.run(async ({ signal, deadlineMs }) => {
|
|
249
|
+
if (!canUsePlatformChatProvider(env)) throw { code: "PLATFORM_AUTH_UNAVAILABLE", stage: "auth" };
|
|
250
|
+
const requested = callOptions?.maxOutputTokens;
|
|
251
|
+
if (requested !== void 0 && (!Number.isFinite(requested) || requested < 1)) throw { code: "INVALID_OUTPUT_BUDGET", stage: "build" };
|
|
252
|
+
const providerConfig = await resolveProviderConfig({
|
|
253
|
+
agentConfig: { ...BUILTIN_SUMMARY_LLM_CONFIG, model, key: BUILTIN_SUMMARY_LLM_CONFIG.id },
|
|
254
|
+
env,
|
|
255
|
+
apiKeyRefResolver: options?.apiKeyRefResolver,
|
|
256
|
+
credentialBroker: options?.credentialBroker
|
|
257
|
+
});
|
|
258
|
+
if (signal.aborted) throw signal.reason;
|
|
259
|
+
if (!providerConfig?.authToken) throw { code: "PLATFORM_AUTH_UNAVAILABLE", stage: "auth" };
|
|
260
|
+
stage = "build";
|
|
261
|
+
const request = buildPlatformChatCompletionRequest({
|
|
262
|
+
providerConfig: {
|
|
263
|
+
...providerConfig,
|
|
264
|
+
requestOptions: { ...providerConfig.requestOptions, max_tokens: Math.min(TUI_SUMMARY_MAX_OUTPUT_TOKENS, Math.floor(requested ?? TUI_SUMMARY_MAX_OUTPUT_TOKENS)), reasoning_effort: "low" }
|
|
265
|
+
},
|
|
266
|
+
messages: [{ role: "system", content: COMPACTION_SUMMARY_SYSTEM_PROMPT }, { role: "user", content }],
|
|
267
|
+
stream: false,
|
|
268
|
+
requestId: attemptId
|
|
269
|
+
});
|
|
270
|
+
stage = "http";
|
|
271
|
+
const response = await fetchImpl(request.url, { ...request.init, signal });
|
|
272
|
+
httpStatus = response.status;
|
|
273
|
+
stage = "body";
|
|
274
|
+
const body = await response.text();
|
|
275
|
+
if (!response.ok) {
|
|
276
|
+
let data2;
|
|
277
|
+
try {
|
|
278
|
+
data2 = JSON.parse(body);
|
|
279
|
+
} catch {
|
|
280
|
+
data2 = {};
|
|
281
|
+
}
|
|
282
|
+
throw {
|
|
283
|
+
status: response.status,
|
|
284
|
+
code: data2?.error?.code ?? data2?.code,
|
|
285
|
+
type: data2?.error?.type ?? data2?.type,
|
|
286
|
+
balanceSource: data2?.balanceSource,
|
|
287
|
+
stage: "http"
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
stage = "decode";
|
|
291
|
+
let data;
|
|
292
|
+
try {
|
|
293
|
+
data = JSON.parse(body);
|
|
294
|
+
} catch {
|
|
295
|
+
throw { code: "INVALID_SUMMARY_JSON" };
|
|
296
|
+
}
|
|
297
|
+
const parsed = parsePlatformChatCompletionResponse({ providerConfig, data, trace: [] });
|
|
298
|
+
return {
|
|
299
|
+
text: parsed.content ?? "",
|
|
300
|
+
finishReason: parsed.finish_reason,
|
|
301
|
+
responseStatus: data?.status,
|
|
302
|
+
incompleteReason: data?.incomplete_details?.reason,
|
|
303
|
+
maxOutputTokens: Math.min(TUI_SUMMARY_MAX_OUTPUT_TOKENS, Math.floor(requested ?? TUI_SUMMARY_MAX_OUTPUT_TOKENS)),
|
|
304
|
+
completionTokens: summaryCompletionTokens(parsed.usage),
|
|
305
|
+
truncated: isTruncatedCompletion({ finishReason: parsed.finish_reason, responseStatus: data?.status, incompleteReason: data?.incomplete_details?.reason, truncated: !!data?.incomplete_details })
|
|
306
|
+
};
|
|
307
|
+
});
|
|
308
|
+
} catch (cause) {
|
|
309
|
+
const safe = classifySummaryError(
|
|
310
|
+
budget.signal.aborted ? budget.signal.reason : cause,
|
|
311
|
+
{ model, provider: "nolo", attemptId, stage }
|
|
312
|
+
);
|
|
313
|
+
if (httpStatus !== void 0 && safe.status === void 0) safe.status = httpStatus;
|
|
314
|
+
throw Object.assign(new Error(safe.message), safe, {
|
|
315
|
+
type: safe.errorType,
|
|
316
|
+
name: safe.category === "cancelled" ? "AbortError" : safe.category === "timeout" ? "TimeoutError" : "SummaryError"
|
|
317
|
+
});
|
|
318
|
+
} finally {
|
|
319
|
+
budget.dispose();
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
preferPlatform: async (callOptions) => {
|
|
323
|
+
if (callOptions?.signal?.aborted) throw new DOMException("Summary cancelled", "AbortError");
|
|
324
|
+
if (!options?.platformPrimary || !canUsePlatformChatProvider(env)) return false;
|
|
325
|
+
const token = resolvePlatformAuthToken(env);
|
|
326
|
+
const userId = parseUserIdFromAuthToken(token);
|
|
327
|
+
if (!userId || userId === "local" || userId === "guest") return false;
|
|
328
|
+
const controller = new AbortController();
|
|
329
|
+
const onAbort = () => controller.abort(callOptions?.signal?.reason);
|
|
330
|
+
callOptions?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
331
|
+
if (callOptions?.signal?.aborted) onAbort();
|
|
332
|
+
const budget = Math.min(5e3, (callOptions?.deadlineMs ?? Infinity) - Date.now());
|
|
333
|
+
const timer = setTimeout(() => controller.abort(), Math.max(0, budget));
|
|
334
|
+
try {
|
|
335
|
+
if (!(budget > 0)) throw new DOMException("Summary deadline exceeded", "TimeoutError");
|
|
336
|
+
const profile = await fetchAccountProfile({
|
|
337
|
+
serverUrl: resolvePlatformServerUrl(env),
|
|
338
|
+
token,
|
|
339
|
+
userId,
|
|
340
|
+
fetchImpl: (url, init) => fetchImpl(url, { ...init, signal: controller.signal })
|
|
341
|
+
});
|
|
342
|
+
return selectSummaryRoute({
|
|
343
|
+
userId,
|
|
344
|
+
authenticated: true,
|
|
345
|
+
platformAvailable: !controller.signal.aborted,
|
|
346
|
+
credits: profile.balance
|
|
347
|
+
}).kind === "platform";
|
|
348
|
+
} catch (error) {
|
|
349
|
+
if (callOptions?.signal?.aborted) throw callOptions.signal.reason ?? new DOMException("Summary cancelled", "AbortError");
|
|
350
|
+
if (Date.now() >= (callOptions?.deadlineMs ?? Infinity)) throw new DOMException("Summary deadline exceeded", "TimeoutError");
|
|
351
|
+
if (isAbortError(error) && !controller.signal.aborted) throw new DOMException("Summary cancelled", "AbortError");
|
|
352
|
+
return false;
|
|
353
|
+
} finally {
|
|
354
|
+
clearTimeout(timer);
|
|
355
|
+
callOptions?.signal?.removeEventListener("abort", onAbort);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export {
|
|
362
|
+
TUI_SUMMARY_MAX_OUTPUT_TOKENS,
|
|
363
|
+
createTuiSummaryLlmCaller
|
|
364
|
+
};
|
|
@@ -1,32 +1,101 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_AGENT_BASE_POLICY,
|
|
3
3
|
DEFAULT_USER_PREFERENCE_PROFILE,
|
|
4
|
-
|
|
5
|
-
resolveAgentSkillConfig,
|
|
4
|
+
isAccountOnDemandWorkflowSkill,
|
|
6
5
|
resolveUserEnabledSkills
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GGKNJ42M.js";
|
|
7
|
+
import {
|
|
8
|
+
collectAgentSkillConfigIssues,
|
|
9
|
+
describeAgentSkillModeValue,
|
|
10
|
+
isAgentSkillDisabled,
|
|
11
|
+
resolveAgentSkillConfig
|
|
12
|
+
} from "./chunk-EOWLBDY6.js";
|
|
8
13
|
import {
|
|
9
14
|
resolveBuiltinSkillEntry,
|
|
10
15
|
resolveBuiltinSkillPage,
|
|
11
16
|
resolveSkillGraphFromRoots
|
|
12
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GNHMRBYZ.js";
|
|
13
18
|
import {
|
|
14
19
|
parseSkillDocProtocol
|
|
15
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-W6RFEDN4.js";
|
|
21
|
+
|
|
22
|
+
// packages/ai/skills/agentSkillPreferenceDiagnostics.ts
|
|
23
|
+
var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
24
|
+
var resolveAgentSkillPreferenceSource = (preferences) => {
|
|
25
|
+
if (!preferences || typeof preferences !== "object") {
|
|
26
|
+
return { source: "empty", field: null };
|
|
27
|
+
}
|
|
28
|
+
if (hasOwn(preferences, "enabledSkills")) {
|
|
29
|
+
return { source: "settings-record", field: "enabledSkills" };
|
|
30
|
+
}
|
|
31
|
+
if (hasOwn(preferences, "enabledPromptSkills")) {
|
|
32
|
+
return { source: "legacy-field", field: "enabledPromptSkills" };
|
|
33
|
+
}
|
|
34
|
+
return { source: "empty", field: null };
|
|
35
|
+
};
|
|
36
|
+
var buildAgentSkillPreferenceDiagnostic = (input) => {
|
|
37
|
+
const { source, field } = resolveAgentSkillPreferenceSource(input.preferences);
|
|
38
|
+
const config = resolveAgentSkillConfig(input.agentConfig);
|
|
39
|
+
const agentSkillModes = {};
|
|
40
|
+
for (const slug of Object.keys(config).sort()) {
|
|
41
|
+
agentSkillModes[slug] = config[slug];
|
|
42
|
+
}
|
|
43
|
+
const discardedSkills = collectAgentSkillConfigIssues(input.agentConfig).map(
|
|
44
|
+
(issue) => ({
|
|
45
|
+
slug: issue.slug,
|
|
46
|
+
value: describeAgentSkillModeValue(issue.value),
|
|
47
|
+
reason: issue.reason
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
return {
|
|
51
|
+
event: "agent_skill_preference_resolved",
|
|
52
|
+
preferenceSource: source,
|
|
53
|
+
preferenceField: field,
|
|
54
|
+
enabledSkills: [...input.enabledSkills],
|
|
55
|
+
enabledSkillCount: input.enabledSkills.length,
|
|
56
|
+
agentSkillModes,
|
|
57
|
+
agentSkillCount: Object.keys(agentSkillModes).length,
|
|
58
|
+
discardedSkills,
|
|
59
|
+
discardedSkillCount: discardedSkills.length
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
var DIAGNOSTIC_PREFIX = "[nolo.skill.diagnostics] ";
|
|
63
|
+
var seenSignatures = /* @__PURE__ */ new Set();
|
|
64
|
+
var reportAgentSkillPreferenceDiagnostic = (diagnostic, sink) => {
|
|
65
|
+
const signature = JSON.stringify(diagnostic);
|
|
66
|
+
if (seenSignatures.has(signature)) return false;
|
|
67
|
+
seenSignatures.add(signature);
|
|
68
|
+
const write = sink ?? ((line) => {
|
|
69
|
+
process.stderr.write(line);
|
|
70
|
+
});
|
|
71
|
+
write(`${DIAGNOSTIC_PREFIX}${signature}
|
|
72
|
+
`);
|
|
73
|
+
return true;
|
|
74
|
+
};
|
|
16
75
|
|
|
17
76
|
// packages/ai/skills/userSkillRuntime.ts
|
|
18
77
|
async function resolveUserSkillRuntime(agentConfig, preferences) {
|
|
19
78
|
const effectiveConfig = agentConfig && typeof agentConfig === "object" ? "rawRecord" in agentConfig && agentConfig.rawRecord && typeof agentConfig.rawRecord === "object" ? agentConfig.rawRecord : agentConfig : null;
|
|
20
79
|
const disabledSlugs = /* @__PURE__ */ new Set();
|
|
21
|
-
|
|
22
|
-
|
|
80
|
+
const requiredSlugs = /* @__PURE__ */ new Set();
|
|
81
|
+
for (const [identifier, mode] of Object.entries(resolveAgentSkillConfig(effectiveConfig))) {
|
|
23
82
|
const entry = resolveBuiltinSkillEntry(identifier);
|
|
24
|
-
if (entry)
|
|
83
|
+
if (!entry) continue;
|
|
84
|
+
if (mode === "disabled") disabledSlugs.add(entry.slug);
|
|
85
|
+
if (mode === "required") requiredSlugs.add(entry.slug);
|
|
25
86
|
}
|
|
87
|
+
const enabledSkills = resolveUserEnabledSkills(preferences);
|
|
88
|
+
reportAgentSkillPreferenceDiagnostic(
|
|
89
|
+
buildAgentSkillPreferenceDiagnostic({
|
|
90
|
+
agentConfig: effectiveConfig,
|
|
91
|
+
preferences,
|
|
92
|
+
enabledSkills
|
|
93
|
+
})
|
|
94
|
+
);
|
|
26
95
|
const graph = await resolveSkillGraphFromRoots({
|
|
27
|
-
roots:
|
|
96
|
+
roots: enabledSkills.map((identifier) => ({
|
|
28
97
|
identifier,
|
|
29
|
-
mode: "required"
|
|
98
|
+
mode: isAccountOnDemandWorkflowSkill(identifier) && !requiredSlugs.has(identifier) ? "recommended" : "required"
|
|
30
99
|
})),
|
|
31
100
|
loadPage: async (identifier) => {
|
|
32
101
|
const entry = resolveBuiltinSkillEntry(identifier);
|
|
@@ -45,7 +114,7 @@ async function resolveUserSkillRuntime(agentConfig, preferences) {
|
|
|
45
114
|
const skillPromptPatches = /* @__PURE__ */ new Set();
|
|
46
115
|
const seen = /* @__PURE__ */ new Set();
|
|
47
116
|
for (const visit of graph.visits) {
|
|
48
|
-
if (seen.has(visit.dbKey)) continue;
|
|
117
|
+
if (visit.mode !== "required" || seen.has(visit.dbKey)) continue;
|
|
49
118
|
seen.add(visit.dbKey);
|
|
50
119
|
const page = contentByKey.get(visit.dbKey);
|
|
51
120
|
const patch = (visit.meta?.skillConfig?.promptPatch || parseSkillDocProtocol(page?.content ?? "", visit.meta).content).trim();
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KAVGK4ES.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FVZW66K4.js";
|
|
8
8
|
import {
|
|
9
9
|
applyUpdateTokensFulfilled
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-S2NTVGA2.js";
|
|
11
11
|
import {
|
|
12
12
|
extractReasoningFromResponseOutput,
|
|
13
13
|
extractTextFromResponseOutput,
|
|
14
14
|
extractToolCallsFromResponseOutput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PFJNLBRU.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
18
|
} from "./chunk-KUG52IAP.js";
|