@canonry/canonry 4.151.0 → 4.153.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/{AuditHistoryPanel-OMu-hEqT.js → AuditHistoryPanel-CcoXjMxm.js} +1 -1
- package/assets/assets/{BacklinksPage-qadojXWF.js → BacklinksPage-Cij_A80K.js} +1 -1
- package/assets/assets/{HistoryPage-DJQbxQr4.js → HistoryPage-CdxhPEHF.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-3-oL5JIi.js → MeasurementPropertyPage-CJaqCeMr.js} +1 -1
- package/assets/assets/{ProjectPage-D300FAEv.js → ProjectPage-BJPVmD_-.js} +11 -11
- package/assets/assets/{RunRow-CaCdexBB.js → RunRow-xfuUNQ2O.js} +1 -1
- package/assets/assets/{RunsPage-Cx_sLTg5.js → RunsPage-BirDqVe_.js} +1 -1
- package/assets/assets/{SettingsPage-Y1J2OIpj.js → SettingsPage-BzMoD-42.js} +1 -1
- package/assets/assets/{TrafficPage-O4oT28EH.js → TrafficPage-Du-7BL_j.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-De6Yq1Dk.js → TrafficSourceDetailPage-Dk6-TuNw.js} +1 -1
- package/assets/assets/{arrow-left-PM9P2PAY.js → arrow-left-HyrLx9li.js} +1 -1
- package/assets/assets/{extract-error-message-RWIQhk6G.js → extract-error-message-Db0s9Qon.js} +1 -1
- package/assets/assets/{index-bcpm37b9.js → index-Bio0Z1kJ.js} +42 -42
- package/assets/assets/{index-CLt6zzLW.css → index-CaYn5phz.css} +1 -1
- package/assets/assets/{refresh-cw-qn1tCFGx.js → refresh-cw-BFnkrZE9.js} +1 -1
- package/assets/assets/{trash-2-Bbp_L6NV.js → trash-2-CQtsaJ-3.js} +1 -1
- package/assets/assets/v2-overview-adapter-D81QVAhK.js +1 -0
- package/assets/index.html +2 -2
- package/dist/{chunk-TS3AHKZG.js → chunk-LNJF7LL5.js} +1 -1
- package/dist/{chunk-BUAVO37B.js → chunk-SKTXCZZD.js} +10 -0
- package/dist/{chunk-JWTFZG7Q.js → chunk-VTL2WOIO.js} +45 -14
- package/dist/{chunk-G7P5CJJS.js → chunk-YV4VKT4M.js} +4 -4
- package/dist/cli.js +4 -4
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-KBFVQOPO.js → intelligence-service-APPDGUH6.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +10 -10
- package/assets/assets/v2-overview-adapter-BHmxTmCf.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./index-
|
|
1
|
+
import{c as e}from"./index-Bio0Z1kJ.js";const o=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],a=e("chevron-left",o);const t=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],h=e("refresh-cw",t);export{a as C,h as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-Bio0Z1kJ.js";const t=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],h=a("circle-question-mark",t);const e=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],d=a("download",e);const o=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],p=a("external-link",o);const c=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=a("trash-2",c);export{h as C,d as D,p as E,s as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function E(e){const r=e[0];return r?e.every(a=>a.mode===r.mode&&a.scope.kind===r.scope.kind&&a.scope.key===r.scope.key&&a.queryClass===r.queryClass&&a.measurement.displayedRunId===r.measurement.displayedRunId):!0}function o(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}}function k(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function K(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function $(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function C(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function I(e,r,a){const u=new Map;if(!r)return u;const s=new Map(e.usageEdges.map(n=>[C(n),n.targetKey])),m=new Map(e.assignments.map(n=>[`${n.targetKey}:${n.queryId}`,n.queryClass])),g=new Map(e.usageEdges.map(n=>[C(n),m.get(`${n.targetKey}:${n.queryId}`)]));for(const n of r.evidence){if(a&&g.get(n.usageEdgeId)!==a)continue;const l=s.get(n.usageEdgeId);if(!l)continue;const p=u.get(l)??[];p.push({id:`${n.observationId}:${n.expectedSlotId}:${n.usageEdgeId}:${n.sourceUrl}`,kind:K(n.classification),query:n.queryText,provider:n.provider,location:n.location,url:n.sourceUrl,tone:$(n.classification),historical:n.historical||n.bridged}),u.set(l,p)}return u}function T(e){if(e.flags>0)return{label:"Review",tone:"caution"};const r=[e.mentionCoverage,e.citationCoverage].filter(a=>a.state==="unavailable").map(a=>a.reason);return r.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:r.includes("plan_v1")?{label:"Update setup",tone:"caution"}:r.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:r.includes("no_population")?{label:"No queries",tone:"neutral"}:r.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function M(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 S(e){if(!e)return"";const r=new Date(e);return Number.isFinite(r.getTime())?r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function x(e){const r=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${r} flagged ${r===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 R({overview:e,activePlan:r,report:a,reportState:u=a?"ready":"loading"}){if(r.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 s=r.plan,m=new Map(s.targets.map(t=>[t.stableKey,t])),g=new Map(s.querySnapshots.map(t=>[t.queryId,t.queryText])),n=new Map;for(const t of s.assignments){if(e.queryClass!=="all"&&t.queryClass!==e.queryClass)continue;const i=g.get(t.queryId);if(!i)continue;const d=n.get(t.targetKey)??new Set;d.add(i),n.set(t.targetKey,d)}const l=a?.revision===r.revision&&a.run?.id===e.measurement.displayedRunId?a:null,p=e.measurement.displayedRunId===void 0||l?"ready":u==="error"||a!=null?"error":"loading",h=I(s,l,e.queryClass==="all"?void 0:e.queryClass),f=new Map;for(const t of s.groups)for(const i of t.targetKeys)f.has(i)||f.set(i,t.label);const y=e.properties.items.map(t=>{const i=m.get(t.targetKey),d=h.get(t.targetKey)??[];return{id:t.targetKey,name:t.label,mentionCoverage:o(t.mentionCoverage),citationCoverage:o(t.citationCoverage),status:T(t),providers:t.providers?.map(c=>({provider:c.provider,mentionCoverage:o(c.mentionCoverage),citationCoverage:o(c.citationCoverage)})),market:f.get(t.targetKey),assignedQueries:[...n.get(t.targetKey)??[]],urls:i?.urlMatchers.map(k)??[],evidence:d,evidenceState:p,historical:d.some(c=>c.historical)}}),b=e.namedShareOfVoice?.entries.map(t=>({name:t.label,coverage:{numerator:t.credits,denominator:e.namedShareOfVoice.denominator}})),q=e.properties.items.flatMap(t=>t.flags>0?[{id:`property:${t.targetKey}`,property:t.label,summary:`${t.flags} ${t.flags===1?"result needs":"results need"} review.`,tone:"caution",count:t.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:M(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:S(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:o(e.metrics.propertiesMentioned),mentionCoverage:o(e.metrics.mentionCoverage),citationCoverage:o(e.metrics.citationCoverage)},properties:y,...b?{shareOfVoice:b}:{}},propertyTotal:e.properties.totalEstimate??y.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor},availableGroups:s.groups.map(t=>({id:t.stableKey,label:t.label})),...x(e)?{nextActionText:x(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:q}}export{E as a,R as b,k as m};
|
package/assets/index.html
CHANGED
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
|
|
13
13
|
<link rel="apple-touch-icon" href="./apple-touch-icon.png" />
|
|
14
14
|
<title>Canonry</title>
|
|
15
|
-
<script type="module" crossorigin src="./assets/index-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-Bio0Z1kJ.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-BjS7iY3g.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-DnzzbllM.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-33ACLxsD.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/vendor-markdown-CpDJch4G.js">
|
|
20
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
20
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CaYn5phz.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
23
23
|
<div id="root"></div>
|
|
@@ -4019,6 +4019,14 @@ var measurementPropertyProviderRowSchema = z5.object({
|
|
|
4019
4019
|
mentionCoverage: measurementMetricValueSchema,
|
|
4020
4020
|
citationCoverage: measurementMetricValueSchema
|
|
4021
4021
|
}).strict();
|
|
4022
|
+
var measurementOutcomeCountsSchema = z5.object({
|
|
4023
|
+
bothSignals: z5.number().int().nonnegative(),
|
|
4024
|
+
mentionedOnly: z5.number().int().nonnegative(),
|
|
4025
|
+
citedOnly: z5.number().int().nonnegative(),
|
|
4026
|
+
neither: z5.number().int().nonnegative(),
|
|
4027
|
+
notMeasured: z5.number().int().nonnegative(),
|
|
4028
|
+
total: z5.number().int().nonnegative()
|
|
4029
|
+
}).strict();
|
|
4022
4030
|
var measurementPropertyRowSchema = z5.object({
|
|
4023
4031
|
targetKey: measurementV2StableKeySchema,
|
|
4024
4032
|
label: z5.string().min(1),
|
|
@@ -4076,6 +4084,8 @@ var measurementOverviewResponseSchema = z5.object({
|
|
|
4076
4084
|
)
|
|
4077
4085
|
}).strict(),
|
|
4078
4086
|
properties: measurementCursorPageSchema(measurementPropertyRowSchema),
|
|
4087
|
+
/** Scope-wide outcome split. Counted over EVERY Property in scope, not the page. */
|
|
4088
|
+
outcomes: measurementOutcomeCountsSchema,
|
|
4079
4089
|
flags: z5.object({ total: z5.number().int().nonnegative() }).strict(),
|
|
4080
4090
|
namedShareOfVoice: measurementNamedShareOfVoiceSchema.optional()
|
|
4081
4091
|
}).strict();
|
|
@@ -521,7 +521,7 @@ import {
|
|
|
521
521
|
wordpressSchemaDeployResultDtoSchema,
|
|
522
522
|
wordpressSchemaStatusResultDtoSchema,
|
|
523
523
|
wordpressStatusDtoSchema
|
|
524
|
-
} from "./chunk-
|
|
524
|
+
} from "./chunk-SKTXCZZD.js";
|
|
525
525
|
|
|
526
526
|
// src/intelligence-service.ts
|
|
527
527
|
import { eq as eq57, desc as desc26, asc as asc11, and as and45, ne as ne7, or as or11, inArray as inArray19, gte as gte13, lte as lte10 } from "drizzle-orm";
|
|
@@ -15721,6 +15721,31 @@ function validatedCursor(query, activePlanVersionId) {
|
|
|
15721
15721
|
}
|
|
15722
15722
|
return cursor;
|
|
15723
15723
|
}
|
|
15724
|
+
function measurementOutcomeCounts(rows) {
|
|
15725
|
+
const counts2 = {
|
|
15726
|
+
bothSignals: 0,
|
|
15727
|
+
mentionedOnly: 0,
|
|
15728
|
+
citedOnly: 0,
|
|
15729
|
+
neither: 0,
|
|
15730
|
+
notMeasured: 0,
|
|
15731
|
+
total: rows.length
|
|
15732
|
+
};
|
|
15733
|
+
for (const row of rows) {
|
|
15734
|
+
const mention = row.mentionCoverage;
|
|
15735
|
+
const citation = row.citationCoverage;
|
|
15736
|
+
if (mention.state !== "available" || citation.state !== "available") {
|
|
15737
|
+
counts2.notMeasured += 1;
|
|
15738
|
+
continue;
|
|
15739
|
+
}
|
|
15740
|
+
const mentioned = (mention.numerator ?? mention.value) > 0;
|
|
15741
|
+
const cited = (citation.numerator ?? citation.value) > 0;
|
|
15742
|
+
if (mentioned && cited) counts2.bothSignals += 1;
|
|
15743
|
+
else if (mentioned) counts2.mentionedOnly += 1;
|
|
15744
|
+
else if (cited) counts2.citedOnly += 1;
|
|
15745
|
+
else counts2.neither += 1;
|
|
15746
|
+
}
|
|
15747
|
+
return counts2;
|
|
15748
|
+
}
|
|
15724
15749
|
function pageOf(rows, query, displayedRunId, activePlanVersionId, evidenceFingerprint) {
|
|
15725
15750
|
const sort = query.sort ?? MEASUREMENT_OVERVIEW_DEFAULT_SORT;
|
|
15726
15751
|
const ordered = [...rows].sort((left, right) => compareRows(left, right, sort));
|
|
@@ -15738,16 +15763,19 @@ function pageOf(rows, query, displayedRunId, activePlanVersionId, evidenceFinger
|
|
|
15738
15763
|
const items = ordered.slice(offset, offset + limit);
|
|
15739
15764
|
const last = items.at(-1);
|
|
15740
15765
|
return {
|
|
15741
|
-
|
|
15742
|
-
|
|
15743
|
-
last
|
|
15744
|
-
|
|
15745
|
-
|
|
15746
|
-
|
|
15747
|
-
|
|
15748
|
-
|
|
15749
|
-
|
|
15750
|
-
|
|
15766
|
+
page: {
|
|
15767
|
+
items,
|
|
15768
|
+
nextCursor: last === void 0 || ordered.at(offset + limit) === void 0 ? null : cursorOf(
|
|
15769
|
+
last,
|
|
15770
|
+
sort,
|
|
15771
|
+
displayedRunId,
|
|
15772
|
+
overviewFilterFingerprint(query),
|
|
15773
|
+
activePlanVersionId,
|
|
15774
|
+
evidenceFingerprint
|
|
15775
|
+
),
|
|
15776
|
+
totalEstimate: ordered.length
|
|
15777
|
+
},
|
|
15778
|
+
outcomes: measurementOutcomeCounts(ordered)
|
|
15751
15779
|
};
|
|
15752
15780
|
}
|
|
15753
15781
|
function runRevisionMismatch(runId, runRevision, activeRevision) {
|
|
@@ -15879,7 +15907,7 @@ function runProgress(db, displayed, plan) {
|
|
|
15879
15907
|
}
|
|
15880
15908
|
function planV1Overview(db, projectId, active, query, scope) {
|
|
15881
15909
|
const displayed = selectDisplayedRun(db, projectId, active, query);
|
|
15882
|
-
const page = pageOf(
|
|
15910
|
+
const { page, outcomes } = pageOf(
|
|
15883
15911
|
propertyLabels(active.plan, scope).filter((row) => matchesSearch(row, query.search)).map((row) => ({
|
|
15884
15912
|
...row,
|
|
15885
15913
|
mentionCoverage: unavailable2("plan_v1"),
|
|
@@ -15913,6 +15941,7 @@ function planV1Overview(db, projectId, active, query, scope) {
|
|
|
15913
15941
|
sov: unavailable2("plan_v1")
|
|
15914
15942
|
},
|
|
15915
15943
|
properties: page,
|
|
15944
|
+
outcomes,
|
|
15916
15945
|
flags: { total: 0 }
|
|
15917
15946
|
};
|
|
15918
15947
|
}
|
|
@@ -15922,7 +15951,7 @@ function planV2Overview(db, projectId, active, plan, query, scope, cache) {
|
|
|
15922
15951
|
const current = latestMeasurementRun(db, projectId, active.version.id, CURRENT_RUN_STATUSES);
|
|
15923
15952
|
const currentDto = current ? { currentRunId: current.id } : {};
|
|
15924
15953
|
if (!displayed) {
|
|
15925
|
-
const page2 = pageOf(
|
|
15954
|
+
const { page: page2, outcomes: outcomes2 } = pageOf(
|
|
15926
15955
|
propertyLabels(plan, scope).filter((row) => matchesSearch(row, query.search)).map((row) => ({
|
|
15927
15956
|
...row,
|
|
15928
15957
|
mentionCoverage: unavailable2("no_completed_run"),
|
|
@@ -15954,6 +15983,7 @@ function planV2Overview(db, projectId, active, plan, query, scope, cache) {
|
|
|
15954
15983
|
sov: unavailable2("no_completed_run")
|
|
15955
15984
|
},
|
|
15956
15985
|
properties: page2,
|
|
15986
|
+
outcomes: outcomes2,
|
|
15957
15987
|
flags: { total: 0 }
|
|
15958
15988
|
};
|
|
15959
15989
|
}
|
|
@@ -15982,7 +16012,7 @@ function planV2Overview(db, projectId, active, plan, query, scope, cache) {
|
|
|
15982
16012
|
const measured = new Map(
|
|
15983
16013
|
overview.properties.map((row) => [row.targetId, row])
|
|
15984
16014
|
);
|
|
15985
|
-
const page = pageOf(
|
|
16015
|
+
const { page, outcomes } = pageOf(
|
|
15986
16016
|
propertyLabels(plan, scope).filter((row) => matchesSearch(row, query.search)).map((row) => {
|
|
15987
16017
|
const property = measured.get(row.targetKey);
|
|
15988
16018
|
return {
|
|
@@ -16036,6 +16066,7 @@ function planV2Overview(db, projectId, active, plan, query, scope, cache) {
|
|
|
16036
16066
|
sov: brandPresence
|
|
16037
16067
|
},
|
|
16038
16068
|
properties: page,
|
|
16069
|
+
outcomes,
|
|
16039
16070
|
flags: { total: overview.flags },
|
|
16040
16071
|
...namedShareOfVoice === void 0 ? {} : { namedShareOfVoice }
|
|
16041
16072
|
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
loadConfig,
|
|
11
11
|
loadConfigRaw,
|
|
12
12
|
saveConfigPatch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LNJF7LL5.js";
|
|
14
14
|
import {
|
|
15
15
|
CC_CACHE_DIR,
|
|
16
16
|
DUCKDB_SPEC,
|
|
@@ -126,7 +126,7 @@ import {
|
|
|
126
126
|
siteAuditSnapshots,
|
|
127
127
|
toAlertView,
|
|
128
128
|
usageCounters
|
|
129
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-VTL2WOIO.js";
|
|
130
130
|
import {
|
|
131
131
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
132
132
|
AGENT_PROVIDER_IDS,
|
|
@@ -218,7 +218,7 @@ import {
|
|
|
218
218
|
validationError,
|
|
219
219
|
winnabilityClassLabel,
|
|
220
220
|
withRetry
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-SKTXCZZD.js";
|
|
222
222
|
|
|
223
223
|
// src/telemetry.ts
|
|
224
224
|
import crypto from "crypto";
|
|
@@ -7432,7 +7432,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
7432
7432
|
return result;
|
|
7433
7433
|
}
|
|
7434
7434
|
async function backfillInsightsCommand(project, opts) {
|
|
7435
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
7435
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-APPDGUH6.js");
|
|
7436
7436
|
const config = loadConfig();
|
|
7437
7437
|
const db = createClient(config.database);
|
|
7438
7438
|
migrate(db);
|
package/dist/cli.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
showFirstRunNotice,
|
|
31
31
|
trackCliCommandFinished,
|
|
32
32
|
trackEvent
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YV4VKT4M.js";
|
|
34
34
|
import {
|
|
35
35
|
CliError,
|
|
36
36
|
EXIT_SYSTEM_ERROR,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
saveConfigPatch,
|
|
51
51
|
systemError,
|
|
52
52
|
usageError
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-LNJF7LL5.js";
|
|
54
54
|
import {
|
|
55
55
|
apiKeys,
|
|
56
56
|
createClient,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
projects,
|
|
59
59
|
queries,
|
|
60
60
|
renderReportHtml
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-VTL2WOIO.js";
|
|
62
62
|
import {
|
|
63
63
|
AdsDeliverySnapshotStatuses,
|
|
64
64
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
providerQuotaPolicySchema,
|
|
123
123
|
resolveProviderInput,
|
|
124
124
|
winnabilityClassSchema
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-SKTXCZZD.js";
|
|
126
126
|
|
|
127
127
|
// src/cli.ts
|
|
128
128
|
import { pathToFileURL } from "url";
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YV4VKT4M.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-LNJF7LL5.js";
|
|
7
|
+
import "./chunk-VTL2WOIO.js";
|
|
8
|
+
import "./chunk-SKTXCZZD.js";
|
|
9
9
|
export {
|
|
10
10
|
createServer,
|
|
11
11
|
loadConfig
|
package/dist/mcp.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
PACKAGE_VERSION,
|
|
4
4
|
canonryMcpTools,
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LNJF7LL5.js";
|
|
7
7
|
import {
|
|
8
8
|
isReadOnlyKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SKTXCZZD.js";
|
|
10
10
|
|
|
11
11
|
// src/mcp/cli.ts
|
|
12
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.153.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -66,27 +66,27 @@
|
|
|
66
66
|
"@types/node-cron": "^3.0.11",
|
|
67
67
|
"tsup": "^8.5.1",
|
|
68
68
|
"tsx": "^4.19.0",
|
|
69
|
-
"@ainyc/canonry-api-client": "0.0.0",
|
|
70
69
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
70
|
+
"@ainyc/canonry-api-client": "0.0.0",
|
|
71
71
|
"@ainyc/canonry-config": "0.0.0",
|
|
72
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
73
72
|
"@ainyc/canonry-db": "0.0.0",
|
|
73
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
74
74
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
75
|
-
"@ainyc/canonry-integration-
|
|
75
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
76
76
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
77
|
-
"@ainyc/canonry-integration-
|
|
77
|
+
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
78
78
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
79
79
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
80
|
+
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
80
81
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
81
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
82
82
|
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
83
|
-
"@ainyc/canonry-intelligence": "0.0.0",
|
|
84
83
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
85
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
86
|
-
"@ainyc/canonry-provider-local": "0.0.0",
|
|
87
84
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
85
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
86
|
+
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
88
87
|
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
89
|
-
"@ainyc/canonry-provider-
|
|
88
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
89
|
+
"@ainyc/canonry-intelligence": "0.0.0"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function S(e){const r=e[0];return r?e.every(a=>a.mode===r.mode&&a.scope.kind===r.scope.kind&&a.scope.key===r.scope.key&&a.queryClass===r.queryClass&&a.measurement.displayedRunId===r.measurement.displayedRunId):!0}function l(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}}function q(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function k(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function $(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function y(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function K(e,r,a){const s=new Map;if(!r)return s;const i=new Map(e.usageEdges.map(n=>[y(n),n.targetKey])),p=new Map(e.assignments.map(n=>[`${n.targetKey}:${n.queryId}`,n.queryClass])),m=new Map(e.usageEdges.map(n=>[y(n),p.get(`${n.targetKey}:${n.queryId}`)]));for(const n of r.evidence){if(a&&m.get(n.usageEdgeId)!==a)continue;const o=i.get(n.usageEdgeId);if(!o)continue;const d=s.get(o)??[];d.push({id:`${n.observationId}:${n.expectedSlotId}:${n.usageEdgeId}:${n.sourceUrl}`,kind:k(n.classification),query:n.queryText,provider:n.provider,location:n.location,url:n.sourceUrl,tone:$(n.classification),historical:n.historical||n.bridged}),s.set(o,d)}return s}function I(e){if(e.flags>0)return{label:"Review",tone:"caution"};const r=[e.mentionCoverage,e.citationCoverage].filter(a=>a.state==="unavailable").map(a=>a.reason);return r.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:r.includes("plan_v1")?{label:"Update setup",tone:"caution"}:r.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:r.includes("no_population")?{label:"No queries",tone:"neutral"}:r.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function T(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 M(e){if(!e)return"";const r=new Date(e);return Number.isFinite(r.getTime())?r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function b(e){const r=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${r} flagged ${r===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 E({overview:e,activePlan:r,report:a,reportState:s=a?"ready":"loading"}){if(r.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 i=r.plan,p=new Map(i.targets.map(t=>[t.stableKey,t])),m=new Map(i.querySnapshots.map(t=>[t.queryId,t.queryText])),n=new Map;for(const t of i.assignments){if(e.queryClass!=="all"&&t.queryClass!==e.queryClass)continue;const c=m.get(t.queryId);if(!c)continue;const u=n.get(t.targetKey)??new Set;u.add(c),n.set(t.targetKey,u)}const o=a?.revision===r.revision&&a.run?.id===e.measurement.displayedRunId?a:null,d=e.measurement.displayedRunId===void 0||o?"ready":s==="error"||a!=null?"error":"loading",x=K(i,o,e.queryClass==="all"?void 0:e.queryClass),g=e.properties.items.map(t=>{const c=p.get(t.targetKey),u=x.get(t.targetKey)??[];return{id:t.targetKey,name:t.label,mentionCoverage:l(t.mentionCoverage),citationCoverage:l(t.citationCoverage),status:I(t),assignedQueries:[...n.get(t.targetKey)??[]],urls:c?.urlMatchers.map(q)??[],evidence:u,evidenceState:d,historical:u.some(h=>h.historical)}}),f=e.namedShareOfVoice?.entries.map(t=>({name:t.label,coverage:{numerator:t.credits,denominator:e.namedShareOfVoice.denominator}})),C=e.properties.items.flatMap(t=>t.flags>0?[{id:`property:${t.targetKey}`,property:t.label,summary:`${t.flags} ${t.flags===1?"result needs":"results need"} review.`,tone:"caution",count:t.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:T(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:M(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:l(e.metrics.propertiesMentioned),mentionCoverage:l(e.metrics.mentionCoverage),citationCoverage:l(e.metrics.citationCoverage)},properties:g,...f?{shareOfVoice:f}:{}},propertyTotal:e.properties.totalEstimate??g.length,nextCursor:e.properties.nextCursor},availableGroups:i.groups.map(t=>({id:t.stableKey,label:t.label})),...b(e)?{nextActionText:b(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:C}}export{S as a,E as b,q as m};
|