0sec-cli 0.25.0 → 0.26.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.
Files changed (187) hide show
  1. package/0.js +41 -40
  2. package/chunks/{adapt-loop-L2PXCD4J.js → adapt-loop-P4HKONB5.js} +4 -4
  3. package/chunks/{artifact-scraper-W3LGLXBM.js → artifact-scraper-IIRJNYKT.js} +2 -2
  4. package/chunks/{assumption-mining-7IJ6ZWZE.js → assumption-mining-YA6VJ2V6.js} +17 -17
  5. package/chunks/{backend-connections-MYH4QRQG.js → backend-connections-64PKYKL7.js} +3 -3
  6. package/chunks/{chunk-EEP6GBUO.js → chunk-3MWQNNJU.js} +151 -58
  7. package/chunks/{chunk-ZZV56ACK.js → chunk-3VQ5EZKG.js} +9 -9
  8. package/chunks/{chunk-I4VIAQHM.js → chunk-6GV5G6U3.js} +1 -1
  9. package/chunks/{chunk-OFPF26WL.js → chunk-6SNOKNCS.js} +2 -2
  10. package/chunks/{chunk-YXTV2FRE.js → chunk-72PU46MS.js} +66 -112
  11. package/chunks/{chunk-NO543ZBU.js → chunk-A7G6S5RA.js} +1 -1
  12. package/chunks/{chunk-ITEMDJAB.js → chunk-AFJ2UMPR.js} +2 -2
  13. package/chunks/{chunk-FOLTHXRH.js → chunk-B7XL6RON.js} +1 -1
  14. package/chunks/{chunk-76CLUI54.js → chunk-BM6EYP2D.js} +3 -3
  15. package/chunks/{chunk-NBLKIQCW.js → chunk-D4M5WURF.js} +2 -2
  16. package/chunks/{chunk-DHNYJ2ML.js → chunk-EHNVP6QB.js} +1 -1
  17. package/chunks/{chunk-C6ZMPXN2.js → chunk-FBZBJYZS.js} +3 -3
  18. package/chunks/{chunk-S3B6HFSM.js → chunk-GYEYTNHK.js} +1 -1
  19. package/chunks/{chunk-EIONVEFN.js → chunk-HS2NQ7K6.js} +192 -36
  20. package/chunks/{chunk-HJKJ4NQP.js → chunk-HUZ2EC2R.js} +1 -1
  21. package/chunks/{chunk-5H2PXZ7Q.js → chunk-IUUNIJPM.js} +1 -1
  22. package/chunks/{chunk-3DF55BWV.js → chunk-JGDA6EIJ.js} +2 -2
  23. package/chunks/{chunk-GOUGG7IQ.js → chunk-K3PTYN43.js} +2 -2
  24. package/chunks/{chunk-7TIWL6E5.js → chunk-KCABBZHN.js} +7 -7
  25. package/chunks/{chunk-ACYZMJHC.js → chunk-LRD5N2TQ.js} +1 -1
  26. package/chunks/{chunk-ITHDAIRY.js → chunk-MNK373HF.js} +1 -1
  27. package/chunks/{chunk-JCRQV4FE.js → chunk-MOEVVXML.js} +2 -2
  28. package/chunks/{chunk-3HMO42M2.js → chunk-MOGWEHSC.js} +68 -771
  29. package/chunks/{chunk-TFKY6D7O.js → chunk-N7YCONYR.js} +1 -1
  30. package/chunks/{chunk-FI2H6HV2.js → chunk-NA3FKCI2.js} +1 -1
  31. package/chunks/{chunk-PMAKX6KP.js → chunk-NABVDAAO.js} +2 -2
  32. package/chunks/{chunk-YYFODVZG.js → chunk-NNMOTHKC.js} +4 -4
  33. package/chunks/{chunk-RBTJYREN.js → chunk-OILVEROI.js} +17 -4
  34. package/chunks/{chunk-GXSECFUE.js → chunk-PAMJEXE2.js} +1 -1
  35. package/chunks/{chunk-2J3STRJT.js → chunk-R7VWEY45.js} +1 -1
  36. package/chunks/{chunk-27SXCYWH.js → chunk-RZZ6VPRY.js} +1 -1
  37. package/chunks/{chunk-HFUOUT2B.js → chunk-SIR7XW2S.js} +1392 -826
  38. package/chunks/{chunk-HDJSHLRM.js → chunk-SSPP64FF.js} +2 -2
  39. package/chunks/{chunk-WK6VUCKK.js → chunk-STPHTPSD.js} +1 -1
  40. package/chunks/{chunk-SEWZ76MN.js → chunk-UGCTPKJG.js} +14 -6
  41. package/chunks/{chunk-MY44EZKD.js → chunk-ULRLUXSS.js} +1 -1
  42. package/chunks/{chunk-BWUW6ZQR.js → chunk-UQS7XCBV.js} +75 -60
  43. package/chunks/{chunk-6TA3CWND.js → chunk-V2KJQVYE.js} +42 -21
  44. package/chunks/{chunk-RFK5F45W.js → chunk-VJBEB2K6.js} +1 -1
  45. package/chunks/{chunk-D4IBEO2K.js → chunk-VWE36MUN.js} +1 -1
  46. package/chunks/{chunk-B5TIXHCO.js → chunk-WNWDQ2TO.js} +1 -1
  47. package/chunks/{chunk-S2WCYEK2.js → chunk-WPJMA5AK.js} +2 -2
  48. package/chunks/{chunk-FI5YL4R2.js → chunk-XJ2TBEV7.js} +3 -3
  49. package/chunks/{chunk-3T5R7P4T.js → chunk-XOVYV7TT.js} +4 -4
  50. package/chunks/{chunk-DJGJECBV.js → chunk-YGYJ2FTH.js} +4 -3
  51. package/chunks/{chunk-ZWAWZU6C.js → chunk-YJGPPPUB.js} +37 -9
  52. package/chunks/chunk-YP2DHYNI.js +650 -0
  53. package/chunks/{chunk-DMDWIW3E.js → chunk-Z2VLJEQJ.js} +4 -4
  54. package/chunks/{chunk-EQBC2ZWL.js → chunk-ZPVSDB63.js} +1604 -246
  55. package/chunks/{codex-models-KCUIVS3R.js → codex-models-CI22KIHY.js} +7 -7
  56. package/chunks/{commands-MPPAADGY.js → commands-C2WRSCNB.js} +210 -101
  57. package/chunks/dashboard-XO2X2SPD.js +75 -0
  58. package/chunks/{db-R2AQSESC.js → db-FU3OIGQK.js} +3 -3
  59. package/chunks/{deep-review-Q6BJKEV4.js → deep-review-5AL6QYTK.js} +30 -30
  60. package/chunks/{disclose-GGULOW27.js → disclose-YPV5KIUU.js} +3 -3
  61. package/chunks/{dist-6RNAVFAY.js → dist-ONIRKDH6.js} +29 -29
  62. package/chunks/{dist-OLGNKDB2.js → dist-QLMPTFT7.js} +2 -2
  63. package/chunks/{dist-DWN7U5OV.js → dist-QXJKD743.js} +1 -1
  64. package/chunks/{eval-runner-WCTTIYN4.js → eval-runner-D3RUCU3R.js} +17 -17
  65. package/chunks/{exploit-agent-M3KUMZJH.js → exploit-agent-4E4HXKUA.js} +1 -1
  66. package/chunks/{exploit-autoclimb-QTTWC5WM.js → exploit-autoclimb-5GRXI6VQ.js} +1 -1
  67. package/chunks/{exploit-climb-E4KDELTN.js → exploit-climb-AHQEJ2I2.js} +2 -2
  68. package/chunks/{fix-U5FFJD4F.js → fix-CHD7LXDS.js} +7 -7
  69. package/chunks/{harness-FMKIMEH5.js → harness-E63KDHPG.js} +3 -3
  70. package/chunks/{hunt-scan-RYPWRUQD.js → hunt-scan-ME2Z4CTC.js} +16 -16
  71. package/chunks/{kernel-primitive-CVG2E7MJ.js → kernel-primitive-S566GXWP.js} +2 -2
  72. package/chunks/{kernel-vm-runner-62KISULQ.js → kernel-vm-runner-KREBY4DC.js} +2 -2
  73. package/chunks/{local-engine-WP3I7K7G.js → local-engine-ZRTZVSSX.js} +5 -5
  74. package/chunks/managed-operation-ZMLLRCCQ.js +59 -0
  75. package/chunks/{native-loop-HC77R5NQ.js → native-loop-UV3Z4Z2F.js} +16 -16
  76. package/chunks/{operator-services-E2NONBQS.js → operator-services-JOCREEBA.js} +35 -35
  77. package/chunks/{orchestrate-Z3DW265M.js → orchestrate-ZF6ZTSIQ.js} +30 -30
  78. package/chunks/{prepare-7DTS6RJT.js → prepare-PLDVGLDX.js} +5 -5
  79. package/chunks/{provider-model-discovery-QGUGL3XW.js → provider-model-discovery-3X6DON3Y.js} +7 -2
  80. package/chunks/{remote-workflow-runtime-6CEVRZXS.js → remote-workflow-runtime-GOI4TYP5.js} +2 -2
  81. package/chunks/routing-WCQLO5SP.js +61 -0
  82. package/chunks/{runtime-W6JNDQRO.js → runtime-6ZIXFTW5.js} +2 -2
  83. package/chunks/{runtime-PZJ77QES.js → runtime-TVH5ORUK.js} +11 -7
  84. package/chunks/{scan-stream-6VOJTHTR.js → scan-stream-HJVTWZ44.js} +4 -4
  85. package/chunks/{scope-FHXW6EX6.js → scope-RCYXVGJR.js} +2 -2
  86. package/chunks/service-plugins-TN6KDX4L.js +63 -0
  87. package/chunks/{session-store-DBBI544Y.js → session-store-6QR3CVUA.js} +2 -2
  88. package/chunks/{variant-candidates-DPR6DJ3N.js → variant-candidates-SGLKPPHI.js} +7 -7
  89. package/chunks/{web-recon-prepass-HWDHDQMN.js → web-recon-prepass-GO7CTMVQ.js} +5 -5
  90. package/chunks/{workflow-runtime-PLB32XC3.js → workflow-runtime-CQTDASFA.js} +43 -43
  91. package/dashboard/assets/{abnfDiagram-VCTEODGH-6e39CQKz.js → abnfDiagram-VCTEODGH-DDZsU70-.js} +1 -1
  92. package/dashboard/assets/{arc-ClYun86B.js → arc-iDXNTSL6.js} +1 -1
  93. package/dashboard/assets/{architecture-7GRP2DOG-rM-lWo7E.js → architecture-7GRP2DOG-DJcY9RFg.js} +1 -1
  94. package/dashboard/assets/{architectureDiagram-5GKGNRK7-C9gEGZIU.js → architectureDiagram-5GKGNRK7-d0ZuOniQ.js} +1 -1
  95. package/dashboard/assets/{blockDiagram-I7D4REHJ-Dgh2n5Lf.js → blockDiagram-I7D4REHJ-B-EWfMy1.js} +1 -1
  96. package/dashboard/assets/{c4Diagram-7LVT6UL2-CsorW08z.js → c4Diagram-7LVT6UL2-KcZRuXZC.js} +1 -1
  97. package/dashboard/assets/channel-CeWMIm0w.js +1 -0
  98. package/dashboard/assets/{chunk-4HAMMTFA-4_b_LGGQ.js → chunk-4HAMMTFA-DXWulBlo.js} +1 -1
  99. package/dashboard/assets/{chunk-75Z2AOVW-qzNlKGCp.js → chunk-75Z2AOVW-RiLZItrz.js} +1 -1
  100. package/dashboard/assets/{chunk-DU6HZSFF-SAPICW28.js → chunk-DU6HZSFF-MBcaIyTX.js} +1 -1
  101. package/dashboard/assets/{chunk-F27PBJKO-DlLotIQx.js → chunk-F27PBJKO-kLWCBX_W.js} +1 -1
  102. package/dashboard/assets/{chunk-GMAD6QVW-DNnr65Nb.js → chunk-GMAD6QVW-BeQeSjpW.js} +1 -1
  103. package/dashboard/assets/{chunk-GVQU2GXP-DTwv0VfU.js → chunk-GVQU2GXP-CjCMlOIB.js} +1 -1
  104. package/dashboard/assets/{chunk-IMKFNOWR-B1fk1q_W.js → chunk-IMKFNOWR-BwNst53D.js} +1 -1
  105. package/dashboard/assets/{chunk-L3NEJ4N5-ByVjFIox.js → chunk-L3NEJ4N5-CHXWQrkL.js} +1 -1
  106. package/dashboard/assets/{chunk-OSK3NFVY-DUDCzjbh.js → chunk-OSK3NFVY-B2vd19Ed.js} +1 -1
  107. package/dashboard/assets/{chunk-P2QGCYS3-D_D5qEso.js → chunk-P2QGCYS3-Dk7Fyh6n.js} +1 -1
  108. package/dashboard/assets/{chunk-POPQ4Y6H-CetM-tVm.js → chunk-POPQ4Y6H-CPAgOvYe.js} +1 -1
  109. package/dashboard/assets/{chunk-PWAF6VOD-BcJX4exl.js → chunk-PWAF6VOD-BotyfMha.js} +1 -1
  110. package/dashboard/assets/{chunk-SHT3W25Y-BWQql238.js → chunk-SHT3W25Y-Buz5gLRP.js} +1 -1
  111. package/dashboard/assets/{chunk-SVP7TREG-BSLOD1JE.js → chunk-SVP7TREG-_rpYEZcs.js} +1 -1
  112. package/dashboard/assets/{chunk-TICWLB2K-DReOl-g_.js → chunk-TICWLB2K-DOJxPoec.js} +1 -1
  113. package/dashboard/assets/{chunk-XXDRQBXY-DSdSMeei.js → chunk-XXDRQBXY-EXxKJbAs.js} +1 -1
  114. package/dashboard/assets/classDiagram-ZZMXUADV-DV_h1NoS.js +1 -0
  115. package/dashboard/assets/classDiagram-v2-VYDZK3BY-DV_h1NoS.js +1 -0
  116. package/dashboard/assets/{common-CRRsylCH.js → common-VLJRx-Jq.js} +1 -1
  117. package/dashboard/assets/{cose-bilkent-JH36ORCC-fg-DIBqt.js → cose-bilkent-JH36ORCC-B1SVC57o.js} +1 -1
  118. package/dashboard/assets/{cynefin-OW5HDTMX-XmrbEIFh.js → cynefin-OW5HDTMX-BzhRorj4.js} +1 -1
  119. package/dashboard/assets/{cynefinDiagram-5FMLGOSQ-CoQ7QEPl.js → cynefinDiagram-5FMLGOSQ-JXzRmldX.js} +1 -1
  120. package/dashboard/assets/{dagre-GXQ25YYZ-qtQtsg6c.js → dagre-GXQ25YYZ-1LZ-X0-Z.js} +1 -1
  121. package/dashboard/assets/{diagram-S7CK7UJ4-B_ts4_58.js → diagram-S7CK7UJ4-C_-J_LQ4.js} +1 -1
  122. package/dashboard/assets/{diagram-UQ7AKVKN-DwHbbxFy.js → diagram-UQ7AKVKN-CnxL1k8g.js} +1 -1
  123. package/dashboard/assets/{diagram-VSXAHHWV-2Tg_RG89.js → diagram-VSXAHHWV-WzSb3aby.js} +1 -1
  124. package/dashboard/assets/{diagram-VX7I27RA-BFYp-YjF.js → diagram-VX7I27RA-DKhrMInE.js} +1 -1
  125. package/dashboard/assets/{diagram-Z3DM3KII-DrPiS4V0.js → diagram-Z3DM3KII-CDhI2WGP.js} +1 -1
  126. package/dashboard/assets/{dist-cbVssBvx.js → dist-B0bfBMeP.js} +1 -1
  127. package/dashboard/assets/{ebnfDiagram-PWID7BFC-DCMOZtU2.js → ebnfDiagram-PWID7BFC-iL5NQ1PE.js} +1 -1
  128. package/dashboard/assets/{erDiagram-RLTQ6QDP-CW4rUJGU.js → erDiagram-RLTQ6QDP-RK2Voa5O.js} +1 -1
  129. package/dashboard/assets/{eventmodeling-NTZA5JFV-C2q-Aaav.js → eventmodeling-NTZA5JFV-WgE7OJBb.js} +1 -1
  130. package/dashboard/assets/flowDiagram-HODETNUW-B9YcQ0Aq.js +1 -0
  131. package/dashboard/assets/{ganttDiagram-EL5Y4UJY-C1AqcwIF.js → ganttDiagram-EL5Y4UJY-D8CJXHRF.js} +1 -1
  132. package/dashboard/assets/{gitGraph-4MIJSDKK-DYR76gtd.js → gitGraph-4MIJSDKK-BuZ9Lg04.js} +1 -1
  133. package/dashboard/assets/{gitGraphDiagram-WWUBYQGX-B7hL98CE.js → gitGraphDiagram-WWUBYQGX-LEJMh54j.js} +1 -1
  134. package/dashboard/assets/{info-A6RAGUB7-TXB43LiH.js → info-A6RAGUB7-BL5k3pev.js} +1 -1
  135. package/dashboard/assets/{infoDiagram-27XIBGKW-Dk5dXmh_.js → infoDiagram-27XIBGKW-LJvntUnZ.js} +1 -1
  136. package/dashboard/assets/{ishikawaDiagram-5VMMS53U-BQDuNMka.js → ishikawaDiagram-5VMMS53U-BYTYgKCG.js} +1 -1
  137. package/dashboard/assets/{journeyDiagram-3NMN7TZE-DkustddD.js → journeyDiagram-3NMN7TZE-G25qgQgO.js} +1 -1
  138. package/dashboard/assets/{kanban-definition-UXKFOSKX-BW7Ann84.js → kanban-definition-UXKFOSKX-Bk3uLl1i.js} +1 -1
  139. package/dashboard/assets/{line-DVxcLeru.js → line-i4qHBaWO.js} +1 -1
  140. package/dashboard/assets/{linear-DOM_l9bO.js → linear-DmrqRsKG.js} +1 -1
  141. package/dashboard/assets/{mermaid-parser.core-CKg9fDvJ.js → mermaid-parser.core-BxbKr4QF.js} +3 -3
  142. package/dashboard/assets/{mermaid.core-DruW_5-Y.js → mermaid.core-Cltee6FS.js} +4 -4
  143. package/dashboard/assets/{mindmap-definition-YA3MSWOX-Di5W5VB3.js → mindmap-definition-YA3MSWOX-DkzO2JgS.js} +1 -1
  144. package/dashboard/assets/operations-B4_timQX.css +1 -0
  145. package/dashboard/assets/operations-DwppJviL.js +199 -0
  146. package/dashboard/assets/{packet-AYTQ26CC-BABwqtNu.js → packet-AYTQ26CC-uZQUKnrE.js} +1 -1
  147. package/dashboard/assets/{pegDiagram-XKGWAZYB-Cx4ABT6q.js → pegDiagram-XKGWAZYB-CrOEi00T.js} +1 -1
  148. package/dashboard/assets/{pie-WAS4IAKB-CNdXyrze.js → pie-WAS4IAKB-Dn9_tpQT.js} +1 -1
  149. package/dashboard/assets/{pieDiagram-E7YTZNPT-BilfQbIs.js → pieDiagram-E7YTZNPT-D-niUkzc.js} +1 -1
  150. package/dashboard/assets/{quadrantDiagram-AXDQQJYC-BVmMQHE5.js → quadrantDiagram-AXDQQJYC-CJOTiG5V.js} +1 -1
  151. package/dashboard/assets/{radar-RG4KPBEZ-fKNmDeoK.js → radar-RG4KPBEZ-DIIVz4e8.js} +1 -1
  152. package/dashboard/assets/{railroad-74A4TZTK-DhcvDCOh.js → railroad-74A4TZTK-1kiqDEID.js} +1 -1
  153. package/dashboard/assets/{railroad-abnf-HS5TGJTU-BTRVAmf0.js → railroad-abnf-HS5TGJTU-DK6rQPZR.js} +1 -1
  154. package/dashboard/assets/{railroad-ebnf-LZEXJU2U-CwS8fgC_.js → railroad-ebnf-LZEXJU2U-C6cOgYW4.js} +1 -1
  155. package/dashboard/assets/{railroad-peg-WCYAUIDC-CXuhXlNp.js → railroad-peg-WCYAUIDC-CQ3ptKef.js} +1 -1
  156. package/dashboard/assets/{railroadDiagram-O6MQD6OU-DnBru-jf.js → railroadDiagram-O6MQD6OU-nEfkpa-m.js} +1 -1
  157. package/dashboard/assets/{requirementDiagram-BXWQKSXE-FwdvUZ7_.js → requirementDiagram-BXWQKSXE-CdFMY8tG.js} +1 -1
  158. package/dashboard/assets/{sankeyDiagram-P5KCCOFB-BQvDORai.js → sankeyDiagram-P5KCCOFB-C0KxrFYv.js} +1 -1
  159. package/dashboard/assets/{sequenceDiagram-WJ2MYXX4-FWYQLzcY.js → sequenceDiagram-WJ2MYXX4-DeZ5ATiu.js} +1 -1
  160. package/dashboard/assets/{src-BwkPhlcp.js → src-Cg-chcoE.js} +1 -1
  161. package/dashboard/assets/{stateDiagram-D77RDMKH-CjPBd_Sa.js → stateDiagram-D77RDMKH-B9MwWL5B.js} +1 -1
  162. package/dashboard/assets/stateDiagram-v2-MP3YSRHH-SucFndhx.js +1 -0
  163. package/dashboard/assets/{swimlanes-42K2YHIH-SQLNsa4J.js → swimlanes-42K2YHIH-DB--fwQE.js} +1 -1
  164. package/dashboard/assets/swimlanesDiagram-VR7AAH4N-BzH-rIaK.js +8 -0
  165. package/dashboard/assets/{timeline-definition-24CTP7MA-BxCf20k1.js → timeline-definition-24CTP7MA-DLkkTbWb.js} +1 -1
  166. package/dashboard/assets/{treeView-Q6P3EWNA-BGLYAyGp.js → treeView-Q6P3EWNA-XkZ9rl9H.js} +1 -1
  167. package/dashboard/assets/{treemap-WGGIJYW6-BlzAwncU.js → treemap-WGGIJYW6-JCtVKxCE.js} +1 -1
  168. package/dashboard/assets/{vennDiagram-4TSXK5OY-D76RIZLz.js → vennDiagram-4TSXK5OY-DEb-x29Z.js} +1 -1
  169. package/dashboard/assets/{wardley-WFR3VGLG-Ba_reiVw.js → wardley-WFR3VGLG-DhI7ROY3.js} +1 -1
  170. package/dashboard/assets/{wardleyDiagram-VM6X3IG4-Cux4coOD.js → wardleyDiagram-VM6X3IG4-KNckudc5.js} +1 -1
  171. package/dashboard/assets/{xychartDiagram-S5SC5T6Z-Ch5mvnlH.js → xychartDiagram-S5SC5T6Z-D4c0ynCk.js} +1 -1
  172. package/dashboard/index.html +13 -2
  173. package/package.json +1 -1
  174. package/worker-assets/demo-target/README.md +7 -3
  175. package/chunks/chunk-AL32F74R.js +0 -1123
  176. package/chunks/dashboard-MN7GZLLX.js +0 -75
  177. package/chunks/managed-operation-642WPTLC.js +0 -59
  178. package/chunks/routing-ITJZBJIU.js +0 -61
  179. package/chunks/service-plugins-CN6Q2NSN.js +0 -63
  180. package/dashboard/assets/channel-BBlDqIBl.js +0 -1
  181. package/dashboard/assets/classDiagram-ZZMXUADV-CRH2kB8G.js +0 -1
  182. package/dashboard/assets/classDiagram-v2-VYDZK3BY-CRH2kB8G.js +0 -1
  183. package/dashboard/assets/flowDiagram-HODETNUW-3NOabgG3.js +0 -1
  184. package/dashboard/assets/operations-B-t_k60U.js +0 -194
  185. package/dashboard/assets/operations-D2ZKZFOF.css +0 -1
  186. package/dashboard/assets/stateDiagram-v2-MP3YSRHH-DHmenujm.js +0 -1
  187. package/dashboard/assets/swimlanesDiagram-VR7AAH4N-D1bH4ETZ.js +0 -8
