@kaminari-ad/mcp 0.18.0 → 0.19.1

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,77 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.19.1] - 2026-09-10
11
+
12
+ > Requires the API-side KAMIAD-104 deploy. Until it lands, production
13
+ > rejects `invoice_payment_adjustment` as an unknown query enum (422,
14
+ > surfaced as an `invalid_input` tool error), so do not tag this release
15
+ > ahead of the API.
16
+
17
+ ### Fixed
18
+
19
+ - **`list_balance_history` can filter on `invoice_payment_adjustment`.**
20
+ The API gained this `BalanceTransactionType` upstream (KAMIAD-104):
21
+ correcting an already-settled invoice appends a signed correction row
22
+ rather than editing the original `invoice_settlement`. Once the API
23
+ ships, an unfiltered call will return such rows without a parser change
24
+ — the response schema holds `type` as a plain string — but the filter
25
+ enum rejected the value, so an agent could neither select nor exclude
26
+ corrections. Same class of gap as `card_top_up` in 0.13.0, hence a
27
+ patch. No tool signature changed.
28
+
29
+ The two generated schemas were hand-edited rather than regenerated,
30
+ because `gen:api-types` defaults to the production spec and would drag
31
+ in unrelated drift that is not on this branch. Each hunk was verified
32
+ byte-equivalent to what a regen against the branch spec produces.
33
+
34
+ ### Security
35
+
36
+ - Cleared the three advisory clusters that `audit:deps` flagged, taking
37
+ `npm audit` from 9 findings (5 high, 4 moderate) to zero. `vitest` and
38
+ its `@vitest/*` siblings 4.1.6 → 4.1.11 (GHSA-82fw-gwwq-j7x9) and the
39
+ `js-yaml` override 4.3.1 → 4.3.2 (GHSA-2883-xcg3-v3hh) are both
40
+ dev-only. The new `hono` override (`^4.13.7`, three advisories) is
41
+ **not**: `hono` reaches the runtime tree through
42
+ `@modelcontextprotocol/sdk`, on the streamable-HTTP transport's request
43
+ path, so this changes what the HTTP deployment resolves. The published
44
+ bundle is unaffected — the SDK stays external — and npm `overrides` do
45
+ not propagate to consumers, so a consumer pinning a vulnerable `hono`
46
+ needs its own bump.
47
+
48
+ ## [0.19.0] - 2026-09-08
49
+
50
+ ### Changed
51
+
52
+ - **`network` on a discovered ad is now the ad network's NAME, and its
53
+ domain moved to `network_host`.** The API used to put whichever ad host
54
+ matched first into `network`, so an agent reading it got
55
+ `cdn.tsyndicate.com` where a name belongs — and sometimes
56
+ `www.googletagmanager.com`, which is not an ad network at all. Upstream
57
+ (KAMIAD-133) `network` became a display name resolved from a domain
58
+ catalog and is **empty when the ad server is not recognised**, while the
59
+ observed domain travels in the new `network_host`.
60
+
61
+ Both fields are exposed on every tool that returns a scan shape:
62
+ `get_scan`, `list_scans`, `list_scan_children`, `create_scan` and
63
+ `create_bulk_scans`. (`list_run_scans` returns the slim run tile, which
64
+ carries no network fields at all.) An
65
+ agent that identified networks by `network` should read `network_host`
66
+ when `network` is empty; one that treated `network` as a hostname needs
67
+ to stop. Scans created before the upstream release keep a hostname in
68
+ `network` and have an empty `network_host`, so a network breakdown is
69
+ only sound over scans created after it.
70
+
71
+ Ads served from infrastructure (tag managers, analytics, measurement,
72
+ DMPs) and from a publisher's own creative CDN are still found, scanned
73
+ and billed exactly as before — they simply no longer claim a network
74
+ name.
75
+
76
+ `network_host` is declared on the port rather than picked from the
77
+ generated types, the same escape hatch `max_discovered_ads` uses: the
78
+ generated files are regenerated off the DEPLOYED spec, and this field
79
+ ships in the release it describes. The next regen absorbs it.
80
+
10
81
  ## [0.17.1] - 2026-09-03
11
82
 
12
83
  ### Fixed
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { NAME, VERSION, err, ok } from './chunk-KCQ55TRV.js';
2
+ import { NAME, VERSION, err, ok } from './chunk-MKBTS4IH.js';
3
3
  import process from 'process';
