@canonry/canonry 7.98.0 → 7.100.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 +18 -16
- package/assets/agent-workspace/AGENTS.md +13 -6
- package/assets/agent-workspace/skills/aero/SKILL.md +45 -26
- package/assets/agent-workspace/skills/aero/references/agent-operations.md +47 -12
- package/assets/agent-workspace/skills/aero/references/memory-patterns.md +1 -1
- package/assets/agent-workspace/skills/aero/references/orchestration.md +9 -9
- package/assets/agent-workspace/skills/aero/references/reporting.md +8 -4
- package/assets/agent-workspace/skills/aero/references/seo-analysis.md +2 -2
- package/assets/agent-workspace/skills/aero/references/site-health.md +34 -23
- package/assets/agent-workspace/skills/aero/soul.md +2 -2
- package/assets/agent-workspace/skills/canonry/SKILL.md +37 -7
- package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +14 -11
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +122 -53
- package/assets/assets/AccessControls-DzO5Y8v9.js +2 -0
- package/assets/assets/AgentSetupPage-DWWovaCw.js +36 -0
- package/assets/assets/AuditHistoryPanel-BG-n1i8c.js +1 -0
- package/assets/assets/BacklinksPage-D6wdOMXt.js +1 -0
- package/assets/assets/ChartPrimitives-CtKdkn64.js +3 -0
- package/assets/assets/Hint-3TTi0MgX.js +1 -0
- package/assets/assets/{HistoryPage-DeN79d3c.js → HistoryPage-B_ReWHbL.js} +1 -1
- package/assets/assets/InfoTooltip-D29JcNMW.js +1 -0
- package/assets/assets/MeasurementPropertyPage-zdyLL-kl.js +4 -0
- package/assets/assets/ProjectPage-KZNKXR4w.js +15 -0
- package/assets/assets/RunsPage-DxN0xXQh.js +1 -0
- package/assets/assets/ServerTrafficSection-CvISj5pf.js +40 -0
- package/assets/assets/SettingsPage-CpRpBlMV.js +1 -0
- package/assets/assets/ToneBadge-DcwPruHr.js +60 -0
- package/assets/assets/TrafficPage-zk6zMZyz.js +1 -0
- package/assets/assets/TrafficSourceDetailPage-DJtsI06Z.js +1 -0
- package/assets/assets/{account-context-CdEHcI5S.js → account-context-CoJVqEXZ.js} +1 -1
- package/assets/assets/{agent-trust-copy-N6WacCSg.js → agent-trust-copy-BIXDMtBm.js} +1 -1
- package/assets/assets/{card-B1O0SunG.js → card-Dwmc7Srx.js} +1 -1
- package/assets/assets/index-fh1T5JQY.css +1 -0
- package/assets/assets/index-mqc2mWUR.js +42 -0
- package/assets/assets/query-client-Tg1fZu4i.js +1 -0
- package/assets/assets/react-query-BqcEEfEO.js +1 -0
- package/assets/assets/{react-sigma_core.esm.min-f4uuOgrw.js → react-sigma_core.esm.min-D1q0DR_j.js} +3 -3
- package/assets/assets/{server-traffic-CkSCFMnL.js → server-traffic-Djnh_9f0.js} +1 -1
- package/assets/assets/service-BQjBdN4O.js +1 -0
- package/assets/assets/use-tooltip-position-BOzm-6Wy.js +1 -0
- package/assets/assets/vendor-lucide-iE5MEh2-.js +1 -0
- package/assets/assets/{vendor-markdown-BDQ1GKGP.js → vendor-markdown-BBGbNklj.js} +1 -1
- package/assets/assets/{vendor-radix-BGYlvS2l.js → vendor-radix-DKCt5Z_h.js} +1 -1
- package/assets/assets/{vendor-recharts-DhEHcK3G.js → vendor-recharts-D3MLFU3q.js} +1 -1
- package/assets/assets/{vendor-tanstack-BNuZ37rE.js → vendor-tanstack-B90HW50P.js} +2 -2
- package/assets/index.html +16 -15
- package/dist/{ads-PQ4OP6OH.js → ads-FVPZ6R6Z.js} +3 -3
- package/dist/{agent-B6ZPL2HH.js → agent-2LPU2E5I.js} +7 -7
- package/dist/{agent-ask-ZUKNXRAX.js → agent-ask-5ODREK6D.js} +3 -3
- package/dist/{agent-conversations-DJ7WU7PL.js → agent-conversations-SNLOOJEM.js} +3 -3
- package/dist/{agent-journeys-LGUI3SQG.js → agent-journeys-XDXVL6PK.js} +3 -3
- package/dist/{agent-memory-PWZJ7G5Q.js → agent-memory-NKAI2S3U.js} +3 -3
- package/dist/{agent-providers-TEERDNJT.js → agent-providers-R5L7A72X.js} +3 -3
- package/dist/{agent-transcript-KDPOPK5Z.js → agent-transcript-C5WAGYVC.js} +3 -3
- package/dist/{analytics-NFW5RQRT.js → analytics-EJVOLIQL.js} +33 -13
- package/dist/{apply-EP4V4UF5.js → apply-I6JOM247.js} +3 -3
- package/dist/{backfill-6UTNNVFO.js → backfill-UVUR36IB.js} +10 -10
- package/dist/{backlinks-SG5GV5X5.js → backlinks-3VMVACWN.js} +3 -3
- package/dist/{bing-Q4W24JNC.js → bing-R5RL3PW2.js} +3 -3
- package/dist/{bootstrap-WEMERVNZ.js → bootstrap-GMMSDTNO.js} +12 -12
- package/dist/{cdp-3XKBJGHO.js → cdp-FJKUXHEY.js} +7 -7
- package/dist/{chunk-KK3Z34AN.js → chunk-2DV7F6XA.js} +91 -2
- package/dist/{chunk-MTW37GXF.js → chunk-2FWYWGIR.js} +2 -2
- package/dist/{chunk-Q5SNOMRB.js → chunk-56VVRWJM.js} +14 -5
- package/dist/{chunk-52M2JWCB.js → chunk-7BEGCVVB.js} +1 -1
- package/dist/{chunk-WZSDGC45.js → chunk-7BH53MOB.js} +27 -2
- package/dist/{chunk-IX5AC3QB.js → chunk-7J2RIIYU.js} +1450 -1067
- package/dist/{chunk-UXXZXXNG.js → chunk-7SNMIXEQ.js} +2 -2
- package/dist/{chunk-2XCYEBQV.js → chunk-AMGM55CP.js} +2 -2
- package/dist/{chunk-MSI4BGFN.js → chunk-AYKTVQF7.js} +13 -5
- package/dist/{chunk-3JWY65XO.js → chunk-BKDRT4VS.js} +7 -7
- package/dist/{chunk-FQ3L2TIX.js → chunk-COHSL6KW.js} +1 -1
- package/dist/{chunk-X3UXMHWC.js → chunk-DGDLLRS4.js} +1 -1
- package/dist/{chunk-YJITDEZR.js → chunk-DHIB7EIA.js} +4 -4
- package/dist/{chunk-BLW327AU.js → chunk-EE3QTCLS.js} +18 -6
- package/dist/{chunk-3GMBHGQ5.js → chunk-F46TBLXK.js} +204 -94
- package/dist/{chunk-RTH5JVC3.js → chunk-FBO25TA3.js} +1 -1
- package/dist/{chunk-2Q7JEC6N.js → chunk-FZ3MUTU3.js} +2 -2
- package/dist/{chunk-64R66MWZ.js → chunk-G6QN4VFS.js} +16 -10
- package/dist/{chunk-ISIJ2NS4.js → chunk-HBHLYWKE.js} +9 -6
- package/dist/{chunk-EJZ444VV.js → chunk-HL2LGRTI.js} +8 -6
- package/dist/chunk-J6536OL6.js +31 -0
- package/dist/{chunk-RLKI2QF7.js → chunk-KVRX7YIH.js} +20 -10
- package/dist/{chunk-3BA75QYU.js → chunk-LJO2BKWU.js} +1 -1
- package/dist/{chunk-CN6MVUY3.js → chunk-LNVFERI4.js} +1 -1
- package/dist/{chunk-ZADRESLB.js → chunk-NQYJHKML.js} +39 -7
- package/dist/{chunk-IAGC2MGP.js → chunk-O5UFAXUI.js} +646 -588
- package/dist/{chunk-RGFIRJ7F.js → chunk-O6APBEJE.js} +2 -2
- package/dist/{chunk-ZBTUISPG.js → chunk-O7S7OHLE.js} +9399 -8388
- package/dist/{chunk-ER5ZHAB2.js → chunk-QS5DWJDI.js} +2 -2
- package/dist/{chunk-QSL3FXE4.js → chunk-RBG2QXQM.js} +4 -4
- package/dist/{chunk-SAKH2RRF.js → chunk-SWZXHHAG.js} +16 -8
- package/dist/{chunk-VMGZBH5L.js → chunk-T7UDY7W3.js} +26 -11
- package/dist/{chunk-OL2L5ANJ.js → chunk-UGO2FO6V.js} +119 -55
- package/dist/{chunk-J6MYB3F4.js → chunk-VHULVUDL.js} +1 -1
- package/dist/{chunk-O22WSFWL.js → chunk-YGAQQSCL.js} +56339 -54966
- package/dist/{chunk-TNOYUE2L.js → chunk-YIIRS7V7.js} +98 -65
- package/dist/{chunk-64KB6YTG.js → chunk-YU2WX7RD.js} +3 -3
- package/dist/{citations-5OSQ3ZYU.js → citations-LOEQRDUB.js} +21 -10
- package/dist/{cli-catalog-T5OAVKGS.js → cli-catalog-5RXNUFBS.js} +3 -3
- package/dist/{cli-commands-VATCVJKW.js → cli-commands-HE2BQY3Y.js} +7 -7
- package/dist/cli.js +22 -17
- package/dist/{competitor-YIKTMTHY.js → competitor-PIX2BHJW.js} +3 -3
- package/dist/{content-DS2LKR7J.js → content-PJGW4WZF.js} +3 -3
- package/dist/{dashboard-HLVRRRI4.js → dashboard-7OKBD4MG.js} +6 -6
- package/dist/{demo-A5DTVJGK.js → demo-SCOFAWFM.js} +1 -1
- package/dist/{demo-server-P2JGAI6C.js → demo-server-SJPI6RSL.js} +38 -36
- package/dist/{discover-VNZDO2MU.js → discover-I3WL2QUN.js} +10 -8
- package/dist/{discover-eval-ON77LUEN.js → discover-eval-YRECOIP5.js} +3 -3
- package/dist/{doctor-7TNNTI7H.js → doctor-F4J6LILX.js} +3 -3
- package/dist/{evidence-E54CNGXS.js → evidence-MYQTCY4V.js} +25 -10
- package/dist/{export-cmd-XXZ6KLQQ.js → export-cmd-3SUFOJM6.js} +3 -3
- package/dist/{ga-ZQB4EJI3.js → ga-VA6FYK4L.js} +3 -3
- package/dist/{gbp-ZQL6NQEK.js → gbp-DI6ZVFHL.js} +3 -3
- package/dist/{google-7EIHQGSV.js → google-UVKWJCD2.js} +4 -4
- package/dist/{google-marketing-RSAO4PG7.js → google-marketing-S63HN733.js} +1 -1
- package/dist/{health-cmd-R7WPKGWX.js → health-cmd-DOZXGI46.js} +16 -9
- package/dist/{history-2CSWSVCY.js → history-UTJTUDYK.js} +3 -3
- package/dist/index.d.ts +204 -12
- package/dist/index.js +26 -26
- package/dist/{init-FXZRMXZ3.js → init-IVJSS33J.js} +19 -19
- package/dist/{insights-EJUL3W6D.js → insights-UHCVCZ76.js} +3 -3
- package/dist/intelligence-service-3EENJ5DS.js +16 -0
- package/dist/{journeys-YUMBANFH.js → journeys-XIT7WDM2.js} +3 -3
- package/dist/{keys-KLOTGT4H.js → keys-MQKW4JUI.js} +3 -3
- package/dist/{keyword-5NSJFEOI.js → keyword-EASMKYZ3.js} +3 -3
- package/dist/{logs-WW3RLCRG.js → logs-ZHZ6XM55.js} +3 -3
- package/dist/{mcp-NTBEIEVX.js → mcp-ECVT2YGU.js} +4 -4
- package/dist/mcp.js +10 -10
- package/dist/{measurement-plan-BLPAZEXS.js → measurement-plan-7FQKUOMR.js} +5 -5
- package/dist/{notify-KAGE6UEN.js → notify-TC7ARC6W.js} +3 -3
- package/dist/{organic-evidence-HTYRXRML.js → organic-evidence-M34MWJXE.js} +7 -4
- package/dist/overview-P6BRMXJN.js +314 -0
- package/dist/{project-NYUWICVC.js → project-WZ2YXFPJ.js} +4 -4
- package/dist/project-setup-WV6SPGIV.js +176 -0
- package/dist/{query-3CRRDOHD.js → query-WAFJKDHG.js} +3 -3
- package/dist/{research-ZULVD3TW.js → research-B5ZPQX7R.js} +3 -3
- package/dist/{results-export-STM7SQ4J.js → results-export-NIZV6R3K.js} +3 -3
- package/dist/{run-S4MFU4MK.js → run-ICLPZ7QT.js} +7 -4
- package/dist/{schedule-6W3Q2FUL.js → schedule-4C44LQ7R.js} +22 -3
- package/dist/{search-EKXXN7C4.js → search-UJM7KII3.js} +11 -4
- package/dist/{serve-TFBFPFAQ.js → serve-A6UIO6WP.js} +30 -29
- package/dist/{session-4B5V3AH6.js → session-RTE22GQT.js} +14 -14
- package/dist/settings-BOF5Z7ML.js +211 -0
- package/dist/{sitemaps-R7XFCH6E.js → sitemaps-BM7S76H2.js} +4 -4
- package/dist/{skills-44XYCTVD.js → skills-X5SR4HRO.js} +2 -2
- package/dist/{snapshot-ROAOJI4W.js → snapshot-KLKE37VY.js} +4 -4
- package/dist/{src-ZJRIKEDB.js → src-EKLG5A6O.js} +4 -2
- package/dist/{status-EN3A2TX5.js → status-OYG57DWU.js} +6 -5
- package/dist/{technical-aeo-ZV466F65.js → technical-aeo-KWVWOOTI.js} +23 -23
- package/dist/{telemetry-EZHPNZ2A.js → telemetry-KGE6FF3Y.js} +4 -4
- package/dist/{tools-IH4M7AAG.js → tools-4R33AZQ3.js} +11 -11
- package/dist/{traffic-VFLXWB3Z.js → traffic-SVMOKCSS.js} +7 -11
- package/dist/{trends-ZXJIX3Z3.js → trends-RGAKGX3L.js} +4 -4
- package/dist/{users-J2BYEWOE.js → users-47WKA2TO.js} +3 -3
- package/dist/{visibility-stats-AJ7NY2BP.js → visibility-stats-DTGQJPNV.js} +9 -5
- package/dist/{wordpress-U6MS35VE.js → wordpress-2CNUX4UE.js} +3 -3
- package/package.json +2 -2
- package/assets/assets/AgentSetupPage-h1kJhy9q.js +0 -18
- package/assets/assets/AuditHistoryPanel-CNUApNiJ.js +0 -1
- package/assets/assets/BacklinksPage-CpKmlAek.js +0 -1
- package/assets/assets/ChartPrimitives-CvK6CQrj.js +0 -1
- package/assets/assets/Hint-c4a4W87X.js +0 -1
- package/assets/assets/InfoTooltip-Drnst4ML.js +0 -1
- package/assets/assets/MeasurementPropertyPage-CcHnYn81.js +0 -4
- package/assets/assets/ProjectPage-Tmuqmust.js +0 -11
- package/assets/assets/RunsPage-BD4k3MjX.js +0 -1
- package/assets/assets/SettingsPage-BHy30JP5.js +0 -1
- package/assets/assets/SiteHealthSection-SYdtuGjq.js +0 -2
- package/assets/assets/ToneBadge-Cii5KNtg.js +0 -60
- package/assets/assets/TrafficPage-DuxtRqnc.js +0 -40
- package/assets/assets/TrafficSourceDetailPage-DiX1bB02.js +0 -1
- package/assets/assets/format-helpers-V8Pyc7cR.js +0 -3
- package/assets/assets/index-BAxHW-1G.css +0 -1
- package/assets/assets/index-BTz-B9hV.js +0 -60
- package/assets/assets/query-client-C1ycmW1c.js +0 -1
- package/assets/assets/react-query-DI7VfOND.js +0 -1
- package/assets/assets/service-DSgXWhNq.js +0 -1
- package/assets/assets/vendor-lucide-DuOM7wVi.js +0 -1
- package/dist/intelligence-service-TKK7O3Z5.js +0 -16
- package/dist/overview-GSJ4GP2T.js +0 -213
- package/dist/settings-VRTDPFR3.js +0 -119
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7SNMIXEQ.js";
|
|
4
4
|
import {
|
|
5
5
|
addLikelyFakeAgentHits,
|
|
6
6
|
correctBackgroundCallJourneys,
|
|
7
7
|
mergeSplitJourneyVisitors,
|
|
8
8
|
repairAiReferralArrivalsOnStartup,
|
|
9
9
|
writeUnrecognizedAgentBuckets
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YGAQQSCL.js";
|
|
11
11
|
import {
|
|
12
12
|
AGENT_TRUST_RULES_VERSION,
|
|
13
13
|
BROWSER_SHAPED_AGENT_MARKERS,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
isSelfTraffic,
|
|
25
25
|
normalizeTrafficPathPattern,
|
|
26
26
|
unrecognizedAgentName
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LNVFERI4.js";
|
|
28
28
|
import {
|
|
29
29
|
RawEventSampleEventTypes,
|
|
30
30
|
agentJourneyCaptureDays,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
rawEventSamples,
|
|
38
38
|
trafficReclassificationState,
|
|
39
39
|
unrecognizedAgentEventsHourly
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-2DV7F6XA.js";
|
|
41
41
|
import {
|
|
42
42
|
AI_ENGINE_DOMAINS,
|
|
43
43
|
AI_ENGINE_SELF_DOMAINS,
|
|
@@ -65,12 +65,14 @@ import {
|
|
|
65
65
|
normalizeServedModel,
|
|
66
66
|
openRouterRouteModel,
|
|
67
67
|
openRouterRouteName,
|
|
68
|
+
redactKnownSecrets,
|
|
69
|
+
redactLogString,
|
|
68
70
|
registrableDomain,
|
|
69
71
|
resolveProviderModel,
|
|
70
72
|
retryAfterDelayMs,
|
|
71
73
|
usageCount,
|
|
72
74
|
withRetry
|
|
73
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-O7S7OHLE.js";
|
|
74
76
|
|
|
75
77
|
// ../provider-openai/src/normalize.ts
|
|
76
78
|
import OpenAI from "openai";
|
|
@@ -79,6 +81,7 @@ import OpenAI from "openai";
|
|
|
79
81
|
async function withRetry2(fn, options = {}) {
|
|
80
82
|
return withRetry(fn, {
|
|
81
83
|
maxRetries: options.maxRetries ?? 3,
|
|
84
|
+
signal: options.signal,
|
|
82
85
|
baseDelayMs: options.initialDelay ?? 1e3,
|
|
83
86
|
// Jitter off preserves the historical deterministic backoff that every
|
|
84
87
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
@@ -114,7 +117,7 @@ function validateConfig(config) {
|
|
|
114
117
|
model: config.model ?? DEFAULT_MODEL
|
|
115
118
|
};
|
|
116
119
|
}
|
|
117
|
-
async function healthcheck(config) {
|
|
120
|
+
async function healthcheck(config, signal) {
|
|
118
121
|
const validation = validateConfig(config);
|
|
119
122
|
if (!validation.ok) return validation;
|
|
120
123
|
try {
|
|
@@ -123,7 +126,8 @@ async function healthcheck(config) {
|
|
|
123
126
|
() => client.responses.create({
|
|
124
127
|
model: config.model ?? DEFAULT_MODEL,
|
|
125
128
|
input: 'Say "ok"'
|
|
126
|
-
})
|
|
129
|
+
}, { signal }),
|
|
130
|
+
{ signal }
|
|
127
131
|
);
|
|
128
132
|
const text = extractResponseText(response);
|
|
129
133
|
return {
|
|
@@ -469,8 +473,8 @@ var openaiAdapter = {
|
|
|
469
473
|
model: result.model
|
|
470
474
|
};
|
|
471
475
|
},
|
|
472
|
-
async healthcheck(config) {
|
|
473
|
-
const result = await healthcheck(toOpenAIConfig(config));
|
|
476
|
+
async healthcheck(config, signal) {
|
|
477
|
+
const result = await healthcheck(toOpenAIConfig(config), signal);
|
|
474
478
|
return {
|
|
475
479
|
ok: result.ok,
|
|
476
480
|
provider: "openai",
|
|
@@ -555,6 +559,7 @@ import Anthropic from "@anthropic-ai/sdk";
|
|
|
555
559
|
async function withRetry3(fn, options = {}) {
|
|
556
560
|
return withRetry(fn, {
|
|
557
561
|
maxRetries: options.maxRetries ?? 3,
|
|
562
|
+
signal: options.signal,
|
|
558
563
|
baseDelayMs: options.initialDelay ?? 1e3,
|
|
559
564
|
// Jitter off preserves the historical deterministic backoff that every
|
|
560
565
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
@@ -613,18 +618,22 @@ function validateConfig2(config) {
|
|
|
613
618
|
model
|
|
614
619
|
};
|
|
615
620
|
}
|
|
616
|
-
async function healthcheck2(config) {
|
|
621
|
+
async function healthcheck2(config, signal) {
|
|
617
622
|
const validation = validateConfig2(config);
|
|
618
623
|
if (!validation.ok) return validation;
|
|
619
624
|
try {
|
|
620
625
|
const model = resolveModel(config);
|
|
621
626
|
const client = new Anthropic({ apiKey: config.apiKey });
|
|
622
627
|
const response = await withRetry3(
|
|
623
|
-
() => client.messages.create(
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
+
() => client.messages.create(
|
|
629
|
+
{
|
|
630
|
+
model,
|
|
631
|
+
max_tokens: 32,
|
|
632
|
+
messages: [{ role: "user", content: 'Say "ok"' }]
|
|
633
|
+
},
|
|
634
|
+
{ signal }
|
|
635
|
+
),
|
|
636
|
+
{ signal }
|
|
628
637
|
);
|
|
629
638
|
const text = extractTextFromResponse(response);
|
|
630
639
|
return {
|
|
@@ -1135,8 +1144,8 @@ var claudeAdapter = {
|
|
|
1135
1144
|
model: result.model
|
|
1136
1145
|
};
|
|
1137
1146
|
},
|
|
1138
|
-
async healthcheck(config) {
|
|
1139
|
-
const result = await healthcheck2(toClaudeConfig(config));
|
|
1147
|
+
async healthcheck(config, signal) {
|
|
1148
|
+
const result = await healthcheck2(toClaudeConfig(config), signal);
|
|
1140
1149
|
return {
|
|
1141
1150
|
ok: result.ok,
|
|
1142
1151
|
provider: "claude",
|
|
@@ -1238,6 +1247,7 @@ function isGeminiRetryable(err) {
|
|
|
1238
1247
|
async function withRetry4(fn, options = {}) {
|
|
1239
1248
|
return withRetry(fn, {
|
|
1240
1249
|
maxRetries: options.maxRetries ?? 3,
|
|
1250
|
+
signal: options.signal,
|
|
1241
1251
|
baseDelayMs: options.initialDelay ?? 1e3,
|
|
1242
1252
|
// Jitter off preserves the historical deterministic backoff that every
|
|
1243
1253
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
@@ -1303,7 +1313,7 @@ function validateConfig3(config) {
|
|
|
1303
1313
|
model
|
|
1304
1314
|
};
|
|
1305
1315
|
}
|
|
1306
|
-
async function healthcheck3(config) {
|
|
1316
|
+
async function healthcheck3(config, signal) {
|
|
1307
1317
|
const validation = validateConfig3(config);
|
|
1308
1318
|
if (!validation.ok) return validation;
|
|
1309
1319
|
try {
|
|
@@ -1312,8 +1322,10 @@ async function healthcheck3(config) {
|
|
|
1312
1322
|
const result = await withRetry4(
|
|
1313
1323
|
() => client.models.generateContent({
|
|
1314
1324
|
model,
|
|
1315
|
-
contents: 'Say "ok"'
|
|
1316
|
-
|
|
1325
|
+
contents: 'Say "ok"',
|
|
1326
|
+
...signal ? { config: { abortSignal: signal } } : {}
|
|
1327
|
+
}),
|
|
1328
|
+
{ signal }
|
|
1317
1329
|
);
|
|
1318
1330
|
const text = result.text ?? "";
|
|
1319
1331
|
const backend = isVertexConfig(config) ? "vertex ai" : "api key";
|
|
@@ -1598,6 +1610,22 @@ function extractEmbeddingVectors(response, expectedLength) {
|
|
|
1598
1610
|
}
|
|
1599
1611
|
|
|
1600
1612
|
// ../provider-gemini/src/list-models.ts
|
|
1613
|
+
var GEMINI_ANSWER_MODELS = [
|
|
1614
|
+
{ id: "gemini-flash-latest", displayName: "Gemini Flash (latest)", tier: "standard" },
|
|
1615
|
+
{ id: "gemini-flash-lite-latest", displayName: "Gemini Flash-Lite (latest)", tier: "economy" },
|
|
1616
|
+
{ id: "gemini-3.8-flash", displayName: "Gemini 3.8 Flash", tier: "standard" },
|
|
1617
|
+
{ id: "gemini-3.7-flash", displayName: "Gemini 3.7 Flash", tier: "standard" },
|
|
1618
|
+
{ id: "gemini-3.6-flash", displayName: "Gemini 3.6 Flash", tier: "standard" },
|
|
1619
|
+
{ id: "gemini-3.5-flash", displayName: "Gemini 3.5 Flash", tier: "standard" },
|
|
1620
|
+
{ id: "gemini-3.5-flash-lite", displayName: "Gemini 3.5 Flash-Lite", tier: "economy" },
|
|
1621
|
+
{ id: "gemini-3.1-pro-preview", displayName: "Gemini 3.1 Pro (preview)", tier: "flagship" },
|
|
1622
|
+
{ id: "gemini-3-flash-preview", displayName: "Gemini 3 Flash (preview)", tier: "standard" },
|
|
1623
|
+
// Google restricts these older models to accounts that have already used them.
|
|
1624
|
+
{ id: "gemini-2.5-pro", displayName: "Gemini 2.5 Pro", tier: "flagship" },
|
|
1625
|
+
{ id: "gemini-2.5-flash", displayName: "Gemini 2.5 Flash", tier: "standard" },
|
|
1626
|
+
{ id: "gemini-2.5-flash-lite", displayName: "Gemini 2.5 Flash-Lite", tier: "economy" }
|
|
1627
|
+
];
|
|
1628
|
+
var answerModels = new Map(GEMINI_ANSWER_MODELS.map((model) => [model.id, model]));
|
|
1601
1629
|
function listModels3(config, signal) {
|
|
1602
1630
|
return withRetry(async () => {
|
|
1603
1631
|
signal.throwIfAborted();
|
|
@@ -1609,9 +1637,10 @@ function listModels3(config, signal) {
|
|
|
1609
1637
|
signal.throwIfAborted();
|
|
1610
1638
|
if (++seen > 1e3) throw new Error("Model catalog exceeded the discovery limit");
|
|
1611
1639
|
const id = model.name?.replace(/^(?:publishers\/google\/)?models\//, "");
|
|
1612
|
-
|
|
1640
|
+
const recommended = id ? answerModels.get(id) : void 0;
|
|
1641
|
+
if (!recommended) continue;
|
|
1613
1642
|
if (model.supportedActions && !model.supportedActions.includes("generateContent")) continue;
|
|
1614
|
-
models.push({
|
|
1643
|
+
models.push({ ...recommended, displayName: model.displayName || recommended.displayName });
|
|
1615
1644
|
}
|
|
1616
1645
|
return models;
|
|
1617
1646
|
}, {
|
|
@@ -1692,22 +1721,7 @@ var geminiAdapter = {
|
|
|
1692
1721
|
defaultModel: "gemini-flash-latest",
|
|
1693
1722
|
validationPattern: /./,
|
|
1694
1723
|
validationHint: "any valid Google model name (e.g. gemini-flash-latest, gemini-3.8-flash)",
|
|
1695
|
-
knownModels:
|
|
1696
|
-
// Google's moving aliases: always the newest Flash / Flash-Lite, with
|
|
1697
|
-
// 2 weeks' email notice before a breaking change. The model actually
|
|
1698
|
-
// served is recorded per snapshot (`servedModel`), so trends still show
|
|
1699
|
-
// when the model behind an alias changed.
|
|
1700
|
-
{ id: "gemini-flash-latest", displayName: "Gemini Flash (latest)", tier: "standard" },
|
|
1701
|
-
{ id: "gemini-flash-lite-latest", displayName: "Gemini Flash-Lite (latest)", tier: "economy" },
|
|
1702
|
-
{ id: "gemini-3.8-flash", displayName: "Gemini 3.8 Flash", tier: "standard" },
|
|
1703
|
-
{ id: "gemini-3.5-flash-lite", displayName: "Gemini 3.5 Flash-Lite", tier: "economy" },
|
|
1704
|
-
// Google limits the 2.5 models to projects that already used them, so a
|
|
1705
|
-
// new key may be refused. Listed for installs that still pin them.
|
|
1706
|
-
{ id: "gemini-2.5-pro", displayName: "Gemini 2.5 Pro", tier: "flagship" },
|
|
1707
|
-
{ id: "gemini-2.5-flash", displayName: "Gemini 2.5 Flash", tier: "standard" },
|
|
1708
|
-
{ id: "gemini-2.5-flash-lite", displayName: "Gemini 2.5 Flash-Lite", tier: "economy" },
|
|
1709
|
-
{ id: "gemini-2.0-flash", displayName: "Gemini 2.0 Flash", tier: "standard" }
|
|
1710
|
-
]
|
|
1724
|
+
knownModels: GEMINI_ANSWER_MODELS
|
|
1711
1725
|
},
|
|
1712
1726
|
listModels: (config, signal) => listModels3(toGeminiConfig(config), signal),
|
|
1713
1727
|
validateConfig(config) {
|
|
@@ -1719,8 +1733,8 @@ var geminiAdapter = {
|
|
|
1719
1733
|
model: result.model
|
|
1720
1734
|
};
|
|
1721
1735
|
},
|
|
1722
|
-
async healthcheck(config) {
|
|
1723
|
-
const result = await healthcheck3(toGeminiConfig(config));
|
|
1736
|
+
async healthcheck(config, signal) {
|
|
1737
|
+
const result = await healthcheck3(toGeminiConfig(config), signal);
|
|
1724
1738
|
return {
|
|
1725
1739
|
ok: result.ok,
|
|
1726
1740
|
provider: "gemini",
|
|
@@ -1803,6 +1817,7 @@ import OpenAI3 from "openai";
|
|
|
1803
1817
|
async function withRetry5(fn, options = {}) {
|
|
1804
1818
|
return withRetry(fn, {
|
|
1805
1819
|
maxRetries: options.maxRetries ?? 3,
|
|
1820
|
+
signal: options.signal,
|
|
1806
1821
|
baseDelayMs: options.initialDelay ?? 1e3,
|
|
1807
1822
|
// Jitter off preserves the historical deterministic backoff that every
|
|
1808
1823
|
// provider has shipped to date (1000, 2000, 4000ms). Enable per-caller
|
|
@@ -1861,14 +1876,15 @@ function validateConfig4(config) {
|
|
|
1861
1876
|
model: resolveModel3(config.model)
|
|
1862
1877
|
};
|
|
1863
1878
|
}
|
|
1864
|
-
async function healthcheck4(config) {
|
|
1879
|
+
async function healthcheck4(config, signal) {
|
|
1865
1880
|
const validation = validateConfig4(config);
|
|
1866
1881
|
if (!validation.ok) return validation;
|
|
1867
1882
|
const model = resolveModel3(config.model);
|
|
1868
1883
|
try {
|
|
1869
1884
|
const client = createClient3(config.apiKey);
|
|
1870
1885
|
const response = await withRetry5(
|
|
1871
|
-
() => postAgent(client, { ...agentSelection(model), input: 'Say "ok"' })
|
|
1886
|
+
() => postAgent(client, { ...agentSelection(model), input: 'Say "ok"' }, signal),
|
|
1887
|
+
{ signal }
|
|
1872
1888
|
);
|
|
1873
1889
|
assertUsableResponse(response);
|
|
1874
1890
|
const text = extractAgentAnswerText(response);
|
|
@@ -2001,8 +2017,8 @@ function extractAnchoredSpans4(rawResponse) {
|
|
|
2001
2017
|
function createClient3(apiKey) {
|
|
2002
2018
|
return new OpenAI3({ apiKey, baseURL: BASE_URL });
|
|
2003
2019
|
}
|
|
2004
|
-
function postAgent(client, body) {
|
|
2005
|
-
return client.post(AGENT_PATH, { body });
|
|
2020
|
+
function postAgent(client, body, signal) {
|
|
2021
|
+
return client.post(AGENT_PATH, { body, signal });
|
|
2006
2022
|
}
|
|
2007
2023
|
function assertUsableResponse(response) {
|
|
2008
2024
|
const status = response.status;
|
|
@@ -2282,8 +2298,8 @@ var perplexityAdapter = {
|
|
|
2282
2298
|
model: result.model
|
|
2283
2299
|
};
|
|
2284
2300
|
},
|
|
2285
|
-
async healthcheck(config) {
|
|
2286
|
-
const result = await healthcheck4(toPerplexityConfig(config));
|
|
2301
|
+
async healthcheck(config, signal) {
|
|
2302
|
+
const result = await healthcheck4(toPerplexityConfig(config), signal);
|
|
2287
2303
|
return {
|
|
2288
2304
|
ok: result.ok,
|
|
2289
2305
|
provider: "perplexity",
|
|
@@ -2361,10 +2377,11 @@ var MuseResponseError = class extends Error {
|
|
|
2361
2377
|
}
|
|
2362
2378
|
retryable;
|
|
2363
2379
|
};
|
|
2364
|
-
function retryRequest(fn) {
|
|
2380
|
+
function retryRequest(fn, signal) {
|
|
2365
2381
|
return withRetry(fn, {
|
|
2366
2382
|
maxRetries: 3,
|
|
2367
2383
|
baseDelayMs: 1e3,
|
|
2384
|
+
signal,
|
|
2368
2385
|
isRetryable: (error) => error instanceof MuseResponseError ? error.retryable : isRetryableHttpError(error),
|
|
2369
2386
|
computeDelayMs: (_attempt, error, delay) => {
|
|
2370
2387
|
const retryDelay = retryAfterDelayMs(error) ?? delay;
|
|
@@ -2379,10 +2396,10 @@ function statusMessage(rawResponse) {
|
|
|
2379
2396
|
const detail = [error?.code, error?.message, asRecord(rawResponse.incomplete_details)?.reason].filter((value) => typeof value === "string" && value.length > 0).join(": ");
|
|
2380
2397
|
return `Meta Model API response status: ${status}${detail ? ` (${detail})` : ""}`;
|
|
2381
2398
|
}
|
|
2382
|
-
function createResponse(config, body) {
|
|
2399
|
+
function createResponse(config, body, signal) {
|
|
2383
2400
|
const client = createClient4(config);
|
|
2384
2401
|
return retryRequest(async () => {
|
|
2385
|
-
const rawResponse = responseToRecord4(await client.responses.create(body));
|
|
2402
|
+
const rawResponse = responseToRecord4(await client.responses.create(body, { signal }));
|
|
2386
2403
|
if (rawResponse.status !== "completed" && rawResponse.status !== "incomplete") {
|
|
2387
2404
|
const code = asRecord(rawResponse.error)?.code;
|
|
2388
2405
|
throw new MuseResponseError(
|
|
@@ -2391,13 +2408,13 @@ function createResponse(config, body) {
|
|
|
2391
2408
|
);
|
|
2392
2409
|
}
|
|
2393
2410
|
return rawResponse;
|
|
2394
|
-
});
|
|
2411
|
+
}, signal);
|
|
2395
2412
|
}
|
|
2396
|
-
async function healthcheck5(config) {
|
|
2413
|
+
async function healthcheck5(config, signal) {
|
|
2397
2414
|
const validation = validateConfig5(config);
|
|
2398
2415
|
if (!validation.ok) return validation;
|
|
2399
2416
|
try {
|
|
2400
|
-
const rawResponse = await createResponse(config, { model: modelOf(config), input: 'Say "ok"' });
|
|
2417
|
+
const rawResponse = await createResponse(config, { model: modelOf(config), input: 'Say "ok"' }, signal);
|
|
2401
2418
|
const answerText = reparseStoredResult5(rawResponse).answerText;
|
|
2402
2419
|
return {
|
|
2403
2420
|
ok: answerText.length > 0,
|
|
@@ -2659,8 +2676,8 @@ var museAdapter = {
|
|
|
2659
2676
|
validateConfig(config) {
|
|
2660
2677
|
return validateConfig5(toMuseConfig(config));
|
|
2661
2678
|
},
|
|
2662
|
-
healthcheck(config) {
|
|
2663
|
-
return healthcheck5(toMuseConfig(config));
|
|
2679
|
+
healthcheck(config, signal) {
|
|
2680
|
+
return healthcheck5(toMuseConfig(config), signal);
|
|
2664
2681
|
},
|
|
2665
2682
|
async executeTrackedQuery(input, config) {
|
|
2666
2683
|
const raw = await executeTrackedQuery5({ ...input, config: toMuseConfig(config) });
|
|
@@ -2693,8 +2710,9 @@ function modelOf2(config) {
|
|
|
2693
2710
|
return model;
|
|
2694
2711
|
}
|
|
2695
2712
|
var OpenRouterHttpError = class extends Error {
|
|
2696
|
-
|
|
2697
|
-
|
|
2713
|
+
/** `detail` is OpenRouter's own message, so a run error says why (for example, insufficient credits). */
|
|
2714
|
+
constructor(status, retryAfter, detail) {
|
|
2715
|
+
super(`OpenRouter request failed (HTTP ${status})${detail ? `: ${detail}` : ""}`);
|
|
2698
2716
|
this.status = status;
|
|
2699
2717
|
this.retryAfter = retryAfter;
|
|
2700
2718
|
this.name = "OpenRouterHttpError";
|
|
@@ -2702,11 +2720,22 @@ var OpenRouterHttpError = class extends Error {
|
|
|
2702
2720
|
status;
|
|
2703
2721
|
retryAfter;
|
|
2704
2722
|
};
|
|
2723
|
+
function errorStatus(code, fallback) {
|
|
2724
|
+
if (typeof code === "number" && Number.isInteger(code)) return code;
|
|
2725
|
+
if (typeof code === "string" && /^\d{3}$/.test(code.trim())) return Number(code.trim());
|
|
2726
|
+
return fallback;
|
|
2727
|
+
}
|
|
2728
|
+
function errorDetail(error, apiKey) {
|
|
2729
|
+
const message = typeof error?.message === "string" ? error.message.replace(/\s+/g, " ").trim() : "";
|
|
2730
|
+
if (!message) return void 0;
|
|
2731
|
+
const clipped = message.length > 300 ? `${message.slice(0, 297)}...` : message;
|
|
2732
|
+
return redactLogString(redactKnownSecrets(clipped, [apiKey]));
|
|
2733
|
+
}
|
|
2705
2734
|
function choiceFailure(body) {
|
|
2706
2735
|
const choice = Array.isArray(body.choices) ? asRecord(body.choices[0]) : void 0;
|
|
2707
2736
|
const error = asRecord(choice?.error);
|
|
2708
2737
|
if (!error && choice?.finish_reason !== "error") return null;
|
|
2709
|
-
return
|
|
2738
|
+
return { status: errorStatus(error?.code, 502), error };
|
|
2710
2739
|
}
|
|
2711
2740
|
async function fetchOnce(config, resource, body, signal) {
|
|
2712
2741
|
const response = await fetch(`${(config.baseUrl || BASE_URL2).replace(/\/+$/, "")}/${resource}`, {
|
|
@@ -2715,19 +2744,23 @@ async function fetchOnce(config, resource, body, signal) {
|
|
|
2715
2744
|
...body ? { body: JSON.stringify(body) } : {},
|
|
2716
2745
|
signal: signal ?? AbortSignal.timeout(12e4)
|
|
2717
2746
|
});
|
|
2718
|
-
if (!response.ok)
|
|
2747
|
+
if (!response.ok) {
|
|
2748
|
+
const failure = asRecord(await response.json().catch(() => null));
|
|
2749
|
+
throw new OpenRouterHttpError(response.status, response.headers.get("retry-after") ?? void 0, errorDetail(asRecord(failure?.error), config.apiKey));
|
|
2750
|
+
}
|
|
2719
2751
|
const value = asRecord(await response.json());
|
|
2720
2752
|
if (!value) throw new Error("OpenRouter returned an invalid response");
|
|
2721
2753
|
const error = asRecord(value.error);
|
|
2722
|
-
if (error) throw new OpenRouterHttpError(
|
|
2754
|
+
if (error) throw new OpenRouterHttpError(errorStatus(error.code, 502), void 0, errorDetail(error, config.apiKey));
|
|
2723
2755
|
const failed = choiceFailure(value);
|
|
2724
|
-
if (failed !== null) throw new OpenRouterHttpError(failed);
|
|
2756
|
+
if (failed !== null) throw new OpenRouterHttpError(failed.status, void 0, errorDetail(failed.error, config.apiKey));
|
|
2725
2757
|
return value;
|
|
2726
2758
|
}
|
|
2727
2759
|
function request(config, resource, body, signal) {
|
|
2728
2760
|
return withRetry(() => fetchOnce(config, resource, body, signal), {
|
|
2729
|
-
isRetryable:
|
|
2730
|
-
computeDelayMs: (_attempt, error, delay) => retryAfterDelayMs(error) ?? delay
|
|
2761
|
+
isRetryable: isRetryableHttpError,
|
|
2762
|
+
computeDelayMs: (_attempt, error, delay) => retryAfterDelayMs(error) ?? delay,
|
|
2763
|
+
signal
|
|
2731
2764
|
});
|
|
2732
2765
|
}
|
|
2733
2766
|
function messageOf(body) {
|
|
@@ -2758,7 +2791,7 @@ function sourcesOf(body) {
|
|
|
2758
2791
|
}
|
|
2759
2792
|
function parseResponse2(body, model, provider = openRouterRouteName(model)) {
|
|
2760
2793
|
const failed = choiceFailure(body);
|
|
2761
|
-
if (failed !== null) throw new OpenRouterHttpError(failed);
|
|
2794
|
+
if (failed !== null) throw new OpenRouterHttpError(failed.status, void 0, errorDetail(failed.error));
|
|
2762
2795
|
const message = messageOf(body);
|
|
2763
2796
|
if (typeof message?.content !== "string" || !message.content.trim()) throw new Error("OpenRouter returned no answer text");
|
|
2764
2797
|
const groundingSources = sourcesOf(body);
|
|
@@ -2865,11 +2898,11 @@ var openrouterAdapter = {
|
|
|
2865
2898
|
}
|
|
2866
2899
|
return { ok: true, provider: config.provider, message: "Configuration valid", model: config.model };
|
|
2867
2900
|
},
|
|
2868
|
-
async healthcheck(config) {
|
|
2901
|
+
async healthcheck(config, signal) {
|
|
2869
2902
|
const valid = this.validateConfig(config);
|
|
2870
2903
|
if (!valid.ok) return valid;
|
|
2871
2904
|
try {
|
|
2872
|
-
await request(config, "auth/key");
|
|
2905
|
+
await request(config, "auth/key", void 0, signal);
|
|
2873
2906
|
return { ...valid, message: "OpenRouter connected" };
|
|
2874
2907
|
} catch (error) {
|
|
2875
2908
|
return { ok: false, provider: config.provider, message: describeError(error) };
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
configExists,
|
|
3
3
|
loadConfigRaw,
|
|
4
4
|
saveConfigPatch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EE3QTCLS.js";
|
|
6
6
|
import {
|
|
7
7
|
BUNDLED_SKILL_NAMES,
|
|
8
8
|
installSkills
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FBO25TA3.js";
|
|
10
10
|
import {
|
|
11
11
|
PACKAGE_VERSION
|
|
12
12
|
} from "./chunk-AOJU5LKX.js";
|
|
13
13
|
import {
|
|
14
14
|
SKILL_MANIFEST_FILENAME,
|
|
15
15
|
SkillsClients
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O7S7OHLE.js";
|
|
17
17
|
|
|
18
18
|
// src/skills-autosync.ts
|
|
19
19
|
import fs from "fs";
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SNAPSHOT_CELL_LEGEND,
|
|
3
|
+
citationGlyph,
|
|
4
|
+
citedBase,
|
|
5
|
+
mentionGlyph
|
|
6
|
+
} from "./chunk-J6536OL6.js";
|
|
1
7
|
import {
|
|
2
8
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-UGO2FO6V.js";
|
|
10
|
+
import "./chunk-EE3QTCLS.js";
|
|
5
11
|
import "./chunk-AOJU5LKX.js";
|
|
6
12
|
import "./chunk-HGMYEDAQ.js";
|
|
7
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-O7S7OHLE.js";
|
|
8
14
|
import "./chunk-MLKGABMK.js";
|
|
9
15
|
|
|
10
16
|
// src/commands/citations.ts
|
|
@@ -36,17 +42,20 @@ function printSummary(data) {
|
|
|
36
42
|
providersCiting,
|
|
37
43
|
providersMentioning,
|
|
38
44
|
providersConfigured,
|
|
45
|
+
providersCitationNotMeasured,
|
|
39
46
|
totalQueries,
|
|
40
47
|
queriesCitedAndMentioned,
|
|
41
48
|
queriesCitedOnly,
|
|
42
49
|
queriesMentionedOnly,
|
|
43
|
-
queriesInvisible
|
|
50
|
+
queriesInvisible,
|
|
51
|
+
queriesCitationNotMeasured
|
|
44
52
|
} = data.summary;
|
|
45
53
|
console.log("AEO visibility (citations + mentions)");
|
|
46
54
|
if (data.summary.latestRunAt) {
|
|
47
55
|
console.log(`Latest run: ${data.summary.latestRunAt}`);
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const notMeasuredNote = providersCitationNotMeasured > 0 ? ` (${providersCitationNotMeasured} not measured: no sources)` : "";
|
|
58
|
+
console.log(`Cited in sources: ${providersCiting}/${citedBase(providersConfigured, providersCitationNotMeasured)} engines${notMeasuredNote}`);
|
|
50
59
|
console.log(`Mentioned in answers: ${providersMentioning}/${providersConfigured} engines`);
|
|
51
60
|
console.log("");
|
|
52
61
|
console.log(`Queries (${totalQueries} total):`);
|
|
@@ -54,6 +63,9 @@ function printSummary(data) {
|
|
|
54
63
|
console.log(` cited only: ${queriesCitedOnly}`);
|
|
55
64
|
console.log(` mentioned only: ${queriesMentionedOnly}`);
|
|
56
65
|
console.log(` invisible: ${queriesInvisible}`);
|
|
66
|
+
if (queriesCitationNotMeasured > 0) {
|
|
67
|
+
console.log(` citation not measured (no sources): ${queriesCitationNotMeasured}`);
|
|
68
|
+
}
|
|
57
69
|
}
|
|
58
70
|
function printCoverage(data) {
|
|
59
71
|
if (data.byQuery.length === 0) {
|
|
@@ -75,18 +87,17 @@ function printCoverage(data) {
|
|
|
75
87
|
const cellWidth = Math.max(6, ...providerColumns.map((p) => p.length));
|
|
76
88
|
const queryWidth = Math.max(7, ...data.byQuery.map((r) => r.query.length));
|
|
77
89
|
const header = ["Query".padEnd(queryWidth), ...providerColumns.map((p) => p.padEnd(cellWidth)), "Cite", "Ment"].join(" ");
|
|
78
|
-
console.log(
|
|
90
|
+
console.log(`Per-query coverage: ${SNAPSHOT_CELL_LEGEND}`);
|
|
79
91
|
console.log(header);
|
|
80
92
|
console.log("\u2500".repeat(header.length));
|
|
81
93
|
for (const row of data.byQuery) {
|
|
82
94
|
const cells = providerColumns.map((p) => {
|
|
83
95
|
const provider = row.providers.find((x) => x.provider === p);
|
|
84
96
|
if (!provider) return "\u2013".padEnd(cellWidth);
|
|
85
|
-
|
|
86
|
-
const mentionGlyph = provider.mentioned ? "M" : "m";
|
|
87
|
-
return `${citationGlyph}${mentionGlyph}`.padEnd(cellWidth);
|
|
97
|
+
return `${citationGlyph(provider.citationState)}${mentionGlyph(provider.mentioned)}`.padEnd(cellWidth);
|
|
88
98
|
});
|
|
89
|
-
const
|
|
99
|
+
const citationBase = citedBase(row.totalProviders, row.citationNotMeasured);
|
|
100
|
+
const citeCol = citationBase > 0 ? `${row.citedCount}/${citationBase}` : "\xB7";
|
|
90
101
|
const mentCol = `${row.mentionedCount}/${row.totalProviders}`;
|
|
91
102
|
console.log([row.query.padEnd(queryWidth), ...cells, citeCol, mentCol].join(" "));
|
|
92
103
|
}
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
buildCliCatalog,
|
|
4
4
|
printCliCatalog,
|
|
5
5
|
renderTopLevelHelp
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-T7UDY7W3.js";
|
|
7
|
+
import "./chunk-7BH53MOB.js";
|
|
8
8
|
import "./chunk-Z7IUAJOF.js";
|
|
9
9
|
import "./chunk-HGMYEDAQ.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-O7S7OHLE.js";
|
|
11
11
|
import "./chunk-MLKGABMK.js";
|
|
12
12
|
export {
|
|
13
13
|
CLI_ROOT_SUMMARIES,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
REGISTERED_CLI_COMMANDS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O5UFAXUI.js";
|
|
4
4
|
import "./chunk-6GO5VVAC.js";
|
|
5
5
|
import "./chunk-VJWDBFSL.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-AYKTVQF7.js";
|
|
7
7
|
import "./chunk-TSENU4GG.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-UGO2FO6V.js";
|
|
9
|
+
import "./chunk-EE3QTCLS.js";
|
|
10
|
+
import "./chunk-7BH53MOB.js";
|
|
11
11
|
import "./chunk-Z7IUAJOF.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7BEGCVVB.js";
|
|
13
13
|
import "./chunk-AOJU5LKX.js";
|
|
14
14
|
import "./chunk-HGMYEDAQ.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-O7S7OHLE.js";
|
|
16
16
|
import "./chunk-MLKGABMK.js";
|
|
17
17
|
export {
|
|
18
18
|
REGISTERED_CLI_COMMANDS
|
package/dist/cli.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node --import tsx
|
|
2
2
|
import {
|
|
3
3
|
REGISTERED_CLI_COMMANDS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O5UFAXUI.js";
|
|
5
5
|
import "./chunk-6GO5VVAC.js";
|
|
6
6
|
import {
|
|
7
7
|
buildSetupState,
|
|
8
8
|
runPendingServeHandoff
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RBG2QXQM.js";
|
|
10
10
|
import "./chunk-VJWDBFSL.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-AYKTVQF7.js";
|
|
12
12
|
import "./chunk-TSENU4GG.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-COHSL6KW.js";
|
|
14
14
|
import {
|
|
15
15
|
checkLatestVersionForCli,
|
|
16
16
|
cliRuntimeContext,
|
|
@@ -24,24 +24,24 @@ import {
|
|
|
24
24
|
showFirstRunNotice,
|
|
25
25
|
trackCliCommandFinished,
|
|
26
26
|
trackEvent
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-AMGM55CP.js";
|
|
28
28
|
import {
|
|
29
29
|
autoSyncSkills,
|
|
30
30
|
formatAutoSyncNotice
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-YU2WX7RD.js";
|
|
32
|
+
import "./chunk-UGO2FO6V.js";
|
|
33
|
+
import "./chunk-EE3QTCLS.js";
|
|
34
34
|
import {
|
|
35
35
|
accessFilterFromArgs,
|
|
36
36
|
dispatchRegisteredCommand,
|
|
37
37
|
printCliCatalog
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-T7UDY7W3.js";
|
|
39
39
|
import {
|
|
40
40
|
resolveCliAccess
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-7BH53MOB.js";
|
|
42
42
|
import "./chunk-Z7IUAJOF.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-FBO25TA3.js";
|
|
44
|
+
import "./chunk-7BEGCVVB.js";
|
|
45
45
|
import "./chunk-AOJU5LKX.js";
|
|
46
46
|
import {
|
|
47
47
|
CliError,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
} from "./chunk-HGMYEDAQ.js";
|
|
53
53
|
import {
|
|
54
54
|
OperationAccesses
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-O7S7OHLE.js";
|
|
56
56
|
import "./chunk-MLKGABMK.js";
|
|
57
57
|
|
|
58
58
|
// src/cli.ts
|
|
@@ -68,6 +68,7 @@ var NUDGE_EXEMPT_ROOTS = /* @__PURE__ */ new Set([
|
|
|
68
68
|
"settings",
|
|
69
69
|
"telemetry",
|
|
70
70
|
"project",
|
|
71
|
+
"agent-readiness",
|
|
71
72
|
"technical-aeo",
|
|
72
73
|
"site-health",
|
|
73
74
|
"doctor",
|
|
@@ -76,6 +77,9 @@ var NUDGE_EXEMPT_ROOTS = /* @__PURE__ */ new Set([
|
|
|
76
77
|
"unknown"
|
|
77
78
|
]);
|
|
78
79
|
var PAGE_HEALTH_HANDOFF_COMMANDS = /* @__PURE__ */ new Set([
|
|
80
|
+
"agent-readiness.run",
|
|
81
|
+
"agent-readiness.score",
|
|
82
|
+
"agent-readiness.overview",
|
|
79
83
|
"technical-aeo.run",
|
|
80
84
|
"technical-aeo.score",
|
|
81
85
|
"technical-aeo.crawl",
|
|
@@ -100,7 +104,7 @@ async function buildSetupNudgeLine(input) {
|
|
|
100
104
|
return `${JSON.stringify({
|
|
101
105
|
notice: {
|
|
102
106
|
code: NO_PROVIDER_NOTICE_CODE,
|
|
103
|
-
message: "AI Visibility needs an answer-engine provider.
|
|
107
|
+
message: "AI Visibility needs an answer-engine provider. Agent Readiness does not.",
|
|
104
108
|
setupCommand: PROVIDER_SETUP_COMMAND,
|
|
105
109
|
keyUrl: GEMINI_KEY_URL,
|
|
106
110
|
note: "A provider key is the operator's credential: they add it in the dashboard, or run the setup command in their own terminal while the server is running. Never ask for it in chat."
|
|
@@ -109,11 +113,11 @@ async function buildSetupNudgeLine(input) {
|
|
|
109
113
|
`;
|
|
110
114
|
}
|
|
111
115
|
if (!input.stderrIsTTY) {
|
|
112
|
-
return `[canonry] ${NO_PROVIDER_NOTICE_CODE}: AI Visibility needs an answer-engine provider.
|
|
116
|
+
return `[canonry] ${NO_PROVIDER_NOTICE_CODE}: AI Visibility needs an answer-engine provider. Agent Readiness does not. The operator adds a key in the dashboard, or runs \`${PROVIDER_SETUP_COMMAND}\` in their own terminal while the server is running (free key at ${GEMINI_KEY_URL}). Never ask for the key in chat.
|
|
113
117
|
`;
|
|
114
118
|
}
|
|
115
119
|
return `
|
|
116
|
-
\u2192 AI Visibility needs an answer-engine provider.
|
|
120
|
+
\u2192 AI Visibility needs an answer-engine provider. Agent Readiness does not.
|
|
117
121
|
Add one in the dashboard after \`canonry serve\`, or while the server is running:
|
|
118
122
|
${PROVIDER_SETUP_COMMAND} (free key at aistudio.google.com)
|
|
119
123
|
`;
|
|
@@ -213,7 +217,8 @@ var TELEMETRY_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
|
213
217
|
"DAEMON_START_FAILED",
|
|
214
218
|
"DAEMON_START_TIMEOUT",
|
|
215
219
|
"UNEXPECTED_RESPONSE_FORMAT",
|
|
216
|
-
"STORED_ONLY_REFUSED"
|
|
220
|
+
"STORED_ONLY_REFUSED",
|
|
221
|
+
"CONFIG_REQUIRED"
|
|
217
222
|
]);
|
|
218
223
|
function telemetryErrorCode(err) {
|
|
219
224
|
if (!(err instanceof CliError)) return "CLI_ERROR";
|