@canonry/canonry 7.22.0 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +14 -0
- package/assets/assets/{AuditHistoryPanel-J8AR3x5F.js → AuditHistoryPanel-DKKnX8IT.js} +1 -1
- package/assets/assets/{BacklinksPage-CRDPutGA.js → BacklinksPage-DNbur8am.js} +1 -1
- package/assets/assets/{HistoryPage-C5taVW3t.js → HistoryPage-DahtHlpM.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-txucmLuz.js → MeasurementPropertyPage-BoNDtLfp.js} +1 -1
- package/assets/assets/{ProjectPage-C4FaBoWI.js → ProjectPage--ZlpQduH.js} +1 -1
- package/assets/assets/{RunsPage-D-3XKUhh.js → RunsPage-DKB2CHTM.js} +1 -1
- package/assets/assets/{SettingsPage-Cq_SJRj_.js → SettingsPage-lnmMZzEj.js} +1 -1
- package/assets/assets/{SiteHealthSection-Cn_IZVO1.js → SiteHealthSection-BBjucRed.js} +3 -3
- package/assets/assets/{TrafficPage-BMdFZs3X.js → TrafficPage-DNyTmPLd.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-BmrIOc-2.js → TrafficSourceDetailPage-D1zKZHSh.js} +1 -1
- package/assets/assets/{extract-error-message-HlQy5L7O.js → extract-error-message-v0b8P-wc.js} +1 -1
- package/assets/assets/index-CfaBRiBG.js +86 -0
- package/assets/assets/{react-sigma_core.esm.min-CogAr1i4.js → react-sigma_core.esm.min-BZSJoRrV.js} +1 -1
- package/assets/assets/{v2-overview-adapter-tps7TUxq.js → v2-overview-adapter-DXAl-O_h.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-222NAFTY.js → chunk-7Q7QCBJ3.js} +2 -2
- package/dist/{chunk-5IXQAOVK.js → chunk-DS2ZKB3T.js} +15 -6
- package/dist/{chunk-MRKV43TV.js → chunk-IM2BFAAT.js} +565 -206
- package/dist/{chunk-NDQOCFJQ.js → chunk-JJBVYL45.js} +39 -4
- package/dist/{chunk-46JZR2IV.js → chunk-O5UMRQVN.js} +1303 -504
- package/dist/{chunk-6Z2LFFRT.js → chunk-SG3MPCDL.js} +5731 -4596
- package/dist/{chunk-6H2BC5EY.js → chunk-YCPTP2NC.js} +3 -3
- package/dist/cli.js +371 -143
- package/dist/{demo-server-32PU7BM6.js → demo-server-C7UGXXN7.js} +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -6
- package/dist/{intelligence-service-256DQBVR.js → intelligence-service-37TX4YV7.js} +2 -2
- package/dist/mcp.js +4 -4
- package/package.json +13 -13
- package/assets/assets/index-BJcjB5XW.js +0 -86
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
PACKAGE_VERSION,
|
|
6
6
|
canonryMcpTools,
|
|
7
7
|
isMachineFormat
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DS2ZKB3T.js";
|
|
9
9
|
import {
|
|
10
10
|
AGENT_PROVIDER_IDS,
|
|
11
11
|
CANONRY_NPM_PACKAGE_URL,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
skillsClientSchema,
|
|
50
50
|
upgradeCaveatFor,
|
|
51
51
|
upgradeCommandFor
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-IM2BFAAT.js";
|
|
53
53
|
|
|
54
54
|
// src/config.ts
|
|
55
55
|
import fs from "fs";
|
|
@@ -582,17 +582,20 @@ function saveConfig(config) {
|
|
|
582
582
|
const yaml = stringify(merged);
|
|
583
583
|
writeConfigAtomically(configPath, yaml);
|
|
584
584
|
}
|
|
585
|
-
function saveConfigPatch(patch) {
|
|
585
|
+
function saveConfigPatch(patch, options = {}) {
|
|
586
586
|
const configDir = getConfigDir();
|
|
587
587
|
if (!fs.existsSync(configDir)) {
|
|
588
588
|
fs.mkdirSync(configDir, { recursive: true });
|
|
589
589
|
}
|
|
590
590
|
const configPath = getConfigPath();
|
|
591
591
|
let base = {};
|
|
592
|
+
let baseRead = false;
|
|
592
593
|
if (fs.existsSync(configPath)) {
|
|
593
594
|
try {
|
|
594
595
|
const raw = fs.readFileSync(configPath, "utf-8");
|
|
595
|
-
|
|
596
|
+
const parsed = parse(raw);
|
|
597
|
+
base = parsed ?? {};
|
|
598
|
+
baseRead = typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
|
|
596
599
|
} catch {
|
|
597
600
|
base = {};
|
|
598
601
|
}
|
|
@@ -602,6 +605,8 @@ function saveConfigPatch(patch) {
|
|
|
602
605
|
if (base.apiKey) merged.apiKey = base.apiKey;
|
|
603
606
|
if (base.anonymousId) merged.anonymousId = base.anonymousId;
|
|
604
607
|
if (base.dashboardPasswordHash) merged.dashboardPasswordHash = base.dashboardPasswordHash;
|
|
608
|
+
else if (options.setDashboardPasswordHash) merged.dashboardPasswordHash = options.setDashboardPasswordHash;
|
|
609
|
+
else if (baseRead) delete merged.dashboardPasswordHash;
|
|
605
610
|
if (base.sentiment === void 0) delete merged.sentiment;
|
|
606
611
|
else merged.sentiment = base.sentiment;
|
|
607
612
|
if (base.providers && patch.providers) {
|
|
@@ -614,6 +619,35 @@ function saveConfigPatch(patch) {
|
|
|
614
619
|
const yaml = stringify(merged);
|
|
615
620
|
writeConfigAtomically(configPath, yaml);
|
|
616
621
|
}
|
|
622
|
+
function clearDashboardPassword() {
|
|
623
|
+
const configPath = getConfigPath();
|
|
624
|
+
if (!fs.existsSync(configPath)) {
|
|
625
|
+
throw new CliError({
|
|
626
|
+
code: "CONFIG_REQUIRED",
|
|
627
|
+
message: `No config found at ${configPath}. If the server uses another config directory, set CANONRY_CONFIG_DIR to it and retry.`
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
const raw = fs.readFileSync(configPath, "utf-8");
|
|
631
|
+
let parsed;
|
|
632
|
+
try {
|
|
633
|
+
parsed = parse(raw) ?? {};
|
|
634
|
+
} catch {
|
|
635
|
+
parsed = void 0;
|
|
636
|
+
}
|
|
637
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
638
|
+
throw new CliError({
|
|
639
|
+
code: "CONFIG_INVALID",
|
|
640
|
+
message: `Invalid config at ${configPath}: it could not be read as YAML settings. Repair the file and retry.`
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
const config = parsed;
|
|
644
|
+
if (!config.dashboardPasswordHash) {
|
|
645
|
+
return { cleared: false, configPath };
|
|
646
|
+
}
|
|
647
|
+
delete config.dashboardPasswordHash;
|
|
648
|
+
writeConfigAtomically(configPath, stringify(config));
|
|
649
|
+
return { cleared: true, configPath };
|
|
650
|
+
}
|
|
617
651
|
function configExists() {
|
|
618
652
|
return fs.existsSync(getConfigPath());
|
|
619
653
|
}
|
|
@@ -10590,6 +10624,7 @@ export {
|
|
|
10590
10624
|
loadConfigRaw,
|
|
10591
10625
|
saveConfig,
|
|
10592
10626
|
saveConfigPatch,
|
|
10627
|
+
clearDashboardPassword,
|
|
10593
10628
|
configExists,
|
|
10594
10629
|
BUNDLED_SKILL_NAMES,
|
|
10595
10630
|
getBundledSkillSnapshots,
|