@ainyc/canonry 4.163.1 → 4.164.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.
Files changed (24) hide show
  1. package/assets/assets/{AuditHistoryPanel-CcoUJRWK.js → AuditHistoryPanel-CD1GVkS9.js} +1 -1
  2. package/assets/assets/{BacklinksPage-CPJcgZMH.js → BacklinksPage-B0Ijhntp.js} +1 -1
  3. package/assets/assets/{HistoryPage-CA5hKRuu.js → HistoryPage-DIKtpT_z.js} +1 -1
  4. package/assets/assets/{MeasurementPropertyPage-DxrhxQ0q.js → MeasurementPropertyPage-BfPwwIsT.js} +1 -1
  5. package/assets/assets/{ProjectPage-CHhf6m-z.js → ProjectPage-3czWArKE.js} +1 -1
  6. package/assets/assets/{RunRow-D_8fID7_.js → RunRow-CHyd0gQH.js} +1 -1
  7. package/assets/assets/{RunsPage-vSxIzGSk.js → RunsPage-Dujt0SQ5.js} +1 -1
  8. package/assets/assets/{SettingsPage-CooTu-Qq.js → SettingsPage-CJE9Oeg9.js} +1 -1
  9. package/assets/assets/{SiteHealthSection-B84ag_7p.js → SiteHealthSection-DvuvziPJ.js} +3 -3
  10. package/assets/assets/{TrafficPage-CXLxgcDy.js → TrafficPage-B0tru9ek.js} +1 -1
  11. package/assets/assets/{TrafficSourceDetailPage-DH47U88b.js → TrafficSourceDetailPage-DshEUtQX.js} +1 -1
  12. package/assets/assets/{extract-error-message-DclWcEAn.js → extract-error-message-O2dirpiH.js} +1 -1
  13. package/assets/assets/{index-DH8-WPHn.js → index-C_y0aGQL.js} +19 -19
  14. package/assets/assets/{react-sigma_core.esm.min-DXADa_zN.js → react-sigma_core.esm.min-sVSSzmzq.js} +1 -1
  15. package/assets/index.html +1 -1
  16. package/dist/{chunk-ESH3LPYQ.js → chunk-BFGHZ2GU.js} +15 -0
  17. package/dist/{chunk-INXI6PO7.js → chunk-C4WKYU5C.js} +1 -1
  18. package/dist/{chunk-G5UZTODF.js → chunk-GCQPFCP2.js} +786 -95
  19. package/dist/{chunk-MRHYSEZB.js → chunk-RULHNUBH.js} +66 -62
  20. package/dist/cli.js +17 -5
  21. package/dist/index.js +4 -4
  22. package/dist/{intelligence-service-AFAFGLCM.js → intelligence-service-Z3XS2UXQ.js} +2 -2
  23. package/dist/mcp.js +2 -2
  24. package/package.json +8 -8
@@ -10,7 +10,7 @@ import {
10
10
  loadConfig,
11
11
  loadConfigRaw,
12
12
  saveConfigPatch
13
- } from "./chunk-INXI6PO7.js";
13
+ } from "./chunk-C4WKYU5C.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-G5UZTODF.js";
142
+ } from "./chunk-GCQPFCP2.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-ESH3LPYQ.js";
256
+ } from "./chunk-BFGHZ2GU.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-AFAFGLCM.js");
9087
+ const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-Z3XS2UXQ.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
- if (userFetch) {
9512
- db.insert(aiUserFetchEventsHourly).values({
9513
- projectId: snap.projectId,
9514
- sourceId: snap.sourceId,
9515
- tsHour: tsHour.toISOString(),
9516
- botId: userFetch.botId,
9517
- operator: userFetch.operator,
9518
- verificationStatus: userFetch.verificationStatus,
9519
- pathNormalized: snap.pathNormalized,
9520
- status: snap.status ?? 200,
9521
- hits: 1,
9522
- sampledUserAgent: snap.userAgent,
9523
- createdAt: now,
9524
- updatedAt: now
9525
- }).onConflictDoUpdate({
9526
- target: [
9527
- aiUserFetchEventsHourly.projectId,
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
- }).run();
9540
- } else {
9541
- db.insert(crawlerEventsHourly).values({
9542
- projectId: snap.projectId,
9543
- sourceId: snap.sourceId,
9544
- tsHour: tsHour.toISOString(),
9545
- botId: classified.botId,
9546
- operator: classified.operator,
9547
- verificationStatus: classified.verificationStatus,
9548
- pathNormalized: snap.pathNormalized,
9549
- status: snap.status ?? 200,
9550
- hits: 1,
9551
- sampledUserAgent: snap.userAgent,
9552
- createdAt: now,
9553
- updatedAt: now
9554
- }).onConflictDoUpdate({
9555
- target: [
9556
- crawlerEventsHourly.projectId,
9557
- crawlerEventsHourly.sourceId,
9558
- crawlerEventsHourly.tsHour,
9559
- crawlerEventsHourly.botId,
9560
- crawlerEventsHourly.verificationStatus,
9561
- crawlerEventsHourly.pathNormalized,
9562
- crawlerEventsHourly.status
9563
- ],
9564
- set: {
9565
- hits: sql7`${crawlerEventsHourly.hits} + 1`,
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
- }).run();
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-MRHYSEZB.js";
34
+ } from "./chunk-RULHNUBH.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-INXI6PO7.js";
54
+ } from "./chunk-C4WKYU5C.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-G5UZTODF.js";
68
+ } from "./chunk-GCQPFCP2.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-ESH3LPYQ.js";
132
+ } from "./chunk-BFGHZ2GU.js";
133
133
 
