0sec-cli 0.22.4 → 0.24.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 +73 -68
- package/README.md +95 -61
- package/chunks/{adapt-loop-3CCOWE43.js → adapt-loop-TEJPXWFG.js} +4 -4
- package/chunks/{artifact-scraper-Z4UUIOH3.js → artifact-scraper-AJZ3LOQY.js} +2 -2
- package/chunks/{assumption-mining-2UAKQB6V.js → assumption-mining-EATDC4BB.js} +18 -18
- package/chunks/backend-connections-QE4NASAK.js +23 -0
- package/chunks/chunk-3XLEDCFX.js +566 -0
- package/chunks/{chunk-BGX53365.js → chunk-3XLFB46W.js} +5 -3
- package/chunks/{chunk-IXAHQICR.js → chunk-4TUR47H5.js} +8 -3
- package/chunks/{chunk-5WAJGLCW.js → chunk-4YRXIVPZ.js} +3 -3
- package/chunks/{chunk-4ZYYX5GY.js → chunk-52AWIBCT.js} +1 -1
- package/chunks/{chunk-TO35Y326.js → chunk-554D4AYM.js} +5 -2
- package/chunks/{chunk-GQ3DGHWE.js → chunk-5FHFG5P2.js} +174 -710
- package/chunks/chunk-5POT5OYF.js +733 -0
- package/chunks/chunk-62PGWN7Y.js +700 -0
- package/chunks/{chunk-H6Q2QAIY.js → chunk-A3EKBUEM.js} +1424 -859
- package/chunks/{chunk-6WQDXWQC.js → chunk-A6AZZ6XX.js} +2 -2
- package/chunks/{chunk-6YZE552K.js → chunk-AV5BF4V7.js} +1281 -2580
- package/chunks/{chunk-2WWAPKAW.js → chunk-BIJPMYFA.js} +6 -6
- package/chunks/{chunk-SCWWLABR.js → chunk-CIMN2AO6.js} +1 -1
- package/chunks/{chunk-H4DH7COV.js → chunk-CSPF47S3.js} +30 -20
- package/chunks/{chunk-RCRTSKQN.js → chunk-DNV3ZMPX.js} +1 -1
- package/chunks/{chunk-GVY3S5E5.js → chunk-E42XEJTK.js} +2 -2
- package/chunks/{chunk-VDOWARMJ.js → chunk-ESM447R6.js} +15 -1
- package/chunks/{chunk-WBRGXCU2.js → chunk-EXTN4SQV.js} +1 -1
- package/chunks/{chunk-QVIRWJ45.js → chunk-EYBMTELO.js} +108 -24
- package/chunks/chunk-FEOPHBMY.js +56 -0
- package/chunks/{chunk-IHPTOTLL.js → chunk-FKGFHLLS.js} +1 -1
- package/chunks/chunk-G2EJ3R5I.js +5198 -0
- package/chunks/chunk-GHEBZKUS.js +5417 -0
- package/chunks/chunk-GNR3APR6.js +295 -0
- package/chunks/{chunk-ELI3BVIK.js → chunk-H76JYUPE.js} +3 -3
- package/chunks/{chunk-E74LXQFY.js → chunk-HRBOZBMC.js} +1 -1
- package/chunks/{chunk-TM74SSHC.js → chunk-IIBNQTOK.js} +3 -2
- package/chunks/{chunk-UELXHK2Y.js → chunk-IK27KMVV.js} +16 -5
- package/chunks/{chunk-WHUAUFSX.js → chunk-J6G73WYF.js} +1 -1
- package/chunks/chunk-JSTLXPJS.js +284 -0
- package/chunks/{chunk-G2BE2FC7.js → chunk-O3ADFN2A.js} +1 -1
- package/chunks/chunk-O7Q2G2KW.js +117 -0
- package/chunks/{chunk-XODDLNBI.js → chunk-QEA2VHBD.js} +284 -33
- package/chunks/{chunk-C6JPA32H.js → chunk-RBOMXUYL.js} +3 -111
- package/chunks/{chunk-L2CCO4KE.js → chunk-RCHAFSWS.js} +838 -39
- package/chunks/{chunk-3BPX75OR.js → chunk-RD4FKFWR.js} +1 -1
- package/chunks/{chunk-DPUXXMJW.js → chunk-RPTO5FY2.js} +1 -1
- package/chunks/{chunk-6KFB6AYN.js → chunk-RZR2XXAK.js} +531 -17
- package/chunks/chunk-SGILXLR3.js +289 -0
- package/chunks/{chunk-E3OOBVOK.js → chunk-TOAAYJVN.js} +2 -2
- package/chunks/chunk-TOFIGQ63.js +83 -0
- package/chunks/{chunk-QWK4R3DB.js → chunk-TTDFBFNZ.js} +6 -6
- package/chunks/chunk-TZRHWP7R.js +736 -0
- package/chunks/chunk-UHUW45S3.js +164 -0
- package/chunks/{chunk-5JNTMWPK.js → chunk-V4BD7GSP.js} +2 -2
- package/chunks/{chunk-OAS5SAVZ.js → chunk-V5I5GAQH.js} +3226 -1683
- package/chunks/{chunk-PS5E7LUQ.js → chunk-W6IYTSZH.js} +79 -9
- package/chunks/{chunk-RTBZ36BD.js → chunk-WUPN3D37.js} +22 -248
- package/chunks/{chunk-CF3MNS3O.js → chunk-Y7KV7WV6.js} +2 -2
- package/chunks/{chunk-2OQOQ2FZ.js → chunk-YERUDEXT.js} +763 -688
- package/chunks/{chunk-CPCHLL6A.js → chunk-YJU7QACE.js} +1 -1
- package/chunks/{chunk-YED25PA4.js → chunk-YORL5S5V.js} +1 -1
- package/chunks/{chunk-YAZARMJY.js → chunk-YYOQADBB.js} +4 -3
- package/chunks/chunk-ZPFBQ3SD.js +127 -0
- package/chunks/{codex-models-Z43V3427.js → codex-models-FQPCWRPC.js} +7 -7
- package/chunks/{commands-EUGF4FUZ.js → commands-I5L3VD2A.js} +6187 -12196
- package/chunks/dashboard-B2AEGCFM.js +76 -0
- package/chunks/{db-NVAW4WWR.js → db-P5EIKMLP.js} +3 -3
- package/chunks/deep-review-I7RD5QSS.js +82 -0
- package/chunks/{disclose-LDNKAVRH.js → disclose-PFBWESVJ.js} +4 -2
- package/chunks/{dist-7RUOKPRJ.js → dist-3SWWY5FZ.js} +18 -2
- package/chunks/{dist-27BNG6WD.js → dist-AJU25UXA.js} +112 -63
- package/chunks/{dist-NG2HT5XU.js → dist-VK2M4HNW.js} +85 -1
- package/chunks/eval-runner-XVRX3R2Y.js +31 -0
- package/chunks/{exploit-agent-FCCR2HYX.js → exploit-agent-A4RTIJ4J.js} +1 -1
- package/chunks/{exploit-autoclimb-X5ZS5FAO.js → exploit-autoclimb-ABMMBC3M.js} +1 -1
- package/chunks/{exploit-climb-3JHGEO36.js → exploit-climb-BQ2SVU63.js} +2 -2
- package/chunks/{fix-NSNPU33B.js → fix-4YCLHFDT.js} +7 -7
- package/chunks/{harness-KXQOVIDQ.js → harness-DHWULEIZ.js} +3 -3
- package/chunks/{hunt-scan-ELTKGKC4.js → hunt-scan-DXV5H6YN.js} +16 -16
- package/chunks/{kernel-primitive-MT7YZSIG.js → kernel-primitive-SF4NALVR.js} +2 -2
- package/chunks/{kernel-vm-runner-YFRHYC6G.js → kernel-vm-runner-WEBEZEIC.js} +2 -2
- package/chunks/local-engine-XUG7XRKM.js +21 -0
- package/chunks/managed-operation-SQFMBWHG.js +60 -0
- package/chunks/{memsafety-scan-FCPAXIZE.js → memsafety-scan-L2Z7E7TE.js} +2 -2
- package/chunks/{native-loop-OFJDRHPI.js → native-loop-ZNAELJGB.js} +14 -13
- package/chunks/orchestrate-YHFJXGID.js +63 -0
- package/chunks/{prepare-72GWTRVI.js → prepare-SODWQN6O.js} +5 -5
- package/chunks/provider-model-discovery-QGUGL3XW.js +277 -0
- package/chunks/remote-workflow-runtime-XNNGI2PG.js +12 -0
- package/chunks/{run-WTJCZZHV.js → run-5T4Z3Q2D.js} +924 -327
- package/chunks/{runtime-LCJ4XSKE.js → runtime-HFFRUOPL.js} +4 -2
- package/chunks/{runtime-FCKOUB7V.js → runtime-MB4GEFBY.js} +7 -7
- package/chunks/{scan-stream-GT6GKQ3U.js → scan-stream-GXBJHCDF.js} +3 -2
- package/chunks/{scope-E5QZUOOH.js → scope-M7L3CD6X.js} +2 -2
- package/chunks/service-plugins-BGS6QKSZ.js +64 -0
- package/chunks/{session-store-H3Q7KCYG.js → session-store-K7I4GLNH.js} +2 -2
- package/chunks/{variant-candidates-SZKDCOLK.js → variant-candidates-2KSP5EHH.js} +7 -7
- package/chunks/{web-recon-prepass-IO3GXQMW.js → web-recon-prepass-RAXXTEWH.js} +5 -5
- package/chunks/workflow-runtime-V26HIJO3.js +178 -0
- package/dashboard/assets/abnfDiagram-VCTEODGH-CGCueOp5.js +1 -0
- package/dashboard/assets/arc-BjZaQcCc.js +1 -0
- package/dashboard/assets/architecture-7GRP2DOG-hcbO-9zX.js +1 -0
- package/dashboard/assets/architectureDiagram-5GKGNRK7-DReOXTSq.js +36 -0
- package/dashboard/assets/array-BifhSqXX.js +1 -0
- package/dashboard/assets/blockDiagram-I7D4REHJ-C-byT12_.js +129 -0
- package/dashboard/assets/c4Diagram-7LVT6UL2-DoYjz-Uv.js +38 -0
- package/dashboard/assets/channel-CUURBnpZ.js +1 -0
- package/dashboard/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dashboard/assets/chunk-4HAMMTFA-NBNp2zdt.js +62 -0
- package/dashboard/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dashboard/assets/chunk-75Z2AOVW-BHmkuP0B.js +2 -0
- package/dashboard/assets/chunk-DU6HZSFF-DgfLNaL2.js +127 -0
- package/dashboard/assets/chunk-F27PBJKO-3wwNFUgZ.js +1 -0
- package/dashboard/assets/chunk-FOHPRMQF-DHwB1DNv.js +161 -0
- package/dashboard/assets/chunk-GMAD6QVW-Btg7huZW.js +72 -0
- package/dashboard/assets/chunk-GVQU2GXP-ihCURK5O.js +1 -0
- package/dashboard/assets/chunk-IMKFNOWR-FsXj7slg.js +231 -0
- package/dashboard/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dashboard/assets/chunk-L3NEJ4N5-DorFIxJY.js +1 -0
- package/dashboard/assets/chunk-OSK3NFVY-DKun_KfC.js +10 -0
- package/dashboard/assets/chunk-P2QGCYS3-XGgiU1Bz.js +1 -0
- package/dashboard/assets/chunk-POPQ4Y6H-BTXEnGhJ.js +1 -0
- package/dashboard/assets/chunk-PWAF6VOD-DYZcGkTL.js +1 -0
- package/dashboard/assets/chunk-SHT3W25Y-C4WQfwf8.js +168 -0
- package/dashboard/assets/chunk-SVP7TREG-C4nCh0-1.js +88 -0
- package/dashboard/assets/chunk-TICWLB2K-DSB-IiGc.js +206 -0
- package/dashboard/assets/chunk-XXDRQBXY-CS6fjUcj.js +1 -0
- package/dashboard/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dashboard/assets/classDiagram-ZZMXUADV-CD1Buc26.js +1 -0
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-CD1Buc26.js +1 -0
- package/dashboard/assets/common-BMdQBwfR.js +5 -0
- package/dashboard/assets/cose-bilkent-JH36ORCC-CUjQHTML.js +1 -0
- package/dashboard/assets/cynefin-OW5HDTMX-BC7zCtFq.js +1 -0
- package/dashboard/assets/cynefinDiagram-5FMLGOSQ-CgDOOY67.js +62 -0
- package/dashboard/assets/cytoscape.esm-CGd-uY3x.js +321 -0
- package/dashboard/assets/dagre-GXQ25YYZ-Dqc8FS9x.js +4 -0
- package/dashboard/assets/dagre-PrKaheQc.js +1 -0
- package/dashboard/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/dashboard/assets/diagram-S7CK7UJ4-CrKqRXZb.js +30 -0
- package/dashboard/assets/diagram-UQ7AKVKN-Cu6Es0-v.js +41 -0
- package/dashboard/assets/diagram-VSXAHHWV-eK4d8FwS.js +3 -0
- package/dashboard/assets/diagram-VX7I27RA-bFxeFKOc.js +24 -0
- package/dashboard/assets/diagram-Z3DM3KII-C0ClmnhC.js +24 -0
- package/dashboard/assets/dist-BZh8Kb3O.js +1 -0
- package/dashboard/assets/ebnfDiagram-PWID7BFC-CUqxFPzf.js +1 -0
- package/dashboard/assets/erDiagram-RLTQ6QDP-CcYM7pLi.js +99 -0
- package/dashboard/assets/eventmodeling-NTZA5JFV-D8ZNnPkV.js +1 -0
- package/dashboard/assets/flowDiagram-HODETNUW-pDb1AYm8.js +1 -0
- package/dashboard/assets/ganttDiagram-EL5Y4UJY-UmZfbMyD.js +292 -0
- package/dashboard/assets/gitGraph-4MIJSDKK-mvNUo0ZA.js +1 -0
- package/dashboard/assets/gitGraphDiagram-WWUBYQGX-CvzeCxVy.js +106 -0
- package/dashboard/assets/graphlib-DS17s2tU.js +1 -0
- package/dashboard/assets/info-A6RAGUB7-DChKqZMi.js +1 -0
- package/dashboard/assets/infoDiagram-27XIBGKW-DjkpNtVW.js +2 -0
- package/dashboard/assets/init-C-OQMol4.js +1 -0
- package/dashboard/assets/ishikawaDiagram-5VMMS53U-8FhjJaWT.js +70 -0
- package/dashboard/assets/journeyDiagram-3NMN7TZE-DyNJ755f.js +139 -0
- package/dashboard/assets/kanban-definition-UXKFOSKX-_jCmtaY1.js +89 -0
- package/dashboard/assets/katex-BdBmVSus.js +257 -0
- package/dashboard/assets/line-Bf0nxyWf.js +1 -0
- package/dashboard/assets/linear-Bl6JKbf4.js +1 -0
- package/dashboard/assets/mermaid-parser.core-Cc6sgCzs.js +7 -0
- package/dashboard/assets/mermaid.core-B4yCwiN-.js +44 -0
- package/dashboard/assets/mindmap-definition-YA3MSWOX-D5DjWyXj.js +96 -0
- package/dashboard/assets/operations-B7JAWOi6.js +130 -0
- package/dashboard/assets/operations-QjKT0Hwi.css +1 -0
- package/dashboard/assets/ordinal-BDEzSJ7C.js +1 -0
- package/dashboard/assets/packet-AYTQ26CC-bQXLDhQC.js +1 -0
- package/dashboard/assets/path-fybaL0A-.js +1 -0
- package/dashboard/assets/pegDiagram-XKGWAZYB-Bf6a1vaf.js +1 -0
- package/dashboard/assets/pie-WAS4IAKB-DfzoABIi.js +1 -0
- package/dashboard/assets/pieDiagram-E7YTZNPT-D0L1qbch.js +39 -0
- package/dashboard/assets/quadrantDiagram-AXDQQJYC-CbFyy2Pe.js +7 -0
- package/dashboard/assets/radar-RG4KPBEZ-CZ2pyeUT.js +1 -0
- package/dashboard/assets/railroad-74A4TZTK-CP4Jazfd.js +1 -0
- package/dashboard/assets/railroad-abnf-HS5TGJTU-3MvEiHwD.js +1 -0
- package/dashboard/assets/railroad-ebnf-LZEXJU2U-BWto6cXE.js +1 -0
- package/dashboard/assets/railroad-peg-WCYAUIDC-DasEjbyf.js +1 -0
- package/dashboard/assets/railroadDiagram-O6MQD6OU-t7Gp9g2R.js +1 -0
- package/dashboard/assets/requirementDiagram-BXWQKSXE-LYmqeBXi.js +84 -0
- package/dashboard/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dashboard/assets/sankeyDiagram-P5KCCOFB-DnpfA_94.js +40 -0
- package/dashboard/assets/sequenceDiagram-WJ2MYXX4-C8s3pTUE.js +162 -0
- package/dashboard/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
- package/dashboard/assets/src-CaNUT1AQ.js +1 -0
- package/dashboard/assets/stateDiagram-D77RDMKH-BMzm6fK1.js +1 -0
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-B3REMjpY.js +1 -0
- package/dashboard/assets/swimlanes-42K2YHIH-uJE05Tt_.js +1 -0
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-CIaVMZEy.js +8 -0
- package/dashboard/assets/timeline-definition-24CTP7MA-BfLJMVeG.js +120 -0
- package/dashboard/assets/treeView-Q6P3EWNA-ZOE2enu2.js +1 -0
- package/dashboard/assets/treemap-WGGIJYW6-yIZoPBF5.js +1 -0
- package/dashboard/assets/vennDiagram-4TSXK5OY-BYJRHEaL.js +34 -0
- package/dashboard/assets/wardley-WFR3VGLG-D5V-jLbB.js +1 -0
- package/dashboard/assets/wardleyDiagram-VM6X3IG4-DgPN4nSe.js +78 -0
- package/dashboard/assets/xychartDiagram-S5SC5T6Z-BhkAMAOT.js +7 -0
- package/dashboard/index.html +3 -3
- package/package.json +3 -2
- package/worker-assets/demo-target/README.md +15 -0
- package/worker-assets/demo-target/include/decoder.h +27 -0
- package/worker-assets/demo-target/patched-decoder.c +40 -0
- package/worker-assets/demo-target/src/decoder.c +50 -0
- package/worker-assets/demo-target/witness-65537x1.bin +0 -0
- package/chunks/chunk-FFHRANYC.js +0 -547
- package/chunks/eval-runner-6Q3H52SP.js +0 -30
- package/chunks/orchestrate-DRZ2SVCP.js +0 -62
- package/chunks/service-plugins-MSK2EQP6.js +0 -62
- package/dashboard/assets/operations-BvB5Qpmk.css +0 -1
- package/dashboard/assets/operations-D8Ii01SV.js +0 -114
- package/dashboard/assets/zero-peek-Dzm3MT3X.png +0 -0
|
@@ -67,7 +67,7 @@ import { fileURLToPath } from "node:url";
|
|
|
67
67
|
import { dirname, join } from "node:path";
|
|
68
68
|
function loadVersion() {
|
|
69
69
|
if (true) {
|
|
70
|
-
return "0.
|
|
70
|
+
return "0.24.0";
|
|
71
71
|
}
|
|
72
72
|
try {
|
|
73
73
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
@@ -189,6 +189,22 @@ var MANUAL_PRICING = {
|
|
|
189
189
|
"qwen3.7-plus": { input: 0.5, output: 3, cachedInput: 0.05 },
|
|
190
190
|
"qwen3.6-plus": { input: 0.5, output: 3, cachedInput: 0.05 },
|
|
191
191
|
"qwen3.6-flash": { input: 0.1875, output: 1.125 },
|
|
192
|
+
// ClinePass reference quota rates, not incremental subscription charges.
|
|
193
|
+
// https://github.com/cline/cline/blob/main/docs/getting-started/clinepass.mdx
|
|
194
|
+
// checked 2026-10-05; DeepSeek uses peak rates; Qwen Plus <=256K only.
|
|
195
|
+
"cline-pass/glm-5.3": { input: 1.4, output: 4.4, cachedInput: 0.26 },
|
|
196
|
+
"cline-pass/glm-5.2": { input: 1.4, output: 4.4, cachedInput: 0.26 },
|
|
197
|
+
"cline-pass/kimi-k3": { input: 3, output: 15, cachedInput: 0.3 },
|
|
198
|
+
"cline-pass/kimi-k2.7-code": { input: 0.95, output: 4, cachedInput: 0.19 },
|
|
199
|
+
"cline-pass/kimi-k2.6": { input: 0.95, output: 4, cachedInput: 0.16 },
|
|
200
|
+
"cline-pass/deepseek-v4-pro": { input: 1.32, output: 3.96, cachedInput: 0.044 },
|
|
201
|
+
"cline-pass/deepseek-v4-flash": { input: 0.44, output: 1.32, cachedInput: 0.014 },
|
|
202
|
+
"cline-pass/mimo-v2.5": { input: 0.14, output: 0.28, cachedInput: 28e-4 },
|
|
203
|
+
"cline-pass/mimo-v2.5-pro": { input: 1.74, output: 3.48, cachedInput: 0.0145 },
|
|
204
|
+
"cline-pass/minimax-m3": { input: 0.3, output: 1.2, cachedInput: 0.06 },
|
|
205
|
+
"cline-pass/qwen3.8-max": { input: 2, output: 6, cachedInput: 0.25, cacheWrite: 2.5 },
|
|
206
|
+
"cline-pass/qwen3.7-max": { input: 2.5, output: 7.5, cachedInput: 0.5, cacheWrite: 3.125 },
|
|
207
|
+
"cline-pass/qwen3.7-plus": { input: 0.4, output: 1.6, cachedInput: 0.04, cacheWrite: 0.5 },
|
|
192
208
|
// OpenCode Zen free tier (https://opencode.ai/docs/zen/) — zero-rate gateway
|
|
193
209
|
// models; actual spend is $0 while the free period lasts.
|
|
194
210
|
"muse-spark-1.3-contributor-free": { input: 0, output: 0 },
|
|
@@ -293,7 +309,9 @@ var MODEL_VENDOR_PREFIXES = [
|
|
|
293
309
|
"openrouter/",
|
|
294
310
|
"opencode/",
|
|
295
311
|
"xai/",
|
|
296
|
-
"x-ai/"
|
|
312
|
+
"x-ai/",
|
|
313
|
+
"cline/",
|
|
314
|
+
"cline-pass/"
|
|
297
315
|
];
|
|
298
316
|
function normalizeModel(model) {
|
|
299
317
|
let key = model;
|
|
@@ -313,7 +331,7 @@ function normalizeModel(model) {
|
|
|
313
331
|
function getRates(model) {
|
|
314
332
|
const key = model ? normalizeModel(model) : "";
|
|
315
333
|
const aliasKey = azureDeploymentPriceKey(key);
|
|
316
|
-
const rates = (model && Object.hasOwn(MODEL_PRICING, model) ? MODEL_PRICING[model] : void 0) ?? (model ? DISCOVERED_PRICING.get(model) : void 0) ?? (Object.hasOwn(MODEL_PRICING, key) ? MODEL_PRICING[key] : void 0) ?? (aliasKey ? MODEL_PRICING[aliasKey] : void 0) ?? DISCOVERED_PRICING.get(key);
|
|
334
|
+
const rates = (model && Object.hasOwn(MODEL_PRICING, model) ? MODEL_PRICING[model] : void 0) ?? (model ? DISCOVERED_PRICING.get(model) : void 0) ?? (model?.startsWith("cline/") && Object.hasOwn(MODEL_PRICING, model.slice(6)) ? MODEL_PRICING[model.slice(6)] : void 0) ?? (Object.hasOwn(MODEL_PRICING, key) ? MODEL_PRICING[key] : void 0) ?? (aliasKey ? MODEL_PRICING[aliasKey] : void 0) ?? DISCOVERED_PRICING.get(key);
|
|
317
335
|
if (!rates) {
|
|
318
336
|
if (model)
|
|
319
337
|
console.warn(`[0] Unknown model for cost estimation: ${model}`);
|
|
@@ -336,6 +354,8 @@ function modelProvider(model) {
|
|
|
336
354
|
if (!model)
|
|
337
355
|
return "unknown";
|
|
338
356
|
const lowered = model.toLowerCase();
|
|
357
|
+
if (lowered.startsWith("cline/") || lowered.startsWith("cline-pass/"))
|
|
358
|
+
return "cline";
|
|
339
359
|
if (lowered.startsWith("openai/"))
|
|
340
360
|
return "openai";
|
|
341
361
|
if (lowered.startsWith("azure/"))
|
|
@@ -1546,10 +1566,63 @@ var executionSchema = external_exports.object({
|
|
|
1546
1566
|
instructions: external_exports.string().trim().max(16e3),
|
|
1547
1567
|
allowedAgentTools: external_exports.array(external_exports.string().trim().min(1).max(128).regex(/^[A-Za-z0-9_.:-]+$/)).max(128).refine((tools) => new Set(tools).size === tools.length, "Agent tool names must be unique.").optional()
|
|
1548
1568
|
}).strict();
|
|
1549
|
-
var
|
|
1569
|
+
var SECURITY_WORKFLOW_OPERATIONS = ["audit", "verify", "fix", "research", "deep-review"];
|
|
1570
|
+
function isSecurityWorkflowOperation(node) {
|
|
1571
|
+
return SECURITY_WORKFLOW_OPERATIONS.includes(node.type);
|
|
1572
|
+
}
|
|
1573
|
+
var SecurityWorkflowBindingsSchema = external_exports.unknown().superRefine((bindings, context) => {
|
|
1574
|
+
const pending = [{ value: bindings, depth: 0 }];
|
|
1575
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1576
|
+
let visited = 0;
|
|
1577
|
+
while (pending.length) {
|
|
1578
|
+
const { value, depth } = pending.pop();
|
|
1579
|
+
if (++visited > 1e4 || depth > 20) {
|
|
1580
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs exceed nesting or item limits." });
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
if (value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value))
|
|
1584
|
+
continue;
|
|
1585
|
+
if (typeof value !== "object" || seen.has(value)) {
|
|
1586
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs must contain finite JSON values without cycles." });
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) {
|
|
1590
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs must contain plain JSON objects." });
|
|
1591
|
+
return;
|
|
1592
|
+
}
|
|
1593
|
+
seen.add(value);
|
|
1594
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
1595
|
+
if (["__proto__", "constructor", "prototype"].includes(key)) {
|
|
1596
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Reserved workflow input key." });
|
|
1597
|
+
return;
|
|
1598
|
+
}
|
|
1599
|
+
pending.push({ value: entry, depth: depth + 1 });
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
if (new TextEncoder().encode(JSON.stringify(bindings)).byteLength > 32768)
|
|
1603
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs must be at most 32 KiB." });
|
|
1604
|
+
}).pipe(external_exports.record(external_exports.unknown()));
|
|
1605
|
+
var inputSchema = external_exports.object({ findingId: identifier.optional(), scanId: identifier.optional(), dbPath: external_exports.string().trim().min(1).max(4096).optional(), fromStep: identifier.optional(), artifactId: identifier.optional() }).strict();
|
|
1606
|
+
var nodeSchema = external_exports.object({ id: identifier, type: external_exports.enum(["trigger", "audit", "report", "verify", "fix", "research", "deep-review"]), label: external_exports.string().trim().min(1).max(160), enabled: external_exports.boolean(), plan: planSchema.optional(), execution: executionSchema.optional(), input: inputSchema.optional(), inputs: SecurityWorkflowBindingsSchema.superRefine((bindings, context) => {
|
|
1607
|
+
const pending = [bindings];
|
|
1608
|
+
const visited = /* @__PURE__ */ new Set();
|
|
1609
|
+
while (pending.length) {
|
|
1610
|
+
const value = pending.pop();
|
|
1611
|
+
if (!value || typeof value !== "object" || visited.has(value))
|
|
1612
|
+
continue;
|
|
1613
|
+
visited.add(value);
|
|
1614
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
1615
|
+
if (["allowApply", "applyApproval", "approval", "secrets", "apiKey"].includes(key))
|
|
1616
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Portable step inputs cannot contain authorization grants or secrets." });
|
|
1617
|
+
if (entry && typeof entry === "object")
|
|
1618
|
+
pending.push(entry);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
}).optional(), fix: external_exports.object({ mode: external_exports.enum(["candidate", "apply"]) }).strict().optional() }).strict();
|
|
1550
1622
|
var SecurityWorkflowInputSchema = external_exports.object({
|
|
1551
1623
|
id: identifier.optional(),
|
|
1552
1624
|
revision: external_exports.number().int().positive().optional(),
|
|
1625
|
+
template: external_exports.object({ id: identifier, revision: external_exports.number().int().positive() }).strict().optional(),
|
|
1553
1626
|
name: external_exports.string().trim().min(1).max(160),
|
|
1554
1627
|
instructions: external_exports.string().trim().max(16e3),
|
|
1555
1628
|
target: external_exports.string().trim().max(4096),
|
|
@@ -1565,12 +1638,14 @@ var SecurityWorkflowInputSchema = external_exports.object({
|
|
|
1565
1638
|
issue("A workflow requires exactly one trigger.");
|
|
1566
1639
|
if (triggers.some((node) => !node.enabled))
|
|
1567
1640
|
issue("The manual trigger must remain enabled.");
|
|
1568
|
-
if (!workflow.nodes.some(
|
|
1569
|
-
issue("A workflow requires at least one
|
|
1641
|
+
if (!workflow.nodes.some(isSecurityWorkflowOperation))
|
|
1642
|
+
issue("A workflow requires at least one executable step.");
|
|
1570
1643
|
if (workflow.nodes.filter((node) => node.type === "report").length > 1)
|
|
1571
1644
|
issue("A workflow supports at most one report.");
|
|
1572
|
-
if (workflow.nodes.some((node) => node
|
|
1573
|
-
issue("Only
|
|
1645
|
+
if (workflow.nodes.some((node) => !isSecurityWorkflowOperation(node) && (node.plan !== void 0 || node.execution !== void 0 || node.input !== void 0 || node.inputs !== void 0)))
|
|
1646
|
+
issue("Only executable steps accept plans, policies, and input bindings.");
|
|
1647
|
+
if (workflow.nodes.some((node) => node.type !== "fix" && node.fix !== void 0))
|
|
1648
|
+
issue("Only fix steps accept fix options.");
|
|
1574
1649
|
const edges = /* @__PURE__ */ new Set();
|
|
1575
1650
|
const successors = /* @__PURE__ */ new Map();
|
|
1576
1651
|
for (const edge of workflow.edges) {
|
|
@@ -1586,6 +1661,22 @@ var SecurityWorkflowInputSchema = external_exports.object({
|
|
|
1586
1661
|
if (target?.type === "trigger" || source?.type === "report")
|
|
1587
1662
|
issue("Triggers must start the graph and reports must end it.");
|
|
1588
1663
|
}
|
|
1664
|
+
for (const node of workflow.nodes) {
|
|
1665
|
+
if (!node.input?.fromStep)
|
|
1666
|
+
continue;
|
|
1667
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
1668
|
+
const pending = workflow.edges.filter((edge) => edge.target === node.id).map((edge) => edge.source);
|
|
1669
|
+
while (pending.length) {
|
|
1670
|
+
const id = pending.pop();
|
|
1671
|
+
if (ancestors.has(id))
|
|
1672
|
+
continue;
|
|
1673
|
+
ancestors.add(id);
|
|
1674
|
+
pending.push(...workflow.edges.filter((edge) => edge.target === id).map((edge) => edge.source));
|
|
1675
|
+
}
|
|
1676
|
+
const referenced = workflow.nodes.find((entry) => entry.id === node.input.fromStep);
|
|
1677
|
+
if (node.input.fromStep === node.id || !referenced || !isSecurityWorkflowOperation(referenced) || !ancestors.has(node.input.fromStep))
|
|
1678
|
+
issue("Step input references must name a connected preceding executable step.");
|
|
1679
|
+
}
|
|
1589
1680
|
const visiting = /* @__PURE__ */ new Set();
|
|
1590
1681
|
const visited = /* @__PURE__ */ new Set();
|
|
1591
1682
|
const visit = (id) => {
|
|
@@ -1619,12 +1710,12 @@ var SecurityWorkflowInputSchema = external_exports.object({
|
|
|
1619
1710
|
});
|
|
1620
1711
|
function parseSecurityWorkflowInput(value) {
|
|
1621
1712
|
const workflow = SecurityWorkflowInputSchema.parse(value);
|
|
1622
|
-
return { ...workflow, nodes: workflow.nodes.map((node) => node
|
|
1713
|
+
return { ...workflow, nodes: workflow.nodes.map((node) => isSecurityWorkflowOperation(node) ? { ...node, plan: node.plan ?? { ...DEFAULT_SECURITY_WORKFLOW_PLAN }, ...node.type === "fix" ? { fix: node.fix ?? { mode: "candidate" } } : {} } : node) };
|
|
1623
1714
|
}
|
|
1624
1715
|
var codeEnvelope = external_exports.object({ schemaVersion: external_exports.literal(1), workflow: external_exports.unknown() }).strict();
|
|
1625
1716
|
function exportSecurityWorkflowCode(value) {
|
|
1626
|
-
const { name, instructions, target, nodes, edges } = value;
|
|
1627
|
-
const parsed = parseSecurityWorkflowInput({ name, instructions, target, nodes, edges });
|
|
1717
|
+
const { name, instructions, target, nodes, edges, template: template2 } = value;
|
|
1718
|
+
const parsed = parseSecurityWorkflowInput({ name, instructions, target, nodes, edges, ...template2 ? { template: template2 } : {} });
|
|
1628
1719
|
const json = JSON.stringify({ schemaVersion: 1, workflow: parsed }, null, 2);
|
|
1629
1720
|
if (new TextEncoder().encode(json).byteLength > 65536)
|
|
1630
1721
|
throw new Error("Workflow JSON must be at most 64 KiB.");
|
|
@@ -1650,9 +1741,15 @@ function phase(id, label, goal, instructions, depth = "default") {
|
|
|
1650
1741
|
return { id, type: "audit", label, enabled: true, plan: { goal, depth, runCount: 1, executionMode: "sequential", timeCapMs: 6e5, costCapUsd: 5 }, execution: { instructions } };
|
|
1651
1742
|
}
|
|
1652
1743
|
function template(id, name, description, category, phases) {
|
|
1653
|
-
const nodes = [{ id: "start", type: "trigger", label: "Start manually", enabled: true }, ...phases, { id: "report", type: "report", label: "Collect
|
|
1654
|
-
|
|
1744
|
+
const nodes = [{ id: "start", type: "trigger", label: "Start manually", enabled: true }, ...phases, { id: "report", type: "report", label: "Collect results", enabled: true }];
|
|
1745
|
+
const compatibleTargetTypes = category === "web" || category === "security" ? ["url", "web-app"] : category === "package" ? ["source-code", "npm-package", "pypi-package", "cargo-package"] : ["source-code"];
|
|
1746
|
+
return { id, revision: 1, name, description, category, compatibleTargetTypes, executor: "assessment", profile: "default", expectedOutputs: ["findings", "artifacts"], inputRequirements: [], definition: parseSecurityWorkflowInput({ name, instructions: description, target: "", nodes, edges: nodes.slice(1).map((node, index) => ({ source: nodes[index].id, target: node.id })) }) };
|
|
1747
|
+
}
|
|
1748
|
+
function operationTemplate(id, name, description, operation, compatibleTargetTypes, inputRequirements, inputs) {
|
|
1749
|
+
const base = template(id, name, description, "repository", [{ id: "operation", type: operation, label: name, enabled: true, ...inputs ? { inputs } : {} }]);
|
|
1750
|
+
return { ...base, executor: operation, compatibleTargetTypes, inputRequirements, expectedOutputs: operation === "fix" ? ["candidate", "validation", "artifacts"] : operation === "verify" ? ["verification", "artifacts"] : ["findings", "artifacts"] };
|
|
1655
1751
|
}
|
|
1752
|
+
var FINDING_INPUT_REQUIREMENT = { names: ["finding", "findingPath", "findingId"], required: true, description: "Supply an existing finding, a finding JSON path, or a retained finding ID. Connected earlier finding evidence can also provide the input." };
|
|
1656
1753
|
var SECURITY_WORKFLOW_TEMPLATES = [
|
|
1657
1754
|
template("repository-review", "Repository security review", "Review a local repository's trust boundaries, dependency exposure, and security-sensitive code.", "repository", [
|
|
1658
1755
|
phase("dependencies", "Dependency exposure", "known-vulnerabilities", "Inspect dependency manifests and lockfiles. Prioritize reachable vulnerable dependencies and supply-chain trust boundaries; distinguish confirmed exposure from version-only matches.", "quick"),
|
|
@@ -1690,13 +1787,30 @@ var SECURITY_WORKFLOW_TEMPLATES = [
|
|
|
1690
1787
|
template("native-code-review", "Native code boundary review", "Review an authorized native source repository for parser, memory, and privilege-boundary issues.", "repository", [
|
|
1691
1788
|
phase("parsers", "Parsers and memory boundaries", "unknown-vulnerabilities", "Trace untrusted input through parsing, length calculations, ownership, and memory operations. Prioritize reachable paths and concrete invalid-state evidence in the authorized source.", "deep"),
|
|
1692
1789
|
phase("privileges", "Privilege and resource boundaries", "unknown-vulnerabilities", "Review privilege transitions, filesystem paths, subprocess inputs, concurrency, and resource lifetime. Avoid speculative issues without a supported attacker-controlled path.", "deep")
|
|
1693
|
-
])
|
|
1790
|
+
]),
|
|
1791
|
+
operationTemplate("finding-verification", "Finding verification", "Verify an existing finding using an explicitly selected execution runner and preserve the verification evidence.", "verify", ["source-code", "url", "web-app"], [FINDING_INPUT_REQUIREMENT, { names: ["runner"], required: true, description: "Select local, smolvm, docker, or qemu. Existing verification scope and prerequisite checks apply." }]),
|
|
1792
|
+
operationTemplate("fix-candidate", "Fix candidate and validation", "Propose and test a source fix candidate without applying it to the repository.", "fix", ["source-code"], [FINDING_INPUT_REQUIREMENT, { names: ["testCommand"], required: true, description: "Provide the explicit repository regression test command." }]),
|
|
1793
|
+
operationTemplate("security-research", "Security research", "Run the existing security research pipeline against an authorized source repository, retaining findings and research artifacts.", "research", ["source-code"], [], { engine: "pipeline" }),
|
|
1794
|
+
operationTemplate("deep-source-review", "Deep source review", "Run the existing deep source review engine against an authorized repository, retaining its supported evidence and results.", "deep-review", ["source-code"], [])
|
|
1694
1795
|
];
|
|
1695
|
-
function
|
|
1796
|
+
function getSecurityWorkflowTemplate(id, revision) {
|
|
1696
1797
|
const found = SECURITY_WORKFLOW_TEMPLATES.find((entry) => entry.id === id);
|
|
1697
1798
|
if (!found)
|
|
1698
1799
|
throw new Error("Unknown security workflow template.");
|
|
1699
|
-
|
|
1800
|
+
if (revision !== void 0 && revision !== found.revision)
|
|
1801
|
+
throw new Error(`Template revision mismatch: ${id} is revision ${found.revision}.`);
|
|
1802
|
+
return structuredClone(found);
|
|
1803
|
+
}
|
|
1804
|
+
function checkSecurityWorkflowTemplateTarget(template2, targetType) {
|
|
1805
|
+
if (!template2.compatibleTargetTypes.includes(targetType)) {
|
|
1806
|
+
throw new Error(`Template ${template2.id} does not support target type ${targetType}. Supported types: ${template2.compatibleTargetTypes.join(", ")}.`);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
function createSecurityWorkflowTemplate(id, options = {}) {
|
|
1810
|
+
const found = getSecurityWorkflowTemplate(id, options.revision);
|
|
1811
|
+
if (options.targetType !== void 0)
|
|
1812
|
+
checkSecurityWorkflowTemplateTarget(found, options.targetType);
|
|
1813
|
+
return parseSecurityWorkflowInput({ ...found.definition, template: { id: found.id, revision: found.revision }, ...options.target !== void 0 ? { target: options.target } : {} });
|
|
1700
1814
|
}
|
|
1701
1815
|
|
|
1702
1816
|
// packages/shared/dist/service-plugins.js
|
|
@@ -1713,6 +1827,364 @@ var SERVICE_PLUGIN_CATALOG = [
|
|
|
1713
1827
|
{ id: "teams", name: "Microsoft Teams", description: "Read teams and share channel summaries.", category: "Messaging", docsUrl: "https://learn.microsoft.com/en-us/graph/auth/auth-concepts", fields: [{ ...token, label: "Microsoft Graph access token" }], credentialNote: "Delegated token with Teams access. Reconnect when it expires." }
|
|
1714
1828
|
];
|
|
1715
1829
|
|
|
1830
|
+
// packages/shared/dist/backend-protocol.js
|
|
1831
|
+
var BACKEND_PROTOCOL_VERSION = 1;
|
|
1832
|
+
var BACKEND_CAPABILITIES = [
|
|
1833
|
+
"sessions",
|
|
1834
|
+
"workflows",
|
|
1835
|
+
"workflow-engine",
|
|
1836
|
+
"schedules",
|
|
1837
|
+
"approvals",
|
|
1838
|
+
"events",
|
|
1839
|
+
"workspaces",
|
|
1840
|
+
"artifacts",
|
|
1841
|
+
"model-connections",
|
|
1842
|
+
"process-controls",
|
|
1843
|
+
"operator-services",
|
|
1844
|
+
"learning"
|
|
1845
|
+
];
|
|
1846
|
+
var BackendCapabilitySchema = external_exports.enum(BACKEND_CAPABILITIES);
|
|
1847
|
+
var BackendIdSchema = external_exports.string().min(1).max(128).regex(/^[A-Za-z0-9][A-Za-z0-9_.-]*$/).refine((value) => !["__proto__", "constructor", "prototype"].includes(value), "Reserved backend identifier.");
|
|
1848
|
+
var backendId = BackendIdSchema;
|
|
1849
|
+
var BackendRequestIdSchema = external_exports.string().min(1).max(128).regex(/^[A-Za-z0-9][A-Za-z0-9_.:-]*$/).refine((value) => !["__proto__", "constructor", "prototype"].includes(value), "Reserved request identifier.");
|
|
1850
|
+
var resourceId = external_exports.string().min(1).max(4096);
|
|
1851
|
+
var capabilityList = external_exports.array(external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9.-]*$/)).max(128).refine((values) => new Set(values).size === values.length, "Backend capabilities must be unique.");
|
|
1852
|
+
var BackendConnectionStatusSchema = external_exports.enum(["connecting", "connected", "disconnected", "incompatible", "error"]);
|
|
1853
|
+
var BackendPlatformSchema = external_exports.object({ os: external_exports.string().min(1).max(64), pathStyle: external_exports.enum(["posix", "windows"]) }).strict();
|
|
1854
|
+
var BackendDescriptorSchema = external_exports.object({
|
|
1855
|
+
id: backendId,
|
|
1856
|
+
name: external_exports.string().trim().min(1).max(160),
|
|
1857
|
+
transport: external_exports.enum(["local", "http"]),
|
|
1858
|
+
status: BackendConnectionStatusSchema,
|
|
1859
|
+
protocolVersion: external_exports.number().int().positive().optional(),
|
|
1860
|
+
/** Unknown advertised names are retained for forward compatibility, never implicitly dispatched. */
|
|
1861
|
+
capabilities: capabilityList.default([]),
|
|
1862
|
+
platform: BackendPlatformSchema.optional(),
|
|
1863
|
+
error: external_exports.string().max(4096).optional()
|
|
1864
|
+
}).strict();
|
|
1865
|
+
var BackendListSchema = external_exports.object({ backends: external_exports.array(BackendDescriptorSchema).min(1).max(64) }).strict().superRefine((value, context) => {
|
|
1866
|
+
if (new Set(value.backends.map((backend) => backend.id)).size !== value.backends.length)
|
|
1867
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Backend IDs must be unique." });
|
|
1868
|
+
});
|
|
1869
|
+
var BackendHandshakeSchema = external_exports.object({
|
|
1870
|
+
protocolVersion: external_exports.number().int().positive(),
|
|
1871
|
+
engineId: backendId,
|
|
1872
|
+
capabilities: capabilityList,
|
|
1873
|
+
platform: BackendPlatformSchema,
|
|
1874
|
+
/** Connection epoch for detecting restarted event streams; does not replace retained run identity. */
|
|
1875
|
+
serverInstanceId: backendId.optional()
|
|
1876
|
+
}).strict();
|
|
1877
|
+
function parseBackendHandshake(value) {
|
|
1878
|
+
const handshake = BackendHandshakeSchema.parse(value);
|
|
1879
|
+
if (handshake.protocolVersion !== BACKEND_PROTOCOL_VERSION)
|
|
1880
|
+
throw new Error(`Incompatible backend protocol ${handshake.protocolVersion}; this client supports ${BACKEND_PROTOCOL_VERSION}.`);
|
|
1881
|
+
return handshake;
|
|
1882
|
+
}
|
|
1883
|
+
function hasBackendCapability(backend, capability) {
|
|
1884
|
+
return backend.capabilities.includes(capability);
|
|
1885
|
+
}
|
|
1886
|
+
function requireBackendCapability(backend, capability) {
|
|
1887
|
+
if (backend.status !== "connected")
|
|
1888
|
+
throw new Error(`Backend ${backend.id} is ${backend.status}.`);
|
|
1889
|
+
if (backend.protocolVersion !== BACKEND_PROTOCOL_VERSION)
|
|
1890
|
+
throw new Error(`Backend ${backend.id} uses an incompatible protocol.`);
|
|
1891
|
+
if (!hasBackendCapability(backend, capability))
|
|
1892
|
+
throw new Error(`Backend ${backend.id} does not support ${capability}.`);
|
|
1893
|
+
}
|
|
1894
|
+
var BackendResourceRefSchema = external_exports.object({ backendId, id: resourceId }).strict();
|
|
1895
|
+
function backendResourceKey(kind, reference) {
|
|
1896
|
+
const ref = BackendResourceRefSchema.parse(reference);
|
|
1897
|
+
return JSON.stringify(["backend", ref.backendId, kind, ref.id]);
|
|
1898
|
+
}
|
|
1899
|
+
function backendResourceQueryKey(kind, reference) {
|
|
1900
|
+
const ref = BackendResourceRefSchema.parse(reference);
|
|
1901
|
+
return ["backend", ref.backendId, kind, ref.id];
|
|
1902
|
+
}
|
|
1903
|
+
var BackendRequestContextSchema = external_exports.object({
|
|
1904
|
+
backendId,
|
|
1905
|
+
requestId: BackendRequestIdSchema,
|
|
1906
|
+
idempotencyKey: external_exports.string().min(1).max(128).optional()
|
|
1907
|
+
}).strict();
|
|
1908
|
+
var BackendEventCursorSchema = external_exports.object({
|
|
1909
|
+
backendId,
|
|
1910
|
+
resourceId,
|
|
1911
|
+
sequence: external_exports.number().int().nonnegative().safe(),
|
|
1912
|
+
serverInstanceId: backendId.optional()
|
|
1913
|
+
}).strict();
|
|
1914
|
+
var BackendApprovalRefSchema = external_exports.object({
|
|
1915
|
+
backendId,
|
|
1916
|
+
id: resourceId,
|
|
1917
|
+
sessionId: resourceId,
|
|
1918
|
+
runId: resourceId.optional(),
|
|
1919
|
+
requestId: BackendRequestIdSchema,
|
|
1920
|
+
operationDigest: external_exports.string().min(1).max(256)
|
|
1921
|
+
}).strict();
|
|
1922
|
+
function assertBackendReference(backendIdValue, reference) {
|
|
1923
|
+
backendId.parse(backendIdValue);
|
|
1924
|
+
const ref = BackendResourceRefSchema.parse(reference);
|
|
1925
|
+
if (ref.backendId !== backendIdValue)
|
|
1926
|
+
throw new Error("Resource belongs to another backend.");
|
|
1927
|
+
}
|
|
1928
|
+
function backendCapabilitiesForApiPath(pathname) {
|
|
1929
|
+
if (!pathname.startsWith("/api/") || /[?#\\\x00-\x20]/.test(pathname) || new URL(pathname, "http://backend.invalid").pathname !== pathname)
|
|
1930
|
+
throw new Error("Backend capability classification requires a canonical API pathname.");
|
|
1931
|
+
const parts = pathname.slice("/api/".length).split("/");
|
|
1932
|
+
const capabilities = /* @__PURE__ */ new Set();
|
|
1933
|
+
const add = (capability) => {
|
|
1934
|
+
capabilities.add(capability);
|
|
1935
|
+
};
|
|
1936
|
+
if (pathname === "/api/backend/handshake")
|
|
1937
|
+
return [];
|
|
1938
|
+
if (pathname === "/api/workflow-engine/call")
|
|
1939
|
+
return ["workflow-engine"];
|
|
1940
|
+
if (parts[0] === "control" && parts.length === 2 && ["recover-stale-workers", "prune-stopped-workers", "reset-database", "start-daemon", "stop-daemon", "launch-run"].includes(parts[1]))
|
|
1941
|
+
return ["process-controls"];
|
|
1942
|
+
if (pathname === "/api/dashboard" || parts[0] === "scans" || parts[0] === "finding-family" || pathname === "/api/findings/export")
|
|
1943
|
+
add("artifacts");
|
|
1944
|
+
if (parts[0] === "findings" && parts.length === 3 && parts[2] === "impact-assessment")
|
|
1945
|
+
add("artifacts");
|
|
1946
|
+
if (parts[0] === "scans" && parts[2] === "resume") {
|
|
1947
|
+
add("workflows");
|
|
1948
|
+
add("sessions");
|
|
1949
|
+
} else if (parts[0] === "events" || pathname === "/api/v1/presentation/events")
|
|
1950
|
+
add("events");
|
|
1951
|
+
else if (parts[0] === "console") {
|
|
1952
|
+
const family = parts[1];
|
|
1953
|
+
if (["sessions", "saved"].includes(family ?? "")) {
|
|
1954
|
+
add("sessions");
|
|
1955
|
+
const operation = parts[3];
|
|
1956
|
+
if (operation === "decisions" || operation === "approvals")
|
|
1957
|
+
add("approvals");
|
|
1958
|
+
if (operation === "events")
|
|
1959
|
+
add("events");
|
|
1960
|
+
if (["models", "providers", "connections", "accounts", "runtime"].includes(operation ?? ""))
|
|
1961
|
+
add("model-connections");
|
|
1962
|
+
if (["files", "directories", "paths", "workspace", "project"].includes(operation ?? ""))
|
|
1963
|
+
add("workspaces");
|
|
1964
|
+
} else if (family === "learning")
|
|
1965
|
+
add("learning");
|
|
1966
|
+
else if (["workflow-triggers", "workflow-schedules"].includes(family ?? ""))
|
|
1967
|
+
add("schedules");
|
|
1968
|
+
else if (["workflows", "workflow-definitions", "workflow-executions", "workflow-tool-catalog", "fixes"].includes(family ?? "")) {
|
|
1969
|
+
add("workflows");
|
|
1970
|
+
if (family === "fixes" && (["apply", "publish"].includes(parts[2] ?? "") || ["apply", "publish"].includes(parts[3] ?? "")))
|
|
1971
|
+
add("approvals");
|
|
1972
|
+
if (parts[3] === "events")
|
|
1973
|
+
add("events");
|
|
1974
|
+
} else if (["connections", "providers", "accounts", "runtime", "models", "auth"].includes(family ?? ""))
|
|
1975
|
+
add("model-connections");
|
|
1976
|
+
else if (["files", "directories", "paths", "workspace", "project"].includes(family ?? ""))
|
|
1977
|
+
add("workspaces");
|
|
1978
|
+
else if (["settings", "themes", "plugins", "service-plugins", "doctor", "tools", "checks", "feedback", "github", "execution"].includes(family ?? "")) {
|
|
1979
|
+
add("operator-services");
|
|
1980
|
+
if (family === "checks")
|
|
1981
|
+
add("workspaces");
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
if (capabilities.has("artifacts") && parts[0] === "scans" && parts[2] === "events")
|
|
1985
|
+
add("events");
|
|
1986
|
+
return [...capabilities];
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
// packages/shared/dist/scan-resume.js
|
|
1990
|
+
var ScanResumeRequestSchema = external_exports.object({
|
|
1991
|
+
sessionId: external_exports.string().trim().min(1).max(160),
|
|
1992
|
+
approval: external_exports.literal("launch-authorized-run"),
|
|
1993
|
+
branchFromEntry: external_exports.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).optional(),
|
|
1994
|
+
timeCapMs: external_exports.number().int().positive().max(864e5).optional(),
|
|
1995
|
+
costCapUsd: external_exports.number().finite().positive().max(1e3).optional()
|
|
1996
|
+
}).strict();
|
|
1997
|
+
function resolvePersistedScanResume(scan) {
|
|
1998
|
+
if (!scan.id || scan.id.startsWith("console-"))
|
|
1999
|
+
throw new Error("Choose a persisted assessment scan, not a console conversation.");
|
|
2000
|
+
const depth = external_exports.enum(["quick", "default", "deep"]).parse(scan.depth);
|
|
2001
|
+
const storedMode = scan.mode ? external_exports.enum(["probe", "deep", "mcp", "web", "http_audit", "llm-ipi"]).parse(scan.mode) : void 0;
|
|
2002
|
+
const raw = external_exports.string().trim().min(1).max(4096).parse(scan.target);
|
|
2003
|
+
let parsed;
|
|
2004
|
+
let impliedMode;
|
|
2005
|
+
if (/^https?:\/\//.test(raw))
|
|
2006
|
+
parsed = { target: raw, targetType: "url", sourceDescription: "url" };
|
|
2007
|
+
else if (raw.startsWith("web:")) {
|
|
2008
|
+
parsed = { target: raw.slice(4), targetType: "web-app", sourceDescription: "web-app" };
|
|
2009
|
+
impliedMode = "web";
|
|
2010
|
+
} else if (raw.startsWith("mcp://")) {
|
|
2011
|
+
parsed = { target: raw, targetType: "url", sourceDescription: "mcp target" };
|
|
2012
|
+
impliedMode = "mcp";
|
|
2013
|
+
} else if (raw.startsWith("scan:"))
|
|
2014
|
+
parsed = { target: raw.slice(5), targetType: "url", sourceDescription: "url" };
|
|
2015
|
+
else if (raw.startsWith("repo:"))
|
|
2016
|
+
parsed = { target: raw.slice(5), targetType: "source-code", sourceDescription: "repository" };
|
|
2017
|
+
else {
|
|
2018
|
+
const match = /^(npm|pypi|cargo|oci):(.+)$/.exec(raw);
|
|
2019
|
+
if (!match)
|
|
2020
|
+
throw new Error(`Resume does not know how to route this persisted target yet: ${raw}`);
|
|
2021
|
+
const ecosystem = match[1];
|
|
2022
|
+
const spec = match[2];
|
|
2023
|
+
const at = spec.lastIndexOf("@");
|
|
2024
|
+
const target = at > 0 ? spec.slice(0, at) : spec;
|
|
2025
|
+
const packageVersion = at > 0 ? spec.slice(at + 1) : void 0;
|
|
2026
|
+
if (!target.trim() || packageVersion === "")
|
|
2027
|
+
throw new Error("Persisted package identity is incomplete.");
|
|
2028
|
+
const types = { npm: "npm-package", pypi: "pypi-package", cargo: "cargo-package", oci: "oci-image" };
|
|
2029
|
+
parsed = { target, targetType: types[ecosystem], ...packageVersion ? { packageVersion } : {}, sourceDescription: `${ecosystem} package` };
|
|
2030
|
+
}
|
|
2031
|
+
if (!parsed.target.trim())
|
|
2032
|
+
throw new Error("Persisted scan target is empty.");
|
|
2033
|
+
const targetType = storedMode === "web" ? "web-app" : parsed.targetType;
|
|
2034
|
+
return { ...parsed, targetType, depth, mode: impliedMode ?? storedMode ?? (targetType === "web-app" ? "web" : "deep") };
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
// packages/shared/dist/engine-operations.js
|
|
2038
|
+
var ENGINE_OPERATION_DEFINITIONS = [
|
|
2039
|
+
{ id: "get_capabilities", capability: "operator-services", effect: "read" },
|
|
2040
|
+
{ id: "start_assessment", capability: "workflows", effect: "execute" },
|
|
2041
|
+
{ id: "attach_session", capability: "sessions", effect: "read" },
|
|
2042
|
+
{ id: "get_session_events", capability: "events", effect: "read" },
|
|
2043
|
+
{ id: "list_templates", capability: "workflows", effect: "read" },
|
|
2044
|
+
{ id: "get_template", capability: "workflows", effect: "read" },
|
|
2045
|
+
{ id: "list_workflows", capability: "workflows", effect: "read" },
|
|
2046
|
+
{ id: "get_workflow", capability: "workflows", effect: "read" },
|
|
2047
|
+
{ id: "save_workflow", capability: "workflows", effect: "write" },
|
|
2048
|
+
{ id: "start_run", capability: "workflows", effect: "execute" },
|
|
2049
|
+
{ id: "list_runs", capability: "workflows", effect: "read" },
|
|
2050
|
+
{ id: "get_run", capability: "workflows", effect: "read" },
|
|
2051
|
+
{ id: "get_run_results", capability: "workflows", effect: "read" },
|
|
2052
|
+
{ id: "cancel_run", capability: "workflows", effect: "cancel" },
|
|
2053
|
+
{ id: "list_sessions", capability: "sessions", effect: "read" },
|
|
2054
|
+
{ id: "create_session", capability: "sessions", effect: "write" },
|
|
2055
|
+
{ id: "get_session", capability: "sessions", effect: "read" },
|
|
2056
|
+
{ id: "send_message", capability: "sessions", effect: "execute" },
|
|
2057
|
+
{ id: "continue_session", capability: "sessions", effect: "execute" },
|
|
2058
|
+
{ id: "cancel_session", capability: "sessions", effect: "cancel" },
|
|
2059
|
+
{ id: "resolve_decision", capability: "approvals", effect: "approve" },
|
|
2060
|
+
{ id: "list_saved_sessions", capability: "sessions", effect: "read" },
|
|
2061
|
+
{ id: "resume_session", capability: "sessions", effect: "execute" },
|
|
2062
|
+
{ id: "resume_scan", capability: "scan-resume", effect: "execute" }
|
|
2063
|
+
];
|
|
2064
|
+
var ENGINE_REPORT_FORMATS = ["json", "md", "html", "sarif", "pdf"];
|
|
2065
|
+
var operationIds = ENGINE_OPERATION_DEFINITIONS.map((operation) => operation.id);
|
|
2066
|
+
var OperationIdSchema = external_exports.enum(operationIds);
|
|
2067
|
+
var unique = (values) => new Set(values).size === values.length;
|
|
2068
|
+
var EngineCapabilityManifestSchema = external_exports.object({
|
|
2069
|
+
schemaVersion: external_exports.literal(1),
|
|
2070
|
+
operations: external_exports.array(OperationIdSchema).refine(unique, "Engine operations must be unique"),
|
|
2071
|
+
reportExport: external_exports.object({ formats: external_exports.array(external_exports.enum(ENGINE_REPORT_FORMATS)).refine(unique, "Report formats must be unique") }).strict(),
|
|
2072
|
+
resume: external_exports.object({ session: external_exports.boolean(), scan: external_exports.boolean(), workflow: external_exports.literal(false) }).strict()
|
|
2073
|
+
}).strict().superRefine((manifest, context) => {
|
|
2074
|
+
if (manifest.resume.session !== manifest.operations.includes("resume_session") || manifest.resume.scan !== manifest.operations.includes("resume_scan")) {
|
|
2075
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Resume support must match registered operations" });
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
function createEngineCapabilityManifest(options) {
|
|
2079
|
+
return EngineCapabilityManifestSchema.parse({
|
|
2080
|
+
schemaVersion: 1,
|
|
2081
|
+
operations: [...options.operations],
|
|
2082
|
+
reportExport: { formats: [...options.reportFormats ?? []] },
|
|
2083
|
+
resume: { session: options.operations.includes("resume_session"), scan: options.operations.includes("resume_scan"), workflow: false }
|
|
2084
|
+
});
|
|
2085
|
+
}
|
|
2086
|
+
function requireEngineOperation(manifest, operation) {
|
|
2087
|
+
const valid = EngineCapabilityManifestSchema.parse(manifest);
|
|
2088
|
+
if (!valid.operations.includes(operation))
|
|
2089
|
+
throw new Error(`Engine does not support operation ${operation}.`);
|
|
2090
|
+
}
|
|
2091
|
+
var ENGINE_COMMAND_COVERAGE = [
|
|
2092
|
+
{ id: "assessment", classification: "workflow", cliCommands: ["scan", "review", "audit", "secure"], workflowSteps: ["audit"], templateIds: ["repository-review", "dependency-review", "api-security", "web-configuration", "scoped-penetration-test", "package-behavior", "contract-review", "native-code-review"], chatTools: [], limits: "Target-specific assessment options and admission still apply.", source: "packages/core/src/assessment.ts" },
|
|
2093
|
+
{ id: "fix", classification: "workflow", cliCommands: ["fix"], workflowSteps: ["fix"], templateIds: ["fix-candidate"], chatTools: ["generate_fix"], limits: "Chat generation is distinct from workflow candidate validation; applying requires exact live candidate proof and host/request approval.", source: "packages/cli/src/finding-workflow-executors.ts" },
|
|
2094
|
+
{ id: "verification", classification: "workflow", cliCommands: ["verify", "replay"], workflowSteps: ["verify"], templateIds: ["finding-verification"], chatTools: ["verify_finding"], limits: "Managed verification uses supported replay runners; CLI kernel verification is not a portable workflow operation.", source: "packages/cli/src/finding-workflow-executors.ts" },
|
|
2095
|
+
{ id: "research", classification: "workflow", cliCommands: ["research pipeline", "research mobile", "research linux-matrix"], workflowSteps: ["research"], templateIds: ["security-research"], chatTools: [], limits: "Managed modes pipeline/mobile/linux-matrix require authorized local workspace; pipeline is source-only. linux-matrix imports external evidence and does not execute boots.", source: "packages/cli/src/workflow-research-executors.ts" },
|
|
2096
|
+
{ id: "deep-review", classification: "workflow", cliCommands: ["deep-review"], workflowSteps: ["deep-review"], templateIds: ["deep-source-review"], chatTools: [], limits: "Authorized local source workspace and provider prerequisites apply.", source: "packages/cli/src/workflow-research-executors.ts" },
|
|
2097
|
+
{ id: "offensive-tools", classification: "chat-tool", cliCommands: ["hunt", "assumption-hunt", "protocol-check", "specdrift", "memsafety", "npm-discovery", "kernel", "cve"], workflowSteps: [], templateIds: [], chatTools: ["variant_hunt", "assumption_hunt", "protocol_conformance", "spec_drift", "safety_eval", "memsafety_fuzz", "npm_dynamic_discovery", "weaponize_kernel", "cve_adapt"], limits: "Tool availability is scope/feature/prerequisite gated. CLI engines and tools have different contracts; no portable specialist workflow executor is registered by this manifest.", source: "packages/core/src/agent/tools/offensive-engines.ts" },
|
|
2098
|
+
{ id: "kernel-research", classification: "cli-specialist", cliCommands: ["research linux"], workflowSteps: [], templateIds: [], chatTools: [], limits: "Managed kernel research rejects execution until the VM/build runner supports workflow cancellation and deadlines.", source: "packages/cli/src/workflow-research-executors.ts" },
|
|
2099
|
+
{ id: "specialist-cli", classification: "cli-specialist", cliCommands: ["binary", "exploit", "recency-hunt", "lens-synth", "xnu-fuzz", "disclose", "eval", "bench", "ingest"], workflowSteps: [], templateIds: [], chatTools: [], limits: "These CLI contracts are not exposed as portable workflow steps here; model-driven source review is not equivalent to their native proof engines.", source: "packages/cli/src/index.ts" },
|
|
2100
|
+
{ id: "maintenance", classification: "cli-maintenance", cliCommands: ["doctor", "db", "upgrade", "config", "plugin", "theme", "login", "logout"], workflowSteps: [], templateIds: [], chatTools: [], limits: "Host maintenance and credential changes are not workflow execution or model-tool grants.", source: "packages/cli/src/index.ts" }
|
|
2101
|
+
];
|
|
2102
|
+
|
|
2103
|
+
// packages/shared/dist/finding-priority.js
|
|
2104
|
+
var ImpactAssessmentSchema = external_exports.object({
|
|
2105
|
+
reachability_tier: external_exports.enum(["remote-unauth", "remote-auth", "proximity-rf", "local-unpriv", "local-priv", "needs-hardware", "needs-host-migration", "unknown"]),
|
|
2106
|
+
blast_radius: external_exports.string().trim().min(1).max(4096),
|
|
2107
|
+
weaponizability: external_exports.enum(["dos-crash", "info-leak", "integrity-tampering", "lpe-to-root", "rce", "unknown"]),
|
|
2108
|
+
business_impact: external_exports.enum(["headline", "notable", "modest", "noise", "unassessed"]),
|
|
2109
|
+
rationale: external_exports.string().trim().min(1).max(8192),
|
|
2110
|
+
assessment_source: external_exports.enum(["model", "provided", "heuristic"]).optional()
|
|
2111
|
+
}).strip();
|
|
2112
|
+
var UNKNOWN_PRIORITY = {
|
|
2113
|
+
rank: 1.5,
|
|
2114
|
+
label: "Not assessed",
|
|
2115
|
+
assessed: false,
|
|
2116
|
+
rationale: "Business impact has not been assessed. Establish the affected services, customers, data, and operational consequences."
|
|
2117
|
+
};
|
|
2118
|
+
var PRIORITIES = {
|
|
2119
|
+
headline: { rank: 3, label: "Urgent" },
|
|
2120
|
+
notable: { rank: 2, label: "High" },
|
|
2121
|
+
modest: { rank: 1, label: "Moderate" },
|
|
2122
|
+
noise: { rank: 0, label: "Low" }
|
|
2123
|
+
};
|
|
2124
|
+
function isHeuristicImpactAssessment(assessment) {
|
|
2125
|
+
return assessment.assessment_source === "heuristic" || /^deterministic fallback derived from severity\s*\+\s*category/i.test(assessment.rationale) || /^heuristic baseline for a /i.test(assessment.blast_radius);
|
|
2126
|
+
}
|
|
2127
|
+
function getFindingPriority(finding) {
|
|
2128
|
+
const parsed = ImpactAssessmentSchema.safeParse(finding.impactAssessment);
|
|
2129
|
+
if (!parsed.success || parsed.data.business_impact === "unassessed" || isHeuristicImpactAssessment(parsed.data)) {
|
|
2130
|
+
return { ...UNKNOWN_PRIORITY };
|
|
2131
|
+
}
|
|
2132
|
+
const priority = PRIORITIES[parsed.data.business_impact];
|
|
2133
|
+
return { ...priority, assessed: true, rationale: parsed.data.rationale };
|
|
2134
|
+
}
|
|
2135
|
+
var TECHNICAL_SEVERITY = { critical: 4, high: 3, medium: 2, low: 1, info: 0 };
|
|
2136
|
+
function technicalCvss(value) {
|
|
2137
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 && value <= 10 ? value : -1;
|
|
2138
|
+
}
|
|
2139
|
+
function compareFindingsByBusinessPriority(a, b) {
|
|
2140
|
+
return getFindingPriority(b).rank - getFindingPriority(a).rank || (TECHNICAL_SEVERITY[b.severity?.toLowerCase() ?? ""] ?? -1) - (TECHNICAL_SEVERITY[a.severity?.toLowerCase() ?? ""] ?? -1) || technicalCvss(b.cvssScore) - technicalCvss(a.cvssScore);
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
// packages/shared/dist/access-milestone.js
|
|
2144
|
+
var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
2145
|
+
var successfulObservation = (value) => {
|
|
2146
|
+
const item = record(value);
|
|
2147
|
+
return item && typeof item.status === "number" && Number.isInteger(item.status) && item.status >= 200 && item.status < 300 && item.truncated === false && item.field_present === true && (typeof item.json_pointer_value === "string" || item.json_pointer_value === null) ? item : void 0;
|
|
2148
|
+
};
|
|
2149
|
+
function accessMilestoneFromArtifact(eventType, value, scopeId, evidenceEventId) {
|
|
2150
|
+
const item = record(value);
|
|
2151
|
+
if (eventType !== "tool_artifact" || !item || item.tool !== "access_control_workflow" || item.workflow !== "access_control_workflow" || item.verdict !== "confirmed" || typeof item.owner_identity !== "string" || !item.owner_identity || typeof item.actor_identity !== "string" || !item.actor_identity || item.owner_identity === item.actor_identity || typeof item.expected_state !== "string" || item.expected_state.length > 500 || typeof item.observation_url !== "string" || item.observation_url.length > 8192 || !scopeId || scopeId.length > 512)
|
|
2152
|
+
return null;
|
|
2153
|
+
const before = successfulObservation(item.observation_before);
|
|
2154
|
+
const after = successfulObservation(item.observation_after);
|
|
2155
|
+
if (!before || !after || before.json_pointer_value === item.expected_state || after.json_pointer_value !== item.expected_state || !Array.isArray(item.steps) || item.steps.length === 0 || item.steps.length > 10)
|
|
2156
|
+
return null;
|
|
2157
|
+
if (item.steps.some((value2, index) => {
|
|
2158
|
+
const step = record(value2);
|
|
2159
|
+
return !step || step.step_index !== index || typeof step.url !== "string" || !["GET", "POST", "PUT", "DELETE", "PATCH"].includes(String(step.method)) || typeof step.status !== "number" || !Number.isInteger(step.status) || step.status < 100 || step.status > 599 || step.error !== void 0;
|
|
2160
|
+
}))
|
|
2161
|
+
return null;
|
|
2162
|
+
let asset;
|
|
2163
|
+
try {
|
|
2164
|
+
const url = new URL(item.observation_url);
|
|
2165
|
+
if (!["https:", "http:"].includes(url.protocol) || url.username || url.password)
|
|
2166
|
+
return null;
|
|
2167
|
+
asset = url.origin;
|
|
2168
|
+
} catch {
|
|
2169
|
+
return null;
|
|
2170
|
+
}
|
|
2171
|
+
return {
|
|
2172
|
+
key: JSON.stringify([scopeId, "cross-identity-write", item.observation_url]),
|
|
2173
|
+
asset,
|
|
2174
|
+
status: "conditional",
|
|
2175
|
+
accessClass: "cross-identity-write",
|
|
2176
|
+
headline: "State change confirmed across request contexts",
|
|
2177
|
+
summary: "The observing context saw the declared marker after requests using different configured authentication headers. Authorization impact requires validation. Cleanup was not verified.",
|
|
2178
|
+
cleanup: "unknown",
|
|
2179
|
+
...evidenceEventId && evidenceEventId.length <= 512 ? { evidenceEventId } : {}
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
function appendAccessMilestone(current, next, limit = 80) {
|
|
2183
|
+
if (current.some((item) => item.milestone.key === next.milestone.key))
|
|
2184
|
+
return [...current];
|
|
2185
|
+
return [...current, next].slice(-Math.max(1, Math.min(80, limit)));
|
|
2186
|
+
}
|
|
2187
|
+
|
|
1716
2188
|
export {
|
|
1717
2189
|
validateScanPlan,
|
|
1718
2190
|
defaultRoleFor,
|
|
@@ -1747,6 +2219,8 @@ export {
|
|
|
1747
2219
|
VerificationAssertionSchema,
|
|
1748
2220
|
EvidenceArtifactSchema,
|
|
1749
2221
|
VerificationResultSchema,
|
|
2222
|
+
pocStepActionSchema,
|
|
2223
|
+
pocStepExpectSchema,
|
|
1750
2224
|
pocStepSchema,
|
|
1751
2225
|
pocStepArraySchema,
|
|
1752
2226
|
findingSchema,
|
|
@@ -1799,11 +2273,51 @@ export {
|
|
|
1799
2273
|
findCommand,
|
|
1800
2274
|
filterCommands,
|
|
1801
2275
|
DEFAULT_SECURITY_WORKFLOW_PLAN,
|
|
2276
|
+
SECURITY_WORKFLOW_OPERATIONS,
|
|
2277
|
+
isSecurityWorkflowOperation,
|
|
2278
|
+
SecurityWorkflowBindingsSchema,
|
|
1802
2279
|
SecurityWorkflowInputSchema,
|
|
1803
2280
|
parseSecurityWorkflowInput,
|
|
1804
2281
|
exportSecurityWorkflowCode,
|
|
1805
2282
|
parseSecurityWorkflowCode,
|
|
1806
2283
|
SECURITY_WORKFLOW_TEMPLATES,
|
|
2284
|
+
getSecurityWorkflowTemplate,
|
|
2285
|
+
checkSecurityWorkflowTemplateTarget,
|
|
1807
2286
|
createSecurityWorkflowTemplate,
|
|
1808
|
-
SERVICE_PLUGIN_CATALOG
|
|
2287
|
+
SERVICE_PLUGIN_CATALOG,
|
|
2288
|
+
BACKEND_PROTOCOL_VERSION,
|
|
2289
|
+
BACKEND_CAPABILITIES,
|
|
2290
|
+
BackendCapabilitySchema,
|
|
2291
|
+
BackendIdSchema,
|
|
2292
|
+
BackendRequestIdSchema,
|
|
2293
|
+
BackendConnectionStatusSchema,
|
|
2294
|
+
BackendPlatformSchema,
|
|
2295
|
+
BackendDescriptorSchema,
|
|
2296
|
+
BackendListSchema,
|
|
2297
|
+
BackendHandshakeSchema,
|
|
2298
|
+
parseBackendHandshake,
|
|
2299
|
+
hasBackendCapability,
|
|
2300
|
+
requireBackendCapability,
|
|
2301
|
+
BackendResourceRefSchema,
|
|
2302
|
+
backendResourceKey,
|
|
2303
|
+
backendResourceQueryKey,
|
|
2304
|
+
BackendRequestContextSchema,
|
|
2305
|
+
BackendEventCursorSchema,
|
|
2306
|
+
BackendApprovalRefSchema,
|
|
2307
|
+
assertBackendReference,
|
|
2308
|
+
backendCapabilitiesForApiPath,
|
|
2309
|
+
ScanResumeRequestSchema,
|
|
2310
|
+
resolvePersistedScanResume,
|
|
2311
|
+
ENGINE_OPERATION_DEFINITIONS,
|
|
2312
|
+
ENGINE_REPORT_FORMATS,
|
|
2313
|
+
EngineCapabilityManifestSchema,
|
|
2314
|
+
createEngineCapabilityManifest,
|
|
2315
|
+
requireEngineOperation,
|
|
2316
|
+
ENGINE_COMMAND_COVERAGE,
|
|
2317
|
+
ImpactAssessmentSchema,
|
|
2318
|
+
isHeuristicImpactAssessment,
|
|
2319
|
+
getFindingPriority,
|
|
2320
|
+
compareFindingsByBusinessPriority,
|
|
2321
|
+
accessMilestoneFromArtifact,
|
|
2322
|
+
appendAccessMilestone
|
|
1809
2323
|
};
|