0sec-cli 0.18.0 → 0.22.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 (329) hide show
  1. package/{0sec.js → 0.js} +90 -82
  2. package/LICENSE +1 -1
  3. package/README.md +62 -46
  4. package/chunks/adapt-loop-7I57LXXR.js +18 -0
  5. package/chunks/{adgraph-JLGA6RYI.js → adgraph-AUDQTBYA.js} +5 -5
  6. package/chunks/agent/skills/frameworks/entra-id.yaml +2 -2
  7. package/chunks/agent/skills/techniques/assumption-mining.yaml +2 -2
  8. package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +2 -2
  9. package/chunks/agent/skills/techniques/entra-attack-paths.yaml +1 -1
  10. package/chunks/agent/skills/techniques/kernel-weaponization.yaml +1 -1
  11. package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +2 -2
  12. package/chunks/agent/skills/techniques/npm-ecosystem.yaml +1 -1
  13. package/chunks/agent/skills/techniques/poc-verification.yaml +1 -1
  14. package/chunks/agent/skills/techniques/seedless-depth-review.yaml +20 -38
  15. package/chunks/{artifact-scraper-HQ7HLP6V.js → artifact-scraper-PYZ3RU3O.js} +6 -6
  16. package/chunks/{assumption-mining-5SNIVVDN.js → assumption-mining-MFLF43IR.js} +24 -26
  17. package/chunks/{chunk-7DQEV5QI.js → chunk-23DG5YKS.js} +4 -4
  18. package/chunks/{chunk-UR4ELX2Y.js → chunk-2GV4HQKE.js} +340 -703
  19. package/chunks/{chunk-P6WKNFWX.js → chunk-2OQOQ2FZ.js} +8 -8
  20. package/chunks/{chunk-5G3ZXFBW.js → chunk-2WNCI664.js} +3 -3
  21. package/chunks/{chunk-DW5UWPFY.js → chunk-4VGLO2YS.js} +6 -5
  22. package/chunks/{chunk-KLTNTE2Z.js → chunk-5IBCBQEH.js} +13 -14
  23. package/chunks/{chunk-N7BOUYEV.js → chunk-5MWAG3FT.js} +14 -14
  24. package/chunks/{chunk-OEFNRYI2.js → chunk-6GHSR47F.js} +3 -6
  25. package/chunks/chunk-6YNKRUMC.js +4474 -0
  26. package/chunks/{chunk-6L26OBWI.js → chunk-76KSBWOQ.js} +255 -35
  27. package/chunks/chunk-7DEHG7YT.js +2143 -0
  28. package/chunks/{chunk-AD7WXDH6.js → chunk-7UFUALR2.js} +288 -22
  29. package/chunks/{chunk-53G27VPS.js → chunk-AZ7L3HFD.js} +7 -2
  30. package/chunks/{chunk-TSK2AG6J.js → chunk-CAYANSH6.js} +173 -1757
  31. package/chunks/{chunk-SAFFWQW4.js → chunk-DKSCN2AB.js} +7 -7
  32. package/chunks/{chunk-2JCCA2JL.js → chunk-DM5C5L5D.js} +3 -3
  33. package/chunks/{chunk-RWONANDA.js → chunk-DQTNI3KY.js} +5 -5
  34. package/chunks/{chunk-5JI7L7KV.js → chunk-EGZGZFAH.js} +10036 -12938
  35. package/chunks/{chunk-6LKRLK2R.js → chunk-FHC2B7LN.js} +3 -3
  36. package/chunks/{chunk-MYVT64FN.js → chunk-GHWODZMR.js} +2 -2
  37. package/chunks/{chunk-2RMLOJVB.js → chunk-GVD6SJGH.js} +2 -2
  38. package/chunks/{chunk-SF4KZ4O3.js → chunk-HLFS6WV2.js} +2 -2
  39. package/chunks/chunk-HR2TU42B.js +1228 -0
  40. package/chunks/{chunk-BFRB6HB2.js → chunk-HUNAPTKV.js} +3 -3
  41. package/chunks/chunk-IO7R7WBM.js +114 -0
  42. package/chunks/{chunk-WEBMRWEG.js → chunk-IXT64DV5.js} +656 -1868
  43. package/chunks/{chunk-3MOLBTLS.js → chunk-K2PWUPUI.js} +2 -2
  44. package/chunks/{chunk-WXQ6BJ6A.js → chunk-LCRTAQN2.js} +7 -7
  45. package/chunks/{chunk-SVJEDVYK.js → chunk-LPTRPRZR.js} +5 -5
  46. package/chunks/{chunk-CMKXP5RR.js → chunk-LYUAM3TG.js} +3 -3
  47. package/chunks/{chunk-BVAZO4WA.js → chunk-MICHDTBK.js} +3 -3
  48. package/chunks/{chunk-UCYRA73C.js → chunk-OAYUPGF6.js} +4 -4
  49. package/chunks/{chunk-XM5NLHYU.js → chunk-OWLJYJ5O.js} +14 -14
  50. package/chunks/{chunk-BKZFDZ23.js → chunk-QCUFBVIZ.js} +3 -3
  51. package/chunks/chunk-RE5EZDG2.js +5523 -0
  52. package/chunks/{chunk-ASUR522M.js → chunk-RRD4XXPU.js} +9 -9
  53. package/chunks/{chunk-AHTBZC3E.js → chunk-RSIUX3RW.js} +4 -4
  54. package/chunks/{chunk-BZNEY2ZS.js → chunk-SJBCK2EI.js} +15268 -16053
  55. package/chunks/{chunk-IOL7D5YV.js → chunk-SQCBHFWN.js} +3 -3
  56. package/chunks/chunk-TH2LW437.js +7829 -0
  57. package/chunks/{chunk-WVTBZEQO.js → chunk-TM74SSHC.js} +8 -8
  58. package/chunks/{chunk-U5FLXGHT.js → chunk-TO35Y326.js} +13 -729
  59. package/chunks/chunk-TRH2PJSN.js +547 -0
  60. package/chunks/{chunk-YYRBQVFE.js → chunk-TZFIAMWZ.js} +70 -16
  61. package/chunks/chunk-UELXHK2Y.js +1950 -0
  62. package/chunks/{chunk-RJWOYEOG.js → chunk-UEX7PFSE.js} +5 -5
  63. package/chunks/{chunk-VQG4FT5D.js → chunk-UFHN6RIU.js} +2 -2
  64. package/chunks/{chunk-JQHOLLTD.js → chunk-UU7PQP6N.js} +9 -9
  65. package/chunks/{chunk-BFR2CDV5.js → chunk-UV5QWZGE.js} +283 -153
  66. package/chunks/{chunk-WU6AFRAZ.js → chunk-V36HVTUL.js} +12 -12
  67. package/chunks/{chunk-IR537GON.js → chunk-VCSFCHAJ.js} +2 -2
  68. package/chunks/{chunk-YLMN3N25.js → chunk-VIT5ALXF.js} +3 -3
  69. package/chunks/{chunk-BATRQBOR.js → chunk-VMRRNRMR.js} +41 -41
  70. package/chunks/{chunk-72CISA2D.js → chunk-VNRY6AWF.js} +89 -41
  71. package/chunks/chunk-W6UWZFKL.js +298 -0
  72. package/chunks/{chunk-3KPWWJCI.js → chunk-XFCTUKXR.js} +88 -88
  73. package/chunks/{chunk-GMT2AZKM.js → chunk-YIQSGNAA.js} +897 -130
  74. package/chunks/codex-models-7TLJSY3L.js +17 -0
  75. package/chunks/{commands-TBC2F5CE.js → commands-NEI7L3QA.js} +2836 -1424
  76. package/chunks/corpus-v1.json +2 -2
  77. package/chunks/data/appsec-archetypes.json +2 -2
  78. package/chunks/data/chromium-archetypes.json +1 -1
  79. package/chunks/data/freebsd-archetypes.json +1 -1
  80. package/chunks/data/kernel-archetypes.json +2 -2
  81. package/chunks/db-5AP3JB4W.js +16 -0
  82. package/chunks/{disclose-EKTWSCGW.js → disclose-LDNKAVRH.js} +13 -11
  83. package/chunks/{dist-4YICS2J2.js → dist-3FNZIBB4.js} +394 -404
  84. package/chunks/{dist-4MAW5X6L.js → dist-5YHYNLI3.js} +6 -6
  85. package/chunks/{dist-FMGSR3DW.js → dist-DD4H6HMQ.js} +13 -5
  86. package/chunks/dist-KEULE5IQ.js +21914 -0
  87. package/chunks/dist-XZB53PS5.js +53 -0
  88. package/chunks/eval-runner-43BO2C4T.js +26 -0
  89. package/chunks/example-manifest.json +2 -2
  90. package/chunks/{exploit-agent-45YQOHPJ.js → exploit-agent-N4A5ELBK.js} +4 -4
  91. package/chunks/{exploit-autoclimb-UZGEMGYT.js → exploit-autoclimb-N7P6KIF5.js} +6 -6
  92. package/chunks/{exploit-climb-SG23KB2G.js → exploit-climb-WNEJUB5W.js} +12 -12
  93. package/chunks/fix-Z452M4EC.js +26 -0
  94. package/chunks/{github-issues-MJ6OYOOU.js → github-issues-IGTTWM7V.js} +7 -7
  95. package/chunks/harness-QJJJVSG4.js +22 -0
  96. package/chunks/http-conformance-U5F6GKYG.js +11 -0
  97. package/chunks/http-sender-I5XFFY35.js +10 -0
  98. package/chunks/hunt-scan-K6D2V3PX.js +36 -0
  99. package/chunks/{identity-6ZAIIWOR.js → identity-62SVRW4H.js} +5 -5
  100. package/chunks/{kernel-primitive-7U6CWHXD.js → kernel-primitive-TKUACPKD.js} +6 -6
  101. package/chunks/{kernel-vm-runner-3JAU4O6J.js → kernel-vm-runner-RAAO2PGT.js} +6 -6
  102. package/chunks/memsafety-scan-FCPAXIZE.js +16 -0
  103. package/chunks/{native-loop-RJCJPOUS.js → native-loop-2ZRJENZ3.js} +17 -18
  104. package/chunks/{npm-detectors-KB5Y5ZFX.js → npm-detectors-Z2ZIQCN4.js} +6 -6
  105. package/chunks/npm-dynamic-discovery-5J7FT3XM.js +13 -0
  106. package/chunks/orchestrate-2GWGNTBF.js +58 -0
  107. package/chunks/{pre-recon-cve-66EB6G4M.js → pre-recon-cve-X2K2P5YQ.js} +4 -4
  108. package/chunks/prepare-KYHGFWCJ.js +13 -0
  109. package/chunks/process-N245QIQG.js +12 -0
  110. package/chunks/{run-D56MPDKY.js → run-U3XU4CTC.js} +11507 -13632
  111. package/chunks/{runtime-G7YWIO3B.js → runtime-G75TEWQY.js} +10 -11
  112. package/chunks/runtime-XFWJTBUO.js +12 -0
  113. package/chunks/{scan-stream-FHI2FYZE.js → scan-stream-BMOCPKQX.js} +7 -7
  114. package/chunks/scope-WXI46UHJ.js +21 -0
  115. package/chunks/{session-store-GZ4A4KYT.js → session-store-27L3ZU73.js} +6 -6
  116. package/chunks/source-files-REHOM44I.js +12 -0
  117. package/chunks/{specdrift-WCLH6TTQ.js → specdrift-AFS54WEJ.js} +5 -5
  118. package/chunks/token-KRWP5JYA.js +72 -0
  119. package/chunks/token-util-DWTL33S3.js +8 -0
  120. package/chunks/variant-candidates-YWZORZMK.js +13 -0
  121. package/chunks/{web-recon-prepass-JJGPEOLE.js → web-recon-prepass-YVMFXCIK.js} +9 -9
  122. package/cli-path-traversal-fixture.js +352 -0
  123. package/dashboard/assets/bot-Bg1Tp9_d.js +1 -0
  124. package/dashboard/assets/dist-B_dDCPbu.js +1 -0
  125. package/dashboard/assets/findings-page-mayGhNx6.js +5 -0
  126. package/dashboard/assets/format--susmHX7.js +1 -0
  127. package/dashboard/assets/input-TuVPR3Zl.js +1 -0
  128. package/dashboard/assets/jsx-runtime-MGseXjj5.js +3 -0
  129. package/dashboard/assets/live-page-HWWHX99U.js +1 -0
  130. package/dashboard/assets/meta-tile-ckHo-w7k.js +1 -0
  131. package/dashboard/assets/operations-BxZ0OoXO.js +10 -0
  132. package/dashboard/assets/operations-CMFVrXEe.css +2 -0
  133. package/dashboard/assets/operations-app-D3d35rgo.js +46 -0
  134. package/dashboard/assets/overview-page-W_4IteEr.js +1 -0
  135. package/dashboard/assets/page-header-Bw9AJgBV.js +1 -0
  136. package/dashboard/assets/scans-page-CgzVXHnn.js +1 -0
  137. package/dashboard/assets/siren-KQj8QAnJ.js +1 -0
  138. package/dashboard/assets/table-8EDklulN.js +1 -0
  139. package/dashboard/assets/tabs-CFHPOwg8.js +1 -0
  140. package/dashboard/index.html +4 -5
  141. package/node_modules/node-addon-api/LICENSE.md +9 -0
  142. package/node_modules/node-addon-api/README.md +95 -0
  143. package/node_modules/node-addon-api/common.gypi +21 -0
  144. package/node_modules/node-addon-api/except.gypi +25 -0
  145. package/node_modules/node-addon-api/index.js +14 -0
  146. package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
  147. package/node_modules/node-addon-api/napi-inl.h +7250 -0
  148. package/node_modules/node-addon-api/napi.h +3463 -0
  149. package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
  150. package/node_modules/node-addon-api/node_api.gyp +9 -0
  151. package/node_modules/node-addon-api/noexcept.gypi +26 -0
  152. package/node_modules/node-addon-api/nothing.c +0 -0
  153. package/node_modules/node-addon-api/package-support.json +21 -0
  154. package/node_modules/node-addon-api/package.json +481 -0
  155. package/node_modules/node-addon-api/tools/README.md +73 -0
  156. package/node_modules/node-addon-api/tools/check-napi.js +99 -0
  157. package/node_modules/node-addon-api/tools/clang-format.js +71 -0
  158. package/node_modules/node-addon-api/tools/conversion.js +301 -0
  159. package/node_modules/node-gyp-build/LICENSE +21 -0
  160. package/node_modules/node-gyp-build/README.md +58 -0
  161. package/node_modules/node-gyp-build/SECURITY.md +5 -0
  162. package/node_modules/node-gyp-build/bin.js +84 -0
  163. package/node_modules/node-gyp-build/build-test.js +19 -0
  164. package/node_modules/node-gyp-build/index.js +6 -0
  165. package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  166. package/node_modules/node-gyp-build/optional.js +7 -0
  167. package/node_modules/node-gyp-build/package.json +43 -0
  168. package/node_modules/tree-sitter/LICENSE +21 -0
  169. package/node_modules/tree-sitter/README.md +90 -0
  170. package/node_modules/tree-sitter/binding.gyp +76 -0
  171. package/node_modules/tree-sitter/index.js +895 -0
  172. package/node_modules/tree-sitter/package.json +62 -0
  173. package/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
  174. package/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
  175. package/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
  176. package/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
  177. package/node_modules/tree-sitter/src/addon_data.h +47 -0
  178. package/node_modules/tree-sitter/src/binding.cc +35 -0
  179. package/node_modules/tree-sitter/src/conversions.cc +140 -0
  180. package/node_modules/tree-sitter/src/conversions.h +22 -0
  181. package/node_modules/tree-sitter/src/language.cc +106 -0
  182. package/node_modules/tree-sitter/src/language.h +17 -0
  183. package/node_modules/tree-sitter/src/logger.cc +70 -0
  184. package/node_modules/tree-sitter/src/logger.h +19 -0
  185. package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
  186. package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
  187. package/node_modules/tree-sitter/src/node.cc +1056 -0
  188. package/node_modules/tree-sitter/src/node.h +30 -0
  189. package/node_modules/tree-sitter/src/parser.cc +298 -0
  190. package/node_modules/tree-sitter/src/parser.h +35 -0
  191. package/node_modules/tree-sitter/src/query.cc +383 -0
  192. package/node_modules/tree-sitter/src/query.h +39 -0
  193. package/node_modules/tree-sitter/src/tree.cc +307 -0
  194. package/node_modules/tree-sitter/src/tree.h +45 -0
  195. package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
  196. package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
  197. package/node_modules/tree-sitter/tree-sitter.d.ts +211 -0
  198. package/node_modules/tree-sitter/vendor/tree-sitter/LICENSE +21 -0
  199. package/node_modules/tree-sitter/vendor/tree-sitter/README.md +21 -0
  200. package/node_modules/tree-sitter/vendor/tree-sitter/lib/README.md +6 -0
  201. package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1266 -0
  202. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
  203. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
  204. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +290 -0
  205. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
  206. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
  207. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
  208. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
  209. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
  210. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
  211. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +221 -0
  212. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +299 -0
  213. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
  214. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +419 -0
  215. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
  216. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +14 -0
  217. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +774 -0
  218. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2151 -0
  219. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +230 -0
  220. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
  221. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4134 -0
  222. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
  223. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
  224. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
  225. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
  226. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1060 -0
  227. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +382 -0
  228. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +165 -0
  229. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
  230. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +714 -0
  231. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
  232. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
  233. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
  234. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
  235. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
  236. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
  237. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
  238. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
  239. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
  240. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
  241. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +50 -0
  242. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +23 -0
  243. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
  244. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1294 -0
  245. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1823 -0
  246. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
  247. package/node_modules/tree-sitter/vendor/tree-sitter/test/fixtures/grammars/.gitkeep +0 -0
  248. package/node_modules/tree-sitter-c/LICENSE +21 -0
  249. package/node_modules/tree-sitter-c/README.md +18 -0
  250. package/node_modules/tree-sitter-c/binding.gyp +20 -0
  251. package/node_modules/tree-sitter-c/bindings/node/binding.cc +20 -0
  252. package/node_modules/tree-sitter-c/bindings/node/index.d.ts +28 -0
  253. package/node_modules/tree-sitter-c/bindings/node/index.js +7 -0
  254. package/node_modules/tree-sitter-c/grammar.js +1463 -0
  255. package/node_modules/tree-sitter-c/package.json +108 -0
  256. package/node_modules/tree-sitter-c/prebuilds/darwin-arm64/tree-sitter-c.node +0 -0
  257. package/node_modules/tree-sitter-c/prebuilds/darwin-x64/tree-sitter-c.node +0 -0
  258. package/node_modules/tree-sitter-c/prebuilds/linux-x64/tree-sitter-c.node +0 -0
  259. package/node_modules/tree-sitter-c/prebuilds/win32-x64/tree-sitter-c.node +0 -0
  260. package/node_modules/tree-sitter-c/queries/highlights.scm +81 -0
  261. package/node_modules/tree-sitter-c/queries/tags.scm +9 -0
  262. package/node_modules/tree-sitter-c/src/grammar.json +9682 -0
  263. package/node_modules/tree-sitter-c/src/node-types.json +4556 -0
  264. package/node_modules/tree-sitter-c/src/parser.c +113852 -0
  265. package/node_modules/tree-sitter-c/src/tree_sitter/alloc.h +54 -0
  266. package/node_modules/tree-sitter-c/src/tree_sitter/array.h +290 -0
  267. package/node_modules/tree-sitter-c/src/tree_sitter/parser.h +265 -0
  268. package/package.json +20 -13
  269. package/vendor/tree-sitter-0.21.1-node24.json +16 -0
  270. package/vendor/tree-sitter-0.21.1-node24.tgz +0 -0
  271. package/chunks/adapt-loop-SMH6V4PD.js +0 -18
  272. package/chunks/appsec-catalog-CBWHGTEL.js +0 -24
  273. package/chunks/chunk-242TMK6G.js +0 -110
  274. package/chunks/chunk-57ZENEX2.js +0 -169
  275. package/chunks/chunk-ADOLI6DT.js +0 -102
  276. package/chunks/chunk-ATATQACO.js +0 -471
  277. package/chunks/chunk-C2WXWFBB.js +0 -1070
  278. package/chunks/chunk-F3WBKITT.js +0 -687
  279. package/chunks/chunk-H2FFLZNK.js +0 -3
  280. package/chunks/chunk-LP3HHYQU.js +0 -245
  281. package/chunks/chunk-QI233I24.js +0 -333
  282. package/chunks/chunk-RRMJC3ZE.js +0 -105
  283. package/chunks/chunk-Z5FA2XOX.js +0 -2798
  284. package/chunks/cost-ledger-NU63MYZM.js +0 -13
  285. package/chunks/db-KFWOAUUB.js +0 -16
  286. package/chunks/eval-runner-7ZF472KV.js +0 -27
  287. package/chunks/fix-IG7LYXH3.js +0 -12
  288. package/chunks/harness-7ODOLOWU.js +0 -22
  289. package/chunks/http-conformance-DU66MZIU.js +0 -11
  290. package/chunks/http-sender-GWH2IYEA.js +0 -10
  291. package/chunks/hunt-scan-MMKUOETU.js +0 -38
  292. package/chunks/memsafety-scan-J7SECV5W.js +0 -16
  293. package/chunks/npm-dynamic-discovery-AHROOZDB.js +0 -13
  294. package/chunks/orchestrate-OC2VZN2X.js +0 -62
  295. package/chunks/pipeline-BZK5BLJR.js +0 -14
  296. package/chunks/prepare-MYY743TK.js +0 -13
  297. package/chunks/process-LQRCS5OY.js +0 -13
  298. package/chunks/replay-runner-45G3VU7X.js +0 -39
  299. package/chunks/runtime-J7PLXZNM.js +0 -12
  300. package/chunks/scope-BI7BF4ZY.js +0 -18
  301. package/chunks/source-files-PWRQR6LY.js +0 -12
  302. package/chunks/variant-candidates-YERCYMPD.js +0 -13
  303. package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
  304. package/dashboard/assets/bot-yILPnRgD.js +0 -1
  305. package/dashboard/assets/chevron-down-BeDJ-Vka.js +0 -1
  306. package/dashboard/assets/circle-alert-BEnMBMT-.js +0 -1
  307. package/dashboard/assets/client-DRYsuOGl.js +0 -9
  308. package/dashboard/assets/copy-Bi5vzoF9.js +0 -1
  309. package/dashboard/assets/desktop-CXTQonNm.js +0 -32
  310. package/dashboard/assets/desktop-NOekk4QS.css +0 -1
  311. package/dashboard/assets/dist-CmX-h7a4.js +0 -1
  312. package/dashboard/assets/dist-DAwYQmf_.js +0 -45
  313. package/dashboard/assets/findings-page-CACW9nw2.js +0 -5
  314. package/dashboard/assets/format-PoISqsES.js +0 -1
  315. package/dashboard/assets/jsx-runtime-C7oxC63R.js +0 -1
  316. package/dashboard/assets/live-page-DrgQqQK5.js +0 -1
  317. package/dashboard/assets/meta-tile-CcskIV_o.js +0 -1
  318. package/dashboard/assets/operations-BKE8T-vY.css +0 -2
  319. package/dashboard/assets/operations-D8nUP5_m.js +0 -4
  320. package/dashboard/assets/operations-app-CQQhG54n.js +0 -2
  321. package/dashboard/assets/overview-page-DTGS8dPo.js +0 -1
  322. package/dashboard/assets/page-header-MFVvEtZW.js +0 -1
  323. package/dashboard/assets/play-Dwo-9xt6.js +0 -1
  324. package/dashboard/assets/scans-page-ChVtq8Us.js +0 -1
  325. package/dashboard/assets/search-CiooTLck.js +0 -1
  326. package/dashboard/assets/siren-CCBwTSuk.js +0 -1
  327. package/dashboard/assets/table-BYS-nIVA.js +0 -1
  328. package/dashboard/assets/tabs-DivxbhQy.js +0 -1
  329. package/dashboard/desktop.html +0 -21
