@ainyc/canonry 3.6.2 → 3.6.4
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-B5VNd16q.js → index-C9XiA1Ol.js} +123 -123
- package/assets/assets/{index-BfwQqd05.css → index-D3wFrrZA.css} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-W463NVVC.js → chunk-GP2P2WPS.js} +1 -1
- package/dist/{chunk-CG4HEQAK.js → chunk-JMVBV3AT.js} +3 -3
- package/dist/{chunk-RDX6GBWM.js → chunk-O7EVT3AF.js} +20 -12
- package/dist/{chunk-GLPZ5NVP.js → chunk-RQMOJEJT.js} +1 -1
- package/dist/cli.js +5 -5
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-WZUM3AX6.js → intelligence-service-NL4BG3SM.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +8 -8
package/assets/index.html
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
14
14
|
<title>Canonry</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
16
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-C9XiA1Ol.js"></script>
|
|
16
|
+
<link rel="stylesheet" crossorigin href="./assets/index-D3wFrrZA.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
19
19
|
<div id="root"></div>
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
configExists,
|
|
5
5
|
loadConfig,
|
|
6
6
|
saveConfigPatch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RQMOJEJT.js";
|
|
8
8
|
import {
|
|
9
9
|
IntelligenceService,
|
|
10
10
|
MIN_TREND_POINTS,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
runs,
|
|
50
50
|
schedules,
|
|
51
51
|
usageCounters
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-GP2P2WPS.js";
|
|
53
53
|
import {
|
|
54
54
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
55
55
|
AGENT_PROVIDER_IDS,
|
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
visibilityStateFromAnswerMentioned,
|
|
113
113
|
windowCutoff,
|
|
114
114
|
wordpressEnvSchema
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-O7EVT3AF.js";
|
|
116
116
|
|
|
117
117
|
// src/telemetry.ts
|
|
118
118
|
import crypto from "crypto";
|
|
@@ -1264,18 +1264,20 @@ function extractAnswerMentions(answerText, displayName, domains) {
|
|
|
1264
1264
|
if (matchesNormalized || matchesBrandKey) {
|
|
1265
1265
|
matchedTerms.push(displayName);
|
|
1266
1266
|
}
|
|
1267
|
-
const
|
|
1267
|
+
const brandTokens = collectBrandTokens(displayName, domains);
|
|
1268
|
+
const allTokens = [...brandTokens.primary, ...brandTokens.secondary];
|
|
1269
|
+
const secondarySet = new Set(brandTokens.secondary);
|
|
1268
1270
|
let tokenMatches = 0;
|
|
1269
|
-
const
|
|
1270
|
-
for (const token of
|
|
1271
|
+
const matchedPrimary = [];
|
|
1272
|
+
for (const token of allTokens) {
|
|
1271
1273
|
if (new RegExp(`\\b${escapeRegExp(token)}\\b`).test(lowerAnswer)) {
|
|
1272
1274
|
tokenMatches++;
|
|
1273
|
-
|
|
1275
|
+
if (!secondarySet.has(token)) matchedPrimary.push(token);
|
|
1274
1276
|
}
|
|
1275
1277
|
}
|
|
1276
|
-
const tokenThresholdMet =
|
|
1278
|
+
const tokenThresholdMet = allTokens.length > 0 && (allTokens.length === 1 && tokenMatches >= 1 || tokenMatches >= Math.min(2, allTokens.length));
|
|
1277
1279
|
if (tokenThresholdMet) {
|
|
1278
|
-
matchedTerms.push(...
|
|
1280
|
+
matchedTerms.push(...matchedPrimary);
|
|
1279
1281
|
}
|
|
1280
1282
|
const unique = [...new Set(matchedTerms)];
|
|
1281
1283
|
const domainMatches = unique.filter((t) => t.includes("."));
|
|
@@ -1303,18 +1305,24 @@ function domainMentioned(lowerAnswer, normalizedDomain) {
|
|
|
1303
1305
|
];
|
|
1304
1306
|
return patterns.some((pattern) => pattern.test(lowerAnswer));
|
|
1305
1307
|
}
|
|
1306
|
-
function
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
|
|
1308
|
+
function collectBrandTokens(displayName, domains) {
|
|
1309
|
+
const primary = /* @__PURE__ */ new Set();
|
|
1310
|
+
const secondary = /* @__PURE__ */ new Set();
|
|
1311
|
+
const distinctiveWords = extractDistinctiveTokens(displayName);
|
|
1312
|
+
if (distinctiveWords.length > 0) {
|
|
1313
|
+
primary.add(distinctiveWords[0]);
|
|
1314
|
+
for (let i = 1; i < distinctiveWords.length; i++) {
|
|
1315
|
+
secondary.add(distinctiveWords[i]);
|
|
1316
|
+
}
|
|
1310
1317
|
}
|
|
1311
1318
|
for (const domain of domains) {
|
|
1312
1319
|
const reg = registrableDomain(domain);
|
|
1313
1320
|
const brand = reg ? brandLabelFromDomain(reg) : normalizeProjectDomain(domain).split("/")[0]?.split(".")[0] ?? "";
|
|
1314
1321
|
const token = brand.replace(/[^a-z0-9]/gi, "").toLowerCase();
|
|
1315
|
-
if (isDistinctiveToken(token))
|
|
1322
|
+
if (isDistinctiveToken(token)) primary.add(token);
|
|
1316
1323
|
}
|
|
1317
|
-
|
|
1324
|
+
for (const t of primary) secondary.delete(t);
|
|
1325
|
+
return { primary: [...primary], secondary: [...secondary] };
|
|
1318
1326
|
}
|
|
1319
1327
|
function extractDistinctiveTokens(value) {
|
|
1320
1328
|
return normalizeText(value).split(" ").filter(isDistinctiveToken);
|
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-JMVBV3AT.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-RQMOJEJT.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-GP2P2WPS.js";
|
|
49
49
|
import {
|
|
50
50
|
CcReleaseSyncStatuses,
|
|
51
51
|
CheckScopes,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
providerQuotaPolicySchema,
|
|
64
64
|
resolveProviderInput,
|
|
65
65
|
skillsClientSchema
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-O7EVT3AF.js";
|
|
67
67
|
|
|
68
68
|
// src/cli.ts
|
|
69
69
|
import { pathToFileURL } from "url";
|
|
@@ -579,7 +579,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
579
579
|
return result;
|
|
580
580
|
}
|
|
581
581
|
async function backfillInsightsCommand(project, opts) {
|
|
582
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
582
|
+
const { IntelligenceService } = await import("./intelligence-service-NL4BG3SM.js");
|
|
583
583
|
const config = loadConfig();
|
|
584
584
|
const db = createClient(config.database);
|
|
585
585
|
migrate(db);
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JMVBV3AT.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-RQMOJEJT.js";
|
|
7
|
+
import "./chunk-GP2P2WPS.js";
|
|
8
|
+
import "./chunk-O7EVT3AF.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-RQMOJEJT.js";
|
|
6
|
+
import "./chunk-O7EVT3AF.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.6.
|
|
3
|
+
"version": "3.6.4",
|
|
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,21 +59,21 @@
|
|
|
59
59
|
"@types/node-cron": "^3.0.11",
|
|
60
60
|
"tsup": "^8.5.1",
|
|
61
61
|
"tsx": "^4.19.0",
|
|
62
|
-
"@ainyc/canonry-config": "0.0.0",
|
|
63
62
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
64
|
-
"@ainyc/canonry-
|
|
63
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
65
64
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
66
|
-
"@ainyc/canonry-
|
|
65
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
67
66
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
68
67
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
69
|
-
"@ainyc/canonry-
|
|
68
|
+
"@ainyc/canonry-intelligence": "0.0.0",
|
|
70
69
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
71
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
72
|
-
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
73
70
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
71
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
72
|
+
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
74
73
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
74
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
75
75
|
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
76
|
-
"@ainyc/canonry-
|
|
76
|
+
"@ainyc/canonry-integration-google": "0.0.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|