@canonry/canonry 4.117.1 → 4.117.2

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.
Files changed (26) hide show
  1. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +21 -0
  2. package/assets/assets/{BacklinksPage-Bkafm10m.js → BacklinksPage-CschVQxC.js} +1 -1
  3. package/assets/assets/{ChartPrimitives-NV_GgqFn.js → ChartPrimitives-D4782Ifx.js} +1 -1
  4. package/assets/assets/ProjectPage-BSGTpBUJ.js +7 -0
  5. package/assets/assets/{RunRow-df0d24S6.js → RunRow-ggNGlwdN.js} +1 -1
  6. package/assets/assets/{RunsPage-CU6-4YTM.js → RunsPage-Bfp0K6Ry.js} +1 -1
  7. package/assets/assets/{SettingsPage-BKw6B6cd.js → SettingsPage-Cy9SlBJX.js} +1 -1
  8. package/assets/assets/{TrafficPage-CzpiYHKj.js → TrafficPage-1S2PzSHB.js} +1 -1
  9. package/assets/assets/{TrafficSourceDetailPage-CC5nuqM1.js → TrafficSourceDetailPage-CqXCoaod.js} +1 -1
  10. package/assets/assets/{arrow-left-CbQcW2pL.js → arrow-left-kCK5M8Bp.js} +1 -1
  11. package/assets/assets/{extract-error-message-CvqIZ-le.js → extract-error-message-C82LAW6q.js} +1 -1
  12. package/assets/assets/index-DrDNyUhv.css +1 -0
  13. package/assets/assets/{index-LjcWHaNZ.js → index-i-t64RXw.js} +74 -74
  14. package/assets/assets/{trash-2-3J2u0woR.js → trash-2-8Pe4v1T0.js} +1 -1
  15. package/assets/index.html +2 -2
  16. package/dist/{chunk-BMBHUFMI.js → chunk-4PMMEFME.js} +42 -1
  17. package/dist/{chunk-V4SW7SVX.js → chunk-BMPIV35C.js} +696 -417
  18. package/dist/{chunk-IAJ5TQ4S.js → chunk-EZME2J2G.js} +1196 -1140
  19. package/dist/{chunk-NY7SC4ES.js → chunk-F2SRZJMY.js} +4 -4
  20. package/dist/cli.js +121 -77
  21. package/dist/index.js +4 -4
  22. package/dist/{intelligence-service-C5YLASIP.js → intelligence-service-GNOE4J35.js} +2 -2
  23. package/dist/mcp.js +2 -2
  24. package/package.json +13 -13
  25. package/assets/assets/ProjectPage-0-NnRxys.js +0 -7
  26. package/assets/assets/index-B4R1-8hR.css +0 -1
@@ -10,7 +10,7 @@ import {
10
10
  loadConfig,
11
11
  loadConfigRaw,
12
12
  saveConfigPatch
13
- } from "./chunk-BMBHUFMI.js";
13
+ } from "./chunk-4PMMEFME.js";
14
14
  import {
15
15
  CC_CACHE_DIR,
16
16
  DUCKDB_SPEC,
@@ -115,7 +115,7 @@ import {
115
115
  siteAuditPages,
116
116
  siteAuditSnapshots,
117
117
  usageCounters
118
- } from "./chunk-V4SW7SVX.js";
118
+ } from "./chunk-BMPIV35C.js";
119
119
  import {
120
120
  AGENT_MEMORY_VALUE_MAX_BYTES,
121
121
  AGENT_PROVIDER_IDS,
@@ -178,7 +178,7 @@ import {
178
178
  validationError,
179
179
  winnabilityClassLabel,
180
180
  withRetry
181
- } from "./chunk-IAJ5TQ4S.js";
181
+ } from "./chunk-EZME2J2G.js";
182
182
 
183
183
  // src/telemetry.ts
184
184
  import crypto from "crypto";
@@ -6515,7 +6515,7 @@ function readStoredGroundingSources(rawResponse) {
6515
6515
  return result;
6516
6516
  }
