nolo-cli 0.108.0-alpha.1 → 0.108.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 +1 -1
- package/{_executeModel-GTYLDSJW.js → _executeModel-RVAKYU4J.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-OWYHN6D6.js → agentDeleteCommand-T5MDAOE7.js} +154 -67
- package/{agentEmailCommands-C6J2KUL2.js → agentEmailCommands-UWBQSKLI.js} +125 -104
- package/{agentGrantCommands-M3XFO6EN.js → agentGrantCommands-HOJ3JBBQ.js} +3 -3
- package/agentListCommands-2Q456VYS.js +800 -0
- package/{agentMachineCommands-UDEXV472.js → agentMachineCommands-FPJJ4DCF.js} +54 -57
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-7PCGR77I.js} +97 -2
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-7GCDM4BK.js} +7 -7
- package/agentRecordCommands-3JGDR4NN.js +149 -0
- package/agentRunCommand-3NQOP3SD.js +179 -0
- package/{agentRunControl-AVJR4JW4.js → agentRunControl-2CDZNHXV.js} +10 -2
- package/{agentRuntimeLocal-KCMC2TBD.js → agentRuntimeLocal-SQUDRZWE.js} +42 -46
- package/{agentSlice-TNH7BSUC.js → agentSlice-R4W6MCEW.js} +22 -16
- package/{appDeleteCommands-JEPA3EWE.js → appDeleteCommands-CLLYGEBC.js} +55 -55
- package/{appDeployCommands-UTB76XFM.js → appDeployCommands-HY2NBNDQ.js} +64 -59
- package/{appDeployStatusCommands-LGHF2SBD.js → appDeployStatusCommands-SGO5GEXH.js} +53 -52
- package/{appGetCommands-PX2BFHOB.js → appGetCommands-ZPYK2N5D.js} +53 -52
- package/{appListCommands-BSMPTWKC.js → appListCommands-O2BHIMKS.js} +54 -55
- package/{authCommand-YW42YZA4.js → authCommand-GUIREPHK.js} +213 -72
- 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-RRPWH4LX.js → chunk-26UZ2Y4Z.js} +26 -31
- package/{chunk-2F7RJC6L.js → chunk-2C47W7IJ.js} +1 -1
- package/{chunk-VLTIYV3X.js → chunk-2ECUZDEL.js} +37 -11
- 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-3SK3J3IF.js +929 -0
- 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-XT35TTFG.js → chunk-5WLADF62.js} +90 -36
- package/chunk-5XN3OSCT.js +164 -0
- 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-GEPUP7OO.js → chunk-726TCFLQ.js} +5 -5
- package/chunk-7DPNBQSV.js +9 -0
- package/chunk-7YVPCIEN.js +1858 -0
- package/{chunk-AEOE4Z6Q.js → chunk-A337PRRR.js} +41 -17
- package/chunk-AGIM7IMJ.js +147 -0
- package/{chunk-ABQYVJBJ.js → chunk-AIZE5TDM.js} +3 -3
- package/{chunk-GPCZ7UXG.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-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-DGDGNYI5.js +593 -0
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-PVZT43MU.js → chunk-EXR4XCFE.js} +17 -15
- package/chunk-EYLGAEB4.js +784 -0
- package/{chunk-3BMYXEUW.js → chunk-F2UJW3EK.js} +1 -1
- 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-GMZLP5DV.js +82 -0
- package/chunk-I42VC5KR.js +15 -0
- package/{chunk-GO3Z72MT.js → chunk-IFALJPEX.js} +71 -99
- package/{chunk-O6OSWFZQ.js → chunk-IHPDK6UD.js} +6 -0
- package/{chunk-UKWGR5SS.js → chunk-IJERIUXS.js} +242 -1146
- package/chunk-IRG4OKY6.js +843 -0
- package/{chunk-TYYSADX4.js → chunk-IUTHWIZQ.js} +269 -141
- package/{chunk-QDSINZM3.js → chunk-IXH3HKY2.js} +1 -22
- package/chunk-JJM3WS6W.js +132 -0
- package/{chunk-R7RHOSZU.js → chunk-KN6MKCS5.js} +1733 -465
- package/{chunk-SH43IESU.js → chunk-KQ7DAEZ7.js} +202 -32
- package/{chunk-6OZ36FXI.js → chunk-KY6GPQ7O.js} +36 -12
- package/{chunk-MRIHM22T.js → chunk-LAVSW2C2.js} +77 -144
- package/{chunk-NA35QHCF.js → chunk-LNEKN523.js} +10 -7
- package/chunk-LWLNLZC5.js +265 -0
- package/{chunk-I3TQJXQ7.js → chunk-MHD5JBSS.js} +131 -10
- package/{chunk-KQ4ONNQD.js → chunk-MW533QT3.js} +190 -8
- package/{chunk-62CATUYY.js → chunk-NLEJWKF5.js} +10532 -9444
- 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-53HEEOTT.js → chunk-OYBAT7RT.js} +113 -17
- package/chunk-P3SFAHIL.js +134 -0
- package/{chunk-7U6P3PHS.js → chunk-P6KLYCL3.js} +310 -95
- 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-RRM7AJ3M.js → chunk-PS6XSDHW.js} +35 -30
- package/{chunk-HVURBGF3.js → chunk-PWRS2SU2.js} +27 -9
- package/chunk-QFEW2ULV.js +42 -0
- package/chunk-QH2QSBGP.js +7546 -0
- package/{chunk-IIVGDG4I.js → chunk-QLQ573SU.js} +124 -77
- package/chunk-QQ56R7KS.js +88 -0
- 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-ROXFUKKL.js +13941 -0
- package/{chunk-DUK4OQNO.js → chunk-RRPT5CGT.js} +124 -703
- package/{chunk-JRQFUXY7.js → chunk-RRQQAG7W.js} +93 -24
- package/chunk-SJ3QFSQS.js +1147 -0
- package/chunk-SP4WCECG.js +95 -0
- package/{chunk-Q67DOFOO.js → chunk-SZC4REES.js} +212 -105
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/{chunk-UZGQNTVW.js → chunk-TSBCYK5F.js} +10 -8
- package/chunk-TY3TIUJK.js +89 -0
- package/chunk-U4STABYN.js +81 -0
- package/chunk-UEILX4EV.js +15 -0
- package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
- package/{chunk-EEGDMATE.js → chunk-UPFOOGHU.js} +90 -79
- package/{chunk-7S4YWN7P.js → chunk-V2UPLOXT.js} +4 -4
- package/{chunk-PQFHGD77.js → chunk-V5DCOM6G.js} +185 -16
- 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-ETI2NYVF.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-L7OXGGBN.js → chunk-WVES4PHL.js} +69 -57
- package/{chunk-BFDFRLLQ.js → chunk-WW2USJ3C.js} +3 -3
- package/{chunk-QWL5QZGU.js → chunk-X2VPXJZC.js} +20 -11
- 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-JEDZAO7L.js → chunk-YBNHPX4S.js} +257 -37
- package/{chunk-JPGCXHNM.js → chunk-YLMMECCH.js} +1 -1
- package/{chunk-CSC3CU4K.js → chunk-YSZQSZR2.js} +61 -11
- package/{chunk-6D6VBVEW.js → chunk-YVTZMLXZ.js} +96 -25
- package/{chunk-AG2AZ6GX.js → chunk-YZZLKXCQ.js} +1449 -1094
- 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-C25O2ARU.js +839 -0
- package/contentThunks-UWODFKX6.js +83 -0
- package/{cooldownCommands-REAWYVTY.js → cooldownCommands-JFKTYS2D.js} +2 -2
- package/{createAgentAutomationAction-OBH7GPW5.js → createAgentAutomationAction-SA4IA4CR.js} +51 -43
- package/createDialogAction-EDK5IMRG.js +75 -0
- package/{createPageAction-JJ7UUTWC.js → createPageAction-VYVF5EIZ.js} +60 -51
- package/{chunk-BVGTK7MR.js → cursorProvider-YGGNMVWX.js} +2751 -10185
- 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-6Z2BPC3T.js → dialogSlice-EEDP6PJ3.js} +66 -41
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-WRG2JLGM.js → docCreateCommands-N3KPGP4A.js} +51 -53
- package/{docDeleteCommands-SHWJIBJS.js → docDeleteCommands-4CR4TXZ7.js} +53 -54
- package/{docReadCommands-WJN3WT6O.js → docReadCommands-62XK57VS.js} +50 -52
- package/{docStore-7WUS6XXX.js → docStore-RB7YBD4Y.js} +24 -15
- package/{docUpdateCommands-IE32IL6O.js → docUpdateCommands-DRAAWIDC.js} +51 -53
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-LM6OMMQQ.js} +5 -4
- package/{getPricing-LUSEABA6.js → getPricing-XDF4OLTC.js} +6 -6
- package/handleSendMessageAction-TYDPIC6O.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-VYB2QTU3.js +239 -0
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-YSE6NH7B.js} +12 -9
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-7FBKDEQY.js} +1 -1
- package/{machineCommands-KSN4COGR.js → machineCommands-IQRRLSYP.js} +493 -151
- package/machineWsRunDispatch-LIMM5CYE.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-FG6NZ57W.js → providerPresetApply-HIPK67DU.js} +9 -9
- package/{providerRegistry-757OWH3O.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-HO62DKCG.js → readlineWorkspace-P3I7ZJUP.js} +6948 -3879
- package/{removeDialogAgentAction-J6X5QMTA.js → removeDialogAgentAction-EFQ4O2IQ.js} +27 -26
- package/{runAgentClientLoop-JLRJIF3F.js → runAgentClientLoop-AYNL3KMJ.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-5GLCWZPO.js → spaceCommands-WZCLRGBO.js} +56 -55
- package/{streamAgentChatTurn-DZ3PP7ZH.js → streamAgentChatTurn-O5T3B4B3.js} +325 -1557
- 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-UMU2DYQX.js +122 -0
- package/{tuiSummaryLlmCaller-OHHFTHMG.js → tuiSummaryLlmCaller-ISODIW2O.js} +15 -29
- package/{updateCommands-2M74UL7P.js → updateCommands-NQXAGFM7.js} +3 -3
- package/{updateDialogTitleAction-VWZT4J6J.js → updateDialogTitleAction-TIS2SETN.js} +101 -57
- package/action-P4TNFGAD.js +0 -31
- package/agentListCommands-B2V4YAC4.js +0 -410
- package/agentRecordCommands-XBVDEYVC.js +0 -128
- package/agentRunCommand-V6RTNFRH.js +0 -156
- package/browser-image-compression-MFDTD7K6.js +0 -1763
- package/chatQueueReduxAdapter-XMFWRG3P.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-PUOC4YRO.js +0 -394
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-QQWJUHSL.js +0 -34
- package/chunk-S7Z2HMCN.js +0 -25
- package/chunk-TWQWYIMJ.js +0 -21409
- package/chunk-Y5GCAMGP.js +0 -9
- package/chunk-YPREESF4.js +0 -225
- package/contentThunks-3Z6NAUW6.js +0 -73
- package/createDialogAction-7XW3RX2A.js +0 -65
- package/dialogCommands-H7FPUYUQ.js +0 -99
- package/handleSendMessageAction-GUBOMCGM.js +0 -633
- package/machineWsRunDispatch-AAG6PDBY.js +0 -144
- package/setDialogExtraReferencesAction-WX5VTY6O.js +0 -30
- package/settingSlice-P4ZW7K5X.js +0 -204
- package/syncMapping-N6RGXGBW.js +0 -437
- package/tools-XA4ZWLH4.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,929 @@
|
|
|
1
|
+
import {
|
|
2
|
+
streamSseDataValues
|
|
3
|
+
} from "./chunk-GMZLP5DV.js";
|
|
4
|
+
import {
|
|
5
|
+
getAntigravityUserAgent,
|
|
6
|
+
readAntigravityProjectId,
|
|
7
|
+
resolveAntigravityCloudCodeBaseUrl
|
|
8
|
+
} from "./chunk-TSBCYK5F.js";
|
|
9
|
+
import {
|
|
10
|
+
asOptionalTrimmedString
|
|
11
|
+
} from "./chunk-G3SUCT4W.js";
|
|
12
|
+
|
|
13
|
+
// packages/core/chat/upstreamErrorBody.ts
|
|
14
|
+
function parseUpstreamErrorBody(errorText, statusText) {
|
|
15
|
+
if (errorText) {
|
|
16
|
+
try {
|
|
17
|
+
const parsed = JSON.parse(errorText);
|
|
18
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
19
|
+
const error = parsed.error;
|
|
20
|
+
if (error && typeof error === "object" && !Array.isArray(error)) {
|
|
21
|
+
return parsed;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return { error: { message: errorText || statusText } };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// packages/agent-runtime/antigravityCloudCodeProvider.ts
|
|
31
|
+
import { randomUUID } from "node:crypto";
|
|
32
|
+
|
|
33
|
+
// packages/agent-runtime/antigravityWireModel.ts
|
|
34
|
+
var WIRE_PROFILES = {
|
|
35
|
+
// Antigravity discovery exposes 3.7 Flash as one tiered wire model.
|
|
36
|
+
// The UI labels its effort variants (Low/Medium/High), but the literal
|
|
37
|
+
// -medium/-high ids return 404 from streamGenerateContent.
|
|
38
|
+
"gemini-3.7-flash-tiered": { modelEnum: "MODEL_PLACEHOLDER_M301", maxOutputTokens: 65536 },
|
|
39
|
+
// Gemini 3.8 Flash 沿用 3.7 的 tiered 兼容策略:仓库内暂无 Antigravity discovery
|
|
40
|
+
// 证据确认 3.8 的 wire modelEnum,禁止虚构,先只声明同档输出上限;enum 待
|
|
41
|
+
// discovery 证据到位后补齐。
|
|
42
|
+
"gemini-3.8-flash-tiered": { maxOutputTokens: 65536 },
|
|
43
|
+
// Gemini 4 Argon:fetchAvailableModels(2026-10 实测)仅返回键 `gemini-4-argon-disabled`
|
|
44
|
+
// (MODEL_PLACEHOLDER_M421,maxOutputTokens 65536,disabled=true,提示「仅 Ultra 订阅可用」)。
|
|
45
|
+
// 该键名带 -disabled 后缀,不是已验证可调用的 wire id:对 streamGenerateContent 用
|
|
46
|
+
// gemini-4-argon / -disabled / -tiered / -low 均返回 404。因此这里以 logical id 作为
|
|
47
|
+
// 透传 wire id(开放后若 discovery 给出真实 id,只需改这一行与 resolve 分支),
|
|
48
|
+
// enum 取自 discovery 的 M421,不凭空推测 low/medium/high 档位 id。
|
|
49
|
+
// 2026-10-13 实测:UA 升到官方 2.23.1 后 discovery 与 2.18.1 完全一致(仍仅 gemini-4-argon-disabled,
|
|
50
|
+
// disabled=true,tagTitle "Unavailable",tagDescription "currently available to Ultra plan subscribers"),
|
|
51
|
+
// streamGenerateContent 仍 404;loadCodeAssist currentTier=free-tier,账号非 Ultra,故保持占位映射。
|
|
52
|
+
"gemini-4-argon": { modelEnum: "MODEL_PLACEHOLDER_M421", maxOutputTokens: 65536 },
|
|
53
|
+
"gemini-3.6-flash-low": { maxOutputTokens: 65536 },
|
|
54
|
+
"gemini-3.6-flash-medium": { maxOutputTokens: 65536 },
|
|
55
|
+
"gemini-3.6-flash-high": { maxOutputTokens: 65536 },
|
|
56
|
+
// 旧模型 wire 映射保留:存量自定义 agent 仍可能引用(注册表已下线不影响此处)。
|
|
57
|
+
"gemini-3.5-flash-extra-low": { modelEnum: "MODEL_PLACEHOLDER_M187", maxOutputTokens: 65536 },
|
|
58
|
+
"gemini-3.5-flash-low": { modelEnum: "MODEL_PLACEHOLDER_M20", maxOutputTokens: 65536 },
|
|
59
|
+
"gemini-3-flash-agent": { modelEnum: "MODEL_PLACEHOLDER_M132", maxOutputTokens: 65536 },
|
|
60
|
+
"gemini-3.1-pro-low": { modelEnum: "MODEL_PLACEHOLDER_M36", maxOutputTokens: 65535 },
|
|
61
|
+
"gemini-pro-agent": { modelEnum: "MODEL_PLACEHOLDER_M16", maxOutputTokens: 65535 },
|
|
62
|
+
"claude-sonnet-5": { maxOutputTokens: 64e3 },
|
|
63
|
+
"claude-sonnet-4-6": { maxOutputTokens: 64e3 },
|
|
64
|
+
"claude-opus-4-6-thinking": { maxOutputTokens: 64e3 },
|
|
65
|
+
"gemini-2.5-flash": { maxOutputTokens: 65536 },
|
|
66
|
+
"gemini-2.5-pro": { maxOutputTokens: 65536 }
|
|
67
|
+
};
|
|
68
|
+
function resolveAntigravityWireModel(logicalModelId) {
|
|
69
|
+
const id = logicalModelId.trim();
|
|
70
|
+
const lower = id.toLowerCase();
|
|
71
|
+
if (lower === "gemini-3.5-flash") {
|
|
72
|
+
const wireModelId = "gemini-3.5-flash-low";
|
|
73
|
+
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
74
|
+
}
|
|
75
|
+
if (lower === "gemini-3.7-flash" || ["gemini-3.7-flash-low", "gemini-3.7-flash-medium", "gemini-3.7-flash-high"].includes(lower)) {
|
|
76
|
+
const wireModelId = "gemini-3.7-flash-tiered";
|
|
77
|
+
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
78
|
+
}
|
|
79
|
+
if (lower === "gemini-3.8-flash" || ["gemini-3.8-flash-low", "gemini-3.8-flash-medium", "gemini-3.8-flash-high"].includes(lower)) {
|
|
80
|
+
const wireModelId = "gemini-3.8-flash-tiered";
|
|
81
|
+
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
82
|
+
}
|
|
83
|
+
if (lower === "gemini-4-argon" || ["gemini-4-argon-low", "gemini-4-argon-medium", "gemini-4-argon-high"].includes(lower)) {
|
|
84
|
+
const wireModelId = "gemini-4-argon";
|
|
85
|
+
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
86
|
+
}
|
|
87
|
+
if (lower === "gemini-3.6-flash") {
|
|
88
|
+
const wireModelId = "gemini-3.6-flash-low";
|
|
89
|
+
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
90
|
+
}
|
|
91
|
+
if (lower === "gemini-3.1-pro" || lower === "gemini-3.1-pro-preview") {
|
|
92
|
+
const wireModelId = "gemini-3.1-pro-low";
|
|
93
|
+
return { wireModelId, profile: WIRE_PROFILES[wireModelId] };
|
|
94
|
+
}
|
|
95
|
+
if (WIRE_PROFILES[id]) {
|
|
96
|
+
return { wireModelId: id, profile: WIRE_PROFILES[id] };
|
|
97
|
+
}
|
|
98
|
+
return { wireModelId: id };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// packages/agent-runtime/sseDataLine.ts
|
|
102
|
+
function parseSseDataLineJson(line) {
|
|
103
|
+
const trimmed = line.trim();
|
|
104
|
+
if (!trimmed.startsWith("data:")) return null;
|
|
105
|
+
const payload = trimmed.slice(5).trim();
|
|
106
|
+
if (!payload || payload === "[DONE]") return null;
|
|
107
|
+
try {
|
|
108
|
+
return JSON.parse(payload);
|
|
109
|
+
} catch {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function parseSseDataLineObject(line) {
|
|
114
|
+
const parsed = parseSseDataLineJson(line);
|
|
115
|
+
return parsed && typeof parsed === "object" ? parsed : null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// packages/agent-runtime/geminiNativeShared.ts
|
|
119
|
+
var SKIP_THOUGHT_SIGNATURE = "skip_thought_signature_validator";
|
|
120
|
+
function resolveGeminiModelQuirks(modelId) {
|
|
121
|
+
const lower = modelId.toLowerCase();
|
|
122
|
+
const isGemini3 = lower.includes("gemini-3");
|
|
123
|
+
const isStrictSignatureModel = lower.includes("gemini-3.5") || lower.includes("flash-preview");
|
|
124
|
+
const isClaude = lower.includes("claude");
|
|
125
|
+
return {
|
|
126
|
+
requiresThoughtSignature: isGemini3,
|
|
127
|
+
allowsThoughtSignatureSentinel: isGemini3 && !isStrictSignatureModel,
|
|
128
|
+
isClaudeCrossModel: isClaude
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function isGemini3Model(modelId) {
|
|
132
|
+
return resolveGeminiModelQuirks(modelId).requiresThoughtSignature;
|
|
133
|
+
}
|
|
134
|
+
function messageText(content) {
|
|
135
|
+
if (typeof content === "string") return content;
|
|
136
|
+
if (!Array.isArray(content)) return "";
|
|
137
|
+
return content.filter(
|
|
138
|
+
(part) => part?.type === "text"
|
|
139
|
+
).map((part) => part.text).join("\n").trim();
|
|
140
|
+
}
|
|
141
|
+
function parseDataUrlToInlineData(url) {
|
|
142
|
+
const match = /^data:([A-Za-z0-9.+-]+\/[A-Za-z0-9.+-]+);base64,([A-Za-z0-9+/=]*)$/.exec(
|
|
143
|
+
url
|
|
144
|
+
);
|
|
145
|
+
if (!match) return null;
|
|
146
|
+
return { mimeType: match[1], data: match[2] };
|
|
147
|
+
}
|
|
148
|
+
function extractInlineDataParts(content) {
|
|
149
|
+
if (!Array.isArray(content)) return [];
|
|
150
|
+
const parts = [];
|
|
151
|
+
for (const part of content) {
|
|
152
|
+
if (!part || typeof part !== "object") continue;
|
|
153
|
+
if (part.type !== "image_url") continue;
|
|
154
|
+
const url = part.image_url?.url;
|
|
155
|
+
if (typeof url !== "string" || !url.trim()) continue;
|
|
156
|
+
const inline = parseDataUrlToInlineData(url);
|
|
157
|
+
if (inline) parts.push({ inlineData: inline });
|
|
158
|
+
}
|
|
159
|
+
return parts;
|
|
160
|
+
}
|
|
161
|
+
function convertOpenAiMessagesToGemini(messages, options) {
|
|
162
|
+
const contents = [];
|
|
163
|
+
const systemTexts = [];
|
|
164
|
+
let toolCallIndex = 0;
|
|
165
|
+
let pendingFunctionCalls = [];
|
|
166
|
+
const pushOrMergeContent = (role, parts) => {
|
|
167
|
+
if (parts.length === 0) return;
|
|
168
|
+
const last = contents[contents.length - 1];
|
|
169
|
+
if (last && last.role === role) {
|
|
170
|
+
last.parts.push(...parts);
|
|
171
|
+
} else {
|
|
172
|
+
contents.push({ role, parts });
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const flushPendingFunctionCalls = () => {
|
|
176
|
+
if (pendingFunctionCalls.length === 0) return;
|
|
177
|
+
const dummyResponses = pendingFunctionCalls.map(
|
|
178
|
+
({ name, id }) => ({
|
|
179
|
+
functionResponse: {
|
|
180
|
+
name,
|
|
181
|
+
response: { output: "{}" },
|
|
182
|
+
...id ? { id } : {}
|
|
183
|
+
}
|
|
184
|
+
})
|
|
185
|
+
);
|
|
186
|
+
pendingFunctionCalls = [];
|
|
187
|
+
pushOrMergeContent("user", dummyResponses);
|
|
188
|
+
};
|
|
189
|
+
for (const raw of messages) {
|
|
190
|
+
if (!raw || typeof raw !== "object" || !("role" in raw)) continue;
|
|
191
|
+
const role = String(raw.role);
|
|
192
|
+
const content = "content" in raw ? raw.content : null;
|
|
193
|
+
if (role === "system") {
|
|
194
|
+
const text = messageText(
|
|
195
|
+
content
|
|
196
|
+
);
|
|
197
|
+
if (text) systemTexts.push(text);
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (role === "user") {
|
|
201
|
+
flushPendingFunctionCalls();
|
|
202
|
+
const text = messageText(
|
|
203
|
+
content
|
|
204
|
+
);
|
|
205
|
+
const imageParts = extractInlineDataParts(
|
|
206
|
+
content
|
|
207
|
+
);
|
|
208
|
+
if (!text && imageParts.length === 0) continue;
|
|
209
|
+
const parts = [];
|
|
210
|
+
if (text) parts.push({ text });
|
|
211
|
+
for (const img of imageParts) parts.push(img);
|
|
212
|
+
pushOrMergeContent("user", parts);
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
if (role === "assistant") {
|
|
216
|
+
flushPendingFunctionCalls();
|
|
217
|
+
const text = messageText(
|
|
218
|
+
content
|
|
219
|
+
);
|
|
220
|
+
const toolCalls = "tool_calls" in raw && Array.isArray(raw.tool_calls) ? raw.tool_calls ?? [] : [];
|
|
221
|
+
const parts = [];
|
|
222
|
+
if (text) {
|
|
223
|
+
parts.push({ text });
|
|
224
|
+
}
|
|
225
|
+
for (const call of toolCalls) {
|
|
226
|
+
const name = call?.function?.name?.trim();
|
|
227
|
+
if (!name) continue;
|
|
228
|
+
const id = call.id?.trim() || `${name}_${toolCallIndex++}`;
|
|
229
|
+
pendingFunctionCalls.push({ name, id });
|
|
230
|
+
const realSignature = typeof call.thought_signature === "string" && call.thought_signature ? call.thought_signature : void 0;
|
|
231
|
+
const isFirstFunctionCallPart = !parts.some(
|
|
232
|
+
(p) => "functionCall" in p
|
|
233
|
+
);
|
|
234
|
+
const signature = realSignature ?? (options.attachSkipThoughtSignature && isFirstFunctionCallPart ? SKIP_THOUGHT_SIGNATURE : void 0);
|
|
235
|
+
const part = {
|
|
236
|
+
functionCall: {
|
|
237
|
+
name,
|
|
238
|
+
args: parseToolArgs(call.function?.arguments),
|
|
239
|
+
...id ? { id } : {}
|
|
240
|
+
},
|
|
241
|
+
...signature ? { thoughtSignature: signature } : {}
|
|
242
|
+
};
|
|
243
|
+
parts.push(part);
|
|
244
|
+
}
|
|
245
|
+
pushOrMergeContent("model", parts);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (role === "tool") {
|
|
249
|
+
const toolCallId = "tool_call_id" in raw && typeof raw.tool_call_id === "string" ? raw.tool_call_id : "";
|
|
250
|
+
const rawName = "name" in raw && typeof raw.name === "string" ? raw.name.trim() : "";
|
|
251
|
+
const pendingIndex = pendingFunctionCalls.findIndex(
|
|
252
|
+
(p) => toolCallId ? p.id === toolCallId : rawName ? p.name === rawName : true
|
|
253
|
+
);
|
|
254
|
+
if (pendingIndex === -1) continue;
|
|
255
|
+
const [{ name, id }] = pendingFunctionCalls.splice(pendingIndex, 1);
|
|
256
|
+
const output = messageText(content) || "{}";
|
|
257
|
+
pushOrMergeContent("user", [
|
|
258
|
+
{
|
|
259
|
+
functionResponse: {
|
|
260
|
+
name,
|
|
261
|
+
response: { output },
|
|
262
|
+
// 保留 OpenAI tool_call_id:antigravity Cloud Code Assist 网关把
|
|
263
|
+
// Gemini contents 转成 Claude messages 时需要 functionResponse →
|
|
264
|
+
// tool_result 的 tool_use_id;缺 id 时网关报
|
|
265
|
+
// "tool_result.tool_use_id: Field required"(HTTP 400)。
|
|
266
|
+
...id ? { id } : {}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
]);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
flushPendingFunctionCalls();
|
|
273
|
+
if (contents.length > 0 && contents[0]?.role === "model") {
|
|
274
|
+
contents.unshift({
|
|
275
|
+
role: "user",
|
|
276
|
+
parts: [{ text: "Continue the conversation." }]
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
return { contents, systemTexts };
|
|
280
|
+
}
|
|
281
|
+
function parseToolArgs(raw) {
|
|
282
|
+
if (typeof raw === "string") {
|
|
283
|
+
try {
|
|
284
|
+
const parsed = JSON.parse(raw);
|
|
285
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
286
|
+
return parsed;
|
|
287
|
+
}
|
|
288
|
+
} catch {
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (raw && typeof raw === "object" && !Array.isArray(raw)) {
|
|
292
|
+
return raw;
|
|
293
|
+
}
|
|
294
|
+
return {};
|
|
295
|
+
}
|
|
296
|
+
function sanitizeGeminiSchemaNode(node, active) {
|
|
297
|
+
const out = {};
|
|
298
|
+
if (!node || typeof node !== "object" || Array.isArray(node)) {
|
|
299
|
+
return { type: "string" };
|
|
300
|
+
}
|
|
301
|
+
if (active?.has(node)) {
|
|
302
|
+
return { type: "object", description: "(circular schema reference)" };
|
|
303
|
+
}
|
|
304
|
+
const seen = active ?? /* @__PURE__ */ new WeakSet();
|
|
305
|
+
seen.add(node);
|
|
306
|
+
try {
|
|
307
|
+
return sanitizeGeminiSchemaNodeInner(node, out, seen);
|
|
308
|
+
} finally {
|
|
309
|
+
seen.delete(node);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
var enumMetaByNode = /* @__PURE__ */ new WeakMap();
|
|
313
|
+
function enumMetaOf(node) {
|
|
314
|
+
return node && typeof node === "object" ? enumMetaByNode.get(node) : void 0;
|
|
315
|
+
}
|
|
316
|
+
function rawEnumValues(src) {
|
|
317
|
+
if (Array.isArray(src.enum) && src.enum.length > 0) return src.enum;
|
|
318
|
+
if ("const" in src && src.const !== void 0) return [src.const];
|
|
319
|
+
return void 0;
|
|
320
|
+
}
|
|
321
|
+
function geminiEnumFields(values, baseDescription) {
|
|
322
|
+
if (values.every((v) => typeof v === "string")) {
|
|
323
|
+
return {
|
|
324
|
+
enum: [...new Set(values)],
|
|
325
|
+
description: baseDescription
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
if (values.every((v) => typeof v === "number" || typeof v === "boolean")) {
|
|
329
|
+
const allowed2 = [...new Set(values.map((v) => String(v)))].join(", ");
|
|
330
|
+
const note2 = `(allowed: ${allowed2})`;
|
|
331
|
+
return {
|
|
332
|
+
description: baseDescription ? `${baseDescription} ${note2}` : note2
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
const allowed = [...new Set(values.map(geminiEnumLiteral))].join(", ");
|
|
336
|
+
const note = `(allowed: ${allowed})`;
|
|
337
|
+
return {
|
|
338
|
+
description: baseDescription ? `${baseDescription} ${note}` : note
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
function geminiEnumLiteral(value) {
|
|
342
|
+
const json = JSON.stringify(value);
|
|
343
|
+
return json === void 0 ? String(value) : json;
|
|
344
|
+
}
|
|
345
|
+
function applyGeminiEnum(out, fields) {
|
|
346
|
+
if (fields.enum) out.enum = fields.enum;
|
|
347
|
+
if (fields.description !== void 0) out.description = fields.description;
|
|
348
|
+
}
|
|
349
|
+
function sanitizeGeminiSchemaNodeInner(src, out, seen) {
|
|
350
|
+
if (Array.isArray(src.type)) {
|
|
351
|
+
const firstNonNull = src.type.find((t) => t !== "null");
|
|
352
|
+
if (typeof firstNonNull === "string") out.type = firstNonNull;
|
|
353
|
+
out.nullable = true;
|
|
354
|
+
} else if (typeof src.type === "string") {
|
|
355
|
+
out.type = src.type;
|
|
356
|
+
}
|
|
357
|
+
if (typeof src.description === "string") out.description = src.description;
|
|
358
|
+
if (typeof src.minimum === "number") out.minimum = src.minimum;
|
|
359
|
+
if (typeof src.maximum === "number") out.maximum = src.maximum;
|
|
360
|
+
if (src.nullable === true) out.nullable = true;
|
|
361
|
+
const enumValues = rawEnumValues(src);
|
|
362
|
+
if (enumValues) {
|
|
363
|
+
const baseDescription = typeof src.description === "string" ? src.description : void 0;
|
|
364
|
+
enumMetaByNode.set(out, { values: enumValues, baseDescription });
|
|
365
|
+
applyGeminiEnum(out, geminiEnumFields(enumValues, baseDescription));
|
|
366
|
+
}
|
|
367
|
+
const variantBranches = [
|
|
368
|
+
...Array.isArray(src.oneOf) ? src.oneOf : [],
|
|
369
|
+
...Array.isArray(src.anyOf) ? src.anyOf : []
|
|
370
|
+
];
|
|
371
|
+
if (variantBranches.length > 0) {
|
|
372
|
+
const mergedProperties = {};
|
|
373
|
+
let requiredIntersection;
|
|
374
|
+
for (const branch of variantBranches) {
|
|
375
|
+
const sanitized = sanitizeGeminiSchemaNode(branch, seen);
|
|
376
|
+
const branchProperties = sanitized.properties ?? {};
|
|
377
|
+
for (const [key, value] of Object.entries(branchProperties)) {
|
|
378
|
+
const previous = mergedProperties[key];
|
|
379
|
+
const prevMeta = enumMetaOf(previous);
|
|
380
|
+
const nextMeta = enumMetaOf(value);
|
|
381
|
+
if (prevMeta && nextMeta) {
|
|
382
|
+
const values = [...prevMeta.values, ...nextMeta.values];
|
|
383
|
+
const baseDescription = nextMeta.baseDescription ?? prevMeta.baseDescription;
|
|
384
|
+
const node = {
|
|
385
|
+
...value
|
|
386
|
+
};
|
|
387
|
+
delete node.enum;
|
|
388
|
+
delete node.description;
|
|
389
|
+
applyGeminiEnum(node, geminiEnumFields(values, baseDescription));
|
|
390
|
+
enumMetaByNode.set(node, { values, baseDescription });
|
|
391
|
+
mergedProperties[key] = node;
|
|
392
|
+
} else {
|
|
393
|
+
mergedProperties[key] = value;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
const branchRequired = Array.isArray(sanitized.required) ? sanitized.required : [];
|
|
397
|
+
requiredIntersection = requiredIntersection === void 0 ? [...branchRequired] : requiredIntersection.filter((r) => branchRequired.includes(r));
|
|
398
|
+
}
|
|
399
|
+
out.properties = {
|
|
400
|
+
...out.properties ?? {},
|
|
401
|
+
...mergedProperties
|
|
402
|
+
};
|
|
403
|
+
if (requiredIntersection !== void 0 && requiredIntersection.length > 0) {
|
|
404
|
+
out.required = requiredIntersection;
|
|
405
|
+
}
|
|
406
|
+
if (typeof out.type !== "string") out.type = "object";
|
|
407
|
+
}
|
|
408
|
+
if (Array.isArray(src.allOf)) {
|
|
409
|
+
for (const branch of src.allOf) {
|
|
410
|
+
const sanitized = sanitizeGeminiSchemaNode(branch, seen);
|
|
411
|
+
out.properties = {
|
|
412
|
+
...out.properties ?? {},
|
|
413
|
+
...sanitized.properties ?? {}
|
|
414
|
+
};
|
|
415
|
+
if (Array.isArray(sanitized.required)) {
|
|
416
|
+
out.required = [
|
|
417
|
+
.../* @__PURE__ */ new Set([
|
|
418
|
+
...out.required ?? [],
|
|
419
|
+
...sanitized.required ?? []
|
|
420
|
+
])
|
|
421
|
+
];
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (typeof out.type !== "string") out.type = "object";
|
|
425
|
+
}
|
|
426
|
+
if (src.properties && typeof src.properties === "object") {
|
|
427
|
+
const properties = {};
|
|
428
|
+
for (const [key, value] of Object.entries(
|
|
429
|
+
src.properties
|
|
430
|
+
)) {
|
|
431
|
+
properties[key] = sanitizeGeminiSchemaNode(value, seen);
|
|
432
|
+
}
|
|
433
|
+
out.properties = properties;
|
|
434
|
+
if (typeof out.type !== "string") out.type = "object";
|
|
435
|
+
}
|
|
436
|
+
if (Array.isArray(src.required)) {
|
|
437
|
+
const properties = out.properties ?? {};
|
|
438
|
+
const required = [...new Set(src.required)].filter(
|
|
439
|
+
(r) => typeof r === "string" && r in properties
|
|
440
|
+
);
|
|
441
|
+
if (required.length > 0) out.required = required;
|
|
442
|
+
}
|
|
443
|
+
if (src.items !== void 0) {
|
|
444
|
+
out.items = sanitizeGeminiSchemaNode(src.items, seen);
|
|
445
|
+
if (typeof out.type !== "string") out.type = "array";
|
|
446
|
+
}
|
|
447
|
+
if (typeof out.type !== "string") out.type = "object";
|
|
448
|
+
return out;
|
|
449
|
+
}
|
|
450
|
+
function convertOpenAiToolsToGemini(tools) {
|
|
451
|
+
if (!Array.isArray(tools) || tools.length === 0) return void 0;
|
|
452
|
+
const declarations = [];
|
|
453
|
+
for (const tool of tools) {
|
|
454
|
+
if (!tool || typeof tool !== "object" || !("function" in tool)) continue;
|
|
455
|
+
const fn = tool.function;
|
|
456
|
+
const name = typeof fn.name === "string" ? fn.name : "";
|
|
457
|
+
if (!name) continue;
|
|
458
|
+
declarations.push({
|
|
459
|
+
name,
|
|
460
|
+
description: typeof fn.description === "string" ? fn.description : "",
|
|
461
|
+
parameters: sanitizeGeminiSchemaNode(
|
|
462
|
+
fn.parameters ?? { type: "object", properties: {} }
|
|
463
|
+
)
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
if (declarations.length === 0) return void 0;
|
|
467
|
+
return [{ functionDeclarations: declarations }];
|
|
468
|
+
}
|
|
469
|
+
function createGeminiAccumulatorState() {
|
|
470
|
+
return {
|
|
471
|
+
text: "",
|
|
472
|
+
toolCalls: [],
|
|
473
|
+
reasoning: "",
|
|
474
|
+
events: []
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
function applyGeminiChunk(chunk, state, options) {
|
|
478
|
+
if (!chunk || typeof chunk !== "object") return;
|
|
479
|
+
const response = "response" in chunk && chunk.response && typeof chunk.response === "object" ? chunk.response : chunk;
|
|
480
|
+
if ("usageMetadata" in response && response.usageMetadata && typeof response.usageMetadata === "object") {
|
|
481
|
+
const meta = response.usageMetadata;
|
|
482
|
+
const prompt = typeof meta.promptTokenCount === "number" ? meta.promptTokenCount : 0;
|
|
483
|
+
const candidates2 = typeof meta.candidatesTokenCount === "number" ? meta.candidatesTokenCount : 0;
|
|
484
|
+
const total = typeof meta.totalTokenCount === "number" ? meta.totalTokenCount : prompt + candidates2;
|
|
485
|
+
const cached = typeof meta.cachedContentTokenCount === "number" && Number.isFinite(meta.cachedContentTokenCount) ? (
|
|
486
|
+
// cached ⊆ prompt;对畸形上游防御性钳位,避免 cache_read > input 破坏归一化与计费
|
|
487
|
+
Math.min(Math.max(0, Math.floor(meta.cachedContentTokenCount)), prompt)
|
|
488
|
+
) : 0;
|
|
489
|
+
state.usage = {
|
|
490
|
+
prompt_tokens: prompt,
|
|
491
|
+
completion_tokens: candidates2,
|
|
492
|
+
total_tokens: total,
|
|
493
|
+
...cached > 0 ? { cache_read_input_tokens: cached } : {}
|
|
494
|
+
};
|
|
495
|
+
state.events.push({ kind: "usage", usage: state.usage });
|
|
496
|
+
}
|
|
497
|
+
const candidates = Array.isArray(response.candidates) ? response.candidates : [];
|
|
498
|
+
for (const candidate of candidates) {
|
|
499
|
+
if (!candidate || typeof candidate !== "object") continue;
|
|
500
|
+
const candidateFinishReason = candidate.finishReason;
|
|
501
|
+
if (typeof candidateFinishReason === "string" && candidateFinishReason.trim()) {
|
|
502
|
+
state.finishReason = candidateFinishReason.trim();
|
|
503
|
+
state.events.push({ kind: "finish", reason: state.finishReason });
|
|
504
|
+
}
|
|
505
|
+
const parts = Array.isArray(
|
|
506
|
+
candidate.content?.parts
|
|
507
|
+
) ? candidate.content.parts : [];
|
|
508
|
+
for (const part of parts) {
|
|
509
|
+
if (!part || typeof part !== "object") continue;
|
|
510
|
+
const partSignature = part.thoughtSignature;
|
|
511
|
+
const isThought = Boolean(part.thought);
|
|
512
|
+
if ("text" in part && typeof part.text === "string") {
|
|
513
|
+
const piece = part.text;
|
|
514
|
+
if (!isThought) {
|
|
515
|
+
state.text += piece;
|
|
516
|
+
if (piece) {
|
|
517
|
+
state.events.push({ kind: "text", text: piece });
|
|
518
|
+
if (options?.onTextDelta) options.onTextDelta(piece);
|
|
519
|
+
}
|
|
520
|
+
} else {
|
|
521
|
+
state.reasoning += piece;
|
|
522
|
+
if (piece) {
|
|
523
|
+
state.events.push({ kind: "reasoning", text: piece });
|
|
524
|
+
if (options?.onReasoningDelta) options.onReasoningDelta(piece);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (isThought && typeof partSignature === "string" && partSignature) {
|
|
529
|
+
state.pendingThoughtSignature = partSignature;
|
|
530
|
+
}
|
|
531
|
+
if ("functionCall" in part && part.functionCall) {
|
|
532
|
+
const call = part.functionCall;
|
|
533
|
+
const name = typeof call.name === "string" ? call.name : "tool";
|
|
534
|
+
const id = typeof call.id === "string" ? call.id : `${name}_${state.toolCalls.length}`;
|
|
535
|
+
const argsObj = call.args && typeof call.args === "object" ? call.args : {};
|
|
536
|
+
const resolvedSignature = typeof partSignature === "string" && partSignature ? partSignature : state.pendingThoughtSignature;
|
|
537
|
+
state.pendingThoughtSignature = void 0;
|
|
538
|
+
const toolCall = {
|
|
539
|
+
id,
|
|
540
|
+
type: "function",
|
|
541
|
+
function: { name, arguments: JSON.stringify(argsObj) },
|
|
542
|
+
...typeof resolvedSignature === "string" && resolvedSignature ? { thought_signature: resolvedSignature } : {}
|
|
543
|
+
};
|
|
544
|
+
state.toolCalls.push(toolCall);
|
|
545
|
+
state.events.push({ kind: "tool_call", toolCall });
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
function accumulateGeminiChunks(chunks, options) {
|
|
551
|
+
const state = createGeminiAccumulatorState();
|
|
552
|
+
for (const chunk of chunks) {
|
|
553
|
+
applyGeminiChunk(chunk, state, options);
|
|
554
|
+
}
|
|
555
|
+
return {
|
|
556
|
+
text: state.text,
|
|
557
|
+
toolCalls: state.toolCalls,
|
|
558
|
+
usage: state.usage,
|
|
559
|
+
finishReason: state.finishReason,
|
|
560
|
+
reasoningContent: state.reasoning,
|
|
561
|
+
events: state.events
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
async function accumulateGeminiStream(stream, options) {
|
|
565
|
+
const state = createGeminiAccumulatorState();
|
|
566
|
+
for await (const chunk of stream) {
|
|
567
|
+
applyGeminiChunk(chunk, state, options);
|
|
568
|
+
}
|
|
569
|
+
return {
|
|
570
|
+
text: state.text,
|
|
571
|
+
toolCalls: state.toolCalls,
|
|
572
|
+
usage: state.usage,
|
|
573
|
+
finishReason: state.finishReason,
|
|
574
|
+
reasoningContent: state.reasoning,
|
|
575
|
+
events: state.events
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
function shouldUseGeminiNativeToolRoute(provider, model, tools, isImageModel) {
|
|
579
|
+
return provider === "google" && !isImageModel(model) && isGemini3Model(model) && Array.isArray(tools) && tools.length > 0;
|
|
580
|
+
}
|
|
581
|
+
function buildGeminiGenerateContentRequest(args) {
|
|
582
|
+
const { contents, systemTexts } = convertOpenAiMessagesToGemini(
|
|
583
|
+
args.messages,
|
|
584
|
+
{ attachSkipThoughtSignature: args.attachSkipThoughtSignature }
|
|
585
|
+
);
|
|
586
|
+
const request = { contents };
|
|
587
|
+
if (systemTexts.length > 0) {
|
|
588
|
+
request.systemInstruction = {
|
|
589
|
+
role: "user",
|
|
590
|
+
parts: systemTexts.map((text) => ({ text }))
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
const toolsResult = convertOpenAiToolsToGemini(args.tools);
|
|
594
|
+
if (toolsResult) {
|
|
595
|
+
request.tools = toolsResult;
|
|
596
|
+
request.toolConfig = { functionCallingConfig: { mode: "AUTO" } };
|
|
597
|
+
}
|
|
598
|
+
const generationConfig = {};
|
|
599
|
+
if (typeof args.maxTokens === "number" && args.maxTokens > 0) {
|
|
600
|
+
generationConfig.maxOutputTokens = args.maxTokens;
|
|
601
|
+
}
|
|
602
|
+
if (typeof args.temperature === "number") {
|
|
603
|
+
generationConfig.temperature = args.temperature;
|
|
604
|
+
}
|
|
605
|
+
if (Object.keys(generationConfig).length > 0) {
|
|
606
|
+
request.generationConfig = generationConfig;
|
|
607
|
+
}
|
|
608
|
+
return request;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// packages/agent-runtime/antigravityCloudCodeProvider.ts
|
|
612
|
+
var STREAM_PATH = "/v1internal:streamGenerateContent?alt=sse";
|
|
613
|
+
function buildCloudCodeAssistPayload(args) {
|
|
614
|
+
const projectId = readAntigravityProjectId(args.metadata);
|
|
615
|
+
if (!projectId) {
|
|
616
|
+
throw new Error(
|
|
617
|
+
"Antigravity OAuth credential is missing metadata.projectId. Re-run `nolo auth antigravity`."
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
const logicalModel = asOptionalTrimmedString(args.openAiBody.model) ?? asOptionalTrimmedString(args.agentConfig.model) ?? "gemini-3.1-pro";
|
|
621
|
+
const { wireModelId: model, profile } = resolveAntigravityWireModel(logicalModel);
|
|
622
|
+
const rawMessages = Array.isArray(args.openAiBody.messages) ? args.openAiBody.messages : [];
|
|
623
|
+
const quirks = resolveGeminiModelQuirks(model);
|
|
624
|
+
const isClaude = quirks.isClaudeCrossModel;
|
|
625
|
+
const { contents, systemTexts } = convertOpenAiMessagesToGemini(rawMessages, {
|
|
626
|
+
attachSkipThoughtSignature: quirks.allowsThoughtSignatureSentinel
|
|
627
|
+
});
|
|
628
|
+
if (contents.length === 0) {
|
|
629
|
+
throw new Error("Antigravity Cloud Code Assist request has no user/model contents.");
|
|
630
|
+
}
|
|
631
|
+
const prompt = args.agentConfig.prompt?.trim();
|
|
632
|
+
if (prompt) systemTexts.unshift(prompt);
|
|
633
|
+
const request = { contents };
|
|
634
|
+
if (systemTexts.length > 0) {
|
|
635
|
+
request.systemInstruction = {
|
|
636
|
+
role: "user",
|
|
637
|
+
parts: systemTexts.map((text) => ({ text }))
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
const tools = convertOpenAiToolsToGemini(
|
|
641
|
+
Array.isArray(args.openAiBody.tools) ? args.openAiBody.tools : void 0
|
|
642
|
+
);
|
|
643
|
+
if (tools) {
|
|
644
|
+
request.tools = tools;
|
|
645
|
+
request.toolConfig = { functionCallingConfig: { mode: "AUTO" } };
|
|
646
|
+
}
|
|
647
|
+
const generationConfig = {};
|
|
648
|
+
if (profile?.maxOutputTokens) {
|
|
649
|
+
generationConfig.maxOutputTokens = profile.maxOutputTokens;
|
|
650
|
+
} else if (typeof args.agentConfig.max_tokens === "number" && args.agentConfig.max_tokens > 0) {
|
|
651
|
+
generationConfig.maxOutputTokens = args.agentConfig.max_tokens;
|
|
652
|
+
}
|
|
653
|
+
if (typeof args.agentConfig.temperature === "number") {
|
|
654
|
+
generationConfig.temperature = args.agentConfig.temperature;
|
|
655
|
+
}
|
|
656
|
+
if (Object.keys(generationConfig).length > 0) {
|
|
657
|
+
request.generationConfig = generationConfig;
|
|
658
|
+
}
|
|
659
|
+
const agentId = randomUUID();
|
|
660
|
+
const trajectoryId = randomUUID();
|
|
661
|
+
const step = 2;
|
|
662
|
+
const requestId = `agent/${agentId}/${Date.now()}/${trajectoryId}/${step}`;
|
|
663
|
+
const labels = {
|
|
664
|
+
trajectory_id: trajectoryId,
|
|
665
|
+
last_step_index: String(step - 1),
|
|
666
|
+
used_claude: String(isClaude),
|
|
667
|
+
used_claude_conservative: String(isClaude)
|
|
668
|
+
};
|
|
669
|
+
if (profile?.modelEnum) {
|
|
670
|
+
labels.model_enum = profile.modelEnum;
|
|
671
|
+
}
|
|
672
|
+
request.labels = labels;
|
|
673
|
+
request.sessionId = `-${Math.floor(Math.random() * 9e15)}`;
|
|
674
|
+
return {
|
|
675
|
+
url: `${resolveAntigravityCloudCodeBaseUrl(args.agentConfig.customProviderUrl)}${STREAM_PATH}`,
|
|
676
|
+
envelope: {
|
|
677
|
+
project: projectId,
|
|
678
|
+
model,
|
|
679
|
+
request,
|
|
680
|
+
requestId,
|
|
681
|
+
requestType: "agent",
|
|
682
|
+
userAgent: "antigravity"
|
|
683
|
+
}
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
function resolveAntigravityFinishReason(upstream) {
|
|
687
|
+
const normalized = (upstream ?? "").trim().toUpperCase();
|
|
688
|
+
if (normalized === "MAX_TOKENS") return "length";
|
|
689
|
+
if (normalized === "SAFETY" || normalized === "RECITATION" || normalized === "PROHIBITED_CONTENT" || normalized === "BLOCKLIST") {
|
|
690
|
+
return "content_filter";
|
|
691
|
+
}
|
|
692
|
+
return "stop";
|
|
693
|
+
}
|
|
694
|
+
function normalizeAntigravityCompletion(decoded) {
|
|
695
|
+
const { text, toolCalls, usage, finishReason, reasoningContent, events } = decoded;
|
|
696
|
+
const normalizedFinishReason = (finishReason ?? "").trim().toUpperCase();
|
|
697
|
+
if (!text && !reasoningContent && toolCalls.length === 0 && !finishReason && !usage) {
|
|
698
|
+
const body = {
|
|
699
|
+
error: {
|
|
700
|
+
message: "antigravity upstream returned an empty stream (no content, finishReason or usage); channel degradation, not model emptiness"
|
|
701
|
+
},
|
|
702
|
+
provider_events: events
|
|
703
|
+
};
|
|
704
|
+
return {
|
|
705
|
+
status: 502,
|
|
706
|
+
text: "",
|
|
707
|
+
toolCalls: [],
|
|
708
|
+
providerEvents: events,
|
|
709
|
+
body
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
if (normalizedFinishReason === "MALFORMED_FUNCTION_CALL") {
|
|
713
|
+
const message2 = "antigravity upstream returned MALFORMED_FUNCTION_CALL (model generated an invalid function call or tool arguments were rejected by upstream)";
|
|
714
|
+
const providerFailure = {
|
|
715
|
+
kind: "provider_failure",
|
|
716
|
+
provider: "antigravity",
|
|
717
|
+
code: "MALFORMED_FUNCTION_CALL",
|
|
718
|
+
message: message2,
|
|
719
|
+
providerReason: "MALFORMED_FUNCTION_CALL",
|
|
720
|
+
retryable: false,
|
|
721
|
+
status: 502
|
|
722
|
+
};
|
|
723
|
+
return {
|
|
724
|
+
status: 502,
|
|
725
|
+
text: "",
|
|
726
|
+
toolCalls: [],
|
|
727
|
+
finishReason,
|
|
728
|
+
providerEvents: events,
|
|
729
|
+
providerFailure,
|
|
730
|
+
runtimeProviderFailure: {
|
|
731
|
+
message: providerFailure.message,
|
|
732
|
+
retryable: providerFailure.retryable
|
|
733
|
+
},
|
|
734
|
+
body: {
|
|
735
|
+
error: {
|
|
736
|
+
message: message2,
|
|
737
|
+
code: "MALFORMED_FUNCTION_CALL",
|
|
738
|
+
category: "malformed_function_call",
|
|
739
|
+
providerReason: "MALFORMED_FUNCTION_CALL",
|
|
740
|
+
retryable: false
|
|
741
|
+
},
|
|
742
|
+
provider_failure: providerFailure,
|
|
743
|
+
provider_events: events
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
const message = {
|
|
748
|
+
role: "assistant",
|
|
749
|
+
content: text || null
|
|
750
|
+
};
|
|
751
|
+
if (toolCalls.length > 0) message.tool_calls = toolCalls;
|
|
752
|
+
if (reasoningContent) message.reasoning_content = reasoningContent;
|
|
753
|
+
return {
|
|
754
|
+
status: 200,
|
|
755
|
+
text,
|
|
756
|
+
...reasoningContent ? { reasoningContent } : {},
|
|
757
|
+
toolCalls,
|
|
758
|
+
...usage ? { usage } : {},
|
|
759
|
+
...finishReason ? { finishReason } : {},
|
|
760
|
+
providerEvents: events,
|
|
761
|
+
body: {
|
|
762
|
+
choices: [{
|
|
763
|
+
index: 0,
|
|
764
|
+
message,
|
|
765
|
+
finish_reason: toolCalls.length > 0 ? "tool_calls" : resolveAntigravityFinishReason(finishReason)
|
|
766
|
+
}],
|
|
767
|
+
...usage ? { usage } : {},
|
|
768
|
+
provider_events: events
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
async function fetchAntigravityCloudCodeCompletion(args) {
|
|
773
|
+
const fetchImpl = args.fetchImpl ?? fetch;
|
|
774
|
+
const { url, envelope } = buildCloudCodeAssistPayload(args);
|
|
775
|
+
const response = await fetchImpl(url, {
|
|
776
|
+
method: "POST",
|
|
777
|
+
headers: {
|
|
778
|
+
Authorization: `Bearer ${args.accessToken}`,
|
|
779
|
+
"Content-Type": "application/json",
|
|
780
|
+
"User-Agent": getAntigravityUserAgent()
|
|
781
|
+
},
|
|
782
|
+
body: JSON.stringify(envelope),
|
|
783
|
+
signal: args.signal
|
|
784
|
+
});
|
|
785
|
+
if (!response.ok) {
|
|
786
|
+
const errorText = await response.text();
|
|
787
|
+
return {
|
|
788
|
+
status: response.status,
|
|
789
|
+
text: "",
|
|
790
|
+
toolCalls: [],
|
|
791
|
+
providerEvents: [],
|
|
792
|
+
// 保留上游结构:Antigravity 的限流 body 同样携带结构化的重置信息,
|
|
793
|
+
// 压成字符串会让冷却退化成 5 分钟默认值。
|
|
794
|
+
body: parseUpstreamErrorBody(errorText, response.statusText)
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
const chunkStream = streamSseDataValues(response, parseSseDataLineJson);
|
|
798
|
+
const { text, toolCalls, usage, finishReason, reasoningContent, events } = await accumulateGeminiStream(chunkStream, {
|
|
799
|
+
onTextDelta: args.onTextDelta,
|
|
800
|
+
onReasoningDelta: args.onReasoningDelta
|
|
801
|
+
});
|
|
802
|
+
const normalized = normalizeAntigravityCompletion({
|
|
803
|
+
text,
|
|
804
|
+
toolCalls,
|
|
805
|
+
usage,
|
|
806
|
+
finishReason,
|
|
807
|
+
reasoningContent,
|
|
808
|
+
events
|
|
809
|
+
});
|
|
810
|
+
if (normalized.status !== 200 || !text && toolCalls.length === 0) {
|
|
811
|
+
console.warn(
|
|
812
|
+
`[antigravity] empty completion: finishReason=${JSON.stringify(finishReason)} reasoningLen=${reasoningContent?.length ?? 0} usage=${JSON.stringify(usage) ?? "none"} model=${String(envelope.model)} base=${new URL(url).host}`
|
|
813
|
+
);
|
|
814
|
+
}
|
|
815
|
+
return normalized;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
// packages/agent-runtime/devinOAuth.ts
|
|
819
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
820
|
+
import { homedir } from "node:os";
|
|
821
|
+
import { join } from "node:path";
|
|
822
|
+
var DEVIN_CONNECT_URL = "https://server.codeium.com/exa.api_server_pb.ApiServerService/GetChatMessage";
|
|
823
|
+
function buildDevinAuthUrl(orgId) {
|
|
824
|
+
const cleanOrg = orgId?.trim();
|
|
825
|
+
if (cleanOrg) {
|
|
826
|
+
return `https://app.devin.ai/org/${encodeURIComponent(cleanOrg)}/settings/keys`;
|
|
827
|
+
}
|
|
828
|
+
return "https://app.devin.ai/settings/keys";
|
|
829
|
+
}
|
|
830
|
+
function extractDevinToken(input) {
|
|
831
|
+
const raw = input?.trim();
|
|
832
|
+
if (!raw) return null;
|
|
833
|
+
if (/^https?:\/\//i.test(raw)) {
|
|
834
|
+
try {
|
|
835
|
+
const url = new URL(raw);
|
|
836
|
+
const queryToken = url.searchParams.get("token") || url.searchParams.get("access_token") || url.searchParams.get("auth_token");
|
|
837
|
+
if (queryToken?.trim()) return queryToken.trim();
|
|
838
|
+
if (url.hash) {
|
|
839
|
+
const hashParams = new URLSearchParams(url.hash.replace(/^#/, ""));
|
|
840
|
+
const hashToken = hashParams.get("token") || hashParams.get("access_token") || hashParams.get("auth_token");
|
|
841
|
+
if (hashToken?.trim()) return hashToken.trim();
|
|
842
|
+
}
|
|
843
|
+
} catch {
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
return raw || null;
|
|
847
|
+
}
|
|
848
|
+
function parseDevinCredentialsToml(content) {
|
|
849
|
+
for (const line of content.split(/\r?\n/)) {
|
|
850
|
+
const cogMatch = line.match(/(cog_[A-Za-z0-9_-]+)/);
|
|
851
|
+
if (cogMatch?.[1]) {
|
|
852
|
+
return cogMatch[1].trim();
|
|
853
|
+
}
|
|
854
|
+
const match = line.match(
|
|
855
|
+
/^\s*(?:windsurf_api_key|devin_api_key|api_key|api_token|token)\s*=\s*"([^"]+)"\s*$/i
|
|
856
|
+
);
|
|
857
|
+
if (match?.[1]) {
|
|
858
|
+
return match[1].trim();
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
return null;
|
|
862
|
+
}
|
|
863
|
+
function detectLocalDevinCredentials(options) {
|
|
864
|
+
const baseHome = options?.homeDir || homedir();
|
|
865
|
+
const xdgData = process.env.XDG_DATA_HOME;
|
|
866
|
+
const candidateCliPaths = [
|
|
867
|
+
xdgData ? join(xdgData, "devin", "credentials.toml") : null,
|
|
868
|
+
join(baseHome, ".local", "share", "devin", "credentials.toml"),
|
|
869
|
+
process.env.APPDATA ? join(process.env.APPDATA, "devin", "credentials.toml") : null
|
|
870
|
+
].filter((p) => Boolean(p));
|
|
871
|
+
for (const credPath of candidateCliPaths) {
|
|
872
|
+
if (existsSync(credPath)) {
|
|
873
|
+
try {
|
|
874
|
+
const content = readFileSync(credPath, "utf-8");
|
|
875
|
+
const token = parseDevinCredentialsToml(content);
|
|
876
|
+
if (token) {
|
|
877
|
+
return {
|
|
878
|
+
found: true,
|
|
879
|
+
token,
|
|
880
|
+
source: "devin-cli",
|
|
881
|
+
sourcePath: credPath
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
} catch {
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
const codeiumPath = join(baseHome, ".codeium", "config.json");
|
|
889
|
+
if (existsSync(codeiumPath)) {
|
|
890
|
+
try {
|
|
891
|
+
const parsed = JSON.parse(readFileSync(codeiumPath, "utf-8"));
|
|
892
|
+
const token = parsed.apiKey || parsed.api_key;
|
|
893
|
+
if (token?.trim()) {
|
|
894
|
+
return {
|
|
895
|
+
found: true,
|
|
896
|
+
token: token.trim(),
|
|
897
|
+
source: "codeium-config",
|
|
898
|
+
sourcePath: codeiumPath
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
} catch {
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
return { found: false };
|
|
905
|
+
}
|
|
906
|
+
function buildDevinOAuthCredential(token, now = Date.now()) {
|
|
907
|
+
return {
|
|
908
|
+
provider: "devin",
|
|
909
|
+
accessToken: token.trim(),
|
|
910
|
+
obtainedAt: now
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export {
|
|
915
|
+
parseSseDataLineJson,
|
|
916
|
+
parseSseDataLineObject,
|
|
917
|
+
parseUpstreamErrorBody,
|
|
918
|
+
isGemini3Model,
|
|
919
|
+
accumulateGeminiChunks,
|
|
920
|
+
shouldUseGeminiNativeToolRoute,
|
|
921
|
+
buildGeminiGenerateContentRequest,
|
|
922
|
+
resolveAntigravityFinishReason,
|
|
923
|
+
fetchAntigravityCloudCodeCompletion,
|
|
924
|
+
DEVIN_CONNECT_URL,
|
|
925
|
+
buildDevinAuthUrl,
|
|
926
|
+
extractDevinToken,
|
|
927
|
+
detectLocalDevinCredentials,
|
|
928
|
+
buildDevinOAuthCredential
|
|
929
|
+
};
|