@cookiemunch/mcp 0.4.0 → 0.4.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 +37 -0
- package/LICENSE +21 -0
- package/dist/bin.cjs +10 -7
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +2 -2
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-SKCEQX3L.js → chunk-WGUF6SJH.js} +11 -7
- package/dist/chunk-WGUF6SJH.js.map +1 -0
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/package.json +16 -8
- package/dist/chunk-SKCEQX3L.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
+
MCP_VERSION: () => MCP_VERSION,
|
|
23
24
|
createCookieMunchMcp: () => createCookieMunchMcp,
|
|
24
25
|
registerTools: () => registerTools
|
|
25
26
|
});
|
|
@@ -1633,7 +1634,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1633
1634
|
);
|
|
1634
1635
|
tool(
|
|
1635
1636
|
"list_cookie_presets",
|
|
1636
|
-
"Declaration presets for the platforms a site is built on (atlas, forumulate, chatly, cookiemunch): each one\u2019s parameters, what it has declared on this site, and whether the vendor\u2019s live manifest can be imported yet. Read-only.",
|
|
1637
|
+
"Declaration presets for the platforms a site is built on (atlas, forumulate, chatly, cookiemunch, referally): each one\u2019s parameters, what it has declared on this site, and whether the vendor\u2019s live manifest can be imported yet. Read-only.",
|
|
1637
1638
|
{ cbid: import_zod5.z.string() },
|
|
1638
1639
|
(a) => client.sites.cookiePresets(a.cbid)
|
|
1639
1640
|
);
|
|
@@ -1642,24 +1643,26 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1642
1643
|
"Apply (or re-sync) a vendor preset: declares exactly what that platform writes \u2014 cookies and browser storage, with domain and lifetime \u2014 marked as declared by that vendor. Re-applying removes keys the vendor no longer writes. Names the owner declared are kept (skipped). Atlas needs frontendApiHost (and crossSubdomainCookies, default true); Chatly needs publicId.",
|
|
1643
1644
|
{
|
|
1644
1645
|
cbid: import_zod5.z.string(),
|
|
1645
|
-
vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]),
|
|
1646
|
+
vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch", "referally"]),
|
|
1646
1647
|
frontendApiHost: import_zod5.z.string().optional().describe("Atlas: your frontend API host, e.g. auth.example.com."),
|
|
1647
1648
|
crossSubdomainCookies: import_zod5.z.boolean().optional().describe("Atlas: default true \u2014 the cookies live on the parent domain."),
|
|
1648
1649
|
publicId: import_zod5.z.string().optional().describe("Chatly: the channel public id (ch_web_\u2026)."),
|
|
1649
1650
|
dragging: import_zod5.z.boolean().optional().describe("Chatly: the launcher can be dragged (adds the drag-position key)."),
|
|
1650
|
-
category: import_zod5.z.string().optional().describe("Chatly: the category for its keys
|
|
1651
|
+
category: import_zod5.z.string().optional().describe("Chatly: the category for its keys (default necessary). Referally: default the site's referrals category, else marketing."),
|
|
1652
|
+
cookieDomain: import_zod5.z.string().optional().describe("Referally: the domain aff.js sets referally_ctx on, e.g. .example.com. Default the site domain."),
|
|
1653
|
+
cookieDays: import_zod5.z.number().int().min(1).max(400).optional().describe("Referally: how long the cookie lives, 1 to 400 days. Default 60."),
|
|
1651
1654
|
dryRun: dryRunArg
|
|
1652
1655
|
},
|
|
1653
1656
|
(a) => {
|
|
1654
1657
|
const params = {};
|
|
1655
|
-
for (const k of ["frontendApiHost", "crossSubdomainCookies", "publicId", "dragging", "category"]) if (a[k] !== void 0) params[k] = a[k];
|
|
1658
|
+
for (const k of ["frontendApiHost", "crossSubdomainCookies", "publicId", "dragging", "category", "cookieDomain", "cookieDays"]) if (a[k] !== void 0) params[k] = a[k];
|
|
1656
1659
|
return client.sites.applyCookiePreset(a.cbid, a.vendor, params, a.dryRun ? { dryRun: true } : void 0);
|
|
1657
1660
|
}
|
|
1658
1661
|
);
|
|
1659
1662
|
tool(
|
|
1660
1663
|
"remove_cookie_preset",
|
|
1661
1664
|
"Remove every declaration a vendor preset made on this site.",
|
|
1662
|
-
{ cbid: import_zod5.z.string(), vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]), dryRun: dryRunArg },
|
|
1665
|
+
{ cbid: import_zod5.z.string(), vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch", "referally"]), dryRun: dryRunArg },
|
|
1663
1666
|
(a) => client.sites.removeCookiePreset(a.cbid, a.vendor, a.dryRun ? { dryRun: true } : void 0)
|
|
1664
1667
|
);
|
|
1665
1668
|
tool(
|
|
@@ -2017,14 +2020,16 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
2017
2020
|
}
|
|
2018
2021
|
|
|
2019
2022
|
// src/index.ts
|
|
2023
|
+
var MCP_VERSION = "0.4.1";
|
|
2020
2024
|
function createCookieMunchMcp(opts) {
|
|
2021
|
-
const client = opts.client ?? (0, import_sdk.createCookieMunch)({ apiKey: opts.apiKey, baseUrl: opts.baseUrl });
|
|
2025
|
+
const client = opts.client ?? (0, import_sdk.createCookieMunch)({ apiKey: opts.apiKey, baseUrl: opts.baseUrl, userAgent: opts.userAgent ?? `cookiemunch-mcp/${MCP_VERSION}` });
|
|
2022
2026
|
const server = new import_mcp.McpServer({ name: "cookiemunch", version: "1.0.0" });
|
|
2023
2027
|
registerTools(server, client);
|
|
2024
2028
|
return server;
|
|
2025
2029
|
}
|
|
2026
2030
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2027
2031
|
0 && (module.exports = {
|
|
2032
|
+
MCP_VERSION,
|
|
2028
2033
|
createCookieMunchMcp,
|
|
2029
2034
|
registerTools
|
|
2030
2035
|
});
|