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.
- package/0.js +41 -40
- package/chunks/{adapt-loop-L2PXCD4J.js → adapt-loop-P4HKONB5.js} +4 -4
- package/chunks/{artifact-scraper-W3LGLXBM.js → artifact-scraper-IIRJNYKT.js} +2 -2
- package/chunks/{assumption-mining-7IJ6ZWZE.js → assumption-mining-YA6VJ2V6.js} +17 -17
- package/chunks/{backend-connections-MYH4QRQG.js → backend-connections-64PKYKL7.js} +3 -3
- package/chunks/{chunk-EEP6GBUO.js → chunk-3MWQNNJU.js} +151 -58
- package/chunks/{chunk-ZZV56ACK.js → chunk-3VQ5EZKG.js} +9 -9
- package/chunks/{chunk-I4VIAQHM.js → chunk-6GV5G6U3.js} +1 -1
- package/chunks/{chunk-OFPF26WL.js → chunk-6SNOKNCS.js} +2 -2
- package/chunks/{chunk-YXTV2FRE.js → chunk-72PU46MS.js} +66 -112
- package/chunks/{chunk-NO543ZBU.js → chunk-A7G6S5RA.js} +1 -1
- package/chunks/{chunk-ITEMDJAB.js → chunk-AFJ2UMPR.js} +2 -2
- package/chunks/{chunk-FOLTHXRH.js → chunk-B7XL6RON.js} +1 -1
- package/chunks/{chunk-76CLUI54.js → chunk-BM6EYP2D.js} +3 -3
- package/chunks/{chunk-NBLKIQCW.js → chunk-D4M5WURF.js} +2 -2
- package/chunks/{chunk-DHNYJ2ML.js → chunk-EHNVP6QB.js} +1 -1
- package/chunks/{chunk-C6ZMPXN2.js → chunk-FBZBJYZS.js} +3 -3
- package/chunks/{chunk-S3B6HFSM.js → chunk-GYEYTNHK.js} +1 -1
- package/chunks/{chunk-EIONVEFN.js → chunk-HS2NQ7K6.js} +192 -36
- package/chunks/{chunk-HJKJ4NQP.js → chunk-HUZ2EC2R.js} +1 -1
- package/chunks/{chunk-5H2PXZ7Q.js → chunk-IUUNIJPM.js} +1 -1
- package/chunks/{chunk-3DF55BWV.js → chunk-JGDA6EIJ.js} +2 -2
- package/chunks/{chunk-GOUGG7IQ.js → chunk-K3PTYN43.js} +2 -2
- package/chunks/{chunk-7TIWL6E5.js → chunk-KCABBZHN.js} +7 -7
- package/chunks/{chunk-ACYZMJHC.js → chunk-LRD5N2TQ.js} +1 -1
- package/chunks/{chunk-ITHDAIRY.js → chunk-MNK373HF.js} +1 -1
- package/chunks/{chunk-JCRQV4FE.js → chunk-MOEVVXML.js} +2 -2
- package/chunks/{chunk-3HMO42M2.js → chunk-MOGWEHSC.js} +68 -771
- package/chunks/{chunk-TFKY6D7O.js → chunk-N7YCONYR.js} +1 -1
- package/chunks/{chunk-FI2H6HV2.js → chunk-NA3FKCI2.js} +1 -1
- package/chunks/{chunk-PMAKX6KP.js → chunk-NABVDAAO.js} +2 -2
- package/chunks/{chunk-YYFODVZG.js → chunk-NNMOTHKC.js} +4 -4
- package/chunks/{chunk-RBTJYREN.js → chunk-OILVEROI.js} +17 -4
- package/chunks/{chunk-GXSECFUE.js → chunk-PAMJEXE2.js} +1 -1
- package/chunks/{chunk-2J3STRJT.js → chunk-R7VWEY45.js} +1 -1
- package/chunks/{chunk-27SXCYWH.js → chunk-RZZ6VPRY.js} +1 -1
- package/chunks/{chunk-HFUOUT2B.js → chunk-SIR7XW2S.js} +1392 -826
- package/chunks/{chunk-HDJSHLRM.js → chunk-SSPP64FF.js} +2 -2
- package/chunks/{chunk-WK6VUCKK.js → chunk-STPHTPSD.js} +1 -1
- package/chunks/{chunk-SEWZ76MN.js → chunk-UGCTPKJG.js} +14 -6
- package/chunks/{chunk-MY44EZKD.js → chunk-ULRLUXSS.js} +1 -1
- package/chunks/{chunk-BWUW6ZQR.js → chunk-UQS7XCBV.js} +75 -60
- package/chunks/{chunk-6TA3CWND.js → chunk-V2KJQVYE.js} +42 -21
- package/chunks/{chunk-RFK5F45W.js → chunk-VJBEB2K6.js} +1 -1
- package/chunks/{chunk-D4IBEO2K.js → chunk-VWE36MUN.js} +1 -1
- package/chunks/{chunk-B5TIXHCO.js → chunk-WNWDQ2TO.js} +1 -1
- package/chunks/{chunk-S2WCYEK2.js → chunk-WPJMA5AK.js} +2 -2
- package/chunks/{chunk-FI5YL4R2.js → chunk-XJ2TBEV7.js} +3 -3
- package/chunks/{chunk-3T5R7P4T.js → chunk-XOVYV7TT.js} +4 -4
- package/chunks/{chunk-DJGJECBV.js → chunk-YGYJ2FTH.js} +4 -3
- package/chunks/{chunk-ZWAWZU6C.js → chunk-YJGPPPUB.js} +37 -9
- package/chunks/chunk-YP2DHYNI.js +650 -0
- package/chunks/{chunk-DMDWIW3E.js → chunk-Z2VLJEQJ.js} +4 -4
- package/chunks/{chunk-EQBC2ZWL.js → chunk-ZPVSDB63.js} +1604 -246
- package/chunks/{codex-models-KCUIVS3R.js → codex-models-CI22KIHY.js} +7 -7
- package/chunks/{commands-MPPAADGY.js → commands-C2WRSCNB.js} +210 -101
- package/chunks/dashboard-XO2X2SPD.js +75 -0
- package/chunks/{db-R2AQSESC.js → db-FU3OIGQK.js} +3 -3
- package/chunks/{deep-review-Q6BJKEV4.js → deep-review-5AL6QYTK.js} +30 -30
- package/chunks/{disclose-GGULOW27.js → disclose-YPV5KIUU.js} +3 -3
- package/chunks/{dist-6RNAVFAY.js → dist-ONIRKDH6.js} +29 -29
- package/chunks/{dist-OLGNKDB2.js → dist-QLMPTFT7.js} +2 -2
- package/chunks/{dist-DWN7U5OV.js → dist-QXJKD743.js} +1 -1
- package/chunks/{eval-runner-WCTTIYN4.js → eval-runner-D3RUCU3R.js} +17 -17
- package/chunks/{exploit-agent-M3KUMZJH.js → exploit-agent-4E4HXKUA.js} +1 -1
- package/chunks/{exploit-autoclimb-QTTWC5WM.js → exploit-autoclimb-5GRXI6VQ.js} +1 -1
- package/chunks/{exploit-climb-E4KDELTN.js → exploit-climb-AHQEJ2I2.js} +2 -2
- package/chunks/{fix-U5FFJD4F.js → fix-CHD7LXDS.js} +7 -7
- package/chunks/{harness-FMKIMEH5.js → harness-E63KDHPG.js} +3 -3
- package/chunks/{hunt-scan-RYPWRUQD.js → hunt-scan-ME2Z4CTC.js} +16 -16
- package/chunks/{kernel-primitive-CVG2E7MJ.js → kernel-primitive-S566GXWP.js} +2 -2
- package/chunks/{kernel-vm-runner-62KISULQ.js → kernel-vm-runner-KREBY4DC.js} +2 -2
- package/chunks/{local-engine-WP3I7K7G.js → local-engine-ZRTZVSSX.js} +5 -5
- package/chunks/managed-operation-ZMLLRCCQ.js +59 -0
- package/chunks/{native-loop-HC77R5NQ.js → native-loop-UV3Z4Z2F.js} +16 -16
- package/chunks/{operator-services-E2NONBQS.js → operator-services-JOCREEBA.js} +35 -35
- package/chunks/{orchestrate-Z3DW265M.js → orchestrate-ZF6ZTSIQ.js} +30 -30
- package/chunks/{prepare-7DTS6RJT.js → prepare-PLDVGLDX.js} +5 -5
- package/chunks/{provider-model-discovery-QGUGL3XW.js → provider-model-discovery-3X6DON3Y.js} +7 -2
- package/chunks/{remote-workflow-runtime-6CEVRZXS.js → remote-workflow-runtime-GOI4TYP5.js} +2 -2
- package/chunks/routing-WCQLO5SP.js +61 -0
- package/chunks/{runtime-W6JNDQRO.js → runtime-6ZIXFTW5.js} +2 -2
- package/chunks/{runtime-PZJ77QES.js → runtime-TVH5ORUK.js} +11 -7
- package/chunks/{scan-stream-6VOJTHTR.js → scan-stream-HJVTWZ44.js} +4 -4
- package/chunks/{scope-FHXW6EX6.js → scope-RCYXVGJR.js} +2 -2
- package/chunks/service-plugins-TN6KDX4L.js +63 -0
- package/chunks/{session-store-DBBI544Y.js → session-store-6QR3CVUA.js} +2 -2
- package/chunks/{variant-candidates-DPR6DJ3N.js → variant-candidates-SGLKPPHI.js} +7 -7
- package/chunks/{web-recon-prepass-HWDHDQMN.js → web-recon-prepass-GO7CTMVQ.js} +5 -5
- package/chunks/{workflow-runtime-PLB32XC3.js → workflow-runtime-CQTDASFA.js} +43 -43
- package/dashboard/assets/{abnfDiagram-VCTEODGH-6e39CQKz.js → abnfDiagram-VCTEODGH-DDZsU70-.js} +1 -1
- package/dashboard/assets/{arc-ClYun86B.js → arc-iDXNTSL6.js} +1 -1
- package/dashboard/assets/{architecture-7GRP2DOG-rM-lWo7E.js → architecture-7GRP2DOG-DJcY9RFg.js} +1 -1
- package/dashboard/assets/{architectureDiagram-5GKGNRK7-C9gEGZIU.js → architectureDiagram-5GKGNRK7-d0ZuOniQ.js} +1 -1
- package/dashboard/assets/{blockDiagram-I7D4REHJ-Dgh2n5Lf.js → blockDiagram-I7D4REHJ-B-EWfMy1.js} +1 -1
- package/dashboard/assets/{c4Diagram-7LVT6UL2-CsorW08z.js → c4Diagram-7LVT6UL2-KcZRuXZC.js} +1 -1
- package/dashboard/assets/channel-CeWMIm0w.js +1 -0
- package/dashboard/assets/{chunk-4HAMMTFA-4_b_LGGQ.js → chunk-4HAMMTFA-DXWulBlo.js} +1 -1
- package/dashboard/assets/{chunk-75Z2AOVW-qzNlKGCp.js → chunk-75Z2AOVW-RiLZItrz.js} +1 -1
- package/dashboard/assets/{chunk-DU6HZSFF-SAPICW28.js → chunk-DU6HZSFF-MBcaIyTX.js} +1 -1
- package/dashboard/assets/{chunk-F27PBJKO-DlLotIQx.js → chunk-F27PBJKO-kLWCBX_W.js} +1 -1
- package/dashboard/assets/{chunk-GMAD6QVW-DNnr65Nb.js → chunk-GMAD6QVW-BeQeSjpW.js} +1 -1
- package/dashboard/assets/{chunk-GVQU2GXP-DTwv0VfU.js → chunk-GVQU2GXP-CjCMlOIB.js} +1 -1
- package/dashboard/assets/{chunk-IMKFNOWR-B1fk1q_W.js → chunk-IMKFNOWR-BwNst53D.js} +1 -1
- package/dashboard/assets/{chunk-L3NEJ4N5-ByVjFIox.js → chunk-L3NEJ4N5-CHXWQrkL.js} +1 -1
- package/dashboard/assets/{chunk-OSK3NFVY-DUDCzjbh.js → chunk-OSK3NFVY-B2vd19Ed.js} +1 -1
- package/dashboard/assets/{chunk-P2QGCYS3-D_D5qEso.js → chunk-P2QGCYS3-Dk7Fyh6n.js} +1 -1
- package/dashboard/assets/{chunk-POPQ4Y6H-CetM-tVm.js → chunk-POPQ4Y6H-CPAgOvYe.js} +1 -1
- package/dashboard/assets/{chunk-PWAF6VOD-BcJX4exl.js → chunk-PWAF6VOD-BotyfMha.js} +1 -1
- package/dashboard/assets/{chunk-SHT3W25Y-BWQql238.js → chunk-SHT3W25Y-Buz5gLRP.js} +1 -1
- package/dashboard/assets/{chunk-SVP7TREG-BSLOD1JE.js → chunk-SVP7TREG-_rpYEZcs.js} +1 -1
- package/dashboard/assets/{chunk-TICWLB2K-DReOl-g_.js → chunk-TICWLB2K-DOJxPoec.js} +1 -1
- package/dashboard/assets/{chunk-XXDRQBXY-DSdSMeei.js → chunk-XXDRQBXY-EXxKJbAs.js} +1 -1
- package/dashboard/assets/classDiagram-ZZMXUADV-DV_h1NoS.js +1 -0
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-DV_h1NoS.js +1 -0
- package/dashboard/assets/{common-CRRsylCH.js → common-VLJRx-Jq.js} +1 -1
- package/dashboard/assets/{cose-bilkent-JH36ORCC-fg-DIBqt.js → cose-bilkent-JH36ORCC-B1SVC57o.js} +1 -1
- package/dashboard/assets/{cynefin-OW5HDTMX-XmrbEIFh.js → cynefin-OW5HDTMX-BzhRorj4.js} +1 -1
- package/dashboard/assets/{cynefinDiagram-5FMLGOSQ-CoQ7QEPl.js → cynefinDiagram-5FMLGOSQ-JXzRmldX.js} +1 -1
- package/dashboard/assets/{dagre-GXQ25YYZ-qtQtsg6c.js → dagre-GXQ25YYZ-1LZ-X0-Z.js} +1 -1
- package/dashboard/assets/{diagram-S7CK7UJ4-B_ts4_58.js → diagram-S7CK7UJ4-C_-J_LQ4.js} +1 -1
- package/dashboard/assets/{diagram-UQ7AKVKN-DwHbbxFy.js → diagram-UQ7AKVKN-CnxL1k8g.js} +1 -1
- package/dashboard/assets/{diagram-VSXAHHWV-2Tg_RG89.js → diagram-VSXAHHWV-WzSb3aby.js} +1 -1
- package/dashboard/assets/{diagram-VX7I27RA-BFYp-YjF.js → diagram-VX7I27RA-DKhrMInE.js} +1 -1
- package/dashboard/assets/{diagram-Z3DM3KII-DrPiS4V0.js → diagram-Z3DM3KII-CDhI2WGP.js} +1 -1
- package/dashboard/assets/{dist-cbVssBvx.js → dist-B0bfBMeP.js} +1 -1
- package/dashboard/assets/{ebnfDiagram-PWID7BFC-DCMOZtU2.js → ebnfDiagram-PWID7BFC-iL5NQ1PE.js} +1 -1
- package/dashboard/assets/{erDiagram-RLTQ6QDP-CW4rUJGU.js → erDiagram-RLTQ6QDP-RK2Voa5O.js} +1 -1
- package/dashboard/assets/{eventmodeling-NTZA5JFV-C2q-Aaav.js → eventmodeling-NTZA5JFV-WgE7OJBb.js} +1 -1
- package/dashboard/assets/flowDiagram-HODETNUW-B9YcQ0Aq.js +1 -0
- package/dashboard/assets/{ganttDiagram-EL5Y4UJY-C1AqcwIF.js → ganttDiagram-EL5Y4UJY-D8CJXHRF.js} +1 -1
- package/dashboard/assets/{gitGraph-4MIJSDKK-DYR76gtd.js → gitGraph-4MIJSDKK-BuZ9Lg04.js} +1 -1
- package/dashboard/assets/{gitGraphDiagram-WWUBYQGX-B7hL98CE.js → gitGraphDiagram-WWUBYQGX-LEJMh54j.js} +1 -1
- package/dashboard/assets/{info-A6RAGUB7-TXB43LiH.js → info-A6RAGUB7-BL5k3pev.js} +1 -1
- package/dashboard/assets/{infoDiagram-27XIBGKW-Dk5dXmh_.js → infoDiagram-27XIBGKW-LJvntUnZ.js} +1 -1
- package/dashboard/assets/{ishikawaDiagram-5VMMS53U-BQDuNMka.js → ishikawaDiagram-5VMMS53U-BYTYgKCG.js} +1 -1
- package/dashboard/assets/{journeyDiagram-3NMN7TZE-DkustddD.js → journeyDiagram-3NMN7TZE-G25qgQgO.js} +1 -1
- package/dashboard/assets/{kanban-definition-UXKFOSKX-BW7Ann84.js → kanban-definition-UXKFOSKX-Bk3uLl1i.js} +1 -1
- package/dashboard/assets/{line-DVxcLeru.js → line-i4qHBaWO.js} +1 -1
- package/dashboard/assets/{linear-DOM_l9bO.js → linear-DmrqRsKG.js} +1 -1
- package/dashboard/assets/{mermaid-parser.core-CKg9fDvJ.js → mermaid-parser.core-BxbKr4QF.js} +3 -3
- package/dashboard/assets/{mermaid.core-DruW_5-Y.js → mermaid.core-Cltee6FS.js} +4 -4
- package/dashboard/assets/{mindmap-definition-YA3MSWOX-Di5W5VB3.js → mindmap-definition-YA3MSWOX-DkzO2JgS.js} +1 -1
- package/dashboard/assets/operations-B4_timQX.css +1 -0
- package/dashboard/assets/operations-DwppJviL.js +199 -0
- package/dashboard/assets/{packet-AYTQ26CC-BABwqtNu.js → packet-AYTQ26CC-uZQUKnrE.js} +1 -1
- package/dashboard/assets/{pegDiagram-XKGWAZYB-Cx4ABT6q.js → pegDiagram-XKGWAZYB-CrOEi00T.js} +1 -1
- package/dashboard/assets/{pie-WAS4IAKB-CNdXyrze.js → pie-WAS4IAKB-Dn9_tpQT.js} +1 -1
- package/dashboard/assets/{pieDiagram-E7YTZNPT-BilfQbIs.js → pieDiagram-E7YTZNPT-D-niUkzc.js} +1 -1
- package/dashboard/assets/{quadrantDiagram-AXDQQJYC-BVmMQHE5.js → quadrantDiagram-AXDQQJYC-CJOTiG5V.js} +1 -1
- package/dashboard/assets/{radar-RG4KPBEZ-fKNmDeoK.js → radar-RG4KPBEZ-DIIVz4e8.js} +1 -1
- package/dashboard/assets/{railroad-74A4TZTK-DhcvDCOh.js → railroad-74A4TZTK-1kiqDEID.js} +1 -1
- package/dashboard/assets/{railroad-abnf-HS5TGJTU-BTRVAmf0.js → railroad-abnf-HS5TGJTU-DK6rQPZR.js} +1 -1
- package/dashboard/assets/{railroad-ebnf-LZEXJU2U-CwS8fgC_.js → railroad-ebnf-LZEXJU2U-C6cOgYW4.js} +1 -1
- package/dashboard/assets/{railroad-peg-WCYAUIDC-CXuhXlNp.js → railroad-peg-WCYAUIDC-CQ3ptKef.js} +1 -1
- package/dashboard/assets/{railroadDiagram-O6MQD6OU-DnBru-jf.js → railroadDiagram-O6MQD6OU-nEfkpa-m.js} +1 -1
- package/dashboard/assets/{requirementDiagram-BXWQKSXE-FwdvUZ7_.js → requirementDiagram-BXWQKSXE-CdFMY8tG.js} +1 -1
- package/dashboard/assets/{sankeyDiagram-P5KCCOFB-BQvDORai.js → sankeyDiagram-P5KCCOFB-C0KxrFYv.js} +1 -1
- package/dashboard/assets/{sequenceDiagram-WJ2MYXX4-FWYQLzcY.js → sequenceDiagram-WJ2MYXX4-DeZ5ATiu.js} +1 -1
- package/dashboard/assets/{src-BwkPhlcp.js → src-Cg-chcoE.js} +1 -1
- package/dashboard/assets/{stateDiagram-D77RDMKH-CjPBd_Sa.js → stateDiagram-D77RDMKH-B9MwWL5B.js} +1 -1
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-SucFndhx.js +1 -0
- package/dashboard/assets/{swimlanes-42K2YHIH-SQLNsa4J.js → swimlanes-42K2YHIH-DB--fwQE.js} +1 -1
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-BzH-rIaK.js +8 -0
- package/dashboard/assets/{timeline-definition-24CTP7MA-BxCf20k1.js → timeline-definition-24CTP7MA-DLkkTbWb.js} +1 -1
- package/dashboard/assets/{treeView-Q6P3EWNA-BGLYAyGp.js → treeView-Q6P3EWNA-XkZ9rl9H.js} +1 -1
- package/dashboard/assets/{treemap-WGGIJYW6-BlzAwncU.js → treemap-WGGIJYW6-JCtVKxCE.js} +1 -1
- package/dashboard/assets/{vennDiagram-4TSXK5OY-D76RIZLz.js → vennDiagram-4TSXK5OY-DEb-x29Z.js} +1 -1
- package/dashboard/assets/{wardley-WFR3VGLG-Ba_reiVw.js → wardley-WFR3VGLG-DhI7ROY3.js} +1 -1
- package/dashboard/assets/{wardleyDiagram-VM6X3IG4-Cux4coOD.js → wardleyDiagram-VM6X3IG4-KNckudc5.js} +1 -1
- package/dashboard/assets/{xychartDiagram-S5SC5T6Z-Ch5mvnlH.js → xychartDiagram-S5SC5T6Z-D4c0ynCk.js} +1 -1
- package/dashboard/index.html +13 -2
- package/package.json +1 -1
- package/worker-assets/demo-target/README.md +7 -3
- package/chunks/chunk-AL32F74R.js +0 -1123
- package/chunks/dashboard-MN7GZLLX.js +0 -75
- package/chunks/managed-operation-642WPTLC.js +0 -59
- package/chunks/routing-ITJZBJIU.js +0 -61
- package/chunks/service-plugins-CN6Q2NSN.js +0 -63
- package/dashboard/assets/channel-BBlDqIBl.js +0 -1
- package/dashboard/assets/classDiagram-ZZMXUADV-CRH2kB8G.js +0 -1
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-CRH2kB8G.js +0 -1
- package/dashboard/assets/flowDiagram-HODETNUW-3NOabgG3.js +0 -1
- package/dashboard/assets/operations-B-t_k60U.js +0 -194
- package/dashboard/assets/operations-D2ZKZFOF.css +0 -1
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-DHmenujm.js +0 -1
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-D1bH4ETZ.js +0 -8
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
homeStateDir,
|
|
9
9
|
parseSecurityWorkflowInput,
|
|
10
10
|
runStateDir
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GYEYTNHK.js";
|
|
12
12
|
import {
|
|
13
13
|
__export
|
|
14
14
|
} from "./chunk-VCSFCHAJ.js";
|
|
@@ -19,6 +19,7 @@ import { BaseSQLiteDatabase } from "drizzle-orm/sqlite-core/db";
|
|
|
19
19
|
import { SQLiteSyncDialect } from "drizzle-orm/sqlite-core/dialect";
|
|
20
20
|
import { createTableRelationsHelpers, extractTablesRelationalConfig } from "drizzle-orm/relations";
|
|
21
21
|
import { createRequire } from "node:module";
|
|
22
|
+
import { closeSync, openSync } from "node:fs";
|
|
22
23
|
function isBunRuntime() {
|
|
23
24
|
const g = globalThis;
|
|
24
25
|
if (typeof g.Bun !== "undefined")
|
|
@@ -98,31 +99,19 @@ var ShimmedDatabase = class {
|
|
|
98
99
|
this.engine.exec(sql2);
|
|
99
100
|
return this;
|
|
100
101
|
}
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* we just `exec()` the pragma and swallow errors — some PRAGMAs (notably
|
|
105
|
-
* WAL journal mode) are not supported by node-sqlite3-wasm's VFS and error
|
|
106
|
-
* here, but losing them is acceptable for 0's single-process workload.
|
|
102
|
+
/** Return PRAGMA rows, or the first row's first value in simple mode.
|
|
103
|
+
* Setting errors propagate so callers cannot assume a safety setting applied
|
|
104
|
+
* after SQLite rejected it. SQLite itself ignores unknown PRAGMA names.
|
|
107
105
|
*/
|
|
108
|
-
pragma(query,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
} catch {
|
|
112
|
-
}
|
|
113
|
-
return void 0;
|
|
106
|
+
pragma(query, opts) {
|
|
107
|
+
const rows = this.prepare(`PRAGMA ${query}`).all();
|
|
108
|
+
return opts?.simple ? rows[0] ? Object.values(rows[0])[0] : void 0 : rows;
|
|
114
109
|
}
|
|
115
|
-
/**
|
|
116
|
-
* better-sqlite3's `db.transaction(fn)` returns a callable object with
|
|
117
|
-
* `.deferred`, `.immediate`, `.exclusive`, and `.default` methods, each
|
|
118
|
-
* running `fn` inside a BEGIN/COMMIT of the corresponding isolation level.
|
|
119
|
-
* All three variants are functionally equivalent for 0's single-writer
|
|
120
|
-
* workload, so we wire them to the same underlying implementation.
|
|
121
|
-
*/
|
|
110
|
+
/** Synchronous transactions with SQLite's actual lock-acquisition modes. */
|
|
122
111
|
transaction(fn) {
|
|
123
112
|
const engine = this.engine;
|
|
124
|
-
const
|
|
125
|
-
engine.exec(
|
|
113
|
+
const wrap = (begin) => (...args) => {
|
|
114
|
+
engine.exec(begin);
|
|
126
115
|
try {
|
|
127
116
|
const result = fn(...args);
|
|
128
117
|
engine.exec("COMMIT");
|
|
@@ -135,11 +124,12 @@ var ShimmedDatabase = class {
|
|
|
135
124
|
throw err;
|
|
136
125
|
}
|
|
137
126
|
};
|
|
127
|
+
const runInTx = wrap("BEGIN");
|
|
138
128
|
return Object.assign(runInTx, {
|
|
139
129
|
default: runInTx,
|
|
140
|
-
deferred:
|
|
141
|
-
immediate:
|
|
142
|
-
exclusive:
|
|
130
|
+
deferred: wrap("BEGIN DEFERRED"),
|
|
131
|
+
immediate: wrap("BEGIN IMMEDIATE"),
|
|
132
|
+
exclusive: wrap("BEGIN EXCLUSIVE")
|
|
143
133
|
});
|
|
144
134
|
}
|
|
145
135
|
close() {
|
|
@@ -244,6 +234,14 @@ function createBunEngine(path) {
|
|
|
244
234
|
};
|
|
245
235
|
}
|
|
246
236
|
function createShimmedDatabase(path) {
|
|
237
|
+
if (path && path !== ":memory:" && !path.startsWith("file:")) {
|
|
238
|
+
try {
|
|
239
|
+
closeSync(openSync(path, "wx", 384));
|
|
240
|
+
} catch (error) {
|
|
241
|
+
if (error.code !== "EEXIST")
|
|
242
|
+
throw error;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
247
245
|
const engine = isBunRuntime() ? createBunEngine(path) : createWasmEngine(path);
|
|
248
246
|
return new ShimmedDatabase(engine);
|
|
249
247
|
}
|
|
@@ -279,7 +277,7 @@ function ensureDatabaseDirectory(path) {
|
|
|
279
277
|
import { asc, eq, desc, and, gt, inArray, or, sql } from "drizzle-orm";
|
|
280
278
|
import { createHash, randomUUID } from "node:crypto";
|
|
281
279
|
import { join } from "node:path";
|
|
282
|
-
import { closeSync, existsSync as existsSync2, openSync, readSync, renameSync, rmSync
|
|
280
|
+
import { closeSync as closeSync2, existsSync as existsSync2, openSync as openSync2, readSync, renameSync, rmSync } from "node:fs";
|
|
283
281
|
|
|
284
282
|
// packages/db/dist/schema.js
|
|
285
283
|
var schema_exports = {};
|
|
@@ -818,17 +816,12 @@ function resetOsecDatabase(dbPath) {
|
|
|
818
816
|
function repairOsecDatabase(dbPath) {
|
|
819
817
|
const path = resolveOsecDbPath(dbPath);
|
|
820
818
|
ensureDatabaseDirectory(path);
|
|
821
|
-
clearStaleLockIfAny(path);
|
|
822
819
|
const backupPath = backupCorruptDatabase(path) ?? void 0;
|
|
823
820
|
resetOsecDatabase(path);
|
|
824
821
|
const db = new osecDB(path);
|
|
825
822
|
db.close();
|
|
826
823
|
return { path, backupPath };
|
|
827
824
|
}
|
|
828
|
-
function isRecoverableDatabaseError(error) {
|
|
829
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
830
|
-
return /database disk image is malformed|file is not a database|malformed|invalid page number|database main|btree|b-tree|database corrupt/i.test(message);
|
|
831
|
-
}
|
|
832
825
|
function timestampTag() {
|
|
833
826
|
return (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
834
827
|
}
|
|
@@ -858,81 +851,22 @@ function ensureDatabaseHealthy(sqlite) {
|
|
|
858
851
|
throw new Error(first);
|
|
859
852
|
}
|
|
860
853
|
}
|
|
861
|
-
function
|
|
862
|
-
if (!existsSync2(path))
|
|
854
|
+
function assertDatabaseEngineCompatibility(path) {
|
|
855
|
+
if (isBunRuntime() || path === ":memory:" || !existsSync2(path))
|
|
863
856
|
return;
|
|
864
|
-
|
|
857
|
+
const header = Buffer.alloc(20);
|
|
858
|
+
const fd = openSync2(path, "r");
|
|
859
|
+
let bytesRead;
|
|
865
860
|
try {
|
|
866
|
-
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
}
|
|
870
|
-
if (size < 20)
|
|
871
|
-
return;
|
|
872
|
-
const header = Buffer.alloc(100);
|
|
873
|
-
try {
|
|
874
|
-
const fd = openSync(path, "r");
|
|
875
|
-
try {
|
|
876
|
-
readSync(fd, header, 0, 100, 0);
|
|
877
|
-
} finally {
|
|
878
|
-
closeSync(fd);
|
|
879
|
-
}
|
|
880
|
-
} catch {
|
|
881
|
-
return;
|
|
861
|
+
bytesRead = readSync(fd, header, 0, header.length, 0);
|
|
862
|
+
} finally {
|
|
863
|
+
closeSync2(fd);
|
|
882
864
|
}
|
|
883
|
-
if (header.subarray(0,
|
|
865
|
+
if (bytesRead < header.length || header.subarray(0, 16).toString("ascii") !== "SQLite format 3\0")
|
|
884
866
|
return;
|
|
885
867
|
if (header[18] !== 2 && header[19] !== 2)
|
|
886
868
|
return;
|
|
887
|
-
|
|
888
|
-
const shmPath = `${path}-shm`;
|
|
889
|
-
let hadWalData = false;
|
|
890
|
-
try {
|
|
891
|
-
if (existsSync2(walPath) && statSync(walPath).size > 0)
|
|
892
|
-
hadWalData = true;
|
|
893
|
-
} catch {
|
|
894
|
-
}
|
|
895
|
-
try {
|
|
896
|
-
const fd = openSync(path, "r+");
|
|
897
|
-
try {
|
|
898
|
-
writeSync(fd, Buffer.from([1, 1]), 0, 2, 18);
|
|
899
|
-
} finally {
|
|
900
|
-
closeSync(fd);
|
|
901
|
-
}
|
|
902
|
-
} catch (err) {
|
|
903
|
-
return;
|
|
904
|
-
}
|
|
905
|
-
for (const sidecar of [walPath, shmPath]) {
|
|
906
|
-
if (existsSync2(sidecar)) {
|
|
907
|
-
try {
|
|
908
|
-
rmSync(sidecar, { force: true });
|
|
909
|
-
} catch {
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
if (hadWalData) {
|
|
914
|
-
console.warn(`[0] Migrated ${path} from WAL mode to rollback mode for WASM engine compatibility. A non-empty WAL sidecar was present and has been removed; any uncommitted transactions from a prior crashed run were discarded.`);
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
function clearStaleLockIfAny(path) {
|
|
918
|
-
const lockPath = `${path}.lock`;
|
|
919
|
-
let stat;
|
|
920
|
-
try {
|
|
921
|
-
stat = statSync(lockPath);
|
|
922
|
-
} catch {
|
|
923
|
-
return;
|
|
924
|
-
}
|
|
925
|
-
if (!stat.isDirectory())
|
|
926
|
-
return;
|
|
927
|
-
const ageMs = Date.now() - stat.mtimeMs;
|
|
928
|
-
const STALE_THRESHOLD_MS = 1e4;
|
|
929
|
-
if (ageMs < STALE_THRESHOLD_MS)
|
|
930
|
-
return;
|
|
931
|
-
try {
|
|
932
|
-
rmSync(lockPath, { recursive: true, force: true });
|
|
933
|
-
console.warn(`[0] Removed stale database lock at ${lockPath} (age ${Math.floor(ageMs / 1e3)}s \u2014 previous holder likely crashed).`);
|
|
934
|
-
} catch {
|
|
935
|
-
}
|
|
869
|
+
throw new Error(`Cannot open WAL-mode database at ${path} with the Node WASM SQLite engine. The database and WAL/SHM files have been preserved. Stop all database users, back up the database together with its sidecars, then use a native SQLite connection to checkpoint the WAL and set PRAGMA journal_mode=DELETE. Do not delete WAL/SHM files or rewrite the database header. Alternatively, use the Bun native SQLite runtime.`);
|
|
936
870
|
}
|
|
937
871
|
var osecDB = class {
|
|
938
872
|
/** Resolved storage identity for scoped stores sharing this database. */
|
|
@@ -950,11 +884,10 @@ var osecDB = class {
|
|
|
950
884
|
return;
|
|
951
885
|
}
|
|
952
886
|
ensureDatabaseDirectory(path);
|
|
953
|
-
this.
|
|
887
|
+
this.openDatabase(path);
|
|
954
888
|
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
clearStaleLockIfAny(path);
|
|
889
|
+
openDatabase(path) {
|
|
890
|
+
assertDatabaseEngineCompatibility(path);
|
|
958
891
|
try {
|
|
959
892
|
this.initializeDatabase(path);
|
|
960
893
|
} catch (error) {
|
|
@@ -962,11 +895,7 @@ var osecDB = class {
|
|
|
962
895
|
this.sqlite?.close();
|
|
963
896
|
} catch {
|
|
964
897
|
}
|
|
965
|
-
|
|
966
|
-
throw error;
|
|
967
|
-
const backupPath = backupCorruptDatabase(path);
|
|
968
|
-
this.initializeDatabase(path);
|
|
969
|
-
console.warn(backupPath ? `[0] Recovered malformed database at ${path}. Backup saved to ${backupPath}.` : `[0] Recovered malformed database state at ${path} by recreating a fresh database.`);
|
|
898
|
+
throw error;
|
|
970
899
|
}
|
|
971
900
|
}
|
|
972
901
|
initializeDatabase(path) {
|
|
@@ -981,6 +910,7 @@ var osecDB = class {
|
|
|
981
910
|
})();
|
|
982
911
|
}
|
|
983
912
|
initializeReadOnlyDatabase(path) {
|
|
913
|
+
assertDatabaseEngineCompatibility(path);
|
|
984
914
|
this.sqlite = createShimmedDatabase(path);
|
|
985
915
|
this.sqlite.pragma("foreign_keys = ON");
|
|
986
916
|
this.db = createDrizzleFromShim(this.sqlite, { schema: schema_exports });
|
|
@@ -1793,10 +1723,10 @@ var osecDB = class {
|
|
|
1793
1723
|
this.updateFindingTriageByFingerprint(finding.fingerprint, triageStatus, triageNote);
|
|
1794
1724
|
}
|
|
1795
1725
|
getLatestFindingByFingerprint(fingerprint) {
|
|
1796
|
-
return this.db.select().from(findings).where(eq(findings.fingerprint, fingerprint)).orderBy(desc(findings.timestamp)).get();
|
|
1726
|
+
return this.db.select().from(findings).where(eq(findings.fingerprint, fingerprint)).orderBy(desc(findings.timestamp), desc(findings.id)).get();
|
|
1797
1727
|
}
|
|
1798
1728
|
getRelatedFindings(fingerprint) {
|
|
1799
|
-
return this.db.select().from(findings).where(eq(findings.fingerprint, fingerprint)).orderBy(desc(findings.timestamp)).all();
|
|
1729
|
+
return this.db.select().from(findings).where(eq(findings.fingerprint, fingerprint)).orderBy(desc(findings.timestamp), desc(findings.id)).all();
|
|
1800
1730
|
}
|
|
1801
1731
|
// ── Status Pipeline: discovered → verified → confirmed → scored → reported → fixed ──
|
|
1802
1732
|
transitionFindingStatus(findingId, newStatus) {
|
|
@@ -2914,6 +2844,7 @@ function initializeLearningTables(db) {
|
|
|
2914
2844
|
CREATE TABLE IF NOT EXISTS learning_active(project_id TEXT NOT NULL,kind TEXT NOT NULL,target_id TEXT NOT NULL,candidate_id TEXT NOT NULL,PRIMARY KEY(project_id,kind,target_id));
|
|
2915
2845
|
CREATE TABLE IF NOT EXISTS learning_work(id TEXT PRIMARY KEY,event_id TEXT NOT NULL,kind TEXT NOT NULL,status TEXT NOT NULL,attempts INTEGER NOT NULL DEFAULT 0,available_at INTEGER NOT NULL,lease_until INTEGER,claim_token TEXT,owner TEXT,UNIQUE(event_id,kind));
|
|
2916
2846
|
CREATE INDEX IF NOT EXISTS learning_events_project ON learning_events(project_id,updated_at);
|
|
2847
|
+
CREATE INDEX IF NOT EXISTS learning_knowledge_project_id ON learning_knowledge(project_id,id);
|
|
2917
2848
|
CREATE INDEX IF NOT EXISTS learning_work_ready ON learning_work(status,available_at,lease_until);`);
|
|
2918
2849
|
}
|
|
2919
2850
|
function appendLearningEvent(db, input) {
|
|
@@ -3001,6 +2932,13 @@ var LearningStore = class {
|
|
|
3001
2932
|
listKnowledge(options) {
|
|
3002
2933
|
return this.#list("learning_knowledge", options);
|
|
3003
2934
|
}
|
|
2935
|
+
/** Stable keyset pages for source freshness checks, unaffected by status updates. */
|
|
2936
|
+
listCurrentSourceKnowledgePage(projectId, afterId, pageSize = 200) {
|
|
2937
|
+
bounded(projectId, "project ID");
|
|
2938
|
+
if (afterId !== void 0)
|
|
2939
|
+
bounded(afterId, "knowledge cursor");
|
|
2940
|
+
return this.#db.prepare("SELECT body FROM learning_knowledge WHERE project_id=? AND id>? AND json_extract(body,'$.status')='current' AND json_array_length(body,'$.sourceLinks')>0 ORDER BY id LIMIT ?").all(projectId, afterId ?? "", limit(pageSize)).map((row) => JSON.parse(row.body));
|
|
2941
|
+
}
|
|
3004
2942
|
getKnowledge(id) {
|
|
3005
2943
|
return read(this.#db, "learning_knowledge", id);
|
|
3006
2944
|
}
|
|
@@ -3089,6 +3027,22 @@ var LearningStore = class {
|
|
|
3089
3027
|
fail("Evidence must belong to the same project.");
|
|
3090
3028
|
}
|
|
3091
3029
|
}
|
|
3030
|
+
#knowledgeIdentity(input) {
|
|
3031
|
+
return `knowledge:${createHash2("sha256").update(JSON.stringify({ projectId: input.projectId, summary: input.summary, sourceLinks: [...input.sourceLinks].sort((a, b) => a.path.localeCompare(b.path)), evidenceEventIds: [...input.evidenceEventIds].sort() })).digest("hex")}`;
|
|
3032
|
+
}
|
|
3033
|
+
/** Exact prior admission status, independent of library ordering or pagination. */
|
|
3034
|
+
findSourceKnowledge(projectId, summary, sourceLinks, eventKey) {
|
|
3035
|
+
const disabled = this.findDisabledSourceKnowledge(projectId, summary, sourceLinks);
|
|
3036
|
+
if (disabled)
|
|
3037
|
+
return disabled;
|
|
3038
|
+
const row = this.#db.prepare("SELECT body FROM learning_events WHERE idempotency_key=? AND project_id=?").all(eventKey, projectId)[0];
|
|
3039
|
+
if (!row)
|
|
3040
|
+
return null;
|
|
3041
|
+
const event = JSON.parse(row.body);
|
|
3042
|
+
if (event.kind !== "source-context")
|
|
3043
|
+
return null;
|
|
3044
|
+
return this.getKnowledge(this.#knowledgeIdentity({ projectId, summary, sourceLinks, evidenceEventIds: [event.id] }));
|
|
3045
|
+
}
|
|
3092
3046
|
/** Match operator-disabled source lessons independently of library pagination. */
|
|
3093
3047
|
findDisabledSourceKnowledge(projectId, summary, sourceLinks) {
|
|
3094
3048
|
const fingerprint = (links) => JSON.stringify([...links].sort((a, b) => a.path.localeCompare(b.path) || a.hash.localeCompare(b.hash)));
|
|
@@ -3111,7 +3065,7 @@ var LearningStore = class {
|
|
|
3111
3065
|
if (disabled)
|
|
3112
3066
|
return disabled;
|
|
3113
3067
|
}
|
|
3114
|
-
const identity =
|
|
3068
|
+
const identity = this.#knowledgeIdentity(input);
|
|
3115
3069
|
const existing = this.getKnowledge(identity);
|
|
3116
3070
|
if (existing)
|
|
3117
3071
|
return existing;
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
parsePatch,
|
|
9
9
|
readEvolutionArtifact,
|
|
10
10
|
resolveScopedPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YGYJ2FTH.js";
|
|
12
12
|
import {
|
|
13
13
|
homeStateDir
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GYEYTNHK.js";
|
|
15
15
|
import {
|
|
16
16
|
external_exports
|
|
17
17
|
} from "./chunk-5XOYTAOK.js";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __0CreateRequire } from "node:module";
|
|
|
3
3
|
const require = __0CreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
homeStateDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GYEYTNHK.js";
|
|
7
7
|
|
|
8
8
|
// packages/core/dist/triage/kernel-vm-runner.js
|
|
9
9
|
import { execFileSync, spawn } from "node:child_process";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
makeSkepticVerifier,
|
|
6
6
|
runHuntScan,
|
|
7
7
|
scoreGeometry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SIR7XW2S.js";
|
|
9
9
|
import {
|
|
10
10
|
runReproducerInKernelVm
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-B7XL6RON.js";
|
|
12
12
|
import {
|
|
13
13
|
LlmApiRuntime
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HS2NQ7K6.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__require,
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from "./chunk-S4DFH2FJ.js";
|
|
7
7
|
import {
|
|
8
8
|
loadLayeredSettings
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-V2KJQVYE.js";
|
|
10
10
|
import {
|
|
11
11
|
createPresentationEvent,
|
|
12
12
|
homeStateDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GYEYTNHK.js";
|
|
14
14
|
|
|
15
15
|
// packages/cli/src/presentation/process-output.ts
|
|
16
16
|
import { format } from "node:util";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __0CreateRequire } from "node:module";
|
|
|
3
3
|
const require = __0CreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
buildShareUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MNK373HF.js";
|
|
7
7
|
import {
|
|
8
8
|
source_default
|
|
9
9
|
} from "./chunk-HLFS6WV2.js";
|
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
formatHtml,
|
|
12
12
|
formatMarkdown,
|
|
13
13
|
formatSarif
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YP2DHYNI.js";
|
|
15
15
|
import {
|
|
16
16
|
compareFindingsByBusinessPriority,
|
|
17
17
|
createAuditReportDocument,
|
|
18
18
|
createReviewReportDocument,
|
|
19
19
|
createScanReportDocument,
|
|
20
20
|
getFindingPriority
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GYEYTNHK.js";
|
|
22
22
|
|
|
23
23
|
// packages/cli/src/formatters/terminal.ts
|
|
24
24
|
var SEVERITY_COUNT_COLOR = {
|