@canonry/canonry 5.17.0 → 5.18.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-CZUnfysJ.js → AuditHistoryPanel-Di5c6xSa.js} +1 -1
- package/assets/assets/{BacklinksPage-C9qSkTUW.js → BacklinksPage-CZi3sZ-7.js} +1 -1
- package/assets/assets/{HistoryPage-CYMWnCta.js → HistoryPage-BY7HiZWU.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-D3AdBHpI.js +1 -0
- package/assets/assets/ProjectPage-NyUl1dkF.js +8 -0
- package/assets/assets/{RunRow-CwMUW3rM.js → RunRow-cRjiHQbt.js} +1 -1
- package/assets/assets/{RunsPage-DbzSmrnc.js → RunsPage-DZP_kqJs.js} +1 -1
- package/assets/assets/{SettingsPage-DM-G5WzL.js → SettingsPage-BqJXYCDc.js} +1 -1
- package/assets/assets/{SiteHealthSection-BwmQJ9Z9.js → SiteHealthSection-Brr0C56X.js} +3 -3
- package/assets/assets/{TrafficPage-DSumJzUk.js → TrafficPage-k5NPSDur.js} +2 -2
- package/assets/assets/{TrafficSourceDetailPage-D5BjIBkN.js → TrafficSourceDetailPage-BKNzWnxA.js} +1 -1
- package/assets/assets/{extract-error-message-DbpR8Tzb.js → extract-error-message-Cnvelll0.js} +1 -1
- package/assets/assets/{index-BtHRel6S.js → index-Cd_1GknE.js} +21 -21
- package/assets/assets/{react-sigma_core.esm.min-C3cM2I3z.js → react-sigma_core.esm.min-CthGjQKl.js} +1 -1
- package/assets/assets/v2-overview-adapter-q2o2MzmG.js +1 -0
- package/assets/index.html +1 -1
- package/dist/{chunk-L36TC6LB.js → chunk-77VHT3JD.js} +29 -3
- package/dist/{chunk-3OYWLQEE.js → chunk-HAABFHXB.js} +2 -2
- package/dist/{chunk-GYX277BV.js → chunk-HIFBIDOW.js} +6 -6
- package/dist/{chunk-XC24KCTL.js → chunk-TMTO2JHU.js} +2 -2
- package/dist/{chunk-2EE6RPWV.js → chunk-X3GFCKUJ.js} +2 -2
- package/dist/{chunk-H6COEFVL.js → chunk-Y5IDGH5B.js} +51 -17
- package/dist/cli.js +18 -8
- package/dist/{demo-server-CUBR2NVR.js → demo-server-JBGYZKAI.js} +3 -3
- package/dist/index.js +5 -5
- package/dist/{intelligence-service-6N7SIWLD.js → intelligence-service-EORTVFDF.js} +2 -2
- package/dist/mcp.js +3 -3
- package/package.json +12 -12
- package/assets/assets/MeasurementPropertyPage-Bu4KDAdf.js +0 -1
- package/assets/assets/ProjectPage-Bg87LPit.js +0 -8
- package/assets/assets/v2-overview-adapter-DllH2EQb.js +0 -1
package/assets/assets/{react-sigma_core.esm.min-C3cM2I3z.js → react-sigma_core.esm.min-CthGjQKl.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Bt,t as S,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{e as Ht,G as Wt}from"./SiteHealthSection-
|
|
1
|
+
import{g as Bt,t as S,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{e as Ht,G as Wt}from"./SiteHealthSection-Brr0C56X.js";import"./index-Cd_1GknE.js";import"./vendor-radix-twS1M3FF.js";import"./vendor-recharts-llkUFBGR.js";import"./vendor-lucide-N6vOpZmh.js";import"./vendor-markdown-B4giJcws.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-BQC2VH0O.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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{A as ie,B as oe,aJ as le}from"./index-Cd_1GknE.js";import{M as ue}from"./vendor-markdown-B4giJcws.js";import{C as ce,$ as de,g as Z}from"./vendor-lucide-N6vOpZmh.js";const Ie="Sources",_={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function pe({headingLevel:e}){return n=>{const l=[],u=c=>{c.type==="heading"&&c.depth&&l.push(c),c.children?.forEach(u)};u(n);const f=l.reduce((c,p)=>Math.min(c,p.depth),6);for(const c of l){const p=c.depth-f;c.depth=Math.min(6,e+p),c.data={...c.data,hProperties:{...c.data?.hProperties,"data-answer-heading-level":p+1}}}}}function me({answer:e}){const[n,l]=C.useState("idle"),u=C.useRef(!1),f=async()=>{if(!u.current){u.current=!0,l("copying");try{await navigator.clipboard.writeText(e),l("copied")}catch{l("failed")}finally{u.current=!1}}};return s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[s.jsx(oe,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":n==="copying","aria-busy":n==="copying",onClick:()=>{f()},children:n==="copying"?_.copying:_.copy}),s.jsx("span",{role:"status",className:"text-sm text-secondary",children:n==="copied"?_.copied:n==="failed"?_.failed:""})]})}function Me({children:e,headingLevel:n=4,copyable:l=!1}){return s.jsxs("div",{className:"answer-markdown",children:[s.jsx(ue,{remarkPlugins:[[pe,{headingLevel:n}]],components:{p:({children:u})=>s.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:u}),ul:({children:u})=>s.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:u}),ol:({children:u,start:f})=>s.jsx("ol",{start:f,className:"mb-3 ml-5 list-decimal space-y-1",children:u}),pre:({children:u})=>s.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:u}),a:({children:u,href:f})=>{const c=ie(f);return c?s.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:u}):s.jsx("span",{children:u})},img:({alt:u})=>s.jsx("span",{children:u})},children:e}),l&&e.trim()?s.jsx(me,{answer:e},e):null]})}const X="min-h-11 w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",D="flex min-h-11 w-full items-center justify-between gap-3 rounded px-2 text-left text-sm text-primary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",E=e=>e.kind==="project"?"Whole site":e.label,q={allMarkets:"All markets",browse:e=>`Browse ${e}`,select:e=>`Select ${e}`,browseAll:"Browse all properties"},ge=e=>e?.kind==="group"&&e.marketKeys?.length===1?e.marketKeys[0]:void 0,ee=e=>`${e} ${e===1?"property":"properties"}`;function Ke({options:e,selected:n,onSelect:l,marketKey:u,label:f="Measurement scope",labelVisibility:c="visible",allowGroupSelect:p=!0}){const a=[...e].sort((t,o)=>t.label.localeCompare(o.label,void 0,{numeric:!0})||t.id.localeCompare(o.id)),[x,k]=C.useState(""),[I,M]=C.useState([]),[y,N]=C.useState(!1),b=C.useRef(null),v=C.useRef(null),r=C.useId(),g=a.filter(t=>t.kind==="group"),m=new Map(g.map(t=>[t.id,t])),i=m.get(I.at(-1)??""),U=m.get(I.at(-2)??""),h=x.trim().toLocaleLowerCase(),re=g.filter(t=>!t.parentGroupIds?.some(o=>m.has(o))),w=a.filter(t=>t.kind==="property"),O=t=>(t.parentGroupIds??[]).map(o=>m.get(o)?.label).filter(Boolean).join(" · "),R=t=>`${E(t)} ${O(t)}`.toLocaleLowerCase().includes(h),F=t=>{const o=[...t.parentGroupIds??[]],d=new Set;for(;o.length;){const j=o.pop();if(j===i?.id)return!0;d.has(j)||(d.add(j),o.push(...m.get(j)?.parentGroupIds??[]))}return!1},K=(y?[]:i?g.filter(t=>h?F(t):t.parentGroupIds?.includes(i.id)):h?g:re).filter(R),S=a.find(t=>t.kind==="market"&&t.id===(u??(n.kind==="market"?n.id:void 0))),H=i&&S&&(i.marketKeys?.includes(S.id)||S.parentGroupIds?.includes(i.id))?S.id:void 0,L=p?H??ge(i):void 0,G=(i?w.filter(t=>t.parentGroupIds?.includes(i.id)&&(!L||t.marketKeys?.includes(L))):h||y||g.length===0?w:[]).filter(R),W=a.filter(t=>t.kind!=="market"||y||!p&&!i&&!h&&g.length>0||p&&i?.marketKeys?.length===1&&!h?!1:(i?h?F(t):t.parentGroupIds?.includes(i.id):h||!t.parentGroupIds?.some(d=>m.has(d)))&&R(t)),z=i||y?[]:a.filter(t=>t.kind==="project"&&R(t));C.useEffect(()=>{const t=o=>{b.current?.open&&o.target instanceof Node&&!b.current.contains(o.target)&&(b.current.open=!1)};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[]);const se=t=>{b.current&&(b.current.open=!1,b.current.querySelector("summary")?.focus());const o=p?t.kind==="property"?L:t.kind==="group"&&t.id===i?.id?H:void 0:void 0;o?l(t,o):l(t)},T=t=>{const o=[];let d=m.get(t.parentGroupIds?.[0]??"");for(;d&&!o.includes(d.id)&&d.id!==t.id;)o.unshift(d.id),d=m.get(d.parentGroupIds?.[0]??"");return[...o,t.id]},ae=()=>{const t=n.kind==="group"?m.get(n.id):void 0,o=m.get(S?.parentGroupIds?.[0]??""),d=(n.parentGroupIds??[]).flatMap(A=>{const B=m.get(A);return B?[T(B)]:[]}),j=d.find(A=>A.at(-1)===i?.id)??d.sort((A,B)=>B.length-A.length)[0]??[],J=o?T(o):n.marketKeys?.length?[]:j;M(t?T(t):J),N(n.kind==="property"&&J.length===0&&g.length>0),k("")},Y=t=>{M(T(t)),N(!1),k(""),v.current?.focus()},P=(t,o=E(t))=>s.jsxs("div",{className:"flex items-stretch",children:[s.jsxs("button",{type:"button",className:D,"aria-label":t.kind==="group"&&!p?q.browse(E(t)):q.select(E(t)),"aria-current":n.kind===t.kind&&n.id===t.id?"true":void 0,onClick:()=>t.kind==="group"&&!p?Y(t):se(t),children:[s.jsxs("span",{className:"min-w-0 break-words",children:[o,h&&O(t)?s.jsx("span",{className:"block text-[13px] text-secondary",children:O(t)}):null]}),s.jsx("span",{className:"shrink-0 text-right text-[13px] text-secondary",children:t.kind==="market"?p?"Query context":"Market":t.kind==="property"?"Property":ee(t.targetCount)})]}),p&&t.kind==="group"&&t.id!==i?.id&&a.some(d=>d.parentGroupIds?.includes(t.id))?s.jsx("button",{type:"button","aria-label":q.browse(t.label),title:`Browse ${t.label}`,className:"flex min-h-11 min-w-11 items-center justify-center rounded text-secondary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",onClick:()=>Y(t),children:s.jsx(Z,{size:18,"aria-hidden":"true"})}):null]},`${t.kind}:${t.id}`),V=(t,o)=>o.length>0?s.jsxs("section",{"aria-label":t,className:"mt-2",children:[s.jsx("h3",{className:"px-2 py-2 text-[13px] font-medium text-secondary",children:t}),o.map(d=>P(d))]}):null,Q=(t,o,d)=>o.length>0?s.jsxs("details",{open:d,className:"mt-2 border-y border-default",children:[s.jsxs("summary",{className:"min-h-11 cursor-pointer px-2 py-3 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[t," (",o.length,")"]}),o.map(j=>P(j))]},`${i?.id??"root"}:${t}`):null;return s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{id:`${r}-label`,className:c==="sr-only"?"sr-only":"mb-1 block text-sm font-medium text-heading",children:f}),s.jsxs("details",{ref:b,className:"relative",onToggle:t=>{t.target===t.currentTarget&&t.currentTarget.open&&v.current?.focus()},onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),t.currentTarget.open=!1,t.currentTarget.querySelector("summary")?.focus())},children:[s.jsxs("summary",{id:`${r}-value`,"aria-labelledby":`${r}-label ${r}-value`,className:`${X} visibility-scope-trigger`,onClick:()=>{b.current?.open||ae()},children:[`${E(n)}${n.kind==="group"?` · ${ee(n.targetCount)}`:n.kind==="property"?` · ${a.find(t=>t.kind==="market"&&t.id===u)?.label??(n.marketKeys?.length?q.allMarkets:"Property")}`:n.kind==="market"?" · Market":""}`,s.jsx(ce,{size:16,"aria-hidden":"true",className:"shrink-0 text-secondary"})]}),s.jsxs("div",{className:"visibility-scope-menu",children:[i||y?s.jsxs("div",{className:"mb-2 border-b border-default pb-2",children:[s.jsx("button",{type:"button",className:D,"aria-label":`Back to ${U?.label??"all groups"}`,onClick:()=>{M(I.slice(0,-1)),N(!1),k(""),v.current?.focus()},children:s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(de,{size:16,"aria-hidden":"true"}),U?.label??"All groups"]})}),s.jsx("p",{className:"px-2 py-1 text-sm font-medium text-heading","aria-live":"polite",children:i?.label??"All properties"})]}):null,s.jsx("input",{ref:v,type:"search","aria-label":"Search scopes",className:X,placeholder:i?"Search within this group":y?"Search properties":"Search groups or properties",value:x,onChange:t=>k(t.target.value)}),s.jsxs("div",{className:"mt-2 max-h-80 overflow-y-auto",children:[p&&i&&!h?P(i,"All properties in this group"):null,z.map(t=>P(t)),i&&!h?Q("Subgroups",K,!0):V(i?"Subgroups":"Groups",K),h?V("Properties",G):Q(i&&K.length>0?"All properties":"Properties",G,!i||K.length===0),V("Markets",W),!i&&!y&&!h&&g.length>0&&w.length>0?s.jsxs("button",{type:"button",className:`${D} mt-2 border-t border-default`,"aria-label":q.browseAll,onClick:()=>{N(!0),v.current?.focus()},children:[s.jsx("span",{children:"All properties"}),s.jsx(Z,{size:18,"aria-hidden":"true"})]}):null,h&&K.length+G.length+W.length+z.length===0?s.jsx("p",{className:"py-3 text-sm text-secondary",children:"No matching scopes."}):null]})]})]})]})}function Se(e){const n=e[0];return n?e.every(l=>l.mode===n.mode&&l.scope.kind===n.scope.kind&&l.scope.key===n.scope.key&&l.queryClass===n.queryClass&&l.measurement.displayedRunId===n.measurement.displayedRunId):!0}function $(e){return e.state==="unavailable"?{numerator:null,denominator:null,reason:e.reason}:e.numerator===void 0||e.denominator===void 0||e.denominator<=0?{numerator:null,denominator:null,reason:"not_applicable"}:{numerator:e.numerator,denominator:e.denominator,...e.unattributed===void 0?{}:{unattributed:e.unattributed}}}function fe(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function he(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function ye(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function te(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function be(e,n,l){const u=new Map;if(!n)return u;const f=new Map(e.usageEdges.map(a=>[te(a),a.targetKey])),c=new Map(e.assignments.map(a=>[`${a.targetKey}:${a.queryId}`,a.queryClass])),p=new Map(e.usageEdges.map(a=>[te(a),c.get(`${a.targetKey}:${a.queryId}`)]));for(const a of n.evidence){if(l&&p.get(a.usageEdgeId)!==l)continue;const x=f.get(a.usageEdgeId);if(!x)continue;const k=u.get(x)??[];k.push({id:`${a.observationId}:${a.expectedSlotId}:${a.usageEdgeId}:${a.sourceUrl}`,kind:he(a.classification),query:a.queryText,provider:a.provider,location:a.location,url:a.sourceUrl,tone:ye(a.classification),historical:a.historical||a.bridged}),u.set(x,k)}return u}function xe(e){if(e.flags>0)return{label:"Review",tone:"caution"};const n=[e.mentionCoverage,e.citationCoverage].filter(l=>l.state==="unavailable").map(l=>l.reason);return n.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:n.includes("plan_v1")?{label:"Update setup",tone:"caution"}:n.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:n.includes("identity_ambiguous")?{label:le.ambiguous,tone:"caution"}:n.includes("no_population")?{label:"No queries",tone:"neutral"}:n.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function ke(e){return e==="complete"?{label:"Complete",tone:"positive"}:e==="partial"?{label:"Partial",tone:"caution"}:e==="queued"?{label:"Queued",tone:"neutral"}:e==="running"?{label:"Running",tone:"neutral"}:e==="failed"?{label:"Failed",tone:"negative"}:{label:"Not measured",tone:"neutral"}}function Ce(e){if(!e)return"";const n=new Date(e);return Number.isFinite(n.getTime())?n.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function ne(e){const n=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${n} flagged ${n===1?"result needs":"results need"} review.`;if(e.nextAction.kind==="complete_setup")return"Finish setup.";if(e.nextAction.kind==="republish_setup")return"Setup update required.";if(e.nextAction.kind==="run_measurement")return"Ready to measure."}function Ae({overview:e,activePlan:n,report:l,reportState:u=l?"ready":"loading",sort:f}){if(n.plan.schemaVersion!==2||e.mode!=="active-v2")throw new Error("The current overview requires an active version-two setup.");if(e.scope.kind!=="all"&&e.scope.kind!=="group")throw new Error("The current overview requires an All Properties or group scope.");const c=n.plan,p=new Map(c.targets.map(r=>[r.stableKey,r])),a=new Map(c.querySnapshots.map(r=>[r.queryId,r.queryText])),x=new Map;for(const r of c.assignments){if(e.queryClass!=="all"&&r.queryClass!==e.queryClass)continue;const g=a.get(r.queryId);if(!g)continue;const m=x.get(r.targetKey)??new Set;m.add(g),x.set(r.targetKey,m)}const k=l?.revision===n.revision&&l.run?.id===e.measurement.displayedRunId?l:null,I=e.measurement.displayedRunId===void 0||k?"ready":u==="error"||l!=null?"error":"loading",M=be(c,k,e.queryClass==="all"?void 0:e.queryClass),y=new Map;for(const r of c.groups)for(const g of r.targetKeys)y.has(g)||y.set(g,r.label);const N=e.properties.items.map(r=>{const g=p.get(r.targetKey),m=M.get(r.targetKey)??[];return{id:r.targetKey,name:r.label,mentionCoverage:$(r.mentionCoverage),citationCoverage:$(r.citationCoverage),status:xe(r),providers:r.providers?.map(i=>({provider:i.provider,mentionCoverage:$(i.mentionCoverage),citationCoverage:$(i.citationCoverage)})),market:y.get(r.targetKey),assignedQueries:[...x.get(r.targetKey)??[]],urls:g?.urlMatchers.map(fe)??[],evidence:m,evidenceState:I,historical:m.some(i=>i.historical)}}),b=e.namedShareOfVoice?.entries.map(r=>({name:r.label,coverage:{numerator:r.credits,denominator:e.namedShareOfVoice.denominator}})),v=e.properties.items.flatMap(r=>r.flags>0?[{id:`property:${r.targetKey}`,property:r.label,summary:`${r.flags} ${r.flags===1?"result needs":"results need"} review.`,tone:"caution",count:r.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:ke(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:Ce(e.measurement.completedAt),includesBridgedHistory:e.measurement.includesHistoricalData===!0},currentView:{scope:e.scope.kind==="group"?{kind:"group",...e.scope.key?{key:e.scope.key}:{}}:{kind:"all"},queryClass:e.queryClass,aggregate:{metrics:{propertiesMentioned:$(e.metrics.propertiesMentioned),mentionCoverage:$(e.metrics.mentionCoverage),citationCoverage:$(e.metrics.citationCoverage)},properties:N,...b?{shareOfVoice:b}:{}},propertyTotal:e.properties.totalEstimate??N.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...f?{sort:f}:{}},availableGroups:c.groups.map(r=>({id:r.stableKey,label:r.label})),...ne(e)?{nextActionText:ne(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:v}}export{Me as A,q as M,Ke as V,Ie as a,Se as b,Ae as c,fe as m};
|
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-Cd_1GknE.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-ZXXkndVj.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-twS1M3FF.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-llkUFBGR.js">
|
|
@@ -4239,7 +4239,12 @@ var measurementMetricValueSchema = z6.discriminatedUnion("state", [
|
|
|
4239
4239
|
state: z6.literal("available"),
|
|
4240
4240
|
value: z6.number(),
|
|
4241
4241
|
numerator: z6.number().int().nonnegative().optional(),
|
|
4242
|
-
denominator: z6.number().int().positive().optional()
|
|
4242
|
+
denominator: z6.number().int().positive().optional(),
|
|
4243
|
+
/**
|
|
4244
|
+
* Mention coverage only: answers left out of numerator and denominator
|
|
4245
|
+
* because they could not be tied to one Property. Absent means none.
|
|
4246
|
+
*/
|
|
4247
|
+
unattributed: z6.number().int().positive().optional()
|
|
4243
4248
|
}).strict(),
|
|
4244
4249
|
z6.object({
|
|
4245
4250
|
state: z6.literal("unavailable"),
|
|
@@ -6259,13 +6264,25 @@ var visibilityReportRateSchema = z15.object({
|
|
|
6259
6264
|
numerator: z15.number().int().nonnegative().nullable(),
|
|
6260
6265
|
denominator: z15.number().int().nonnegative().nullable(),
|
|
6261
6266
|
rate: z15.number().min(0).max(1).nullable(),
|
|
6262
|
-
reason: z15.enum(["no-population", "incomplete", "evidence-incomplete", "identity-ambiguous", "not-applicable"]).optional()
|
|
6267
|
+
reason: z15.enum(["no-population", "incomplete", "evidence-incomplete", "identity-ambiguous", "not-applicable"]).optional(),
|
|
6268
|
+
/**
|
|
6269
|
+
* Answers left out of a mention rate because they could not be tied to one
|
|
6270
|
+
* Property (`mentionUnavailableReason: 'identity-ambiguous'`). They leave the
|
|
6271
|
+
* numerator AND the denominator, so they are never counted as not mentioned.
|
|
6272
|
+
* Present only on an available rate that left at least one answer out;
|
|
6273
|
+
* absent means none were. When every answer is unattributable the rate is
|
|
6274
|
+
* unavailable with reason `identity-ambiguous` instead.
|
|
6275
|
+
*/
|
|
6276
|
+
unattributed: z15.number().int().positive().optional()
|
|
6263
6277
|
}).strict().superRefine((value, ctx) => {
|
|
6264
6278
|
const unavailable = value.numerator === null || value.denominator === null || value.rate === null;
|
|
6265
6279
|
if (unavailable) {
|
|
6266
6280
|
if (value.numerator !== null || value.denominator !== null || value.rate !== null || value.reason === void 0) {
|
|
6267
6281
|
ctx.addIssue({ code: z15.ZodIssueCode.custom, message: "Unavailable rates require null values and a reason" });
|
|
6268
6282
|
}
|
|
6283
|
+
if (value.unattributed !== void 0) {
|
|
6284
|
+
ctx.addIssue({ code: z15.ZodIssueCode.custom, path: ["unattributed"], message: "Only an available rate can leave answers out" });
|
|
6285
|
+
}
|
|
6269
6286
|
return;
|
|
6270
6287
|
}
|
|
6271
6288
|
if (value.reason !== void 0) {
|
|
@@ -6918,7 +6935,8 @@ var measurementRateSchema = z17.union([
|
|
|
6918
6935
|
z17.object({
|
|
6919
6936
|
numerator: z17.number().int().nonnegative(),
|
|
6920
6937
|
denominator: z17.number().int().positive(),
|
|
6921
|
-
rate: z17.number().min(0).max(1)
|
|
6938
|
+
rate: z17.number().min(0).max(1),
|
|
6939
|
+
unattributed: z17.number().int().positive().optional()
|
|
6922
6940
|
}).strict(),
|
|
6923
6941
|
z17.object({
|
|
6924
6942
|
numerator: z17.null(),
|
|
@@ -15009,6 +15027,12 @@ function reportVisibilityEvidence(value) {
|
|
|
15009
15027
|
return REPORT_VISIBILITY_COPY.incomplete;
|
|
15010
15028
|
}
|
|
15011
15029
|
}
|
|
15030
|
+
var UNATTRIBUTED_MENTION_REASON = "No answer could be tied to one property";
|
|
15031
|
+
function reportUnattributedAnswers(value) {
|
|
15032
|
+
if (value.denominator === null || value.denominator === void 0) return null;
|
|
15033
|
+
if (value.unattributed === void 0 || value.unattributed <= 0) return null;
|
|
15034
|
+
return `${value.unattributed} of ${value.denominator + value.unattributed} answers could not be tied to one property`;
|
|
15035
|
+
}
|
|
15012
15036
|
function reportVisibilityComparison(state, outsideWindow = false) {
|
|
15013
15037
|
const label = state === "first" ? REPORT_VISIBILITY_COPY.baseline : state === "comparable" ? REPORT_VISIBILITY_COPY.comparable : state === "legacy-unknown" ? REPORT_VISIBILITY_COPY.unknownHistory : REPORT_VISIBILITY_COPY.changed;
|
|
15014
15038
|
return outsideWindow ? `${label} \xB7 ${REPORT_VISIBILITY_COPY.previousOutsideWindow}` : label;
|
|
@@ -19950,6 +19974,8 @@ export {
|
|
|
19950
19974
|
reportQueryClassLabel,
|
|
19951
19975
|
reportVisibilityRate,
|
|
19952
19976
|
reportVisibilityEvidence,
|
|
19977
|
+
UNATTRIBUTED_MENTION_REASON,
|
|
19978
|
+
reportUnattributedAnswers,
|
|
19953
19979
|
reportVisibilityComparison,
|
|
19954
19980
|
reportVisibilityMeasurementLabel,
|
|
19955
19981
|
reportVisibilityHistoryLabel,
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Y5IDGH5B.js";
|
|
9
9
|
import {
|
|
10
10
|
SITE_CRAWL_GRAPH_MAX_EDGES,
|
|
11
11
|
SITE_CRAWL_GRAPH_MAX_NODES,
|
|
12
12
|
TEMPLATE_LINK_RATIO_THRESHOLD
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-77VHT3JD.js";
|
|
14
14
|
|
|
15
15
|
// src/site-crawl-graph-layout.ts
|
|
16
16
|
import crypto from "crypto";
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
resolveOperatorApiKeyIds,
|
|
18
18
|
runWithUsageTags,
|
|
19
19
|
saveConfigPatch
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TMTO2JHU.js";
|
|
21
21
|
import {
|
|
22
22
|
deleteSiteCrawlGraphLayout,
|
|
23
23
|
persistSiteCrawlGraphLayout,
|
|
24
24
|
prepareSiteCrawlGraphLayout
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-HAABFHXB.js";
|
|
26
26
|
import {
|
|
27
27
|
PACKAGE_VERSION
|
|
28
28
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -184,7 +184,7 @@ import {
|
|
|
184
184
|
siteLivenessState,
|
|
185
185
|
toAlertView,
|
|
186
186
|
usageCounters
|
|
187
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-Y5IDGH5B.js";
|
|
188
188
|
import {
|
|
189
189
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
190
190
|
AGENT_NONE,
|
|
@@ -347,7 +347,7 @@ import {
|
|
|
347
347
|
visibilityReportRequestSchema,
|
|
348
348
|
winnabilityClassLabel,
|
|
349
349
|
withRetry
|
|
350
|
-
} from "./chunk-
|
|
350
|
+
} from "./chunk-77VHT3JD.js";
|
|
351
351
|
|
|
352
352
|
// src/runtime-context.ts
|
|
353
353
|
function cliRuntimeContext(env = process.env, stdio = process) {
|
|
@@ -6498,7 +6498,7 @@ function nonBlank(value) {
|
|
|
6498
6498
|
return trimmed ? trimmed : void 0;
|
|
6499
6499
|
}
|
|
6500
6500
|
function resolveBuildCommit(env = process.env) {
|
|
6501
|
-
const embedded = true ? "
|
|
6501
|
+
const embedded = true ? "508d40ec00ff12e4604267c10940212dd3b750b9" : void 0;
|
|
6502
6502
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
6503
6503
|
}
|
|
6504
6504
|
function resolveInstanceIdentity(env = process.env) {
|
|
@@ -12074,7 +12074,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
12074
12074
|
return result2;
|
|
12075
12075
|
}
|
|
12076
12076
|
async function backfillInsightsCommand(project, opts) {
|
|
12077
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
12077
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-EORTVFDF.js");
|
|
12078
12078
|
const config = loadConfig();
|
|
12079
12079
|
const db = createClient(config.database);
|
|
12080
12080
|
migrate(db);
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
upgradeCaveatFor,
|
|
134
134
|
upgradeCommandFor,
|
|
135
135
|
visibilityReportRequestSchema
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-77VHT3JD.js";
|
|
137
137
|
|
|
138
138
|
// src/cli-error.ts
|
|
139
139
|
function isMachineFormat(format) {
|
|
@@ -11527,7 +11527,7 @@ var canonryMcpTools = [
|
|
|
11527
11527
|
defineTool({
|
|
11528
11528
|
name: "canonry_measurement_portfolio_summary",
|
|
11529
11529
|
title: "Summarize measured Properties",
|
|
11530
|
-
description: "Start here for best/worst Property mention performance. Defaults to non-brand questions; state the returned queryClass and keep branded comparisons separate unless all was requested. mentionRanking.strongest and .weakest rank every Property with an available mention rate before applying limit, independently of citation availability or an unavailable portfolio aggregate. mentionRanking.excluded names every excluded Property and its reason; flag those separately, never call all mention rankings unavailable because one identity is ambiguous. Report numerator/denominator with each rate. Rates may tie (stable label/key order); this is descriptive coverage, not a confidence-adjusted or unique-winner claim. weakestProperties retains combined mention/citation weaknesses with stored replacement names; markets compares every named market worst-first. Each market is scoped to the displayed run; markets may share Properties, so they never sum to portfolio totals. Reads stored data only; it never starts provider work.",
|
|
11530
|
+
description: "Start here for best/worst Property mention performance. Defaults to non-brand questions; state the returned queryClass and keep branded comparisons separate unless all was requested. mentionRanking.strongest and .weakest rank every Property with an available mention rate before applying limit, independently of citation availability or an unavailable portfolio aggregate. mentionRanking.excluded names every excluded Property and its reason; flag those separately, never call all mention rankings unavailable because one identity is ambiguous. Report numerator/denominator with each rate, and any unattributed count beside it: answers left out of both because their Property identity was unresolved, never not-mentioned answers. Rates may tie (stable label/key order); this is descriptive coverage, not a confidence-adjusted or unique-winner claim. weakestProperties retains combined mention/citation weaknesses with stored replacement names; markets compares every named market worst-first. Each market is scoped to the displayed run; markets may share Properties, so they never sum to portfolio totals. Reads stored data only; it never starts provider work.",
|
|
11531
11531
|
access: "read",
|
|
11532
11532
|
tier: "monitoring",
|
|
11533
11533
|
inputSchema: measurementPortfolioSummaryInputSchema,
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
installSkills,
|
|
5
5
|
loadConfigRaw,
|
|
6
6
|
saveConfigPatch
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TMTO2JHU.js";
|
|
8
8
|
import {
|
|
9
9
|
PACKAGE_VERSION
|
|
10
10
|
} from "./chunk-AOJU5LKX.js";
|
|
11
11
|
import {
|
|
12
12
|
SKILL_MANIFEST_FILENAME,
|
|
13
13
|
SkillsClients
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-77VHT3JD.js";
|
|
15
15
|
|
|
16
16
|
// src/skills-autosync.ts
|
|
17
17
|
import fs from "fs";
|
|
@@ -648,6 +648,7 @@ import {
|
|
|
648
648
|
reportSourceOriginHeadline,
|
|
649
649
|
reportTrendProviderRates,
|
|
650
650
|
reportTruncatedList,
|
|
651
|
+
reportUnattributedAnswers,
|
|
651
652
|
reportVisibilityComparison,
|
|
652
653
|
reportVisibilityEvidence,
|
|
653
654
|
reportVisibilityHistoryLabel,
|
|
@@ -784,7 +785,7 @@ import {
|
|
|
784
785
|
wordpressSchemaDeployResultDtoSchema,
|
|
785
786
|
wordpressSchemaStatusResultDtoSchema,
|
|
786
787
|
wordpressStatusDtoSchema
|
|
787
|
-
} from "./chunk-
|
|
788
|
+
} from "./chunk-77VHT3JD.js";
|
|
788
789
|
|
|
789
790
|
// src/intelligence-service.ts
|
|
790
791
|
import { eq as eq71, desc as desc32, asc as asc12, and as and60, ne as ne11, or as or18, inArray as inArray27, gte as gte18, lte as lte15, isNull as isNull13, sql as sql28, exists } from "drizzle-orm";
|
|
@@ -14562,10 +14563,13 @@ function mentionRate(target, slots, prepared) {
|
|
|
14562
14563
|
if (!status.complete || !status.answerComplete) {
|
|
14563
14564
|
return { numerator: null, denominator: null, rate: null, reason: "incomplete" };
|
|
14564
14565
|
}
|
|
14565
|
-
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14566
|
+
const unattributed = slots.filter((slot) => prepared.observationsBySlot.get(slot.id)?.unknownMentionTargetIds.has(target.id)).length;
|
|
14567
|
+
return attributableMentionRate(numerator, slots.length, unattributed);
|
|
14568
|
+
}
|
|
14569
|
+
function attributableMentionRate(numerator, answered2, unattributed) {
|
|
14570
|
+
const denominator = answered2 - unattributed;
|
|
14571
|
+
if (denominator <= 0) return unavailable("identity-ambiguous");
|
|
14572
|
+
return unattributed > 0 ? { numerator, denominator, rate: numerator / denominator, unattributed } : { numerator, denominator, rate: numerator / denominator };
|
|
14569
14573
|
}
|
|
14570
14574
|
function providersFor(slots) {
|
|
14571
14575
|
return sortedUnique(slots.map((slot) => slot.provider));
|
|
@@ -14756,14 +14760,15 @@ function scopeMentionRate(input, targetIds, slots, answered2, prepared, edges) {
|
|
|
14756
14760
|
const idsByExecution = /* @__PURE__ */ new Map();
|
|
14757
14761
|
for (const edge of edges) if (mentionableIds.has(edge.targetId)) addToSet(idsByExecution, edge.executionId, edge.targetId);
|
|
14758
14762
|
let numerator = 0;
|
|
14763
|
+
let unattributed = 0;
|
|
14759
14764
|
for (const slot of answered2) {
|
|
14760
14765
|
const observation = prepared.observationsBySlot.get(slot.id);
|
|
14761
14766
|
const ids = [...idsByExecution.get(slot.executionId) ?? []];
|
|
14762
14767
|
if (ids.length === 0) return unavailable("aliasless");
|
|
14763
14768
|
if (ids.some((id) => observation.mentionedTargetIds.has(id))) numerator++;
|
|
14764
|
-
else if (ids.some((id) => observation.unknownMentionTargetIds.has(id)))
|
|
14769
|
+
else if (ids.some((id) => observation.unknownMentionTargetIds.has(id))) unattributed++;
|
|
14765
14770
|
}
|
|
14766
|
-
return
|
|
14771
|
+
return attributableMentionRate(numerator, answered2.length, unattributed);
|
|
14767
14772
|
}
|
|
14768
14773
|
function indexedScopeCitationRate(slots, edges, indexes) {
|
|
14769
14774
|
if (slots.length === 0) return unavailable("no-population");
|
|
@@ -14783,9 +14788,9 @@ function targetMentionRate(targets, slots, answered2, indexes) {
|
|
|
14783
14788
|
if (answered2.length !== slots.length) return unavailable("evidence-incomplete");
|
|
14784
14789
|
const mentioned = indexes.mentionedSlotIdsByTargetId.get(mentionable[0].id) ?? /* @__PURE__ */ new Set();
|
|
14785
14790
|
const unknown = indexes.unknownMentionSlotIdsByTargetId.get(mentionable[0].id);
|
|
14786
|
-
|
|
14791
|
+
const unattributed = unknown ? answered2.filter((slot) => unknown.has(slot.id)).length : 0;
|
|
14787
14792
|
const numerator = answered2.filter((slot) => mentioned.has(slot.id)).length;
|
|
14788
|
-
return
|
|
14793
|
+
return attributableMentionRate(numerator, answered2.length, unattributed);
|
|
14789
14794
|
}
|
|
14790
14795
|
function presenceIn(slots, aliases, prepared) {
|
|
14791
14796
|
return slots.filter((slot) => {
|
|
@@ -15470,7 +15475,14 @@ function unavailable2(reason) {
|
|
|
15470
15475
|
}
|
|
15471
15476
|
function coverageMetric(rate2) {
|
|
15472
15477
|
if (rate2.rate === null) return unavailable2(metricReason(rate2.reason));
|
|
15473
|
-
return {
|
|
15478
|
+
return {
|
|
15479
|
+
state: "available",
|
|
15480
|
+
value: rate2.rate,
|
|
15481
|
+
numerator: rate2.numerator,
|
|
15482
|
+
denominator: rate2.denominator,
|
|
15483
|
+
// Answers the mention rate left out because their identity was unresolved.
|
|
15484
|
+
...rate2.unattributed === void 0 ? {} : { unattributed: rate2.unattributed }
|
|
15485
|
+
};
|
|
15474
15486
|
}
|
|
15475
15487
|
function providerRows(property) {
|
|
15476
15488
|
return property.providers.map((row) => ({
|
|
@@ -15632,6 +15644,10 @@ function measurementOutcomeCounts(rows) {
|
|
|
15632
15644
|
continue;
|
|
15633
15645
|
}
|
|
15634
15646
|
const mentioned = (mention.numerator ?? mention.value) > 0;
|
|
15647
|
+
if (!mentioned && mention.unattributed !== void 0) {
|
|
15648
|
+
counts2.notMeasured += 1;
|
|
15649
|
+
continue;
|
|
15650
|
+
}
|
|
15635
15651
|
const cited = (citation.numerator ?? citation.value) > 0;
|
|
15636
15652
|
if (mentioned && cited) counts2.bothSignals += 1;
|
|
15637
15653
|
else if (mentioned) counts2.mentionedOnly += 1;
|
|
@@ -22757,7 +22773,14 @@ function unavailable3(reason) {
|
|
|
22757
22773
|
}
|
|
22758
22774
|
function coverageMetric2(rate2) {
|
|
22759
22775
|
if (rate2.rate === null) return unavailable3(metricReason2(rate2.reason));
|
|
22760
|
-
return {
|
|
22776
|
+
return {
|
|
22777
|
+
state: "available",
|
|
22778
|
+
value: rate2.rate,
|
|
22779
|
+
numerator: rate2.numerator,
|
|
22780
|
+
denominator: rate2.denominator,
|
|
22781
|
+
// Answers the mention rate left out because their identity was unresolved.
|
|
22782
|
+
...rate2.unattributed === void 0 ? {} : { unattributed: rate2.unattributed }
|
|
22783
|
+
};
|
|
22761
22784
|
}
|
|
22762
22785
|
function countMetric2(rate2) {
|
|
22763
22786
|
if (rate2.numerator === null) return unavailable3(metricReason2(rate2.reason));
|
|
@@ -23632,11 +23655,19 @@ function citationForCoverage(candidate, targets, targetKey) {
|
|
|
23632
23655
|
}
|
|
23633
23656
|
function mentionRate2(candidates, targets, targetKey) {
|
|
23634
23657
|
const values = candidates.map((candidate) => targetValues(candidate, targets, targetKey));
|
|
23635
|
-
return
|
|
23636
|
-
|
|
23637
|
-
|
|
23638
|
-
|
|
23639
|
-
|
|
23658
|
+
if (values.length === 0) return unavailable4("no-population");
|
|
23659
|
+
let numerator = 0;
|
|
23660
|
+
let unattributed = 0;
|
|
23661
|
+
for (const value of values) {
|
|
23662
|
+
if (value.mention === true) numerator++;
|
|
23663
|
+
else if (value.mention === null) {
|
|
23664
|
+
if (value.mentionUnavailableReason !== "identity-ambiguous") return unavailable4("evidence-incomplete");
|
|
23665
|
+
unattributed++;
|
|
23666
|
+
}
|
|
23667
|
+
}
|
|
23668
|
+
const denominator = values.length - unattributed;
|
|
23669
|
+
if (denominator === 0) return unavailable4("identity-ambiguous");
|
|
23670
|
+
return unattributed > 0 ? { numerator, denominator, rate: numerator / denominator, unattributed } : { numerator, denominator, rate: numerator / denominator };
|
|
23640
23671
|
}
|
|
23641
23672
|
function answered(candidate) {
|
|
23642
23673
|
return candidate.observation !== null;
|
|
@@ -31467,7 +31498,10 @@ function renderReportHtml(report, opts = {}) {
|
|
|
31467
31498
|
function renderReportVisibility(visibility) {
|
|
31468
31499
|
const populations = visibility.populations.filter((population) => population.queryClass !== "unknown" || population.summary.answerCount > 0);
|
|
31469
31500
|
const historyPopulations = visibility.populations.filter((population) => population.queryClass !== "unknown" || population.trend.some((point) => point.answerCount > 0));
|
|
31470
|
-
const rateCell = (rate2) =>
|
|
31501
|
+
const rateCell = (rate2) => {
|
|
31502
|
+
const unattributed = reportUnattributedAnswers(rate2);
|
|
31503
|
+
return `<td><strong>${escapeHtml2(reportVisibilityRate(rate2))}</strong><p class="muted">${escapeHtml2(reportVisibilityEvidence(rate2))}</p>${unattributed ? `<p class="muted">${escapeHtml2(unattributed)}</p>` : ""}</td>`;
|
|
31504
|
+
};
|
|
31471
31505
|
const headers = (labels) => `<thead><tr>${labels.map((label) => `<th>${escapeHtml2(label)}</th>`).join("")}</tr></thead>`;
|
|
31472
31506
|
const summary3 = `<table class="report-table">${headers([REPORT_VISIBILITY_COPY.queryType, REPORT_VISIBILITY_COPY.queries, REPORT_VISIBILITY_COPY.answers, REPORT_VISIBILITY_COPY.mentioned, REPORT_VISIBILITY_COPY.cited])}<tbody>${populations.map((population) => `<tr><td>${escapeHtml2(reportQueryClassLabel(population.queryClass))}</td><td>${population.summary.queryCount}</td><td>${population.summary.answerCount}</td>${rateCell(population.summary.mentionCoverage)}${rateCell(population.summary.citationCoverage)}</tr>`).join("")}</tbody></table>`;
|
|
31473
31507
|
const trend = `<details><summary>${escapeHtml2(reportVisibilityHistoryLabel(visibility))}</summary><div class="table-scroll"><table class="report-table">${headers([REPORT_VISIBILITY_COPY.date, REPORT_VISIBILITY_COPY.queryType, REPORT_VISIBILITY_COPY.mentioned, REPORT_VISIBILITY_COPY.cited, REPORT_VISIBILITY_COPY.comparison])}<tbody>${historyPopulations.flatMap((population) => population.trend.map((point) => `<tr><td><time datetime="${escapeHtml2(point.createdAt)}">${escapeHtml2(point.createdAt.slice(0, 10))}</time></td><td>${escapeHtml2(reportQueryClassLabel(population.queryClass))}</td>${rateCell(point.mentionCoverage)}${rateCell(point.citationCoverage)}<td>${escapeHtml2(reportVisibilityComparison(point.continuity.state, point.continuity.comparedRunId !== null && !population.trend.some((previous) => previous.runId === point.continuity.comparedRunId)))}</td></tr>`)).join("")}</tbody></table></div></details>`;
|
package/dist/cli.js
CHANGED
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
trackCliCommandFinished,
|
|
36
36
|
trackEvent,
|
|
37
37
|
waitForServerRuntimeStartup
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-HIFBIDOW.js";
|
|
39
39
|
import {
|
|
40
40
|
autoSyncSkills,
|
|
41
41
|
formatAutoSyncNotice
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-X3GFCKUJ.js";
|
|
43
43
|
import {
|
|
44
44
|
CliError,
|
|
45
45
|
EXIT_SYSTEM_ERROR,
|
|
@@ -66,13 +66,13 @@ import {
|
|
|
66
66
|
shouldPrintServeSkillsNudge,
|
|
67
67
|
systemError,
|
|
68
68
|
usageError
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-TMTO2JHU.js";
|
|
70
70
|
import {
|
|
71
71
|
DEFAULT_DEMO_TRUSTED_PROXIES,
|
|
72
72
|
trustedProxiesProblem,
|
|
73
73
|
trustedProxyProblem
|
|
74
74
|
} from "./chunk-RB2F4D3Z.js";
|
|
75
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-HAABFHXB.js";
|
|
76
76
|
import "./chunk-AOJU5LKX.js";
|
|
77
77
|
import {
|
|
78
78
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
queries,
|
|
89
89
|
renderReportHtml,
|
|
90
90
|
runs
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-Y5IDGH5B.js";
|
|
92
92
|
import {
|
|
93
93
|
AdsDeliverySnapshotStatuses,
|
|
94
94
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -110,6 +110,7 @@ import {
|
|
|
110
110
|
RunTriggers,
|
|
111
111
|
TrafficEventKinds,
|
|
112
112
|
TrafficSeriesGranularities,
|
|
113
|
+
UNATTRIBUTED_MENTION_REASON,
|
|
113
114
|
USER_PASSWORD_MIN_LENGTH,
|
|
114
115
|
UserRoles,
|
|
115
116
|
adsActivateTreeRequestSchema,
|
|
@@ -165,6 +166,7 @@ import {
|
|
|
165
166
|
notificationEventSchema,
|
|
166
167
|
queryTrackingCommitRequestSchema,
|
|
167
168
|
queryTrackingPreviewRequestSchema,
|
|
169
|
+
reportUnattributedAnswers,
|
|
168
170
|
researchBatchCreateSchema,
|
|
169
171
|
resolveProviderInput,
|
|
170
172
|
resultsClearRequestSchema,
|
|
@@ -173,7 +175,7 @@ import {
|
|
|
173
175
|
snapshotProviderModeSchema,
|
|
174
176
|
visibilityReportRequestSchema,
|
|
175
177
|
winnabilityClassSchema
|
|
176
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-77VHT3JD.js";
|
|
177
179
|
|
|
178
180
|
// src/cli.ts
|
|
179
181
|
import { pathToFileURL } from "url";
|
|
@@ -438,7 +440,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
438
440
|
async function demoCommand(options) {
|
|
439
441
|
const { host, port } = parseDemoListenOptions(options);
|
|
440
442
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
441
|
-
const { createDemoServer } = await import("./demo-server-
|
|
443
|
+
const { createDemoServer } = await import("./demo-server-JBGYZKAI.js");
|
|
442
444
|
const app = await createDemoServer({ trustProxy });
|
|
443
445
|
let stopping = false;
|
|
444
446
|
const stop = () => {
|
|
@@ -10372,8 +10374,12 @@ var METRIC_REASONS = {
|
|
|
10372
10374
|
no_completed_run: "not measured (no completed run)",
|
|
10373
10375
|
no_population: "not measured (no questions of this type)",
|
|
10374
10376
|
evidence_incomplete: "not measured (evidence incomplete)",
|
|
10377
|
+
identity_ambiguous: `not measured (${UNATTRIBUTED_MENTION_REASON.toLowerCase()})`,
|
|
10375
10378
|
not_applicable: "not measured (not applicable)"
|
|
10376
10379
|
};
|
|
10380
|
+
function unattributedText(metric) {
|
|
10381
|
+
return metric.state === "available" ? reportUnattributedAnswers(metric) : null;
|
|
10382
|
+
}
|
|
10377
10383
|
function metricText(metric) {
|
|
10378
10384
|
if (metric.state === "unavailable") return METRIC_REASONS[metric.reason] ?? `not measured (${metric.reason})`;
|
|
10379
10385
|
const percent = `${Math.round(metric.value * 100)}%`;
|
|
@@ -10400,7 +10406,9 @@ function printMeasurementProperty(response) {
|
|
|
10400
10406
|
lines.push(`${response.scope.label} \u2014 ${response.queryClass} questions`);
|
|
10401
10407
|
lines.push(`Measurement: ${response.measurement.state}${response.measurement.displayedRunId ? ` \xB7 run ${response.measurement.displayedRunId}` : ""}`);
|
|
10402
10408
|
lines.push("");
|
|
10403
|
-
|
|
10409
|
+
const mention = row ? row.mentionCoverage : response.metrics.mentionCoverage;
|
|
10410
|
+
const unattributed = unattributedText(mention);
|
|
10411
|
+
lines.push(`Mentioned ${metricText(mention)}${unattributed ? ` \xB7 ${unattributed}` : ""}`);
|
|
10404
10412
|
lines.push(`Cited ${metricText(row ? row.citationCoverage : response.metrics.citationCoverage)}`);
|
|
10405
10413
|
if (row && row.flags > 0) lines.push(`Flagged ${row.flags} ${row.flags === 1 ? "result needs" : "results need"} review`);
|
|
10406
10414
|
if (row && row.providers.length > 0) {
|
|
@@ -10408,6 +10416,8 @@ function printMeasurementProperty(response) {
|
|
|
10408
10416
|
lines.push(`${"Engine".padEnd(14)}${"Mentioned".padEnd(34)}Cited`);
|
|
10409
10417
|
for (const provider of row.providers) {
|
|
10410
10418
|
lines.push(`${provider.provider.padEnd(14)}${metricText(provider.mentionCoverage).padEnd(34)}${metricText(provider.citationCoverage)}`);
|
|
10419
|
+
const providerUnattributed = unattributedText(provider.mentionCoverage);
|
|
10420
|
+
if (providerUnattributed) lines.push(`${"".padEnd(14)}${providerUnattributed}`);
|
|
10411
10421
|
}
|
|
10412
10422
|
}
|
|
10413
10423
|
console.log(lines.join("\n"));
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
layoutSiteCrawlGraphInput,
|
|
6
6
|
persistSiteCrawlGraphLayout
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HAABFHXB.js";
|
|
8
8
|
import {
|
|
9
9
|
PACKAGE_VERSION
|
|
10
10
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
siteCrawlPages,
|
|
84
84
|
siteCrawlSnapshots,
|
|
85
85
|
trafficSources
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-Y5IDGH5B.js";
|
|
87
87
|
import {
|
|
88
88
|
RunKinds,
|
|
89
89
|
SiteCrawlFetchStates,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
measurementPlanV2Schema,
|
|
105
105
|
placementLinkDecision,
|
|
106
106
|
siteAuditPageFactorSchema
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-77VHT3JD.js";
|
|
108
108
|
|
|
109
109
|
// src/demo-server.ts
|
|
110
110
|
import { dirname, join as join2 } from "path";
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
createGoogleMarketingCredentialStore,
|
|
4
4
|
createGoogleMarketingRuntime,
|
|
5
5
|
createServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HIFBIDOW.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-TMTO2JHU.js";
|
|
10
|
+
import "./chunk-HAABFHXB.js";
|
|
11
11
|
import "./chunk-AOJU5LKX.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-Y5IDGH5B.js";
|
|
13
|
+
import "./chunk-77VHT3JD.js";
|
|
14
14
|
export {
|
|
15
15
|
GoogleMarketingRuntimeError,
|
|
16
16
|
createGoogleMarketingCredentialStore,
|
package/dist/mcp.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoSyncSkills
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X3GFCKUJ.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient,
|
|
6
6
|
createCanonryMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TMTO2JHU.js";
|
|
8
8
|
import "./chunk-AOJU5LKX.js";
|
|
9
9
|
import {
|
|
10
10
|
isReadOnlyKey,
|
|
11
11
|
updateCheckEnvOptOut
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-77VHT3JD.js";
|
|
13
13
|
|
|
14
14
|
// src/mcp/cli.ts
|
|
15
15
|
import { randomUUID } from "crypto";
|