@kaminari-ad/mcp 0.2.2 → 0.3.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 CHANGED
@@ -7,6 +7,101 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0] - 2026-05-20
11
+
12
+ Major-feature release — full parity with the API surface added in
13
+ COOP-13940 Phase 3 (custom taxonomies + 5-kind policy rules + binary
14
+ downloads). **Contains breaking changes for existing agents** —
15
+ review the migration notes below before upgrading.
16
+
17
+ ### Breaking
18
+
19
+ - **`update_tag_definition`**: input field `show_in_public_report`
20
+ (boolean) was removed; replaced by `visibility` (enum:
21
+ `hidden | internal | public`). Old payloads now fail zod
22
+ validation locally with a typed `invalid-input` error before
23
+ hitting the API. Migration: replace `show_in_public_report: true`
24
+ → `visibility: "public"`, and `show_in_public_report: false` →
25
+ `visibility: "internal"` (or `"hidden"` if you want the tag
26
+ fully suppressed).
27
+ - **`list_alerts`**: `status` filter no longer accepts the legacy
28
+ values `"ack"` / `"ignored"`. The canonical four are
29
+ `"open"`, `"acknowledged"`, `"resolved"`, `"dismissed"`. Mapping:
30
+ `"ack"` → `"acknowledged"`, `"ignored"` → `"dismissed"`.
31
+ - **`create_policy_set` / `update_policy_set`**: `entries[]` is now
32
+ a discriminated union over **five rule kinds**. Existing tag-only
33
+ callers MUST add `rule_type: "tag"` to every entry. Other kinds:
34
+ `"iab_v3"` (with `iab_v3: { tier1, tier2?, tier3?, tier4? }`),
35
+ `"brand"` (with `brand: string`), `"ai_category"` (with
36
+ `ai_category: { tier1, tier2?, tier3?, tier4? }`),
37
+ `"custom_taxonomy"` (with `custom_taxonomy: { taxonomy_id, tier1,
38
+ tier2?, tier3?, tier4? }`).
39
+ `country_codes` now accepts both ISO alpha-2 and alpha-3 (the
40
+ API normalises).
41
+
42
+ ### Added
43
+
44
+ - **`custom_taxonomies` tool suite (7 tools).** Per-org
45
+ classification trees with an `is_default` fallback node:
46
+ `list_custom_taxonomies`, `get_custom_taxonomy`,
47
+ `create_custom_taxonomy`, `update_custom_taxonomy`,
48
+ `delete_custom_taxonomy` (soft-delete), `restore_custom_taxonomy`,
49
+ `parse_custom_taxonomy_text` (no-persistence preview).
50
+ - **Account labels.** `list_account_labels` + `update_account_labels`
51
+ for the per-org metadata schema that backs `list_scans.labels`
52
+ filters. `update_account_labels` is hinted destructive — passing
53
+ `labels: []` wipes the catalogue.
54
+ - **`create_custom_role`** for `/api/v1/account/roles` POST.
55
+ - **Binary downloads** — `get_invoice_pdf` (MCP `resource` block),
56
+ `get_scan_screenshot`, `get_scan_creative_screenshot`,
57
+ `get_scan_landing_screenshot` (MCP `image` blocks). All four
58
+ return inline base64 with the API-supplied `mimeType` so agents
59
+ can save / forward without a second call.
60
+ - **`list_alerts` rule_type + matched_value.** Each alert row now
61
+ carries `rule_type` (one of the five kinds) and `matched_value`
62
+ (the canonical text the scan matched against). Lets agents
63
+ branch on rule kind without re-fetching the scan.
64
+ - **`list_policy_sets.visibility` filter.** Narrow to
65
+ `private` (org-owned) or `public` (Kaminari Ad-curated). Omit
66
+ the filter to see both combined.
67
+ - **`list_scans` filters.** Added `run_id`, `campaign_id`,
68
+ `group_id`, `timezone`, `ai_category`, `iab_v3_category`,
69
+ `iab_category`, `brand`, plus a typed `labels` record that
70
+ expands to `label_<key>=<value>` query params (snake_case keys
71
+ enforced by zod).
72
+ - **Misc query filters.** `list_campaigns` + `list_campaigns_picker`
73
+ gained `archived` / `q`; `list_invoices` gained `type` / `status`
74
+ enums; `list_balance_history` gained multi-select `type`;
75
+ `list_webhook_deliveries` gained `success` / `from_ts` / `to_ts`;
76
+ `list_usage` switched to ISO 8601 datetime bounds; `list_tags`
77
+ gained `category`.
78
+
79
+ ### Changed
80
+
81
+ - **OpenAPI types regenerated.** `src/shared/api/openapi.ts` and
82
+ `src/shared/api/zod-schemas.ts` are rebuilt from the prod API and
83
+ capture every Phase 3 schema (custom-taxonomies, 5-kind
84
+ PolicyEntry, AlertResponse `rule_type` / `matched_value`, tag
85
+ visibility rename).
86
+ - **Tool descriptions.** Policy-sets, alerts, and tag tools updated
87
+ to mention the new fields. `get_alert_stats` description uses the
88
+ canonical AlertStatus names.
89
+ - **Branding.** All user-visible tool descriptions and JSDoc use the
90
+ canonical `Kaminari Ad` (with space) per the updated branding
91
+ rule. The dotted form `Kaminari.Ad` is deprecated.
92
+
93
+ ### Quality gates
94
+
95
+ - 705 unit tests (was 623). Coverage 100% statements / 100% lines /
96
+ 100% functions / 97.89% branches (gate is 95% branches). Every
97
+ new tool has at least 3 cases (success / api-error /
98
+ zod-rejection); policy-set tools cover all five rule kinds with
99
+ per-kind missing-block rejection tests.
100
+ - All existing gates pass: lint, format, typecheck, tool-naming,
101
+ file-sizes (8 grandfathered, every new file <200 effective
102
+ lines), check-imports, check-shared-state,
103
+ check-no-handwritten-parsers.
104
+
10
105
  ## [0.2.2] - 2026-05-20