@@ -1,17 +1,36 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __0secCreateRequire } from "node:module";
3
- const require = __0secCreateRequire(import.meta.url);
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
4
  import {
5
- loadLayeredSettings
6
- } from "./chunk-GMT2AZKM.js";
5
+ FEEDBACK_OPT_OUT_ENV,
6
+ PROVIDERS,
7
+ accountEnvPatch,
8
+ loadAccountStore,
9
+ loadGlobalSettings,
10
+ loadLayeredSettings,
11
+ maybeLoadCodexAuth,
12
+ normalizeSettings,
13
+ saveSettings,
14
+ submissionBlockedReason
15
+ } from "./chunk-YIQSGNAA.js";
16
+ import {
17
+ runSmolvmWorkbench
18
+ } from "./chunk-EGZGZFAH.js";
19
+ import {
20
+ ANALYTICS_LEVEL_ENV,
21
+ getSmolvmWorkbenchStatus,
22
+ isAdmittedSmolvmWorkbench,
23
+ levelAtLeast,
24
+ resolveAnalyticsLevel
25
+ } from "./chunk-RE5EZDG2.js";
7
26
  import {
8
27
  homeStateDir
9
- } from "./chunk-6L26OBWI.js";
28
+ } from "./chunk-76KSBWOQ.js";
10
29
  import {
11
30
  __commonJS,
12
31
  __require,
13
32
  __toESM
14
- } from "./chunk-IR537GON.js";
33
+ } from "./chunk-VCSFCHAJ.js";
15
34
 