6517
6517
  async function backfillInsightsCommand(project, opts) {
6518
- const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-C5YLASIP.js");
6518
+ const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-GNOE4J35.js");
6519
6519
  const config = loadConfig();
6520
6520
  const db = createClient(config.database);
6521
6521
  migrate(db);
package/dist/cli.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  setTelemetrySource,
30
30
  showFirstRunNotice,
31
31
  trackEvent
32
- } from "./chunk-NY7SC4ES.js";
32
+ } from "./chunk-F2SRZJMY.js";
33
33
  import {
34
34
  CliError,
35
35
  EXIT_SYSTEM_ERROR,
@@ -46,7 +46,7 @@ import {
46
46
  saveConfig,
47
47
  saveConfigPatch,
48
48
  usageError
49
- } from "./chunk-BMBHUFMI.js";
49
+ } from "./chunk-4PMMEFME.js";
50
50
  import {
51
51
  apiKeys,
52
52
  createClient,
@@ -54,7 +54,7 @@ import {
54
54
  projects,
55
55
  queries,
56
56
  renderReportHtml
57
- } from "./chunk-V4SW7SVX.js";
57
+ } from "./chunk-BMPIV35C.js";
58
58
  import {
59
59
  BacklinkSources,
60
60
  CcReleaseSyncStatuses,
@@ -80,7 +80,7 @@ import {
80
80
  providerQuotaPolicySchema,
81
81
  resolveProviderInput,
82
82
  winnabilityClassSchema
83
- } from "./chunk-IAJ5TQ4S.js";
83
+ } from "./chunk-EZME2J2G.js";
84
84
 
85
85
  // src/cli.ts
86
86
  import { pathToFileURL } from "url";
@@ -126,9 +126,9 @@ import { parseArgs } from "util";
126
126
  function commandId(spec) {
127
127
  return spec.path.join(".");
128
128
  }
