@chainpatrol/cli 1.10.0 → 1.11.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/CHANGELOG.md +21 -0
- package/dist/{breakdown-2HAZ2MX5.js → breakdown-BLCYJP7O.js} +4 -3
- package/dist/{check-5LJI7N5I.js → check-2IFMTAIU.js} +4 -3
- package/dist/chunk-4QZ7KD2Y.js +18 -0
- package/dist/{chunk-GGBG2R63.js → chunk-BSWGLZDK.js} +1 -1
- package/dist/{chunk-FPCN4SNK.js → chunk-CABRZEYB.js} +1 -1
- package/dist/chunk-K4RAUZSD.js +32 -0
- package/dist/{chunk-322AVMUH.js → chunk-NSRQ62C4.js} +3 -16
- package/dist/chunk-OKIUEBUK.js +61 -0
- package/dist/{chunk-EGWK6SRQ.js → chunk-ORAY4KMA.js} +1 -1
- package/dist/{chunk-LE5ZOOUI.js → chunk-TGIVCSKT.js} +6 -62
- package/dist/cli.js +81 -50
- package/dist/{config-Z3TASRME.js → config-IKTL6KVW.js} +3 -1
- package/dist/{configs-update-N7ZIWWKQ.js → configs-update-XUN4X4T2.js} +4 -3
- package/dist/{create-4ZJ7DXHX.js → create-ILSWAUVI.js} +4 -3
- package/dist/{drift-BGWNH6QE.js → drift-DPYW7LYN.js} +4 -3
- package/dist/{found-QOARB5G2.js → found-YLTMVPBZ.js} +4 -3
- package/dist/{get-ON5JOCV7.js → get-NDEY54AO.js} +4 -3
- package/dist/{healthcheck-34LQTSVZ.js → healthcheck-SYZQ2ILK.js} +4 -3
- package/dist/{list-AG6LWNMN.js → list-2H2CV3JJ.js} +4 -3
- package/dist/{list-XV3G2AX6.js → list-4THJBDSU.js} +4 -3
- package/dist/{list-JG5ARDTR.js → list-FUQK3TIN.js} +5 -4
- package/dist/{list-UXYGISAK.js → list-GTN2HNGZ.js} +4 -3
- package/dist/{list-DJFIKDY6.js → list-H4RCDI6Q.js} +4 -3
- package/dist/{list-PAJBOVN2.js → list-LWB5JQAY.js} +4 -3
- package/dist/{list-6CAKS43I.js → list-PV5GY2DY.js} +4 -3
- package/dist/{list-W6CF25ZS.js → list-Q5K4RMM4.js} +4 -3
- package/dist/{list-UPY6PHY4.js → list-RUIQIVEA.js} +4 -3
- package/dist/{list-5TKOWBC4.js → list-VHDU3XMN.js} +4 -3
- package/dist/{list-SJFJT4V3.js → list-WYC4ZP7X.js} +4 -3
- package/dist/{list-IVFZGLKN.js → list-YFBZVQWK.js} +4 -3
- package/dist/{list-json-ZR3XOQPJ.js → list-json-B4X74BTZ.js} +4 -3
- package/dist/{login-2NRI3ECY.js → login-H2G6RBLL.js} +3 -3
- package/dist/{login-json-HOCNSQQ7.js → login-json-5DVIMAO2.js} +3 -3
- package/dist/{login-plain-6ZJF5KA7.js → login-plain-PUWGRRYT.js} +3 -3
- package/dist/{logout-T6Q4IVPU.js → logout-332KFFNS.js} +2 -2
- package/dist/{logout-json-ACXBI6PN.js → logout-json-VMGXQQS2.js} +2 -2
- package/dist/mcp-ITEWOAOR.js +46 -0
- package/dist/{organization-SSCPM7XN.js → organization-KANXTARX.js} +4 -3
- package/dist/{review-7A7WV73T.js → review-5J3EQRCB.js} +4 -3
- package/dist/{run-LZZOV4HG.js → run-FDZWPY4W.js} +4 -3
- package/dist/{run-AIYPHWFJ.js → run-JBQ43OW6.js} +4 -3
- package/dist/{run-YP4O5VXZ.js → run-XWM67MBV.js} +5 -4
- package/dist/{search-OGGKNPUJ.js → search-A75YUJFI.js} +4 -3
- package/dist/{search-IWS42COG.js → search-DRTTZJJP.js} +4 -3
- package/dist/{setup-skill-ESJ4HIKR.js → setup-skill-TVJJD6NC.js} +2 -1
- package/dist/{snapshot-TLSOPK7C.js → snapshot-2IT4KG4F.js} +4 -3
- package/dist/{summary-XA3PVJIW.js → summary-A24TNQNR.js} +4 -3
- package/dist/{takedown-time-ARGVSPL6.js → takedown-time-HB3J2FTZ.js} +4 -3
- package/dist/{takedown-time-trend-LL3ZCCSD.js → takedown-time-trend-KYPA3W3U.js} +4 -3
- package/dist/{validate-WB5367QN.js → validate-FOZCI7HX.js} +4 -3
- package/dist/{whoami-YE3V6I65.js → whoami-DSXNLG3B.js} +4 -3
- package/package.json +3 -1
- package/dist/chunk-U73SABXK.js +0 -46
package/dist/cli.js
CHANGED
|
@@ -8,19 +8,21 @@ import {
|
|
|
8
8
|
resolveOutputFormat
|
|
9
9
|
} from "./chunk-VFT3TD3E.js";
|
|
10
10
|
import {
|
|
11
|
-
compareVersions,
|
|
12
11
|
getBundledSkillVersion,
|
|
13
|
-
getCliVersion,
|
|
14
12
|
isSkillInstalled,
|
|
15
13
|
readInstalledSkillVersion
|
|
16
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TGIVCSKT.js";
|
|
15
|
+
import {
|
|
16
|
+
compareVersions,
|
|
17
|
+
getCliVersion
|
|
18
|
+
} from "./chunk-OKIUEBUK.js";
|
|
17
19
|
import "./chunk-TI2HK3NM.js";
|
|
18
20
|
import {
|
|
19
21
|
DateTime
|
|
20
22
|
} from "./chunk-TFCNKBRC.js";
|
|
21
23
|
import {
|
|
22
24
|
getConfigDir
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-K4RAUZSD.js";
|
|
24
26
|
|
|
25
27
|
// src/cli.tsx
|
|
26
28
|
import meow from "meow";
|
|
@@ -701,6 +703,21 @@ var HELP = {
|
|
|
701
703
|
usage: "chainpatrol completions <zsh|bash>",
|
|
702
704
|
examples: ["chainpatrol completions zsh > _chainpatrol"]
|
|
703
705
|
},
|
|
706
|
+
mcp: {
|
|
707
|
+
description: "Serve ChainPatrol over the Model Context Protocol on stdio, so an AI agent can use the whole public API as tools. Runs until the client disconnects and prints nothing to stdout \u2014 that channel carries the protocol. Point your MCP client at `chainpatrol mcp`; it authenticates the same way every other command does.",
|
|
708
|
+
usage: "chainpatrol mcp [--tools <names>]",
|
|
709
|
+
options: [
|
|
710
|
+
"--tools <names> Comma-separated tool names to expose (default: all).",
|
|
711
|
+
" Falls back to CHAINPATROL_MCP_TOOLS, which is where",
|
|
712
|
+
" an MCP client's config can set it."
|
|
713
|
+
],
|
|
714
|
+
examples: [
|
|
715
|
+
"chainpatrol mcp",
|
|
716
|
+
"chainpatrol mcp --tools asset_check,reports_search",
|
|
717
|
+
"CHAINPATROL_MCP_TOOLS=asset_check,reports_search chainpatrol mcp",
|
|
718
|
+
"CHAINPATROL_API_KEY=... chainpatrol mcp"
|
|
719
|
+
]
|
|
720
|
+
},
|
|
704
721
|
whoami: {
|
|
705
722
|
description: "Show the current authenticated identity. With an API key, validates the key and reports the bound organization. With a session token, returns the logged-in user.",
|
|
706
723
|
usage: "chainpatrol whoami",
|
|
@@ -734,6 +751,7 @@ function getTopLevelHelp() {
|
|
|
734
751
|
" login Authenticate with ChainPatrol",
|
|
735
752
|
" logout Clear stored credentials",
|
|
736
753
|
" whoami Show the current authenticated identity",
|
|
754
|
+
" mcp Serve the public API to AI agents over MCP (stdio)",
|
|
737
755
|
" asset Check, search, or list assets, or list supported asset types",
|
|
738
756
|
" configs Manage detection configs",
|
|
739
757
|
" detections Validate, run, list, update detection configs and results",
|
|
@@ -892,7 +910,11 @@ function shouldRunVersionChecks(opts) {
|
|
|
892
910
|
"i",
|
|
893
911
|
"uninstall",
|
|
894
912
|
"completions",
|
|
895
|
-
"help"
|
|
913
|
+
"help",
|
|
914
|
+
// Long-running MCP server started by an editor or desktop client: a
|
|
915
|
+
// registry round-trip on every launch buys nothing, and its output would
|
|
916
|
+
// be noise in the client's logs.
|
|
917
|
+
"mcp"
|
|
896
918
|
]);
|
|
897
919
|
return !skipCommands.has(opts.command);
|
|
898
920
|
}
|
|
@@ -924,6 +946,7 @@ var COMMANDS = [
|
|
|
924
946
|
"setup",
|
|
925
947
|
"uninstall",
|
|
926
948
|
"completions",
|
|
949
|
+
"mcp",
|
|
927
950
|
"whoami",
|
|
928
951
|
"help"
|
|
929
952
|
];
|
|
@@ -1060,7 +1083,8 @@ ${getTopLevelHelp()}
|
|
|
1060
1083
|
noInput: { type: "boolean", default: false },
|
|
1061
1084
|
noColor: { type: "boolean", default: false },
|
|
1062
1085
|
cloud: { type: "boolean", default: false },
|
|
1063
|
-
id: { type: "string", isMultiple: true }
|
|
1086
|
+
id: { type: "string", isMultiple: true },
|
|
1087
|
+
tools: { type: "string" }
|
|
1064
1088
|
}
|
|
1065
1089
|
});
|
|
1066
1090
|
var [command, subcommand, action] = cli.input;
|
|
@@ -1077,11 +1101,11 @@ function jsonError(message, code = ExitCode.UNKNOWN) {
|
|
|
1077
1101
|
process.exit(code);
|
|
1078
1102
|
}
|
|
1079
1103
|
async function tryResolveOrg() {
|
|
1080
|
-
const { getConfig, saveConfig } = await import("./config-
|
|
1104
|
+
const { getConfig, getStoredConfig, saveConfig } = await import("./config-IKTL6KVW.js");
|
|
1081
1105
|
const config = getConfig();
|
|
1082
1106
|
if (cli.flags.org) {
|
|
1083
1107
|
if (config.defaultOrg !== cli.flags.org) {
|
|
1084
|
-
saveConfig({ ...
|
|
1108
|
+
saveConfig({ ...getStoredConfig(), defaultOrg: cli.flags.org });
|
|
1085
1109
|
}
|
|
1086
1110
|
return cli.flags.org;
|
|
1087
1111
|
}
|
|
@@ -1186,12 +1210,12 @@ function parseAttachmentUrls() {
|
|
|
1186
1210
|
}
|
|
1187
1211
|
async function handleConfigsList(org) {
|
|
1188
1212
|
if (jsonMode) {
|
|
1189
|
-
const { listConfigsJson } = await import("./list-json-
|
|
1213
|
+
const { listConfigsJson } = await import("./list-json-B4X74BTZ.js");
|
|
1190
1214
|
await listConfigsJson({ org });
|
|
1191
1215
|
return;
|
|
1192
1216
|
}
|
|
1193
1217
|
const { render } = await import("ink");
|
|
1194
|
-
const { default: ConfigsList } = await import("./list-
|
|
1218
|
+
const { default: ConfigsList } = await import("./list-PV5GY2DY.js");
|
|
1195
1219
|
const { default: React } = await import("react");
|
|
1196
1220
|
render(React.createElement(ConfigsList, { org }));
|
|
1197
1221
|
}
|
|
@@ -1246,14 +1270,14 @@ async function main() {
|
|
|
1246
1270
|
);
|
|
1247
1271
|
}
|
|
1248
1272
|
if (jsonMode) {
|
|
1249
|
-
const { loginJson } = await import("./login-json-
|
|
1273
|
+
const { loginJson } = await import("./login-json-5DVIMAO2.js");
|
|
1250
1274
|
await loginJson();
|
|
1251
1275
|
} else if (!process.stdout.isTTY) {
|
|
1252
|
-
const { loginPlain } = await import("./login-plain-
|
|
1276
|
+
const { loginPlain } = await import("./login-plain-PUWGRRYT.js");
|
|
1253
1277
|
await loginPlain();
|
|
1254
1278
|
} else {
|
|
1255
1279
|
const { render } = await import("ink");
|
|
1256
|
-
const { default: Login } = await import("./login-
|
|
1280
|
+
const { default: Login } = await import("./login-H2G6RBLL.js");
|
|
1257
1281
|
const { default: React } = await import("react");
|
|
1258
1282
|
render(React.createElement(Login));
|
|
1259
1283
|
}
|
|
@@ -1261,11 +1285,11 @@ async function main() {
|
|
|
1261
1285
|
}
|
|
1262
1286
|
case "logout": {
|
|
1263
1287
|
if (jsonMode) {
|
|
1264
|
-
const { logoutJson } = await import("./logout-json-
|
|
1288
|
+
const { logoutJson } = await import("./logout-json-VMGXQQS2.js");
|
|
1265
1289
|
await logoutJson();
|
|
1266
1290
|
} else {
|
|
1267
1291
|
const { render } = await import("ink");
|
|
1268
|
-
const { default: Logout } = await import("./logout-
|
|
1292
|
+
const { default: Logout } = await import("./logout-332KFFNS.js");
|
|
1269
1293
|
const { default: React } = await import("react");
|
|
1270
1294
|
render(React.createElement(Logout));
|
|
1271
1295
|
}
|
|
@@ -1291,7 +1315,7 @@ async function main() {
|
|
|
1291
1315
|
const positionals = cli.input.slice(2);
|
|
1292
1316
|
const flagAssets = parseAssetInputs();
|
|
1293
1317
|
const contents = [...positionals, ...flagAssets];
|
|
1294
|
-
const { runAssetCheck } = await import("./check-
|
|
1318
|
+
const { runAssetCheck } = await import("./check-2IFMTAIU.js");
|
|
1295
1319
|
await runAssetCheck({
|
|
1296
1320
|
contents,
|
|
1297
1321
|
json: jsonMode,
|
|
@@ -1301,7 +1325,7 @@ async function main() {
|
|
|
1301
1325
|
break;
|
|
1302
1326
|
}
|
|
1303
1327
|
if (subcommand === "list") {
|
|
1304
|
-
const { runAssetList } = await import("./list-
|
|
1328
|
+
const { runAssetList } = await import("./list-GTN2HNGZ.js");
|
|
1305
1329
|
await runAssetList({
|
|
1306
1330
|
type: cli.flags.type ?? cli.flags.assetType,
|
|
1307
1331
|
status: cli.flags.assetStatus ?? cli.flags.status,
|
|
@@ -1326,7 +1350,7 @@ async function main() {
|
|
|
1326
1350
|
}
|
|
1327
1351
|
return n;
|
|
1328
1352
|
});
|
|
1329
|
-
const { runAssetSearch } = await import("./search-
|
|
1353
|
+
const { runAssetSearch } = await import("./search-DRTTZJJP.js");
|
|
1330
1354
|
await runAssetSearch({
|
|
1331
1355
|
contents: contents.length > 0 ? contents : void 0,
|
|
1332
1356
|
ids: ids.length > 0 ? ids : void 0,
|
|
@@ -1351,7 +1375,7 @@ async function main() {
|
|
|
1351
1375
|
case "detections": {
|
|
1352
1376
|
const org = await resolveOrg();
|
|
1353
1377
|
if (subcommand === "healthcheck") {
|
|
1354
|
-
const { runDetectionsHealthcheck } = await import("./healthcheck-
|
|
1378
|
+
const { runDetectionsHealthcheck } = await import("./healthcheck-SYZQ2ILK.js");
|
|
1355
1379
|
await runDetectionsHealthcheck({
|
|
1356
1380
|
org,
|
|
1357
1381
|
source: cli.flags.source,
|
|
@@ -1366,7 +1390,7 @@ async function main() {
|
|
|
1366
1390
|
break;
|
|
1367
1391
|
}
|
|
1368
1392
|
if (subcommand === "validate") {
|
|
1369
|
-
const { runDetectionsValidate } = await import("./validate-
|
|
1393
|
+
const { runDetectionsValidate } = await import("./validate-FOZCI7HX.js");
|
|
1370
1394
|
await runDetectionsValidate({
|
|
1371
1395
|
org,
|
|
1372
1396
|
source: cli.flags.source,
|
|
@@ -1381,7 +1405,7 @@ async function main() {
|
|
|
1381
1405
|
break;
|
|
1382
1406
|
}
|
|
1383
1407
|
if (subcommand === "drift") {
|
|
1384
|
-
const { runDetectionsDrift } = await import("./drift-
|
|
1408
|
+
const { runDetectionsDrift } = await import("./drift-DPYW7LYN.js");
|
|
1385
1409
|
await runDetectionsDrift({
|
|
1386
1410
|
org,
|
|
1387
1411
|
source: cli.flags.source,
|
|
@@ -1395,7 +1419,7 @@ async function main() {
|
|
|
1395
1419
|
break;
|
|
1396
1420
|
}
|
|
1397
1421
|
if (subcommand === "run") {
|
|
1398
|
-
const { runDetectionsRun } = await import("./run-
|
|
1422
|
+
const { runDetectionsRun } = await import("./run-FDZWPY4W.js");
|
|
1399
1423
|
await runDetectionsRun({
|
|
1400
1424
|
org,
|
|
1401
1425
|
configId: cli.flags.configId,
|
|
@@ -1409,7 +1433,7 @@ async function main() {
|
|
|
1409
1433
|
break;
|
|
1410
1434
|
}
|
|
1411
1435
|
if (subcommand === "list") {
|
|
1412
|
-
const { runDetectionsList } = await import("./list-
|
|
1436
|
+
const { runDetectionsList } = await import("./list-H4RCDI6Q.js");
|
|
1413
1437
|
await runDetectionsList({
|
|
1414
1438
|
org,
|
|
1415
1439
|
cursor: cli.flags.cursor,
|
|
@@ -1438,7 +1462,7 @@ async function main() {
|
|
|
1438
1462
|
break;
|
|
1439
1463
|
}
|
|
1440
1464
|
if (action === "run") {
|
|
1441
|
-
const { runDetectionsRun } = await import("./run-
|
|
1465
|
+
const { runDetectionsRun } = await import("./run-FDZWPY4W.js");
|
|
1442
1466
|
await runDetectionsRun({
|
|
1443
1467
|
org,
|
|
1444
1468
|
configId: cli.flags.configId,
|
|
@@ -1456,7 +1480,7 @@ async function main() {
|
|
|
1456
1480
|
throw new Error("detections configs update requires --config-id");
|
|
1457
1481
|
}
|
|
1458
1482
|
const configPatch = getConfigPatchFromSetFlags();
|
|
1459
|
-
const { runDetectionsConfigsUpdate } = await import("./configs-update-
|
|
1483
|
+
const { runDetectionsConfigsUpdate } = await import("./configs-update-XUN4X4T2.js");
|
|
1460
1484
|
await runDetectionsConfigsUpdate({
|
|
1461
1485
|
org,
|
|
1462
1486
|
configId: cli.flags.configId,
|
|
@@ -1492,7 +1516,7 @@ async function main() {
|
|
|
1492
1516
|
const slugs = parseCsvList(cli.flags.slugs);
|
|
1493
1517
|
const allMyOrgs = cli.flags.allMyOrgs;
|
|
1494
1518
|
const org2 = slugs && slugs.length > 0 || allMyOrgs ? void 0 : await tryResolveOrg();
|
|
1495
|
-
const { runMetricsOrganization } = await import("./organization-
|
|
1519
|
+
const { runMetricsOrganization } = await import("./organization-KANXTARX.js");
|
|
1496
1520
|
await runMetricsOrganization({
|
|
1497
1521
|
org: org2,
|
|
1498
1522
|
slugs,
|
|
@@ -1511,7 +1535,7 @@ async function main() {
|
|
|
1511
1535
|
}
|
|
1512
1536
|
const org = await resolveOrg();
|
|
1513
1537
|
if (subcommand === "summary") {
|
|
1514
|
-
const { runMetricsSummary } = await import("./summary-
|
|
1538
|
+
const { runMetricsSummary } = await import("./summary-A24TNQNR.js");
|
|
1515
1539
|
await runMetricsSummary({
|
|
1516
1540
|
org,
|
|
1517
1541
|
from: cli.flags.from,
|
|
@@ -1524,7 +1548,7 @@ async function main() {
|
|
|
1524
1548
|
break;
|
|
1525
1549
|
}
|
|
1526
1550
|
if (subcommand === "found") {
|
|
1527
|
-
const { runMetricsFound } = await import("./found-
|
|
1551
|
+
const { runMetricsFound } = await import("./found-YLTMVPBZ.js");
|
|
1528
1552
|
await runMetricsFound({
|
|
1529
1553
|
org,
|
|
1530
1554
|
from: cli.flags.from,
|
|
@@ -1537,7 +1561,7 @@ async function main() {
|
|
|
1537
1561
|
break;
|
|
1538
1562
|
}
|
|
1539
1563
|
if (subcommand === "takedown-time" || subcommand === "takedownTime") {
|
|
1540
|
-
const { runMetricsTakedownTime } = await import("./takedown-time-
|
|
1564
|
+
const { runMetricsTakedownTime } = await import("./takedown-time-HB3J2FTZ.js");
|
|
1541
1565
|
await runMetricsTakedownTime({
|
|
1542
1566
|
org,
|
|
1543
1567
|
from: cli.flags.from,
|
|
@@ -1550,7 +1574,7 @@ async function main() {
|
|
|
1550
1574
|
break;
|
|
1551
1575
|
}
|
|
1552
1576
|
if (subcommand === "takedown-time-trend" || subcommand === "takedownTimeTrend") {
|
|
1553
|
-
const { runMetricsTakedownTimeTrend } = await import("./takedown-time-trend-
|
|
1577
|
+
const { runMetricsTakedownTimeTrend } = await import("./takedown-time-trend-KYPA3W3U.js");
|
|
1554
1578
|
await runMetricsTakedownTimeTrend({
|
|
1555
1579
|
org,
|
|
1556
1580
|
months: cli.flags.months,
|
|
@@ -1566,7 +1590,7 @@ async function main() {
|
|
|
1566
1590
|
if (!by || !["day", "type", "brand"].includes(by)) {
|
|
1567
1591
|
throw new Error("metrics breakdown requires --by <day|type|brand>");
|
|
1568
1592
|
}
|
|
1569
|
-
const { runMetricsBreakdown } = await import("./breakdown-
|
|
1593
|
+
const { runMetricsBreakdown } = await import("./breakdown-BLCYJP7O.js");
|
|
1570
1594
|
await runMetricsBreakdown({
|
|
1571
1595
|
org,
|
|
1572
1596
|
by,
|
|
@@ -1594,7 +1618,7 @@ async function main() {
|
|
|
1594
1618
|
case "reports": {
|
|
1595
1619
|
if (subcommand === "list") {
|
|
1596
1620
|
const org = await resolveOrg();
|
|
1597
|
-
const { runReportsList } = await import("./list-
|
|
1621
|
+
const { runReportsList } = await import("./list-2H2CV3JJ.js");
|
|
1598
1622
|
await runReportsList({
|
|
1599
1623
|
org,
|
|
1600
1624
|
limit: cli.flags.limit,
|
|
@@ -1625,7 +1649,7 @@ async function main() {
|
|
|
1625
1649
|
}
|
|
1626
1650
|
if (subcommand === "create") {
|
|
1627
1651
|
const org = await tryResolveOrg();
|
|
1628
|
-
const { runReportsCreate } = await import("./create-
|
|
1652
|
+
const { runReportsCreate } = await import("./create-ILSWAUVI.js");
|
|
1629
1653
|
await runReportsCreate({
|
|
1630
1654
|
org,
|
|
1631
1655
|
title: cli.flags.title,
|
|
@@ -1647,7 +1671,7 @@ async function main() {
|
|
|
1647
1671
|
const positionals = cli.input.slice(2);
|
|
1648
1672
|
const flagAssets = parseAssetInputs();
|
|
1649
1673
|
const assetContents = [...positionals, ...flagAssets];
|
|
1650
|
-
const { runReportsSearch } = await import("./search-
|
|
1674
|
+
const { runReportsSearch } = await import("./search-A75YUJFI.js");
|
|
1651
1675
|
await runReportsSearch({
|
|
1652
1676
|
assetContents,
|
|
1653
1677
|
org,
|
|
@@ -1667,7 +1691,7 @@ async function main() {
|
|
|
1667
1691
|
if (subcommand === "review") {
|
|
1668
1692
|
const org = await tryResolveOrg();
|
|
1669
1693
|
const positionalProposalId = cli.input[2];
|
|
1670
|
-
const { runProposalsReview } = await import("./review-
|
|
1694
|
+
const { runProposalsReview } = await import("./review-5J3EQRCB.js");
|
|
1671
1695
|
await runProposalsReview({
|
|
1672
1696
|
org,
|
|
1673
1697
|
proposalId: cli.flags.proposalId ?? (positionalProposalId ? Number(positionalProposalId) : void 0),
|
|
@@ -1694,7 +1718,7 @@ async function main() {
|
|
|
1694
1718
|
}
|
|
1695
1719
|
case "threats": {
|
|
1696
1720
|
if (subcommand === "list") {
|
|
1697
|
-
const { runThreatsList } = await import("./list-
|
|
1721
|
+
const { runThreatsList } = await import("./list-RUIQIVEA.js");
|
|
1698
1722
|
await runThreatsList({
|
|
1699
1723
|
query: cli.flags.query,
|
|
1700
1724
|
from: cli.flags.from,
|
|
@@ -1717,7 +1741,7 @@ async function main() {
|
|
|
1717
1741
|
case "takedowns": {
|
|
1718
1742
|
if (subcommand === "list") {
|
|
1719
1743
|
const org = await tryResolveOrg();
|
|
1720
|
-
const { runTakedownsList } = await import("./list-
|
|
1744
|
+
const { runTakedownsList } = await import("./list-LWB5JQAY.js");
|
|
1721
1745
|
await runTakedownsList({
|
|
1722
1746
|
org,
|
|
1723
1747
|
query: cli.flags.query,
|
|
@@ -1748,7 +1772,7 @@ async function main() {
|
|
|
1748
1772
|
}
|
|
1749
1773
|
case "queues": {
|
|
1750
1774
|
if (subcommand === "snapshot") {
|
|
1751
|
-
const { runQueuesSnapshot } = await import("./snapshot-
|
|
1775
|
+
const { runQueuesSnapshot } = await import("./snapshot-2IT4KG4F.js");
|
|
1752
1776
|
await runQueuesSnapshot({
|
|
1753
1777
|
org: cli.flags.org,
|
|
1754
1778
|
all: cli.flags.all,
|
|
@@ -1766,7 +1790,7 @@ async function main() {
|
|
|
1766
1790
|
}
|
|
1767
1791
|
case "orgs": {
|
|
1768
1792
|
if (subcommand === "list") {
|
|
1769
|
-
const { runOrgsList } = await import("./list-
|
|
1793
|
+
const { runOrgsList } = await import("./list-4THJBDSU.js");
|
|
1770
1794
|
await runOrgsList({
|
|
1771
1795
|
query: cli.flags.query,
|
|
1772
1796
|
subscriptionStatus: cli.flags.subscriptionStatus,
|
|
@@ -1788,7 +1812,7 @@ async function main() {
|
|
|
1788
1812
|
if (subcommand === "get") {
|
|
1789
1813
|
const positionalSlug = action;
|
|
1790
1814
|
const slug = positionalSlug ?? await tryResolveOrg();
|
|
1791
|
-
const { runOrgsGet } = await import("./get-
|
|
1815
|
+
const { runOrgsGet } = await import("./get-NDEY54AO.js");
|
|
1792
1816
|
await runOrgsGet({
|
|
1793
1817
|
slug,
|
|
1794
1818
|
json: jsonMode,
|
|
@@ -1798,7 +1822,7 @@ async function main() {
|
|
|
1798
1822
|
}
|
|
1799
1823
|
if (subcommand === "assets") {
|
|
1800
1824
|
if (action === "list") {
|
|
1801
|
-
const { runOrgsAssetsList } = await import("./list-
|
|
1825
|
+
const { runOrgsAssetsList } = await import("./list-VHDU3XMN.js");
|
|
1802
1826
|
await runOrgsAssetsList({
|
|
1803
1827
|
// Optional: organization-scoped API keys resolve the org from the
|
|
1804
1828
|
// key, so only pass a slug when one is actually available.
|
|
@@ -1817,7 +1841,7 @@ async function main() {
|
|
|
1817
1841
|
}
|
|
1818
1842
|
if (subcommand === "asset-groups") {
|
|
1819
1843
|
if (action === "list") {
|
|
1820
|
-
const { runOrgsAssetGroupsList } = await import("./list-
|
|
1844
|
+
const { runOrgsAssetGroupsList } = await import("./list-WYC4ZP7X.js");
|
|
1821
1845
|
await runOrgsAssetGroupsList({
|
|
1822
1846
|
json: jsonMode,
|
|
1823
1847
|
outputFormat: cliContext.outputFormat
|
|
@@ -1839,7 +1863,7 @@ async function main() {
|
|
|
1839
1863
|
"brands list --type must be ORGANIZATION, INDIVIDUAL, or PRODUCT (case-insensitive)."
|
|
1840
1864
|
);
|
|
1841
1865
|
}
|
|
1842
|
-
const { runBrandsList } = await import("./list-
|
|
1866
|
+
const { runBrandsList } = await import("./list-YFBZVQWK.js");
|
|
1843
1867
|
await runBrandsList({
|
|
1844
1868
|
type: rawType,
|
|
1845
1869
|
json: jsonMode,
|
|
@@ -1852,8 +1876,15 @@ async function main() {
|
|
|
1852
1876
|
subcommand ? `Unknown subcommand: brands ${subcommand}${hint ? `. Did you mean "brands ${hint}"?` : ""}` : "Usage: chainpatrol brands list [--type ORGANIZATION|INDIVIDUAL|PRODUCT]"
|
|
1853
1877
|
);
|
|
1854
1878
|
}
|
|
1879
|
+
case "mcp": {
|
|
1880
|
+
const { runMcpServe } = await import("./mcp-ITEWOAOR.js");
|
|
1881
|
+
await runMcpServe({
|
|
1882
|
+
only: parseCsvList(cli.flags.tools)
|
|
1883
|
+
});
|
|
1884
|
+
break;
|
|
1885
|
+
}
|
|
1855
1886
|
case "whoami": {
|
|
1856
|
-
const { runWhoami } = await import("./whoami-
|
|
1887
|
+
const { runWhoami } = await import("./whoami-DSXNLG3B.js");
|
|
1857
1888
|
await runWhoami({
|
|
1858
1889
|
json: jsonMode,
|
|
1859
1890
|
outputFormat: cliContext.outputFormat
|
|
@@ -1862,7 +1893,7 @@ async function main() {
|
|
|
1862
1893
|
}
|
|
1863
1894
|
case "healthchecks": {
|
|
1864
1895
|
if (subcommand === "list") {
|
|
1865
|
-
const { runHealthchecksList } = await import("./list-
|
|
1896
|
+
const { runHealthchecksList } = await import("./list-Q5K4RMM4.js");
|
|
1866
1897
|
await runHealthchecksList({
|
|
1867
1898
|
json: jsonMode,
|
|
1868
1899
|
outputFormat: cliContext.outputFormat
|
|
@@ -1876,7 +1907,7 @@ async function main() {
|
|
|
1876
1907
|
thresholds.minResults = cli.flags.minResults;
|
|
1877
1908
|
if (cli.flags.lookbackHours !== void 0)
|
|
1878
1909
|
thresholds.lookbackHours = cli.flags.lookbackHours;
|
|
1879
|
-
const { runHealthchecksRun } = await import("./run-
|
|
1910
|
+
const { runHealthchecksRun } = await import("./run-JBQ43OW6.js");
|
|
1880
1911
|
await runHealthchecksRun({
|
|
1881
1912
|
org,
|
|
1882
1913
|
id: action,
|
|
@@ -1894,7 +1925,7 @@ async function main() {
|
|
|
1894
1925
|
}
|
|
1895
1926
|
case "presets": {
|
|
1896
1927
|
if (subcommand === "list") {
|
|
1897
|
-
const { runPresetsList } = await import("./list-
|
|
1928
|
+
const { runPresetsList } = await import("./list-FUQK3TIN.js");
|
|
1898
1929
|
await runPresetsList({ outputFormat: cliContext.outputFormat });
|
|
1899
1930
|
break;
|
|
1900
1931
|
}
|
|
@@ -1905,7 +1936,7 @@ async function main() {
|
|
|
1905
1936
|
);
|
|
1906
1937
|
}
|
|
1907
1938
|
const org = await resolveOrg();
|
|
1908
|
-
const { runPresetsRun } = await import("./run-
|
|
1939
|
+
const { runPresetsRun } = await import("./run-XWM67MBV.js");
|
|
1909
1940
|
await runPresetsRun({
|
|
1910
1941
|
presetId: action,
|
|
1911
1942
|
org,
|
|
@@ -1922,12 +1953,12 @@ async function main() {
|
|
|
1922
1953
|
case "setup":
|
|
1923
1954
|
case "install":
|
|
1924
1955
|
case "i": {
|
|
1925
|
-
const { setupSkill } = await import("./setup-skill-
|
|
1956
|
+
const { setupSkill } = await import("./setup-skill-TVJJD6NC.js");
|
|
1926
1957
|
setupSkill({ json: jsonMode, cloud: cli.flags.cloud });
|
|
1927
1958
|
break;
|
|
1928
1959
|
}
|
|
1929
1960
|
case "uninstall": {
|
|
1930
|
-
const { uninstallSkill } = await import("./setup-skill-
|
|
1961
|
+
const { uninstallSkill } = await import("./setup-skill-TVJJD6NC.js");
|
|
1931
1962
|
uninstallSkill({ json: jsonMode });
|
|
1932
1963
|
break;
|
|
1933
1964
|
}
|
|
@@ -7,9 +7,10 @@ import {
|
|
|
7
7
|
} from "./chunk-VFT3TD3E.js";
|
|
8
8
|
import {
|
|
9
9
|
createApiClient
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-NSRQ62C4.js";
|
|
11
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
12
|
+
import "./chunk-ORAY4KMA.js";
|
|
13
|
+
import "./chunk-K4RAUZSD.js";
|
|
13
14
|
|
|
14
15
|
// src/commands/detections/configs-update.ts
|
|
15
16
|
async function runDetectionsConfigsUpdate(options) {
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
9
|
import {
|
|
10
10
|
createApiClient
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NSRQ62C4.js";
|
|
12
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
13
|
+
import "./chunk-ORAY4KMA.js";
|
|
14
|
+
import "./chunk-K4RAUZSD.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/reports/create.ts
|
|
16
17
|
import { readFileSync } from "fs";
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
9
|
import {
|
|
10
10
|
createApiClient
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NSRQ62C4.js";
|
|
12
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
13
|
+
import "./chunk-ORAY4KMA.js";
|
|
14
|
+
import "./chunk-K4RAUZSD.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/detections/drift.ts
|
|
16
17
|
async function runDetectionsDrift(options) {
|
|
@@ -7,10 +7,11 @@ import {
|
|
|
7
7
|
} from "./chunk-VFT3TD3E.js";
|
|
8
8
|
import {
|
|
9
9
|
createApiClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NSRQ62C4.js";
|
|
11
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
11
12
|
import "./chunk-TFCNKBRC.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ORAY4KMA.js";
|
|
14
|
+
import "./chunk-K4RAUZSD.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/metrics/found.ts
|
|
16
17
|
async function runMetricsFound(options) {
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
9
|
import {
|
|
10
10
|
createApiClient
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NSRQ62C4.js";
|
|
12
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
13
|
+
import "./chunk-ORAY4KMA.js";
|
|
14
|
+
import "./chunk-K4RAUZSD.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/orgs/get.ts
|
|
16
17
|
function summarizeServices(org) {
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
9
|
import {
|
|
10
10
|
createApiClient
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NSRQ62C4.js";
|
|
12
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
13
|
+
import "./chunk-ORAY4KMA.js";
|
|
14
|
+
import "./chunk-K4RAUZSD.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/detections/healthcheck.ts
|
|
16
17
|
async function runDetectionsHealthcheck(options) {
|
|
@@ -10,9 +10,10 @@ import {
|
|
|
10
10
|
REPORT_REVIEW_DECISIONS,
|
|
11
11
|
REPORT_STATUSES,
|
|
12
12
|
createApiClient
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-NSRQ62C4.js";
|
|
14
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
15
|
+
import "./chunk-ORAY4KMA.js";
|
|
16
|
+
import "./chunk-K4RAUZSD.js";
|
|
16
17
|
|
|
17
18
|
// src/commands/reports/list.ts
|
|
18
19
|
var REVIEW_DECISION_SET = new Set(REPORT_REVIEW_DECISIONS);
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
9
|
import {
|
|
10
10
|
createApiClient
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NSRQ62C4.js";
|
|
12
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
13
|
+
import "./chunk-ORAY4KMA.js";
|
|
14
|
+
import "./chunk-K4RAUZSD.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/orgs/list.ts
|
|
16
17
|
var VALID_SUBSCRIPTION_STATUSES = /* @__PURE__ */ new Set([
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PRESETS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CABRZEYB.js";
|
|
4
4
|
import "./chunk-E2LAMILJ.js";
|
|
5
5
|
import {
|
|
6
6
|
printOutput,
|
|
7
7
|
toCsvRows
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NSRQ62C4.js";
|
|
10
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
10
11
|
import "./chunk-TFCNKBRC.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ORAY4KMA.js";
|
|
13
|
+
import "./chunk-K4RAUZSD.js";
|
|
13
14
|
|
|
14
15
|
// src/commands/presets/list.ts
|
|
15
16
|
async function runPresetsList({ outputFormat }) {
|
|
@@ -8,9 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-VFT3TD3E.js";
|
|
9
9
|
import {
|
|
10
10
|
createApiClient
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NSRQ62C4.js";
|
|
12
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
13
|
+
import "./chunk-ORAY4KMA.js";
|
|
14
|
+
import "./chunk-K4RAUZSD.js";
|
|
14
15
|
|
|
15
16
|
// src/commands/asset/list.ts
|
|
16
17
|
function toRow(asset) {
|
|
@@ -12,9 +12,10 @@ import {
|
|
|
12
12
|
LIVENESS_FILTER_VALUES,
|
|
13
13
|
WATCHLIST_FILTER_VALUES,
|
|
14
14
|
createApiClient
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-NSRQ62C4.js";
|
|
16
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
17
|
+
import "./chunk-ORAY4KMA.js";
|
|
18
|
+
import "./chunk-K4RAUZSD.js";
|
|
18
19
|
|
|
19
20
|
// src/commands/detections/list.ts
|
|
20
21
|
var CONFIDENCE_SET = new Set(DETECTION_CONFIDENCE_LEVELS);
|
|
@@ -11,9 +11,10 @@ import {
|
|
|
11
11
|
TAKEDOWN_SORT_KEYS,
|
|
12
12
|
TAKEDOWN_STATUSES,
|
|
13
13
|
createApiClient
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-NSRQ62C4.js";
|
|
15
|
+
import "./chunk-4QZ7KD2Y.js";
|
|
16
|
+
import "./chunk-ORAY4KMA.js";
|
|
17
|
+
import "./chunk-K4RAUZSD.js";
|
|
17
18
|
|
|
18
19
|
// src/commands/takedowns/list.ts
|
|
19
20
|
var TAKEDOWN_STATUS_SET = new Set(TAKEDOWN_STATUSES);
|