@ainyc/canonry 3.3.9 → 3.4.6
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-C1kUp1aS.js → index-C6qeFqvR.js} +87 -87
- package/assets/index.html +1 -1
- package/dist/{chunk-ZCPZOVVE.js → chunk-K33FVWFW.js} +167 -6
- package/dist/{chunk-P6D3O5JB.js → chunk-UJRPODX3.js} +574 -492
- package/dist/chunk-VIUWGDDU.js +1919 -0
- package/dist/{chunk-24C7RMIS.js → chunk-ZYESHCMF.js} +76 -1967
- package/dist/cli.js +93 -33
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-FNJTFSI3.js → intelligence-service-NGA6RLCH.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +6 -6
- package/dist/chunk-MLKGABMK.js +0 -9
package/dist/cli.js
CHANGED
|
@@ -17,51 +17,55 @@ import {
|
|
|
17
17
|
setGoogleAuthConfig,
|
|
18
18
|
showFirstRunNotice,
|
|
19
19
|
trackEvent
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UJRPODX3.js";
|
|
21
21
|
import {
|
|
22
|
-
CcReleaseSyncStatuses,
|
|
23
|
-
CheckScopes,
|
|
24
|
-
CheckStatuses,
|
|
25
22
|
CliError,
|
|
26
|
-
CodingAgents,
|
|
27
23
|
EXIT_SYSTEM_ERROR,
|
|
28
24
|
EXIT_USER_ERROR,
|
|
29
|
-
ProviderNames,
|
|
30
|
-
RunKinds,
|
|
31
|
-
RunStatuses,
|
|
32
|
-
SkillsClients,
|
|
33
25
|
configExists,
|
|
34
26
|
createApiClient,
|
|
35
|
-
determineAnswerMentioned,
|
|
36
|
-
effectiveDomains,
|
|
37
|
-
formatRunErrorOneLine,
|
|
38
27
|
getConfigDir,
|
|
39
28
|
getConfigPath,
|
|
40
29
|
isEndpointMissing,
|
|
41
30
|
loadConfig,
|
|
42
|
-
normalizeUrlPath,
|
|
43
|
-
notificationEventSchema,
|
|
44
31
|
printCliError,
|
|
45
|
-
providerQuotaPolicySchema,
|
|
46
|
-
resolveProviderInput,
|
|
47
32
|
saveConfig,
|
|
48
33
|
saveConfigPatch,
|
|
49
|
-
skillsClientSchema,
|
|
50
34
|
usageError
|
|
51
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZYESHCMF.js";
|
|
52
36
|
import {
|
|
37
|
+
MIN_TREND_POINTS,
|
|
53
38
|
apiKeys,
|
|
54
39
|
competitors,
|
|
55
40
|
createClient,
|
|
56
41
|
gaAiReferrals,
|
|
57
42
|
gaTrafficSnapshots,
|
|
43
|
+
groupInsights,
|
|
44
|
+
isTrendBaseline,
|
|
58
45
|
migrate,
|
|
59
46
|
parseJsonColumn,
|
|
60
47
|
projects,
|
|
61
48
|
querySnapshots,
|
|
62
49
|
runs
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import
|
|
50
|
+
} from "./chunk-K33FVWFW.js";
|
|
51
|
+
import {
|
|
52
|
+
CcReleaseSyncStatuses,
|
|
53
|
+
CheckScopes,
|
|
54
|
+
CheckStatuses,
|
|
55
|
+
CodingAgents,
|
|
56
|
+
ProviderNames,
|
|
57
|
+
RunKinds,
|
|
58
|
+
RunStatuses,
|
|
59
|
+
SkillsClients,
|
|
60
|
+
determineAnswerMentioned,
|
|
61
|
+
effectiveDomains,
|
|
62
|
+
formatRunErrorOneLine,
|
|
63
|
+
normalizeUrlPath,
|
|
64
|
+
notificationEventSchema,
|
|
65
|
+
providerQuotaPolicySchema,
|
|
66
|
+
resolveProviderInput,
|
|
67
|
+
skillsClientSchema
|
|
68
|
+
} from "./chunk-VIUWGDDU.js";
|
|
65
69
|
|
|
66
70
|
// src/cli.ts
|
|
67
71
|
import { pathToFileURL } from "url";
|
|
@@ -577,7 +581,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
577
581
|
return result;
|
|
578
582
|
}
|
|
579
583
|
async function backfillInsightsCommand(project, opts) {
|
|
580
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
584
|
+
const { IntelligenceService } = await import("./intelligence-service-NGA6RLCH.js");
|
|
581
585
|
const config = loadConfig();
|
|
582
586
|
const db = createClient(config.database);
|
|
583
587
|
migrate(db);
|
|
@@ -5664,15 +5668,19 @@ function renderCompetitorLandscape(report) {
|
|
|
5664
5668
|
}
|
|
5665
5669
|
const rows = competitors2.map((c) => {
|
|
5666
5670
|
const tone = pressureTone(c.pressureLabel);
|
|
5671
|
+
const pagesDisclosure = c.theirCitedPages.length > 0 ? `<details class="cited-pages"><summary>${c.theirCitedPages.length} cited URL${c.theirCitedPages.length > 1 ? "s" : ""}</summary>
|
|
5672
|
+
<ul>${c.theirCitedPages.map((p) => `<li><a href="${escapeHtml(p.url)}">${escapeHtml(p.url)}</a> <span class="cited-for">${escapeHtml(p.citedFor.join(", "))}</span></li>`).join("")}</ul>
|
|
5673
|
+
</details>` : "";
|
|
5667
5674
|
return `<tr>
|
|
5668
5675
|
<td>${escapeHtml(c.domain)}</td>
|
|
5669
5676
|
<td><span class="badge tone-${tone}">${escapeHtml(c.pressureLabel)}</span></td>
|
|
5670
5677
|
<td class="numeric">${c.citationCount} / ${c.totalCount}</td>
|
|
5671
|
-
<td
|
|
5678
|
+
<td class="numeric">${c.sharePct}%</td>
|
|
5679
|
+
<td>${escapeHtml(c.citedKeywords.slice(0, 5).join(", "))}${c.citedKeywords.length > 5 ? "\u2026" : ""}${pagesDisclosure}</td>
|
|
5672
5680
|
</tr>`;
|
|
5673
5681
|
}).join("");
|
|
5674
5682
|
const table = competitors2.length > 0 ? `<table class="report-table">
|
|
5675
|
-
<thead><tr><th>Domain</th><th>Pressure</th><th>Citations</th><th>Cited keywords</th></tr></thead>
|
|
5683
|
+
<thead><tr><th>Domain</th><th>Pressure</th><th>Citations</th><th class="numeric">SOV</th><th>Cited keywords</th></tr></thead>
|
|
5676
5684
|
<tbody>${rows}</tbody>
|
|
5677
5685
|
</table>` : renderEmpty("No competitors configured.");
|
|
5678
5686
|
return section(
|
|
@@ -5804,6 +5812,19 @@ function renderGsc(report) {
|
|
|
5804
5812
|
COLORS.accent,
|
|
5805
5813
|
"Clicks over time"
|
|
5806
5814
|
);
|
|
5815
|
+
const crossoverBlocks = [];
|
|
5816
|
+
if (gsc.trackedButNoGsc.length > 0) {
|
|
5817
|
+
crossoverBlocks.push(`<div class="chart-card"><h3>AEO keywords without search demand</h3>
|
|
5818
|
+
<p class="section-intro">Tracked AEO keywords with no GSC impressions in this window \u2014 review whether they represent real search demand.</p>
|
|
5819
|
+
<ul>${gsc.trackedButNoGsc.map((k) => `<li>${escapeHtml(k)}</li>`).join("")}</ul>
|
|
5820
|
+
</div>`);
|
|
5821
|
+
}
|
|
5822
|
+
if (gsc.gscButNotTracked.length > 0) {
|
|
5823
|
+
crossoverBlocks.push(`<div class="chart-card"><h3>Search queries you should track</h3>
|
|
5824
|
+
<p class="section-intro">GSC top queries (by impressions) that aren't tracked in your AEO project \u2014 candidates to add as keywords.</p>
|
|
5825
|
+
<ul>${gsc.gscButNotTracked.map((q) => `<li>${escapeHtml(q)}</li>`).join("")}</ul>
|
|
5826
|
+
</div>`);
|
|
5827
|
+
}
|
|
5807
5828
|
return section(
|
|
5808
5829
|
{ id: "gsc", eyebrow: "Section 5", title: "GSC Performance", intro: "Top queries, category breakdown, and traffic trend from Google Search Console." },
|
|
5809
5830
|
`<div class="metric-grid">
|
|
@@ -5824,7 +5845,8 @@ function renderGsc(report) {
|
|
|
5824
5845
|
<thead><tr><th>Category</th><th class="numeric">Clicks</th><th class="numeric">Imp.</th><th class="numeric">Share</th></tr></thead>
|
|
5825
5846
|
<tbody>${breakdownRows}</tbody>
|
|
5826
5847
|
</table>
|
|
5827
|
-
</div
|
|
5848
|
+
</div>
|
|
5849
|
+
${crossoverBlocks.join("\n")}`
|
|
5828
5850
|
);
|
|
5829
5851
|
}
|
|
5830
5852
|
function renderGa(report) {
|
|
@@ -6004,6 +6026,12 @@ function renderCitationsTrend(report) {
|
|
|
6004
6026
|
renderEmpty("Run multiple visibility sweeps to see a trend.")
|
|
6005
6027
|
);
|
|
6006
6028
|
}
|
|
6029
|
+
if (isTrendBaseline(trend)) {
|
|
6030
|
+
return section(
|
|
6031
|
+
{ id: "citations-trend", eyebrow: "Section 10", title: "Citations Over Time" },
|
|
6032
|
+
renderEmpty(`Establishing baseline (${trend.length} of ${MIN_TREND_POINTS} runs collected). Trend will appear once more sweeps are recorded.`)
|
|
6033
|
+
);
|
|
6034
|
+
}
|
|
6007
6035
|
const chart = renderLineChart(
|
|
6008
6036
|
trend.map((t) => ({ x: t.date, y: t.citationRate, label: formatDate(t.date) })),
|
|
6009
6037
|
COLORS.positive,
|
|
@@ -6035,15 +6063,17 @@ function renderInsights(report) {
|
|
|
6035
6063
|
renderEmpty("No insights yet \u2014 run a visibility sweep to generate alerts.")
|
|
6036
6064
|
);
|
|
6037
6065
|
}
|
|
6038
|
-
const
|
|
6066
|
+
const haveDeduped = list.every((i) => typeof i.instanceCount === "number");
|
|
6067
|
+
const rows = (haveDeduped ? list.map((i) => ({ rep: i, count: i.instanceCount })) : groupInsights(list).map((g) => ({ rep: g.representative, count: g.count }))).map(({ rep: i, count }) => {
|
|
6039
6068
|
const tone = severityTone(i.severity);
|
|
6069
|
+
const countChip = count > 1 ? ` <span class="badge tone-neutral">\xD7 ${count}</span>` : "";
|
|
6040
6070
|
return `<tr>
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6071
|
+
<td><span class="badge tone-${tone}">${escapeHtml(i.severity)}</span></td>
|
|
6072
|
+
<td>${escapeHtml(i.title)}${countChip}</td>
|
|
6073
|
+
<td>${escapeHtml(i.keyword)}</td>
|
|
6074
|
+
<td>${escapeHtml(i.provider)}</td>
|
|
6075
|
+
<td>${i.recommendation ? escapeHtml(i.recommendation) : '<span class="cell-pending">\u2014</span>'}</td>
|
|
6076
|
+
</tr>`;
|
|
6047
6077
|
}).join("");
|
|
6048
6078
|
return section(
|
|
6049
6079
|
{ id: "insights", eyebrow: "Section 11", title: "Insights & Alerts", intro: "Priority-ordered findings from the most recent runs." },
|
|
@@ -6053,11 +6083,40 @@ function renderInsights(report) {
|
|
|
6053
6083
|
</table>`
|
|
6054
6084
|
);
|
|
6055
6085
|
}
|
|
6086
|
+
function renderOpportunities(report) {
|
|
6087
|
+
const opps = report.contentOpportunities;
|
|
6088
|
+
if (opps.length === 0) return "";
|
|
6089
|
+
const rows = opps.slice(0, 10).map((o) => {
|
|
6090
|
+
const ourPage = o.ourBestPage ? `<a href="${escapeHtml(o.ourBestPage.url)}">${escapeHtml(o.ourBestPage.url)}</a>` : '<span class="cell-not-cited">\u2014</span>';
|
|
6091
|
+
const winning = o.winningCompetitor ? `<a href="${escapeHtml(o.winningCompetitor.url)}">${escapeHtml(o.winningCompetitor.domain)}</a>` : '<span class="cell-not-cited">\u2014</span>';
|
|
6092
|
+
return `<tr>
|
|
6093
|
+
<td>${escapeHtml(o.query)}</td>
|
|
6094
|
+
<td><span class="badge tone-neutral">${escapeHtml(o.action)}</span></td>
|
|
6095
|
+
<td class="numeric">${Math.round(o.score)}</td>
|
|
6096
|
+
<td>${ourPage}</td>
|
|
6097
|
+
<td>${winning}</td>
|
|
6098
|
+
<td><span class="badge tone-neutral">${escapeHtml(o.demandSource)}</span></td>
|
|
6099
|
+
<td><span class="badge tone-neutral">${escapeHtml(o.actionConfidence)}</span></td>
|
|
6100
|
+
</tr>`;
|
|
6101
|
+
}).join("");
|
|
6102
|
+
return section(
|
|
6103
|
+
{
|
|
6104
|
+
id: "content-opportunities",
|
|
6105
|
+
eyebrow: "Section 12",
|
|
6106
|
+
title: "Content Opportunities",
|
|
6107
|
+
intro: "Ranked, action-typed targets from the content recommendation engine. Top 10 shown."
|
|
6108
|
+
},
|
|
6109
|
+
`<table class="report-table">
|
|
6110
|
+
<thead><tr><th>Query</th><th>Action</th><th class="numeric">Score</th><th>Our page</th><th>Winning competitor</th><th>Demand</th><th>Confidence</th></tr></thead>
|
|
6111
|
+
<tbody>${rows}</tbody>
|
|
6112
|
+
</table>`
|
|
6113
|
+
);
|
|
6114
|
+
}
|
|
6056
6115
|
function renderRecommendedNextSteps(report) {
|
|
6057
6116
|
const steps = report.recommendedNextSteps;
|
|
6058
6117
|
if (steps.length === 0) {
|
|
6059
6118
|
return section(
|
|
6060
|
-
{ id: "recommended-next-steps", eyebrow: "Section
|
|
6119
|
+
{ id: "recommended-next-steps", eyebrow: "Section 13", title: "Recommended Next Steps" },
|
|
6061
6120
|
renderEmpty("No outstanding actions.")
|
|
6062
6121
|
);
|
|
6063
6122
|
}
|
|
@@ -6068,7 +6127,7 @@ function renderRecommendedNextSteps(report) {
|
|
|
6068
6127
|
<span class="rationale">${escapeHtml(s.rationale)}</span>
|
|
6069
6128
|
</div>`).join("");
|
|
6070
6129
|
return section(
|
|
6071
|
-
{ id: "recommended-next-steps", eyebrow: "Section
|
|
6130
|
+
{ id: "recommended-next-steps", eyebrow: "Section 13", title: "Recommended Next Steps" },
|
|
6072
6131
|
`<div class="steps">${items}</div>`
|
|
6073
6132
|
);
|
|
6074
6133
|
}
|
|
@@ -6089,6 +6148,7 @@ function renderReportHtml(report, opts = {}) {
|
|
|
6089
6148
|
renderIndexingHealth(report),
|
|
6090
6149
|
renderCitationsTrend(report),
|
|
6091
6150
|
renderInsights(report),
|
|
6151
|
+
renderOpportunities(report),
|
|
6092
6152
|
renderRecommendedNextSteps(report)
|
|
6093
6153
|
].join("\n");
|
|
6094
6154
|
const json = escapeJsonForScript(JSON.stringify(report));
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UJRPODX3.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ZYESHCMF.js";
|
|
7
|
+
import "./chunk-K33FVWFW.js";
|
|
8
|
+
import "./chunk-VIUWGDDU.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-ZYESHCMF.js";
|
|
6
|
+
import "./chunk-VIUWGDDU.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": "3.
|
|
3
|
+
"version": "3.4.6",
|
|
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",
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
"@types/node-cron": "^3.0.11",
|
|
60
60
|
"tsup": "^8.5.1",
|
|
61
61
|
"tsx": "^4.19.0",
|
|
62
|
-
"@ainyc/canonry-api-routes": "0.0.0",
|
|
63
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
64
|
-
"@ainyc/canonry-db": "0.0.0",
|
|
65
|
-
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
66
62
|
"@ainyc/canonry-config": "0.0.0",
|
|
63
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
64
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
65
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
67
66
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
67
|
+
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
68
68
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
69
69
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
70
|
-
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
71
70
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
71
|
+
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
72
72
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
73
73
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
74
74
|
"@ainyc/canonry-provider-local": "0.0.0",
|