@canonry/canonry 5.29.1 → 5.30.1
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/canonry/references/aeo-analysis.md +12 -0
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +47 -0
- package/assets/assets/{AuditHistoryPanel-B_H7nIp7.js → AuditHistoryPanel-8GPJdEWL.js} +1 -1
- package/assets/assets/{BacklinksPage-rhms6z2S.js → BacklinksPage-8-KPXFtA.js} +1 -1
- package/assets/assets/{HistoryPage-CWPETgrG.js → HistoryPage-CKgF71m5.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-nfGYHl6C.js +1 -0
- package/assets/assets/ProjectPage-BPtdO-Gp.js +8 -0
- package/assets/assets/{RunRow-DQPW7FIF.js → RunRow-C3CRRfb4.js} +1 -1
- package/assets/assets/{RunsPage-BOM_RkNi.js → RunsPage-BvCCjtqM.js} +1 -1
- package/assets/assets/{SettingsPage-BDnT6wtM.js → SettingsPage-B1QuP6Cv.js} +1 -1
- package/assets/assets/{SiteHealthSection-lcZA1XpM.js → SiteHealthSection-DgM3aTd-.js} +3 -3
- package/assets/assets/{TrafficPage-D4nGSfXx.js → TrafficPage-DEUDhBXG.js} +2 -2
- package/assets/assets/{TrafficSourceDetailPage-CvZcCbic.js → TrafficSourceDetailPage-gpgLsGA1.js} +1 -1
- package/assets/assets/{extract-error-message-BJ3f0StM.js → extract-error-message-CH4G5kw6.js} +1 -1
- package/assets/assets/index-B2qeAPfR.js +86 -0
- package/assets/assets/index-D0bY1wpI.css +1 -0
- package/assets/assets/{react-sigma_core.esm.min-c7qzyLLe.js → react-sigma_core.esm.min-CG4hSMQ3.js} +1 -1
- package/assets/assets/{v2-overview-adapter-Dsd6dWtE.js → v2-overview-adapter-QNwqt0UG.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-WL2SHCPU.js → chunk-DFIK6IPP.js} +177 -1
- package/dist/{chunk-N2SVFXOB.js → chunk-LLVE7B3V.js} +1143 -615
- package/dist/{chunk-ASYPQYVV.js → chunk-NEP2PJ2T.js} +3 -3
- package/dist/{chunk-FKL5EGOW.js → chunk-RCX6I3DX.js} +2147 -1697
- package/dist/{chunk-RHZKOXDZ.js → chunk-TPJ4MMZ6.js} +4377 -2551
- package/dist/{chunk-PTTVDWMN.js → chunk-TWYIUHJU.js} +2 -2
- package/dist/{chunk-XWBQWAVE.js → chunk-WZL73LY3.js} +269 -83
- package/dist/cli.js +1787 -1528
- package/dist/{demo-server-VGUIDC5T.js → demo-server-EU5DGFB3.js} +4 -4
- package/dist/index.d.ts +7 -0
- package/dist/index.js +6 -6
- package/dist/{intelligence-service-IQA4U3RA.js → intelligence-service-SUFG6ICC.js} +2 -2
- package/dist/mcp.js +4 -4
- package/package.json +12 -11
- package/assets/assets/MeasurementPropertyPage-D9-54Je9.js +0 -1
- package/assets/assets/ProjectPage-eNVzxsZW.js +0 -8
- package/assets/assets/index-Cncchurw.js +0 -86
- package/assets/assets/index-DfhmHULl.css +0 -1
package/assets/assets/{react-sigma_core.esm.min-c7qzyLLe.js → react-sigma_core.esm.min-CG4hSMQ3.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-DgM3aTd-.js";import"./index-B2qeAPfR.js";import"./vendor-radix-twS1M3FF.js";import"./vendor-recharts-llkUFBGR.js";import"./vendor-lucide-N6vOpZmh.js";import"./vendor-markdown-B4giJcws.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-B5okB5g-.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{j as s,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{E as ie,B as oe,aO as le}from"./index-Cncchurw.js";import{M as ue}from"./vendor-markdown-B4giJcws.js";import{C as ce,$ as de,g as J}from"./vendor-lucide-N6vOpZmh.js";const Ie="Sources",_={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function pe({headingLevel:e}){return n=>{const l=[],u=c=>{c.type==="heading"&&c.depth&&l.push(c),c.children?.forEach(u)};u(n);const f=l.reduce((c,p)=>Math.min(c,p.depth),6);for(const c of l){const p=c.depth-f;c.depth=Math.min(6,e+p),c.data={...c.data,hProperties:{...c.data?.hProperties,"data-answer-heading-level":p+1}}}}}function me({answer:e}){const[n,l]=C.useState("idle"),u=C.useRef(!1),f=async()=>{if(!u.current){u.current=!0,l("copying");try{await navigator.clipboard.writeText(e),l("copied")}catch{l("failed")}finally{u.current=!1}}};return s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[s.jsx(oe,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":n==="copying","aria-busy":n==="copying",onClick:()=>{f()},children:n==="copying"?_.copying:_.copy}),s.jsx("span",{role:"status",className:"text-sm text-secondary",children:n==="copied"?_.copied:n==="failed"?_.failed:""})]})}function Me({children:e,headingLevel:n=4,copyable:l=!1}){return s.jsxs("div",{className:"answer-markdown",children:[s.jsx(ue,{remarkPlugins:[[pe,{headingLevel:n}]],components:{p:({children:u})=>s.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:u}),ul:({children:u})=>s.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:u}),ol:({children:u,start:f})=>s.jsx("ol",{start:f,className:"mb-3 ml-5 list-decimal space-y-1",children:u}),pre:({children:u})=>s.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:u}),a:({children:u,href:f})=>{const c=ie(f);return c?s.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:u}):s.jsx("span",{children:u})},img:({alt:u})=>s.jsx("span",{children:u})},children:e}),l&&e.trim()?s.jsx(me,{answer:e},e):null]})}const X="min-h-11 w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",D="flex min-h-11 w-full items-center justify-between gap-3 rounded px-2 text-left text-sm text-primary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",E=e=>e.kind==="project"?"Whole site":e.label,q={allMarkets:"All markets",browse:e=>`Browse ${e}`,select:e=>`Select ${e}`,browseAll:"Browse all properties"},ge=e=>e?.kind==="group"&&e.marketKeys?.length===1?e.marketKeys[0]:void 0,ee=e=>`${e} ${e===1?"property":"properties"}`;function Ke({options:e,selected:n,onSelect:l,marketKey:u,label:f="Measurement scope",labelVisibility:c="visible",allowGroupSelect:p=!0}){const a=[...e].sort((t,o)=>t.label.localeCompare(o.label,void 0,{numeric:!0})||t.id.localeCompare(o.id)),[x,k]=C.useState(""),[I,M]=C.useState([]),[y,N]=C.useState(!1),b=C.useRef(null),v=C.useRef(null),r=C.useId(),g=a.filter(t=>t.kind==="group"),m=new Map(g.map(t=>[t.id,t])),i=m.get(I.at(-1)??""),U=m.get(I.at(-2)??""),h=x.trim().toLocaleLowerCase(),re=g.filter(t=>!t.parentGroupIds?.some(o=>m.has(o))),w=a.filter(t=>t.kind==="property"),O=t=>(t.parentGroupIds??[]).map(o=>m.get(o)?.label).filter(Boolean).join(" · "),R=t=>`${E(t)} ${O(t)}`.toLocaleLowerCase().includes(h),F=t=>{const o=[...t.parentGroupIds??[]],d=new Set;for(;o.length;){const j=o.pop();if(j===i?.id)return!0;d.has(j)||(d.add(j),o.push(...m.get(j)?.parentGroupIds??[]))}return!1},K=(y?[]:i?g.filter(t=>h?F(t):t.parentGroupIds?.includes(i.id)):h?g:re).filter(R),S=a.find(t=>t.kind==="market"&&t.id===(u??(n.kind==="market"?n.id:void 0))),H=i&&S&&(i.marketKeys?.includes(S.id)||S.parentGroupIds?.includes(i.id))?S.id:void 0,L=p?H??ge(i):void 0,G=(i?w.filter(t=>t.parentGroupIds?.includes(i.id)&&(!L||t.marketKeys?.includes(L))):h||y||g.length===0?w:[]).filter(R),W=a.filter(t=>t.kind!=="market"||y||!p&&!i&&!h&&g.length>0||p&&i?.marketKeys?.length===1&&!h?!1:(i?h?F(t):t.parentGroupIds?.includes(i.id):h||!t.parentGroupIds?.some(d=>m.has(d)))&&R(t)),z=i||y?[]:a.filter(t=>t.kind==="project"&&R(t));C.useEffect(()=>{const t=o=>{b.current?.open&&o.target instanceof Node&&!b.current.contains(o.target)&&(b.current.open=!1)};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[]);const se=t=>{b.current&&(b.current.open=!1,b.current.querySelector("summary")?.focus());const o=p?t.kind==="property"?L:t.kind==="group"&&t.id===i?.id?H:void 0:void 0;o?l(t,o):l(t)},T=t=>{const o=[];let d=m.get(t.parentGroupIds?.[0]??"");for(;d&&!o.includes(d.id)&&d.id!==t.id;)o.unshift(d.id),d=m.get(d.parentGroupIds?.[0]??"");return[...o,t.id]},ae=()=>{const t=n.kind==="group"?m.get(n.id):void 0,o=m.get(S?.parentGroupIds?.[0]??""),d=(n.parentGroupIds??[]).flatMap(A=>{const B=m.get(A);return B?[T(B)]:[]}),j=d.find(A=>A.at(-1)===i?.id)??d.sort((A,B)=>B.length-A.length)[0]??[],Z=o?T(o):n.marketKeys?.length?[]:j;M(t?T(t):Z),N(n.kind==="property"&&Z.length===0&&g.length>0),k("")},Y=t=>{M(T(t)),N(!1),k(""),v.current?.focus()},P=(t,o=E(t))=>s.jsxs("div",{className:"flex items-stretch",children:[s.jsxs("button",{type:"button",className:D,"aria-label":t.kind==="group"&&!p?q.browse(E(t)):q.select(E(t)),"aria-current":n.kind===t.kind&&n.id===t.id?"true":void 0,onClick:()=>t.kind==="group"&&!p?Y(t):se(t),children:[s.jsxs("span",{className:"min-w-0 break-words",children:[o,h&&O(t)?s.jsx("span",{className:"block text-[13px] text-secondary",children:O(t)}):null]}),s.jsx("span",{className:"shrink-0 text-right text-[13px] text-secondary",children:t.kind==="market"?p?"Query context":"Market":t.kind==="property"?"Property":ee(t.targetCount)})]}),p&&t.kind==="group"&&t.id!==i?.id&&a.some(d=>d.parentGroupIds?.includes(t.id))?s.jsx("button",{type:"button","aria-label":q.browse(t.label),title:`Browse ${t.label}`,className:"flex min-h-11 min-w-11 items-center justify-center rounded text-secondary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",onClick:()=>Y(t),children:s.jsx(J,{size:18,"aria-hidden":"true"})}):null]},`${t.kind}:${t.id}`),V=(t,o)=>o.length>0?s.jsxs("section",{"aria-label":t,className:"mt-2",children:[s.jsx("h3",{className:"px-2 py-2 text-[13px] font-medium text-secondary",children:t}),o.map(d=>P(d))]}):null,Q=(t,o,d)=>o.length>0?s.jsxs("details",{open:d,className:"mt-2 border-y border-default",children:[s.jsxs("summary",{className:"min-h-11 cursor-pointer px-2 py-3 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[t," (",o.length,")"]}),o.map(j=>P(j))]},`${i?.id??"root"}:${t}`):null;return s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{id:`${r}-label`,className:c==="sr-only"?"sr-only":"mb-1 block text-sm font-medium text-heading",children:f}),s.jsxs("details",{ref:b,className:"relative",onToggle:t=>{t.target===t.currentTarget&&t.currentTarget.open&&v.current?.focus()},onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),t.currentTarget.open=!1,t.currentTarget.querySelector("summary")?.focus())},children:[s.jsxs("summary",{id:`${r}-value`,"aria-labelledby":`${r}-label ${r}-value`,className:`${X} visibility-scope-trigger`,onClick:()=>{b.current?.open||ae()},children:[`${E(n)}${n.kind==="group"?` · ${ee(n.targetCount)}`:n.kind==="property"?` · ${a.find(t=>t.kind==="market"&&t.id===u)?.label??(n.marketKeys?.length?q.allMarkets:"Property")}`:n.kind==="market"?" · Market":""}`,s.jsx(ce,{size:16,"aria-hidden":"true",className:"shrink-0 text-secondary"})]}),s.jsxs("div",{className:"visibility-scope-menu",children:[i||y?s.jsxs("div",{className:"mb-2 border-b border-default pb-2",children:[s.jsx("button",{type:"button",className:D,"aria-label":`Back to ${U?.label??"all groups"}`,onClick:()=>{M(I.slice(0,-1)),N(!1),k(""),v.current?.focus()},children:s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(de,{size:16,"aria-hidden":"true"}),U?.label??"All groups"]})}),s.jsx("p",{className:"px-2 py-1 text-sm font-medium text-heading","aria-live":"polite",children:i?.label??"All properties"})]}):null,s.jsx("input",{ref:v,type:"search","aria-label":"Search scopes",className:X,placeholder:i?"Search within this group":y?"Search properties":"Search groups or properties",value:x,onChange:t=>k(t.target.value)}),s.jsxs("div",{className:"mt-2 max-h-80 overflow-y-auto",children:[p&&i&&!h?P(i,"All properties in this group"):null,z.map(t=>P(t)),i&&!h?Q("Subgroups",K,!0):V(i?"Subgroups":"Groups",K),h?V("Properties",G):Q(i&&K.length>0?"All properties":"Properties",G,!i||K.length===0),V("Markets",W),!i&&!y&&!h&&g.length>0&&w.length>0?s.jsxs("button",{type:"button",className:`${D} mt-2 border-t border-default`,"aria-label":q.browseAll,onClick:()=>{N(!0),v.current?.focus()},children:[s.jsx("span",{children:"All properties"}),s.jsx(J,{size:18,"aria-hidden":"true"})]}):null,h&&K.length+G.length+W.length+z.length===0?s.jsx("p",{className:"py-3 text-sm text-secondary",children:"No matching scopes."}):null]})]})]})]})}function Se(e){const n=e[0];return n?e.every(l=>l.mode===n.mode&&l.scope.kind===n.scope.kind&&l.scope.key===n.scope.key&&l.queryClass===n.queryClass&&l.measurement.displayedRunId===n.measurement.displayedRunId):!0}function $(e){return e.state==="unavailable"?{numerator:null,denominator:null,reason:e.reason}:e.numerator===void 0||e.denominator===void 0||e.denominator<=0?{numerator:null,denominator:null,reason:"not_applicable"}:{numerator:e.numerator,denominator:e.denominator,...e.unattributed===void 0?{}:{unattributed:e.unattributed}}}function fe(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function he(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function ye(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function te(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function be(e,n,l){const u=new Map;if(!n)return u;const f=new Map(e.usageEdges.map(a=>[te(a),a.targetKey])),c=new Map(e.assignments.map(a=>[`${a.targetKey}:${a.queryId}`,a.queryClass])),p=new Map(e.usageEdges.map(a=>[te(a),c.get(`${a.targetKey}:${a.queryId}`)]));for(const a of n.evidence){if(l&&p.get(a.usageEdgeId)!==l)continue;const x=f.get(a.usageEdgeId);if(!x)continue;const k=u.get(x)??[];k.push({id:`${a.observationId}:${a.expectedSlotId}:${a.usageEdgeId}:${a.sourceUrl}`,kind:he(a.classification),query:a.queryText,provider:a.provider,location:a.location,url:a.sourceUrl,tone:ye(a.classification),historical:a.historical||a.bridged}),u.set(x,k)}return u}function xe(e){if(e.flags>0)return{label:"Review",tone:"caution"};const n=[e.mentionCoverage,e.citationCoverage].filter(l=>l.state==="unavailable").map(l=>l.reason);return n.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:n.includes("plan_v1")?{label:"Update setup",tone:"caution"}:n.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:n.includes("identity_ambiguous")?{label:le.ambiguous,tone:"caution"}:n.includes("no_population")?{label:"No queries",tone:"neutral"}:n.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function ke(e){return e==="complete"?{label:"Complete",tone:"positive"}:e==="partial"?{label:"Partial",tone:"caution"}:e==="queued"?{label:"Queued",tone:"neutral"}:e==="running"?{label:"Running",tone:"neutral"}:e==="failed"?{label:"Failed",tone:"negative"}:{label:"Not measured",tone:"neutral"}}function Ce(e){if(!e)return"";const n=new Date(e);return Number.isFinite(n.getTime())?n.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function ne(e){const n=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${n} flagged ${n===1?"result needs":"results need"} review.`;if(e.nextAction.kind==="complete_setup")return"Finish setup.";if(e.nextAction.kind==="republish_setup")return"Setup update required.";if(e.nextAction.kind==="run_measurement")return"Ready to measure."}function Ae({overview:e,activePlan:n,report:l,reportState:u=l?"ready":"loading",sort:f}){if(n.plan.schemaVersion!==2||e.mode!=="active-v2")throw new Error("The current overview requires an active version-two setup.");if(e.scope.kind!=="all"&&e.scope.kind!=="group")throw new Error("The current overview requires an All Properties or group scope.");const c=n.plan,p=new Map(c.targets.map(r=>[r.stableKey,r])),a=new Map(c.querySnapshots.map(r=>[r.queryId,r.queryText])),x=new Map;for(const r of c.assignments){if(e.queryClass!=="all"&&r.queryClass!==e.queryClass)continue;const g=a.get(r.queryId);if(!g)continue;const m=x.get(r.targetKey)??new Set;m.add(g),x.set(r.targetKey,m)}const k=l?.revision===n.revision&&l.run?.id===e.measurement.displayedRunId?l:null,I=e.measurement.displayedRunId===void 0||k?"ready":u==="error"||l!=null?"error":"loading",M=be(c,k,e.queryClass==="all"?void 0:e.queryClass),y=new Map;for(const r of c.groups)for(const g of r.targetKeys)y.has(g)||y.set(g,r.label);const N=e.properties.items.map(r=>{const g=p.get(r.targetKey),m=M.get(r.targetKey)??[];return{id:r.targetKey,name:r.label,mentionCoverage:$(r.mentionCoverage),citationCoverage:$(r.citationCoverage),status:xe(r),providers:r.providers?.map(i=>({provider:i.provider,mentionCoverage:$(i.mentionCoverage),citationCoverage:$(i.citationCoverage)})),market:y.get(r.targetKey),assignedQueries:[...x.get(r.targetKey)??[]],urls:g?.urlMatchers.map(fe)??[],evidence:m,evidenceState:I,historical:m.some(i=>i.historical)}}),b=e.namedShareOfVoice?.entries.map(r=>({name:r.label,coverage:{numerator:r.credits,denominator:e.namedShareOfVoice.denominator}})),v=e.properties.items.flatMap(r=>r.flags>0?[{id:`property:${r.targetKey}`,property:r.label,summary:`${r.flags} ${r.flags===1?"result needs":"results need"} review.`,tone:"caution",count:r.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:ke(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:Ce(e.measurement.completedAt),includesBridgedHistory:e.measurement.includesHistoricalData===!0},currentView:{scope:e.scope.kind==="group"?{kind:"group",...e.scope.key?{key:e.scope.key}:{}}:{kind:"all"},queryClass:e.queryClass,aggregate:{metrics:{propertiesMentioned:$(e.metrics.propertiesMentioned),mentionCoverage:$(e.metrics.mentionCoverage),citationCoverage:$(e.metrics.citationCoverage)},properties:N,...b?{shareOfVoice:b}:{}},propertyTotal:e.properties.totalEstimate??N.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...f?{sort:f}:{}},availableGroups:c.groups.map(r=>({id:r.stableKey,label:r.label})),...ne(e)?{nextActionText:ne(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:v}}export{Me as A,q as M,Ke as V,Ie as a,Se as b,Ae as c,fe as m};
|
|
1
|
+
import{j as s,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{J as ie,B as oe,aU as le}from"./index-B2qeAPfR.js";import{M as ue}from"./vendor-markdown-B4giJcws.js";import{C as ce,$ as de,g as Z}from"./vendor-lucide-N6vOpZmh.js";const Ie="Sources",_={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function pe({headingLevel:e}){return n=>{const l=[],u=c=>{c.type==="heading"&&c.depth&&l.push(c),c.children?.forEach(u)};u(n);const f=l.reduce((c,p)=>Math.min(c,p.depth),6);for(const c of l){const p=c.depth-f;c.depth=Math.min(6,e+p),c.data={...c.data,hProperties:{...c.data?.hProperties,"data-answer-heading-level":p+1}}}}}function me({answer:e}){const[n,l]=C.useState("idle"),u=C.useRef(!1),f=async()=>{if(!u.current){u.current=!0,l("copying");try{await navigator.clipboard.writeText(e),l("copied")}catch{l("failed")}finally{u.current=!1}}};return s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[s.jsx(oe,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":n==="copying","aria-busy":n==="copying",onClick:()=>{f()},children:n==="copying"?_.copying:_.copy}),s.jsx("span",{role:"status",className:"text-sm text-secondary",children:n==="copied"?_.copied:n==="failed"?_.failed:""})]})}function Me({children:e,headingLevel:n=4,copyable:l=!1}){return s.jsxs("div",{className:"answer-markdown",children:[s.jsx(ue,{remarkPlugins:[[pe,{headingLevel:n}]],components:{p:({children:u})=>s.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:u}),ul:({children:u})=>s.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:u}),ol:({children:u,start:f})=>s.jsx("ol",{start:f,className:"mb-3 ml-5 list-decimal space-y-1",children:u}),pre:({children:u})=>s.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:u}),a:({children:u,href:f})=>{const c=ie(f);return c?s.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:u}):s.jsx("span",{children:u})},img:({alt:u})=>s.jsx("span",{children:u})},children:e}),l&&e.trim()?s.jsx(me,{answer:e},e):null]})}const X="min-h-11 w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",D="flex min-h-11 w-full items-center justify-between gap-3 rounded px-2 text-left text-sm text-primary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",E=e=>e.kind==="project"?"Whole site":e.label,q={allMarkets:"All markets",browse:e=>`Browse ${e}`,select:e=>`Select ${e}`,browseAll:"Browse all properties"},ge=e=>e?.kind==="group"&&e.marketKeys?.length===1?e.marketKeys[0]:void 0,ee=e=>`${e} ${e===1?"property":"properties"}`;function Ke({options:e,selected:n,onSelect:l,marketKey:u,label:f="Measurement scope",labelVisibility:c="visible",allowGroupSelect:p=!0}){const a=[...e].sort((t,o)=>t.label.localeCompare(o.label,void 0,{numeric:!0})||t.id.localeCompare(o.id)),[x,k]=C.useState(""),[I,M]=C.useState([]),[y,N]=C.useState(!1),b=C.useRef(null),v=C.useRef(null),r=C.useId(),g=a.filter(t=>t.kind==="group"),m=new Map(g.map(t=>[t.id,t])),i=m.get(I.at(-1)??""),U=m.get(I.at(-2)??""),h=x.trim().toLocaleLowerCase(),re=g.filter(t=>!t.parentGroupIds?.some(o=>m.has(o))),w=a.filter(t=>t.kind==="property"),O=t=>(t.parentGroupIds??[]).map(o=>m.get(o)?.label).filter(Boolean).join(" · "),R=t=>`${E(t)} ${O(t)}`.toLocaleLowerCase().includes(h),F=t=>{const o=[...t.parentGroupIds??[]],d=new Set;for(;o.length;){const j=o.pop();if(j===i?.id)return!0;d.has(j)||(d.add(j),o.push(...m.get(j)?.parentGroupIds??[]))}return!1},K=(y?[]:i?g.filter(t=>h?F(t):t.parentGroupIds?.includes(i.id)):h?g:re).filter(R),S=a.find(t=>t.kind==="market"&&t.id===(u??(n.kind==="market"?n.id:void 0))),H=i&&S&&(i.marketKeys?.includes(S.id)||S.parentGroupIds?.includes(i.id))?S.id:void 0,L=p?H??ge(i):void 0,G=(i?w.filter(t=>t.parentGroupIds?.includes(i.id)&&(!L||t.marketKeys?.includes(L))):h||y||g.length===0?w:[]).filter(R),W=a.filter(t=>t.kind!=="market"||y||!p&&!i&&!h&&g.length>0||p&&i?.marketKeys?.length===1&&!h?!1:(i?h?F(t):t.parentGroupIds?.includes(i.id):h||!t.parentGroupIds?.some(d=>m.has(d)))&&R(t)),z=i||y?[]:a.filter(t=>t.kind==="project"&&R(t));C.useEffect(()=>{const t=o=>{b.current?.open&&o.target instanceof Node&&!b.current.contains(o.target)&&(b.current.open=!1)};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[]);const se=t=>{b.current&&(b.current.open=!1,b.current.querySelector("summary")?.focus());const o=p?t.kind==="property"?L:t.kind==="group"&&t.id===i?.id?H:void 0:void 0;o?l(t,o):l(t)},T=t=>{const o=[];let d=m.get(t.parentGroupIds?.[0]??"");for(;d&&!o.includes(d.id)&&d.id!==t.id;)o.unshift(d.id),d=m.get(d.parentGroupIds?.[0]??"");return[...o,t.id]},ae=()=>{const t=n.kind==="group"?m.get(n.id):void 0,o=m.get(S?.parentGroupIds?.[0]??""),d=(n.parentGroupIds??[]).flatMap(A=>{const B=m.get(A);return B?[T(B)]:[]}),j=d.find(A=>A.at(-1)===i?.id)??d.sort((A,B)=>B.length-A.length)[0]??[],J=o?T(o):n.marketKeys?.length?[]:j;M(t?T(t):J),N(n.kind==="property"&&J.length===0&&g.length>0),k("")},Y=t=>{M(T(t)),N(!1),k(""),v.current?.focus()},P=(t,o=E(t))=>s.jsxs("div",{className:"flex items-stretch",children:[s.jsxs("button",{type:"button",className:D,"aria-label":t.kind==="group"&&!p?q.browse(E(t)):q.select(E(t)),"aria-current":n.kind===t.kind&&n.id===t.id?"true":void 0,onClick:()=>t.kind==="group"&&!p?Y(t):se(t),children:[s.jsxs("span",{className:"min-w-0 break-words",children:[o,h&&O(t)?s.jsx("span",{className:"block text-[13px] text-secondary",children:O(t)}):null]}),s.jsx("span",{className:"shrink-0 text-right text-[13px] text-secondary",children:t.kind==="market"?p?"Query context":"Market":t.kind==="property"?"Property":ee(t.targetCount)})]}),p&&t.kind==="group"&&t.id!==i?.id&&a.some(d=>d.parentGroupIds?.includes(t.id))?s.jsx("button",{type:"button","aria-label":q.browse(t.label),title:`Browse ${t.label}`,className:"flex min-h-11 min-w-11 items-center justify-center rounded text-secondary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",onClick:()=>Y(t),children:s.jsx(Z,{size:18,"aria-hidden":"true"})}):null]},`${t.kind}:${t.id}`),V=(t,o)=>o.length>0?s.jsxs("section",{"aria-label":t,className:"mt-2",children:[s.jsx("h3",{className:"px-2 py-2 text-[13px] font-medium text-secondary",children:t}),o.map(d=>P(d))]}):null,Q=(t,o,d)=>o.length>0?s.jsxs("details",{open:d,className:"mt-2 border-y border-default",children:[s.jsxs("summary",{className:"min-h-11 cursor-pointer px-2 py-3 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[t," (",o.length,")"]}),o.map(j=>P(j))]},`${i?.id??"root"}:${t}`):null;return s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{id:`${r}-label`,className:c==="sr-only"?"sr-only":"mb-1 block text-sm font-medium text-heading",children:f}),s.jsxs("details",{ref:b,className:"relative",onToggle:t=>{t.target===t.currentTarget&&t.currentTarget.open&&v.current?.focus()},onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),t.currentTarget.open=!1,t.currentTarget.querySelector("summary")?.focus())},children:[s.jsxs("summary",{id:`${r}-value`,"aria-labelledby":`${r}-label ${r}-value`,className:`${X} visibility-scope-trigger`,onClick:()=>{b.current?.open||ae()},children:[`${E(n)}${n.kind==="group"?` · ${ee(n.targetCount)}`:n.kind==="property"?` · ${a.find(t=>t.kind==="market"&&t.id===u)?.label??(n.marketKeys?.length?q.allMarkets:"Property")}`:n.kind==="market"?" · Market":""}`,s.jsx(ce,{size:16,"aria-hidden":"true",className:"shrink-0 text-secondary"})]}),s.jsxs("div",{className:"visibility-scope-menu",children:[i||y?s.jsxs("div",{className:"mb-2 border-b border-default pb-2",children:[s.jsx("button",{type:"button",className:D,"aria-label":`Back to ${U?.label??"all groups"}`,onClick:()=>{M(I.slice(0,-1)),N(!1),k(""),v.current?.focus()},children:s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(de,{size:16,"aria-hidden":"true"}),U?.label??"All groups"]})}),s.jsx("p",{className:"px-2 py-1 text-sm font-medium text-heading","aria-live":"polite",children:i?.label??"All properties"})]}):null,s.jsx("input",{ref:v,type:"search","aria-label":"Search scopes",className:X,placeholder:i?"Search within this group":y?"Search properties":"Search groups or properties",value:x,onChange:t=>k(t.target.value)}),s.jsxs("div",{className:"mt-2 max-h-80 overflow-y-auto",children:[p&&i&&!h?P(i,"All properties in this group"):null,z.map(t=>P(t)),i&&!h?Q("Subgroups",K,!0):V(i?"Subgroups":"Groups",K),h?V("Properties",G):Q(i&&K.length>0?"All properties":"Properties",G,!i||K.length===0),V("Markets",W),!i&&!y&&!h&&g.length>0&&w.length>0?s.jsxs("button",{type:"button",className:`${D} mt-2 border-t border-default`,"aria-label":q.browseAll,onClick:()=>{N(!0),v.current?.focus()},children:[s.jsx("span",{children:"All properties"}),s.jsx(Z,{size:18,"aria-hidden":"true"})]}):null,h&&K.length+G.length+W.length+z.length===0?s.jsx("p",{className:"py-3 text-sm text-secondary",children:"No matching scopes."}):null]})]})]})]})}function Se(e){const n=e[0];return n?e.every(l=>l.mode===n.mode&&l.scope.kind===n.scope.kind&&l.scope.key===n.scope.key&&l.queryClass===n.queryClass&&l.measurement.displayedRunId===n.measurement.displayedRunId):!0}function $(e){return e.state==="unavailable"?{numerator:null,denominator:null,reason:e.reason}:e.numerator===void 0||e.denominator===void 0||e.denominator<=0?{numerator:null,denominator:null,reason:"not_applicable"}:{numerator:e.numerator,denominator:e.denominator,...e.unattributed===void 0?{}:{unattributed:e.unattributed}}}function fe(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function he(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function ye(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function te(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function be(e,n,l){const u=new Map;if(!n)return u;const f=new Map(e.usageEdges.map(a=>[te(a),a.targetKey])),c=new Map(e.assignments.map(a=>[`${a.targetKey}:${a.queryId}`,a.queryClass])),p=new Map(e.usageEdges.map(a=>[te(a),c.get(`${a.targetKey}:${a.queryId}`)]));for(const a of n.evidence){if(l&&p.get(a.usageEdgeId)!==l)continue;const x=f.get(a.usageEdgeId);if(!x)continue;const k=u.get(x)??[];k.push({id:`${a.observationId}:${a.expectedSlotId}:${a.usageEdgeId}:${a.sourceUrl}`,kind:he(a.classification),query:a.queryText,provider:a.provider,location:a.location,url:a.sourceUrl,tone:ye(a.classification),historical:a.historical||a.bridged}),u.set(x,k)}return u}function xe(e){if(e.flags>0)return{label:"Review",tone:"caution"};const n=[e.mentionCoverage,e.citationCoverage].filter(l=>l.state==="unavailable").map(l=>l.reason);return n.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:n.includes("plan_v1")?{label:"Update setup",tone:"caution"}:n.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:n.includes("identity_ambiguous")?{label:le.ambiguous,tone:"caution"}:n.includes("no_population")?{label:"No queries",tone:"neutral"}:n.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function ke(e){return e==="complete"?{label:"Complete",tone:"positive"}:e==="partial"?{label:"Partial",tone:"caution"}:e==="queued"?{label:"Queued",tone:"neutral"}:e==="running"?{label:"Running",tone:"neutral"}:e==="failed"?{label:"Failed",tone:"negative"}:{label:"Not measured",tone:"neutral"}}function Ce(e){if(!e)return"";const n=new Date(e);return Number.isFinite(n.getTime())?n.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function ne(e){const n=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${n} flagged ${n===1?"result needs":"results need"} review.`;if(e.nextAction.kind==="complete_setup")return"Finish setup.";if(e.nextAction.kind==="republish_setup")return"Setup update required.";if(e.nextAction.kind==="run_measurement")return"Ready to measure."}function Ae({overview:e,activePlan:n,report:l,reportState:u=l?"ready":"loading",sort:f}){if(n.plan.schemaVersion!==2||e.mode!=="active-v2")throw new Error("The current overview requires an active version-two setup.");if(e.scope.kind!=="all"&&e.scope.kind!=="group")throw new Error("The current overview requires an All Properties or group scope.");const c=n.plan,p=new Map(c.targets.map(r=>[r.stableKey,r])),a=new Map(c.querySnapshots.map(r=>[r.queryId,r.queryText])),x=new Map;for(const r of c.assignments){if(e.queryClass!=="all"&&r.queryClass!==e.queryClass)continue;const g=a.get(r.queryId);if(!g)continue;const m=x.get(r.targetKey)??new Set;m.add(g),x.set(r.targetKey,m)}const k=l?.revision===n.revision&&l.run?.id===e.measurement.displayedRunId?l:null,I=e.measurement.displayedRunId===void 0||k?"ready":u==="error"||l!=null?"error":"loading",M=be(c,k,e.queryClass==="all"?void 0:e.queryClass),y=new Map;for(const r of c.groups)for(const g of r.targetKeys)y.has(g)||y.set(g,r.label);const N=e.properties.items.map(r=>{const g=p.get(r.targetKey),m=M.get(r.targetKey)??[];return{id:r.targetKey,name:r.label,mentionCoverage:$(r.mentionCoverage),citationCoverage:$(r.citationCoverage),status:xe(r),providers:r.providers?.map(i=>({provider:i.provider,mentionCoverage:$(i.mentionCoverage),citationCoverage:$(i.citationCoverage)})),market:y.get(r.targetKey),assignedQueries:[...x.get(r.targetKey)??[]],urls:g?.urlMatchers.map(fe)??[],evidence:m,evidenceState:I,historical:m.some(i=>i.historical)}}),b=e.namedShareOfVoice?.entries.map(r=>({name:r.label,coverage:{numerator:r.credits,denominator:e.namedShareOfVoice.denominator}})),v=e.properties.items.flatMap(r=>r.flags>0?[{id:`property:${r.targetKey}`,property:r.label,summary:`${r.flags} ${r.flags===1?"result needs":"results need"} review.`,tone:"caution",count:r.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:ke(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:Ce(e.measurement.completedAt),includesBridgedHistory:e.measurement.includesHistoricalData===!0},currentView:{scope:e.scope.kind==="group"?{kind:"group",...e.scope.key?{key:e.scope.key}:{}}:{kind:"all"},queryClass:e.queryClass,aggregate:{metrics:{propertiesMentioned:$(e.metrics.propertiesMentioned),mentionCoverage:$(e.metrics.mentionCoverage),citationCoverage:$(e.metrics.citationCoverage)},properties:N,...b?{shareOfVoice:b}:{}},propertyTotal:e.properties.totalEstimate??N.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...f?{sort:f}:{}},availableGroups:c.groups.map(r=>({id:r.stableKey,label:r.label})),...ne(e)?{nextActionText:ne(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:v}}export{Me as A,q as M,Ke as V,Ie as a,Se as b,Ae as c,fe as m};
|
package/assets/index.html
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
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-B2qeAPfR.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-ZXXkndVj.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-twS1M3FF.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-llkUFBGR.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/vendor-lucide-N6vOpZmh.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="./assets/vendor-markdown-B4giJcws.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="./assets/vendor-yaml-GWJz5H2G.js">
|
|
22
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
22
|
+
<link rel="stylesheet" crossorigin href="./assets/index-D0bY1wpI.css">
|
|
23
23
|
</head>
|
|
24
24
|
<body>
|
|
25
25
|
<div id="root"></div>
|
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
GOOGLE_MARKETING_STORED_SNAPSHOT_PAGE_MAX,
|
|
7
7
|
LATEST_RUN_ID,
|
|
8
8
|
RESEARCH_RUN_SCOPE,
|
|
9
|
+
SENTIMENT_ATTEMPT_PAGE_DEFAULT,
|
|
10
|
+
SENTIMENT_QUERY_PAGE_DEFAULT,
|
|
11
|
+
SENTIMENT_QUERY_PAGE_MAX,
|
|
9
12
|
adsActivateTreeRequestSchema,
|
|
10
13
|
adsAdCreateRequestSchema,
|
|
11
14
|
adsAdGroupCreateRequestSchema,
|
|
@@ -86,6 +89,7 @@ import {
|
|
|
86
89
|
providerQuotaPolicySchema,
|
|
87
90
|
providerSummaryEntryDtoSchema,
|
|
88
91
|
queryBatchRequestSchema,
|
|
92
|
+
queryClassSchema,
|
|
89
93
|
queryGenerateRequestSchema,
|
|
90
94
|
queryTrackingCommitRequestSchema,
|
|
91
95
|
queryTrackingPreviewRequestSchema,
|
|
@@ -100,6 +104,20 @@ import {
|
|
|
100
104
|
schedulableRunKindSchema,
|
|
101
105
|
scheduleDtoSchema,
|
|
102
106
|
scheduleUpsertRequestSchema,
|
|
107
|
+
sentimentBackfillPreviewReadSchema,
|
|
108
|
+
sentimentBackfillRequestSchema,
|
|
109
|
+
sentimentBackfillSelectionSchema,
|
|
110
|
+
sentimentCompareRequestSchema,
|
|
111
|
+
sentimentComparisonReadSchema,
|
|
112
|
+
sentimentEvidencePageReadSchema,
|
|
113
|
+
sentimentEvidenceRequestSchema,
|
|
114
|
+
sentimentJobReadSchema,
|
|
115
|
+
sentimentJobsReadSchema,
|
|
116
|
+
sentimentSelectionSchema,
|
|
117
|
+
sentimentSettingsReadSchema,
|
|
118
|
+
sentimentSettingsUpdateSchema,
|
|
119
|
+
sentimentSummaryIncludeSchema,
|
|
120
|
+
sentimentSummaryReadSchema,
|
|
103
121
|
settingsDtoSchema,
|
|
104
122
|
snapshotRequestInputSchema,
|
|
105
123
|
telemetryStatusDtoSchema,
|
|
@@ -110,7 +128,7 @@ import {
|
|
|
110
128
|
trafficSeriesGranularitySchema,
|
|
111
129
|
visibilityCompareSelectionSchema,
|
|
112
130
|
visibilityReportRequestSchema
|
|
113
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-RCX6I3DX.js";
|
|
114
132
|
|
|
115
133
|
// src/cli-error.ts
|
|
116
134
|
function isMachineFormat(format) {
|
|
@@ -1185,7 +1203,165 @@ var AGENT_WEBHOOK_EVENTS = [
|
|
|
1185
1203
|
notificationEventSchema.enum["insight.high"],
|
|
1186
1204
|
notificationEventSchema.enum["citation.gained"]
|
|
1187
1205
|
];
|
|
1206
|
+
var sentimentInputSchema = sentimentSelectionSchema.safeExtend({
|
|
1207
|
+
project: projectNameSchema,
|
|
1208
|
+
include: z3.array(sentimentSummaryIncludeSchema).max(2).optional().describe("Opt-in per-query detail: per-engine assessments and per-location scores. Omitted, query rows are compact unless queryId names one query."),
|
|
1209
|
+
queryLimit: z3.number().int().min(1).max(SENTIMENT_QUERY_PAGE_MAX).optional().describe(`Query rows per page (default ${SENTIMENT_QUERY_PAGE_DEFAULT}).`),
|
|
1210
|
+
queryCursor: z3.string().min(1).max(16384).optional().describe("queryPage.nextCursor from the previous page; keep every selection field unchanged.")
|
|
1211
|
+
});
|
|
1212
|
+
var sentimentJobInputSchema = projectInputSchema.extend({
|
|
1213
|
+
jobId: z3.string().min(1).max(256),
|
|
1214
|
+
attemptLimit: z3.number().int().min(1).max(200).optional().describe(`Attempt receipts per page, newest first (default ${SENTIMENT_ATTEMPT_PAGE_DEFAULT}).`),
|
|
1215
|
+
attemptCursor: z3.string().min(1).max(4096).optional().describe("nextAttemptCursor from the previous page of this job.")
|
|
1216
|
+
});
|
|
1217
|
+
var sentimentEvidenceInputSchema = sentimentEvidenceRequestSchema.safeExtend({ project: projectNameSchema });
|
|
1218
|
+
var sentimentCompareInputSchema = sentimentCompareRequestSchema.safeExtend({ project: projectNameSchema });
|
|
1219
|
+
var sentimentConfigureInputSchema = sentimentSettingsUpdateSchema.extend({ project: projectNameSchema }).refine(
|
|
1220
|
+
(input) => input.enabled !== void 0,
|
|
1221
|
+
"Explicit enabled is required"
|
|
1222
|
+
);
|
|
1223
|
+
var sentimentPreviewInputSchema = sentimentBackfillSelectionSchema.safeExtend({
|
|
1224
|
+
project: projectNameSchema,
|
|
1225
|
+
queryClass: queryClassSchema.describe("Required. The one query population to backfill: branded or non-brand. They are separate populations; preview and submit each class you need.")
|
|
1226
|
+
}).superRefine((input, ctx) => {
|
|
1227
|
+
const hasRuns = Boolean(input.runId || input.runIds?.length);
|
|
1228
|
+
const hasDates = Boolean(input.from || input.to);
|
|
1229
|
+
if (!hasRuns && (!input.from || !input.to) || hasRuns && hasDates || input.runId && input.runIds?.length) {
|
|
1230
|
+
ctx.addIssue({ code: "custom", message: "Select explicit runIds or runId, or a bounded from/to date range" });
|
|
1231
|
+
}
|
|
1232
|
+
if (input.from && input.to && Date.parse(input.from) > Date.parse(input.to)) ctx.addIssue({ code: "custom", message: "from must be at or before to" });
|
|
1233
|
+
});
|
|
1234
|
+
var sentimentBackfillInputSchema = sentimentBackfillRequestSchema.extend({ project: projectNameSchema });
|
|
1188
1235
|
var canonryMcpTools = [
|
|
1236
|
+
defineTool({
|
|
1237
|
+
name: "canonry_sentiment_settings",
|
|
1238
|
+
title: "Read sentiment readiness and settings",
|
|
1239
|
+
description: "Read experimental sentiment configuration, evaluator identity, readiness and action permissions. No provider calls or credentials. Install administrators alone can configure or submit backfills.",
|
|
1240
|
+
access: "read",
|
|
1241
|
+
tier: "monitoring",
|
|
1242
|
+
inputSchema: projectInputSchema,
|
|
1243
|
+
outputSchema: sentimentSettingsReadSchema,
|
|
1244
|
+
annotations: readAnnotations(),
|
|
1245
|
+
openApiOperations: ["GET /api/v1/projects/{name}/sentiment/settings"],
|
|
1246
|
+
handler: (client, input) => client.getSentimentSettings(input.project)
|
|
1247
|
+
}),
|
|
1248
|
+
defineTool({
|
|
1249
|
+
name: "canonry_sentiment_configure",
|
|
1250
|
+
title: "Configure project sentiment",
|
|
1251
|
+
description: "Install administrator only: explicitly enable or disable stance-and-evidence sentiment. Both install and project switches default off. Enabling processes future eligible complete runs; historical answers require explicit backfill. On dispatch TypeSafe receives the text of each answer with the frozen subject identity (name, aliases and URLs), the tracked query text and class, the answer engine with its requested and served models, the location, and internal query, subject, Property, group and market identifiers. API keys remain local install configuration and are never accepted here.",
|
|
1252
|
+
access: "write",
|
|
1253
|
+
tier: "monitoring",
|
|
1254
|
+
inputSchema: sentimentConfigureInputSchema,
|
|
1255
|
+
outputSchema: sentimentSettingsReadSchema,
|
|
1256
|
+
annotations: writeAnnotations({ idempotentHint: true }),
|
|
1257
|
+
openApiOperations: ["PUT /api/v1/projects/{name}/sentiment/settings"],
|
|
1258
|
+
handler: (client, input) => {
|
|
1259
|
+
const { project, ...request } = input;
|
|
1260
|
+
return client.configureSentiment(project, request);
|
|
1261
|
+
}
|
|
1262
|
+
}),
|
|
1263
|
+
defineTool({
|
|
1264
|
+
name: "canonry_sentiment",
|
|
1265
|
+
title: "Read sentiment and per-query scores",
|
|
1266
|
+
description: 'Read stored model-classified language about frozen Simple identities or Advanced Properties. Returns headline and per-query favorable/mixed/unfavorable rates, judged and selected counts, distinct answers, exclusions, intervals and method limitations. Favorable % is favorable / (favorable + mixed + unfavorable); factual and unjudged answers do not enter that denominator. Select branded or non-brand explicitly and keep their metrics separate; the default is branded. Optional queryId selects one frozen query. Query rows are compact and paged: queryLimit (default 25) rows per page, then pass queryPage.nextCursor as queryCursor. Per-engine assessment verdicts and per-location scores are opt-in with include=["assessments","locations"], or come by default when queryId names one query. Advanced rows are per executionNodeKey; pass it to narrow evidence to that node. Optional runIds selects the exact grouped location runs instead of runId. A known subject absent from a non-brand answer is not unfavorable. Partial values are provisional. Never starts a classifier. Preserve the resolved evaluationDefinitionId and complete selection for later evidence reads.',
|
|
1267
|
+
access: "read",
|
|
1268
|
+
tier: "monitoring",
|
|
1269
|
+
inputSchema: sentimentInputSchema,
|
|
1270
|
+
outputSchema: sentimentSummaryReadSchema,
|
|
1271
|
+
annotations: readAnnotations(),
|
|
1272
|
+
openApiOperations: ["GET /api/v1/projects/{name}/sentiment"],
|
|
1273
|
+
handler: (client, input) => {
|
|
1274
|
+
const { project, ...query } = input;
|
|
1275
|
+
return client.getSentiment(project, query);
|
|
1276
|
+
}
|
|
1277
|
+
}),
|
|
1278
|
+
defineTool({
|
|
1279
|
+
name: "canonry_sentiment_evidence",
|
|
1280
|
+
title: "Read sentiment evidence",
|
|
1281
|
+
description: "Page stored answer-subject assessments and exact source quotations. Returns frozen identity/context, source hash, evaluator and engine provenance, exclusions, and optional complaint. Optional assessmentId selects the exact stored answer-subject verdict from query assessments without widening its scope. Keep assessmentId, queryClass, optional frozen queryId, exact runId or runIds, every other selection field and resolved evaluationDefinitionId unchanged when following nextCursor. Advanced market refinement uses exact frozen usage edges. No provider calls.",
|
|
1282
|
+
access: "read",
|
|
1283
|
+
tier: "monitoring",
|
|
1284
|
+
inputSchema: sentimentEvidenceInputSchema,
|
|
1285
|
+
outputSchema: sentimentEvidencePageReadSchema,
|
|
1286
|
+
annotations: readAnnotations(),
|
|
1287
|
+
openApiOperations: ["GET /api/v1/projects/{name}/sentiment/evidence"],
|
|
1288
|
+
handler: (client, input) => {
|
|
1289
|
+
const { project, ...query } = input;
|
|
1290
|
+
return client.getSentimentEvidence(project, query);
|
|
1291
|
+
}
|
|
1292
|
+
}),
|
|
1293
|
+
defineTool({
|
|
1294
|
+
name: "canonry_sentiment_compare",
|
|
1295
|
+
title: "Compare matched sentiment periods",
|
|
1296
|
+
description: "Compare stored periods under compatible frozen scope, answer-engine identity and evaluator, with complete classification coverage. Returns matched/excluded units, each denominator, all refusal reasons, a nullable direction, and both period summaries with compact query rows (per-engine detail is on canonry_sentiment). Overlapping Wilson intervals mean no clear change detected; they do not establish equivalence. No provider calls.",
|
|
1297
|
+
access: "read",
|
|
1298
|
+
tier: "monitoring",
|
|
1299
|
+
inputSchema: sentimentCompareInputSchema,
|
|
1300
|
+
outputSchema: sentimentComparisonReadSchema,
|
|
1301
|
+
annotations: readAnnotations(),
|
|
1302
|
+
openApiOperations: ["GET /api/v1/projects/{name}/sentiment/compare"],
|
|
1303
|
+
handler: (client, input) => {
|
|
1304
|
+
const { project, ...query } = input;
|
|
1305
|
+
return client.compareSentiment(project, query);
|
|
1306
|
+
}
|
|
1307
|
+
}),
|
|
1308
|
+
defineTool({
|
|
1309
|
+
name: "canonry_sentiment_backfill_preview",
|
|
1310
|
+
title: "Preview a stored sentiment backfill",
|
|
1311
|
+
description: "Select explicit historical runs or a bounded date range, and exactly one queryClass (required: branded or non-brand). Branded and non-brand are separate populations, so backfilling a history means one preview and one submission per class; answers of the other class are not included. Returns eligible/already classified/skipped assessments with skip reasons (for example legacy-missing-language for Advanced runs from before language provenance, and excluded-branded or excluded-non-brand for answers of the other class), evaluator identity, estimated volume/cost and a frozen expiring preview token. Stored-only read; never calls TypeSafe or schedules classification. Submission is a separate administrator action.",
|
|
1312
|
+
access: "read",
|
|
1313
|
+
tier: "monitoring",
|
|
1314
|
+
inputSchema: sentimentPreviewInputSchema,
|
|
1315
|
+
outputSchema: sentimentBackfillPreviewReadSchema,
|
|
1316
|
+
annotations: readAnnotations(),
|
|
1317
|
+
openApiOperations: ["GET /api/v1/projects/{name}/sentiment/backfill-preview"],
|
|
1318
|
+
handler: (client, input) => {
|
|
1319
|
+
const { project, ...query } = input;
|
|
1320
|
+
return client.previewSentimentBackfill(project, query);
|
|
1321
|
+
}
|
|
1322
|
+
}),
|
|
1323
|
+
defineTool({
|
|
1324
|
+
name: "canonry_sentiment_backfill",
|
|
1325
|
+
title: "Submit an explicit sentiment backfill",
|
|
1326
|
+
description: "Install administrator only: submit the exact stored previewToken with an explicit idempotencyKey. Pins source selection and evaluator, persists a durable job, and can transmit answer text to TypeSafe and incur cost. The same project/key/token returns the same receipt; a changed payload conflicts. Poll canonry_sentiment_job for progress.",
|
|
1327
|
+
access: "write",
|
|
1328
|
+
tier: "monitoring",
|
|
1329
|
+
inputSchema: sentimentBackfillInputSchema,
|
|
1330
|
+
outputSchema: sentimentJobReadSchema,
|
|
1331
|
+
annotations: writeAnnotations({ idempotentHint: true, openWorldHint: true }),
|
|
1332
|
+
openApiOperations: ["POST /api/v1/projects/{name}/sentiment/backfills"],
|
|
1333
|
+
handler: (client, input) => {
|
|
1334
|
+
const { project, ...request } = input;
|
|
1335
|
+
return client.submitSentimentBackfill(project, request);
|
|
1336
|
+
}
|
|
1337
|
+
}),
|
|
1338
|
+
defineTool({
|
|
1339
|
+
name: "canonry_sentiment_jobs",
|
|
1340
|
+
title: "List sentiment jobs",
|
|
1341
|
+
description: "Read the newest 100 stored automatic and backfill jobs as summaries: progress, outcome counts, failures, cancellations and an attemptCount. Attempt receipts are paged on canonry_sentiment_job. No provider calls.",
|
|
1342
|
+
access: "read",
|
|
1343
|
+
tier: "monitoring",
|
|
1344
|
+
inputSchema: projectInputSchema,
|
|
1345
|
+
outputSchema: sentimentJobsReadSchema,
|
|
1346
|
+
annotations: readAnnotations(),
|
|
1347
|
+
openApiOperations: ["GET /api/v1/projects/{name}/sentiment/jobs"],
|
|
1348
|
+
handler: (client, input) => client.listSentimentJobs(input.project)
|
|
1349
|
+
}),
|
|
1350
|
+
defineTool({
|
|
1351
|
+
name: "canonry_sentiment_job",
|
|
1352
|
+
title: "Read a sentiment job receipt",
|
|
1353
|
+
description: "Read one project-owned durable sentiment job, selected outcome partition, cancellation epoch, attemptCount and one page of attempt usage/failures, newest first; pass nextAttemptCursor as attemptCursor for older attempts. Read-only polling never resumes or retries canceled work.",
|
|
1354
|
+
access: "read",
|
|
1355
|
+
tier: "monitoring",
|
|
1356
|
+
inputSchema: sentimentJobInputSchema,
|
|
1357
|
+
outputSchema: sentimentJobReadSchema,
|
|
1358
|
+
annotations: readAnnotations(),
|
|
1359
|
+
openApiOperations: ["GET /api/v1/projects/{name}/sentiment/jobs/{jobId}"],
|
|
1360
|
+
handler: (client, input) => {
|
|
1361
|
+
const { project, jobId, ...page } = input;
|
|
1362
|
+
return client.getSentimentJob(project, jobId, page);
|
|
1363
|
+
}
|
|
1364
|
+
}),
|
|
1189
1365
|
defineTool({
|
|
1190
1366
|
name: "canonry_visibility_report",
|
|
1191
1367
|
title: "Read scoped AI visibility",
|