129
- function matchesPath(args, path10) {
130
- if (args.length < path10.length) return false;
131
- return path10.every((segment, index) => args[index] === segment);
129
+ function matchesPath(args, path11) {
130
+ if (args.length < path11.length) return false;
131
+ return path11.every((segment, index) => args[index] === segment);
132
132
  }
133
133
  function withGlobalOptions(options) {
134
134
  const base = options ? { ...options } : {};
@@ -2948,9 +2948,9 @@ async function gaConnect(project, opts) {
2948
2948
  propertyId: opts.propertyId
2949
2949
  };
2950
2950
  if (opts.keyFile) {
2951
- const fs13 = await import("fs");
2951
+ const fs14 = await import("fs");
2952
2952
  try {
2953
- const content = fs13.readFileSync(opts.keyFile, "utf-8");
2953
+ const content = fs14.readFileSync(opts.keyFile, "utf-8");
2954
2954
  JSON.parse(content);
2955
2955
  body.keyJson = content;
2956
2956
  } catch (e) {
@@ -4202,9 +4202,9 @@ async function getCommand(opts) {
4202
4202
  console.log(JSON.stringify(leaf, null, 2));
4203
4203
  }
4204
4204
  }
4205
- function walkPath(value, path10) {
4206
- if (!path10 || path10 === ".") return value;
4207
- const segments = path10.split(".").flatMap((part) => {
4205
+ function walkPath(value, path11) {
4206
+ if (!path11 || path11 === ".") return value;
4207
+ const segments = path11.split(".").flatMap((part) => {
4208
4208
  const tokens = [];
4209
4209
  let i = 0;
4210
4210
  const bracketStart = part.indexOf("[");
@@ -4252,13 +4252,13 @@ var GET_CLI_COMMANDS = [
4252
4252
  },
4253
4253
  run: async (input) => {
4254
4254
  const project = requireProject(input, "get", USAGE2);
4255
- const path10 = requirePositional(input, 1, {
4255
+ const path11 = requirePositional(input, 1, {
4256
4256
  command: "get",
4257
4257
  usage: USAGE2,
4258
4258
  message: 'path is required (e.g. "scores.mentionShare.value")'
4259
4259
  });
4260
4260
  const from = getString(input.values, "from");
4261
- await getCommand({ project, path: path10, from, format: input.format });
4261
+ await getCommand({ project, path: path11, from, format: input.format });
4262
4262
  }
4263
4263
  }
4264
4264
  ];
@@ -4297,9 +4297,9 @@ async function trafficConnectWordpress(project, opts) {
4297
4297
  }
4298
4298
  let applicationPassword = opts.appPassword?.trim() ?? "";
4299
4299
  if (!applicationPassword && opts.appPasswordFile) {
4300
- const fs13 = await import("fs");
4300
+ const fs14 = await import("fs");
4301
4301
  try {
4302
- applicationPassword = fs13.readFileSync(opts.appPasswordFile, "utf-8").trim();
4302
+ applicationPassword = fs14.readFileSync(opts.appPasswordFile, "utf-8").trim();
4303
4303
  } catch (e) {
4304
4304
  const msg = e instanceof Error ? e.message : String(e);
4305
4305
  throw new CliError({
@@ -4355,10 +4355,10 @@ async function trafficConnectCloudRun(project, opts) {
4355
4355
  details: { project }
4356
4356
  });
4357
4357
  }
4358
- const fs13 = await import("fs");
4358
+ const fs14 = await import("fs");
4359
4359
  let keyJson;
4360
4360
  try {
4361
- keyJson = fs13.readFileSync(opts.serviceAccountKey, "utf-8");
4361
+ keyJson = fs14.readFileSync(opts.serviceAccountKey, "utf-8");
4362
4362
  JSON.parse(keyJson);
4363
4363
  } catch (e) {
4364
4364
  const msg = e instanceof Error ? e.message : String(e);
@@ -4418,9 +4418,9 @@ async function trafficConnectVercel(project, opts) {
4418
4418
  }
4419
4419
  let token = opts.token?.trim() ?? "";
4420
4420
  if (!token && opts.tokenFile) {
4421
- const fs13 = await import("fs");
4421
+ const fs14 = await import("fs");
4422
4422
  try {
4423
- token = fs13.readFileSync(opts.tokenFile, "utf-8").trim();
4423
+ token = fs14.readFileSync(opts.tokenFile, "utf-8").trim();
4424
4424
  } catch (e) {
4425
4425
  const msg = e instanceof Error ? e.message : String(e);
4426
4426
  throw new CliError({
@@ -7641,6 +7641,22 @@ async function loadLatestRunForExport(client, project) {
7641
7641
  return client.getRun(latestRun.id);
7642
7642
  }
7643
7643
 
7644
+ // src/commands/results-export.ts
7645
+ import fs7 from "fs";
7646
+ import path4 from "path";
7647
+ async function exportResults(project, opts) {
7648
+ const { output, ...request } = opts;
7649
+ const artifact = await createApiClient().downloadResultsExport(project, request);
7650
+ if (output === "-") {
7651
+ process.stdout.write(artifact.content);
7652
+ return;
7653
+ }
7654
+ const target = output ? path4.resolve(output) : path4.resolve(process.cwd(), path4.basename(artifact.filename));
7655
+ fs7.mkdirSync(path4.dirname(target), { recursive: true });
7656
+ fs7.writeFileSync(target, artifact.content, "utf8");
7657
+ console.log(`Results export written to ${target}`);
7658
+ }
7659
+
7644
7660
  // src/commands/history.ts
7645
7661
  function getClient18() {
7646
7662
  return createApiClient();
@@ -7746,7 +7762,35 @@ async function getLatestRunSummary(client, project) {
7746
7762
  }
7747
7763
 
7748
7764
  // src/cli-commands/operator.ts
7765
+ var RESULTS_EXPORT_USAGE = "canonry results export <project> [--format json|csv] [--since <ISO>] [--until <ISO>] [--include-probes] [--output <path>|-]";
7766
+ function parseResultsExportFormat(value) {
7767
+ if (value === void 0 || value === "json") return "json";
7768
+ if (value === "csv") return "csv";
7769
+ throw usageError(`Error: --format must be "json" or "csv"
7770
+
7771
+ Usage: ${RESULTS_EXPORT_USAGE}`);
7772
+ }
7749
7773
  var OPERATOR_CLI_COMMANDS = [
7774
+ {
7775
+ path: ["results", "export"],
7776
+ usage: RESULTS_EXPORT_USAGE,
7777
+ options: {
7778
+ since: stringOption(),
7779
+ until: stringOption(),
7780
+ "include-probes": { type: "boolean", default: false },
7781
+ output: { type: "string", short: "o" }
7782
+ },
7783
+ run: async (input) => {
7784
+ const project = requireProject(input, "results export", RESULTS_EXPORT_USAGE);
7785
+ await exportResults(project, {
7786
+ format: parseResultsExportFormat(getString(input.values, "format")),
7787
+ since: getString(input.values, "since"),
7788
+ until: getString(input.values, "until"),
7789
+ includeProbes: getBoolean(input.values, "include-probes"),
7790
+ output: getString(input.values, "output")
7791
+ });
7792
+ }
7793
+ },
7750
7794
  {
7751
7795
  path: ["status"],
7752
7796
  usage: "canonry status <project> [--format json]",
@@ -8239,11 +8283,11 @@ var PROJECT_CLI_COMMANDS = [
8239
8283
  ];
8240
8284
 
8241
8285
  // src/commands/report.ts
8242
- import fs7 from "fs";
8243
- import path4 from "path";
8286
+ import fs8 from "fs";
8287
+ import path5 from "path";
8244
8288
  function defaultOutputPath(project, audience) {
8245
8289
  const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
8246
- return path4.resolve(process.cwd(), `canonry-report-${project}-${audience}-${date}.html`);
8290
+ return path5.resolve(process.cwd(), `canonry-report-${project}-${audience}-${date}.html`);
8247
8291
  }
8248
8292
  async function runReportCommand(project, opts = {}) {
8249
8293
  const client = createApiClient();
@@ -8254,12 +8298,12 @@ async function runReportCommand(project, opts = {}) {
8254
8298
  return;
8255
8299
  }
8256
8300
  const html = renderReportHtml(report, { audience });
8257
- const targetPath = opts.output ? path4.resolve(opts.output) : defaultOutputPath(project, audience);
8258
- const dir = path4.dirname(targetPath);
8259
- if (!fs7.existsSync(dir)) {
8260
- fs7.mkdirSync(dir, { recursive: true });
8301
+ const targetPath = opts.output ? path5.resolve(opts.output) : defaultOutputPath(project, audience);
8302
+ const dir = path5.dirname(targetPath);
8303
+ if (!fs8.existsSync(dir)) {
8304
+ fs8.mkdirSync(dir, { recursive: true });
8261
8305
  }
8262
- fs7.writeFileSync(targetPath, html, "utf-8");
8306
+ fs8.writeFileSync(targetPath, html, "utf-8");
8263
8307
  console.log(`Report written to ${targetPath}`);
8264
8308
  }
8265
8309
 
@@ -9124,12 +9168,12 @@ var SKILLS_CLI_COMMANDS = [
9124
9168
  ];
9125
9169
 
9126
9170
  // src/commands/snapshot.ts
9127
- import fs9 from "fs";
9128
- import path6 from "path";
9171
+ import fs10 from "fs";
9172
+ import path7 from "path";
9129
9173
 
9130
9174
  // src/snapshot-pdf.ts
9131
- import fs8 from "fs";
9132
- import path5 from "path";
9175
+ import fs9 from "fs";
9176
+ import path6 from "path";
9133
9177
  import { PDFDocument, StandardFonts, rgb } from "pdf-lib";
9134
9178
  var PAGE_WIDTH = 612;
9135
9179
  var PAGE_HEIGHT = 792;
@@ -9341,9 +9385,9 @@ async function writeSnapshotPdf(report, outputPath) {
9341
9385
  renderCompetitors(pdf, report);
9342
9386
  renderQueries(pdf, report);
9343
9387
  const bytes = await doc.save();
9344
- const resolvedPath = path5.resolve(outputPath);
9345
- fs8.mkdirSync(path5.dirname(resolvedPath), { recursive: true });
9346
- fs8.writeFileSync(resolvedPath, bytes);
9388
+ const resolvedPath = path6.resolve(outputPath);
9389
+ fs9.mkdirSync(path6.dirname(resolvedPath), { recursive: true });
9390
+ fs9.writeFileSync(resolvedPath, bytes);
9347
9391
  return resolvedPath;
9348
9392
  }
9349
9393
  function renderCover(pdf, report) {
@@ -9501,9 +9545,9 @@ Markdown saved: ${savedMdPath}`);
9501
9545
  PDF saved: ${savedPdfPath}`);
9502
9546
  }
9503
9547
  function writeSnapshotMarkdown(report, outputPath) {
9504
- const resolvedPath = path6.resolve(outputPath);
9505
- fs9.mkdirSync(path6.dirname(resolvedPath), { recursive: true });
9506
- fs9.writeFileSync(resolvedPath, formatSnapshotMarkdown(report), "utf-8");
9548
+ const resolvedPath = path7.resolve(outputPath);
9549
+ fs10.mkdirSync(path7.dirname(resolvedPath), { recursive: true });
9550
+ fs10.writeFileSync(resolvedPath, formatSnapshotMarkdown(report), "utf-8");
9507
9551
  return resolvedPath;
9508
9552
  }
9509
9553
  function formatSnapshotMarkdown(report) {
@@ -10486,7 +10530,7 @@ var CONTENT_CLI_COMMANDS = [
10486
10530
 
10487
10531
  // src/commands/bootstrap.ts
10488
10532
  import crypto from "crypto";
10489
- import path7 from "path";
10533
+ import path8 from "path";
10490
10534
  import { eq } from "drizzle-orm";
10491
10535
 
10492
10536
  // ../config/src/index.ts
@@ -10643,7 +10687,7 @@ async function bootstrapCommand(_opts) {
10643
10687
  );
10644
10688
  }
10645
10689
  const configDir = getConfigDir();
10646
- const databasePath = env.databasePath || path7.join(configDir, "data.db");
10690
+ const databasePath = env.databasePath || path8.join(configDir, "data.db");
10647
10691
  const existing = configExists();
10648
10692
  const existingConfig = existing ? loadConfig() : void 0;
10649
10693
  let rawApiKey;
@@ -10713,10 +10757,10 @@ async function bootstrapCommand(_opts) {
10713
10757
 
10714
10758
  // src/commands/daemon.ts
10715
10759
  import { spawn } from "child_process";
10716
- import fs10 from "fs";
10717
- import path8 from "path";
10760
+ import fs11 from "fs";
10761
+ import path9 from "path";
10718
10762
  function getPidPath() {
10719
- return path8.join(getConfigDir(), "canonry.pid");
10763
+ return path9.join(getConfigDir(), "canonry.pid");
10720
10764
  }
10721
10765
  function isProcessAlive(pid) {
10722
10766
  try {
@@ -10756,8 +10800,8 @@ function buildServeForwardArgs(opts) {
10756
10800
  async function startDaemon(opts) {
10757
10801
  const pidPath = getPidPath();
10758
10802
  const format = opts.format ?? "text";
10759
- if (fs10.existsSync(pidPath)) {
10760
- const existingPid = parseInt(fs10.readFileSync(pidPath, "utf-8").trim(), 10);
10803
+ if (fs11.existsSync(pidPath)) {
10804
+ const existingPid = parseInt(fs11.readFileSync(pidPath, "utf-8").trim(), 10);
10761
10805
  if (!isNaN(existingPid) && isProcessAlive(existingPid)) {
10762
10806
  throw new CliError({
10763
10807
  code: "DAEMON_ALREADY_RUNNING",
@@ -10768,9 +10812,9 @@ async function startDaemon(opts) {
10768
10812
  }
10769
10813
  });
10770
10814
  }
10771
- fs10.unlinkSync(pidPath);
10815
+ fs11.unlinkSync(pidPath);
10772
10816
  }
10773
- const cliPath = path8.resolve(new URL(import.meta.url).pathname);
10817
+ const cliPath = path9.resolve(new URL(import.meta.url).pathname);
10774
10818
  const inSourceMode = new URL(import.meta.url).pathname.endsWith(".ts");
10775
10819
  const args = inSourceMode ? ["--import", "tsx", cliPath, "serve"] : [cliPath, "serve"];
10776
10820
  args.push(...buildServeForwardArgs(opts));
@@ -10787,10 +10831,10 @@ async function startDaemon(opts) {
10787
10831
  });
10788
10832
  }
10789
10833
  const configDir = getConfigDir();
10790
- if (!fs10.existsSync(configDir)) {
10791
- fs10.mkdirSync(configDir, { recursive: true });
10834
+ if (!fs11.existsSync(configDir)) {
10835
+ fs11.mkdirSync(configDir, { recursive: true });
10792
10836
  }
10793
- fs10.writeFileSync(pidPath, String(child.pid), "utf-8");
10837
+ fs11.writeFileSync(pidPath, String(child.pid), "utf-8");
10794
10838
  const port = opts.port ?? "4100";
10795
10839
  const host = opts.host ?? "127.0.0.1";
10796
10840
  if (!isMachineFormat(format)) {
@@ -10799,7 +10843,7 @@ async function startDaemon(opts) {
10799
10843
  const ready = await waitForReady(host, port);
10800
10844
  if (!ready) {
10801
10845
  try {
10802
- fs10.unlinkSync(pidPath);
10846
+ fs11.unlinkSync(pidPath);
10803
10847
  } catch {
10804
10848
  }
10805
10849
  throw new CliError({
@@ -10831,7 +10875,7 @@ async function startDaemon(opts) {
10831
10875
  }
10832
10876
  function stopDaemon(format = "text") {
10833
10877
  const pidPath = getPidPath();
10834
- if (!fs10.existsSync(pidPath)) {
10878
+ if (!fs11.existsSync(pidPath)) {
10835
10879
  if (isMachineFormat(format)) {
10836
10880
  console.log(JSON.stringify({
10837
10881
  stopped: false,
@@ -10842,7 +10886,7 @@ function stopDaemon(format = "text") {
10842
10886
  console.log("Canonry is not running (no PID file found)");
10843
10887
  return;
10844
10888
  }
10845
- const pid = parseInt(fs10.readFileSync(pidPath, "utf-8").trim(), 10);
10889
+ const pid = parseInt(fs11.readFileSync(pidPath, "utf-8").trim(), 10);
10846
10890
  if (isNaN(pid)) {
10847
10891
  if (isMachineFormat(format)) {
10848
10892
  console.log(JSON.stringify({
@@ -10853,7 +10897,7 @@ function stopDaemon(format = "text") {
10853
10897
  } else {
10854
10898
  console.error("Invalid PID file. Removing it.");
10855
10899
  }
10856
- fs10.unlinkSync(pidPath);
10900
+ fs11.unlinkSync(pidPath);
10857
10901
  return;
10858
10902
  }
10859
10903
  if (!isProcessAlive(pid)) {
@@ -10867,12 +10911,12 @@ function stopDaemon(format = "text") {
10867
10911
  } else {
10868
10912
  console.log(`Canonry is not running (stale PID: ${pid}). Cleaning up.`);
10869
10913
  }
10870
- fs10.unlinkSync(pidPath);
10914
+ fs11.unlinkSync(pidPath);
10871
10915
  return;
10872
10916
  }
10873
10917
  try {
10874
10918
  process.kill(pid, "SIGTERM");
10875
- fs10.unlinkSync(pidPath);
10919
+ fs11.unlinkSync(pidPath);
10876
10920
  if (isMachineFormat(format)) {
10877
10921
  console.log(JSON.stringify({
10878
10922
  stopped: true,
@@ -10896,9 +10940,9 @@ function stopDaemon(format = "text") {
10896
10940
 
10897
10941
  // src/commands/init.ts
10898
10942
  import crypto2 from "crypto";
10899
- import fs11 from "fs";
10943
+ import fs12 from "fs";
10900
10944
  import readline from "readline";
10901
- import path9 from "path";
10945
+ import path10 from "path";
10902
10946
  function prompt(question) {
10903
10947
  const rl = readline.createInterface({
10904
10948
  input: process.stdin,
@@ -10919,8 +10963,8 @@ var DEFAULT_QUOTA = {
10919
10963
  var PROJECT_MARKERS = [".git", "canonry.yaml", "canonry.yml", "package.json"];
10920
10964
  function cwdLooksLikeProject(dir) {
10921
10965
  const home = process.env.HOME ?? "";
10922
- if (home && path9.resolve(dir) === path9.resolve(home)) return false;
10923
- return PROJECT_MARKERS.some((marker) => fs11.existsSync(path9.join(dir, marker)));
10966
+ if (home && path10.resolve(dir) === path10.resolve(home)) return false;
10967
+ return PROJECT_MARKERS.some((marker) => fs12.existsSync(path10.join(dir, marker)));
10924
10968
  }
10925
10969
  var DEFAULT_AGENT_MODELS = {
10926
10970
  anthropic: "anthropic/claude-sonnet-4-6",
@@ -10951,8 +10995,8 @@ async function initCommand(opts) {
10951
10995
  return void 0;
10952
10996
  }
10953
10997
  const configDir = getConfigDir();
10954
- if (!fs11.existsSync(configDir)) {
10955
- fs11.mkdirSync(configDir, { recursive: true });
10998
+ if (!fs12.existsSync(configDir)) {
10999
+ fs12.mkdirSync(configDir, { recursive: true });
10956
11000
  }
10957
11001
  const bootstrapEnv = getBootstrapEnv(process.env, {
10958
11002
  GEMINI_API_KEY: opts?.geminiKey,
@@ -11067,7 +11111,7 @@ async function initCommand(opts) {
11067
11111
  const rawApiKey = `cnry_${crypto2.randomBytes(16).toString("hex")}`;
11068
11112
  const keyHash = crypto2.createHash("sha256").update(rawApiKey).digest("hex");
11069
11113
  const keyPrefix = rawApiKey.slice(0, 9);
11070
- const databasePath = path9.join(configDir, "data.db");
11114
+ const databasePath = path10.join(configDir, "data.db");
11071
11115
  const db = createClient(databasePath);
11072
11116
  migrate(db);
11073
11117
  db.insert(apiKeys).values({
@@ -12053,7 +12097,7 @@ var VISIBILITY_STATS_CLI_COMMANDS = [
12053
12097
  ];
12054
12098
 
12055
12099
  // src/cli-commands/wordpress.ts
12056
- import fs12 from "fs";
12100
+ import fs13 from "fs";
12057
12101
 
12058
12102
  // src/commands/wordpress.ts
12059
12103
  function getClient26() {
@@ -12292,12 +12336,12 @@ async function wordpressSetMeta(project, body) {
12292
12336
  printPageDetail(result);
12293
12337
  }
12294
12338
  async function wordpressBulkSetMeta(project, opts) {
12295
- const fs13 = await import("fs/promises");
12296
- const path10 = await import("path");
12297
- const filePath = path10.resolve(opts.from);
12339
+ const fs14 = await import("fs/promises");
12340
+ const path11 = await import("path");
12341
+ const filePath = path11.resolve(opts.from);
12298
12342
  let raw;
12299
12343
  try {
12300
- raw = await fs13.readFile(filePath, "utf8");
12344
+ raw = await fs14.readFile(filePath, "utf8");
12301
12345
  } catch {
12302
12346
  throw new CliError({
12303
12347
  code: "FILE_READ_ERROR",
@@ -12394,13 +12438,13 @@ async function wordpressSetSchema(project, body) {
12394
12438
  printManualAssist(`Schema update for "${body.slug}"`, result);
12395
12439
  }
12396
12440
  async function wordpressSchemaDeploy(project, opts) {
12397
- const fs13 = await import("fs/promises");
12398
- const path10 = await import("path");
12441
+ const fs14 = await import("fs/promises");
12442
+ const path11 = await import("path");
12399
12443
  const yaml = await loadYamlModule();
12400
- const filePath = path10.resolve(opts.profile);
12444
+ const filePath = path11.resolve(opts.profile);
12401
12445
  let raw;
12402
12446
  try {
12403
- raw = await fs13.readFile(filePath, "utf8");
12447
+ raw = await fs14.readFile(filePath, "utf8");
12404
12448
  } catch {
12405
12449
  throw new CliError({
12406
12450
  code: "FILE_READ_ERROR",
@@ -12505,13 +12549,13 @@ async function wordpressOnboard(project, opts) {
12505
12549
  }
12506
12550
  let profileData;
12507
12551
  if (opts.profile) {
12508
- const fs13 = await import("fs/promises");
12509
- const path10 = await import("path");
12552
+ const fs14 = await import("fs/promises");
12553
+ const path11 = await import("path");
12510
12554
  const yaml = await loadYamlModule();
12511
- const filePath = path10.resolve(opts.profile);
12555
+ const filePath = path11.resolve(opts.profile);
12512
12556
  let raw;
12513
12557
  try {
12514
- raw = await fs13.readFile(filePath, "utf8");
12558
+ raw = await fs14.readFile(filePath, "utf8");
12515
12559
  } catch {
12516
12560
  throw new CliError({
12517
12561
  code: "FILE_READ_ERROR",
@@ -12660,7 +12704,7 @@ function resolveContent(input, command, usage, options) {
12660
12704
  }
12661
12705
  if (contentFile) {
12662
12706
  try {
12663
- return fs12.readFileSync(contentFile, "utf-8");
12707
+ return fs13.readFileSync(contentFile, "utf-8");
12664
12708
  } catch (error) {
12665
12709
  const message = error instanceof Error ? error.message : String(error);
12666
12710
  throw usageError(`Error: could not read --content-file "${contentFile}": ${message}`, {
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-NY7SC4ES.js";
3
+ } from "./chunk-F2SRZJMY.js";
4
4
  import {
5
5
  loadConfig
6
- } from "./chunk-BMBHUFMI.js";
7
- import "./chunk-V4SW7SVX.js";
8
- import "./chunk-IAJ5TQ4S.js";
6
+ } from "./chunk-4PMMEFME.js";
7
+ import "./chunk-BMPIV35C.js";
8
+ import "./chunk-EZME2J2G.js";
9
9
  export {
10
10
  createServer,
11
11
  loadConfig
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IntelligenceService
3
- } from "./chunk-V4SW7SVX.js";
4
- import "./chunk-IAJ5TQ4S.js";
3
+ } from "./chunk-BMPIV35C.js";
4
+ import "./chunk-EZME2J2G.js";
5
5
  export {
6
6
  IntelligenceService
7
7
  };
package/dist/mcp.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  PACKAGE_VERSION,
4
4
  canonryMcpTools,
5
5
  createApiClient
6
- } from "./chunk-BMBHUFMI.js";
6
+ } from "./chunk-4PMMEFME.js";
7
7
  import {
8
8
  isReadOnlyKey
9
- } from "./chunk-IAJ5TQ4S.js";
9
+ } from "./chunk-EZME2J2G.js";
10
10
 
11
11
  // src/mcp/cli.ts
12
12
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonry/canonry",
3
- "version": "4.117.1",
3
+ "version": "4.117.2",
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",
@@ -65,27 +65,27 @@
65
65
  "@types/node-cron": "^3.0.11",
66
66
  "tsup": "^8.5.1",
67
67
  "tsx": "^4.19.0",
68
- "@ainyc/canonry-config": "0.0.0",
69
- "@ainyc/canonry-api-client": "0.0.0",
70
68
  "@ainyc/canonry-api-routes": "0.0.0",
71
- "@ainyc/canonry-db": "0.0.0",
72
69
  "@ainyc/canonry-contracts": "0.0.0",
73
- "@ainyc/canonry-integration-bing": "0.0.0",
70
+ "@ainyc/canonry-api-client": "0.0.0",
74
71
  "@ainyc/canonry-integration-openai-ads": "0.0.0",
72
+ "@ainyc/canonry-db": "0.0.0",
73
+ "@ainyc/canonry-config": "0.0.0",
74
+ "@ainyc/canonry-integration-bing": "0.0.0",
75
75
  "@ainyc/canonry-integration-cloud-run": "0.0.0",
76
- "@ainyc/canonry-integration-commoncrawl": "0.0.0",
77
- "@ainyc/canonry-integration-google": "0.0.0",
78
76
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
79
- "@ainyc/canonry-integration-wordpress": "0.0.0",
77
+ "@ainyc/canonry-integration-google-places": "0.0.0",
78
+ "@ainyc/canonry-integration-commoncrawl": "0.0.0",
80
79
  "@ainyc/canonry-integration-traffic": "0.0.0",
81
- "@ainyc/canonry-intelligence": "0.0.0",
80
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
82
81
  "@ainyc/canonry-provider-cdp": "0.0.0",
83
- "@ainyc/canonry-integration-google-places": "0.0.0",
82
+ "@ainyc/canonry-integration-google": "0.0.0",
83
+ "@ainyc/canonry-intelligence": "0.0.0",
84
84
  "@ainyc/canonry-provider-claude": "0.0.0",
85
- "@ainyc/canonry-provider-gemini": "0.0.0",
86
85
  "@ainyc/canonry-provider-openai": "0.0.0",
87
- "@ainyc/canonry-provider-local": "0.0.0",
88
- "@ainyc/canonry-provider-perplexity": "0.0.0"
86
+ "@ainyc/canonry-provider-perplexity": "0.0.0",
87
+ "@ainyc/canonry-provider-gemini": "0.0.0",
88
+ "@ainyc/canonry-provider-local": "0.0.0"
89
89
  },
90
90
  "scripts": {
91
91
  "build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",