@canonry/canonry 7.43.2 → 7.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agent-workspace/skills/aero/references/agent-operations.md +9 -0
- package/assets/agent-workspace/skills/aero/references/site-health.md +12 -0
- package/assets/agent-workspace/skills/canonry/SKILL.md +9 -0
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +3 -0
- package/assets/assets/{AuditHistoryPanel-C5oZsvsR.js → AuditHistoryPanel-CvANw3ds.js} +1 -1
- package/assets/assets/{BacklinksPage-CF5sGSTQ.js → BacklinksPage-C6x9ELjk.js} +1 -1
- package/assets/assets/{HistoryPage-DumL6cl5.js → HistoryPage-r36HX1cC.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-DCegOp_w.js → MeasurementPropertyPage-ComoCzR4.js} +1 -1
- package/assets/assets/{ProjectPage-CWDk48Y6.js → ProjectPage-CIeU-buk.js} +1 -1
- package/assets/assets/{RunsPage-Bb1VMWYu.js → RunsPage-DI6eJATZ.js} +1 -1
- package/assets/assets/{SettingsPage-CHGh169l.js → SettingsPage-Bw7GdXxs.js} +1 -1
- package/assets/assets/{SiteHealthSection-bGzH9m9-.js → SiteHealthSection-C-JaNKpS.js} +3 -3
- package/assets/assets/{TrafficPage-cfnEZ2Mu.js → TrafficPage-Cnsp276v.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-BQS0MAXE.js → TrafficSourceDetailPage-CBIaJk7e.js} +1 -1
- package/assets/assets/{extract-error-message-IWhACkO_.js → extract-error-message-C_Owa0n9.js} +1 -1
- package/assets/assets/{index-BDY3-V1S.js → index-ZS9sSTMS.js} +20 -20
- package/assets/assets/{react-sigma_core.esm.min-BQt189AI.js → react-sigma_core.esm.min-ugyh-ooq.js} +1 -1
- package/assets/assets/{v2-overview-adapter-ZC3VuoTT.js → v2-overview-adapter-BLSrVQ7K.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-WU2BRWXY.js → chunk-3JVF3ULD.js} +5 -1
- package/dist/{chunk-WRUKKEGR.js → chunk-45Z5RJZW.js} +3 -3
- package/dist/{chunk-KOIOZ7QW.js → chunk-5LY7EG4U.js} +47 -3
- package/dist/{chunk-C2I7M3B2.js → chunk-EJRV7RBZ.js} +127 -9
- package/dist/{chunk-65BHDVYO.js → chunk-G47XJVAS.js} +830 -465
- package/dist/{chunk-E43JM3QV.js → chunk-GZ2KIONF.js} +92 -1
- package/dist/{chunk-BWR5MNL5.js → chunk-JVBI6VBT.js} +2 -2
- package/dist/{chunk-LYKDNJXR.js → chunk-MPWBFKGK.js} +44 -1
- package/dist/{chunk-WXX3NL4C.js → chunk-QQYQDTFZ.js} +40 -12
- package/dist/{chunk-BPFRGC7K.js → chunk-SW54HXSZ.js} +3 -3
- package/dist/{cli-catalog-J3O6W726.js → cli-catalog-PNJEQV5H.js} +3 -3
- package/dist/cli-commands-4UT2CRXX.js +15 -0
- package/dist/cli.js +10 -10
- package/dist/{demo-server-KA7DWTY6.js → demo-server-WRHR25HF.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{intelligence-service-LHZZTJPH.js → intelligence-service-QXXRUB2G.js} +2 -2
- package/dist/mcp.js +4 -4
- package/package.json +9 -9
- package/dist/cli-commands-QST2CPDG.js +0 -15
package/assets/assets/{react-sigma_core.esm.min-BQt189AI.js → react-sigma_core.esm.min-ugyh-ooq.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-C-JaNKpS.js";import"./index-ZS9sSTMS.js";import"./vendor-radix-twS1M3FF.js";import"./vendor-recharts-D-cUuLZo.js";import"./vendor-lucide-Y6jANGfG.js";import"./vendor-markdown-B4giJcws.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-CZ4wVBJL.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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as C,j as i}from"./vendor-tanstack-ZXXkndVj.js";import{$ as de,eb as pe,B as me,aM as W,ec as m,ed as fe,ee as ge,ef as he,eg as ye,eh as be,ei as xe,ej as ke,ek as Ae,el as Pe,em as je,en as Ne,eo as Ce,ep as Me,eq as ve,er as Ie,es as Be,et as $e,eu as Se,ev as De,ew as we,ex as Ke,ey as Ee,y as f,b7 as Ve}from"./index-BDY3-V1S.js";import{M as Re}from"./vendor-markdown-B4giJcws.js";import{C as Te,$ as qe,g as ne}from"./vendor-lucide-Y6jANGfG.js";const tt="Sources",_={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function _e({previewLength:e,highlight:t}){return r=>{if(e!==void 0&&Number.isFinite(e)){let l=Math.max(0,Math.floor(e));const d={field:"value",omitted:!1},p=s=>{if(s.type==="definition")return!0;if(s.children)return s.children=s.children.filter(p),s.children.length>0;const a=s.type==="image"||s.type==="imageReference"?"alt":"value",h=s[a];if(h===void 0)return l>0;const k=Array.from(h);if(k.length===0)return l>0;if(l===0)return d.omitted=!0,!1;const M=k.length>l,j=k.slice(0,l);if(M&&!/\s/.test(k[l])){let y=j.length-1;for(;y>=0&&!/\s/.test(j[y]);)y--;y>=0&&y>l-40&&(j.length=y)}return d.omitted||=M,s[a]=j.join(""),l=M?0:l-j.length,j.length===0?!1:(d.lastNode=s,d.field=a,!0)};p(r),d.omitted&&(d.lastNode?d.lastNode[d.field]=`${d.lastNode[d.field].trimEnd()}…`:r.children?.push({type:"paragraph",children:[{type:"text",value:"…"}]}))}if(t){const l=d=>{["link","linkReference","code","inlineCode"].includes(d.type)||(d.type==="text"&&(d.data={...d.data,hName:"span"}),d.children?.forEach(l))};l(r)}}}function Ge({headingLevel:e}){return t=>{const r=[],l=p=>{p.type==="heading"&&p.depth&&r.push(p),p.children?.forEach(l)};l(t);const d=r.reduce((p,s)=>Math.min(p,s.depth),6);for(const p of r){const s=p.depth-d;p.depth=Math.min(6,e+s),p.data={...p.data,hProperties:{...p.data?.hProperties,"data-answer-heading-level":s+1}}}}}function Oe({answer:e}){const[t,r]=C.useState("idle"),l=C.useRef(!1),d=async()=>{if(!l.current){l.current=!0,r("copying");try{await navigator.clipboard.writeText(e),r("copied")}catch{r("failed")}finally{l.current=!1}}};return i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[i.jsx(me,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":t==="copying","aria-busy":t==="copying",onClick:()=>{d()},children:t==="copying"?_.copying:_.copy}),i.jsx("span",{role:"status",className:"text-sm text-secondary",children:t==="copied"?_.copied:t==="failed"?_.failed:""})]})}const nt=C.memo(function({children:t,headingLevel:r=4,copyable:l=!1,highlightGroups:d,previewLength:p}){return i.jsxs("div",{className:"answer-markdown",children:[i.jsx(Re,{remarkPlugins:[[Ge,{headingLevel:r}],[_e,{previewLength:p,highlight:!!d?.length}]],components:{p:({children:s})=>i.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:s}),ul:({children:s})=>i.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:s}),ol:({children:s,start:a})=>i.jsx("ol",{start:a,className:"mb-3 ml-5 list-decimal space-y-1",children:s}),pre:({children:s})=>i.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:s}),span:({children:s})=>i.jsx("span",{children:typeof s=="string"&&d?s.split(/(https?:\/\/[^\s<>]+)/i).map((a,h)=>h%2?a:i.jsx(C.Fragment,{children:pe(a,d)},h)):s}),a:({children:s,href:a})=>{const h=de(a);return h?i.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:s}):i.jsx("span",{children:s})},img:({alt:s})=>i.jsx("span",{children:s})},children:t}),l&&t.trim()?i.jsx(Oe,{answer:t},t):null]})}),re="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",H="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",K=e=>e.kind==="project"?"Whole site":e.label,E={allMarkets:"All markets",browse:e=>`Browse ${e}`,select:e=>`Select ${e}`,browseAll:"Browse all properties"},Le=e=>e?.kind==="group"&&e.marketKeys?.length===1?e.marketKeys[0]:void 0,se=e=>`${e} ${e===1?"property":"properties"}`;function rt({options:e,selected:t,onSelect:r,marketKey:l,label:d="Measurement scope",labelVisibility:p="visible",allowGroupSelect:s=!0}){const a=[...e].sort((n,u)=>n.label.localeCompare(u.label,void 0,{numeric:!0})||n.id.localeCompare(u.id)),[h,k]=C.useState(""),[M,j]=C.useState([]),[y,I]=C.useState(!1),N=C.useRef(null),B=C.useRef(null),o=C.useId(),x=a.filter(n=>n.kind==="group"),b=new Map(x.map(n=>[n.id,n])),c=b.get(M.at(-1)??""),Y=b.get(M.at(-2)??""),P=h.trim().toLocaleLowerCase(),le=x.filter(n=>!n.parentGroupIds?.some(u=>b.has(u))),G=a.filter(n=>n.kind==="property"),O=n=>(n.parentGroupIds??[]).map(u=>b.get(u)?.label).filter(Boolean).join(" · "),V=n=>`${K(n)} ${O(n)}`.toLocaleLowerCase().includes(P),z=n=>{const u=[...n.parentGroupIds??[]],g=new Set;for(;u.length;){const v=u.pop();if(v===c?.id)return!0;g.has(v)||(g.add(v),u.push(...b.get(v)?.parentGroupIds??[]))}return!1},S=(y?[]:c?x.filter(n=>P?z(n):n.parentGroupIds?.includes(c.id)):P?x:le).filter(V),D=a.find(n=>n.kind==="market"&&n.id===(l??(t.kind==="market"?t.id:void 0))),Q=c&&D&&(c.marketKeys?.includes(D.id)||D.parentGroupIds?.includes(c.id))?D.id:void 0,L=s?Q??Le(c):void 0,U=(c?G.filter(n=>n.parentGroupIds?.includes(c.id)&&(!L||n.marketKeys?.includes(L))):P||y||x.length===0?G:[]).filter(V),Z=a.filter(n=>n.kind!=="market"||y||!s&&!c&&!P&&x.length>0||s&&c?.marketKeys?.length===1&&!P?!1:(c?P?z(n):n.parentGroupIds?.includes(c.id):P||!n.parentGroupIds?.some(g=>b.has(g)))&&V(n)),J=c||y?[]:a.filter(n=>n.kind==="project"&&V(n));C.useEffect(()=>{const n=u=>{N.current?.open&&u.target instanceof Node&&!N.current.contains(u.target)&&(N.current.open=!1)};return document.addEventListener("pointerdown",n),()=>document.removeEventListener("pointerdown",n)},[]);const ce=n=>{N.current&&(N.current.open=!1,N.current.querySelector("summary")?.focus());const u=s?n.kind==="property"?L:n.kind==="group"&&n.id===c?.id?Q:void 0:void 0;u?r(n,u):r(n)},R=n=>{const u=[];let g=b.get(n.parentGroupIds?.[0]??"");for(;g&&!u.includes(g.id)&&g.id!==n.id;)u.unshift(g.id),g=b.get(g.parentGroupIds?.[0]??"");return[...u,n.id]},ue=()=>{const n=t.kind==="group"?b.get(t.id):void 0,u=b.get(D?.parentGroupIds?.[0]??""),g=(t.parentGroupIds??[]).flatMap(w=>{const q=b.get(w);return q?[R(q)]:[]}),v=g.find(w=>w.at(-1)===c?.id)??g.sort((w,q)=>q.length-w.length)[0]??[],te=u?R(u):t.marketKeys?.length?[]:v;j(n?R(n):te),I(t.kind==="property"&&te.length===0&&x.length>0),k("")},X=n=>{j(R(n)),I(!1),k(""),B.current?.focus()},T=(n,u=K(n))=>i.jsxs("div",{className:"flex items-stretch",children:[i.jsxs("button",{type:"button",className:H,"aria-label":n.kind==="group"&&!s?E.browse(K(n)):E.select(K(n)),"aria-current":t.kind===n.kind&&t.id===n.id?"true":void 0,onClick:()=>n.kind==="group"&&!s?X(n):ce(n),children:[i.jsxs("span",{className:"min-w-0 break-words",children:[u,P&&O(n)?i.jsx("span",{className:"block text-[13px] text-secondary",children:O(n)}):null]}),i.jsx("span",{className:"shrink-0 text-right text-[13px] text-secondary",children:n.kind==="market"?s?"Query context":"Market":n.kind==="property"?"Property":se(n.targetCount)})]}),s&&n.kind==="group"&&n.id!==c?.id&&a.some(g=>g.parentGroupIds?.includes(n.id))?i.jsx("button",{type:"button","aria-label":E.browse(n.label),title:`Browse ${n.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:()=>X(n),children:i.jsx(ne,{size:18,"aria-hidden":"true"})}):null]},`${n.kind}:${n.id}`),F=(n,u)=>u.length>0?i.jsxs("section",{"aria-label":n,className:"mt-2",children:[i.jsx("h3",{className:"px-2 py-2 text-[13px] font-medium text-secondary",children:n}),u.map(g=>T(g))]}):null,ee=(n,u,g)=>u.length>0?i.jsxs("details",{open:g,className:"mt-2 border-y border-default",children:[i.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:[n," (",u.length,")"]}),u.map(v=>T(v))]},`${c?.id??"root"}:${n}`):null;return i.jsxs("div",{className:"min-w-0",children:[i.jsx("span",{id:`${o}-label`,className:p==="sr-only"?"sr-only":"mb-1 block text-sm font-medium text-heading",children:d}),i.jsxs("details",{ref:N,className:"relative",onToggle:n=>{n.target===n.currentTarget&&n.currentTarget.open&&B.current?.focus()},onKeyDown:n=>{n.key==="Escape"&&(n.preventDefault(),n.currentTarget.open=!1,n.currentTarget.querySelector("summary")?.focus())},children:[i.jsxs("summary",{id:`${o}-value`,"aria-labelledby":`${o}-label ${o}-value`,className:`${re} visibility-scope-trigger`,onClick:()=>{N.current?.open||ue()},children:[`${K(t)}${t.kind==="group"?` · ${se(t.targetCount)}`:t.kind==="property"?` · ${a.find(n=>n.kind==="market"&&n.id===l)?.label??(t.marketKeys?.length?E.allMarkets:"Property")}`:t.kind==="market"?" · Market":""}`,i.jsx(Te,{size:16,"aria-hidden":"true",className:"shrink-0 text-secondary"})]}),i.jsxs("div",{className:"visibility-scope-menu",children:[c||y?i.jsxs("div",{className:"mb-2 border-b border-default pb-2",children:[i.jsx("button",{type:"button",className:H,"aria-label":`Back to ${Y?.label??"all groups"}`,onClick:()=>{j(M.slice(0,-1)),I(!1),k(""),B.current?.focus()},children:i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(qe,{size:16,"aria-hidden":"true"}),Y?.label??"All groups"]})}),i.jsx("p",{className:"px-2 py-1 text-sm font-medium text-heading","aria-live":"polite",children:c?.label??"All properties"})]}):null,i.jsx("input",{ref:B,type:"search","aria-label":"Search scopes",className:re,placeholder:c?"Search within this group":y?"Search properties":"Search groups or properties",value:h,onChange:n=>k(n.target.value)}),i.jsxs("div",{className:"mt-2 max-h-80 overflow-y-auto",children:[s&&c&&!P?T(c,"All properties in this group"):null,J.map(n=>T(n)),c&&!P?ee("Subgroups",S,!0):F(c?"Subgroups":"Groups",S),P?F("Properties",U):ee(c&&S.length>0?"All properties":"Properties",U,!c||S.length===0),F("Markets",Z),!c&&!y&&!P&&x.length>0&&G.length>0?i.jsxs("button",{type:"button",className:`${H} mt-2 border-t border-default`,"aria-label":E.browseAll,onClick:()=>{I(!0),B.current?.focus()},children:[i.jsx("span",{children:"All properties"}),i.jsx(ne,{size:18,"aria-hidden":"true"})]}):null,P&&S.length+U.length+Z.length+J.length===0?i.jsx("p",{className:"py-3 text-sm text-secondary",children:"No matching scopes."}):null]})]})]})]})}function oe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`web-${Date.now()}-${Math.random().toString(36).slice(2)}`}function A(e){return{"If-Match":e,"Idempotency-Key":oe()}}function st(e){return e instanceof W&&(e.statusCode===404||e.statusCode===409||e.statusCode===412)}function at(e,t){return e instanceof W?t:(e instanceof Error?e.message.trim():"")||t}function it(e){const t="Could not calculate assignment impact.";if(!(e instanceof W)||e.code!=="VALIDATION_ERROR")return t;const r=e.message.trim();return e.details?.displayToOperator===!0&&r?r:t}const ot={loadSetup:e=>m(()=>Ee({client:f,path:{name:e}})),loadDraft:e=>m(()=>Ke({client:f,path:{name:e}})),createDraft:(e,t)=>m(()=>we({client:f,path:{name:e},headers:{"Idempotency-Key":oe()},body:{expectedActiveRevision:t}})),importSitemap:(e,t,r)=>m(()=>De({client:f,path:{name:e},headers:A(t),body:r})),applySitemapSelection:(e,t,r,l)=>m(()=>Se({client:f,path:{name:e},headers:A(t),body:{selections:r,selectedTargetKeys:l}})),previewAssignments:(e,t)=>m(()=>$e({client:f,path:{name:e},body:t})),applyAssignments:(e,t,r)=>m(()=>Be({client:f,path:{name:e},headers:A(t),body:r})),replaceAssignments:(e,t,r)=>m(()=>Ie({client:f,path:{name:e},headers:A(t),body:r})),applyPairedAssignments:(e,t,r)=>m(()=>ve({client:f,path:{name:e},headers:A(t),body:{pairs:r}})),removeAssignment:(e,t,r,l)=>m(()=>Me({client:f,path:{name:e},headers:A(t),body:{targetKeys:r,queryId:l}})),excludeTarget:(e,t,r)=>m(()=>Ce({client:f,path:{name:e},headers:A(t),body:{targetKey:r,cleanup:"assignments-and-group-memberships"}})),upsertTarget:(e,t,r)=>m(()=>Ne({client:f,path:{name:e},headers:A(t),body:{target:r}})),upsertGroup:(e,t,r)=>m(()=>je({client:f,path:{name:e},headers:A(t),body:{group:r}})),removeGroup:(e,t,r)=>m(()=>Pe({client:f,path:{name:e},headers:A(t),body:{groupKey:r}})),upsertCompetitor:(e,t,r)=>m(()=>Ae({client:f,path:{name:e},headers:A(t),body:r})),removeCompetitor:(e,t,r,l)=>m(()=>ke({client:f,path:{name:e},headers:A(t),body:{groupKey:r,competitorKey:l}})),previewGroupMembership:(e,t)=>m(()=>xe({client:f,path:{name:e},body:t})),applyGroupMembership:(e,t,r)=>m(()=>be({client:f,path:{name:e},headers:A(t),body:r})),compilePreview:e=>m(()=>ye({client:f,path:{name:e}})),diffPreview:e=>m(()=>he({client:f,path:{name:e}})),publish:(e,t,r)=>m(()=>ge({client:f,path:{name:e},headers:A(t),body:r})),discard:(e,t)=>m(()=>fe({client:f,path:{name:e},headers:A(t)}))};function lt(e){const t=e[0];return t?e.every(r=>r.mode===t.mode&&r.scope.kind===t.scope.kind&&r.scope.key===t.scope.key&&r.queryClass===t.queryClass&&r.measurement.displayedRunId===t.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},...e.unchecked===void 0?{}:{unchecked:e.unchecked}}}function Ue(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function Fe(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function He(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function ae(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function We(e,t,r){const l=new Map;if(!t)return l;const d=new Map(e.usageEdges.map(a=>[ae(a),a.targetKey])),p=new Map(e.assignments.map(a=>[`${a.targetKey}:${a.queryId}`,a.queryClass])),s=new Map(e.usageEdges.map(a=>[ae(a),p.get(`${a.targetKey}:${a.queryId}`)]));for(const a of t.evidence){if(r&&s.get(a.usageEdgeId)!==r)continue;const h=d.get(a.usageEdgeId);if(!h)continue;const k=l.get(h)??[];k.push({id:`${a.observationId}:${a.expectedSlotId}:${a.usageEdgeId}:${a.sourceUrl}`,kind:Fe(a.classification),query:a.queryText,provider:a.provider,location:a.location,url:a.sourceUrl,tone:He(a.classification),historical:a.historical||a.bridged}),l.set(h,k)}return l}function Ye(e){if(e.flags>0)return{label:"Review",tone:"caution"};const t=[e.mentionCoverage,e.citationCoverage].filter(r=>r.state==="unavailable").map(r=>r.reason);return t.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:t.includes("plan_v1")?{label:"Update setup",tone:"caution"}:t.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:t.includes("identity_ambiguous")?{label:Ve.ambiguous,tone:"caution"}:t.includes("no_population")?{label:"No queries",tone:"neutral"}:t.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function ze(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 Qe(e){if(!e)return"";const t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function ie(e){const t=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${t} flagged ${t===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 ct({overview:e,activePlan:t,report:r,reportState:l=r?"ready":"loading",sort:d}){if(t.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 p=t.plan,s=new Map(p.targets.map(o=>[o.stableKey,o])),a=new Map(p.querySnapshots.map(o=>[o.queryId,o.queryText])),h=new Map;for(const o of p.assignments){if(e.queryClass!=="all"&&o.queryClass!==e.queryClass)continue;const x=a.get(o.queryId);if(!x)continue;const b=h.get(o.targetKey)??new Set;b.add(x),h.set(o.targetKey,b)}const k=r?.revision===t.revision&&r.run?.id===e.measurement.displayedRunId?r:null,M=e.measurement.displayedRunId===void 0||k?"ready":l==="error"||r!=null?"error":"loading",j=We(p,k,e.queryClass==="all"?void 0:e.queryClass),y=new Map;for(const o of p.groups)for(const x of o.targetKeys)y.has(x)||y.set(x,o.label);const I=e.properties.items.map(o=>{const x=s.get(o.targetKey),b=j.get(o.targetKey)??[];return{id:o.targetKey,name:o.label,mentionCoverage:$(o.mentionCoverage),citationCoverage:$(o.citationCoverage),status:Ye(o),providers:o.providers?.map(c=>({provider:c.provider,mentionCoverage:$(c.mentionCoverage),citationCoverage:$(c.citationCoverage)})),market:y.get(o.targetKey),assignedQueries:[...h.get(o.targetKey)??[]],urls:x?.urlMatchers.map(Ue)??[],evidence:b,evidenceState:M,historical:b.some(c=>c.historical)}}),N=e.namedShareOfVoice?.entries.map(o=>({name:o.label,coverage:{numerator:o.credits,denominator:e.namedShareOfVoice.denominator}})),B=e.properties.items.flatMap(o=>o.flags>0?[{id:`property:${o.targetKey}`,property:o.label,summary:`${o.flags} ${o.flags===1?"result needs":"results need"} review.`,tone:"caution",count:o.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:ze(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:Qe(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:I,...N?{shareOfVoice:N}:{}},propertyTotal:e.properties.totalEstimate??I.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...d?{sort:d}:{}},availableGroups:p.groups.map(o=>({id:o.stableKey,label:o.label})),...ie(e)?{nextActionText:ie(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:B}}export{nt as A,E as M,rt as V,tt as a,ot as b,it as c,lt as d,ct as e,st as i,Ue as m,at as s};
|
|
1
|
+
import{r as C,j as i}from"./vendor-tanstack-ZXXkndVj.js";import{$ as de,eb as pe,B as me,aM as W,ec as m,ed as fe,ee as ge,ef as he,eg as ye,eh as be,ei as xe,ej as ke,ek as Ae,el as Pe,em as je,en as Ne,eo as Ce,ep as Me,eq as ve,er as Ie,es as Be,et as $e,eu as Se,ev as De,ew as we,ex as Ke,ey as Ee,y as f,b7 as Ve}from"./index-ZS9sSTMS.js";import{M as Re}from"./vendor-markdown-B4giJcws.js";import{C as Te,$ as qe,g as ne}from"./vendor-lucide-Y6jANGfG.js";const tt="Sources",_={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function _e({previewLength:e,highlight:t}){return r=>{if(e!==void 0&&Number.isFinite(e)){let l=Math.max(0,Math.floor(e));const d={field:"value",omitted:!1},p=s=>{if(s.type==="definition")return!0;if(s.children)return s.children=s.children.filter(p),s.children.length>0;const a=s.type==="image"||s.type==="imageReference"?"alt":"value",h=s[a];if(h===void 0)return l>0;const k=Array.from(h);if(k.length===0)return l>0;if(l===0)return d.omitted=!0,!1;const M=k.length>l,j=k.slice(0,l);if(M&&!/\s/.test(k[l])){let y=j.length-1;for(;y>=0&&!/\s/.test(j[y]);)y--;y>=0&&y>l-40&&(j.length=y)}return d.omitted||=M,s[a]=j.join(""),l=M?0:l-j.length,j.length===0?!1:(d.lastNode=s,d.field=a,!0)};p(r),d.omitted&&(d.lastNode?d.lastNode[d.field]=`${d.lastNode[d.field].trimEnd()}…`:r.children?.push({type:"paragraph",children:[{type:"text",value:"…"}]}))}if(t){const l=d=>{["link","linkReference","code","inlineCode"].includes(d.type)||(d.type==="text"&&(d.data={...d.data,hName:"span"}),d.children?.forEach(l))};l(r)}}}function Ge({headingLevel:e}){return t=>{const r=[],l=p=>{p.type==="heading"&&p.depth&&r.push(p),p.children?.forEach(l)};l(t);const d=r.reduce((p,s)=>Math.min(p,s.depth),6);for(const p of r){const s=p.depth-d;p.depth=Math.min(6,e+s),p.data={...p.data,hProperties:{...p.data?.hProperties,"data-answer-heading-level":s+1}}}}}function Oe({answer:e}){const[t,r]=C.useState("idle"),l=C.useRef(!1),d=async()=>{if(!l.current){l.current=!0,r("copying");try{await navigator.clipboard.writeText(e),r("copied")}catch{r("failed")}finally{l.current=!1}}};return i.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[i.jsx(me,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":t==="copying","aria-busy":t==="copying",onClick:()=>{d()},children:t==="copying"?_.copying:_.copy}),i.jsx("span",{role:"status",className:"text-sm text-secondary",children:t==="copied"?_.copied:t==="failed"?_.failed:""})]})}const nt=C.memo(function({children:t,headingLevel:r=4,copyable:l=!1,highlightGroups:d,previewLength:p}){return i.jsxs("div",{className:"answer-markdown",children:[i.jsx(Re,{remarkPlugins:[[Ge,{headingLevel:r}],[_e,{previewLength:p,highlight:!!d?.length}]],components:{p:({children:s})=>i.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:s}),ul:({children:s})=>i.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:s}),ol:({children:s,start:a})=>i.jsx("ol",{start:a,className:"mb-3 ml-5 list-decimal space-y-1",children:s}),pre:({children:s})=>i.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:s}),span:({children:s})=>i.jsx("span",{children:typeof s=="string"&&d?s.split(/(https?:\/\/[^\s<>]+)/i).map((a,h)=>h%2?a:i.jsx(C.Fragment,{children:pe(a,d)},h)):s}),a:({children:s,href:a})=>{const h=de(a);return h?i.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:s}):i.jsx("span",{children:s})},img:({alt:s})=>i.jsx("span",{children:s})},children:t}),l&&t.trim()?i.jsx(Oe,{answer:t},t):null]})}),re="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",H="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",K=e=>e.kind==="project"?"Whole site":e.label,E={allMarkets:"All markets",browse:e=>`Browse ${e}`,select:e=>`Select ${e}`,browseAll:"Browse all properties"},Le=e=>e?.kind==="group"&&e.marketKeys?.length===1?e.marketKeys[0]:void 0,se=e=>`${e} ${e===1?"property":"properties"}`;function rt({options:e,selected:t,onSelect:r,marketKey:l,label:d="Measurement scope",labelVisibility:p="visible",allowGroupSelect:s=!0}){const a=[...e].sort((n,u)=>n.label.localeCompare(u.label,void 0,{numeric:!0})||n.id.localeCompare(u.id)),[h,k]=C.useState(""),[M,j]=C.useState([]),[y,I]=C.useState(!1),N=C.useRef(null),B=C.useRef(null),o=C.useId(),x=a.filter(n=>n.kind==="group"),b=new Map(x.map(n=>[n.id,n])),c=b.get(M.at(-1)??""),Y=b.get(M.at(-2)??""),P=h.trim().toLocaleLowerCase(),le=x.filter(n=>!n.parentGroupIds?.some(u=>b.has(u))),G=a.filter(n=>n.kind==="property"),O=n=>(n.parentGroupIds??[]).map(u=>b.get(u)?.label).filter(Boolean).join(" · "),V=n=>`${K(n)} ${O(n)}`.toLocaleLowerCase().includes(P),z=n=>{const u=[...n.parentGroupIds??[]],g=new Set;for(;u.length;){const v=u.pop();if(v===c?.id)return!0;g.has(v)||(g.add(v),u.push(...b.get(v)?.parentGroupIds??[]))}return!1},S=(y?[]:c?x.filter(n=>P?z(n):n.parentGroupIds?.includes(c.id)):P?x:le).filter(V),D=a.find(n=>n.kind==="market"&&n.id===(l??(t.kind==="market"?t.id:void 0))),Q=c&&D&&(c.marketKeys?.includes(D.id)||D.parentGroupIds?.includes(c.id))?D.id:void 0,L=s?Q??Le(c):void 0,U=(c?G.filter(n=>n.parentGroupIds?.includes(c.id)&&(!L||n.marketKeys?.includes(L))):P||y||x.length===0?G:[]).filter(V),Z=a.filter(n=>n.kind!=="market"||y||!s&&!c&&!P&&x.length>0||s&&c?.marketKeys?.length===1&&!P?!1:(c?P?z(n):n.parentGroupIds?.includes(c.id):P||!n.parentGroupIds?.some(g=>b.has(g)))&&V(n)),J=c||y?[]:a.filter(n=>n.kind==="project"&&V(n));C.useEffect(()=>{const n=u=>{N.current?.open&&u.target instanceof Node&&!N.current.contains(u.target)&&(N.current.open=!1)};return document.addEventListener("pointerdown",n),()=>document.removeEventListener("pointerdown",n)},[]);const ce=n=>{N.current&&(N.current.open=!1,N.current.querySelector("summary")?.focus());const u=s?n.kind==="property"?L:n.kind==="group"&&n.id===c?.id?Q:void 0:void 0;u?r(n,u):r(n)},R=n=>{const u=[];let g=b.get(n.parentGroupIds?.[0]??"");for(;g&&!u.includes(g.id)&&g.id!==n.id;)u.unshift(g.id),g=b.get(g.parentGroupIds?.[0]??"");return[...u,n.id]},ue=()=>{const n=t.kind==="group"?b.get(t.id):void 0,u=b.get(D?.parentGroupIds?.[0]??""),g=(t.parentGroupIds??[]).flatMap(w=>{const q=b.get(w);return q?[R(q)]:[]}),v=g.find(w=>w.at(-1)===c?.id)??g.sort((w,q)=>q.length-w.length)[0]??[],te=u?R(u):t.marketKeys?.length?[]:v;j(n?R(n):te),I(t.kind==="property"&&te.length===0&&x.length>0),k("")},X=n=>{j(R(n)),I(!1),k(""),B.current?.focus()},T=(n,u=K(n))=>i.jsxs("div",{className:"flex items-stretch",children:[i.jsxs("button",{type:"button",className:H,"aria-label":n.kind==="group"&&!s?E.browse(K(n)):E.select(K(n)),"aria-current":t.kind===n.kind&&t.id===n.id?"true":void 0,onClick:()=>n.kind==="group"&&!s?X(n):ce(n),children:[i.jsxs("span",{className:"min-w-0 break-words",children:[u,P&&O(n)?i.jsx("span",{className:"block text-[13px] text-secondary",children:O(n)}):null]}),i.jsx("span",{className:"shrink-0 text-right text-[13px] text-secondary",children:n.kind==="market"?s?"Query context":"Market":n.kind==="property"?"Property":se(n.targetCount)})]}),s&&n.kind==="group"&&n.id!==c?.id&&a.some(g=>g.parentGroupIds?.includes(n.id))?i.jsx("button",{type:"button","aria-label":E.browse(n.label),title:`Browse ${n.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:()=>X(n),children:i.jsx(ne,{size:18,"aria-hidden":"true"})}):null]},`${n.kind}:${n.id}`),F=(n,u)=>u.length>0?i.jsxs("section",{"aria-label":n,className:"mt-2",children:[i.jsx("h3",{className:"px-2 py-2 text-[13px] font-medium text-secondary",children:n}),u.map(g=>T(g))]}):null,ee=(n,u,g)=>u.length>0?i.jsxs("details",{open:g,className:"mt-2 border-y border-default",children:[i.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:[n," (",u.length,")"]}),u.map(v=>T(v))]},`${c?.id??"root"}:${n}`):null;return i.jsxs("div",{className:"min-w-0",children:[i.jsx("span",{id:`${o}-label`,className:p==="sr-only"?"sr-only":"mb-1 block text-sm font-medium text-heading",children:d}),i.jsxs("details",{ref:N,className:"relative",onToggle:n=>{n.target===n.currentTarget&&n.currentTarget.open&&B.current?.focus()},onKeyDown:n=>{n.key==="Escape"&&(n.preventDefault(),n.currentTarget.open=!1,n.currentTarget.querySelector("summary")?.focus())},children:[i.jsxs("summary",{id:`${o}-value`,"aria-labelledby":`${o}-label ${o}-value`,className:`${re} visibility-scope-trigger`,onClick:()=>{N.current?.open||ue()},children:[`${K(t)}${t.kind==="group"?` · ${se(t.targetCount)}`:t.kind==="property"?` · ${a.find(n=>n.kind==="market"&&n.id===l)?.label??(t.marketKeys?.length?E.allMarkets:"Property")}`:t.kind==="market"?" · Market":""}`,i.jsx(Te,{size:16,"aria-hidden":"true",className:"shrink-0 text-secondary"})]}),i.jsxs("div",{className:"visibility-scope-menu",children:[c||y?i.jsxs("div",{className:"mb-2 border-b border-default pb-2",children:[i.jsx("button",{type:"button",className:H,"aria-label":`Back to ${Y?.label??"all groups"}`,onClick:()=>{j(M.slice(0,-1)),I(!1),k(""),B.current?.focus()},children:i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(qe,{size:16,"aria-hidden":"true"}),Y?.label??"All groups"]})}),i.jsx("p",{className:"px-2 py-1 text-sm font-medium text-heading","aria-live":"polite",children:c?.label??"All properties"})]}):null,i.jsx("input",{ref:B,type:"search","aria-label":"Search scopes",className:re,placeholder:c?"Search within this group":y?"Search properties":"Search groups or properties",value:h,onChange:n=>k(n.target.value)}),i.jsxs("div",{className:"mt-2 max-h-80 overflow-y-auto",children:[s&&c&&!P?T(c,"All properties in this group"):null,J.map(n=>T(n)),c&&!P?ee("Subgroups",S,!0):F(c?"Subgroups":"Groups",S),P?F("Properties",U):ee(c&&S.length>0?"All properties":"Properties",U,!c||S.length===0),F("Markets",Z),!c&&!y&&!P&&x.length>0&&G.length>0?i.jsxs("button",{type:"button",className:`${H} mt-2 border-t border-default`,"aria-label":E.browseAll,onClick:()=>{I(!0),B.current?.focus()},children:[i.jsx("span",{children:"All properties"}),i.jsx(ne,{size:18,"aria-hidden":"true"})]}):null,P&&S.length+U.length+Z.length+J.length===0?i.jsx("p",{className:"py-3 text-sm text-secondary",children:"No matching scopes."}):null]})]})]})]})}function oe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`web-${Date.now()}-${Math.random().toString(36).slice(2)}`}function A(e){return{"If-Match":e,"Idempotency-Key":oe()}}function st(e){return e instanceof W&&(e.statusCode===404||e.statusCode===409||e.statusCode===412)}function at(e,t){return e instanceof W?t:(e instanceof Error?e.message.trim():"")||t}function it(e){const t="Could not calculate assignment impact.";if(!(e instanceof W)||e.code!=="VALIDATION_ERROR")return t;const r=e.message.trim();return e.details?.displayToOperator===!0&&r?r:t}const ot={loadSetup:e=>m(()=>Ee({client:f,path:{name:e}})),loadDraft:e=>m(()=>Ke({client:f,path:{name:e}})),createDraft:(e,t)=>m(()=>we({client:f,path:{name:e},headers:{"Idempotency-Key":oe()},body:{expectedActiveRevision:t}})),importSitemap:(e,t,r)=>m(()=>De({client:f,path:{name:e},headers:A(t),body:r})),applySitemapSelection:(e,t,r,l)=>m(()=>Se({client:f,path:{name:e},headers:A(t),body:{selections:r,selectedTargetKeys:l}})),previewAssignments:(e,t)=>m(()=>$e({client:f,path:{name:e},body:t})),applyAssignments:(e,t,r)=>m(()=>Be({client:f,path:{name:e},headers:A(t),body:r})),replaceAssignments:(e,t,r)=>m(()=>Ie({client:f,path:{name:e},headers:A(t),body:r})),applyPairedAssignments:(e,t,r)=>m(()=>ve({client:f,path:{name:e},headers:A(t),body:{pairs:r}})),removeAssignment:(e,t,r,l)=>m(()=>Me({client:f,path:{name:e},headers:A(t),body:{targetKeys:r,queryId:l}})),excludeTarget:(e,t,r)=>m(()=>Ce({client:f,path:{name:e},headers:A(t),body:{targetKey:r,cleanup:"assignments-and-group-memberships"}})),upsertTarget:(e,t,r)=>m(()=>Ne({client:f,path:{name:e},headers:A(t),body:{target:r}})),upsertGroup:(e,t,r)=>m(()=>je({client:f,path:{name:e},headers:A(t),body:{group:r}})),removeGroup:(e,t,r)=>m(()=>Pe({client:f,path:{name:e},headers:A(t),body:{groupKey:r}})),upsertCompetitor:(e,t,r)=>m(()=>Ae({client:f,path:{name:e},headers:A(t),body:r})),removeCompetitor:(e,t,r,l)=>m(()=>ke({client:f,path:{name:e},headers:A(t),body:{groupKey:r,competitorKey:l}})),previewGroupMembership:(e,t)=>m(()=>xe({client:f,path:{name:e},body:t})),applyGroupMembership:(e,t,r)=>m(()=>be({client:f,path:{name:e},headers:A(t),body:r})),compilePreview:e=>m(()=>ye({client:f,path:{name:e}})),diffPreview:e=>m(()=>he({client:f,path:{name:e}})),publish:(e,t,r)=>m(()=>ge({client:f,path:{name:e},headers:A(t),body:r})),discard:(e,t)=>m(()=>fe({client:f,path:{name:e},headers:A(t)}))};function lt(e){const t=e[0];return t?e.every(r=>r.mode===t.mode&&r.scope.kind===t.scope.kind&&r.scope.key===t.scope.key&&r.queryClass===t.queryClass&&r.measurement.displayedRunId===t.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},...e.unchecked===void 0?{}:{unchecked:e.unchecked}}}function Ue(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function Fe(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function He(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function ae(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function We(e,t,r){const l=new Map;if(!t)return l;const d=new Map(e.usageEdges.map(a=>[ae(a),a.targetKey])),p=new Map(e.assignments.map(a=>[`${a.targetKey}:${a.queryId}`,a.queryClass])),s=new Map(e.usageEdges.map(a=>[ae(a),p.get(`${a.targetKey}:${a.queryId}`)]));for(const a of t.evidence){if(r&&s.get(a.usageEdgeId)!==r)continue;const h=d.get(a.usageEdgeId);if(!h)continue;const k=l.get(h)??[];k.push({id:`${a.observationId}:${a.expectedSlotId}:${a.usageEdgeId}:${a.sourceUrl}`,kind:Fe(a.classification),query:a.queryText,provider:a.provider,location:a.location,url:a.sourceUrl,tone:He(a.classification),historical:a.historical||a.bridged}),l.set(h,k)}return l}function Ye(e){if(e.flags>0)return{label:"Review",tone:"caution"};const t=[e.mentionCoverage,e.citationCoverage].filter(r=>r.state==="unavailable").map(r=>r.reason);return t.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:t.includes("plan_v1")?{label:"Update setup",tone:"caution"}:t.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:t.includes("identity_ambiguous")?{label:Ve.ambiguous,tone:"caution"}:t.includes("no_population")?{label:"No queries",tone:"neutral"}:t.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function ze(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 Qe(e){if(!e)return"";const t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function ie(e){const t=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${t} flagged ${t===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 ct({overview:e,activePlan:t,report:r,reportState:l=r?"ready":"loading",sort:d}){if(t.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 p=t.plan,s=new Map(p.targets.map(o=>[o.stableKey,o])),a=new Map(p.querySnapshots.map(o=>[o.queryId,o.queryText])),h=new Map;for(const o of p.assignments){if(e.queryClass!=="all"&&o.queryClass!==e.queryClass)continue;const x=a.get(o.queryId);if(!x)continue;const b=h.get(o.targetKey)??new Set;b.add(x),h.set(o.targetKey,b)}const k=r?.revision===t.revision&&r.run?.id===e.measurement.displayedRunId?r:null,M=e.measurement.displayedRunId===void 0||k?"ready":l==="error"||r!=null?"error":"loading",j=We(p,k,e.queryClass==="all"?void 0:e.queryClass),y=new Map;for(const o of p.groups)for(const x of o.targetKeys)y.has(x)||y.set(x,o.label);const I=e.properties.items.map(o=>{const x=s.get(o.targetKey),b=j.get(o.targetKey)??[];return{id:o.targetKey,name:o.label,mentionCoverage:$(o.mentionCoverage),citationCoverage:$(o.citationCoverage),status:Ye(o),providers:o.providers?.map(c=>({provider:c.provider,mentionCoverage:$(c.mentionCoverage),citationCoverage:$(c.citationCoverage)})),market:y.get(o.targetKey),assignedQueries:[...h.get(o.targetKey)??[]],urls:x?.urlMatchers.map(Ue)??[],evidence:b,evidenceState:M,historical:b.some(c=>c.historical)}}),N=e.namedShareOfVoice?.entries.map(o=>({name:o.label,coverage:{numerator:o.credits,denominator:e.namedShareOfVoice.denominator}})),B=e.properties.items.flatMap(o=>o.flags>0?[{id:`property:${o.targetKey}`,property:o.label,summary:`${o.flags} ${o.flags===1?"result needs":"results need"} review.`,tone:"caution",count:o.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:ze(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:Qe(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:I,...N?{shareOfVoice:N}:{}},propertyTotal:e.properties.totalEstimate??I.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...d?{sort:d}:{}},availableGroups:p.groups.map(o=>({id:o.stableKey,label:o.label})),...ie(e)?{nextActionText:ie(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:B}}export{nt as A,E as M,rt as V,tt as a,ot as b,it as c,lt as d,ct as e,st as i,Ue as m,at as s};
|
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-ZS9sSTMS.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-D-cUuLZo.js">
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
AppError,
|
|
6
6
|
parseWindowIn,
|
|
7
7
|
resolveDateRange
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GZ2KIONF.js";
|
|
9
9
|
|
|
10
10
|
// src/cli-access.ts
|
|
11
11
|
var CLI_ACCESS_BY_ID = Object.freeze({
|
|
@@ -299,6 +299,8 @@ var CLI_ACCESS_BY_ID = Object.freeze({
|
|
|
299
299
|
"schedule.show": "stored",
|
|
300
300
|
"search": "stored",
|
|
301
301
|
"site-health.overview": "stored",
|
|
302
|
+
"site-health.issues": "stored",
|
|
303
|
+
"site-health.issue-pages": "stored",
|
|
302
304
|
"site-health.pages": "stored",
|
|
303
305
|
"site-health.page-audit": "stored",
|
|
304
306
|
"site-health.structure": "stored",
|
|
@@ -331,6 +333,8 @@ var CLI_ACCESS_BY_ID = Object.freeze({
|
|
|
331
333
|
"stop": "write",
|
|
332
334
|
"support": "stored",
|
|
333
335
|
"technical-aeo.changes": "stored",
|
|
336
|
+
"technical-aeo.issues": "stored",
|
|
337
|
+
"technical-aeo.issue-pages": "stored",
|
|
334
338
|
"technical-aeo.crawl": "write",
|
|
335
339
|
"technical-aeo.crawl-pages": "stored",
|
|
336
340
|
"technical-aeo.dead-links": "stored",
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
resolveCliAccess,
|
|
5
5
|
resolveCliAccessForInvocation,
|
|
6
6
|
windowOptions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3JVF3ULD.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError,
|
|
10
10
|
EXIT_USER_ERROR,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-HGMYEDAQ.js";
|
|
13
13
|
import {
|
|
14
14
|
OperationAccesses
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GZ2KIONF.js";
|
|
16
16
|
|
|
17
17
|
// src/cli-catalog.ts
|
|
18
18
|
import { createRequire } from "module";
|
|
@@ -109,7 +109,7 @@ async function dispatchRegisteredCommand(args, fallbackFormat, specs) {
|
|
|
109
109
|
const accessValue = accessFilterFromArgs(argsWithoutHelp);
|
|
110
110
|
validateAccessFilter(accessValue);
|
|
111
111
|
if (fallbackFormat !== "text") {
|
|
112
|
-
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-
|
|
112
|
+
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-PNJEQV5H.js");
|
|
113
113
|
const group2 = argsWithoutHelp.find((arg) => !arg.startsWith("--"));
|
|
114
114
|
printCliCatalog2(specs, fallbackFormat, group2, accessValue);
|
|
115
115
|
return true;
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
PACKAGE_VERSION,
|
|
3
3
|
canonryMcpTools,
|
|
4
4
|
toolOperationAccess
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MPWBFKGK.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
EXIT_SYSTEM_ERROR,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
skillsClientSchema,
|
|
58
58
|
upgradeCaveatFor,
|
|
59
59
|
upgradeCommandFor
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-GZ2KIONF.js";
|
|
61
61
|
|
|
62
62
|
// src/config.ts
|
|
63
63
|
import fs from "fs";
|
|
@@ -6257,6 +6257,30 @@ var getApiV1ProjectsByNameTechnicalAeoChanges = (options) => {
|
|
|
6257
6257
|
...options
|
|
6258
6258
|
});
|
|
6259
6259
|
};
|
|
6260
|
+
var getApiV1ProjectsByNameTechnicalAeoIssues = (options) => {
|
|
6261
|
+
return (options.client ?? client).get({
|
|
6262
|
+
security: [
|
|
6263
|
+
{
|
|
6264
|
+
scheme: "bearer",
|
|
6265
|
+
type: "http"
|
|
6266
|
+
}
|
|
6267
|
+
],
|
|
6268
|
+
url: "/api/v1/projects/{name}/technical-aeo/issues",
|
|
6269
|
+
...options
|
|
6270
|
+
});
|
|
6271
|
+
};
|
|
6272
|
+
var getApiV1ProjectsByNameTechnicalAeoIssuesByIssueIdPages = (options) => {
|
|
6273
|
+
return (options.client ?? client).get({
|
|
6274
|
+
security: [
|
|
6275
|
+
{
|
|
6276
|
+
scheme: "bearer",
|
|
6277
|
+
type: "http"
|
|
6278
|
+
}
|
|
6279
|
+
],
|
|
6280
|
+
url: "/api/v1/projects/{name}/technical-aeo/issues/{issueId}/pages",
|
|
6281
|
+
...options
|
|
6282
|
+
});
|
|
6283
|
+
};
|
|
6260
6284
|
var getApiV1ProjectsByNameTechnicalAeoCrawlPagesAudit = (options) => {
|
|
6261
6285
|
return (options.client ?? client).get({
|
|
6262
6286
|
security: [
|
|
@@ -9215,6 +9239,26 @@ var ApiClient = class {
|
|
|
9215
9239
|
})
|
|
9216
9240
|
);
|
|
9217
9241
|
}
|
|
9242
|
+
/** Stored findings across audited pages, including score-independent duplicate groups. */
|
|
9243
|
+
async getSiteAuditIssues(project, opts) {
|
|
9244
|
+
return this.invoke(
|
|
9245
|
+
() => getApiV1ProjectsByNameTechnicalAeoIssues({
|
|
9246
|
+
client: this.heyClient,
|
|
9247
|
+
path: { name: project },
|
|
9248
|
+
query: { runId: opts?.runId, cursor: opts?.cursor, limit: opts?.limit }
|
|
9249
|
+
})
|
|
9250
|
+
);
|
|
9251
|
+
}
|
|
9252
|
+
/** Page evidence for one stored audit issue; continuation stays pinned to its crawl. */
|
|
9253
|
+
async getSiteAuditIssuePages(project, issueId, opts) {
|
|
9254
|
+
return this.invoke(
|
|
9255
|
+
() => getApiV1ProjectsByNameTechnicalAeoIssuesByIssueIdPages({
|
|
9256
|
+
client: this.heyClient,
|
|
9257
|
+
path: { name: project, issueId },
|
|
9258
|
+
query: { runId: opts?.runId, cursor: opts?.cursor, limit: opts?.limit }
|
|
9259
|
+
})
|
|
9260
|
+
);
|
|
9261
|
+
}
|
|
9218
9262
|
/** Bounded semantic Site Health neighborhood; this never returns visualization layout. */
|
|
9219
9263
|
async getSiteHealthSubgraph(project, opts) {
|
|
9220
9264
|
return this.invoke(
|
|
@@ -10223,7 +10267,7 @@ var OPERATIONS_GUIDE = {
|
|
|
10223
10267
|
"guidance": "Build the requested summary from stored project overview, organic evidence, and the relevant visibility, measurement, integration, or traffic reads. Retain evidence dates, scope, sample sizes, missing data, and separate mention/citation signals; do not generate fresh runs implicitly."
|
|
10224
10268
|
}
|
|
10225
10269
|
},
|
|
10226
|
-
"markdown": "# Canonry Operations Guide v1\n\nCanonry is an agent-first AI visibility platform. MCP is the universal entry\npoint for connected agents. Host-native skills are optional upgrades, not a\nprerequisite or a permission mechanism.\n\n## Connect and choose a route\n\nRead the initialization guidance, then call `canonry_help` with an `intent`:\n`status`, `diagnose`, `operations`, `prospecting`, `measurement`, `integrations`,\n`reports`, or a short task\ndescription. Select an accessible project with `canonry_projects_list` before\nusing its exact name in project tools. Inspect each listed tool's input schema;\nhelp suggests tool names, not invented arguments or authorization.\n\nHelp returns a versioned, compact route: connection `mode`, available `next`\ntools, workflow guidance, approval boundaries, and this guide's URL. It performs\nno provider calls, reads no project data, and changes no permissions.\n`next` lists stored reads. Optional `actions` lists loaded tools for work that\nrequires approval; listing an action does not authorize or execute it.\n`includeCatalog: true` additionally returns toolkit details when needed.\n\nHosted connections use a fixed catalog. Help only suggests tools offered by that\nconnection; it never tells a hosted agent to dynamically load a toolkit. A\nprogressive local stdio connection may return `loadToolkits`: call\n`canonry_load_toolkit` with one returned name, await it, then call help again.\nLoading only changes local tool discovery, never server authority.\n\nThe optional `canonry://agent-operations/v1` MCP resource contains this same\nguide. If the host cannot read resources or open links, continue through help.\nDo not install a plugin, local runtime, or skill merely to use connected MCP.\nAn installed Codex or Claude Canonry skill contains a generated copy of this\nguide plus links to host-native references. It does not replace runtime help.\n\n## Vocabulary and evidence\n\n- **Mentioned** means the brand appears in answer text. **Cited** means its\n domain appears in source links. Either, both, or neither can occur; never\n compute one signal from the other.\n- `answerMentioned: null` means not checked, not false. Missing runs and empty\n populations mean no measurement, not zero visibility.\n- Preserve project, time window, provider, requested/served model, location,\n sample size, and query class when comparing evidence. Use server-returned\n metrics; do not invent a score from incompatible populations.\n- Simple projects and Advanced portfolios share the workflow. For Advanced\n results, preserve Property, Target, market, plan revision, and class scope.\n Groups organize navigation; do not infer an unrequested fan-out.\n- Research is isolated evidence, not tracked measurement. A probe still spends\n quota and persists evidence but is excluded from normal tracking metrics.\n\n## Workflows\n\n**Status:** read the stored overview and freshness first. Say when evidence is\nmissing instead of silently creating it.\n\n**Setup:** Page Health needs no answer-engine provider; AI Visibility does.\nAfter a Page Health result on an install with no provider (a `NO_PROVIDER`\nnotice, or doctor's `providers.none-configured`), propose AI Visibility setup\nas the next step. The operator adds the provider key in the dashboard or in\ntheir own terminal; never ask for it in chat.\nRerunning `canonry bootstrap` after a provider change reloads saved provider\nsettings on a matching running local server and reports whether they became\nactive. If the server is offline, start it to apply the saved settings. For an\nexplicit reload of the connected server's own config, use\n`canonry settings reload-providers` or `canonry_providers_reload` with install\nadministrator authority. Remote servers are never reloaded automatically by\nbootstrap, and a local server that belongs to another install is left alone.\nPorts and database settings still need a restart.\n\n**Diagnose:** inspect stored history and comparable evidence. Explain what\nchanged separately from why it might have changed. A hypothesis is not a\nmeasured cause. Propose bounded verification if stored evidence is insufficient.\n\n**Prospecting:** generate a one-shot company snapshot without creating a project.\nInspect stored provider settings first. Agree on the company, domain, selected\nproviders, and queries before starting the quota-spending snapshot action.\nBrowser-only selection requires manual queries. Progressive stdio help offers\nthe discovery toolkit when this connection permits snapshots; load it, then\ncall help again. Fixed catalogs offer only already available actions. Read-only\nand restricted connections must not bypass missing snapshot access.\n\n**Measurement:** inspect the existing setup and results before proposing edits.\nKeep research, query tracking, plan publication, and sweep execution separate.\nFor direct research, submit the final editable query text in one context. For a\nreviewed batch, submit each explicit destination with its final text and one\nidempotency key. Pattern substitution happens in the client before either\nrequest; choosing a market or Property records a destination only and never\nrewrites a query or creates an automatic fan-out. `research.run` does not\nauthorize saving patterns, changing tracking, publishing plans, or settings.\nUse a supported preview where available, inspect its exact destination and\nrevision, then seek approval for the actual change. A preview may itself require\nwrite permission; never treat a dry-run flag as a universal safety guarantee.\n\n**Integrations:** inspect stored connection state and snapshot freshness first.\nProvider configuration evidence does not prove a browser event fired or a\nconversion was recorded. Connection, resource selection, refresh/sync, and live\nreads are separate actions. Credentials belong in the operator's secure setup\nflow, never in chat, tool arguments, reports, or public guidance.\n\n**Reports:** use saved evidence for the requested period and scope. Keep mention\nand citation signals separate, include dates and sample sizes, and state missing\nor stale inputs. For Advanced Property mention rankings, use\n`canonry_measurement_portfolio_summary` and its `mentionRanking.strongest`,\n`.weakest`, and `.excluded` lists. It defaults to non-brand questions; state the\nreturned class and report branded results separately. An unavailable portfolio\naggregate does not invalidate available Property mention rates. Flag excluded\nProperties individually; do not silently replace mention ranking with citation\nranking. Compact `nextCursor` completes only `pageList`; use `list` to enumerate\none ranking, markets, observed names or cited domains, preserving filters.\nFirst-page sibling lists are bounded summaries. Keep sample sizes and ties\nvisible. Preparing a report does not\nauthorize new measurement.\n\n## Authority and approval\n\n### Agent operations\n\nUse `canonry_key_self` (CLI `canonry key whoami --format json`) to inspect the\ncurrent credential's scopes, project boundary, and host-derived `operator`\nauthority without exposing its token. Missing `operator` means unapproved.\n`canonry_settings_get` and\n`canonry_telemetry_get` describe the connected server, not the agent's local\nmachine. Telemetry reports configured preference, effective state, and any\nenvironment override; inspecting status never creates an anonymous identifier.\nAfter approval, `canonry_telemetry_update` changes that preference and\n`canonry_provider_settings_update` changes an already-configured provider's\nmodel/quota. Both require `settings.write`; neither accepts credentials.\nServer telemetry reads and updates additionally require operator authority.\nOrdinary audit-history reads omit internal telemetry events and their state.\n\nOperator authority is deny-by-default and separate from customer admin roles.\nThe deployment owner must approve a dedicated, instance-wide API key's ID in\nthe server environment variable `CANONRY_OPERATOR_KEY_IDS` (comma-separated IDs),\nthen restart the server. Empty/unset approves nobody; wildcards are invalid.\nKeep the bearer private to internal operators; never approve a customer-held or\nshared proxy/bootstrap key. Use `logs.read` for read-only diagnostics, adding\n`settings.write` only when telemetry control is required. Ordinary key creation,\naccount roles, OAuth consent, and caller headers cannot grant operator status.\nRevoking an approved key invalidates it immediately. Host enrollment is a trust\nbootstrap step, intentionally unavailable through customer-facing APIs.\nAPI, CLI, and MCP enforce the same boundary; MCP hides internal tools unless\nthe server confirms operator authority, including in explicit read-only mode.\nProject analytics, research, and normal project permissions are unchanged.\n\n`canonry_logs_list` reads bounded, redacted runtime events from both the\napplication logger and Fastify request/error logging. It requires an\ninstance-wide `logs.read` grant (or wildcard) and a host-approved direct bearer.\nBrowser sessions, OAuth/delegated credentials, customer admins, and project-scoped\nkeys cannot use it, even with a project filter or a matching allowlist ID.\nA `logs.read`-only key is read-only automatically, without a\nsecond `read` marker. Named `*.read` scopes cannot grant mutations; an explicit\nwrite grant is needed and remains subject to its route gates. Returned messages\nare sanitized and bounded; raw request or response bodies, headers, cookies,\nprovider payloads, and stacks are not\npart of the queryable surface. The same secret-redaction policy runs before\nconsole output and storage. Do not deliberately log secrets: redaction is a\ndefense in depth, not permission to put credentials into diagnostic strings.\nOpaque escaped payloads containing secret assignments are omitted when safe\npartial masking cannot be guaranteed; correlate their retained error codes and IDs.\n\nFile-backed hosts retain runtime logs in SQLite across restarts, bounded to\n10,000 events and seven days. In-memory hosts report `retention: \"process\"`.\nFilter by `actor`, `requestId`, `runId`, `projectId`, `module`, `level`, or an\ninclusive `since`/`until` interval. Keep filters unchanged when resuming an\nopaque cursor; retention eviction can invalidate it. Inspect `retentionPolicy`,\n`captureErrors`, `dropped`, `truncated`, and `retention` before drawing\nconclusions. Missing logs are not proof that an action did not happen. Use\n`canonry_project_history` or `canonry_history_global` for persistent audit events;\noffset pages have deterministic ordering but are not snapshots of concurrent writes.\n\nAudit `actor` comes from authenticated identity (`user:<id>` or `api-key:<id>`),\nnot a caller-supplied header. A delegated MCP credential records its originating\nuser as actor and the actual credential in `credentialId`. `requestId` correlates\nHTTP events; `userAgent` and `actorSession` are bounded, untrusted client hints,\nnever identity or permission grants. Older audit rows are not backfilled with\nidentities the server cannot prove.\n\nBoth shipped HTTP hosts issue restart-safe UUID request IDs and return them in\n`x-request-id`. Use that value to correlate a CLI/API failure with log entries;\nHTTP diagnostics retain the method and route template, not raw URL parameters.\nRequest-bound loggers retain completion attribution, while generic background\ncontinuations stop inheriting caller identity after the response completes.\nCapture covers the owning server process after initialization, not arbitrary\nconsole output, other worker processes, or host/container logs. Run one server\ninstance per process and database, as required by the single-tenant deployment\nmodel; this is not a cross-tenant or distributed log collector.\n\nFor CLI use, settings reads are remote. Google setup and telemetry retain their\nlocal defaults: pass `--target server` explicitly to configure the connected\nserver. `schedule list <project>` lists all schedule kinds, and\n`notify events --target server` discovers the server's event catalog.\n\nMCP returns legacy text JSON plus structured results. Objects keep their shape;\narrays use `{items: [...]}` in `structuredContent`, and scalars use `{value: ...}`.\nErrors preserve the existing envelope and CLI exit codes: HTTP 4xx (including\n429 policy limits) use exit 1; HTTP 5xx use exit 2. Server-provided `Retry-After`\nand request IDs are exposed as `retryAfterMs` and `requestId` when available;\nclients do not infer retryability from HTTP 429 or retry automatically.\nFor a write with an ambiguous outcome, inspect saved state or its receipt before\nretrying; a retry hint is not proof that repeating a write is safe.\n\n### Action boundaries\n\nStart with stored evidence. Before a live provider read, sweep, probe, research\nrun, sync, write, or externally visible action, obtain approval covering its\nexact target, action, and bounded work. Approval already given for that exact\noperation need not be asked for again, but does not extend to more projects,\nlarger batches, retries with new identities, or recurring work.\n\nHTTP GET and MCP `readOnlyHint` describe aspects of an operation, not its cost\nor permission. Provider discovery, account reads, and live diagnostics may\nconsume quota even when labeled read-only. If the tool's effect is unclear,\ninspect its description and request direction before calling it.\n\nAuthentication, role/scope checks, project restrictions, quotas, and guarded\napproval receipts are enforced by the server. Help, skills, resources, and tool\nvisibility cannot grant authority. Never change credentials, endpoints, or\nproject identifiers to work around a missing tool or a `403` response.\n\nFor guarded ads writes, inspect unresolved operation receipts before retrying.\nUse the receipt's supported recovery action; do not replay a mutation under a\nnew identity. An executor cannot create or widen its own human approval grant.\nOn ambiguous results, exhausted bounds, or refusal, stop and report what is\nknown and what permission or operator action is needed.\n\n## Version and source\n\nThis public, versioned document is the source for initialization guidance,\nintent routes, the optional resource, and generated Canonry `SKILL.md` files.\nGuide v1 may receive compatible clarifications; incompatible routing contracts\nrequire a new guide version. The running server's help describes its actual\ncatalog and remains usable without fetching this document.\n"
|
|
10270
|
+
"markdown": "# Canonry Operations Guide v1\n\nCanonry is an agent-first AI visibility platform. MCP is the universal entry\npoint for connected agents. Host-native skills are optional upgrades, not a\nprerequisite or a permission mechanism.\n\n## Connect and choose a route\n\nRead the initialization guidance, then call `canonry_help` with an `intent`:\n`status`, `diagnose`, `operations`, `prospecting`, `measurement`, `integrations`,\n`reports`, or a short task\ndescription. Select an accessible project with `canonry_projects_list` before\nusing its exact name in project tools. Inspect each listed tool's input schema;\nhelp suggests tool names, not invented arguments or authorization.\n\nHelp returns a versioned, compact route: connection `mode`, available `next`\ntools, workflow guidance, approval boundaries, and this guide's URL. It performs\nno provider calls, reads no project data, and changes no permissions.\n`next` lists stored reads. Optional `actions` lists loaded tools for work that\nrequires approval; listing an action does not authorize or execute it.\n`includeCatalog: true` additionally returns toolkit details when needed.\n\nHosted connections use a fixed catalog. Help only suggests tools offered by that\nconnection; it never tells a hosted agent to dynamically load a toolkit. A\nprogressive local stdio connection may return `loadToolkits`: call\n`canonry_load_toolkit` with one returned name, await it, then call help again.\nLoading only changes local tool discovery, never server authority.\n\nThe optional `canonry://agent-operations/v1` MCP resource contains this same\nguide. If the host cannot read resources or open links, continue through help.\nDo not install a plugin, local runtime, or skill merely to use connected MCP.\nAn installed Codex or Claude Canonry skill contains a generated copy of this\nguide plus links to host-native references. It does not replace runtime help.\n\n## Vocabulary and evidence\n\n- **Mentioned** means the brand appears in answer text. **Cited** means its\n domain appears in source links. Either, both, or neither can occur; never\n compute one signal from the other.\n- `answerMentioned: null` means not checked, not false. Missing runs and empty\n populations mean no measurement, not zero visibility.\n- Preserve project, time window, provider, requested/served model, location,\n sample size, and query class when comparing evidence. Use server-returned\n metrics; do not invent a score from incompatible populations.\n- Simple projects and Advanced portfolios share the workflow. For Advanced\n results, preserve Property, Target, market, plan revision, and class scope.\n Groups organize navigation; do not infer an unrequested fan-out.\n- Research is isolated evidence, not tracked measurement. A probe still spends\n quota and persists evidence but is excluded from normal tracking metrics.\n\n## Workflows\n\n**Status:** read the stored overview and freshness first. Say when evidence is\nmissing instead of silently creating it.\n\n**Setup:** Page Health needs no answer-engine provider; AI Visibility does.\nAfter a Page Health result on an install with no provider (a `NO_PROVIDER`\nnotice, or doctor's `providers.none-configured`), propose AI Visibility setup\nas the next step. The operator adds the provider key in the dashboard or in\ntheir own terminal; never ask for it in chat.\nRerunning `canonry bootstrap` after a provider change reloads saved provider\nsettings on a matching running local server and reports whether they became\nactive. If the server is offline, start it to apply the saved settings. For an\nexplicit reload of the connected server's own config, use\n`canonry settings reload-providers` or `canonry_providers_reload` with install\nadministrator authority. Remote servers are never reloaded automatically by\nbootstrap, and a local server that belongs to another install is left alone.\nPorts and database settings still need a restart.\n\n**Diagnose:** inspect stored history and comparable evidence. Explain what\nchanged separately from why it might have changed. A hypothesis is not a\nmeasured cause. Propose bounded verification if stored evidence is insufficient.\n\n**Site Health:** read `canonry_site_health_issues` for stored technical findings,\naffected-page counts and example URLs, then `canonry_site_health_issue_pages`\nfor a selected issue's remaining pages. Pin subsequent reads to the returned\nrun. Inspect coverage and omissions: a passing score can still have findings,\nan older scan may lack cross-page evidence, and a partial scan cannot establish\nsite-wide absence. Advisory findings require judgment before proposing a repair.\nAudit evidence informs technical repairs and existing-page recommendations;\nit does not itself establish a new-blog opportunity or authorize any edit.\n\n**Prospecting:** generate a one-shot company snapshot without creating a project.\nInspect stored provider settings first. Agree on the company, domain, selected\nproviders, and queries before starting the quota-spending snapshot action.\nBrowser-only selection requires manual queries. Progressive stdio help offers\nthe discovery toolkit when this connection permits snapshots; load it, then\ncall help again. Fixed catalogs offer only already available actions. Read-only\nand restricted connections must not bypass missing snapshot access.\n\n**Measurement:** inspect the existing setup and results before proposing edits.\nKeep research, query tracking, plan publication, and sweep execution separate.\nFor direct research, submit the final editable query text in one context. For a\nreviewed batch, submit each explicit destination with its final text and one\nidempotency key. Pattern substitution happens in the client before either\nrequest; choosing a market or Property records a destination only and never\nrewrites a query or creates an automatic fan-out. `research.run` does not\nauthorize saving patterns, changing tracking, publishing plans, or settings.\nUse a supported preview where available, inspect its exact destination and\nrevision, then seek approval for the actual change. A preview may itself require\nwrite permission; never treat a dry-run flag as a universal safety guarantee.\n\n**Integrations:** inspect stored connection state and snapshot freshness first.\nProvider configuration evidence does not prove a browser event fired or a\nconversion was recorded. Connection, resource selection, refresh/sync, and live\nreads are separate actions. Credentials belong in the operator's secure setup\nflow, never in chat, tool arguments, reports, or public guidance.\n\n**Reports:** use saved evidence for the requested period and scope. Keep mention\nand citation signals separate, include dates and sample sizes, and state missing\nor stale inputs. For Advanced Property mention rankings, use\n`canonry_measurement_portfolio_summary` and its `mentionRanking.strongest`,\n`.weakest`, and `.excluded` lists. It defaults to non-brand questions; state the\nreturned class and report branded results separately. An unavailable portfolio\naggregate does not invalidate available Property mention rates. Flag excluded\nProperties individually; do not silently replace mention ranking with citation\nranking. Compact `nextCursor` completes only `pageList`; use `list` to enumerate\none ranking, markets, observed names or cited domains, preserving filters.\nFirst-page sibling lists are bounded summaries. Keep sample sizes and ties\nvisible. Preparing a report does not\nauthorize new measurement.\n\n## Authority and approval\n\n### Agent operations\n\nUse `canonry_key_self` (CLI `canonry key whoami --format json`) to inspect the\ncurrent credential's scopes, project boundary, and host-derived `operator`\nauthority without exposing its token. Missing `operator` means unapproved.\n`canonry_settings_get` and\n`canonry_telemetry_get` describe the connected server, not the agent's local\nmachine. Telemetry reports configured preference, effective state, and any\nenvironment override; inspecting status never creates an anonymous identifier.\nAfter approval, `canonry_telemetry_update` changes that preference and\n`canonry_provider_settings_update` changes an already-configured provider's\nmodel/quota. Both require `settings.write`; neither accepts credentials.\nServer telemetry reads and updates additionally require operator authority.\nOrdinary audit-history reads omit internal telemetry events and their state.\n\nOperator authority is deny-by-default and separate from customer admin roles.\nThe deployment owner must approve a dedicated, instance-wide API key's ID in\nthe server environment variable `CANONRY_OPERATOR_KEY_IDS` (comma-separated IDs),\nthen restart the server. Empty/unset approves nobody; wildcards are invalid.\nKeep the bearer private to internal operators; never approve a customer-held or\nshared proxy/bootstrap key. Use `logs.read` for read-only diagnostics, adding\n`settings.write` only when telemetry control is required. Ordinary key creation,\naccount roles, OAuth consent, and caller headers cannot grant operator status.\nRevoking an approved key invalidates it immediately. Host enrollment is a trust\nbootstrap step, intentionally unavailable through customer-facing APIs.\nAPI, CLI, and MCP enforce the same boundary; MCP hides internal tools unless\nthe server confirms operator authority, including in explicit read-only mode.\nProject analytics, research, and normal project permissions are unchanged.\n\n`canonry_logs_list` reads bounded, redacted runtime events from both the\napplication logger and Fastify request/error logging. It requires an\ninstance-wide `logs.read` grant (or wildcard) and a host-approved direct bearer.\nBrowser sessions, OAuth/delegated credentials, customer admins, and project-scoped\nkeys cannot use it, even with a project filter or a matching allowlist ID.\nA `logs.read`-only key is read-only automatically, without a\nsecond `read` marker. Named `*.read` scopes cannot grant mutations; an explicit\nwrite grant is needed and remains subject to its route gates. Returned messages\nare sanitized and bounded; raw request or response bodies, headers, cookies,\nprovider payloads, and stacks are not\npart of the queryable surface. The same secret-redaction policy runs before\nconsole output and storage. Do not deliberately log secrets: redaction is a\ndefense in depth, not permission to put credentials into diagnostic strings.\nOpaque escaped payloads containing secret assignments are omitted when safe\npartial masking cannot be guaranteed; correlate their retained error codes and IDs.\n\nFile-backed hosts retain runtime logs in SQLite across restarts, bounded to\n10,000 events and seven days. In-memory hosts report `retention: \"process\"`.\nFilter by `actor`, `requestId`, `runId`, `projectId`, `module`, `level`, or an\ninclusive `since`/`until` interval. Keep filters unchanged when resuming an\nopaque cursor; retention eviction can invalidate it. Inspect `retentionPolicy`,\n`captureErrors`, `dropped`, `truncated`, and `retention` before drawing\nconclusions. Missing logs are not proof that an action did not happen. Use\n`canonry_project_history` or `canonry_history_global` for persistent audit events;\noffset pages have deterministic ordering but are not snapshots of concurrent writes.\n\nAudit `actor` comes from authenticated identity (`user:<id>` or `api-key:<id>`),\nnot a caller-supplied header. A delegated MCP credential records its originating\nuser as actor and the actual credential in `credentialId`. `requestId` correlates\nHTTP events; `userAgent` and `actorSession` are bounded, untrusted client hints,\nnever identity or permission grants. Older audit rows are not backfilled with\nidentities the server cannot prove.\n\nBoth shipped HTTP hosts issue restart-safe UUID request IDs and return them in\n`x-request-id`. Use that value to correlate a CLI/API failure with log entries;\nHTTP diagnostics retain the method and route template, not raw URL parameters.\nRequest-bound loggers retain completion attribution, while generic background\ncontinuations stop inheriting caller identity after the response completes.\nCapture covers the owning server process after initialization, not arbitrary\nconsole output, other worker processes, or host/container logs. Run one server\ninstance per process and database, as required by the single-tenant deployment\nmodel; this is not a cross-tenant or distributed log collector.\n\nFor CLI use, settings reads are remote. Google setup and telemetry retain their\nlocal defaults: pass `--target server` explicitly to configure the connected\nserver. `schedule list <project>` lists all schedule kinds, and\n`notify events --target server` discovers the server's event catalog.\n\nMCP returns legacy text JSON plus structured results. Objects keep their shape;\narrays use `{items: [...]}` in `structuredContent`, and scalars use `{value: ...}`.\nErrors preserve the existing envelope and CLI exit codes: HTTP 4xx (including\n429 policy limits) use exit 1; HTTP 5xx use exit 2. Server-provided `Retry-After`\nand request IDs are exposed as `retryAfterMs` and `requestId` when available;\nclients do not infer retryability from HTTP 429 or retry automatically.\nFor a write with an ambiguous outcome, inspect saved state or its receipt before\nretrying; a retry hint is not proof that repeating a write is safe.\n\n### Action boundaries\n\nStart with stored evidence. Before a live provider read, sweep, probe, research\nrun, sync, write, or externally visible action, obtain approval covering its\nexact target, action, and bounded work. Approval already given for that exact\noperation need not be asked for again, but does not extend to more projects,\nlarger batches, retries with new identities, or recurring work.\n\nHTTP GET and MCP `readOnlyHint` describe aspects of an operation, not its cost\nor permission. Provider discovery, account reads, and live diagnostics may\nconsume quota even when labeled read-only. If the tool's effect is unclear,\ninspect its description and request direction before calling it.\n\nAuthentication, role/scope checks, project restrictions, quotas, and guarded\napproval receipts are enforced by the server. Help, skills, resources, and tool\nvisibility cannot grant authority. Never change credentials, endpoints, or\nproject identifiers to work around a missing tool or a `403` response.\n\nFor guarded ads writes, inspect unresolved operation receipts before retrying.\nUse the receipt's supported recovery action; do not replay a mutation under a\nnew identity. An executor cannot create or widen its own human approval grant.\nOn ambiguous results, exhausted bounds, or refusal, stop and report what is\nknown and what permission or operator action is needed.\n\n## Version and source\n\nThis public, versioned document is the source for initialization guidance,\nintent routes, the optional resource, and generated Canonry `SKILL.md` files.\nGuide v1 may receive compatible clarifications; incompatible routing contracts\nrequire a new guide version. The running server's help describes its actual\ncatalog and remains usable without fetching this document.\n"
|
|
10227
10271
|
};
|
|
10228
10272
|
|
|
10229
10273
|
// src/mcp/operations-guide.ts
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
trackFeatureCompleted,
|
|
32
32
|
trackIntegrationConnection,
|
|
33
33
|
waitForServerRuntimeStartup
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QQYQDTFZ.js";
|
|
35
35
|
import {
|
|
36
36
|
clearDashboardPassword,
|
|
37
37
|
configExists,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
saveConfigPatch,
|
|
51
51
|
shouldPrintServeSkillsNudge,
|
|
52
52
|
withBootstrapProviderDefaults
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-5LY7EG4U.js";
|
|
54
54
|
import {
|
|
55
55
|
emitJsonl,
|
|
56
56
|
getBoolean,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
resolveCliAccess,
|
|
65
65
|
stringOption,
|
|
66
66
|
unknownSubcommand
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-3JVF3ULD.js";
|
|
68
68
|
import {
|
|
69
69
|
DEFAULT_DEMO_TRUSTED_PROXIES,
|
|
70
70
|
trustedProxiesProblem,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
import {
|
|
74
74
|
measurementDraftOperationSchema,
|
|
75
75
|
runMeasurementDraftAction
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-MPWBFKGK.js";
|
|
77
77
|
import {
|
|
78
78
|
CANONRY_DISCORD_URL,
|
|
79
79
|
CANONRY_ISSUES_URL,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
rawEventSamples,
|
|
119
119
|
readMarketCompetitorNames,
|
|
120
120
|
runs
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-G47XJVAS.js";
|
|
122
122
|
import {
|
|
123
123
|
AdsDeliverySnapshotStatuses,
|
|
124
124
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -155,6 +155,7 @@ import {
|
|
|
155
155
|
RunStatuses,
|
|
156
156
|
RunTriggers,
|
|
157
157
|
SITE_AUDIT_MAX_PAGE_LIMIT,
|
|
158
|
+
SiteAuditIssueRecommendationScopes,
|
|
158
159
|
TrafficEventConfidences,
|
|
159
160
|
TrafficEventKinds,
|
|
160
161
|
TrafficEvidenceKinds,
|
|
@@ -264,6 +265,7 @@ import {
|
|
|
264
265
|
sentimentSummaryRequestSchema,
|
|
265
266
|
shareOfVoiceLabel,
|
|
266
267
|
shareOfVoiceReason,
|
|
268
|
+
siteAuditIssueListQuerySchema,
|
|
267
269
|
siteAuditPageBudgetSchema,
|
|
268
270
|
snapshotProviderModeSchema,
|
|
269
271
|
trafficSamplesQuerySchema,
|
|
@@ -272,7 +274,7 @@ import {
|
|
|
272
274
|
visibilityCompareSelectionSchema,
|
|
273
275
|
visibilityReportRequestSchema,
|
|
274
276
|
winnabilityClassSchema
|
|
275
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-GZ2KIONF.js";
|
|
276
278
|
|
|
277
279
|
// src/cli-commands/sentiment.ts
|
|
278
280
|
import "zod";
|
|
@@ -580,7 +582,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
580
582
|
async function demoCommand(options) {
|
|
581
583
|
const { host, port } = parseDemoListenOptions(options);
|
|
582
584
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
583
|
-
const { createDemoServer } = await import("./demo-server-
|
|
585
|
+
const { createDemoServer } = await import("./demo-server-WRHR25HF.js");
|
|
584
586
|
const app = await createDemoServer({ trustProxy });
|
|
585
587
|
let stopping = false;
|
|
586
588
|
const stop = () => {
|
|
@@ -994,7 +996,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
994
996
|
}
|
|
995
997
|
}
|
|
996
998
|
async function backfillInsightsCommand(project2, opts) {
|
|
997
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
999
|
+
const { IntelligenceService } = await import("./intelligence-service-QXXRUB2G.js");
|
|
998
1000
|
const config = loadConfig();
|
|
999
1001
|
const db = createClient(config.database);
|
|
1000
1002
|
migrate(db);
|
|
@@ -19434,7 +19436,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
19434
19436
|
options: { access: stringOption() },
|
|
19435
19437
|
run: async (input) => {
|
|
19436
19438
|
if (input.positionals.length > 1) throw usageError("Expected at most one command group");
|
|
19437
|
-
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-
|
|
19439
|
+
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-PNJEQV5H.js"), import("./cli-commands-4UT2CRXX.js")]);
|
|
19438
19440
|
printCliCatalog(REGISTERED_CLI_COMMANDS2, input.format, input.positionals[0], getString(input.values, "access"));
|
|
19439
19441
|
}
|
|
19440
19442
|
},
|
|
@@ -19639,6 +19641,66 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
19639
19641
|
function getClient27() {
|
|
19640
19642
|
return createApiClient();
|
|
19641
19643
|
}
|
|
19644
|
+
async function technicalAeoIssues(project2, opts) {
|
|
19645
|
+
const res = await getClient27().getSiteAuditIssues(project2, opts);
|
|
19646
|
+
if (opts.format === "jsonl") {
|
|
19647
|
+
const { issues, ...context } = res;
|
|
19648
|
+
emitJsonl([{ kind: "site-health-issues-header", ...context }]);
|
|
19649
|
+
emitJsonl(issues.map((issue) => ({ kind: "site-health-issue", ...context, ...issue })));
|
|
19650
|
+
return;
|
|
19651
|
+
}
|
|
19652
|
+
if (isMachineFormat(opts.format)) {
|
|
19653
|
+
console.log(JSON.stringify(res, null, 2));
|
|
19654
|
+
return;
|
|
19655
|
+
}
|
|
19656
|
+
const lines = [`Stored audit issues for "${project2}":`, ...issueEvidenceProvenance(res)];
|
|
19657
|
+
if (res.issues.length === 0) lines.push("No issue groups returned; use the evidence coverage above when interpreting this result.");
|
|
19658
|
+
for (const issue of res.issues) {
|
|
19659
|
+
const severity = issue.severity === null ? "" : ` \xB7 ${issue.severity}`;
|
|
19660
|
+
lines.push("", `[${issue.disposition}${severity}] ${issue.code} \xB7 ${issue.affectedPages} page(s)`, issue.message);
|
|
19661
|
+
lines.push(`Issue: ${issue.id}${issue.stableIdentity ? "" : " (identity is specific to this scan)"}`);
|
|
19662
|
+
for (const example of issue.examples) lines.push(` ${example.url}`);
|
|
19663
|
+
if (issue.examplesTruncated) lines.push("More affected pages are available with site-health issue-pages.");
|
|
19664
|
+
if (issue.messageTruncated) lines.push("The saved message is shortened; inspect the affected pages for context.");
|
|
19665
|
+
}
|
|
19666
|
+
if (res.nextCursor) lines.push("", `Next cursor: ${res.nextCursor}`);
|
|
19667
|
+
console.log(lines.join("\n"));
|
|
19668
|
+
}
|
|
19669
|
+
async function technicalAeoIssuePages(project2, opts) {
|
|
19670
|
+
const res = await getClient27().getSiteAuditIssuePages(project2, opts.issueId, opts);
|
|
19671
|
+
if (opts.format === "jsonl") {
|
|
19672
|
+
const { pages, ...context } = res;
|
|
19673
|
+
emitJsonl([{ kind: "site-health-issue-pages-header", ...context }]);
|
|
19674
|
+
emitJsonl(pages.map((page) => ({ kind: "site-health-issue-page", ...context, ...page })));
|
|
19675
|
+
return;
|
|
19676
|
+
}
|
|
19677
|
+
if (isMachineFormat(opts.format)) {
|
|
19678
|
+
console.log(JSON.stringify(res, null, 2));
|
|
19679
|
+
return;
|
|
19680
|
+
}
|
|
19681
|
+
const lines = [`Pages for audit issue ${res.issueId}:`, ...issueEvidenceProvenance(res)];
|
|
19682
|
+
if (res.pages.length === 0) lines.push("No affected pages returned; unavailable or partial evidence does not establish a clean site.");
|
|
19683
|
+
for (const page of res.pages) {
|
|
19684
|
+
lines.push("", page.url, page.message);
|
|
19685
|
+
if (page.messageTruncated) lines.push("The saved message is shortened.");
|
|
19686
|
+
if (page.recommendations.length > 0) {
|
|
19687
|
+
lines.push(page.recommendationsScope === SiteAuditIssueRecommendationScopes.issue ? "Guidance for this issue:" : "Guidance for this page\u2019s whole factor (not issue-specific):");
|
|
19688
|
+
for (const recommendation of page.recommendations) lines.push(` ${recommendation}`);
|
|
19689
|
+
}
|
|
19690
|
+
if (page.recommendationsTruncated) lines.push("Additional guidance was omitted from this bounded result.");
|
|
19691
|
+
}
|
|
19692
|
+
if (res.nextCursor) lines.push("", `Next cursor: ${res.nextCursor}`);
|
|
19693
|
+
console.log(lines.join("\n"));
|
|
19694
|
+
}
|
|
19695
|
+
function issueEvidenceProvenance(res) {
|
|
19696
|
+
return [
|
|
19697
|
+
`Scan: ${res.runId ?? "none"} \xB7 attempt ${res.attemptId ?? "unknown"} \xB7 audited ${res.auditedAt ?? "unknown"} \xB7 status ${res.runStatus ?? "unknown"}`,
|
|
19698
|
+
`Evidence: ${res.state} \xB7 crawl ${res.runId === null ? "unavailable" : res.complete ? "complete" : "partial"}${res.termination ? ` (${res.termination})` : ""}`,
|
|
19699
|
+
`Page findings: ${res.coverage.pageFindings}; cross-page checks: ${res.coverage.crossPage}. Finding evidence for ${res.coverage.pagesWithFindingEvidence}/${res.coverage.auditedPages} audited page(s).`,
|
|
19700
|
+
`${res.coverage.pagesWithoutFindingEvidence} audited page(s) lack finding evidence; ${res.coverage.omittedFindings} malformed or uncoded finding(s) omitted.`,
|
|
19701
|
+
`Total in this stored selection: ${res.total ?? "unknown"}.`
|
|
19702
|
+
];
|
|
19703
|
+
}
|
|
19642
19704
|
async function technicalAeoScore(project2, opts) {
|
|
19643
19705
|
const client = getClient27();
|
|
19644
19706
|
const score = await client.getTechnicalAeoScore(project2, { runId: opts.runId });
|
|
@@ -20180,7 +20242,53 @@ function isSiteHealthScope(value) {
|
|
|
20180
20242
|
function isSiteHealthChange(value) {
|
|
20181
20243
|
return value === "all" || value === "added" || value === "removed" || value === "changed";
|
|
20182
20244
|
}
|
|
20245
|
+
function auditIssueSelection(input, command, usage) {
|
|
20246
|
+
const limit = getString(input.values, "limit");
|
|
20247
|
+
const selection2 = siteAuditIssueListQuerySchema.safeParse({
|
|
20248
|
+
runId: getString(input.values, "run-id"),
|
|
20249
|
+
cursor: getString(input.values, "cursor"),
|
|
20250
|
+
limit: limit === void 0 ? void 0 : Number(limit)
|
|
20251
|
+
});
|
|
20252
|
+
if (!selection2.success) {
|
|
20253
|
+
throw usageError(`Error: invalid saved audit selection
|
|
20254
|
+
Usage: ${usage}`, {
|
|
20255
|
+
message: "Use non-empty run and cursor IDs, and an integer --limit from 1 to 100.",
|
|
20256
|
+
details: { command, usage }
|
|
20257
|
+
});
|
|
20258
|
+
}
|
|
20259
|
+
return selection2.data;
|
|
20260
|
+
}
|
|
20183
20261
|
var TECHNICAL_AEO_CLI_COMMANDS_BASE = [
|
|
20262
|
+
{
|
|
20263
|
+
path: ["technical-aeo", "issues"],
|
|
20264
|
+
usage: "canonry technical-aeo issues <project> [--run-id <id>] [--cursor <cursor>] [--limit <n>] [--format json|jsonl]",
|
|
20265
|
+
access: "stored",
|
|
20266
|
+
options: { "run-id": stringOption(), cursor: stringOption(), limit: stringOption() },
|
|
20267
|
+
run: async (input) => {
|
|
20268
|
+
const usage = "canonry technical-aeo issues <project> [--run-id <id>] [--cursor <cursor>] [--limit <n>] [--format json|jsonl]";
|
|
20269
|
+
const project2 = requireProject(input, "technical-aeo.issues", usage);
|
|
20270
|
+
await technicalAeoIssues(project2, {
|
|
20271
|
+
...auditIssueSelection(input, "technical-aeo.issues", usage),
|
|
20272
|
+
format: input.format
|
|
20273
|
+
});
|
|
20274
|
+
}
|
|
20275
|
+
},
|
|
20276
|
+
{
|
|
20277
|
+
path: ["technical-aeo", "issue-pages"],
|
|
20278
|
+
usage: "canonry technical-aeo issue-pages <project> --issue-id <id> [--run-id <id>] [--cursor <cursor>] [--limit <n>] [--format json|jsonl]",
|
|
20279
|
+
access: "stored",
|
|
20280
|
+
options: { "issue-id": stringOption(), "run-id": stringOption(), cursor: stringOption(), limit: stringOption() },
|
|
20281
|
+
run: async (input) => {
|
|
20282
|
+
const usage = "canonry technical-aeo issue-pages <project> --issue-id <id> [--run-id <id>] [--cursor <cursor>] [--limit <n>] [--format json|jsonl]";
|
|
20283
|
+
const project2 = requireProject(input, "technical-aeo.issue-pages", usage);
|
|
20284
|
+
const issueId = requireStringOption(input, "issue-id", { command: "technical-aeo.issue-pages", usage, message: "--issue-id is required" });
|
|
20285
|
+
await technicalAeoIssuePages(project2, {
|
|
20286
|
+
issueId,
|
|
20287
|
+
...auditIssueSelection(input, "technical-aeo.issue-pages", usage),
|
|
20288
|
+
format: input.format
|
|
20289
|
+
});
|
|
20290
|
+
}
|
|
20291
|
+
},
|
|
20184
20292
|
{
|
|
20185
20293
|
path: ["technical-aeo", "score"],
|
|
20186
20294
|
usage: "canonry technical-aeo score <project> [--run-id <id>] [--format json]",
|
|
@@ -20616,6 +20724,16 @@ Usage: ${usage}`, {
|
|
|
20616
20724
|
};
|
|
20617
20725
|
}
|
|
20618
20726
|
var SITE_HEALTH_COMPATIBILITY_COMMANDS = [
|
|
20727
|
+
siteHealthAlias(
|
|
20728
|
+
["technical-aeo", "issues"],
|
|
20729
|
+
["site-health", "issues"],
|
|
20730
|
+
"canonry site-health issues <project> [--run-id <id>] [--cursor <cursor>] [--limit <n>] [--format json|jsonl]"
|
|
20731
|
+
),
|
|
20732
|
+
siteHealthAlias(
|
|
20733
|
+
["technical-aeo", "issue-pages"],
|
|
20734
|
+
["site-health", "issue-pages"],
|
|
20735
|
+
"canonry site-health issue-pages <project> --issue-id <id> [--run-id <id>] [--cursor <cursor>] [--limit <n>] [--format json|jsonl]"
|
|
20736
|
+
),
|
|
20619
20737
|
siteHealthAlias(
|
|
20620
20738
|
["technical-aeo", "crawl"],
|
|
20621
20739
|
["site-health", "overview"],
|