@canonry/canonry 6.1.4 → 6.2.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 +1 -1
- package/assets/assets/{AuditHistoryPanel-D-W_kwEY.js → AuditHistoryPanel-CuEMfkaA.js} +1 -1
- package/assets/assets/{BacklinksPage-BeqCFRO3.js → BacklinksPage-CftadZ1-.js} +1 -1
- package/assets/assets/{HistoryPage-wAPbY0z4.js → HistoryPage-DouRgshN.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-BSOrkHCB.js → MeasurementPropertyPage-qfqv2qs9.js} +1 -1
- package/assets/assets/{ProjectPage-v0C7CwyA.js → ProjectPage-DqEVwe4t.js} +1 -1
- package/assets/assets/{RunsPage-CxolaIps.js → RunsPage-CUkMs0gB.js} +1 -1
- package/assets/assets/{SettingsPage-BQqJz0Ms.js → SettingsPage-LLQ40tSh.js} +1 -1
- package/assets/assets/{SiteHealthSection-C56kNcQQ.js → SiteHealthSection-Ba7foDiU.js} +3 -3
- package/assets/assets/{TrafficPage-BDmWdYWf.js → TrafficPage-Cu_ZR3--.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-DZl3YNBs.js → TrafficSourceDetailPage-NKZq7jf9.js} +1 -1
- package/assets/assets/{extract-error-message-D0mBVEGn.js → extract-error-message-BdQYrz9N.js} +1 -1
- package/assets/assets/{index-DZ__RzGa.js → index-HOeLz1ZL.js} +20 -20
- package/assets/assets/{react-sigma_core.esm.min-BQNp33-g.js → react-sigma_core.esm.min-CZaoE5cU.js} +1 -1
- package/assets/assets/{v2-overview-adapter-XZbD7swG.js → v2-overview-adapter-BVx4nI49.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-5LZLDXEN.js → chunk-2RFHQ6XT.js} +396 -172
- package/dist/{chunk-HB6XZOZ6.js → chunk-4EKOKWQT.js} +2 -2
- package/dist/{chunk-4MWLHTRS.js → chunk-6EPN4XY5.js} +13 -0
- package/dist/{chunk-N7MRAN3G.js → chunk-ENI3GOWW.js} +24 -5
- package/dist/{chunk-YOMLHHJS.js → chunk-V6JUBTNL.js} +3 -3
- package/dist/{chunk-6CR7DWLU.js → chunk-W3GDZZNF.js} +1 -1
- package/dist/{chunk-TBAVVIVI.js → chunk-Y2B7JRSB.js} +3 -3
- package/dist/cli.js +45 -16
- package/dist/{demo-server-2622GU2H.js → demo-server-CH7MOBXW.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{intelligence-service-QUAOWEIA.js → intelligence-service-4IONMOFB.js} +2 -2
- package/dist/mcp.js +4 -4
- package/package.json +10 -10
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ENI3GOWW.js";
|
|
9
9
|
import {
|
|
10
10
|
SITE_CRAWL_GRAPH_MAX_EDGES,
|
|
11
11
|
SITE_CRAWL_GRAPH_MAX_NODES,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TEMPLATE_LINK_RATIO_THRESHOLD,
|
|
14
14
|
factorStatusFromScore,
|
|
15
15
|
roundPreservingTotal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6EPN4XY5.js";
|
|
17
17
|
|
|
18
18
|
// src/site-audit-factors.ts
|
|
19
19
|
function recordedSharePct(factor) {
|
|
@@ -3481,6 +3481,7 @@ function extractDomainsFromText(text) {
|
|
|
3481
3481
|
function textContainsDomain(text, domain) {
|
|
3482
3482
|
return extractDomainsFromText(text).some((candidate) => hostMatchesDomain(candidate, domain));
|
|
3483
3483
|
}
|
|
3484
|
+
var URL_PATH_NORMALIZATION_VERSION = 1;
|
|
3484
3485
|
function normalizeUrlPath(input) {
|
|
3485
3486
|
if (input == null) return null;
|
|
3486
3487
|
let trimmed = input.trim();
|
|
@@ -19858,6 +19859,7 @@ function serializeForInlineScript(value) {
|
|
|
19858
19859
|
var PROVIDER_ERROR_PRIORITY = [
|
|
19859
19860
|
"PROVIDER_AUTH",
|
|
19860
19861
|
"RATE_LIMITED",
|
|
19862
|
+
"PROVIDER_UNAVAILABLE",
|
|
19861
19863
|
"TIMEOUT",
|
|
19862
19864
|
"NETWORK",
|
|
19863
19865
|
"PARSE_ERROR",
|
|
@@ -19870,6 +19872,10 @@ function classifyProviderErrorMessage(message) {
|
|
|
19870
19872
|
if (/\b429\b|rate[_ -]?limit|too many requests|quota[_ -]?exceeded/i.test(message)) {
|
|
19871
19873
|
return "RATE_LIMITED";
|
|
19872
19874
|
}
|
|
19875
|
+
const status = extractProviderHttpStatus(message);
|
|
19876
|
+
if (status !== void 0 && status >= 500 || /overloaded|service unavailable|bad gateway|internal server error/i.test(message)) {
|
|
19877
|
+
return "PROVIDER_UNAVAILABLE";
|
|
19878
|
+
}
|
|
19873
19879
|
if (/timeout|timed out|ETIMEDOUT/i.test(message)) {
|
|
19874
19880
|
return "TIMEOUT";
|
|
19875
19881
|
}
|
|
@@ -19891,6 +19897,11 @@ function classifyProviderErrorMessages(messages) {
|
|
|
19891
19897
|
}
|
|
19892
19898
|
return "UNKNOWN";
|
|
19893
19899
|
}
|
|
19900
|
+
function extractProviderHttpStatus(message) {
|
|
19901
|
+
const text = message.replace(/^(?:\[[^\]]+\]\s*)+/, "");
|
|
19902
|
+
const match = /^([1-5]\d\d)\b/.exec(text) ?? /\b(?:status(?: code)?|http)[:=]?\s*([1-5]\d\d)\b/i.exec(text) ?? /"(?:code|status)"\s*:\s*([1-5]\d\d)\b/.exec(text);
|
|
19903
|
+
return match ? Number(match[1]) : void 0;
|
|
19904
|
+
}
|
|
19894
19905
|
|
|
19895
19906
|
// ../contracts/src/telemetry.ts
|
|
19896
19907
|
import { z as z65 } from "zod";
|
|
@@ -21378,6 +21389,7 @@ export {
|
|
|
21378
21389
|
hostMatchesAnyDomain,
|
|
21379
21390
|
extractDomainsFromText,
|
|
21380
21391
|
textContainsDomain,
|
|
21392
|
+
URL_PATH_NORMALIZATION_VERSION,
|
|
21381
21393
|
normalizeUrlPath,
|
|
21382
21394
|
brandKeyFromText,
|
|
21383
21395
|
prepareBrandMatchText,
|
|
@@ -22201,6 +22213,7 @@ export {
|
|
|
22201
22213
|
serializeForInlineScript,
|
|
22202
22214
|
classifyProviderErrorMessage,
|
|
22203
22215
|
classifyProviderErrorMessages,
|
|
22216
|
+
extractProviderHttpStatus,
|
|
22204
22217
|
telemetryStatusDtoSchema,
|
|
22205
22218
|
normalizeTelemetryStatus,
|
|
22206
22219
|
maskTelemetryAnonymousId,
|
|
@@ -869,7 +869,7 @@ import {
|
|
|
869
869
|
wordpressSchemaDeployResultDtoSchema,
|
|
870
870
|
wordpressSchemaStatusResultDtoSchema,
|
|
871
871
|
wordpressStatusDtoSchema
|
|
872
|
-
} from "./chunk-
|
|
872
|
+
} from "./chunk-6EPN4XY5.js";
|
|
873
873
|
|
|
874
874
|
// src/intelligence-service.ts
|
|
875
875
|
import { eq as eq82, desc as desc36, asc as asc15, and as and69, ne as ne14, or as or20, inArray as inArray32, gte as gte22, lte as lte20, isNull as isNull16, sql as sql31, exists } from "drizzle-orm";
|
|
@@ -912,6 +912,7 @@ __export(schema_exports, {
|
|
|
912
912
|
conversionTrackingContracts: () => conversionTrackingContracts,
|
|
913
913
|
crawlerEventsHourly: () => crawlerEventsHourly,
|
|
914
914
|
crawlerVerificationManifestsHourly: () => crawlerVerificationManifestsHourly,
|
|
915
|
+
dataRepairCompletions: () => dataRepairCompletions,
|
|
915
916
|
discoveryProbes: () => discoveryProbes,
|
|
916
917
|
discoverySessions: () => discoverySessions,
|
|
917
918
|
doctorHealthState: () => doctorHealthState,
|
|
@@ -1527,6 +1528,11 @@ var runtimeLogMetadata = sqliteTable("runtime_log_metadata", {
|
|
|
1527
1528
|
dropped: integer("dropped").notNull().default(0),
|
|
1528
1529
|
captureErrors: integer("capture_errors").notNull().default(0)
|
|
1529
1530
|
});
|
|
1531
|
+
var dataRepairCompletions = sqliteTable("data_repair_completions", {
|
|
1532
|
+
name: text("name").primaryKey().notNull(),
|
|
1533
|
+
version: integer("version").notNull(),
|
|
1534
|
+
completedAt: text("completed_at").notNull()
|
|
1535
|
+
});
|
|
1530
1536
|
var apiKeys = sqliteTable("api_keys", {
|
|
1531
1537
|
id: text("id").primaryKey(),
|
|
1532
1538
|
name: text("name").notNull(),
|
|
@@ -8191,6 +8197,17 @@ var MIGRATION_VERSIONS = [
|
|
|
8191
8197
|
statements: [
|
|
8192
8198
|
`ALTER TABLE projects ADD COLUMN qualified_aliases TEXT NOT NULL DEFAULT '[]'`
|
|
8193
8199
|
]
|
|
8200
|
+
},
|
|
8201
|
+
{
|
|
8202
|
+
version: 167,
|
|
8203
|
+
name: "data-repair-completions",
|
|
8204
|
+
statements: [
|
|
8205
|
+
`CREATE TABLE IF NOT EXISTS data_repair_completions (
|
|
8206
|
+
name TEXT PRIMARY KEY NOT NULL,
|
|
8207
|
+
version INTEGER NOT NULL,
|
|
8208
|
+
completed_at TEXT NOT NULL
|
|
8209
|
+
)`
|
|
8210
|
+
]
|
|
8194
8211
|
}
|
|
8195
8212
|
];
|
|
8196
8213
|
var AERO_LEDGER_REBUILDS = [
|
|
@@ -8578,11 +8595,11 @@ var OperationalLogStore = class {
|
|
|
8578
8595
|
append(event) {
|
|
8579
8596
|
try {
|
|
8580
8597
|
const entry = projectEvent(event);
|
|
8581
|
-
|
|
8598
|
+
const entryBytes = Buffer.byteLength(JSON.stringify(entry), "utf8");
|
|
8599
|
+
if (entryBytes > MAX_ENTRY_BYTES) {
|
|
8582
8600
|
throw new RangeError(`Operational log entry exceeds ${MAX_ENTRY_BYTES} bytes.`);
|
|
8583
8601
|
}
|
|
8584
8602
|
this.withoutLockWait(() => this.db.transaction((tx) => {
|
|
8585
|
-
this.prune(tx);
|
|
8586
8603
|
const metadata2 = readMetadata(tx);
|
|
8587
8604
|
tx.run(sql3`
|
|
8588
8605
|
INSERT INTO runtime_logs (
|
|
@@ -8590,12 +8607,12 @@ var OperationalLogStore = class {
|
|
|
8590
8607
|
) VALUES (
|
|
8591
8608
|
${metadata2.nextSequence}, ${entry.ts}, ${entry.level}, ${entry.module}, ${entry.action}, ${entry.message ?? null},
|
|
8592
8609
|
${entry.projectId ?? null}, ${entry.runId ?? null}, ${entry.context.actor ?? null}, ${entry.context.requestId ?? null},
|
|
8593
|
-
${JSON.stringify(entry.context)}, ${
|
|
8610
|
+
${JSON.stringify(entry.context)}, ${entryBytes}
|
|
8594
8611
|
)
|
|
8595
8612
|
`);
|
|
8596
8613
|
tx.run(sql3`UPDATE runtime_log_metadata SET next_sequence = ${metadata2.nextSequence + 1} WHERE id = ${METADATA_ID}`);
|
|
8597
8614
|
this.prune(tx);
|
|
8598
|
-
}));
|
|
8615
|
+
}, { behavior: "immediate" }));
|
|
8599
8616
|
} catch {
|
|
8600
8617
|
this.recordCaptureError();
|
|
8601
8618
|
}
|
|
@@ -17661,6 +17678,7 @@ function generationFailure(err, fallbackMessage) {
|
|
|
17661
17678
|
return providerAuthError(message);
|
|
17662
17679
|
case "RATE_LIMITED":
|
|
17663
17680
|
return quotaExceeded("provider requests", { message });
|
|
17681
|
+
case "PROVIDER_UNAVAILABLE":
|
|
17664
17682
|
case "NETWORK":
|
|
17665
17683
|
case "TIMEOUT":
|
|
17666
17684
|
return providerError(message);
|
|
@@ -92232,6 +92250,7 @@ export {
|
|
|
92232
92250
|
providerBatches,
|
|
92233
92251
|
providerBatchRequests,
|
|
92234
92252
|
auditLog,
|
|
92253
|
+
dataRepairCompletions,
|
|
92235
92254
|
apiKeys,
|
|
92236
92255
|
schedules,
|
|
92237
92256
|
insightNotifyState,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
PACKAGE_VERSION,
|
|
6
6
|
canonryMcpTools,
|
|
7
7
|
isMachineFormat
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-W3GDZZNF.js";
|
|
9
9
|
import {
|
|
10
10
|
AGENT_PROVIDER_IDS,
|
|
11
11
|
CANONRY_NPM_PACKAGE_URL,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
skillsClientSchema,
|
|
51
51
|
upgradeCaveatFor,
|
|
52
52
|
upgradeCommandFor
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6EPN4XY5.js";
|
|
54
54
|
|
|
55
55
|
// src/config.ts
|
|
56
56
|
import fs from "fs";
|
|
@@ -186,7 +186,7 @@ function getBootstrapEnv(source, overrides) {
|
|
|
186
186
|
if (parsed.GEMINI_API_KEY || parsed.GEMINI_VERTEX_PROJECT) {
|
|
187
187
|
providers.gemini = {
|
|
188
188
|
apiKey: parsed.GEMINI_API_KEY ?? "",
|
|
189
|
-
model: parsed.GEMINI_MODEL || "gemini-
|
|
189
|
+
model: parsed.GEMINI_MODEL || "gemini-flash-latest",
|
|
190
190
|
baseUrl: parsed.GEMINI_BASE_URL,
|
|
191
191
|
quota: providerQuotaPolicySchema.parse({
|
|
192
192
|
maxConcurrency: 2,
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
installSkills,
|
|
5
5
|
loadConfigRaw,
|
|
6
6
|
saveConfigPatch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-V6JUBTNL.js";
|
|
8
8
|
import {
|
|
9
9
|
PACKAGE_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-W3GDZZNF.js";
|
|
11
11
|
import {
|
|
12
12
|
SKILL_MANIFEST_FILENAME,
|
|
13
13
|
SkillsClients
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6EPN4XY5.js";
|
|
15
15
|
|
|
16
16
|
// src/skills-autosync.ts
|
|
17
17
|
import fs from "fs";
|
package/dist/cli.js
CHANGED
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
trackCliCommandFinished,
|
|
36
36
|
trackEvent,
|
|
37
37
|
waitForServerRuntimeStartup
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-2RFHQ6XT.js";
|
|
39
39
|
import {
|
|
40
40
|
autoSyncSkills,
|
|
41
41
|
formatAutoSyncNotice
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Y2B7JRSB.js";
|
|
43
43
|
import {
|
|
44
44
|
configExists,
|
|
45
45
|
createApiClient,
|
|
@@ -56,13 +56,13 @@ import {
|
|
|
56
56
|
saveConfig,
|
|
57
57
|
saveConfigPatch,
|
|
58
58
|
shouldPrintServeSkillsNudge
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-V6JUBTNL.js";
|
|
60
60
|
import {
|
|
61
61
|
DEFAULT_DEMO_TRUSTED_PROXIES,
|
|
62
62
|
trustedProxiesProblem,
|
|
63
63
|
trustedProxyProblem
|
|
64
64
|
} from "./chunk-RB2F4D3Z.js";
|
|
65
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-4EKOKWQT.js";
|
|
66
66
|
import {
|
|
67
67
|
CliError,
|
|
68
68
|
EXIT_SYSTEM_ERROR,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
runMeasurementDraftAction,
|
|
75
75
|
systemError,
|
|
76
76
|
usageError
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-W3GDZZNF.js";
|
|
78
78
|
import {
|
|
79
79
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
80
80
|
CLOUDFLARE_WORKER_GENERATED_MARKER,
|
|
@@ -82,6 +82,7 @@ import {
|
|
|
82
82
|
DEFAULT_BOT_LIST,
|
|
83
83
|
apiKeys,
|
|
84
84
|
createClient,
|
|
85
|
+
dataRepairCompletions,
|
|
85
86
|
generateWorkerScript,
|
|
86
87
|
generateWranglerToml,
|
|
87
88
|
migrate,
|
|
@@ -89,7 +90,7 @@ import {
|
|
|
89
90
|
queries,
|
|
90
91
|
renderReportHtml,
|
|
91
92
|
runs
|
|
92
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-ENI3GOWW.js";
|
|
93
94
|
import {
|
|
94
95
|
AdsDeliverySnapshotStatuses,
|
|
95
96
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -116,6 +117,7 @@ import {
|
|
|
116
117
|
TrafficEventKinds,
|
|
117
118
|
TrafficSeriesGranularities,
|
|
118
119
|
UNATTRIBUTED_MENTION_REASON,
|
|
120
|
+
URL_PATH_NORMALIZATION_VERSION,
|
|
119
121
|
USER_PASSWORD_MIN_LENGTH,
|
|
120
122
|
UserRoles,
|
|
121
123
|
adsActivateTreeRequestSchema,
|
|
@@ -196,7 +198,7 @@ import {
|
|
|
196
198
|
visibilityCompareSelectionSchema,
|
|
197
199
|
visibilityReportRequestSchema,
|
|
198
200
|
winnabilityClassSchema
|
|
199
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-6EPN4XY5.js";
|
|
200
202
|
|
|
201
203
|
// src/cli.ts
|
|
202
204
|
import { pathToFileURL } from "url";
|
|
@@ -730,7 +732,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
730
732
|
async function demoCommand(options) {
|
|
731
733
|
const { host, port } = parseDemoListenOptions(options);
|
|
732
734
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
733
|
-
const { createDemoServer } = await import("./demo-server-
|
|
735
|
+
const { createDemoServer } = await import("./demo-server-CH7MOBXW.js");
|
|
734
736
|
const app = await createDemoServer({ trustProxy });
|
|
735
737
|
let stopping = false;
|
|
736
738
|
const stop = () => {
|
|
@@ -16124,7 +16126,7 @@ var DEFAULT_AGENT_MODELS = {
|
|
|
16124
16126
|
openai: "openai/gpt-4o",
|
|
16125
16127
|
openrouter: "openrouter/anthropic/claude-sonnet-4-6",
|
|
16126
16128
|
groq: "groq/llama-4-scout-17b",
|
|
16127
|
-
google: "google/gemini-
|
|
16129
|
+
google: "google/gemini-3.8-flash",
|
|
16128
16130
|
mistral: "mistral/mistral-large-latest",
|
|
16129
16131
|
xai: "xai/grok-2"
|
|
16130
16132
|
};
|
|
@@ -16206,7 +16208,7 @@ async function initCommand(opts) {
|
|
|
16206
16208
|
console.log('Or use "canonry bootstrap".\n');
|
|
16207
16209
|
const geminiApiKey = await promptProviderApiKey("Gemini", "GEMINI_API_KEY");
|
|
16208
16210
|
if (geminiApiKey) {
|
|
16209
|
-
const geminiModel = await prompt(" Gemini model [gemini-
|
|
16211
|
+
const geminiModel = await prompt(" Gemini model [gemini-flash-latest]: ") || "gemini-flash-latest";
|
|
16210
16212
|
providers.gemini = { apiKey: geminiApiKey, model: geminiModel, quota: DEFAULT_QUOTA };
|
|
16211
16213
|
}
|
|
16212
16214
|
const openaiApiKey = await promptProviderApiKey("OpenAI", "OPENAI_API_KEY");
|
|
@@ -16458,7 +16460,7 @@ function encodeLegacySetupState(state) {
|
|
|
16458
16460
|
}
|
|
16459
16461
|
|
|
16460
16462
|
// src/commands/serve.ts
|
|
16461
|
-
import { and, asc, eq as
|
|
16463
|
+
import { and, asc, eq as eq3, ne } from "drizzle-orm";
|
|
16462
16464
|
|
|
16463
16465
|
// src/server-shutdown.ts
|
|
16464
16466
|
async function closeWithIdleSweep(app, intervalMs = 250) {
|
|
@@ -16471,6 +16473,33 @@ async function closeWithIdleSweep(app, intervalMs = 250) {
|
|
|
16471
16473
|
}
|
|
16472
16474
|
}
|
|
16473
16475
|
|
|
16476
|
+
// src/startup-path-repairs.ts
|
|
16477
|
+
import { eq as eq2, lt } from "drizzle-orm";
|
|
16478
|
+
var STARTUP_REPAIR_PAGE_SIZE = 4096;
|
|
16479
|
+
function repairNormalizedPathsOnStartup(db) {
|
|
16480
|
+
return repairPathsOnce(db, "ga-traffic-paths", backfillNormalizedPaths);
|
|
16481
|
+
}
|
|
16482
|
+
function repairAiReferralPathsOnStartup(db) {
|
|
16483
|
+
return repairPathsOnce(db, "ga-ai-referral-paths", backfillAiReferralPaths);
|
|
16484
|
+
}
|
|
16485
|
+
async function repairPathsOnce(db, name, repair) {
|
|
16486
|
+
const completed = db.select({ version: dataRepairCompletions.version }).from(dataRepairCompletions).where(eq2(dataRepairCompletions.name, name)).get();
|
|
16487
|
+
if (completed && completed.version >= URL_PATH_NORMALIZATION_VERSION) return null;
|
|
16488
|
+
let conflicted = false;
|
|
16489
|
+
const result = await repair(db, { pageSize: STARTUP_REPAIR_PAGE_SIZE, onConflict: () => {
|
|
16490
|
+
conflicted = true;
|
|
16491
|
+
} });
|
|
16492
|
+
if (!conflicted) {
|
|
16493
|
+
const completion = { version: URL_PATH_NORMALIZATION_VERSION, completedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
16494
|
+
db.insert(dataRepairCompletions).values({ name, ...completion }).onConflictDoUpdate({
|
|
16495
|
+
target: dataRepairCompletions.name,
|
|
16496
|
+
set: completion,
|
|
16497
|
+
setWhere: lt(dataRepairCompletions.version, URL_PATH_NORMALIZATION_VERSION)
|
|
16498
|
+
}).run();
|
|
16499
|
+
}
|
|
16500
|
+
return result;
|
|
16501
|
+
}
|
|
16502
|
+
|
|
16474
16503
|
// src/agent-plugin.ts
|
|
16475
16504
|
import fs18 from "fs";
|
|
16476
16505
|
import path12 from "path";
|
|
@@ -16683,7 +16712,7 @@ function readServeOpenState(db) {
|
|
|
16683
16712
|
projectId: runs.projectId,
|
|
16684
16713
|
status: runs.status
|
|
16685
16714
|
}).from(runs).where(and(
|
|
16686
|
-
|
|
16715
|
+
eq3(runs.kind, RunKinds["site-audit"]),
|
|
16687
16716
|
ne(runs.trigger, RunTriggers.probe)
|
|
16688
16717
|
)).all();
|
|
16689
16718
|
scanned = new Set(
|
|
@@ -16718,8 +16747,8 @@ async function serveCommand(format = "text") {
|
|
|
16718
16747
|
const db = createClient(config.database);
|
|
16719
16748
|
migrate(db);
|
|
16720
16749
|
try {
|
|
16721
|
-
const result =
|
|
16722
|
-
if (result.updated > 0 && format === "text") {
|
|
16750
|
+
const result = await repairNormalizedPathsOnStartup(db);
|
|
16751
|
+
if (result && result.updated > 0 && format === "text") {
|
|
16723
16752
|
console.log(
|
|
16724
16753
|
`Migrated ${result.updated} GA landing-page row${result.updated === 1 ? "" : "s"} to canonical form.`
|
|
16725
16754
|
);
|
|
@@ -16730,8 +16759,8 @@ async function serveCommand(format = "text") {
|
|
|
16730
16759
|
`);
|
|
16731
16760
|
}
|
|
16732
16761
|
try {
|
|
16733
|
-
const result =
|
|
16734
|
-
if (result.updated > 0 && format === "text") {
|
|
16762
|
+
const result = await repairAiReferralPathsOnStartup(db);
|
|
16763
|
+
if (result && result.updated > 0 && format === "text") {
|
|
16735
16764
|
console.log(
|
|
16736
16765
|
`Migrated ${result.updated} GA AI referral row${result.updated === 1 ? "" : "s"} to canonical form.`
|
|
16737
16766
|
);
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
computeFactorAverages,
|
|
6
6
|
layoutSiteCrawlGraphInput,
|
|
7
7
|
persistSiteCrawlGraphLayout
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4EKOKWQT.js";
|
|
9
9
|
import {
|
|
10
10
|
PACKAGE_VERSION,
|
|
11
11
|
canonryMcpTools
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-W3GDZZNF.js";
|
|
13
13
|
import {
|
|
14
14
|
HISTORY_WINDOW_RUNS,
|
|
15
15
|
IntelligenceService,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
siteCrawlPages,
|
|
86
86
|
siteCrawlSnapshots,
|
|
87
87
|
trafficSources
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-ENI3GOWW.js";
|
|
89
89
|
import {
|
|
90
90
|
RunKinds,
|
|
91
91
|
SiteCrawlFetchStates,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
roundPreservingTotal,
|
|
113
113
|
siteAuditPageFactorSchema,
|
|
114
114
|
wilsonInterval
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-6EPN4XY5.js";
|
|
116
116
|
|
|
117
117
|
// src/demo-server.ts
|
|
118
118
|
import { dirname, join as join2 } from "path";
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
createGoogleMarketingCredentialStore,
|
|
4
4
|
createGoogleMarketingRuntime,
|
|
5
5
|
createServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2RFHQ6XT.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-V6JUBTNL.js";
|
|
10
|
+
import "./chunk-4EKOKWQT.js";
|
|
11
|
+
import "./chunk-W3GDZZNF.js";
|
|
12
|
+
import "./chunk-ENI3GOWW.js";
|
|
13
|
+
import "./chunk-6EPN4XY5.js";
|
|
14
14
|
export {
|
|
15
15
|
GoogleMarketingRuntimeError,
|
|
16
16
|
createGoogleMarketingCredentialStore,
|
package/dist/mcp.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoSyncSkills
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y2B7JRSB.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient,
|
|
6
6
|
createCanonryMcpServer
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-V6JUBTNL.js";
|
|
8
|
+
import "./chunk-W3GDZZNF.js";
|
|
9
9
|
import {
|
|
10
10
|
isReadOnlyKey,
|
|
11
11
|
updateCheckEnvOptOut
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6EPN4XY5.js";
|
|
13
13
|
|
|
14
14
|
// src/mcp/cli.ts
|
|
15
15
|
import { randomUUID } from "crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
|
|
6
6
|
"keywords": [
|
|
@@ -86,33 +86,33 @@
|
|
|
86
86
|
"tsup": "^8.5.1",
|
|
87
87
|
"tsx": "^4.19.0",
|
|
88
88
|
"@ainyc/canonry-web": "0.0.0",
|
|
89
|
-
"@ainyc/canonry-api-client": "0.0.0",
|
|
90
89
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
91
90
|
"@ainyc/canonry-config": "0.0.0",
|
|
91
|
+
"@ainyc/canonry-api-client": "0.0.0",
|
|
92
92
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
93
93
|
"@ainyc/canonry-db": "0.0.0",
|
|
94
94
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
95
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
96
95
|
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
97
|
-
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
98
96
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
97
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
99
98
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
99
|
+
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
100
100
|
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
101
|
-
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
102
101
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
103
|
-
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
104
102
|
"@ainyc/canonry-integration-google-tag-manager": "0.0.0",
|
|
103
|
+
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
104
|
+
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
105
105
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
106
106
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
107
107
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
108
|
-
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
109
108
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
110
|
-
"@ainyc/canonry-provider-
|
|
111
|
-
"@ainyc/canonry-provider-local": "0.0.0",
|
|
109
|
+
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
112
110
|
"@ainyc/canonry-provider-muse": "0.0.0",
|
|
113
111
|
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
112
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
113
|
+
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
114
114
|
"@ainyc/canonry-integration-typesafe": "0.0.0",
|
|
115
|
-
"@ainyc/canonry-provider-
|
|
115
|
+
"@ainyc/canonry-provider-local": "0.0.0"
|
|
116
116
|
},
|
|
117
117
|
"scripts": {
|
|
118
118
|
"build": "pnpm run build:cli && pnpm run build:web",
|