@ainyc/canonry 5.5.0 → 5.8.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/aero/SKILL.md +18 -0
- package/assets/agent-workspace/skills/aero/references/portfolio-analysis.md +1 -1
- package/assets/agent-workspace/skills/aero/soul.md +2 -0
- package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +10 -0
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +5 -4
- package/assets/assets/{AuditHistoryPanel-BMGGxHpw.js → AuditHistoryPanel-DumM4n44.js} +1 -1
- package/assets/assets/{BacklinksPage-CS3wJSWe.js → BacklinksPage-DHW-aDYf.js} +1 -1
- package/assets/assets/ChartPrimitives-BQC2VH0O.js +1 -0
- package/assets/assets/{HistoryPage-Ba9ezeuP.js → HistoryPage-DJgCpcmY.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-Y9eseEv0.js → MeasurementPropertyPage-CblC7DUV.js} +1 -1
- package/assets/assets/ProjectPage-BKZyG1S3.js +8 -0
- package/assets/assets/{RunRow-DbUtgNUI.js → RunRow-plH2LI7o.js} +1 -1
- package/assets/assets/{RunsPage-BBuFIYuS.js → RunsPage-JCSy7P9I.js} +1 -1
- package/assets/assets/{SettingsPage-DNnR33D-.js → SettingsPage-B8KXT4YK.js} +1 -1
- package/assets/assets/{SiteHealthSection-Cf4KHWp0.js → SiteHealthSection-06pNjngi.js} +3 -3
- package/assets/assets/{TrafficPage-DSQjaZM9.js → TrafficPage-BYLDNQ1A.js} +5 -5
- package/assets/assets/{TrafficSourceDetailPage-C-Pg69TW.js → TrafficSourceDetailPage-CxseBpYr.js} +1 -1
- package/assets/assets/{extract-error-message-DNLmL0ID.js → extract-error-message-Dv5fwiqy.js} +1 -1
- package/assets/assets/index-2Ldc0Hq4.js +86 -0
- package/assets/assets/index-neNKCg78.css +1 -0
- package/assets/assets/{react-sigma_core.esm.min-DkItaBPY.js → react-sigma_core.esm.min-C8381RhL.js} +1 -1
- package/assets/assets/v2-overview-adapter-BQD1Ap8K.js +1 -0
- package/assets/assets/vendor-markdown-B4giJcws.js +29 -0
- package/assets/assets/{vendor-recharts-D-cUuLZo.js → vendor-recharts-llkUFBGR.js} +1 -1
- package/assets/index.html +4 -4
- package/dist/{chunk-BL3FMPSM.js → chunk-5E4ASNU4.js} +857 -784
- package/dist/{chunk-75ECQ77U.js → chunk-BO53QARL.js} +49 -16
- package/dist/{chunk-REQEWYNF.js → chunk-D3DKDTXP.js} +1027 -70
- package/dist/{chunk-DX4CZNNU.js → chunk-LR7BVM53.js} +2 -2
- package/dist/{chunk-LQAOGFFK.js → chunk-R4COV5KR.js} +2 -2
- package/dist/{chunk-KKDXJWDK.js → chunk-S4DBS5DP.js} +4 -4
- package/dist/cli.js +10 -9
- package/dist/{demo-server-BSH6SSWD.js → demo-server-WRVVNKLS.js} +7 -3
- package/dist/index.d.ts +20 -8
- package/dist/index.js +5 -5
- package/dist/{intelligence-service-CU7W5AVC.js → intelligence-service-4XMMO3JK.js} +2 -2
- package/dist/mcp.js +3 -3
- package/package.json +11 -11
- package/assets/assets/ChartPrimitives-Bxa_vFmq.js +0 -1
- package/assets/assets/ProjectPage-Cl1N9Dcw.js +0 -8
- package/assets/assets/index-BCCrbno5.js +0 -86
- package/assets/assets/index-gQj7x9RX.css +0 -1
- package/assets/assets/v2-overview-adapter-DKBMcYBh.js +0 -1
- package/assets/assets/vendor-markdown-B-Oq2NYq.js +0 -14
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
installSkills,
|
|
5
5
|
loadConfigRaw,
|
|
6
6
|
saveConfigPatch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S4DBS5DP.js";
|
|
8
8
|
import {
|
|
9
9
|
PACKAGE_VERSION
|
|
10
10
|
} from "./chunk-AOJU5LKX.js";
|
|
11
11
|
import {
|
|
12
12
|
SKILL_MANIFEST_FILENAME,
|
|
13
13
|
SkillsClients
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D3DKDTXP.js";
|
|
15
15
|
|
|
16
16
|
// src/skills-autosync.ts
|
|
17
17
|
import fs from "fs";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5E4ASNU4.js";
|
|
9
9
|
import {
|
|
10
10
|
SITE_CRAWL_GRAPH_MAX_EDGES,
|
|
11
11
|
SITE_CRAWL_GRAPH_MAX_NODES,
|
|
12
12
|
TEMPLATE_LINK_RATIO_THRESHOLD
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D3DKDTXP.js";
|
|
14
14
|
|
|
15
15
|
// src/site-crawl-graph-layout.ts
|
|
16
16
|
import crypto from "crypto";
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
upgradeCaveatFor,
|
|
131
131
|
upgradeCommandFor,
|
|
132
132
|
visibilityReportRequestSchema
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-D3DKDTXP.js";
|
|
134
134
|
|
|
135
135
|
// src/cli-error.ts
|
|
136
136
|
function isMachineFormat(format) {
|
|
@@ -9961,7 +9961,7 @@ var canonryMcpTools = [
|
|
|
9961
9961
|
defineTool({
|
|
9962
9962
|
name: "canonry_visibility_report",
|
|
9963
9963
|
title: "Read scoped AI visibility",
|
|
9964
|
-
description: "Read stored visibility for a site, group, market or property. Branded, non-brand and unclassified answers remain separate populations. The response owns rates, trends, query performance, answers and competitors under one frozen measured definition. Material plan changes retain the prior measured revision; pending assignments are explicit. Search filters the query list only. Reuse cursors with identical selection. Never starts a sweep.",
|
|
9964
|
+
description: "Read stored visibility for a site, group, market or property. Branded, non-brand and unclassified answers remain separate populations. The response owns rates, trends, query performance, answers and competitors under one frozen measured definition. Each population carries `comparison`, the change versus the previous eligible whole-project sweep when both are complete and comparable; it is absent when that sweep cannot be read. Material plan changes retain the prior measured revision; pending assignments are explicit. Search filters the query list only. Reuse cursors with identical selection. Never starts a sweep.",
|
|
9965
9965
|
access: "read",
|
|
9966
9966
|
tier: "monitoring",
|
|
9967
9967
|
inputSchema: visibilityReportRequestSchema.safeExtend({ project: projectNameSchema }),
|
|
@@ -9975,7 +9975,7 @@ var canonryMcpTools = [
|
|
|
9975
9975
|
defineTool({
|
|
9976
9976
|
name: "canonry_query_tracking_workspace",
|
|
9977
9977
|
title: "Read query assignments",
|
|
9978
|
-
description: "Read tracked queries, exact assignments, saved research sources and the current workspace version for a simple site or advanced portfolio.",
|
|
9978
|
+
description: "Read tracked queries, exact assignments, saved research sources and the current workspace version for a simple site or advanced portfolio. Also returns scopeOptions: server-built project, group, market and property choices with distinct property counts.",
|
|
9979
9979
|
access: "read",
|
|
9980
9980
|
tier: "setup",
|
|
9981
9981
|
inputSchema: projectInputSchema,
|
|
@@ -10041,7 +10041,7 @@ var canonryMcpTools = [
|
|
|
10041
10041
|
defineTool({
|
|
10042
10042
|
name: "canonry_project_overview",
|
|
10043
10043
|
title: "Get project overview (composite)",
|
|
10044
|
-
description: 'One-call summary for "how is project X doing?". Returns independent mention and citation coverage, separate query-level movement for each signal, query-basket comparability with added/removed counts, latest run and health, insights, provider/model breakdowns, competitors, attention items, and recent history. Movement excludes queries not shared by both sweeps. Filterable by location and time window. Prefer this over fanning out to separate tools.',
|
|
10044
|
+
description: 'One-call summary for "how is project X doing?". Returns independent mention and citation coverage, separate query-level movement for each signal, query-basket comparability with added/removed counts, latest run and health, insights, provider/model breakdowns, competitors, attention items, and recent history. Movement excludes queries not shared by both sweeps. Filterable by location and time window. Prefer this over fanning out to separate read tools for the same question. SCOPE LIMIT: this returns nothing about Advanced Measurement: no plan, Targets, Properties, groups, or segments. Its silence is not evidence that a project lacks them. Before stating that a project has no Properties, no Advanced plan, or cannot break out per-Property performance, call canonry_measurement_plan_get to establish the portfolio type, and canonry_measurement_portfolio_summary to rank Properties.',
|
|
10045
10045
|
access: "read",
|
|
10046
10046
|
tier: "core",
|
|
10047
10047
|
inputSchema: z4.object({
|
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-BO53QARL.js";
|
|
39
39
|
import {
|
|
40
40
|
autoSyncSkills,
|
|
41
41
|
formatAutoSyncNotice
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LR7BVM53.js";
|
|
43
43
|
import {
|
|
44
44
|
CliError,
|
|
45
45
|
EXIT_SYSTEM_ERROR,
|
|
@@ -66,13 +66,13 @@ import {
|
|
|
66
66
|
shouldPrintServeSkillsNudge,
|
|
67
67
|
systemError,
|
|
68
68
|
usageError
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-S4DBS5DP.js";
|
|
70
70
|
import {
|
|
71
71
|
DEFAULT_DEMO_TRUSTED_PROXIES,
|
|
72
72
|
trustedProxiesProblem,
|
|
73
73
|
trustedProxyProblem
|
|
74
74
|
} from "./chunk-RB2F4D3Z.js";
|
|
75
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-R4COV5KR.js";
|
|
76
76
|
import "./chunk-AOJU5LKX.js";
|
|
77
77
|
import {
|
|
78
78
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
queries,
|
|
89
89
|
renderReportHtml,
|
|
90
90
|
runs
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-5E4ASNU4.js";
|
|
92
92
|
import {
|
|
93
93
|
AdsDeliverySnapshotStatuses,
|
|
94
94
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -139,6 +139,7 @@ import {
|
|
|
139
139
|
formatMicros,
|
|
140
140
|
formatRatio,
|
|
141
141
|
formatRunErrorOneLine,
|
|
142
|
+
formatWholePercent,
|
|
142
143
|
googleAdsMetricsWindowSchema,
|
|
143
144
|
logQuerySchema,
|
|
144
145
|
measurementChangesQuerySchema,
|
|
@@ -169,7 +170,7 @@ import {
|
|
|
169
170
|
snapshotProviderModeSchema,
|
|
170
171
|
visibilityReportRequestSchema,
|
|
171
172
|
winnabilityClassSchema
|
|
172
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-D3DKDTXP.js";
|
|
173
174
|
|
|
174
175
|
// src/cli.ts
|
|
175
176
|
import { pathToFileURL } from "url";
|
|
@@ -434,7 +435,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
434
435
|
async function demoCommand(options) {
|
|
435
436
|
const { host, port } = parseDemoListenOptions(options);
|
|
436
437
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
437
|
-
const { createDemoServer } = await import("./demo-server-
|
|
438
|
+
const { createDemoServer } = await import("./demo-server-WRVVNKLS.js");
|
|
438
439
|
const app = await createDemoServer({ trustProxy });
|
|
439
440
|
let stopping = false;
|
|
440
441
|
const stop = () => {
|
|
@@ -14602,8 +14603,8 @@ async function listContentGaps(project, opts) {
|
|
|
14602
14603
|
console.log(`${response.gaps.length} gap${response.gaps.length === 1 ? "" : "s"} found`);
|
|
14603
14604
|
console.log("");
|
|
14604
14605
|
for (const gap of response.gaps) {
|
|
14605
|
-
const missPct =
|
|
14606
|
-
console.log(`${missPct.
|
|
14606
|
+
const missPct = formatWholePercent(gap.missRate);
|
|
14607
|
+
console.log(`${missPct.padStart(4)} ${gap.competitorCount} competitor(s) ${gap.query}`);
|
|
14607
14608
|
console.log(` competitors: ${gap.competitorDomains.join(", ")}`);
|
|
14608
14609
|
console.log("");
|
|
14609
14610
|
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
layoutSiteCrawlGraphInput,
|
|
6
6
|
persistSiteCrawlGraphLayout
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R4COV5KR.js";
|
|
8
8
|
import {
|
|
9
9
|
PACKAGE_VERSION
|
|
10
10
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
siteCrawlPages,
|
|
84
84
|
siteCrawlSnapshots,
|
|
85
85
|
trafficSources
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-5E4ASNU4.js";
|
|
87
87
|
import {
|
|
88
88
|
RunKinds,
|
|
89
89
|
SiteCrawlFetchStates,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
measurementPlanV2Schema,
|
|
105
105
|
placementLinkDecision,
|
|
106
106
|
siteAuditPageFactorSchema
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-D3DKDTXP.js";
|
|
108
108
|
|
|
109
109
|
// src/demo-server.ts
|
|
110
110
|
import { dirname, join as join2 } from "path";
|
|
@@ -995,6 +995,10 @@ function harborPlan(context, capturedAt) {
|
|
|
995
995
|
stableKey: `market-${market.key}`,
|
|
996
996
|
label: `${market.label} market`,
|
|
997
997
|
kind: "market",
|
|
998
|
+
// Each demo Group holds exactly its market's properties, so the market
|
|
999
|
+
// links to its Group rather than sitting as an unrelated root option
|
|
1000
|
+
// with an identical label (O5).
|
|
1001
|
+
groupKey: `market-${market.key}`,
|
|
998
1002
|
usageEdges: usageEdges.filter((edge) => edge.targetKey.includes(market.key))
|
|
999
1003
|
})),
|
|
1000
1004
|
compiledChecksum: "0".repeat(64)
|
package/dist/index.d.ts
CHANGED
|
@@ -268,15 +268,27 @@ interface ExternalMcpServerConfig {
|
|
|
268
268
|
}
|
|
269
269
|
interface AgentConfigEntry {
|
|
270
270
|
/**
|
|
271
|
-
* Agent mode.
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
* the
|
|
277
|
-
* agent
|
|
271
|
+
* Agent mode. Three states, held on ONE field so they stay mutually
|
|
272
|
+
* exclusive: there is no way to write down "off, but still waking itself".
|
|
273
|
+
*
|
|
274
|
+
* - `'disabled'` turns the built-in Aero agent OFF entirely — the proactive
|
|
275
|
+
* auto-wake on run completion does not fire, the `SessionRegistry` is not
|
|
276
|
+
* constructed, and the interactive agent routes (`/projects/:name/agent/*`)
|
|
277
|
+
* plus the `canonry agent ask` CLI (a thin client of those routes) are not
|
|
278
|
+
* served. Resolved, with the `CANONRY_AGENT_DISABLED` env override, by
|
|
279
|
+
* `resolveAgentEnabled`.
|
|
280
|
+
* - `'prompt-only'` keeps every interactive surface and removes ONLY the
|
|
281
|
+
* proactive wake: Aero answers when asked and never starts a turn by
|
|
282
|
+
* itself, so it costs nothing while nobody is talking to it and never
|
|
283
|
+
* writes into the transcript unattended. Resolved, with the
|
|
284
|
+
* `CANONRY_AGENT_PROMPT_ONLY` env override, by
|
|
285
|
+
* `resolveAgentProactiveEnabled`.
|
|
286
|
+
* - absent (the default) leaves Aero enabled AND proactive, which is the
|
|
287
|
+
* behaviour every existing install already has.
|
|
288
|
+
*
|
|
289
|
+
* Both resolvers live in agent-config.ts.
|
|
278
290
|
*/
|
|
279
|
-
mode?: 'disabled';
|
|
291
|
+
mode?: 'disabled' | 'prompt-only';
|
|
280
292
|
}
|
|
281
293
|
interface DashboardConfigEntry {
|
|
282
294
|
/**
|
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-BO53QARL.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-S4DBS5DP.js";
|
|
10
|
+
import "./chunk-R4COV5KR.js";
|
|
11
11
|
import "./chunk-AOJU5LKX.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-5E4ASNU4.js";
|
|
13
|
+
import "./chunk-D3DKDTXP.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-LR7BVM53.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient,
|
|
6
6
|
createCanonryMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S4DBS5DP.js";
|
|
8
8
|
import "./chunk-AOJU5LKX.js";
|
|
9
9
|
import {
|
|
10
10
|
isReadOnlyKey,
|
|
11
11
|
updateCheckEnvOptOut
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-D3DKDTXP.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": "@ainyc/canonry",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.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": [
|
|
@@ -86,32 +86,32 @@
|
|
|
86
86
|
"@types/node-cron": "^3.0.11",
|
|
87
87
|
"tsup": "^8.5.1",
|
|
88
88
|
"tsx": "^4.19.0",
|
|
89
|
-
"@ainyc/canonry-web": "0.0.0",
|
|
90
|
-
"@ainyc/canonry-api-client": "0.0.0",
|
|
91
89
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
90
|
+
"@ainyc/canonry-web": "0.0.0",
|
|
92
91
|
"@ainyc/canonry-config": "0.0.0",
|
|
92
|
+
"@ainyc/canonry-api-client": "0.0.0",
|
|
93
93
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
94
94
|
"@ainyc/canonry-db": "0.0.0",
|
|
95
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
96
|
-
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
97
95
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
96
|
+
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
98
97
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
99
|
-
"@ainyc/canonry-integration-
|
|
98
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
100
99
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
100
|
+
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
101
101
|
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
102
102
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
103
103
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
104
104
|
"@ainyc/canonry-integration-google-tag-manager": "0.0.0",
|
|
105
105
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
106
|
+
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
106
107
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
107
108
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
108
|
-
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
109
|
-
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
110
109
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
111
|
-
"@ainyc/canonry-provider-
|
|
112
|
-
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
110
|
+
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
113
111
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
114
|
-
"@ainyc/canonry-provider-
|
|
112
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
113
|
+
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
114
|
+
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"build": "pnpm run build:cli && pnpm run build:web",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i}from"./vendor-tanstack-ZXXkndVj.js";import{R as k,C,a as R,e as A,X as I,Y as _,T as D,d as m}from"./vendor-recharts-D-cUuLZo.js";const L={contentStyle:{backgroundColor:"var(--chart-tooltip-bg, #18181b)",border:"1px solid var(--chart-tooltip-border, #3f3f46)",borderRadius:8,fontSize:12},labelStyle:{color:"var(--chart-tooltip-label, #e4e4e7)"},itemStyle:{color:"var(--chart-tooltip-item, #a1a1aa)"}},v={fill:"var(--chart-neutral-text-dim, #8b8b93)",fontSize:11},O="var(--chart-grid, #27272a)",b="var(--chart-axis, #27272a)",p=["var(--chart-series-1, #34d399)","var(--chart-series-2, #60a5fa)","var(--chart-series-3, #f472b6)","var(--chart-series-4, #facc15)","var(--chart-series-5, #a78bfa)","var(--chart-series-6, #fb923c)","var(--chart-series-7, #22d3ee)","var(--chart-series-8, #f87171)"],j={gemini:"#60a5fa",openai:"#34d399",claude:"#fb923c",perplexity:"#22d3ee",local:"#a78bfa"};function $(r,a=0){return j[r]??p[a%p.length]}const K={text:"var(--chart-neutral-text, #a1a1aa)",textDim:"var(--chart-neutral-text-dim, #8b8b93)",textFaint:"var(--chart-neutral-text-faint, #52525b)",surface:"var(--chart-neutral-surface, #27272a)",trackSubtle:"var(--chart-neutral-track-subtle, rgb(255 255 255 / 0.04))"},H={positive:"var(--chart-tone-positive, #34d399)",positiveDeep:"var(--chart-tone-positive-deep, #10b981)",caution:"var(--chart-tone-caution, #fbbf24)",negative:"var(--chart-tone-negative, #fb7185)"};function N(r){return r}function y(r){const a=/^(\d{4})-(\d{2})-(\d{2})/.exec(r);return a?{year:Number(a[1]),month:Number(a[2]),day:Number(a[3])}:null}function M(r){const a=String(r),e=y(a);return e?new Date(Date.UTC(e.year,e.month-1,e.day)).toLocaleDateString(void 0,{timeZone:"UTC",month:"short",day:"numeric",year:"numeric"}):a}function F(r){const a=y(String(r));return a?`${a.month}/${a.day}`:String(r)}function G(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function P(r){const a=new Date(r);return`${a.getMonth()+1}/${a.getDate()}`}function U({data:r,xKey:a,series:e,height:x=260,xTickFormatter:g,labelFormatter:f,onSelectX:d,selectedX:u}){const h=[...new Set(e.map(t=>t.axisId))],S=new Map(e.map(t=>[t.label,t.formatValue])),T=r.map((t,s)=>{const n={...t};for(const o of e){if(!o.trend)continue;const c=o.trend.startIndex??0,l=o.trend.endIndex??r.length-1;if(s<c||s>l){n[`${o.dataKey}__trend`]=null;continue}n[`${o.dataKey}__trend`]=l<=c?o.trend.start:o.trend.start+(o.trend.end-o.trend.start)*(s-c)/(l-c)}return n});return i.jsx(k,{width:"100%",height:x,children:i.jsxs(C,{data:T,margin:{top:8,right:8,bottom:4,left:0},onClick:d?t=>{t?.activeLabel!==void 0&&d(String(t.activeLabel))}:void 0,style:d?{cursor:"pointer"}:void 0,children:[i.jsx(R,{stroke:O,strokeDasharray:"3 3",vertical:!1}),u!=null&&i.jsx(A,{x:u,yAxisId:h[0],stroke:K.text,strokeDasharray:"2 3",strokeWidth:1}),i.jsx(I,{dataKey:a,tick:v,stroke:b,tickFormatter:g,minTickGap:24}),h.map((t,s)=>{const n=e.find(o=>o.axisId===t);return i.jsx(_,{yAxisId:t,orientation:s===1?"right":"left",hide:s>1,reversed:n.inverted??!1,domain:n.inverted?[1,"auto"]:[0,"auto"],tick:v,stroke:b,width:48,tickFormatter:n.formatValue},t)}),i.jsx(D,{...L,labelFormatter:t=>f?f(String(t)):String(t),formatter:(t,s)=>{const n=String(s??"");return typeof t!="number"?[String(t??""),n]:[S.get(n)?.(t)??t.toLocaleString(),n]}}),e.filter(t=>t.trend).map(t=>i.jsx(m,{yAxisId:t.axisId,dataKey:`${t.dataKey}__trend`,name:`${t.label} trend`,stroke:t.color,strokeWidth:1.5,strokeDasharray:"5 4",strokeOpacity:.55,dot:!1,activeDot:!1,isAnimationActive:!1,legendType:"none",tooltipType:"none"},`${t.dataKey}-trend`)),e.map(t=>i.jsx(m,{yAxisId:t.axisId,dataKey:t.dataKey,name:t.label,stroke:t.color,strokeWidth:2,dot:!1,activeDot:{r:3},connectNulls:!1,isAnimationActive:!1},t.dataKey))]})})}export{O as C,U as M,b as a,v as b,M as c,L as d,p as e,F as f,K as g,H as h,P as i,G as j,N as o,$ as p};
|