@ainyc/canonry 4.189.1 → 4.190.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/README.md +1 -1
- package/assets/assets/{AuditHistoryPanel-jkTli_49.js → AuditHistoryPanel-wWLs088f.js} +1 -1
- package/assets/assets/{BacklinksPage-UvZsCycW.js → BacklinksPage-DJEO5o9c.js} +1 -1
- package/assets/assets/{HistoryPage-BNhAdEgU.js → HistoryPage-CV5bTBU6.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-BlAQhKbf.js → MeasurementPropertyPage-C7KLIAad.js} +1 -1
- package/assets/assets/ProjectPage-DIW1h05b.js +8 -0
- package/assets/assets/{RunRow-DT_T7pqA.js → RunRow-C3Ryj_9u.js} +1 -1
- package/assets/assets/{RunsPage-Bl0L0rlS.js → RunsPage-BxoEkZu3.js} +1 -1
- package/assets/assets/{SettingsPage-Bqn1dpbS.js → SettingsPage-D_mB1JUZ.js} +1 -1
- package/assets/assets/{SiteHealthSection-z2DhR3t6.js → SiteHealthSection-Dgqtz9J2.js} +3 -3
- package/assets/assets/{TrafficPage-C_5kd1cm.js → TrafficPage-DgsWuDtv.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-Rrwaz-mV.js → TrafficSourceDetailPage-BLWlQ8aT.js} +1 -1
- package/assets/assets/{extract-error-message-CBGBgQDU.js → extract-error-message-DHIHApUf.js} +1 -1
- package/assets/assets/{index-KTeRanN1.css → index-BjjM151x.css} +1 -1
- package/assets/assets/{index-vRk2f6HY.js → index-nb8QHq99.js} +23 -23
- package/assets/assets/{react-sigma_core.esm.min-5Q-_e_E0.js → react-sigma_core.esm.min-DzTADS1A.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-J533DKYE.js → chunk-2II4ZMMH.js} +2 -2
- package/dist/{chunk-YDYB3H4O.js → chunk-32QBVRMN.js} +34 -3
- package/dist/{chunk-HG6NLN7H.js → chunk-4NIQ3GMO.js} +4 -4
- package/dist/{chunk-QQLMRABM.js → chunk-6POEZ7GT.js} +110 -16
- package/dist/{chunk-CDI3YR57.js → chunk-ROPJUNQN.js} +55 -1
- package/dist/cli.js +47 -19
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-M5TYY4TH.js → intelligence-service-WNASQFN4.js} +2 -2
- package/dist/mcp.js +3 -3
- package/package.json +12 -12
- package/assets/assets/ProjectPage-C2oKQpyS.js +0 -9
package/dist/cli.js
CHANGED
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
trackCliCommandFinished,
|
|
29
29
|
trackEvent,
|
|
30
30
|
waitForServerRuntimeStartup
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4NIQ3GMO.js";
|
|
32
32
|
import {
|
|
33
33
|
autoSyncSkills,
|
|
34
34
|
formatAutoSyncNotice
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-2II4ZMMH.js";
|
|
36
36
|
import {
|
|
37
37
|
CliError,
|
|
38
38
|
EXIT_SYSTEM_ERROR,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
saveConfigPatch,
|
|
59
59
|
systemError,
|
|
60
60
|
usageError
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-32QBVRMN.js";
|
|
62
62
|
import {
|
|
63
63
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
64
64
|
CLOUDFLARE_WORKER_GENERATED_MARKER,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
projects,
|
|
73
73
|
queries,
|
|
74
74
|
renderReportHtml
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-6POEZ7GT.js";
|
|
76
76
|
import {
|
|
77
77
|
AdsDeliverySnapshotStatuses,
|
|
78
78
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -110,6 +110,7 @@ import {
|
|
|
110
110
|
canonicalizeGtmAccountId,
|
|
111
111
|
canonicalizeGtmResourceSelection,
|
|
112
112
|
conversionTrackingContractWriteRequestSchema,
|
|
113
|
+
deduplicateResearchQueries,
|
|
113
114
|
describeError,
|
|
114
115
|
discoveryBucketSchema,
|
|
115
116
|
discoveryCompetitorTypeSchema,
|
|
@@ -146,7 +147,7 @@ import {
|
|
|
146
147
|
shareOfVoiceReason,
|
|
147
148
|
visibilityReportRequestSchema,
|
|
148
149
|
winnabilityClassSchema
|
|
149
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-ROPJUNQN.js";
|
|
150
151
|
|
|
151
152
|
// src/cli.ts
|
|
152
153
|
import { pathToFileURL } from "url";
|
|
@@ -2614,6 +2615,8 @@ async function researchRun(project, opts) {
|
|
|
2614
2615
|
queries: opts.queries,
|
|
2615
2616
|
provider: opts.provider,
|
|
2616
2617
|
model: opts.model,
|
|
2618
|
+
scope: opts.scope,
|
|
2619
|
+
template: opts.template,
|
|
2617
2620
|
location: opts.location,
|
|
2618
2621
|
idempotencyKey: opts.idempotencyKey
|
|
2619
2622
|
};
|
|
@@ -2650,11 +2653,11 @@ async function researchList(project, opts) {
|
|
|
2650
2653
|
}
|
|
2651
2654
|
console.log(`Research history for "${project}" (${runs.length}):
|
|
2652
2655
|
`);
|
|
2653
|
-
console.log(" ID STATUS QUERIES PROVIDER / MODEL CREATED");
|
|
2654
|
-
console.log(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
2656
|
+
console.log(" ID STATUS QUERIES PROVIDER / MODEL SCOPE CREATED");
|
|
2657
|
+
console.log(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
2655
2658
|
for (const run of runs) {
|
|
2656
2659
|
const model = run.resolvedModel ? `${run.provider} / ${run.resolvedModel}` : run.provider;
|
|
2657
|
-
console.log(` ${run.id.padEnd(36)} ${run.status.padEnd(10)} ${String(run.totalQueries).padStart(7)} ${model.slice(0, 32).padEnd(32)} ${run.createdAt}`);
|
|
2660
|
+
console.log(` ${run.id.padEnd(36)} ${run.status.padEnd(10)} ${String(run.totalQueries).padStart(7)} ${model.slice(0, 32).padEnd(32)} ${formatScope(run.scope).slice(0, 24).padEnd(24)} ${run.createdAt}`);
|
|
2658
2661
|
}
|
|
2659
2662
|
}
|
|
2660
2663
|
async function researchShow(project, runId, opts) {
|
|
@@ -2684,6 +2687,7 @@ function printStarted(project, run) {
|
|
|
2684
2687
|
console.log(`Research run saved: ${run.id}`);
|
|
2685
2688
|
console.log(` Status: ${run.status}`);
|
|
2686
2689
|
console.log(` Queries: ${run.totalQueries}`);
|
|
2690
|
+
console.log(` Scope: ${formatScope(run.scope)}`);
|
|
2687
2691
|
console.log(` Provider: ${run.provider}${run.resolvedModel ? ` / ${run.resolvedModel}` : ""}`);
|
|
2688
2692
|
console.log(` Inspect: canonry research show ${project} ${run.id}`);
|
|
2689
2693
|
console.log(" Nothing was added to tracked queries.");
|
|
@@ -2699,6 +2703,7 @@ function printDetail(project, detail, format) {
|
|
|
2699
2703
|
}
|
|
2700
2704
|
console.log(`Research run: ${detail.id}`);
|
|
2701
2705
|
console.log(` Status: ${detail.status}`);
|
|
2706
|
+
console.log(` Scope: ${formatScope(detail.scope)}`);
|
|
2702
2707
|
console.log(` Provider: ${detail.provider}${detail.resolvedModel ? ` / ${detail.resolvedModel}` : ""}`);
|
|
2703
2708
|
if (detail.location) console.log(` Location: ${detail.location.label}`);
|
|
2704
2709
|
console.log(` Results: ${detail.completedQueries} completed, ${detail.failedQueries} failed, ${detail.totalQueries} total`);
|
|
@@ -2726,22 +2731,16 @@ function printDetail(project, detail, format) {
|
|
|
2726
2731
|
}
|
|
2727
2732
|
}
|
|
2728
2733
|
}
|
|
2734
|
+
function formatScope(scope) {
|
|
2735
|
+
return scope ? `${scope.label} (${scope.kind})` : "Project-wide";
|
|
2736
|
+
}
|
|
2729
2737
|
|
|
2730
2738
|
// src/cli-commands/research.ts
|
|
2731
|
-
var RUN_USAGE = "canonry research run <project> <query...> [--query <text>] [--provider <name>] [--model <id>] [--location <label>|--no-location] [--idempotency-key <key>] [--wait] [--format json|jsonl]";
|
|
2739
|
+
var RUN_USAGE = "canonry research run <project> <query...> [--query <text>] [--provider <name>] [--model <id>] [--market <key>|--property <key>] [--template-id <id> --template-version <version>] [--location <label>|--no-location] [--idempotency-key <key>] [--wait] [--format json|jsonl]";
|
|
2732
2740
|
function normalizeQueries(input, usage) {
|
|
2733
2741
|
const positional = input.positionals.slice(1);
|
|
2734
2742
|
const flagged = getStringArray(input.values, "query") ?? [];
|
|
2735
|
-
const
|
|
2736
|
-
const queries2 = [];
|
|
2737
|
-
for (const raw of [...positional, ...flagged]) {
|
|
2738
|
-
const query = raw.trim();
|
|
2739
|
-
const key = query.toLocaleLowerCase();
|
|
2740
|
-
if (query && !seen.has(key)) {
|
|
2741
|
-
seen.add(key);
|
|
2742
|
-
queries2.push(query);
|
|
2743
|
-
}
|
|
2744
|
-
}
|
|
2743
|
+
const queries2 = deduplicateResearchQueries([...positional, ...flagged]);
|
|
2745
2744
|
if (queries2.length === 0) {
|
|
2746
2745
|
throw usageError(`Error: at least one research query is required
|
|
2747
2746
|
Usage: ${usage}`, {
|
|
@@ -2791,6 +2790,29 @@ Usage: ${usage}`, {
|
|
|
2791
2790
|
details: { command: "research.run", usage, location: label, project }
|
|
2792
2791
|
});
|
|
2793
2792
|
}
|
|
2793
|
+
function resolveScope(input, usage) {
|
|
2794
|
+
const candidates = ["market", "property"].map((kind) => ({ kind, key: getString(input.values, kind) })).filter((candidate) => candidate.key !== void 0);
|
|
2795
|
+
if (candidates.length > 1) {
|
|
2796
|
+
throw usageError(`Error: --market and --property are mutually exclusive
|
|
2797
|
+
Usage: ${usage}`, {
|
|
2798
|
+
message: "--market and --property are mutually exclusive",
|
|
2799
|
+
details: { command: "research.run", usage }
|
|
2800
|
+
});
|
|
2801
|
+
}
|
|
2802
|
+
return candidates[0];
|
|
2803
|
+
}
|
|
2804
|
+
function resolveTemplate(input, usage) {
|
|
2805
|
+
const templateId = getString(input.values, "template-id")?.trim() || void 0;
|
|
2806
|
+
const templateVersion = getString(input.values, "template-version")?.trim() || void 0;
|
|
2807
|
+
if (Boolean(templateId) !== Boolean(templateVersion)) {
|
|
2808
|
+
throw usageError(`Error: --template-id and --template-version must be used together
|
|
2809
|
+
Usage: ${usage}`, {
|
|
2810
|
+
message: "--template-id and --template-version must be used together",
|
|
2811
|
+
details: { command: "research.run", usage }
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
return templateId && templateVersion ? { templateId, templateVersion } : void 0;
|
|
2815
|
+
}
|
|
2794
2816
|
var RESEARCH_CLI_COMMANDS = [
|
|
2795
2817
|
{
|
|
2796
2818
|
path: ["research", "run"],
|
|
@@ -2799,6 +2821,10 @@ var RESEARCH_CLI_COMMANDS = [
|
|
|
2799
2821
|
query: multiStringOption(),
|
|
2800
2822
|
provider: stringOption(),
|
|
2801
2823
|
model: stringOption(),
|
|
2824
|
+
market: stringOption(),
|
|
2825
|
+
property: stringOption(),
|
|
2826
|
+
"template-id": stringOption(),
|
|
2827
|
+
"template-version": stringOption(),
|
|
2802
2828
|
location: stringOption(),
|
|
2803
2829
|
"no-location": { type: "boolean", default: false },
|
|
2804
2830
|
"idempotency-key": stringOption(),
|
|
@@ -2820,6 +2846,8 @@ Usage: ${RUN_USAGE}`, {
|
|
|
2820
2846
|
provider,
|
|
2821
2847
|
model,
|
|
2822
2848
|
location: await resolveLocation(project, getString(input.values, "location"), getBoolean(input.values, "no-location"), RUN_USAGE),
|
|
2849
|
+
scope: resolveScope(input, RUN_USAGE),
|
|
2850
|
+
template: resolveTemplate(input, RUN_USAGE),
|
|
2823
2851
|
idempotencyKey: getString(input.values, "idempotency-key")?.trim() || void 0,
|
|
2824
2852
|
wait: getBoolean(input.values, "wait"),
|
|
2825
2853
|
format: input.format
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
createGoogleMarketingCredentialStore,
|
|
4
4
|
createGoogleMarketingRuntime,
|
|
5
5
|
createServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4NIQ3GMO.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-32QBVRMN.js";
|
|
10
|
+
import "./chunk-6POEZ7GT.js";
|
|
11
|
+
import "./chunk-ROPJUNQN.js";
|
|
12
12
|
export {
|
|
13
13
|
GoogleMarketingRuntimeError,
|
|
14
14
|
createGoogleMarketingCredentialStore,
|
package/dist/mcp.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoSyncSkills
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2II4ZMMH.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient,
|
|
6
6
|
createCanonryMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-32QBVRMN.js";
|
|
8
8
|
import {
|
|
9
9
|
isReadOnlyKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ROPJUNQN.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp/cli.ts
|
|
13
13
|
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.190.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
|
"license": "FSL-1.1-ALv2",
|
|
@@ -71,30 +71,30 @@
|
|
|
71
71
|
"tsup": "^8.5.1",
|
|
72
72
|
"tsx": "^4.19.0",
|
|
73
73
|
"@ainyc/canonry-web": "0.0.0",
|
|
74
|
-
"@ainyc/canonry-api-
|
|
74
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
75
75
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
76
76
|
"@ainyc/canonry-config": "0.0.0",
|
|
77
|
-
"@ainyc/canonry-
|
|
78
|
-
"@ainyc/canonry-
|
|
77
|
+
"@ainyc/canonry-api-client": "0.0.0",
|
|
78
|
+
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
79
79
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
80
80
|
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
81
|
-
"@ainyc/canonry-
|
|
82
|
-
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
81
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
83
82
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
84
|
-
"@ainyc/canonry-integration-
|
|
83
|
+
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
85
84
|
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
86
|
-
"@ainyc/canonry-integration-google
|
|
85
|
+
"@ainyc/canonry-integration-google": "0.0.0",
|
|
87
86
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
88
|
-
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
89
|
-
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
90
87
|
"@ainyc/canonry-integration-google-tag-manager": "0.0.0",
|
|
91
|
-
"@ainyc/canonry-
|
|
88
|
+
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
89
|
+
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
92
90
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
91
|
+
"@ainyc/canonry-intelligence": "0.0.0",
|
|
92
|
+
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
93
93
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
94
94
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
95
95
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
96
|
-
"@ainyc/canonry-provider-local": "0.0.0",
|
|
97
96
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
97
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
98
98
|
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|