4
4
  import { z } from 'zod';
5
5
 
@@ -160,10 +160,10 @@ async function main() {
160
160
  }
161
161
  const config = configResult.value;
162
162
  if (config.transport === "stdio") {
163
- const { bootstrapStdio } = await import('./stdio-bootstrap-ZWMO4KXK.js');
163
+ const { bootstrapStdio } = await import('./stdio-bootstrap-4PXPX6BD.js');
164
164
  return bootstrapStdio(config);
165
165
  }
166
- const { bootstrapHttp } = await import('./http-bootstrap-WTWLW2LP.js');
166
+ const { bootstrapHttp } = await import('./http-bootstrap-FN4DOOJT.js');
167
167
  return bootstrapHttp(config);
168
168
  }
169
169
  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.18.0";
6
+ var VERSION = "0.19.1";
7
7
 
8
8
  export { NAME, VERSION };
9
- //# sourceMappingURL=chunk-KCQ55TRV.js.map
10
- //# sourceMappingURL=chunk-KCQ55TRV.js.map
9
+ //# sourceMappingURL=chunk-MKBTS4IH.js.map
10
+ //# sourceMappingURL=chunk-MKBTS4IH.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/shared/version.ts"],"names":[],"mappings":";;;;AASO,IAAM,IAAA,GAAO;AACb,IAAM,OAAA,GAAU","file":"chunk-KCQ55TRV.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.18.0\";\n"]}
1
+ {"version":3,"sources":["../src/shared/version.ts"],"names":[],"mappings":";;;;AASO,IAAM,IAAA,GAAO;AACb,IAAM,OAAA,GAAU","file":"chunk-MKBTS4IH.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.19.1\";\n"]}
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { err, ok } from './chunk-KCQ55TRV.js';
2
+ import { err, ok } from './chunk-MKBTS4IH.js';
3
3
  import { createHash, randomUUID } from 'crypto';
4
4
  import createClient from 'openapi-fetch';
5
5
  import { fetch } from 'undici';
@@ -978,6 +978,7 @@ var BalanceTransactionType = z.enum([
978
978
  "admin_adjustment",
979
979
  "refund",
980
980
  "invoice_settlement",
981
+ "invoice_payment_adjustment",
981
982
  "crypto_top_up",
982
983
  "card_top_up"
983
984
  ]);
@@ -1838,12 +1839,10 @@ var ScanSchema = schemas.ScanResponse.pick({
1838
1839
  repeat_scan_ids: true,
1839
1840
  retry_attempt: true,
1840
1841
  retry_max_attempts: true
1841
- }).extend({ creative_kind: z.string().default("banner") }).extend({ max_discovered_ads: z.number().int().nullable().optional() }).strip();
1842
+ }).extend({ creative_kind: z.string().default("banner") }).extend({ max_discovered_ads: z.number().int().nullable().optional() }).extend({ network_host: z.string().optional() }).strip();
1842
1843
  var ScanArraySchema = z.array(ScanSchema);
1843
1844
  var parseScan = (raw) => parseWithSchema(ScanSchema, raw, "scan");
1844
1845
  var parseScanArray = (raw) => parseWithSchema(ScanArraySchema, raw, "scans");
1845
-
1846
- // src/infrastructure/api/parsers/parse-scan-page.ts
1847
1846
  var ScanBriefSchema = schemas.ScanBriefResponse.pick({
1848
1847
  id: true,
1849
1848
  url: true,
@@ -1870,7 +1869,7 @@ var ScanBriefSchema = schemas.ScanBriefResponse.pick({
1870
1869
  repeat_session_id: true,
1871
1870
  retry_attempt: true,
1872
1871
  retry_max_attempts: true
1873
- }).strip();
1872
+ }).extend({ network_host: z.string().optional() }).strip();
1874
1873
  var parseScanPage = (raw) => parsePagedWithItemSchema(ScanBriefSchema, raw, "scans");