16
35
  // node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/error.js
17
36
  var require_error = __commonJS({
@@ -3023,11 +3042,249 @@ var {
3023
3042
  Help
3024
3043
  } = import_index.default;
3025
3044
 
3045
+ // packages/cli/src/workbench.ts
3046
+ import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, writeFileSync } from "node:fs";
3047
+ import { homedir } from "node:os";
3048
+ import { dirname, isAbsolute, join } from "node:path";
3049
+ import { execFile } from "node:child_process";
3050
+ import { promisify } from "node:util";
3051
+ var execFileAsync = promisify(execFile);
3052
+ var WORKBENCH_INNER_ARGUMENT = "--workbench-inner";
3053
+ function workbenchConfigPath(home = process.env.HOME || homedir()) {
3054
+ return join(homeStateDir(home), "workbench.json");
3055
+ }
3056
+ function defaultWorkbenchStateRoot(home = process.env.HOME || homedir()) {
3057
+ return join(homeStateDir(home), "workbench");
3058
+ }
3059
+ function positiveInteger(value, maximum) {
3060
+ return typeof value === "number" && Number.isInteger(value) && value > 0 && value <= maximum;
3061
+ }
3062
+ function isPinnedWorkbenchImageReference(value) {
3063
+ return typeof value === "string" && /^[a-z0-9][a-z0-9._:/-]*@sha256:[a-f0-9]{64}$/.test(value) && !value.slice(0, value.indexOf("@")).slice(value.lastIndexOf("/") + 1).includes(":");
3064
+ }
3065
+ function normalizeWorkbenchConfig(raw) {
3066
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw)) throw new Error("Invalid workbench operator choices.");
3067
+ const config = raw;
3068
+ const approvedImages = [];
3069
+ if (config.approvedImages !== void 0) {
3070
+ if (!Array.isArray(config.approvedImages)) throw new Error("Invalid workbench sandbox image catalog.");
3071
+ const references = /* @__PURE__ */ new Set();
3072
+ for (const rawImage of config.approvedImages) {
3073
+ if (typeof rawImage !== "object" || rawImage === null || Array.isArray(rawImage)) throw new Error("Invalid workbench sandbox image catalog.");
3074
+ const image = rawImage;
3075
+ if (!isPinnedWorkbenchImageReference(image.reference) || typeof image.archive !== "string" || !isAbsolute(image.archive) || typeof image.digest !== "string" || !/^sha256:[a-f0-9]{64}$/.test(image.digest) || references.has(image.reference)) throw new Error("Sandbox image grants require unique immutable repository@sha256 references and approved local archives.");
3076
+ references.add(image.reference);
3077
+ approvedImages.push({ reference: image.reference, archive: image.archive, digest: image.digest });
3078
+ }
3079
+ }
3080
+ if (config.schemaVersion !== 1 || typeof config.image !== "string" || !isAbsolute(config.image) || typeof config.imageDigest !== "string" || !/^sha256:[a-f0-9]{64}$/.test(config.imageDigest) || typeof config.stateRoot !== "string" || !isAbsolute(config.stateRoot) || config.workspaceRoot !== void 0 && (typeof config.workspaceRoot !== "string" || !isAbsolute(config.workspaceRoot)) || !Array.isArray(config.providers) || config.providers.some((id) => typeof id !== "string" || !PROVIDERS.some((provider) => provider.id === id)) || typeof config.github !== "boolean" || !positiveInteger(config.cpus, 64) || !positiveInteger(config.memoryMb, 262144) || !positiveInteger(config.storageGb, 1024)) {
3081
+ throw new Error("Invalid workbench operator choices.");
3082
+ }
3083
+ return {
3084
+ schemaVersion: 1,
3085
+ image: config.image,
3086
+ imageDigest: config.imageDigest,
3087
+ stateRoot: config.stateRoot,
3088
+ ...config.workspaceRoot === void 0 ? {} : { workspaceRoot: config.workspaceRoot },
3089
+ providers: [...new Set(config.providers)],
3090
+ github: config.github,
3091
+ cpus: config.cpus,
3092
+ memoryMb: config.memoryMb,
3093
+ storageGb: config.storageGb,
3094
+ ...approvedImages.length ? { approvedImages } : {}
3095
+ };
3096
+ }
3097
+ function loadWorkbenchConfig(home) {
3098
+ const file = workbenchConfigPath(home);
3099
+ if (!existsSync(file)) return void 0;
3100
+ try {
3101
+ const stat = lstatSync(file);
3102
+ if (!stat.isFile() || stat.isSymbolicLink() || (stat.mode & 63) !== 0 || stat.uid !== process.getuid?.()) {
3103
+ throw new Error("Workbench configuration must be an operator-owned, private regular file (mode 0600).");
3104
+ }
3105
+ return normalizeWorkbenchConfig(JSON.parse(readFileSync(file, "utf8")));
3106
+ } catch (error) {
3107
+ if (error instanceof Error && error.message.startsWith("Workbench configuration must")) throw error;
3108
+ throw new Error(`Unreadable or invalid workbench configuration at ${file}. Repair the operator choices before setup or launch; no profile fallback is allowed.`);
3109
+ }
3110
+ }
3111
+ function saveWorkbenchConfig(config, home) {
3112
+ const path = workbenchConfigPath(home);
3113
+ mkdirSync(dirname(path), { recursive: true, mode: 448 });
3114
+ const temporary = `${path}.${process.pid}.tmp`;
3115
+ writeFileSync(temporary, `${JSON.stringify(normalizeWorkbenchConfig(config), null, 2)}
3116
+ `, { encoding: "utf8", mode: 384, flag: "wx" });
3117
+ renameSync(temporary, path);
3118
+ chmodSync(path, 384);
3119
+ }
3120
+ var PROVIDER_CONFIGURATION = {
3121
+ "chatgpt-codex": ["ZERO_CHATGPT_ACCOUNT_ID", "ZERO_CHATGPT_BASE_URL"],
3122
+ deepseek: ["DEEPSEEK_BASE_URL"],
3123
+ openrouter: ["OPENROUTER_BASE_URL"],
3124
+ azure: ["AZURE_OPENAI_BASE_URL", "AZURE_OPENAI_API_VERSION", "AZURE_OPENAI_DEPLOYMENT", "OPENAI_BASE_URL"],
3125
+ openai: ["OPENAI_BASE_URL"],
3126
+ "z-ai": ["Z_AI_BASE_URL"],
3127
+ kimi: ["KIMI_BASE_URL"],
3128
+ qwen: ["QWEN_BASE_URL"],
3129
+ xai: ["XAI_BASE_URL"],
3130
+ opencode: ["OPENCODE_BASE_URL"],
3131
+ copilot: ["COPILOT_BASE_URL"],
3132
+ google: ["GOOGLE_CLOUD_PROJECT", "ZERO_GEMINI_PROJECT"],
3133
+ anthropic: ["ANTHROPIC_BASE_URL"]
3134
+ };
3135
+ function selectedWorkbenchEnvironment(config, env, accounts) {
3136
+ const selected = { version: 2, providers: {} };
3137
+ const result = {};
3138
+ for (const id of config.providers) {
3139
+ const provider = PROVIDERS.find((candidate) => candidate.id === id);
3140
+ if (!provider) throw new Error(`Unknown workbench provider grant: ${id}`);
3141
+ const account = accounts.providers[id];
3142
+ if (account) selected.providers[id] = account;
3143
+ for (const name of [...provider.envVars, ...PROVIDER_CONFIGURATION[id] ?? []]) {
3144
+ const value = env[name];
3145
+ if (value?.trim()) result[name] = value;
3146
+ }
3147
+ }
3148
+ Object.assign(result, accountEnvPatch(selected, result));
3149
+ if (config.github) {
3150
+ const token = env.GH_TOKEN?.trim() || env.GITHUB_TOKEN?.trim();
3151
+ if (token) result.GH_TOKEN = token;
3152
+ }
3153
+ for (const name of ["TERM", "COLORTERM", "NO_COLOR", "LANG", "LC_ALL"]) {
3154
+ const value = env[name];
3155
+ if (value !== void 0) result[name] = value;
3156
+ }
3157
+ return result;
3158
+ }
3159
+ async function integrationEnvironment(config, home) {
3160
+ const accounts = config.providers.length ? loadAccountStore(home) : { version: 2, providers: {} };
3161
+ const environment = selectedWorkbenchEnvironment(config, process.env, accounts);
3162
+ if (config.providers.includes("chatgpt-codex")) {
3163
+ const codexEnvironment = {
3164
+ ...environment,
3165
+ ZERO_CHATGPT_AUTH_FILE: process.env.ZERO_CHATGPT_AUTH_FILE,
3166
+ ZERO_CODEX_AUTH_JSON_PATH: process.env.ZERO_CODEX_AUTH_JSON_PATH
3167
+ };
3168
+ maybeLoadCodexAuth({ env: codexEnvironment, home });
3169
+ for (const name of ["ZERO_CHATGPT_ACCESS_TOKEN", "ZERO_CHATGPT_OAUTH_REFRESH_TOKEN"]) {
3170
+ const value = codexEnvironment[name];
3171
+ if (value) environment[name] = value;
3172
+ }
3173
+ }
3174
+ if (config.github && !environment.GH_TOKEN) {
3175
+ try {
3176
+ const { stdout } = await execFileAsync("gh", ["auth", "token"], { encoding: "utf8", timeout: 1e4, maxBuffer: 65536 });
3177
+ if (stdout.trim()) environment.GH_TOKEN = stdout.trim();
3178
+ } catch {
3179
+ throw new Error("GitHub grant is enabled but no token is available. Connect gh on the host or run 0 workbench setup --no-github.");
3180
+ }
3181
+ }
3182
+ return environment;
3183
+ }
3184
+ function resolveWorkbenchGuestSettings(settings, env = process.env) {
3185
+ const privacy = { [ANALYTICS_LEVEL_ENV]: env[ANALYTICS_LEVEL_ENV] ?? settings.analyticsLevel };
3186
+ for (const name of FEEDBACK_OPT_OUT_ENV) privacy[name] = env[name];
3187
+ const environmentLevel = resolveAnalyticsLevel(privacy);
3188
+ return normalizeSettings({
3189
+ ...settings,
3190
+ executionProfile: "local",
3191
+ updatePolicy: "off",
3192
+ analyticsLevel: levelAtLeast(environmentLevel, settings.analyticsLevel) ? settings.analyticsLevel : environmentLevel,
3193
+ diagnosticReporting: submissionBlockedReason(privacy, { allowCloud: false }) === "opt-out" ? "off" : settings.diagnosticReporting
3194
+ });
3195
+ }
3196
+ function workbenchNetworkEnabled(env = process.env) {
3197
+ return submissionBlockedReason({ ZERO_OFFLINE: env.ZERO_OFFLINE }, { allowCloud: false }) !== "opt-out";
3198
+ }
3199
+ async function launchConfiguredWorkbench(args) {
3200
+ const home = process.env.HOME || homedir();
3201
+ if (args[0] === WORKBENCH_INNER_ARGUMENT) {
3202
+ if (process.platform !== "linux" || !isAdmittedSmolvmWorkbench()) {
3203
+ throw new Error("Missing authenticated SmolVM broker admission; refusing internal invocation.");
3204
+ }
3205
+ process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
3206
+ return void 0;
3207
+ }
3208
+ if (process.platform === "linux" && isAdmittedSmolvmWorkbench()) return void 0;
3209
+ if (args[0] === "workbench" || args[0] === "config") return void 0;
3210
+ const hostSettings = loadGlobalSettings(home, { requireExecutionProfile: existsSync(workbenchConfigPath(home)) });
3211
+ if (hostSettings.executionProfile !== "smolvm") return void 0;
3212
+ const config = loadWorkbenchConfig(home);
3213
+ if (!config) throw new Error("SmolVM profile is selected but no workbench is configured. Run 0 workbench setup --image <approved-archive>.");
3214
+ const workspaceRoot = realpathSync(config.workspaceRoot ?? process.cwd());
3215
+ if (!lstatSync(workspaceRoot).isDirectory()) throw new Error("The configured workbench workspace is not a directory.");
3216
+ const status = await getSmolvmWorkbenchStatus({ stateRoot: config.stateRoot, image: config.image });
3217
+ if (status.retainedRuns.length) throw new Error("SmolVM has retained admission from an unproven cleanup. Resolve it before launching another workbench.");
3218
+ if (!status.platformSupported || !status.runtimeReady || !status.imageApproved) {
3219
+ throw new Error(status.error ?? "SmolVM runtime or approved image is unavailable. Run 0 workbench setup; host fallback is refused.");
3220
+ }
3221
+ const environment = await integrationEnvironment(config, home);
3222
+ const network = workbenchNetworkEnabled();
3223
+ if (!network) environment.ZERO_OFFLINE = "1";
3224
+ const guestState = join(config.stateRoot, "guest-state");
3225
+ mkdirSync(guestState, { recursive: true, mode: 448 });
3226
+ if (!lstatSync(guestState).isDirectory() || lstatSync(guestState).isSymbolicLink()) throw new Error("Workbench guest-state must be a real private directory.");
3227
+ const settingsFile = join(guestState, "tui-settings.json");
3228
+ const temporarySettings = `${settingsFile}.${process.pid}.tmp`;
3229
+ writeFileSync(temporarySettings, `${JSON.stringify(resolveWorkbenchGuestSettings(hostSettings), null, 2)}
3230
+ `, { mode: 384, flag: "wx" });
3231
+ renameSync(temporarySettings, settingsFile);
3232
+ const controller = new AbortController();
3233
+ let signalCode;
3234
+ const interrupt = () => {
3235
+ signalCode = 130;
3236
+ controller.abort();
3237
+ };
3238
+ const terminate = () => {
3239
+ signalCode = 143;
3240
+ controller.abort();
3241
+ };
3242
+ const hangup = () => {
3243
+ signalCode = 129;
3244
+ controller.abort();
3245
+ };
3246
+ process.once("SIGINT", interrupt);
3247
+ process.once("SIGTERM", terminate);
3248
+ process.once("SIGHUP", hangup);
3249
+ let result;
3250
+ try {
3251
+ result = await runSmolvmWorkbench({
3252
+ image: config.image,
3253
+ workspaceRoot,
3254
+ stateRoot: config.stateRoot,
3255
+ command: ["/usr/local/bin/0", WORKBENCH_INNER_ARGUMENT, ...args],
3256
+ environment,
3257
+ network,
3258
+ tty: !!process.stdin.isTTY && !!process.stdout.isTTY,
3259
+ cpus: config.cpus,
3260
+ memoryMb: config.memoryMb,
3261
+ storageGb: config.storageGb,
3262
+ signal: controller.signal,
3263
+ approvedImages: config.approvedImages ?? []
3264
+ });
3265
+ } finally {
3266
+ process.removeListener("SIGINT", interrupt);
3267
+ process.removeListener("SIGTERM", terminate);
3268
+ process.removeListener("SIGHUP", hangup);
3269
+ }
3270
+ if (result.cleanupFailed) {
3271
+ process.stderr.write("[0] SmolVM cleanup could not be proven. Workbench admission/state is retained; host execution is refused.\n");
3272
+ return 125;
3273
+ }
3274
+ if (result.error) process.stderr.write(`[0] ${result.error}
3275
+ `);
3276
+ if (result.timedOut) return 124;
3277
+ return signalCode ?? result.exitCode ?? 125;
3278
+ }
3279
+ function selectWorkbenchProfile(profile, home) {
3280
+ if (!saveSettings({ ...loadGlobalSettings(home), executionProfile: profile }, home)) throw new Error("Could not persist the operator execution profile.");
3281
+ }
3282
+
3026
3283
  // packages/cli/src/utils/update-check.ts
