@canonry/canonry 4.179.2 → 4.180.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/assets/{AuditHistoryPanel-TTMgg1iQ.js → AuditHistoryPanel-DI6iXS0J.js} +1 -1
- package/assets/assets/{BacklinksPage-BmlsStTz.js → BacklinksPage-DiwTMJTp.js} +1 -1
- package/assets/assets/{HistoryPage-OlX3tvxL.js → HistoryPage-BWODoEok.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-B_usHzN3.js → MeasurementPropertyPage-C1uZ9LEl.js} +1 -1
- package/assets/assets/{ProjectPage-DsC2NUCt.js → ProjectPage-C-fk0Jja.js} +8 -8
- package/assets/assets/{RunRow-BL8kiPON.js → RunRow-CMSISg-I.js} +1 -1
- package/assets/assets/{RunsPage-BXMLPcIB.js → RunsPage-HZwwLQDE.js} +1 -1
- package/assets/assets/{SettingsPage-Bm_T8JMf.js → SettingsPage-3eoRO4ze.js} +1 -1
- package/assets/assets/{SiteHealthSection-xlUYOOe2.js → SiteHealthSection-CATUc26x.js} +3 -3
- package/assets/assets/{TrafficPage-DmyGEdhw.js → TrafficPage-Cw8AM5VR.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-sbu3kXCD.js → TrafficSourceDetailPage-ChFDAstr.js} +1 -1
- package/assets/assets/{extract-error-message-Ra108eiS.js → extract-error-message-CG_IQ_9c.js} +1 -1
- package/assets/assets/{index-rJBOFic-.js → index-Dz0ju3qg.js} +3 -3
- package/assets/assets/{react-sigma_core.esm.min-tfJo9bgS.js → react-sigma_core.esm.min-BvgsCKLZ.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-E2JGJH5E.js → chunk-3JW762Q4.js} +29 -4
- package/dist/{chunk-VRQ7U4HU.js → chunk-A6XDLCKF.js} +2 -2
- package/dist/{chunk-F4HFEWLM.js → chunk-NFALEGSZ.js} +1 -1
- package/dist/{chunk-Z46AW53D.js → chunk-QPJC2H6J.js} +33 -19
- package/dist/{chunk-SKL6ZDIY.js → chunk-UD3YJQOV.js} +4 -4
- package/dist/cli.js +10 -5
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-F67UFJBG.js → intelligence-service-WQPUIJO6.js} +2 -2
- package/dist/mcp.js +3 -3
- package/package.json +9 -9
package/assets/assets/{react-sigma_core.esm.min-tfJo9bgS.js → react-sigma_core.esm.min-BvgsCKLZ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Bt,t as S,r as C}from"./vendor-tanstack-Dock0eH1.js";import{e as Ht,G as Wt}from"./SiteHealthSection-
|
|
1
|
+
import{g as Bt,t as S,r as C}from"./vendor-tanstack-Dock0eH1.js";import{e as Ht,G as Wt}from"./SiteHealthSection-CATUc26x.js";import"./index-Dz0ju3qg.js";import"./vendor-radix-4UOaVWza.js";import"./vendor-recharts-D8rt5lKn.js";import"./vendor-lucide-nYKv-BB7.js";import"./vendor-markdown-Bn7fRwrx.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-DG35TyhH.js";function Vt(r,n){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var e=i.call(r,n);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function ae(r){var n=Vt(r,"string");return typeof n=="symbol"?n:n+""}function A(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function He(r,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,ae(e.key),e)}}function L(r,n,i){return n&&He(r.prototype,n),i&&He(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function Q(r){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q(r)}function yt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yt=function(){return!!r})()}function jt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Zt(r,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jt(r)}function I(r,n,i){return n=Q(n),Zt(r,yt()?Reflect.construct(n,i||[],Q(r).constructor):n.apply(r,i))}function xe(r,n){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,e){return i.__proto__=e,i},xe(r,n)}function G(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&xe(r,n)}function qt(r){if(Array.isArray(r))return r}function Yt(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var e,t,a,o,s=[],l=!0,h=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(e=a.call(i)).done)&&(s.push(e.value),s.length!==n);l=!0);}catch(u){h=!0,t=u}finally{try{if(!l&&i.return!=null&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw t}}return s}}function Se(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,e=Array(n);i<n;i++)e[i]=r[i];return e}function Tt(r,n){if(r){if(typeof r=="string")return Se(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Se(r,n):void 0}}function Xt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ee(r,n){return qt(r)||Yt(r,n)||Tt(r,n)||Xt()}var pe={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},Ct=new Int8Array(4),be=new Int32Array(Ct.buffer,0,1),$t=new Float32Array(Ct.buffer,0,1),Kt=/^\s*rgba?\s*\(/,Jt=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Qt(r){var n=0,i=0,e=0,t=1;if(r[0]==="#")r.length===4?(n=parseInt(r.charAt(1)+r.charAt(1),16),i=parseInt(r.charAt(2)+r.charAt(2),16),e=parseInt(r.charAt(3)+r.charAt(3),16)):(n=parseInt(r.charAt(1)+r.charAt(2),16),i=parseInt(r.charAt(3)+r.charAt(4),16),e=parseInt(r.charAt(5)+r.charAt(6),16)),r.length===9&&(t=parseInt(r.charAt(7)+r.charAt(8),16)/255);else if(Kt.test(r)){var a=r.match(Jt);a&&(n=+a[1],i=+a[2],e=+a[3],a[4]&&(t=+a[4]))}return{r:n,g:i,b:e,a:t}}var J={};for(var le in pe)J[le]=oe(pe[le]),J[pe[le]]=J[le];function Rt(r,n,i,e,t){return be[0]=e<<24|i<<16|n<<8|r,be[0]=be[0]&4278190079,$t[0]}function oe(r){if(r=r.toLowerCase(),typeof J[r]<"u")return J[r];var n=Qt(r),i=n.r,e=n.g,t=n.b,a=n.a;a=a*255|0;var o=Rt(i,e,t,a);return J[r]=o,o}var Ee={};function _t(r){if(typeof Ee[r]<"u")return Ee[r];var n=(r&16711680)>>>16,i=(r&65280)>>>8,e=r&255,t=255,a=Rt(n,i,e,t);return Ee[r]=a,a}function We(r,n,i,e){return i+(n<<8)+(r<<16)}function Ve(r,n,i,e,t,a){var o=Math.floor(i/a*t),s=Math.floor(r.drawingBufferHeight/a-e/a*t),l=new Uint8Array(4);r.bindFramebuffer(r.FRAMEBUFFER,n),r.readPixels(o,s,1,1,r.RGBA,r.UNSIGNED_BYTE,l);var h=ee(l,4),u=h[0],d=h[1],f=h[2],g=h[3];return[u,d,f,g]}function c(r,n,i){return(n=ae(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function je(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,e)}return i}function b(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?je(Object(i),!0).forEach(function(e){c(r,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function ei(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Q(r))!==null;);return r}function Ae(){return Ae=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(r,n,i){var e=ei(r,n);if(e){var t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(arguments.length<3?r:i):t.value}},Ae.apply(null,arguments)}function wt(r,n,i,e){var t=Ae(Q(r.prototype),n,i);return typeof t=="function"?function(a){return t.apply(i,a)}:t}function ti(r){return r.normalized?1:r.size}function ye(r){var n=0;return r.forEach(function(i){return n+=ti(i)}),n}function xt(r,n,i){var e=r==="VERTEX"?n.VERTEX_SHADER:n.FRAGMENT_SHADER,t=n.createShader(e);if(t===null)throw new Error("loadShader: error while creating the shader");n.shaderSource(t,i),n.compileShader(t);var a=n.getShaderParameter(t,n.COMPILE_STATUS);if(!a){var o=n.getShaderInfoLog(t);throw n.deleteShader(t),new Error(`loadShader: error while compiling the shader:
|
|
3
3
|
`.concat(o,`
|
|
4
4
|
`).concat(i))}return t}function ii(r,n){return xt("VERTEX",r,n)}function ri(r,n){return xt("FRAGMENT",r,n)}function ni(r,n){var i=r.createProgram();if(i===null)throw new Error("loadProgram: error while creating the program.");var e,t;for(e=0,t=n.length;e<t;e++)r.attachShader(i,n[e]);r.linkProgram(i);var a=r.getProgramParameter(i,r.LINK_STATUS);if(!a){var o=r.getProgramInfoLog(i);throw r.deleteProgram(i),new Error("loadProgram: error while linking the program: ".concat(o))}return i}function Ze(r){var n=r.gl,i=r.buffer,e=r.program,t=r.vertexShader,a=r.fragmentShader;n.deleteShader(t),n.deleteShader(a),n.deleteProgram(e),n.deleteBuffer(i)}var qe=`#define PICKING_MODE
|
package/assets/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
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-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-Dz0ju3qg.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Dock0eH1.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-4UOaVWza.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-D8rt5lKn.js">
|
|
@@ -7687,8 +7687,33 @@ var gscPeriodTotalsSchema = z19.object({
|
|
|
7687
7687
|
source: z19.enum(["property-daily", "dimensioned", "mixed", "empty"])
|
|
7688
7688
|
});
|
|
7689
7689
|
var gscPeriodComparisonSchema = z19.object({
|
|
7690
|
-
/**
|
|
7690
|
+
/**
|
|
7691
|
+
* Length of EACH period in calendar days. Equals the selected window under
|
|
7692
|
+
* `basis: 'prior-window'`, and half of it under `basis: 'split-window'`.
|
|
7693
|
+
*/
|
|
7691
7694
|
days: z19.number(),
|
|
7695
|
+
/**
|
|
7696
|
+
* Which two periods these are, so a surface can say what it is showing.
|
|
7697
|
+
*
|
|
7698
|
+
* `prior-window` — the selected window against the equal-length period
|
|
7699
|
+
* immediately before it. What a reader means by "vs prior 90d".
|
|
7700
|
+
*
|
|
7701
|
+
* `split-window` — the selected window's own trailing and leading halves.
|
|
7702
|
+
* Used when there is nothing before the window to compare with: an unbounded
|
|
7703
|
+
* selection (`window=all`), or a prior period the sync never reached, whose
|
|
7704
|
+
* unsynced days would otherwise be counted as zeroes and manufacture growth.
|
|
7705
|
+
* A surface printing "vs prior {days}d" here is naming a period HALF the
|
|
7706
|
+
* length of the control the reader pressed, which is honest but surprising —
|
|
7707
|
+
* hence the label.
|
|
7708
|
+
*
|
|
7709
|
+
* Optional for the same reason as `window` and `trends`: a server older than
|
|
7710
|
+
* this field returns the comparison WITHOUT it, and declaring it required
|
|
7711
|
+
* would tell a generated consumer it may dereference the field safely against
|
|
7712
|
+
* a legacy response. Absent means the basis is unstated; every such server
|
|
7713
|
+
* split the window, but a surface should render the absence with its
|
|
7714
|
+
* period-length copy rather than assert a basis nobody sent.
|
|
7715
|
+
*/
|
|
7716
|
+
basis: z19.enum(["prior-window", "split-window"]).optional(),
|
|
7692
7717
|
prior: gscPeriodTotalsSchema,
|
|
7693
7718
|
trailing: gscPeriodTotalsSchema,
|
|
7694
7719
|
/**
|
|
@@ -7744,9 +7769,9 @@ var gscPerformanceDailyDtoSchema = z19.object({
|
|
|
7744
7769
|
trends: gscPerformanceTrendsSchema.optional(),
|
|
7745
7770
|
/**
|
|
7746
7771
|
* Optional for the same reason as `window` and `trends`, and additionally
|
|
7747
|
-
* null when
|
|
7748
|
-
*
|
|
7749
|
-
*
|
|
7772
|
+
* null when there is no span to divide into two periods, no evidence, or the
|
|
7773
|
+
* span extends beyond the project's known GSC data frontier. A consumer must
|
|
7774
|
+
* render the absence rather than substitute a percentage.
|
|
7750
7775
|
*/
|
|
7751
7776
|
periodComparison: gscPeriodComparisonSchema.nullable().optional()
|
|
7752
7777
|
});
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
installSkills,
|
|
6
6
|
loadConfigRaw,
|
|
7
7
|
saveConfigPatch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NFALEGSZ.js";
|
|
9
9
|
import {
|
|
10
10
|
SKILL_MANIFEST_FILENAME,
|
|
11
11
|
SkillsClients
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3JW762Q4.js";
|
|
13
13
|
|
|
14
14
|
// src/skills-autosync.ts
|
|
15
15
|
import fs from "fs";
|
|
@@ -642,7 +642,7 @@ import {
|
|
|
642
642
|
wordpressSchemaDeployResultDtoSchema,
|
|
643
643
|
wordpressSchemaStatusResultDtoSchema,
|
|
644
644
|
wordpressStatusDtoSchema
|
|
645
|
-
} from "./chunk-
|
|
645
|
+
} from "./chunk-3JW762Q4.js";
|
|
646
646
|
|
|
647
647
|
// src/intelligence-service.ts
|
|
648
648
|
import { eq as eq62, desc as desc27, asc as asc11, and as and51, ne as ne8, or as or14, inArray as inArray22, gte as gte14, lte as lte12, isNull as isNull9, sql as sql25, exists } from "drizzle-orm";
|
|
@@ -20596,7 +20596,7 @@ function validateCron(expr) {
|
|
|
20596
20596
|
}
|
|
20597
20597
|
return true;
|
|
20598
20598
|
}
|
|
20599
|
-
function validateCronField(field,
|
|
20599
|
+
function validateCronField(field, min2, max2) {
|
|
20600
20600
|
if (field === "*") return true;
|
|
20601
20601
|
const segments = field.split(",");
|
|
20602
20602
|
for (const segment of segments) {
|
|
@@ -20612,7 +20612,7 @@ function validateCronField(field, min, max2) {
|
|
|
20612
20612
|
if (rangeParts.length > 2) return false;
|
|
20613
20613
|
for (const part of rangeParts) {
|
|
20614
20614
|
const num = parseInt(part, 10);
|
|
20615
|
-
if (isNaN(num) || num <
|
|
20615
|
+
if (isNaN(num) || num < min2 || num > max2) return false;
|
|
20616
20616
|
}
|
|
20617
20617
|
}
|
|
20618
20618
|
return true;
|
|
@@ -22356,10 +22356,10 @@ function buildCategoryCounts(counts2) {
|
|
|
22356
22356
|
// ../api-routes/src/intelligence.ts
|
|
22357
22357
|
import { eq as eq25, desc as desc9, and as and19, inArray as inArray10, like } from "drizzle-orm";
|
|
22358
22358
|
var SEVERITY_RANK = { low: 0, medium: 1, high: 2, critical: 3 };
|
|
22359
|
-
function severitiesAtOrAbove(
|
|
22360
|
-
const floor = SEVERITY_RANK[
|
|
22359
|
+
function severitiesAtOrAbove(min2) {
|
|
22360
|
+
const floor = SEVERITY_RANK[min2];
|
|
22361
22361
|
if (floor === void 0) {
|
|
22362
|
-
throw validationError(`Invalid severity "${
|
|
22362
|
+
throw validationError(`Invalid severity "${min2}". Use one of: low, medium, high, critical.`);
|
|
22363
22363
|
}
|
|
22364
22364
|
return Object.keys(SEVERITY_RANK).filter((s) => SEVERITY_RANK[s] >= floor);
|
|
22365
22365
|
}
|
|
@@ -23338,7 +23338,7 @@ function winnabilityClassRank(winnabilityClass) {
|
|
|
23338
23338
|
}
|
|
23339
23339
|
|
|
23340
23340
|
// ../api-routes/src/gsc-totals.ts
|
|
23341
|
-
import { and as and23, asc as asc4, eq as eq28, sql as sql9, max } from "drizzle-orm";
|
|
23341
|
+
import { and as and23, asc as asc4, eq as eq28, sql as sql9, max, min } from "drizzle-orm";
|
|
23342
23342
|
var WINDOW_DAYS = { "7d": 7, "30d": 30, "90d": 90 };
|
|
23343
23343
|
function resolveGscWindowRange(window, latestDataDate, today) {
|
|
23344
23344
|
if (window === "all") {
|
|
@@ -23379,6 +23379,11 @@ function readLatestGscDataDate(db, projectId) {
|
|
|
23379
23379
|
const dimensioned = db.select({ latest: max(gscSearchData.date) }).from(gscSearchData).where(eq28(gscSearchData.projectId, projectId)).get()?.latest ?? null;
|
|
23380
23380
|
return [watermark, property, dimensioned].filter((d) => d !== null).reduce((maxDate, d) => maxDate === null || d > maxDate ? d : maxDate, null);
|
|
23381
23381
|
}
|
|
23382
|
+
function readEarliestGscDataDate(db, projectId) {
|
|
23383
|
+
const property = db.select({ earliest: min(gscDailyTotals.date) }).from(gscDailyTotals).where(eq28(gscDailyTotals.projectId, projectId)).get()?.earliest ?? null;
|
|
23384
|
+
const dimensioned = db.select({ earliest: min(gscSearchData.date) }).from(gscSearchData).where(eq28(gscSearchData.projectId, projectId)).get()?.earliest ?? null;
|
|
23385
|
+
return [property, dimensioned].filter((d) => d !== null).reduce((earliest, d) => earliest === null || d < earliest ? d : earliest, null);
|
|
23386
|
+
}
|
|
23382
23387
|
function readGscDailyTotals(db, projectId, startDate, endDate) {
|
|
23383
23388
|
const rows = db.select({
|
|
23384
23389
|
date: gscDailyTotals.date,
|
|
@@ -38096,6 +38101,7 @@ function computeGscPeriodComparison(daily, bounds) {
|
|
|
38096
38101
|
const comparable = prior.source !== "dimensioned" && prior.source !== "mixed" && trailing.source !== "dimensioned" && trailing.source !== "mixed";
|
|
38097
38102
|
return {
|
|
38098
38103
|
days: periodDays,
|
|
38104
|
+
basis: bounds?.basis ?? "split-window",
|
|
38099
38105
|
prior,
|
|
38100
38106
|
trailing,
|
|
38101
38107
|
comparable,
|
|
@@ -40498,12 +40504,19 @@ async function googleRoutes(app, opts) {
|
|
|
40498
40504
|
gscToday()
|
|
40499
40505
|
);
|
|
40500
40506
|
const cutoffDate = startDate ? null : resolvedWindow.startDate;
|
|
40507
|
+
const reportedWindow = resolveReportedWindow(resolvedWindow, startDate, endDate);
|
|
40501
40508
|
const windowStart = startDate ?? cutoffDate ?? "";
|
|
40502
40509
|
const windowEnd = endDate ?? resolvedWindow.endDate ?? "9999-12-31";
|
|
40503
|
-
const
|
|
40510
|
+
const priorPeriodStart = reportedWindow.startDate !== null && reportedWindow.endDate !== null ? (() => {
|
|
40511
|
+
const span = inclusiveDayCount(reportedWindow.startDate, reportedWindow.endDate);
|
|
40512
|
+
return span !== null && span > 0 ? shiftIsoCalendarDate(reportedWindow.startDate, -span) : null;
|
|
40513
|
+
})() : null;
|
|
40514
|
+
const earliestDataDate = priorPeriodStart === null ? null : readEarliestGscDataDate(app.db, project.id);
|
|
40515
|
+
const priorWindowIsSynced = priorPeriodStart !== null && earliestDataDate !== null && priorPeriodStart >= earliestDataDate;
|
|
40516
|
+
const fetchStart = priorWindowIsSynced ? priorPeriodStart : windowStart;
|
|
40517
|
+
const dailyTotals = readGscDailyTotals(app.db, project.id, fetchStart, windowEnd);
|
|
40504
40518
|
const conditions = [eq40(gscSearchData.projectId, project.id)];
|
|
40505
|
-
if (
|
|
40506
|
-
else if (cutoffDate) conditions.push(sql14`${gscSearchData.date} >= ${cutoffDate}`);
|
|
40519
|
+
if (fetchStart) conditions.push(sql14`${gscSearchData.date} >= ${fetchStart}`);
|
|
40507
40520
|
if (endDate) conditions.push(sql14`${gscSearchData.date} <= ${endDate}`);
|
|
40508
40521
|
const dimensionedRows = app.db.select({
|
|
40509
40522
|
date: gscSearchData.date,
|
|
@@ -40511,7 +40524,7 @@ async function googleRoutes(app, opts) {
|
|
|
40511
40524
|
impressions: sql14`COALESCE(SUM(${gscSearchData.impressions}), 0)`
|
|
40512
40525
|
}).from(gscSearchData).where(and32(...conditions)).groupBy(gscSearchData.date).orderBy(gscSearchData.date).all();
|
|
40513
40526
|
const propertyDates = new Set(dailyTotals.map((d) => d.date));
|
|
40514
|
-
const
|
|
40527
|
+
const comparisonDaily = mergeGscDailyTotalsWithFallback(
|
|
40515
40528
|
dailyTotals,
|
|
40516
40529
|
dimensionedRows.map((r) => ({
|
|
40517
40530
|
date: r.date,
|
|
@@ -40526,6 +40539,7 @@ async function googleRoutes(app, opts) {
|
|
|
40526
40539
|
ctr: d.impressions > 0 ? d.clicks / d.impressions : 0,
|
|
40527
40540
|
position: propertyDates.has(d.date) ? d.position : null
|
|
40528
40541
|
}));
|
|
40542
|
+
const daily = fetchStart === windowStart ? comparisonDaily : comparisonDaily.filter((d) => d.date >= windowStart && d.date <= windowEnd);
|
|
40529
40543
|
const totalClicks = daily.reduce((sum, d) => sum + d.clicks, 0);
|
|
40530
40544
|
const totalImpressions = daily.reduce((sum, d) => sum + d.impressions, 0);
|
|
40531
40545
|
let positionWeight = 0;
|
|
@@ -40541,10 +40555,15 @@ async function googleRoutes(app, opts) {
|
|
|
40541
40555
|
const row = byDate.get(date);
|
|
40542
40556
|
return row ? pick(row) : null;
|
|
40543
40557
|
});
|
|
40544
|
-
const reportedWindow = resolveReportedWindow(resolvedWindow, startDate, endDate);
|
|
40545
|
-
const comparisonStart = reportedWindow.startDate ?? daily[0]?.date;
|
|
40546
40558
|
const comparisonEnd = reportedWindow.endDate ?? daily[daily.length - 1]?.date;
|
|
40547
40559
|
const comparisonEndsWithinKnownData = reportedWindow.latestDataDate !== null && comparisonEnd <= reportedWindow.latestDataDate;
|
|
40560
|
+
const taggedComparisonDaily = comparisonDaily.map((d) => ({
|
|
40561
|
+
...d,
|
|
40562
|
+
fromPropertyTotals: propertyDates.has(d.date)
|
|
40563
|
+
}));
|
|
40564
|
+
const comparisonFor = (basis, startDate2) => startDate2 && comparisonEnd && comparisonEndsWithinKnownData ? computeGscPeriodComparison(taggedComparisonDaily, { startDate: startDate2, endDate: comparisonEnd, basis }) : null;
|
|
40565
|
+
const priorWindowComparison = priorWindowIsSynced ? comparisonFor("prior-window", priorPeriodStart) : null;
|
|
40566
|
+
const periodComparison = priorWindowComparison?.comparable ? priorWindowComparison : comparisonFor("split-window", reportedWindow.startDate ?? daily[0]?.date);
|
|
40548
40567
|
return {
|
|
40549
40568
|
totals: {
|
|
40550
40569
|
clicks: totalClicks,
|
|
@@ -40586,12 +40605,7 @@ async function googleRoutes(app, opts) {
|
|
|
40586
40605
|
// it goes negative for a metric that cannot be. Computed server-side for
|
|
40587
40606
|
// the same UI/CLI parity reason as the fit: a percentage derived in a
|
|
40588
40607
|
// chart component is invisible to an agent.
|
|
40589
|
-
periodComparison
|
|
40590
|
-
// The source tag is the comparison module's input, NOT part of the
|
|
40591
|
-
// response: `daily` on the wire stays exactly what the DTO declares.
|
|
40592
|
-
daily.map((d) => ({ ...d, fromPropertyTotals: propertyDates.has(d.date) })),
|
|
40593
|
-
{ startDate: comparisonStart, endDate: comparisonEnd }
|
|
40594
|
-
) : null
|
|
40608
|
+
periodComparison
|
|
40595
40609
|
};
|
|
40596
40610
|
});
|
|
40597
40611
|
app.get("/projects/:name/google/gsc/top-pages", async (request) => {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
loadConfig,
|
|
12
12
|
loadConfigRaw,
|
|
13
13
|
saveConfigPatch
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NFALEGSZ.js";
|
|
15
15
|
import {
|
|
16
16
|
CC_CACHE_DIR,
|
|
17
17
|
DUCKDB_SPEC,
|
|
@@ -157,7 +157,7 @@ import {
|
|
|
157
157
|
siteCrawlSnapshots,
|
|
158
158
|
toAlertView,
|
|
159
159
|
usageCounters
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-QPJC2H6J.js";
|
|
161
161
|
import {
|
|
162
162
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
163
163
|
AGENT_PROVIDER_IDS,
|
|
@@ -295,7 +295,7 @@ import {
|
|
|
295
295
|
validationError,
|
|
296
296
|
winnabilityClassLabel,
|
|
297
297
|
withRetry
|
|
298
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-3JW762Q4.js";
|
|
299
299
|
|
|
300
300
|
// src/telemetry.ts
|
|
301
301
|
import crypto from "crypto";
|
|
@@ -11857,7 +11857,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
11857
11857
|
return result;
|
|
11858
11858
|
}
|
|
11859
11859
|
async function backfillInsightsCommand(project, opts) {
|
|
11860
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
11860
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-WQPUIJO6.js");
|
|
11861
11861
|
const config = loadConfig();
|
|
11862
11862
|
const db = createClient(config.database);
|
|
11863
11863
|
migrate(db);
|
package/dist/cli.js
CHANGED
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
showFirstRunNotice,
|
|
27
27
|
trackCliCommandFinished,
|
|
28
28
|
trackEvent
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-UD3YJQOV.js";
|
|
30
30
|
import {
|
|
31
31
|
autoSyncSkills,
|
|
32
32
|
formatAutoSyncNotice
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-A6XDLCKF.js";
|
|
34
34
|
import {
|
|
35
35
|
CliError,
|
|
36
36
|
EXIT_SYSTEM_ERROR,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
saveConfigPatch,
|
|
56
56
|
systemError,
|
|
57
57
|
usageError
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-NFALEGSZ.js";
|
|
59
59
|
import {
|
|
60
60
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
61
61
|
CLOUDFLARE_WORKER_GENERATED_MARKER,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
projects,
|
|
70
70
|
queries,
|
|
71
71
|
renderReportHtml
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-QPJC2H6J.js";
|
|
73
73
|
import {
|
|
74
74
|
AdsDeliverySnapshotStatuses,
|
|
75
75
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -138,7 +138,7 @@ import {
|
|
|
138
138
|
providerQuotaPolicySchema,
|
|
139
139
|
resolveProviderInput,
|
|
140
140
|
winnabilityClassSchema
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-3JW762Q4.js";
|
|
142
142
|
|
|
143
143
|
// src/cli.ts
|
|
144
144
|
import { pathToFileURL } from "url";
|
|
@@ -7903,6 +7903,11 @@ No period comparison: period comparison needs property-level daily data. Sync ag
|
|
|
7903
7903
|
`
|
|
7904
7904
|
Last ${cmp.days} day${cmp.days === 1 ? "" : "s"} (${cmp.trailing.startDate} to ${cmp.trailing.endDate}) vs prior ${cmp.days} (${cmp.prior.startDate} to ${cmp.prior.endDate}):`
|
|
7905
7905
|
);
|
|
7906
|
+
if (cmp.basis === "split-window") {
|
|
7907
|
+
console.log(
|
|
7908
|
+
` (no equal-length period with synced data before this window, so it was split in two)`
|
|
7909
|
+
);
|
|
7910
|
+
}
|
|
7906
7911
|
for (const [label, ratio, prior, trailing, inverted] of [
|
|
7907
7912
|
["Clicks", cmp.change.clicks, cmp.prior.clicks, cmp.trailing.clicks, false],
|
|
7908
7913
|
["Impressions", cmp.change.impressions, cmp.prior.impressions, cmp.trailing.impressions, false],
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
createGoogleMarketingCredentialStore,
|
|
4
4
|
createGoogleMarketingRuntime,
|
|
5
5
|
createServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UD3YJQOV.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-NFALEGSZ.js";
|
|
10
|
+
import "./chunk-QPJC2H6J.js";
|
|
11
|
+
import "./chunk-3JW762Q4.js";
|
|
12
12
|
export {
|
|
13
13
|
GoogleMarketingRuntimeError,
|
|
14
14
|
createGoogleMarketingCredentialStore,
|
package/dist/mcp.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoSyncSkills
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A6XDLCKF.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient,
|
|
6
6
|
createCanonryMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NFALEGSZ.js";
|
|
8
8
|
import {
|
|
9
9
|
isReadOnlyKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3JW762Q4.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp/cli.ts
|
|
13
13
|
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.
|
|
3
|
+
"version": "4.180.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
|
"license": "FSL-1.1-ALv2",
|
|
@@ -70,31 +70,31 @@
|
|
|
70
70
|
"@types/node-cron": "^3.0.11",
|
|
71
71
|
"tsup": "^8.5.1",
|
|
72
72
|
"tsx": "^4.19.0",
|
|
73
|
+
"@ainyc/canonry-api-client": "0.0.0",
|
|
73
74
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
74
75
|
"@ainyc/canonry-config": "0.0.0",
|
|
75
|
-
"@ainyc/canonry-api-client": "0.0.0",
|
|
76
|
-
"@ainyc/canonry-db": "0.0.0",
|
|
77
76
|
"@ainyc/canonry-contracts": "0.0.0",
|
|
78
|
-
"@ainyc/canonry-
|
|
77
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
79
78
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
79
|
+
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
80
80
|
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
81
81
|
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
82
82
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
83
83
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
84
|
-
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
85
84
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
86
|
-
"@ainyc/canonry-integration-google-
|
|
85
|
+
"@ainyc/canonry-integration-google-ads": "0.0.0",
|
|
87
86
|
"@ainyc/canonry-integration-google-tag-manager": "0.0.0",
|
|
88
87
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
89
88
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
89
|
+
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
90
90
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
91
91
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
92
92
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
93
|
-
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
94
93
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
94
|
+
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
95
95
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
96
|
-
"@ainyc/canonry-provider-
|
|
97
|
-
"@ainyc/canonry-provider-
|
|
96
|
+
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
97
|
+
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|
|
100
100
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|