1875
1874
  var TagDefinitionSchema = schemas.TagDefinitionWithStatsResponse.pick({
1876
1875
  slug: true,
@@ -3550,6 +3549,7 @@ var TransactionTypeEnum = z.enum([
3550
3549
  "admin_adjustment",
3551
3550
  "refund",
3552
3551
  "invoice_settlement",
3552
+ "invoice_payment_adjustment",
3553
3553
  "crypto_top_up",
3554
3554
  "card_top_up"
3555
3555
  ]);
@@ -3557,14 +3557,14 @@ var ListBalanceHistoryInputShape = {
3557
3557
  date_from: z.string().date().optional().describe("ISO date, inclusive."),
3558
3558
  date_to: z.string().date().optional().describe("ISO date, inclusive."),
3559
3559
  type: z.array(TransactionTypeEnum).max(TransactionTypeEnum.options.length).optional().describe(
3560
- "Filter by transaction kind. Pass several values to OR them (e.g. ['top_up_manual','crypto_top_up','card_top_up'] for credits-only)."
3560
+ "Filter by transaction kind. Pass several values to OR them (e.g. ['top_up_manual','crypto_top_up','card_top_up','invoice_settlement'] for every way a balance is funded). Note `invoice_payment_adjustment` is signed: a correction to an already-settled invoice can be either a credit or a debit."
3561
3561
  ),
3562
3562
  page: z.number().int().min(1).max(500).default(1).describe("1-indexed page."),
3563
3563
  limit: z.number().int().min(1).max(200).default(50).describe("Page size.")
3564
3564
  };
3565
3565
  var listBalanceHistoryTool = {
3566
3566
  name: "list_balance_history",
3567
- description: "List ledger transactions (charges, refunds, top-ups, invoice settlements) on the organization's balance. Each row: type, amount in micros, description, timestamp. Filter by `type` (multi-select) and / or date range.",
3567
+ description: "List ledger transactions (charges, refunds, top-ups, invoice settlements and their corrections) on the organization's balance. Each row: type, amount in micros, description, timestamp. Filter by `type` (multi-select) and / or date range.",
3568
3568
  annotations: {
3569
3569
  title: "List Balance History",
3570
3570
  readOnlyHint: true,
@@ -5532,7 +5532,7 @@ var ListScanChildrenInputShape = {
5532
5532
  };
5533
5533
  var listScanChildrenTool = {
5534
5534
  name: "list_scan_children",
5535
- description: "List the discovered-ad child scans of a publisher ad-discovery scan \u2014 one per detected ad block on the page. Each child brief carries ad_kind (banner|pop), the attributed ad network, and slot_index. The repeat / retry fields are present but never meaningful here: a child is always its own group of one (`repeat_index` 0, `repeat_total` 1, `repeat_session_id` null) and is never re-crawled, because repeats and retries apply to the publisher scan \u2014 repeating an ad-discovery scan gives you several parents, each with its own children. Returns a paginated envelope with screenshot + report deep-links; link users with those, never hand-build URLs.",
5535
+ description: "List the discovered-ad child scans of a publisher ad-discovery scan \u2014 one per detected ad block on the page. Each child brief carries ad_kind (banner|pop), slot_index, and the ad's attribution split in two: network is the ad network's NAME and is empty when the ad server is unrecognised, network_host is the domain observed \u2014 so read network first and fall back to network_host. Both are empty when the ad came from infrastructure that is not an ad network (tag manager, analytics) or from the publisher's own creative CDN; a pop carries a network but no host, because pop networks rotate their serving domains. The repeat / retry fields are present but never meaningful here: a child is always its own group of one (`repeat_index` 0, `repeat_total` 1, `repeat_session_id` null) and is never re-crawled, because repeats and retries apply to the publisher scan \u2014 repeating an ad-discovery scan gives you several parents, each with its own children. Returns a paginated envelope with screenshot + report deep-links; link users with those, never hand-build URLs.",
5536
5536
  annotations: {
5537
5537
  title: "List Scan Children",
5538
5538
  readOnlyHint: true,
@@ -6240,5 +6240,5 @@ function formatToolError(error) {
6240
6240
  }
6241
6241
 
6242
6242
  export { BearerToken, SERVER_INSTRUCTIONS, createHttpApiGateway, createPinoLogger, declareEmptyResourcesAndPrompts, newRequestId, wireToolsIntoMcpServer };
6243
- //# sourceMappingURL=chunk-MYBWPFWG.js.map
6244
- //# sourceMappingURL=chunk-MYBWPFWG.js.map
6243
+ //# sourceMappingURL=chunk-NPSDASQE.js.map
6244
+ //# sourceMappingURL=chunk-NPSDASQE.js.map