3027
- import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
3028
- import { join } from "node:path";
3284
+ import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
3285
+ import { join as join2 } from "node:path";
3029
3286
  import { spawn } from "node:child_process";
3030
- var REPO = "0sec-labs/0sec";
3287
+ var REPO = "0sec-labs/0";
3031
3288
  var INSTALL_URL = `https://raw.githubusercontent.com/${REPO}/main/install.sh`;
3032
3289
  var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
3033
3290
  var FETCH_TIMEOUT_MS = 4e3;
@@ -3070,9 +3327,9 @@ function disabled(value) {
3070
3327
  return value !== void 0 && value !== "" && value !== "0" && value.toLowerCase() !== "false";
3071
3328
  }
3072
3329
  function shouldRunCheck(env = process.env, isTty = Boolean(process.stdout.isTTY), policy) {
3073
- if (!isTty || disabled(env.CI) || disabled(env["0SEC_OFFLINE"]) || disabled(env["0SEC_NO_UPDATE_CHECK"])) return false;
3330
+ if (!isTty || disabled(env.CI) || disabled(env["ZERO_OFFLINE"]) || disabled(env["ZERO_NO_UPDATE_CHECK"])) return false;
3074
3331
  if (policy !== void 0) return policy !== "off";
3075
- return env["0SEC_UPDATE_CHECK"] === "1";
3332
+ return env["ZERO_UPDATE_CHECK"] === "1";
3076
3333
  }
