@ainyc/canonry 4.1.3 → 4.2.2
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/assets/{index-BbhhYPML.js → index-DoJfQkim.js} +122 -122
- package/assets/index.html +1 -1
- package/dist/{chunk-AXMSAMKN.js → chunk-7YSI4GFA.js} +758 -26
- package/dist/{chunk-JV6X6AFT.js → chunk-HJZY4EOE.js} +274 -232
- package/dist/{chunk-KCETXLDF.js → chunk-SR7TGHHG.js} +18 -6
- package/dist/{chunk-O5JZQUPX.js → chunk-T2I6AO7D.js} +10 -1
- package/dist/cli.js +87 -18
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-WPY4PDBU.js → intelligence-service-CQGAXKKN.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +8 -8
|
@@ -1509,7 +1509,16 @@ var projectSearchInsightHitSchema = z15.object({
|
|
|
1509
1509
|
kind: z15.literal("insight"),
|
|
1510
1510
|
id: z15.string(),
|
|
1511
1511
|
runId: z15.string().nullable(),
|
|
1512
|
-
type: z15.enum([
|
|
1512
|
+
type: z15.enum([
|
|
1513
|
+
"regression",
|
|
1514
|
+
"gain",
|
|
1515
|
+
"opportunity",
|
|
1516
|
+
"first-citation",
|
|
1517
|
+
"provider-pickup",
|
|
1518
|
+
"persistent-gap",
|
|
1519
|
+
"competitor-gained",
|
|
1520
|
+
"competitor-lost"
|
|
1521
|
+
]),
|
|
1513
1522
|
severity: z15.enum(["critical", "high", "medium", "low"]),
|
|
1514
1523
|
title: z15.string(),
|
|
1515
1524
|
query: z15.string(),
|
package/dist/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
setGoogleAuthConfig,
|
|
19
19
|
showFirstRunNotice,
|
|
20
20
|
trackEvent
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HJZY4EOE.js";
|
|
22
22
|
import {
|
|
23
23
|
CliError,
|
|
24
24
|
EXIT_SYSTEM_ERROR,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
saveConfig,
|
|
34
34
|
saveConfigPatch,
|
|
35
35
|
usageError
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-SR7TGHHG.js";
|
|
37
37
|
import {
|
|
38
38
|
apiKeys,
|
|
39
39
|
competitors,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
projects,
|
|
46
46
|
querySnapshots,
|
|
47
47
|
runs
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-7YSI4GFA.js";
|
|
49
49
|
import {
|
|
50
50
|
CcReleaseSyncStatuses,
|
|
51
51
|
CheckScopes,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
providerQuotaPolicySchema,
|
|
65
65
|
resolveProviderInput,
|
|
66
66
|
skillsClientSchema
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-T2I6AO7D.js";
|
|
68
68
|
|
|
69
69
|
// src/cli.ts
|
|
70
70
|
import { pathToFileURL } from "url";
|
|
@@ -580,7 +580,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
580
580
|
return result;
|
|
581
581
|
}
|
|
582
582
|
async function backfillInsightsCommand(project, opts) {
|
|
583
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
583
|
+
const { IntelligenceService } = await import("./intelligence-service-CQGAXKKN.js");
|
|
584
584
|
const config = loadConfig();
|
|
585
585
|
const db = createClient(config.database);
|
|
586
586
|
migrate(db);
|
|
@@ -7142,17 +7142,37 @@ async function showHealth(project, opts) {
|
|
|
7142
7142
|
// src/commands/overview.ts
|
|
7143
7143
|
async function showOverview(project, opts) {
|
|
7144
7144
|
const client = createApiClient();
|
|
7145
|
-
const overview = await client.getProjectOverview(project
|
|
7145
|
+
const overview = await client.getProjectOverview(project, {
|
|
7146
|
+
location: opts.location,
|
|
7147
|
+
since: opts.since
|
|
7148
|
+
});
|
|
7146
7149
|
if (opts.format === "json") {
|
|
7147
7150
|
console.log(JSON.stringify(overview, null, 2));
|
|
7148
7151
|
return;
|
|
7149
7152
|
}
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
+
renderHuman(overview);
|
|
7154
|
+
}
|
|
7155
|
+
function renderHuman(overview) {
|
|
7156
|
+
const {
|
|
7157
|
+
project: meta,
|
|
7158
|
+
latestRun,
|
|
7159
|
+
health,
|
|
7160
|
+
topInsights,
|
|
7161
|
+
queryCounts,
|
|
7162
|
+
providers,
|
|
7163
|
+
transitions,
|
|
7164
|
+
scores,
|
|
7165
|
+
movementSummary,
|
|
7166
|
+
competitors: competitors2,
|
|
7167
|
+
providerScores,
|
|
7168
|
+
attentionItems,
|
|
7169
|
+
runHistory,
|
|
7170
|
+
dateRangeLabel,
|
|
7171
|
+
contextLabel
|
|
7172
|
+
} = overview;
|
|
7173
|
+
console.log(`Overview: ${meta.displayName ?? meta.name} (${meta.name})`);
|
|
7153
7174
|
console.log(` Domain: ${meta.canonicalDomain}`);
|
|
7154
|
-
console.log(`
|
|
7155
|
-
console.log(` Language: ${meta.language}`);
|
|
7175
|
+
console.log(` Context: ${contextLabel} \xB7 ${dateRangeLabel}`);
|
|
7156
7176
|
if (latestRun.run) {
|
|
7157
7177
|
const finished = latestRun.run.finishedAt ?? "\u2014";
|
|
7158
7178
|
console.log(`
|
|
@@ -7161,17 +7181,48 @@ async function showOverview(project, opts) {
|
|
|
7161
7181
|
} else {
|
|
7162
7182
|
console.log("\n No runs yet.");
|
|
7163
7183
|
}
|
|
7184
|
+
console.log("\nScores:");
|
|
7185
|
+
printScore("Visibility ", scores.visibility);
|
|
7186
|
+
printScore("Gap queries ", scores.gapQueries);
|
|
7187
|
+
printScore("Index coverage ", scores.indexCoverage);
|
|
7188
|
+
printScore("Competitor press.", scores.competitorPressure);
|
|
7189
|
+
printScore("Run status ", scores.runStatus);
|
|
7164
7190
|
console.log(`
|
|
7165
7191
|
Queries cited: ${queryCounts.citedQueries}/${queryCounts.totalQueries} (${pct(queryCounts.citedRate)})`);
|
|
7192
|
+
if (movementSummary.hasPreviousRun) {
|
|
7193
|
+
console.log(` Movement: +${movementSummary.gained} gained, -${movementSummary.lost} lost (${movementSummary.tone})`);
|
|
7194
|
+
} else if (movementSummary.gained > 0) {
|
|
7195
|
+
console.log(` Movement: ${movementSummary.gained} cited in first run`);
|
|
7196
|
+
}
|
|
7166
7197
|
if (providers.length > 0) {
|
|
7167
|
-
console.log(" Providers:");
|
|
7198
|
+
console.log("\n Providers:");
|
|
7168
7199
|
for (const p of providers) {
|
|
7169
|
-
console.log(` ${p.provider.padEnd(
|
|
7200
|
+
console.log(` ${p.provider.padEnd(12)} ${p.cited}/${p.total} (${pct(p.citedRate)})`);
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7203
|
+
if (providerScores.length > 0) {
|
|
7204
|
+
console.log("\n Models:");
|
|
7205
|
+
for (const m of providerScores) {
|
|
7206
|
+
const label = `${m.provider}/${m.model ?? "unknown"}`.padEnd(28);
|
|
7207
|
+
console.log(` ${label} ${m.cited}/${m.total} (${m.score}%)`);
|
|
7170
7208
|
}
|
|
7171
7209
|
}
|
|
7172
7210
|
if (transitions.since) {
|
|
7173
7211
|
console.log(`
|
|
7174
|
-
|
|
7212
|
+
Transitions since ${transitions.since}: +${transitions.gained} gained, -${transitions.lost} lost, ${transitions.emerging} emerging`);
|
|
7213
|
+
}
|
|
7214
|
+
if (competitors2.length > 0) {
|
|
7215
|
+
console.log("\n Competitors:");
|
|
7216
|
+
for (const c of competitors2) {
|
|
7217
|
+
console.log(` ${c.domain.padEnd(28)} ${c.citationCount}/${c.totalQueries} ${c.pressureLabel}`);
|
|
7218
|
+
}
|
|
7219
|
+
}
|
|
7220
|
+
if (attentionItems.length > 0) {
|
|
7221
|
+
console.log("\n Attention:");
|
|
7222
|
+
for (const item of attentionItems) {
|
|
7223
|
+
console.log(` [${item.actionLabel}] ${item.title}`);
|
|
7224
|
+
if (item.detail) console.log(` ${item.detail}`);
|
|
7225
|
+
}
|
|
7175
7226
|
}
|
|
7176
7227
|
if (health) {
|
|
7177
7228
|
console.log(`
|
|
@@ -7183,6 +7234,19 @@ async function showOverview(project, opts) {
|
|
|
7183
7234
|
console.log(` [${insight.severity.toUpperCase()}] ${insight.type} \u2014 ${insight.title}`);
|
|
7184
7235
|
}
|
|
7185
7236
|
}
|
|
7237
|
+
if (runHistory.length > 0) {
|
|
7238
|
+
console.log(`
|
|
7239
|
+
Run history (last ${runHistory.length}):`);
|
|
7240
|
+
for (const point of runHistory) {
|
|
7241
|
+
const bar = "\u2588".repeat(Math.round(point.citationRate / 10));
|
|
7242
|
+
console.log(` ${point.createdAt.slice(0, 10)} ${String(point.citationRate).padStart(3)}% ${bar}`);
|
|
7243
|
+
}
|
|
7244
|
+
}
|
|
7245
|
+
}
|
|
7246
|
+
function printScore(prefix, score) {
|
|
7247
|
+
const tone = `[${score.tone}]`.padEnd(11);
|
|
7248
|
+
const value = score.value.padEnd(8);
|
|
7249
|
+
console.log(` ${prefix} ${tone} ${value} ${score.delta}`);
|
|
7186
7250
|
}
|
|
7187
7251
|
function pct(value) {
|
|
7188
7252
|
return `${(value * 100).toFixed(1)}%`;
|
|
@@ -7361,12 +7425,17 @@ var INTELLIGENCE_CLI_COMMANDS = [
|
|
|
7361
7425
|
},
|
|
7362
7426
|
{
|
|
7363
7427
|
path: ["overview"],
|
|
7364
|
-
usage: "canonry overview <project> [--format json]",
|
|
7365
|
-
options: {
|
|
7428
|
+
usage: "canonry overview <project> [--location <label>] [--since <iso>] [--format json]",
|
|
7429
|
+
options: {
|
|
7430
|
+
location: { type: "string" },
|
|
7431
|
+
since: { type: "string" }
|
|
7432
|
+
},
|
|
7366
7433
|
run: async (input) => {
|
|
7367
|
-
const usage = "canonry overview <project> [--format json]";
|
|
7434
|
+
const usage = "canonry overview <project> [--location <label>] [--since <iso>] [--format json]";
|
|
7368
7435
|
const project = requireProject(input, "overview", usage);
|
|
7369
|
-
|
|
7436
|
+
const location = getString(input.values, "location");
|
|
7437
|
+
const since = getString(input.values, "since");
|
|
7438
|
+
await showOverview(project, { format: input.format, location, since });
|
|
7370
7439
|
}
|
|
7371
7440
|
},
|
|
7372
7441
|
{
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HJZY4EOE.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-SR7TGHHG.js";
|
|
7
|
+
import "./chunk-7YSI4GFA.js";
|
|
8
|
+
import "./chunk-T2I6AO7D.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-SR7TGHHG.js";
|
|
6
|
+
import "./chunk-T2I6AO7D.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.2.2",
|
|
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",
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
"tsup": "^8.5.1",
|
|
61
61
|
"tsx": "^4.19.0",
|
|
62
62
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
63
|
-
"@ainyc/canonry-
|
|
63
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
64
64
|
"@ainyc/canonry-db": "0.0.0",
|
|
65
|
-
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
66
65
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
67
|
-
"@ainyc/canonry-
|
|
66
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
68
67
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
69
|
-
"@ainyc/canonry-integration-
|
|
70
|
-
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
71
|
-
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
68
|
+
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
72
69
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
70
|
+
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
73
71
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
74
|
-
"@ainyc/canonry-provider-
|
|
72
|
+
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
73
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
75
74
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
75
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
76
76
|
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|