nolo-cli 0.108.0-alpha.2 → 0.108.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 +1 -1
- package/{_executeModel-BY3P5LBB.js → _executeModel-T7PIVJIW.js} +128 -83
- package/action-RHUT4OHH.js +23 -0
- package/{addContentAction-MB2HHMDZ.js → addContentAction-BQ3LJLUW.js} +19 -13
- package/{addDialogAgentAction-MCEABSBA.js → addDialogAgentAction-B6X7BXR4.js} +24 -20
- package/{agentDeleteCommand-66KXCSRR.js → agentDeleteCommand-VIDCZAFG.js} +154 -68
- package/{agentEmailCommands-63UTONDK.js → agentEmailCommands-PCHDY4ZP.js} +125 -105
- package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
- package/agentListCommands-QNUAN3YH.js +800 -0
- package/{agentMachineCommands-Z6RGPZSG.js → agentMachineCommands-C2TMTQNU.js} +54 -58
- package/{agentProviderCommands-X3UNW77C.js → agentProviderCommands-7PCGR77I.js} +97 -2
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-7GCDM4BK.js} +7 -7
- package/agentRecordCommands-T4XAUFF5.js +149 -0
- package/agentRunCommand-T3AW43I6.js +179 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-2CDZNHXV.js} +10 -2
- package/{agentRuntimeLocal-E67CTV45.js → agentRuntimeLocal-SQUDRZWE.js} +41 -46
- package/{agentSlice-DG5TIQHE.js → agentSlice-HBGFNXUG.js} +22 -16
- package/{appDeleteCommands-Z36CLGUK.js → appDeleteCommands-CLLYGEBC.js} +55 -56
- package/{appDeployCommands-ECMUWG6S.js → appDeployCommands-HY2NBNDQ.js} +64 -60
- package/{appDeployStatusCommands-CL24TDMA.js → appDeployStatusCommands-SGO5GEXH.js} +53 -53
- package/{appGetCommands-ITHGOYGJ.js → appGetCommands-ZPYK2N5D.js} +53 -53
- package/{appListCommands-EEOSI6RC.js → appListCommands-O2BHIMKS.js} +54 -56
- package/{authCommand-HGP2XTKC.js → authCommand-GUIREPHK.js} +132 -83
- package/{authCommands-RGOGCPP6.js → authCommands-K3BDSTJ4.js} +10 -7
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-MUOUTRNJ.js} +13 -10
- package/{chromeCommands-FZYAU75D.js → chromeCommands-Z2WRJB7O.js} +290 -38
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-YWYXZTIR.js} +157 -23
- package/{chunk-2F7RJC6L.js → chunk-2C47W7IJ.js} +1 -1
- package/chunk-2DRYS3G3.js +13941 -0
- package/{chunk-VLTIYV3X.js → chunk-2ECUZDEL.js} +37 -11
- package/{chunk-LPIYPEME.js → chunk-2FY3GHBV.js} +1449 -1094
- package/{chunk-ALXHV7NK.js → chunk-2GGXHQIW.js} +43 -4
- package/{chunk-AHAHBQMU.js → chunk-2OMUAIKR.js} +2 -2
- package/{chunk-DHDMC6FO.js → chunk-3CZM6HGQ.js} +53 -23
- package/{chunk-BNGW5ASC.js → chunk-3LI5UCTU.js} +23 -3
- package/{chunk-FDTR4QJ6.js → chunk-3MZAGMYY.js} +48 -1
- package/chunk-3PVYUPXK.js +40 -0
- package/{chunk-FV3JEYR3.js → chunk-3SK3J3IF.js} +69 -10
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-V7E4PXQD.js → chunk-4MSYSHZD.js} +15 -7
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-MP64VFGD.js → chunk-4XEYAFLY.js} +60 -18
- package/chunk-4YRTZIVN.js +871 -0
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-N7J63Q6C.js → chunk-56GBUMO5.js} +10 -1
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-KZJP33ZK.js → chunk-5WLADF62.js} +90 -36
- package/chunk-5XN3OSCT.js +164 -0
- package/{chunk-T3GEOSRJ.js → chunk-5YJWHTKD.js} +69 -57
- package/chunk-6CCAXGFK.js +1712 -0
- package/{chunk-42V6BK2E.js → chunk-6MXDOUMH.js} +18 -36
- package/{chunk-QOKAKDPE.js → chunk-6Q7UTJKR.js} +6 -94
- package/{chunk-J4MOO56S.js → chunk-6VRWNU5J.js} +10 -2
- package/{chunk-IQPFGYO3.js → chunk-726TCFLQ.js} +5 -5
- package/{chunk-CW67PN7L.js → chunk-7B3BVGU3.js} +61 -11
- package/chunk-7DPNBQSV.js +9 -0
- package/{chunk-LWKP7AWH.js → chunk-A337PRRR.js} +41 -17
- package/chunk-AGIM7IMJ.js +147 -0
- package/chunk-AI7XJMMQ.js +1858 -0
- package/{chunk-ABQYVJBJ.js → chunk-AIZE5TDM.js} +3 -3
- package/{chunk-LJ5VW2UJ.js → chunk-ALKCVCA5.js} +4 -4
- package/{chunk-5UTFL4QJ.js → chunk-APO5TOXO.js} +1 -1
- package/{chunk-E4MARS3Q.js → chunk-AU7AXHUL.js} +1 -1
- package/{chunk-DOTZ5GTO.js → chunk-AWYWIWTU.js} +310 -95
- package/chunk-B77W7P7J.js +95 -0
- package/{chunk-PBA4UJBK.js → chunk-BFYDNHYW.js} +12 -12
- package/{chunk-QTGQ2LTL.js → chunk-BIAETTOB.js} +5 -9
- package/{chunk-OIVSQH2O.js → chunk-CGEK73JN.js} +311 -12
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/chunk-EYLGAEB4.js +784 -0
- package/{chunk-3BMYXEUW.js → chunk-F2UJW3EK.js} +1 -1
- package/{chunk-RVE4DCV3.js → chunk-FBLRSLZH.js} +26 -31
- package/{chunk-P5EVSOPA.js → chunk-FWY6BHIJ.js} +363 -248
- package/{chunk-4MK3I7Y4.js → chunk-G23MQWLJ.js} +7 -128
- package/chunk-G6OOUQWJ.js +417 -0
- package/{chunk-WV42OMV7.js → chunk-GHZ2H2HJ.js} +11 -15
- package/chunk-I42VC5KR.js +15 -0
- package/{chunk-H4AHY5BU.js → chunk-IFALJPEX.js} +69 -20
- package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
- package/{chunk-UKWGR5SS.js → chunk-IJERIUXS.js} +242 -1146
- package/chunk-IN5UVHHP.js +843 -0
- package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
- package/{chunk-SYXOBWOC.js → chunk-JGLKZGGZ.js} +124 -703
- package/chunk-JJM3WS6W.js +132 -0
- package/{chunk-TR22GEUU.js → chunk-JKDL7BRF.js} +20 -11
- package/chunk-JONVI6DK.js +593 -0
- package/{chunk-SH43IESU.js → chunk-KQ7DAEZ7.js} +202 -32
- package/chunk-KWEDNOZZ.js +7546 -0
- package/{chunk-6OZ36FXI.js → chunk-KY6GPQ7O.js} +36 -12
- package/{chunk-RZGLXO2B.js → chunk-L5YKEQLD.js} +1715 -451
- package/{chunk-MRIHM22T.js → chunk-LAVSW2C2.js} +77 -144
- package/{chunk-HSSRGGXJ.js → chunk-LNEKN523.js} +10 -7
- package/chunk-LWLNLZC5.js +265 -0
- package/{chunk-YTLRHRH3.js → chunk-MDOZSLDE.js} +17 -15
- package/{chunk-I3TQJXQ7.js → chunk-MHD5JBSS.js} +131 -10
- package/{chunk-QU7KDSZX.js → chunk-MW533QT3.js} +190 -8
- package/{chunk-4NNTATRH.js → chunk-NLEJWKF5.js} +10394 -8549
- package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
- package/{chunk-GQBOR3G6.js → chunk-NN4UUYGB.js} +18 -4
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/chunk-OKARGYFT.js +15 -0
- package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
- package/{chunk-Z5625XML.js → chunk-OYBAT7RT.js} +113 -17
- package/chunk-P3SFAHIL.js +134 -0
- package/{chunk-XD2MJFUG.js → chunk-PBGO5AFD.js} +1 -1
- package/{chunk-EYAQT56M.js → chunk-PFEK4SA2.js} +13 -10
- package/{chunk-Z77CRGTW.js → chunk-PHHFVGOJ.js} +1 -1
- package/{chunk-3VNWWVKB.js → chunk-PJNFNEJE.js} +114 -28
- package/{chunk-HVURBGF3.js → chunk-PWRS2SU2.js} +27 -9
- package/chunk-QFEW2ULV.js +42 -0
- package/{chunk-IIVGDG4I.js → chunk-QLQ573SU.js} +124 -77
- package/chunk-QQ56R7KS.js +88 -0
- package/{chunk-PWBDVI4R.js → chunk-QRFI5NHO.js} +269 -141
- package/chunk-QYPE3TS3.js +43 -0
- package/{chunk-VMFTFOWF.js → chunk-RLRYVSCD.js} +31 -14
- package/{chunk-VRTTFDBM.js → chunk-RNNWTMKT.js} +56 -63
- package/{chunk-JRQFUXY7.js → chunk-RRQQAG7W.js} +93 -24
- package/chunk-SJ3QFSQS.js +1147 -0
- package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/{chunk-GNCCNNZD.js → chunk-TSBCYK5F.js} +7 -7
- package/chunk-TY3TIUJK.js +89 -0
- package/chunk-U4STABYN.js +81 -0
- package/chunk-UEILX4EV.js +15 -0
- package/{chunk-AODJ7WSF.js → chunk-UIYVU3S4.js} +90 -79
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/{chunk-7S4YWN7P.js → chunk-V2UPLOXT.js} +4 -4
- package/{chunk-LS2ZANRJ.js → chunk-V6WXGTUJ.js} +1 -1
- package/{chunk-6YTOJY35.js → chunk-VBG7GWWR.js} +253 -8
- package/{chunk-DVINR3PL.js → chunk-VEA7H5FG.js} +3 -3
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-EADNWBAZ.js → chunk-VP3BINY7.js} +13 -0
- package/{chunk-HKNXJGEC.js → chunk-VSPO4S33.js} +47 -192
- package/{chunk-PHXD6JTX.js → chunk-W2N3ZC4P.js} +7 -7
- package/{chunk-EOARMOVD.js → chunk-W4S6OTSC.js} +6 -3
- package/{chunk-6Z7MY3V7.js → chunk-WCQNEMXG.js} +3 -3
- package/chunk-WJZOQR2J.js +151 -0
- package/{chunk-BFDFRLLQ.js → chunk-WW2USJ3C.js} +3 -3
- package/chunk-X5BIY654.js +29 -0
- package/{chunk-Q554LLSI.js → chunk-XETG4RIX.js} +5 -5
- package/{chunk-3L2WKC3W.js → chunk-XPWGOTBQ.js} +8 -1
- package/{chunk-2OASQKU2.js → chunk-XRXYRHE5.js} +187 -16
- package/{chunk-JEDZAO7L.js → chunk-YBNHPX4S.js} +257 -37
- package/{chunk-JPGCXHNM.js → chunk-YLMMECCH.js} +1 -1
- package/{chunk-6D6VBVEW.js → chunk-YVTZMLXZ.js} +96 -25
- package/{chunk-G4VIHCGJ.js → chunk-ZR5RAAVI.js} +35 -30
- package/chunk-ZRAU6T47.js +56 -0
- package/{chunk-ONXOABJR.js → chunk-ZWQUWF6W.js} +36 -1
- package/{cliExecutor-HG3S345O.js → cliExecutor-AWYR3T33.js} +1 -1
- package/commandRegistry-3XWUYELA.js +839 -0
- package/contentThunks-ALRPUDRE.js +83 -0
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-JFKTYS2D.js} +2 -2
- package/{createAgentAutomationAction-7HX7KBES.js → createAgentAutomationAction-XXRXCDFJ.js} +51 -43
- package/createDialogAction-FVSAW7WZ.js +75 -0
- package/{createPageAction-QWNMGO3O.js → createPageAction-RT6DPYP5.js} +60 -51
- package/{chunk-UDIIVXKA.js → cursorProvider-YGGNMVWX.js} +2822 -10269
- package/{dbSlice-A6C6H32X.js → dbSlice-JQFBMJ55.js} +18 -12
- package/{deleteFile-YG6QMJLU.js → deleteFile-6JWDDRVP.js} +9 -5
- package/dialogCommands-K734RXEQ.js +108 -0
- package/{dialogSlice-P2K47T3P.js → dialogSlice-GFCT74GI.js} +66 -41
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-43JKQEIH.js → docCreateCommands-N3KPGP4A.js} +51 -54
- package/{docDeleteCommands-RL6D46XE.js → docDeleteCommands-4CR4TXZ7.js} +53 -55
- package/{docReadCommands-TOEUEQDG.js → docReadCommands-62XK57VS.js} +50 -53
- package/{docStore-3AHKTJRI.js → docStore-Z7KBPFXX.js} +24 -15
- package/{docUpdateCommands-FWU5G2XB.js → docUpdateCommands-DRAAWIDC.js} +51 -54
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-LM6OMMQQ.js} +5 -4
- package/{getPricing-LUSEABA6.js → getPricing-XDF4OLTC.js} +6 -6
- package/handleSendMessageAction-NRKUSHK2.js +1849 -0
- package/index.js +91 -884
- package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-BOETO2TD.js} +2 -2
- package/localRuntimeAdapter-S6UEEOSA.js +239 -0
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-YSE6NH7B.js} +12 -9
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-7FBKDEQY.js} +1 -1
- package/{machineCommands-TTKK4F7C.js → machineCommands-IQYHOOVH.js} +493 -152
- package/machineWsRunDispatch-3ZUMZUGP.js +164 -0
- package/{memberThunks-P2ECUJ56.js → memberThunks-Y3Q7GZTG.js} +24 -17
- package/{models-T3SG6MJ5.js → models-6V4ZCHEE.js} +2 -2
- package/node_modules/abstract-level/CHANGELOG.md +150 -0
- package/node_modules/abstract-level/LICENSE +21 -0
- package/node_modules/abstract-level/README.md +1957 -0
- package/node_modules/abstract-level/UPGRADING.md +669 -0
- package/node_modules/abstract-level/abstract-chained-batch.js +397 -0
- package/node_modules/abstract-level/abstract-iterator.js +404 -0
- package/node_modules/abstract-level/abstract-level.js +1127 -0
- package/node_modules/abstract-level/abstract-snapshot.js +84 -0
- package/node_modules/abstract-level/index.d.ts +52 -0
- package/node_modules/abstract-level/index.js +9 -0
- package/node_modules/abstract-level/lib/abstract-sublevel-iterator.js +141 -0
- package/node_modules/abstract-level/lib/abstract-sublevel.js +290 -0
- package/node_modules/abstract-level/lib/common.js +33 -0
- package/node_modules/abstract-level/lib/default-chained-batch.js +29 -0
- package/node_modules/abstract-level/lib/default-kv-iterator.js +74 -0
- package/node_modules/abstract-level/lib/deferred-iterator.js +110 -0
- package/node_modules/abstract-level/lib/deferred-queue.js +84 -0
- package/node_modules/abstract-level/lib/errors.js +21 -0
- package/node_modules/abstract-level/lib/event-monitor.js +30 -0
- package/node_modules/abstract-level/lib/hooks.js +78 -0
- package/node_modules/abstract-level/lib/prefixes.js +21 -0
- package/node_modules/abstract-level/lib/prewrite-batch.js +96 -0
- package/node_modules/abstract-level/lib/range-options.js +26 -0
- package/node_modules/abstract-level/package.json +66 -0
- package/node_modules/abstract-level/test/async-iterator-test.js +132 -0
- package/node_modules/abstract-level/test/batch-test.js +214 -0
- package/node_modules/abstract-level/test/chained-batch-test.js +315 -0
- package/node_modules/abstract-level/test/clear-range-test.js +262 -0
- package/node_modules/abstract-level/test/clear-test.js +110 -0
- package/node_modules/abstract-level/test/common.js +90 -0
- package/node_modules/abstract-level/test/deferred-open-test.js +209 -0
- package/node_modules/abstract-level/test/del-test.js +65 -0
- package/node_modules/abstract-level/test/encoding-buffer-test.js +336 -0
- package/node_modules/abstract-level/test/encoding-custom-test.js +92 -0
- package/node_modules/abstract-level/test/encoding-decode-error-test.js +85 -0
- package/node_modules/abstract-level/test/encoding-json-test.js +75 -0
- package/node_modules/abstract-level/test/encoding-test.js +130 -0
- package/node_modules/abstract-level/test/events/write.js +132 -0
- package/node_modules/abstract-level/test/factory-test.js +36 -0
- package/node_modules/abstract-level/test/get-many-test.js +157 -0
- package/node_modules/abstract-level/test/get-sync-test.js +61 -0
- package/node_modules/abstract-level/test/get-test.js +83 -0
- package/node_modules/abstract-level/test/has-many-test.js +144 -0
- package/node_modules/abstract-level/test/has-test.js +81 -0
- package/node_modules/abstract-level/test/hooks/newsub.js +57 -0
- package/node_modules/abstract-level/test/hooks/postopen.js +229 -0
- package/node_modules/abstract-level/test/hooks/prewrite.js +816 -0
- package/node_modules/abstract-level/test/hooks/shared.js +38 -0
- package/node_modules/abstract-level/test/index.js +86 -0
- package/node_modules/abstract-level/test/iterator-explicit-snapshot-test.js +393 -0
- package/node_modules/abstract-level/test/iterator-no-snapshot-test.js +49 -0
- package/node_modules/abstract-level/test/iterator-range-test.js +277 -0
- package/node_modules/abstract-level/test/iterator-seek-test.js +335 -0
- package/node_modules/abstract-level/test/iterator-snapshot-test.js +56 -0
- package/node_modules/abstract-level/test/iterator-test.js +621 -0
- package/node_modules/abstract-level/test/manifest-test.js +21 -0
- package/node_modules/abstract-level/test/open-create-if-missing-test.js +39 -0
- package/node_modules/abstract-level/test/open-error-if-exists-test.js +25 -0
- package/node_modules/abstract-level/test/open-test.js +263 -0
- package/node_modules/abstract-level/test/put-get-del-test.js +97 -0
- package/node_modules/abstract-level/test/put-test.js +70 -0
- package/node_modules/abstract-level/test/self/abstract-iterator-test.js +182 -0
- package/node_modules/abstract-level/test/self/async-iterator-test.js +242 -0
- package/node_modules/abstract-level/test/self/attach-resource-test.js +74 -0
- package/node_modules/abstract-level/test/self/defer-test.js +140 -0
- package/node_modules/abstract-level/test/self/deferred-iterator-test.js +314 -0
- package/node_modules/abstract-level/test/self/deferred-operations-test.js +86 -0
- package/node_modules/abstract-level/test/self/deferred-queue-test.js +93 -0
- package/node_modules/abstract-level/test/self/encoding-test.js +391 -0
- package/node_modules/abstract-level/test/self/errors-test.js +11 -0
- package/node_modules/abstract-level/test/self/iterator-test.js +1050 -0
- package/node_modules/abstract-level/test/self/sublevel-test.js +1039 -0
- package/node_modules/abstract-level/test/self.js +905 -0
- package/node_modules/abstract-level/test/sublevel-test.js +209 -0
- package/node_modules/abstract-level/test/traits/closed.js +42 -0
- package/node_modules/abstract-level/test/traits/index.js +4 -0
- package/node_modules/abstract-level/test/traits/open.js +62 -0
- package/node_modules/abstract-level/test/util.js +275 -0
- package/node_modules/abstract-level/types/abstract-chained-batch.d.ts +124 -0
- package/node_modules/abstract-level/types/abstract-iterator.d.ts +241 -0
- package/node_modules/abstract-level/types/abstract-level.d.ts +636 -0
- package/node_modules/abstract-level/types/abstract-snapshot.d.ts +30 -0
- package/node_modules/abstract-level/types/abstract-sublevel.d.ts +76 -0
- package/node_modules/abstract-level/types/interfaces.d.ts +43 -0
- package/node_modules/base64-js/LICENSE +21 -0
- package/node_modules/base64-js/README.md +34 -0
- package/node_modules/base64-js/base64js.min.js +1 -0
- package/node_modules/base64-js/index.d.ts +3 -0
- package/node_modules/base64-js/index.js +150 -0
- package/node_modules/base64-js/package.json +47 -0
- package/node_modules/browser-level/CHANGELOG.md +44 -0
- package/node_modules/browser-level/LICENSE +21 -0
- package/node_modules/browser-level/README.md +124 -0
- package/node_modules/browser-level/UPGRADING.md +143 -0
- package/node_modules/browser-level/index.d.ts +108 -0
- package/node_modules/browser-level/index.js +323 -0
- package/node_modules/browser-level/iterator.js +239 -0
- package/node_modules/browser-level/package.json +48 -0
- package/node_modules/browser-level/util/clear.js +38 -0
- package/node_modules/browser-level/util/deserialize.js +17 -0
- package/node_modules/browser-level/util/key-range.js +20 -0
- package/node_modules/buffer/AUTHORS.md +73 -0
- package/node_modules/buffer/LICENSE +21 -0
- package/node_modules/buffer/README.md +410 -0
- package/node_modules/buffer/index.d.ts +194 -0
- package/node_modules/buffer/index.js +2106 -0
- package/node_modules/buffer/package.json +93 -0
- package/node_modules/classic-level/CHANGELOG.md +115 -0
- package/node_modules/classic-level/LICENSE +21 -0
- package/node_modules/classic-level/README.md +274 -0
- package/node_modules/classic-level/UPGRADING.md +131 -0
- package/node_modules/classic-level/binding.cc +2652 -0
- package/node_modules/classic-level/binding.gyp +71 -0
- package/node_modules/classic-level/binding.js +1 -0
- package/node_modules/classic-level/chained-batch.js +35 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/LICENSE +27 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/Makefile +424 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/build_detect_platform +256 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/autocompact_test.cc +118 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/builder.cc +88 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/builder.h +34 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/c.cc +595 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/c_test.c +390 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/corruption_test.cc +374 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_bench.cc +1020 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_impl.cc +1568 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_impl.h +212 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_iter.cc +317 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_iter.h +28 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_test.cc +2158 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat.cc +140 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat.h +230 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat_test.cc +112 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dumpfile.cc +225 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/fault_injection_test.cc +554 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename.cc +144 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename.h +85 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename_test.cc +123 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/leveldbutil.cc +64 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_format.h +35 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_reader.cc +284 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_reader.h +113 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_test.cc +591 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_writer.cc +112 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_writer.h +54 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/memtable.cc +145 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/memtable.h +89 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/recovery_test.cc +324 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/repair.cc +461 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/skiplist.h +384 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/skiplist_test.cc +378 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/snapshot.h +67 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/table_cache.cc +127 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/table_cache.h +61 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit.cc +266 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit.h +107 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit_test.cc +46 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set.cc +1535 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set.h +399 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set_test.cc +179 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch.cc +147 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch_internal.h +50 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch_test.cc +120 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.cc +398 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.h +20 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv_test.cc +241 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/c.h +290 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/cache.h +110 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/comparator.h +63 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/db.h +164 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/dumpfile.h +25 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/env.h +351 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/filter_policy.h +70 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/iterator.h +100 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/options.h +213 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/slice.h +109 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/status.h +112 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/table.h +85 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/table_builder.h +92 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/value_sink.h +26 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/write_batch.h +64 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/issues/issue178_test.cc +92 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/issues/issue200_test.cc +59 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/atomic_pointer.h +242 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port.h +21 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_example.h +141 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix.cc +53 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix.h +156 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix_sse.cc +129 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/thread_annotations.h +60 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/win/stdint.h +24 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block.cc +268 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block.h +44 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block_builder.cc +109 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block_builder.h +57 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block.cc +111 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block.h +68 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block_test.cc +128 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/format.cc +144 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/format.h +108 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/iterator.cc +67 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/iterator_wrapper.h +66 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/merger.cc +197 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/merger.h +26 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table.cc +285 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table_builder.cc +270 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table_test.cc +876 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/two_level_iterator.cc +182 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/two_level_iterator.h +34 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena.cc +68 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena.h +68 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena_test.cc +68 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/bloom.cc +95 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/bloom_test.cc +162 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/cache.cc +405 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/cache_test.cc +226 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding.cc +194 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding.h +104 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding_test.cc +196 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/comparator.cc +81 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c.cc +350 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c.h +45 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c_test.cc +72 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env.cc +100 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix.cc +695 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix_test.cc +66 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix_test_helper.h +28 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_test.cc +106 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/filter_policy.cc +11 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash.cc +52 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash.h +19 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash_test.cc +54 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/histogram.cc +139 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/histogram.h +42 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/logging.cc +72 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/logging.h +43 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/mutexlock.h +41 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/options.cc +30 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/posix_logger.h +98 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/random.h +64 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/status.cc +75 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testharness.cc +77 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testharness.h +138 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testutil.cc +51 -0
- package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testutil.h +63 -0
- package/node_modules/classic-level/deps/leveldb/leveldb.gyp +282 -0
- package/node_modules/classic-level/deps/leveldb/patches/001-value-sink.patch +164 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/atomic_pointer_win.h +48 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/env_win.cc +692 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.cc +36 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.h +157 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.h.bak +153 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/stdint-msvc2008.h +247 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/uv_condvar.h +45 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/uv_condvar_posix.cc +139 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/win_logger.cc +79 -0
- package/node_modules/classic-level/deps/leveldb/port-libuv/win_logger.h +28 -0
- package/node_modules/classic-level/deps/snappy/freebsd/config.h +135 -0
- package/node_modules/classic-level/deps/snappy/freebsd/snappy-stubs-public.h +100 -0
- package/node_modules/classic-level/deps/snappy/linux/config.h +135 -0
- package/node_modules/classic-level/deps/snappy/linux/snappy-stubs-public.h +100 -0
- package/node_modules/classic-level/deps/snappy/mac/config.h +137 -0
- package/node_modules/classic-level/deps/snappy/mac/snappy-stubs-public.h +100 -0
- package/node_modules/classic-level/deps/snappy/openbsd/config.h +135 -0
- package/node_modules/classic-level/deps/snappy/openbsd/snappy-stubs-public.h +100 -0
- package/node_modules/classic-level/deps/snappy/snappy/COPYING +54 -0
- package/node_modules/classic-level/deps/snappy/snappy/cmake/SnappyConfig.cmake +1 -0
- package/node_modules/classic-level/deps/snappy/snappy/cmake/config.h.in +62 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-c.cc +90 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-c.h +138 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-internal.h +224 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-sinksource.cc +104 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-sinksource.h +182 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-internal.cc +42 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-internal.h +561 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-public.h.in +94 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-test.cc +612 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy-test.h +573 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy.cc +1515 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy.h +203 -0
- package/node_modules/classic-level/deps/snappy/snappy/snappy_unittest.cc +1410 -0
- package/node_modules/classic-level/deps/snappy/snappy.gyp +119 -0
- package/node_modules/classic-level/deps/snappy/solaris/config.h +135 -0
- package/node_modules/classic-level/deps/snappy/solaris/snappy-stubs-public.h +100 -0
- package/node_modules/classic-level/deps/snappy/win32/config.h +29 -0
- package/node_modules/classic-level/deps/snappy/win32/snappy-stubs-public.h +100 -0
- package/node_modules/classic-level/index.d.ts +343 -0
- package/node_modules/classic-level/index.js +311 -0
- package/node_modules/classic-level/iterator.js +122 -0
- package/node_modules/classic-level/package.json +70 -0
- package/node_modules/classic-level/prebuilds/android-arm/classic-level.armv7.node +0 -0
- package/node_modules/classic-level/prebuilds/android-arm64/classic-level.armv8.node +0 -0
- package/node_modules/classic-level/prebuilds/darwin-x64+arm64/classic-level.node +0 -0
- package/node_modules/classic-level/prebuilds/linux-arm/classic-level.armv6.node +0 -0
- package/node_modules/classic-level/prebuilds/linux-arm/classic-level.armv7.node +0 -0
- package/node_modules/classic-level/prebuilds/linux-arm64/classic-level.armv8.node +0 -0
- package/node_modules/classic-level/prebuilds/linux-x64/classic-level.musl.node +0 -0
- package/node_modules/classic-level/prebuilds/linux-x64/classic-level.node +0 -0
- package/node_modules/classic-level/prebuilds/win32-ia32/classic-level.node +0 -0
- package/node_modules/classic-level/prebuilds/win32-x64/classic-level.node +0 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/is-buffer/LICENSE +21 -0
- package/node_modules/is-buffer/README.md +54 -0
- package/node_modules/is-buffer/index.d.ts +2 -0
- package/node_modules/is-buffer/index.js +11 -0
- package/node_modules/is-buffer/package.json +65 -0
- package/node_modules/level/CHANGELOG.md +532 -0
- package/node_modules/level/LICENSE +21 -0
- package/node_modules/level/README.md +107 -0
- package/node_modules/level/UPGRADING.md +413 -0
- package/node_modules/level/browser.js +1 -0
- package/node_modules/level/index.d.ts +75 -0
- package/node_modules/level/index.js +1 -0
- package/node_modules/level/package.json +62 -0
- package/node_modules/level-supports/CHANGELOG.md +140 -0
- package/node_modules/level-supports/LICENSE +21 -0
- package/node_modules/level-supports/README.md +276 -0
- package/node_modules/level-supports/index.d.ts +137 -0
- package/node_modules/level-supports/index.js +26 -0
- package/node_modules/level-supports/package.json +46 -0
- package/node_modules/level-supports/test/cloneable.js +26 -0
- package/node_modules/level-supports/test/index.js +24 -0
- package/node_modules/level-supports/test/self.js +86 -0
- package/node_modules/level-supports/test/shape.js +23 -0
- package/node_modules/level-transcoder/CHANGELOG.md +15 -0
- package/node_modules/level-transcoder/LICENSE +21 -0
- package/node_modules/level-transcoder/README.md +214 -0
- package/node_modules/level-transcoder/UPGRADING.md +13 -0
- package/node_modules/level-transcoder/index.d.ts +27 -0
- package/node_modules/level-transcoder/index.js +158 -0
- package/node_modules/level-transcoder/lib/encoding.d.ts +158 -0
- package/node_modules/level-transcoder/lib/encoding.js +105 -0
- package/node_modules/level-transcoder/lib/encodings.d.ts +9 -0
- package/node_modules/level-transcoder/lib/encodings.js +135 -0
- package/node_modules/level-transcoder/lib/formats.d.ts +13 -0
- package/node_modules/level-transcoder/lib/formats.js +111 -0
- package/node_modules/level-transcoder/lib/text-endec.d.ts +6 -0
- package/node_modules/level-transcoder/lib/text-endec.js +19 -0
- package/node_modules/level-transcoder/package.json +46 -0
- package/node_modules/maybe-combine-errors/LICENSE.md +21 -0
- package/node_modules/maybe-combine-errors/README.md +94 -0
- package/node_modules/maybe-combine-errors/index.js +60 -0
- package/node_modules/maybe-combine-errors/package.json +33 -0
- package/node_modules/module-error/CHANGELOG.md +23 -0
- package/node_modules/module-error/LICENSE +21 -0
- package/node_modules/module-error/README.md +89 -0
- package/node_modules/module-error/index.d.ts +18 -0
- package/node_modules/module-error/index.js +22 -0
- package/node_modules/module-error/package.json +36 -0
- package/node_modules/napi-macros/LICENSE +21 -0
- package/node_modules/napi-macros/README.md +277 -0
- package/node_modules/napi-macros/index.js +1 -0
- package/node_modules/napi-macros/napi-macros.h +255 -0
- package/node_modules/napi-macros/package.json +22 -0
- package/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/node-gyp-build/package.json +43 -0
- package/oauthTokenStore-PADKLNOC.js +23 -0
- package/package.json +6 -3
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-XI3WUPTI.js → providerPresetApply-HIPK67DU.js} +9 -9
- package/{providerRegistry-KEPWWGXD.js → providerRegistry-AI4U2FNM.js} +13 -9
- package/{read-COE3ZYR6.js → read-RNUQ7F34.js} +11 -7
- package/{readDocTool-5USN4A6V.js → readDocTool-6WIZHE6O.js} +5 -3
- package/{readlineWorkspace-KIMUDPPV.js → readlineWorkspace-BCDVMOR5.js} +6947 -3879
- package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-EFQ4O2IQ.js} +27 -26
- package/{runAgentClientLoop-AN4WIRPQ.js → runAgentClientLoop-5RBD3DE6.js} +150 -90
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-5CIWJEZ3.js} +36 -8
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/setDialogExtraReferencesAction-MXAH2KPV.js +37 -0
- package/{setPrimaryDialogAgentAction-FN22THHT.js → setPrimaryDialogAgentAction-7OPVNK4M.js} +28 -27
- package/{chunk-GP5LKBUZ.js → settingThunks-GHVLHABJ.js} +240 -945
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-QC35EQY4.js} +3 -3
- package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
- package/{spaceCommands-NA4JMIGT.js → spaceCommands-WZCLRGBO.js} +56 -56
- package/{streamAgentChatTurn-3TYTHZPJ.js → streamAgentChatTurn-YJTEHUH7.js} +371 -1556
- package/{switchDialogAgentAction-LVTEV3FR.js → switchDialogAgentAction-4PANDG3L.js} +24 -20
- package/{tableCommands-O6NWHFKV.js → tableCommands-U3QDY4L6.js} +19 -17
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-54CXTU7C.js} +5 -4
- package/tools-ZT4GXXDQ.js +122 -0
- package/{tuiSummaryLlmCaller-UFGFOIIW.js → tuiSummaryLlmCaller-ISODIW2O.js} +14 -29
- package/{updateCommands-2M74UL7P.js → updateCommands-NQXAGFM7.js} +3 -3
- package/{updateDialogTitleAction-RDHNT265.js → updateDialogTitleAction-2PQTFUUV.js} +101 -57
- package/action-P4TNFGAD.js +0 -31
- package/agentListCommands-NXCOTTZL.js +0 -411
- package/agentRecordCommands-JP54ZWND.js +0 -129
- package/agentRunCommand-RMQWWSHF.js +0 -157
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-DKLWTT3G.js +0 -186
- package/chunk-ACTMNVHM.js +0 -93
- package/chunk-CQ3WA2NE.js +0 -299
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-MEYIRKDN.js +0 -8967
- package/chunk-N4G4PKQ6.js +0 -23
- package/chunk-P3GYTNDF.js +0 -34
- package/chunk-PUOC4YRO.js +0 -394
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/chunk-YWIEQS6H.js +0 -21409
- package/contentThunks-JHK6X2KU.js +0 -73
- package/createDialogAction-VUUUZL54.js +0 -65
- package/dialogCommands-EN7TYD3I.js +0 -100
- package/handleSendMessageAction-ID5IKXUE.js +0 -633
- package/machineWsRunDispatch-RX64L3ET.js +0 -145
- package/setDialogExtraReferencesAction-WX5VTY6O.js +0 -30
- package/settingSlice-P4ZW7K5X.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-34SEJSLQ.js +0 -110
- package/{chunk-SV5IJK6K.js → chunk-NBTY7YJF.js} +3 -3
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
- package/{offlineMarxistsAgentCommand-HGXZV4XJ.js → offlineMarxistsAgentCommand-2QTHJCHV.js} +4 -4
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clipMultilineText,
|
|
3
|
+
fetchAndSerializeTable,
|
|
4
|
+
waitForAbortableDelay
|
|
5
|
+
} from "./chunk-JONVI6DK.js";
|
|
6
|
+
import {
|
|
7
|
+
isGatewayHttpStatus
|
|
8
|
+
} from "./chunk-NF64D32W.js";
|
|
9
|
+
import {
|
|
10
|
+
createDrainExhaustedResponse,
|
|
11
|
+
isCoreDrainingBody,
|
|
12
|
+
normalizeNonNegativeMs,
|
|
13
|
+
parseRetryAfterHeaderMs
|
|
14
|
+
} from "./chunk-XPWGOTBQ.js";
|
|
15
|
+
import {
|
|
16
|
+
resolvePageReadMarkdown,
|
|
17
|
+
slateToSimplifiedMarkdown
|
|
18
|
+
} from "./chunk-6VRWNU5J.js";
|
|
19
|
+
import {
|
|
20
|
+
extractCategorizedMentions
|
|
21
|
+
} from "./chunk-AGIM7IMJ.js";
|
|
22
|
+
import {
|
|
23
|
+
fetchAndCacheMessages
|
|
24
|
+
} from "./chunk-2DRYS3G3.js";
|
|
25
|
+
import {
|
|
26
|
+
createSpaceKey
|
|
27
|
+
} from "./chunk-UAD2WT54.js";
|
|
28
|
+
import {
|
|
29
|
+
read
|
|
30
|
+
} from "./chunk-RNNWTMKT.js";
|
|
31
|
+
import {
|
|
32
|
+
getRuntimeServerContext
|
|
33
|
+
} from "./chunk-4YRTZIVN.js";
|
|
34
|
+
import {
|
|
35
|
+
extractRuntimePageCapabilities,
|
|
36
|
+
resolveBuiltinSkillPage,
|
|
37
|
+
resolveSkillGraphFromRoots
|
|
38
|
+
} from "./chunk-RRQQAG7W.js";
|
|
39
|
+
import {
|
|
40
|
+
isAbortError
|
|
41
|
+
} from "./chunk-7DPNBQSV.js";
|
|
42
|
+
import {
|
|
43
|
+
extractCustomId
|
|
44
|
+
} from "./chunk-M2EJHDJP.js";
|
|
45
|
+
import {
|
|
46
|
+
estimateTokenCount
|
|
47
|
+
} from "./chunk-PSCNXBYA.js";
|
|
48
|
+
import {
|
|
49
|
+
asTrimmedString
|
|
50
|
+
} from "./chunk-3EUW3WEO.js";
|
|
51
|
+
import {
|
|
52
|
+
wrapHistoricalSummaryWithReplayGuard
|
|
53
|
+
} from "./chunk-4VJAC32I.js";
|
|
54
|
+
|
|
55
|
+
// packages/ai/chat/parseApiError.ts
|
|
56
|
+
var CONTEXT_OVERFLOW_ACTIONS = [
|
|
57
|
+
"compact-and-retry",
|
|
58
|
+
"new-dialog",
|
|
59
|
+
"switch-model",
|
|
60
|
+
"retry"
|
|
61
|
+
];
|
|
62
|
+
var CONTEXT_TOO_LARGE_ACTIONS = [
|
|
63
|
+
"new-dialog",
|
|
64
|
+
"switch-model",
|
|
65
|
+
"retry"
|
|
66
|
+
];
|
|
67
|
+
var truncateErrorMessage = (message, maxChars = 320) => message.length <= maxChars ? message : `${message.slice(0, maxChars)}\u2026`;
|
|
68
|
+
var isContextOverflowText = (message) => /maximum context|context (length|window|overflow|limit)|context_length_exceed\w*|requested about .*tokens|too many tokens|prompt is too long|exceeds? (the )?(model|max)/i.test(
|
|
69
|
+
message
|
|
70
|
+
);
|
|
71
|
+
function classifyApiError(input) {
|
|
72
|
+
const { status, message, body, code } = input;
|
|
73
|
+
const errorMessage = message;
|
|
74
|
+
let defaultMessage = `\u72B6\u6001\u7801 ${status} ${input.statusText ?? ""}`;
|
|
75
|
+
switch (status) {
|
|
76
|
+
case 400:
|
|
77
|
+
if (isContextOverflowText(errorMessage) || isContextOverflowText(body) || code === "UPSTREAM_400") {
|
|
78
|
+
return {
|
|
79
|
+
kind: "context_overflow",
|
|
80
|
+
message: "\u4E0A\u4E0B\u6587\u8FC7\u957F\uFF1A\u672C\u8F6E\u6D88\u606F\u6216\u5DE5\u5177\u7ED3\u679C\u592A\u5927\u3002\u8BF7\u7F29\u5C0F\u8303\u56F4\uFF0C\u6216\u5148\u8BFB\u53D6\u66F4\u5C0F\u7247\u6BB5\u540E\u518D\u7EE7\u7EED\u3002",
|
|
81
|
+
code,
|
|
82
|
+
status,
|
|
83
|
+
retryable: true,
|
|
84
|
+
actions: [...CONTEXT_OVERFLOW_ACTIONS]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (code === "MISSING_PROVIDER_API_KEY") {
|
|
88
|
+
return {
|
|
89
|
+
kind: "generic",
|
|
90
|
+
message: truncateErrorMessage(errorMessage),
|
|
91
|
+
code,
|
|
92
|
+
status,
|
|
93
|
+
retryable: false
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (errorMessage && errorMessage !== defaultMessage) {
|
|
97
|
+
return {
|
|
98
|
+
kind: "generic",
|
|
99
|
+
message: `\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}`,
|
|
100
|
+
code,
|
|
101
|
+
status,
|
|
102
|
+
retryable: false
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return { kind: "generic", message: "\u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u8F93\u5165", code, status, retryable: false };
|
|
106
|
+
case 413:
|
|
107
|
+
return {
|
|
108
|
+
kind: "context_too_large",
|
|
109
|
+
message: "\u8BF7\u6C42\u5185\u5BB9\u8FC7\u5927\uFF1A\u8BF7\u51CF\u5C11\u4E00\u6B21\u53D1\u9001\u7684\u6D88\u606F\u3001\u6587\u4EF6\u6216\u5DE5\u5177\u7ED3\u679C\u3002",
|
|
110
|
+
code,
|
|
111
|
+
status,
|
|
112
|
+
retryable: true,
|
|
113
|
+
actions: [...CONTEXT_TOO_LARGE_ACTIONS]
|
|
114
|
+
};
|
|
115
|
+
case 401:
|
|
116
|
+
return {
|
|
117
|
+
kind: "auth",
|
|
118
|
+
message: code === "AUTH_TOKEN_EXPIRED" ? "\u767B\u5F55\u72B6\u6001\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55" : code === "AUTH_ACCOUNT_INVALID" ? "\u8D26\u6237\u65E0\u6548\u6216\u5DF2\u88AB\u505C\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458" : code === "AUTH_NO_TOKEN" ? "\u672A\u68C0\u6D4B\u5230\u767B\u5F55\u72B6\u6001\uFF0C\u8BF7\u5148\u767B\u5F55" : code === "AUTH_INVALID_TOKEN" ? "\u767B\u5F55\u51ED\u8BC1\u65E0\u6548\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55" : code === "AUTH_TOKEN_NOT_ACTIVE" ? "\u4EE4\u724C\u5C1A\u672A\u751F\u6548\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5" : errorMessage && errorMessage !== `\u72B6\u6001\u7801 401 Unauthorized` ? `\u8BA4\u8BC1\u9519\u8BEF: ${truncateErrorMessage(errorMessage)}` : "\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u5148\u767B\u51FA\u540E\u91CD\u65B0\u767B\u5F55",
|
|
119
|
+
code,
|
|
120
|
+
status,
|
|
121
|
+
retryable: true,
|
|
122
|
+
actions: ["retry"]
|
|
123
|
+
};
|
|
124
|
+
case 503:
|
|
125
|
+
return {
|
|
126
|
+
kind: "server",
|
|
127
|
+
message: errorMessage && errorMessage !== `\u72B6\u6001\u7801 503 Service Unavailable` ? truncateErrorMessage(errorMessage) : "\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",
|
|
128
|
+
code,
|
|
129
|
+
status,
|
|
130
|
+
retryable: true,
|
|
131
|
+
actions: ["retry"]
|
|
132
|
+
};
|
|
133
|
+
case 504:
|
|
134
|
+
return {
|
|
135
|
+
kind: "timeout",
|
|
136
|
+
message: "\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5",
|
|
137
|
+
code,
|
|
138
|
+
status,
|
|
139
|
+
retryable: true,
|
|
140
|
+
actions: ["retry"]
|
|
141
|
+
};
|
|
142
|
+
default:
|
|
143
|
+
return {
|
|
144
|
+
kind: "generic",
|
|
145
|
+
message: `API\u8BF7\u6C42\u5931\u8D25: ${truncateErrorMessage(errorMessage)}`,
|
|
146
|
+
code,
|
|
147
|
+
status,
|
|
148
|
+
retryable: true,
|
|
149
|
+
actions: ["retry"]
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async function parseApiErrorInfo(response) {
|
|
154
|
+
const errorBody = await response.text();
|
|
155
|
+
let errorMessage = `\u72B6\u6001\u7801 ${response.status} ${response.statusText}`;
|
|
156
|
+
let errorCode = `E${response.status}`;
|
|
157
|
+
try {
|
|
158
|
+
const errorJson = JSON.parse(errorBody);
|
|
159
|
+
errorMessage = errorJson?.error?.message || errorJson?.message || errorJson?.msg || errorBody || errorMessage;
|
|
160
|
+
errorCode = errorJson?.error?.code || errorJson?.code || errorCode;
|
|
161
|
+
} catch (_e) {
|
|
162
|
+
if (errorBody) {
|
|
163
|
+
errorMessage = errorBody;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return classifyApiError({
|
|
167
|
+
status: response.status,
|
|
168
|
+
statusText: response.statusText,
|
|
169
|
+
message: errorMessage,
|
|
170
|
+
body: errorBody,
|
|
171
|
+
code: errorCode
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
async function parseApiError(response) {
|
|
175
|
+
return (await parseApiErrorInfo(response)).message;
|
|
176
|
+
}
|
|
177
|
+
function classifyGenerationError(data, status) {
|
|
178
|
+
const error = data?.error ?? data;
|
|
179
|
+
const upstreamStatus = error?.status ?? data?.status;
|
|
180
|
+
if (status === void 0 && typeof upstreamStatus === "number") status = upstreamStatus;
|
|
181
|
+
const rawCode = error?.code ?? data?.code;
|
|
182
|
+
const code = typeof rawCode === "string" && /^[a-zA-Z0-9_.:-]{1,80}$/.test(rawCode) && !/^(sk-|Bearer|AIza)/i.test(rawCode) ? rawCode : void 0;
|
|
183
|
+
const message = typeof error?.message === "string" ? error.message : typeof error?.msg === "string" ? error.msg : typeof data === "string" ? data : "";
|
|
184
|
+
const evidence = `${code ?? ""} ${message}`;
|
|
185
|
+
let category = "config_protocol";
|
|
186
|
+
if (/content[_ -]filter|content[_ -]policy|safety[_ -](?:violation|blocked)|policy[_ -]violation|prohibited[_ -]content/i.test(evidence)) {
|
|
187
|
+
category = "policy";
|
|
188
|
+
} else if (/thought_signature|reasoning_effort|not supported|invalid[_ -](?:request|argument)|authentication|api[_ -]key/i.test(evidence) || status === 401 || status === 403) {
|
|
189
|
+
category = "config_protocol";
|
|
190
|
+
} else if (code === "EMPTY_RESPONSE" || /空响应|empty response/i.test(message)) {
|
|
191
|
+
category = "empty";
|
|
192
|
+
} else if (status === 408 || status === 429 || status !== void 0 && status >= 500 || /timeout|timed out|秒内没有返回新内容|network|fetch failed|failed to fetch|ECONNRESET|ECONNREFUSED|EPIPE|socket hang up|connection (?:reset|closed)|rate[_ -]limit|overloaded|temporarily unavailable|internal_server_error|service_unavailable/i.test(evidence)) {
|
|
193
|
+
category = "transient";
|
|
194
|
+
}
|
|
195
|
+
const messages = {
|
|
196
|
+
config_protocol: "\u6A21\u578B\u914D\u7F6E\u6216\u5DE5\u5177\u901A\u4FE1\u4E0D\u517C\u5BB9\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u914D\u7F6E\uFF1B\u91CD\u590D\u53D1\u9001\u4E0D\u4F1A\u89E3\u51B3\u6B64\u95EE\u9898\u3002",
|
|
197
|
+
empty: "\u6A21\u578B\u8FD4\u56DE\u4E86\u7A7A\u54CD\u5E94\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u68C0\u67E5\u670D\u52A1\u54CD\u5E94\u3002",
|
|
198
|
+
policy: "\u670D\u52A1\u5546\u7684\u5185\u5BB9\u5B89\u5168\u89C4\u5219\u963B\u6B62\u4E86\u672C\u6B21\u8BF7\u6C42\u3002\u8BF7\u68C0\u67E5\u8BF7\u6C42\u662F\u5426\u7B26\u5408\u5176\u89C4\u5219\uFF1B\u4E0D\u4F1A\u81EA\u52A8\u91CD\u8BD5\u6216\u6539\u5199\u5185\u5BB9\u3002",
|
|
199
|
+
transient: "\u6A21\u578B\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\u3002\u4F60\u53EF\u4EE5\u7A0D\u540E\u624B\u52A8\u91CD\u8BD5\u540C\u4E00\u6A21\u578B\uFF08\u65B0\u8BF7\u6C42\u53EF\u80FD\u4EA7\u751F\u8D39\u7528\uFF09\u3002"
|
|
200
|
+
};
|
|
201
|
+
return {
|
|
202
|
+
category,
|
|
203
|
+
message: messages[category],
|
|
204
|
+
retryable: category === "transient",
|
|
205
|
+
actions: category === "transient" ? ["retry"] : [],
|
|
206
|
+
diagnostic: { ...code ? { code } : {}, ...status ? { status } : {} }
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// packages/ai/chat/serverProxyRetry.ts
|
|
211
|
+
var DEFAULT_SERVER_PROXY_RETRY_AFTER_MS = 1500;
|
|
212
|
+
var MAX_SERVER_PROXY_RETRIES = 2;
|
|
213
|
+
var MAX_STATUS_RETRIES = 3;
|
|
214
|
+
var MAX_SERVER_DRAIN_STATUS_RETRIES = 30;
|
|
215
|
+
var readRetryableResponseBody = async (response) => {
|
|
216
|
+
try {
|
|
217
|
+
return await response.clone().json();
|
|
218
|
+
} catch {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
var resolveServerProxyRetryAfterMs = (response, body) => parseRetryAfterHeaderMs(response.headers.get("Retry-After")) ?? normalizeNonNegativeMs(
|
|
223
|
+
body?.retryAfterMs,
|
|
224
|
+
DEFAULT_SERVER_PROXY_RETRY_AFTER_MS
|
|
225
|
+
);
|
|
226
|
+
var isRetryableServerProxyFetchError = (error) => {
|
|
227
|
+
if (!error || isAbortError(error)) return false;
|
|
228
|
+
const message = typeof error?.message === "string" ? error.message : String(error);
|
|
229
|
+
return /ECONNREFUSED|ECONNRESET|EPIPE|socket hang up|network error|failed to fetch|fetch failed|connection closed|load failed|502|503|504/i.test(
|
|
230
|
+
message
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
var waitForServerProxyRetry = async (retryAfterMs, signal) => {
|
|
234
|
+
const delayMs = normalizeNonNegativeMs(
|
|
235
|
+
retryAfterMs,
|
|
236
|
+
DEFAULT_SERVER_PROXY_RETRY_AFTER_MS
|
|
237
|
+
);
|
|
238
|
+
if (delayMs <= 0) return;
|
|
239
|
+
await waitForAbortableDelay(delayMs, signal);
|
|
240
|
+
};
|
|
241
|
+
var performServerProxyFetchWithRetry = async ({
|
|
242
|
+
execute,
|
|
243
|
+
signal,
|
|
244
|
+
logPrefix = "[fetchWithServerProxy]",
|
|
245
|
+
onRetry,
|
|
246
|
+
retryNetworkErrors = true
|
|
247
|
+
}) => {
|
|
248
|
+
let networkRetries = 0;
|
|
249
|
+
let statusRetries = 0;
|
|
250
|
+
while (true) {
|
|
251
|
+
try {
|
|
252
|
+
const response = await execute();
|
|
253
|
+
const responseBody = isGatewayHttpStatus(response.status) ? await readRetryableResponseBody(response) : null;
|
|
254
|
+
const isCoreDraining = response.status === 503 && isCoreDrainingBody(responseBody);
|
|
255
|
+
const maxStatusRetries = isCoreDraining ? MAX_SERVER_DRAIN_STATUS_RETRIES : MAX_STATUS_RETRIES;
|
|
256
|
+
const classified = classifyGenerationError(responseBody, response.status);
|
|
257
|
+
if (classified.category === "transient" && statusRetries < maxStatusRetries && isGatewayHttpStatus(response.status)) {
|
|
258
|
+
statusRetries += 1;
|
|
259
|
+
const retryAfterMs = resolveServerProxyRetryAfterMs(
|
|
260
|
+
response,
|
|
261
|
+
responseBody
|
|
262
|
+
);
|
|
263
|
+
console.warn(
|
|
264
|
+
`${logPrefix} \u68C0\u6D4B\u5230${response.status}\u72B6\u6001\uFF0C${retryAfterMs}ms\u540E\u91CD\u8BD5...`
|
|
265
|
+
);
|
|
266
|
+
onRetry?.({
|
|
267
|
+
attempt: statusRetries,
|
|
268
|
+
maxAttempts: maxStatusRetries,
|
|
269
|
+
delayMs: retryAfterMs
|
|
270
|
+
});
|
|
271
|
+
await waitForServerProxyRetry(retryAfterMs, signal);
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
if (isCoreDraining) {
|
|
275
|
+
console.warn(`${logPrefix} core_draining \u91CD\u8BD5\u8017\u5C3D\uFF0C\u8FD4\u56DE\u53CB\u597D\u63D0\u793A`);
|
|
276
|
+
return createDrainExhaustedResponse(response);
|
|
277
|
+
}
|
|
278
|
+
return response;
|
|
279
|
+
} catch (error) {
|
|
280
|
+
if (retryNetworkErrors && networkRetries < MAX_SERVER_PROXY_RETRIES && isRetryableServerProxyFetchError(error)) {
|
|
281
|
+
networkRetries += 1;
|
|
282
|
+
const retryDelay = networkRetries * 1e3;
|
|
283
|
+
console.warn(
|
|
284
|
+
`${logPrefix} \u68C0\u6D4B\u5230\u7F51\u7EDC\u77AC\u65AD\uFF0C${retryDelay}ms\u540E\u91CD\u8BD5(\u7B2C${networkRetries}\u6B21)...`,
|
|
285
|
+
error
|
|
286
|
+
);
|
|
287
|
+
onRetry?.({
|
|
288
|
+
attempt: networkRetries,
|
|
289
|
+
maxAttempts: MAX_SERVER_PROXY_RETRIES,
|
|
290
|
+
delayMs: retryDelay
|
|
291
|
+
});
|
|
292
|
+
await waitForServerProxyRetry(retryDelay, signal);
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
throw error;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
// packages/ai/agent/referenceUtils.ts
|
|
301
|
+
function mergeReferences(base, extra) {
|
|
302
|
+
const safeBase = Array.isArray(base) ? base : [];
|
|
303
|
+
const safeExtra = Array.isArray(extra) ? extra : [];
|
|
304
|
+
const seen = /* @__PURE__ */ new Set();
|
|
305
|
+
const merged = [];
|
|
306
|
+
for (const item of [...safeBase, ...safeExtra]) {
|
|
307
|
+
const key = item.dbKey;
|
|
308
|
+
if (key && seen.has(key)) continue;
|
|
309
|
+
if (key) seen.add(key);
|
|
310
|
+
merged.push(item);
|
|
311
|
+
}
|
|
312
|
+
return merged;
|
|
313
|
+
}
|
|
314
|
+
var loadContentsByKeys = async (keys, dispatch, preloaded) => {
|
|
315
|
+
const contentByKey = /* @__PURE__ */ new Map();
|
|
316
|
+
const uniqueKeys = Array.from(new Set(keys.filter(Boolean)));
|
|
317
|
+
await Promise.all(
|
|
318
|
+
uniqueKeys.map(async (dbKey) => {
|
|
319
|
+
if (preloaded?.has(dbKey)) {
|
|
320
|
+
const content = preloaded.get(dbKey);
|
|
321
|
+
if (content) contentByKey.set(dbKey, content);
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const builtin = resolveBuiltinSkillPage(dbKey);
|
|
325
|
+
if (builtin) {
|
|
326
|
+
contentByKey.set(dbKey, builtin);
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
try {
|
|
330
|
+
const content = await dispatch(read({ dbKey })).unwrap();
|
|
331
|
+
if (content) contentByKey.set(dbKey, content);
|
|
332
|
+
} catch {
|
|
333
|
+
}
|
|
334
|
+
})
|
|
335
|
+
);
|
|
336
|
+
return contentByKey;
|
|
337
|
+
};
|
|
338
|
+
var resolveReferenceAssets = async (references, dispatch) => {
|
|
339
|
+
if (!Array.isArray(references) || references.length === 0) {
|
|
340
|
+
return {
|
|
341
|
+
references: [],
|
|
342
|
+
referencedTools: [],
|
|
343
|
+
recommendedSkillTools: [],
|
|
344
|
+
recommendedSkillHints: [],
|
|
345
|
+
skillPromptPatches: [],
|
|
346
|
+
contentByKey: /* @__PURE__ */ new Map()
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
const entries = await Promise.all(
|
|
350
|
+
references.filter((ref) => ref?.dbKey).map(async (ref) => {
|
|
351
|
+
const builtin = resolveBuiltinSkillPage(ref.dbKey);
|
|
352
|
+
if (builtin) return { ref, content: builtin };
|
|
353
|
+
try {
|
|
354
|
+
const content = await dispatch(read({ dbKey: ref.dbKey })).unwrap();
|
|
355
|
+
return { ref, content };
|
|
356
|
+
} catch {
|
|
357
|
+
return { ref, content: null };
|
|
358
|
+
}
|
|
359
|
+
})
|
|
360
|
+
);
|
|
361
|
+
const contentByKey = /* @__PURE__ */ new Map();
|
|
362
|
+
const toolSet = /* @__PURE__ */ new Set();
|
|
363
|
+
const recommendedToolSet = /* @__PURE__ */ new Set();
|
|
364
|
+
const recommendedSkillHints = /* @__PURE__ */ new Set();
|
|
365
|
+
const skillPromptPatches = /* @__PURE__ */ new Set();
|
|
366
|
+
const normalizedReferences = [];
|
|
367
|
+
const hardSkillKeys = /* @__PURE__ */ new Set();
|
|
368
|
+
const softSkillKeys = /* @__PURE__ */ new Set();
|
|
369
|
+
for (const { ref, content } of entries) {
|
|
370
|
+
if (content) {
|
|
371
|
+
contentByKey.set(ref.dbKey, content);
|
|
372
|
+
}
|
|
373
|
+
const capabilities = extractRuntimePageCapabilities(content);
|
|
374
|
+
for (const tool of capabilities.directTools) {
|
|
375
|
+
toolSet.add(tool);
|
|
376
|
+
}
|
|
377
|
+
for (const tool of capabilities.hardSkillTools) {
|
|
378
|
+
toolSet.add(tool);
|
|
379
|
+
}
|
|
380
|
+
for (const hint of capabilities.softSkillHints) {
|
|
381
|
+
recommendedSkillHints.add(hint);
|
|
382
|
+
}
|
|
383
|
+
for (const patch of capabilities.promptPatches) {
|
|
384
|
+
skillPromptPatches.add(patch);
|
|
385
|
+
}
|
|
386
|
+
for (const skillKey of capabilities.hardSkillKeys) {
|
|
387
|
+
hardSkillKeys.add(skillKey);
|
|
388
|
+
}
|
|
389
|
+
for (const skillKey of capabilities.softSkillKeys) {
|
|
390
|
+
softSkillKeys.add(skillKey);
|
|
391
|
+
}
|
|
392
|
+
normalizedReferences.push({
|
|
393
|
+
...ref,
|
|
394
|
+
type: capabilities.shouldUpgradeReference ? "instruction" : ref.type
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
const resolvedSkillLinks = await resolveSkillGraphFromRoots({
|
|
398
|
+
roots: [
|
|
399
|
+
...Array.from(hardSkillKeys).map((identifier) => ({ identifier, mode: "required" })),
|
|
400
|
+
...Array.from(softSkillKeys).map((identifier) => ({ identifier, mode: "recommended" }))
|
|
401
|
+
],
|
|
402
|
+
loadPage: async (identifier) => {
|
|
403
|
+
const loaded = await loadContentsByKeys([identifier], dispatch, contentByKey);
|
|
404
|
+
return loaded.get(identifier) ?? null;
|
|
405
|
+
},
|
|
406
|
+
contentByKey
|
|
407
|
+
});
|
|
408
|
+
resolvedSkillLinks.contentByKey.forEach((value, key) => contentByKey.set(key, value));
|
|
409
|
+
for (const tool of resolvedSkillLinks.requiredTools) {
|
|
410
|
+
toolSet.add(tool);
|
|
411
|
+
}
|
|
412
|
+
for (const tool of resolvedSkillLinks.recommendedTools) {
|
|
413
|
+
recommendedToolSet.add(tool);
|
|
414
|
+
}
|
|
415
|
+
for (const hint of resolvedSkillLinks.recommendedSkillHints) {
|
|
416
|
+
recommendedSkillHints.add(hint);
|
|
417
|
+
}
|
|
418
|
+
for (const patch of resolvedSkillLinks.skillPromptPatches) {
|
|
419
|
+
skillPromptPatches.add(patch);
|
|
420
|
+
}
|
|
421
|
+
return {
|
|
422
|
+
references: normalizedReferences,
|
|
423
|
+
referencedTools: Array.from(toolSet),
|
|
424
|
+
recommendedSkillTools: Array.from(recommendedToolSet),
|
|
425
|
+
recommendedSkillHints: Array.from(recommendedSkillHints),
|
|
426
|
+
skillPromptPatches: Array.from(skillPromptPatches),
|
|
427
|
+
contentByKey
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
var resolveToolsFromKeys = async (keys, dispatch, preloaded) => {
|
|
431
|
+
if (!Array.isArray(keys) || keys.length === 0) {
|
|
432
|
+
return {
|
|
433
|
+
tools: [],
|
|
434
|
+
recommendedSkillTools: [],
|
|
435
|
+
recommendedSkillHints: [],
|
|
436
|
+
skillPromptPatches: [],
|
|
437
|
+
contentByKey: /* @__PURE__ */ new Map()
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
const contentByKey = await loadContentsByKeys(keys, dispatch, preloaded);
|
|
441
|
+
const toolSet = /* @__PURE__ */ new Set();
|
|
442
|
+
const recommendedToolSet = /* @__PURE__ */ new Set();
|
|
443
|
+
const recommendedSkillHints = /* @__PURE__ */ new Set();
|
|
444
|
+
const skillPromptPatches = /* @__PURE__ */ new Set();
|
|
445
|
+
const hardSkillKeys = /* @__PURE__ */ new Set();
|
|
446
|
+
const softSkillKeys = /* @__PURE__ */ new Set();
|
|
447
|
+
for (const content of contentByKey.values()) {
|
|
448
|
+
const capabilities = extractRuntimePageCapabilities(content);
|
|
449
|
+
for (const tool of [...capabilities.directTools, ...capabilities.hardSkillTools]) {
|
|
450
|
+
toolSet.add(tool);
|
|
451
|
+
}
|
|
452
|
+
for (const hint of capabilities.softSkillHints) {
|
|
453
|
+
recommendedSkillHints.add(hint);
|
|
454
|
+
}
|
|
455
|
+
for (const patch of capabilities.promptPatches) {
|
|
456
|
+
skillPromptPatches.add(patch);
|
|
457
|
+
}
|
|
458
|
+
for (const skillKey of capabilities.hardSkillKeys) {
|
|
459
|
+
hardSkillKeys.add(skillKey);
|
|
460
|
+
}
|
|
461
|
+
for (const skillKey of capabilities.softSkillKeys) {
|
|
462
|
+
softSkillKeys.add(skillKey);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
const resolvedSkillLinks = await resolveSkillGraphFromRoots({
|
|
466
|
+
roots: [
|
|
467
|
+
...Array.from(hardSkillKeys).map((identifier) => ({ identifier, mode: "required" })),
|
|
468
|
+
...Array.from(softSkillKeys).map((identifier) => ({ identifier, mode: "recommended" }))
|
|
469
|
+
],
|
|
470
|
+
loadPage: async (identifier) => {
|
|
471
|
+
const loaded = await loadContentsByKeys([identifier], dispatch, contentByKey);
|
|
472
|
+
return loaded.get(identifier) ?? null;
|
|
473
|
+
},
|
|
474
|
+
contentByKey
|
|
475
|
+
});
|
|
476
|
+
resolvedSkillLinks.contentByKey.forEach((value, key) => contentByKey.set(key, value));
|
|
477
|
+
for (const tool of resolvedSkillLinks.requiredTools) {
|
|
478
|
+
toolSet.add(tool);
|
|
479
|
+
}
|
|
480
|
+
for (const tool of resolvedSkillLinks.recommendedTools) {
|
|
481
|
+
recommendedToolSet.add(tool);
|
|
482
|
+
}
|
|
483
|
+
for (const hint of resolvedSkillLinks.recommendedSkillHints) {
|
|
484
|
+
recommendedSkillHints.add(hint);
|
|
485
|
+
}
|
|
486
|
+
for (const patch of resolvedSkillLinks.skillPromptPatches) {
|
|
487
|
+
skillPromptPatches.add(patch);
|
|
488
|
+
}
|
|
489
|
+
return {
|
|
490
|
+
tools: Array.from(toolSet),
|
|
491
|
+
recommendedSkillTools: Array.from(recommendedToolSet),
|
|
492
|
+
recommendedSkillHints: Array.from(recommendedSkillHints),
|
|
493
|
+
skillPromptPatches: Array.from(skillPromptPatches),
|
|
494
|
+
contentByKey
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
// packages/create/editor/transforms/slateToText.ts
|
|
499
|
+
function getNodeText(node) {
|
|
500
|
+
if (node.text) {
|
|
501
|
+
return node.text;
|
|
502
|
+
}
|
|
503
|
+
if (node.children && Array.isArray(node.children)) {
|
|
504
|
+
return node.children.map(getNodeText).join("\n");
|
|
505
|
+
}
|
|
506
|
+
return "";
|
|
507
|
+
}
|
|
508
|
+
function slateToText(nodes) {
|
|
509
|
+
if (!nodes || nodes.length === 0) {
|
|
510
|
+
return "";
|
|
511
|
+
}
|
|
512
|
+
return nodes.map(getNodeText).join("\n\n");
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
// packages/ai/context/buildReferenceContext.ts
|
|
516
|
+
var MAX_META_TEXT_LENGTH = 80;
|
|
517
|
+
var DIALOG_REFERENCE_MESSAGE_LIMIT = 20;
|
|
518
|
+
var DIALOG_REFERENCE_SNIPPET_CHARS = 1200;
|
|
519
|
+
var DIALOG_HANDOFF_SNIPPET_CHARS = 360;
|
|
520
|
+
var truncateMetaText = (value, max = MAX_META_TEXT_LENGTH) => {
|
|
521
|
+
if (!value) return "";
|
|
522
|
+
if (value.length <= max) return value;
|
|
523
|
+
return `${value.slice(0, max - 3)}...`;
|
|
524
|
+
};
|
|
525
|
+
var readSafe = async (dispatch, dbKey) => {
|
|
526
|
+
try {
|
|
527
|
+
return await dispatch(read({
|
|
528
|
+
dbKey
|
|
529
|
+
})).unwrap();
|
|
530
|
+
} catch {
|
|
531
|
+
return null;
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
var buildMentionMetaMap = async (slateData, dispatch) => {
|
|
535
|
+
const metaMap = /* @__PURE__ */ new Map();
|
|
536
|
+
const mentions = extractCategorizedMentions(slateData);
|
|
537
|
+
if (!mentions) return metaMap;
|
|
538
|
+
const pageEntries = await Promise.all(
|
|
539
|
+
(mentions.pages || []).map(async (pageId) => {
|
|
540
|
+
const pageData = await readSafe(dispatch, pageId);
|
|
541
|
+
if (!pageData) {
|
|
542
|
+
return [`page:${pageId}`, { displayType: "page", metaParts: [] }];
|
|
543
|
+
}
|
|
544
|
+
if (pageData.type === "dialog" /* DIALOG */) {
|
|
545
|
+
const agentCount = Array.isArray(pageData.cybots) ? pageData.cybots.length : 0;
|
|
546
|
+
return [
|
|
547
|
+
`page:${pageId}`,
|
|
548
|
+
{
|
|
549
|
+
displayType: "dialog",
|
|
550
|
+
title: pageData.title,
|
|
551
|
+
metaParts: [
|
|
552
|
+
`agents=${agentCount}`,
|
|
553
|
+
`updated=${pageData.updatedAt || pageData.updated_at || pageData.updated || "Unknown"}`
|
|
554
|
+
]
|
|
555
|
+
}
|
|
556
|
+
];
|
|
557
|
+
}
|
|
558
|
+
const tags = pageData.tags && pageData.tags.length > 0 ? pageData.tags.slice(0, 5).join(", ") : "";
|
|
559
|
+
return [
|
|
560
|
+
`page:${pageId}`,
|
|
561
|
+
{
|
|
562
|
+
displayType: "page",
|
|
563
|
+
title: pageData.title,
|
|
564
|
+
metaParts: [
|
|
565
|
+
pageData.spaceId ? `space=${pageData.spaceId}` : "",
|
|
566
|
+
tags ? `tags=${tags}` : "",
|
|
567
|
+
`updated=${pageData.updatedAt || pageData.updated_at || pageData.updated || "Unknown"}`
|
|
568
|
+
].filter(Boolean)
|
|
569
|
+
}
|
|
570
|
+
];
|
|
571
|
+
})
|
|
572
|
+
);
|
|
573
|
+
pageEntries.forEach((entry) => metaMap.set(entry[0], entry[1]));
|
|
574
|
+
const agentEntries = await Promise.all(
|
|
575
|
+
(mentions.agents || []).map(async (agentId) => {
|
|
576
|
+
const agentData = await readSafe(dispatch, agentId);
|
|
577
|
+
if (!agentData) {
|
|
578
|
+
return [`agent:${agentId}`, { displayType: "agent", metaParts: [] }];
|
|
579
|
+
}
|
|
580
|
+
const desc = truncateMetaText(
|
|
581
|
+
agentData.description || agentData.introduction || ""
|
|
582
|
+
);
|
|
583
|
+
return [
|
|
584
|
+
`agent:${agentId}`,
|
|
585
|
+
{
|
|
586
|
+
displayType: "agent",
|
|
587
|
+
title: agentData.name,
|
|
588
|
+
metaParts: [
|
|
589
|
+
`public=${agentData.isPublic ? "yes" : "no"}`,
|
|
590
|
+
desc ? `desc=${desc}` : ""
|
|
591
|
+
].filter(Boolean)
|
|
592
|
+
}
|
|
593
|
+
];
|
|
594
|
+
})
|
|
595
|
+
);
|
|
596
|
+
agentEntries.forEach((entry) => metaMap.set(entry[0], entry[1]));
|
|
597
|
+
const spaceEntries = await Promise.all(
|
|
598
|
+
(mentions.spaces || []).map(async (spaceId) => {
|
|
599
|
+
const spaceKey = createSpaceKey.space(spaceId);
|
|
600
|
+
const spaceData = await readSafe(dispatch, spaceKey);
|
|
601
|
+
if (!spaceData) {
|
|
602
|
+
return [`space:${spaceId}`, { displayType: "space", metaParts: [] }];
|
|
603
|
+
}
|
|
604
|
+
const desc = truncateMetaText(spaceData.description || "");
|
|
605
|
+
const categoriesCount = Object.keys(spaceData.categories || {}).length;
|
|
606
|
+
const contentsCount = Object.keys(spaceData.contents || {}).length;
|
|
607
|
+
return [
|
|
608
|
+
`space:${spaceId}`,
|
|
609
|
+
{
|
|
610
|
+
displayType: "space",
|
|
611
|
+
title: spaceData.name,
|
|
612
|
+
metaParts: [
|
|
613
|
+
desc ? `desc=${desc}` : "",
|
|
614
|
+
`categories=${categoriesCount}`,
|
|
615
|
+
`contents=${contentsCount}`
|
|
616
|
+
].filter(Boolean)
|
|
617
|
+
}
|
|
618
|
+
];
|
|
619
|
+
})
|
|
620
|
+
);
|
|
621
|
+
spaceEntries.forEach((entry) => metaMap.set(entry[0], entry[1]));
|
|
622
|
+
return metaMap;
|
|
623
|
+
};
|
|
624
|
+
var buildInlineMention = (node, metaMap) => {
|
|
625
|
+
const resourceType = node.resourceType || "unknown";
|
|
626
|
+
const resourceId = node.resourceId || "unknown";
|
|
627
|
+
const key = `${resourceType}:${resourceId}`;
|
|
628
|
+
const meta = metaMap.get(key);
|
|
629
|
+
const label = meta?.title || node.label || resourceId || "mention";
|
|
630
|
+
const displayType = meta?.displayType || resourceType;
|
|
631
|
+
const metaParts = meta?.metaParts ?? [];
|
|
632
|
+
const idPart = resourceType === "tool" ? `tool=${resourceId}` : `dbkey=${resourceId}`;
|
|
633
|
+
const metaSuffix = metaParts.length ? ` | ${metaParts.join(" | ")}` : "";
|
|
634
|
+
return `@${label}(${displayType} | ${idPart}${metaSuffix})`;
|
|
635
|
+
};
|
|
636
|
+
var clipReferenceText = (value, max) => {
|
|
637
|
+
const raw = typeof value === "string" ? value : value == null ? "" : JSON.stringify(value);
|
|
638
|
+
return clipMultilineText(raw, max);
|
|
639
|
+
};
|
|
640
|
+
var fetchDialogReference = async (dbKey, refContent, dispatch) => {
|
|
641
|
+
const dialogConfig = refContent;
|
|
642
|
+
const dialogTitle = dialogConfig.title || `Untitled Dialog (${dbKey})`;
|
|
643
|
+
const dialogId = extractCustomId(dbKey) || dbKey.replace(/^dialog-/, "");
|
|
644
|
+
const checkpoint = dialogConfig.runtimeCheckpoint || null;
|
|
645
|
+
const summary = asTrimmedString(dialogConfig.summary);
|
|
646
|
+
const messages = await dispatch(
|
|
647
|
+
async (_dispatch, getState, { db }) => {
|
|
648
|
+
const state = getState();
|
|
649
|
+
const { currentToken: token, remoteServers } = getRuntimeServerContext(state);
|
|
650
|
+
return await fetchAndCacheMessages({
|
|
651
|
+
db,
|
|
652
|
+
dialogId,
|
|
653
|
+
limit: DIALOG_REFERENCE_MESSAGE_LIMIT,
|
|
654
|
+
token,
|
|
655
|
+
remoteServers: remoteServers.length > 0 ? remoteServers : void 0
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
);
|
|
659
|
+
const sortedMessages = [...messages].reverse();
|
|
660
|
+
const formatContent = (content) => clipReferenceText(content, DIALOG_REFERENCE_SNIPPET_CHARS);
|
|
661
|
+
const transcript = sortedMessages.map((msg, index) => {
|
|
662
|
+
const toolLine = msg.toolName ? ` tool=${msg.toolName}` : "";
|
|
663
|
+
const agentLine = msg.cybotKey ? ` agent=${msg.cybotKey}` : "";
|
|
664
|
+
const createdLine = msg.createdAt ? ` at=${msg.createdAt}` : "";
|
|
665
|
+
return [
|
|
666
|
+
`### Message ${index + 1}: ${msg.role || "unknown"} id=${msg.id || "unknown"}${toolLine}${agentLine}${createdLine}`,
|
|
667
|
+
formatContent(msg.content) || "[empty]"
|
|
668
|
+
].join("\n");
|
|
669
|
+
}).join("\n\n");
|
|
670
|
+
const checkpointLines = [];
|
|
671
|
+
if (checkpoint && typeof checkpoint === "object") {
|
|
672
|
+
if (checkpoint.status) checkpointLines.push(`- status: ${checkpoint.status}`);
|
|
673
|
+
if (checkpoint.lastUserInput) checkpointLines.push(`- lastUserInput: ${formatContent(checkpoint.lastUserInput)}`);
|
|
674
|
+
if (checkpoint.lastAssistantText) checkpointLines.push(`- lastAssistantText: ${formatContent(checkpoint.lastAssistantText)}`);
|
|
675
|
+
if (Array.isArray(checkpoint.lastToolNames) && checkpoint.lastToolNames.length) {
|
|
676
|
+
checkpointLines.push(`- lastToolNames: ${checkpoint.lastToolNames.join(", ")}`);
|
|
677
|
+
}
|
|
678
|
+
if (Array.isArray(checkpoint.toolSurface?.finalToolNames) && checkpoint.toolSurface.finalToolNames.length) {
|
|
679
|
+
checkpointLines.push(`- availableToolNames: ${checkpoint.toolSurface.finalToolNames.join(", ")}`);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
const recentToolEvidence = sortedMessages.filter((msg) => msg.role === "tool" || msg.toolName).slice(-3).map((msg) => {
|
|
683
|
+
const label = msg.toolName ? `${msg.toolName}` : "tool";
|
|
684
|
+
return `- ${label} id=${msg.id || "unknown"}: ${clipReferenceText(msg.content, DIALOG_HANDOFF_SNIPPET_CHARS) || "[empty]"}`;
|
|
685
|
+
});
|
|
686
|
+
const handoffLines = [
|
|
687
|
+
`- Use this when continuing work, transferring to another Agent, comparing with the current task, or preparing a document/plan from the prior discussion.`,
|
|
688
|
+
`- Current state source: ${checkpointLines.length ? "Runtime Checkpoint" : "summaries and recent transcript"}.`,
|
|
689
|
+
summary ? `- Compressed background: passive summary is available below; treat it as lossy, not original wording.` : "",
|
|
690
|
+
recentToolEvidence.length ? `- Recent tool evidence:
|
|
691
|
+
${recentToolEvidence.join("\n")}` : `- Recent tool evidence: none loaded in the latest ${DIALOG_REFERENCE_MESSAGE_LIMIT} messages.`,
|
|
692
|
+
`- For exact claims, old decisions, original wording, files/tools mentioned earlier, or anything not visible in the recent transcript, call searchDialogMessages with DB Key ${dbKey}.`
|
|
693
|
+
].filter(Boolean);
|
|
694
|
+
const referenceBody = [
|
|
695
|
+
`Conversation Reference:`,
|
|
696
|
+
`DB Key: ${dbKey}`,
|
|
697
|
+
`Title: ${dialogTitle}`,
|
|
698
|
+
`Status: ${dialogConfig.status || "unknown"}`,
|
|
699
|
+
`Loaded Recent Messages: ${sortedMessages.length}`,
|
|
700
|
+
`Conversation Handoff:
|
|
701
|
+
${handoffLines.join("\n")}`,
|
|
702
|
+
checkpointLines.length ? `Runtime Checkpoint:
|
|
703
|
+
${checkpointLines.join("\n")}` : "",
|
|
704
|
+
summary ? `Passive Summary (compressed history, not original wording):
|
|
705
|
+
${wrapHistoricalSummaryWithReplayGuard(summary)}` : "",
|
|
706
|
+
`Recent Transcript (original message excerpts, oldest to newest):
|
|
707
|
+
${transcript || "[no recent messages loaded]"}`,
|
|
708
|
+
[
|
|
709
|
+
`Coverage Note: This reference intentionally loads only the latest ${DIALOG_REFERENCE_MESSAGE_LIMIT} messages plus summaries/checkpoint to control token load.`,
|
|
710
|
+
`Original Message Lookup Policy: If the user asks for an exact old message, original wording, who said what, why a decision was made, early-history detail, file/tool evidence, failed attempts, or a comparison with prior work, use searchDialogMessages({ dialogKey: "${dbKey}", query: "..." }) before making a factual claim from this referenced conversation.`
|
|
711
|
+
].join("\n")
|
|
712
|
+
].filter(Boolean).join("\n\n");
|
|
713
|
+
const tokenEstimate = estimateTokenCount(referenceBody);
|
|
714
|
+
return `${referenceBody}
|
|
715
|
+
|
|
716
|
+
Token Load Estimate: ${tokenEstimate} tokens for this conversation reference.
|
|
717
|
+
---
|
|
718
|
+
|
|
719
|
+
`;
|
|
720
|
+
};
|
|
721
|
+
var fetchTableReference = async (dbKey, refContent, dispatch) => {
|
|
722
|
+
const tableMeta = refContent;
|
|
723
|
+
const title = tableMeta.displayName || tableMeta.description || `Untitled Table (${dbKey})`;
|
|
724
|
+
const { markdown: tableMd } = await dispatch(
|
|
725
|
+
async (_dispatch, getState, { db }) => {
|
|
726
|
+
const state = getState();
|
|
727
|
+
const { currentToken: token, remoteServers } = getRuntimeServerContext(state);
|
|
728
|
+
return await fetchAndSerializeTable(tableMeta, db, {
|
|
729
|
+
token,
|
|
730
|
+
remoteServers
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
);
|
|
734
|
+
const tags = tableMeta.tags?.length ? tableMeta.tags.join(", ") : "None";
|
|
735
|
+
const description = tableMeta.description || "No description provided.";
|
|
736
|
+
return `Reference Item (Table):
|
|
737
|
+
DB Key: ${dbKey}
|
|
738
|
+
Title: ${title}
|
|
739
|
+
Description: ${description}
|
|
740
|
+
Tags: ${tags}
|
|
741
|
+
Content (Markdown Table):
|
|
742
|
+
|
|
743
|
+
${tableMd}
|
|
744
|
+
---
|
|
745
|
+
|
|
746
|
+
`;
|
|
747
|
+
};
|
|
748
|
+
var fetchSlateReference = async (dbKey, refContent, dispatch, options) => {
|
|
749
|
+
const hasSlate = Array.isArray(refContent?.slateData) && refContent.slateData.length > 0;
|
|
750
|
+
const legacyContent = hasSlate ? null : resolvePageReadMarkdown(refContent).trim() || null;
|
|
751
|
+
if (!hasSlate && !legacyContent) return null;
|
|
752
|
+
const title = refContent.title || `Untitled (${dbKey})`;
|
|
753
|
+
let contentString;
|
|
754
|
+
let contentType;
|
|
755
|
+
const inlineMentionMeta = options.inlineMentionMeta ?? options.format === "simplified_markdown";
|
|
756
|
+
if (legacyContent) {
|
|
757
|
+
contentType = "Markdown (legacy content)";
|
|
758
|
+
contentString = legacyContent;
|
|
759
|
+
} else switch (options.format) {
|
|
760
|
+
case "text":
|
|
761
|
+
contentType = "Plain Text";
|
|
762
|
+
contentString = slateToText(refContent.slateData);
|
|
763
|
+
break;
|
|
764
|
+
case "simplified_markdown":
|
|
765
|
+
contentType = "Simplified Markdown";
|
|
766
|
+
if (inlineMentionMeta) {
|
|
767
|
+
const metaMap = await buildMentionMetaMap(refContent.slateData, dispatch);
|
|
768
|
+
contentString = slateToSimplifiedMarkdown(refContent.slateData, {
|
|
769
|
+
mentionResolver: (node) => buildInlineMention(node, metaMap)
|
|
770
|
+
});
|
|
771
|
+
} else {
|
|
772
|
+
contentString = slateToSimplifiedMarkdown(refContent.slateData);
|
|
773
|
+
}
|
|
774
|
+
break;
|
|
775
|
+
case "json":
|
|
776
|
+
default:
|
|
777
|
+
contentType = "Slate JSON";
|
|
778
|
+
contentString = JSON.stringify(refContent.slateData, null, 2);
|
|
779
|
+
break;
|
|
780
|
+
}
|
|
781
|
+
if (!contentString || typeof contentString === "string" && !contentString.trim() || contentString === "[]") {
|
|
782
|
+
return null;
|
|
783
|
+
}
|
|
784
|
+
const tags = (refContent.tags || []).length > 0 ? refContent.tags.join(", ") : "None";
|
|
785
|
+
const createdAt = refContent.created || "Unknown Creation Date";
|
|
786
|
+
const updatedAt = refContent.updated || "Unknown Update Date";
|
|
787
|
+
return `Reference Item:
|
|
788
|
+
DB Key: ${dbKey}
|
|
789
|
+
Title: ${title}
|
|
790
|
+
Content (${contentType}):
|
|
791
|
+
${contentString}
|
|
792
|
+
Tags: ${tags}
|
|
793
|
+
Created At: ${createdAt}
|
|
794
|
+
Updated At: ${updatedAt}
|
|
795
|
+
---
|
|
796
|
+
|
|
797
|
+
`;
|
|
798
|
+
};
|
|
799
|
+
var fetchReferenceContents = async (references, dispatch, options = { format: "simplified_markdown" }) => {
|
|
800
|
+
const result = /* @__PURE__ */ new Map();
|
|
801
|
+
if (!references || references.length === 0) return result;
|
|
802
|
+
const referencePromises = references.map(async (dbKey) => {
|
|
803
|
+
try {
|
|
804
|
+
const hasPreloaded = options.preloaded?.has(dbKey);
|
|
805
|
+
const refContent = hasPreloaded ? options.preloaded?.get(dbKey) : await dispatch(read({
|
|
806
|
+
dbKey
|
|
807
|
+
})).unwrap();
|
|
808
|
+
if (!refContent) return null;
|
|
809
|
+
let formatted = null;
|
|
810
|
+
if (refContent.type === "dialog" /* DIALOG */) {
|
|
811
|
+
formatted = await fetchDialogReference(dbKey, refContent, dispatch);
|
|
812
|
+
} else if (refContent.type === "table" /* TABLE */) {
|
|
813
|
+
formatted = await fetchTableReference(dbKey, refContent, dispatch);
|
|
814
|
+
} else {
|
|
815
|
+
formatted = await fetchSlateReference(dbKey, refContent, dispatch, options);
|
|
816
|
+
}
|
|
817
|
+
if (formatted) return [dbKey, formatted];
|
|
818
|
+
return null;
|
|
819
|
+
} catch (error) {
|
|
820
|
+
console.error(`Error fetching reference ${dbKey}:`, error);
|
|
821
|
+
return null;
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
const resolved = await Promise.all(referencePromises);
|
|
825
|
+
resolved.forEach((item) => {
|
|
826
|
+
if (item) result.set(item[0], item[1]);
|
|
827
|
+
});
|
|
828
|
+
return result;
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
export {
|
|
832
|
+
CONTEXT_OVERFLOW_ACTIONS,
|
|
833
|
+
CONTEXT_TOO_LARGE_ACTIONS,
|
|
834
|
+
isContextOverflowText,
|
|
835
|
+
classifyApiError,
|
|
836
|
+
parseApiError,
|
|
837
|
+
classifyGenerationError,
|
|
838
|
+
performServerProxyFetchWithRetry,
|
|
839
|
+
fetchReferenceContents,
|
|
840
|
+
mergeReferences,
|
|
841
|
+
resolveReferenceAssets,
|
|
842
|
+
resolveToolsFromKeys
|
|
843
|
+
};
|