@cookiemunch/mcp 0.2.0 → 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/dist/bin.cjs +40 -7
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-PLBLLTYO.js → chunk-VP3KZHLC.js} +41 -8
- package/dist/chunk-VP3KZHLC.js.map +1 -0
- package/dist/index.cjs +40 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-PLBLLTYO.js.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -197,7 +197,7 @@ function registerConfigTools(tool, client) {
|
|
|
197
197
|
preset: import_zod.z.enum(["bar", "box", "full"]).optional().describe("Named shape that sets type/secondLayer (and layout for box): bar = slim one-row bar + categories in a modal; box = centred card + modal; full = every category in the first layer."),
|
|
198
198
|
secondLayer: import_zod.z.enum(["expand", "popup", "modal"]).optional().describe("Where the categories open from an inline banner."),
|
|
199
199
|
density: import_zod.z.enum(["comfortable", "compact"]).optional().describe("compact = one-row bar from 760px wide."),
|
|
200
|
-
theme: import_zod.z.record(import_zod.z.unknown()).optional().describe("Partial ThemeTokens \u2014 deep-merged onto the existing banner theme."),
|
|
200
|
+
theme: import_zod.z.record(import_zod.z.unknown()).optional().describe("Partial ThemeTokens \u2014 deep-merged onto the existing banner theme. Includes `scrollbar`: { style: themed|thin|native|hidden, thumb?, thumbHover?, track?, width? 4\u201316, radius? 0\u2013999 }."),
|
|
201
201
|
content: import_zod.z.record(import_zod.z.unknown()).optional().describe("Partial BannerContent \u2014 banner copy overrides (title, body, button labels, policyUrl, etc.).")
|
|
202
202
|
});
|
|
203
203
|
tool(
|
|
@@ -1188,15 +1188,23 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1188
1188
|
);
|
|
1189
1189
|
tool(
|
|
1190
1190
|
"scan_site",
|
|
1191
|
-
"Trigger a cookie
|
|
1192
|
-
{ ...cbid },
|
|
1193
|
-
(a) =>
|
|
1191
|
+
"Trigger a cookie crawl of a site (at most 90 s). Returns its scanId and state (queued). With wait: true, returns once it is done or failed \u2014 state, cookieCount, pagesVisited, durationMs, error. The stored list keeps cookies earlier crawls and real visits found; retire one the site no longer sets.",
|
|
1192
|
+
{ ...cbid, wait: import_zod4.z.boolean().optional().describe("Wait for the scan to finish (up to 100 s) and return its outcome.") },
|
|
1193
|
+
async (a) => {
|
|
1194
|
+
let started;
|
|
1195
|
+
try {
|
|
1196
|
+
started = await client.sites.scan(a.cbid);
|
|
1197
|
+
} catch (err) {
|
|
1198
|
+
if (!a.wait || err.status !== 409) throw err;
|
|
1199
|
+
}
|
|
1200
|
+
return a.wait ? client.sites.waitForScan(a.cbid, { timeoutMs: 1e5 }) : started;
|
|
1201
|
+
}
|
|
1194
1202
|
);
|
|
1195
1203
|
tool(
|
|
1196
1204
|
"get_scan_status",
|
|
1197
|
-
"Get
|
|
1198
|
-
{ ...cbid },
|
|
1199
|
-
(a) => client.sites.scanStatus(a.cbid)
|
|
1205
|
+
"Get a site\u2019s last cookie scan: state (queued, scanning, done, failed), scanId, durationMs, cookieCount, pagesVisited and error when it failed.",
|
|
1206
|
+
{ ...cbid, wait: import_zod4.z.number().min(0).max(60).optional().describe("Seconds (\u226460) to wait for a running scan to settle before answering.") },
|
|
1207
|
+
(a) => a.wait !== void 0 ? client.sites.scanStatus(a.cbid, { wait: a.wait }) : client.sites.scanStatus(a.cbid)
|
|
1200
1208
|
);
|
|
1201
1209
|
tool(
|
|
1202
1210
|
"get_ab_results",
|
|
@@ -1460,6 +1468,31 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1460
1468
|
return { undeclared: a.name };
|
|
1461
1469
|
}
|
|
1462
1470
|
);
|
|
1471
|
+
tool(
|
|
1472
|
+
"retire_cookie",
|
|
1473
|
+
'Retire a cookie the site renamed or stopped setting: it leaves the banner\u2019s cookie list, data-cc="declaration" and the public feed, and stays listed for the owner with retired. A name ending in * retires every cookie with that prefix; the name must match a scanned, observed or declared cookie. If a crawl or a real visit sees it again afterwards, it is listed again with review: retired_but_seen.',
|
|
1474
|
+
{
|
|
1475
|
+
cbid: import_zod4.z.string(),
|
|
1476
|
+
name: import_zod4.z.string(),
|
|
1477
|
+
renamedTo: import_zod4.z.string().max(256).optional().describe("The cookie\u2019s new name, if it was renamed."),
|
|
1478
|
+
note: import_zod4.z.string().max(1e3).optional(),
|
|
1479
|
+
dryRun: import_zod4.z.boolean().optional().describe("Store nothing: answer with the would-be retirement and list to check first.")
|
|
1480
|
+
},
|
|
1481
|
+
(a) => {
|
|
1482
|
+
const input = { ...a.renamedTo ? { renamedTo: a.renamedTo } : {}, ...a.note ? { note: a.note } : {} };
|
|
1483
|
+
return client.sites.retireCookie(a.cbid, a.name, input, a.dryRun ? { dryRun: true } : void 0);
|
|
1484
|
+
}
|
|
1485
|
+
);
|
|
1486
|
+
tool(
|
|
1487
|
+
"unretire_cookie",
|
|
1488
|
+
"Un-retire a cookie: it is listed again everywhere.",
|
|
1489
|
+
{ cbid: import_zod4.z.string(), name: import_zod4.z.string(), dryRun: import_zod4.z.boolean().optional().describe("Store nothing: answer with what the list would be.") },
|
|
1490
|
+
async (a) => {
|
|
1491
|
+
if (a.dryRun) return client.sites.unretireCookie(a.cbid, a.name, { dryRun: true });
|
|
1492
|
+
await client.sites.unretireCookie(a.cbid, a.name);
|
|
1493
|
+
return { unretired: a.name };
|
|
1494
|
+
}
|
|
1495
|
+
);
|
|
1463
1496
|
tool(
|
|
1464
1497
|
"get_blocked_pages",
|
|
1465
1498
|
"Pages where the embed could not load its banner renderer \u2014 the page\u2019s Content Security Policy or Trusted Types policy refused it, so nobody there can be asked for consent. An empty list is healthy. Read-only.",
|