@@ -10,15 +10,17 @@ import {
10
10
  createLocalConsoleSession,
11
11
  findingFromRow,
12
12
  loadFindingFocus
13
- } from "./chunk-BWUW6ZQR.js";
13
+ } from "./chunk-UQS7XCBV.js";
14
14
  import {
15
15
  assertLocalEngineAvailable,
16
16
  registerLocalEngine
17
- } from "./chunk-DMDWIW3E.js";
17
+ } from "./chunk-Z2VLJEQJ.js";
18
18
  import {
19
19
  WebOperatorServices,
20
- createSessionPluginHostManager
21
- } from "./chunk-EQBC2ZWL.js";
20
+ createRemoteJWKSet,
21
+ createSessionPluginHostManager,
22
+ jwtVerify
23
+ } from "./chunk-ZPVSDB63.js";
22
24
  import {
23
25
  BackendConnectionRegistry,
24
26
  backendBearerFromEnv,
@@ -26,7 +28,7 @@ import {
26
28
  handleBackendConnectionRequest,
27
29
  loadManagedWorker,
28
30
  validateWorkerOptions
29
- } from "./chunk-SEWZ76MN.js";
31
+ } from "./chunk-UGCTPKJG.js";
30
32
  import {
31
33
  Option,
32
34
  presentationEventBus
@@ -56,13 +58,13 @@ import {
56
58
  validateWorkbenchSourceLesson,
57
59
  workbenchConfigPath,
58
60
  workbenchNetworkEnabled
59
- } from "./chunk-6TA3CWND.js";
61
+ } from "./chunk-V2KJQVYE.js";
60
62
  import {
61
63
  connectServicePlugins,
62
64
  createConsoleRuntime,
63
65
  exportReport,
64
66
  isReportExportFormat
65
- } from "./chunk-EEP6GBUO.js";
67
+ } from "./chunk-3MWQNNJU.js";
66
68
  import {
67
69
  HuntMemoryStore,
68
70
  TOOL_DEFINITIONS,
@@ -73,7 +75,7 @@ import {
73
75
  readToolCallNames,
74
76
  subscribeBrowserView,
75
77
  validateAgentSkillContent
76
- } from "./chunk-HFUOUT2B.js";
78
+ } from "./chunk-SIR7XW2S.js";
77
79
  import {
78
80
  SecurityWorkflowStore,
79
81
  WorkflowTriggerStore,
@@ -82,21 +84,21 @@ import {
82
84
  osecDB,
83
85
  resolveOsecDbPath,
84
86
  restoreFindingReviewFields
85
- } from "./chunk-YXTV2FRE.js";
87
+ } from "./chunk-72PU46MS.js";
86
88
  import {
87
89
  LlmApiRuntime
88
- } from "./chunk-EIONVEFN.js";
90
+ } from "./chunk-HS2NQ7K6.js";
89
91
  import {
90
92
  DEFAULT_WORKBENCH_BROKER_LIMITS,
91
93
  approveSmolvmWorkbenchImage,
92
94
  getSmolvmWorkbenchStatus,
93
95
  isAdmittedSmolvmWorkbench,
94
96
  resolveSmolvmRuntime
95
- } from "./chunk-3T5R7P4T.js";
97
+ } from "./chunk-XOVYV7TT.js";
96
98
  import {
97
99
  ScopePolicy,
98
100
  withScopeEnforcement
99
- } from "./chunk-27SXCYWH.js";
101
+ } from "./chunk-RZZ6VPRY.js";
100
102
  import {
101
103
  BackendDescriptorSchema,
102
104
  BackendRequestIdSchema,
@@ -105,7 +107,7 @@ import {
105
107
  VERSION,
106
108
  createPresentationEvent,
107
109
  homeStateDir
108
- } from "./chunk-S3B6HFSM.js";
110
+ } from "./chunk-GYEYTNHK.js";
109
111
  import {
110
112
  external_exports
111
113
  } from "./chunk-5XOYTAOK.js";
