@chainpatrol/cli 1.19.3 → 1.20.2
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
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @chainpatrol/cli
|
|
2
2
|
|
|
3
|
+
## 1.20.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [38382ed]
|
|
8
|
+
- @chainpatrol/sdk@1.22.0
|
|
9
|
+
- @chainpatrol/mcp@1.19.0
|
|
10
|
+
|
|
11
|
+
## 1.20.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [69247e0]
|
|
16
|
+
- @chainpatrol/mcp@1.18.4
|
|
17
|
+
|
|
18
|
+
## 1.20.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- 9c9f7ad: `legalDocuments` on `/user/orgs` and `/user/orgs/{slug}` gains a `brands` list with the LOA and POA of each brand that uses its own documents, and `chainpatrol orgs list` / `orgs get` show it.
|
|
23
|
+
- 1574d24: Add the `PROTECTION` organization subscription status: a community ChainPatrol protects without a paid contract. Its threats are detected, reviewed and blocklisted, but it is not counted as an active customer.
|
|
24
|
+
|
|
25
|
+
- `/user/orgs` and `/user/orgs/{slug}` can return `"subscriptionStatus": "PROTECTION"`, and `PROTECTION` is part of the default live set `/user/orgs` returns when no `subscriptionStatus` filter is passed.
|
|
26
|
+
- The `UserOrgsSubscriptionStatus` SDK type and `UserOrg.subscriptionStatus` now include `"PROTECTION"`.
|
|
27
|
+
- `chainpatrol orgs list --subscription-status PROTECTION` is accepted.
|
|
28
|
+
- The MCP `user_orgs` and `organization_metrics_get` tools accept `PROTECTION` in their `subscriptionStatus` filter, and `staff_organization_create` can create a `PROTECTION` organization.
|
|
29
|
+
|
|
30
|
+
Backed by @chainpatrol/database, @chainpatrol/validation and @chainpatrol/external-trpc, which are private.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [cd6da0c]
|
|
35
|
+
- Updated dependencies [9c9f7ad]
|
|
36
|
+
- Updated dependencies [1574d24]
|
|
37
|
+
- Updated dependencies [a4f7b48]
|
|
38
|
+
- @chainpatrol/mcp@1.18.3
|
|
39
|
+
- @chainpatrol/sdk@1.21.0
|
|
40
|
+
|
|
3
41
|
## 1.19.3
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
package/dist/cli.js
CHANGED
|
@@ -310,7 +310,7 @@ var HELP = {
|
|
|
310
310
|
"--org <slug> Single org. Mutually exclusive with --slugs and --all-my-orgs.",
|
|
311
311
|
"--slugs <list> Comma list of org slugs (cap 500). Response is the rollup across these orgs.",
|
|
312
312
|
"--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.",
|
|
313
|
-
"--subscription-status <list> With --all-my-orgs: ACTIVE / POC / PROSPECT / INTEGRATION / INACTIVE (default: same live set as `orgs list`).",
|
|
313
|
+
"--subscription-status <list> With --all-my-orgs: ACTIVE / POC / PROSPECT / INTEGRATION / PROTECTION / INACTIVE (default: same live set as `orgs list`).",
|
|
314
314
|
"--service-active <list> With --all-my-orgs: only orgs with the listed service(s) active. Allowed: reporting, reviewing, protection, takedowns, detection, darkWebMonitoring.",
|
|
315
315
|
"--brand-slug <slug> Filter by brand slug (requires brands-metrics flag; single-org only).",
|
|
316
316
|
"--from <iso> Start date (ISO 8601, e.g. 2026-01-01)",
|
|
@@ -684,7 +684,7 @@ var HELP = {
|
|
|
684
684
|
usage: "chainpatrol orgs list [filters]",
|
|
685
685
|
options: [
|
|
686
686
|
"--query <text> Partial name match (substring, case-insensitive)",
|
|
687
|
-
"--subscription-status <l> Comma-separated list (PROSPECT,POC,ACTIVE,INTEGRATION,INACTIVE). Defaults to the live statuses \u2014 pass INACTIVE to list churned orgs.",
|
|
687
|
+
"--subscription-status <l> Comma-separated list (PROSPECT,POC,ACTIVE,INTEGRATION,PROTECTION,INACTIVE). Defaults to the live statuses \u2014 pass INACTIVE to list churned orgs.",
|
|
688
688
|
"--service-active <l> Comma-separated services that must be active",
|
|
689
689
|
"--service-inactive <l> Comma-separated services that must be inactive",
|
|
690
690
|
"--service-automated <l> Services whose automation must be ON (only `takedowns` is accepted \u2014 the other services have no meaningful automation toggle)",
|
|
@@ -1897,7 +1897,7 @@ async function main() {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
case "orgs": {
|
|
1899
1899
|
if (subcommand === "list") {
|
|
1900
|
-
const { runOrgsList } = await import("./list-
|
|
1900
|
+
const { runOrgsList } = await import("./list-VFAVJOAE.js");
|
|
1901
1901
|
await runOrgsList({
|
|
1902
1902
|
query: cli.flags.query,
|
|
1903
1903
|
subscriptionStatus: cli.flags.subscriptionStatus,
|
|
@@ -1919,7 +1919,7 @@ async function main() {
|
|
|
1919
1919
|
if (subcommand === "get") {
|
|
1920
1920
|
const positionalSlug = action;
|
|
1921
1921
|
const slug = positionalSlug ?? await tryResolveOrg();
|
|
1922
|
-
const { runOrgsGet } = await import("./get-
|
|
1922
|
+
const { runOrgsGet } = await import("./get-VLAWDFG4.js");
|
|
1923
1923
|
await runOrgsGet({
|
|
1924
1924
|
slug,
|
|
1925
1925
|
json: jsonMode,
|
|
@@ -55,7 +55,10 @@ function summarizeIntegrations(org) {
|
|
|
55
55
|
function summarizeLegalDocuments(org) {
|
|
56
56
|
const loa = org.legalDocuments.letterOfAuthorization.present ? "yes" : "no";
|
|
57
57
|
const poa = org.legalDocuments.powerOfAttorney.present ? "yes" : "no";
|
|
58
|
-
|
|
58
|
+
const brands = org.legalDocuments.brands.map(
|
|
59
|
+
(brand) => `${brand.brandSlug}(LOA=${brand.letterOfAuthorization.present ? "yes" : "no"} POA=${brand.powerOfAttorney.present ? "yes" : "no"})`
|
|
60
|
+
);
|
|
61
|
+
return brands.length > 0 ? `LOA=${loa} POA=${poa} brands=${brands.join(",")}` : `LOA=${loa} POA=${poa}`;
|
|
59
62
|
}
|
|
60
63
|
function summarizeVisibility(org) {
|
|
61
64
|
return `portal=${org.portalVisibility} reports=${org.reportVisibility} metrics=${org.metricsVisibility}`;
|
|
@@ -120,6 +123,10 @@ async function runOrgsGet(options) {
|
|
|
120
123
|
`- Legal documents: ${summarizeLegalDocuments(organization)}`,
|
|
121
124
|
organization.legalDocuments.letterOfAuthorization.fileUrl ? ` - LOA: ${organization.legalDocuments.letterOfAuthorization.fileUrl}` : "",
|
|
122
125
|
organization.legalDocuments.powerOfAttorney.fileUrl ? ` - POA: ${organization.legalDocuments.powerOfAttorney.fileUrl}` : "",
|
|
126
|
+
...organization.legalDocuments.brands.flatMap((brand) => [
|
|
127
|
+
brand.letterOfAuthorization.fileUrl ? ` - ${brand.brandSlug} LOA: ${brand.letterOfAuthorization.fileUrl}` : "",
|
|
128
|
+
brand.powerOfAttorney.fileUrl ? ` - ${brand.brandSlug} POA: ${brand.powerOfAttorney.fileUrl}` : ""
|
|
129
|
+
]),
|
|
123
130
|
`- Trademarks: ${summarizeTrademarks(organization)}`,
|
|
124
131
|
...organization.trademarkRegistrations.map(
|
|
125
132
|
(tm) => ` - #${tm.id} ${tm.brandName} [${tm.status}] \u2014 ${tm.trademarkOffice} #${tm.registrationNumber}` + (tm.registrationPageUrl ? ` \u2014 page: ${tm.registrationPageUrl}` : "") + (tm.certificateFileUrl ? ` \u2014 certificate: ${tm.certificateFileUrl}` : "")
|
|
@@ -169,6 +176,9 @@ async function runOrgsGet(options) {
|
|
|
169
176
|
letterOfAuthorizationFileUrl: organization.legalDocuments.letterOfAuthorization.fileUrl ?? "",
|
|
170
177
|
powerOfAttorneyPresent: organization.legalDocuments.powerOfAttorney.present,
|
|
171
178
|
powerOfAttorneyFileUrl: organization.legalDocuments.powerOfAttorney.fileUrl ?? "",
|
|
179
|
+
brandLegalDocuments: organization.legalDocuments.brands.map(
|
|
180
|
+
(brand) => `${brand.brandSlug}:LOA=${brand.letterOfAuthorization.present ? "yes" : "no"}:POA=${brand.powerOfAttorney.present ? "yes" : "no"}`
|
|
181
|
+
).join("|"),
|
|
172
182
|
trademarkRegistrationCount: organization.trademarkRegistrations.length,
|
|
173
183
|
trademarkBrandNames: organization.trademarkRegistrations.map((tm) => tm.brandName).join("|")
|
|
174
184
|
}
|
|
@@ -205,6 +215,16 @@ async function runOrgsGet(options) {
|
|
|
205
215
|
if (organization.legalDocuments.powerOfAttorney.fileUrl) {
|
|
206
216
|
console.log(` POA: ${organization.legalDocuments.powerOfAttorney.fileUrl}`);
|
|
207
217
|
}
|
|
218
|
+
for (const brand of organization.legalDocuments.brands) {
|
|
219
|
+
if (brand.letterOfAuthorization.fileUrl) {
|
|
220
|
+
console.log(
|
|
221
|
+
` ${brand.brandSlug} LOA: ${brand.letterOfAuthorization.fileUrl}`
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
if (brand.powerOfAttorney.fileUrl) {
|
|
225
|
+
console.log(` ${brand.brandSlug} POA: ${brand.powerOfAttorney.fileUrl}`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
208
228
|
console.log(` trademarks: ${summarizeTrademarks(organization)}`);
|
|
209
229
|
for (const tm of organization.trademarkRegistrations) {
|
|
210
230
|
const extras = [];
|
|
@@ -19,6 +19,7 @@ var VALID_SUBSCRIPTION_STATUSES = /* @__PURE__ */ new Set([
|
|
|
19
19
|
"POC",
|
|
20
20
|
"ACTIVE",
|
|
21
21
|
"INTEGRATION",
|
|
22
|
+
"PROTECTION",
|
|
22
23
|
// Churned orgs are excluded by default server-side; asking for INACTIVE
|
|
23
24
|
// explicitly is the only way to list them.
|
|
24
25
|
"INACTIVE"
|
|
@@ -217,7 +218,10 @@ function summarizeIntegrations(org) {
|
|
|
217
218
|
function summarizeLegalDocuments(org) {
|
|
218
219
|
const loa = org.legalDocuments.letterOfAuthorization.present ? "yes" : "no";
|
|
219
220
|
const poa = org.legalDocuments.powerOfAttorney.present ? "yes" : "no";
|
|
220
|
-
|
|
221
|
+
const brands = org.legalDocuments.brands.map(
|
|
222
|
+
(brand) => `${brand.brandSlug}(LOA=${brand.letterOfAuthorization.present ? "yes" : "no"} POA=${brand.powerOfAttorney.present ? "yes" : "no"})`
|
|
223
|
+
);
|
|
224
|
+
return brands.length > 0 ? `LOA=${loa} POA=${poa} brands=${brands.join(",")}` : `LOA=${loa} POA=${poa}`;
|
|
221
225
|
}
|
|
222
226
|
function summarizeVisibility(org) {
|
|
223
227
|
return `portal=${org.portalVisibility} reports=${org.reportVisibility} metrics=${org.metricsVisibility}`;
|
|
@@ -290,6 +294,9 @@ async function runOrgsList(options) {
|
|
|
290
294
|
letterOfAuthorizationFileUrl: org.legalDocuments.letterOfAuthorization.fileUrl ?? "",
|
|
291
295
|
powerOfAttorneyPresent: org.legalDocuments.powerOfAttorney.present,
|
|
292
296
|
powerOfAttorneyFileUrl: org.legalDocuments.powerOfAttorney.fileUrl ?? "",
|
|
297
|
+
brandLegalDocuments: org.legalDocuments.brands.map(
|
|
298
|
+
(brand) => `${brand.brandSlug}:LOA=${brand.letterOfAuthorization.present ? "yes" : "no"}:POA=${brand.powerOfAttorney.present ? "yes" : "no"}`
|
|
299
|
+
).join("|"),
|
|
293
300
|
trademarkRegistrationCount: org.trademarkRegistrations.length,
|
|
294
301
|
trademarkBrandNames: org.trademarkRegistrations.map((tm) => tm.brandName).join("|")
|
|
295
302
|
}))
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@chainpatrol/cli",
|
|
3
3
|
"description": "The official ChainPatrol CLI — terminal interface for threat detection",
|
|
4
4
|
"author": "Umar Ahmed <umar@chainpatrol.io>",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.20.2",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"homepage": "https://chainpatrol.com/docs/cli",
|
|
8
8
|
"keywords": [
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"lint": "npx oxlint ."
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@chainpatrol/mcp": "1.
|
|
37
|
-
"@chainpatrol/sdk": "1.
|
|
36
|
+
"@chainpatrol/mcp": "1.19.0",
|
|
37
|
+
"@chainpatrol/sdk": "1.22.0",
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
39
39
|
"ink": "^7.0.1",
|
|
40
40
|
"meow": "^14.1.0",
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
"tsup": "^8.5.0",
|
|
50
50
|
"tsx": "^4.19.4",
|
|
51
51
|
"typescript": "6.0.2",
|
|
52
|
-
"vitest": "^
|
|
52
|
+
"vitest": "^4.1.12"
|
|
53
53
|
}
|
|
54
54
|
}
|