3077
3334
  function recent(timestamp, now) {
3078
3335
  const age = now - Date.parse(timestamp ?? "");
@@ -3080,7 +3337,7 @@ function recent(timestamp, now) {
3080
3337
  }
3081
3338
  function readCache() {
3082
3339
  try {
3083
- const raw = JSON.parse(readFileSync(join(homeStateDir(), "last-update-check"), "utf8"));
3340
+ const raw = JSON.parse(readFileSync2(join2(homeStateDir(), "last-update-check"), "utf8"));
3084
3341
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
3085
3342
  const value = raw;
3086
3343
  if (typeof value.lastCheckedAt !== "string") return null;
@@ -3096,8 +3353,8 @@ function readCache() {
3096
3353
  }
3097
3354
  function writeCache(cache) {
3098
3355
  try {
3099
- mkdirSync(homeStateDir(), { recursive: true });
3100
- writeFileSync(join(homeStateDir(), "last-update-check"), JSON.stringify(cache));
3356
+ mkdirSync2(homeStateDir(), { recursive: true });
3357
+ writeFileSync2(join2(homeStateDir(), "last-update-check"), JSON.stringify(cache));
3101
3358
  } catch {
3102
3359
  }
3103
3360
  }
@@ -3106,7 +3363,7 @@ async function fetchLatestTag() {
3106
3363
  const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
3107
3364
  try {
3108
3365
  const response = await fetch(`https://api.github.com/repos/${REPO}/releases/latest`, {
3109
- headers: { Accept: "application/vnd.github+json", "User-Agent": "0sec-cli/update-check" },
3366
+ headers: { Accept: "application/vnd.github+json", "User-Agent": "@0/cli/update-check" },
3110
3367
  signal: controller.signal
3111
3368
  });
3112
3369
  if (!response.ok) return null;
@@ -3123,8 +3380,8 @@ async function fetchLatestTag() {
3123
3380
  var installInProgress = false;
3124
3381
  var attemptedAutomaticTags = /* @__PURE__ */ new Set();
3125
3382
  async function performAutoUpdate(options = {}) {
3126
- if (process.platform === "win32") return { success: false, installed: false, error: "Automatic installation is unavailable on Windows; download a release from https://github.com/0sec-labs/0sec/releases/latest." };
3127
- if (disabled(process.env["0SEC_OFFLINE"]) || disabled(process.env["0SEC_NO_UPDATE_CHECK"])) {
3383
+ if (process.platform === "win32") return { success: false, installed: false, error: "Automatic installation is unavailable on Windows; download a release from https://github.com/0sec-labs/0/releases/latest." };
3384
+ if (disabled(process.env["ZERO_OFFLINE"]) || disabled(process.env["ZERO_NO_UPDATE_CHECK"])) {
3128
3385
  return { success: false, installed: false, error: "Updates are disabled by the current offline/update policy." };
3129
3386
  }
3130
3387
  if (installInProgress) return { success: false, installed: false, error: "An update is already in progress." };
@@ -3135,7 +3392,7 @@ async function performAutoUpdate(options = {}) {
3135
3392
  if (!tag || !version?.complete) return { success: false, installed: false, error: "Could not resolve a valid release tag." };
3136
3393
  const normalizedTag = tag.startsWith("v") ? tag : `v${tag}`;
3137
3394
  const env = { ...process.env, RELEASE_BASE_URL: `https://github.com/${REPO}/releases/download/${normalizedTag}` };
3138
- const installDir = options.installDir ?? process.env["0SEC_INSTALL_DIR"];
3395
+ const installDir = options.installDir ?? process.env["ZERO_INSTALL_DIR"];
3139
3396
  if (installDir !== void 0) env.INSTALL_DIR = installDir;
3140
3397
  const timeoutMs = Number.isFinite(options.timeoutMs) && options.timeoutMs > 0 ? Math.min(options.timeoutMs, INSTALL_TIMEOUT_MS) : INSTALL_TIMEOUT_MS;
3141
3398
  return await new Promise((resolve) => {
@@ -3215,22 +3472,22 @@ async function maybeNotifyUpdate(currentVersion, options = {}) {
3215
3472
  const candidate = tag ? parseVersion(tag) : null;
3216
3473
  if (!tag || !candidate?.complete || candidate.prerelease.length > 0 || compareVersions(tag, currentVersion) <= 0) return;
3217
3474
  if (policy !== "automatic") {
3218
- process.stderr.write(`[0sec] Update available: ${currentVersion} \u2192 ${tag}. Run 0sec upgrade.
3475
+ process.stderr.write(`[0] Update available: ${currentVersion} \u2192 ${tag}. Run 0 upgrade.
3219
3476
  `);
3220
3477
  return;
3221
3478
  }
3222
3479
  if (attemptedAutomaticTags.has(tag) || cache.lastInstallTag === tag && recent(cache.lastInstallAttemptAt, now)) return;
3223
3480
  attemptedAutomaticTags.add(tag);
3224
3481
  writeCache({ ...cache, lastInstallTag: tag, lastInstallAttemptAt: new Date(now).toISOString() });
3225
- process.stderr.write(`[0sec] Updating to ${tag} before starting the console\u2026
3482
+ process.stderr.write(`[0] Updating to ${tag} before starting the console\u2026
3226
3483
  `);
3227
3484
  const result = await performAutoUpdate({ version: tag });
3228
3485
  if (result.signal) {
3229
3486
  process.kill(process.pid, result.signal);
3230
3487
  return;
3231
3488
  }
3232
- process.stderr.write(result.success ? `[0sec] Installed ${result.installedVersion}. This process is still ${currentVersion}; restart to use the update.
3233
- ` : `[0sec] Update not installed: ${result.error ?? "unknown error"} Continuing with ${currentVersion}.
3489
+ process.stderr.write(result.success ? `[0] Installed ${result.installedVersion}. This process is still ${currentVersion}; restart to use the update.
3490
+ ` : `[0] Update not installed: ${result.error ?? "unknown error"} Continuing with ${currentVersion}.
3234
3491
  `);
3235
3492
  }
3236
3493
  async function runStartupUpdate(version) {
@@ -3245,6 +3502,15 @@ export {
3245
3502
  InvalidArgumentError,
3246
3503
  Command,
3247
3504
  Option,
3505
+ workbenchConfigPath,
3506
+ defaultWorkbenchStateRoot,
3507
+ isPinnedWorkbenchImageReference,
3508
+ loadWorkbenchConfig,
3509
+ saveWorkbenchConfig,
3510
+ resolveWorkbenchGuestSettings,
3511
+ workbenchNetworkEnabled,
3512
+ launchConfiguredWorkbench,
3513
+ selectWorkbenchProfile,
3248
3514
  performAutoUpdate,
3249
3515
  runStartupUpdate
3250
3516
  };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __0secCreateRequire } from "node:module";
3
- const require = __0secCreateRequire(import.meta.url);
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
4
 
5
5
  // packages/core/dist/source-files.js
6
6
  import { lstatSync, readdirSync } from "node:fs";
@@ -26,12 +26,17 @@ var DEFAULT_SOURCE_EXTS = /* @__PURE__ */ new Set([
26
26
  ".php",
27
27
  ".java",
28
28
  ".kt",
29
+ ".swift",
29
30
  ".c",
30
31
  ".h",
31
32
  ".cc",
32
33
  ".cpp",
33
34
  ".cxx",
34
35
  ".hpp",
36
+ ".cs",
37
+ ".fs",
38
+ ".vb",
39
+ ".lua",
35
40
  ".sol"
36
41
  ]);
37
42
  var SKIP_DIRS = /* @__PURE__ */ new Set([