@ainyc/canonry 4.183.1 → 4.184.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/assets/assets/{AuditHistoryPanel-DM-2GC2i.js → AuditHistoryPanel-BoQzQLdL.js} +1 -1
- package/assets/assets/{BacklinksPage-YJU9B2RQ.js → BacklinksPage-BMtZIpQj.js} +1 -1
- package/assets/assets/{HistoryPage-DcFzvVRB.js → HistoryPage-CC4O1rGM.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-C08ujTv1.js +1 -0
- package/assets/assets/ProjectPage-BUddJlIf.js +9 -0
- package/assets/assets/{RunRow-6SFvSqhK.js → RunRow-CKp9zNzz.js} +1 -1
- package/assets/assets/RunsPage-w-jscgI3.js +1 -0
- package/assets/assets/{SettingsPage-DSS1eunM.js → SettingsPage-CtfgpUHc.js} +1 -1
- package/assets/assets/{SiteHealthSection-CewNWjGo.js → SiteHealthSection-C3M1bR9o.js} +3 -3
- package/assets/assets/{TrafficPage-DRZ1aqnG.js → TrafficPage-Bl0vIyDA.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-vaBD4zHK.js → TrafficSourceDetailPage-B7jgTW9v.js} +1 -1
- package/assets/assets/{extract-error-message-DD4JJz8j.js → extract-error-message-BViVqAMF.js} +1 -1
- package/assets/assets/{index-DwdK2e4e.css → index-D5UC9w71.css} +1 -1
- package/assets/assets/index-aLn_-ngN.js +86 -0
- package/assets/assets/{react-sigma_core.esm.min-B8Wmi5Ko.js → react-sigma_core.esm.min-COiFFO4S.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-VXPM6O4R.js → chunk-3BF373KE.js} +1 -1
- package/dist/{chunk-AZJOCWZ4.js → chunk-AKWR2NKJ.js} +8 -1
- package/dist/{chunk-3SFCUICM.js → chunk-ROSGBFKI.js} +542 -389
- package/dist/cli.js +11 -155
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +10 -10
- package/assets/assets/MeasurementPropertyPage-OQ3X0KHU.js +0 -1
- package/assets/assets/ProjectPage-CMZO1xb2.js +0 -9
- package/assets/assets/RunsPage-Chk_-IOW.js +0 -1
- package/assets/assets/index-BdR4Vlu6.js +0 -86
|
@@ -80,6 +80,7 @@ import {
|
|
|
80
80
|
organicEvidencePeriodSchema,
|
|
81
81
|
projectConfigSchema,
|
|
82
82
|
projectUpsertRequestSchema,
|
|
83
|
+
providerQuotaPolicySchema,
|
|
83
84
|
queryBatchRequestSchema,
|
|
84
85
|
queryGenerateRequestSchema,
|
|
85
86
|
reportPeriodSchema,
|
|
@@ -95,12 +96,217 @@ import {
|
|
|
95
96
|
trafficSeriesGranularitySchema
|
|
96
97
|
} from "./chunk-DU5Q5ZOX.js";
|
|
97
98
|
|
|
99
|
+
// src/cli-error.ts
|
|
100
|
+
function isMachineFormat(format) {
|
|
101
|
+
return format === "json" || format === "jsonl";
|
|
102
|
+
}
|
|
103
|
+
var EXIT_USER_ERROR = 1;
|
|
104
|
+
var EXIT_SYSTEM_ERROR = 2;
|
|
105
|
+
var CliError = class extends Error {
|
|
106
|
+
code;
|
|
107
|
+
displayMessage;
|
|
108
|
+
details;
|
|
109
|
+
exitCode;
|
|
110
|
+
constructor(options) {
|
|
111
|
+
super(options.message);
|
|
112
|
+
this.name = "CliError";
|
|
113
|
+
this.code = options.code;
|
|
114
|
+
this.displayMessage = options.displayMessage;
|
|
115
|
+
this.details = options.details;
|
|
116
|
+
this.exitCode = options.exitCode ?? EXIT_USER_ERROR;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
function usageError(displayMessage, options) {
|
|
120
|
+
const firstLine = displayMessage.split("\n", 1)[0] ?? "Error: invalid command usage";
|
|
121
|
+
return new CliError({
|
|
122
|
+
code: "CLI_USAGE_ERROR",
|
|
123
|
+
message: options?.message ?? firstLine.replace(/^Error:\s*/, ""),
|
|
124
|
+
displayMessage,
|
|
125
|
+
details: options?.details
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function isEndpointMissing(err) {
|
|
129
|
+
if (!(err instanceof CliError)) return false;
|
|
130
|
+
const status = err.details?.httpStatus;
|
|
131
|
+
return status === 404 || status === 405;
|
|
132
|
+
}
|
|
133
|
+
function systemError(message, options) {
|
|
134
|
+
return new CliError({
|
|
135
|
+
code: "CLI_SYSTEM_ERROR",
|
|
136
|
+
message,
|
|
137
|
+
displayMessage: options?.displayMessage,
|
|
138
|
+
details: options?.details,
|
|
139
|
+
exitCode: EXIT_SYSTEM_ERROR
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function printCliError(err, format) {
|
|
143
|
+
if (isMachineFormat(format)) {
|
|
144
|
+
const envelope = err instanceof CliError ? { error: { code: err.code, message: err.message, ...err.details ? { details: err.details } : {} } } : { error: { code: "CLI_ERROR", message: err instanceof Error ? err.message : "An unexpected error occurred" } };
|
|
145
|
+
console.error(JSON.stringify(envelope, null, format === "jsonl" ? 0 : 2));
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (err instanceof CliError && err.displayMessage) {
|
|
149
|
+
console.error(err.displayMessage);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (err instanceof Error) {
|
|
153
|
+
console.error(`Error: ${err.message}`);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
console.error("An unexpected error occurred");
|
|
157
|
+
}
|
|
158
|
+
|
|
98
159
|
// src/config.ts
|
|
99
160
|
import fs from "fs";
|
|
100
161
|
import path from "path";
|
|
101
162
|
import os from "os";
|
|
102
163
|
import crypto from "crypto";
|
|
103
164
|
import { parse, stringify } from "yaml";
|
|
165
|
+
|
|
166
|
+
// ../config/src/index.ts
|
|
167
|
+
import { z } from "zod";
|
|
168
|
+
var dashboardManagedSweepsSchema = z.boolean().nullish();
|
|
169
|
+
var envSchema = z.object({
|
|
170
|
+
DATABASE_URL: z.string().default("postgresql://aeo:aeo@postgres:5432/aeo_platform"),
|
|
171
|
+
API_PORT: z.coerce.number().int().positive().default(3e3),
|
|
172
|
+
WORKER_PORT: z.coerce.number().int().positive().default(3001),
|
|
173
|
+
WEB_PORT: z.coerce.number().int().positive().default(4173),
|
|
174
|
+
BOOTSTRAP_SECRET: z.string().default("change-me"),
|
|
175
|
+
CANONRY_BASE_PATH: z.string().default("/"),
|
|
176
|
+
// Gemini
|
|
177
|
+
GEMINI_API_KEY: z.string().optional(),
|
|
178
|
+
GEMINI_MODEL: z.string().optional(),
|
|
179
|
+
GEMINI_BASE_URL: z.string().optional(),
|
|
180
|
+
GEMINI_MAX_CONCURRENCY: z.coerce.number().int().positive().default(2),
|
|
181
|
+
GEMINI_MAX_REQUESTS_PER_MINUTE: z.coerce.number().int().positive().default(10),
|
|
182
|
+
GEMINI_MAX_REQUESTS_PER_DAY: z.coerce.number().int().positive().default(1e3),
|
|
183
|
+
// Gemini Vertex AI (alternative to API key auth)
|
|
184
|
+
GEMINI_VERTEX_PROJECT: z.string().optional(),
|
|
185
|
+
GEMINI_VERTEX_REGION: z.string().optional(),
|
|
186
|
+
GEMINI_VERTEX_CREDENTIALS: z.string().optional(),
|
|
187
|
+
// OpenAI
|
|
188
|
+
OPENAI_API_KEY: z.string().optional(),
|
|
189
|
+
OPENAI_MODEL: z.string().optional(),
|
|
190
|
+
OPENAI_BASE_URL: z.string().optional(),
|
|
191
|
+
OPENAI_MAX_CONCURRENCY: z.coerce.number().int().positive().default(2),
|
|
192
|
+
OPENAI_MAX_REQUESTS_PER_MINUTE: z.coerce.number().int().positive().default(10),
|
|
193
|
+
OPENAI_MAX_REQUESTS_PER_DAY: z.coerce.number().int().positive().default(1e3),
|
|
194
|
+
// Anthropic / Claude
|
|
195
|
+
ANTHROPIC_API_KEY: z.string().optional(),
|
|
196
|
+
ANTHROPIC_MODEL: z.string().optional(),
|
|
197
|
+
ANTHROPIC_MAX_CONCURRENCY: z.coerce.number().int().positive().default(2),
|
|
198
|
+
ANTHROPIC_MAX_REQUESTS_PER_MINUTE: z.coerce.number().int().positive().default(10),
|
|
199
|
+
ANTHROPIC_MAX_REQUESTS_PER_DAY: z.coerce.number().int().positive().default(1e3),
|
|
200
|
+
// Perplexity
|
|
201
|
+
PERPLEXITY_API_KEY: z.string().optional(),
|
|
202
|
+
PERPLEXITY_MODEL: z.string().optional(),
|
|
203
|
+
PERPLEXITY_MAX_CONCURRENCY: z.coerce.number().int().positive().default(2),
|
|
204
|
+
PERPLEXITY_MAX_REQUESTS_PER_MINUTE: z.coerce.number().int().positive().default(10),
|
|
205
|
+
PERPLEXITY_MAX_REQUESTS_PER_DAY: z.coerce.number().int().positive().default(1e3),
|
|
206
|
+
// Secret for HMAC-signing Google OAuth state parameters. Required for
|
|
207
|
+
// cloud deployments that mount googleRoutes; the plugin refuses to register
|
|
208
|
+
// without it (see packages/api-routes/src/google.ts).
|
|
209
|
+
GOOGLE_STATE_SECRET: z.string().optional()
|
|
210
|
+
});
|
|
211
|
+
var bootstrapEnvSchema = z.object({
|
|
212
|
+
CANONRY_API_KEY: z.string().optional(),
|
|
213
|
+
CANONRY_API_URL: z.string().optional(),
|
|
214
|
+
CANONRY_DATABASE_PATH: z.string().optional(),
|
|
215
|
+
GEMINI_API_KEY: z.string().optional(),
|
|
216
|
+
GEMINI_MODEL: z.string().optional(),
|
|
217
|
+
GEMINI_BASE_URL: z.string().optional(),
|
|
218
|
+
GEMINI_VERTEX_PROJECT: z.string().optional(),
|
|
219
|
+
GEMINI_VERTEX_REGION: z.string().optional(),
|
|
220
|
+
GEMINI_VERTEX_CREDENTIALS: z.string().optional(),
|
|
221
|
+
OPENAI_API_KEY: z.string().optional(),
|
|
222
|
+
OPENAI_MODEL: z.string().optional(),
|
|
223
|
+
OPENAI_BASE_URL: z.string().optional(),
|
|
224
|
+
ANTHROPIC_API_KEY: z.string().optional(),
|
|
225
|
+
ANTHROPIC_MODEL: z.string().optional(),
|
|
226
|
+
PERPLEXITY_API_KEY: z.string().optional(),
|
|
227
|
+
PERPLEXITY_MODEL: z.string().optional(),
|
|
228
|
+
LOCAL_BASE_URL: z.string().optional(),
|
|
229
|
+
LOCAL_API_KEY: z.string().optional(),
|
|
230
|
+
LOCAL_MODEL: z.string().optional(),
|
|
231
|
+
GOOGLE_CLIENT_ID: z.string().optional(),
|
|
232
|
+
GOOGLE_CLIENT_SECRET: z.string().optional()
|
|
233
|
+
});
|
|
234
|
+
function getBootstrapEnv(source, overrides) {
|
|
235
|
+
const filtered = overrides ? Object.fromEntries(Object.entries(overrides).filter(([, v]) => v != null)) : {};
|
|
236
|
+
const parsed = bootstrapEnvSchema.parse({ ...source, ...filtered });
|
|
237
|
+
const providers = {};
|
|
238
|
+
if (parsed.GEMINI_API_KEY || parsed.GEMINI_VERTEX_PROJECT) {
|
|
239
|
+
providers.gemini = {
|
|
240
|
+
apiKey: parsed.GEMINI_API_KEY ?? "",
|
|
241
|
+
model: parsed.GEMINI_MODEL || "gemini-2.5-flash",
|
|
242
|
+
baseUrl: parsed.GEMINI_BASE_URL,
|
|
243
|
+
quota: providerQuotaPolicySchema.parse({
|
|
244
|
+
maxConcurrency: 2,
|
|
245
|
+
maxRequestsPerMinute: 10,
|
|
246
|
+
maxRequestsPerDay: 500
|
|
247
|
+
}),
|
|
248
|
+
vertexProject: parsed.GEMINI_VERTEX_PROJECT,
|
|
249
|
+
vertexRegion: parsed.GEMINI_VERTEX_REGION,
|
|
250
|
+
vertexCredentials: parsed.GEMINI_VERTEX_CREDENTIALS
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
if (parsed.OPENAI_API_KEY) {
|
|
254
|
+
providers.openai = {
|
|
255
|
+
apiKey: parsed.OPENAI_API_KEY,
|
|
256
|
+
model: parsed.OPENAI_MODEL || "gpt-5.4",
|
|
257
|
+
baseUrl: parsed.OPENAI_BASE_URL,
|
|
258
|
+
quota: providerQuotaPolicySchema.parse({
|
|
259
|
+
maxConcurrency: 2,
|
|
260
|
+
maxRequestsPerMinute: 10,
|
|
261
|
+
maxRequestsPerDay: 500
|
|
262
|
+
})
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
if (parsed.ANTHROPIC_API_KEY) {
|
|
266
|
+
providers.claude = {
|
|
267
|
+
apiKey: parsed.ANTHROPIC_API_KEY,
|
|
268
|
+
model: parsed.ANTHROPIC_MODEL || "claude-sonnet-4-6",
|
|
269
|
+
quota: providerQuotaPolicySchema.parse({
|
|
270
|
+
maxConcurrency: 2,
|
|
271
|
+
maxRequestsPerMinute: 10,
|
|
272
|
+
maxRequestsPerDay: 500
|
|
273
|
+
})
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
if (parsed.PERPLEXITY_API_KEY) {
|
|
277
|
+
providers.perplexity = {
|
|
278
|
+
apiKey: parsed.PERPLEXITY_API_KEY,
|
|
279
|
+
model: parsed.PERPLEXITY_MODEL || "sonar",
|
|
280
|
+
quota: providerQuotaPolicySchema.parse({
|
|
281
|
+
maxConcurrency: 2,
|
|
282
|
+
maxRequestsPerMinute: 10,
|
|
283
|
+
maxRequestsPerDay: 500
|
|
284
|
+
})
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
if (parsed.LOCAL_BASE_URL) {
|
|
288
|
+
providers.local = {
|
|
289
|
+
baseUrl: parsed.LOCAL_BASE_URL,
|
|
290
|
+
apiKey: parsed.LOCAL_API_KEY,
|
|
291
|
+
model: parsed.LOCAL_MODEL || "llama3",
|
|
292
|
+
quota: providerQuotaPolicySchema.parse({
|
|
293
|
+
maxConcurrency: 2,
|
|
294
|
+
maxRequestsPerMinute: 10,
|
|
295
|
+
maxRequestsPerDay: 500
|
|
296
|
+
})
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
return {
|
|
300
|
+
apiKey: parsed.CANONRY_API_KEY,
|
|
301
|
+
apiUrl: parsed.CANONRY_API_URL,
|
|
302
|
+
databasePath: parsed.CANONRY_DATABASE_PATH,
|
|
303
|
+
googleClientId: parsed.GOOGLE_CLIENT_ID,
|
|
304
|
+
googleClientSecret: parsed.GOOGLE_CLIENT_SECRET,
|
|
305
|
+
providers
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// src/config.ts
|
|
104
310
|
function normalizeGoogleConfig(config) {
|
|
105
311
|
if (!config.google) return;
|
|
106
312
|
config.google.connections = (config.google.connections ?? []).map((connection) => ({
|
|
@@ -181,6 +387,12 @@ Keep the original API key and database path. Do not share secrets.
|
|
|
181
387
|
Do not use "canonry init --force" for recovery. It replaces credentials without a backup.`
|
|
182
388
|
);
|
|
183
389
|
}
|
|
390
|
+
if (!dashboardManagedSweepsSchema.safeParse(parsed.dashboard?.managedSweeps).success) {
|
|
391
|
+
throw new CliError({
|
|
392
|
+
code: "CONFIG_INVALID",
|
|
393
|
+
message: `Invalid config at ${configPath}: dashboard.managedSweeps must be true, false, or left blank.`
|
|
394
|
+
});
|
|
395
|
+
}
|
|
184
396
|
if (parsed.geminiApiKey && !parsed.providers?.gemini) {
|
|
185
397
|
parsed.providers = {
|
|
186
398
|
...parsed.providers,
|
|
@@ -346,66 +558,6 @@ function configExists() {
|
|
|
346
558
|
return fs.existsSync(getConfigPath());
|
|
347
559
|
}
|
|
348
560
|
|
|
349
|
-
// src/cli-error.ts
|
|
350
|
-
function isMachineFormat(format) {
|
|
351
|
-
return format === "json" || format === "jsonl";
|
|
352
|
-
}
|
|
353
|
-
var EXIT_USER_ERROR = 1;
|
|
354
|
-
var EXIT_SYSTEM_ERROR = 2;
|
|
355
|
-
var CliError = class extends Error {
|
|
356
|
-
code;
|
|
357
|
-
displayMessage;
|
|
358
|
-
details;
|
|
359
|
-
exitCode;
|
|
360
|
-
constructor(options) {
|
|
361
|
-
super(options.message);
|
|
362
|
-
this.name = "CliError";
|
|
363
|
-
this.code = options.code;
|
|
364
|
-
this.displayMessage = options.displayMessage;
|
|
365
|
-
this.details = options.details;
|
|
366
|
-
this.exitCode = options.exitCode ?? EXIT_USER_ERROR;
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
function usageError(displayMessage, options) {
|
|
370
|
-
const firstLine = displayMessage.split("\n", 1)[0] ?? "Error: invalid command usage";
|
|
371
|
-
return new CliError({
|
|
372
|
-
code: "CLI_USAGE_ERROR",
|
|
373
|
-
message: options?.message ?? firstLine.replace(/^Error:\s*/, ""),
|
|
374
|
-
displayMessage,
|
|
375
|
-
details: options?.details
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
function isEndpointMissing(err) {
|
|
379
|
-
if (!(err instanceof CliError)) return false;
|
|
380
|
-
const status = err.details?.httpStatus;
|
|
381
|
-
return status === 404 || status === 405;
|
|
382
|
-
}
|
|
383
|
-
function systemError(message, options) {
|
|
384
|
-
return new CliError({
|
|
385
|
-
code: "CLI_SYSTEM_ERROR",
|
|
386
|
-
message,
|
|
387
|
-
displayMessage: options?.displayMessage,
|
|
388
|
-
details: options?.details,
|
|
389
|
-
exitCode: EXIT_SYSTEM_ERROR
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
function printCliError(err, format) {
|
|
393
|
-
if (isMachineFormat(format)) {
|
|
394
|
-
const envelope = err instanceof CliError ? { error: { code: err.code, message: err.message, ...err.details ? { details: err.details } : {} } } : { error: { code: "CLI_ERROR", message: err instanceof Error ? err.message : "An unexpected error occurred" } };
|
|
395
|
-
console.error(JSON.stringify(envelope, null, format === "jsonl" ? 0 : 2));
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
if (err instanceof CliError && err.displayMessage) {
|
|
399
|
-
console.error(err.displayMessage);
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
if (err instanceof Error) {
|
|
403
|
-
console.error(`Error: ${err.message}`);
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
console.error("An unexpected error occurred");
|
|
407
|
-
}
|
|
408
|
-
|
|
409
561
|
// ../api-client-generated/src/generated/core/bodySerializer.gen.ts
|
|
410
562
|
var jsonBodySerializer = {
|
|
411
563
|
bodySerializer: (body) => JSON.stringify(
|
|
@@ -8445,7 +8597,7 @@ var ApiClient = class {
|
|
|
8445
8597
|
|
|
8446
8598
|
// src/mcp/server.ts
|
|
8447
8599
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8448
|
-
import { z as
|
|
8600
|
+
import { z as z5 } from "zod";
|
|
8449
8601
|
|
|
8450
8602
|
// src/package-version.ts
|
|
8451
8603
|
import { createRequire } from "module";
|
|
@@ -8453,27 +8605,27 @@ var _require = createRequire(import.meta.url);
|
|
|
8453
8605
|
var PACKAGE_VERSION = _require("../package.json").version;
|
|
8454
8606
|
|
|
8455
8607
|
// src/mcp/tool-registry.ts
|
|
8456
|
-
import { z as
|
|
8608
|
+
import { z as z4 } from "zod";
|
|
8457
8609
|
|
|
8458
8610
|
// src/measurement-draft-actions.ts
|
|
8459
|
-
import { z } from "zod";
|
|
8460
|
-
var idempotencyKeySchema =
|
|
8611
|
+
import { z as z2 } from "zod";
|
|
8612
|
+
var idempotencyKeySchema = z2.string().trim().min(1).describe(
|
|
8461
8613
|
"A fresh request key. Reuse it only when retrying the identical request."
|
|
8462
8614
|
);
|
|
8463
|
-
var draftEtagSchema =
|
|
8615
|
+
var draftEtagSchema = z2.string().trim().min(1).optional().describe(
|
|
8464
8616
|
"Current draft ETag from canonry_measurement_draft_get. The API requires it for draft edits, publish, and discard; omit it only to receive the API\u2019s actionable 428 response."
|
|
8465
8617
|
);
|
|
8466
8618
|
function mutationOperationSchema(action, request) {
|
|
8467
|
-
return
|
|
8468
|
-
action:
|
|
8619
|
+
return z2.object({
|
|
8620
|
+
action: z2.literal(action),
|
|
8469
8621
|
request,
|
|
8470
8622
|
etag: draftEtagSchema,
|
|
8471
8623
|
idempotencyKey: idempotencyKeySchema
|
|
8472
8624
|
}).strict().describe(`Operation for ${action}.`);
|
|
8473
8625
|
}
|
|
8474
|
-
var measurementDraftOperationSchema =
|
|
8475
|
-
|
|
8476
|
-
action:
|
|
8626
|
+
var measurementDraftOperationSchema = z2.discriminatedUnion("action", [
|
|
8627
|
+
z2.object({
|
|
8628
|
+
action: z2.literal("create"),
|
|
8477
8629
|
request: measurementDraftCreateRequestSchema,
|
|
8478
8630
|
idempotencyKey: idempotencyKeySchema
|
|
8479
8631
|
}).strict().describe("Operation for create."),
|
|
@@ -8485,8 +8637,8 @@ var measurementDraftOperationSchema = z.discriminatedUnion("action", [
|
|
|
8485
8637
|
mutationOperationSchema("exclude-target", measurementDraftExcludeTargetRequestSchema),
|
|
8486
8638
|
mutationOperationSchema("rebind-target", measurementDraftRebindTargetRequestSchema),
|
|
8487
8639
|
mutationOperationSchema("apply-assignments", measurementDraftApplyAssignmentsRequestSchema),
|
|
8488
|
-
|
|
8489
|
-
action:
|
|
8640
|
+
z2.object({
|
|
8641
|
+
action: z2.literal("preview-assignments"),
|
|
8490
8642
|
request: measurementDraftPreviewAssignmentsRequestSchema
|
|
8491
8643
|
}).strict().describe("Read-semantic assignment impact preview."),
|
|
8492
8644
|
mutationOperationSchema("replace-assignments", measurementDraftReplaceAssignmentsRequestSchema),
|
|
@@ -8496,18 +8648,18 @@ var measurementDraftOperationSchema = z.discriminatedUnion("action", [
|
|
|
8496
8648
|
mutationOperationSchema("classify-assignments", measurementDraftClassifyAssignmentsRequestSchema),
|
|
8497
8649
|
mutationOperationSchema("upsert-group", measurementDraftUpsertGroupRequestSchema),
|
|
8498
8650
|
mutationOperationSchema("remove-group", measurementDraftRemoveGroupRequestSchema),
|
|
8499
|
-
|
|
8500
|
-
action:
|
|
8651
|
+
z2.object({
|
|
8652
|
+
action: z2.literal("preview-group-membership"),
|
|
8501
8653
|
request: measurementDraftPreviewGroupMembershipRequestSchema
|
|
8502
8654
|
}).strict().describe("Read-semantic CSV group-membership preview."),
|
|
8503
8655
|
mutationOperationSchema("apply-group-membership", measurementDraftApplyGroupMembershipRequestSchema),
|
|
8504
8656
|
mutationOperationSchema("upsert-competitor", measurementDraftUpsertCompetitorRequestSchema),
|
|
8505
8657
|
mutationOperationSchema("remove-competitor", measurementDraftRemoveCompetitorRequestSchema),
|
|
8506
|
-
|
|
8507
|
-
|
|
8658
|
+
z2.object({ action: z2.literal("compile-preview") }).strict().describe("Operation for compile-preview."),
|
|
8659
|
+
z2.object({ action: z2.literal("diff-preview") }).strict().describe("Operation for diff-preview."),
|
|
8508
8660
|
mutationOperationSchema("publish", measurementDraftPublishRequestSchema),
|
|
8509
|
-
|
|
8510
|
-
action:
|
|
8661
|
+
z2.object({
|
|
8662
|
+
action: z2.literal("discard"),
|
|
8511
8663
|
etag: draftEtagSchema,
|
|
8512
8664
|
idempotencyKey: idempotencyKeySchema
|
|
8513
8665
|
}).strict().describe("Operation for discard.")
|
|
@@ -8568,18 +8720,18 @@ function runMeasurementDraftAction(client2, project, actionInput) {
|
|
|
8568
8720
|
}
|
|
8569
8721
|
|
|
8570
8722
|
// src/mcp/schema.ts
|
|
8571
|
-
import { z as
|
|
8572
|
-
var projectNameSchema =
|
|
8573
|
-
var runIdSchema =
|
|
8574
|
-
var insightIdSchema =
|
|
8575
|
-
var analyticsWindowSchema =
|
|
8576
|
-
var emptyInputSchema =
|
|
8577
|
-
var projectInputSchema =
|
|
8723
|
+
import { z as z3 } from "zod";
|
|
8724
|
+
var projectNameSchema = z3.string().min(1).describe("Canonry project name.");
|
|
8725
|
+
var runIdSchema = z3.string().min(1).describe("Canonry run ID.");
|
|
8726
|
+
var insightIdSchema = z3.string().min(1).describe("Canonry insight ID.");
|
|
8727
|
+
var analyticsWindowSchema = z3.enum(["7d", "30d", "90d", "all"]).describe("Analytics time window.");
|
|
8728
|
+
var emptyInputSchema = z3.object({});
|
|
8729
|
+
var projectInputSchema = z3.object({
|
|
8578
8730
|
project: projectNameSchema
|
|
8579
8731
|
});
|
|
8580
8732
|
function toJsonSchema(schema, name) {
|
|
8581
8733
|
return {
|
|
8582
|
-
...
|
|
8734
|
+
...z3.toJSONSchema(schema, { target: "draft-7" }),
|
|
8583
8735
|
title: name
|
|
8584
8736
|
};
|
|
8585
8737
|
}
|
|
@@ -8625,20 +8777,20 @@ function defineTool(tool) {
|
|
|
8625
8777
|
inputJsonSchema: toJsonSchema(tool.inputSchema, tool.name)
|
|
8626
8778
|
};
|
|
8627
8779
|
}
|
|
8628
|
-
var runTriggerInputSchema =
|
|
8780
|
+
var runTriggerInputSchema = z4.object({
|
|
8629
8781
|
project: projectNameSchema,
|
|
8630
8782
|
request: runTriggerRequestSchema.optional()
|
|
8631
8783
|
});
|
|
8632
|
-
var measurementPlanVersionInputSchema =
|
|
8784
|
+
var measurementPlanVersionInputSchema = z4.object({ project: projectNameSchema, revision: z4.number().int().positive() });
|
|
8633
8785
|
var measurementReportInputSchema = measurementPlanVersionInputSchema.extend({
|
|
8634
8786
|
runId: runIdSchema.optional().describe("Exact eligible full measurement run to reconstruct. Omit for the latest run in the revision.")
|
|
8635
8787
|
});
|
|
8636
|
-
var measurementPlanPreviewInputSchema =
|
|
8788
|
+
var measurementPlanPreviewInputSchema = z4.object({ project: projectNameSchema, plan: measurementPlanAuthoringSchema });
|
|
8637
8789
|
var measurementPlanPublishInputSchema = measurementPlanPublishRequestSchema.extend({ project: projectNameSchema });
|
|
8638
|
-
var measurementPlanRetireInputSchema =
|
|
8790
|
+
var measurementPlanRetireInputSchema = z4.object({ project: projectNameSchema, stableKey: z4.string().min(1) });
|
|
8639
8791
|
var measurementDiscoveryInputSchema = measurementDiscoveryRequestSchema.extend({ project: projectNameSchema });
|
|
8640
|
-
var idempotencyKeyInputSchema =
|
|
8641
|
-
var measurementOverviewInputSchema =
|
|
8792
|
+
var idempotencyKeyInputSchema = z4.string().trim().min(1).describe("A fresh request key. Reuse it only when retrying the identical request.");
|
|
8793
|
+
var measurementOverviewInputSchema = z4.object({
|
|
8642
8794
|
project: projectNameSchema,
|
|
8643
8795
|
scope: measurementOverviewQuerySchema.shape.scope.describe("Read all Properties, one reporting group, or one Property."),
|
|
8644
8796
|
groupKey: measurementOverviewQuerySchema.shape.groupKey.describe("Group stable key. Required only for group scope."),
|
|
@@ -8693,16 +8845,16 @@ var measurementDataQualityInputSchema = measurementDataQualityQuerySchema.extend
|
|
|
8693
8845
|
project: projectNameSchema
|
|
8694
8846
|
}).strict();
|
|
8695
8847
|
var measurementDraftCollectionInputSchema = measurementDraftCollectionQuerySchema.extend({ project: projectNameSchema });
|
|
8696
|
-
var measurementQuerySetInputSchema =
|
|
8848
|
+
var measurementQuerySetInputSchema = z4.object({
|
|
8697
8849
|
project: projectNameSchema,
|
|
8698
|
-
setId:
|
|
8850
|
+
setId: z4.string().trim().min(1)
|
|
8699
8851
|
}).strict();
|
|
8700
8852
|
var measurementQuerySetUpsertInputSchema = measurementQuerySetInputSchema.extend({
|
|
8701
8853
|
request: measurementQuerySetUpsertRequestSchema
|
|
8702
8854
|
}).strict();
|
|
8703
|
-
var measurementQueryTemplateInputSchema =
|
|
8855
|
+
var measurementQueryTemplateInputSchema = z4.object({
|
|
8704
8856
|
project: projectNameSchema,
|
|
8705
|
-
templateId:
|
|
8857
|
+
templateId: z4.string().trim().min(1)
|
|
8706
8858
|
}).strict();
|
|
8707
8859
|
var measurementQueryTemplateUpsertInputSchema = measurementQueryTemplateInputSchema.extend({
|
|
8708
8860
|
request: measurementQueryTemplateUpsertRequestSchema
|
|
@@ -8715,7 +8867,7 @@ var measurementPlanDeactivateInputSchema = measurementPlanDeactivateRequestSchem
|
|
|
8715
8867
|
project: projectNameSchema,
|
|
8716
8868
|
idempotencyKey: idempotencyKeyInputSchema
|
|
8717
8869
|
}).strict();
|
|
8718
|
-
var measurementDraftActionInputSchema =
|
|
8870
|
+
var measurementDraftActionInputSchema = z4.object({
|
|
8719
8871
|
project: projectNameSchema,
|
|
8720
8872
|
operation: measurementDraftOperationSchema.describe("Typed draft operation. Select exactly one action branch.")
|
|
8721
8873
|
}).strict();
|
|
@@ -8746,97 +8898,97 @@ var measurementDraftActionOpenApiOperations = [
|
|
|
8746
8898
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/publish",
|
|
8747
8899
|
"POST /api/v1/projects/{name}/measurement-plan/draft/actions/discard"
|
|
8748
8900
|
];
|
|
8749
|
-
var runsListInputSchema =
|
|
8901
|
+
var runsListInputSchema = z4.object({
|
|
8750
8902
|
project: projectNameSchema,
|
|
8751
|
-
limit:
|
|
8903
|
+
limit: z4.number().int().positive().max(500).optional()
|
|
8752
8904
|
});
|
|
8753
|
-
var runGetInputSchema =
|
|
8905
|
+
var runGetInputSchema = z4.object({
|
|
8754
8906
|
runId: runIdSchema
|
|
8755
8907
|
});
|
|
8756
|
-
var timelineInputSchema =
|
|
8908
|
+
var timelineInputSchema = z4.object({
|
|
8757
8909
|
project: projectNameSchema,
|
|
8758
|
-
location:
|
|
8759
|
-
limit:
|
|
8910
|
+
location: z4.string().optional().describe("Location label. Use an empty string for locationless results."),
|
|
8911
|
+
limit: z4.number().int().positive().max(100).optional().describe("Restrict history to the most recent N project runs.")
|
|
8760
8912
|
});
|
|
8761
8913
|
var historyFilterShape = {
|
|
8762
|
-
limit:
|
|
8763
|
-
offset:
|
|
8764
|
-
since:
|
|
8765
|
-
action:
|
|
8766
|
-
actor:
|
|
8767
|
-
entityType:
|
|
8768
|
-
};
|
|
8769
|
-
var projectHistoryInputSchema =
|
|
8770
|
-
var globalHistoryInputSchema =
|
|
8771
|
-
var snapshotsListInputSchema =
|
|
8914
|
+
limit: z4.number().int().positive().max(500).optional(),
|
|
8915
|
+
offset: z4.number().int().nonnegative().optional(),
|
|
8916
|
+
since: z4.string().optional().describe("ISO 8601 lower bound."),
|
|
8917
|
+
action: z4.string().optional().describe("Exact audit action filter."),
|
|
8918
|
+
actor: z4.string().optional().describe("Exact actor filter."),
|
|
8919
|
+
entityType: z4.string().optional().describe("Exact entity type filter.")
|
|
8920
|
+
};
|
|
8921
|
+
var projectHistoryInputSchema = z4.object({ project: projectNameSchema, ...historyFilterShape });
|
|
8922
|
+
var globalHistoryInputSchema = z4.object(historyFilterShape);
|
|
8923
|
+
var snapshotsListInputSchema = z4.object({
|
|
8772
8924
|
project: projectNameSchema,
|
|
8773
|
-
limit:
|
|
8774
|
-
offset:
|
|
8775
|
-
location:
|
|
8925
|
+
limit: z4.number().int().positive().max(500).optional(),
|
|
8926
|
+
offset: z4.number().int().nonnegative().optional(),
|
|
8927
|
+
location: z4.string().optional().describe("Location label. Use an empty string for locationless results.")
|
|
8776
8928
|
});
|
|
8777
|
-
var snapshotsDiffInputSchema =
|
|
8929
|
+
var snapshotsDiffInputSchema = z4.object({
|
|
8778
8930
|
project: projectNameSchema,
|
|
8779
8931
|
run1: runIdSchema,
|
|
8780
8932
|
run2: runIdSchema
|
|
8781
8933
|
});
|
|
8782
|
-
var insightsListInputSchema =
|
|
8934
|
+
var insightsListInputSchema = z4.object({
|
|
8783
8935
|
project: projectNameSchema,
|
|
8784
|
-
dismissed:
|
|
8936
|
+
dismissed: z4.boolean().optional(),
|
|
8785
8937
|
runId: runIdSchema.optional()
|
|
8786
8938
|
});
|
|
8787
|
-
var insightInputSchema =
|
|
8939
|
+
var insightInputSchema = z4.object({
|
|
8788
8940
|
project: projectNameSchema,
|
|
8789
8941
|
insightId: insightIdSchema
|
|
8790
8942
|
});
|
|
8791
|
-
var healthHistoryInputSchema =
|
|
8943
|
+
var healthHistoryInputSchema = z4.object({
|
|
8792
8944
|
project: projectNameSchema,
|
|
8793
|
-
limit:
|
|
8945
|
+
limit: z4.number().int().positive().max(100).optional()
|
|
8794
8946
|
});
|
|
8795
|
-
var gscPerformanceInputSchema =
|
|
8947
|
+
var gscPerformanceInputSchema = z4.object({
|
|
8796
8948
|
project: projectNameSchema,
|
|
8797
|
-
startDate:
|
|
8798
|
-
endDate:
|
|
8799
|
-
query:
|
|
8800
|
-
page:
|
|
8801
|
-
limit:
|
|
8802
|
-
offset:
|
|
8949
|
+
startDate: z4.string().optional(),
|
|
8950
|
+
endDate: z4.string().optional(),
|
|
8951
|
+
query: z4.string().optional(),
|
|
8952
|
+
page: z4.string().optional(),
|
|
8953
|
+
limit: z4.number().int().positive().max(5e3).optional(),
|
|
8954
|
+
offset: z4.number().int().nonnegative().optional(),
|
|
8803
8955
|
orderBy: gscPerformanceOrderBySchema.optional(),
|
|
8804
8956
|
window: analyticsWindowSchema.optional()
|
|
8805
8957
|
});
|
|
8806
|
-
var gscPerformanceDailyInputSchema =
|
|
8958
|
+
var gscPerformanceDailyInputSchema = z4.object({
|
|
8807
8959
|
project: projectNameSchema,
|
|
8808
|
-
startDate:
|
|
8809
|
-
endDate:
|
|
8960
|
+
startDate: z4.string().optional(),
|
|
8961
|
+
endDate: z4.string().optional(),
|
|
8810
8962
|
window: analyticsWindowSchema.optional()
|
|
8811
8963
|
});
|
|
8812
|
-
var gscTopPagesInputSchema =
|
|
8964
|
+
var gscTopPagesInputSchema = z4.object({
|
|
8813
8965
|
project: projectNameSchema,
|
|
8814
|
-
startDate:
|
|
8815
|
-
endDate:
|
|
8816
|
-
limit:
|
|
8966
|
+
startDate: z4.string().optional(),
|
|
8967
|
+
endDate: z4.string().optional(),
|
|
8968
|
+
limit: z4.number().int().positive().max(500).optional(),
|
|
8817
8969
|
window: analyticsWindowSchema.optional()
|
|
8818
8970
|
});
|
|
8819
|
-
var gscInspectionsInputSchema =
|
|
8971
|
+
var gscInspectionsInputSchema = z4.object({
|
|
8820
8972
|
project: projectNameSchema,
|
|
8821
|
-
url:
|
|
8822
|
-
limit:
|
|
8973
|
+
url: z4.string().optional(),
|
|
8974
|
+
limit: z4.number().int().positive().max(500).optional()
|
|
8823
8975
|
});
|
|
8824
|
-
var gscCoverageHistoryInputSchema =
|
|
8976
|
+
var gscCoverageHistoryInputSchema = z4.object({
|
|
8825
8977
|
project: projectNameSchema,
|
|
8826
|
-
limit:
|
|
8978
|
+
limit: z4.number().int().positive().max(500).optional()
|
|
8827
8979
|
});
|
|
8828
|
-
var gscSitemapsInputSchema =
|
|
8980
|
+
var gscSitemapsInputSchema = z4.object({
|
|
8829
8981
|
project: projectNameSchema,
|
|
8830
|
-
sitemapIndex:
|
|
8982
|
+
sitemapIndex: z4.string().url().optional()
|
|
8831
8983
|
});
|
|
8832
|
-
var gscSitemapsSubmitInputSchema =
|
|
8833
|
-
|
|
8984
|
+
var gscSitemapsSubmitInputSchema = z4.union([
|
|
8985
|
+
z4.object({
|
|
8834
8986
|
project: projectNameSchema,
|
|
8835
|
-
sitemapUrls:
|
|
8987
|
+
sitemapUrls: z4.array(z4.string().url()).min(1).max(50)
|
|
8836
8988
|
}).strict(),
|
|
8837
|
-
|
|
8989
|
+
z4.object({
|
|
8838
8990
|
project: projectNameSchema,
|
|
8839
|
-
mode:
|
|
8991
|
+
mode: z4.enum(["indexes", "all-files"])
|
|
8840
8992
|
}).strict()
|
|
8841
8993
|
]);
|
|
8842
8994
|
async function submitGscSitemapsFromMcp(client2, input) {
|
|
@@ -8911,82 +9063,82 @@ async function submitGscSitemapsFromMcp(client2, input) {
|
|
|
8911
9063
|
}
|
|
8912
9064
|
return aggregate;
|
|
8913
9065
|
}
|
|
8914
|
-
var gaWindowInputSchema =
|
|
9066
|
+
var gaWindowInputSchema = z4.object({
|
|
8915
9067
|
project: projectNameSchema,
|
|
8916
9068
|
window: analyticsWindowSchema.optional(),
|
|
8917
|
-
startDate:
|
|
8918
|
-
endDate:
|
|
9069
|
+
startDate: z4.string().optional(),
|
|
9070
|
+
endDate: z4.string().optional()
|
|
8919
9071
|
});
|
|
8920
9072
|
var GA_RANGE_PARAMS = ["window", "startDate", "endDate"];
|
|
8921
9073
|
var gaTrafficInputSchema = gaWindowInputSchema.extend({
|
|
8922
|
-
limit:
|
|
9074
|
+
limit: z4.number().int().positive().max(500).optional()
|
|
8923
9075
|
});
|
|
8924
|
-
var gaMeasurementAnalysisInputSchema =
|
|
9076
|
+
var gaMeasurementAnalysisInputSchema = z4.object({
|
|
8925
9077
|
project: projectNameSchema,
|
|
8926
9078
|
window: gaMeasurementAnalysisWindowSchema.optional(),
|
|
8927
9079
|
hostScope: gaMeasurementHostScopeSchema.optional(),
|
|
8928
|
-
pathPrefix:
|
|
8929
|
-
limit:
|
|
9080
|
+
pathPrefix: z4.string().min(1).optional(),
|
|
9081
|
+
limit: z4.number().int().positive().max(100).optional()
|
|
8930
9082
|
});
|
|
8931
|
-
var queriesInputSchema =
|
|
9083
|
+
var queriesInputSchema = z4.object({
|
|
8932
9084
|
project: projectNameSchema,
|
|
8933
9085
|
request: queryBatchRequestSchema
|
|
8934
9086
|
});
|
|
8935
|
-
var queryGenerateInputSchema =
|
|
9087
|
+
var queryGenerateInputSchema = z4.object({
|
|
8936
9088
|
project: projectNameSchema,
|
|
8937
9089
|
request: queryGenerateRequestSchema
|
|
8938
9090
|
});
|
|
8939
|
-
var gbpListLocationsInputSchema =
|
|
9091
|
+
var gbpListLocationsInputSchema = z4.object({
|
|
8940
9092
|
project: projectNameSchema,
|
|
8941
|
-
selected:
|
|
9093
|
+
selected: z4.boolean().optional()
|
|
8942
9094
|
});
|
|
8943
|
-
var gbpDiscoverInputSchema =
|
|
9095
|
+
var gbpDiscoverInputSchema = z4.object({
|
|
8944
9096
|
project: projectNameSchema,
|
|
8945
|
-
selectAllNew:
|
|
8946
|
-
accountName:
|
|
8947
|
-
switchAccount:
|
|
9097
|
+
selectAllNew: z4.boolean().optional().default(true),
|
|
9098
|
+
accountName: z4.string().regex(/^accounts\//, 'accountName must be a Google resource name like "accounts/12345"').optional(),
|
|
9099
|
+
switchAccount: z4.boolean().optional().default(false)
|
|
8948
9100
|
});
|
|
8949
|
-
var gbpLocationSelectionInputSchema =
|
|
9101
|
+
var gbpLocationSelectionInputSchema = z4.object({
|
|
8950
9102
|
project: projectNameSchema,
|
|
8951
|
-
locationName:
|
|
8952
|
-
selected:
|
|
9103
|
+
locationName: z4.string().min(1).regex(/^locations\//, 'locationName must be a Google resource name like "locations/12345"'),
|
|
9104
|
+
selected: z4.boolean()
|
|
8953
9105
|
});
|
|
8954
|
-
var gbpSyncInputSchema =
|
|
9106
|
+
var gbpSyncInputSchema = z4.object({
|
|
8955
9107
|
project: projectNameSchema,
|
|
8956
|
-
locationNames:
|
|
8957
|
-
daysOfMetrics:
|
|
8958
|
-
monthsOfKeywords:
|
|
9108
|
+
locationNames: z4.array(z4.string()).optional(),
|
|
9109
|
+
daysOfMetrics: z4.number().int().positive().max(540).optional(),
|
|
9110
|
+
monthsOfKeywords: z4.number().int().positive().max(18).optional()
|
|
8959
9111
|
});
|
|
8960
|
-
var gbpMetricsInputSchema =
|
|
9112
|
+
var gbpMetricsInputSchema = z4.object({
|
|
8961
9113
|
project: projectNameSchema,
|
|
8962
|
-
locationName:
|
|
8963
|
-
metric:
|
|
9114
|
+
locationName: z4.string().optional(),
|
|
9115
|
+
metric: z4.string().optional()
|
|
8964
9116
|
});
|
|
8965
|
-
var gbpLocationScopedInputSchema =
|
|
9117
|
+
var gbpLocationScopedInputSchema = z4.object({
|
|
8966
9118
|
project: projectNameSchema,
|
|
8967
|
-
locationName:
|
|
9119
|
+
locationName: z4.string().optional()
|
|
8968
9120
|
});
|
|
8969
|
-
var gbpAccountsInputSchema =
|
|
9121
|
+
var gbpAccountsInputSchema = z4.object({
|
|
8970
9122
|
project: projectNameSchema
|
|
8971
9123
|
});
|
|
8972
|
-
var adsInsightsInputSchema =
|
|
9124
|
+
var adsInsightsInputSchema = z4.object({
|
|
8973
9125
|
project: projectNameSchema,
|
|
8974
|
-
level:
|
|
8975
|
-
entityId:
|
|
8976
|
-
from:
|
|
8977
|
-
to:
|
|
9126
|
+
level: z4.enum(["campaign", "ad_group"]).optional(),
|
|
9127
|
+
entityId: z4.string().optional(),
|
|
9128
|
+
from: z4.string().optional(),
|
|
9129
|
+
to: z4.string().optional()
|
|
8978
9130
|
});
|
|
8979
9131
|
var adsGeoSearchInputSchema = adsGeoSearchQuerySchema.extend({
|
|
8980
9132
|
project: projectNameSchema
|
|
8981
9133
|
});
|
|
8982
|
-
var adsLiveDeliveryInputSchema =
|
|
9134
|
+
var adsLiveDeliveryInputSchema = z4.object({
|
|
8983
9135
|
project: projectNameSchema,
|
|
8984
|
-
campaignId:
|
|
8985
|
-
lookbackDays:
|
|
9136
|
+
campaignId: z4.string().min(1).max(200).optional(),
|
|
9137
|
+
lookbackDays: z4.number().int().min(1).max(30).optional()
|
|
8986
9138
|
});
|
|
8987
|
-
var adsOperationInputSchema =
|
|
9139
|
+
var adsOperationInputSchema = z4.object({
|
|
8988
9140
|
project: projectNameSchema,
|
|
8989
|
-
operationKey:
|
|
9141
|
+
operationKey: z4.string().min(8).max(128)
|
|
8990
9142
|
});
|
|
8991
9143
|
var adsOperationResumeActivationInputSchema = adsOperationInputSchema.strict();
|
|
8992
9144
|
var adsUnresolvedOperationsInputSchema = adsUnresolvedOperationListQuerySchema.extend({
|
|
@@ -8994,92 +9146,92 @@ var adsUnresolvedOperationsInputSchema = adsUnresolvedOperationListQuerySchema.e
|
|
|
8994
9146
|
});
|
|
8995
9147
|
var adsOperationReconcileInputSchema = adsOperationReconcileRequestSchema.extend({
|
|
8996
9148
|
project: projectNameSchema,
|
|
8997
|
-
operationKey:
|
|
9149
|
+
operationKey: z4.string().min(8).max(128)
|
|
8998
9150
|
});
|
|
8999
|
-
var adsImageUploadInputSchema =
|
|
9151
|
+
var adsImageUploadInputSchema = z4.object({
|
|
9000
9152
|
project: projectNameSchema,
|
|
9001
9153
|
request: adsImageUploadRequestSchema
|
|
9002
9154
|
});
|
|
9003
|
-
var adsCampaignCreateInputSchema =
|
|
9155
|
+
var adsCampaignCreateInputSchema = z4.object({
|
|
9004
9156
|
project: projectNameSchema,
|
|
9005
9157
|
request: adsCampaignCreateRequestSchema
|
|
9006
9158
|
});
|
|
9007
|
-
var adsCampaignUpdateInputSchema =
|
|
9159
|
+
var adsCampaignUpdateInputSchema = z4.object({
|
|
9008
9160
|
project: projectNameSchema,
|
|
9009
|
-
campaignId:
|
|
9161
|
+
campaignId: z4.string().min(1),
|
|
9010
9162
|
request: adsCampaignUpdateRequestSchema
|
|
9011
9163
|
});
|
|
9012
|
-
var adsCampaignActivateTreeInputSchema =
|
|
9164
|
+
var adsCampaignActivateTreeInputSchema = z4.object({
|
|
9013
9165
|
project: projectNameSchema,
|
|
9014
|
-
campaignId:
|
|
9166
|
+
campaignId: z4.string().min(1),
|
|
9015
9167
|
request: adsActivateTreeRequestSchema
|
|
9016
9168
|
});
|
|
9017
|
-
var adsCampaignPauseInputSchema =
|
|
9169
|
+
var adsCampaignPauseInputSchema = z4.object({
|
|
9018
9170
|
project: projectNameSchema,
|
|
9019
|
-
campaignId:
|
|
9171
|
+
campaignId: z4.string().min(1),
|
|
9020
9172
|
request: adsPauseRequestSchema
|
|
9021
9173
|
});
|
|
9022
|
-
var adsAdGroupCreateInputSchema =
|
|
9174
|
+
var adsAdGroupCreateInputSchema = z4.object({
|
|
9023
9175
|
project: projectNameSchema,
|
|
9024
9176
|
request: adsAdGroupCreateRequestSchema
|
|
9025
9177
|
});
|
|
9026
|
-
var adsAdGroupUpdateInputSchema =
|
|
9178
|
+
var adsAdGroupUpdateInputSchema = z4.object({
|
|
9027
9179
|
project: projectNameSchema,
|
|
9028
|
-
adGroupId:
|
|
9180
|
+
adGroupId: z4.string().min(1),
|
|
9029
9181
|
request: adsAdGroupUpdateRequestSchema
|
|
9030
9182
|
});
|
|
9031
|
-
var adsAdGroupPauseInputSchema =
|
|
9183
|
+
var adsAdGroupPauseInputSchema = z4.object({
|
|
9032
9184
|
project: projectNameSchema,
|
|
9033
|
-
adGroupId:
|
|
9185
|
+
adGroupId: z4.string().min(1),
|
|
9034
9186
|
request: adsPauseRequestSchema
|
|
9035
9187
|
});
|
|
9036
|
-
var adsAdCreateInputSchema =
|
|
9188
|
+
var adsAdCreateInputSchema = z4.object({
|
|
9037
9189
|
project: projectNameSchema,
|
|
9038
9190
|
request: adsAdCreateRequestSchema
|
|
9039
9191
|
});
|
|
9040
|
-
var adsAdUpdateInputSchema =
|
|
9192
|
+
var adsAdUpdateInputSchema = z4.object({
|
|
9041
9193
|
project: projectNameSchema,
|
|
9042
|
-
adId:
|
|
9194
|
+
adId: z4.string().min(1),
|
|
9043
9195
|
request: adsAdUpdateRequestSchema
|
|
9044
9196
|
});
|
|
9045
|
-
var adsAdPauseInputSchema =
|
|
9197
|
+
var adsAdPauseInputSchema = z4.object({
|
|
9046
9198
|
project: projectNameSchema,
|
|
9047
|
-
adId:
|
|
9199
|
+
adId: z4.string().min(1),
|
|
9048
9200
|
request: adsPauseRequestSchema
|
|
9049
9201
|
});
|
|
9050
|
-
var googleMarketingSnapshotPageInputSchema =
|
|
9202
|
+
var googleMarketingSnapshotPageInputSchema = z4.object({
|
|
9051
9203
|
project: projectNameSchema,
|
|
9052
|
-
limit:
|
|
9053
|
-
cursor:
|
|
9204
|
+
limit: z4.number().int().min(1).max(GOOGLE_MARKETING_STORED_SNAPSHOT_PAGE_MAX).optional(),
|
|
9205
|
+
cursor: z4.string().trim().min(1).optional()
|
|
9054
9206
|
}).strict();
|
|
9055
|
-
var googleAdsPerformanceInputSchema =
|
|
9207
|
+
var googleAdsPerformanceInputSchema = z4.object({
|
|
9056
9208
|
project: projectNameSchema,
|
|
9057
9209
|
window: googleAdsMetricsWindowSchema.optional()
|
|
9058
9210
|
}).strict();
|
|
9059
|
-
var googleMarketingSnapshotInputSchema =
|
|
9211
|
+
var googleMarketingSnapshotInputSchema = z4.object({
|
|
9060
9212
|
project: projectNameSchema,
|
|
9061
|
-
snapshotId:
|
|
9213
|
+
snapshotId: z4.string().trim().min(1)
|
|
9062
9214
|
}).strict();
|
|
9063
|
-
var gtmAccountInputSchema =
|
|
9215
|
+
var gtmAccountInputSchema = z4.object({
|
|
9064
9216
|
project: projectNameSchema,
|
|
9065
|
-
accountId:
|
|
9217
|
+
accountId: z4.string().trim().min(1)
|
|
9066
9218
|
}).strict().superRefine((input, context) => {
|
|
9067
9219
|
if (!canonicalizeGtmAccountId(input.accountId)) {
|
|
9068
9220
|
context.addIssue({
|
|
9069
|
-
code:
|
|
9221
|
+
code: z4.ZodIssueCode.custom,
|
|
9070
9222
|
path: ["accountId"],
|
|
9071
9223
|
message: "Expected a safe GTM account ID or accounts/{id} resource path."
|
|
9072
9224
|
});
|
|
9073
9225
|
}
|
|
9074
9226
|
});
|
|
9075
|
-
var gtmContainerInputSchema =
|
|
9227
|
+
var gtmContainerInputSchema = z4.object({
|
|
9076
9228
|
project: projectNameSchema,
|
|
9077
|
-
accountId:
|
|
9078
|
-
containerId:
|
|
9229
|
+
accountId: z4.string().trim().min(1),
|
|
9230
|
+
containerId: z4.string().trim().min(1)
|
|
9079
9231
|
}).strict().superRefine((input, context) => {
|
|
9080
9232
|
if (!canonicalizeGtmResourceSelection(input)) {
|
|
9081
9233
|
context.addIssue({
|
|
9082
|
-
code:
|
|
9234
|
+
code: z4.ZodIssueCode.custom,
|
|
9083
9235
|
path: ["containerId"],
|
|
9084
9236
|
message: "Expected matching safe GTM account/container IDs or resource paths."
|
|
9085
9237
|
});
|
|
@@ -9095,197 +9247,197 @@ function canonicalGtmMcpSelection(accountId, containerId) {
|
|
|
9095
9247
|
if (!canonical) throw new Error("Invalid GTM account/container input.");
|
|
9096
9248
|
return canonical;
|
|
9097
9249
|
}
|
|
9098
|
-
var conversionTrackingContractInputSchema =
|
|
9250
|
+
var conversionTrackingContractInputSchema = z4.object({
|
|
9099
9251
|
project: projectNameSchema,
|
|
9100
|
-
contractId:
|
|
9252
|
+
contractId: z4.string().trim().min(1)
|
|
9101
9253
|
}).strict();
|
|
9102
|
-
var keywordsInputSchema =
|
|
9254
|
+
var keywordsInputSchema = z4.object({
|
|
9103
9255
|
project: projectNameSchema,
|
|
9104
9256
|
request: keywordBatchRequestSchema
|
|
9105
9257
|
});
|
|
9106
|
-
var keywordGenerateInputSchema =
|
|
9258
|
+
var keywordGenerateInputSchema = z4.object({
|
|
9107
9259
|
project: projectNameSchema,
|
|
9108
9260
|
request: keywordGenerateRequestSchema
|
|
9109
9261
|
});
|
|
9110
|
-
var competitorsInputSchema =
|
|
9262
|
+
var competitorsInputSchema = z4.object({
|
|
9111
9263
|
project: projectNameSchema,
|
|
9112
9264
|
request: competitorBatchRequestSchema
|
|
9113
9265
|
});
|
|
9114
9266
|
var competitorLandscapeInputSchema = competitorLandscapeQuerySchema.safeExtend({
|
|
9115
9267
|
project: projectNameSchema
|
|
9116
9268
|
}).strict();
|
|
9117
|
-
var projectUpsertInputSchema =
|
|
9269
|
+
var projectUpsertInputSchema = z4.object({
|
|
9118
9270
|
project: projectNameSchema,
|
|
9119
9271
|
request: projectUpsertRequestSchema
|
|
9120
9272
|
});
|
|
9121
|
-
var applyConfigInputSchema =
|
|
9273
|
+
var applyConfigInputSchema = z4.object({
|
|
9122
9274
|
config: projectConfigSchema
|
|
9123
9275
|
});
|
|
9124
|
-
var scheduleSetInputSchema =
|
|
9276
|
+
var scheduleSetInputSchema = z4.object({
|
|
9125
9277
|
project: projectNameSchema,
|
|
9126
9278
|
schedule: scheduleUpsertRequestSchema
|
|
9127
9279
|
});
|
|
9128
|
-
var scheduleReadInputSchema =
|
|
9280
|
+
var scheduleReadInputSchema = z4.object({
|
|
9129
9281
|
project: projectNameSchema,
|
|
9130
9282
|
kind: schedulableRunKindSchema.optional().describe('Schedulable run kind. Defaults to "answer-visibility" if omitted.')
|
|
9131
9283
|
});
|
|
9132
|
-
var agentWebhookAttachInputSchema =
|
|
9284
|
+
var agentWebhookAttachInputSchema = z4.object({
|
|
9133
9285
|
project: projectNameSchema,
|
|
9134
|
-
url:
|
|
9286
|
+
url: z4.string().url()
|
|
9135
9287
|
});
|
|
9136
|
-
var doctorInputSchema =
|
|
9288
|
+
var doctorInputSchema = z4.object({
|
|
9137
9289
|
project: projectNameSchema.optional().describe("Project name to scope project-level checks. Omit to run global checks (provider keys, config, etc.)."),
|
|
9138
|
-
checks:
|
|
9290
|
+
checks: z4.array(z4.string().min(1)).optional().describe('Optional check IDs or wildcard prefixes (e.g. "google.auth.*", "config.providers"). Empty/omitted runs all matching checks for the chosen scope.')
|
|
9139
9291
|
});
|
|
9140
|
-
var contentTargetsInputSchema =
|
|
9292
|
+
var contentTargetsInputSchema = z4.object({
|
|
9141
9293
|
project: projectNameSchema,
|
|
9142
|
-
limit:
|
|
9143
|
-
includeInProgress:
|
|
9144
|
-
winnabilityClass:
|
|
9145
|
-
ownable:
|
|
9294
|
+
limit: z4.number().int().positive().max(500).optional().describe("Max rows. Defaults to all. Use a small number (3-10) when summarizing for the user."),
|
|
9295
|
+
includeInProgress: z4.boolean().optional().describe("Include rows that already have an in-flight tracked action. Default false."),
|
|
9296
|
+
winnabilityClass: z4.enum(["ownable", "ceded"]).optional().describe('Filter by winnability: "ownable" (worth a brief) or "ceded" (aggregator/editorial head term to skip).'),
|
|
9297
|
+
ownable: z4.boolean().optional().describe('Convenience: when true, return only ownable targets (same as winnabilityClass="ownable").')
|
|
9146
9298
|
});
|
|
9147
|
-
var contentBriefInputSchema =
|
|
9299
|
+
var contentBriefInputSchema = z4.object({
|
|
9148
9300
|
project: projectNameSchema,
|
|
9149
|
-
targetRef:
|
|
9150
|
-
provider:
|
|
9151
|
-
model:
|
|
9152
|
-
forceRefresh:
|
|
9301
|
+
targetRef: z4.string().min(1).describe("Stable target ref from canonry_content_targets. The target must be ownable; ceded targets are rejected."),
|
|
9302
|
+
provider: z4.string().optional().describe("Optional provider override (claude|openai|gemini|zai|deepinfra)."),
|
|
9303
|
+
model: z4.string().optional().describe("Optional model override within the chosen provider."),
|
|
9304
|
+
forceRefresh: z4.boolean().optional().describe("Force a fresh synthesis even if a cached brief exists.")
|
|
9153
9305
|
});
|
|
9154
|
-
var contentMapInputSchema =
|
|
9306
|
+
var contentMapInputSchema = z4.object({
|
|
9155
9307
|
project: projectNameSchema
|
|
9156
9308
|
});
|
|
9157
|
-
var backlinksDomainsInputSchema =
|
|
9309
|
+
var backlinksDomainsInputSchema = z4.object({
|
|
9158
9310
|
project: projectNameSchema,
|
|
9159
|
-
limit:
|
|
9160
|
-
release:
|
|
9311
|
+
limit: z4.number().int().positive().max(200).optional().describe("Max linking-domain rows. Default 50, max 200."),
|
|
9312
|
+
release: z4.string().optional().describe("Common Crawl release id, e.g. cc-main-2026-jan-feb-mar. Omit for the most recent release with data."),
|
|
9161
9313
|
source: backlinkSourceSchema.optional().describe("Stored source. Common Crawl is active; bing-webmaster is historical-only.")
|
|
9162
9314
|
});
|
|
9163
|
-
var backlinksSourcesInputSchema =
|
|
9315
|
+
var backlinksSourcesInputSchema = z4.object({
|
|
9164
9316
|
project: projectNameSchema
|
|
9165
9317
|
});
|
|
9166
|
-
var memoryUpsertInputSchema =
|
|
9318
|
+
var memoryUpsertInputSchema = z4.object({
|
|
9167
9319
|
project: projectNameSchema,
|
|
9168
|
-
key:
|
|
9169
|
-
value:
|
|
9320
|
+
key: z4.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH).describe(`Stable identifier for the note (max ${AGENT_MEMORY_KEY_MAX_LENGTH} chars). Writing the same key overwrites the prior value.`),
|
|
9321
|
+
value: z4.string().min(1).describe(`Plain-text note body (max ${AGENT_MEMORY_VALUE_MAX_BYTES} bytes). Use for durable operator preferences, migration context, or non-obvious reasoning that should survive future sessions.`)
|
|
9170
9322
|
});
|
|
9171
|
-
var memoryForgetInputSchema =
|
|
9323
|
+
var memoryForgetInputSchema = z4.object({
|
|
9172
9324
|
project: projectNameSchema,
|
|
9173
|
-
key:
|
|
9325
|
+
key: z4.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH).describe("Exact key of the note to remove. No-op (status=missing) when no note exists for that key.")
|
|
9174
9326
|
});
|
|
9175
|
-
var trafficConnectCloudRunInputSchema =
|
|
9327
|
+
var trafficConnectCloudRunInputSchema = z4.object({
|
|
9176
9328
|
project: projectNameSchema,
|
|
9177
9329
|
request: trafficConnectCloudRunRequestSchema
|
|
9178
9330
|
});
|
|
9179
|
-
var trafficConnectWordpressInputSchema =
|
|
9331
|
+
var trafficConnectWordpressInputSchema = z4.object({
|
|
9180
9332
|
project: projectNameSchema,
|
|
9181
9333
|
request: trafficConnectWordpressRequestSchema
|
|
9182
9334
|
});
|
|
9183
|
-
var trafficConnectVercelInputSchema =
|
|
9335
|
+
var trafficConnectVercelInputSchema = z4.object({
|
|
9184
9336
|
project: projectNameSchema,
|
|
9185
9337
|
request: trafficConnectVercelRequestSchema
|
|
9186
9338
|
});
|
|
9187
|
-
var trafficSyncInputSchema =
|
|
9339
|
+
var trafficSyncInputSchema = z4.object({
|
|
9188
9340
|
project: projectNameSchema,
|
|
9189
|
-
sourceId:
|
|
9190
|
-
sinceMinutes:
|
|
9341
|
+
sourceId: z4.string().min(1).describe("Traffic source ID returned by canonry_traffic_connect_cloud_run or canonry_traffic_sources_list."),
|
|
9342
|
+
sinceMinutes: z4.number().int().positive().max(365 * 24 * 60).optional().describe("Optional lookback in minutes. Defaults are adapter-specific and clamp forward to lastSyncedAt; a new or idle WordPress source uses 365d to cover the plugin\u2019s maximum configurable retention.")
|
|
9191
9343
|
});
|
|
9192
|
-
var trafficBackfillInputSchema =
|
|
9344
|
+
var trafficBackfillInputSchema = z4.object({
|
|
9193
9345
|
project: projectNameSchema,
|
|
9194
|
-
sourceId:
|
|
9195
|
-
days:
|
|
9346
|
+
sourceId: z4.string().min(1).describe("Traffic source ID returned by canonry_traffic_sources_list."),
|
|
9347
|
+
days: z4.number().int().positive().max(90).optional().describe("Lookback window in days. Default 30, capped by the adapter at 90d. Generic WordPress replace backfill is unavailable because retained coverage is unproven.")
|
|
9196
9348
|
});
|
|
9197
|
-
var trafficResetInputSchema =
|
|
9349
|
+
var trafficResetInputSchema = z4.object({
|
|
9198
9350
|
project: projectNameSchema,
|
|
9199
|
-
sourceId:
|
|
9200
|
-
advanceToNow:
|
|
9351
|
+
sourceId: z4.string().min(1).describe("Traffic source ID returned by canonry_traffic_sources_list."),
|
|
9352
|
+
advanceToNow: z4.literal(true).describe("Must be `true`. Explicit gate against accidental resets. Advances lastSyncedAt to NOW and clears the source's error state; WordPress also clears its continuation state and records an unrecovered span that needs retention-aware repair.")
|
|
9201
9353
|
});
|
|
9202
|
-
var trafficEventsInputSchema =
|
|
9354
|
+
var trafficEventsInputSchema = z4.object({
|
|
9203
9355
|
project: projectNameSchema,
|
|
9204
|
-
since:
|
|
9205
|
-
until:
|
|
9206
|
-
kind:
|
|
9207
|
-
sourceId:
|
|
9208
|
-
limit:
|
|
9356
|
+
since: z4.string().optional().describe("ISO 8601 lower bound. Defaults to 24h ago when omitted."),
|
|
9357
|
+
until: z4.string().optional().describe("ISO 8601 upper bound. Defaults to now when omitted."),
|
|
9358
|
+
kind: z4.union([trafficEventKindSchema, z4.literal("all")]).optional().describe('Filter to one traffic kind; "all" (default) returns every kind.'),
|
|
9359
|
+
sourceId: z4.string().min(1).optional().describe("Restrict to a single traffic source ID."),
|
|
9360
|
+
limit: z4.number().int().positive().max(5e3).optional().describe("Max combined rows. Defaults to 500, max 5000. Totals always reflect the full window."),
|
|
9209
9361
|
granularity: trafficSeriesGranularitySchema.optional().describe("Full-window chart series bucket size: hour (default) or day.")
|
|
9210
9362
|
});
|
|
9211
|
-
var trafficSourceIdInputSchema =
|
|
9363
|
+
var trafficSourceIdInputSchema = z4.object({
|
|
9212
9364
|
project: projectNameSchema,
|
|
9213
|
-
sourceId:
|
|
9365
|
+
sourceId: z4.string().min(1).describe("Traffic source ID.")
|
|
9214
9366
|
});
|
|
9215
|
-
var discoveryRunInputSchema =
|
|
9367
|
+
var discoveryRunInputSchema = z4.object({
|
|
9216
9368
|
project: projectNameSchema,
|
|
9217
9369
|
request: discoveryRunRequestSchema.extend({
|
|
9218
9370
|
// Stronger descriptions for the LLM. The base Zod schema enforces the
|
|
9219
9371
|
// upper bound; this just clarifies the meaning of each knob.
|
|
9220
|
-
icpDescription:
|
|
9221
|
-
buyerDescription:
|
|
9222
|
-
seedProviders:
|
|
9223
|
-
dedupThreshold:
|
|
9224
|
-
maxProbes:
|
|
9225
|
-
probeConcurrency:
|
|
9372
|
+
icpDescription: z4.string().min(1).optional().describe("Free-text ICP description. If omitted, the project must already have spec.icpDescription stored."),
|
|
9373
|
+
buyerDescription: z4.string().min(1).optional().describe("Who evaluates or buys the offering, separate from the ICP. When present, every generated query is anchored on this buyer."),
|
|
9374
|
+
seedProviders: z4.array(z4.enum(["gemini", "openai"])).min(1).optional().describe('Which providers generate seed candidates. Omit for the Gemini-only default; ["gemini","openai"] merges both phrasing distributions before dedup.'),
|
|
9375
|
+
dedupThreshold: z4.number().min(0).max(1).optional().describe("Cosine similarity threshold for clustering seed candidates. Defaults to 0.85. Lower values dedupe more aggressively."),
|
|
9376
|
+
maxProbes: z4.number().int().positive().max(DISCOVERY_MAX_PROBES_CAP).optional().describe(`Max canonical queries to probe in this session. Default 100, hard cap ${DISCOVERY_MAX_PROBES_CAP}.`),
|
|
9377
|
+
probeConcurrency: z4.number().int().min(1).max(DISCOVERY_PROBE_CONCURRENCY_CAP).optional().describe(`How many probes may run in parallel. Default 1 (strictly serial), hard cap ${DISCOVERY_PROBE_CONCURRENCY_CAP}. Probe rows are persisted in canonical order regardless of concurrency, so this only shortens wall-clock time.`)
|
|
9226
9378
|
}).optional()
|
|
9227
9379
|
});
|
|
9228
|
-
var discoverySessionsListInputSchema =
|
|
9380
|
+
var discoverySessionsListInputSchema = z4.object({
|
|
9229
9381
|
project: projectNameSchema,
|
|
9230
|
-
limit:
|
|
9382
|
+
limit: z4.number().int().positive().max(200).optional().describe("Max sessions returned. Default 50.")
|
|
9231
9383
|
});
|
|
9232
|
-
var discoverySessionIdInputSchema =
|
|
9384
|
+
var discoverySessionIdInputSchema = z4.object({
|
|
9233
9385
|
project: projectNameSchema,
|
|
9234
|
-
sessionId:
|
|
9386
|
+
sessionId: z4.string().min(1).describe("Discovery session ID returned by canonry_discover_run_start.")
|
|
9235
9387
|
});
|
|
9236
|
-
var researchRunStartInputSchema =
|
|
9388
|
+
var researchRunStartInputSchema = z4.object({
|
|
9237
9389
|
project: projectNameSchema,
|
|
9238
9390
|
request: researchRunCreateSchema.describe("One shared provider/model/location context for every free-form query in this saved research batch.")
|
|
9239
9391
|
});
|
|
9240
|
-
var researchRunsListInputSchema =
|
|
9392
|
+
var researchRunsListInputSchema = z4.object({
|
|
9241
9393
|
project: projectNameSchema,
|
|
9242
|
-
limit:
|
|
9394
|
+
limit: z4.number().int().positive().max(100).optional().describe("Max saved research runs returned. Default 20.")
|
|
9243
9395
|
});
|
|
9244
|
-
var researchRunIdInputSchema =
|
|
9396
|
+
var researchRunIdInputSchema = z4.object({
|
|
9245
9397
|
project: projectNameSchema,
|
|
9246
|
-
runId:
|
|
9398
|
+
runId: z4.string().min(1).describe("Research run ID returned by canonry_research_run_start.")
|
|
9247
9399
|
});
|
|
9248
|
-
var discoveryHarvestInputSchema =
|
|
9400
|
+
var discoveryHarvestInputSchema = z4.object({
|
|
9249
9401
|
project: projectNameSchema,
|
|
9250
|
-
sessionId:
|
|
9251
|
-
minProbeHits:
|
|
9252
|
-
anchor:
|
|
9402
|
+
sessionId: z4.string().min(1).describe("Discovery session ID returned by canonry_discover_run_start."),
|
|
9403
|
+
minProbeHits: z4.number().int().positive().optional().describe("Recurrence floor \u2014 a candidate must have appeared in at least this many distinct probes to be admitted. Default 1."),
|
|
9404
|
+
anchor: z4.boolean().optional().describe("Apply the subject-anchor filter that drops off-topic acronym collisions. Default true; pass false for new-subject discovery on a well-scoped project.")
|
|
9253
9405
|
});
|
|
9254
|
-
var discoveryPromoteInputSchema =
|
|
9406
|
+
var discoveryPromoteInputSchema = z4.object({
|
|
9255
9407
|
project: projectNameSchema,
|
|
9256
|
-
sessionId:
|
|
9408
|
+
sessionId: z4.string().min(1).describe("Discovery session ID returned by canonry_discover_run_start."),
|
|
9257
9409
|
request: discoveryPromoteRequestSchema.extend({
|
|
9258
9410
|
// Stronger descriptions for the LLM. The base Zod schema enforces the shape.
|
|
9259
|
-
buckets:
|
|
9260
|
-
includeCompetitors:
|
|
9261
|
-
competitorTypes:
|
|
9411
|
+
buckets: z4.array(discoveryBucketSchema).min(1).optional().describe("Which probe buckets to adopt into the tracked basket. Omitted promotes cited + aspirational; include wasted-surface explicitly for off-ICP competitor gaps."),
|
|
9412
|
+
includeCompetitors: z4.boolean().optional().describe("Whether to also merge recurring discovered competitor domains into the project. Defaults to true."),
|
|
9413
|
+
competitorTypes: z4.array(discoveryCompetitorTypeSchema).min(1).optional().describe("Which classified competitor types to merge. Omitted promotes direct-competitor only; pass an explicit list to also adopt editorial-media channels or to recover legacy unknown entries. Ignored when includeCompetitors is false.")
|
|
9262
9414
|
}).optional()
|
|
9263
9415
|
});
|
|
9264
|
-
var technicalAeoScoreInputSchema =
|
|
9416
|
+
var technicalAeoScoreInputSchema = z4.object({
|
|
9265
9417
|
project: projectNameSchema,
|
|
9266
9418
|
runId: runIdSchema.optional().describe("Historical site-audit run ID. Omit for the latest audit.")
|
|
9267
9419
|
});
|
|
9268
|
-
var technicalAeoPagesInputSchema =
|
|
9420
|
+
var technicalAeoPagesInputSchema = z4.object({
|
|
9269
9421
|
project: projectNameSchema,
|
|
9270
9422
|
runId: runIdSchema.optional().describe("Historical site-audit run ID. Omit for the latest audit."),
|
|
9271
|
-
status:
|
|
9272
|
-
sort:
|
|
9273
|
-
limit:
|
|
9274
|
-
offset:
|
|
9423
|
+
status: z4.enum(["success", "error"]).optional().describe("Filter to successfully-audited or errored pages."),
|
|
9424
|
+
sort: z4.enum(["score-asc", "score-desc", "url"]).optional().describe("Sort order. Defaults to score-asc (worst pages first)."),
|
|
9425
|
+
limit: z4.number().int().positive().max(500).optional(),
|
|
9426
|
+
offset: z4.number().int().nonnegative().optional()
|
|
9275
9427
|
});
|
|
9276
|
-
var technicalAeoTrendInputSchema =
|
|
9428
|
+
var technicalAeoTrendInputSchema = z4.object({
|
|
9277
9429
|
project: projectNameSchema,
|
|
9278
|
-
limit:
|
|
9430
|
+
limit: z4.number().int().positive().max(365).optional()
|
|
9279
9431
|
});
|
|
9280
|
-
var technicalAeoCrawlInputSchema =
|
|
9432
|
+
var technicalAeoCrawlInputSchema = z4.object({
|
|
9281
9433
|
project: projectNameSchema,
|
|
9282
9434
|
runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest persisted crawl.")
|
|
9283
9435
|
});
|
|
9284
|
-
var siteHealthPageAuditInputSchema =
|
|
9436
|
+
var siteHealthPageAuditInputSchema = z4.object({
|
|
9285
9437
|
project: projectNameSchema,
|
|
9286
9438
|
runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest persisted crawl."),
|
|
9287
|
-
nodeKey:
|
|
9288
|
-
url:
|
|
9439
|
+
nodeKey: z4.string().min(1).optional().describe("Exact crawl node key, as returned by Site Health page or subgraph reads."),
|
|
9440
|
+
url: z4.string().url().optional().describe("Exact page URL. Use this only when a crawl node key is unavailable.")
|
|
9289
9441
|
}).refine((value) => Boolean(value.nodeKey || value.url), {
|
|
9290
9442
|
message: "Provide nodeKey or url.",
|
|
9291
9443
|
path: ["nodeKey"]
|
|
@@ -9295,26 +9447,26 @@ var siteHealthPageAuditInputSchema = z3.object({
|
|
|
9295
9447
|
});
|
|
9296
9448
|
var SITE_HEALTH_MCP_MAX_NODES = 25;
|
|
9297
9449
|
var SITE_HEALTH_MCP_MAX_EDGES = 50;
|
|
9298
|
-
var siteHealthSubgraphInputSchema =
|
|
9450
|
+
var siteHealthSubgraphInputSchema = z4.object({
|
|
9299
9451
|
project: projectNameSchema,
|
|
9300
9452
|
runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest complete crawl."),
|
|
9301
|
-
nodeKey:
|
|
9302
|
-
url:
|
|
9303
|
-
hops:
|
|
9304
|
-
maxNodes:
|
|
9305
|
-
maxEdges:
|
|
9453
|
+
nodeKey: z4.string().min(1).optional().describe("Focus crawl node key. Omit with url to focus the crawl root."),
|
|
9454
|
+
url: z4.string().url().optional().describe("Focus canonical URL. Omit with nodeKey to focus the crawl root."),
|
|
9455
|
+
hops: z4.number().int().min(0).max(3).optional().describe("Neighborhood depth from the focus node. Keep this small."),
|
|
9456
|
+
maxNodes: z4.number().int().positive().max(SITE_HEALTH_MCP_MAX_NODES).default(SITE_HEALTH_MCP_MAX_NODES).describe("Hard MCP cap: at most 25 nodes. Narrow or refocus instead of loading the site."),
|
|
9457
|
+
maxEdges: z4.number().int().positive().max(SITE_HEALTH_MCP_MAX_EDGES).default(SITE_HEALTH_MCP_MAX_EDGES).describe("Hard MCP cap: at most 50 edges. Narrow or refocus instead of loading the site.")
|
|
9306
9458
|
}).refine((value) => !(value.nodeKey && value.url), {
|
|
9307
9459
|
message: "Provide nodeKey or url, not both.",
|
|
9308
9460
|
path: ["nodeKey"]
|
|
9309
9461
|
});
|
|
9310
|
-
var siteHealthPathInputSchema =
|
|
9462
|
+
var siteHealthPathInputSchema = z4.object({
|
|
9311
9463
|
project: projectNameSchema,
|
|
9312
9464
|
runId: runIdSchema.optional().describe("Historical crawl-bearing site-audit run ID. Omit for the latest complete crawl."),
|
|
9313
|
-
fromNodeKey:
|
|
9314
|
-
fromUrl:
|
|
9315
|
-
toNodeKey:
|
|
9316
|
-
toUrl:
|
|
9317
|
-
maxDepth:
|
|
9465
|
+
fromNodeKey: z4.string().min(1).optional().describe("Origin node key. Omit with fromUrl to start at the crawl root."),
|
|
9466
|
+
fromUrl: z4.string().url().optional().describe("Origin URL. Omit with fromNodeKey to start at the crawl root."),
|
|
9467
|
+
toNodeKey: z4.string().min(1).optional().describe("Required destination node key."),
|
|
9468
|
+
toUrl: z4.string().url().optional().describe("Required destination URL."),
|
|
9469
|
+
maxDepth: z4.number().int().positive().max(24).optional().describe("Maximum directed-link depth to search.")
|
|
9318
9470
|
}).refine((value) => !(value.fromNodeKey && value.fromUrl), {
|
|
9319
9471
|
message: "Provide fromNodeKey or fromUrl, not both.",
|
|
9320
9472
|
path: ["fromNodeKey"]
|
|
@@ -9325,71 +9477,71 @@ var siteHealthPathInputSchema = z3.object({
|
|
|
9325
9477
|
message: "Provide toNodeKey or toUrl, not both.",
|
|
9326
9478
|
path: ["toNodeKey"]
|
|
9327
9479
|
});
|
|
9328
|
-
var siteHealthChangesInputSchema =
|
|
9480
|
+
var siteHealthChangesInputSchema = z4.object({
|
|
9329
9481
|
project: projectNameSchema,
|
|
9330
9482
|
fromRunId: runIdSchema.optional().describe("Earlier complete crawl run ID. Omit to compare the previous complete crawl."),
|
|
9331
9483
|
toRunId: runIdSchema.optional().describe("Later complete crawl run ID. Omit to compare the latest complete crawl."),
|
|
9332
|
-
scope:
|
|
9333
|
-
change:
|
|
9334
|
-
cursor:
|
|
9335
|
-
limit:
|
|
9484
|
+
scope: z4.enum(["all", "pages", "links"]).optional().describe("Limit the diff to page or link changes. Omit or use all for both."),
|
|
9485
|
+
change: z4.enum(["all", "added", "removed", "changed"]).optional().describe("Limit the diff to one change kind. Omit or use all for every kind."),
|
|
9486
|
+
cursor: z4.string().min(1).optional().describe("Opaque cursor from the previous Site Health changes result."),
|
|
9487
|
+
limit: z4.number().int().positive().max(25).default(25).describe("Hard MCP cap: 25 records, because each change carries before and after DTOs.")
|
|
9336
9488
|
});
|
|
9337
|
-
var technicalAeoCrawlPagesInputSchema =
|
|
9489
|
+
var technicalAeoCrawlPagesInputSchema = z4.object({
|
|
9338
9490
|
project: projectNameSchema,
|
|
9339
9491
|
runId: runIdSchema.optional(),
|
|
9340
|
-
inventoryEligible:
|
|
9341
|
-
fetchState:
|
|
9342
|
-
indexabilityState:
|
|
9343
|
-
auditState:
|
|
9344
|
-
sort:
|
|
9345
|
-
cursor:
|
|
9346
|
-
limit:
|
|
9492
|
+
inventoryEligible: z4.boolean().optional().describe("Filter Canonry technical-inventory eligibility. This is not actual Google index coverage."),
|
|
9493
|
+
fetchState: z4.string().min(1).optional().describe("Filter crawler fetch state, for example html, redirect, non-html, or fetch-error."),
|
|
9494
|
+
indexabilityState: z4.string().min(1).optional().describe("Filter crawler-derived indexability state. This is not Google index coverage."),
|
|
9495
|
+
auditState: z4.string().min(1).optional().describe("Filter audit state."),
|
|
9496
|
+
sort: z4.enum(["url", "path", "score-asc", "score-desc"]).optional(),
|
|
9497
|
+
cursor: z4.string().min(1).optional().describe("Opaque cursor from the previous crawl-pages result."),
|
|
9498
|
+
limit: z4.number().int().positive().max(200).optional()
|
|
9347
9499
|
});
|
|
9348
|
-
var technicalAeoStructureInputSchema =
|
|
9500
|
+
var technicalAeoStructureInputSchema = z4.object({
|
|
9349
9501
|
project: projectNameSchema,
|
|
9350
9502
|
runId: runIdSchema.optional(),
|
|
9351
|
-
parentPath:
|
|
9352
|
-
cursor:
|
|
9353
|
-
limit:
|
|
9503
|
+
parentPath: z4.string().min(1).optional().describe("Path whose immediate children to list. Defaults to /. This never returns a whole site tree."),
|
|
9504
|
+
cursor: z4.string().min(1).optional().describe("Opaque cursor from the previous structure result."),
|
|
9505
|
+
limit: z4.number().int().positive().max(100).optional()
|
|
9354
9506
|
});
|
|
9355
|
-
var linkKindSchema =
|
|
9507
|
+
var linkKindSchema = z4.enum(["all", "content", "template"]).optional().describe(
|
|
9356
9508
|
"Restrict to content links (excludes nav, header, and footer links) or to template links only. Defaults to all. Check templateDetection before reading an empty content list as a real zero, and before comparing a count with an older scan: it says whether the split came from where each link sits in the page or from how many pages repeat it."
|
|
9357
9509
|
);
|
|
9358
|
-
var technicalAeoInternalLinksInputSchema =
|
|
9510
|
+
var technicalAeoInternalLinksInputSchema = z4.object({
|
|
9359
9511
|
project: projectNameSchema,
|
|
9360
9512
|
runId: runIdSchema.optional(),
|
|
9361
|
-
sourceUrl:
|
|
9362
|
-
targetUrl:
|
|
9363
|
-
followable:
|
|
9513
|
+
sourceUrl: z4.string().url().optional(),
|
|
9514
|
+
targetUrl: z4.string().url().optional(),
|
|
9515
|
+
followable: z4.boolean().optional(),
|
|
9364
9516
|
linkKind: linkKindSchema,
|
|
9365
|
-
cursor:
|
|
9366
|
-
limit:
|
|
9517
|
+
cursor: z4.string().min(1).optional().describe("Opaque cursor from the previous internal-links result."),
|
|
9518
|
+
limit: z4.number().int().positive().max(200).optional()
|
|
9367
9519
|
});
|
|
9368
|
-
var technicalAeoLinkNeighborsInputSchema =
|
|
9520
|
+
var technicalAeoLinkNeighborsInputSchema = z4.object({
|
|
9369
9521
|
project: projectNameSchema,
|
|
9370
9522
|
runId: runIdSchema.optional(),
|
|
9371
|
-
nodeKey:
|
|
9372
|
-
url:
|
|
9523
|
+
nodeKey: z4.string().min(1).optional(),
|
|
9524
|
+
url: z4.string().url().optional(),
|
|
9373
9525
|
linkKind: linkKindSchema,
|
|
9374
|
-
limit:
|
|
9526
|
+
limit: z4.number().int().positive().max(100).optional()
|
|
9375
9527
|
}).refine((value) => Boolean(value.nodeKey || value.url), {
|
|
9376
9528
|
message: "Provide nodeKey or url.",
|
|
9377
9529
|
path: ["nodeKey"]
|
|
9378
9530
|
});
|
|
9379
|
-
var technicalAeoDeadLinksInputSchema =
|
|
9531
|
+
var technicalAeoDeadLinksInputSchema = z4.object({
|
|
9380
9532
|
project: projectNameSchema,
|
|
9381
9533
|
runId: runIdSchema.optional(),
|
|
9382
|
-
cursor:
|
|
9383
|
-
limit:
|
|
9534
|
+
cursor: z4.string().min(1).optional().describe("Opaque cursor from the previous dead-links result."),
|
|
9535
|
+
limit: z4.number().int().positive().max(200).optional()
|
|
9384
9536
|
});
|
|
9385
|
-
var technicalAeoRunInputSchema =
|
|
9537
|
+
var technicalAeoRunInputSchema = z4.object({
|
|
9386
9538
|
project: projectNameSchema,
|
|
9387
|
-
sitemapUrl:
|
|
9388
|
-
limit:
|
|
9389
|
-
maxPages:
|
|
9390
|
-
maxEdges:
|
|
9391
|
-
maxDepth:
|
|
9392
|
-
checkDeadLinks:
|
|
9539
|
+
sitemapUrl: z4.string().url().optional().describe("Override the sitemap URL. Defaults to https://<canonicalDomain>/sitemap.xml."),
|
|
9540
|
+
limit: z4.number().int().positive().max(2e3).optional().describe("Deprecated compatibility alias for maxPages."),
|
|
9541
|
+
maxPages: z4.number().int().positive().max(5e4).optional().describe("Maximum pages crawled and audited. Defaults to 1,000; hard maximum 50,000."),
|
|
9542
|
+
maxEdges: z4.number().int().positive().max(1e6).optional().describe("Maximum link observations retained for this crawl. When omitted the crawl engine derives the budget from the page count; hard maximum 1,000,000."),
|
|
9543
|
+
maxDepth: z4.number().int().min(0).max(100).optional().describe("Maximum internal-link depth from the root page."),
|
|
9544
|
+
checkDeadLinks: z4.boolean().optional().describe("Opt in to internal dead-link checks. Omitted and false both disable checks.")
|
|
9393
9545
|
});
|
|
9394
9546
|
var AGENT_WEBHOOK_EVENTS = [
|
|
9395
9547
|
notificationEventSchema.enum["run.completed"],
|
|
@@ -9437,10 +9589,10 @@ var canonryMcpTools = [
|
|
|
9437
9589
|
description: 'One-call summary for "how is project X doing?". Returns independent mention and citation coverage, separate query-level movement for each signal, query-basket comparability with added/removed counts, latest run and health, insights, provider/model breakdowns, competitors, attention items, and recent history. Movement excludes queries not shared by both sweeps. Filterable by location and time window. Prefer this over fanning out to separate tools.',
|
|
9438
9590
|
access: "read",
|
|
9439
9591
|
tier: "core",
|
|
9440
|
-
inputSchema:
|
|
9592
|
+
inputSchema: z4.object({
|
|
9441
9593
|
project: projectNameSchema,
|
|
9442
|
-
location:
|
|
9443
|
-
since:
|
|
9594
|
+
location: z4.string().optional().describe('Filter to runs from this location label (e.g. "Boston, MA, US"). Omit for all locations.'),
|
|
9595
|
+
since: z4.string().optional().describe("ISO 8601 datetime \u2014 only include runs at or after this time. Omit for full history.")
|
|
9444
9596
|
}),
|
|
9445
9597
|
annotations: readAnnotations(),
|
|
9446
9598
|
openApiOperations: ["GET /api/v1/projects/{name}/overview"],
|
|
@@ -9455,7 +9607,7 @@ var canonryMcpTools = [
|
|
|
9455
9607
|
description: "Returns the full canonical AEO report bundle for a project \u2014 executive summary, client summary, agency diagnostics, action plan, per-query \xD7 per-provider citation matrix, competitor landscape, AI citation sources, GSC/GA4 performance, social and AI referrals, indexing health, citations trend, prioritized insights, and recommended next steps. Same payload `canonry report <project>` consumes to render audience-specific HTML. Pass `period` (7/14/30/90 days, default 30) to scope the GSC/GA4/server-activity sections and the period-over-period comparisons.",
|
|
9456
9608
|
access: "read",
|
|
9457
9609
|
tier: "monitoring",
|
|
9458
|
-
inputSchema:
|
|
9610
|
+
inputSchema: z4.object({
|
|
9459
9611
|
project: projectNameSchema,
|
|
9460
9612
|
period: reportPeriodSchema.optional()
|
|
9461
9613
|
}),
|
|
@@ -9469,7 +9621,7 @@ var canonryMcpTools = [
|
|
|
9469
9621
|
description: "One-call investigation of whether organic work is gaining visibility, traffic, or AI attention. Returns source-specific 30-day GSC and GA4 cohorts, URL-agnostic page evidence, available GA4 lead-event evidence (not lead attribution), server-observed AI crawling/user-fetch/referral evidence, the latest answer-visibility sweep, source coverage, findings, and limitations. It preserves native units. Prefer this over fanning out across GSC, GA, traffic, and visibility tools.",
|
|
9470
9622
|
access: "read",
|
|
9471
9623
|
tier: "monitoring",
|
|
9472
|
-
inputSchema:
|
|
9624
|
+
inputSchema: z4.object({
|
|
9473
9625
|
project: projectNameSchema,
|
|
9474
9626
|
period: organicEvidencePeriodSchema.optional().describe("Evidence window: 60 or 90 days (default 90).")
|
|
9475
9627
|
}),
|
|
@@ -9483,7 +9635,7 @@ var canonryMcpTools = [
|
|
|
9483
9635
|
description: "Citation and mention rates over time for a project, bucketed adaptively (daily \u2192 monthly by span) and probe-excluded. Returns overall + per-provider window aggregates AND a per-bucket `byProvider` breakdown so you can read how each engine's cited/mentioned rate moved run-over-run \u2014 the same data the dashboard's \"Citations & mentions over time\" chart plots. Includes trend direction (improving/declining/stable) for both signals and query-set-change annotations. Filter the range with `window` (7d/30d/90d/all).",
|
|
9484
9636
|
access: "read",
|
|
9485
9637
|
tier: "monitoring",
|
|
9486
|
-
inputSchema:
|
|
9638
|
+
inputSchema: z4.object({
|
|
9487
9639
|
project: projectNameSchema,
|
|
9488
9640
|
window: analyticsWindowSchema.optional().describe("Time range: 7d, 30d, 90d, or all (default all).")
|
|
9489
9641
|
}),
|
|
@@ -9497,10 +9649,10 @@ var canonryMcpTools = [
|
|
|
9497
9649
|
description: "Where AI engines get the facts they cite for a project. Returns the FULL ranked list of cited domains (not truncated) \u2014 each tagged with a category and an actionable surface class (own / direct-competitor / ota-aggregator / editorial-media / other) \u2014 plus a surface-class roll-up and a per-provider breakdown (each provider's cited-domain mix + total cited slots). The surface class is deterministic (own/competitor from project data, the rest from the source allow-list) and enriched by discovery's stored per-domain classifications when present \u2014 no new LLM calls. Probe-excluded, window-filterable (7d/30d/90d/all). Use `limit` to cap each ranked list to the top N domains (an explicit long-tail rollup preserves the totals). All counts/shares/classification are computed server-side.",
|
|
9498
9650
|
access: "read",
|
|
9499
9651
|
tier: "monitoring",
|
|
9500
|
-
inputSchema:
|
|
9652
|
+
inputSchema: z4.object({
|
|
9501
9653
|
project: projectNameSchema,
|
|
9502
9654
|
window: analyticsWindowSchema.optional().describe("Time range: 7d, 30d, 90d, or all (default all)."),
|
|
9503
|
-
limit:
|
|
9655
|
+
limit: z4.number().int().positive().optional().describe("Cap each ranked list to the top N domains. Omit for the full list.")
|
|
9504
9656
|
}),
|
|
9505
9657
|
annotations: readAnnotations(),
|
|
9506
9658
|
openApiOperations: ["GET /api/v1/projects/{name}/analytics/sources"],
|
|
@@ -9526,10 +9678,10 @@ var canonryMcpTools = [
|
|
|
9526
9678
|
description: "Search query snapshots and intelligence insights for the given text. Looks at snapshot answer text, cited domains, raw provider responses, and insight title/query/recommendation/cause. Returns ranked hits with snippets \u2014 use it instead of paginating snapshots when you need to find a competitor mention or term.",
|
|
9527
9679
|
access: "read",
|
|
9528
9680
|
tier: "core",
|
|
9529
|
-
inputSchema:
|
|
9681
|
+
inputSchema: z4.object({
|
|
9530
9682
|
project: projectNameSchema,
|
|
9531
|
-
q:
|
|
9532
|
-
limit:
|
|
9683
|
+
q: z4.string().min(2).describe("Search term, at least 2 characters."),
|
|
9684
|
+
limit: z4.number().int().positive().max(50).optional().describe("Max combined hits (1-50, default 25).")
|
|
9533
9685
|
}),
|
|
9534
9686
|
annotations: readAnnotations(),
|
|
9535
9687
|
openApiOperations: ["GET /api/v1/projects/{name}/search"],
|
|
@@ -9717,15 +9869,15 @@ var canonryMcpTools = [
|
|
|
9717
9869
|
description: 'Per-query mention (answer-text) and citation (source-list) counts WITH a sample size, pooled across many answer-visibility runs (probe-excluded) \u2014 the data to compute a confidence-aware (Wilson) proportion or detect drift without fetching every run. Tri-state aware: `checked` (the n for the mention proportion) counts only snapshots where answerMentioned was recorded; `null` ("not checked") is excluded, never counted as not-mentioned. Returns per-query `total`/`checked`/`mentioned`/`cited` + derived `mentionRate` (mentioned/checked) and `citedRate` (cited/total), `firstObserved`/`lastObserved`, and pooled `totals`. Window with `since`/`until` (ISO), `lastRuns`, or `month=YYYY-MM` (mutually exclusive); with none set, EVERY completed/partial run is pooled (`window.runCount` says how many) \u2014 pass `lastRuns` for a recent sample. Set `groupBy=provider` for a per-provider breakdown whose counts sum to the pooled counts (`groupBy` is omitted from the response otherwise). Set `shareOfVoice=true` for project-vs-tracked-competitor brand-mention share across the same attributed snapshot set \u2014 scoped to NON-BRAND queries by default, because a branded query names the project (it is mentioned on nearly all of them and a competitor cannot be), so a pooled figure reports brand recall as category placement. Pass `queryClass="branded"` for the recall figure; the response echoes which class it served.',
|
|
9718
9870
|
access: "read",
|
|
9719
9871
|
tier: "monitoring",
|
|
9720
|
-
inputSchema:
|
|
9872
|
+
inputSchema: z4.object({
|
|
9721
9873
|
project: projectNameSchema,
|
|
9722
|
-
since:
|
|
9723
|
-
until:
|
|
9724
|
-
lastRuns:
|
|
9725
|
-
month:
|
|
9726
|
-
groupBy:
|
|
9727
|
-
shareOfVoice:
|
|
9728
|
-
queryClass:
|
|
9874
|
+
since: z4.string().optional().describe("Inclusive lower bound on run createdAt (ISO 8601). A date-only value (YYYY-MM-DD) is the start of that UTC day. Mutually exclusive with lastRuns/month."),
|
|
9875
|
+
until: z4.string().optional().describe("Inclusive upper bound on run createdAt (ISO 8601). A date-only value (YYYY-MM-DD) covers the whole UTC day (through 23:59:59.999). Mutually exclusive with lastRuns/month."),
|
|
9876
|
+
lastRuns: z4.number().int().positive().optional().describe("Aggregate only the most recent N answer-visibility runs. Mutually exclusive with since/until/month."),
|
|
9877
|
+
month: z4.string().optional().describe("Aggregate one calendar month (YYYY-MM), expanded to that month's inclusive UTC bounds. Mutually exclusive with since/until/lastRuns."),
|
|
9878
|
+
groupBy: z4.enum(["provider"]).optional().describe('Set to "provider" for a per-provider breakdown.'),
|
|
9879
|
+
shareOfVoice: z4.boolean().optional().describe("Include project-vs-tracked-competitor brand-mention share across the same window (non-brand queries unless queryClass says otherwise)."),
|
|
9880
|
+
queryClass: z4.enum(["branded", "non-brand"]).optional().describe('Query class for shareOfVoice. Defaults to non-brand. There is no "all": branded and non-brand never share a denominator.')
|
|
9729
9881
|
}),
|
|
9730
9882
|
annotations: readAnnotations(),
|
|
9731
9883
|
openApiOperations: ["GET /api/v1/projects/{name}/visibility-stats"],
|
|
@@ -9745,10 +9897,10 @@ var canonryMcpTools = [
|
|
|
9745
9897
|
description: "Statistically honest month-over-month AEO comparison in ONE call \u2014 use this instead of hand-computing deltas from two visibility-stats calls. Share of voice (`mention-share-of-voice`, `driftRobust: true`) is less exposed to broad model-wide naming propensity than absolute rates, but it never overrides model continuity. The response restricts to common query/provider pairs, then includes only providers with exactly one known, identical configured model id in both months. `continuity` surfaces every provider, its model evidence, and whether it was excluded for a changed, mixed mid-month, or unknown model. When no provider remains, metrics return `model-discontinuous` or `model-unknown`, never a directional call. A silent upstream version bump under an unchanged configured id remains undetectable. `from` must be a month strictly before `to`.",
|
|
9746
9898
|
access: "read",
|
|
9747
9899
|
tier: "monitoring",
|
|
9748
|
-
inputSchema:
|
|
9900
|
+
inputSchema: z4.object({
|
|
9749
9901
|
project: projectNameSchema,
|
|
9750
|
-
from:
|
|
9751
|
-
to:
|
|
9902
|
+
from: z4.string().describe('Earlier calendar month (YYYY-MM), the baseline. Must be strictly before "to".'),
|
|
9903
|
+
to: z4.string().describe('Later calendar month (YYYY-MM), compared against "from".')
|
|
9752
9904
|
}),
|
|
9753
9905
|
annotations: readAnnotations(),
|
|
9754
9906
|
openApiOperations: ["GET /api/v1/projects/{name}/visibility-compare"],
|
|
@@ -12304,8 +12456,8 @@ function createCanonryMcpServerWithCatalog(options = {}) {
|
|
|
12304
12456
|
registerMetaTools(server, catalog, { includeToolkitLoader: options.tiers === void 0 });
|
|
12305
12457
|
return { server, catalog };
|
|
12306
12458
|
}
|
|
12307
|
-
var loadToolkitInputSchema =
|
|
12308
|
-
name:
|
|
12459
|
+
var loadToolkitInputSchema = z5.object({
|
|
12460
|
+
name: z5.enum(CANONRY_MCP_TOOLKIT_NAMES).describe("Toolkit name. List options with canonry_help.")
|
|
12309
12461
|
});
|
|
12310
12462
|
function registerMetaTools(server, catalog, opts) {
|
|
12311
12463
|
server.registerTool(
|
|
@@ -12719,13 +12871,7 @@ function parseSkillsClient(value) {
|
|
|
12719
12871
|
}
|
|
12720
12872
|
|
|
12721
12873
|
export {
|
|
12722
|
-
|
|
12723
|
-
getConfigPath,
|
|
12724
|
-
loadConfig,
|
|
12725
|
-
loadConfigRaw,
|
|
12726
|
-
saveConfig,
|
|
12727
|
-
saveConfigPatch,
|
|
12728
|
-
configExists,
|
|
12874
|
+
getBootstrapEnv,
|
|
12729
12875
|
isMachineFormat,
|
|
12730
12876
|
EXIT_USER_ERROR,
|
|
12731
12877
|
EXIT_SYSTEM_ERROR,
|
|
@@ -12734,6 +12880,13 @@ export {
|
|
|
12734
12880
|
isEndpointMissing,
|
|
12735
12881
|
systemError,
|
|
12736
12882
|
printCliError,
|
|
12883
|
+
getConfigDir,
|
|
12884
|
+
getConfigPath,
|
|
12885
|
+
loadConfig,
|
|
12886
|
+
loadConfigRaw,
|
|
12887
|
+
saveConfig,
|
|
12888
|
+
saveConfigPatch,
|
|
12889
|
+
configExists,
|
|
12737
12890
|
PACKAGE_VERSION,
|
|
12738
12891
|
BUNDLED_SKILL_NAMES,
|
|
12739
12892
|
getBundledSkillSnapshots,
|