@canonry/canonry 4.117.0 → 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-PJATAPZW.js → chunk-4PMMEFME.js} +55 -1
  17. package/dist/{chunk-FVVKNMZW.js → chunk-BMPIV35C.js} +1113 -752
  18. package/dist/{chunk-IAJ5TQ4S.js → chunk-EZME2J2G.js} +1196 -1140
  19. package/dist/{chunk-ZZEA774R.js → chunk-F2SRZJMY.js} +6 -5
  20. package/dist/cli.js +121 -77
  21. package/dist/index.js +4 -4
  22. package/dist/{intelligence-service-J7G4CMI5.js → intelligence-service-GNOE4J35.js} +2 -2
  23. package/dist/mcp.js +2 -2
  24. package/package.json +12 -12
  25. package/assets/assets/ProjectPage-0-NnRxys.js +0 -7
  26. package/assets/assets/index-B4R1-8hR.css +0 -1
@@ -1 +1 @@
1
- import{c}from"./index-LjcWHaNZ.js";const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",a);const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n=c("circle-question-mark",e);const o=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],s=c("download",o);const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],r=c("trash-2",t);export{h as C,s as D,r as T,n as a};
1
+ import{c}from"./index-i-t64RXw.js";const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",a);const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n=c("circle-question-mark",e);const o=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],s=c("download",o);const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],r=c("trash-2",t);export{h as C,s as D,r as T,n as a};
package/assets/index.html CHANGED
@@ -12,12 +12,12 @@
12
12
  <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
13
13
  <link rel="apple-touch-icon" href="./apple-touch-icon.png" />
14
14
  <title>Canonry</title>
15
- <script type="module" crossorigin src="./assets/index-LjcWHaNZ.js"></script>
15
+ <script type="module" crossorigin src="./assets/index-i-t64RXw.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Be8JdV5M.js">
17
17
  <link rel="modulepreload" crossorigin href="./assets/vendor-radix-CQ77EO2y.js">
18
18
  <link rel="modulepreload" crossorigin href="./assets/vendor-recharts-C9EZkgbP.js">
19
19
  <link rel="modulepreload" crossorigin href="./assets/vendor-markdown-6dwjPOKK.js">
20
- <link rel="stylesheet" crossorigin href="./assets/index-B4R1-8hR.css">
20
+ <link rel="stylesheet" crossorigin href="./assets/index-DrDNyUhv.css">
21
21
  </head>
22
22
  <body>
23
23
  <div id="root"></div>
@@ -25,7 +25,7 @@ import {
25
25
  trafficConnectVercelRequestSchema,
26
26
  trafficConnectWordpressRequestSchema,
27
27
  trafficEventKindSchema
28
- } from "./chunk-IAJ5TQ4S.js";
28
+ } from "./chunk-EZME2J2G.js";
29
29
 
30
30
  // src/config.ts
31
31
  import fs from "fs";
@@ -3786,6 +3786,19 @@ var ApiClient = class {
3786
3786
  `
3787
3787
  );
3788
3788
  }
3789
+ const contentType = result.response.headers.get("content-type");
3790
+ if (result.response.ok && contentType?.toLowerCase().startsWith("text/html")) {
3791
+ throw new CliError({
3792
+ code: "UNEXPECTED_RESPONSE_FORMAT",
3793
+ message: `Expected a JSON response from the canonry API at ${result.request.url}, but received ${contentType} (HTTP ${result.response.status}). Check the server URL and base path.`,
3794
+ exitCode: EXIT_SYSTEM_ERROR,
3795
+ details: {
3796
+ requestUrl: result.request.url,
3797
+ contentType,
3798
+ httpStatus: result.response.status
3799
+ }
3800
+ });
3801
+ }
3789
3802
  if (result.error !== void 0 && result.error !== null) {
3790
3803
  const errorObj = typeof result.error === "object" && result.error !== null && "error" in result.error && typeof result.error.error === "object" && result.error.error !== null ? result.error.error : null;
3791
3804
  const msg = errorObj?.message ? String(errorObj.message) : `HTTP ${result.response.status}: ${result.response.statusText}`;
@@ -3948,6 +3961,47 @@ var ApiClient = class {
3948
3961
  })
3949
3962
  );
3950
3963
  }
3964
+ /** Download the versioned historical answer-engine results attachment. */
3965
+ async downloadResultsExport(project, opts) {
3966
+ await this.probeBasePath();
3967
+ const params = new URLSearchParams({ format: opts.format });
3968
+ if (opts.since) params.set("since", opts.since);
3969
+ if (opts.until) params.set("until", opts.until);
3970
+ if (opts.includeProbes) params.set("includeProbes", "true");
3971
+ const url = `${this.originUrl}/api/v1/projects/${encodeURIComponent(project)}/results/export?${params.toString()}`;
3972
+ let res;
3973
+ try {
3974
+ res = await fetch(url, {
3975
+ headers: { Authorization: `Bearer ${this.apiKey}` }
3976
+ });
3977
+ } catch (err) {
3978
+ const message = err instanceof Error ? err.message : String(err);
3979
+ if (message.includes("fetch failed") || message.includes("ECONNREFUSED") || message.includes("connect ECONNREFUSED")) {
3980
+ throw new CliError({
3981
+ code: "CONNECTION_ERROR",
3982
+ message: `Could not connect to canonry server at ${this.originUrl}. Start it with "canonry serve".`,
3983
+ exitCode: EXIT_SYSTEM_ERROR
3984
+ });
3985
+ }
3986
+ throw new CliError({ code: "CONNECTION_ERROR", message, exitCode: EXIT_SYSTEM_ERROR });
3987
+ }
3988
+ if (!res.ok) {
3989
+ let body = null;
3990
+ try {
3991
+ body = await res.json();
3992
+ } catch {
3993
+ }
3994
+ const error = body && typeof body === "object" && "error" in body ? body.error : void 0;
3995
+ throw new CliError({
3996
+ code: error?.code ?? "API_ERROR",
3997
+ message: error?.message ?? `HTTP ${res.status}: ${res.statusText}`,
3998
+ exitCode: res.status >= 500 ? EXIT_SYSTEM_ERROR : EXIT_USER_ERROR,
3999
+ details: { ...error?.details ?? {}, httpStatus: res.status }
4000
+ });
4001
+ }
4002
+ const filename = /filename\s*=\s*"?([^";]+)"?/i.exec(res.headers.get("content-disposition") ?? "")?.[1] ?? `canonry-results-${project}.${opts.format}`;
4003
+ return { content: await res.text(), filename };
4004
+ }
3951
4005
  // ── Queries / keywords / competitors ────────────────────────────────────
3952
4006
  async putQueries(project, queries) {
3953
4007
  await this.invoke(