@@ -242,6 +244,7 @@ async function runGuest(cli) {
242
244
  tools: session.tools,
243
245
  messages: session.messages,
244
246
  autonomyMode: session.autonomyMode,
247
+ webSearchEnabled: session.webSearchEnabled,
245
248
  target: session.target,
246
249
  scope: session.scope?.raw,
247
250
  localScopePath: session.localScopePath,
@@ -459,9 +462,16 @@ async function runGuest(cli) {
459
462
  turn = void 0;
460
463
  break;
461
464
  }
462
- case "autonomy":
465
+ case "autonomy": {
466
+ if (typeof frame.value !== "string" || !["standard", "recon", "copilot", "yolo"].includes(frame.value)) throw new Error("Invalid autonomy mode");
463
467
  session.setAutonomyMode(frame.value);
464
468
  break;
469
+ }
470
+ case "webSearch": {
471
+ if (typeof frame.value !== "boolean") throw new Error("Invalid web search setting");
472
+ await session.setWebSearchEnabled(frame.value);
473
+ break;
474
+ }
465
475
  case "configure": {
466
476
  const value2 = frame.value;
467
477
  session.configureEngagement({ target: value2.target, ...value2.scope === void 0 ? {} : { scope: value2.scope ? new ScopePolicy(value2.scope) : null } });
@@ -765,8 +775,8 @@ function startManagedHostReconnect(options) {
765
775
  // packages/cli/src/web/local-provider-relay.ts
766
776
  async function createLocalRelayProvider(selection = {}, signal) {
767
777
  const [{ createWebConsoleRuntime }, { createWorkbenchProviderBroker }] = await Promise.all([
768
- import("./operator-services-E2NONBQS.js"),
769
- import("./dist-6RNAVFAY.js")
778
+ import("./operator-services-JOCREEBA.js"),
779
+ import("./dist-ONIRKDH6.js")
770
780
  ]);
771
781
  signal?.throwIfAborted();
772
782
  if (selection.providerId && selection.providerId !== "chatgpt-codex") throw new Error("Local model relay currently supports ChatGPT Codex only. Choose the local ChatGPT connection.");
@@ -864,11 +874,11 @@ function failureTransportStatus(error2, fallback) {
864
874
  return fallback;
865
875
  }
866
876
  function providerSseCompletion(maximumBytes = 8 * 1024 * 1024) {
867
- const decoder2 = new TextDecoder();
877
+ const decoder = new TextDecoder();
868
878
  let buffer = "", completed = false;
869
879
  return (chunk) => {
870
880
  if (completed) return true;
871
- buffer += decoder2.decode(chunk, { stream: true });
881
+ buffer += decoder.decode(chunk, { stream: true });
872
882
  let boundary;
873
883
  while (boundary = /\r?\n\r?\n/.exec(buffer)) {
874
884
  const block = buffer.slice(0, boundary.index);
@@ -899,15 +909,15 @@ async function createLocalProviderRelay(options) {
899
909
  const signal = options.signal ? AbortSignal.any([lifetime.signal, options.signal]) : lifetime.signal;
900
910
  signal.throwIfAborted();
901
911
  const peer = await options.registry.handshake(options.backendId);
902
- const epoch2 = peer.handshake?.serverInstanceId;
903
- if (peer.backend.status !== "connected" || !id(epoch2)) throw new Error("Provider relay requires a connected, identified host.");
912
+ const epoch = peer.handshake?.serverInstanceId;
913
+ if (peer.backend.status !== "connected" || !id(epoch)) throw new Error("Provider relay requires a connected, identified host.");
904
914
  const local = await (options.createProvider ?? createLocalRelayProvider)(options.selection ?? {}, signal);
905
915
  const base = "/api/console/provider-relays";
906
916
  let grant;
907
917
  try {
908
- const response = await json(await options.registry.request(options.backendId, base, { method: "POST", body: { epoch: epoch2, provider: local.grant.provider, models: local.grant.models, model: local.info.model }, signal }));
918
+ const response = await json(await options.registry.request(options.backendId, base, { method: "POST", body: { epoch, provider: local.grant.provider, models: local.grant.models, model: local.info.model }, signal }));
909
919
  const candidate = object(response.grant);
910
- if (!id(candidate.id) || candidate.epoch !== epoch2 || candidate.provider !== local.grant.provider || !Array.isArray(candidate.models) || candidate.models.length !== local.grant.models.length || new Set(candidate.models).size !== candidate.models.length || candidate.models.some((model) => typeof model !== "string" || !local.grant.models.includes(model)) || candidate.model !== local.info.model || typeof candidate.expiresAt !== "string" || !Number.isFinite(Date.parse(candidate.expiresAt))) throw new Error("Remote provider relay grant does not match the local approval.");
920
+ if (!id(candidate.id) || candidate.epoch !== epoch || candidate.provider !== local.grant.provider || !Array.isArray(candidate.models) || candidate.models.length !== local.grant.models.length || new Set(candidate.models).size !== candidate.models.length || candidate.models.some((model) => typeof model !== "string" || !local.grant.models.includes(model)) || candidate.model !== local.info.model || typeof candidate.expiresAt !== "string" || !Number.isFinite(Date.parse(candidate.expiresAt))) throw new Error("Remote provider relay grant does not match the local approval.");
911
921
  grant = candidate;
912
922
  } catch (error2) {
913
923
  await local.transport.close?.();
@@ -933,7 +943,7 @@ async function createLocalProviderRelay(options) {
933
943
  diagnostic.lastTransportStatus = response.status;
934
944
  return response;
935
945
  };
936
- const send = (request, events, callerSignal) => remoteRequest(`${grantPath}/requests/${encodeURIComponent(request.requestId)}/events`, { method: "POST", body: { epoch: epoch2, sessionId: boundSession, events }, signal: callerSignal }).then(json);
946
+ const send = (request, events, callerSignal) => remoteRequest(`${grantPath}/requests/${encodeURIComponent(request.requestId)}/events`, { method: "POST", body: { epoch, sessionId: boundSession, events }, signal: callerSignal }).then(json);
937
947
  async function service(request) {
938
948
  const controller = new AbortController();
939
949
  active.set(request.requestId, controller);
@@ -1028,7 +1038,7 @@ async function createLocalProviderRelay(options) {
1028
1038
  diagnostic.phase = active.size ? "streaming" : "polling";
1029
1039
  diagnostic.lastPollAt = (/* @__PURE__ */ new Date()).toISOString();
1030
1040
  failureCategory = "scope_changed";
1031
- if (body.grantId !== grant.id || body.epoch !== epoch2 || body.sessionId !== void 0 && body.sessionId !== boundSession || !Array.isArray(body.requests) || !Array.isArray(body.cancelled) || body.requests.length > 4 || body.cancelled.length > 256) throw new Error("Remote provider relay scope changed.");
1041
+ if (body.grantId !== grant.id || body.epoch !== epoch || body.sessionId !== void 0 && body.sessionId !== boundSession || !Array.isArray(body.requests) || !Array.isArray(body.cancelled) || body.requests.length > 4 || body.cancelled.length > 256) throw new Error("Remote provider relay scope changed.");
1032
1042
  for (const requestId of body.cancelled) {
1033
1043
  if (!id(requestId)) throw new Error("Invalid provider cancellation.");
1034
1044
  active.get(requestId)?.abort();
@@ -1036,7 +1046,7 @@ async function createLocalProviderRelay(options) {
1036
1046
  for (const value of body.requests) {
1037
1047
  const request = object(value);
1038
1048
  failureCategory = "request_rejected";
1039
- if (!id(request.requestId) || request.grantId !== grant.id || request.epoch !== epoch2 || request.sessionId !== boundSession || request.provider !== local.grant.provider || typeof request.model !== "string" || !local.grant.models.includes(request.model) || typeof request.body !== "string" || Buffer.byteLength(request.body) > local.grant.limits.maxRequestBytes) throw new Error("Remote provider request exceeds its approval.");
1049
+ if (!id(request.requestId) || request.grantId !== grant.id || request.epoch !== epoch || request.sessionId !== boundSession || request.provider !== local.grant.provider || typeof request.model !== "string" || !local.grant.models.includes(request.model) || typeof request.body !== "string" || Buffer.byteLength(request.body) > local.grant.limits.maxRequestBytes) throw new Error("Remote provider request exceeds its approval.");
1040
1050
  if (seen.has(request.requestId)) continue;
1041
1051
  if (seen.size >= local.grant.limits.maxRequests || active.size >= Math.min(4, local.grant.limits.maxConcurrent)) throw new Error("Remote provider relay exceeded its request budget.");
1042
1052
  seen.add(request.requestId);
@@ -1091,8 +1101,8 @@ async function createLocalProviderRelay(options) {
1091
1101
 
1092
1102
  // packages/cli/src/web/local-provider-sessions.ts
1093
1103
  var LocalProviderSessionError = class extends Error {
1094
- constructor(message2, statusCode = 400) {
1095
- super(message2);
1104
+ constructor(message, statusCode = 400) {
1105
+ super(message);
1096
1106
  this.statusCode = statusCode;
1097
1107
  }
1098
1108
  statusCode;
@@ -1255,8 +1265,8 @@ var LocalProviderSessions = class {
1255
1265
  // packages/cli/src/web/remote-provider-relay.ts
1256
1266
  import { randomUUID as randomUUID2 } from "node:crypto";
1257
1267
  var ProviderRelayError = class extends Error {
1258
- constructor(message2, statusCode = 400) {
1259
- super(message2);
1268
+ constructor(message, statusCode = 400) {
1269
+ super(message);
1260
1270
  this.statusCode = statusCode;
1261
1271
  }
1262
1272
  statusCode;
@@ -1477,8 +1487,8 @@ async function handleRemoteProviderRelayRequest(req, res, url, broker, readBody)
1477
1487
 
1478
1488
  // packages/cli/src/web/report-artifacts.ts
1479
1489
  var ReportArtifactError = class extends Error {
1480
- constructor(message2, statusCode) {
1481
- super(message2);
1490
+ constructor(message, statusCode) {
1491
+ super(message);
1482
1492
  this.statusCode = statusCode;
1483
1493
  }
1484
1494
  statusCode;
@@ -1590,724 +1600,6 @@ import { join } from "node:path";
1590
1600
  import { readFileSync } from "node:fs";
1591
1601
  import { createHash, randomBytes, scrypt as scryptCallback, timingSafeEqual } from "node:crypto";
1592
1602
  import { promisify } from "node:util";
1593
-
1594
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/buffer_utils.js
1595
- var encoder = new TextEncoder();
1596
- var decoder = new TextDecoder();
1597
- var strictDecoder = new TextDecoder("utf-8", { fatal: true });
1598
- var MAX_INT32 = 2 ** 32;
1599
- function concat(...buffers) {
1600
- const size = buffers.reduce((acc, { length }) => acc + length, 0), buf = new Uint8Array(size);
1601
- let i = 0;
1602
- for (const buffer of buffers)
1603
- buf.set(buffer, i), i += buffer.length;
1604
- return buf;
1605
- }
1606
- var NON_ASCII = /[^\x00-\x7f]/;
1607
- function encode(string) {
1608
- if (typeof string == "string" && string.length >= 128) {
1609
- if (NON_ASCII.test(string))
1610
- throw new TypeError("non-ASCII string encountered in encode()");
1611
- return encoder.encode(string);
1612
- }
1613
- const bytes = new Uint8Array(string.length);
1614
- for (let i = 0; i < string.length; i++) {
1615
- const code = string.charCodeAt(i);
1616
- if (code > 127)
1617
- throw new TypeError("non-ASCII string encountered in encode()");
1618
- bytes[i] = code;
1619
- }
1620
- return bytes;
1621
- }
1622
- function decodeBase64(encoded, url = false) {
1623
- if (Uint8Array.fromBase64)
1624
- return Uint8Array.fromBase64(encoded, { alphabet: url ? "base64url" : "base64" });
1625
- if (url) {
1626
- if (encoded.includes("+") || encoded.includes("/"))
1627
- throw new TypeError("Invalid base64url");
1628
- encoded = encoded.replace(/-/g, "+").replace(/_/g, "/");
1629
- }
1630
- const binary = atob(encoded), bytes = new Uint8Array(binary.length);
1631
- for (let i = 0; i < binary.length; i++)
1632
- bytes[i] = binary.charCodeAt(i);
1633
- return bytes;
1634
- }
1635
-
1636
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/util/errors.js
1637
- var JOSEError = class extends Error {
1638
- static code = "ERR_JOSE_GENERIC";
1639
- code = "ERR_JOSE_GENERIC";
1640
- constructor(message2, options) {
1641
- super(message2, options), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
1642
- }
1643
- };
1644
- var JWTClaimValidationFailed = class extends JOSEError {
1645
- static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1646
- code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
1647
- claim;
1648
- reason;
1649
- payload;
1650
- constructor(message2, payload, claim = "unspecified", reason = "unspecified") {
1651
- super(message2, { cause: { claim, reason, payload } }), this.claim = claim, this.reason = reason, this.payload = payload;
1652
- }
1653
- };
1654
- var JWTExpired = class extends JOSEError {
1655
- static code = "ERR_JWT_EXPIRED";
1656
- code = "ERR_JWT_EXPIRED";
1657
- claim;
1658
- reason;
1659
- payload;
1660
- constructor(message2, payload, claim = "unspecified", reason = "unspecified") {
1661
- super(message2, { cause: { claim, reason, payload } }), this.claim = claim, this.reason = reason, this.payload = payload;
1662
- }
1663
- };
1664
- var JOSEAlgNotAllowed = class extends JOSEError {
1665
- static code = "ERR_JOSE_ALG_NOT_ALLOWED";
1666
- code = "ERR_JOSE_ALG_NOT_ALLOWED";
1667
- };
1668
- var JOSENotSupported = class extends JOSEError {
1669
- static code = "ERR_JOSE_NOT_SUPPORTED";
1670
- code = "ERR_JOSE_NOT_SUPPORTED";
1671
- };
1672
- var JWSInvalid = class extends JOSEError {
1673
- static code = "ERR_JWS_INVALID";
1674
- code = "ERR_JWS_INVALID";
1675
- };
1676
- var JWTInvalid = class extends JOSEError {
1677
- static code = "ERR_JWT_INVALID";
1678
- code = "ERR_JWT_INVALID";
1679
- };
1680
- var JWKSInvalid = class extends JOSEError {
1681
- static code = "ERR_JWKS_INVALID";
1682
- code = "ERR_JWKS_INVALID";
1683
- };
1684
- var JWKSNoMatchingKey = class extends JOSEError {
1685
- static code = "ERR_JWKS_NO_MATCHING_KEY";
1686
- code = "ERR_JWKS_NO_MATCHING_KEY";
1687
- constructor(message2 = "no applicable key found in the JSON Web Key Set", options) {
1688
- super(message2, options);
1689
- }
1690
- };
1691
- var JWKSMultipleMatchingKeys = class extends JOSEError {
1692
- [Symbol.asyncIterator] = async function* () {
1693
- };
1694
- static code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
1695
- code = "ERR_JWKS_MULTIPLE_MATCHING_KEYS";
1696
- constructor(message2 = "multiple matching keys found in the JSON Web Key Set", options) {
1697
- super(message2, options);
1698
- }
1699
- };
1700
- var JWKSTimeout = class extends JOSEError {
1701
- static code = "ERR_JWKS_TIMEOUT";
1702
- code = "ERR_JWKS_TIMEOUT";
1703
- constructor(message2 = "request timed out", options) {
1704
- super(message2, options);
1705
- }
1706
- };
1707
- var JWSSignatureVerificationFailed = class extends JOSEError {
1708
- static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
1709
- code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
1710
- constructor(message2 = "signature verification failed", options) {
1711
- super(message2, options);
1712
- }
1713
- };
1714
-
1715
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/util/base64url.js
1716
- var invalid = "The input to be decoded is not correctly encoded.";
1717
- function decode(input) {
1718
- try {
1719
- return decodeBase64(typeof input == "string" ? input : decoder.decode(input), true);
1720
- } catch (cause) {
1721
- throw new TypeError(invalid, { cause });
1722
- }
1723
- }
1724
-
1725
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/validate.js
1726
- function isObject(input) {
1727
- if (typeof input != "object" || input === null || Object.prototype.toString.call(input) !== "[object Object]")
1728
- return false;
1729
- const prototype = Object.getPrototypeOf(input);
1730
- return prototype === null || Object.getPrototypeOf(prototype) === null;
1731
- }
1732
- function isJwkSet(input) {
1733
- return isObject(input) && Array.isArray(input.keys) && Array.from(input.keys).every(isObject);
1734
- }
1735
- function isDisjoint(...headers) {
1736
- const parameters = /* @__PURE__ */ new Set();
1737
- for (const header of headers)
1738
- if (header)
1739
- for (const parameter of Object.keys(header)) {
1740
- if (parameters.has(parameter))
1741
- return false;
1742
- parameters.add(parameter);
1743
- }
1744
- return true;
1745
- }
1746
- function decodeBase64url(value, label, ErrorClass) {
1747
- try {
1748
- return decode(value);
1749
- } catch {
1750
- throw new ErrorClass(`Failed to base64url decode the ${label}`);
1751
- }
1752
- }
1753
- function encodeBase64url(value, label, ErrorClass) {
1754
- try {
1755
- return encode(value);
1756
- } catch {
1757
- throw new ErrorClass(`The ${label} is not a valid base64url string`);
1758
- }
1759
- }
1760
- function parseJoseHeader(b64, ErrorClass, message2) {
1761
- let parsed;
1762
- try {
1763
- parsed = JSON.parse(strictDecoder.decode(decode(b64)));
1764
- } catch {
1765
- throw new ErrorClass(message2);
1766
- }
1767
- if (!isObject(parsed))
1768
- throw new ErrorClass(message2);
1769
- return parsed;
1770
- }
1771
- var JWS_RECOGNIZED = { __proto__: null, b64: true };
1772
- function validateAlgorithms(option, algorithms) {
1773
- if (algorithms !== void 0 && (!Array.isArray(algorithms) || algorithms.some((s) => typeof s != "string")))
1774
- throw new TypeError(`"${option}" option must be an array of strings`);
1775
- return algorithms === void 0 ? void 0 : new Set(algorithms);
1776
- }
1777
- function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {
1778
- if (joseHeader.crit !== void 0 && protectedHeader?.crit === void 0)
1779
- throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected');
1780
- if (!protectedHeader || protectedHeader.crit === void 0)
1781
- return [];
1782
- if (!Array.isArray(protectedHeader.crit) || protectedHeader.crit.length === 0 || protectedHeader.crit.some((input) => typeof input != "string" || input.length === 0))
1783
- throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
1784
- const recognized = recognizedOption === void 0 ? recognizedDefault : { __proto__: null, ...recognizedOption, ...recognizedDefault };
1785
- for (const parameter of protectedHeader.crit) {
1786
- if (!(parameter in recognized))
1787
- throw new JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`);
1788
- if (!Object.hasOwn(joseHeader, parameter) || joseHeader[parameter] === void 0)
1789
- throw new Err(`Extension Header Parameter "${parameter}" is missing`);
1790
- if (recognized[parameter] && (!Object.hasOwn(protectedHeader, parameter) || protectedHeader[parameter] === void 0))
1791
- throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`);
1792
- }
1793
- return protectedHeader.crit;
1794
- }
1795
- function validateB64(protectedHeader, extensions) {
1796
- if (extensions.includes("b64")) {
1797
- const b64 = protectedHeader.b64;
1798
- if (typeof b64 != "boolean")
1799
- throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
1800
- return b64;
1801
- }
1802
- return true;
1803
- }
1804
-
1805
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/key.js
1806
- var tag = (key) => key[Symbol.toStringTag];
1807
- var jwkMatchesOp = (entry, key, usage) => {
1808
- const { alg } = entry;
1809
- if (key.use !== void 0) {
1810
- const expected = usage === "sign" || usage === "verify" ? "sig" : "enc";
1811
- if (key.use !== expected)
1812
- throw new TypeError(`Invalid key for this operation, its "use" must be "${expected}" when present`);
1813
- }
1814
- if (key.alg !== void 0 && key.alg !== alg)
1815
- throw new TypeError(`Invalid key for this operation, its "alg" must be "${alg}" when present`);
1816
- if (Array.isArray(key.key_ops)) {
1817
- const expectedKeyOp = usage === "encrypt" || usage === "decrypt" ? entry.ops?.[usage === "encrypt" ? 0 : 1] : usage;
1818
- if (expectedKeyOp && !key.key_ops.includes(expectedKeyOp))
1819
- throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${expectedKeyOp}" when present`);
1820
- }
1821
- };
1822
- async function prepareKey(entry, key, usage) {
1823
- const { alg, secret } = entry, privateKey = usage === "decrypt" || usage === "sign";
1824
- if (secret && key instanceof Uint8Array)
1825
- return key;
1826
- let normalized, keyObject;
1827
- if (isObject(key)) {
1828
- if (normalized = normalizeJwk(key), typeof normalized.kty != "string")
1829
- throw invalidKeyType(alg, key, secret);
1830
- if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (privateKey ? normalized.kty === "AKP" && typeof normalized.priv == "string" || typeof normalized.d == "string" : normalized.d === void 0 && normalized.priv === void 0)))
1831
- throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${privateKey ? "private" : "public"} JWK`);
1832
- if (jwkMatchesOp(entry, normalized, usage), normalized.kty === "oct")
1833
- return decode(normalized.k);
1834
- if (!Object.isFrozen(key)) {
1835
- const { key_ops } = key;
1836
- Array.isArray(key_ops) && Object.freeze(key_ops), Object.freeze(key);
1837
- }
1838
- } else {
1839
- if (!isKeyLike(key))
1840
- throw invalidKeyType(alg, key, secret);
1841
- const expectedType = secret ? "secret" : privateKey ? "private" : "public";
1842
- if (key.type !== expectedType && (secret || ["secret", "public", "private"].includes(key.type)))
1843
- throw new TypeError(`${tag(key)} instances must be of type "${expectedType}" for the ${alg} algorithm`);
1844
- if (isCryptoKey(key))
1845
- return key;
1846
- if (keyObject = key, keyObject.type === "secret")
1847
- return keyObject.export();
1848
- }
1849
- cache ||= /* @__PURE__ */ new WeakMap();
1850
- const cacheKey = key;
1851
- let cached = cache.get(cacheKey);
1852
- if (cached?.[alg])
1853
- return cached[alg];
1854
- if (cached || cache.set(cacheKey, cached = {}), keyObject && typeof keyObject.toCryptoKey == "function") {
1855
- const isPublic = keyObject.type === "public", crv = nist[keyObject.asymmetricKeyDetails?.namedCurve], params = entry.resolve?.({ crv, asymmetricKeyType: keyObject.asymmetricKeyType }) ?? entry.subtle;
1856
- return cached[alg] = keyObject.toCryptoKey(params, isPublic, entry.usages[isPublic ? 0 : 1]);
1857
- }
1858
- return normalized ??= keyObject.export({ format: "jwk" }), normalized.alg = alg, cached[alg] = await jwkToKey(entry, normalized);
1859
- }
1860
- var cache;
1861
- var nist = {
1862
- __proto__: null,
1863
- prime256v1: "P-256",
1864
- secp384r1: "P-384",
1865
- secp521r1: "P-521"
1866
- };
1867
- var isCryptoKey = (key) => {
1868
- if (key?.[Symbol.toStringTag] === "CryptoKey")
1869
- return true;
1870
- try {
1871
- return key instanceof CryptoKey;
1872
- } catch {
1873
- return false;
1874
- }
1875
- };
1876
- var isKeyObject = (key) => key?.[Symbol.toStringTag] === "KeyObject";
1877
- var isKeyLike = (key) => isCryptoKey(key) || isKeyObject(key);
1878
- function message(msg, actual, ...types) {
1879
- if (types.length > 2) {
1880
- const last = types.pop();
1881
- msg += `one of type ${types.join(", ")}, or ${last}.`;
1882
- } else types.length === 2 ? msg += `one of type ${types[0]} or ${types[1]}.` : msg += `of type ${types[0]}.`;
1883
- return actual == null ? msg += ` Received ${actual}` : typeof actual == "function" && actual.name ? msg += ` Received function ${actual.name}` : typeof actual == "object" && actual != null && actual.constructor?.name && (msg += ` Received an instance of ${actual.constructor.name}`), msg;
1884
- }
1885
- function invalidKeyType(alg, actual, secret) {
1886
- const types = ["CryptoKey", "KeyObject", "JSON Web Key"];
1887
- return secret && types.push("Uint8Array"), new TypeError(message(`Key for the ${alg} algorithm must be `, actual, ...types));
1888
- }
1889
- var unusable = (name, prop = "algorithm.name") => new TypeError(`CryptoKey does not support this operation, its ${prop} must be ${name}`);
1890
- function checkUsage(key, usage) {
1891
- if (usage && !key.usages.includes(usage))
1892
- throw new TypeError(`CryptoKey does not support this operation, its usages must include ${usage}.`);
1893
- }
1894
- function checkModulusLength(alg, key) {
1895
- const { modulusLength } = key.algorithm;
1896
- if (typeof modulusLength != "number" || modulusLength < 2048)
1897
- throw new TypeError(`${alg} requires key modulusLength to be 2048 bits or larger`);
1898
- }
1899
- function checkCryptoKey(key, expected, usage) {
1900
- const algorithm = key.algorithm;
1901
- if (algorithm.name !== expected.name)
1902
- throw unusable(expected.name);
1903
- if (expected.hash && algorithm.hash?.name !== expected.hash)
1904
- throw unusable(expected.hash, "algorithm.hash");
1905
- if (expected.namedCurve && algorithm.namedCurve !== expected.namedCurve)
1906
- throw unusable(expected.namedCurve, "algorithm.namedCurve");
1907
- if (expected.length !== void 0 && algorithm.length !== expected.length)
1908
- throw unusable(expected.length, "algorithm.length");
1909
- checkUsage(key, usage);
1910
- }
1911
- function snapshotJwk(jwk) {
1912
- return { __proto__: null, ...jwk };
1913
- }
1914
- function normalizeJwk(jwk) {
1915
- const normalized = snapshotJwk(jwk);
1916
- if (normalized.ext !== void 0 && typeof normalized.ext != "boolean")
1917
- throw new TypeError('"ext" (Extractable) Parameter must be a boolean');
1918
- if (normalized.key_ops !== void 0) {
1919
- const value = normalized.key_ops, keyOps = Array.isArray(value) ? [...value] : void 0;
1920
- if (!keyOps || keyOps.some((operation) => typeof operation != "string") || new Set(keyOps).size !== keyOps.length)
1921
- throw new TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');
1922
- normalized.key_ops = keyOps;
1923
- }
1924
- return normalized;
1925
- }
1926
- async function jwkToKey(entry, jwk, extractable) {
1927
- if (!entry.kty.includes(jwk.kty))
1928
- throw new JOSENotSupported('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
1929
- const algorithm = entry.resolve?.({ kty: jwk.kty, crv: jwk.crv }) ?? entry.subtle, isPrivate = !!(jwk.d || jwk.priv), keyData = { ...jwk, ext: extractable ?? jwk.ext };
1930
- return keyData.kty !== "AKP" && delete keyData.alg, delete keyData.use, crypto.subtle.importKey("jwk", keyData, algorithm, keyData.ext ?? !isPrivate, jwk.key_ops ?? entry.usages[isPrivate ? 1 : 0]);
1931
- }
1932
- async function rawKey(key, expected, usage, extractable = false) {
1933
- return key instanceof Uint8Array && (key = await crypto.subtle.importKey("raw", key, expected, extractable, [usage])), checkCryptoKey(key, expected, usage), key;
1934
- }
1935
-
1936
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/key_descriptor.js
1937
- function table(entries) {
1938
- const out = { __proto__: null };
1939
- for (const alg in entries)
1940
- out[alg] = { ...entries[alg], alg };
1941
- return out;
1942
- }
1943
-
1944
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jws_algorithms.js
1945
- var sig = [["verify"], ["sign"]];
1946
- function hmac(bits) {
1947
- const subtle = { name: "HMAC", hash: `SHA-${bits}` };
1948
- return { kty: ["oct"], secret: true, subtle, signing: subtle, usages: sig };
1949
- }
1950
- function rsa(bits, saltLength) {
1951
- const subtle = { name: saltLength ? "RSA-PSS" : "RSASSA-PKCS1-v1_5", hash: `SHA-${bits}` };
1952
- return {
1953
- kty: ["RSA"],
1954
- subtle,
1955
- signing: saltLength ? { ...subtle, saltLength } : subtle,
1956
- usages: sig,
1957
- minRsaBits: 2048
1958
- };
1959
- }
1960
- function ecdsa(crv, bits) {
1961
- return {
1962
- kty: ["EC"],
1963
- crv,
1964
- subtle: { name: "ECDSA", namedCurve: crv },
1965
- signing: { name: "ECDSA", hash: `SHA-${bits}` },
1966
- usages: sig
1967
- };
1968
- }
1969
- function eddsa() {
1970
- const subtle = { name: "Ed25519" };
1971
- return {
1972
- kty: ["OKP"],
1973
- crv: "Ed25519",
1974
- subtle,
1975
- signing: subtle,
1976
- usages: sig
1977
- };
1978
- }
1979
- function mldsa(bits) {
1980
- const subtle = { name: `ML-DSA-${bits}` };
1981
- return {
1982
- kty: ["AKP"],
1983
- subtle,
1984
- signing: subtle,
1985
- usages: sig
1986
- };
1987
- }
1988
- var JWS = table({
1989
- HS256: hmac(256),
1990
- HS384: hmac(384),
1991
- HS512: hmac(512),
1992
- RS256: rsa(256),
1993
- RS384: rsa(384),
1994
- RS512: rsa(512),
1995
- PS256: rsa(256, 32),
1996
- PS384: rsa(384, 48),
1997
- PS512: rsa(512, 64),
1998
- ES256: ecdsa("P-256", 256),
1999
- ES384: ecdsa("P-384", 384),
2000
- ES512: ecdsa("P-521", 512),
2001
- EdDSA: eddsa(),
2002
- Ed25519: eddsa(),
2003
- "ML-DSA-44": mldsa(44),
2004
- "ML-DSA-65": mldsa(65),
2005
- "ML-DSA-87": mldsa(87)
2006
- });
2007
- function jwsAlgorithm(alg) {
2008
- const entry = typeof alg == "string" ? JWS[alg] : void 0;
2009
- if (!entry)
2010
- throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
2011
- return entry;
2012
- }
2013
-
2014
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jws_verify.js
2015
- function prepareVerify(options) {
2016
- return [options && validateAlgorithms("algorithms", options.algorithms), options?.crit];
2017
- }
2018
- function parseProtectedHeader(encodedProtected) {
2019
- return encodedProtected === void 0 ? {} : parseJoseHeader(encodedProtected, JWSInvalid, "JWS Protected Header is invalid");
2020
- }
2021
- function encodeCompactUnencodedPayload(payload) {
2022
- try {
2023
- return encode(payload);
2024
- } catch {
2025
- throw new JWSInvalid("JWS Compact Serialization payload must use only ASCII characters");
2026
- }
2027
- }
2028
- async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedProtected) {
2029
- const { protected: encodedProtected, header, payload: inputPayload } = jws, parsedProt = parsedProtected ?? parseProtectedHeader(encodedProtected);
2030
- if (!isDisjoint(parsedProt, header))
2031
- throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
2032
- const joseHeader = { ...parsedProt, ...header }, b64 = validateB64(parsedProt, validateCrit(JWSInvalid, JWS_RECOGNIZED, shared[1], parsedProt, joseHeader)), { alg } = joseHeader;
2033
- if (typeof alg != "string" || !alg)
2034
- throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
2035
- if (shared[0] && !shared[0].has(alg))
2036
- throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');
2037
- if (b64) {
2038
- if (typeof inputPayload != "string")
2039
- throw new JWSInvalid("JWS Payload must be a string");
2040
- } else if (typeof inputPayload != "string" && !(inputPayload instanceof Uint8Array))
2041
- throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");
2042
- const signingPayload = b64 || typeof inputPayload != "string" ? inputPayload : encodeUnencodedPayload(inputPayload);
2043
- let resolvedKey = false;
2044
- typeof key == "function" && (key = await key(parsedProt, jws), resolvedKey = true);
2045
- const entry = jwsAlgorithm(alg), data = concat(encodedProtected !== void 0 ? encode(encodedProtected) : new Uint8Array(), encode("."), typeof signingPayload == "string" ? shared[2] ??= encodeBase64url(signingPayload, "payload", JWSInvalid) : signingPayload), signature = decodeBase64url(jws.signature, "signature", JWSInvalid), k = await prepareKey(entry, key, "verify"), cryptoKey = await rawKey(k, entry.subtle, "verify");
2046
- entry.minRsaBits && checkModulusLength(entry.alg, cryptoKey);
2047
- let verified = false;
2048
- try {
2049
- verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature, data);
2050
- } catch {
2051
- }
2052
- if (!verified)
2053
- throw new JWSSignatureVerificationFailed();
2054
- const result = { payload: typeof signingPayload == "string" ? decodeBase64url(signingPayload, "payload", JWSInvalid) : signingPayload };
2055
- return encodedProtected !== void 0 && (result.protectedHeader = parsedProt), header !== void 0 && (result.unprotectedHeader = header), resolvedKey ? [{ ...result, key: k }, b64] : [result, b64];
2056
- }
2057
- async function verifyCompact(jws, shared, key) {
2058
- if (jws instanceof Uint8Array && (jws = decoder.decode(jws)), typeof jws != "string")
2059
- throw new JWSInvalid("Compact JWS must be a string or Uint8Array");
2060
- const { 0: protectedHeader, 1: payload, 2: signature, length } = jws.split(".");
2061
- if (length !== 3)
2062
- throw new JWSInvalid("Invalid Compact JWS");
2063
- return verifySignature({ payload, protected: protectedHeader, signature }, shared, key, encodeCompactUnencodedPayload);
2064
- }
2065
-
2066
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
2067
- var epoch = (date) => Math.floor(date.getTime() / 1e3);
2068
- var multipliers = {
2069
- s: 1,
2070
- m: 60,
2071
- h: 3600,
2072
- d: 86400,
2073
- w: 604800,
2074
- y: 31557600
2075
- };
2076
- var REGEX = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;
2077
- var checkFailed = "check_failed";
2078
- function invalidDuration() {
2079
- throw new TypeError("Invalid time period format");
2080
- }
2081
- function secs(str) {
2082
- typeof str != "string" && invalidDuration();
2083
- const matched = REGEX.exec(str);
2084
- (!matched || matched[4] && matched[1]) && invalidDuration();
2085
- const value = parseFloat(matched[2]), numericDate2 = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
2086
- return Number.isFinite(numericDate2) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -numericDate2 : numericDate2;
2087
- }
2088
- function validateInput(label, input) {
2089
- if (!Number.isFinite(input))
2090
- throw new TypeError(`Invalid ${label} input`);
2091
- return input;
2092
- }
2093
- var normalizeTyp = (value) => {
2094
- const normalized = value.toLowerCase();
2095
- return value.includes("/") ? normalized : `application/${normalized}`;
2096
- };
2097
- var checkAudiencePresence = (audPayload, audOption) => typeof audPayload == "string" ? audOption.includes(audPayload) : Array.isArray(audPayload) ? audOption.some((aud) => audPayload.includes(aud)) : false;
2098
- function validateNumericDate(payload, claim, required = false) {
2099
- const value = payload[claim];
2100
- if (!(value === void 0 && !required)) {
2101
- if (typeof value != "number")
2102
- throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`, payload, claim, "invalid");
2103
- return value;
2104
- }
2105
- }
2106
- function unexpectedClaim(payload, claim) {
2107
- throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`, payload, claim, checkFailed);
2108
- }
2109
- function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
2110
- let payload;
2111
- try {
2112
- payload = JSON.parse(strictDecoder.decode(encodedPayload));
2113
- } catch {
2114
- }
2115
- if (!isObject(payload))
2116
- throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
2117
- const { typ } = options;
2118
- if (typ !== void 0 && (typeof protectedHeader.typ != "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ)))
2119
- throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', payload, "typ", checkFailed);
2120
- const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options, presenceCheck = [...requiredClaims];
2121
- maxTokenAge !== void 0 && presenceCheck.push("iat"), audience !== void 0 && presenceCheck.push("aud"), subject !== void 0 && presenceCheck.push("sub"), issuer !== void 0 && presenceCheck.push("iss");
2122
- for (const claim of new Set(presenceCheck.reverse()))
2123
- if (!Object.hasOwn(payload, claim))
2124
- throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, "missing");
2125
- issuer !== void 0 && !(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss) && unexpectedClaim(payload, "iss"), subject !== void 0 && payload.sub !== subject && unexpectedClaim(payload, "sub"), audience !== void 0 && !checkAudiencePresence(payload.aud, typeof audience == "string" ? [audience] : audience) && unexpectedClaim(payload, "aud");
2126
- const { clockTolerance } = options;
2127
- let tolerance = 0;
2128
- if (typeof clockTolerance == "string")
2129
- tolerance = secs(clockTolerance);
2130
- else if (clockTolerance !== void 0) {
2131
- if (typeof clockTolerance != "number")
2132
- throw new TypeError("Invalid clockTolerance option type");
2133
- tolerance = clockTolerance;
2134
- }
2135
- validateInput("clockTolerance option", tolerance);
2136
- const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === void 0 ? /* @__PURE__ */ new Date() : currentDate)), iat = validateNumericDate(payload, "iat", maxTokenAge !== void 0), nbf = validateNumericDate(payload, "nbf");
2137
- if (nbf !== void 0 && nbf > now + tolerance)
2138
- throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', payload, "nbf", checkFailed);
2139
- const exp = validateNumericDate(payload, "exp");
2140
- if (exp !== void 0 && exp <= now - tolerance)
2141
- throw new JWTExpired('"exp" claim timestamp check failed', payload, "exp", checkFailed);
2142
- if (maxTokenAge !== void 0) {
2143
- const age = now - iat, max = validateInput("maxTokenAge option", typeof maxTokenAge == "number" ? maxTokenAge : secs(maxTokenAge));
2144
- if (age - tolerance > max)
2145
- throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', payload, "iat", checkFailed);
2146
- if (age < -tolerance)
2147
- throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', payload, "iat", checkFailed);
2148
- }
2149
- return payload;
2150
- }
2151
-
2152
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwt/verify.js
2153
- async function jwtVerify(jwt, key, options) {
2154
- const [verified, b64] = await verifyCompact(jwt, prepareVerify(options), key);
2155
- if (!b64)
2156
- throw new JWTInvalid("JWTs MUST NOT use unencoded payload");
2157
- const payload = validateClaimsSet(verified.protectedHeader, verified.payload, options);
2158
- return { ...verified, payload };
2159
- }
2160
-
2161
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwks/local.js
2162
- function isUsableJWK(jwk, entry, alg, kid) {
2163
- const { kty, key_ops: keyOps, ext, kid: jwkKid, alg: jwkAlg, use, crv } = jwk;
2164
- return (ext === void 0 || typeof ext == "boolean") && (keyOps === void 0 || Array.isArray(keyOps) && keyOps.every((operation, index) => typeof operation == "string" && keyOps.indexOf(operation) === index) && keyOps.includes("verify")) && entry.kty.includes(kty) && (kid === void 0 || typeof kid == "string" && kid === jwkKid) && (jwkAlg === void 0 ? kty !== "AKP" : alg === jwkAlg) && (use === void 0 || use === "sig") && (!entry.crv || crv === entry.crv);
2165
- }
2166
- async function importWithAlgCache(cache2, jwk, entry) {
2167
- const cached = cache2.get(jwk) || cache2.set(jwk, {}).get(jwk), { alg } = entry;
2168
- if (cached[alg] === void 0) {
2169
- const pending = jwkToKey(entry, jwk, true).then((key) => {
2170
- if (key.type !== "public")
2171
- throw new JWKSInvalid("JSON Web Key Set members must be public keys");
2172
- return cached[alg] = key, key;
2173
- }).catch((error2) => {
2174
- throw cached[alg] === pending && delete cached[alg], error2;
2175
- });
2176
- cached[alg] = pending;
2177
- }
2178
- return cached[alg];
2179
- }
2180
- function createLocalJWKSet(jwks) {
2181
- let snapshot;
2182
- try {
2183
- snapshot = structuredClone(jwks);
2184
- } catch {
2185
- }
2186
- if (!isJwkSet(snapshot))
2187
- throw new JWKSInvalid("JSON Web Key Set malformed");
2188
- const metadata = snapshot.keys.map((jwk) => {
2189
- const normalized = snapshotJwk(jwk);
2190
- return Array.isArray(normalized.key_ops) && (normalized.key_ops = [...normalized.key_ops]), normalized;
2191
- }), cached = /* @__PURE__ */ new WeakMap();
2192
- return Object.defineProperty(async (protectedHeader, token) => {
2193
- const { alg, kid } = { ...protectedHeader, ...token?.header }, entry = typeof alg == "string" ? JWS[alg] : void 0;
2194
- if (!entry || entry.secret)
2195
- throw new JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set');
2196
- const candidates = snapshot.keys.filter((_, index) => isUsableJWK(metadata[index], entry, alg, kid)), { 0: jwk, length } = candidates;
2197
- if (!length)
2198
- throw new JWKSNoMatchingKey();
2199
- if (length !== 1) {
2200
- const error2 = new JWKSMultipleMatchingKeys();
2201
- throw error2[Symbol.asyncIterator] = async function* () {
2202
- for (const jwk2 of candidates)
2203
- try {
2204
- yield await importWithAlgCache(cached, jwk2, entry);
2205
- } catch {
2206
- }
2207
- }, error2;
2208
- }
2209
- return importWithAlgCache(cached, jwk, entry);
2210
- }, "jwks", {
2211
- value: () => structuredClone(snapshot)
2212
- });
2213
- }
2214
-
2215
- // node_modules/.pnpm/jose@6.2.12/node_modules/jose/dist/webapi/jwks/remote.js
2216
- function isCloudflareWorkers() {
2217
- return typeof WebSocketPair < "u" || typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers" || typeof EdgeRuntime < "u" && EdgeRuntime === "vercel";
2218
- }
2219
- var USER_AGENT;
2220
- (typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT = "jose/v6.2.12");
2221
- var customFetch = /* @__PURE__ */ Symbol();
2222
- async function fetchJwks(url, headers, signal, fetchImpl = fetch) {
2223
- const response = await fetchImpl(url, {
2224
- method: "GET",
2225
- signal,
2226
- redirect: "manual",
2227
- headers
2228
- }).catch((err) => {
2229
- throw err.name === "TimeoutError" ? new JWKSTimeout() : err;
2230
- });
2231
- if (response.status !== 200)
2232
- throw new JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response");
2233
- try {
2234
- return await response.json();
2235
- } catch {
2236
- throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON");
2237
- }
2238
- }
2239
- var jwksCache = /* @__PURE__ */ Symbol();
2240
- function isFreshFor(timestamp, duration) {
2241
- return Number.isFinite(timestamp) && Date.now() < timestamp + duration;
2242
- }
2243
- function validateDuration(value, fallback, option) {
2244
- if (Number.isNaN(value))
2245
- throw new TypeError(`"${option}" option must not be NaN`);
2246
- return typeof value == "number" ? value : fallback;
2247
- }
2248
- function createRemoteJWKSet(url, options) {
2249
- if (!(url instanceof URL))
2250
- throw new TypeError("url must be an instance of URL");
2251
- const href = new URL(url.href).href, opts = options ?? {}, timeoutOption = opts.timeoutDuration;
2252
- if (typeof timeoutOption == "number" && (!Number.isInteger(timeoutOption) || timeoutOption < 0))
2253
- throw new TypeError('"timeoutDuration" option must be a non-negative integer');
2254
- const timeoutDuration = typeof timeoutOption == "number" ? timeoutOption : 5e3, cooldownDuration = validateDuration(opts.cooldownDuration, 3e4, "cooldownDuration"), cacheMaxAge = validateDuration(opts.cacheMaxAge, 6e5, "cacheMaxAge"), headers = new Headers(opts.headers);
2255
- USER_AGENT && !headers.has("User-Agent") && headers.set("User-Agent", USER_AGENT), headers.has("accept") || headers.set("accept", "application/json, application/jwk-set+json");
2256
- const fetchImpl = opts[customFetch], cache2 = opts[jwksCache];
2257
- let jwksTimestamp, pendingFetch, reloadSequence = 0, appliedSequence = 0, local;
2258
- if (cache2 && typeof cache2 == "object") {
2259
- const { uat, jwks } = cache2;
2260
- isFreshFor(uat, cacheMaxAge) && isJwkSet(jwks) && (jwksTimestamp = uat, local = createLocalJWKSet(jwks));
2261
- }
2262
- const reload = async () => {
2263
- if (pendingFetch && isCloudflareWorkers() && (pendingFetch = void 0), !pendingFetch) {
2264
- const sequence = ++reloadSequence, current = pendingFetch = fetchJwks(href, headers, AbortSignal.timeout(timeoutDuration), fetchImpl).then((json3) => {
2265
- const next = createLocalJWKSet(json3);
2266
- if (sequence <= appliedSequence)
2267
- return;
2268
- local = next;
2269
- const updatedAt = Date.now();
2270
- cache2 && (cache2.uat = updatedAt, cache2.jwks = json3), jwksTimestamp = updatedAt, appliedSequence = sequence;
2271
- }).finally(() => {
2272
- pendingFetch === current && (pendingFetch = void 0);
2273
- });
2274
- }
2275
- await pendingFetch;
2276
- };
2277
- return Object.defineProperties(async (protectedHeader, token) => {
2278
- (!local || !isFreshFor(jwksTimestamp, cacheMaxAge)) && await reload();
2279
- try {
2280
- return await local(protectedHeader, token);
2281
- } catch (err) {
2282
- if (err instanceof JWKSNoMatchingKey && !isFreshFor(jwksTimestamp, cooldownDuration))
2283
- return await reload(), local(protectedHeader, token);
2284
- throw err;
2285
- }
2286
- }, {
2287
- coolingDown: {
2288
- get: () => isFreshFor(jwksTimestamp, cooldownDuration),
2289
- enumerable: true
2290
- },
2291
- fresh: {
2292
- get: () => isFreshFor(jwksTimestamp, cacheMaxAge),
2293
- enumerable: true
2294
- },
2295
- reload: {
2296
- value: reload,
2297
- enumerable: true
2298
- },
2299
- reloading: {
2300
- get: () => !!pendingFetch,
2301
- enumerable: true
2302
- },
2303
- jwks: {
2304
- value: () => local?.jwks(),
2305
- enumerable: true
2306
- }
2307
- });
2308
- }
2309
-
2310
- // packages/cli/src/web/team-auth.ts
2311
1603
  var scrypt = promisify(scryptCallback);
2312
1604
  var COOKIE = "zero_team_session";
2313
1605
  var SSO_COOKIE = "zero_team_sso";
@@ -2329,8 +1621,8 @@ function parseTeamConfig(input) {
2329
1621
  return configSchema.parse(input);
2330
1622
  }
2331
1623
  var TeamAuthError = class extends Error {
2332
- constructor(message2, statusCode = 401) {
2333
- super(message2);
1624
+ constructor(message, statusCode = 401) {
1625
+ super(message);
2334
1626
  this.statusCode = statusCode;
2335
1627
  }
2336
1628
  statusCode;
@@ -2538,8 +1830,8 @@ var TeamAuth = class {
2538
1830
 
2539
1831
  // packages/cli/src/web/findings-access-tokens.ts
2540
1832
  var FindingsAccessError = class extends Error {
2541
- constructor(message2, statusCode = 400) {
2542
- super(message2);
1833
+ constructor(message, statusCode = 400) {
1834
+ super(message);
2543
1835
  this.statusCode = statusCode;
2544
1836
  this.name = "FindingsAccessError";
2545
1837
  }
@@ -2851,8 +2143,8 @@ import { constants as constants2, closeSync as closeSync2, fstatSync as fstatSyn
2851
2143
  import { join as join2, resolve as resolve2 } from "node:path";
2852
2144
  import { homedir as homedir2 } from "node:os";
2853
2145
  var SkillsError = class extends Error {
2854
- constructor(message2, statusCode = 400) {
2855
- super(message2);
2146
+ constructor(message, statusCode = 400) {
2147
+ super(message);
2856
2148
  this.statusCode = statusCode;
2857
2149
  }
2858
2150
  statusCode;
@@ -3203,8 +2495,8 @@ import { createHash as createHash5, randomUUID as randomUUID5 } from "node:crypt
3203
2495
  import { closeSync as closeSync3, constants as constants3, fstatSync as fstatSync3, mkdirSync as mkdirSync3, openSync as openSync3, readFileSync as readFileSync4, realpathSync as realpathSync3, renameSync as renameSync3, unlinkSync as unlinkSync3, writeFileSync as writeFileSync3 } from "node:fs";
3204
2496
  import { join as join3 } from "node:path";
3205
2497
  var EngagementError = class extends Error {
3206
- constructor(message2, statusCode = 400) {
3207
- super(message2);
2498
+ constructor(message, statusCode = 400) {
2499
+ super(message);
3208
2500
  this.statusCode = statusCode;
3209
2501
  this.name = "EngagementError";
3210
2502
  }
@@ -3611,8 +2903,8 @@ var WorkflowTriggerService = class {
3611
2903
  this.#workflows.close();
3612
2904
  }
3613
2905
  };
3614
- function error(status, message2) {
3615
- return { status, data: { error: message2 } };
2906
+ function error(status, message) {
2907
+ return { status, data: { error: message } };
3616
2908
  }
3617
2909
  function isProcessAlive(pid) {
3618
2910
  try {
@@ -3733,6 +3025,7 @@ async function createWorkspaceServices(options) {
3733
3025
  const skills = new SkillsStore({ workspace: options.workspace ?? process.cwd(), stateDir: options.stateDir ?? homeStateDir(), team: options.auth.enabled });
3734
3026
  const remoteProviderRelays = new RemoteProviderRelayBroker({ epoch: options.relayEpoch ?? randomUUID6() });
3735
3027
  const gateway = new ConsoleGateway({
3028
+ allowChatGptPlan: !options.auth.enabled,
3736
3029
  remoteProviderRelays,
3737
3030
  dbPath: options.dbPath,
3738
3031
  projectPath: options.workspace,
@@ -3744,7 +3037,7 @@ async function createWorkspaceServices(options) {
3744
3037
  ...options.stateDir ? { homeDir: options.stateDir } : {}
3745
3038
  });
3746
3039
  const engagements = new EngagementStore({ workspace: options.workspace ?? process.cwd(), dbPath: options.dbPath, ...options.stateDir ? { stateDir: options.stateDir } : {} });
3747
- const operator = new WebOperatorServices({ isTurnActive: () => gateway.hasActiveTurns() });
3040
+ const operator = new WebOperatorServices({ allowChatGptPlan: !options.auth.enabled, isTurnActive: () => gateway.hasActiveTurns() });
3748
3041
  let workflows;
3749
3042
  let engine;
3750
3043
  let triggers;
@@ -3974,8 +3267,8 @@ import { createHash as createHash7, randomUUID as randomUUID8 } from "node:crypt
3974
3267
  import { closeSync as closeSync5, constants as constants5, fstatSync as fstatSync5, mkdirSync as mkdirSync5, openSync as openSync5, readFileSync as readFileSync6, renameSync as renameSync5, unlinkSync as unlinkSync5, writeFileSync as writeFileSync5 } from "node:fs";
3975
3268
  import { join as join5 } from "node:path";
3976
3269
  var CollaborationError = class extends Error {
3977
- constructor(message2, statusCode = 400) {
3978
- super(message2);
3270
+ constructor(message, statusCode = 400) {
3271
+ super(message);
3979
3272
  this.statusCode = statusCode;
3980
3273
  this.name = "CollaborationError";
3981
3274
  }
@@ -4630,8 +3923,8 @@ function discoverSshHosts(configPath = join6(homedir3(), ".ssh", "config")) {
4630
3923
 
4631
3924
  // packages/cli/src/commands/dashboard.ts
4632
3925
  var WebRequestError = class extends Error {
4633
- constructor(message2, statusCode) {
4634
- super(message2);
3926
+ constructor(message, statusCode) {
3927
+ super(message);
4635
3928
  this.statusCode = statusCode;
4636
3929
  }
4637
3930
  statusCode;
@@ -5351,7 +4644,11 @@ function resolveDashboardAssetDir(explicitAssetDir) {
5351
4644
  }
5352
4645
  const embedded = materializeEmbeddedDashboardAssets(DASHBOARD_ASSETS);
5353
4646
  if (embedded) return embedded;
4647
+ const checkoutPackage = resolve4(moduleDir, "..", "..");
5354
4648
  for (const candidate of [
4649
+ // A source-built CLI can run from a different project directory. Resolve
4650
+ // its sibling app from the checkout, never from an unrelated installed CLI.
4651
+ ...existsSync2(join7(checkoutPackage, "src", "index.ts")) ? [join7(checkoutPackage, "..", "dashboard", "dist")] : [],
5355
4652
  join7(process.cwd(), "packages", "dashboard", "dist"),
5356
4653
  join7(process.cwd(), "dist", "dashboard")
5357
4654
  ]) {
@@ -5394,7 +4691,7 @@ async function handleWebConsoleApiRequest(req, res, requestUrl, gateway, operato
5394
4691
  const input = method === "GET" || method === "HEAD" ? void 0 : await readJson(req);
5395
4692
  const member = team?.auth.resolveSession(req);
5396
4693
  const author = member ? { userId: member.userId, displayName: member.displayName } : void 0;
5397
- if (team && method !== "GET" && method !== "HEAD") {
4694
+ if (team?.auth.enabled && method !== "GET" && method !== "HEAD") {
5398
4695
  const readResume = /^saved\/[^/]+\/resume$/.test(path) && input !== null && typeof input === "object" && Object.keys(input).length === 0;
5399
4696
  if (/^saved\/[^/]+\/resume$/.test(path) && team.auth.resolveSession(req)?.role !== "owner" && !readResume) throw new WebRequestError("Only workspace owners can override a saved conversation's configuration.", 403);
5400
4697
  const liveId = /^sessions\/([^/]+)/.exec(path)?.[1];
@@ -5504,8 +4801,8 @@ async function handleWebConsoleApiRequest(req, res, requestUrl, gateway, operato
5504
4801
  } else if (action === "events" && method === "GET") {
5505
4802
  json2(res, 200, gateway.eventsAfter(id2, consoleEventsAfter(requestUrl.searchParams.get("after"))));
5506
4803
  } else if (action === "messages" && method === "POST") {
5507
- const message2 = author && input && typeof input === "object" && !("workerId" in input) && (!("mode" in input) || input.mode === "send") ? { ...input, mode: "queue" } : input;
5508
- const { queuedMessageId, ...session } = await gateway.send(id2, message2, author);
4804
+ const message = author && input && typeof input === "object" && !("workerId" in input) && (!("mode" in input) || input.mode === "send") ? { ...input, mode: "queue" } : input;
4805
+ const { queuedMessageId, ...session } = await gateway.send(id2, message, author);
5509
4806
  json2(res, 202, { session, ...queuedMessageId ? { queuedMessageId } : {} });
5510
4807
  } else if (action === "cancel" && method === "POST") json2(res, 200, { session: await gateway.cancel(id2) });
5511
4808
  else if (action === "connection" && parts[3] === "reload" && parts.length === 4 && method === "POST") {
@@ -5574,7 +4871,7 @@ data: ${JSON.stringify(event)}
5574
4871
  `);
5575
4872
  }
5576
4873
  async function handleApiRequest(req, res, pathname, dbPath, controlToken, engineBearer) {
5577
- const { osecDB: osecDB2 } = await import("./dist-OLGNKDB2.js");
4874
+ const { osecDB: osecDB2 } = await import("./dist-QLMPTFT7.js");
5578
4875
  if (isPresentationEventsStreamPath(pathname)) {
5579
4876
  if (req.method !== "GET") {
5580
4877
  json2(res, 405, { error: "Method not allowed" });
@@ -5628,7 +4925,7 @@ async function handleApiRequest(req, res, pathname, dbPath, controlToken, engine
5628
4925
  return true;
5629
4926
  }
5630
4927
  if (controlPath.action === "recover-stale-workers") {
5631
- const { recoverStaleWorkers } = await import("./orchestrate-Z3DW265M.js");
4928
+ const { recoverStaleWorkers } = await import("./orchestrate-ZF6ZTSIQ.js");
5632
4929
  const body = await readJson(req);
5633
4930
  const recovered = recoverStaleWorkers(
5634
4931
  dbPath,
@@ -5675,8 +4972,8 @@ async function handleApiRequest(req, res, pathname, dbPath, controlToken, engine
5675
4972
  return true;
5676
4973
  }
5677
4974
  if (controlPath.action === "reset-database") {
5678
- const { resetOsecDatabase } = await import("./dist-OLGNKDB2.js");
5679
- const { seedVerificationWorkbench } = await import("./db-R2AQSESC.js");
4975
+ const { resetOsecDatabase } = await import("./dist-QLMPTFT7.js");
4976
+ const { seedVerificationWorkbench } = await import("./db-FU3OIGQK.js");
5680
4977
  const body = await readJson(req);
5681
4978
  const seed = typeof body.seed === "string" ? body.seed.trim().toLowerCase() : "verification";
5682
4979
  if (!["verification", "empty"].includes(seed)) {