@cookiemunch/mcp 0.7.1 → 0.8.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/index.cjs CHANGED
@@ -577,8 +577,10 @@ function registerPlatformTools(tool, client) {
577
577
  revokeAtlasIdGrant: import_zod2.z.boolean().optional().describe("A preset param, when the preset's params list it: default false. True adds an optional step that revokes the person's app grant on erasure; a credential without the scope reports skipped: insufficient_scope."),
578
578
  label: import_zod2.z.string().optional().describe("Your name for the credential, shown beside keyPrefix."),
579
579
  system: import_zod2.z.string().optional().describe("The name this connection answers to in a plan, e.g. identity or crm. Required unless the preset has a default."),
580
- baseUrl: import_zod2.z.string().optional().describe("The system's public https origin. Required unless the preset sets it."),
581
- secretKey: import_zod2.z.string().describe("Its API key, with whatever scope that system needs to export and erase a user."),
580
+ baseUrl: import_zod2.z.string().optional().describe("The system's public https origin, or a base with a path (cm-standard-v1 v4 on: the path replaces /api/privacy; cm-standard-v2: the contract paths hang off it). Required unless the preset sets it."),
581
+ secretKey: import_zod2.z.string().optional().describe("Its API key, with whatever scope that system needs to export and erase a user. Send this or mintFrom."),
582
+ mintFrom: import_zod2.z.string().optional().describe("In place of secretKey: a partner id (one that registered an executorKeyUrl, e.g. chatly, forumulate, referalli) that mints the key for the site under its partner link. The connection is scoped to that site. With dryRun, the answer's mint says who would mint it; nothing is minted."),
583
+ externalId: import_zod2.z.string().optional().describe("With mintFrom: the partner account the key is minted for. Default: the one the site's live link for that partner names."),
582
584
  webhookSecret: import_zod2.z.string().optional().describe("Signing secret of its webhook endpoint. Optional: polling closes tasks without it."),
583
585
  auto: import_zod2.z.boolean().optional().describe("Open a sub-task automatically when a request reaches fulfilment. Default true."),
584
586
  orchestrator: import_zod2.z.union([import_zod2.z.literal(1), import_zod2.z.literal(2)]).optional().describe("How it takes part in cases. Default 2 (v2 headers on every call); 1 is the v1 adapter. The answer carries a completionSecret, shown once, that signs its completions."),
@@ -947,12 +949,12 @@ function registerKeyAndTagTools(tool, client) {
947
949
  const tagsSchema = import_zod4.z.object({
948
950
  type: import_zod4.z.enum(TAGGED),
949
951
  id: import_zod4.z.string(),
950
- metadata: import_zod4.z.record(import_zod4.z.union([import_zod4.z.string(), import_zod4.z.number(), import_zod4.z.boolean(), import_zod4.z.null()])).describe("Keys to set; null removes one. forgedeck_sandbox cannot be set here."),
952
+ metadata: import_zod4.z.record(import_zod4.z.union([import_zod4.z.string(), import_zod4.z.number(), import_zod4.z.boolean(), import_zod4.z.null()])).describe("Keys to set; null removes one. stack_sandbox cannot be set here."),
951
953
  dryRun: import_zod4.z.boolean().optional().describe("Answer with the diff, storing nothing. Do this first.")
952
954
  });
953
955
  tool(
954
956
  "update_resource_tags",
955
- "Change a resource\u2019s tags (merge). For adopting resources created before tags existed, e.g. forgedeck_product and forgedeck_env. A resource can never be made a sandbox after it was created.",
957
+ "Change a resource\u2019s tags (merge). For adopting resources created before tags existed, e.g. stack_product and stack_env. A resource can never be made a sandbox after it was created.",
956
958
  tagsSchema.shape,
957
959
  (a) => {
958
960
  const { type, id, metadata, dryRun } = tagsSchema.parse(a);
@@ -987,7 +989,7 @@ function registerKeyAndTagTools(tool, client) {
987
989
  );
988
990
  tool(
989
991
  "get_provision_env",
990
- "What `forgedeck env` writes for a product provisioned with this forgedeck ref: variable names, non-secret values (cbid, script URL, API base) and references for secrets, never a secret. Read-only.",
992
+ "What `env` writes for a product provisioned with this stack ref: variable names, non-secret values (cbid, script URL, API base) and references for secrets, never a secret. Read-only.",
991
993
  { ref: import_zod4.z.string() },
992
994
  (a) => client.provisionEnv(a.ref)
993
995
  );
@@ -1433,13 +1435,13 @@ ${JSON.stringify(r, null, 2)}` : r;
1433
1435
  type: import_zod6.z.string().describe("access | deletion | closure | restriction | rectification, or erasure / erase / export."),
1434
1436
  emails: import_zod6.z.array(import_zod6.z.string()).optional().describe("The person's addresses."),
1435
1437
  identity: import_zod6.z.object({ iss: import_zod6.z.string(), sub: import_zod6.z.string(), ext: import_zod6.z.string().optional(), principal: import_zod6.z.string().optional() }).optional().describe("A signed-in identity from the site's sign-in issuer. People are never linked on email when it is present."),
1436
- source: import_zod6.z.enum(["product", "atlas", "admin"]).optional(),
1438
+ source: import_zod6.z.enum(["product", "identity", "admin"]).optional().describe("identity: the site's sign-in provider, whichever it is."),
1437
1439
  reason: import_zod6.z.string().optional(),
1438
1440
  skipSystems: import_zod6.z.array(import_zod6.z.string()).optional().describe("System names, connection ids, or self."),
1439
1441
  fulfill: import_zod6.z.boolean().optional(),
1440
1442
  test: import_zod6.z.boolean().optional(),
1441
1443
  idempotencyKey: import_zod6.z.string().optional(),
1442
- trace: import_zod6.z.string().optional().describe("An X-ForgeDeck-Trace to keep, from the caller.")
1444
+ trace: import_zod6.z.string().optional().describe("An X-Trace-Id to keep, from the caller.")
1443
1445
  },
1444
1446
  (a) => client.dsar.openCase(
1445
1447
  {
@@ -1478,7 +1480,7 @@ ${JSON.stringify(r, null, 2)}` : r;
1478
1480
  );
1479
1481
  tool(
1480
1482
  "find_dsar_by_trace",
1481
- "The rights request carrying one X-ForgeDeck-Trace id \u2014 to follow one event across products. Read-only.",
1483
+ "The rights request carrying one X-Trace-Id id \u2014 to follow one event across products. Read-only.",
1482
1484
  { trace: import_zod6.z.string() },
1483
1485
  (a) => client.dsar.listByTrace(a.trace)
1484
1486
  );
@@ -1508,6 +1510,22 @@ ${JSON.stringify(r, null, 2)}` : r;
1508
1510
  typeof a.iss === "string" && typeof a.sub === "string" ? { iss: a.iss, sub: a.sub } : { email: String(a.email ?? "") }
1509
1511
  )
1510
1512
  );
1513
+ tool(
1514
+ "connect_identity_provider",
1515
+ "Connect an identity provider's privacy orchestrator in one call, so it opens a rights case here when a person deletes their account there. Mints a key holding only dsar:write, locked to the site (no keys:write needed), and hands it to the provider, authorised with the provider instance key. The minted key is never returned, only its prefix; connecting again replaces it. Built in: atlas. Any other provider: pass connector. Run with dryRun first: it mints and sends nothing.",
1516
+ {
1517
+ provider: import_zod6.z.string().describe("The provider id, e.g. atlas."),
1518
+ cbid: import_zod6.z.string().describe("The site the provider opens cases on."),
1519
+ providerKey: import_zod6.z.string().describe("The provider instance's secret key (Atlas: the instance secret key). Used for this one call, never stored."),
1520
+ connector: import_zod6.z.object({ url: import_zod6.z.string(), method: import_zod6.z.enum(["PUT", "POST"]).optional(), body: import_zod6.z.record(import_zod6.z.unknown()) }).optional().describe('Only for a provider with no built-in connector: its https orchestrator URL and JSON body; a body value "{apiKey}" becomes the minted key.'),
1521
+ dryRun: import_zod6.z.boolean().optional().describe("Show the key and the request that would be made, minting and sending nothing.")
1522
+ },
1523
+ (a) => client.integrations.connect(
1524
+ a.provider,
1525
+ { cbid: a.cbid, providerKey: a.providerKey, ...a.connector ? { connector: a.connector } : {} },
1526
+ { dryRun: a.dryRun === true }
1527
+ )
1528
+ );
1511
1529
  tool(
1512
1530
  "advance_dsar",
1513
1531
  "Advance a DSAR to a new status (received \u2192 verifying \u2192 in_progress \u2192 completed, or rejected).",
@@ -1895,7 +1913,7 @@ ${JSON.stringify(r, null, 2)}` : r;
1895
1913
  (a) => client.sites.applyImport(a.cbid, a.data, a.overwrite ? { overwrite: true } : void 0)
1896
1914
  );
1897
1915
  const declarationShape = {
1898
- category: import_zod6.z.string().describe("necessary, preferences, statistics, marketing, or one of the site\u2019s categories.custom ids."),
1916
+ category: import_zod6.z.string().describe("necessary, preferences, statistics, marketing, or one of the site\u2019s categories.suite or categories.custom ids."),
1899
1917
  purpose: import_zod6.z.string().describe("What the cookie does, as visitors will read it \u2014 and the fallback for any language purposes lacks."),
1900
1918
  purposes: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.string().max(1e3)).nullable().optional().describe('The purpose in other languages, keyed by BCP-47 tag: {"es": "\u2026", "pt-BR": "\u2026"}. The banner, data-cc="declaration" and cookie-declaration.js draw the visitor\u2019s language. null clears.'),
1901
1919
  provider: import_zod6.z.string().optional(),
@@ -2445,7 +2463,7 @@ ${JSON.stringify(r, null, 2)}` : r;
2445
2463
  }
2446
2464
 
2447
2465
  // src/index.ts
2448
- var MCP_VERSION = "0.7.1";
2466
+ var MCP_VERSION = "0.8.0";
2449
2467
  function createCookieMunchMcp(opts) {
2450
2468
  const client = opts.client ?? (0, import_sdk.createCookieMunch)({ apiKey: opts.apiKey, baseUrl: opts.baseUrl, userAgent: opts.userAgent ?? `cookiemunch-mcp/${MCP_VERSION}` });
2451
2469
  const server = new import_mcp.McpServer({ name: "cookiemunch", version: "1.0.0" });