134
134
  // src/cli.ts
135
135
  import { pathToFileURL } from "url";
@@ -6327,6 +6327,16 @@ async function trafficStatus(project, opts) {
6327
6327
  console.log("");
6328
6328
  }
6329
6329
  }
6330
+ function formatVerificationProvenance(event) {
6331
+ const parts = (event.verificationManifests ?? []).map(
6332
+ ({ manifestId, manifest, hits }) => `${manifest?.version ?? manifestId}\xD7${hits}`
6333
+ );
6334
+ const unattributedHits = event.verificationUnattributedHits ?? event.hits;
6335
+ if (unattributedHits > 0) {
6336
+ parts.push(`legacy/unattributed ${unattributedHits}`);
6337
+ }
6338
+ return `provenance ${parts.length > 0 ? parts.join(" \xB7 ") : "none"}`;
6339
+ }
6330
6340
  function formatEventLine(event) {
6331
6341
  switch (event.kind) {
6332
6342
  case TrafficEventKinds.crawler:
@@ -6335,6 +6345,7 @@ function formatEventLine(event) {
6335
6345
  "crawler",
6336
6346
  event.botId,
6337
6347
  event.verificationStatus,
6348
+ formatVerificationProvenance(event),
6338
6349
  String(event.status),
6339
6350
  `${event.pathNormalized} [${event.pathClass}]`,
6340
6351
  `${event.hits} hits`
@@ -6345,6 +6356,7 @@ function formatEventLine(event) {
6345
6356
  "ai-user-fetch",
6346
6357
  event.botId,
6347
6358
  event.verificationStatus,
6359
+ formatVerificationProvenance(event),
6348
6360
  String(event.status),
6349
6361
  event.pathNormalized,
6350
6362
  `${event.hits} hits`
@@ -6420,7 +6432,7 @@ async function trafficEvents(project, opts) {
6420
6432
  console.log("No events in this window.");
6421
6433
  return;
6422
6434
  }
6423
- console.log(" TS_HOUR KIND IDENTITY EVIDENCE/STATUS PATH COUNT");
6435
+ console.log(" TS_HOUR KIND IDENTITY EVIDENCE/STATUS PROVENANCE PATH COUNT");
6424
6436
  for (const event of result.events) {
6425
6437
  console.log(` ${formatEventLine(event)}`);
6426
6438
  }
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-MRHYSEZB.js";
3
+ } from "./chunk-RULHNUBH.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-INXI6PO7.js";
7
- import "./chunk-G5UZTODF.js";
8
- import "./chunk-ESH3LPYQ.js";
6
+ } from "./chunk-C4WKYU5C.js";
7
+ import "./chunk-GCQPFCP2.js";
8
+ import "./chunk-BFGHZ2GU.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-G5UZTODF.js";
4
- import "./chunk-ESH3LPYQ.js";
3
+ } from "./chunk-GCQPFCP2.js";
4
+ import "./chunk-BFGHZ2GU.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  PACKAGE_VERSION,
4
4
  canonryMcpTools,
5
5
  createApiClient
6
- } from "./chunk-INXI6PO7.js";
6
+ } from "./chunk-C4WKYU5C.js";
7
7
  import {
8
8
  isReadOnlyKey
9
- } from "./chunk-ESH3LPYQ.js";
9
+ } from "./chunk-BFGHZ2GU.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.163.1",
3
+ "version": "4.164.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",
@@ -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
- "@ainyc/canonry-config": "0.0.0",
76
74
  "@ainyc/canonry-contracts": "0.0.0",
77
- "@ainyc/canonry-db": "0.0.0",
75
+ "@ainyc/canonry-api-routes": "0.0.0",
76
+ "@ainyc/canonry-config": "0.0.0",
78
77
  "@ainyc/canonry-integration-bing": "0.0.0",
78
+ "@ainyc/canonry-db": "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",
81
+ "@ainyc/canonry-integration-openai-ads": "0.0.0",
83
82
  "@ainyc/canonry-integration-commoncrawl": "0.0.0",
84
83
  "@ainyc/canonry-integration-google": "0.0.0",
85
84
  "@ainyc/canonry-integration-google-places": "0.0.0",
85
+ "@ainyc/canonry-integration-cloud-run": "0.0.0",
86
86
  "@ainyc/canonry-integration-traffic": "0.0.0",
87
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
87
88
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
88
89
  "@ainyc/canonry-intelligence": "0.0.0",
89
90
  "@ainyc/canonry-provider-cdp": "0.0.0",
90
91
  "@ainyc/canonry-provider-claude": "0.0.0",
91
- "@ainyc/canonry-integration-wordpress": "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": {