@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/index.cjs
CHANGED
|
@@ -28,7 +28,7 @@ var import_mcp = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
|
28
28
|
var import_sdk = require("@cookiemunch/sdk");
|
|
29
29
|
|
|
30
30
|
// src/tools.ts
|
|
31
|
-
var
|
|
31
|
+
var import_zod5 = require("zod");
|
|
32
32
|
|
|
33
33
|
// src/tools-config.ts
|
|
34
34
|
var import_zod = require("zod");
|
|
@@ -115,7 +115,7 @@ function registerConfigTools(tool, client) {
|
|
|
115
115
|
const setLanguagesSchema = import_zod.z.object({
|
|
116
116
|
cbid: import_zod.z.string().describe("Site identifier (cbid)."),
|
|
117
117
|
defaultCulture: import_zod.z.string().optional().describe('Default locale/culture code, e.g. "en", "fr". Stored in i18n.defaultCulture.'),
|
|
118
|
-
autoDetect: import_zod.z.boolean().optional().describe(
|
|
118
|
+
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.`),
|
|
119
119
|
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)."),
|
|
120
120
|
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.")
|
|
121
121
|
});
|
|
@@ -563,12 +563,16 @@ function registerPlatformTools(tool, client) {
|
|
|
563
563
|
"connect_dsar_executor",
|
|
564
564
|
"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.",
|
|
565
565
|
{
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
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."),
|
|
567
|
+
presetVersion: import_zod2.z.number().int().optional().describe("With preset: the version to build. Default the latest."),
|
|
568
|
+
orgId: import_zod2.z.string().optional().describe("A preset param, when the preset's params list it."),
|
|
569
|
+
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."),
|
|
570
|
+
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."),
|
|
571
|
+
baseUrl: import_zod2.z.string().optional().describe("The system's public https origin. Required unless the preset sets it."),
|
|
568
572
|
secretKey: import_zod2.z.string().describe("Its API key, with whatever scope that system needs to export and erase a user."),
|
|
569
573
|
webhookSecret: import_zod2.z.string().optional().describe("Signing secret of its webhook endpoint. Optional: polling closes tasks without it."),
|
|
570
574
|
auto: import_zod2.z.boolean().optional().describe("Open a sub-task automatically when a request reaches fulfilment. Default true."),
|
|
571
|
-
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.
|
|
575
|
+
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."),
|
|
572
576
|
dryRun: import_zod2.z.boolean().optional().describe("Validate everything and answer the connection that would be created, storing nothing.")
|
|
573
577
|
},
|
|
574
578
|
(a) => {
|
|
@@ -576,6 +580,28 @@ function registerPlatformTools(tool, client) {
|
|
|
576
580
|
return dryRun === true ? client.fulfillment.dryRunConnectExecutor(input) : client.fulfillment.connectExecutor(input);
|
|
577
581
|
}
|
|
578
582
|
);
|
|
583
|
+
tool(
|
|
584
|
+
"list_dsar_executor_presets",
|
|
585
|
+
"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.",
|
|
586
|
+
{},
|
|
587
|
+
() => client.fulfillment.executorPresets()
|
|
588
|
+
);
|
|
589
|
+
tool(
|
|
590
|
+
"upgrade_dsar_executor_preset",
|
|
591
|
+
"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.",
|
|
592
|
+
{
|
|
593
|
+
id: import_zod2.z.string().describe("The connection id."),
|
|
594
|
+
preset: import_zod2.z.string().optional().describe("Only to adopt a preset on a connection that has none."),
|
|
595
|
+
presetVersion: import_zod2.z.number().int().optional(),
|
|
596
|
+
orgId: import_zod2.z.string().optional(),
|
|
597
|
+
atlasIdAppId: import_zod2.z.string().optional(),
|
|
598
|
+
dryRun: import_zod2.z.boolean().optional().describe("Answer the diff and change nothing.")
|
|
599
|
+
},
|
|
600
|
+
(a) => {
|
|
601
|
+
const { id, dryRun, ...input } = a;
|
|
602
|
+
return dryRun === true ? client.fulfillment.dryRunUpgradeExecutorPreset(id, input) : client.fulfillment.upgradeExecutorPreset(id, input);
|
|
603
|
+
}
|
|
604
|
+
);
|
|
579
605
|
tool(
|
|
580
606
|
"test_dsar_executor_webhook",
|
|
581
607
|
"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.",
|
|
@@ -609,15 +635,17 @@ function registerPlatformTools(tool, client) {
|
|
|
609
635
|
);
|
|
610
636
|
tool(
|
|
611
637
|
"test_dsar_executor",
|
|
612
|
-
"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.",
|
|
638
|
+
"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.",
|
|
613
639
|
{
|
|
614
640
|
id: import_zod2.z.string().describe("The connection id."),
|
|
615
|
-
email: import_zod2.z.string().describe("The address to look up."),
|
|
641
|
+
email: import_zod2.z.string().optional().describe("The address to look up. Omit it with canary."),
|
|
642
|
+
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."),
|
|
616
643
|
operation: import_zod2.z.enum(["locate", "export", "erase"]).optional().describe("Default locate."),
|
|
617
644
|
open: import_zod2.z.boolean().optional().describe("For export only: open a real export and poll it once.")
|
|
618
645
|
},
|
|
619
646
|
(a) => client.fulfillment.testExecutor(a.id, {
|
|
620
|
-
email: a.email,
|
|
647
|
+
...typeof a.email === "string" ? { email: a.email } : {},
|
|
648
|
+
...a.canary === true ? { canary: true } : {},
|
|
621
649
|
...a.operation ? { operation: a.operation } : {},
|
|
622
650
|
...typeof a.open === "boolean" ? { open: a.open } : {}
|
|
623
651
|
})
|
|
@@ -703,31 +731,107 @@ function registerPlatformTools(tool, client) {
|
|
|
703
731
|
);
|
|
704
732
|
}
|
|
705
733
|
|
|
706
|
-
// src/tools-
|
|
734
|
+
// src/tools-integrations.ts
|
|
707
735
|
var import_zod3 = require("zod");
|
|
736
|
+
function registerIntegrationTools(tool, client) {
|
|
737
|
+
const updateSiteSchema = import_zod3.z.object({
|
|
738
|
+
cbid: import_zod3.z.string().describe("Site identifier (cbid)."),
|
|
739
|
+
domain: import_zod3.z.string().optional().describe("New domain, a bare hostname. A move clears verification: verify the new domain afterwards."),
|
|
740
|
+
name: import_zod3.z.string().nullable().optional().describe("Display name data subjects see on the rights page and in notices; null clears it."),
|
|
741
|
+
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."),
|
|
742
|
+
dryRun: import_zod3.z.boolean().optional().describe("Answer with the diff and its effects, storing nothing.")
|
|
743
|
+
});
|
|
744
|
+
tool(
|
|
745
|
+
"update_site",
|
|
746
|
+
"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.",
|
|
747
|
+
updateSiteSchema.shape,
|
|
748
|
+
(a) => {
|
|
749
|
+
const { cbid, dryRun, ...patch } = updateSiteSchema.parse(a);
|
|
750
|
+
return client.sites.update(cbid, patch, { dryRun });
|
|
751
|
+
}
|
|
752
|
+
);
|
|
753
|
+
tool(
|
|
754
|
+
"integration_health",
|
|
755
|
+
"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.",
|
|
756
|
+
{ cbid: import_zod3.z.string().optional().describe("Site identifier; optional when the org has one site.") },
|
|
757
|
+
(a) => client.integrationHealth(a.cbid)
|
|
758
|
+
);
|
|
759
|
+
const provisionSchema = import_zod3.z.object({
|
|
760
|
+
product: import_zod3.z.string().describe("A slug naming the product."),
|
|
761
|
+
domain: import_zod3.z.string().describe("The product\u2019s domain (bare hostname)."),
|
|
762
|
+
name: import_zod3.z.string().optional(),
|
|
763
|
+
aliases: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
764
|
+
cbid: import_zod3.z.string().optional().describe("Update this site instead of matching by domain."),
|
|
765
|
+
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."),
|
|
766
|
+
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."),
|
|
767
|
+
rightsApi: import_zod3.z.object({ baseUrl: import_zod3.z.string(), secretKey: import_zod3.z.string(), profilePreset: import_zod3.z.string().optional() }).optional(),
|
|
768
|
+
dryRun: import_zod3.z.boolean().optional().describe("Report what each step would do; write nothing on any platform. Run this first.")
|
|
769
|
+
});
|
|
770
|
+
tool(
|
|
771
|
+
"provision_product",
|
|
772
|
+
"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.",
|
|
773
|
+
provisionSchema.shape,
|
|
774
|
+
(a) => {
|
|
775
|
+
const { dryRun, ...input } = provisionSchema.parse(a);
|
|
776
|
+
return client.provision(input, { dryRun });
|
|
777
|
+
}
|
|
778
|
+
);
|
|
779
|
+
tool(
|
|
780
|
+
"list_site_partners",
|
|
781
|
+
"Which partner platforms (Forumulate, Atlas) receive this site\u2019s consent events, each with its status, and which partners are on offer. Read-only.",
|
|
782
|
+
{ cbid: import_zod3.z.string() },
|
|
783
|
+
(a) => client.sites.listPartners(a.cbid)
|
|
784
|
+
);
|
|
785
|
+
const linkSchema = import_zod3.z.object({
|
|
786
|
+
cbid: import_zod3.z.string(),
|
|
787
|
+
partner: import_zod3.z.enum(["forumulate", "atlas"]),
|
|
788
|
+
externalId: import_zod3.z.string().describe("The partner\u2019s id for the receiving account, e.g. a Forumulate organisation id."),
|
|
789
|
+
label: import_zod3.z.string().optional().describe('Shown with the partner name, e.g. "docs".'),
|
|
790
|
+
events: import_zod3.z.array(import_zod3.z.enum(["consent.recorded", "consent.withdrawn"])).optional(),
|
|
791
|
+
dryRun: import_zod3.z.boolean().optional()
|
|
792
|
+
});
|
|
793
|
+
tool(
|
|
794
|
+
"link_site_partner",
|
|
795
|
+
"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.",
|
|
796
|
+
linkSchema.shape,
|
|
797
|
+
(a) => {
|
|
798
|
+
const { cbid, dryRun, ...input } = linkSchema.parse(a);
|
|
799
|
+
return client.sites.linkPartner(cbid, input, { dryRun });
|
|
800
|
+
}
|
|
801
|
+
);
|
|
802
|
+
tool(
|
|
803
|
+
"unlink_site_partner",
|
|
804
|
+
"Revoke a partner link: no further consent events go to that partner.",
|
|
805
|
+
{ cbid: import_zod3.z.string(), linkId: import_zod3.z.string() },
|
|
806
|
+
(a) => client.sites.unlinkPartner(a.cbid, a.linkId)
|
|
807
|
+
);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
// src/tools-rights-page.ts
|
|
811
|
+
var import_zod4 = require("zod");
|
|
708
812
|
function registerRightsTools(tool, client) {
|
|
709
|
-
const cbid = { cbid:
|
|
813
|
+
const cbid = { cbid: import_zod4.z.string().describe("Site identifier (cbid). Must belong to your org.") };
|
|
710
814
|
const base = {
|
|
711
|
-
baseUpdatedAt:
|
|
815
|
+
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.")
|
|
712
816
|
};
|
|
713
817
|
const baseOpt = (a) => a.baseUpdatedAt !== void 0 ? { baseUpdatedAt: a.baseUpdatedAt } : {};
|
|
714
818
|
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));
|
|
715
819
|
tool(
|
|
716
820
|
"update_rights_page",
|
|
717
821
|
"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.",
|
|
718
|
-
{ ...cbid, page:
|
|
822
|
+
{ ...cbid, page: import_zod4.z.record(import_zod4.z.unknown()).describe("The whole RightsPage document (v: 1)."), ...base },
|
|
719
823
|
(a) => client.rightsPage.put(a.cbid, a.page, baseOpt(a))
|
|
720
824
|
);
|
|
721
825
|
tool(
|
|
722
826
|
"patch_rights_page",
|
|
723
827
|
"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).",
|
|
724
|
-
{ ...cbid, patch:
|
|
828
|
+
{ ...cbid, patch: import_zod4.z.record(import_zod4.z.unknown()), ...base },
|
|
725
829
|
(a) => client.rightsPage.patch(a.cbid, a.patch, baseOpt(a))
|
|
726
830
|
);
|
|
727
831
|
tool(
|
|
728
832
|
"preview_rights_page",
|
|
729
833
|
'Validate a rights-page write WITHOUT saving: returns the document as it would be stored and any publish warnings. mode "patch" (default) or "put".',
|
|
730
|
-
{ ...cbid, page:
|
|
834
|
+
{ ...cbid, page: import_zod4.z.record(import_zod4.z.unknown()), mode: import_zod4.z.enum(["patch", "put"]).optional() },
|
|
731
835
|
(a) => client.rightsPage.dryRun(a.cbid, a.page, { mode: a.mode ?? "patch" })
|
|
732
836
|
);
|
|
733
837
|
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));
|
|
@@ -741,14 +845,14 @@ function registerRightsTools(tool, client) {
|
|
|
741
845
|
tool(
|
|
742
846
|
"rollback_rights_page",
|
|
743
847
|
"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.",
|
|
744
|
-
{ ...cbid, version:
|
|
848
|
+
{ ...cbid, version: import_zod4.z.number().int().min(1), ...base },
|
|
745
849
|
(a) => client.rightsPage.rollback(a.cbid, a.version, baseOpt(a))
|
|
746
850
|
);
|
|
747
851
|
}
|
|
748
852
|
function registerRightsPageTools(tool, client) {
|
|
749
|
-
const site =
|
|
853
|
+
const site = import_zod4.z.object({ cbid: import_zod4.z.string().describe("Site identifier (cbid). Must belong to your org.") });
|
|
750
854
|
const host = site.extend({
|
|
751
|
-
hostname:
|
|
855
|
+
hostname: import_zod4.z.string().describe("The custom hostname, e.g. privacy.example.com (unicode or punycode).")
|
|
752
856
|
});
|
|
753
857
|
tool(
|
|
754
858
|
"list_rights_page_domains",
|
|
@@ -888,10 +992,10 @@ function registerTools(server, client) {
|
|
|
888
992
|
}
|
|
889
993
|
});
|
|
890
994
|
};
|
|
891
|
-
const cbid = { cbid:
|
|
995
|
+
const cbid = { cbid: import_zod5.z.string().describe("Site identifier (cbid). Must belong to your org.") };
|
|
892
996
|
const range = {
|
|
893
|
-
from:
|
|
894
|
-
to:
|
|
997
|
+
from: import_zod5.z.number().optional().describe("Epoch-ms lower bound."),
|
|
998
|
+
to: import_zod5.z.number().optional().describe("Epoch-ms upper bound.")
|
|
895
999
|
};
|
|
896
1000
|
tool(
|
|
897
1001
|
"whoami",
|
|
@@ -909,19 +1013,19 @@ function registerTools(server, client) {
|
|
|
909
1013
|
tool(
|
|
910
1014
|
"get_site",
|
|
911
1015
|
"One site: its domain, cbid and verification status. Read-only.",
|
|
912
|
-
{ cbid:
|
|
1016
|
+
{ cbid: import_zod5.z.string() },
|
|
913
1017
|
(a) => client.sites.get(a.cbid)
|
|
914
1018
|
);
|
|
915
1019
|
tool(
|
|
916
1020
|
"get_site_banner",
|
|
917
1021
|
"Which banner design a site uses, or bannerId null when none is assigned. Read-only.",
|
|
918
|
-
{ cbid:
|
|
1022
|
+
{ cbid: import_zod5.z.string() },
|
|
919
1023
|
(a) => client.sites.banner(a.cbid)
|
|
920
1024
|
);
|
|
921
1025
|
tool(
|
|
922
1026
|
"get_privacy_policy",
|
|
923
1027
|
"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.",
|
|
924
|
-
{ cbid:
|
|
1028
|
+
{ 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() },
|
|
925
1029
|
(a) => client.sites.policy(a.cbid, {
|
|
926
1030
|
...a.contactEmail ? { contactEmail: a.contactEmail } : {},
|
|
927
1031
|
...a.effectiveDate ? { effectiveDate: a.effectiveDate } : {},
|
|
@@ -931,7 +1035,7 @@ function registerTools(server, client) {
|
|
|
931
1035
|
tool(
|
|
932
1036
|
"set_ad_personalization",
|
|
933
1037
|
"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.",
|
|
934
|
-
{ cbid:
|
|
1038
|
+
{ cbid: import_zod5.z.string(), enabled: import_zod5.z.boolean(), default: import_zod5.z.boolean().optional(), label: import_zod5.z.string().optional() },
|
|
935
1039
|
(a) => client.sites.setAdPersonalization(a.cbid, {
|
|
936
1040
|
enabled: a.enabled,
|
|
937
1041
|
...a.default !== void 0 ? { default: a.default } : {},
|
|
@@ -942,11 +1046,11 @@ function registerTools(server, client) {
|
|
|
942
1046
|
"analyze_session",
|
|
943
1047
|
"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.",
|
|
944
1048
|
{
|
|
945
|
-
cbid:
|
|
946
|
-
har:
|
|
947
|
-
requests:
|
|
948
|
-
consent:
|
|
949
|
-
gpc:
|
|
1049
|
+
cbid: import_zod5.z.string(),
|
|
1050
|
+
har: import_zod5.z.unknown().optional().describe("A HAR export of the session."),
|
|
1051
|
+
requests: import_zod5.z.array(import_zod5.z.unknown()).optional().describe("Or the requests directly."),
|
|
1052
|
+
consent: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.boolean()).optional(),
|
|
1053
|
+
gpc: import_zod5.z.boolean().optional()
|
|
950
1054
|
},
|
|
951
1055
|
(a) => client.sites.analyzeSession(a.cbid, {
|
|
952
1056
|
...a.har !== void 0 ? { har: a.har } : {},
|
|
@@ -958,14 +1062,14 @@ function registerTools(server, client) {
|
|
|
958
1062
|
tool(
|
|
959
1063
|
"create_site",
|
|
960
1064
|
"Create a new site. The cbid is auto-generated if you omit it.",
|
|
961
|
-
{ domain:
|
|
1065
|
+
{ domain: import_zod5.z.string().describe("The site domain, e.g. example.com."), cbid: import_zod5.z.string().optional().describe("Optional explicit cbid.") },
|
|
962
1066
|
(a) => client.sites.create({ domain: a.domain, ...typeof a.cbid === "string" ? { cbid: a.cbid } : {} })
|
|
963
1067
|
);
|
|
964
1068
|
tool(
|
|
965
1069
|
"create_sites_bulk",
|
|
966
1070
|
"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.",
|
|
967
1071
|
{
|
|
968
|
-
sites:
|
|
1072
|
+
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)
|
|
969
1073
|
},
|
|
970
1074
|
(a) => client.sites.createBulk(a.sites)
|
|
971
1075
|
);
|
|
@@ -975,15 +1079,15 @@ function registerTools(server, client) {
|
|
|
975
1079
|
"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.",
|
|
976
1080
|
{
|
|
977
1081
|
...cbid,
|
|
978
|
-
config:
|
|
979
|
-
keepUnspecified:
|
|
1082
|
+
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."),
|
|
1083
|
+
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.")
|
|
980
1084
|
},
|
|
981
1085
|
(a) => a.keepUnspecified === true ? client.sites.putConfig(a.cbid, a.config, { keep: "unspecified" }) : client.sites.putConfig(a.cbid, a.config)
|
|
982
1086
|
);
|
|
983
1087
|
tool(
|
|
984
1088
|
"patch_site_config",
|
|
985
1089
|
`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.`,
|
|
986
|
-
{ ...cbid, config:
|
|
1090
|
+
{ ...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.') },
|
|
987
1091
|
(a) => client.sites.patchConfig(a.cbid, a.config)
|
|
988
1092
|
);
|
|
989
1093
|
tool(
|
|
@@ -991,9 +1095,9 @@ function registerTools(server, client) {
|
|
|
991
1095
|
'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.',
|
|
992
1096
|
{
|
|
993
1097
|
...cbid,
|
|
994
|
-
config:
|
|
995
|
-
mode:
|
|
996
|
-
keepUnspecified:
|
|
1098
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).describe('The patch (or, with mode "put", the full config) to preview.'),
|
|
1099
|
+
mode: import_zod5.z.enum(["patch", "put"]).optional().describe("patch (default) merges; put replaces."),
|
|
1100
|
+
keepUnspecified: import_zod5.z.boolean().optional().describe('With mode "put": preview update_site_config with keepUnspecified (omitted top-level fields keep their stored value).')
|
|
997
1101
|
},
|
|
998
1102
|
(a) => client.sites.dryRunConfig(a.cbid, a.config, {
|
|
999
1103
|
mode: a.mode ?? "patch",
|
|
@@ -1005,8 +1109,8 @@ function registerTools(server, client) {
|
|
|
1005
1109
|
'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.',
|
|
1006
1110
|
{
|
|
1007
1111
|
...cbid,
|
|
1008
|
-
config:
|
|
1009
|
-
replace:
|
|
1112
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).describe("The proposed SiteConfig (or a partial one, or a v2 flow design)."),
|
|
1113
|
+
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.")
|
|
1010
1114
|
},
|
|
1011
1115
|
async (a) => {
|
|
1012
1116
|
const r = await client.sites.lintConfig(a.cbid, a.config, a.replace === true ? { replace: true } : {});
|
|
@@ -1030,7 +1134,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1030
1134
|
tool(
|
|
1031
1135
|
"get_consent_log",
|
|
1032
1136
|
"Get recent anonymised consent records for a site.",
|
|
1033
|
-
{ ...cbid, ...range, limit:
|
|
1137
|
+
{ ...cbid, ...range, limit: import_zod5.z.number().optional().describe("Max records to return (default 200).") },
|
|
1034
1138
|
(a) => client.consent.log(a.cbid, {
|
|
1035
1139
|
from: a.from,
|
|
1036
1140
|
to: a.to,
|
|
@@ -1040,7 +1144,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1040
1144
|
tool(
|
|
1041
1145
|
"get_subject_consent",
|
|
1042
1146
|
"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.",
|
|
1043
|
-
{ subjectId:
|
|
1147
|
+
{ subjectId: import_zod5.z.string() },
|
|
1044
1148
|
(a) => client.subjects.consent(a.subjectId)
|
|
1045
1149
|
);
|
|
1046
1150
|
tool("list_dsar", "List all Data Subject Access Requests for your organization.", {}, () => client.dsar.list());
|
|
@@ -1048,51 +1152,53 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1048
1152
|
"update_dsar_executor",
|
|
1049
1153
|
"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.",
|
|
1050
1154
|
{
|
|
1051
|
-
id:
|
|
1052
|
-
patch:
|
|
1053
|
-
dryRun:
|
|
1155
|
+
id: import_zod5.z.string(),
|
|
1156
|
+
patch: import_zod5.z.record(import_zod5.z.unknown()),
|
|
1157
|
+
dryRun: import_zod5.z.boolean().optional().describe("Validate and diff without saving.")
|
|
1054
1158
|
},
|
|
1055
1159
|
(a) => a.dryRun === true ? client.fulfillment.dryRunUpdateExecutor(a.id, a.patch) : client.fulfillment.updateExecutor(a.id, a.patch)
|
|
1056
1160
|
);
|
|
1057
1161
|
tool(
|
|
1058
1162
|
"get_dsar",
|
|
1059
1163
|
"One rights request by id, including its status and the deadline it must be answered by.",
|
|
1060
|
-
{ id:
|
|
1164
|
+
{ id: import_zod5.z.string() },
|
|
1061
1165
|
(a) => client.dsar.get(a.id)
|
|
1062
1166
|
);
|
|
1063
1167
|
tool(
|
|
1064
1168
|
"erase_dsar_subject",
|
|
1065
1169
|
"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.",
|
|
1066
|
-
{ id:
|
|
1170
|
+
{ id: import_zod5.z.string(), cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1067
1171
|
(a) => client.dsar.erase(a.id, a.cbid, a.stamp)
|
|
1068
1172
|
);
|
|
1069
1173
|
tool(
|
|
1070
1174
|
"export_dsar_subject",
|
|
1071
1175
|
"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.",
|
|
1072
|
-
{ id:
|
|
1176
|
+
{ id: import_zod5.z.string(), cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1073
1177
|
(a) => client.dsar.export(a.id, a.cbid, a.stamp)
|
|
1074
1178
|
);
|
|
1075
1179
|
tool(
|
|
1076
1180
|
"get_dsar_response_notice",
|
|
1077
1181
|
"The subject-facing response notice for a request, as plain text \u2014 what to send the person. Read-only; nothing is sent.",
|
|
1078
|
-
{ id:
|
|
1182
|
+
{ id: import_zod5.z.string() },
|
|
1079
1183
|
(a) => client.dsar.response(a.id)
|
|
1080
1184
|
);
|
|
1081
1185
|
tool(
|
|
1082
1186
|
"create_dsar",
|
|
1083
1187
|
"Open a new Data Subject Access Request.",
|
|
1084
1188
|
{
|
|
1085
|
-
type:
|
|
1086
|
-
subjectEmail:
|
|
1087
|
-
regulation:
|
|
1088
|
-
note:
|
|
1089
|
-
|
|
1189
|
+
type: import_zod5.z.enum(["access", "deletion", "rectification", "portability", "opt-out"]).describe("DSAR right being exercised."),
|
|
1190
|
+
subjectEmail: import_zod5.z.string().describe("The data subject\u2019s email."),
|
|
1191
|
+
regulation: import_zod5.z.enum(["gdpr", "ccpa"]).describe("Governing regulation."),
|
|
1192
|
+
note: import_zod5.z.string().optional().describe("Optional INTERNAL note; never shown to the data subject."),
|
|
1193
|
+
messageToSubject: import_zod5.z.string().max(2e3).optional().describe("The line the data subject reads in the response notice. Never an API key."),
|
|
1194
|
+
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.")
|
|
1090
1195
|
},
|
|
1091
1196
|
(a) => client.dsar.create({
|
|
1092
1197
|
type: a.type,
|
|
1093
1198
|
subjectEmail: a.subjectEmail,
|
|
1094
1199
|
regulation: a.regulation,
|
|
1095
1200
|
...typeof a.note === "string" ? { note: a.note } : {},
|
|
1201
|
+
...typeof a.messageToSubject === "string" ? { messageToSubject: a.messageToSubject } : {},
|
|
1096
1202
|
...a.test === true ? { test: true } : {}
|
|
1097
1203
|
})
|
|
1098
1204
|
);
|
|
@@ -1100,11 +1206,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1100
1206
|
"create_rights_link",
|
|
1101
1207
|
"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.",
|
|
1102
1208
|
{
|
|
1103
|
-
cbid:
|
|
1104
|
-
email:
|
|
1105
|
-
userId:
|
|
1106
|
-
rights:
|
|
1107
|
-
ttlSeconds:
|
|
1209
|
+
cbid: import_zod5.z.string().describe("Site identifier (cbid). Must belong to your org."),
|
|
1210
|
+
email: import_zod5.z.string().describe("The signed-in person\u2019s verified email address."),
|
|
1211
|
+
userId: import_zod5.z.string().optional().describe("Your own account id for them; recorded on the request."),
|
|
1212
|
+
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."),
|
|
1213
|
+
ttlSeconds: import_zod5.z.number().int().min(60).max(3600).optional().describe("How long the link works, in seconds (default 900).")
|
|
1108
1214
|
},
|
|
1109
1215
|
(a) => client.rightsLinks.create(a.cbid, {
|
|
1110
1216
|
subject: { email: a.email, ...typeof a.userId === "string" ? { userId: a.userId } : {} },
|
|
@@ -1115,7 +1221,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1115
1221
|
tool(
|
|
1116
1222
|
"delete_test_dsar",
|
|
1117
1223
|
"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.",
|
|
1118
|
-
{ id:
|
|
1224
|
+
{ id: import_zod5.z.string().describe("The test request id.") },
|
|
1119
1225
|
async (a) => {
|
|
1120
1226
|
await client.dsar.delete(a.id);
|
|
1121
1227
|
return { deleted: a.id };
|
|
@@ -1124,17 +1230,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1124
1230
|
tool(
|
|
1125
1231
|
"mark_dsar_test",
|
|
1126
1232
|
"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 }.",
|
|
1127
|
-
{ id:
|
|
1233
|
+
{ id: import_zod5.z.string().describe("The closed request id.") },
|
|
1128
1234
|
(a) => client.dsar.markTest(a.id)
|
|
1129
1235
|
);
|
|
1130
1236
|
tool(
|
|
1131
1237
|
"advance_dsar",
|
|
1132
1238
|
"Advance a DSAR to a new status (received \u2192 verifying \u2192 in_progress \u2192 completed, or rejected).",
|
|
1133
1239
|
{
|
|
1134
|
-
id:
|
|
1135
|
-
toStatus:
|
|
1240
|
+
id: import_zod5.z.string().describe("The DSAR id."),
|
|
1241
|
+
toStatus: import_zod5.z.enum(["received", "verifying", "in_progress", "completed", "rejected"]).describe("Target status."),
|
|
1242
|
+
messageToSubject: import_zod5.z.string().max(2e3).optional().describe("Replaces the line the data subject reads in the notice \u2014 for a rejection, why.")
|
|
1136
1243
|
},
|
|
1137
|
-
(a) => client.dsar.advance(a.id, a.toStatus)
|
|
1244
|
+
(a) => typeof a.messageToSubject === "string" ? client.dsar.advance(a.id, a.toStatus, { messageToSubject: a.messageToSubject }) : client.dsar.advance(a.id, a.toStatus)
|
|
1138
1245
|
);
|
|
1139
1246
|
tool(
|
|
1140
1247
|
"export_consent",
|
|
@@ -1145,7 +1252,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1145
1252
|
tool(
|
|
1146
1253
|
"get_receipt",
|
|
1147
1254
|
"Fetch the signed consent receipt for a single consent record (by stamp).",
|
|
1148
|
-
{ ...cbid, stamp:
|
|
1255
|
+
{ ...cbid, stamp: import_zod5.z.string().describe("The consent record stamp/id.") },
|
|
1149
1256
|
(a) => client.consent.receipt(a.cbid, a.stamp)
|
|
1150
1257
|
);
|
|
1151
1258
|
tool("delete_site", "Delete a site (cbid) and its configuration from your org.", { ...cbid }, async (a) => {
|
|
@@ -1157,13 +1264,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1157
1264
|
"create_vendor",
|
|
1158
1265
|
"Register a vendor (processor) and compute its risk score.",
|
|
1159
1266
|
{
|
|
1160
|
-
name:
|
|
1161
|
-
category:
|
|
1162
|
-
dataShared:
|
|
1163
|
-
dpaSigned:
|
|
1164
|
-
subprocessors:
|
|
1165
|
-
certifications:
|
|
1166
|
-
region:
|
|
1267
|
+
name: import_zod5.z.string().describe("Vendor name."),
|
|
1268
|
+
category: import_zod5.z.string().describe("Vendor category, e.g. analytics."),
|
|
1269
|
+
dataShared: import_zod5.z.array(import_zod5.z.string()).describe("Categories of data shared with the vendor."),
|
|
1270
|
+
dpaSigned: import_zod5.z.boolean().describe("Whether a Data Processing Agreement is signed."),
|
|
1271
|
+
subprocessors: import_zod5.z.number().describe("Number of subprocessors."),
|
|
1272
|
+
certifications: import_zod5.z.array(import_zod5.z.string()).describe("Compliance certifications, e.g. ISO27001."),
|
|
1273
|
+
region: import_zod5.z.string().describe("Primary processing region, e.g. EU.")
|
|
1167
1274
|
},
|
|
1168
1275
|
(a) => client.vendors.create({
|
|
1169
1276
|
name: a.name,
|
|
@@ -1181,13 +1288,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1181
1288
|
"create_ropa",
|
|
1182
1289
|
"Create a Record of Processing Activity (RoPA) entry.",
|
|
1183
1290
|
{
|
|
1184
|
-
name:
|
|
1185
|
-
purpose:
|
|
1186
|
-
legalBasis:
|
|
1187
|
-
dataCategories:
|
|
1188
|
-
recipients:
|
|
1189
|
-
retentionDays:
|
|
1190
|
-
crossBorderTransfer:
|
|
1291
|
+
name: import_zod5.z.string().describe("Activity name."),
|
|
1292
|
+
purpose: import_zod5.z.string().describe("Purpose of processing."),
|
|
1293
|
+
legalBasis: import_zod5.z.enum(["consent", "contract", "legal-obligation", "vital-interests", "public-task", "legitimate-interests"]).describe("GDPR legal basis."),
|
|
1294
|
+
dataCategories: import_zod5.z.array(import_zod5.z.string()).describe("Categories of personal data."),
|
|
1295
|
+
recipients: import_zod5.z.array(import_zod5.z.string()).describe("Recipients of the data."),
|
|
1296
|
+
retentionDays: import_zod5.z.number().describe("Retention period in days."),
|
|
1297
|
+
crossBorderTransfer: import_zod5.z.boolean().describe("Whether data is transferred across borders.")
|
|
1191
1298
|
},
|
|
1192
1299
|
(a) => client.ropa.create({
|
|
1193
1300
|
name: a.name,
|
|
@@ -1208,7 +1315,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1208
1315
|
tool(
|
|
1209
1316
|
"scan_site",
|
|
1210
1317
|
"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.",
|
|
1211
|
-
{ ...cbid, wait:
|
|
1318
|
+
{ ...cbid, wait: import_zod5.z.boolean().optional().describe("Wait for the scan to finish (up to 100 s) and return its outcome.") },
|
|
1212
1319
|
async (a) => {
|
|
1213
1320
|
let started;
|
|
1214
1321
|
try {
|
|
@@ -1222,7 +1329,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1222
1329
|
tool(
|
|
1223
1330
|
"get_scan_status",
|
|
1224
1331
|
"Get a site\u2019s last cookie scan: state (queued, scanning, done, failed), scanId, durationMs, cookieCount, pagesVisited and error when it failed.",
|
|
1225
|
-
{ ...cbid, wait:
|
|
1332
|
+
{ ...cbid, wait: import_zod5.z.number().min(0).max(60).optional().describe("Seconds (\u226460) to wait for a running scan to settle before answering.") },
|
|
1226
1333
|
(a) => a.wait !== void 0 ? client.sites.scanStatus(a.cbid, { wait: a.wait }) : client.sites.scanStatus(a.cbid)
|
|
1227
1334
|
);
|
|
1228
1335
|
tool(
|
|
@@ -1234,16 +1341,25 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1234
1341
|
tool("list_brand_kits", "List reusable brand kits (colors/logo/typography) for your org.", {}, () => client.brandKits.list());
|
|
1235
1342
|
tool("list_preferences", "List configurable consent preferences/purposes for your org.", {}, () => client.preferences.list());
|
|
1236
1343
|
tool("list_members", "List the members of your organization.", {}, () => client.members.list());
|
|
1237
|
-
tool("list_api_keys", "List the API keys for your organization (secrets are not returned).", {}, () => client.keys.list());
|
|
1344
|
+
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());
|
|
1345
|
+
tool(
|
|
1346
|
+
"api_key_report",
|
|
1347
|
+
"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.",
|
|
1348
|
+
{
|
|
1349
|
+
unusedDays: import_zod5.z.number().int().min(1).max(3650).optional().describe("Unused for at least this many days (default 90)."),
|
|
1350
|
+
expiringDays: import_zod5.z.number().int().min(1).max(3650).optional().describe("Expiring within this many days (default 14).")
|
|
1351
|
+
},
|
|
1352
|
+
(a) => client.keys.report({ ...a.unusedDays !== void 0 ? { unusedDays: a.unusedDays } : {}, ...a.expiringDays !== void 0 ? { expiringDays: a.expiringDays } : {} })
|
|
1353
|
+
);
|
|
1238
1354
|
tool("get_usage", "Get the current usage/quota summary for your organization.", {}, () => client.usage());
|
|
1239
1355
|
tool("list_webhooks", "List webhook subscriptions for your organization.", {}, () => client.webhooks.list());
|
|
1240
1356
|
tool(
|
|
1241
1357
|
"create_webhook",
|
|
1242
1358
|
"Create a webhook subscription. The response includes the signing secret (shown once).",
|
|
1243
1359
|
{
|
|
1244
|
-
url:
|
|
1245
|
-
events:
|
|
1246
|
-
cbid:
|
|
1360
|
+
url: import_zod5.z.string().describe("HTTPS endpoint to deliver events to."),
|
|
1361
|
+
events: import_zod5.z.array(import_zod5.z.string()).describe("Event names to subscribe to, e.g. consent.created."),
|
|
1362
|
+
cbid: import_zod5.z.string().optional().describe("Optional site cbid to scope the subscription to.")
|
|
1247
1363
|
},
|
|
1248
1364
|
(a) => client.webhooks.create({
|
|
1249
1365
|
url: a.url,
|
|
@@ -1254,13 +1370,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1254
1370
|
tool(
|
|
1255
1371
|
"roll_webhook_secret",
|
|
1256
1372
|
"Rotate a webhook subscription\u2019s signing secret. The new secret is returned once; the receiving endpoint must be updated to verify with it.",
|
|
1257
|
-
{ id:
|
|
1373
|
+
{ id: import_zod5.z.string() },
|
|
1258
1374
|
(a) => client.webhooks.rollSecret(a.id)
|
|
1259
1375
|
);
|
|
1260
1376
|
tool(
|
|
1261
1377
|
"test_webhook",
|
|
1262
1378
|
"Send a signed test event to a webhook subscription now, and report what the endpoint answered.",
|
|
1263
|
-
{ id:
|
|
1379
|
+
{ id: import_zod5.z.string() },
|
|
1264
1380
|
(a) => client.webhooks.test(a.id)
|
|
1265
1381
|
);
|
|
1266
1382
|
tool(
|
|
@@ -1272,18 +1388,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1272
1388
|
tool(
|
|
1273
1389
|
"replay_webhook_dead_letter",
|
|
1274
1390
|
"Deliver a dead-lettered webhook event again, to the subscription as it is now.",
|
|
1275
|
-
{ id:
|
|
1391
|
+
{ id: import_zod5.z.string() },
|
|
1276
1392
|
(a) => client.webhooks.replayDeadLetter(a.id)
|
|
1277
1393
|
);
|
|
1278
1394
|
tool(
|
|
1279
1395
|
"update_webhook",
|
|
1280
1396
|
"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.",
|
|
1281
1397
|
{
|
|
1282
|
-
id:
|
|
1283
|
-
url:
|
|
1284
|
-
events:
|
|
1285
|
-
cbid:
|
|
1286
|
-
active:
|
|
1398
|
+
id: import_zod5.z.string(),
|
|
1399
|
+
url: import_zod5.z.string().optional(),
|
|
1400
|
+
events: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1401
|
+
cbid: import_zod5.z.string().nullable().optional(),
|
|
1402
|
+
active: import_zod5.z.boolean().optional()
|
|
1287
1403
|
},
|
|
1288
1404
|
(a) => client.webhooks.update(a.id, {
|
|
1289
1405
|
...a.url !== void 0 ? { url: a.url } : {},
|
|
@@ -1292,20 +1408,20 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1292
1408
|
...a.active !== void 0 ? { active: a.active } : {}
|
|
1293
1409
|
})
|
|
1294
1410
|
);
|
|
1295
|
-
tool("delete_webhook", "Delete a webhook subscription by id.", { id:
|
|
1411
|
+
tool("delete_webhook", "Delete a webhook subscription by id.", { id: import_zod5.z.string().describe("The webhook subscription id.") }, async (a) => {
|
|
1296
1412
|
await client.webhooks.delete(a.id);
|
|
1297
1413
|
return { ok: true };
|
|
1298
1414
|
});
|
|
1299
1415
|
tool(
|
|
1300
1416
|
"verify_site",
|
|
1301
1417
|
"Verify that your organization controls a domain by one of three challenge methods (dns / meta / file). Required to unlock consent export and signed receipts.",
|
|
1302
|
-
{ ...cbid, method:
|
|
1418
|
+
{ ...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).") },
|
|
1303
1419
|
(a) => client.sites.verify(a.cbid, a.method)
|
|
1304
1420
|
);
|
|
1305
1421
|
tool(
|
|
1306
1422
|
"get_verification_challenge",
|
|
1307
1423
|
"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.",
|
|
1308
|
-
{ cbid:
|
|
1424
|
+
{ cbid: import_zod5.z.string() },
|
|
1309
1425
|
(a) => client.sites.verifyChallenge(a.cbid)
|
|
1310
1426
|
);
|
|
1311
1427
|
tool(
|
|
@@ -1317,15 +1433,15 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1317
1433
|
tool(
|
|
1318
1434
|
"get_flow",
|
|
1319
1435
|
"Get the v2 banner flow config for a site, including current views, categories, and any lint issues.",
|
|
1320
|
-
{ cbid:
|
|
1436
|
+
{ cbid: import_zod5.z.string().describe("Site identifier (cbid).") },
|
|
1321
1437
|
(a) => client.sites.getFlow(a.cbid)
|
|
1322
1438
|
);
|
|
1323
1439
|
tool(
|
|
1324
1440
|
"edit_flow",
|
|
1325
1441
|
"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.",
|
|
1326
1442
|
{
|
|
1327
|
-
cbid:
|
|
1328
|
-
operations:
|
|
1443
|
+
cbid: import_zod5.z.string().describe("Site identifier (cbid)."),
|
|
1444
|
+
operations: import_zod5.z.array(import_zod5.z.record(import_zod5.z.unknown())).describe(
|
|
1329
1445
|
'Ordered list of ops. Each must have an "op" field: addView | removeView | addElement | setButtonTransition | addCustomCategory.'
|
|
1330
1446
|
)
|
|
1331
1447
|
},
|
|
@@ -1335,21 +1451,22 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1335
1451
|
"set_flow",
|
|
1336
1452
|
"Wholesale replace a site's v2 banner flow with a complete config (e.g. from a template). Validated server-side before it is saved.",
|
|
1337
1453
|
{
|
|
1338
|
-
cbid:
|
|
1339
|
-
config:
|
|
1454
|
+
cbid: import_zod5.z.string().describe("Site identifier (cbid)."),
|
|
1455
|
+
config: import_zod5.z.record(import_zod5.z.unknown()).describe("A full v2 FlowConfig object ({ v:2, flow, categories, ... }).")
|
|
1340
1456
|
},
|
|
1341
1457
|
(a) => client.sites.setFlow(a.cbid, a.config)
|
|
1342
1458
|
);
|
|
1343
1459
|
registerConfigTools(tool, client);
|
|
1344
1460
|
registerPlatformTools(tool, client);
|
|
1461
|
+
registerIntegrationTools(tool, client);
|
|
1345
1462
|
registerRightsTools(tool, client);
|
|
1346
1463
|
registerRightsPageTools(tool, client);
|
|
1347
1464
|
tool(
|
|
1348
1465
|
"invite_member",
|
|
1349
1466
|
"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.",
|
|
1350
1467
|
{
|
|
1351
|
-
email:
|
|
1352
|
-
role:
|
|
1468
|
+
email: import_zod5.z.string().describe("Email address of the person to invite."),
|
|
1469
|
+
role: import_zod5.z.enum(["admin", "member", "viewer"]).describe("Role to assign: admin, member, or viewer. owner is not assignable via API key.")
|
|
1353
1470
|
},
|
|
1354
1471
|
(a) => client.members.invite(a.email, a.role)
|
|
1355
1472
|
);
|
|
@@ -1357,8 +1474,8 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1357
1474
|
"set_member_role",
|
|
1358
1475
|
"Change the role of a member in your organization. The org owner's role cannot be changed.",
|
|
1359
1476
|
{
|
|
1360
|
-
userId:
|
|
1361
|
-
role:
|
|
1477
|
+
userId: import_zod5.z.string().describe("The userId of the member whose role to change."),
|
|
1478
|
+
role: import_zod5.z.enum(["admin", "member", "viewer"]).describe("New role: admin, member, or viewer.")
|
|
1362
1479
|
},
|
|
1363
1480
|
(a) => client.members.setRole(a.userId, a.role)
|
|
1364
1481
|
);
|
|
@@ -1366,7 +1483,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1366
1483
|
"remove_member",
|
|
1367
1484
|
"Remove a member from your organization. The org owner cannot be removed.",
|
|
1368
1485
|
{
|
|
1369
|
-
userId:
|
|
1486
|
+
userId: import_zod5.z.string().describe("The userId of the member to remove.")
|
|
1370
1487
|
},
|
|
1371
1488
|
async (a) => {
|
|
1372
1489
|
await client.members.remove(a.userId);
|
|
@@ -1377,11 +1494,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1377
1494
|
"create_brand_kit",
|
|
1378
1495
|
"Create a reusable brand kit (colors, logo, typography) for your organization's consent banners.",
|
|
1379
1496
|
{
|
|
1380
|
-
name:
|
|
1381
|
-
theme:
|
|
1382
|
-
content:
|
|
1383
|
-
logoUrl:
|
|
1384
|
-
customCss:
|
|
1497
|
+
name: import_zod5.z.string().describe("Display name for the brand kit."),
|
|
1498
|
+
theme: import_zod5.z.record(import_zod5.z.unknown()).describe("Theme tokens (colors, fonts, etc.) as a JSON object."),
|
|
1499
|
+
content: import_zod5.z.record(import_zod5.z.unknown()).optional().describe("Optional banner copy overrides."),
|
|
1500
|
+
logoUrl: import_zod5.z.string().optional().describe("Optional URL for your org logo."),
|
|
1501
|
+
customCss: import_zod5.z.string().optional().describe("Optional custom CSS string to inject into the banner.")
|
|
1385
1502
|
},
|
|
1386
1503
|
(a) => client.brandKits.create({
|
|
1387
1504
|
name: a.name,
|
|
@@ -1395,7 +1512,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1395
1512
|
"delete_brand_kit",
|
|
1396
1513
|
"Delete a brand kit by id. The kit must belong to your organization (cross-org deletes are rejected).",
|
|
1397
1514
|
{
|
|
1398
|
-
id:
|
|
1515
|
+
id: import_zod5.z.string().describe("The brand kit id to delete.")
|
|
1399
1516
|
},
|
|
1400
1517
|
async (a) => {
|
|
1401
1518
|
await client.brandKits.delete(a.id);
|
|
@@ -1406,63 +1523,65 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1406
1523
|
"save_preference",
|
|
1407
1524
|
"Save or update the consent preferences for an end-user (by subjectId) within your organization. purposes is a map of purpose-name \u2192 boolean.",
|
|
1408
1525
|
{
|
|
1409
|
-
subjectId:
|
|
1410
|
-
purposes:
|
|
1526
|
+
subjectId: import_zod5.z.string().describe("The end-user identifier (e.g. email or internal user id)."),
|
|
1527
|
+
purposes: import_zod5.z.record(import_zod5.z.boolean()).describe('Map of purpose names to consent values, e.g. { "newsletter": true, "analytics": false }.')
|
|
1411
1528
|
},
|
|
1412
1529
|
(a) => client.preferences.save(a.subjectId, a.purposes)
|
|
1413
1530
|
);
|
|
1414
1531
|
tool(
|
|
1415
1532
|
"get_preference",
|
|
1416
1533
|
"One end-user\u2019s saved preferences, by subjectId. Read-only.",
|
|
1417
|
-
{ subjectId:
|
|
1534
|
+
{ subjectId: import_zod5.z.string() },
|
|
1418
1535
|
(a) => client.preferences.get(a.subjectId)
|
|
1419
1536
|
);
|
|
1420
1537
|
tool(
|
|
1421
1538
|
"issue_api_key",
|
|
1422
1539
|
"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.",
|
|
1423
1540
|
{
|
|
1424
|
-
name:
|
|
1425
|
-
scopes:
|
|
1426
|
-
cbids:
|
|
1427
|
-
expiresInDays:
|
|
1541
|
+
name: import_zod5.z.string().optional(),
|
|
1542
|
+
scopes: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1543
|
+
cbids: import_zod5.z.array(import_zod5.z.string()).min(1).optional(),
|
|
1544
|
+
expiresInDays: import_zod5.z.number().int().min(1).max(3650).optional(),
|
|
1545
|
+
expiresAt: import_zod5.z.string().optional().describe("Or the exact expiry, an ISO date-time (not with expiresInDays).")
|
|
1428
1546
|
},
|
|
1429
1547
|
(a) => client.keys.issue({
|
|
1548
|
+
...a.expiresAt ? { expiresAt: a.expiresAt } : {},
|
|
1430
1549
|
...a.name ? { name: a.name } : {},
|
|
1431
1550
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1432
1551
|
...a.cbids ? { cbids: a.cbids } : {},
|
|
1433
1552
|
...a.expiresInDays !== void 0 ? { expiresInDays: a.expiresInDays } : {}
|
|
1434
1553
|
})
|
|
1435
1554
|
);
|
|
1436
|
-
tool("revoke_api_key", "Revoke an API key by its prefix. Takes effect immediately; anything using that key stops working.", { prefix:
|
|
1555
|
+
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) => {
|
|
1437
1556
|
await client.keys.revoke(a.prefix);
|
|
1438
1557
|
return { revoked: a.prefix };
|
|
1439
1558
|
});
|
|
1440
1559
|
tool(
|
|
1441
1560
|
"import_cookie_declaration",
|
|
1442
1561
|
"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.",
|
|
1443
|
-
{ cbid:
|
|
1562
|
+
{ cbid: import_zod5.z.string(), data: import_zod5.z.string().describe("The exported file, as text (CSV or JSON).") },
|
|
1444
1563
|
(a) => client.sites.importDeclaration(a.cbid, a.data)
|
|
1445
1564
|
);
|
|
1446
1565
|
tool(
|
|
1447
1566
|
"apply_cookie_import",
|
|
1448
1567
|
"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.",
|
|
1449
|
-
{ cbid:
|
|
1568
|
+
{ 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() },
|
|
1450
1569
|
(a) => client.sites.applyImport(a.cbid, a.data, a.overwrite ? { overwrite: true } : void 0)
|
|
1451
1570
|
);
|
|
1452
1571
|
const declarationShape = {
|
|
1453
|
-
category:
|
|
1454
|
-
purpose:
|
|
1455
|
-
purposes:
|
|
1456
|
-
provider:
|
|
1457
|
-
expiry:
|
|
1458
|
-
domain:
|
|
1459
|
-
pattern:
|
|
1572
|
+
category: import_zod5.z.string().describe("necessary, preferences, statistics, marketing, or one of the site\u2019s categories.custom ids."),
|
|
1573
|
+
purpose: import_zod5.z.string().describe("What the cookie does, as visitors will read it \u2014 and the fallback for any language purposes lacks."),
|
|
1574
|
+
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.'),
|
|
1575
|
+
provider: import_zod5.z.string().optional(),
|
|
1576
|
+
expiry: import_zod5.z.string().optional().describe('e.g. "Session", "30 days", "1 year" (the banner localises these forms).'),
|
|
1577
|
+
domain: import_zod5.z.string().optional(),
|
|
1578
|
+
pattern: import_zod5.z.boolean().optional().describe("Treat the name as a prefix wildcard (a trailing * does the same).")
|
|
1460
1579
|
};
|
|
1461
|
-
const dryRunArg =
|
|
1580
|
+
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.");
|
|
1462
1581
|
tool(
|
|
1463
1582
|
"declare_cookie",
|
|
1464
1583
|
'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.',
|
|
1465
|
-
{ cbid:
|
|
1584
|
+
{ cbid: import_zod5.z.string(), name: import_zod5.z.string(), ...declarationShape, dryRun: dryRunArg },
|
|
1466
1585
|
(a) => {
|
|
1467
1586
|
const { cbid: cbid2, name, dryRun, ...rest } = a;
|
|
1468
1587
|
return client.sites.declareCookie(cbid2, name, rest, dryRun ? { dryRun: true } : void 0);
|
|
@@ -1471,7 +1590,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1471
1590
|
tool(
|
|
1472
1591
|
"declare_cookies",
|
|
1473
1592
|
"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.",
|
|
1474
|
-
{ cbid:
|
|
1593
|
+
{ 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 },
|
|
1475
1594
|
(a) => {
|
|
1476
1595
|
const o = { ...a.replace ? { replace: true } : {}, ...a.dryRun ? { dryRun: true } : {} };
|
|
1477
1596
|
return client.sites.declareCookies(a.cbid, a.cookies, Object.keys(o).length ? o : void 0);
|
|
@@ -1480,7 +1599,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1480
1599
|
tool(
|
|
1481
1600
|
"undeclare_cookie",
|
|
1482
1601
|
"Remove a cookie declaration; the scanned/observed classification applies again.",
|
|
1483
|
-
{ cbid:
|
|
1602
|
+
{ cbid: import_zod5.z.string(), name: import_zod5.z.string(), dryRun: dryRunArg },
|
|
1484
1603
|
async (a) => {
|
|
1485
1604
|
if (a.dryRun) return client.sites.undeclareCookie(a.cbid, a.name, { dryRun: true });
|
|
1486
1605
|
await client.sites.undeclareCookie(a.cbid, a.name);
|
|
@@ -1491,11 +1610,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1491
1610
|
"retire_cookie",
|
|
1492
1611
|
'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.',
|
|
1493
1612
|
{
|
|
1494
|
-
cbid:
|
|
1495
|
-
name:
|
|
1496
|
-
renamedTo:
|
|
1497
|
-
note:
|
|
1498
|
-
dryRun:
|
|
1613
|
+
cbid: import_zod5.z.string(),
|
|
1614
|
+
name: import_zod5.z.string(),
|
|
1615
|
+
renamedTo: import_zod5.z.string().max(256).optional().describe("The cookie\u2019s new name, if it was renamed."),
|
|
1616
|
+
note: import_zod5.z.string().max(1e3).optional(),
|
|
1617
|
+
dryRun: import_zod5.z.boolean().optional().describe("Store nothing: answer with the would-be retirement and list to check first.")
|
|
1499
1618
|
},
|
|
1500
1619
|
(a) => {
|
|
1501
1620
|
const input = { ...a.renamedTo ? { renamedTo: a.renamedTo } : {}, ...a.note ? { note: a.note } : {} };
|
|
@@ -1505,35 +1624,93 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1505
1624
|
tool(
|
|
1506
1625
|
"unretire_cookie",
|
|
1507
1626
|
"Un-retire a cookie: it is listed again everywhere.",
|
|
1508
|
-
{ cbid:
|
|
1627
|
+
{ 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.") },
|
|
1509
1628
|
async (a) => {
|
|
1510
1629
|
if (a.dryRun) return client.sites.unretireCookie(a.cbid, a.name, { dryRun: true });
|
|
1511
1630
|
await client.sites.unretireCookie(a.cbid, a.name);
|
|
1512
1631
|
return { unretired: a.name };
|
|
1513
1632
|
}
|
|
1514
1633
|
);
|
|
1634
|
+
tool(
|
|
1635
|
+
"list_cookie_presets",
|
|
1636
|
+
"Declaration presets for the platforms a site is built on (atlas, forumulate, chatly, cookiemunch): each one\u2019s parameters, what it has declared on this site, and whether the vendor\u2019s live manifest can be imported yet. Read-only.",
|
|
1637
|
+
{ cbid: import_zod5.z.string() },
|
|
1638
|
+
(a) => client.sites.cookiePresets(a.cbid)
|
|
1639
|
+
);
|
|
1640
|
+
tool(
|
|
1641
|
+
"apply_cookie_preset",
|
|
1642
|
+
"Apply (or re-sync) a vendor preset: declares exactly what that platform writes \u2014 cookies and browser storage, with domain and lifetime \u2014 marked as declared by that vendor. Re-applying removes keys the vendor no longer writes. Names the owner declared are kept (skipped). Atlas needs frontendApiHost (and crossSubdomainCookies, default true); Chatly needs publicId.",
|
|
1643
|
+
{
|
|
1644
|
+
cbid: import_zod5.z.string(),
|
|
1645
|
+
vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]),
|
|
1646
|
+
frontendApiHost: import_zod5.z.string().optional().describe("Atlas: your frontend API host, e.g. auth.example.com."),
|
|
1647
|
+
crossSubdomainCookies: import_zod5.z.boolean().optional().describe("Atlas: default true \u2014 the cookies live on the parent domain."),
|
|
1648
|
+
publicId: import_zod5.z.string().optional().describe("Chatly: the channel public id (ch_web_\u2026)."),
|
|
1649
|
+
dragging: import_zod5.z.boolean().optional().describe("Chatly: the launcher can be dragged (adds the drag-position key)."),
|
|
1650
|
+
category: import_zod5.z.string().optional().describe("Chatly: the category for its keys. Default necessary."),
|
|
1651
|
+
dryRun: dryRunArg
|
|
1652
|
+
},
|
|
1653
|
+
(a) => {
|
|
1654
|
+
const params = {};
|
|
1655
|
+
for (const k of ["frontendApiHost", "crossSubdomainCookies", "publicId", "dragging", "category"]) if (a[k] !== void 0) params[k] = a[k];
|
|
1656
|
+
return client.sites.applyCookiePreset(a.cbid, a.vendor, params, a.dryRun ? { dryRun: true } : void 0);
|
|
1657
|
+
}
|
|
1658
|
+
);
|
|
1659
|
+
tool(
|
|
1660
|
+
"remove_cookie_preset",
|
|
1661
|
+
"Remove every declaration a vendor preset made on this site.",
|
|
1662
|
+
{ cbid: import_zod5.z.string(), vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]), dryRun: dryRunArg },
|
|
1663
|
+
(a) => client.sites.removeCookiePreset(a.cbid, a.vendor, a.dryRun ? { dryRun: true } : void 0)
|
|
1664
|
+
);
|
|
1665
|
+
tool(
|
|
1666
|
+
"delete_observed_cookie",
|
|
1667
|
+
"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.",
|
|
1668
|
+
{ cbid: import_zod5.z.string(), name: import_zod5.z.string(), dryRun: dryRunArg },
|
|
1669
|
+
async (a) => {
|
|
1670
|
+
if (a.dryRun) return client.sites.deleteObservedCookie(a.cbid, a.name, { dryRun: true });
|
|
1671
|
+
await client.sites.deleteObservedCookie(a.cbid, a.name);
|
|
1672
|
+
return { deleted: a.name };
|
|
1673
|
+
}
|
|
1674
|
+
);
|
|
1675
|
+
tool(
|
|
1676
|
+
"purge_observed_cookies",
|
|
1677
|
+
"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.",
|
|
1678
|
+
{
|
|
1679
|
+
cbid: import_zod5.z.string(),
|
|
1680
|
+
since: import_zod5.z.union([import_zod5.z.string(), import_zod5.z.number()]).describe("ISO-8601 time or epoch milliseconds."),
|
|
1681
|
+
until: import_zod5.z.union([import_zod5.z.string(), import_zod5.z.number()]).optional().describe("Optional end of the window (exclusive)."),
|
|
1682
|
+
dryRun: dryRunArg
|
|
1683
|
+
},
|
|
1684
|
+
(a) => client.sites.purgeObservedCookies(
|
|
1685
|
+
a.cbid,
|
|
1686
|
+
{ since: a.since, ...a.until !== void 0 ? { until: a.until } : {} },
|
|
1687
|
+
a.dryRun ? { dryRun: true } : void 0
|
|
1688
|
+
)
|
|
1689
|
+
);
|
|
1515
1690
|
tool(
|
|
1516
1691
|
"get_blocked_pages",
|
|
1517
1692
|
"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.",
|
|
1518
|
-
{ cbid:
|
|
1693
|
+
{ cbid: import_zod5.z.string() },
|
|
1519
1694
|
(a) => client.sites.blocked(a.cbid)
|
|
1520
1695
|
);
|
|
1521
1696
|
tool(
|
|
1522
1697
|
"roll_api_key",
|
|
1523
1698
|
"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.",
|
|
1524
|
-
{ prefix:
|
|
1699
|
+
{ prefix: import_zod5.z.string() },
|
|
1525
1700
|
(a) => client.keys.roll(a.prefix)
|
|
1526
1701
|
);
|
|
1527
1702
|
tool(
|
|
1528
1703
|
"update_api_key",
|
|
1529
|
-
"Rename an API key,
|
|
1704
|
+
"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.",
|
|
1530
1705
|
{
|
|
1531
|
-
prefix:
|
|
1532
|
-
name:
|
|
1533
|
-
scopes:
|
|
1534
|
-
cbids:
|
|
1706
|
+
prefix: import_zod5.z.string(),
|
|
1707
|
+
name: import_zod5.z.string().optional(),
|
|
1708
|
+
scopes: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
1709
|
+
cbids: import_zod5.z.array(import_zod5.z.string()).min(1).optional(),
|
|
1710
|
+
expiresAt: import_zod5.z.string().nullable().optional().describe("A new expiry (ISO date-time), or null to remove it.")
|
|
1535
1711
|
},
|
|
1536
1712
|
(a) => client.keys.update(a.prefix, {
|
|
1713
|
+
...a.expiresAt !== void 0 ? { expiresAt: a.expiresAt } : {},
|
|
1537
1714
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1538
1715
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1539
1716
|
...a.cbids ? { cbids: a.cbids } : {}
|
|
@@ -1543,7 +1720,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1543
1720
|
tool(
|
|
1544
1721
|
"update_org",
|
|
1545
1722
|
"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.",
|
|
1546
|
-
{ name:
|
|
1723
|
+
{ name: import_zod5.z.string().min(1).optional(), logoUrl: import_zod5.z.string().nullable().optional() },
|
|
1547
1724
|
(a) => client.org.update({
|
|
1548
1725
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1549
1726
|
...a.logoUrl !== void 0 ? { logoUrl: a.logoUrl } : {}
|
|
@@ -1559,20 +1736,20 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1559
1736
|
"set_mail_provider",
|
|
1560
1737
|
"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).",
|
|
1561
1738
|
{
|
|
1562
|
-
provider:
|
|
1563
|
-
fromEmail:
|
|
1564
|
-
fromName:
|
|
1565
|
-
replyTo:
|
|
1566
|
-
secret:
|
|
1567
|
-
ses:
|
|
1568
|
-
smtp:
|
|
1739
|
+
provider: import_zod5.z.enum(["brevo", "sendgrid", "postmark", "resend", "ses", "smtp"]),
|
|
1740
|
+
fromEmail: import_zod5.z.string().describe("An address on a domain your provider has verified."),
|
|
1741
|
+
fromName: import_zod5.z.string().max(100).nullable().optional(),
|
|
1742
|
+
replyTo: import_zod5.z.string().nullable().optional(),
|
|
1743
|
+
secret: import_zod5.z.string().optional().describe("API key (Brevo, SendGrid, Resend), server token (Postmark), secret access key (SES) or SMTP password. Write-only."),
|
|
1744
|
+
ses: import_zod5.z.object({ region: import_zod5.z.string(), accessKeyId: import_zod5.z.string() }).optional().describe("Required for ses."),
|
|
1745
|
+
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.")
|
|
1569
1746
|
},
|
|
1570
1747
|
(a) => client.org.mailProvider.set(a)
|
|
1571
1748
|
);
|
|
1572
1749
|
tool(
|
|
1573
1750
|
"test_mail_provider",
|
|
1574
1751
|
"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.",
|
|
1575
|
-
{ to:
|
|
1752
|
+
{ to: import_zod5.z.string().optional().describe("Recipient. Default: the reply-to, else the from address.") },
|
|
1576
1753
|
(a) => client.org.mailProvider.test(a.to)
|
|
1577
1754
|
);
|
|
1578
1755
|
tool(
|
|
@@ -1586,11 +1763,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1586
1763
|
);
|
|
1587
1764
|
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.";
|
|
1588
1765
|
const captchaInput = {
|
|
1589
|
-
mode:
|
|
1590
|
-
provider:
|
|
1591
|
-
siteKey:
|
|
1592
|
-
secret:
|
|
1593
|
-
minScore:
|
|
1766
|
+
mode: import_zod5.z.enum(["own", "off"]).describe(`own: your own captcha provider keys (recommended). off: no captcha. ${CAPTCHA_OFF}`),
|
|
1767
|
+
provider: import_zod5.z.enum(["turnstile", "hcaptcha", "recaptcha_v2", "recaptcha_v3"]).optional().describe("Required for own."),
|
|
1768
|
+
siteKey: import_zod5.z.string().optional().describe("Required for own: the public site key. List your rights-page hostnames on it at the provider."),
|
|
1769
|
+
secret: import_zod5.z.string().optional().describe("The provider secret key. Write-only; never returned. Omit to keep the stored one (same provider)."),
|
|
1770
|
+
minScore: import_zod5.z.number().min(0.1).max(0.9).optional().describe("reCAPTCHA v3 only. Default 0.5.")
|
|
1594
1771
|
};
|
|
1595
1772
|
const captchaBody = (a) => ({
|
|
1596
1773
|
mode: a.mode,
|
|
@@ -1602,19 +1779,19 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1602
1779
|
tool(
|
|
1603
1780
|
"get_rights_captcha",
|
|
1604
1781
|
"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.",
|
|
1605
|
-
{ cbid:
|
|
1782
|
+
{ cbid: import_zod5.z.string() },
|
|
1606
1783
|
(a) => client.rightsCaptcha.get(a.cbid)
|
|
1607
1784
|
);
|
|
1608
1785
|
tool(
|
|
1609
1786
|
"set_rights_captcha",
|
|
1610
1787
|
`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.`,
|
|
1611
|
-
{ cbid:
|
|
1788
|
+
{ cbid: import_zod5.z.string(), ...captchaInput },
|
|
1612
1789
|
(a) => client.rightsCaptcha.set(a.cbid, captchaBody(a))
|
|
1613
1790
|
);
|
|
1614
1791
|
tool(
|
|
1615
1792
|
"remove_rights_captcha",
|
|
1616
1793
|
"Remove a site\u2019s own captcha setting: it inherits the organisation default again (or off). Returns the setting now in force.",
|
|
1617
|
-
{ cbid:
|
|
1794
|
+
{ cbid: import_zod5.z.string() },
|
|
1618
1795
|
(a) => client.rightsCaptcha.remove(a.cbid)
|
|
1619
1796
|
);
|
|
1620
1797
|
tool(
|
|
@@ -1637,15 +1814,15 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1637
1814
|
);
|
|
1638
1815
|
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.";
|
|
1639
1816
|
const identityInput = {
|
|
1640
|
-
type:
|
|
1641
|
-
issuer:
|
|
1642
|
-
jwksUrl:
|
|
1643
|
-
audience:
|
|
1644
|
-
authorizedParties:
|
|
1645
|
-
emailClaim:
|
|
1646
|
-
emailVerifiedClaim:
|
|
1647
|
-
sessionCookieName:
|
|
1648
|
-
trustEmailClaim:
|
|
1817
|
+
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)."),
|
|
1818
|
+
issuer: import_zod5.z.string().describe("https URL exactly as in the token\u2019s iss (Clerk: your Frontend API URL)."),
|
|
1819
|
+
jwksUrl: import_zod5.z.string().optional().describe("Required for oidc_jwt; clerk/atlas default to <issuer>/.well-known/jwks.json."),
|
|
1820
|
+
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)."),
|
|
1821
|
+
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."),
|
|
1822
|
+
emailClaim: import_zod5.z.string().optional().describe("Default email."),
|
|
1823
|
+
emailVerifiedClaim: import_zod5.z.string().optional().describe("Default email_verified; must be exactly true."),
|
|
1824
|
+
sessionCookieName: import_zod5.z.string().optional().describe("Default __session: the cookie the hosted page on your custom domain reads."),
|
|
1825
|
+
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.")
|
|
1649
1826
|
};
|
|
1650
1827
|
const identityBody = (a) => {
|
|
1651
1828
|
const out = { type: a.type, issuer: a.issuer };
|
|
@@ -1655,19 +1832,19 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1655
1832
|
tool(
|
|
1656
1833
|
"get_rights_identity",
|
|
1657
1834
|
"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.",
|
|
1658
|
-
{ cbid:
|
|
1835
|
+
{ cbid: import_zod5.z.string() },
|
|
1659
1836
|
(a) => client.rightsIdentity.get(a.cbid)
|
|
1660
1837
|
);
|
|
1661
1838
|
tool(
|
|
1662
1839
|
"set_rights_identity",
|
|
1663
1840
|
`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.`,
|
|
1664
|
-
{ cbid:
|
|
1841
|
+
{ cbid: import_zod5.z.string(), ...identityInput },
|
|
1665
1842
|
(a) => client.rightsIdentity.set(a.cbid, identityBody(a))
|
|
1666
1843
|
);
|
|
1667
1844
|
tool(
|
|
1668
1845
|
"remove_rights_identity",
|
|
1669
1846
|
"Remove a site\u2019s own sign-in provider: it inherits the organisation default again (or none). Returns the setting now in force.",
|
|
1670
|
-
{ cbid:
|
|
1847
|
+
{ cbid: import_zod5.z.string() },
|
|
1671
1848
|
(a) => client.rightsIdentity.remove(a.cbid)
|
|
1672
1849
|
);
|
|
1673
1850
|
tool(
|
|
@@ -1691,22 +1868,22 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1691
1868
|
tool(
|
|
1692
1869
|
"get_audit_log",
|
|
1693
1870
|
"The organisation\u2019s audit log, newest first: administrative changes made in the dashboard or through the API, and who made them. Read-only.",
|
|
1694
|
-
{ limit:
|
|
1871
|
+
{ limit: import_zod5.z.number().int().min(1).max(500).optional() },
|
|
1695
1872
|
(a) => client.audit(a.limit)
|
|
1696
1873
|
);
|
|
1697
1874
|
tool(
|
|
1698
1875
|
"upload_asset",
|
|
1699
1876
|
"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.",
|
|
1700
1877
|
{
|
|
1701
|
-
data:
|
|
1702
|
-
contentType:
|
|
1878
|
+
data: import_zod5.z.string(),
|
|
1879
|
+
contentType: import_zod5.z.enum(["image/png", "image/jpeg", "image/webp", "image/gif", "image/svg+xml"])
|
|
1703
1880
|
},
|
|
1704
1881
|
(a) => client.assets.upload({ data: a.data, contentType: a.contentType })
|
|
1705
1882
|
);
|
|
1706
1883
|
tool(
|
|
1707
1884
|
"delete_asset",
|
|
1708
1885
|
"Delete a stored image by its URL (or file name). Only your own organisation\u2019s images can be named.",
|
|
1709
|
-
{ url:
|
|
1886
|
+
{ url: import_zod5.z.string().describe("The URL upload_asset returned, or just its file name.") },
|
|
1710
1887
|
async (a) => {
|
|
1711
1888
|
await client.assets.delete(a.url);
|
|
1712
1889
|
return { deleted: a.url };
|
|
@@ -1721,18 +1898,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1721
1898
|
tool(
|
|
1722
1899
|
"get_customer",
|
|
1723
1900
|
"One child org: its controller details and usage. Read-only.",
|
|
1724
|
-
{ id:
|
|
1901
|
+
{ id: import_zod5.z.string() },
|
|
1725
1902
|
(a) => client.reseller.get(a.id)
|
|
1726
1903
|
);
|
|
1727
1904
|
tool(
|
|
1728
1905
|
"provision_customer",
|
|
1729
1906
|
"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.",
|
|
1730
1907
|
{
|
|
1731
|
-
name:
|
|
1732
|
-
ownerEmail:
|
|
1733
|
-
delegatedAccess:
|
|
1734
|
-
mintKey:
|
|
1735
|
-
keyScopes:
|
|
1908
|
+
name: import_zod5.z.string(),
|
|
1909
|
+
ownerEmail: import_zod5.z.string().optional(),
|
|
1910
|
+
delegatedAccess: import_zod5.z.boolean().optional().describe("Whether this reseller may act inside the child."),
|
|
1911
|
+
mintKey: import_zod5.z.boolean().optional(),
|
|
1912
|
+
keyScopes: import_zod5.z.array(import_zod5.z.string()).optional()
|
|
1736
1913
|
},
|
|
1737
1914
|
(a) => client.reseller.create({
|
|
1738
1915
|
name: a.name,
|
|
@@ -1746,10 +1923,10 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1746
1923
|
"update_customer",
|
|
1747
1924
|
"Change a child org\u2019s status, delegated access or DSAR routing. `dsarRouting: null` clears the override.",
|
|
1748
1925
|
{
|
|
1749
|
-
id:
|
|
1750
|
-
status:
|
|
1751
|
-
delegatedAccess:
|
|
1752
|
-
dsarRouting:
|
|
1926
|
+
id: import_zod5.z.string(),
|
|
1927
|
+
status: import_zod5.z.enum(["active", "suspended"]).optional(),
|
|
1928
|
+
delegatedAccess: import_zod5.z.boolean().optional(),
|
|
1929
|
+
dsarRouting: import_zod5.z.enum(["reseller", "child"]).nullable().optional()
|
|
1753
1930
|
},
|
|
1754
1931
|
(a) => client.reseller.update(a.id, {
|
|
1755
1932
|
...a.status ? { status: a.status } : {},
|
|
@@ -1760,7 +1937,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1760
1937
|
tool(
|
|
1761
1938
|
"suspend_customer",
|
|
1762
1939
|
"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.)",
|
|
1763
|
-
{ id:
|
|
1940
|
+
{ id: import_zod5.z.string() },
|
|
1764
1941
|
async (a) => {
|
|
1765
1942
|
await client.reseller.deprovision(a.id);
|
|
1766
1943
|
return { suspended: a.id };
|
|
@@ -1769,72 +1946,72 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1769
1946
|
tool(
|
|
1770
1947
|
"list_customer_keys",
|
|
1771
1948
|
"A child org's API key prefixes. Never the secrets. Read-only.",
|
|
1772
|
-
{ id:
|
|
1949
|
+
{ id: import_zod5.z.string() },
|
|
1773
1950
|
(a) => client.reseller.listKeys(a.id)
|
|
1774
1951
|
);
|
|
1775
1952
|
tool(
|
|
1776
1953
|
"issue_customer_key",
|
|
1777
1954
|
"Mint an API key for a child org. The secret is returned once. Prefer scopes and a property lock over a full-access key.",
|
|
1778
|
-
{ id:
|
|
1955
|
+
{ 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() },
|
|
1779
1956
|
(a) => client.reseller.mintKey(a.id, {
|
|
1780
1957
|
...a.name ? { name: a.name } : {},
|
|
1781
1958
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1782
1959
|
...a.cbids ? { cbids: a.cbids } : {}
|
|
1783
1960
|
})
|
|
1784
1961
|
);
|
|
1785
|
-
tool("revoke_customer_key", "Revoke a child org's API key by prefix. Takes effect immediately.", { id:
|
|
1962
|
+
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) => {
|
|
1786
1963
|
await client.reseller.revokeKey(a.id, a.prefix);
|
|
1787
1964
|
return { revoked: a.prefix };
|
|
1788
1965
|
});
|
|
1789
1966
|
tool(
|
|
1790
1967
|
"erase_subject_data",
|
|
1791
1968
|
"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.",
|
|
1792
|
-
{ cbid:
|
|
1969
|
+
{ cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1793
1970
|
(a) => client.consent.eraseSubject(a.cbid, a.stamp)
|
|
1794
1971
|
);
|
|
1795
1972
|
tool(
|
|
1796
1973
|
"export_subject_data",
|
|
1797
1974
|
"Export a data subject's consent records (GDPR access/portability).",
|
|
1798
|
-
{ cbid:
|
|
1975
|
+
{ cbid: import_zod5.z.string(), stamp: import_zod5.z.string() },
|
|
1799
1976
|
(a) => client.consent.exportSubject(a.cbid, a.stamp)
|
|
1800
1977
|
);
|
|
1801
1978
|
tool("list_banners", "List reusable banner designs in your org.", {}, () => client.banners.list());
|
|
1802
1979
|
tool(
|
|
1803
1980
|
"create_banner",
|
|
1804
1981
|
"Create a reusable banner design.",
|
|
1805
|
-
{ name:
|
|
1982
|
+
{ name: import_zod5.z.string(), json: import_zod5.z.record(import_zod5.z.unknown()).describe("A v2 BannerConfig.") },
|
|
1806
1983
|
(a) => client.banners.create({ name: a.name, json: a.json })
|
|
1807
1984
|
);
|
|
1808
|
-
tool("get_banner", "Get a banner design by id.", { id:
|
|
1985
|
+
tool("get_banner", "Get a banner design by id.", { id: import_zod5.z.string() }, (a) => client.banners.get(a.id));
|
|
1809
1986
|
tool(
|
|
1810
1987
|
"update_banner",
|
|
1811
1988
|
"Update a banner design (name and/or config).",
|
|
1812
|
-
{ id:
|
|
1989
|
+
{ id: import_zod5.z.string(), name: import_zod5.z.string().optional(), json: import_zod5.z.record(import_zod5.z.unknown()).optional() },
|
|
1813
1990
|
(a) => client.banners.update(a.id, {
|
|
1814
1991
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1815
1992
|
...a.json !== void 0 ? { json: a.json } : {}
|
|
1816
1993
|
})
|
|
1817
1994
|
);
|
|
1818
|
-
tool("delete_banner", "Delete a banner design (fails if assigned to sites).", { id:
|
|
1995
|
+
tool("delete_banner", "Delete a banner design (fails if assigned to sites).", { id: import_zod5.z.string() }, async (a) => {
|
|
1819
1996
|
await client.banners.delete(a.id);
|
|
1820
1997
|
return { ok: true };
|
|
1821
1998
|
});
|
|
1822
1999
|
tool(
|
|
1823
2000
|
"get_banner_assignments",
|
|
1824
2001
|
"The sites (cbids) a banner design is currently assigned to. Read-only.",
|
|
1825
|
-
{ id:
|
|
2002
|
+
{ id: import_zod5.z.string() },
|
|
1826
2003
|
(a) => client.banners.assignments(a.id)
|
|
1827
2004
|
);
|
|
1828
2005
|
tool(
|
|
1829
2006
|
"assign_banner",
|
|
1830
2007
|
"Set which sites (cbids) use a banner design.",
|
|
1831
|
-
{ id:
|
|
2008
|
+
{ id: import_zod5.z.string(), cbids: import_zod5.z.array(import_zod5.z.string()) },
|
|
1832
2009
|
(a) => client.banners.setAssignments(a.id, a.cbids)
|
|
1833
2010
|
);
|
|
1834
2011
|
tool(
|
|
1835
2012
|
"publish_banner",
|
|
1836
2013
|
"Publish a design live to all its assigned sites.",
|
|
1837
|
-
{ id:
|
|
2014
|
+
{ id: import_zod5.z.string() },
|
|
1838
2015
|
(a) => client.banners.publish(a.id)
|
|
1839
2016
|
);
|
|
1840
2017
|
}
|