11
106
 
12
107
  Minor release — adds one-click install paths for Cursor and Claude
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { NAME, VERSION, err, ok } from './chunk-BAZQPU6T.js';
2
+ import { NAME, VERSION, err, ok } from './chunk-KTQBHJUB.js';
3
3
  import process from 'process';
4
4
  import { z } from 'zod';
5
5
 
@@ -119,10 +119,10 @@ async function main() {
119
119
  }
120
120
  const config = configResult.value;
121
121
  if (config.transport === "stdio") {
122
- const { bootstrapStdio } = await import('./stdio-bootstrap-PSX3TI3I.js');
122
+ const { bootstrapStdio } = await import('./stdio-bootstrap-RBANZT6F.js');
123
123
  return bootstrapStdio(config);
124
124
  }
125
- const { bootstrapHttp } = await import('./http-bootstrap-PW4K2NDQ.js');
125
+ const { bootstrapHttp } = await import('./http-bootstrap-FGGCFLRU.js');
126
126
  return bootstrapHttp(config);
127
127
  }
128
128
  main().then(
@@ -3,8 +3,8 @@ export { err, ok } from 'neverthrow';
3
3
 
4
4
  // src/shared/version.ts
5
5
  var NAME = "@kaminari-ad/mcp";
6
- var VERSION = "0.2.2";
6
+ var VERSION = "0.3.0";
7
7
 
8
8
  export { NAME, VERSION };
9
- //# sourceMappingURL=chunk-BAZQPU6T.js.map
10
- //# sourceMappingURL=chunk-BAZQPU6T.js.map
9
+ //# sourceMappingURL=chunk-KTQBHJUB.js.map
10
+ //# sourceMappingURL=chunk-KTQBHJUB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shared/version.ts"],"names":[],"mappings":";;;;AASO,IAAM,IAAA,GAAO;AACb,IAAM,OAAA,GAAU","file":"chunk-BAZQPU6T.js","sourcesContent":["/**\n * Package version and name. Hard-coded as constants here, asserted to\n * match `package.json` by a unit test.\n *\n * Why not import `package.json`: it would force JSON-module support at\n * runtime and tsup-bundling would inline the entire manifest. Two\n * constants + one assertion test is simpler and gives the same safety.\n */\n\nexport const NAME = \"@kaminari-ad/mcp\";\nexport const VERSION = \"0.2.2\";\n"]}
1
+ {"version":3,"sources":["../src/shared/version.ts"],"names":[],"mappings":";;;;AASO,IAAM,IAAA,GAAO;AACb,IAAM,OAAA,GAAU","file":"chunk-KTQBHJUB.js","sourcesContent":["/**\n * Package version and name. Hard-coded as constants here, asserted to\n * match `package.json` by a unit test.\n *\n * Why not import `package.json`: it would force JSON-module support at\n * runtime and tsup-bundling would inline the entire manifest. Two\n * constants + one assertion test is simpler and gives the same safety.\n */\n\nexport const NAME = \"@kaminari-ad/mcp\";\nexport const VERSION = \"0.3.0\";\n"]}