@canonry/canonry 4.160.0 → 4.161.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-AtgoG2AH.js → AuditHistoryPanel-C_1twF00.js} +1 -1
- package/assets/assets/{BacklinksPage-DrOSF7Mu.js → BacklinksPage-CfAuMCaN.js} +1 -1
- package/assets/assets/{HistoryPage-CGQXleJc.js → HistoryPage-DrRxOL3j.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-C7D2OgIQ.js → MeasurementPropertyPage-BFtxx5Jw.js} +1 -1
- package/assets/assets/{ProjectPage-Lp1VjNvL.js → ProjectPage-Djvhx4HD.js} +9 -9
- package/assets/assets/{RunRow-BdzKKODo.js → RunRow-DVZXibR2.js} +1 -1
- package/assets/assets/{RunsPage-BU96L07S.js → RunsPage-CAUMy7By.js} +1 -1
- package/assets/assets/{SettingsPage-LEca0kDH.js → SettingsPage-CcSOmQAl.js} +1 -1
- package/assets/assets/{SiteHealthSection-CKM4DUfE.js → SiteHealthSection-DYjEWd1I.js} +3 -3
- package/assets/assets/{TrafficPage-tU9wl1F_.js → TrafficPage-BWM33jnJ.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-DZTpnU9f.js → TrafficSourceDetailPage-DvEZ_JGY.js} +1 -1
- package/assets/assets/{extract-error-message-BAyN-ftk.js → extract-error-message-CnKOJkYB.js} +1 -1
- package/assets/assets/{index-Wqv7kvs-.js → index-CQGAqmDx.js} +13 -13
- package/assets/assets/{react-sigma_core.esm.min-DlZOAc_w.js → react-sigma_core.esm.min-CHCAIMBW.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-7M7T5QXS.js → chunk-EXDO7EPL.js} +27 -1
- package/dist/{chunk-HQAVEK42.js → chunk-HCGTKQCG.js} +1 -1
- package/dist/{chunk-X7CYY5Q7.js → chunk-J27J2DF6.js} +172 -37
- package/dist/{chunk-XGESWHFP.js → chunk-W6OWEPZG.js} +35 -18
- package/dist/cli.js +17 -11
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-6XQMM466.js → intelligence-service-HKDIVTZB.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +8 -8
|
@@ -10,12 +10,13 @@ import {
|
|
|
10
10
|
loadConfig,
|
|
11
11
|
loadConfigRaw,
|
|
12
12
|
saveConfigPatch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HCGTKQCG.js";
|
|
14
14
|
import {
|
|
15
15
|
CC_CACHE_DIR,
|
|
16
16
|
DUCKDB_SPEC,
|
|
17
17
|
GBP_DAILY_METRICS,
|
|
18
18
|
GSC_DATA_LAG_DAYS,
|
|
19
|
+
GSC_REPORTING_TIME_ZONE,
|
|
19
20
|
IntelligenceService,
|
|
20
21
|
PLUGIN_DIR,
|
|
21
22
|
adsAdGroups,
|
|
@@ -79,6 +80,7 @@ import {
|
|
|
79
80
|
groupRunsByCreatedAt,
|
|
80
81
|
gscCoverageSnapshots,
|
|
81
82
|
gscDailyTotals,
|
|
83
|
+
gscDataWatermarks,
|
|
82
84
|
gscQueryDailyTotals,
|
|
83
85
|
gscSearchData,
|
|
84
86
|
gscUrlInspections,
|
|
@@ -137,7 +139,7 @@ import {
|
|
|
137
139
|
siteCrawlSnapshots,
|
|
138
140
|
toAlertView,
|
|
139
141
|
usageCounters
|
|
140
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-J27J2DF6.js";
|
|
141
143
|
import {
|
|
142
144
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
143
145
|
AGENT_PROVIDER_IDS,
|
|
@@ -236,6 +238,7 @@ import {
|
|
|
236
238
|
resolveSnapshotRequestQueries,
|
|
237
239
|
serializeForInlineScript,
|
|
238
240
|
serializeRunError,
|
|
241
|
+
shiftIsoCalendarDate,
|
|
239
242
|
siteAuditRequestIdentity,
|
|
240
243
|
skillsClientSchema,
|
|
241
244
|
splitList,
|
|
@@ -247,7 +250,7 @@ import {
|
|
|
247
250
|
validationError,
|
|
248
251
|
winnabilityClassLabel,
|
|
249
252
|
withRetry
|
|
250
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-EXDO7EPL.js";
|
|
251
254
|
|
|
252
255
|
// src/telemetry.ts
|
|
253
256
|
import crypto from "crypto";
|
|
@@ -4428,14 +4431,6 @@ function writeCoverageSnapshot(db, projectId, runId, opts = {}) {
|
|
|
4428
4431
|
|
|
4429
4432
|
// src/gsc-sync.ts
|
|
4430
4433
|
var log2 = createLogger("GscSync");
|
|
4431
|
-
function formatDate(d) {
|
|
4432
|
-
return d.toISOString().split("T")[0];
|
|
4433
|
-
}
|
|
4434
|
-
function daysAgo(n) {
|
|
4435
|
-
const d = /* @__PURE__ */ new Date();
|
|
4436
|
-
d.setDate(d.getDate() - n);
|
|
4437
|
-
return d;
|
|
4438
|
-
}
|
|
4439
4434
|
async function executeGscSync(db, runId, projectId, opts) {
|
|
4440
4435
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
4441
4436
|
db.update(runs).set({ status: "running", startedAt: now }).where(eq4(runs.id, runId)).run();
|
|
@@ -4469,9 +4464,9 @@ async function executeGscSync(db, runId, projectId, opts) {
|
|
|
4469
4464
|
saveConfigPatch(opts.config);
|
|
4470
4465
|
}
|
|
4471
4466
|
const lagOffset = GSC_DATA_LAG_DAYS;
|
|
4472
|
-
const endDate =
|
|
4467
|
+
const endDate = formatIsoDateInTimeZone((/* @__PURE__ */ new Date()).toISOString(), GSC_REPORTING_TIME_ZONE);
|
|
4473
4468
|
const days = opts.full ? 480 : opts.days ?? 30;
|
|
4474
|
-
const startDate =
|
|
4469
|
+
const startDate = shiftIsoCalendarDate(endDate, -(days + lagOffset));
|
|
4475
4470
|
log2.info("fetch.start", { runId, projectId, propertyId: conn.propertyId, startDate, endDate });
|
|
4476
4471
|
const rows = await fetchSearchAnalytics(accessToken, conn.propertyId, {
|
|
4477
4472
|
startDate,
|
|
@@ -4533,7 +4528,29 @@ async function executeGscSync(db, runId, projectId, opts) {
|
|
|
4533
4528
|
createdAt: dailyTotalsNow
|
|
4534
4529
|
}).run();
|
|
4535
4530
|
}
|
|
4536
|
-
|
|
4531
|
+
const observedThrough = totalRows.map((row) => row.keys[0] ?? "").filter((date) => date !== "").reduce((max, date) => max === null || date > max ? date : max, null);
|
|
4532
|
+
if (observedThrough !== null || endDate) {
|
|
4533
|
+
const existing = db.select().from(gscDataWatermarks).where(eq4(gscDataWatermarks.projectId, projectId)).get();
|
|
4534
|
+
const nextThrough = [existing?.dataThroughDate ?? null, observedThrough].filter((d) => d !== null).reduce((max, d) => max === null || d > max ? d : max, null);
|
|
4535
|
+
if (nextThrough !== null) {
|
|
4536
|
+
db.insert(gscDataWatermarks).values({
|
|
4537
|
+
projectId,
|
|
4538
|
+
dataThroughDate: nextThrough,
|
|
4539
|
+
syncedThroughDate: endDate,
|
|
4540
|
+
updatedAt: dailyTotalsNow
|
|
4541
|
+
}).onConflictDoUpdate({
|
|
4542
|
+
target: gscDataWatermarks.projectId,
|
|
4543
|
+
set: { dataThroughDate: nextThrough, syncedThroughDate: endDate, updatedAt: dailyTotalsNow }
|
|
4544
|
+
}).run();
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
log2.info("daily-totals.complete", {
|
|
4548
|
+
runId,
|
|
4549
|
+
projectId,
|
|
4550
|
+
rowCount: totalRows.length,
|
|
4551
|
+
observedThrough,
|
|
4552
|
+
syncedThrough: endDate
|
|
4553
|
+
});
|
|
4537
4554
|
const queryTotalRows = await fetchSearchAnalytics(accessToken, propertyId, {
|
|
4538
4555
|
startDate,
|
|
4539
4556
|
endDate,
|
|
@@ -4585,7 +4602,7 @@ var DEFAULT_DAYS_OF_METRICS = 30;
|
|
|
4585
4602
|
var DEFAULT_MONTHS_OF_KEYWORDS = 12;
|
|
4586
4603
|
var KEYWORD_TREND_MONTHS = 3;
|
|
4587
4604
|
var KEYWORD_HISTORY_RETENTION_MONTHS = 18;
|
|
4588
|
-
function
|
|
4605
|
+
function daysAgo(n) {
|
|
4589
4606
|
const d = /* @__PURE__ */ new Date();
|
|
4590
4607
|
d.setUTCDate(d.getUTCDate() - n);
|
|
4591
4608
|
return d;
|
|
@@ -4633,8 +4650,8 @@ async function executeGbpSync(db, runId, projectId, opts) {
|
|
|
4633
4650
|
locationRows = await refreshSelectedLocationProfiles(db, projectId, accessToken, locationRows);
|
|
4634
4651
|
const daysOfMetrics = opts.daysOfMetrics ?? DEFAULT_DAYS_OF_METRICS;
|
|
4635
4652
|
const monthsOfKeywords = opts.monthsOfKeywords ?? DEFAULT_MONTHS_OF_KEYWORDS;
|
|
4636
|
-
const metricsStart =
|
|
4637
|
-
const metricsEnd =
|
|
4653
|
+
const metricsStart = daysAgo(daysOfMetrics);
|
|
4654
|
+
const metricsEnd = daysAgo(1);
|
|
4638
4655
|
const keywordsStart = monthMinus(monthsOfKeywords);
|
|
4639
4656
|
const keywordsEnd = monthMinus(0);
|
|
4640
4657
|
const trendMonths = Array.from({ length: KEYWORD_TREND_MONTHS }, (_, i) => monthMinus(i + 1));
|
|
@@ -9017,7 +9034,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
9017
9034
|
return result;
|
|
9018
9035
|
}
|
|
9019
9036
|
async function backfillInsightsCommand(project, opts) {
|
|
9020
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
9037
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-HKDIVTZB.js");
|
|
9021
9038
|
const config = loadConfig();
|
|
9022
9039
|
const db = createClient(config.database);
|
|
9023
9040
|
migrate(db);
|
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
showFirstRunNotice,
|
|
32
32
|
trackCliCommandFinished,
|
|
33
33
|
trackEvent
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-W6OWEPZG.js";
|
|
35
35
|
import {
|
|
36
36
|
CliError,
|
|
37
37
|
EXIT_SYSTEM_ERROR,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
saveConfigPatch,
|
|
52
52
|
systemError,
|
|
53
53
|
usageError
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-HCGTKQCG.js";
|
|
55
55
|
import {
|
|
56
56
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
57
57
|
CLOUDFLARE_WORKER_GENERATED_MARKER,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
projects,
|
|
66
66
|
queries,
|
|
67
67
|
renderReportHtml
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-J27J2DF6.js";
|
|
69
69
|
import {
|
|
70
70
|
AdsDeliverySnapshotStatuses,
|
|
71
71
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
providerQuotaPolicySchema,
|
|
130
130
|
resolveProviderInput,
|
|
131
131
|
winnabilityClassSchema
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-EXDO7EPL.js";
|
|
133
133
|
|
|
134
134
|
// src/cli.ts
|
|
135
135
|
import { pathToFileURL } from "url";
|
|
@@ -7092,7 +7092,7 @@ async function googlePerformanceDaily(project, opts) {
|
|
|
7092
7092
|
console.log(JSON.stringify(data, null, 2));
|
|
7093
7093
|
return;
|
|
7094
7094
|
} else if (opts.format === "jsonl") {
|
|
7095
|
-
emitJsonl(data.daily.map((row) => ({ project, ...row })));
|
|
7095
|
+
emitJsonl(data.daily.map((row) => ({ project, window: data.window, ...row })));
|
|
7096
7096
|
return;
|
|
7097
7097
|
}
|
|
7098
7098
|
if (data.daily.length === 0) {
|
|
@@ -7100,8 +7100,18 @@ async function googlePerformanceDaily(project, opts) {
|
|
|
7100
7100
|
return;
|
|
7101
7101
|
}
|
|
7102
7102
|
const { clicks, impressions, ctr, days } = data.totals;
|
|
7103
|
-
|
|
7103
|
+
const win = data.window;
|
|
7104
|
+
const range = win?.startDate && win.endDate ? ` ${win.startDate} to ${win.endDate}` : "";
|
|
7105
|
+
console.log(`GSC daily summary (${days} day${days === 1 ? "" : "s"}${range}):
|
|
7104
7106
|
`);
|
|
7107
|
+
const endsAtFrontier = win?.endDate !== void 0 && win.endDate === win.latestDataDate;
|
|
7108
|
+
if (endsAtFrontier && (win.daysSinceLatestData ?? 0) > 0) {
|
|
7109
|
+
console.log(` Search Console data through ${win.endDate} (${win.daysSinceLatestData} day${win.daysSinceLatestData === 1 ? "" : "s"} ago).`);
|
|
7110
|
+
console.log();
|
|
7111
|
+
} else if (win?.latestDataDate && win.endDate !== win.latestDataDate) {
|
|
7112
|
+
console.log(` Showing a fixed range. Latest Search Console data is ${win.latestDataDate}.`);
|
|
7113
|
+
console.log();
|
|
7114
|
+
}
|
|
7105
7115
|
console.log(` Clicks: ${clicks.toLocaleString()}`);
|
|
7106
7116
|
console.log(` Impressions: ${impressions.toLocaleString()}`);
|
|
7107
7117
|
console.log(` CTR: ${(ctr * 100).toFixed(2)}%`);
|
|
@@ -7166,11 +7176,7 @@ async function googlePerformance(project, opts) {
|
|
|
7166
7176
|
if (opts.startDate) params.startDate = opts.startDate;
|
|
7167
7177
|
if (opts.endDate) params.endDate = opts.endDate;
|
|
7168
7178
|
} else if (opts.days) {
|
|
7169
|
-
|
|
7170
|
-
const start = /* @__PURE__ */ new Date();
|
|
7171
|
-
start.setDate(start.getDate() - opts.days);
|
|
7172
|
-
params.startDate = start.toISOString().split("T")[0];
|
|
7173
|
-
params.endDate = end.toISOString().split("T")[0];
|
|
7179
|
+
params.days = String(opts.days);
|
|
7174
7180
|
}
|
|
7175
7181
|
if (opts.keyword) params.query = opts.keyword;
|
|
7176
7182
|
if (opts.page) params.page = opts.page;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W6OWEPZG.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-HCGTKQCG.js";
|
|
7
|
+
import "./chunk-J27J2DF6.js";
|
|
8
|
+
import "./chunk-EXDO7EPL.js";
|
|
9
9
|
export {
|
|
10
10
|
createServer,
|
|
11
11
|
loadConfig
|
package/dist/mcp.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
PACKAGE_VERSION,
|
|
4
4
|
canonryMcpTools,
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HCGTKQCG.js";
|
|
7
7
|
import {
|
|
8
8
|
isReadOnlyKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EXDO7EPL.js";
|
|
10
10
|
|
|
11
11
|
// src/mcp/cli.ts
|
|
12
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.161.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -72,26 +72,26 @@
|
|
|
72
72
|
"tsx": "^4.19.0",
|
|
73
73
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
74
74
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
75
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
76
75
|
"@ainyc/canonry-config": "0.0.0",
|
|
77
76
|
"@ainyc/canonry-db": "0.0.0",
|
|
77
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
78
78
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
79
|
-
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
80
79
|
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
81
80
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
81
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
82
|
+
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
82
83
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
83
84
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
84
85
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
85
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
86
86
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
87
|
-
"@ainyc/canonry-intelligence": "0.0.0",
|
|
88
|
-
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
89
87
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
88
|
+
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
89
|
+
"@ainyc/canonry-intelligence": "0.0.0",
|
|
90
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
90
91
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
92
|
+
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
91
93
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
92
|
-
"@ainyc/canonry-provider-local": "0.0.0",
|
|
93
94
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
94
|
-
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
95
95
|
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|