0sec-cli 0.24.0 → 0.25.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/0.js +64 -60
- package/README.md +121 -82
- package/chunks/{adapt-loop-TEJPXWFG.js → adapt-loop-L2PXCD4J.js} +6 -5
- package/chunks/{artifact-scraper-AJZ3LOQY.js → artifact-scraper-W3LGLXBM.js} +4 -3
- package/chunks/{assumption-mining-EATDC4BB.js → assumption-mining-7IJ6ZWZE.js} +22 -20
- package/chunks/{backend-connections-QE4NASAK.js → backend-connections-MYH4QRQG.js} +5 -4
- package/chunks/{chunk-RBOMXUYL.js → chunk-27SXCYWH.js} +1 -1
- package/chunks/{chunk-E42XEJTK.js → chunk-2J3STRJT.js} +337 -257
- package/chunks/chunk-36J5ZLFE.js +18729 -0
- package/chunks/chunk-3DF55BWV.js +49 -0
- package/chunks/{chunk-GHEBZKUS.js → chunk-3HMO42M2.js} +1426 -321
- package/chunks/{chunk-BIJPMYFA.js → chunk-3T5R7P4T.js} +6 -6
- package/chunks/{chunk-RD4FKFWR.js → chunk-5H2PXZ7Q.js} +1 -1
- package/chunks/chunk-5XOYTAOK.js +1546 -0
- package/chunks/{chunk-QEA2VHBD.js → chunk-6TA3CWND.js} +2656 -2960
- package/chunks/{chunk-H76JYUPE.js → chunk-76CLUI54.js} +3 -3
- package/chunks/{chunk-KCA35IL3.js → chunk-7PUJI64A.js} +11 -9
- package/chunks/{chunk-W6IYTSZH.js → chunk-7TIWL6E5.js} +8 -10
- package/chunks/chunk-ABKUI3QB.js +196 -0
- package/chunks/{chunk-YORL5S5V.js → chunk-ACYZMJHC.js} +1 -1
- package/chunks/{chunk-5FHFG5P2.js → chunk-AL32F74R.js} +1 -1
- package/chunks/{chunk-J6G73WYF.js → chunk-B5TIXHCO.js} +1 -1
- package/chunks/{chunk-G2EJ3R5I.js → chunk-BWUW6ZQR.js} +2052 -1075
- package/chunks/{chunk-3XLEDCFX.js → chunk-C6ZMPXN2.js} +5 -50
- package/chunks/{chunk-4TUR47H5.js → chunk-D4IBEO2K.js} +1 -1
- package/chunks/{chunk-EXTN4SQV.js → chunk-DHNYJ2ML.js} +1 -1
- package/chunks/{chunk-Y7KV7WV6.js → chunk-DJGJECBV.js} +93 -20
- package/chunks/{chunk-UHUW45S3.js → chunk-DMDWIW3E.js} +5 -5
- package/chunks/{chunk-V5I5GAQH.js → chunk-EEP6GBUO.js} +16037 -34417
- package/chunks/{chunk-EYBMTELO.js → chunk-EIONVEFN.js} +208 -29
- package/chunks/chunk-EQBC2ZWL.js +2481 -0
- package/chunks/{chunk-FKGFHLLS.js → chunk-FI2H6HV2.js} +1 -1
- package/chunks/{chunk-4YRXIVPZ.js → chunk-FI5YL4R2.js} +3 -3
- package/chunks/{chunk-DNV3ZMPX.js → chunk-FOLTHXRH.js} +1 -1
- package/chunks/{chunk-ZPFBQ3SD.js → chunk-GOUGG7IQ.js} +3 -3
- package/chunks/{chunk-O3ADFN2A.js → chunk-GXSECFUE.js} +1 -1
- package/chunks/{chunk-YYOQADBB.js → chunk-HDJSHLRM.js} +3 -2
- package/chunks/{chunk-A3EKBUEM.js → chunk-HFUOUT2B.js} +61232 -30665
- package/chunks/chunk-HJKJ4NQP.js +196 -0
- package/chunks/{chunk-RPTO5FY2.js → chunk-I4VIAQHM.js} +1 -1
- package/chunks/{chunk-A6AZZ6XX.js → chunk-ITEMDJAB.js} +3 -3
- package/chunks/chunk-ITHDAIRY.js +57 -0
- package/chunks/{chunk-TOFIGQ63.js → chunk-JCRQV4FE.js} +2 -2
- package/chunks/{chunk-SQCBHFWN.js → chunk-LWMEJYCP.js} +2 -2
- package/chunks/{chunk-52AWIBCT.js → chunk-MY44EZKD.js} +1 -1
- package/chunks/{chunk-SGILXLR3.js → chunk-NBLKIQCW.js} +226 -4
- package/chunks/chunk-NO543ZBU.js +90 -0
- package/chunks/{chunk-CIMN2AO6.js → chunk-OFPF26WL.js} +333 -3
- package/chunks/{chunk-YERUDEXT.js → chunk-PAE7ZAV6.js} +2780 -1255
- package/chunks/{chunk-V4BD7GSP.js → chunk-PMAKX6KP.js} +2 -2
- package/chunks/{chunk-62PGWN7Y.js → chunk-RBTJYREN.js} +8 -171
- package/chunks/{chunk-IK27KMVV.js → chunk-RFK5F45W.js} +1 -1
- package/chunks/{chunk-554D4AYM.js → chunk-S2WCYEK2.js} +4 -99
- package/chunks/{chunk-RZR2XXAK.js → chunk-S3B6HFSM.js} +144 -14
- package/chunks/{chunk-WUPN3D37.js → chunk-S4DFH2FJ.js} +26 -1
- package/chunks/{chunk-TZRHWP7R.js → chunk-SEWZ76MN.js} +77 -13
- package/chunks/{chunk-HRBOZBMC.js → chunk-TFKY6D7O.js} +1 -1
- package/chunks/{chunk-TOAAYJVN.js → chunk-WK6VUCKK.js} +3 -333
- package/chunks/{chunk-IXT64DV5.js → chunk-XPDJE537.js} +97 -1
- package/chunks/{chunk-RCHAFSWS.js → chunk-YXTV2FRE.js} +113 -22
- package/chunks/{chunk-TTDFBFNZ.js → chunk-YYFODVZG.js} +6 -10
- package/chunks/{chunk-3XLFB46W.js → chunk-ZWAWZU6C.js} +30 -13
- package/chunks/{chunk-5POT5OYF.js → chunk-ZZV56ACK.js} +11 -9
- package/chunks/{codex-models-FQPCWRPC.js → codex-models-KCUIVS3R.js} +9 -8
- package/chunks/{commands-I5L3VD2A.js → commands-MPPAADGY.js} +798 -608
- package/chunks/dashboard-MN7GZLLX.js +75 -0
- package/chunks/{db-P5EIKMLP.js → db-R2AQSESC.js} +5 -4
- package/chunks/{deep-review-I7RD5QSS.js → deep-review-Q6BJKEV4.js} +37 -38
- package/chunks/{disclose-PFBWESVJ.js → disclose-GGULOW27.js} +6 -5
- package/chunks/{dist-AJU25UXA.js → dist-6RNAVFAY.js} +376 -333
- package/chunks/{dist-VK2M4HNW.js → dist-DWN7U5OV.js} +5 -2
- package/chunks/{dist-M2X367VW.js → dist-JAZWL3SC.js} +3 -2
- package/chunks/{dist-3SWWY5FZ.js → dist-OLGNKDB2.js} +4 -3
- package/chunks/{dist-LNXGATR2.js → dist-WNAOCQGA.js} +5 -4
- package/chunks/eval-runner-WCTTIYN4.js +38 -0
- package/chunks/{exploit-agent-A4RTIJ4J.js → exploit-agent-M3KUMZJH.js} +1 -1
- package/chunks/{exploit-autoclimb-ABMMBC3M.js → exploit-autoclimb-QTTWC5WM.js} +1 -1
- package/chunks/{exploit-climb-BQ2SVU63.js → exploit-climb-E4KDELTN.js} +4 -3
- package/chunks/{fix-4YCLHFDT.js → fix-U5FFJD4F.js} +9 -8
- package/chunks/{harness-DHWULEIZ.js → harness-FMKIMEH5.js} +5 -4
- package/chunks/{http-conformance-U5F6GKYG.js → http-conformance-AXMUOE6C.js} +3 -2
- package/chunks/hunt-scan-RYPWRUQD.js +43 -0
- package/chunks/{kernel-primitive-SF4NALVR.js → kernel-primitive-CVG2E7MJ.js} +4 -3
- package/chunks/{kernel-vm-runner-WEBEZEIC.js → kernel-vm-runner-62KISULQ.js} +4 -3
- package/chunks/{local-engine-XUG7XRKM.js → local-engine-WP3I7K7G.js} +7 -6
- package/chunks/managed-operation-642WPTLC.js +59 -0
- package/chunks/{memsafety-scan-L2Z7E7TE.js → memsafety-scan-Q2MBZEGJ.js} +1 -2
- package/chunks/{native-loop-ZNAELJGB.js → native-loop-HC77R5NQ.js} +31 -16
- package/chunks/operator-services-E2NONBQS.js +79 -0
- package/chunks/orchestrate-Z3DW265M.js +62 -0
- package/chunks/{prepare-SODWQN6O.js → prepare-7DTS6RJT.js} +7 -6
- package/chunks/{remote-workflow-runtime-XNNGI2PG.js → remote-workflow-runtime-6CEVRZXS.js} +4 -3
- package/chunks/routing-ITJZBJIU.js +61 -0
- package/chunks/{runtime-MB4GEFBY.js → runtime-PZJ77QES.js} +9 -8
- package/chunks/{runtime-HFFRUOPL.js → runtime-W6JNDQRO.js} +4 -3
- package/chunks/{scan-stream-GXBJHCDF.js → scan-stream-6VOJTHTR.js} +6 -4
- package/chunks/{scope-M7L3CD6X.js → scope-FHXW6EX6.js} +4 -3
- package/chunks/service-plugins-CN6Q2NSN.js +63 -0
- package/chunks/{session-store-K7I4GLNH.js → session-store-DBBI544Y.js} +8 -5
- package/chunks/{variant-candidates-2KSP5EHH.js → variant-candidates-DPR6DJ3N.js} +9 -8
- package/chunks/{web-recon-prepass-RAXXTEWH.js → web-recon-prepass-HWDHDQMN.js} +7 -6
- package/chunks/{workflow-runtime-V26HIJO3.js → workflow-runtime-PLB32XC3.js} +50 -49
- package/dashboard/assets/{abnfDiagram-VCTEODGH-CGCueOp5.js → abnfDiagram-VCTEODGH-6e39CQKz.js} +1 -1
- package/dashboard/assets/{arc-BjZaQcCc.js → arc-ClYun86B.js} +1 -1
- package/dashboard/assets/architecture-7GRP2DOG-rM-lWo7E.js +1 -0
- package/dashboard/assets/architectureDiagram-5GKGNRK7-C9gEGZIU.js +36 -0
- package/dashboard/assets/{blockDiagram-I7D4REHJ-C-byT12_.js → blockDiagram-I7D4REHJ-Dgh2n5Lf.js} +2 -2
- package/dashboard/assets/{c4Diagram-7LVT6UL2-DoYjz-Uv.js → c4Diagram-7LVT6UL2-CsorW08z.js} +1 -1
- package/dashboard/assets/channel-BBlDqIBl.js +1 -0
- package/dashboard/assets/{chunk-4HAMMTFA-NBNp2zdt.js → chunk-4HAMMTFA-4_b_LGGQ.js} +1 -1
- package/dashboard/assets/{chunk-75Z2AOVW-BHmkuP0B.js → chunk-75Z2AOVW-qzNlKGCp.js} +1 -1
- package/dashboard/assets/chunk-DU6HZSFF-SAPICW28.js +127 -0
- package/dashboard/assets/{chunk-F27PBJKO-3wwNFUgZ.js → chunk-F27PBJKO-DlLotIQx.js} +1 -1
- package/dashboard/assets/{chunk-FOHPRMQF-DHwB1DNv.js → chunk-FOHPRMQF-COOliuUh.js} +14 -14
- package/dashboard/assets/{chunk-GMAD6QVW-Btg7huZW.js → chunk-GMAD6QVW-DNnr65Nb.js} +7 -7
- package/dashboard/assets/{chunk-GVQU2GXP-ihCURK5O.js → chunk-GVQU2GXP-DTwv0VfU.js} +1 -1
- package/dashboard/assets/{chunk-IMKFNOWR-FsXj7slg.js → chunk-IMKFNOWR-B1fk1q_W.js} +1 -1
- package/dashboard/assets/{chunk-L3NEJ4N5-DorFIxJY.js → chunk-L3NEJ4N5-ByVjFIox.js} +1 -1
- package/dashboard/assets/{chunk-OSK3NFVY-DKun_KfC.js → chunk-OSK3NFVY-DUDCzjbh.js} +1 -1
- package/dashboard/assets/{chunk-P2QGCYS3-XGgiU1Bz.js → chunk-P2QGCYS3-D_D5qEso.js} +1 -1
- package/dashboard/assets/{chunk-POPQ4Y6H-BTXEnGhJ.js → chunk-POPQ4Y6H-CetM-tVm.js} +1 -1
- package/dashboard/assets/{chunk-PWAF6VOD-DYZcGkTL.js → chunk-PWAF6VOD-BcJX4exl.js} +1 -1
- package/dashboard/assets/{chunk-SHT3W25Y-C4WQfwf8.js → chunk-SHT3W25Y-BWQql238.js} +1 -1
- package/dashboard/assets/{chunk-SVP7TREG-C4nCh0-1.js → chunk-SVP7TREG-BSLOD1JE.js} +1 -1
- package/dashboard/assets/{chunk-TICWLB2K-DSB-IiGc.js → chunk-TICWLB2K-DReOl-g_.js} +2 -2
- package/dashboard/assets/{chunk-XXDRQBXY-CS6fjUcj.js → chunk-XXDRQBXY-DSdSMeei.js} +1 -1
- package/dashboard/assets/classDiagram-ZZMXUADV-CRH2kB8G.js +1 -0
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-CRH2kB8G.js +1 -0
- package/dashboard/assets/common-CRRsylCH.js +5 -0
- package/dashboard/assets/cose-bilkent-JH36ORCC-fg-DIBqt.js +1 -0
- package/dashboard/assets/cynefin-OW5HDTMX-XmrbEIFh.js +1 -0
- package/dashboard/assets/{cynefinDiagram-5FMLGOSQ-CgDOOY67.js → cynefinDiagram-5FMLGOSQ-CoQ7QEPl.js} +1 -1
- package/dashboard/assets/cytoscape.esm-BbBREfsg.js +321 -0
- package/dashboard/assets/dagre-D7JM2Yhv.js +1 -0
- package/dashboard/assets/dagre-GXQ25YYZ-qtQtsg6c.js +4 -0
- package/dashboard/assets/{diagram-S7CK7UJ4-CrKqRXZb.js → diagram-S7CK7UJ4-B_ts4_58.js} +2 -2
- package/dashboard/assets/{diagram-UQ7AKVKN-Cu6Es0-v.js → diagram-UQ7AKVKN-DwHbbxFy.js} +1 -1
- package/dashboard/assets/{diagram-VSXAHHWV-eK4d8FwS.js → diagram-VSXAHHWV-2Tg_RG89.js} +1 -1
- package/dashboard/assets/{diagram-VX7I27RA-bFxeFKOc.js → diagram-VX7I27RA-BFYp-YjF.js} +1 -1
- package/dashboard/assets/{diagram-Z3DM3KII-C0ClmnhC.js → diagram-Z3DM3KII-DrPiS4V0.js} +1 -1
- package/dashboard/assets/{dist-BZh8Kb3O.js → dist-cbVssBvx.js} +1 -1
- package/dashboard/assets/{ebnfDiagram-PWID7BFC-CUqxFPzf.js → ebnfDiagram-PWID7BFC-DCMOZtU2.js} +1 -1
- package/dashboard/assets/{erDiagram-RLTQ6QDP-CcYM7pLi.js → erDiagram-RLTQ6QDP-CW4rUJGU.js} +1 -1
- package/dashboard/assets/eventmodeling-NTZA5JFV-C2q-Aaav.js +1 -0
- package/dashboard/assets/flowDiagram-HODETNUW-3NOabgG3.js +1 -0
- package/dashboard/assets/{ganttDiagram-EL5Y4UJY-UmZfbMyD.js → ganttDiagram-EL5Y4UJY-C1AqcwIF.js} +1 -1
- package/dashboard/assets/gitGraph-4MIJSDKK-DYR76gtd.js +1 -0
- package/dashboard/assets/{gitGraphDiagram-WWUBYQGX-CvzeCxVy.js → gitGraphDiagram-WWUBYQGX-B7hL98CE.js} +1 -1
- package/dashboard/assets/info-A6RAGUB7-TXB43LiH.js +1 -0
- package/dashboard/assets/{infoDiagram-27XIBGKW-DjkpNtVW.js → infoDiagram-27XIBGKW-Dk5dXmh_.js} +1 -1
- package/dashboard/assets/{ishikawaDiagram-5VMMS53U-8FhjJaWT.js → ishikawaDiagram-5VMMS53U-BQDuNMka.js} +2 -2
- package/dashboard/assets/{journeyDiagram-3NMN7TZE-DyNJ755f.js → journeyDiagram-3NMN7TZE-DkustddD.js} +1 -1
- package/dashboard/assets/{kanban-definition-UXKFOSKX-_jCmtaY1.js → kanban-definition-UXKFOSKX-BW7Ann84.js} +1 -1
- package/dashboard/assets/{katex-BdBmVSus.js → katex-nLxf_RlZ.js} +2 -2
- package/dashboard/assets/{line-Bf0nxyWf.js → line-DVxcLeru.js} +1 -1
- package/dashboard/assets/linear-DOM_l9bO.js +1 -0
- package/dashboard/assets/mermaid-parser.core-CKg9fDvJ.js +7 -0
- package/dashboard/assets/{mermaid.core-B4yCwiN-.js → mermaid.core-DruW_5-Y.js} +9 -9
- package/dashboard/assets/{mindmap-definition-YA3MSWOX-D5DjWyXj.js → mindmap-definition-YA3MSWOX-Di5W5VB3.js} +1 -1
- package/dashboard/assets/operations-B-t_k60U.js +194 -0
- package/dashboard/assets/operations-D2ZKZFOF.css +1 -0
- package/dashboard/assets/packet-AYTQ26CC-BABwqtNu.js +1 -0
- package/dashboard/assets/{pegDiagram-XKGWAZYB-Bf6a1vaf.js → pegDiagram-XKGWAZYB-Cx4ABT6q.js} +1 -1
- package/dashboard/assets/pie-WAS4IAKB-CNdXyrze.js +1 -0
- package/dashboard/assets/{pieDiagram-E7YTZNPT-D0L1qbch.js → pieDiagram-E7YTZNPT-BilfQbIs.js} +1 -1
- package/dashboard/assets/{quadrantDiagram-AXDQQJYC-CbFyy2Pe.js → quadrantDiagram-AXDQQJYC-BVmMQHE5.js} +1 -1
- package/dashboard/assets/radar-RG4KPBEZ-fKNmDeoK.js +1 -0
- package/dashboard/assets/railroad-74A4TZTK-DhcvDCOh.js +1 -0
- package/dashboard/assets/railroad-abnf-HS5TGJTU-BTRVAmf0.js +1 -0
- package/dashboard/assets/railroad-ebnf-LZEXJU2U-CwS8fgC_.js +1 -0
- package/dashboard/assets/railroad-peg-WCYAUIDC-CXuhXlNp.js +1 -0
- package/dashboard/assets/{railroadDiagram-O6MQD6OU-t7Gp9g2R.js → railroadDiagram-O6MQD6OU-DnBru-jf.js} +1 -1
- package/dashboard/assets/{requirementDiagram-BXWQKSXE-LYmqeBXi.js → requirementDiagram-BXWQKSXE-FwdvUZ7_.js} +1 -1
- package/dashboard/assets/{sankeyDiagram-P5KCCOFB-DnpfA_94.js → sankeyDiagram-P5KCCOFB-BQvDORai.js} +1 -1
- package/dashboard/assets/{sequenceDiagram-WJ2MYXX4-C8s3pTUE.js → sequenceDiagram-WJ2MYXX4-FWYQLzcY.js} +2 -2
- package/dashboard/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/dashboard/assets/src-BwkPhlcp.js +1 -0
- package/dashboard/assets/{stateDiagram-D77RDMKH-BMzm6fK1.js → stateDiagram-D77RDMKH-CjPBd_Sa.js} +1 -1
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-DHmenujm.js +1 -0
- package/dashboard/assets/swimlanes-42K2YHIH-SQLNsa4J.js +1 -0
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-D1bH4ETZ.js +8 -0
- package/dashboard/assets/{timeline-definition-24CTP7MA-BfLJMVeG.js → timeline-definition-24CTP7MA-BxCf20k1.js} +1 -1
- package/dashboard/assets/treeView-Q6P3EWNA-BGLYAyGp.js +1 -0
- package/dashboard/assets/treemap-WGGIJYW6-BlzAwncU.js +1 -0
- package/dashboard/assets/{vennDiagram-4TSXK5OY-BYJRHEaL.js → vennDiagram-4TSXK5OY-D76RIZLz.js} +1 -1
- package/dashboard/assets/wardley-WFR3VGLG-Ba_reiVw.js +1 -0
- package/dashboard/assets/{wardleyDiagram-VM6X3IG4-DgPN4nSe.js → wardleyDiagram-VM6X3IG4-Cux4coOD.js} +1 -1
- package/dashboard/assets/{xychartDiagram-S5SC5T6Z-BhkAMAOT.js → xychartDiagram-S5SC5T6Z-Ch5mvnlH.js} +1 -1
- package/dashboard/index.html +2 -2
- package/package.json +2 -5
- package/chunks/chunk-AV5BF4V7.js +0 -4304
- package/chunks/chunk-CSPF47S3.js +0 -6027
- package/chunks/chunk-ESM447R6.js +0 -77
- package/chunks/chunk-FEOPHBMY.js +0 -56
- package/chunks/chunk-GNR3APR6.js +0 -295
- package/chunks/chunk-IIBNQTOK.js +0 -1532
- package/chunks/chunk-JSTLXPJS.js +0 -284
- package/chunks/chunk-NJLKFC66.js +0 -4790
- package/chunks/chunk-O7Q2G2KW.js +0 -117
- package/chunks/chunk-VIT5ALXF.js +0 -4054
- package/chunks/chunk-YJU7QACE.js +0 -279
- package/chunks/dashboard-B2AEGCFM.js +0 -76
- package/chunks/eval-runner-XVRX3R2Y.js +0 -31
- package/chunks/hunt-scan-DXV5H6YN.js +0 -40
- package/chunks/managed-operation-SQFMBWHG.js +0 -60
- package/chunks/orchestrate-YHFJXGID.js +0 -63
- package/chunks/run-5T4Z3Q2D.js +0 -28242
- package/chunks/service-plugins-BGS6QKSZ.js +0 -64
- package/dashboard/assets/architecture-7GRP2DOG-hcbO-9zX.js +0 -1
- package/dashboard/assets/architectureDiagram-5GKGNRK7-DReOXTSq.js +0 -36
- package/dashboard/assets/channel-CUURBnpZ.js +0 -1
- package/dashboard/assets/chunk-DU6HZSFF-DgfLNaL2.js +0 -127
- package/dashboard/assets/classDiagram-ZZMXUADV-CD1Buc26.js +0 -1
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-CD1Buc26.js +0 -1
- package/dashboard/assets/common-BMdQBwfR.js +0 -5
- package/dashboard/assets/cose-bilkent-JH36ORCC-CUjQHTML.js +0 -1
- package/dashboard/assets/cynefin-OW5HDTMX-BC7zCtFq.js +0 -1
- package/dashboard/assets/cytoscape.esm-CGd-uY3x.js +0 -321
- package/dashboard/assets/dagre-GXQ25YYZ-Dqc8FS9x.js +0 -4
- package/dashboard/assets/dagre-PrKaheQc.js +0 -1
- package/dashboard/assets/eventmodeling-NTZA5JFV-D8ZNnPkV.js +0 -1
- package/dashboard/assets/flowDiagram-HODETNUW-pDb1AYm8.js +0 -1
- package/dashboard/assets/gitGraph-4MIJSDKK-mvNUo0ZA.js +0 -1
- package/dashboard/assets/info-A6RAGUB7-DChKqZMi.js +0 -1
- package/dashboard/assets/linear-Bl6JKbf4.js +0 -1
- package/dashboard/assets/mermaid-parser.core-Cc6sgCzs.js +0 -7
- package/dashboard/assets/operations-B7JAWOi6.js +0 -130
- package/dashboard/assets/operations-QjKT0Hwi.css +0 -1
- package/dashboard/assets/packet-AYTQ26CC-bQXLDhQC.js +0 -1
- package/dashboard/assets/pie-WAS4IAKB-DfzoABIi.js +0 -1
- package/dashboard/assets/radar-RG4KPBEZ-CZ2pyeUT.js +0 -1
- package/dashboard/assets/railroad-74A4TZTK-CP4Jazfd.js +0 -1
- package/dashboard/assets/railroad-abnf-HS5TGJTU-3MvEiHwD.js +0 -1
- package/dashboard/assets/railroad-ebnf-LZEXJU2U-BWto6cXE.js +0 -1
- package/dashboard/assets/railroad-peg-WCYAUIDC-DasEjbyf.js +0 -1
- package/dashboard/assets/sizeCapture-INFHLROL-B0uUizjq.js +0 -1
- package/dashboard/assets/src-CaNUT1AQ.js +0 -1
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-B3REMjpY.js +0 -1
- package/dashboard/assets/swimlanes-42K2YHIH-uJE05Tt_.js +0 -1
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-CIaVMZEy.js +0 -8
- package/dashboard/assets/treeView-Q6P3EWNA-ZOE2enu2.js +0 -1
- package/dashboard/assets/treemap-WGGIJYW6-yIZoPBF5.js +0 -1
- package/dashboard/assets/wardley-WFR3VGLG-D5V-jLbB.js +0 -1
|
@@ -3,7 +3,7 @@ import { createRequire as __0CreateRequire } from "node:module";
|
|
|
3
3
|
const require = __0CreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
isAdmittedSmolvmWorkbench
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3T5R7P4T.js";
|
|
7
7
|
import {
|
|
8
8
|
MESSAGE_CACHE_BREAKPOINTS,
|
|
9
9
|
planMessageBreakpoints,
|
|
@@ -13,7 +13,42 @@ import {
|
|
|
13
13
|
} from "./chunk-RS4MAN3Q.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-S3B6HFSM.js";
|
|
17
|
+
|
|
18
|
+
// packages/core/dist/runtime/request-admission.js
|
|
19
|
+
var LOCAL_ADMISSION_LIMIT = "LOCAL_REQUEST_ADMISSION_LIMIT:";
|
|
20
|
+
var LOCAL_ADMISSION_UNAVAILABLE = "LOCAL_REQUEST_ADMISSION_UNAVAILABLE:";
|
|
21
|
+
function parseRequestAdmission(catalog, model) {
|
|
22
|
+
const data = catalog?.data;
|
|
23
|
+
const row = Array.isArray(data) ? data.find((r) => r?.id === model) : void 0;
|
|
24
|
+
const c = row?.request_admission;
|
|
25
|
+
const integer = (n) => Number.isSafeInteger(n) && Number(n) >= 0;
|
|
26
|
+
if (!c || c.schema !== "0-inference-request-admission-v1" || c.counting !== "utf8_json_body_plus_framing" || !integer(c.max_body_bytes) || c.max_body_bytes < 1 || !(c.max_serialized_input_bytes === null || integer(c.max_serialized_input_bytes) && c.max_serialized_input_bytes > 0) || !integer(c.framing?.base_bytes) || !integer(c.framing?.per_message_bytes) || !integer(c.framing?.per_tool_bytes)) {
|
|
27
|
+
throw new Error("Gateway request admission contract is missing or invalid; no inference request sent");
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
maxBodyBytes: c.max_body_bytes,
|
|
31
|
+
maxSerializedInputBytes: c.max_serialized_input_bytes,
|
|
32
|
+
baseBytes: c.framing.base_bytes,
|
|
33
|
+
perMessageBytes: c.framing.per_message_bytes,
|
|
34
|
+
perToolBytes: c.framing.per_tool_bytes
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function assertRequestAdmission(body, contract) {
|
|
38
|
+
const value = JSON.parse(body);
|
|
39
|
+
const messages = value.messages ?? value.input;
|
|
40
|
+
const bytes = Buffer.byteLength(body, "utf8");
|
|
41
|
+
const inputBytes = bytes + contract.baseBytes + contract.perMessageBytes * (Array.isArray(messages) ? messages.length : 1) + contract.perToolBytes * (Array.isArray(value.tools) ? value.tools.length : 0);
|
|
42
|
+
if (bytes > contract.maxBodyBytes || contract.maxSerializedInputBytes !== null && inputBytes > contract.maxSerializedInputBytes) {
|
|
43
|
+
throw new Error(`${LOCAL_ADMISSION_LIMIT} body=${bytes}, input=${inputBytes}; exceeds gateway byte limit before dispatch`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function isLocalAdmissionLimit(error) {
|
|
47
|
+
return error?.startsWith(LOCAL_ADMISSION_LIMIT) === true;
|
|
48
|
+
}
|
|
49
|
+
function isLocalAdmissionFailure(error) {
|
|
50
|
+
return isLocalAdmissionLimit(error) || error?.startsWith(LOCAL_ADMISSION_UNAVAILABLE) === true;
|
|
51
|
+
}
|
|
17
52
|
|
|
18
53
|
// packages/core/dist/agent/feature-presets.js
|
|
19
54
|
var FP_MOAT_FLAGS = [
|
|
@@ -2253,7 +2288,7 @@ function detectProvider(configApiKey, preferredModel, env2, configProvider) {
|
|
|
2253
2288
|
throw new Error(`${source} is unsupported: ${pinnedProviderRaw}`);
|
|
2254
2289
|
}
|
|
2255
2290
|
const provider = pinnedProviderRaw;
|
|
2256
|
-
const model = preferredModel ?? env2["ZERO_MODEL"] ?? (provider === "azure" ? env2.AZURE_OPENAI_MODEL ?? parseCodexAzureConfig(env2).model : void 0) ?? (configProvider !== void 0 ? DEFAULT_PROVIDER_MODELS[provider] : void 0);
|
|
2291
|
+
const model = preferredModel ?? env2["ZERO_MODEL"] ?? (provider === "azure" ? env2.AZURE_OPENAI_MODEL ?? parseCodexAzureConfig(env2).model : provider === "openai" ? env2.OPENAI_MODEL : void 0) ?? (configProvider !== void 0 ? DEFAULT_PROVIDER_MODELS[provider] : void 0);
|
|
2257
2292
|
if (model === void 0 || model === "") {
|
|
2258
2293
|
if (provider === "azure")
|
|
2259
2294
|
throw new Error("Choose an Azure deployment model in Connections to finish setup.");
|
|
@@ -2291,7 +2326,7 @@ function detectProvider(configApiKey, preferredModel, env2, configProvider) {
|
|
|
2291
2326
|
provider: "openai",
|
|
2292
2327
|
apiKey: configApiKey,
|
|
2293
2328
|
baseUrl: "https://api.openai.com/v1",
|
|
2294
|
-
defaultModel: DEFAULT_OPENAI_MODEL,
|
|
2329
|
+
defaultModel: env2.OPENAI_MODEL ?? DEFAULT_OPENAI_MODEL,
|
|
2295
2330
|
wireApi: openAICompatibleWireApi(env2, "OPENAI_WIRE_API")
|
|
2296
2331
|
};
|
|
2297
2332
|
}
|
|
@@ -2415,7 +2450,7 @@ function detectProvider(configApiKey, preferredModel, env2, configProvider) {
|
|
|
2415
2450
|
provider: "openai",
|
|
2416
2451
|
apiKey: env2.OPENAI_API_KEY,
|
|
2417
2452
|
baseUrl: env2.OPENAI_BASE_URL ?? "https://api.openai.com/v1",
|
|
2418
|
-
defaultModel: DEFAULT_OPENAI_MODEL,
|
|
2453
|
+
defaultModel: env2.OPENAI_MODEL ?? DEFAULT_OPENAI_MODEL,
|
|
2419
2454
|
wireApi: openAICompatibleWireApi(env2, "OPENAI_WIRE_API")
|
|
2420
2455
|
};
|
|
2421
2456
|
default:
|
|
@@ -2477,7 +2512,7 @@ function detectProvider(configApiKey, preferredModel, env2, configProvider) {
|
|
|
2477
2512
|
provider: "openai",
|
|
2478
2513
|
apiKey: openaiKey,
|
|
2479
2514
|
baseUrl: env2.OPENAI_BASE_URL ?? "https://api.openai.com/v1",
|
|
2480
|
-
defaultModel: DEFAULT_OPENAI_MODEL,
|
|
2515
|
+
defaultModel: env2.OPENAI_MODEL ?? DEFAULT_OPENAI_MODEL,
|
|
2481
2516
|
wireApi: openAICompatibleWireApi(env2, "OPENAI_WIRE_API")
|
|
2482
2517
|
};
|
|
2483
2518
|
}
|
|
@@ -2587,7 +2622,10 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2587
2622
|
config;
|
|
2588
2623
|
// Not readonly: a live provider switch re-freezes env from the new account.
|
|
2589
2624
|
env;
|
|
2625
|
+
requestAdmission;
|
|
2626
|
+
requestAdmissionIdentity;
|
|
2590
2627
|
codexAuthState;
|
|
2628
|
+
grantedProviderTransport;
|
|
2591
2629
|
workbenchProviderProxy;
|
|
2592
2630
|
geminiAuthState;
|
|
2593
2631
|
provider;
|
|
@@ -2622,6 +2660,7 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2622
2660
|
};
|
|
2623
2661
|
this.env = inherited.env;
|
|
2624
2662
|
this.workbenchProviderProxy = inherited.workbenchProviderProxy;
|
|
2663
|
+
this.grantedProviderTransport = inherited.grantedProviderTransport;
|
|
2625
2664
|
this.provider = inherited.provider;
|
|
2626
2665
|
this.apiKey = inherited.apiKey;
|
|
2627
2666
|
this.baseUrl = inherited.baseUrl;
|
|
@@ -2660,7 +2699,33 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2660
2699
|
...config,
|
|
2661
2700
|
...config.agentModels ? { agentModels: Object.freeze({ ...config.agentModels }) } : {}
|
|
2662
2701
|
};
|
|
2702
|
+
this.grantedProviderTransport = config.providerTransport;
|
|
2703
|
+
if (config.providerTransport) {
|
|
2704
|
+
const grant = config.providerTransport;
|
|
2705
|
+
if (grant.provider !== "chatgpt-codex" || config.provider && config.provider !== grant.provider || !config.model || !grant.models.includes(config.model))
|
|
2706
|
+
throw new Error("Model is outside the explicit provider transport grant");
|
|
2707
|
+
for (const model of Object.values(config.agentModels ?? {}))
|
|
2708
|
+
if (model !== "auto" && !grant.models.includes(model))
|
|
2709
|
+
throw new Error("Worker model is outside the explicit provider transport grant");
|
|
2710
|
+
this.env = Object.freeze({ ZERO_SKIP_PROVIDER_BANNER: "1" });
|
|
2711
|
+
this.workbenchProviderProxy = void 0;
|
|
2712
|
+
this.azureConfig = parseCodexAzureConfig({});
|
|
2713
|
+
this.fallbackChain = [];
|
|
2714
|
+
this.fallbackIndex = 0;
|
|
2715
|
+
this.provider = grant.provider;
|
|
2716
|
+
this.apiKey = "";
|
|
2717
|
+
this.baseUrl = "https://provider-relay.invalid";
|
|
2718
|
+
this.wireApi = "responses";
|
|
2719
|
+
this.model = config.model;
|
|
2720
|
+
this.codexAuthState = void 0;
|
|
2721
|
+
this.geminiAuthState = void 0;
|
|
2722
|
+
this.reasoningEffort = void 0;
|
|
2723
|
+
this.serverCompactionTokens = config.serverCompactionTokens === void 0 ? void 0 : Math.max(1e3, config.serverCompactionTokens);
|
|
2724
|
+
return;
|
|
2725
|
+
}
|
|
2663
2726
|
this.env = Object.freeze({ ...process.env, ...config.env });
|
|
2727
|
+
this.requestAdmission = void 0;
|
|
2728
|
+
this.requestAdmissionIdentity = void 0;
|
|
2664
2729
|
this.workbenchProviderProxy = resolveWorkbenchProviderProxy(this.env);
|
|
2665
2730
|
this.azureConfig = parseCodexAzureConfig(this.env);
|
|
2666
2731
|
this.fallbackChain = (this.workbenchProviderProxy ? [] : getFallbackChain(this.env)).map((entry) => ({
|
|
@@ -2709,6 +2774,8 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2709
2774
|
}
|
|
2710
2775
|
/** Non-secret identity for preferences scoped to the captured connection. */
|
|
2711
2776
|
connectionIdentity() {
|
|
2777
|
+
if (this.grantedProviderTransport)
|
|
2778
|
+
return this.grantedProviderTransport.identity;
|
|
2712
2779
|
let identity;
|
|
2713
2780
|
if (this.provider === "chatgpt-codex") {
|
|
2714
2781
|
const state = this.codexAuthState;
|
|
@@ -2765,7 +2832,7 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2765
2832
|
const state = this.codexAuthState;
|
|
2766
2833
|
if (this.provider !== "chatgpt-codex" || !state)
|
|
2767
2834
|
throw new Error("No active Codex subscription");
|
|
2768
|
-
const { loadCodexModelCatalog } = await import("./codex-models-
|
|
2835
|
+
const { loadCodexModelCatalog } = await import("./codex-models-KCUIVS3R.js");
|
|
2769
2836
|
return loadCodexModelCatalog({ signal, resolveCredentials: () => refreshChatGptCodexAuthState(state) });
|
|
2770
2837
|
}
|
|
2771
2838
|
/** Discover endpoint inventory; Cline explicitly marks its public catalog provenance. */
|
|
@@ -2796,7 +2863,12 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2796
2863
|
* model / provider / role map with zero session teardown. Undefined fields
|
|
2797
2864
|
* preserve the current state, except a provider change resets an omitted model.
|
|
2798
2865
|
*/
|
|
2866
|
+
useGrantedProviderTransport(transport, selection = {}) {
|
|
2867
|
+
this.applyConfiguration({ ...this.config, apiKey: void 0, env: {}, providerTransport: transport, provider: transport.provider, model: selection.model ?? this.model, ...selection });
|
|
2868
|
+
}
|
|
2799
2869
|
reconfigure(sel) {
|
|
2870
|
+
if (this.grantedProviderTransport && (sel.provider && sel.provider !== this.grantedProviderTransport.provider || sel.model && !this.grantedProviderTransport.models.includes(sel.model) || Object.values(sel.agentModels ?? {}).some((model) => model !== "auto" && !this.grantedProviderTransport.models.includes(model))))
|
|
2871
|
+
throw new Error("Selection is outside the explicit provider transport grant");
|
|
2800
2872
|
const providerChanged = sel.provider !== void 0 && sel.provider !== this.provider;
|
|
2801
2873
|
if (providerChanged) {
|
|
2802
2874
|
const merged = {
|
|
@@ -2864,6 +2936,8 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2864
2936
|
* failover chain uses — including auth-only providers (chatgpt-codex OAuth).
|
|
2865
2937
|
*/
|
|
2866
2938
|
accessibleProviders() {
|
|
2939
|
+
if (this.grantedProviderTransport)
|
|
2940
|
+
return [this.grantedProviderTransport.provider];
|
|
2867
2941
|
if (this.workbenchProviderProxy)
|
|
2868
2942
|
return ["chatgpt-codex"];
|
|
2869
2943
|
const out = [];
|
|
@@ -2882,6 +2956,8 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2882
2956
|
* provider has creds, so this is a helpful starting set, not the whole bound.
|
|
2883
2957
|
*/
|
|
2884
2958
|
accessibleModels() {
|
|
2959
|
+
if (this.grantedProviderTransport)
|
|
2960
|
+
return [...this.grantedProviderTransport.models];
|
|
2885
2961
|
if (this.workbenchProviderProxy)
|
|
2886
2962
|
return [this.workbenchProviderProxy.model];
|
|
2887
2963
|
const models = /* @__PURE__ */ new Set();
|
|
@@ -2901,6 +2977,8 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
2901
2977
|
* accessible defaults as a fallback for ids the router does not pattern-match.
|
|
2902
2978
|
*/
|
|
2903
2979
|
isModelAccessible(model) {
|
|
2980
|
+
if (this.grantedProviderTransport)
|
|
2981
|
+
return this.grantedProviderTransport.models.includes(model);
|
|
2904
2982
|
if (this.workbenchProviderProxy)
|
|
2905
2983
|
return this.accessibleModels().includes(model);
|
|
2906
2984
|
if (providerForModel(model, this.env) !== void 0)
|
|
@@ -3183,6 +3261,8 @@ var LlmApiRuntime = class _LlmApiRuntime {
|
|
|
3183
3261
|
for (const block of message.content) {
|
|
3184
3262
|
if (block.type === "text") {
|
|
3185
3263
|
parts.push({ text: block.text });
|
|
3264
|
+
} else if (block.type === "image") {
|
|
3265
|
+
parts.push({ inlineData: { mimeType: block.mediaType, data: block.data } });
|
|
3186
3266
|
} else if (block.type === "tool_use") {
|
|
3187
3267
|
toolNames.set(block.id, block.name);
|
|
3188
3268
|
upstreamCallIds.set(block.id, block.id);
|
|
@@ -3401,27 +3481,68 @@ Missing: ${missing.join("; ")}
|
|
|
3401
3481
|
* Headers are re-resolved per attempt (via ensureFreshHeaders → OAuth
|
|
3402
3482
|
* refresh) so a token that rotated during the wait is picked up.
|
|
3403
3483
|
*/
|
|
3484
|
+
async gatewayRequestAdmission(signal) {
|
|
3485
|
+
if (this.workbenchProviderProxy)
|
|
3486
|
+
throw new Error(`${LOCAL_ADMISSION_UNAVAILABLE} gateway admission cannot use a workbench proxy; no inference request sent`);
|
|
3487
|
+
const model = this.model;
|
|
3488
|
+
const baseUrl = this.baseUrl;
|
|
3489
|
+
const identity = JSON.stringify([this.provider, baseUrl, model, this.wireApi]);
|
|
3490
|
+
if (!this.requestAdmission || this.requestAdmissionIdentity !== identity) {
|
|
3491
|
+
this.requestAdmissionIdentity = identity;
|
|
3492
|
+
const pending = (async () => {
|
|
3493
|
+
try {
|
|
3494
|
+
const response = await fetch(`${baseUrl.replace(/\/+$/, "")}/models`, {
|
|
3495
|
+
headers: await this.ensureFreshHeaders(),
|
|
3496
|
+
signal,
|
|
3497
|
+
redirect: "error"
|
|
3498
|
+
});
|
|
3499
|
+
if (!response.ok)
|
|
3500
|
+
throw new Error(`${LOCAL_ADMISSION_UNAVAILABLE} catalog HTTP ${response.status}; no inference request sent`);
|
|
3501
|
+
return parseRequestAdmission(await response.json(), model);
|
|
3502
|
+
} catch (error) {
|
|
3503
|
+
if (error instanceof Error && error.message.startsWith(LOCAL_ADMISSION_UNAVAILABLE))
|
|
3504
|
+
throw error;
|
|
3505
|
+
throw new Error(`${LOCAL_ADMISSION_UNAVAILABLE} catalog unavailable or invalid; no inference request sent`);
|
|
3506
|
+
}
|
|
3507
|
+
})();
|
|
3508
|
+
this.requestAdmission = pending;
|
|
3509
|
+
void pending.catch(() => {
|
|
3510
|
+
if (this.requestAdmission === pending && this.requestAdmissionIdentity === identity) {
|
|
3511
|
+
this.requestAdmission = void 0;
|
|
3512
|
+
this.requestAdmissionIdentity = void 0;
|
|
3513
|
+
}
|
|
3514
|
+
});
|
|
3515
|
+
}
|
|
3516
|
+
return this.requestAdmission;
|
|
3517
|
+
}
|
|
3404
3518
|
async postWithRetry(bodyFactory, signal, abort) {
|
|
3405
3519
|
let waited429Ms = 0;
|
|
3406
3520
|
let waitedOtherMs = 0;
|
|
3407
3521
|
for (let attempt = 0; ; attempt++) {
|
|
3408
3522
|
abort?.throwIfCancelled();
|
|
3523
|
+
const body = bodyFactory();
|
|
3524
|
+
if (this.env["ZERO_REQUIRE_REQUEST_ADMISSION"] === "1") {
|
|
3525
|
+
assertRequestAdmission(body, await this.gatewayRequestAdmission(signal));
|
|
3526
|
+
}
|
|
3409
3527
|
let res;
|
|
3410
3528
|
try {
|
|
3411
|
-
res = this.workbenchProviderProxy ? await fetch(this.workbenchProviderProxy.url, {
|
|
3529
|
+
res = this.grantedProviderTransport ? await this.grantedProviderTransport.request({ provider: "chatgpt-codex", model: this.model, body }, signal) : this.workbenchProviderProxy ? await fetch(this.workbenchProviderProxy.url, {
|
|
3412
3530
|
method: "POST",
|
|
3413
3531
|
redirect: "error",
|
|
3414
3532
|
headers: { "Content-Type": "application/json" },
|
|
3415
|
-
body: JSON.stringify({ provider: this.provider, model: this.model, body
|
|
3533
|
+
body: JSON.stringify({ provider: this.provider, model: this.model, body }),
|
|
3416
3534
|
signal
|
|
3417
3535
|
}) : await fetch(this.buildUrl(), {
|
|
3418
3536
|
method: "POST",
|
|
3419
3537
|
headers: await this.ensureFreshHeaders(),
|
|
3420
|
-
body
|
|
3538
|
+
body,
|
|
3421
3539
|
signal
|
|
3422
3540
|
});
|
|
3423
3541
|
} catch (error) {
|
|
3424
3542
|
abort?.throwIfCancelled();
|
|
3543
|
+
if (this.env["ZERO_REQUIRE_RETRY_SAFE_RECEIPT"] === "1") {
|
|
3544
|
+
throw new Error(`${this.providerLabel} request outcome may be unknown. Automatic replay is disabled`, { cause: error });
|
|
3545
|
+
}
|
|
3425
3546
|
const cause = error instanceof Error ? error.cause : void 0;
|
|
3426
3547
|
const causeCode = cause && typeof cause === "object" && "code" in cause && typeof cause.code === "string" ? cause.code : "unknown";
|
|
3427
3548
|
const causeHost = cause && typeof cause === "object" && "hostname" in cause && typeof cause.hostname === "string" ? `@${cause.hostname}` : "";
|
|
@@ -3445,6 +3566,10 @@ Missing: ${missing.join("; ")}
|
|
|
3445
3566
|
cause: error
|
|
3446
3567
|
});
|
|
3447
3568
|
}
|
|
3569
|
+
if (!res.ok && this.env["ZERO_REQUIRE_RETRY_SAFE_RECEIPT"] === "1" && res.headers.get("x-0-retry-safe") !== "1") {
|
|
3570
|
+
await res.body?.cancel();
|
|
3571
|
+
throw new Error(`${this.providerLabel} gateway HTTP ${res.status}; request outcome may be unknown. Automatic replay is disabled`);
|
|
3572
|
+
}
|
|
3448
3573
|
if (res.ok || !isRetryableHttpStatus(res.status)) {
|
|
3449
3574
|
return res;
|
|
3450
3575
|
}
|
|
@@ -3542,14 +3667,14 @@ Missing: ${missing.join("; ")}
|
|
|
3542
3667
|
if (context?.signal?.aborted) {
|
|
3543
3668
|
return { output: "", exitCode: null, timedOut: false, durationMs: 0, error: "API execution cancelled." };
|
|
3544
3669
|
}
|
|
3545
|
-
if (this.workbenchProviderProxy) {
|
|
3670
|
+
if (this.grantedProviderTransport || this.workbenchProviderProxy) {
|
|
3546
3671
|
const result = await this.executeNative(context?.systemPrompt ?? "", [
|
|
3547
3672
|
{ role: "user", content: [{ type: "text", text: prompt }] }
|
|
3548
3673
|
], [], void 0, context?.signal);
|
|
3549
3674
|
return {
|
|
3550
3675
|
output: result.content.filter((block) => block.type === "text").map((block) => block.text).join("\n"),
|
|
3551
3676
|
exitCode: result.cancelled ? null : result.stopReason === "error" ? 1 : 0,
|
|
3552
|
-
timedOut:
|
|
3677
|
+
timedOut: result.timedOut === true,
|
|
3553
3678
|
durationMs: Date.now() - start,
|
|
3554
3679
|
usage: result.usage,
|
|
3555
3680
|
error: result.error
|
|
@@ -3689,7 +3814,7 @@ Missing: ${missing.join("; ")}
|
|
|
3689
3814
|
};
|
|
3690
3815
|
}
|
|
3691
3816
|
const msg = err instanceof Error ? err.message : String(err);
|
|
3692
|
-
const timedOut = msg.includes("abort") || msg.includes("timeout");
|
|
3817
|
+
const timedOut = controller.signal.aborted || msg.includes("abort") || msg.includes("timeout");
|
|
3693
3818
|
return {
|
|
3694
3819
|
output: "",
|
|
3695
3820
|
exitCode: 1,
|
|
@@ -3720,6 +3845,11 @@ Missing: ${missing.join("; ")}
|
|
|
3720
3845
|
let attempt = 0;
|
|
3721
3846
|
for (attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
3722
3847
|
result = await this.executeNativeAttempt(system, messages, tools, callbacks, signal);
|
|
3848
|
+
if (isLocalAdmissionFailure(result.error))
|
|
3849
|
+
return result;
|
|
3850
|
+
if (this.env["ZERO_REQUIRE_RETRY_SAFE_RECEIPT"] === "1" && (result.stopReason === "error" || result.error)) {
|
|
3851
|
+
return { ...result, error: `${result.error ?? "Incomplete gateway response"}. Request outcome may be unknown. Automatic replay is disabled` };
|
|
3852
|
+
}
|
|
3723
3853
|
if (attempt >= maxAttempts || !shouldRetryNativeStream(result) || signal?.aborted)
|
|
3724
3854
|
break;
|
|
3725
3855
|
const backoff = streamRetryBackoffMs(attempt);
|
|
@@ -3755,6 +3885,10 @@ Missing: ${missing.join("; ")}
|
|
|
3755
3885
|
const chatMessages = [];
|
|
3756
3886
|
chatMessages.push({ role: "system", content: system });
|
|
3757
3887
|
for (const m of messages) {
|
|
3888
|
+
if (m.role === "user" && m.content.some((block) => block.type === "image") && m.content.every((block) => block.type === "text" || block.type === "image")) {
|
|
3889
|
+
chatMessages.push({ role: "user", content: m.content.map((block) => block.type === "image" ? { type: "image_url", image_url: { url: `data:${block.mediaType};base64,${block.data}` } } : { type: "text", text: block.type === "text" ? block.text : "" }) });
|
|
3890
|
+
continue;
|
|
3891
|
+
}
|
|
3758
3892
|
const pendingToolCalls = [];
|
|
3759
3893
|
let pendingAssistantText = null;
|
|
3760
3894
|
const flushAssistant = () => {
|
|
@@ -3779,6 +3913,9 @@ Missing: ${missing.join("; ")}
|
|
|
3779
3913
|
flushAssistant();
|
|
3780
3914
|
chatMessages.push({ role: m.role, content: block.text });
|
|
3781
3915
|
}
|
|
3916
|
+
} else if (block.type === "image") {
|
|
3917
|
+
flushAssistant();
|
|
3918
|
+
chatMessages.push({ role: m.role, content: [{ type: "image_url", image_url: { url: `data:${block.mediaType};base64,${block.data}` } }] });
|
|
3782
3919
|
} else if (block.type === "tool_use") {
|
|
3783
3920
|
pendingToolCalls.push({
|
|
3784
3921
|
id: block.id,
|
|
@@ -3836,6 +3973,8 @@ Missing: ${missing.join("; ")}
|
|
|
3836
3973
|
for (const block of m.content) {
|
|
3837
3974
|
if (block.type === "text") {
|
|
3838
3975
|
textBlocks.push({ type: textType, text: block.text });
|
|
3976
|
+
} else if (block.type === "image") {
|
|
3977
|
+
textBlocks.push({ type: "input_image", image_url: `data:${block.mediaType};base64,${block.data}` });
|
|
3839
3978
|
} else if (block.type === "tool_use") {
|
|
3840
3979
|
if (textBlocks.length > 0) {
|
|
3841
3980
|
input.push({ role: m.role, content: [...textBlocks] });
|
|
@@ -3991,6 +4130,8 @@ Missing: ${missing.join("; ")}
|
|
|
3991
4130
|
content: m.content.map((block) => {
|
|
3992
4131
|
if (block.type === "text")
|
|
3993
4132
|
return { type: "text", text: block.text };
|
|
4133
|
+
if (block.type === "image")
|
|
4134
|
+
return { type: "image", source: { type: "base64", media_type: block.mediaType, data: block.data } };
|
|
3994
4135
|
if (block.type === "tool_use") {
|
|
3995
4136
|
return { type: "tool_use", id: block.id, name: block.name, input: block.input };
|
|
3996
4137
|
}
|
|
@@ -4169,6 +4310,14 @@ Missing: ${missing.join("; ")}
|
|
|
4169
4310
|
};
|
|
4170
4311
|
} catch (err) {
|
|
4171
4312
|
clearTimeout(timer);
|
|
4313
|
+
if (err instanceof Error && isLocalAdmissionFailure(err.message))
|
|
4314
|
+
return {
|
|
4315
|
+
content: [],
|
|
4316
|
+
stopReason: "error",
|
|
4317
|
+
durationMs: Date.now() - start,
|
|
4318
|
+
error: err.message,
|
|
4319
|
+
...call.operatorAborted() ? { cancelled: true } : {}
|
|
4320
|
+
};
|
|
4172
4321
|
if (err instanceof OperatorAbortError || call.operatorAborted()) {
|
|
4173
4322
|
return this.cancelledResult(start);
|
|
4174
4323
|
}
|
|
@@ -4181,11 +4330,12 @@ Missing: ${missing.join("; ")}
|
|
|
4181
4330
|
};
|
|
4182
4331
|
}
|
|
4183
4332
|
const msg = err instanceof Error ? err.message : String(err);
|
|
4184
|
-
const timedOut = msg.includes("abort") || msg.includes("timeout");
|
|
4333
|
+
const timedOut = controller.signal.aborted || msg.includes("abort") || msg.includes("timeout");
|
|
4185
4334
|
return {
|
|
4186
4335
|
content: [{ type: "text", text: "" }],
|
|
4187
4336
|
stopReason: "error",
|
|
4188
4337
|
durationMs: Date.now() - start,
|
|
4338
|
+
...timedOut ? { timedOut: true } : {},
|
|
4189
4339
|
error: timedOut ? `${this.providerLabel} API request timed out` : `${this.providerLabel} API error: ${msg}`
|
|
4190
4340
|
};
|
|
4191
4341
|
} finally {
|
|
@@ -4202,6 +4352,17 @@ Missing: ${missing.join("; ")}
|
|
|
4202
4352
|
error: `${this.providerLabel} API error: missing response body`
|
|
4203
4353
|
};
|
|
4204
4354
|
}
|
|
4355
|
+
let cancellationRequested = false;
|
|
4356
|
+
const cancelReader = () => {
|
|
4357
|
+
if (cancellationRequested)
|
|
4358
|
+
return;
|
|
4359
|
+
cancellationRequested = true;
|
|
4360
|
+
try {
|
|
4361
|
+
void reader.cancel().catch(() => {
|
|
4362
|
+
});
|
|
4363
|
+
} catch {
|
|
4364
|
+
}
|
|
4365
|
+
};
|
|
4205
4366
|
const idleTimeoutMs = opts?.idleTimeoutMs ?? llmStreamIdleTimeoutMs();
|
|
4206
4367
|
const eventIdleTimeoutMs = opts?.eventIdleTimeoutMs ?? llmStreamEventIdleTimeoutMs();
|
|
4207
4368
|
let lastEventAt = Date.now();
|
|
@@ -4240,11 +4401,12 @@ Missing: ${missing.join("; ")}
|
|
|
4240
4401
|
// for a body that is buffered, mocked, or already fully delivered.
|
|
4241
4402
|
...operatorSignal && detach ? [
|
|
4242
4403
|
new Promise((_resolve, reject) => {
|
|
4404
|
+
const abortError = () => opts?.abort?.operatorAborted() ? new OperatorAbortError() : new DOMException("Request deadline aborted the stream", "AbortError");
|
|
4243
4405
|
if (operatorSignal.aborted) {
|
|
4244
|
-
reject(
|
|
4406
|
+
reject(abortError());
|
|
4245
4407
|
return;
|
|
4246
4408
|
}
|
|
4247
|
-
operatorSignal.addEventListener("abort", () => reject(
|
|
4409
|
+
operatorSignal.addEventListener("abort", () => reject(abortError()), { once: true, signal: detach.signal });
|
|
4248
4410
|
})
|
|
4249
4411
|
] : []
|
|
4250
4412
|
]);
|
|
@@ -4295,17 +4457,11 @@ Missing: ${missing.join("; ")}
|
|
|
4295
4457
|
chunk = await readBounded();
|
|
4296
4458
|
} catch (err) {
|
|
4297
4459
|
if (err instanceof OperatorAbortError || opts?.abort?.operatorAborted()) {
|
|
4298
|
-
|
|
4299
|
-
await reader.cancel();
|
|
4300
|
-
} catch {
|
|
4301
|
-
}
|
|
4460
|
+
cancelReader();
|
|
4302
4461
|
throw err instanceof OperatorAbortError ? err : new OperatorAbortError();
|
|
4303
4462
|
}
|
|
4304
4463
|
if (stalled) {
|
|
4305
|
-
|
|
4306
|
-
await reader.cancel();
|
|
4307
|
-
} catch {
|
|
4308
|
-
}
|
|
4464
|
+
cancelReader();
|
|
4309
4465
|
const secs = Math.round(stallIdleMs / 1e3);
|
|
4310
4466
|
diag.warn("stream_stalled", `${this.providerLabel} stream stalled \u2014 no SSE events for ${secs}s (server hold; aborting call)`, {
|
|
4311
4467
|
provider: this.providerLabel,
|
|
@@ -4319,6 +4475,7 @@ Missing: ${missing.join("; ")}
|
|
|
4319
4475
|
error: `${this.providerLabel} stream stalled \u2014 no SSE events for ${secs}s (server accepted but held the stream; transient)`
|
|
4320
4476
|
};
|
|
4321
4477
|
}
|
|
4478
|
+
cancelReader();
|
|
4322
4479
|
throw err;
|
|
4323
4480
|
}
|
|
4324
4481
|
const { done, value } = chunk;
|
|
@@ -4358,6 +4515,10 @@ Missing: ${missing.join("; ")}
|
|
|
4358
4515
|
if (eventTypes.size < 32)
|
|
4359
4516
|
eventTypes.add(identifier(type) ?? "unrecognized");
|
|
4360
4517
|
const terminal = type === "response.completed" || this.provider === "openrouter" && type === "response.done";
|
|
4518
|
+
if (completedResponse && (type === "response.output_text.delta" || type === "response.content_part.delta" || type === "response.output_item.added" || type === "response.output_item.done" || type === "response.reasoning_summary_text.delta" || type === "response.reasoning_summary_text.done")) {
|
|
4519
|
+
streamFailure = { event: type, status: null, code: "output_after_completion", errorType: null, reason: null };
|
|
4520
|
+
break responses;
|
|
4521
|
+
}
|
|
4361
4522
|
if (terminal || type === "response.failed" || type === "response.incomplete" || type === "error") {
|
|
4362
4523
|
const response = event.response && typeof event.response === "object" && !Array.isArray(event.response) ? event.response : void 0;
|
|
4363
4524
|
const usage = response?.usage;
|
|
@@ -4430,11 +4591,22 @@ Missing: ${missing.join("; ")}
|
|
|
4430
4591
|
continue;
|
|
4431
4592
|
}
|
|
4432
4593
|
}
|
|
4594
|
+
if (completedResponse)
|
|
4595
|
+
break;
|
|
4433
4596
|
}
|
|
4597
|
+
if (completedResponse || outputCapResponse || streamFailure)
|
|
4598
|
+
cancelReader();
|
|
4434
4599
|
emitThinking(true);
|
|
4600
|
+
if (!outputCapResponse && opts?.abort?.operatorAborted()) {
|
|
4601
|
+
cancelReader();
|
|
4602
|
+
return { ...this.cancelledResult(start), ...responseUsage ? { usage: responseUsage } : {} };
|
|
4603
|
+
}
|
|
4604
|
+
if (opts?.abort?.signal.aborted && !opts.abort.operatorAborted()) {
|
|
4605
|
+
cancelReader();
|
|
4606
|
+
throw new DOMException("Request deadline aborted the stream", "AbortError");
|
|
4607
|
+
}
|
|
4435
4608
|
if (outputCapResponse) {
|
|
4436
|
-
|
|
4437
|
-
});
|
|
4609
|
+
cancelReader();
|
|
4438
4610
|
const finalOutput = Array.isArray(outputCapResponse.output) ? outputCapResponse.output : [];
|
|
4439
4611
|
const output = finalOutput.length > 0 ? finalOutput : streamedOutputItems;
|
|
4440
4612
|
let finalText = "";
|
|
@@ -4474,8 +4646,7 @@ Missing: ${missing.join("; ")}
|
|
|
4474
4646
|
}
|
|
4475
4647
|
if (!completedResponse || streamFailure) {
|
|
4476
4648
|
if (streamFailure) {
|
|
4477
|
-
|
|
4478
|
-
});
|
|
4649
|
+
cancelReader();
|
|
4479
4650
|
}
|
|
4480
4651
|
appendNativeTrace({
|
|
4481
4652
|
kind: "native-response-stream-error",
|
|
@@ -4558,6 +4729,12 @@ Missing: ${missing.join("; ")}
|
|
|
4558
4729
|
thinkingText = reasoningSummaries.join("\n");
|
|
4559
4730
|
emitThinking(true);
|
|
4560
4731
|
}
|
|
4732
|
+
if (opts?.abort?.operatorAborted()) {
|
|
4733
|
+
return { ...this.cancelledResult(start), ...responseUsage ? { usage: responseUsage } : {} };
|
|
4734
|
+
}
|
|
4735
|
+
if (opts?.abort?.signal.aborted) {
|
|
4736
|
+
throw new DOMException("Request deadline aborted the stream", "AbortError");
|
|
4737
|
+
}
|
|
4561
4738
|
return {
|
|
4562
4739
|
content,
|
|
4563
4740
|
stopReason: content.some((item) => item.type === "tool_use") ? "tool_use" : "end_turn",
|
|
@@ -4578,7 +4755,7 @@ Missing: ${missing.join("; ")}
|
|
|
4578
4755
|
};
|
|
4579
4756
|
}
|
|
4580
4757
|
async isAvailable() {
|
|
4581
|
-
if (this.workbenchProviderProxy)
|
|
4758
|
+
if (this.grantedProviderTransport || this.workbenchProviderProxy)
|
|
4582
4759
|
return true;
|
|
4583
4760
|
if (this.provider === "chatgpt-codex") {
|
|
4584
4761
|
return this.codexAuthState !== void 0;
|
|
@@ -4588,6 +4765,8 @@ Missing: ${missing.join("; ")}
|
|
|
4588
4765
|
};
|
|
4589
4766
|
|
|
4590
4767
|
export {
|
|
4768
|
+
isLocalAdmissionLimit,
|
|
4769
|
+
isLocalAdmissionFailure,
|
|
4591
4770
|
FEATURE_PRESETS,
|
|
4592
4771
|
resolveFeaturePreset,
|
|
4593
4772
|
applyFeaturePreset,
|