@ainyc/canonry 4.163.1 → 4.164.1
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 +120 -66
- package/assets/assets/{AuditHistoryPanel-CcoUJRWK.js → AuditHistoryPanel-m4hLLnEl.js} +1 -1
- package/assets/assets/{BacklinksPage-CPJcgZMH.js → BacklinksPage-DWl04vdm.js} +1 -1
- package/assets/assets/{HistoryPage-CA5hKRuu.js → HistoryPage-BTb0MBB4.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-DxrhxQ0q.js → MeasurementPropertyPage-C8c4huVf.js} +1 -1
- package/assets/assets/{ProjectPage-CHhf6m-z.js → ProjectPage-CEbscgtB.js} +1 -1
- package/assets/assets/{RunRow-D_8fID7_.js → RunRow-CDzkoy89.js} +1 -1
- package/assets/assets/{RunsPage-vSxIzGSk.js → RunsPage-CzLCTfIA.js} +1 -1
- package/assets/assets/{SettingsPage-CooTu-Qq.js → SettingsPage-D8Vfdd2n.js} +1 -1
- package/assets/assets/{SiteHealthSection-B84ag_7p.js → SiteHealthSection-BGmBOTo0.js} +3 -3
- package/assets/assets/{TrafficPage-CXLxgcDy.js → TrafficPage-BcmemZJB.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-DH47U88b.js → TrafficSourceDetailPage-B9Dz1vcn.js} +1 -1
- package/assets/assets/{extract-error-message-DclWcEAn.js → extract-error-message-B5tyCXha.js} +1 -1
- package/assets/assets/{index-DH8-WPHn.js → index-CEjDqng5.js} +19 -19
- package/assets/assets/{react-sigma_core.esm.min-DXADa_zN.js → react-sigma_core.esm.min-z4XxmpWJ.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-INXI6PO7.js → chunk-76DCR646.js} +1 -1
- package/dist/{chunk-ESH3LPYQ.js → chunk-DCCEKIJ7.js} +28 -0
- package/dist/{chunk-G5UZTODF.js → chunk-R6QOYKRW.js} +805 -105
- package/dist/{chunk-MRHYSEZB.js → chunk-XYZMJA3L.js} +66 -62
- package/dist/cli.js +23 -6
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-AFAFGLCM.js → intelligence-service-5UVHKSHR.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +10 -10
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
loadConfig,
|
|
11
11
|
loadConfigRaw,
|
|
12
12
|
saveConfigPatch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-76DCR646.js";
|
|
14
14
|
import {
|
|
15
15
|
CC_CACHE_DIR,
|
|
16
16
|
DUCKDB_SPEC,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
siteCrawlSnapshots,
|
|
140
140
|
toAlertView,
|
|
141
141
|
usageCounters
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-R6QOYKRW.js";
|
|
143
143
|
import {
|
|
144
144
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
145
145
|
AGENT_PROVIDER_IDS,
|
|
@@ -253,7 +253,7 @@ import {
|
|
|
253
253
|
validationError,
|
|
254
254
|
winnabilityClassLabel,
|
|
255
255
|
withRetry
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-DCCEKIJ7.js";
|
|
257
257
|
|
|
258
258
|
// src/telemetry.ts
|
|
259
259
|
import crypto from "crypto";
|
|
@@ -9084,7 +9084,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
9084
9084
|
return result;
|
|
9085
9085
|
}
|
|
9086
9086
|
async function backfillInsightsCommand(project, opts) {
|
|
9087
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
9087
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-5UVHKSHR.js");
|
|
9088
9088
|
const config = loadConfig();
|
|
9089
9089
|
const db = createClient(config.database);
|
|
9090
9090
|
migrate(db);
|
|
@@ -9505,68 +9505,72 @@ async function backfillTrafficClassificationCommand(opts) {
|
|
|
9505
9505
|
result.reclassified++;
|
|
9506
9506
|
result.byBot[classified.botId] = (result.byBot[classified.botId] ?? 0) + 1;
|
|
9507
9507
|
if (isDryRun) continue;
|
|
9508
|
-
db.update(rawEventSamples).set({ eventType: userFetch ? TrafficEventKinds["ai-user-fetch"] : TrafficEventKinds.crawler }).where(eq16(rawEventSamples.id, snap.id)).run();
|
|
9509
9508
|
const tsHour = new Date(snap.ts);
|
|
9510
9509
|
tsHour.setUTCMinutes(0, 0, 0);
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
aiUserFetchEventsHourly.sourceId,
|
|
9529
|
-
aiUserFetchEventsHourly.tsHour,
|
|
9530
|
-
aiUserFetchEventsHourly.botId,
|
|
9531
|
-
aiUserFetchEventsHourly.verificationStatus,
|
|
9532
|
-
aiUserFetchEventsHourly.pathNormalized,
|
|
9533
|
-
aiUserFetchEventsHourly.status
|
|
9534
|
-
],
|
|
9535
|
-
set: {
|
|
9536
|
-
hits: sql7`${aiUserFetchEventsHourly.hits} + 1`,
|
|
9510
|
+
const tsHourIso = tsHour.toISOString();
|
|
9511
|
+
const status = snap.status ?? 200;
|
|
9512
|
+
db.transaction((tx) => {
|
|
9513
|
+
tx.update(rawEventSamples).set({ eventType: userFetch ? TrafficEventKinds["ai-user-fetch"] : TrafficEventKinds.crawler }).where(eq16(rawEventSamples.id, snap.id)).run();
|
|
9514
|
+
if (userFetch) {
|
|
9515
|
+
tx.insert(aiUserFetchEventsHourly).values({
|
|
9516
|
+
projectId: snap.projectId,
|
|
9517
|
+
sourceId: snap.sourceId,
|
|
9518
|
+
tsHour: tsHourIso,
|
|
9519
|
+
botId: userFetch.botId,
|
|
9520
|
+
operator: userFetch.operator,
|
|
9521
|
+
verificationStatus: userFetch.verificationStatus,
|
|
9522
|
+
pathNormalized: snap.pathNormalized,
|
|
9523
|
+
status,
|
|
9524
|
+
hits: 1,
|
|
9525
|
+
sampledUserAgent: snap.userAgent,
|
|
9526
|
+
createdAt: now,
|
|
9537
9527
|
updatedAt: now
|
|
9538
|
-
}
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9528
|
+
}).onConflictDoUpdate({
|
|
9529
|
+
target: [
|
|
9530
|
+
aiUserFetchEventsHourly.projectId,
|
|
9531
|
+
aiUserFetchEventsHourly.sourceId,
|
|
9532
|
+
aiUserFetchEventsHourly.tsHour,
|
|
9533
|
+
aiUserFetchEventsHourly.botId,
|
|
9534
|
+
aiUserFetchEventsHourly.verificationStatus,
|
|
9535
|
+
aiUserFetchEventsHourly.pathNormalized,
|
|
9536
|
+
aiUserFetchEventsHourly.status
|
|
9537
|
+
],
|
|
9538
|
+
set: {
|
|
9539
|
+
hits: sql7`${aiUserFetchEventsHourly.hits} + 1`,
|
|
9540
|
+
updatedAt: now
|
|
9541
|
+
}
|
|
9542
|
+
}).run();
|
|
9543
|
+
} else {
|
|
9544
|
+
tx.insert(crawlerEventsHourly).values({
|
|
9545
|
+
projectId: snap.projectId,
|
|
9546
|
+
sourceId: snap.sourceId,
|
|
9547
|
+
tsHour: tsHourIso,
|
|
9548
|
+
botId: classified.botId,
|
|
9549
|
+
operator: classified.operator,
|
|
9550
|
+
verificationStatus: classified.verificationStatus,
|
|
9551
|
+
pathNormalized: snap.pathNormalized,
|
|
9552
|
+
status,
|
|
9553
|
+
hits: 1,
|
|
9554
|
+
sampledUserAgent: snap.userAgent,
|
|
9555
|
+
createdAt: now,
|
|
9566
9556
|
updatedAt: now
|
|
9567
|
-
}
|
|
9568
|
-
|
|
9569
|
-
|
|
9557
|
+
}).onConflictDoUpdate({
|
|
9558
|
+
target: [
|
|
9559
|
+
crawlerEventsHourly.projectId,
|
|
9560
|
+
crawlerEventsHourly.sourceId,
|
|
9561
|
+
crawlerEventsHourly.tsHour,
|
|
9562
|
+
crawlerEventsHourly.botId,
|
|
9563
|
+
crawlerEventsHourly.verificationStatus,
|
|
9564
|
+
crawlerEventsHourly.pathNormalized,
|
|
9565
|
+
crawlerEventsHourly.status
|
|
9566
|
+
],
|
|
9567
|
+
set: {
|
|
9568
|
+
hits: sql7`${crawlerEventsHourly.hits} + 1`,
|
|
9569
|
+
updatedAt: now
|
|
9570
|
+
}
|
|
9571
|
+
}).run();
|
|
9572
|
+
}
|
|
9573
|
+
});
|
|
9570
9574
|
}
|
|
9571
9575
|
if (!isDryRun) {
|
|
9572
9576
|
const afterRow = db.select({ n: sql7`count(*)` }).from(rawEventSamples).where(and13(
|
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-XYZMJA3L.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-76DCR646.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-R6QOYKRW.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-DCCEKIJ7.js";
|
|
133
133
|
|
|
134
134
|
// src/cli.ts
|
|
135
135
|
import { pathToFileURL } from "url";
|
|
@@ -3947,6 +3947,11 @@ async function gaSync(project, opts) {
|
|
|
3947
3947
|
if (opts?.days) body.days = opts.days;
|
|
3948
3948
|
if (opts?.only) body.only = opts.only;
|
|
3949
3949
|
const result = await client.gaSync(project, body);
|
|
3950
|
+
if (result.clamped) {
|
|
3951
|
+
console.error(
|
|
3952
|
+
`Warning: requested ${result.requestedDays} days but synced ${result.days} \u2014 GA4's supported sync window bounded the request. Only ${result.days} days of history were written.`
|
|
3953
|
+
);
|
|
3954
|
+
}
|
|
3950
3955
|
if (isMachineFormat(opts?.format)) {
|
|
3951
3956
|
console.log(JSON.stringify(result, null, 2));
|
|
3952
3957
|
return;
|
|
@@ -3958,7 +3963,7 @@ async function gaSync(project, opts) {
|
|
|
3958
3963
|
console.log(` Page rows: ${result.rowCount}`);
|
|
3959
3964
|
console.log(` AI rows: ${result.aiReferralCount}`);
|
|
3960
3965
|
console.log(` Social rows: ${result.socialReferralCount}`);
|
|
3961
|
-
console.log(` Period: ${result.days} days`);
|
|
3966
|
+
console.log(` Period: ${result.days} days${result.clamped ? ` (requested ${result.requestedDays})` : ""}`);
|
|
3962
3967
|
console.log(` Synced at: ${result.syncedAt}`);
|
|
3963
3968
|
}
|
|
3964
3969
|
async function gaTraffic(project, opts) {
|
|
@@ -6327,6 +6332,16 @@ async function trafficStatus(project, opts) {
|
|
|
6327
6332
|
console.log("");
|
|
6328
6333
|
}
|
|
6329
6334
|
}
|
|
6335
|
+
function formatVerificationProvenance(event) {
|
|
6336
|
+
const parts = (event.verificationManifests ?? []).map(
|
|
6337
|
+
({ manifestId, manifest, hits }) => `${manifest?.version ?? manifestId}\xD7${hits}`
|
|
6338
|
+
);
|
|
6339
|
+
const unattributedHits = event.verificationUnattributedHits ?? event.hits;
|
|
6340
|
+
if (unattributedHits > 0) {
|
|
6341
|
+
parts.push(`legacy/unattributed ${unattributedHits}`);
|
|
6342
|
+
}
|
|
6343
|
+
return `provenance ${parts.length > 0 ? parts.join(" \xB7 ") : "none"}`;
|
|
6344
|
+
}
|
|
6330
6345
|
function formatEventLine(event) {
|
|
6331
6346
|
switch (event.kind) {
|
|
6332
6347
|
case TrafficEventKinds.crawler:
|
|
@@ -6335,6 +6350,7 @@ function formatEventLine(event) {
|
|
|
6335
6350
|
"crawler",
|
|
6336
6351
|
event.botId,
|
|
6337
6352
|
event.verificationStatus,
|
|
6353
|
+
formatVerificationProvenance(event),
|
|
6338
6354
|
String(event.status),
|
|
6339
6355
|
`${event.pathNormalized} [${event.pathClass}]`,
|
|
6340
6356
|
`${event.hits} hits`
|
|
@@ -6345,6 +6361,7 @@ function formatEventLine(event) {
|
|
|
6345
6361
|
"ai-user-fetch",
|
|
6346
6362
|
event.botId,
|
|
6347
6363
|
event.verificationStatus,
|
|
6364
|
+
formatVerificationProvenance(event),
|
|
6348
6365
|
String(event.status),
|
|
6349
6366
|
event.pathNormalized,
|
|
6350
6367
|
`${event.hits} hits`
|
|
@@ -6420,7 +6437,7 @@ async function trafficEvents(project, opts) {
|
|
|
6420
6437
|
console.log("No events in this window.");
|
|
6421
6438
|
return;
|
|
6422
6439
|
}
|
|
6423
|
-
console.log(" TS_HOUR KIND IDENTITY EVIDENCE/STATUS PATH COUNT");
|
|
6440
|
+
console.log(" TS_HOUR KIND IDENTITY EVIDENCE/STATUS PROVENANCE PATH COUNT");
|
|
6424
6441
|
for (const event of result.events) {
|
|
6425
6442
|
console.log(` ${formatEventLine(event)}`);
|
|
6426
6443
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XYZMJA3L.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-76DCR646.js";
|
|
7
|
+
import "./chunk-R6QOYKRW.js";
|
|
8
|
+
import "./chunk-DCCEKIJ7.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-76DCR646.js";
|
|
7
7
|
import {
|
|
8
8
|
isReadOnlyKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DCCEKIJ7.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": "@ainyc/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.164.1",
|
|
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",
|
|
@@ -70,28 +70,28 @@
|
|
|
70
70
|
"@types/node-cron": "^3.0.11",
|
|
71
71
|
"tsup": "^8.5.1",
|
|
72
72
|
"tsx": "^4.19.0",
|
|
73
|
-
"@ainyc/canonry-api-routes": "0.0.0",
|
|
74
73
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
75
74
|
"@ainyc/canonry-config": "0.0.0",
|
|
76
75
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
77
76
|
"@ainyc/canonry-db": "0.0.0",
|
|
77
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
78
78
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
79
79
|
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
80
|
-
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
81
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
82
80
|
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
83
|
-
"@ainyc/canonry-integration-
|
|
81
|
+
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
84
82
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
85
|
-
"@ainyc/canonry-integration-
|
|
86
|
-
"@ainyc/canonry-integration-
|
|
83
|
+
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
84
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
87
85
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
86
|
+
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
87
|
+
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
88
88
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
89
|
-
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
90
89
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
91
|
-
"@ainyc/canonry-
|
|
90
|
+
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
91
|
+
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
92
92
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
93
|
-
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
94
93
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
94
|
+
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
95
95
|
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|