@cookiemunch/mcp 0.3.0 → 0.4.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 +378 -201
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-VP3KZHLC.js → chunk-SKCEQX3L.js} +379 -202
- package/dist/chunk-SKCEQX3L.js.map +1 -0
- package/dist/index.cjs +378 -201
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-VP3KZHLC.js.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
|
9
9
|
var import_sdk = require("@cookiemunch/sdk");
|
|
10
10
|
|
|
11
11
|
// src/tools.ts
|
|
12
|
-
var
|
|
12
|
+
var import_zod5 = require("zod");
|
|
13
13
|
|
|
14
14
|
// src/tools-config.ts
|
|
15
15
|
var import_zod = require("zod");
|
|
@@ -96,7 +96,7 @@ function registerConfigTools(tool, client) {
|
|
|
96
96
|
const setLanguagesSchema = import_zod.z.object({
|
|
97
97
|
cbid: import_zod.z.string().describe("Site identifier (cbid)."),
|
|
98
98
|
defaultCulture: import_zod.z.string().optional().describe('Default locale/culture code, e.g. "en", "fr". Stored in i18n.defaultCulture.'),
|
|
99
|
-
autoDetect: import_zod.z.boolean().optional().describe(
|
|
99
|
+
autoDetect: import_zod.z.union([import_zod.z.boolean(), import_zod.z.literal("page")]).optional().describe(`true: follow the visitor's browser language; false: defaultCulture for everyone; "page": follow the page's <html lang>, then the browser. Stored in i18n.autoDetect.`),
|
|
100
100
|
translations: import_zod.z.record(import_zod.z.record(import_zod.z.unknown())).optional().describe("Per-locale banner copy overrides. Merged onto banner.i18n (locale keys preserved)."),
|
|
101
101
|
overrides: import_zod.z.record(import_zod.z.object({ banner: import_zod.z.record(import_zod.z.string()).optional(), categories: import_zod.z.record(import_zod.z.object({ label: import_zod.z.string().optional(), description: import_zod.z.string().optional() })).optional() })).optional().describe("The site's own copy per language, keyed by tag (de, pt-BR): { banner: { title, body, \u2026 }, categories: { <id>: { label, description } } }. Each language given replaces its entry in i18n.overrides; other languages are kept. Strings the site wrote are shown as written in any language without an override \u2014 stock translations never replace them.")
|
|
102
102
|
});
|
|
@@ -544,12 +544,16 @@ function registerPlatformTools(tool, client) {
|
|
|
544
544
|
"connect_dsar_executor",
|
|
545
545
|
"Connect a system that runs part of a rights request \u2014 an identity platform, a CRM, anything with a rights API. Cookie Munch is not specific to any platform: the `profile` describes that system's API (paths, the words it uses for export/erase, its status vocabulary, how it signs webhooks), so connecting a new one needs no code. The secret key is stored encrypted and never returned; the response carries the webhook URL to configure in that system. Sub-tasks open automatically once a request reaches fulfilment (after identity verification), and completions are picked up by webhook or by polling.",
|
|
546
546
|
{
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
preset: import_zod2.z.string().optional().describe("Build profile (and, unless the preset takes baseUrl as a param, baseUrl) from a versioned preset instead of sending profile. list_dsar_executor_presets names them, what each needs, and which wait on another platform."),
|
|
548
|
+
presetVersion: import_zod2.z.number().int().optional().describe("With preset: the version to build. Default the latest."),
|
|
549
|
+
orgId: import_zod2.z.string().optional().describe("A preset param, when the preset's params list it."),
|
|
550
|
+
atlasIdAppId: import_zod2.z.string().optional().describe("A preset param, when the preset's params list it: the identity platform's app id, so an erasure also revokes the app's grant."),
|
|
551
|
+
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."),
|
|
552
|
+
baseUrl: import_zod2.z.string().optional().describe("The system's public https origin. Required unless the preset sets it."),
|
|
549
553
|
secretKey: import_zod2.z.string().describe("Its API key, with whatever scope that system needs to export and erase a user."),
|
|
550
554
|
webhookSecret: import_zod2.z.string().optional().describe("Signing secret of its webhook endpoint. Optional: polling closes tasks without it."),
|
|
551
555
|
auto: import_zod2.z.boolean().optional().describe("Open a sub-task automatically when a request reaches fulfilment. Default true."),
|
|
552
|
-
profile: import_zod2.z.record(import_zod2.z.unknown()).describe("How to drive that system: { open, poll, statuses } required, plus optional subjectLookup, auth, idempotencyHeader and webhook.
|
|
556
|
+
profile: import_zod2.z.record(import_zod2.z.unknown()).optional().describe("How to drive that system: { open, poll, statuses } required, plus optional subjectLookup, auth, idempotencyHeader, grantRevoke and webhook. Omit it when using preset."),
|
|
553
557
|
dryRun: import_zod2.z.boolean().optional().describe("Validate everything and answer the connection that would be created, storing nothing.")
|
|
554
558
|
},
|
|
555
559
|
(a) => {
|
|
@@ -557,6 +561,28 @@ function registerPlatformTools(tool, client) {
|
|
|
557
561
|
return dryRun === true ? client.fulfillment.dryRunConnectExecutor(input) : client.fulfillment.connectExecutor(input);
|
|
558
562
|
}
|
|
559
563
|
);
|
|
564
|
+
tool(
|
|
565
|
+
"list_dsar_executor_presets",
|
|
566
|
+
"The versioned executor presets: each one's name, params, latest version, and whether it is usable now or waits on another platform's API (waitingOn names the platform and its spec items). Also this org's canary address for connection tests. Read-only.",
|
|
567
|
+
{},
|
|
568
|
+
() => client.fulfillment.executorPresets()
|
|
569
|
+
);
|
|
570
|
+
tool(
|
|
571
|
+
"upgrade_dsar_executor_preset",
|
|
572
|
+
"Rebuild a connection's profile and address from its preset's latest version (or presetVersion), keeping its id, credentials, system and scope \u2014 or adopt a preset on a hand-written connection by naming it. Answers with a diff. Use dryRun first: the answer shows exactly what would change and nothing is stored.",
|
|
573
|
+
{
|
|
574
|
+
id: import_zod2.z.string().describe("The connection id."),
|
|
575
|
+
preset: import_zod2.z.string().optional().describe("Only to adopt a preset on a connection that has none."),
|
|
576
|
+
presetVersion: import_zod2.z.number().int().optional(),
|
|
577
|
+
orgId: import_zod2.z.string().optional(),
|
|
578
|
+
atlasIdAppId: import_zod2.z.string().optional(),
|
|
579
|
+
dryRun: import_zod2.z.boolean().optional().describe("Answer the diff and change nothing.")
|
|
580
|
+
},
|
|
581
|
+
(a) => {
|
|
582
|
+
const { id, dryRun, ...input } = a;
|
|
583
|
+
return dryRun === true ? client.fulfillment.dryRunUpgradeExecutorPreset(id, input) : client.fulfillment.upgradeExecutorPreset(id, input);
|
|
584
|
+
}
|
|
585
|
+
);
|
|
560
586
|
tool(
|
|
561
587
|
"test_dsar_executor_webhook",
|
|
562
588
|
"Would this webhook delivery from a connected system verify? Runs the receiver's exact check (headers, timestamp tolerance, prefix, HMAC) on headers and a raw body you supply, acts on nothing, and returns { verified, stage, reason } naming the stage that failed. `body` must be the raw request body string, byte for byte. Read-only.",
|
|
@@ -590,15 +616,17 @@ function registerPlatformTools(tool, client) {
|
|
|
590
616
|
);
|
|
591
617
|
tool(
|
|
592
618
|
"test_dsar_executor",
|
|
593
|
-
"Try a connected system against one email WITHOUT filing a rights request. Runs its subject lookup and returns the raw upstream answers (credentials removed) and a one-line verdict. The open step is rendered but not sent, unless open is true on an export, which opens and polls a real export once. An erasure is never sent by a test.",
|
|
619
|
+
"Try a connected system against one email (or the org canary, canary: true) WITHOUT filing a rights request. Runs its subject lookup and returns the raw upstream answers (credentials removed) and a one-line verdict; code base_url_redirects means its baseUrl redirects and the verdict names where. The open step is rendered but not sent, unless open is true on an export, which opens and polls a real export once. An erasure is never sent by a test.",
|
|
594
620
|
{
|
|
595
621
|
id: import_zod2.z.string().describe("The connection id."),
|
|
596
|
-
email: import_zod2.z.string().describe("The address to look up."),
|
|
622
|
+
email: import_zod2.z.string().optional().describe("The address to look up. Omit it with canary."),
|
|
623
|
+
canary: import_zod2.z.boolean().optional().describe("Use this org's canary address \u2014 no real person involved. A canary locate also updates the connection's health."),
|
|
597
624
|
operation: import_zod2.z.enum(["locate", "export", "erase"]).optional().describe("Default locate."),
|
|
598
625
|
open: import_zod2.z.boolean().optional().describe("For export only: open a real export and poll it once.")
|
|
599
626
|
},
|
|
600
627
|
(a) => client.fulfillment.testExecutor(a.id, {
|
|
601
|
-
email: a.email,
|
|
628
|
+
...typeof a.email === "string" ? { email: a.email } : {},
|
|
629
|
+
...a.canary === true ? { canary: true } : {},
|
|
602
630
|
...a.operation ? { operation: a.operation } : {},
|
|
603
631
|
...typeof a.open === "boolean" ? { open: a.open } : {}
|
|
604
632
|
})
|
|
@@ -684,31 +712,107 @@ function registerPlatformTools(tool, client) {
|
|
|
684
712
|
);
|
|
685
713
|
}
|
|
686
714
|
|
|
687
|
-
// src/tools-
|
|
715
|
+
// src/tools-integrations.ts
|
|
688
716
|
var import_zod3 = require("zod");
|
|
717
|
+
function registerIntegrationTools(tool, client) {
|
|
718
|
+
const updateSiteSchema = import_zod3.z.object({
|
|
719
|
+
cbid: import_zod3.z.string().describe("Site identifier (cbid)."),
|
|
720
|
+
domain: import_zod3.z.string().optional().describe("New domain, a bare hostname. A move clears verification: verify the new domain afterwards."),
|
|
721
|
+
name: import_zod3.z.string().nullable().optional().describe("Display name data subjects see on the rights page and in notices; null clears it."),
|
|
722
|
+
aliases: import_zod3.z.array(import_zod3.z.string()).optional().describe("Other hosts serving the site (replaces the list; [] clears it). Accepted consent origins, never verified claims."),
|
|
723
|
+
dryRun: import_zod3.z.boolean().optional().describe("Answer with the diff and its effects, storing nothing.")
|
|
724
|
+
});
|
|
725
|
+
tool(
|
|
726
|
+
"update_site",
|
|
727
|
+
"Rename or move a site: its domain, display name and aliases. The cbid and the consent ledger stay. Moving the domain clears verification; the scanner and preview links follow the new domain. Use dryRun first to see the diff and every effect.",
|
|
728
|
+
updateSiteSchema.shape,
|
|
729
|
+
(a) => {
|
|
730
|
+
const { cbid, dryRun, ...patch } = updateSiteSchema.parse(a);
|
|
731
|
+
return client.sites.update(cbid, patch, { dryRun });
|
|
732
|
+
}
|
|
733
|
+
);
|
|
734
|
+
tool(
|
|
735
|
+
"integration_health",
|
|
736
|
+
"Check every link a site\u2019s privacy wiring depends on: the domain, the snippet and CSP on the live page, connected systems (base URL redirects, a test lookup), webhooks, partner links, Atlas cookie_consent, cookies needing review, the rights page, the mail provider and the request SLA. Each row has ok (null = could not check) and a fix hint. Read-only.",
|
|
737
|
+
{ cbid: import_zod3.z.string().optional().describe("Site identifier; optional when the org has one site.") },
|
|
738
|
+
(a) => client.integrationHealth(a.cbid)
|
|
739
|
+
);
|
|
740
|
+
const provisionSchema = import_zod3.z.object({
|
|
741
|
+
product: import_zod3.z.string().describe("A slug naming the product."),
|
|
742
|
+
domain: import_zod3.z.string().describe("The product\u2019s domain (bare hostname)."),
|
|
743
|
+
name: import_zod3.z.string().optional(),
|
|
744
|
+
aliases: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
745
|
+
cbid: import_zod3.z.string().optional().describe("Update this site instead of matching by domain."),
|
|
746
|
+
atlas: import_zod3.z.object({ secretKey: import_zod3.z.string(), cookieConsent: import_zod3.z.boolean().optional(), dsrWebhook: import_zod3.z.boolean().optional(), frontendApiHost: import_zod3.z.string().optional().describe("Your Atlas frontend API host (auth.example.com): declares the Atlas sign-in cookies on the site.") }).optional().describe("Atlas secret key (sk_\u2026) \u2014 used for this call only, never stored or returned."),
|
|
747
|
+
forumulate: import_zod3.z.object({ token: import_zod3.z.string(), orgId: import_zod3.z.string(), consent: import_zod3.z.boolean().optional(), executorKey: import_zod3.z.boolean().optional(), label: import_zod3.z.string().optional() }).optional().describe("Forumulate org token \u2014 used for this call only, never stored or returned."),
|
|
748
|
+
rightsApi: import_zod3.z.object({ baseUrl: import_zod3.z.string(), secretKey: import_zod3.z.string(), profilePreset: import_zod3.z.string().optional() }).optional(),
|
|
749
|
+
dryRun: import_zod3.z.boolean().optional().describe("Report what each step would do; write nothing on any platform. Run this first.")
|
|
750
|
+
});
|
|
751
|
+
tool(
|
|
752
|
+
"provision_product",
|
|
753
|
+
"Wire a product\u2019s privacy in one call: create or update the site, connected systems, the Atlas request-completion webhook and hosted-page consent banner, and Forumulate consent and executor key. Writes across three platforms; run with dryRun first. Idempotent: a re-run answers every step unchanged. No secret appears in the result.",
|
|
754
|
+
provisionSchema.shape,
|
|
755
|
+
(a) => {
|
|
756
|
+
const { dryRun, ...input } = provisionSchema.parse(a);
|
|
757
|
+
return client.provision(input, { dryRun });
|
|
758
|
+
}
|
|
759
|
+
);
|
|
760
|
+
tool(
|
|
761
|
+
"list_site_partners",
|
|
762
|
+
"Which partner platforms (Forumulate, Atlas) receive this site\u2019s consent events, each with its status, and which partners are on offer. Read-only.",
|
|
763
|
+
{ cbid: import_zod3.z.string() },
|
|
764
|
+
(a) => client.sites.listPartners(a.cbid)
|
|
765
|
+
);
|
|
766
|
+
const linkSchema = import_zod3.z.object({
|
|
767
|
+
cbid: import_zod3.z.string(),
|
|
768
|
+
partner: import_zod3.z.enum(["forumulate", "atlas"]),
|
|
769
|
+
externalId: import_zod3.z.string().describe("The partner\u2019s id for the receiving account, e.g. a Forumulate organisation id."),
|
|
770
|
+
label: import_zod3.z.string().optional().describe('Shown with the partner name, e.g. "docs".'),
|
|
771
|
+
events: import_zod3.z.array(import_zod3.z.enum(["consent.recorded", "consent.withdrawn"])).optional(),
|
|
772
|
+
dryRun: import_zod3.z.boolean().optional()
|
|
773
|
+
});
|
|
774
|
+
tool(
|
|
775
|
+
"link_site_partner",
|
|
776
|
+
"Grant a partner platform this site\u2019s consent events (they start flowing out to it). No secret is created: deliveries are signed with Cookie Munch\u2019s own key. Idempotent.",
|
|
777
|
+
linkSchema.shape,
|
|
778
|
+
(a) => {
|
|
779
|
+
const { cbid, dryRun, ...input } = linkSchema.parse(a);
|
|
780
|
+
return client.sites.linkPartner(cbid, input, { dryRun });
|
|
781
|
+
}
|
|
782
|
+
);
|
|
783
|
+
tool(
|
|
784
|
+
"unlink_site_partner",
|
|
785
|
+
"Revoke a partner link: no further consent events go to that partner.",
|
|
786
|
+
{ cbid: import_zod3.z.string(), linkId: import_zod3.z.string() },
|
|
787
|
+
(a) => client.sites.unlinkPartner(a.cbid, a.linkId)
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
// src/tools-rights-page.ts
|
|
792
|
+
var import_zod4 = require("zod");
|
|
689
793
|
function registerRightsTools(tool, client) {
|
|
690
|
-
const cbid = { cbid:
|
|
794
|
+
const cbid = { cbid: import_zod4.z.string().describe("Site identifier (cbid). Must belong to your org.") };
|
|
691
795
|
const base = {
|
|
692
|
-
baseUpdatedAt:
|
|
796
|
+
baseUpdatedAt: import_zod4.z.union([import_zod4.z.number().int(), import_zod4.z.string(), import_zod4.z.null()]).optional().describe("The draft\u2019s updatedAt from your last read (null if it had none). If someone saved since, the write is refused with 409 draft_conflict and the current draft; omit to overwrite regardless.")
|
|
693
797
|
};
|
|
694
798
|
const baseOpt = (a) => a.baseUpdatedAt !== void 0 ? { baseUpdatedAt: a.baseUpdatedAt } : {};
|
|
695
799
|
tool("get_rights_page", "Read the site\u2019s rights page DRAFT (the default page until first saved), with warnings that would block publishing.", cbid, (a) => client.rightsPage.get(a.cbid));
|
|
696
800
|
tool(
|
|
697
801
|
"update_rights_page",
|
|
698
802
|
"Replace the rights page draft with a full document (theme, sections, form, i18n, seo, customCss). Nothing goes live until publish_rights_page. Prefer patch_rights_page for small changes and preview_rights_page when unsure. Pass baseUpdatedAt (from get_rights_page) to avoid overwriting someone else\u2019s save: a mismatch is 409 draft_conflict with the current draft.",
|
|
699
|
-
{ ...cbid, page:
|
|
803
|
+
{ ...cbid, page: import_zod4.z.record(import_zod4.z.unknown()).describe("The whole RightsPage document (v: 1)."), ...base },
|
|
700
804
|
(a) => client.rightsPage.put(a.cbid, a.page, baseOpt(a))
|
|
701
805
|
);
|
|
702
806
|
tool(
|
|
703
807
|
"patch_rights_page",
|
|
704
808
|
"Change part of the rights page draft: objects merge, arrays (sections, request types, fields) replace whole, null removes a field. baseUpdatedAt works as on update_rights_page (409 draft_conflict).",
|
|
705
|
-
{ ...cbid, patch:
|
|
809
|
+
{ ...cbid, patch: import_zod4.z.record(import_zod4.z.unknown()), ...base },
|
|
706
810
|
(a) => client.rightsPage.patch(a.cbid, a.patch, baseOpt(a))
|
|
707
811
|
);
|
|
708
812
|
tool(
|
|
709
813
|
"preview_rights_page",
|
|
710
814
|
'Validate a rights-page write WITHOUT saving: returns the document as it would be stored and any publish warnings. mode "patch" (default) or "put".',
|
|
711
|
-
{ ...cbid, page:
|
|
815
|
+
{ ...cbid, page: import_zod4.z.record(import_zod4.z.unknown()), mode: import_zod4.z.enum(["patch", "put"]).optional() },
|
|
712
816
|
(a) => client.rightsPage.dryRun(a.cbid, a.page, { mode: a.mode ?? "patch" })
|
|
713
817
|
);
|
|
714
818
|
tool("get_published_rights_page", "Read the LIVE rights page document (404 not_published while the site shows the default page).", cbid, (a) => client.rightsPage.getPublished(a.cbid));
|
|
@@ -722,14 +826,14 @@ function registerRightsTools(tool, client) {
|
|
|
722
826
|
tool(
|
|
723
827
|
"rollback_rights_page",
|
|
724
828
|
"Publish an earlier version of the rights page again (as a new version): it goes live at once and REPLACES the current draft, so unpublished edits are lost and cannot be recovered (versions hold only published documents). Pass baseUpdatedAt (from get_rights_page) to refuse with 409 draft_conflict if anyone saved the draft since you read it.",
|
|
725
|
-
{ ...cbid, version:
|
|
829
|
+
{ ...cbid, version: import_zod4.z.number().int().min(1), ...base },
|
|
726
830
|
(a) => client.rightsPage.rollback(a.cbid, a.version, baseOpt(a))
|
|
727
831
|
);
|
|
728
832
|
}
|
|
729
833
|
function registerRightsPageTools(tool, client) {
|
|
730
|
-
const site =
|
|
834
|
+
const site = import_zod4.z.object({ cbid: import_zod4.z.string().describe("Site identifier (cbid). Must belong to your org.") });
|
|
731
835
|
const host = site.extend({
|
|
732
|
-
hostname:
|
|
836
|
+
hostname: import_zod4.z.string().describe("The custom hostname, e.g. privacy.example.com (unicode or punycode).")
|
|
733
837
|
});
|
|
734
838
|
tool(
|
|
735
839
|
"list_rights_page_domains",
|
|
@@ -869,10 +973,10 @@ function registerTools(server, client) {
|
|
|
869
973
|
}
|
|
870
974
|
});
|
|
871
975
|
};
|
|
872
|
-
const cbid = { cbid:
|
|
976
|
+
const cbid = { cbid: import_zod5.z.string().describe("Site identifier (cbid). Must belong to your org.") };
|
|
873
977
|
const range = {
|
|
874
|
-
from:
|
|
875
|
-
to:
|
|
978
|
+
from: import_zod5.z.number().optional().describe("Epoch-ms lower bound."),
|
|
979
|
+
to: import_zod5.z.number().optional().describe("Epoch-ms upper bound.")
|
|
876
980
|
};
|
|
877
981
|
tool(
|
|
878
982
|
"whoami",
|
|
@@ -890,19 +994,19 @@ function registerTools(server, client) {
|
|
|
890
994
|
tool(
|
|
891
995
|
"get_site",
|
|
892
996
|
"One site: its domain, cbid and verification status. Read-only.",
|
|
893
|
-
{ cbid:
|
|
997
|
+
{ cbid: import_zod5.z.string() },
|
|
894
998
|
(a) => client.sites.get(a.cbid)
|
|
895
999
|
);
|
|
896
1000
|
tool(
|
|
897
1001
|
"get_site_banner",
|
|
898
1002
|
"Which banner design a site uses, or bannerId null when none is assigned. Read-only.",
|
|
899
|
-
{ cbid:
|
|
1003
|
+
{ cbid: import_zod5.z.string() },
|
|
900
1004
|
(a) => client.sites.banner(a.cbid)
|
|
901
1005
|
);
|
|
902
1006
|
tool(
|
|
903
1007
|
"get_privacy_policy",
|
|
904
1008
|
"Generate the site's privacy and cookie policy as Markdown, naming the org's data controller. Needs a contact email: the one given, else the org controller's, else the owner's. Read-only \u2014 nothing is published.",
|
|
905
|
-
{ cbid:
|
|
1009
|
+
{ cbid: import_zod5.z.string(), contactEmail: import_zod5.z.string().optional(), effectiveDate: import_zod5.z.string().optional().describe("YYYY-MM-DD; defaults to today."), jurisdictions: import_zod5.z.array(import_zod5.z.string()).optional() },
|
|
906
1010
|
(a) => client.sites.policy(a.cbid, {
|
|
907
1011
|
...a.contactEmail ? { contactEmail: a.contactEmail } : {},
|
|
908
1012
|
...a.effectiveDate ? { effectiveDate: a.effectiveDate } : {},
|
|
@@ -912,7 +1016,7 @@ function registerTools(server, client) {
|
|
|
912
1016
|
tool(
|
|
913
1017
|
"set_ad_personalization",
|
|
914
1018
|
"Add or remove the separate 'personalised ads' choice on the site's live banner. With it on, accepting marketing no longer implies personalised ads unless `default` is true.",
|
|
915
|
-
{ cbid:
|
|
1019
|
+
{ cbid: import_zod5.z.string(), enabled: import_zod5.z.boolean(), default: import_zod5.z.boolean().optional(), label: import_zod5.z.string().optional() },
|
|
916
1020
|
(a) => client.sites.setAdPersonalization(a.cbid, {
|
|
917
1021
|
enabled: a.enabled,
|
|
918
1022
|
...a.default !== void 0 ? { default: a.default } : {},
|
|
@@ -923,11 +1027,11 @@ function registerTools(server, client) {
|
|
|
923
1027
|
"analyze_session",
|
|
924
1028
|
"Analyse a captured browsing session against the consent it ran under: which trackers fired after the visitor opted out, and what personal data left the page. Read-only.",
|
|
925
1029
|
{
|
|
926
|
-
cbid:
|
|
927
|
-
har:
|
|
928
|
-
requests:
|
|
929
|
-
consent:
|
|
930
|
-
gpc:
|
|
1030
|
+
cbid: import_zod5.z.string(),
|
|
1031
|
+
har: import_zod5.z.unknown().optional().describe("A HAR export of the session."),
|
|
1032
|
+
requests: import_zod5.z.array(import_zod5.z.unknown()).optional().describe("Or the requests directly."),
|
|
1033
|
+
consent: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.boolean()).optional(),
|
|
1034
|
+
gpc: import_zod5.z.boolean().optional()
|
|
931
1035
|
},
|
|
932
1036
|
(a) => client.sites.analyzeSession(a.cbid, {
|
|
933
1037
|
...a.har !== void 0 ? { har: a.har } : {},
|
|
@@ -939,14 +1043,14 @@ function registerTools(server, client) {
|
|
|
939
1043
|
tool(
|
|
940
1044
|
"create_site",
|
|
941
1045
|
"Create a new site. The cbid is auto-generated if you omit it.",
|
|
942
|
-
{ domain:
|
|
1046
|
+
{ domain: import_zod5.z.string().describe("The site domain, e.g. example.com."), cbid: import_zod5.z.string().optional().describe("Optional explicit cbid.") },
|
|
943
1047
|
(a) => client.sites.create({ domain: a.domain, ...typeof a.cbid === "string" ? { cbid: a.cbid } : {} })
|
|
944
1048
|
);
|
|
945
1049
|
tool(
|
|
946
1050
|
"create_sites_bulk",
|
|
947
1051
|
"Create up to 100 sites in one call. Partial success: each item reports ok or its own error, and a bad or duplicate item fails only itself.",
|
|
948
1052
|
{
|
|
949
|
-
sites:
|
|
1053
|
+
sites: import_zod5.z.array(import_zod5.z.object({ domain: import_zod5.z.string(), cbid: import_zod5.z.string().optional(), platform: import_zod5.z.string().optional() })).min(1).max(100)
|
|
950
1054
|
},
|
|
951
1055
|
(a) => client.sites.createBulk(a.sites)
|
|
952
1056
|
);
|
|
@@ -956,15 +1060,15 @@ function registerTools(server, client) {
|
|
|
956
1060
|
"Replace (overwrite) the banner/consent configuration for a site via PUT. This is destructive, not a merge: any top-level SiteConfig field you omit from `config` reverts to its default rather than keeping its current value \u2014 unless keepUnspecified is true, in which case omitted top-level fields keep their stored value and only the fields you send are replaced (each whole). A top-level field sent as null reverts to its default. To change one setting, use patch_site_config instead \u2014 it merges server-side. Prefer the narrower set_* tools (set_blocking, set_banner_basics, etc.) when they cover your change.",
|
|
957
1061
|
{
|
|
958
1062
|
...cbid,
|
|
959
|
-
config:
|
|
960
|
-
keepUnspecified:
|
|
1063
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).describe("The full SiteConfig to write, not a patch. Without keepUnspecified, omitted top-level fields are NOT preserved from the current config."),
|
|
1064
|
+
keepUnspecified: import_zod5.z.boolean().optional().describe("PUT ?keep=unspecified: keep the stored value of every top-level field `config` omits, instead of reverting it to its default.")
|
|
961
1065
|
},
|
|
962
1066
|
(a) => a.keepUnspecified === true ? client.sites.putConfig(a.cbid, a.config, { keep: "unspecified" }) : client.sites.putConfig(a.cbid, a.config)
|
|
963
1067
|
);
|
|
964
1068
|
tool(
|
|
965
1069
|
"patch_site_config",
|
|
966
1070
|
`Change part of a site's banner/consent configuration. The patch is a JSON Merge Patch (RFC 7386) over the stored config server-side: any field you omit keeps its current value, and a field set to null is REMOVED (it falls back to its default) \u2014 e.g. { "banner": { "i18n": { "es": null } } } drops the Spanish override. This is the safe way to flip one setting, and it needs no read-modify-write. Use update_site_config only when you genuinely mean to replace the whole document.`,
|
|
967
|
-
{ ...cbid, config:
|
|
1071
|
+
{ ...cbid, config: import_zod5.z.record(import_zod5.z.unknown()).describe('The subset of SiteConfig to change, e.g. { "banner": { "showRightsLink": true } }. Everything else is preserved; null removes a field.') },
|
|
968
1072
|
(a) => client.sites.patchConfig(a.cbid, a.config)
|
|
969
1073
|
);
|
|
970
1074
|
tool(
|
|
@@ -972,9 +1076,9 @@ function registerTools(server, client) {
|
|
|
972
1076
|
'Preview a config change WITHOUT saving it: returns the config as it would be saved, a diff of every field that would change, and any warnings (plan-gated or unrecognised fields). mode "patch" (default) previews patch_site_config; mode "put" previews update_site_config, and its diff lists everything a replace would revert to its default (unless keepUnspecified is true). Use it before any write you are not sure of.',
|
|
973
1077
|
{
|
|
974
1078
|
...cbid,
|
|
975
|
-
config:
|
|
976
|
-
mode:
|
|
977
|
-
keepUnspecified:
|
|
1079
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).describe('The patch (or, with mode "put", the full config) to preview.'),
|
|
1080
|
+
mode: import_zod5.z.enum(["patch", "put"]).optional().describe("patch (default) merges; put replaces."),
|
|
1081
|
+
keepUnspecified: import_zod5.z.boolean().optional().describe('With mode "put": preview update_site_config with keepUnspecified (omitted top-level fields keep their stored value).')
|
|
978
1082
|
},
|
|
979
1083
|
(a) => client.sites.dryRunConfig(a.cbid, a.config, {
|
|
980
1084
|
mode: a.mode ?? "patch",
|
|
@@ -986,8 +1090,8 @@ function registerTools(server, client) {
|
|
|
986
1090
|
'Check a banner config for consent-button parity WITHOUT saving it: is "Accept all" more prominent than "Reject all" anywhere \u2014 a brighter or more saturated colour, a bigger or bolder button, Reject styled as a link, hidden, below the fold, set apart, missing from the first layer, or worded to guilt-trip? Regulators (EDPB, CNIL) treat that as a dark pattern. Returns findings, a 0\u2013100 score and the reject style that would match Accept. It checks exactly what the write would store: merged over the stored config as patch_site_config would, or with replace: true replaced as update_site_config would. Run it before writing any banner design.',
|
|
987
1091
|
{
|
|
988
1092
|
...cbid,
|
|
989
|
-
config:
|
|
990
|
-
replace:
|
|
1093
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).describe("The proposed SiteConfig (or a partial one, or a v2 flow design)."),
|
|
1094
|
+
replace: import_zod5.z.boolean().optional().describe("Check what update_site_config (a full replace) would store, instead of what patch_site_config (a merge) would.")
|
|
991
1095
|
},
|
|
992
1096
|
async (a) => {
|
|
993
1097
|
const r = await client.sites.lintConfig(a.cbid, a.config, a.replace === true ? { replace: true } : {});
|
|
@@ -1011,7 +1115,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1011
1115
|
tool(
|
|
1012
1116
|
"get_consent_log",
|
|
1013
1117
|
"Get recent anonymised consent records for a site.",
|
|
1014
|
-
{ ...cbid, ...range, limit:
|
|
1118
|
+
{ ...cbid, ...range, limit: import_zod5.z.number().optional().describe("Max records to return (default 200).") },
|
|
1015
1119
|
(a) => client.consent.log(a.cbid, {
|
|
1016
1120
|
from: a.from,
|
|
1017
1121
|
to: a.to,
|
|
@@ -1021,7 +1125,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1021
1125
|
tool(
|
|
1022
1126
|
"get_subject_consent",
|
|
1023
1127
|
"One person's consent records across every site in the org \u2014 web, mobile and desktop \u2014 by the subjectId your apps attach. Consent data: needs the consent:read scope. Read-only.",
|
|
1024
|
-
{ subjectId:
|
|
1128
|
+
{ subjectId: import_zod5.z.string() },
|
|
1025
1129
|
(a) => client.subjects.consent(a.subjectId)
|
|
1026
1130
|
);
|
|
1027
1131
|
tool("list_dsar", "List all Data Subject Access Requests for your organization.", {}, () => client.dsar.list());
|
|
@@ -1029,51 +1133,53 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1029
1133
|
"update_dsar_executor",
|
|
1030
1134
|
"Change a connected system in place \u2014 its profile, address, credential or auto flag. Only what you pass changes; the stored credential is kept unless you give a new one. With dryRun, answers the connection as it would be and a diff, and changes nothing.",
|
|
1031
1135
|
{
|
|
1032
|
-
id:
|
|
1033
|
-
patch:
|
|
1034
|
-
dryRun:
|
|
1136
|
+
id: import_zod5.z.string(),
|
|
1137
|
+
patch: import_zod5.z.record(import_zod5.z.unknown()),
|
|
1138
|
+
dryRun: import_zod5.z.boolean().optional().describe("Validate and diff without saving.")
|
|
1035
1139
|
},
|
|
1036
1140
|
(a) => a.dryRun === true ? client.fulfillment.dryRunUpdateExecutor(a.id, a.patch) : client.fulfillment.updateExecutor(a.id, a.patch)
|
|
1037
1141
|
);
|
|
1038
1142
|
tool(
|
|
1039
1143
|
"get_dsar",
|
|
1040
1144
|
"One rights request by id, including its status and the deadline it must be answered by.",
|
|
1041
|
-
{ id:
|
|
1145
|
+
{ id: import_zod5.z.string() },
|
|
1042
1146
|
(a) => client.dsar.get(a.id)
|
|
1043
1147
|
);
|
|
1044
1148
|
tool(
|
|
1045
1149
|
"erase_dsar_subject",
|
|
1046
1150
|
"For a deletion request that is past identity verification: erase the person\u2019s consent records on one site, identified by their consent stamp. Irreversible. The erasure is noted on the request. If the response carries a warning, nothing was cryptographically erased \u2014 tell the user.",
|
|
1047
|
-
{ id:
|
|
1151
|
+
{ id: import_zod5.z.string(), cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1048
1152
|
(a) => client.dsar.erase(a.id, a.cbid, a.stamp)
|
|
1049
1153
|
);
|
|
1050
1154
|
tool(
|
|
1051
1155
|
"export_dsar_subject",
|
|
1052
1156
|
"For an access or portability request that is past identity verification: the person\u2019s consent records on one site, identified by their consent stamp. The export is noted on the request.",
|
|
1053
|
-
{ id:
|
|
1157
|
+
{ id: import_zod5.z.string(), cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1054
1158
|
(a) => client.dsar.export(a.id, a.cbid, a.stamp)
|
|
1055
1159
|
);
|
|
1056
1160
|
tool(
|
|
1057
1161
|
"get_dsar_response_notice",
|
|
1058
1162
|
"The subject-facing response notice for a request, as plain text \u2014 what to send the person. Read-only; nothing is sent.",
|
|
1059
|
-
{ id:
|
|
1163
|
+
{ id: import_zod5.z.string() },
|
|
1060
1164
|
(a) => client.dsar.response(a.id)
|
|
1061
1165
|
);
|
|
1062
1166
|
tool(
|
|
1063
1167
|
"create_dsar",
|
|
1064
1168
|
"Open a new Data Subject Access Request.",
|
|
1065
1169
|
{
|
|
1066
|
-
type:
|
|
1067
|
-
subjectEmail:
|
|
1068
|
-
regulation:
|
|
1069
|
-
note:
|
|
1070
|
-
|
|
1170
|
+
type: import_zod5.z.enum(["access", "deletion", "rectification", "portability", "opt-out"]).describe("DSAR right being exercised."),
|
|
1171
|
+
subjectEmail: import_zod5.z.string().describe("The data subject\u2019s email."),
|
|
1172
|
+
regulation: import_zod5.z.enum(["gdpr", "ccpa"]).describe("Governing regulation."),
|
|
1173
|
+
note: import_zod5.z.string().optional().describe("Optional INTERNAL note; never shown to the data subject."),
|
|
1174
|
+
messageToSubject: import_zod5.z.string().max(2e3).optional().describe("The line the data subject reads in the response notice. Never an API key."),
|
|
1175
|
+
test: import_zod5.z.boolean().optional().describe("Mark it as a test request: kept off the SLA board and deletable afterwards with delete_test_dsar.")
|
|
1071
1176
|
},
|
|
1072
1177
|
(a) => client.dsar.create({
|
|
1073
1178
|
type: a.type,
|
|
1074
1179
|
subjectEmail: a.subjectEmail,
|
|
1075
1180
|
regulation: a.regulation,
|
|
1076
1181
|
...typeof a.note === "string" ? { note: a.note } : {},
|
|
1182
|
+
...typeof a.messageToSubject === "string" ? { messageToSubject: a.messageToSubject } : {},
|
|
1077
1183
|
...a.test === true ? { test: true } : {}
|
|
1078
1184
|
})
|
|
1079
1185
|
);
|
|
@@ -1081,11 +1187,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1081
1187
|
"create_rights_link",
|
|
1082
1188
|
"Mint a signed, single-use link to a site\u2019s hosted rights page for a person you know is signed in to that site. On the page their email is filled in and locked and the email-code step is skipped; the filed request is recorded as verified by their account. Give the link only to that person. Expires in 15 minutes by default (max 1 hour). Needs dsar:write.",
|
|
1083
1189
|
{
|
|
1084
|
-
cbid:
|
|
1085
|
-
email:
|
|
1086
|
-
userId:
|
|
1087
|
-
rights:
|
|
1088
|
-
ttlSeconds:
|
|
1190
|
+
cbid: import_zod5.z.string().describe("Site identifier (cbid). Must belong to your org."),
|
|
1191
|
+
email: import_zod5.z.string().describe("The signed-in person\u2019s verified email address."),
|
|
1192
|
+
userId: import_zod5.z.string().optional().describe("Your own account id for them; recorded on the request."),
|
|
1193
|
+
rights: import_zod5.z.array(import_zod5.z.enum(["access", "erasure", "rectification", "portability", "restriction", "objection", "opt_out_sale", "opt_out_targeted", "limit_sensitive"])).min(1).optional().describe("Limit the link to these rights. Default: every right the page offers."),
|
|
1194
|
+
ttlSeconds: import_zod5.z.number().int().min(60).max(3600).optional().describe("How long the link works, in seconds (default 900).")
|
|
1089
1195
|
},
|
|
1090
1196
|
(a) => client.rightsLinks.create(a.cbid, {
|
|
1091
1197
|
subject: { email: a.email, ...typeof a.userId === "string" ? { userId: a.userId } : {} },
|
|
@@ -1096,7 +1202,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1096
1202
|
tool(
|
|
1097
1203
|
"delete_test_dsar",
|
|
1098
1204
|
"Delete a TEST rights request (one created with test: true), with its tasks and their upstream log. Real requests cannot be deleted and are refused. The deletion is recorded in the audit log.",
|
|
1099
|
-
{ id:
|
|
1205
|
+
{ id: import_zod5.z.string().describe("The test request id.") },
|
|
1100
1206
|
async (a) => {
|
|
1101
1207
|
await client.dsar.delete(a.id);
|
|
1102
1208
|
return { deleted: a.id };
|
|
@@ -1105,17 +1211,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1105
1211
|
tool(
|
|
1106
1212
|
"mark_dsar_test",
|
|
1107
1213
|
"Mark a CLOSED rights request (completed or rejected) as a test request, after the fact \u2014 for trial requests filed before test: true existed. An open request is refused (request_not_closed), so a live obligation can never be relabelled. Recorded in the audit log; afterwards delete_test_dsar can remove it. Returns { request, changed }.",
|
|
1108
|
-
{ id:
|
|
1214
|
+
{ id: import_zod5.z.string().describe("The closed request id.") },
|
|
1109
1215
|
(a) => client.dsar.markTest(a.id)
|
|
1110
1216
|
);
|
|
1111
1217
|
tool(
|
|
1112
1218
|
"advance_dsar",
|
|
1113
1219
|
"Advance a DSAR to a new status (received \u2192 verifying \u2192 in_progress \u2192 completed, or rejected).",
|
|
1114
1220
|
{
|
|
1115
|
-
id:
|
|
1116
|
-
toStatus:
|
|
1221
|
+
id: import_zod5.z.string().describe("The DSAR id."),
|
|
1222
|
+
toStatus: import_zod5.z.enum(["received", "verifying", "in_progress", "completed", "rejected"]).describe("Target status."),
|
|
1223
|
+
messageToSubject: import_zod5.z.string().max(2e3).optional().describe("Replaces the line the data subject reads in the notice \u2014 for a rejection, why.")
|
|
1117
1224
|
},
|
|
1118
|
-
(a) => client.dsar.advance(a.id, a.toStatus)
|
|
1225
|
+
(a) => typeof a.messageToSubject === "string" ? client.dsar.advance(a.id, a.toStatus, { messageToSubject: a.messageToSubject }) : client.dsar.advance(a.id, a.toStatus)
|
|
1119
1226
|
);
|
|
1120
1227
|
tool(
|
|
1121
1228
|
"export_consent",
|
|
@@ -1126,7 +1233,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1126
1233
|
tool(
|
|
1127
1234
|
"get_receipt",
|
|
1128
1235
|
"Fetch the signed consent receipt for a single consent record (by stamp).",
|
|
1129
|
-
{ ...cbid, stamp:
|
|
1236
|
+
{ ...cbid, stamp: import_zod5.z.string().describe("The consent record stamp/id.") },
|
|
1130
1237
|
(a) => client.consent.receipt(a.cbid, a.stamp)
|
|
1131
1238
|
);
|
|
1132
1239
|
tool("delete_site", "Delete a site (cbid) and its configuration from your org.", { ...cbid }, async (a) => {
|
|
@@ -1138,13 +1245,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1138
1245
|
"create_vendor",
|
|
1139
1246
|
"Register a vendor (processor) and compute its risk score.",
|
|
1140
1247
|
{
|
|
1141
|
-
name:
|
|
1142
|
-
category:
|
|
1143
|
-
dataShared:
|
|
1144
|
-
dpaSigned:
|
|
1145
|
-
subprocessors:
|
|
1146
|
-
certifications:
|
|
1147
|
-
region:
|
|
1248
|
+
name: import_zod5.z.string().describe("Vendor name."),
|
|
1249
|
+
category: import_zod5.z.string().describe("Vendor category, e.g. analytics."),
|
|
1250
|
+
dataShared: import_zod5.z.array(import_zod5.z.string()).describe("Categories of data shared with the vendor."),
|
|
1251
|
+
dpaSigned: import_zod5.z.boolean().describe("Whether a Data Processing Agreement is signed."),
|
|
1252
|
+
subprocessors: import_zod5.z.number().describe("Number of subprocessors."),
|
|
1253
|
+
certifications: import_zod5.z.array(import_zod5.z.string()).describe("Compliance certifications, e.g. ISO27001."),
|
|
1254
|
+
region: import_zod5.z.string().describe("Primary processing region, e.g. EU.")
|
|
1148
1255
|
},
|
|
1149
1256
|
(a) => client.vendors.create({
|
|
1150
1257
|
name: a.name,
|
|
@@ -1162,13 +1269,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1162
1269
|
"create_ropa",
|
|
1163
1270
|
"Create a Record of Processing Activity (RoPA) entry.",
|
|
1164
1271
|
{
|
|
1165
|
-
name:
|
|
1166
|
-
purpose:
|
|
1167
|
-
legalBasis:
|
|
1168
|
-
dataCategories:
|
|
1169
|
-
recipients:
|
|
1170
|
-
retentionDays:
|
|
1171
|
-
crossBorderTransfer:
|
|
1272
|
+
name: import_zod5.z.string().describe("Activity name."),
|
|
1273
|
+
purpose: import_zod5.z.string().describe("Purpose of processing."),
|
|
1274
|
+
legalBasis: import_zod5.z.enum(["consent", "contract", "legal-obligation", "vital-interests", "public-task", "legitimate-interests"]).describe("GDPR legal basis."),
|
|
1275
|
+
dataCategories: import_zod5.z.array(import_zod5.z.string()).describe("Categories of personal data."),
|
|
1276
|
+
recipients: import_zod5.z.array(import_zod5.z.string()).describe("Recipients of the data."),
|
|
1277
|
+
retentionDays: import_zod5.z.number().describe("Retention period in days."),
|
|
1278
|
+
crossBorderTransfer: import_zod5.z.boolean().describe("Whether data is transferred across borders.")
|
|
1172
1279
|
},
|
|
1173
1280
|
(a) => client.ropa.create({
|
|
1174
1281
|
name: a.name,
|
|
@@ -1189,7 +1296,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1189
1296
|
tool(
|
|
1190
1297
|
"scan_site",
|
|
1191
1298
|
"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:
|
|
1299
|
+
{ ...cbid, wait: import_zod5.z.boolean().optional().describe("Wait for the scan to finish (up to 100 s) and return its outcome.") },
|
|
1193
1300
|
async (a) => {
|
|
1194
1301
|
let started;
|
|
1195
1302
|
try {
|
|
@@ -1203,7 +1310,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1203
1310
|
tool(
|
|
1204
1311
|
"get_scan_status",
|
|
1205
1312
|
"Get a site\u2019s last cookie scan: state (queued, scanning, done, failed), scanId, durationMs, cookieCount, pagesVisited and error when it failed.",
|
|
1206
|
-
{ ...cbid, wait:
|
|
1313
|
+
{ ...cbid, wait: import_zod5.z.number().min(0).max(60).optional().describe("Seconds (\u226460) to wait for a running scan to settle before answering.") },
|
|
1207
1314
|
(a) => a.wait !== void 0 ? client.sites.scanStatus(a.cbid, { wait: a.wait }) : client.sites.scanStatus(a.cbid)
|
|
1208
1315
|
);
|
|
1209
1316
|
tool(
|
|
@@ -1215,16 +1322,25 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1215
1322
|
tool("list_brand_kits", "List reusable brand kits (colors/logo/typography) for your org.", {}, () => client.brandKits.list());
|
|
1216
1323
|
tool("list_preferences", "List configurable consent preferences/purposes for your org.", {}, () => client.preferences.list());
|
|
1217
1324
|
tool("list_members", "List the members of your organization.", {}, () => client.members.list());
|
|
1218
|
-
tool("list_api_keys", "List the API keys for your organization (secrets are not returned).", {}, () => client.keys.list());
|
|
1325
|
+
tool("list_api_keys", "List the API keys for your organization (secrets are not returned), with each key\u2019s scopes, expiry and when it was last used.", {}, () => client.keys.list());
|
|
1326
|
+
tool(
|
|
1327
|
+
"api_key_report",
|
|
1328
|
+
"Key hygiene: keys not used for a while, keys with broad (full or wide write) access, and keys expiring soon, each with the reason. Read-only.",
|
|
1329
|
+
{
|
|
1330
|
+
unusedDays: import_zod5.z.number().int().min(1).max(3650).optional().describe("Unused for at least this many days (default 90)."),
|
|
1331
|
+
expiringDays: import_zod5.z.number().int().min(1).max(3650).optional().describe("Expiring within this many days (default 14).")
|
|
1332
|
+
},
|
|
1333
|
+
(a) => client.keys.report({ ...a.unusedDays !== void 0 ? { unusedDays: a.unusedDays } : {}, ...a.expiringDays !== void 0 ? { expiringDays: a.expiringDays } : {} })
|
|
1334
|
+
);
|
|
1219
1335
|
tool("get_usage", "Get the current usage/quota summary for your organization.", {}, () => client.usage());
|
|
1220
1336
|
tool("list_webhooks", "List webhook subscriptions for your organization.", {}, () => client.webhooks.list());
|
|
1221
1337
|
tool(
|
|
1222
1338
|
"create_webhook",
|
|
1223
1339
|
"Create a webhook subscription. The response includes the signing secret (shown once).",
|
|
1224
1340
|
{
|
|
1225
|
-
url:
|
|
1226
|
-
events:
|
|
1227
|
-
cbid:
|
|
1341
|
+
url: import_zod5.z.string().describe("HTTPS endpoint to deliver events to."),
|
|
1342
|
+
events: import_zod5.z.array(import_zod5.z.string()).describe("Event names to subscribe to, e.g. consent.created."),
|
|
1343
|
+
cbid: import_zod5.z.string().optional().describe("Optional site cbid to scope the subscription to.")
|
|
1228
1344
|
},
|
|
1229
1345
|
(a) => client.webhooks.create({
|
|
1230
1346
|
url: a.url,
|
|
@@ -1235,13 +1351,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1235
1351
|
tool(
|
|
1236
1352
|
"roll_webhook_secret",
|
|
1237
1353
|
"Rotate a webhook subscription\u2019s signing secret. The new secret is returned once; the receiving endpoint must be updated to verify with it.",
|
|
1238
|
-
{ id:
|
|
1354
|
+
{ id: import_zod5.z.string() },
|
|
1239
1355
|
(a) => client.webhooks.rollSecret(a.id)
|
|
1240
1356
|
);
|
|
1241
1357
|
tool(
|
|
1242
1358
|
"test_webhook",
|
|
1243
1359
|
"Send a signed test event to a webhook subscription now, and report what the endpoint answered.",
|
|
1244
|
-
{ id:
|
|
1360
|
+
{ id: import_zod5.z.string() },
|
|
1245
1361
|
(a) => client.webhooks.test(a.id)
|
|
1246
1362
|
);
|
|
1247
1363
|
tool(
|
|
@@ -1253,18 +1369,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1253
1369
|
tool(
|
|
1254
1370
|
"replay_webhook_dead_letter",
|
|
1255
1371
|
"Deliver a dead-lettered webhook event again, to the subscription as it is now.",
|
|
1256
|
-
{ id:
|
|
1372
|
+
{ id: import_zod5.z.string() },
|
|
1257
1373
|
(a) => client.webhooks.replayDeadLetter(a.id)
|
|
1258
1374
|
);
|
|
1259
1375
|
tool(
|
|
1260
1376
|
"update_webhook",
|
|
1261
1377
|
"Change a webhook subscription, or pause it with active:false (delivery stops; the subscription is kept). Only the fields given change. cbid: null widens it to every property in the org.",
|
|
1262
1378
|
{
|
|
1263
|
-
id:
|
|
1264
|
-
url:
|
|
1265
|
-
events:
|
|
1266
|
-
cbid:
|
|
1267
|
-
active:
|
|
1379
|
+
id: import_zod5.z.string(),
|
|
1380
|
+
url: import_zod5.z.string().optional(),
|
|
1381
|
+
events: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1382
|
+
cbid: import_zod5.z.string().nullable().optional(),
|
|
1383
|
+
active: import_zod5.z.boolean().optional()
|
|
1268
1384
|
},
|
|
1269
1385
|
(a) => client.webhooks.update(a.id, {
|
|
1270
1386
|
...a.url !== void 0 ? { url: a.url } : {},
|
|
@@ -1273,20 +1389,20 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1273
1389
|
...a.active !== void 0 ? { active: a.active } : {}
|
|
1274
1390
|
})
|
|
1275
1391
|
);
|
|
1276
|
-
tool("delete_webhook", "Delete a webhook subscription by id.", { id:
|
|
1392
|
+
tool("delete_webhook", "Delete a webhook subscription by id.", { id: import_zod5.z.string().describe("The webhook subscription id.") }, async (a) => {
|
|
1277
1393
|
await client.webhooks.delete(a.id);
|
|
1278
1394
|
return { ok: true };
|
|
1279
1395
|
});
|
|
1280
1396
|
tool(
|
|
1281
1397
|
"verify_site",
|
|
1282
1398
|
"Verify that your organization controls a domain by one of three challenge methods (dns / meta / file). Required to unlock consent export and signed receipts.",
|
|
1283
|
-
{ ...cbid, method:
|
|
1399
|
+
{ ...cbid, method: import_zod5.z.enum(["dns", "meta", "file"]).describe("Challenge method: dns (TXT record), meta (HTML tag), or file (/.well-known/cookiemunch-verify.txt).") },
|
|
1284
1400
|
(a) => client.sites.verify(a.cbid, a.method)
|
|
1285
1401
|
);
|
|
1286
1402
|
tool(
|
|
1287
1403
|
"get_verification_challenge",
|
|
1288
1404
|
"Exactly what to publish to prove control of a site\u2019s domain: the DNS TXT record, the meta tag, the file, or installing the embed. Read-only \u2014 publish one, then call verify_site.",
|
|
1289
|
-
{ cbid:
|
|
1405
|
+
{ cbid: import_zod5.z.string() },
|
|
1290
1406
|
(a) => client.sites.verifyChallenge(a.cbid)
|
|
1291
1407
|
);
|
|
1292
1408
|
tool(
|
|
@@ -1298,15 +1414,15 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1298
1414
|
tool(
|
|
1299
1415
|
"get_flow",
|
|
1300
1416
|
"Get the v2 banner flow config for a site, including current views, categories, and any lint issues.",
|
|
1301
|
-
{ cbid:
|
|
1417
|
+
{ cbid: import_zod5.z.string().describe("Site identifier (cbid).") },
|
|
1302
1418
|
(a) => client.sites.getFlow(a.cbid)
|
|
1303
1419
|
);
|
|
1304
1420
|
tool(
|
|
1305
1421
|
"edit_flow",
|
|
1306
1422
|
"Apply a batch of structured edit operations to a site's v2 banner flow. All ops are validated server-side and the final config must be lint-clean before it is saved.",
|
|
1307
1423
|
{
|
|
1308
|
-
cbid:
|
|
1309
|
-
operations:
|
|
1424
|
+
cbid: import_zod5.z.string().describe("Site identifier (cbid)."),
|
|
1425
|
+
operations: import_zod5.z.array(import_zod5.z.record(import_zod5.z.unknown())).describe(
|
|
1310
1426
|
'Ordered list of ops. Each must have an "op" field: addView | removeView | addElement | setButtonTransition | addCustomCategory.'
|
|
1311
1427
|
)
|
|
1312
1428
|
},
|
|
@@ -1316,21 +1432,22 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1316
1432
|
"set_flow",
|
|
1317
1433
|
"Wholesale replace a site's v2 banner flow with a complete config (e.g. from a template). Validated server-side before it is saved.",
|
|
1318
1434
|
{
|
|
1319
|
-
cbid:
|
|
1320
|
-
config:
|
|
1435
|
+
cbid: import_zod5.z.string().describe("Site identifier (cbid)."),
|
|
1436
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).describe("A full v2 FlowConfig object ({ v:2, flow, categories, ... }).")
|
|
1321
1437
|
},
|
|
1322
1438
|
(a) => client.sites.setFlow(a.cbid, a.config)
|
|
1323
1439
|
);
|
|
1324
1440
|
registerConfigTools(tool, client);
|
|
1325
1441
|
registerPlatformTools(tool, client);
|
|
1442
|
+
registerIntegrationTools(tool, client);
|
|
1326
1443
|
registerRightsTools(tool, client);
|
|
1327
1444
|
registerRightsPageTools(tool, client);
|
|
1328
1445
|
tool(
|
|
1329
1446
|
"invite_member",
|
|
1330
1447
|
"Invite a person to your organization by email. role must be admin, member, or viewer. The org is derived from the API key \u2014 you cannot invite into a different org.",
|
|
1331
1448
|
{
|
|
1332
|
-
email:
|
|
1333
|
-
role:
|
|
1449
|
+
email: import_zod5.z.string().describe("Email address of the person to invite."),
|
|
1450
|
+
role: import_zod5.z.enum(["admin", "member", "viewer"]).describe("Role to assign: admin, member, or viewer. owner is not assignable via API key.")
|
|
1334
1451
|
},
|
|
1335
1452
|
(a) => client.members.invite(a.email, a.role)
|
|
1336
1453
|
);
|
|
@@ -1338,8 +1455,8 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1338
1455
|
"set_member_role",
|
|
1339
1456
|
"Change the role of a member in your organization. The org owner's role cannot be changed.",
|
|
1340
1457
|
{
|
|
1341
|
-
userId:
|
|
1342
|
-
role:
|
|
1458
|
+
userId: import_zod5.z.string().describe("The userId of the member whose role to change."),
|
|
1459
|
+
role: import_zod5.z.enum(["admin", "member", "viewer"]).describe("New role: admin, member, or viewer.")
|
|
1343
1460
|
},
|
|
1344
1461
|
(a) => client.members.setRole(a.userId, a.role)
|
|
1345
1462
|
);
|
|
@@ -1347,7 +1464,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1347
1464
|
"remove_member",
|
|
1348
1465
|
"Remove a member from your organization. The org owner cannot be removed.",
|
|
1349
1466
|
{
|
|
1350
|
-
userId:
|
|
1467
|
+
userId: import_zod5.z.string().describe("The userId of the member to remove.")
|
|
1351
1468
|
},
|
|
1352
1469
|
async (a) => {
|
|
1353
1470
|
await client.members.remove(a.userId);
|
|
@@ -1358,11 +1475,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1358
1475
|
"create_brand_kit",
|
|
1359
1476
|
"Create a reusable brand kit (colors, logo, typography) for your organization's consent banners.",
|
|
1360
1477
|
{
|
|
1361
|
-
name:
|
|
1362
|
-
theme:
|
|
1363
|
-
content:
|
|
1364
|
-
logoUrl:
|
|
1365
|
-
customCss:
|
|
1478
|
+
name: import_zod5.z.string().describe("Display name for the brand kit."),
|
|
1479
|
+
theme: import_zod5.z.record(import_zod5.z.unknown()).describe("Theme tokens (colors, fonts, etc.) as a JSON object."),
|
|
1480
|
+
content: import_zod5.z.record(import_zod5.z.unknown()).optional().describe("Optional banner copy overrides."),
|
|
1481
|
+
logoUrl: import_zod5.z.string().optional().describe("Optional URL for your org logo."),
|
|
1482
|
+
customCss: import_zod5.z.string().optional().describe("Optional custom CSS string to inject into the banner.")
|
|
1366
1483
|
},
|
|
1367
1484
|
(a) => client.brandKits.create({
|
|
1368
1485
|
name: a.name,
|
|
@@ -1376,7 +1493,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1376
1493
|
"delete_brand_kit",
|
|
1377
1494
|
"Delete a brand kit by id. The kit must belong to your organization (cross-org deletes are rejected).",
|
|
1378
1495
|
{
|
|
1379
|
-
id:
|
|
1496
|
+
id: import_zod5.z.string().describe("The brand kit id to delete.")
|
|
1380
1497
|
},
|
|
1381
1498
|
async (a) => {
|
|
1382
1499
|
await client.brandKits.delete(a.id);
|
|
@@ -1387,63 +1504,65 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1387
1504
|
"save_preference",
|
|
1388
1505
|
"Save or update the consent preferences for an end-user (by subjectId) within your organization. purposes is a map of purpose-name \u2192 boolean.",
|
|
1389
1506
|
{
|
|
1390
|
-
subjectId:
|
|
1391
|
-
purposes:
|
|
1507
|
+
subjectId: import_zod5.z.string().describe("The end-user identifier (e.g. email or internal user id)."),
|
|
1508
|
+
purposes: import_zod5.z.record(import_zod5.z.boolean()).describe('Map of purpose names to consent values, e.g. { "newsletter": true, "analytics": false }.')
|
|
1392
1509
|
},
|
|
1393
1510
|
(a) => client.preferences.save(a.subjectId, a.purposes)
|
|
1394
1511
|
);
|
|
1395
1512
|
tool(
|
|
1396
1513
|
"get_preference",
|
|
1397
1514
|
"One end-user\u2019s saved preferences, by subjectId. Read-only.",
|
|
1398
|
-
{ subjectId:
|
|
1515
|
+
{ subjectId: import_zod5.z.string() },
|
|
1399
1516
|
(a) => client.preferences.get(a.subjectId)
|
|
1400
1517
|
);
|
|
1401
1518
|
tool(
|
|
1402
1519
|
"issue_api_key",
|
|
1403
1520
|
"Issue a new API key. The secret is returned once and never again. Prefer the least privilege the job needs: `scopes` limits what it can do, `cbids` locks it to specific sites (it then cannot reach anything org-wide), `expiresInDays` retires it. Omitting all three mints a full-access, org-wide, non-expiring key.",
|
|
1404
1521
|
{
|
|
1405
|
-
name:
|
|
1406
|
-
scopes:
|
|
1407
|
-
cbids:
|
|
1408
|
-
expiresInDays:
|
|
1522
|
+
name: import_zod5.z.string().optional(),
|
|
1523
|
+
scopes: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1524
|
+
cbids: import_zod5.z.array(import_zod5.z.string()).min(1).optional(),
|
|
1525
|
+
expiresInDays: import_zod5.z.number().int().min(1).max(3650).optional(),
|
|
1526
|
+
expiresAt: import_zod5.z.string().optional().describe("Or the exact expiry, an ISO date-time (not with expiresInDays).")
|
|
1409
1527
|
},
|
|
1410
1528
|
(a) => client.keys.issue({
|
|
1529
|
+
...a.expiresAt ? { expiresAt: a.expiresAt } : {},
|
|
1411
1530
|
...a.name ? { name: a.name } : {},
|
|
1412
1531
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1413
1532
|
...a.cbids ? { cbids: a.cbids } : {},
|
|
1414
1533
|
...a.expiresInDays !== void 0 ? { expiresInDays: a.expiresInDays } : {}
|
|
1415
1534
|
})
|
|
1416
1535
|
);
|
|
1417
|
-
tool("revoke_api_key", "Revoke an API key by its prefix. Takes effect immediately; anything using that key stops working.", { prefix:
|
|
1536
|
+
tool("revoke_api_key", "Revoke an API key by its prefix. Takes effect immediately; anything using that key stops working.", { prefix: import_zod5.z.string() }, async (a) => {
|
|
1418
1537
|
await client.keys.revoke(a.prefix);
|
|
1419
1538
|
return { revoked: a.prefix };
|
|
1420
1539
|
});
|
|
1421
1540
|
tool(
|
|
1422
1541
|
"import_cookie_declaration",
|
|
1423
1542
|
"Read a cookie declaration exported from another CMP (OneTrust, Cookiebot, CookieYes, or any CSV/JSON with the same columns) and translate its categories into ours. Nothing is applied \u2014 it comes back for review, with the rows whose category could not be placed listed separately.",
|
|
1424
|
-
{ cbid:
|
|
1543
|
+
{ cbid: import_zod5.z.string(), data: import_zod5.z.string().describe("The exported file, as text (CSV or JSON).") },
|
|
1425
1544
|
(a) => client.sites.importDeclaration(a.cbid, a.data)
|
|
1426
1545
|
);
|
|
1427
1546
|
tool(
|
|
1428
1547
|
"apply_cookie_import",
|
|
1429
1548
|
"Import a cookie declaration exported from another CMP AND declare it: every row whose category mapped to ours and that has a purpose becomes a site declaration; the rest come back in `skipped` with the reason. Cookies the site already declared are kept unless overwrite is true. Prefer import_cookie_declaration first to review.",
|
|
1430
|
-
{ cbid:
|
|
1549
|
+
{ cbid: import_zod5.z.string(), data: import_zod5.z.string().describe("The exported file, as text (CSV or JSON)."), overwrite: import_zod5.z.boolean().optional() },
|
|
1431
1550
|
(a) => client.sites.applyImport(a.cbid, a.data, a.overwrite ? { overwrite: true } : void 0)
|
|
1432
1551
|
);
|
|
1433
1552
|
const declarationShape = {
|
|
1434
|
-
category:
|
|
1435
|
-
purpose:
|
|
1436
|
-
purposes:
|
|
1437
|
-
provider:
|
|
1438
|
-
expiry:
|
|
1439
|
-
domain:
|
|
1440
|
-
pattern:
|
|
1553
|
+
category: import_zod5.z.string().describe("necessary, preferences, statistics, marketing, or one of the site\u2019s categories.custom ids."),
|
|
1554
|
+
purpose: import_zod5.z.string().describe("What the cookie does, as visitors will read it \u2014 and the fallback for any language purposes lacks."),
|
|
1555
|
+
purposes: import_zod5.z.record(import_zod5.z.string(), import_zod5.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.'),
|
|
1556
|
+
provider: import_zod5.z.string().optional(),
|
|
1557
|
+
expiry: import_zod5.z.string().optional().describe('e.g. "Session", "30 days", "1 year" (the banner localises these forms).'),
|
|
1558
|
+
domain: import_zod5.z.string().optional(),
|
|
1559
|
+
pattern: import_zod5.z.boolean().optional().describe("Treat the name as a prefix wildcard (a trailing * does the same).")
|
|
1441
1560
|
};
|
|
1442
|
-
const dryRunArg =
|
|
1561
|
+
const dryRunArg = import_zod5.z.boolean().optional().describe("Store nothing: answer with the would-be declarations and a diff (added / removed / changed) to check first.");
|
|
1443
1562
|
tool(
|
|
1444
1563
|
"declare_cookie",
|
|
1445
1564
|
'Declare what one of the site\u2019s cookies is. Overrides the scanner, observed visits and the cookie database everywhere the declaration is shown (API, preference modal, data-cc="declaration"). Use for the site\u2019s own cookies the database cannot know. A name ending in * covers every cookie with that prefix.',
|
|
1446
|
-
{ cbid:
|
|
1565
|
+
{ cbid: import_zod5.z.string(), name: import_zod5.z.string(), ...declarationShape, dryRun: dryRunArg },
|
|
1447
1566
|
(a) => {
|
|
1448
1567
|
const { cbid: cbid2, name, dryRun, ...rest } = a;
|
|
1449
1568
|
return client.sites.declareCookie(cbid2, name, rest, dryRun ? { dryRun: true } : void 0);
|
|
@@ -1452,7 +1571,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1452
1571
|
tool(
|
|
1453
1572
|
"declare_cookies",
|
|
1454
1573
|
"Declare many cookies at once. All-or-nothing: one invalid item refuses the whole request and nothing is saved. replace: true also removes every declaration the list does not name.",
|
|
1455
|
-
{ cbid:
|
|
1574
|
+
{ cbid: import_zod5.z.string(), cookies: import_zod5.z.array(import_zod5.z.object({ name: import_zod5.z.string(), ...declarationShape })).max(500), replace: import_zod5.z.boolean().optional(), dryRun: dryRunArg },
|
|
1456
1575
|
(a) => {
|
|
1457
1576
|
const o = { ...a.replace ? { replace: true } : {}, ...a.dryRun ? { dryRun: true } : {} };
|
|
1458
1577
|
return client.sites.declareCookies(a.cbid, a.cookies, Object.keys(o).length ? o : void 0);
|
|
@@ -1461,7 +1580,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1461
1580
|
tool(
|
|
1462
1581
|
"undeclare_cookie",
|
|
1463
1582
|
"Remove a cookie declaration; the scanned/observed classification applies again.",
|
|
1464
|
-
{ cbid:
|
|
1583
|
+
{ cbid: import_zod5.z.string(), name: import_zod5.z.string(), dryRun: dryRunArg },
|
|
1465
1584
|
async (a) => {
|
|
1466
1585
|
if (a.dryRun) return client.sites.undeclareCookie(a.cbid, a.name, { dryRun: true });
|
|
1467
1586
|
await client.sites.undeclareCookie(a.cbid, a.name);
|
|
@@ -1472,11 +1591,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1472
1591
|
"retire_cookie",
|
|
1473
1592
|
'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
1593
|
{
|
|
1475
|
-
cbid:
|
|
1476
|
-
name:
|
|
1477
|
-
renamedTo:
|
|
1478
|
-
note:
|
|
1479
|
-
dryRun:
|
|
1594
|
+
cbid: import_zod5.z.string(),
|
|
1595
|
+
name: import_zod5.z.string(),
|
|
1596
|
+
renamedTo: import_zod5.z.string().max(256).optional().describe("The cookie\u2019s new name, if it was renamed."),
|
|
1597
|
+
note: import_zod5.z.string().max(1e3).optional(),
|
|
1598
|
+
dryRun: import_zod5.z.boolean().optional().describe("Store nothing: answer with the would-be retirement and list to check first.")
|
|
1480
1599
|
},
|
|
1481
1600
|
(a) => {
|
|
1482
1601
|
const input = { ...a.renamedTo ? { renamedTo: a.renamedTo } : {}, ...a.note ? { note: a.note } : {} };
|
|
@@ -1486,35 +1605,93 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1486
1605
|
tool(
|
|
1487
1606
|
"unretire_cookie",
|
|
1488
1607
|
"Un-retire a cookie: it is listed again everywhere.",
|
|
1489
|
-
{ cbid:
|
|
1608
|
+
{ cbid: import_zod5.z.string(), name: import_zod5.z.string(), dryRun: import_zod5.z.boolean().optional().describe("Store nothing: answer with what the list would be.") },
|
|
1490
1609
|
async (a) => {
|
|
1491
1610
|
if (a.dryRun) return client.sites.unretireCookie(a.cbid, a.name, { dryRun: true });
|
|
1492
1611
|
await client.sites.unretireCookie(a.cbid, a.name);
|
|
1493
1612
|
return { unretired: a.name };
|
|
1494
1613
|
}
|
|
1495
1614
|
);
|
|
1615
|
+
tool(
|
|
1616
|
+
"list_cookie_presets",
|
|
1617
|
+
"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.",
|
|
1618
|
+
{ cbid: import_zod5.z.string() },
|
|
1619
|
+
(a) => client.sites.cookiePresets(a.cbid)
|
|
1620
|
+
);
|
|
1621
|
+
tool(
|
|
1622
|
+
"apply_cookie_preset",
|
|
1623
|
+
"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.",
|
|
1624
|
+
{
|
|
1625
|
+
cbid: import_zod5.z.string(),
|
|
1626
|
+
vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]),
|
|
1627
|
+
frontendApiHost: import_zod5.z.string().optional().describe("Atlas: your frontend API host, e.g. auth.example.com."),
|
|
1628
|
+
crossSubdomainCookies: import_zod5.z.boolean().optional().describe("Atlas: default true \u2014 the cookies live on the parent domain."),
|
|
1629
|
+
publicId: import_zod5.z.string().optional().describe("Chatly: the channel public id (ch_web_\u2026)."),
|
|
1630
|
+
dragging: import_zod5.z.boolean().optional().describe("Chatly: the launcher can be dragged (adds the drag-position key)."),
|
|
1631
|
+
category: import_zod5.z.string().optional().describe("Chatly: the category for its keys. Default necessary."),
|
|
1632
|
+
dryRun: dryRunArg
|
|
1633
|
+
},
|
|
1634
|
+
(a) => {
|
|
1635
|
+
const params = {};
|
|
1636
|
+
for (const k of ["frontendApiHost", "crossSubdomainCookies", "publicId", "dragging", "category"]) if (a[k] !== void 0) params[k] = a[k];
|
|
1637
|
+
return client.sites.applyCookiePreset(a.cbid, a.vendor, params, a.dryRun ? { dryRun: true } : void 0);
|
|
1638
|
+
}
|
|
1639
|
+
);
|
|
1640
|
+
tool(
|
|
1641
|
+
"remove_cookie_preset",
|
|
1642
|
+
"Remove every declaration a vendor preset made on this site.",
|
|
1643
|
+
{ cbid: import_zod5.z.string(), vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]), dryRun: dryRunArg },
|
|
1644
|
+
(a) => client.sites.removeCookiePreset(a.cbid, a.vendor, a.dryRun ? { dryRun: true } : void 0)
|
|
1645
|
+
);
|
|
1646
|
+
tool(
|
|
1647
|
+
"delete_observed_cookie",
|
|
1648
|
+
"Remove every stored row of this name that crawls or real visits put in the site\u2019s cookie list (e.g. a name someone reported that the site never sets). A declaration of it stays. If real visits keep reporting it, it comes back quarantined.",
|
|
1649
|
+
{ cbid: import_zod5.z.string(), name: import_zod5.z.string(), dryRun: dryRunArg },
|
|
1650
|
+
async (a) => {
|
|
1651
|
+
if (a.dryRun) return client.sites.deleteObservedCookie(a.cbid, a.name, { dryRun: true });
|
|
1652
|
+
await client.sites.deleteObservedCookie(a.cbid, a.name);
|
|
1653
|
+
return { deleted: a.name };
|
|
1654
|
+
}
|
|
1655
|
+
);
|
|
1656
|
+
tool(
|
|
1657
|
+
"purge_observed_cookies",
|
|
1658
|
+
"Purge observed since T: remove every row a real visit first reported at or after `since` (and before `until`). Crawled rows and declarations stay. Rows from before provenance was recorded use their last-seen time, so run with dryRun first.",
|
|
1659
|
+
{
|
|
1660
|
+
cbid: import_zod5.z.string(),
|
|
1661
|
+
since: import_zod5.z.union([import_zod5.z.string(), import_zod5.z.number()]).describe("ISO-8601 time or epoch milliseconds."),
|
|
1662
|
+
until: import_zod5.z.union([import_zod5.z.string(), import_zod5.z.number()]).optional().describe("Optional end of the window (exclusive)."),
|
|
1663
|
+
dryRun: dryRunArg
|
|
1664
|
+
},
|
|
1665
|
+
(a) => client.sites.purgeObservedCookies(
|
|
1666
|
+
a.cbid,
|
|
1667
|
+
{ since: a.since, ...a.until !== void 0 ? { until: a.until } : {} },
|
|
1668
|
+
a.dryRun ? { dryRun: true } : void 0
|
|
1669
|
+
)
|
|
1670
|
+
);
|
|
1496
1671
|
tool(
|
|
1497
1672
|
"get_blocked_pages",
|
|
1498
1673
|
"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.",
|
|
1499
|
-
{ cbid:
|
|
1674
|
+
{ cbid: import_zod5.z.string() },
|
|
1500
1675
|
(a) => client.sites.blocked(a.cbid)
|
|
1501
1676
|
);
|
|
1502
1677
|
tool(
|
|
1503
1678
|
"roll_api_key",
|
|
1504
1679
|
"Rotate an API key: returns a new secret once, with the same name, scopes, property lock and expiry. The old secret stops working immediately \u2014 if it is the key this server runs with, this server stops working too until it is reconfigured.",
|
|
1505
|
-
{ prefix:
|
|
1680
|
+
{ prefix: import_zod5.z.string() },
|
|
1506
1681
|
(a) => client.keys.roll(a.prefix)
|
|
1507
1682
|
);
|
|
1508
1683
|
tool(
|
|
1509
1684
|
"update_api_key",
|
|
1510
|
-
"Rename an API key,
|
|
1685
|
+
"Rename an API key, replace its scopes or the properties it is locked to, or set or remove its expiry. Only the fields given change; the secret does not.",
|
|
1511
1686
|
{
|
|
1512
|
-
prefix:
|
|
1513
|
-
name:
|
|
1514
|
-
scopes:
|
|
1515
|
-
cbids:
|
|
1687
|
+
prefix: import_zod5.z.string(),
|
|
1688
|
+
name: import_zod5.z.string().optional(),
|
|
1689
|
+
scopes: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1690
|
+
cbids: import_zod5.z.array(import_zod5.z.string()).min(1).optional(),
|
|
1691
|
+
expiresAt: import_zod5.z.string().nullable().optional().describe("A new expiry (ISO date-time), or null to remove it.")
|
|
1516
1692
|
},
|
|
1517
1693
|
(a) => client.keys.update(a.prefix, {
|
|
1694
|
+
...a.expiresAt !== void 0 ? { expiresAt: a.expiresAt } : {},
|
|
1518
1695
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1519
1696
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1520
1697
|
...a.cbids ? { cbids: a.cbids } : {}
|
|
@@ -1524,7 +1701,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1524
1701
|
tool(
|
|
1525
1702
|
"update_org",
|
|
1526
1703
|
"Rename your organisation or set its logo. logoUrl: null removes the logo; upload an image with upload_asset to get a URL. Deleting the organisation is not possible here.",
|
|
1527
|
-
{ name:
|
|
1704
|
+
{ name: import_zod5.z.string().min(1).optional(), logoUrl: import_zod5.z.string().nullable().optional() },
|
|
1528
1705
|
(a) => client.org.update({
|
|
1529
1706
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1530
1707
|
...a.logoUrl !== void 0 ? { logoUrl: a.logoUrl } : {}
|
|
@@ -1540,20 +1717,20 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1540
1717
|
"set_mail_provider",
|
|
1541
1718
|
"Connect your own mail provider for rights-request mail \u2014 recommended, so codes come from your own domain. Replaces the stored one. It carries mail only after test_mail_provider succeeds; every save clears that. Omit secret to keep the stored one (same provider only).",
|
|
1542
1719
|
{
|
|
1543
|
-
provider:
|
|
1544
|
-
fromEmail:
|
|
1545
|
-
fromName:
|
|
1546
|
-
replyTo:
|
|
1547
|
-
secret:
|
|
1548
|
-
ses:
|
|
1549
|
-
smtp:
|
|
1720
|
+
provider: import_zod5.z.enum(["brevo", "sendgrid", "postmark", "resend", "ses", "smtp"]),
|
|
1721
|
+
fromEmail: import_zod5.z.string().describe("An address on a domain your provider has verified."),
|
|
1722
|
+
fromName: import_zod5.z.string().max(100).nullable().optional(),
|
|
1723
|
+
replyTo: import_zod5.z.string().nullable().optional(),
|
|
1724
|
+
secret: import_zod5.z.string().optional().describe("API key (Brevo, SendGrid, Resend), server token (Postmark), secret access key (SES) or SMTP password. Write-only."),
|
|
1725
|
+
ses: import_zod5.z.object({ region: import_zod5.z.string(), accessKeyId: import_zod5.z.string() }).optional().describe("Required for ses."),
|
|
1726
|
+
smtp: import_zod5.z.object({ host: import_zod5.z.string(), port: import_zod5.z.union([import_zod5.z.literal(25), import_zod5.z.literal(465), import_zod5.z.literal(587), import_zod5.z.literal(2525)]), security: import_zod5.z.enum(["tls", "starttls"]), username: import_zod5.z.string() }).optional().describe("Required for smtp. TLS is always required.")
|
|
1550
1727
|
},
|
|
1551
1728
|
(a) => client.org.mailProvider.set(a)
|
|
1552
1729
|
);
|
|
1553
1730
|
tool(
|
|
1554
1731
|
"test_mail_provider",
|
|
1555
1732
|
"Send a test message through your own mail provider (never Cookie Munch\u2019s) and report what it answered. Success marks the configuration verified, after which it carries all rights mail.",
|
|
1556
|
-
{ to:
|
|
1733
|
+
{ to: import_zod5.z.string().optional().describe("Recipient. Default: the reply-to, else the from address.") },
|
|
1557
1734
|
(a) => client.org.mailProvider.test(a.to)
|
|
1558
1735
|
);
|
|
1559
1736
|
tool(
|
|
@@ -1567,11 +1744,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1567
1744
|
);
|
|
1568
1745
|
const CAPTCHA_OFF = "Off removes spam protection beyond the hidden spam-trap field, the rate limits and the email code: expect more spam requests. Own keys are recommended.";
|
|
1569
1746
|
const captchaInput = {
|
|
1570
|
-
mode:
|
|
1571
|
-
provider:
|
|
1572
|
-
siteKey:
|
|
1573
|
-
secret:
|
|
1574
|
-
minScore:
|
|
1747
|
+
mode: import_zod5.z.enum(["own", "off"]).describe(`own: your own captcha provider keys (recommended). off: no captcha. ${CAPTCHA_OFF}`),
|
|
1748
|
+
provider: import_zod5.z.enum(["turnstile", "hcaptcha", "recaptcha_v2", "recaptcha_v3"]).optional().describe("Required for own."),
|
|
1749
|
+
siteKey: import_zod5.z.string().optional().describe("Required for own: the public site key. List your rights-page hostnames on it at the provider."),
|
|
1750
|
+
secret: import_zod5.z.string().optional().describe("The provider secret key. Write-only; never returned. Omit to keep the stored one (same provider)."),
|
|
1751
|
+
minScore: import_zod5.z.number().min(0.1).max(0.9).optional().describe("reCAPTCHA v3 only. Default 0.5.")
|
|
1575
1752
|
};
|
|
1576
1753
|
const captchaBody = (a) => ({
|
|
1577
1754
|
mode: a.mode,
|
|
@@ -1583,19 +1760,19 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1583
1760
|
tool(
|
|
1584
1761
|
"get_rights_captcha",
|
|
1585
1762
|
"The captcha on a site\u2019s hosted rights page: its own setting, else the organisation default, else off (`source` says which). Never returns the secret. Read-only.",
|
|
1586
|
-
{ cbid:
|
|
1763
|
+
{ cbid: import_zod5.z.string() },
|
|
1587
1764
|
(a) => client.rightsCaptcha.get(a.cbid)
|
|
1588
1765
|
);
|
|
1589
1766
|
tool(
|
|
1590
1767
|
"set_rights_captcha",
|
|
1591
1768
|
`Set a site\u2019s rights-page captcha: your own Turnstile, hCaptcha or reCAPTCHA keys (recommended; the provider must accept the secret before it is saved), or off. ${CAPTCHA_OFF} Audited with the old and new mode.`,
|
|
1592
|
-
{ cbid:
|
|
1769
|
+
{ cbid: import_zod5.z.string(), ...captchaInput },
|
|
1593
1770
|
(a) => client.rightsCaptcha.set(a.cbid, captchaBody(a))
|
|
1594
1771
|
);
|
|
1595
1772
|
tool(
|
|
1596
1773
|
"remove_rights_captcha",
|
|
1597
1774
|
"Remove a site\u2019s own captcha setting: it inherits the organisation default again (or off). Returns the setting now in force.",
|
|
1598
|
-
{ cbid:
|
|
1775
|
+
{ cbid: import_zod5.z.string() },
|
|
1599
1776
|
(a) => client.rightsCaptcha.remove(a.cbid)
|
|
1600
1777
|
);
|
|
1601
1778
|
tool(
|
|
@@ -1618,15 +1795,15 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1618
1795
|
);
|
|
1619
1796
|
const IDENTITY_NOTE = "The JWKS is fetched and checked before anything is saved. The session token must carry the email and a verified-email claim (default email_verified) set to true (Clerk: add email: {{user.primary_email_address}} to the session token; Clerk documents no claim for whether that address is verified, so either add your own or set trustEmailClaim). oidc_jwt needs an audience or authorizedParties.";
|
|
1620
1797
|
const identityInput = {
|
|
1621
|
-
type:
|
|
1622
|
-
issuer:
|
|
1623
|
-
jwksUrl:
|
|
1624
|
-
audience:
|
|
1625
|
-
authorizedParties:
|
|
1626
|
-
emailClaim:
|
|
1627
|
-
emailVerifiedClaim:
|
|
1628
|
-
sessionCookieName:
|
|
1629
|
-
trustEmailClaim:
|
|
1798
|
+
type: import_zod5.z.enum(["clerk", "atlas", "oidc_jwt"]).describe("clerk, atlas (Clerk-shaped), or oidc_jwt (any issuer that signs session JWTs with a published JWKS)."),
|
|
1799
|
+
issuer: import_zod5.z.string().describe("https URL exactly as in the token\u2019s iss (Clerk: your Frontend API URL)."),
|
|
1800
|
+
jwksUrl: import_zod5.z.string().optional().describe("Required for oidc_jwt; clerk/atlas default to <issuer>/.well-known/jwks.json."),
|
|
1801
|
+
audience: import_zod5.z.string().optional().describe("Expected aud. For oidc_jwt an audience or authorizedParties is required (a shared issuer mints tokens for every app)."),
|
|
1802
|
+
authorizedParties: import_zod5.z.array(import_zod5.z.string()).optional().describe("Your own origins (https://www.example.com) the token\u2019s azp must be one of. Required for clerk and atlas; for oidc_jwt when there is no audience."),
|
|
1803
|
+
emailClaim: import_zod5.z.string().optional().describe("Default email."),
|
|
1804
|
+
emailVerifiedClaim: import_zod5.z.string().optional().describe("Default email_verified; must be exactly true."),
|
|
1805
|
+
sessionCookieName: import_zod5.z.string().optional().describe("Default __session: the cookie the hosted page on your custom domain reads."),
|
|
1806
|
+
trustEmailClaim: import_zod5.z.boolean().optional().describe("clerk/atlas only, default false. True: a token without the verified claim is accepted, its email claim taken as verified. Set only if every address your provider puts in that claim is verified.")
|
|
1630
1807
|
};
|
|
1631
1808
|
const identityBody = (a) => {
|
|
1632
1809
|
const out = { type: a.type, issuer: a.issuer };
|
|
@@ -1636,19 +1813,19 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1636
1813
|
tool(
|
|
1637
1814
|
"get_rights_identity",
|
|
1638
1815
|
"The sign-in provider a site\u2019s rights requests are verified with: its own setting, else the organisation default, else none (`source` says which). Read-only.",
|
|
1639
|
-
{ cbid:
|
|
1816
|
+
{ cbid: import_zod5.z.string() },
|
|
1640
1817
|
(a) => client.rightsIdentity.get(a.cbid)
|
|
1641
1818
|
);
|
|
1642
1819
|
tool(
|
|
1643
1820
|
"set_rights_identity",
|
|
1644
1821
|
`Connect a site\u2019s sign-in provider so a visitor signed in to the site is verified by their session, with no code mail. ${IDENTITY_NOTE} Audited.`,
|
|
1645
|
-
{ cbid:
|
|
1822
|
+
{ cbid: import_zod5.z.string(), ...identityInput },
|
|
1646
1823
|
(a) => client.rightsIdentity.set(a.cbid, identityBody(a))
|
|
1647
1824
|
);
|
|
1648
1825
|
tool(
|
|
1649
1826
|
"remove_rights_identity",
|
|
1650
1827
|
"Remove a site\u2019s own sign-in provider: it inherits the organisation default again (or none). Returns the setting now in force.",
|
|
1651
|
-
{ cbid:
|
|
1828
|
+
{ cbid: import_zod5.z.string() },
|
|
1652
1829
|
(a) => client.rightsIdentity.remove(a.cbid)
|
|
1653
1830
|
);
|
|
1654
1831
|
tool(
|
|
@@ -1672,22 +1849,22 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1672
1849
|
tool(
|
|
1673
1850
|
"get_audit_log",
|
|
1674
1851
|
"The organisation\u2019s audit log, newest first: administrative changes made in the dashboard or through the API, and who made them. Read-only.",
|
|
1675
|
-
{ limit:
|
|
1852
|
+
{ limit: import_zod5.z.number().int().min(1).max(500).optional() },
|
|
1676
1853
|
(a) => client.audit(a.limit)
|
|
1677
1854
|
);
|
|
1678
1855
|
tool(
|
|
1679
1856
|
"upload_asset",
|
|
1680
1857
|
"Upload an image \u2014 a banner logo \u2014 and get its public URL. data is base64 (a data: URL also works); PNG, JPEG, WebP, GIF or SVG, up to 1,000,000 bytes.",
|
|
1681
1858
|
{
|
|
1682
|
-
data:
|
|
1683
|
-
contentType:
|
|
1859
|
+
data: import_zod5.z.string(),
|
|
1860
|
+
contentType: import_zod5.z.enum(["image/png", "image/jpeg", "image/webp", "image/gif", "image/svg+xml"])
|
|
1684
1861
|
},
|
|
1685
1862
|
(a) => client.assets.upload({ data: a.data, contentType: a.contentType })
|
|
1686
1863
|
);
|
|
1687
1864
|
tool(
|
|
1688
1865
|
"delete_asset",
|
|
1689
1866
|
"Delete a stored image by its URL (or file name). Only your own organisation\u2019s images can be named.",
|
|
1690
|
-
{ url:
|
|
1867
|
+
{ url: import_zod5.z.string().describe("The URL upload_asset returned, or just its file name.") },
|
|
1691
1868
|
async (a) => {
|
|
1692
1869
|
await client.assets.delete(a.url);
|
|
1693
1870
|
return { deleted: a.url };
|
|
@@ -1702,18 +1879,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1702
1879
|
tool(
|
|
1703
1880
|
"get_customer",
|
|
1704
1881
|
"One child org: its controller details and usage. Read-only.",
|
|
1705
|
-
{ id:
|
|
1882
|
+
{ id: import_zod5.z.string() },
|
|
1706
1883
|
(a) => client.reseller.get(a.id)
|
|
1707
1884
|
);
|
|
1708
1885
|
tool(
|
|
1709
1886
|
"provision_customer",
|
|
1710
1887
|
"Create a new child org under this reseller. With `mintKey`, its first API key is returned once. Counts toward the reseller plan\u2019s pooled limits.",
|
|
1711
1888
|
{
|
|
1712
|
-
name:
|
|
1713
|
-
ownerEmail:
|
|
1714
|
-
delegatedAccess:
|
|
1715
|
-
mintKey:
|
|
1716
|
-
keyScopes:
|
|
1889
|
+
name: import_zod5.z.string(),
|
|
1890
|
+
ownerEmail: import_zod5.z.string().optional(),
|
|
1891
|
+
delegatedAccess: import_zod5.z.boolean().optional().describe("Whether this reseller may act inside the child."),
|
|
1892
|
+
mintKey: import_zod5.z.boolean().optional(),
|
|
1893
|
+
keyScopes: import_zod5.z.array(import_zod5.z.string()).optional()
|
|
1717
1894
|
},
|
|
1718
1895
|
(a) => client.reseller.create({
|
|
1719
1896
|
name: a.name,
|
|
@@ -1727,10 +1904,10 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1727
1904
|
"update_customer",
|
|
1728
1905
|
"Change a child org\u2019s status, delegated access or DSAR routing. `dsarRouting: null` clears the override.",
|
|
1729
1906
|
{
|
|
1730
|
-
id:
|
|
1731
|
-
status:
|
|
1732
|
-
delegatedAccess:
|
|
1733
|
-
dsarRouting:
|
|
1907
|
+
id: import_zod5.z.string(),
|
|
1908
|
+
status: import_zod5.z.enum(["active", "suspended"]).optional(),
|
|
1909
|
+
delegatedAccess: import_zod5.z.boolean().optional(),
|
|
1910
|
+
dsarRouting: import_zod5.z.enum(["reseller", "child"]).nullable().optional()
|
|
1734
1911
|
},
|
|
1735
1912
|
(a) => client.reseller.update(a.id, {
|
|
1736
1913
|
...a.status ? { status: a.status } : {},
|
|
@@ -1741,7 +1918,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1741
1918
|
tool(
|
|
1742
1919
|
"suspend_customer",
|
|
1743
1920
|
"Suspend a child org: it stops ingesting consent and its keys stop working, and it can be reactivated with update_customer. Its data is kept. (Permanent deletion is deliberately not available here.)",
|
|
1744
|
-
{ id:
|
|
1921
|
+
{ id: import_zod5.z.string() },
|
|
1745
1922
|
async (a) => {
|
|
1746
1923
|
await client.reseller.deprovision(a.id);
|
|
1747
1924
|
return { suspended: a.id };
|
|
@@ -1750,72 +1927,72 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1750
1927
|
tool(
|
|
1751
1928
|
"list_customer_keys",
|
|
1752
1929
|
"A child org's API key prefixes. Never the secrets. Read-only.",
|
|
1753
|
-
{ id:
|
|
1930
|
+
{ id: import_zod5.z.string() },
|
|
1754
1931
|
(a) => client.reseller.listKeys(a.id)
|
|
1755
1932
|
);
|
|
1756
1933
|
tool(
|
|
1757
1934
|
"issue_customer_key",
|
|
1758
1935
|
"Mint an API key for a child org. The secret is returned once. Prefer scopes and a property lock over a full-access key.",
|
|
1759
|
-
{ id:
|
|
1936
|
+
{ id: import_zod5.z.string(), name: import_zod5.z.string().optional(), scopes: import_zod5.z.array(import_zod5.z.string()).optional(), cbids: import_zod5.z.array(import_zod5.z.string()).min(1).optional() },
|
|
1760
1937
|
(a) => client.reseller.mintKey(a.id, {
|
|
1761
1938
|
...a.name ? { name: a.name } : {},
|
|
1762
1939
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1763
1940
|
...a.cbids ? { cbids: a.cbids } : {}
|
|
1764
1941
|
})
|
|
1765
1942
|
);
|
|
1766
|
-
tool("revoke_customer_key", "Revoke a child org's API key by prefix. Takes effect immediately.", { id:
|
|
1943
|
+
tool("revoke_customer_key", "Revoke a child org's API key by prefix. Takes effect immediately.", { id: import_zod5.z.string(), prefix: import_zod5.z.string() }, async (a) => {
|
|
1767
1944
|
await client.reseller.revokeKey(a.id, a.prefix);
|
|
1768
1945
|
return { revoked: a.prefix };
|
|
1769
1946
|
});
|
|
1770
1947
|
tool(
|
|
1771
1948
|
"erase_subject_data",
|
|
1772
1949
|
"IRREVERSIBLY crypto-erase a data subject's consent records by their consent-receipt stamp (GDPR/CCPA deletion). Destroys the encryption key; the tamper-evident chain stays intact.",
|
|
1773
|
-
{ cbid:
|
|
1950
|
+
{ cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1774
1951
|
(a) => client.consent.eraseSubject(a.cbid, a.stamp)
|
|
1775
1952
|
);
|
|
1776
1953
|
tool(
|
|
1777
1954
|
"export_subject_data",
|
|
1778
1955
|
"Export a data subject's consent records (GDPR access/portability).",
|
|
1779
|
-
{ cbid:
|
|
1956
|
+
{ cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1780
1957
|
(a) => client.consent.exportSubject(a.cbid, a.stamp)
|
|
1781
1958
|
);
|
|
1782
1959
|
tool("list_banners", "List reusable banner designs in your org.", {}, () => client.banners.list());
|
|
1783
1960
|
tool(
|
|
1784
1961
|
"create_banner",
|
|
1785
1962
|
"Create a reusable banner design.",
|
|
1786
|
-
{ name:
|
|
1963
|
+
{ name: import_zod5.z.string(), json: import_zod5.z.record(import_zod5.z.unknown()).describe("A v2 BannerConfig.") },
|
|
1787
1964
|
(a) => client.banners.create({ name: a.name, json: a.json })
|
|
1788
1965
|
);
|
|
1789
|
-
tool("get_banner", "Get a banner design by id.", { id:
|
|
1966
|
+
tool("get_banner", "Get a banner design by id.", { id: import_zod5.z.string() }, (a) => client.banners.get(a.id));
|
|
1790
1967
|
tool(
|
|
1791
1968
|
"update_banner",
|
|
1792
1969
|
"Update a banner design (name and/or config).",
|
|
1793
|
-
{ id:
|
|
1970
|
+
{ id: import_zod5.z.string(), name: import_zod5.z.string().optional(), json: import_zod5.z.record(import_zod5.z.unknown()).optional() },
|
|
1794
1971
|
(a) => client.banners.update(a.id, {
|
|
1795
1972
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1796
1973
|
...a.json !== void 0 ? { json: a.json } : {}
|
|
1797
1974
|
})
|
|
1798
1975
|
);
|
|
1799
|
-
tool("delete_banner", "Delete a banner design (fails if assigned to sites).", { id:
|
|
1976
|
+
tool("delete_banner", "Delete a banner design (fails if assigned to sites).", { id: import_zod5.z.string() }, async (a) => {
|
|
1800
1977
|
await client.banners.delete(a.id);
|
|
1801
1978
|
return { ok: true };
|
|
1802
1979
|
});
|
|
1803
1980
|
tool(
|
|
1804
1981
|
"get_banner_assignments",
|
|
1805
1982
|
"The sites (cbids) a banner design is currently assigned to. Read-only.",
|
|
1806
|
-
{ id:
|
|
1983
|
+
{ id: import_zod5.z.string() },
|
|
1807
1984
|
(a) => client.banners.assignments(a.id)
|
|
1808
1985
|
);
|
|
1809
1986
|
tool(
|
|
1810
1987
|
"assign_banner",
|
|
1811
1988
|
"Set which sites (cbids) use a banner design.",
|
|
1812
|
-
{ id:
|
|
1989
|
+
{ id: import_zod5.z.string(), cbids: import_zod5.z.array(import_zod5.z.string()) },
|
|
1813
1990
|
(a) => client.banners.setAssignments(a.id, a.cbids)
|
|
1814
1991
|
);
|
|
1815
1992
|
tool(
|
|
1816
1993
|
"publish_banner",
|
|
1817
1994
|
"Publish a design live to all its assigned sites.",
|
|
1818
|
-
{ id:
|
|
1995
|
+
{ id: import_zod5.z.string() },
|
|
1819
1996
|
(a) => client.banners.publish(a.id)
|
|
1820
1997
|
);
|
|
1821
1998
|
}
|