@canonry/canonry 4.141.0 → 4.142.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/agent-workspace/skills/canonry/references/canonry-cli.md +12 -5
- package/assets/assets/{AuditHistoryPanel-DlyLhzqq.js → AuditHistoryPanel-CfaF5B_e.js} +1 -1
- package/assets/assets/{BacklinksPage-DNxtwQBF.js → BacklinksPage-BIytWBpL.js} +1 -1
- package/assets/assets/{ChartPrimitives-BStLR_NC.js → ChartPrimitives-0tQT6GE7.js} +1 -1
- package/assets/assets/{HistoryPage-CIcCgoWK.js → HistoryPage-Bn6IH8WV.js} +1 -1
- package/assets/assets/{ProjectPage-BSI3Qum9.js → ProjectPage-DsQic9wX.js} +1 -1
- package/assets/assets/{RunRow-C0mFtLlc.js → RunRow-RHd8Bd52.js} +1 -1
- package/assets/assets/{RunsPage-C-yo0yoj.js → RunsPage-BsDqqQFX.js} +1 -1
- package/assets/assets/{SettingsPage-jg4MXOuo.js → SettingsPage-CX2LkFDB.js} +1 -1
- package/assets/assets/{TrafficPage-CnYHIg8t.js → TrafficPage-I19b7i9m.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-CEdyQT2P.js → TrafficSourceDetailPage-DOLEAPsc.js} +1 -1
- package/assets/assets/{arrow-left-DUv0imIl.js → arrow-left-BG9o86__.js} +1 -1
- package/assets/assets/{extract-error-message-CCOGDwlm.js → extract-error-message-D0cgM2XG.js} +1 -1
- package/assets/assets/{index-D6EP4dQs.js → index-CYGBt2f0.js} +73 -73
- package/assets/assets/{trash-2-1Yg9W-vs.js → trash-2-C_THWxO_.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-ZCFQGF3V.js → chunk-D7NJUGNQ.js} +10 -7
- package/dist/{chunk-OJOA425V.js → chunk-LS6SEZVF.js} +78 -3
- package/dist/{chunk-2LUSZFB6.js → chunk-NR6OGEV3.js} +207 -49
- package/dist/{chunk-HXXO2AF5.js → chunk-UFPP5CSN.js} +4 -4
- package/dist/cli.js +62 -50
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-4HQIUC7U.js → intelligence-service-EOUP37XN.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-CYGBt2f0.js";const t=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],h=a("circle-question-mark",t);const e=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],d=a("download",e);const o=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],p=a("external-link",o);const c=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=a("trash-2",c);export{h as C,d as D,p as E,s as T};
|
package/assets/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
14
14
|
<title>Canonry</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-CYGBt2f0.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Be8JdV5M.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-CQ77EO2y.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-DSxTZhaH.js">
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
trafficConnectWordpressRequestSchema,
|
|
44
44
|
trafficEventKindSchema,
|
|
45
45
|
trafficSeriesGranularitySchema
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-LS6SEZVF.js";
|
|
47
47
|
|
|
48
48
|
// src/config.ts
|
|
49
49
|
import fs from "fs";
|
|
@@ -6277,8 +6277,11 @@ async function submitGscSitemapsFromMcp(client2, input) {
|
|
|
6277
6277
|
}
|
|
6278
6278
|
var gaWindowInputSchema = z2.object({
|
|
6279
6279
|
project: projectNameSchema,
|
|
6280
|
-
window: analyticsWindowSchema.optional()
|
|
6280
|
+
window: analyticsWindowSchema.optional(),
|
|
6281
|
+
startDate: z2.string().optional(),
|
|
6282
|
+
endDate: z2.string().optional()
|
|
6281
6283
|
});
|
|
6284
|
+
var GA_RANGE_PARAMS = ["window", "startDate", "endDate"];
|
|
6282
6285
|
var gaTrafficInputSchema = gaWindowInputSchema.extend({
|
|
6283
6286
|
limit: z2.number().int().positive().max(500).optional()
|
|
6284
6287
|
});
|
|
@@ -7235,7 +7238,7 @@ var canonryMcpTools = [
|
|
|
7235
7238
|
inputSchema: gaTrafficInputSchema,
|
|
7236
7239
|
annotations: readAnnotations(),
|
|
7237
7240
|
openApiOperations: ["GET /api/v1/projects/{name}/ga/traffic"],
|
|
7238
|
-
handler: (client2, input) => client2.gaTraffic(input.project, compactStringParams(input, ["limit",
|
|
7241
|
+
handler: (client2, input) => client2.gaTraffic(input.project, compactStringParams(input, ["limit", ...GA_RANGE_PARAMS]))
|
|
7239
7242
|
}),
|
|
7240
7243
|
defineTool({
|
|
7241
7244
|
name: "canonry_ga_coverage",
|
|
@@ -7257,7 +7260,7 @@ var canonryMcpTools = [
|
|
|
7257
7260
|
inputSchema: gaWindowInputSchema,
|
|
7258
7261
|
annotations: readAnnotations(),
|
|
7259
7262
|
openApiOperations: ["GET /api/v1/projects/{name}/ga/ai-referral-history"],
|
|
7260
|
-
handler: (client2, input) => client2.gaAiReferralHistory(input.project, compactStringParams(input,
|
|
7263
|
+
handler: (client2, input) => client2.gaAiReferralHistory(input.project, compactStringParams(input, GA_RANGE_PARAMS))
|
|
7261
7264
|
}),
|
|
7262
7265
|
defineTool({
|
|
7263
7266
|
name: "canonry_ga_ai_referral_daily",
|
|
@@ -7268,7 +7271,7 @@ var canonryMcpTools = [
|
|
|
7268
7271
|
inputSchema: gaWindowInputSchema,
|
|
7269
7272
|
annotations: readAnnotations(),
|
|
7270
7273
|
openApiOperations: ["GET /api/v1/projects/{name}/ga/ai-referral-daily"],
|
|
7271
|
-
handler: (client2, input) => client2.gaAiReferralDaily(input.project, compactStringParams(input,
|
|
7274
|
+
handler: (client2, input) => client2.gaAiReferralDaily(input.project, compactStringParams(input, GA_RANGE_PARAMS))
|
|
7272
7275
|
}),
|
|
7273
7276
|
defineTool({
|
|
7274
7277
|
name: "canonry_ga_social_referral_history",
|
|
@@ -7279,7 +7282,7 @@ var canonryMcpTools = [
|
|
|
7279
7282
|
inputSchema: gaWindowInputSchema,
|
|
7280
7283
|
annotations: readAnnotations(),
|
|
7281
7284
|
openApiOperations: ["GET /api/v1/projects/{name}/ga/social-referral-history"],
|
|
7282
|
-
handler: (client2, input) => client2.gaSocialReferralHistory(input.project, compactStringParams(input,
|
|
7285
|
+
handler: (client2, input) => client2.gaSocialReferralHistory(input.project, compactStringParams(input, GA_RANGE_PARAMS))
|
|
7283
7286
|
}),
|
|
7284
7287
|
defineTool({
|
|
7285
7288
|
name: "canonry_ga_social_referral_trend",
|
|
@@ -7312,7 +7315,7 @@ var canonryMcpTools = [
|
|
|
7312
7315
|
inputSchema: gaWindowInputSchema,
|
|
7313
7316
|
annotations: readAnnotations(),
|
|
7314
7317
|
openApiOperations: ["GET /api/v1/projects/{name}/ga/session-history"],
|
|
7315
|
-
handler: (client2, input) => client2.gaSessionHistory(input.project, compactStringParams(input,
|
|
7318
|
+
handler: (client2, input) => client2.gaSessionHistory(input.project, compactStringParams(input, GA_RANGE_PARAMS))
|
|
7316
7319
|
}),
|
|
7317
7320
|
// ----- Google Business Profile (Phase 1: auth + discovery) -----
|
|
7318
7321
|
defineTool({
|
|
@@ -262,6 +262,24 @@ var analysisDemandPeriodSchema = analysisPeriodSchema.extend({
|
|
|
262
262
|
unreportedClicks: z2.number().int().nonnegative(),
|
|
263
263
|
unreportedImpressions: z2.number().int().nonnegative()
|
|
264
264
|
});
|
|
265
|
+
var analysisEngagementPeriodSchema = analysisPeriodSchema.extend({
|
|
266
|
+
/** Sessions over the bucket. Additive, so this is a plain sum. */
|
|
267
|
+
sessions: z2.number().int().nonnegative(),
|
|
268
|
+
/**
|
|
269
|
+
* Sessions-weighted engagement rate over the days that carry a reading.
|
|
270
|
+
* A rate is not additive; sessions are, and GA4's engagementRate is
|
|
271
|
+
* engagedSessions / sessions, so the weighted mean reconstructs the bucket
|
|
272
|
+
* rate exactly. `null` when no day in the bucket carries a reading.
|
|
273
|
+
*/
|
|
274
|
+
engagementRate: z2.number().min(0).max(1).nullable(),
|
|
275
|
+
dailyTotalUsers: z2.number().int().nonnegative().nullable(),
|
|
276
|
+
dailyNewUsers: z2.number().int().nonnegative().nullable(),
|
|
277
|
+
/** False when the bucket has no engagement reading at all. */
|
|
278
|
+
metricsAvailable: z2.boolean(),
|
|
279
|
+
daysInPeriod: z2.number().int().nonnegative(),
|
|
280
|
+
daysWithEngagementRate: z2.number().int().nonnegative(),
|
|
281
|
+
daysWithUserSplit: z2.number().int().nonnegative()
|
|
282
|
+
});
|
|
265
283
|
var gaMeasurementAnalysisDtoSchema = z2.object({
|
|
266
284
|
window: gaMeasurementAnalysisWindowSchema,
|
|
267
285
|
bucketDays: z2.literal(30),
|
|
@@ -299,6 +317,18 @@ var gaMeasurementAnalysisDtoSchema = z2.object({
|
|
|
299
317
|
periods: z2.array(analysisEventPeriodSchema)
|
|
300
318
|
}))
|
|
301
319
|
}),
|
|
320
|
+
engagement: z2.object({
|
|
321
|
+
status: z2.enum(["ready", "unavailable"]),
|
|
322
|
+
/**
|
|
323
|
+
* Earliest date the project holds ANY engagement reading for, ignoring the
|
|
324
|
+
* requested window. Everything before it is unmeasured, not zero — this is
|
|
325
|
+
* the field a client report reads to label (or truncate) the pre-migration
|
|
326
|
+
* span instead of drawing a flat zero line across it.
|
|
327
|
+
*/
|
|
328
|
+
availableFromDate: analysisDateSchema.nullable(),
|
|
329
|
+
latestDate: analysisDateSchema.nullable(),
|
|
330
|
+
periods: z2.array(analysisEngagementPeriodSchema)
|
|
331
|
+
}),
|
|
302
332
|
searchDemand: z2.object({
|
|
303
333
|
status: z2.enum(["ready", "unavailable"]),
|
|
304
334
|
periods: z2.array(analysisDemandPeriodSchema),
|
|
@@ -4129,6 +4159,10 @@ function compactDateToIso(value) {
|
|
|
4129
4159
|
if (value.length !== 8 || !/^\d{8}$/.test(value)) return value;
|
|
4130
4160
|
return `${value.slice(0, 4)}-${value.slice(4, 6)}-${value.slice(6, 8)}`;
|
|
4131
4161
|
}
|
|
4162
|
+
function parseBoundedRate(value) {
|
|
4163
|
+
if (value === null) return null;
|
|
4164
|
+
return value >= 0 && value <= 1 ? value : null;
|
|
4165
|
+
}
|
|
4132
4166
|
|
|
4133
4167
|
// ../contracts/src/model-pointers.ts
|
|
4134
4168
|
var modelPointerEventKindSchema = z10.enum(["introduced", "repointed", "retired"]);
|
|
@@ -6613,8 +6647,14 @@ var sourceBreakdownDtoSchema = z23.object({
|
|
|
6613
6647
|
limit: z23.number().int().nullable()
|
|
6614
6648
|
});
|
|
6615
6649
|
function parseWindow(value) {
|
|
6616
|
-
if (value ===
|
|
6617
|
-
|
|
6650
|
+
if (value === void 0 || value === "") return "all";
|
|
6651
|
+
const parsed = metricsWindowSchema.safeParse(value);
|
|
6652
|
+
if (!parsed.success) {
|
|
6653
|
+
throw validationError(
|
|
6654
|
+
`Invalid window "${value}". Must be one of: ${metricsWindowSchema.options.join(", ")}.`
|
|
6655
|
+
);
|
|
6656
|
+
}
|
|
6657
|
+
return parsed.data;
|
|
6618
6658
|
}
|
|
6619
6659
|
function windowCutoff(window) {
|
|
6620
6660
|
if (window === "all") return null;
|
|
@@ -6623,6 +6663,31 @@ function windowCutoff(window) {
|
|
|
6623
6663
|
d.setDate(d.getDate() - days);
|
|
6624
6664
|
return d.toISOString();
|
|
6625
6665
|
}
|
|
6666
|
+
var CALENDAR_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
6667
|
+
function parseBoundaryDate(value, field) {
|
|
6668
|
+
if (value === void 0 || value === "") return null;
|
|
6669
|
+
const trimmed = value.trim();
|
|
6670
|
+
const invalid = () => validationError(`Invalid ${field} "${value}". Expected a calendar date as YYYY-MM-DD.`);
|
|
6671
|
+
if (!CALENDAR_DATE_PATTERN.test(trimmed)) throw invalid();
|
|
6672
|
+
const parsed = /* @__PURE__ */ new Date(`${trimmed}T00:00:00Z`);
|
|
6673
|
+
if (Number.isNaN(parsed.getTime()) || parsed.toISOString().slice(0, 10) !== trimmed) throw invalid();
|
|
6674
|
+
return trimmed;
|
|
6675
|
+
}
|
|
6676
|
+
function resolveDateRange(input) {
|
|
6677
|
+
const window = parseWindow(input.window);
|
|
6678
|
+
const startDate = parseBoundaryDate(input.startDate, "startDate");
|
|
6679
|
+
const endDate = parseBoundaryDate(input.endDate, "endDate");
|
|
6680
|
+
if (startDate && endDate && startDate > endDate) {
|
|
6681
|
+
throw validationError(`Invalid date range: startDate "${startDate}" must be on or before endDate "${endDate}".`);
|
|
6682
|
+
}
|
|
6683
|
+
const cutoff = startDate ? null : windowCutoff(window)?.slice(0, 10) ?? null;
|
|
6684
|
+
return {
|
|
6685
|
+
startDate: startDate ?? cutoff,
|
|
6686
|
+
endDate,
|
|
6687
|
+
window,
|
|
6688
|
+
explicitDates: startDate !== null || endDate !== null
|
|
6689
|
+
};
|
|
6690
|
+
}
|
|
6626
6691
|
|
|
6627
6692
|
// ../contracts/src/visibility-stats.ts
|
|
6628
6693
|
import { z as z24 } from "zod";
|
|
@@ -7075,7 +7140,15 @@ var ga4TrafficSummaryDtoSchema = z27.object({
|
|
|
7075
7140
|
totalOrganicSessions: z27.number(),
|
|
7076
7141
|
/** Direct-channel sessions (sessions with no source — bookmarks, typed URLs, AI-driven traffic with stripped referrer). 0 for legacy rows from before the column was added. */
|
|
7077
7142
|
totalDirectSessions: z27.number(),
|
|
7078
|
-
|
|
7143
|
+
/**
|
|
7144
|
+
* Null when the range has no un-dimensioned aggregate behind it.
|
|
7145
|
+
*
|
|
7146
|
+
* GA counts users as a COUNT DISTINCT at the grain requested, so users cannot
|
|
7147
|
+
* be recovered by summing the landing-page dimensioned table. The rolling
|
|
7148
|
+
* windows have a precomputed deduplicated row; an explicit calendar range does
|
|
7149
|
+
* not, and reports the figure as unavailable rather than as an inflated sum.
|
|
7150
|
+
*/
|
|
7151
|
+
totalUsers: z27.number().nullable(),
|
|
7079
7152
|
topPages: z27.array(z27.object({
|
|
7080
7153
|
landingPage: z27.string(),
|
|
7081
7154
|
sessions: z27.number(),
|
|
@@ -10822,6 +10895,7 @@ export {
|
|
|
10822
10895
|
formatAverageDelta,
|
|
10823
10896
|
formatWindowCountDelta,
|
|
10824
10897
|
compactDateToIso,
|
|
10898
|
+
parseBoundedRate,
|
|
10825
10899
|
evaluateModelPointerExposure,
|
|
10826
10900
|
buildModelChangeNotice,
|
|
10827
10901
|
googleConnectionDtoSchema,
|
|
@@ -10973,6 +11047,7 @@ export {
|
|
|
10973
11047
|
sourceBreakdownDtoSchema,
|
|
10974
11048
|
parseWindow,
|
|
10975
11049
|
windowCutoff,
|
|
11050
|
+
resolveDateRange,
|
|
10976
11051
|
visibilityStatsDtoSchema,
|
|
10977
11052
|
visibilityCompareDtoSchema,
|
|
10978
11053
|
calendarMonthBounds,
|