@canonry/canonry 7.125.6 → 7.127.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/README.md +3 -3
- package/assets/agent-workspace/skills/aero/references/getting-started.md +2 -3
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +7 -2
- package/assets/agent-workspace/skills/canonry/references/getting-started.md +2 -3
- package/assets/agent-workspace/skills/canonry/references/indexing.md +4 -1
- package/assets/assets/{AccessControls-CUwUDBp8.js → AccessControls-2bimiIhw.js} +2 -2
- package/assets/assets/{AgentSetupPage-vbEPb6yX.js → AgentSetupPage-BGAU8xzj.js} +4 -4
- package/assets/assets/{AuditHistoryPanel-CutYGRGi.js → AuditHistoryPanel-Br4LNvcM.js} +1 -1
- package/assets/assets/{BacklinksPage-Cjs8Pzjw.js → BacklinksPage-BBh43gcY.js} +1 -1
- package/assets/assets/{ChartPrimitives-Bb1-9BLv.js → ChartPrimitives-ChO_4pZz.js} +1 -1
- package/assets/assets/{HistoryPage-CMBlL0Ms.js → HistoryPage-okXPylcp.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-C9cLyWJo.js → MeasurementPropertyPage-C2otbn5d.js} +3 -3
- package/assets/assets/ProjectPage-DGrfKxfG.js +15 -0
- package/assets/assets/{RunsPage-QN5bBEe4.js → RunsPage-4u1VBVOW.js} +1 -1
- package/assets/assets/{ServerTrafficSection-BU9Kj9MT.js → ServerTrafficSection-Bl0HTTwh.js} +3 -3
- package/assets/assets/{SettingsPage-C2wYKFF9.js → SettingsPage-C05qxsby.js} +1 -1
- package/assets/assets/ToneBadge-BE2H103M.js +60 -0
- package/assets/assets/{TrafficPage-DEQ6eJUy.js → TrafficPage-Bd3ey_0C.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-B7sygHig.js → TrafficSourceDetailPage-B6Gi-qBP.js} +1 -1
- package/assets/assets/{account-context-BlFU3aZm.js → account-context-y7mzU3Ko.js} +1 -1
- package/assets/assets/{agent-trust-copy-Dmj9Xp7o.js → agent-trust-copy-CHQ9IAa3.js} +1 -1
- package/assets/assets/{card-B6QRK3vg.js → card-BmJz19vt.js} +1 -1
- package/assets/assets/index-s7MwkxGB.js +43 -0
- package/assets/assets/{preload-helper-okiXXeW4.js → preload-helper-BLaGg0Jn.js} +1 -1
- package/assets/assets/{query-client-Dn5u8o4X.js → query-client-DmQlVZMA.js} +1 -1
- package/assets/assets/{react-query-CZrEo0vf.js → react-query-BnTbVX2a.js} +1 -1
- package/assets/assets/{react-sigma_core.esm.min-D5s2grLh.js → react-sigma_core.esm.min-DNPGgfTG.js} +1 -1
- package/assets/assets/{server-traffic-Coma9CV_.js → server-traffic-ALYWW6k0.js} +1 -1
- package/assets/assets/{service-LmTWkeKI.js → service-BKTlKu2x.js} +1 -1
- package/assets/index.html +9 -9
- package/dist/activity-2KFFWLYN.js +13 -0
- package/dist/{ads-6ZCVMSJ2.js → ads-PB3VFUPV.js} +4 -4
- package/dist/{agent-ZZJO7ET6.js → agent-VOL7SOEQ.js} +8 -8
- package/dist/{agent-ask-CPRHVULM.js → agent-ask-F46ERE3W.js} +4 -4
- package/dist/{agent-conversations-NIWKSUC2.js → agent-conversations-T5Q43627.js} +4 -4
- package/dist/{agent-journeys-SHNRNV5E.js → agent-journeys-GVEVJ5J2.js} +4 -4
- package/dist/{agent-memory-4IGCNFR5.js → agent-memory-XXN7QXNM.js} +4 -4
- package/dist/{agent-providers-3Q7NQS7Y.js → agent-providers-U6XIM5JI.js} +4 -4
- package/dist/{agent-transcript-M3NYHNNV.js → agent-transcript-ONEA6JBO.js} +4 -4
- package/dist/{analytics-UHBUOG4T.js → analytics-XWVTM57N.js} +4 -4
- package/dist/{answerability-IRXQDOBX.js → answerability-GNYSELX5.js} +4 -4
- package/dist/{apply-3HP75CA2.js → apply-WXW4KWUK.js} +4 -4
- package/dist/{backfill-TQWXGQPQ.js → backfill-SWDR5M4O.js} +11 -11
- package/dist/{backlinks-O5IYHDAY.js → backlinks-5LIBLUEG.js} +4 -4
- package/dist/{bing-2MTKNQB2.js → bing-4U4ODKGV.js} +4 -4
- package/dist/{bootstrap-O7FRHURI.js → bootstrap-FY72AHVW.js} +11 -11
- package/dist/{cdp-BTXUJFAN.js → cdp-H5WMBYIF.js} +10 -9
- package/dist/{chunk-46YT33GB.js → chunk-2IU7GJCX.js} +4 -4
- package/dist/{chunk-KIO37ZVB.js → chunk-2PLJ4QG5.js} +4 -4
- package/dist/{chunk-QQFTJVHT.js → chunk-2T4OGJWP.js} +1 -1
- package/dist/{chunk-BY2RGFQH.js → chunk-2VDYFOKB.js} +8 -8
- package/dist/{chunk-B3F5BMXL.js → chunk-3GE4Z4J3.js} +5 -5
- package/dist/{chunk-SYRMAQVM.js → chunk-3ZNDJ4OM.js} +5 -5
- package/dist/{chunk-YYBYRAMI.js → chunk-425BZPKK.js} +5 -5
- package/dist/{chunk-VTOST3CL.js → chunk-5WDU7ZML.js} +7 -7
- package/dist/{chunk-OL6HAMWW.js → chunk-A36PZKKS.js} +2 -2
- package/dist/{chunk-ML7G6NS3.js → chunk-BAO3PHQP.js} +2 -2
- package/dist/{chunk-XQUGLXAN.js → chunk-DY2Q3VIM.js} +2 -2
- package/dist/{chunk-VD6Q7ZUX.js → chunk-FIF4N7DP.js} +1 -1
- package/dist/{chunk-VP3F4BOG.js → chunk-FMS7CIEK.js} +2 -2
- package/dist/{chunk-DI5EEYDP.js → chunk-G2NIO2J3.js} +2 -2
- package/dist/{chunk-U2LYHQHF.js → chunk-GCBFSIKI.js} +1 -1
- package/dist/{chunk-3OZ5WKRH.js → chunk-GKQ4CYUM.js} +3384 -3286
- package/dist/{chunk-OH3HQENA.js → chunk-GPPTW3HU.js} +4 -4
- package/dist/{chunk-3FQMXAES.js → chunk-GRX2DION.js} +4 -4
- package/dist/{chunk-AVKRYSYT.js → chunk-GTX7C5Y5.js} +11 -9
- package/dist/{chunk-RSZ3L5FJ.js → chunk-HQEH4YRO.js} +1 -1
- package/dist/{chunk-PAP62URW.js → chunk-HS2HYFPX.js} +81 -6
- package/dist/{chunk-VUL3BACZ.js → chunk-IIL4NKRU.js} +4 -4
- package/dist/{chunk-TOKRH24Q.js → chunk-JRWHQVA6.js} +191 -66
- package/dist/{chunk-QCEXADUT.js → chunk-K3YHPTKL.js} +2 -2
- package/dist/{chunk-A75GIIWP.js → chunk-LWRPSAVC.js} +1 -1
- package/dist/{chunk-JTIFRAGE.js → chunk-M4IAXLBT.js} +3 -3
- package/dist/{chunk-F2TGOWIW.js → chunk-MG4COK23.js} +2 -2
- package/dist/{chunk-3G5FQLF7.js → chunk-NEJEHRPT.js} +2 -2
- package/dist/{chunk-PDSB34VB.js → chunk-OKIAF573.js} +1 -1
- package/dist/{chunk-SFJCLIKB.js → chunk-PUEARV37.js} +425 -372
- package/dist/{chunk-C5EK4TJ5.js → chunk-PWXLKW2F.js} +3 -3
- package/dist/{chunk-CD3XPOHP.js → chunk-QWD3ABAW.js} +1 -1
- package/dist/{chunk-WAVN2EIK.js → chunk-QXRI6DRE.js} +216 -72
- package/dist/{chunk-K7BROEPL.js → chunk-RDCEFEXP.js} +3 -3
- package/dist/{chunk-WVNVKP4F.js → chunk-RMLGMB5B.js} +1 -1
- package/dist/{chunk-QRA6GFXX.js → chunk-RPAWPX7B.js} +1 -1
- package/dist/{chunk-35NITZHC.js → chunk-X6DD3OIR.js} +3 -2
- package/dist/{chunk-2MDEKCDU.js → chunk-XONND7NT.js} +3 -3
- package/dist/{chunk-MB7VQPWX.js → chunk-ZKIEOEUZ.js} +2 -2
- package/dist/{citations-5JSLIPNI.js → citations-622BWQTR.js} +5 -5
- package/dist/{cli-catalog-U3DKCQC5.js → cli-catalog-ACK3FVAX.js} +4 -4
- package/dist/cli-commands-UH3DRBPC.js +18 -0
- package/dist/cli.js +14 -14
- package/dist/{competitor-AMA7WPH4.js → competitor-QYZIWXGC.js} +4 -4
- package/dist/{content-7HZ23UXM.js → content-PJASAMIV.js} +4 -4
- package/dist/{dashboard-XFLFU4JL.js → dashboard-FQOS3J4B.js} +7 -7
- package/dist/{demo-CPO4IUJL.js → demo-ZGGVSKN4.js} +3 -3
- package/dist/{demo-server-KBU3NECG.js → demo-server-TLXLEPOI.js} +13 -13
- package/dist/{discover-TJXKEHVP.js → discover-ZLDSXDRI.js} +5 -5
- package/dist/{discover-eval-MUS46MSL.js → discover-eval-7F5Q3RXS.js} +4 -4
- package/dist/{doctor-5CIMYYUA.js → doctor-3KSQZDZ3.js} +4 -4
- package/dist/{evidence-MY4Z6VNC.js → evidence-BJZIRJ4U.js} +4 -4
- package/dist/{export-cmd-VBULRDSJ.js → export-cmd-BYPGV4IU.js} +4 -4
- package/dist/{ga-ORQCNNJ6.js → ga-A3BAZCYH.js} +4 -4
- package/dist/{gbp-LWVNCHMT.js → gbp-U6VCRAFN.js} +4 -4
- package/dist/{google-U6LQOAQ3.js → google-UNQZBUGS.js} +5 -5
- package/dist/{google-marketing-6RA4AOMN.js → google-marketing-QSIRQAVH.js} +2 -2
- package/dist/{health-cmd-LQGRFFT3.js → health-cmd-Z5KTTJQU.js} +5 -5
- package/dist/{history-LYJAA6QI.js → history-IIGUZMOM.js} +4 -4
- package/dist/index.d.ts +44 -24
- package/dist/index.js +27 -27
- package/dist/{init-RWJPBYTI.js → init-HZANRCMW.js} +13 -13
- package/dist/{insights-OP7ZJLC5.js → insights-UQ234W6T.js} +4 -4
- package/dist/intelligence-service-S3GTOTGQ.js +15 -0
- package/dist/{journeys-ENN25PA5.js → journeys-2EZIRL7K.js} +4 -4
- package/dist/{keys-FVPHQIOM.js → keys-NIAANGXE.js} +4 -4
- package/dist/{keyword-ELCUWNQC.js → keyword-LHHNG3GL.js} +4 -4
- package/dist/{logs-SVKY3HXZ.js → logs-UFOOIKTC.js} +4 -4
- package/dist/{mcp-W7AMWAST.js → mcp-AZYUFL5V.js} +5 -5
- package/dist/mcp.js +22 -16
- package/dist/{measurement-plan-F3ZZ4MCG.js → measurement-plan-H2HIHJ3D.js} +6 -6
- package/dist/{notify-U253YRTY.js → notify-TIE2ZJ26.js} +4 -4
- package/dist/{organic-evidence-4GI6HG56.js → organic-evidence-BX5MGZTK.js} +4 -4
- package/dist/{overview-TPZI3OKL.js → overview-MGQE43GU.js} +7 -7
- package/dist/{project-BZPMAZAH.js → project-2JL4ZW52.js} +4 -4
- package/dist/{project-setup-2NSUAFXD.js → project-setup-CXOVBRLZ.js} +9 -6
- package/dist/{query-4AL5P6DI.js → query-Q5BF63QF.js} +4 -4
- package/dist/{research-3WAJ6RWX.js → research-RQBZ57W5.js} +4 -4
- package/dist/{results-export-VHA6BPC2.js → results-export-TVCBJNJN.js} +4 -4
- package/dist/{run-3EEHYWIA.js → run-L6WG5WP2.js} +6 -6
- package/dist/{schedule-7CXVWV75.js → schedule-3HQMG3AM.js} +4 -4
- package/dist/{search-EPPXH2TK.js → search-ZLQE4J66.js} +4 -4
- package/dist/{serve-LGXPVEMJ.js → serve-E4N2XMIC.js} +28 -28
- package/dist/{session-IGKCPAMH.js → session-IJLUYO4T.js} +15 -15
- package/dist/{settings-UKIPQVIX.js → settings-T3U7TQOF.js} +4 -4
- package/dist/{sitemaps-L2OOCCHX.js → sitemaps-UZPLGN4W.js} +4 -4
- package/dist/{skills-VJSJNLWC.js → skills-P4WSSFPF.js} +3 -3
- package/dist/{snapshot-SYVUVM7F.js → snapshot-ROJPISJE.js} +4 -4
- package/dist/{src-VYDX5USM.js → src-ZYWTGILQ.js} +2 -2
- package/dist/{status-ALZWCQ7W.js → status-43XNR3NS.js} +6 -6
- package/dist/{support-XRKYBNND.js → support-I7E4I3GG.js} +2 -2
- package/dist/{technical-aeo-JNYI6Q7L.js → technical-aeo-D4F2R6M3.js} +88 -31
- package/dist/{telemetry-ZENJ5BDE.js → telemetry-5DMVDDZI.js} +5 -5
- package/dist/{tools-LMDXNPS7.js → tools-M534GJMS.js} +12 -12
- package/dist/{traffic-JXNISEMN.js → traffic-R2UA27AZ.js} +6 -6
- package/dist/{trends-3755UQT3.js → trends-BXOZIWIE.js} +4 -4
- package/dist/{users-7XCGU7BU.js → users-X6WJV7VJ.js} +4 -4
- package/dist/{visibility-stats-QJBO7HFN.js → visibility-stats-MCNUXUCL.js} +5 -5
- package/dist/{wordpress-VC6UN5UK.js → wordpress-AMGUJUZX.js} +4 -4
- package/package.json +1 -1
- package/assets/assets/ProjectPage-CP1-aTy-.js +0 -15
- package/assets/assets/ToneBadge-DXhSJm1L.js +0 -60
- package/assets/assets/index-MwrSHGLh.js +0 -43
- package/dist/activity-KCUWSNHF.js +0 -13
- package/dist/cli-commands-6OR7VA33.js +0 -18
- package/dist/intelligence-service-74VHHBUU.js +0 -15
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
bucketCliCommandDuration,
|
|
3
3
|
isTelemetryEnabled,
|
|
4
4
|
trackEvent
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DY2Q3VIM.js";
|
|
6
6
|
import {
|
|
7
7
|
getConfigDir
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FMS7CIEK.js";
|
|
9
9
|
import {
|
|
10
10
|
currentOutcomeAttribution
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LWRPSAVC.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT_NONE,
|
|
14
14
|
OutcomeSurfaces,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
integrationConnectionPropertiesSchema,
|
|
20
20
|
normalizeAgentSlug,
|
|
21
21
|
usageSurfaceSchema
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GKQ4CYUM.js";
|
|
23
23
|
|
|
24
24
|
// src/outcome-telemetry.ts
|
|
25
25
|
import fs from "fs";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
SNAPSHOT_CELL_LEGEND,
|
|
3
3
|
citationGlyph,
|
|
4
4
|
mentionGlyph
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FIF4N7DP.js";
|
|
6
6
|
import {
|
|
7
7
|
createApiClient
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XONND7NT.js";
|
|
9
9
|
import {
|
|
10
10
|
emitJsonl
|
|
11
11
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
CliError,
|
|
14
14
|
EXIT_SYSTEM_ERROR,
|
|
15
15
|
isMachineFormat
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2T4OGJWP.js";
|
|
17
17
|
import {
|
|
18
18
|
MentionIdentities,
|
|
19
19
|
OUTSTANDING_PROVIDER_BATCH_STATUSES,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
formatMicros,
|
|
24
24
|
formatRunErrorOneLine,
|
|
25
25
|
resolveProviderInput
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GKQ4CYUM.js";
|
|
27
27
|
|
|
28
28
|
// src/commands/run.ts
|
|
29
29
|
function getClient() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G2NIO2J3.js";
|
|
4
4
|
import {
|
|
5
5
|
addLikelyFakeAgentHits,
|
|
6
6
|
correctBackgroundCallJourneys,
|
|
7
7
|
mergeSplitJourneyVisitors,
|
|
8
8
|
repairAiReferralArrivalsOnStartup,
|
|
9
9
|
writeUnrecognizedAgentBuckets
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QXRI6DRE.js";
|
|
11
11
|
import {
|
|
12
12
|
AGENT_TRUST_RULES_VERSION,
|
|
13
13
|
BROWSER_AGENT_BOT_IDS,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
normalizeTrafficPathPattern,
|
|
32
32
|
rulesShareVerificationList,
|
|
33
33
|
unrecognizedAgentName
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RMLGMB5B.js";
|
|
35
35
|
import {
|
|
36
36
|
RawEventSampleEventTypes,
|
|
37
37
|
agentJourneyCaptureDays,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
trafficReclassificationState,
|
|
49
49
|
trafficSources,
|
|
50
50
|
unrecognizedAgentEventsHourly
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-X6DD3OIR.js";
|
|
52
52
|
import {
|
|
53
53
|
AI_ENGINE_DOMAINS,
|
|
54
54
|
AI_ENGINE_SELF_DOMAINS,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
sortedUnique,
|
|
85
85
|
usageCount,
|
|
86
86
|
withRetry
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-GKQ4CYUM.js";
|
|
88
88
|
|
|
89
89
|
// ../provider-openai/src/normalize.ts
|
|
90
90
|
import OpenAI from "openai";
|
|
@@ -1258,12 +1258,14 @@ function geminiRetryDelayMs(err) {
|
|
|
1258
1258
|
function isGeminiDailyQuotaError(err) {
|
|
1259
1259
|
return /"quotaId"\s*:\s*"[^"]*PerDay/i.test(describeError(err));
|
|
1260
1260
|
}
|
|
1261
|
-
|
|
1261
|
+
var GEMINI_HEALTHCHECK_MAX_RATE_LIMIT_WAIT_MS = 5e3;
|
|
1262
|
+
function isGeminiRetryable(err, maxRateLimitWaitMs = GEMINI_MAX_RATE_LIMIT_WAIT_MS) {
|
|
1262
1263
|
if (!isRetryableHttpError(err) || isGeminiDailyQuotaError(err)) return false;
|
|
1263
1264
|
const asked = geminiRetryDelayMs(err);
|
|
1264
|
-
return asked === null || asked <=
|
|
1265
|
+
return asked === null || asked <= maxRateLimitWaitMs;
|
|
1265
1266
|
}
|
|
1266
1267
|
async function withRetry4(fn, options = {}) {
|
|
1268
|
+
const maxRateLimitWaitMs = options.maxRateLimitWaitMs ?? GEMINI_MAX_RATE_LIMIT_WAIT_MS;
|
|
1267
1269
|
return withRetry(fn, {
|
|
1268
1270
|
maxRetries: options.maxRetries ?? 3,
|
|
1269
1271
|
signal: options.signal,
|
|
@@ -1272,7 +1274,7 @@ async function withRetry4(fn, options = {}) {
|
|
|
1272
1274
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
1273
1275
|
// if you need it.
|
|
1274
1276
|
jitter: false,
|
|
1275
|
-
isRetryable: isGeminiRetryable,
|
|
1277
|
+
isRetryable: (err) => isGeminiRetryable(err, maxRateLimitWaitMs),
|
|
1276
1278
|
computeDelayMs: (_attempt, err, defaultMs) => {
|
|
1277
1279
|
const asked = geminiRetryDelayMs(err);
|
|
1278
1280
|
return asked === null ? defaultMs : asked + 500;
|
|
@@ -1344,7 +1346,7 @@ async function healthcheck3(config, signal) {
|
|
|
1344
1346
|
contents: 'Say "ok"',
|
|
1345
1347
|
...signal ? { config: { abortSignal: signal } } : {}
|
|
1346
1348
|
}),
|
|
1347
|
-
{ signal }
|
|
1349
|
+
{ signal, maxRateLimitWaitMs: GEMINI_HEALTHCHECK_MAX_RATE_LIMIT_WAIT_MS }
|
|
1348
1350
|
);
|
|
1349
1351
|
const text = result.text ?? "";
|
|
1350
1352
|
const backend = isVertexConfig(config) ? "vertex ai" : "api key";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
dedupeGscSitemapUrls,
|
|
6
6
|
resolveDiscoveredGscSitemapUrls,
|
|
7
7
|
submitGscSitemapBatches
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZKIEOEUZ.js";
|
|
9
9
|
import {
|
|
10
10
|
measurementDraftOperationSchema,
|
|
11
11
|
runMeasurementDraftAction
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OKIAF573.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2T4OGJWP.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_MEMORY_KEY_MAX_LENGTH,
|
|
18
18
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
PROVIDER_ACCOUNT_FAILURE_STREAK,
|
|
29
29
|
PROVIDER_ACCOUNT_RETRY_HOURS,
|
|
30
30
|
RESEARCH_RUN_SCOPE,
|
|
31
|
+
RunStatuses,
|
|
31
32
|
SENTIMENT_ATTEMPT_PAGE_DEFAULT,
|
|
32
33
|
SENTIMENT_QUERY_PAGE_DEFAULT,
|
|
33
34
|
SENTIMENT_QUERY_PAGE_MAX,
|
|
@@ -218,7 +219,7 @@ import {
|
|
|
218
219
|
trendSurfaceSchema,
|
|
219
220
|
visibilityCompareSelectionSchema,
|
|
220
221
|
visibilityReportRequestSchema
|
|
221
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-GKQ4CYUM.js";
|
|
222
223
|
|
|
223
224
|
// src/mcp/tool-registry.ts
|
|
224
225
|
import { z as z2 } from "zod";
|
|
@@ -631,6 +632,69 @@ async function submitGscSitemapsFromMcp(client, input) {
|
|
|
631
632
|
}
|
|
632
633
|
return submitGscSitemapBatches(client, input.project, sitemapUrls);
|
|
633
634
|
}
|
|
635
|
+
var gscSyncInputSchema = z2.object({
|
|
636
|
+
project: projectNameSchema,
|
|
637
|
+
days: z2.number().int().positive().max(180).optional().describe("Days of history to refresh, 1 to 180. Defaults to 30. For more, use full."),
|
|
638
|
+
full: z2.boolean().optional().describe("Re-read the 16 months Search Console keeps (480 days), the backfill after connecting a site. Do not combine with days.")
|
|
639
|
+
});
|
|
640
|
+
var GSC_SYNC_WAIT_MS = 10 * 60 * 1e3;
|
|
641
|
+
var GSC_SYNC_POLL_DELAYS_MS = [250, 1e3, 2e3];
|
|
642
|
+
var FINISHED_RUN_STATUSES = /* @__PURE__ */ new Set([RunStatuses.completed, RunStatuses.partial, RunStatuses.failed, RunStatuses.cancelled]);
|
|
643
|
+
async function syncGscFromMcp(client, input) {
|
|
644
|
+
const { project, days, full } = input;
|
|
645
|
+
if (full === true && days !== void 0) {
|
|
646
|
+
throw new CliError({
|
|
647
|
+
code: "VALIDATION_ERROR",
|
|
648
|
+
message: "Pass days or full, not both: full re-reads all 16 months and ignores days.",
|
|
649
|
+
details: { project, days, full }
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
let run;
|
|
653
|
+
try {
|
|
654
|
+
run = await client.gscSync(project, { days, full });
|
|
655
|
+
} catch (error) {
|
|
656
|
+
if (error instanceof CliError && error.code === "INTEGRATION_NOT_CONNECTED") {
|
|
657
|
+
throw new CliError({
|
|
658
|
+
code: error.code,
|
|
659
|
+
message: `Search Console is not connected for project "${project}". Connect it with canonry_gsc_connect, then select its site with canonry_gsc_properties and canonry_gsc_set_property.`,
|
|
660
|
+
details: { ...error.details, project }
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
throw error;
|
|
664
|
+
}
|
|
665
|
+
const runId = run.id;
|
|
666
|
+
const deadline = Date.now() + GSC_SYNC_WAIT_MS;
|
|
667
|
+
for (let poll = 0; !FINISHED_RUN_STATUSES.has(run.status); poll += 1) {
|
|
668
|
+
if (Date.now() >= deadline) {
|
|
669
|
+
throw new CliError({
|
|
670
|
+
code: "GOOGLE_SYNC_TIMEOUT",
|
|
671
|
+
message: `Search Console sync ${runId} is still ${run.status} after ${GSC_SYNC_WAIT_MS / 6e4} minutes. It keeps running on the server: read it with canonry_run_get rather than starting another sync.`,
|
|
672
|
+
details: { project, runId, status: run.status }
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
const delay = GSC_SYNC_POLL_DELAYS_MS[Math.min(poll, GSC_SYNC_POLL_DELAYS_MS.length - 1)];
|
|
676
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
677
|
+
run = await client.getRun(runId);
|
|
678
|
+
}
|
|
679
|
+
if (run.status !== RunStatuses.completed) {
|
|
680
|
+
throw new CliError({
|
|
681
|
+
code: "GOOGLE_SYNC_FAILED",
|
|
682
|
+
message: `Search Console sync ${run.status}: ${run.error?.message ?? "no reason was recorded."}`,
|
|
683
|
+
details: { project, runId, status: run.status }
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
return {
|
|
687
|
+
id: run.id,
|
|
688
|
+
projectId: run.projectId,
|
|
689
|
+
kind: run.kind,
|
|
690
|
+
status: run.status,
|
|
691
|
+
trigger: run.trigger,
|
|
692
|
+
createdAt: run.createdAt,
|
|
693
|
+
startedAt: run.startedAt ?? null,
|
|
694
|
+
finishedAt: run.finishedAt ?? null,
|
|
695
|
+
syncSummary: run.syncSummary ?? null
|
|
696
|
+
};
|
|
697
|
+
}
|
|
634
698
|
var gaWindowInputSchema = z2.object({
|
|
635
699
|
project: projectNameSchema,
|
|
636
700
|
window: z2.enum(WINDOW_SETS.gaTraffic).optional(),
|
|
@@ -2048,7 +2112,7 @@ var rawCanonryMcpTools = [
|
|
|
2048
2112
|
defineTool({
|
|
2049
2113
|
name: "canonry_run_get",
|
|
2050
2114
|
title: "Get run",
|
|
2051
|
-
description: "Get a Canonry run with its snapshots. skippedProviders records the providers this run did not call because they kept failing on their accounts; error.providers marks their entries skipped. This is a stored run, not the next sweep's admission: read canonry_runs_latest for scheduled admission and default full-sweep manualAdmission, which can differ when a schedule names fewer providers. `citationState: not-measured` means the engine returns no sources (a local model), so whether it cites the project was never observed; it is never a miss. queryCounts.citationNotMeasuredQueries counts queries no answer measured. queryCountsByClass splits queryCounts into nonBrand and branded, each its own denominator: lead with nonBrand, and never add the two together. While a run is queued or running, providerFailures lists each engine failing so far (first reason, failed queries, and whether the run stopped calling it).",
|
|
2115
|
+
description: "Get a Canonry run with its snapshots. For an Agent Readiness audit, relay error.message whenever present, including a completed scan that scored no pages. For completed or partial scans, pass this runId to canonry_agent_readiness_overview and canonry_agent_readiness_issues. Report any skipped sites and their sites[].error, issue coverage, and the stop reason for a partial scan. skippedProviders records the providers this run did not call because they kept failing on their accounts; error.providers marks their entries skipped. This is a stored run, not the next sweep's admission: read canonry_runs_latest for scheduled admission and default full-sweep manualAdmission, which can differ when a schedule names fewer providers. `citationState: not-measured` means the engine returns no sources (a local model), so whether it cites the project was never observed; it is never a miss. queryCounts.citationNotMeasuredQueries counts queries no answer measured. queryCountsByClass splits queryCounts into nonBrand and branded, each its own denominator: lead with nonBrand, and never add the two together. While a run is queued or running, providerFailures lists each engine failing so far (first reason, failed queries, and whether the run stopped calling it).",
|
|
2052
2116
|
access: "read",
|
|
2053
2117
|
tier: "monitoring",
|
|
2054
2118
|
inputSchema: runGetInputSchema,
|
|
@@ -2670,6 +2734,17 @@ var rawCanonryMcpTools = [
|
|
|
2670
2734
|
openApiOperations: ["PUT /api/v1/projects/{name}/google/connections/{type}/property"],
|
|
2671
2735
|
handler: (client, input) => client.googleSetProperty(input.project, "gsc", input.siteUrl)
|
|
2672
2736
|
}),
|
|
2737
|
+
defineTool({
|
|
2738
|
+
name: "canonry_gsc_sync",
|
|
2739
|
+
title: "Sync Search Console data",
|
|
2740
|
+
description: "Run a Search Console sync for a project now and wait for it to finish (up to 10 minutes): search rows by query, page, country and device, property daily totals, per-query daily totals and the sitemap list, stored for every GSC read. Calls Google for three reports and the sitemap list; usually seconds, longer with full. It also runs daily as part of the data refresh, so trigger it when stored data is missing or stale (canonry_answerability search-console, or canonry_doctor gsc.data.recent-data). days refreshes 1 to 180 days (default 30); full re-reads the 16 months Google keeps, the backfill after connecting. A completed sync also queues the index-coverage refresh (URL Inspection over the sitemap, its own run) unless one is running or just ran. Returns the finished run with syncSummary, what it stored: days, startDate, endDate, searchRows, dailyTotals, queryTotals, sitemaps (null when the list could not be read) and dataThroughDate. syncSummary is null from a server too old to record it, which is not a sync that stored nothing. GOOGLE_SYNC_FAILED carries the run's reason; GOOGLE_SYNC_TIMEOUT means the run is still going, so read it with canonry_run_get instead of starting another. Without a Search Console connection it returns INTEGRATION_NOT_CONNECTED: connect with canonry_gsc_connect.",
|
|
2741
|
+
access: "write",
|
|
2742
|
+
tier: "gsc",
|
|
2743
|
+
inputSchema: gscSyncInputSchema,
|
|
2744
|
+
annotations: writeAnnotations({ idempotentHint: true, openWorldHint: true }),
|
|
2745
|
+
openApiOperations: ["POST /api/v1/projects/{name}/google/gsc/sync", "GET /api/v1/runs/{id}"],
|
|
2746
|
+
handler: syncGscFromMcp
|
|
2747
|
+
}),
|
|
2673
2748
|
defineTool({
|
|
2674
2749
|
name: "canonry_gsc_performance",
|
|
2675
2750
|
title: "Get GSC performance",
|
|
@@ -4933,7 +5008,7 @@ var rawCanonryMcpTools = [
|
|
|
4933
5008
|
defineTool({
|
|
4934
5009
|
name: "canonry_agent_readiness_run",
|
|
4935
5010
|
title: "Run Agent Readiness audit scan",
|
|
4936
|
-
description: "Start an Agent Readiness audit scan (a site-audit run). The scan discovers root, sitemap, and linked pages, on the main domain and on each owned domain it includes (sites, else the project's saved siteAuditDomains), with links between them counted as internal. Without maxPages it uses the project's saved page budget (siteAuditMaxPages), else the full site (up to 50,000 pages), and the engine derives the link-observation budget from that page count with a 100,000 floor, so raising maxPages raises it too. An explicit maxEdges is a ceiling that replaces the derivation and can sit below it. It returns {runId, status} and continues in the background. If an active run has identical effective options, this tool returns it; different options are refused. Poll canonry_run_get,
|
|
5011
|
+
description: "Start an Agent Readiness audit scan (a site-audit run). The scan discovers root, sitemap, and linked pages, on the main domain and on each owned domain it includes (sites, else the project's saved siteAuditDomains), with links between them counted as internal. Without maxPages it uses the project's saved page budget (siteAuditMaxPages), else the full site (up to 50,000 pages), and the engine derives the link-observation budget from that page count with a 100,000 floor, so raising maxPages raises it too. An explicit maxEdges is a ceiling that replaces the derivation and can sit below it. It returns {runId, status} and continues in the background. If an active run has identical effective options, this tool returns it; different options are refused. Poll canonry_run_get with this runId and relay its stored error.message and recovery steps if present. For completed or partial runs, pass that same runId to canonry_agent_readiness_overview, canonry_agent_readiness_score and canonry_agent_readiness_issues. Report any skipped sites and their sites[].error even when the scan completed. Relay the recorded termination for a partial crawl and describe issue coverage alongside the findings.",
|
|
4937
5012
|
access: "write",
|
|
4938
5013
|
tier: "monitoring",
|
|
4939
5014
|
inputSchema: technicalAeoRunInputSchema,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XONND7NT.js";
|
|
4
4
|
import {
|
|
5
5
|
emitJsonl
|
|
6
6
|
} from "./chunk-Z7IUAJOF.js";
|
|
7
7
|
import {
|
|
8
8
|
measurementDraftOperationSchema,
|
|
9
9
|
runMeasurementDraftAction
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OKIAF573.js";
|
|
11
11
|
import {
|
|
12
12
|
isMachineFormat,
|
|
13
13
|
systemError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2T4OGJWP.js";
|
|
15
15
|
import {
|
|
16
16
|
CITATION_NOT_MEASURED_REASON,
|
|
17
17
|
MeasurementEvidenceShapes,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
unattributedAnswersLabel,
|
|
40
40
|
uncheckedSourcesLabel,
|
|
41
41
|
visibilityReportRequestSchema
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GKQ4CYUM.js";
|
|
43
43
|
|
|
44
44
|
// src/commands/measurement-plan.ts
|
|
45
45
|
import crypto from "crypto";
|