@ainyc/canonry 4.51.4 → 4.54.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/server-side-traffic.md +8 -5
- package/assets/assets/{BacklinksPage-9TlM08Wf.js → BacklinksPage-BXFT4pLI.js} +1 -1
- package/assets/assets/ProjectPage-DAtd9Vay.js +6 -0
- package/assets/assets/{RunRow-D7qdWWRl.js → RunRow-38dDceGl.js} +1 -1
- package/assets/assets/{RunsPage-CvewepfU.js → RunsPage-AJnFLtaE.js} +1 -1
- package/assets/assets/{SettingsPage-C7BvAhiB.js → SettingsPage-FT9ZAvFH.js} +1 -1
- package/assets/assets/{TrafficPage-DC3NhFOh.js → TrafficPage-B4A3oO8M.js} +1 -1
- package/assets/assets/TrafficSourceDetailPage-8NYU1TA6.js +1 -0
- package/assets/assets/{arrow-left-Agb02DMK.js → arrow-left-DgI0X1Q1.js} +1 -1
- package/assets/assets/{index-DeGyEwik.css → index-Bm3JQsW0.css} +1 -1
- package/assets/assets/{index-DTCZ93Ne.js → index-DLPKqyhx.js} +50 -50
- package/assets/assets/{server-traffic-C-0Ndjpw.js → server-traffic-GqiQYm6x.js} +1 -1
- package/assets/assets/{trash-2-lkrXVRRm.js → trash-2-BwPzJ8NI.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-WBO5S3IX.js → chunk-CRO6Q25G.js} +533 -65
- package/dist/{chunk-HMZKIOLG.js → chunk-J7MX3YOH.js} +1 -1
- package/dist/{chunk-QZ5XSM6C.js → chunk-JHAHNKSN.js} +103 -1
- package/dist/{chunk-FYGBW3SM.js → chunk-VZPDBHBW.js} +29 -1
- package/dist/cli.js +40 -27
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-2XL2M7QP.js → intelligence-service-OCREQUCQ.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +12 -12
- package/assets/assets/ProjectPage-CD591qDz.js +0 -6
- package/assets/assets/TrafficSourceDetailPage-BvtTA6rs.js +0 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
categoryLabel,
|
|
11
11
|
determineAnswerMentioned,
|
|
12
12
|
normalizeProjectDomain
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VZPDBHBW.js";
|
|
14
14
|
|
|
15
15
|
// src/intelligence-service.ts
|
|
16
16
|
import { eq, desc, asc, and, ne, or, inArray } from "drizzle-orm";
|
|
@@ -27,6 +27,7 @@ __export(schema_exports, {
|
|
|
27
27
|
agentMemory: () => agentMemory,
|
|
28
28
|
agentSessions: () => agentSessions,
|
|
29
29
|
aiReferralEventsHourly: () => aiReferralEventsHourly,
|
|
30
|
+
aiUserFetchEventsHourly: () => aiUserFetchEventsHourly,
|
|
30
31
|
apiKeys: () => apiKeys,
|
|
31
32
|
auditLog: () => auditLog,
|
|
32
33
|
backlinkDomains: () => backlinkDomains,
|
|
@@ -643,6 +644,34 @@ var crawlerEventsHourly = sqliteTable("crawler_events_hourly", {
|
|
|
643
644
|
index("idx_crawler_hourly_project_ts").on(table.projectId, table.tsHour),
|
|
644
645
|
index("idx_crawler_hourly_path").on(table.projectId, table.pathNormalized)
|
|
645
646
|
]);
|
|
647
|
+
var aiUserFetchEventsHourly = sqliteTable("ai_user_fetch_events_hourly", {
|
|
648
|
+
projectId: text("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
649
|
+
sourceId: text("source_id").notNull().references(() => trafficSources.id, { onDelete: "cascade" }),
|
|
650
|
+
tsHour: text("ts_hour").notNull(),
|
|
651
|
+
botId: text("bot_id").notNull(),
|
|
652
|
+
operator: text("operator").notNull(),
|
|
653
|
+
verificationStatus: text("verification_status").notNull(),
|
|
654
|
+
pathNormalized: text("path_normalized").notNull(),
|
|
655
|
+
status: integer("status").notNull(),
|
|
656
|
+
hits: integer("hits").notNull().default(0),
|
|
657
|
+
sampledUserAgent: text("sampled_user_agent"),
|
|
658
|
+
createdAt: text("created_at").notNull(),
|
|
659
|
+
updatedAt: text("updated_at").notNull()
|
|
660
|
+
}, (table) => [
|
|
661
|
+
primaryKey({
|
|
662
|
+
columns: [
|
|
663
|
+
table.projectId,
|
|
664
|
+
table.sourceId,
|
|
665
|
+
table.tsHour,
|
|
666
|
+
table.botId,
|
|
667
|
+
table.verificationStatus,
|
|
668
|
+
table.pathNormalized,
|
|
669
|
+
table.status
|
|
670
|
+
]
|
|
671
|
+
}),
|
|
672
|
+
index("idx_ai_user_fetch_hourly_project_ts").on(table.projectId, table.tsHour),
|
|
673
|
+
index("idx_ai_user_fetch_hourly_path").on(table.projectId, table.pathNormalized)
|
|
674
|
+
]);
|
|
646
675
|
var aiReferralEventsHourly = sqliteTable("ai_referral_events_hourly", {
|
|
647
676
|
projectId: text("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
648
677
|
sourceId: text("source_id").notNull().references(() => trafficSources.id, { onDelete: "cascade" }),
|
|
@@ -2056,6 +2085,78 @@ var MIGRATION_VERSIONS = [
|
|
|
2056
2085
|
`ALTER TABLE audit_log ADD COLUMN user_agent TEXT`,
|
|
2057
2086
|
`ALTER TABLE audit_log ADD COLUMN actor_session TEXT`
|
|
2058
2087
|
]
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
version: 64,
|
|
2091
|
+
name: "ai-user-fetch-events-hourly",
|
|
2092
|
+
// Splits per-user fetches (ChatGPT-User, Perplexity-User) out of
|
|
2093
|
+
// crawler_events_hourly so the dashboard / API can distinguish bulk
|
|
2094
|
+
// machine crawl from human-in-the-loop fetch. Bot IDs are pinned to the
|
|
2095
|
+
// two `purpose: 'user-agent'` rules that existed before this change —
|
|
2096
|
+
// future user-fetch UAs land in the new table directly via the
|
|
2097
|
+
// refactored classifier and never need a backfill.
|
|
2098
|
+
//
|
|
2099
|
+
// Statements are idempotent: CREATE/INDEX are IF NOT EXISTS; the
|
|
2100
|
+
// INSERT … SELECT uses ON CONFLICT DO NOTHING (composite PK rows
|
|
2101
|
+
// already moved skip silently); the DELETE keys on `bot_id`, so a
|
|
2102
|
+
// second run is a no-op after the first DELETE drains the source.
|
|
2103
|
+
statements: [
|
|
2104
|
+
`CREATE TABLE IF NOT EXISTS ai_user_fetch_events_hourly (
|
|
2105
|
+
project_id TEXT NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
|
|
2106
|
+
source_id TEXT NOT NULL REFERENCES traffic_sources(id) ON DELETE CASCADE,
|
|
2107
|
+
ts_hour TEXT NOT NULL,
|
|
2108
|
+
bot_id TEXT NOT NULL,
|
|
2109
|
+
operator TEXT NOT NULL,
|
|
2110
|
+
verification_status TEXT NOT NULL,
|
|
2111
|
+
path_normalized TEXT NOT NULL,
|
|
2112
|
+
status INTEGER NOT NULL,
|
|
2113
|
+
hits INTEGER NOT NULL DEFAULT 0,
|
|
2114
|
+
sampled_user_agent TEXT,
|
|
2115
|
+
created_at TEXT NOT NULL,
|
|
2116
|
+
updated_at TEXT NOT NULL,
|
|
2117
|
+
PRIMARY KEY (project_id, source_id, ts_hour, bot_id, verification_status, path_normalized, status)
|
|
2118
|
+
)`,
|
|
2119
|
+
`CREATE INDEX IF NOT EXISTS idx_ai_user_fetch_hourly_project_ts ON ai_user_fetch_events_hourly(project_id, ts_hour)`,
|
|
2120
|
+
`CREATE INDEX IF NOT EXISTS idx_ai_user_fetch_hourly_path ON ai_user_fetch_events_hourly(project_id, path_normalized)`,
|
|
2121
|
+
`INSERT INTO ai_user_fetch_events_hourly
|
|
2122
|
+
(project_id, source_id, ts_hour, bot_id, operator, verification_status, path_normalized, status, hits, sampled_user_agent, created_at, updated_at)
|
|
2123
|
+
SELECT project_id, source_id, ts_hour, bot_id, operator, verification_status, path_normalized, status, hits, sampled_user_agent, created_at, updated_at
|
|
2124
|
+
FROM crawler_events_hourly
|
|
2125
|
+
WHERE bot_id IN ('openai-chatgpt-user', 'perplexity-user')
|
|
2126
|
+
ON CONFLICT DO NOTHING`,
|
|
2127
|
+
`DELETE FROM crawler_events_hourly WHERE bot_id IN ('openai-chatgpt-user', 'perplexity-user')`
|
|
2128
|
+
]
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
version: 65,
|
|
2132
|
+
name: "split-mistral-ai-rule",
|
|
2133
|
+
// The pre-existing `mistral-ai` rule matched both `MistralAI-User/*`
|
|
2134
|
+
// (per-user fetch) and `MistralBot/*` (bulk crawl) under one id, so
|
|
2135
|
+
// every historical row landed in crawler_events_hourly with
|
|
2136
|
+
// bot_id='mistral-ai'. The rule is now split into `mistral-ai-user`
|
|
2137
|
+
// (purpose: 'user-agent') and `mistral-bot` (purpose: 'crawl'); this
|
|
2138
|
+
// migration best-effort routes the legacy rows using the bucket's
|
|
2139
|
+
// representative sampled_user_agent.
|
|
2140
|
+
//
|
|
2141
|
+
// Mixed-UA buckets (where a single (project, source, hour, path,
|
|
2142
|
+
// status) accumulated both UAs under the old shared id) are routed
|
|
2143
|
+
// by whichever UA happened to be sampled — the bucket-key granularity
|
|
2144
|
+
// doesn't preserve per-event UAs, so any heuristic has the same
|
|
2145
|
+
// limitation. Going forward the split rules write to disjoint tables.
|
|
2146
|
+
//
|
|
2147
|
+
// Idempotent: the INSERT…SELECT uses ON CONFLICT DO NOTHING; the
|
|
2148
|
+
// UPDATE and DELETE both filter on bot_id='mistral-ai', so a second
|
|
2149
|
+
// run finds no rows after the first apply.
|
|
2150
|
+
statements: [
|
|
2151
|
+
`INSERT INTO ai_user_fetch_events_hourly
|
|
2152
|
+
(project_id, source_id, ts_hour, bot_id, operator, verification_status, path_normalized, status, hits, sampled_user_agent, created_at, updated_at)
|
|
2153
|
+
SELECT project_id, source_id, ts_hour, 'mistral-ai-user', operator, verification_status, path_normalized, status, hits, sampled_user_agent, created_at, updated_at
|
|
2154
|
+
FROM crawler_events_hourly
|
|
2155
|
+
WHERE bot_id = 'mistral-ai' AND sampled_user_agent LIKE '%MistralAI-User%'
|
|
2156
|
+
ON CONFLICT DO NOTHING`,
|
|
2157
|
+
`DELETE FROM crawler_events_hourly WHERE bot_id = 'mistral-ai' AND sampled_user_agent LIKE '%MistralAI-User%'`,
|
|
2158
|
+
`UPDATE crawler_events_hourly SET bot_id = 'mistral-bot' WHERE bot_id = 'mistral-ai'`
|
|
2159
|
+
]
|
|
2059
2160
|
}
|
|
2060
2161
|
];
|
|
2061
2162
|
function isDuplicateColumnError(err) {
|
|
@@ -4436,6 +4537,7 @@ export {
|
|
|
4436
4537
|
agentMemory,
|
|
4437
4538
|
trafficSources,
|
|
4438
4539
|
crawlerEventsHourly,
|
|
4540
|
+
aiUserFetchEventsHourly,
|
|
4439
4541
|
aiReferralEventsHourly,
|
|
4440
4542
|
rawEventSamples,
|
|
4441
4543
|
discoverySessions,
|
|
@@ -2646,6 +2646,15 @@ var serverActivitySectionSchema = z21.object({
|
|
|
2646
2646
|
verifiedCrawlerHits: z21.object({ current: z21.number(), prior: z21.number(), deltaPct: z21.number().nullable() }),
|
|
2647
2647
|
/** Last-7d total unverified crawler hits, separated from verified trust metrics. */
|
|
2648
2648
|
unverifiedCrawlerHits: z21.object({ current: z21.number(), prior: z21.number(), deltaPct: z21.number().nullable() }),
|
|
2649
|
+
/**
|
|
2650
|
+
* Last-7d on-demand per-user fetches from AI surfaces (ChatGPT-User,
|
|
2651
|
+
* Perplexity-User, MistralAI-User). Disjoint from `verifiedCrawlerHits` /
|
|
2652
|
+
* `unverifiedCrawlerHits` — those measure bulk crawl; this measures human
|
|
2653
|
+
* users asking an AI to read a URL. Counts verified + unverified together
|
|
2654
|
+
* because the operational question for user-fetch is "is this happening?"
|
|
2655
|
+
* not "is this a confirmed bot identity?"
|
|
2656
|
+
*/
|
|
2657
|
+
aiUserFetchHits: z21.object({ current: z21.number(), prior: z21.number(), deltaPct: z21.number().nullable() }),
|
|
2649
2658
|
/** Last-7d AI-referral sessions (sessionized from server-side request evidence). */
|
|
2650
2659
|
referralArrivals: z21.object({ current: z21.number(), prior: z21.number(), deltaPct: z21.number().nullable() }),
|
|
2651
2660
|
/** Per-AI-operator breakdown (OpenAI, Anthropic, Google AI, Perplexity, …). */
|
|
@@ -2654,6 +2663,8 @@ var serverActivitySectionSchema = z21.object({
|
|
|
2654
2663
|
verifiedHits: z21.number(),
|
|
2655
2664
|
/** Shown to agency audience only — claimed-bot UA, rDNS not confirmed. */
|
|
2656
2665
|
unverifiedHits: z21.number(),
|
|
2666
|
+
/** Per-user fetches from this operator's AI surface (ChatGPT-User, …). */
|
|
2667
|
+
userFetchHits: z21.number(),
|
|
2657
2668
|
referralArrivals: z21.number(),
|
|
2658
2669
|
deltaPct: z21.number().nullable()
|
|
2659
2670
|
})),
|
|
@@ -2681,6 +2692,7 @@ var serverActivitySectionSchema = z21.object({
|
|
|
2681
2692
|
dailyTrend: z21.array(z21.object({
|
|
2682
2693
|
date: z21.string(),
|
|
2683
2694
|
verifiedCrawlerHits: z21.number(),
|
|
2695
|
+
userFetchHits: z21.number(),
|
|
2684
2696
|
referralArrivals: z21.number()
|
|
2685
2697
|
})),
|
|
2686
2698
|
/**
|
|
@@ -3198,9 +3210,11 @@ var trafficSyncResponseSchema = z23.object({
|
|
|
3198
3210
|
syncedAt: z23.string(),
|
|
3199
3211
|
pulledEvents: z23.number().int().nonnegative(),
|
|
3200
3212
|
crawlerHits: z23.number().int().nonnegative(),
|
|
3213
|
+
aiUserFetchHits: z23.number().int().nonnegative(),
|
|
3201
3214
|
aiReferralHits: z23.number().int().nonnegative(),
|
|
3202
3215
|
unknownHits: z23.number().int().nonnegative(),
|
|
3203
3216
|
crawlerBucketRows: z23.number().int().nonnegative(),
|
|
3217
|
+
aiUserFetchBucketRows: z23.number().int().nonnegative(),
|
|
3204
3218
|
aiReferralBucketRows: z23.number().int().nonnegative(),
|
|
3205
3219
|
sampleRows: z23.number().int().nonnegative(),
|
|
3206
3220
|
windowStart: z23.string(),
|
|
@@ -3222,6 +3236,7 @@ var trafficBackfillResponseSchema = z23.object({
|
|
|
3222
3236
|
});
|
|
3223
3237
|
var trafficSourceTotalsSchema = z23.object({
|
|
3224
3238
|
crawlerHits: z23.number().int().nonnegative(),
|
|
3239
|
+
aiUserFetchHits: z23.number().int().nonnegative(),
|
|
3225
3240
|
aiReferralHits: z23.number().int().nonnegative(),
|
|
3226
3241
|
sampleCount: z23.number().int().nonnegative()
|
|
3227
3242
|
});
|
|
@@ -3241,7 +3256,7 @@ var trafficSourceDetailDtoSchema = trafficSourceDtoSchema.extend({
|
|
|
3241
3256
|
var trafficStatusResponseSchema = z23.object({
|
|
3242
3257
|
sources: z23.array(trafficSourceDetailDtoSchema)
|
|
3243
3258
|
});
|
|
3244
|
-
var trafficEventKindSchema = z23.enum(["crawler", "ai-referral"]);
|
|
3259
|
+
var trafficEventKindSchema = z23.enum(["crawler", "ai-user-fetch", "ai-referral"]);
|
|
3245
3260
|
var TrafficEventKinds = trafficEventKindSchema.enum;
|
|
3246
3261
|
var trafficCrawlerEventEntrySchema = z23.object({
|
|
3247
3262
|
kind: z23.literal(TrafficEventKinds.crawler),
|
|
@@ -3254,6 +3269,17 @@ var trafficCrawlerEventEntrySchema = z23.object({
|
|
|
3254
3269
|
status: z23.number().int(),
|
|
3255
3270
|
hits: z23.number().int().nonnegative()
|
|
3256
3271
|
});
|
|
3272
|
+
var trafficAiUserFetchEventEntrySchema = z23.object({
|
|
3273
|
+
kind: z23.literal(TrafficEventKinds["ai-user-fetch"]),
|
|
3274
|
+
sourceId: z23.string(),
|
|
3275
|
+
tsHour: z23.string(),
|
|
3276
|
+
botId: z23.string(),
|
|
3277
|
+
operator: z23.string(),
|
|
3278
|
+
verificationStatus: z23.string(),
|
|
3279
|
+
pathNormalized: z23.string(),
|
|
3280
|
+
status: z23.number().int(),
|
|
3281
|
+
hits: z23.number().int().nonnegative()
|
|
3282
|
+
});
|
|
3257
3283
|
var trafficAiReferralEventEntrySchema = z23.object({
|
|
3258
3284
|
kind: z23.literal(TrafficEventKinds["ai-referral"]),
|
|
3259
3285
|
sourceId: z23.string(),
|
|
@@ -3268,6 +3294,7 @@ var trafficAiReferralEventEntrySchema = z23.object({
|
|
|
3268
3294
|
});
|
|
3269
3295
|
var trafficEventEntrySchema = z23.discriminatedUnion("kind", [
|
|
3270
3296
|
trafficCrawlerEventEntrySchema,
|
|
3297
|
+
trafficAiUserFetchEventEntrySchema,
|
|
3271
3298
|
trafficAiReferralEventEntrySchema
|
|
3272
3299
|
]);
|
|
3273
3300
|
var trafficEventsResponseSchema = z23.object({
|
|
@@ -3275,6 +3302,7 @@ var trafficEventsResponseSchema = z23.object({
|
|
|
3275
3302
|
windowEnd: z23.string(),
|
|
3276
3303
|
totals: z23.object({
|
|
3277
3304
|
crawlerHits: z23.number().int().nonnegative(),
|
|
3305
|
+
aiUserFetchHits: z23.number().int().nonnegative(),
|
|
3278
3306
|
aiReferralHits: z23.number().int().nonnegative()
|
|
3279
3307
|
}),
|
|
3280
3308
|
events: z23.array(trafficEventEntrySchema)
|
package/dist/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
setTelemetrySource,
|
|
24
24
|
showFirstRunNotice,
|
|
25
25
|
trackEvent
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-CRO6Q25G.js";
|
|
27
27
|
import {
|
|
28
28
|
CliError,
|
|
29
29
|
EXIT_SYSTEM_ERROR,
|
|
@@ -39,14 +39,14 @@ import {
|
|
|
39
39
|
saveConfig,
|
|
40
40
|
saveConfigPatch,
|
|
41
41
|
usageError
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-J7MX3YOH.js";
|
|
43
43
|
import {
|
|
44
44
|
apiKeys,
|
|
45
45
|
createClient,
|
|
46
46
|
migrate,
|
|
47
47
|
projects,
|
|
48
48
|
queries
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JHAHNKSN.js";
|
|
50
50
|
import {
|
|
51
51
|
CcReleaseSyncStatuses,
|
|
52
52
|
CheckScopes,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
providerQuotaPolicySchema,
|
|
66
66
|
resolveProviderInput,
|
|
67
67
|
skillsClientSchema
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-VZPDBHBW.js";
|
|
69
69
|
|
|
70
70
|
// src/cli.ts
|
|
71
71
|
import { pathToFileURL } from "url";
|
|
@@ -3310,33 +3310,45 @@ async function trafficStatus(project, opts) {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
}
|
|
3312
3312
|
function formatEventLine(event) {
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3313
|
+
switch (event.kind) {
|
|
3314
|
+
case TrafficEventKinds.crawler:
|
|
3315
|
+
return [
|
|
3316
|
+
event.tsHour,
|
|
3317
|
+
"crawler",
|
|
3318
|
+
event.botId,
|
|
3319
|
+
event.verificationStatus,
|
|
3320
|
+
String(event.status),
|
|
3321
|
+
event.pathNormalized,
|
|
3322
|
+
`${event.hits} hits`
|
|
3323
|
+
].join(" ");
|
|
3324
|
+
case TrafficEventKinds["ai-user-fetch"]:
|
|
3325
|
+
return [
|
|
3326
|
+
event.tsHour,
|
|
3327
|
+
"ai-user-fetch",
|
|
3328
|
+
event.botId,
|
|
3329
|
+
event.verificationStatus,
|
|
3330
|
+
String(event.status),
|
|
3331
|
+
event.pathNormalized,
|
|
3332
|
+
`${event.hits} hits`
|
|
3333
|
+
].join(" ");
|
|
3334
|
+
case TrafficEventKinds["ai-referral"]:
|
|
3335
|
+
return [
|
|
3336
|
+
event.tsHour,
|
|
3337
|
+
"ai-referral",
|
|
3338
|
+
event.product,
|
|
3339
|
+
event.evidenceType,
|
|
3340
|
+
event.sourceDomain,
|
|
3341
|
+
event.landingPathNormalized,
|
|
3342
|
+
`${event.hits} hits`
|
|
3343
|
+
].join(" ");
|
|
3323
3344
|
}
|
|
3324
|
-
return [
|
|
3325
|
-
event.tsHour,
|
|
3326
|
-
"ai-referral",
|
|
3327
|
-
event.product,
|
|
3328
|
-
event.evidenceType,
|
|
3329
|
-
event.sourceDomain,
|
|
3330
|
-
event.landingPathNormalized,
|
|
3331
|
-
`${event.hits} hits`
|
|
3332
|
-
].join(" ");
|
|
3333
3345
|
}
|
|
3334
3346
|
async function trafficEvents(project, opts) {
|
|
3335
|
-
if (opts.kind && opts.kind !== "all" && opts.kind !== TrafficEventKinds.crawler && opts.kind !== TrafficEventKinds["ai-referral"]) {
|
|
3347
|
+
if (opts.kind && opts.kind !== "all" && opts.kind !== TrafficEventKinds.crawler && opts.kind !== TrafficEventKinds["ai-user-fetch"] && opts.kind !== TrafficEventKinds["ai-referral"]) {
|
|
3336
3348
|
throw new CliError({
|
|
3337
3349
|
code: "TRAFFIC_INVALID_KIND",
|
|
3338
|
-
message: `--kind must be one of: all, ${TrafficEventKinds.crawler}, ${TrafficEventKinds["ai-referral"]}`,
|
|
3339
|
-
displayMessage: `Error: --kind must be "all", "${TrafficEventKinds.crawler}", or "${TrafficEventKinds["ai-referral"]}"`,
|
|
3350
|
+
message: `--kind must be one of: all, ${TrafficEventKinds.crawler}, ${TrafficEventKinds["ai-user-fetch"]}, ${TrafficEventKinds["ai-referral"]}`,
|
|
3351
|
+
displayMessage: `Error: --kind must be "all", "${TrafficEventKinds.crawler}", "${TrafficEventKinds["ai-user-fetch"]}", or "${TrafficEventKinds["ai-referral"]}"`,
|
|
3340
3352
|
details: { project, kind: opts.kind }
|
|
3341
3353
|
});
|
|
3342
3354
|
}
|
|
@@ -3358,7 +3370,8 @@ async function trafficEvents(project, opts) {
|
|
|
3358
3370
|
return;
|
|
3359
3371
|
}
|
|
3360
3372
|
console.log(`Traffic events for "${project}" ${result.windowStart} \u2192 ${result.windowEnd}`);
|
|
3361
|
-
console.log(` Crawler hits (window):
|
|
3373
|
+
console.log(` Crawler hits (window): ${result.totals.crawlerHits}`);
|
|
3374
|
+
console.log(` AI user-fetch hits (window): ${result.totals.aiUserFetchHits}`);
|
|
3362
3375
|
console.log(` AI referral sessions (window): ${result.totals.aiReferralHits}`);
|
|
3363
3376
|
console.log("");
|
|
3364
3377
|
if (result.events.length === 0) {
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CRO6Q25G.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-J7MX3YOH.js";
|
|
7
|
+
import "./chunk-JHAHNKSN.js";
|
|
8
|
+
import "./chunk-VZPDBHBW.js";
|
|
9
9
|
export {
|
|
10
10
|
createServer,
|
|
11
11
|
loadConfig
|
package/dist/mcp.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
CliError,
|
|
3
3
|
canonryMcpTools,
|
|
4
4
|
createApiClient
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-J7MX3YOH.js";
|
|
6
|
+
import "./chunk-VZPDBHBW.js";
|
|
7
7
|
|
|
8
8
|
// src/mcp/cli.ts
|
|
9
9
|
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.54.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",
|
|
@@ -61,23 +61,23 @@
|
|
|
61
61
|
"tsup": "^8.5.1",
|
|
62
62
|
"tsx": "^4.19.0",
|
|
63
63
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
64
|
-
"@ainyc/canonry-config": "0.0.0",
|
|
65
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
66
|
-
"@ainyc/canonry-db": "0.0.0",
|
|
67
64
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
65
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
66
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
67
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
68
68
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
69
|
-
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
70
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
71
69
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
72
|
-
"@ainyc/canonry-integration-
|
|
73
|
-
"@ainyc/canonry-integration-google": "0.0.0",
|
|
74
|
-
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
70
|
+
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
75
71
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
72
|
+
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
73
|
+
"@ainyc/canonry-integration-wordpress": "1.0.0",
|
|
74
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
75
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
76
76
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
77
|
-
"@ainyc/canonry-
|
|
77
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
78
|
+
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
78
79
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
79
|
-
"@ainyc/canonry-provider-
|
|
80
|
-
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
80
|
+
"@ainyc/canonry-provider-local": "0.0.0"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|