@chainpatrol/cli 1.9.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 +34 -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 +85 -53
- 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-MHOHKFXT.js → list-4THJBDSU.js} +8 -4
- 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 +4 -2
- 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";
|
|
@@ -298,7 +300,7 @@ var HELP = {
|
|
|
298
300
|
"--org <slug> Single org. Mutually exclusive with --slugs and --all-my-orgs.",
|
|
299
301
|
"--slugs <list> Comma list of org slugs (cap 500). Response is the rollup across these orgs.",
|
|
300
302
|
"--all-my-orgs Shortcut for 'every org I can see'. Server resolves via the same logic as `orgs list` (org-scoped API keys are rejected). Cap 500 \u2014 narrow with --subscription-status / --service-active if you have more.",
|
|
301
|
-
"--subscription-status <list> With --all-my-orgs:
|
|
303
|
+
"--subscription-status <list> With --all-my-orgs: ACTIVE / POC / PROSPECT / INTEGRATION / INACTIVE (default: same live set as `orgs list`).",
|
|
302
304
|
"--service-active <list> With --all-my-orgs: only orgs with the listed service(s) active. Allowed: reporting, reviewing, protection, takedowns, detection, darkWebMonitoring.",
|
|
303
305
|
"--brand-slug <slug> Filter by brand slug (requires brands-metrics flag; single-org only).",
|
|
304
306
|
"--from <iso> Start date (ISO 8601, e.g. 2026-01-01)",
|
|
@@ -610,7 +612,7 @@ var HELP = {
|
|
|
610
612
|
usage: "chainpatrol orgs list [filters]",
|
|
611
613
|
options: [
|
|
612
614
|
"--query <text> Partial name match (substring, case-insensitive)",
|
|
613
|
-
"--subscription-status <l> Comma-separated list (PROSPECT,POC,ACTIVE,INTEGRATION)",
|
|
615
|
+
"--subscription-status <l> Comma-separated list (PROSPECT,POC,ACTIVE,INTEGRATION,INACTIVE). Defaults to the live statuses \u2014 pass INACTIVE to list churned orgs.",
|
|
614
616
|
"--service-active <l> Comma-separated services that must be active",
|
|
615
617
|
"--service-inactive <l> Comma-separated services that must be inactive",
|
|
616
618
|
"--service-automated <l> Services whose automation must be ON (only `takedowns` is accepted \u2014 the other services have no meaningful automation toggle)",
|
|
@@ -623,7 +625,8 @@ var HELP = {
|
|
|
623
625
|
"chainpatrol orgs list --subscription-status ACTIVE",
|
|
624
626
|
"chainpatrol orgs list --service-active takedowns --service-manual takedowns",
|
|
625
627
|
"chainpatrol --json orgs list --subscription-status ACTIVE,POC --service-active detection",
|
|
626
|
-
"chainpatrol --json orgs list --pending-approval-service protection,takedowns"
|
|
628
|
+
"chainpatrol --json orgs list --pending-approval-service protection,takedowns",
|
|
629
|
+
"chainpatrol orgs list --subscription-status INACTIVE --service-active detection # churned orgs still running detection"
|
|
627
630
|
]
|
|
628
631
|
},
|
|
629
632
|
"orgs get": {
|
|
@@ -700,6 +703,21 @@ var HELP = {
|
|
|
700
703
|
usage: "chainpatrol completions <zsh|bash>",
|
|
701
704
|
examples: ["chainpatrol completions zsh > _chainpatrol"]
|
|
702
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
|
+
},
|
|
703
721
|
whoami: {
|
|
704
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.",
|
|
705
723
|
usage: "chainpatrol whoami",
|
|
@@ -733,6 +751,7 @@ function getTopLevelHelp() {
|
|
|
733
751
|
" login Authenticate with ChainPatrol",
|
|
734
752
|
" logout Clear stored credentials",
|
|
735
753
|
" whoami Show the current authenticated identity",
|
|
754
|
+
" mcp Serve the public API to AI agents over MCP (stdio)",
|
|
736
755
|
" asset Check, search, or list assets, or list supported asset types",
|
|
737
756
|
" configs Manage detection configs",
|
|
738
757
|
" detections Validate, run, list, update detection configs and results",
|
|
@@ -891,7 +910,11 @@ function shouldRunVersionChecks(opts) {
|
|
|
891
910
|
"i",
|
|
892
911
|
"uninstall",
|
|
893
912
|
"completions",
|
|
894
|
-
"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"
|
|
895
918
|
]);
|
|
896
919
|
return !skipCommands.has(opts.command);
|
|
897
920
|
}
|
|
@@ -923,6 +946,7 @@ var COMMANDS = [
|
|
|
923
946
|
"setup",
|
|
924
947
|
"uninstall",
|
|
925
948
|
"completions",
|
|
949
|
+
"mcp",
|
|
926
950
|
"whoami",
|
|
927
951
|
"help"
|
|
928
952
|
];
|
|
@@ -1059,7 +1083,8 @@ ${getTopLevelHelp()}
|
|
|
1059
1083
|
noInput: { type: "boolean", default: false },
|
|
1060
1084
|
noColor: { type: "boolean", default: false },
|
|
1061
1085
|
cloud: { type: "boolean", default: false },
|
|
1062
|
-
id: { type: "string", isMultiple: true }
|
|
1086
|
+
id: { type: "string", isMultiple: true },
|
|
1087
|
+
tools: { type: "string" }
|
|
1063
1088
|
}
|
|
1064
1089
|
});
|
|
1065
1090
|
var [command, subcommand, action] = cli.input;
|
|
@@ -1076,11 +1101,11 @@ function jsonError(message, code = ExitCode.UNKNOWN) {
|
|
|
1076
1101
|
process.exit(code);
|
|
1077
1102
|
}
|
|
1078
1103
|
async function tryResolveOrg() {
|
|
1079
|
-
const { getConfig, saveConfig } = await import("./config-
|
|
1104
|
+
const { getConfig, getStoredConfig, saveConfig } = await import("./config-IKTL6KVW.js");
|
|
1080
1105
|
const config = getConfig();
|
|
1081
1106
|
if (cli.flags.org) {
|
|
1082
1107
|
if (config.defaultOrg !== cli.flags.org) {
|
|
1083
|
-
saveConfig({ ...
|
|
1108
|
+
saveConfig({ ...getStoredConfig(), defaultOrg: cli.flags.org });
|
|
1084
1109
|
}
|
|
1085
1110
|
return cli.flags.org;
|
|
1086
1111
|
}
|
|
@@ -1185,12 +1210,12 @@ function parseAttachmentUrls() {
|
|
|
1185
1210
|
}
|
|
1186
1211
|
async function handleConfigsList(org) {
|
|
1187
1212
|
if (jsonMode) {
|
|
1188
|
-
const { listConfigsJson } = await import("./list-json-
|
|
1213
|
+
const { listConfigsJson } = await import("./list-json-B4X74BTZ.js");
|
|
1189
1214
|
await listConfigsJson({ org });
|
|
1190
1215
|
return;
|
|
1191
1216
|
}
|
|
1192
1217
|
const { render } = await import("ink");
|
|
1193
|
-
const { default: ConfigsList } = await import("./list-
|
|
1218
|
+
const { default: ConfigsList } = await import("./list-PV5GY2DY.js");
|
|
1194
1219
|
const { default: React } = await import("react");
|
|
1195
1220
|
render(React.createElement(ConfigsList, { org }));
|
|
1196
1221
|
}
|
|
@@ -1245,14 +1270,14 @@ async function main() {
|
|
|
1245
1270
|
);
|
|
1246
1271
|
}
|
|
1247
1272
|
if (jsonMode) {
|
|
1248
|
-
const { loginJson } = await import("./login-json-
|
|
1273
|
+
const { loginJson } = await import("./login-json-5DVIMAO2.js");
|
|
1249
1274
|
await loginJson();
|
|
1250
1275
|
} else if (!process.stdout.isTTY) {
|
|
1251
|
-
const { loginPlain } = await import("./login-plain-
|
|
1276
|
+
const { loginPlain } = await import("./login-plain-PUWGRRYT.js");
|
|
1252
1277
|
await loginPlain();
|
|
1253
1278
|
} else {
|
|
1254
1279
|
const { render } = await import("ink");
|
|
1255
|
-
const { default: Login } = await import("./login-
|
|
1280
|
+
const { default: Login } = await import("./login-H2G6RBLL.js");
|
|
1256
1281
|
const { default: React } = await import("react");
|
|
1257
1282
|
render(React.createElement(Login));
|
|
1258
1283
|
}
|
|
@@ -1260,11 +1285,11 @@ async function main() {
|
|
|
1260
1285
|
}
|
|
1261
1286
|
case "logout": {
|
|
1262
1287
|
if (jsonMode) {
|
|
1263
|
-
const { logoutJson } = await import("./logout-json-
|
|
1288
|
+
const { logoutJson } = await import("./logout-json-VMGXQQS2.js");
|
|
1264
1289
|
await logoutJson();
|
|
1265
1290
|
} else {
|
|
1266
1291
|
const { render } = await import("ink");
|
|
1267
|
-
const { default: Logout } = await import("./logout-
|
|
1292
|
+
const { default: Logout } = await import("./logout-332KFFNS.js");
|
|
1268
1293
|
const { default: React } = await import("react");
|
|
1269
1294
|
render(React.createElement(Logout));
|
|
1270
1295
|
}
|
|
@@ -1290,7 +1315,7 @@ async function main() {
|
|
|
1290
1315
|
const positionals = cli.input.slice(2);
|
|
1291
1316
|
const flagAssets = parseAssetInputs();
|
|
1292
1317
|
const contents = [...positionals, ...flagAssets];
|
|
1293
|
-
const { runAssetCheck } = await import("./check-
|
|
1318
|
+
const { runAssetCheck } = await import("./check-2IFMTAIU.js");
|
|
1294
1319
|
await runAssetCheck({
|
|
1295
1320
|
contents,
|
|
1296
1321
|
json: jsonMode,
|
|
@@ -1300,7 +1325,7 @@ async function main() {
|
|
|
1300
1325
|
break;
|
|
1301
1326
|
}
|
|
1302
1327
|
if (subcommand === "list") {
|
|
1303
|
-
const { runAssetList } = await import("./list-
|
|
1328
|
+
const { runAssetList } = await import("./list-GTN2HNGZ.js");
|
|
1304
1329
|
await runAssetList({
|
|
1305
1330
|
type: cli.flags.type ?? cli.flags.assetType,
|
|
1306
1331
|
status: cli.flags.assetStatus ?? cli.flags.status,
|
|
@@ -1325,7 +1350,7 @@ async function main() {
|
|
|
1325
1350
|
}
|
|
1326
1351
|
return n;
|
|
1327
1352
|
});
|
|
1328
|
-
const { runAssetSearch } = await import("./search-
|
|
1353
|
+
const { runAssetSearch } = await import("./search-DRTTZJJP.js");
|
|
1329
1354
|
await runAssetSearch({
|
|
1330
1355
|
contents: contents.length > 0 ? contents : void 0,
|
|
1331
1356
|
ids: ids.length > 0 ? ids : void 0,
|
|
@@ -1350,7 +1375,7 @@ async function main() {
|
|
|
1350
1375
|
case "detections": {
|
|
1351
1376
|
const org = await resolveOrg();
|
|
1352
1377
|
if (subcommand === "healthcheck") {
|
|
1353
|
-
const { runDetectionsHealthcheck } = await import("./healthcheck-
|
|
1378
|
+
const { runDetectionsHealthcheck } = await import("./healthcheck-SYZQ2ILK.js");
|
|
1354
1379
|
await runDetectionsHealthcheck({
|
|
1355
1380
|
org,
|
|
1356
1381
|
source: cli.flags.source,
|
|
@@ -1365,7 +1390,7 @@ async function main() {
|
|
|
1365
1390
|
break;
|
|
1366
1391
|
}
|
|
1367
1392
|
if (subcommand === "validate") {
|
|
1368
|
-
const { runDetectionsValidate } = await import("./validate-
|
|
1393
|
+
const { runDetectionsValidate } = await import("./validate-FOZCI7HX.js");
|
|
1369
1394
|
await runDetectionsValidate({
|
|
1370
1395
|
org,
|
|
1371
1396
|
source: cli.flags.source,
|
|
@@ -1380,7 +1405,7 @@ async function main() {
|
|
|
1380
1405
|
break;
|
|
1381
1406
|
}
|
|
1382
1407
|
if (subcommand === "drift") {
|
|
1383
|
-
const { runDetectionsDrift } = await import("./drift-
|
|
1408
|
+
const { runDetectionsDrift } = await import("./drift-DPYW7LYN.js");
|
|
1384
1409
|
await runDetectionsDrift({
|
|
1385
1410
|
org,
|
|
1386
1411
|
source: cli.flags.source,
|
|
@@ -1394,7 +1419,7 @@ async function main() {
|
|
|
1394
1419
|
break;
|
|
1395
1420
|
}
|
|
1396
1421
|
if (subcommand === "run") {
|
|
1397
|
-
const { runDetectionsRun } = await import("./run-
|
|
1422
|
+
const { runDetectionsRun } = await import("./run-FDZWPY4W.js");
|
|
1398
1423
|
await runDetectionsRun({
|
|
1399
1424
|
org,
|
|
1400
1425
|
configId: cli.flags.configId,
|
|
@@ -1408,7 +1433,7 @@ async function main() {
|
|
|
1408
1433
|
break;
|
|
1409
1434
|
}
|
|
1410
1435
|
if (subcommand === "list") {
|
|
1411
|
-
const { runDetectionsList } = await import("./list-
|
|
1436
|
+
const { runDetectionsList } = await import("./list-H4RCDI6Q.js");
|
|
1412
1437
|
await runDetectionsList({
|
|
1413
1438
|
org,
|
|
1414
1439
|
cursor: cli.flags.cursor,
|
|
@@ -1437,7 +1462,7 @@ async function main() {
|
|
|
1437
1462
|
break;
|
|
1438
1463
|
}
|
|
1439
1464
|
if (action === "run") {
|
|
1440
|
-
const { runDetectionsRun } = await import("./run-
|
|
1465
|
+
const { runDetectionsRun } = await import("./run-FDZWPY4W.js");
|
|
1441
1466
|
await runDetectionsRun({
|
|
1442
1467
|
org,
|
|
1443
1468
|
configId: cli.flags.configId,
|
|
@@ -1455,7 +1480,7 @@ async function main() {
|
|
|
1455
1480
|
throw new Error("detections configs update requires --config-id");
|
|
1456
1481
|
}
|
|
1457
1482
|
const configPatch = getConfigPatchFromSetFlags();
|
|
1458
|
-
const { runDetectionsConfigsUpdate } = await import("./configs-update-
|
|
1483
|
+
const { runDetectionsConfigsUpdate } = await import("./configs-update-XUN4X4T2.js");
|
|
1459
1484
|
await runDetectionsConfigsUpdate({
|
|
1460
1485
|
org,
|
|
1461
1486
|
configId: cli.flags.configId,
|
|
@@ -1491,7 +1516,7 @@ async function main() {
|
|
|
1491
1516
|
const slugs = parseCsvList(cli.flags.slugs);
|
|
1492
1517
|
const allMyOrgs = cli.flags.allMyOrgs;
|
|
1493
1518
|
const org2 = slugs && slugs.length > 0 || allMyOrgs ? void 0 : await tryResolveOrg();
|
|
1494
|
-
const { runMetricsOrganization } = await import("./organization-
|
|
1519
|
+
const { runMetricsOrganization } = await import("./organization-KANXTARX.js");
|
|
1495
1520
|
await runMetricsOrganization({
|
|
1496
1521
|
org: org2,
|
|
1497
1522
|
slugs,
|
|
@@ -1510,7 +1535,7 @@ async function main() {
|
|
|
1510
1535
|
}
|
|
1511
1536
|
const org = await resolveOrg();
|
|
1512
1537
|
if (subcommand === "summary") {
|
|
1513
|
-
const { runMetricsSummary } = await import("./summary-
|
|
1538
|
+
const { runMetricsSummary } = await import("./summary-A24TNQNR.js");
|
|
1514
1539
|
await runMetricsSummary({
|
|
1515
1540
|
org,
|
|
1516
1541
|
from: cli.flags.from,
|
|
@@ -1523,7 +1548,7 @@ async function main() {
|
|
|
1523
1548
|
break;
|
|
1524
1549
|
}
|
|
1525
1550
|
if (subcommand === "found") {
|
|
1526
|
-
const { runMetricsFound } = await import("./found-
|
|
1551
|
+
const { runMetricsFound } = await import("./found-YLTMVPBZ.js");
|
|
1527
1552
|
await runMetricsFound({
|
|
1528
1553
|
org,
|
|
1529
1554
|
from: cli.flags.from,
|
|
@@ -1536,7 +1561,7 @@ async function main() {
|
|
|
1536
1561
|
break;
|
|
1537
1562
|
}
|
|
1538
1563
|
if (subcommand === "takedown-time" || subcommand === "takedownTime") {
|
|
1539
|
-
const { runMetricsTakedownTime } = await import("./takedown-time-
|
|
1564
|
+
const { runMetricsTakedownTime } = await import("./takedown-time-HB3J2FTZ.js");
|
|
1540
1565
|
await runMetricsTakedownTime({
|
|
1541
1566
|
org,
|
|
1542
1567
|
from: cli.flags.from,
|
|
@@ -1549,7 +1574,7 @@ async function main() {
|
|
|
1549
1574
|
break;
|
|
1550
1575
|
}
|
|
1551
1576
|
if (subcommand === "takedown-time-trend" || subcommand === "takedownTimeTrend") {
|
|
1552
|
-
const { runMetricsTakedownTimeTrend } = await import("./takedown-time-trend-
|
|
1577
|
+
const { runMetricsTakedownTimeTrend } = await import("./takedown-time-trend-KYPA3W3U.js");
|
|
1553
1578
|
await runMetricsTakedownTimeTrend({
|
|
1554
1579
|
org,
|
|
1555
1580
|
months: cli.flags.months,
|
|
@@ -1565,7 +1590,7 @@ async function main() {
|
|
|
1565
1590
|
if (!by || !["day", "type", "brand"].includes(by)) {
|
|
1566
1591
|
throw new Error("metrics breakdown requires --by <day|type|brand>");
|
|
1567
1592
|
}
|
|
1568
|
-
const { runMetricsBreakdown } = await import("./breakdown-
|
|
1593
|
+
const { runMetricsBreakdown } = await import("./breakdown-BLCYJP7O.js");
|
|
1569
1594
|
await runMetricsBreakdown({
|
|
1570
1595
|
org,
|
|
1571
1596
|
by,
|
|
@@ -1593,7 +1618,7 @@ async function main() {
|
|
|
1593
1618
|
case "reports": {
|
|
1594
1619
|
if (subcommand === "list") {
|
|
1595
1620
|
const org = await resolveOrg();
|
|
1596
|
-
const { runReportsList } = await import("./list-
|
|
1621
|
+
const { runReportsList } = await import("./list-2H2CV3JJ.js");
|
|
1597
1622
|
await runReportsList({
|
|
1598
1623
|
org,
|
|
1599
1624
|
limit: cli.flags.limit,
|
|
@@ -1624,7 +1649,7 @@ async function main() {
|
|
|
1624
1649
|
}
|
|
1625
1650
|
if (subcommand === "create") {
|
|
1626
1651
|
const org = await tryResolveOrg();
|
|
1627
|
-
const { runReportsCreate } = await import("./create-
|
|
1652
|
+
const { runReportsCreate } = await import("./create-ILSWAUVI.js");
|
|
1628
1653
|
await runReportsCreate({
|
|
1629
1654
|
org,
|
|
1630
1655
|
title: cli.flags.title,
|
|
@@ -1646,7 +1671,7 @@ async function main() {
|
|
|
1646
1671
|
const positionals = cli.input.slice(2);
|
|
1647
1672
|
const flagAssets = parseAssetInputs();
|
|
1648
1673
|
const assetContents = [...positionals, ...flagAssets];
|
|
1649
|
-
const { runReportsSearch } = await import("./search-
|
|
1674
|
+
const { runReportsSearch } = await import("./search-A75YUJFI.js");
|
|
1650
1675
|
await runReportsSearch({
|
|
1651
1676
|
assetContents,
|
|
1652
1677
|
org,
|
|
@@ -1666,7 +1691,7 @@ async function main() {
|
|
|
1666
1691
|
if (subcommand === "review") {
|
|
1667
1692
|
const org = await tryResolveOrg();
|
|
1668
1693
|
const positionalProposalId = cli.input[2];
|
|
1669
|
-
const { runProposalsReview } = await import("./review-
|
|
1694
|
+
const { runProposalsReview } = await import("./review-5J3EQRCB.js");
|
|
1670
1695
|
await runProposalsReview({
|
|
1671
1696
|
org,
|
|
1672
1697
|
proposalId: cli.flags.proposalId ?? (positionalProposalId ? Number(positionalProposalId) : void 0),
|
|
@@ -1693,7 +1718,7 @@ async function main() {
|
|
|
1693
1718
|
}
|
|
1694
1719
|
case "threats": {
|
|
1695
1720
|
if (subcommand === "list") {
|
|
1696
|
-
const { runThreatsList } = await import("./list-
|
|
1721
|
+
const { runThreatsList } = await import("./list-RUIQIVEA.js");
|
|
1697
1722
|
await runThreatsList({
|
|
1698
1723
|
query: cli.flags.query,
|
|
1699
1724
|
from: cli.flags.from,
|
|
@@ -1716,7 +1741,7 @@ async function main() {
|
|
|
1716
1741
|
case "takedowns": {
|
|
1717
1742
|
if (subcommand === "list") {
|
|
1718
1743
|
const org = await tryResolveOrg();
|
|
1719
|
-
const { runTakedownsList } = await import("./list-
|
|
1744
|
+
const { runTakedownsList } = await import("./list-LWB5JQAY.js");
|
|
1720
1745
|
await runTakedownsList({
|
|
1721
1746
|
org,
|
|
1722
1747
|
query: cli.flags.query,
|
|
@@ -1747,7 +1772,7 @@ async function main() {
|
|
|
1747
1772
|
}
|
|
1748
1773
|
case "queues": {
|
|
1749
1774
|
if (subcommand === "snapshot") {
|
|
1750
|
-
const { runQueuesSnapshot } = await import("./snapshot-
|
|
1775
|
+
const { runQueuesSnapshot } = await import("./snapshot-2IT4KG4F.js");
|
|
1751
1776
|
await runQueuesSnapshot({
|
|
1752
1777
|
org: cli.flags.org,
|
|
1753
1778
|
all: cli.flags.all,
|
|
@@ -1765,7 +1790,7 @@ async function main() {
|
|
|
1765
1790
|
}
|
|
1766
1791
|
case "orgs": {
|
|
1767
1792
|
if (subcommand === "list") {
|
|
1768
|
-
const { runOrgsList } = await import("./list-
|
|
1793
|
+
const { runOrgsList } = await import("./list-4THJBDSU.js");
|
|
1769
1794
|
await runOrgsList({
|
|
1770
1795
|
query: cli.flags.query,
|
|
1771
1796
|
subscriptionStatus: cli.flags.subscriptionStatus,
|
|
@@ -1787,7 +1812,7 @@ async function main() {
|
|
|
1787
1812
|
if (subcommand === "get") {
|
|
1788
1813
|
const positionalSlug = action;
|
|
1789
1814
|
const slug = positionalSlug ?? await tryResolveOrg();
|
|
1790
|
-
const { runOrgsGet } = await import("./get-
|
|
1815
|
+
const { runOrgsGet } = await import("./get-NDEY54AO.js");
|
|
1791
1816
|
await runOrgsGet({
|
|
1792
1817
|
slug,
|
|
1793
1818
|
json: jsonMode,
|
|
@@ -1797,7 +1822,7 @@ async function main() {
|
|
|
1797
1822
|
}
|
|
1798
1823
|
if (subcommand === "assets") {
|
|
1799
1824
|
if (action === "list") {
|
|
1800
|
-
const { runOrgsAssetsList } = await import("./list-
|
|
1825
|
+
const { runOrgsAssetsList } = await import("./list-VHDU3XMN.js");
|
|
1801
1826
|
await runOrgsAssetsList({
|
|
1802
1827
|
// Optional: organization-scoped API keys resolve the org from the
|
|
1803
1828
|
// key, so only pass a slug when one is actually available.
|
|
@@ -1816,7 +1841,7 @@ async function main() {
|
|
|
1816
1841
|
}
|
|
1817
1842
|
if (subcommand === "asset-groups") {
|
|
1818
1843
|
if (action === "list") {
|
|
1819
|
-
const { runOrgsAssetGroupsList } = await import("./list-
|
|
1844
|
+
const { runOrgsAssetGroupsList } = await import("./list-WYC4ZP7X.js");
|
|
1820
1845
|
await runOrgsAssetGroupsList({
|
|
1821
1846
|
json: jsonMode,
|
|
1822
1847
|
outputFormat: cliContext.outputFormat
|
|
@@ -1838,7 +1863,7 @@ async function main() {
|
|
|
1838
1863
|
"brands list --type must be ORGANIZATION, INDIVIDUAL, or PRODUCT (case-insensitive)."
|
|
1839
1864
|
);
|
|
1840
1865
|
}
|
|
1841
|
-
const { runBrandsList } = await import("./list-
|
|
1866
|
+
const { runBrandsList } = await import("./list-YFBZVQWK.js");
|
|
1842
1867
|
await runBrandsList({
|
|
1843
1868
|
type: rawType,
|
|
1844
1869
|
json: jsonMode,
|
|
@@ -1851,8 +1876,15 @@ async function main() {
|
|
|
1851
1876
|
subcommand ? `Unknown subcommand: brands ${subcommand}${hint ? `. Did you mean "brands ${hint}"?` : ""}` : "Usage: chainpatrol brands list [--type ORGANIZATION|INDIVIDUAL|PRODUCT]"
|
|
1852
1877
|
);
|
|
1853
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
|
+
}
|
|
1854
1886
|
case "whoami": {
|
|
1855
|
-
const { runWhoami } = await import("./whoami-
|
|
1887
|
+
const { runWhoami } = await import("./whoami-DSXNLG3B.js");
|
|
1856
1888
|
await runWhoami({
|
|
1857
1889
|
json: jsonMode,
|
|
1858
1890
|
outputFormat: cliContext.outputFormat
|
|
@@ -1861,7 +1893,7 @@ async function main() {
|
|
|
1861
1893
|
}
|
|
1862
1894
|
case "healthchecks": {
|
|
1863
1895
|
if (subcommand === "list") {
|
|
1864
|
-
const { runHealthchecksList } = await import("./list-
|
|
1896
|
+
const { runHealthchecksList } = await import("./list-Q5K4RMM4.js");
|
|
1865
1897
|
await runHealthchecksList({
|
|
1866
1898
|
json: jsonMode,
|
|
1867
1899
|
outputFormat: cliContext.outputFormat
|
|
@@ -1875,7 +1907,7 @@ async function main() {
|
|
|
1875
1907
|
thresholds.minResults = cli.flags.minResults;
|
|
1876
1908
|
if (cli.flags.lookbackHours !== void 0)
|
|
1877
1909
|
thresholds.lookbackHours = cli.flags.lookbackHours;
|
|
1878
|
-
const { runHealthchecksRun } = await import("./run-
|
|
1910
|
+
const { runHealthchecksRun } = await import("./run-JBQ43OW6.js");
|
|
1879
1911
|
await runHealthchecksRun({
|
|
1880
1912
|
org,
|
|
1881
1913
|
id: action,
|
|
@@ -1893,7 +1925,7 @@ async function main() {
|
|
|
1893
1925
|
}
|
|
1894
1926
|
case "presets": {
|
|
1895
1927
|
if (subcommand === "list") {
|
|
1896
|
-
const { runPresetsList } = await import("./list-
|
|
1928
|
+
const { runPresetsList } = await import("./list-FUQK3TIN.js");
|
|
1897
1929
|
await runPresetsList({ outputFormat: cliContext.outputFormat });
|
|
1898
1930
|
break;
|
|
1899
1931
|
}
|
|
@@ -1904,7 +1936,7 @@ async function main() {
|
|
|
1904
1936
|
);
|
|
1905
1937
|
}
|
|
1906
1938
|
const org = await resolveOrg();
|
|
1907
|
-
const { runPresetsRun } = await import("./run-
|
|
1939
|
+
const { runPresetsRun } = await import("./run-XWM67MBV.js");
|
|
1908
1940
|
await runPresetsRun({
|
|
1909
1941
|
presetId: action,
|
|
1910
1942
|
org,
|
|
@@ -1921,12 +1953,12 @@ async function main() {
|
|
|
1921
1953
|
case "setup":
|
|
1922
1954
|
case "install":
|
|
1923
1955
|
case "i": {
|
|
1924
|
-
const { setupSkill } = await import("./setup-skill-
|
|
1956
|
+
const { setupSkill } = await import("./setup-skill-TVJJD6NC.js");
|
|
1925
1957
|
setupSkill({ json: jsonMode, cloud: cli.flags.cloud });
|
|
1926
1958
|
break;
|
|
1927
1959
|
}
|
|
1928
1960
|
case "uninstall": {
|
|
1929
|
-
const { uninstallSkill } = await import("./setup-skill-
|
|
1961
|
+
const { uninstallSkill } = await import("./setup-skill-TVJJD6NC.js");
|
|
1930
1962
|
uninstallSkill({ json: jsonMode });
|
|
1931
1963
|
break;
|
|
1932
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,16 +8,20 @@ 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([
|
|
17
18
|
"PROSPECT",
|
|
18
19
|
"POC",
|
|
19
20
|
"ACTIVE",
|
|
20
|
-
"INTEGRATION"
|
|
21
|
+
"INTEGRATION",
|
|
22
|
+
// Churned orgs are excluded by default server-side; asking for INACTIVE
|
|
23
|
+
// explicitly is the only way to list them.
|
|
24
|
+
"INACTIVE"
|
|
21
25
|
]);
|
|
22
26
|
var DUAL_SERVICES = ["takedowns"];
|
|
23
27
|
var SINGLE_SERVICES = [
|
|
@@ -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) {
|