@canonry/canonry 5.32.0 → 5.34.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/aeo-analysis.md +1 -1
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +12 -3
- package/assets/assets/{AuditHistoryPanel-DW2aeqJP.js → AuditHistoryPanel-Ddg6JIi3.js} +1 -1
- package/assets/assets/{BacklinksPage-DroPpjd3.js → BacklinksPage-DI9BmaYt.js} +1 -1
- package/assets/assets/{HistoryPage-2o6p-ZDF.js → HistoryPage-CACIL005.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-D_i3t0DT.js +1 -0
- package/assets/assets/{ProjectPage-CXV64SBB.js → ProjectPage-d1djqfh3.js} +7 -7
- package/assets/assets/{RunRow-CIhSIAoR.js → RunRow-CjhvvA6g.js} +1 -1
- package/assets/assets/{RunsPage-lO9xMTSl.js → RunsPage-DuBhw2uc.js} +1 -1
- package/assets/assets/{SettingsPage-CBwns7cb.js → SettingsPage-MUpfB0HH.js} +1 -1
- package/assets/assets/{SiteHealthSection-C372wrfT.js → SiteHealthSection-6qdXlFcO.js} +3 -3
- package/assets/assets/{TrafficPage-DGyS-IjJ.js → TrafficPage--nGSOgqn.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-BBaz_ivE.js → TrafficSourceDetailPage-BPqNmuws.js} +1 -1
- package/assets/assets/{extract-error-message-QcHrDOjc.js → extract-error-message-B7OeWj0x.js} +1 -1
- package/assets/assets/{index-CbnQjcJj.js → index-C4lreGwR.js} +24 -24
- package/assets/assets/index-DX5M4MHr.css +1 -0
- package/assets/assets/{react-sigma_core.esm.min-D9tjGma4.js → react-sigma_core.esm.min-jiMNkILi.js} +1 -1
- package/assets/assets/v2-overview-adapter-Caj3bHQE.js +1 -0
- package/assets/index.html +2 -2
- package/dist/{chunk-DFIK6IPP.js → chunk-25H4K7KL.js} +4 -4
- package/dist/{chunk-6UO23AKO.js → chunk-AIAVZY6L.js} +12 -10
- package/dist/{chunk-7YS62CJ4.js → chunk-G2K5KCUY.js} +172 -34
- package/dist/{chunk-RCX6I3DX.js → chunk-NOIK3FUO.js} +75 -4
- package/dist/{chunk-YVWYQBXW.js → chunk-NZCKJMLC.js} +2 -2
- package/dist/{chunk-WZL73LY3.js → chunk-QTETJEHI.js} +2 -2
- package/dist/{chunk-NEP2PJ2T.js → chunk-VHPGBX4P.js} +3 -3
- package/dist/cli.js +53 -13
- package/dist/{demo-server-ERFY4Q2P.js → demo-server-UI24OAHX.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{intelligence-service-PULUYOPR.js → intelligence-service-ZKFLGJ23.js} +2 -2
- package/dist/mcp.js +4 -4
- package/package.json +8 -8
- package/assets/assets/MeasurementPropertyPage-VTGLyVuD.js +0 -1
- package/assets/assets/index-D0bY1wpI.css +0 -1
- package/assets/assets/v2-overview-adapter-CLlJkExr.js +0 -1
|
@@ -3455,6 +3455,9 @@ function brandLabelFromDomain(value) {
|
|
|
3455
3455
|
if (value == null || value.trim() === "") return "";
|
|
3456
3456
|
return getDomainWithoutSuffix2(value, DOMAIN_PARSE_OPTIONS)?.toLowerCase() ?? "";
|
|
3457
3457
|
}
|
|
3458
|
+
function competitorLabelFromDomain(domain) {
|
|
3459
|
+
return brandLabelFromDomain(domain) || domain;
|
|
3460
|
+
}
|
|
3458
3461
|
function hostMatchesDomain(candidate, domain) {
|
|
3459
3462
|
const candidateHost = hostOf(candidate);
|
|
3460
3463
|
const domainHost = hostOf(domain);
|
|
@@ -4126,6 +4129,8 @@ function resolveLocations(projectLocations, requestedLabels) {
|
|
|
4126
4129
|
}
|
|
4127
4130
|
return resolved;
|
|
4128
4131
|
}
|
|
4132
|
+
var PROJECT_QUALIFIED_ALIAS_LIMIT = 20;
|
|
4133
|
+
var PROJECT_QUALIFIED_ALIAS_MAX_LENGTH = 200;
|
|
4129
4134
|
var projectUpsertRequestSchema = z7.object({
|
|
4130
4135
|
displayName: z7.string().min(1),
|
|
4131
4136
|
canonicalDomain: z7.string().min(1),
|
|
@@ -4146,6 +4151,12 @@ var projectUpsertRequestSchema = z7.object({
|
|
|
4146
4151
|
defaultLocation: z7.string().nullable().optional(),
|
|
4147
4152
|
measurement: measurementConfigSchema.optional(),
|
|
4148
4153
|
autoExtractBacklinks: z7.boolean().optional(),
|
|
4154
|
+
/**
|
|
4155
|
+
* Aliases the sentiment evaluator is told are this brand's own names. Each
|
|
4156
|
+
* entry must already be one of `aliases`. Omitted keeps the stored list,
|
|
4157
|
+
* minus names that no longer qualify; `[]` clears.
|
|
4158
|
+
*/
|
|
4159
|
+
qualifiedAliases: z7.array(z7.string().trim().min(1).max(PROJECT_QUALIFIED_ALIAS_MAX_LENGTH)).max(PROJECT_QUALIFIED_ALIAS_LIMIT).optional(),
|
|
4149
4160
|
/**
|
|
4150
4161
|
* Highest star rating that counts as a negative Google review for this
|
|
4151
4162
|
* project's `review.negative` webhook (1-4). Omit to keep the stored value;
|
|
@@ -4167,6 +4178,8 @@ var projectDtoSchema = z7.object({
|
|
|
4167
4178
|
canonicalDomain: z7.string(),
|
|
4168
4179
|
ownedDomains: z7.array(z7.string()).default([]),
|
|
4169
4180
|
aliases: z7.array(z7.string()).default([]),
|
|
4181
|
+
/** Operator-chosen subset of `aliases` that Simple sentiment treats as this brand's own names. */
|
|
4182
|
+
qualifiedAliases: z7.array(z7.string()).default([]),
|
|
4170
4183
|
country: z7.string().length(2),
|
|
4171
4184
|
language: z7.string().min(2),
|
|
4172
4185
|
tags: z7.array(z7.string()).default([]),
|
|
@@ -4259,6 +4272,40 @@ function normalizeProjectAliases(displayName, aliases) {
|
|
|
4259
4272
|
}
|
|
4260
4273
|
return result;
|
|
4261
4274
|
}
|
|
4275
|
+
function resolveProjectQualifiedAliases(identity, requested, competitorNames = []) {
|
|
4276
|
+
const stored = /* @__PURE__ */ new Map();
|
|
4277
|
+
for (const alias of normalizeProjectAliases(identity.displayName, identity.aliases)) {
|
|
4278
|
+
stored.set(alias.toLowerCase(), alias);
|
|
4279
|
+
}
|
|
4280
|
+
const displayKey = brandKeyFromText(identity.displayName ?? "");
|
|
4281
|
+
const competitorKeys = new Set(competitorNames.map(brandKeyFromText).filter((key) => key.length > 0));
|
|
4282
|
+
const value = [];
|
|
4283
|
+
const rejected = [];
|
|
4284
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4285
|
+
for (const raw of requested ?? []) {
|
|
4286
|
+
const name = raw.trim();
|
|
4287
|
+
if (!name) continue;
|
|
4288
|
+
const lower = name.toLowerCase();
|
|
4289
|
+
if (seen.has(lower)) continue;
|
|
4290
|
+
seen.add(lower);
|
|
4291
|
+
const alias = stored.get(lower);
|
|
4292
|
+
if (alias === void 0) {
|
|
4293
|
+
rejected.push({ name, reason: "not-an-alias" });
|
|
4294
|
+
continue;
|
|
4295
|
+
}
|
|
4296
|
+
const key = brandKeyFromText(alias);
|
|
4297
|
+
if (displayKey && key === displayKey) {
|
|
4298
|
+
rejected.push({ name, reason: "display-name" });
|
|
4299
|
+
} else if (key.length < MIN_DOMAIN_BRAND_KEY_LENGTH) {
|
|
4300
|
+
rejected.push({ name, reason: "too-short" });
|
|
4301
|
+
} else if (competitorKeys.has(key)) {
|
|
4302
|
+
rejected.push({ name, reason: "competitor-collision" });
|
|
4303
|
+
} else {
|
|
4304
|
+
value.push(alias);
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4307
|
+
return { value: value.sort(), rejected };
|
|
4308
|
+
}
|
|
4262
4309
|
function effectiveBrandNames(project) {
|
|
4263
4310
|
const names = [];
|
|
4264
4311
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -6558,6 +6605,10 @@ var configSpecSchema = z16.object({
|
|
|
6558
6605
|
canonicalDomain: z16.string().min(1),
|
|
6559
6606
|
ownedDomains: z16.array(z16.string().min(1)).optional().default([]),
|
|
6560
6607
|
aliases: z16.array(z16.string().min(1)).optional().default([]),
|
|
6608
|
+
// No default on purpose: an apply that omits it keeps the project's stored
|
|
6609
|
+
// list, minus names that no longer qualify against this spec's `aliases`,
|
|
6610
|
+
// display name and competitors. Each entry must be an alias.
|
|
6611
|
+
qualifiedAliases: z16.array(z16.string().min(1).max(PROJECT_QUALIFIED_ALIAS_MAX_LENGTH)).max(PROJECT_QUALIFIED_ALIAS_LIMIT).optional(),
|
|
6561
6612
|
country: z16.string().length(2),
|
|
6562
6613
|
language: z16.string().min(2),
|
|
6563
6614
|
queries: configQueryListSchema.optional(),
|
|
@@ -6623,7 +6674,12 @@ var simpleMeasurementIdentitySchema = z17.object({
|
|
|
6623
6674
|
displayName: z17.string(),
|
|
6624
6675
|
aliases: z17.array(z17.string()),
|
|
6625
6676
|
canonicalDomain: z17.string(),
|
|
6626
|
-
ownedDomains: z17.array(z17.string())
|
|
6677
|
+
ownedDomains: z17.array(z17.string()),
|
|
6678
|
+
// Sentiment-only: the aliases the evaluator is told are this brand's own
|
|
6679
|
+
// names. Omitted when empty, so a sidecar that never opted in keeps its
|
|
6680
|
+
// checksum. No bounds or matcher rules here: a later change to the write
|
|
6681
|
+
// rules must never make a stored sidecar unreadable.
|
|
6682
|
+
qualifiedAliases: z17.array(z17.string()).optional()
|
|
6627
6683
|
}).strict();
|
|
6628
6684
|
var simpleMeasurementEngineSchema = z17.object({
|
|
6629
6685
|
provider: providerNameSchema.refine((value) => value.trim().length > 0, {
|
|
@@ -6711,9 +6767,17 @@ var simpleMeasurementDefinitionSchema = z17.object({
|
|
|
6711
6767
|
competitors: z17.array(simpleMeasurementCompetitorSchema).optional(),
|
|
6712
6768
|
queries: z17.array(simpleMeasurementQuerySchema)
|
|
6713
6769
|
}).strict().superRefine(addCollectionIssues);
|
|
6770
|
+
function simpleMeasurementCompetitorNames(competitors) {
|
|
6771
|
+
return competitors?.flatMap((competitor) => [competitor.label, ...competitor.aliases]) ?? [];
|
|
6772
|
+
}
|
|
6714
6773
|
function buildSimpleMeasurementDefinition(input) {
|
|
6715
6774
|
const parsed = simpleMeasurementDefinitionInputSchema.parse(input);
|
|
6716
6775
|
const classifier = compileQueryClassifier(effectiveBrandNames(parsed.identity));
|
|
6776
|
+
const qualifiedAliases = resolveProjectQualifiedAliases(
|
|
6777
|
+
{ displayName: parsed.identity.displayName, aliases: parsed.identity.aliases },
|
|
6778
|
+
parsed.identity.qualifiedAliases,
|
|
6779
|
+
simpleMeasurementCompetitorNames(parsed.competitors)
|
|
6780
|
+
).value;
|
|
6717
6781
|
return simpleMeasurementDefinitionSchema.parse({
|
|
6718
6782
|
schemaVersion: SIMPLE_MEASUREMENT_DEFINITION_SCHEMA_VERSION,
|
|
6719
6783
|
capturedAt: parsed.capturedAt,
|
|
@@ -6721,7 +6785,8 @@ function buildSimpleMeasurementDefinition(input) {
|
|
|
6721
6785
|
displayName: parsed.identity.displayName,
|
|
6722
6786
|
aliases: [...parsed.identity.aliases],
|
|
6723
6787
|
canonicalDomain: parsed.identity.canonicalDomain,
|
|
6724
|
-
ownedDomains: [...parsed.identity.ownedDomains]
|
|
6788
|
+
ownedDomains: [...parsed.identity.ownedDomains],
|
|
6789
|
+
...qualifiedAliases.length ? { qualifiedAliases } : {}
|
|
6725
6790
|
},
|
|
6726
6791
|
country: parsed.country,
|
|
6727
6792
|
language: parsed.language,
|
|
@@ -6765,7 +6830,9 @@ function canonicalSimpleMeasurementDefinitionJson(definition) {
|
|
|
6765
6830
|
displayName: parsed.identity.displayName,
|
|
6766
6831
|
aliases: [...parsed.identity.aliases].sort(compareText3),
|
|
6767
6832
|
canonicalDomain: parsed.identity.canonicalDomain,
|
|
6768
|
-
ownedDomains: [...parsed.identity.ownedDomains].sort(compareText3)
|
|
6833
|
+
ownedDomains: [...parsed.identity.ownedDomains].sort(compareText3),
|
|
6834
|
+
// Absent and empty serialize alike, so pre-feature checksums never move.
|
|
6835
|
+
...parsed.identity.qualifiedAliases?.length ? { qualifiedAliases: [...parsed.identity.qualifiedAliases].sort(compareText3) } : {}
|
|
6769
6836
|
},
|
|
6770
6837
|
country: parsed.country,
|
|
6771
6838
|
language: parsed.language,
|
|
@@ -15660,7 +15727,8 @@ var sentimentCoverageSchema = z51.object({ selected: count, eligibleAssessments:
|
|
|
15660
15727
|
var sentimentScoreSchema = z51.object({ favorableRate: rate, mixedRate: rate, unfavorableRate: rate, favorableDisplay: z51.string(), mixedDisplay: z51.string(), unfavorableDisplay: z51.string(), interval: z51.object({ low: z51.number(), high: z51.number() }).strict().nullable(), method: z51.literal("wilson-independent-v1"), limitation: z51.string() }).strict();
|
|
15661
15728
|
var headlineFields = { state: sentimentStateSchema, reason: z51.string().nullable(), provisional: z51.boolean(), coverage: sentimentCoverageSchema, score: sentimentScoreSchema };
|
|
15662
15729
|
var sentimentHeadlineSchema = z51.object({ ...headlineFields, selection: sentimentResolvedSelectionSchema, runIds: z51.array(id) }).strict();
|
|
15663
|
-
var
|
|
15730
|
+
var sentimentOverallHeadlineSchema = z51.object({ ...headlineFields, queryClass: z51.literal("all"), runIds: z51.array(id) }).strict();
|
|
15731
|
+
var sentimentOverviewSchema = z51.object({ configured: z51.boolean(), branded: sentimentHeadlineSchema, nonBrand: sentimentHeadlineSchema, overall: sentimentOverallHeadlineSchema.optional() }).strict();
|
|
15664
15732
|
var sentimentAssessmentSummarySchema = z51.object({
|
|
15665
15733
|
assessmentId: id.nullable(),
|
|
15666
15734
|
sourceSnapshotId: id,
|
|
@@ -21246,6 +21314,7 @@ export {
|
|
|
21246
21314
|
hostOf,
|
|
21247
21315
|
registrableDomain,
|
|
21248
21316
|
brandLabelFromDomain,
|
|
21317
|
+
competitorLabelFromDomain,
|
|
21249
21318
|
hostMatchesDomain,
|
|
21250
21319
|
hostMatchesAnyDomain,
|
|
21251
21320
|
extractDomainsFromText,
|
|
@@ -21304,6 +21373,7 @@ export {
|
|
|
21304
21373
|
normalizeProjectDomain,
|
|
21305
21374
|
effectiveDomains,
|
|
21306
21375
|
normalizeProjectAliases,
|
|
21376
|
+
resolveProjectQualifiedAliases,
|
|
21307
21377
|
effectiveBrandNames,
|
|
21308
21378
|
projectConfigSchema,
|
|
21309
21379
|
resolveConfigSpecQueries,
|
|
@@ -21355,6 +21425,7 @@ export {
|
|
|
21355
21425
|
compileMeasurementPlanPreview,
|
|
21356
21426
|
canonicalMeasurementPlanJson,
|
|
21357
21427
|
simpleMeasurementDefinitionSchema,
|
|
21428
|
+
simpleMeasurementCompetitorNames,
|
|
21358
21429
|
buildSimpleMeasurementDefinition,
|
|
21359
21430
|
canonicalSimpleMeasurementDefinitionJson,
|
|
21360
21431
|
visibilityReportRequestSchema,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-G2K5KCUY.js";
|
|
9
9
|
import {
|
|
10
10
|
SITE_CRAWL_GRAPH_MAX_EDGES,
|
|
11
11
|
SITE_CRAWL_GRAPH_MAX_NODES,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
TEMPLATE_LINK_RATIO_THRESHOLD,
|
|
14
14
|
factorStatusFromScore,
|
|
15
15
|
roundPreservingTotal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NOIK3FUO.js";
|
|
17
17
|
|
|
18
18
|
// src/site-audit-factors.ts
|
|
19
19
|
function recordedSharePct(factor) {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
PACKAGE_VERSION,
|
|
6
6
|
canonryMcpTools,
|
|
7
7
|
isMachineFormat
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-25H4K7KL.js";
|
|
9
9
|
import {
|
|
10
10
|
AGENT_PROVIDER_IDS,
|
|
11
11
|
CANONRY_NPM_PACKAGE_URL,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
skillsClientSchema,
|
|
50
50
|
upgradeCaveatFor,
|
|
51
51
|
upgradeCommandFor
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-NOIK3FUO.js";
|
|
53
53
|
|
|
54
54
|
// src/config.ts
|
|
55
55
|
import fs from "fs";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
installSkills,
|
|
5
5
|
loadConfigRaw,
|
|
6
6
|
saveConfigPatch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QTETJEHI.js";
|
|
8
8
|
import {
|
|
9
9
|
PACKAGE_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-25H4K7KL.js";
|
|
11
11
|
import {
|
|
12
12
|
SKILL_MANIFEST_FILENAME,
|
|
13
13
|
SkillsClients
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NOIK3FUO.js";
|
|
15
15
|
|
|
16
16
|
// src/skills-autosync.ts
|
|
17
17
|
import fs from "fs";
|
package/dist/cli.js
CHANGED
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
trackCliCommandFinished,
|
|
36
36
|
trackEvent,
|
|
37
37
|
waitForServerRuntimeStartup
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-AIAVZY6L.js";
|
|
39
39
|
import {
|
|
40
40
|
autoSyncSkills,
|
|
41
41
|
formatAutoSyncNotice
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-VHPGBX4P.js";
|
|
43
43
|
import {
|
|
44
44
|
configExists,
|
|
45
45
|
createApiClient,
|
|
@@ -56,13 +56,13 @@ import {
|
|
|
56
56
|
saveConfig,
|
|
57
57
|
saveConfigPatch,
|
|
58
58
|
shouldPrintServeSkillsNudge
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-QTETJEHI.js";
|
|
60
60
|
import {
|
|
61
61
|
DEFAULT_DEMO_TRUSTED_PROXIES,
|
|
62
62
|
trustedProxiesProblem,
|
|
63
63
|
trustedProxyProblem
|
|
64
64
|
} from "./chunk-RB2F4D3Z.js";
|
|
65
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-NZCKJMLC.js";
|
|
66
66
|
import {
|
|
67
67
|
CliError,
|
|
68
68
|
EXIT_SYSTEM_ERROR,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
runMeasurementDraftAction,
|
|
75
75
|
systemError,
|
|
76
76
|
usageError
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-25H4K7KL.js";
|
|
78
78
|
import {
|
|
79
79
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
80
80
|
CLOUDFLARE_WORKER_GENERATED_MARKER,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
queries,
|
|
90
90
|
renderReportHtml,
|
|
91
91
|
runs
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-G2K5KCUY.js";
|
|
93
93
|
import {
|
|
94
94
|
AdsDeliverySnapshotStatuses,
|
|
95
95
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -179,6 +179,7 @@ import {
|
|
|
179
179
|
reportUnattributedAnswers,
|
|
180
180
|
researchBatchCreateSchema,
|
|
181
181
|
resolveNegativeReviewMaxStars,
|
|
182
|
+
resolveProjectQualifiedAliases,
|
|
182
183
|
resolveProviderInput,
|
|
183
184
|
resultsClearRequestSchema,
|
|
184
185
|
sentimentBackfillRequestSchema,
|
|
@@ -194,7 +195,7 @@ import {
|
|
|
194
195
|
visibilityCompareSelectionSchema,
|
|
195
196
|
visibilityReportRequestSchema,
|
|
196
197
|
winnabilityClassSchema
|
|
197
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-NOIK3FUO.js";
|
|
198
199
|
|
|
199
200
|
// src/cli.ts
|
|
200
201
|
import { pathToFileURL } from "url";
|
|
@@ -720,7 +721,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
720
721
|
async function demoCommand(options) {
|
|
721
722
|
const { host, port } = parseDemoListenOptions(options);
|
|
722
723
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
723
|
-
const { createDemoServer } = await import("./demo-server-
|
|
724
|
+
const { createDemoServer } = await import("./demo-server-UI24OAHX.js");
|
|
724
725
|
const app = await createDemoServer({ trustProxy });
|
|
725
726
|
let stopping = false;
|
|
726
727
|
const stop = () => {
|
|
@@ -12427,6 +12428,7 @@ async function createProject(name, opts) {
|
|
|
12427
12428
|
canonicalDomain: opts.domain,
|
|
12428
12429
|
ownedDomains: opts.ownedDomains ?? [],
|
|
12429
12430
|
aliases: normalizeProjectAliases(opts.displayName, opts.aliases ?? []),
|
|
12431
|
+
...opts.qualifiedAliases?.length ? { qualifiedAliases: opts.qualifiedAliases } : {},
|
|
12430
12432
|
country: opts.country,
|
|
12431
12433
|
language: opts.language,
|
|
12432
12434
|
providers: opts.providers ?? [],
|
|
@@ -12479,6 +12481,9 @@ async function listProjects(format) {
|
|
|
12479
12481
|
);
|
|
12480
12482
|
}
|
|
12481
12483
|
}
|
|
12484
|
+
function storedQualifiedAliases(project2) {
|
|
12485
|
+
return project2.qualifiedAliases ?? [];
|
|
12486
|
+
}
|
|
12482
12487
|
async function showProject(name, format) {
|
|
12483
12488
|
const client = getClient22();
|
|
12484
12489
|
const project2 = await client.getProject(name);
|
|
@@ -12498,6 +12503,10 @@ async function showProject(name, format) {
|
|
|
12498
12503
|
if (project2.aliases && project2.aliases.length > 0) {
|
|
12499
12504
|
console.log(` Aliases: ${project2.aliases.join(", ")}`);
|
|
12500
12505
|
}
|
|
12506
|
+
const qualifiedAliases = storedQualifiedAliases(project2);
|
|
12507
|
+
if (qualifiedAliases.length > 0) {
|
|
12508
|
+
console.log(` Qualified: ${qualifiedAliases.join(", ")} (sentiment)`);
|
|
12509
|
+
}
|
|
12501
12510
|
console.log(` Country: ${project2.country}`);
|
|
12502
12511
|
console.log(` Language: ${project2.language}`);
|
|
12503
12512
|
console.log(` Config source: ${project2.configSource}`);
|
|
@@ -12537,6 +12546,24 @@ async function updateProjectSettings(name, opts) {
|
|
|
12537
12546
|
const toRemove = new Set(opts.removeAlias.map((a) => a.toLowerCase()));
|
|
12538
12547
|
aliases = aliases.filter((a) => !toRemove.has(a.toLowerCase()));
|
|
12539
12548
|
}
|
|
12549
|
+
const nextAliases = normalizeProjectAliases(nextDisplayName, aliases);
|
|
12550
|
+
const touchesQualified = (opts.addQualifiedAlias?.length ?? 0) > 0 || (opts.removeQualifiedAlias?.length ?? 0) > 0;
|
|
12551
|
+
let qualifiedAliases = resolveProjectQualifiedAliases(
|
|
12552
|
+
{ displayName: nextDisplayName, aliases: nextAliases },
|
|
12553
|
+
storedQualifiedAliases(project2)
|
|
12554
|
+
).value;
|
|
12555
|
+
if (opts.addQualifiedAlias) {
|
|
12556
|
+
const existingKeys = new Set(qualifiedAliases.map((alias) => alias.toLowerCase()));
|
|
12557
|
+
for (const alias of opts.addQualifiedAlias) {
|
|
12558
|
+
if (existingKeys.has(alias.toLowerCase())) continue;
|
|
12559
|
+
existingKeys.add(alias.toLowerCase());
|
|
12560
|
+
qualifiedAliases = [...qualifiedAliases, alias];
|
|
12561
|
+
}
|
|
12562
|
+
}
|
|
12563
|
+
if (opts.removeQualifiedAlias) {
|
|
12564
|
+
const toRemove = new Set(opts.removeQualifiedAlias.map((alias) => alias.toLowerCase()));
|
|
12565
|
+
qualifiedAliases = qualifiedAliases.filter((alias) => !toRemove.has(alias.toLowerCase()));
|
|
12566
|
+
}
|
|
12540
12567
|
const providerModels = { ...project2.providerModels ?? {}, ...opts.providerModels ?? {} };
|
|
12541
12568
|
for (const provider of opts.clearProviderModels ?? []) delete providerModels[provider];
|
|
12542
12569
|
const nextProviders = opts.providers ?? project2.providers ?? [];
|
|
@@ -12559,7 +12586,8 @@ async function updateProjectSettings(name, opts) {
|
|
|
12559
12586
|
displayName: nextDisplayName,
|
|
12560
12587
|
canonicalDomain: opts.domain ?? project2.canonicalDomain,
|
|
12561
12588
|
ownedDomains,
|
|
12562
|
-
aliases:
|
|
12589
|
+
aliases: nextAliases,
|
|
12590
|
+
...touchesQualified ? { qualifiedAliases } : {},
|
|
12563
12591
|
country: opts.country ?? project2.country,
|
|
12564
12592
|
language: opts.language ?? project2.language,
|
|
12565
12593
|
tags: project2.tags,
|
|
@@ -12687,12 +12715,13 @@ async function setDefaultLocation(project2, label, format) {
|
|
|
12687
12715
|
var PROJECT_CLI_COMMANDS = [
|
|
12688
12716
|
{
|
|
12689
12717
|
path: ["project", "create"],
|
|
12690
|
-
usage: "canonry project create <name> [--domain <domain>] [--owned-domain <domain>...] [--alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--provider-model provider=model...] [--dispatch-mode provider=sync|batch...] [--format json]",
|
|
12718
|
+
usage: "canonry project create <name> [--domain <domain>] [--owned-domain <domain>...] [--alias <name>...] [--qualified-alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--provider-model provider=model...] [--dispatch-mode provider=sync|batch...] [--format json]",
|
|
12691
12719
|
help: "Create a project. Pass --domain for the public site to scan. Provider credentials are not required for Page Health.",
|
|
12692
12720
|
options: {
|
|
12693
12721
|
domain: { type: "string", short: "d" },
|
|
12694
12722
|
"owned-domain": multiStringOption(),
|
|
12695
12723
|
alias: multiStringOption(),
|
|
12724
|
+
"qualified-alias": multiStringOption(),
|
|
12696
12725
|
country: stringOption(),
|
|
12697
12726
|
language: stringOption(),
|
|
12698
12727
|
"display-name": stringOption(),
|
|
@@ -12704,12 +12733,13 @@ var PROJECT_CLI_COMMANDS = [
|
|
|
12704
12733
|
const name = requireProject(
|
|
12705
12734
|
input,
|
|
12706
12735
|
"project.create",
|
|
12707
|
-
"canonry project create <name> [--domain <domain>] [--owned-domain <domain>...] [--alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--provider-model provider=model...] [--dispatch-mode provider=sync|batch...] [--format json]"
|
|
12736
|
+
"canonry project create <name> [--domain <domain>] [--owned-domain <domain>...] [--alias <name>...] [--qualified-alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--provider-model provider=model...] [--dispatch-mode provider=sync|batch...] [--format json]"
|
|
12708
12737
|
);
|
|
12709
12738
|
await createProject(name, {
|
|
12710
12739
|
domain: getString(input.values, "domain") ?? name,
|
|
12711
12740
|
ownedDomains: getStringArray(input.values, "owned-domain") ?? [],
|
|
12712
12741
|
aliases: getStringArray(input.values, "alias") ?? [],
|
|
12742
|
+
qualifiedAliases: getStringArray(input.values, "qualified-alias") ?? [],
|
|
12713
12743
|
country: getString(input.values, "country") ?? "US",
|
|
12714
12744
|
language: getString(input.values, "language") ?? "en",
|
|
12715
12745
|
displayName: getString(input.values, "display-name") ?? name,
|
|
@@ -12722,7 +12752,7 @@ var PROJECT_CLI_COMMANDS = [
|
|
|
12722
12752
|
},
|
|
12723
12753
|
{
|
|
12724
12754
|
path: ["project", "update"],
|
|
12725
|
-
usage: "canonry project update <name> [--domain <domain>] [--owned-domain <domain>...] [--add-domain <domain>...] [--remove-domain <domain>...] [--alias <name>...] [--add-alias <name>...] [--remove-alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--all-providers] [--provider-model provider=model...] [--clear-provider-model <provider>...] [--dispatch-mode provider=sync|batch...] [--clear-dispatch-mode <provider>...] [--negative-review-max-stars <1-4|default>] [--format json]",
|
|
12755
|
+
usage: "canonry project update <name> [--domain <domain>] [--owned-domain <domain>...] [--add-domain <domain>...] [--remove-domain <domain>...] [--alias <name>...] [--add-alias <name>...] [--remove-alias <name>...] [--add-qualified-alias <name>...] [--remove-qualified-alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--all-providers] [--provider-model provider=model...] [--clear-provider-model <provider>...] [--dispatch-mode provider=sync|batch...] [--clear-dispatch-mode <provider>...] [--negative-review-max-stars <1-4|default>] [--format json]",
|
|
12726
12756
|
options: {
|
|
12727
12757
|
domain: { type: "string", short: "d" },
|
|
12728
12758
|
"owned-domain": multiStringOption(),
|
|
@@ -12731,6 +12761,8 @@ var PROJECT_CLI_COMMANDS = [
|
|
|
12731
12761
|
alias: multiStringOption(),
|
|
12732
12762
|
"add-alias": multiStringOption(),
|
|
12733
12763
|
"remove-alias": multiStringOption(),
|
|
12764
|
+
"add-qualified-alias": multiStringOption(),
|
|
12765
|
+
"remove-qualified-alias": multiStringOption(),
|
|
12734
12766
|
country: stringOption(),
|
|
12735
12767
|
language: stringOption(),
|
|
12736
12768
|
"display-name": stringOption(),
|
|
@@ -12746,7 +12778,7 @@ var PROJECT_CLI_COMMANDS = [
|
|
|
12746
12778
|
const name = requireProject(
|
|
12747
12779
|
input,
|
|
12748
12780
|
"project.update",
|
|
12749
|
-
"canonry project update <name> [--domain <domain>] [--owned-domain <domain>...] [--add-domain <domain>...] [--remove-domain <domain>...] [--alias <name>...] [--add-alias <name>...] [--remove-alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--all-providers] [--provider-model provider=model...] [--clear-provider-model <provider>...] [--dispatch-mode provider=sync|batch...] [--clear-dispatch-mode <provider>...] [--negative-review-max-stars <1-4|default>] [--format json]"
|
|
12781
|
+
"canonry project update <name> [--domain <domain>] [--owned-domain <domain>...] [--add-domain <domain>...] [--remove-domain <domain>...] [--alias <name>...] [--add-alias <name>...] [--remove-alias <name>...] [--add-qualified-alias <name>...] [--remove-qualified-alias <name>...] [--country <code>] [--language <lang>] [--display-name <name>] [--provider <name>...] [--all-providers] [--provider-model provider=model...] [--clear-provider-model <provider>...] [--dispatch-mode provider=sync|batch...] [--clear-dispatch-mode <provider>...] [--negative-review-max-stars <1-4|default>] [--format json]"
|
|
12750
12782
|
);
|
|
12751
12783
|
const providers = getStringArray(input.values, "provider");
|
|
12752
12784
|
const allProviders = getBoolean(input.values, "all-providers");
|
|
@@ -12770,6 +12802,8 @@ var PROJECT_CLI_COMMANDS = [
|
|
|
12770
12802
|
aliases: getStringArray(input.values, "alias"),
|
|
12771
12803
|
addAlias: getStringArray(input.values, "add-alias"),
|
|
12772
12804
|
removeAlias: getStringArray(input.values, "remove-alias"),
|
|
12805
|
+
addQualifiedAlias: getStringArray(input.values, "add-qualified-alias"),
|
|
12806
|
+
removeQualifiedAlias: getStringArray(input.values, "remove-qualified-alias"),
|
|
12773
12807
|
country: getString(input.values, "country"),
|
|
12774
12808
|
language: getString(input.values, "language"),
|
|
12775
12809
|
providers: allProviders ? [] : providers,
|
|
@@ -15073,6 +15107,12 @@ function renderHuman2(overview) {
|
|
|
15073
15107
|
printScore("Index coverage ", scores.indexCoverage);
|
|
15074
15108
|
printScore("Competitor press.", scores.competitorPressure);
|
|
15075
15109
|
printScore("Run status ", scores.runStatus);
|
|
15110
|
+
const overallSentiment = overview.sentiment?.overall;
|
|
15111
|
+
if (overview.sentiment?.configured && overallSentiment && overallSentiment.coverage.judged > 0 && overallSentiment.score.favorableRate !== null) {
|
|
15112
|
+
console.log(`
|
|
15113
|
+
Overall sentiment: ${overallSentiment.score.favorableDisplay} favorable \xB7 all query classes`);
|
|
15114
|
+
console.log(` ${overallSentiment.coverage.counts.favorable} favorable / ${overallSentiment.coverage.judged} judged${overallSentiment.provisional ? " \xB7 provisional" : ""}`);
|
|
15115
|
+
}
|
|
15076
15116
|
console.log(`
|
|
15077
15117
|
Queries cited: ${queryCounts.citedQueries}/${queryCounts.totalQueries} (${formatPercent(queryCounts.citedRate)})`);
|
|
15078
15118
|
console.log(` Queries mentioned: ${queryCounts.mentionedQueries}/${queryCounts.totalQueries} (${formatPercent(queryCounts.mentionRate)})`);
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
computeFactorAverages,
|
|
6
6
|
layoutSiteCrawlGraphInput,
|
|
7
7
|
persistSiteCrawlGraphLayout
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NZCKJMLC.js";
|
|
9
9
|
import {
|
|
10
10
|
PACKAGE_VERSION,
|
|
11
11
|
canonryMcpTools
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-25H4K7KL.js";
|
|
13
13
|
import {
|
|
14
14
|
HISTORY_WINDOW_RUNS,
|
|
15
15
|
IntelligenceService,
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
siteCrawlPages,
|
|
86
86
|
siteCrawlSnapshots,
|
|
87
87
|
trafficSources
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-G2K5KCUY.js";
|
|
89
89
|
import {
|
|
90
90
|
RunKinds,
|
|
91
91
|
SiteCrawlFetchStates,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
roundPreservingTotal,
|
|
113
113
|
siteAuditPageFactorSchema,
|
|
114
114
|
wilsonInterval
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-NOIK3FUO.js";
|
|
116
116
|
|
|
117
117
|
// src/demo-server.ts
|
|
118
118
|
import { dirname, join as join2 } from "path";
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
createGoogleMarketingCredentialStore,
|
|
4
4
|
createGoogleMarketingRuntime,
|
|
5
5
|
createServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AIAVZY6L.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-QTETJEHI.js";
|
|
10
|
+
import "./chunk-NZCKJMLC.js";
|
|
11
|
+
import "./chunk-25H4K7KL.js";
|
|
12
|
+
import "./chunk-G2K5KCUY.js";
|
|
13
|
+
import "./chunk-NOIK3FUO.js";
|
|
14
14
|
export {
|
|
15
15
|
GoogleMarketingRuntimeError,
|
|
16
16
|
createGoogleMarketingCredentialStore,
|
package/dist/mcp.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoSyncSkills
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VHPGBX4P.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient,
|
|
6
6
|
createCanonryMcpServer
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-QTETJEHI.js";
|
|
8
|
+
import "./chunk-25H4K7KL.js";
|
|
9
9
|
import {
|
|
10
10
|
isReadOnlyKey,
|
|
11
11
|
updateCheckEnvOptOut
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NOIK3FUO.js";
|
|
13
13
|
|
|
14
14
|
// src/mcp/cli.ts
|
|
15
15
|
import { randomUUID } from "crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.34.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
|
|
6
6
|
"keywords": [
|
|
@@ -87,32 +87,32 @@
|
|
|
87
87
|
"tsx": "^4.19.0",
|
|
88
88
|
"@ainyc/canonry-web": "0.0.0",
|
|
89
89
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
90
|
-
"@ainyc/canonry-api-routes": "0.0.0",
|
|
91
90
|
"@ainyc/canonry-config": "0.0.0",
|
|
92
91
|
"@ainyc/canonry-db": "0.0.0",
|
|
93
92
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
93
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
94
94
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
95
95
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
96
96
|
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
97
|
-
"@ainyc/canonry-integration-google": "0.0.0",
|
|
98
|
-
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
99
97
|
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
100
98
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
101
|
-
"@ainyc/canonry-integration-google
|
|
99
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
100
|
+
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
102
101
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
102
|
+
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
103
103
|
"@ainyc/canonry-integration-google-tag-manager": "0.0.0",
|
|
104
104
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
105
105
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
106
106
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
107
|
+
"@ainyc/canonry-intelligence": "0.0.0",
|
|
107
108
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
108
109
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
109
110
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
110
111
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
111
|
-
"@ainyc/canonry-intelligence": "0.0.0",
|
|
112
112
|
"@ainyc/canonry-provider-muse": "0.0.0",
|
|
113
|
-
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
114
113
|
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
115
|
-
"@ainyc/canonry-integration-typesafe": "0.0.0"
|
|
114
|
+
"@ainyc/canonry-integration-typesafe": "0.0.0",
|
|
115
|
+
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
116
116
|
},
|
|
117
117
|
"scripts": {
|
|
118
118
|
"build": "pnpm run build:cli && pnpm run build:web",
|