@canonry/canonry 7.0.0 → 7.1.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/canonry-cli.md +3 -1
- package/assets/assets/AuditHistoryPanel-CZWzgyrD.js +1 -0
- package/assets/assets/{BacklinksPage-HIM0fmV7.js → BacklinksPage-D23A-ahd.js} +1 -1
- package/assets/assets/{HistoryPage-BjEVp-fk.js → HistoryPage-BKGVxmNz.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-BnVDR2y_.js → MeasurementPropertyPage-BSxn6_RB.js} +1 -1
- package/assets/assets/ProjectPage-D9W8G_1m.js +8 -0
- package/assets/assets/{RunsPage-fJQe2qJc.js → RunsPage-CeBBjLSE.js} +1 -1
- package/assets/assets/{SettingsPage-1yam5tl6.js → SettingsPage-Jp5Yp4cz.js} +1 -1
- package/assets/assets/SiteHealthSection-DzVegBeN.js +4 -0
- package/assets/assets/{TrafficPage-BdNEscz8.js → TrafficPage-B66AYwWk.js} +2 -2
- package/assets/assets/{TrafficSourceDetailPage-CMEgr4Aw.js → TrafficSourceDetailPage-CXtq1yES.js} +1 -1
- package/assets/assets/{extract-error-message-D2dhaJaW.js → extract-error-message-BVa0lOze.js} +1 -1
- package/assets/assets/{index-CgT2Btdn.css → index-CMe_-fAB.css} +1 -1
- package/assets/assets/index-DuhS0WLM.js +86 -0
- package/assets/assets/{react-sigma_core.esm.min-oP23IWpt.js → react-sigma_core.esm.min-60drsJa6.js} +1 -1
- package/assets/assets/{v2-overview-adapter-DYatWs7N.js → v2-overview-adapter-CLUi2Lkv.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-A5PALGQD.js → chunk-22R5E5CY.js} +94 -190
- package/dist/{chunk-TUHQ5BBQ.js → chunk-2OQ6D26U.js} +2 -5
- package/dist/{chunk-LXWY4NKP.js → chunk-IAMECH2N.js} +3 -3
- package/dist/{chunk-HQJ25LI7.js → chunk-MTSFSXCG.js} +2 -2
- package/dist/{chunk-RRIZ5AKI.js → chunk-U2S5ABOR.js} +2 -2
- package/dist/{chunk-EZ54X4XH.js → chunk-VDX3LYKL.js} +110 -78
- package/dist/{chunk-OOUDIVIU.js → chunk-YGHPT5B2.js} +434 -182
- package/dist/cli.js +8 -8
- package/dist/{demo-server-LHHDVXQW.js → demo-server-TIMYQLXS.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{intelligence-service-ZVKZLLKL.js → intelligence-service-YCMRTVCI.js} +2 -2
- package/dist/mcp.js +4 -4
- package/package.json +10 -10
- package/assets/assets/AuditHistoryPanel-DBYsgVsn.js +0 -1
- package/assets/assets/ProjectPage-BhCM47KA.js +0 -8
- package/assets/assets/SiteHealthSection-DysU2M6C.js +0 -4
- package/assets/assets/index-D9ODLKpH.js +0 -86
|
@@ -6278,8 +6278,15 @@ var snapshotDiffResponseSchema = z12.object({
|
|
|
6278
6278
|
run2: z12.string(),
|
|
6279
6279
|
diff: z12.array(snapshotDiffRowSchema)
|
|
6280
6280
|
});
|
|
6281
|
+
var observedQueryCountsSchema = z12.object({
|
|
6282
|
+
totalQueries: z12.number().int().nonnegative(),
|
|
6283
|
+
citedQueries: z12.number().int().nonnegative(),
|
|
6284
|
+
mentionedQueries: z12.number().int().nonnegative()
|
|
6285
|
+
});
|
|
6281
6286
|
var runDetailDtoSchema = runDtoSchema.extend({
|
|
6282
6287
|
snapshots: z12.array(querySnapshotDtoSchema).optional(),
|
|
6288
|
+
/** Observed queries in this exact run. Null when a snapshot lacks query identity; omitted by older servers. */
|
|
6289
|
+
queryCounts: observedQueryCountsSchema.nullable().optional(),
|
|
6283
6290
|
/** The run's provider batches, oldest first. Empty when nothing was batched. */
|
|
6284
6291
|
providerBatches: z12.array(providerBatchSummaryDtoSchema).optional(),
|
|
6285
6292
|
/** Usage and estimated cost per provider and price tier. Empty when no answer carries usage. */
|
|
@@ -9669,14 +9676,14 @@ function breakdownShares(parts) {
|
|
|
9669
9676
|
const total = parts.reduce((sum, part) => sum + Math.max(0, part), 0);
|
|
9670
9677
|
return parts.map((part) => shareOf(part, total) ?? 0);
|
|
9671
9678
|
}
|
|
9672
|
-
function wilsonInterval(successes, n,
|
|
9679
|
+
function wilsonInterval(successes, n, z71 = 1.96) {
|
|
9673
9680
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
9674
9681
|
const s = Math.max(0, Math.min(successes, n));
|
|
9675
9682
|
const p = s / n;
|
|
9676
|
-
const z210 =
|
|
9683
|
+
const z210 = z71 * z71;
|
|
9677
9684
|
const denom = 1 + z210 / n;
|
|
9678
9685
|
const center = (p + z210 / (2 * n)) / denom;
|
|
9679
|
-
const margin =
|
|
9686
|
+
const margin = z71 / denom * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
|
|
9680
9687
|
return {
|
|
9681
9688
|
low: round(Math.max(0, center - margin)),
|
|
9682
9689
|
high: round(Math.min(1, center + margin))
|
|
@@ -9976,7 +9983,20 @@ var gscQueryTotalsDtoSchema = z27.object({
|
|
|
9976
9983
|
* window paired with only `endDate` spans that many days ending on it. A
|
|
9977
9984
|
* `null` side is unbounded.
|
|
9978
9985
|
*/
|
|
9979
|
-
window: gscWindowRangeSchema
|
|
9986
|
+
window: gscWindowRangeSchema.extend({
|
|
9987
|
+
/**
|
|
9988
|
+
* The first date with stored per-query rows (either query table), ignoring
|
|
9989
|
+
* the window; `null` with none. The lower edge of what this route can
|
|
9990
|
+
* answer: a window starting before it is only partly covered, because
|
|
9991
|
+
* Search Analytics stores no row for an unfetched day and the sum would
|
|
9992
|
+
* read as low traffic rather than missing data.
|
|
9993
|
+
*
|
|
9994
|
+
* Optional on the wire, like `basis` above: a server older than the field
|
|
9995
|
+
* omits it, which means coverage is unknown, not that no rows are stored.
|
|
9996
|
+
* This route always sends it.
|
|
9997
|
+
*/
|
|
9998
|
+
earliestDataDate: z27.string().nullable().optional()
|
|
9999
|
+
})
|
|
9980
10000
|
});
|
|
9981
10001
|
var gscUrlInspectionDtoSchema = z27.object({
|
|
9982
10002
|
id: z27.string(),
|
|
@@ -11283,12 +11303,6 @@ function isRetryableHttpError(err) {
|
|
|
11283
11303
|
return status >= 500 || status === 429;
|
|
11284
11304
|
}
|
|
11285
11305
|
}
|
|
11286
|
-
if (err instanceof Error) {
|
|
11287
|
-
const msg = err.message.toLowerCase();
|
|
11288
|
-
if (msg.includes("fetch failed") || msg.includes("econnreset") || msg.includes("etimedout") || msg.includes("enotfound") || msg.includes("econnrefused") || msg.includes("network error")) {
|
|
11289
|
-
return true;
|
|
11290
|
-
}
|
|
11291
|
-
}
|
|
11292
11306
|
return true;
|
|
11293
11307
|
}
|
|
11294
11308
|
|
|
@@ -16501,6 +16515,19 @@ function normalizeQueryText(value) {
|
|
|
16501
16515
|
return value.trim().toLowerCase();
|
|
16502
16516
|
}
|
|
16503
16517
|
|
|
16518
|
+
// ../contracts/src/query-counts.ts
|
|
16519
|
+
function summarizeObservedQueryCounts(snapshots) {
|
|
16520
|
+
const queries = /* @__PURE__ */ new Set();
|
|
16521
|
+
const cited = /* @__PURE__ */ new Set();
|
|
16522
|
+
const mentioned = /* @__PURE__ */ new Set();
|
|
16523
|
+
for (const snapshot of snapshots) {
|
|
16524
|
+
queries.add(snapshot.queryId);
|
|
16525
|
+
if (snapshot.citationState === CitationStates.cited) cited.add(snapshot.queryId);
|
|
16526
|
+
if (snapshot.answerMentioned === true) mentioned.add(snapshot.queryId);
|
|
16527
|
+
}
|
|
16528
|
+
return { totalQueries: queries.size, citedQueries: cited.size, mentionedQueries: mentioned.size };
|
|
16529
|
+
}
|
|
16530
|
+
|
|
16504
16531
|
// ../contracts/src/citations.ts
|
|
16505
16532
|
import { z as z55 } from "zod";
|
|
16506
16533
|
var citationCoverageProviderSchema = z55.object({
|
|
@@ -19015,8 +19042,231 @@ function detectAgentRuntime(env) {
|
|
|
19015
19042
|
return AGENT_NONE;
|
|
19016
19043
|
}
|
|
19017
19044
|
|
|
19018
|
-
// ../contracts/src/
|
|
19045
|
+
// ../contracts/src/ui-telemetry.ts
|
|
19019
19046
|
import { z as z64 } from "zod";
|
|
19047
|
+
var UI_PAGES = [
|
|
19048
|
+
"/",
|
|
19049
|
+
"/projects",
|
|
19050
|
+
"/projects/:projectName",
|
|
19051
|
+
"/projects/:projectName/portfolio",
|
|
19052
|
+
"/projects/:projectName/search-console",
|
|
19053
|
+
"/projects/:projectName/conversions",
|
|
19054
|
+
"/projects/:projectName/local",
|
|
19055
|
+
"/projects/:projectName/discovery",
|
|
19056
|
+
"/projects/:projectName/queries",
|
|
19057
|
+
"/projects/:projectName/properties/:targetKey",
|
|
19058
|
+
"/projects/:projectName/report",
|
|
19059
|
+
"/projects/:projectName/activity",
|
|
19060
|
+
"/projects/:projectName/backlinks",
|
|
19061
|
+
"/projects/:projectName/technical-aeo",
|
|
19062
|
+
"/projects/:projectName/history",
|
|
19063
|
+
"/projects/:projectName/settings",
|
|
19064
|
+
"/runs",
|
|
19065
|
+
"/history",
|
|
19066
|
+
"/settings",
|
|
19067
|
+
"/setup",
|
|
19068
|
+
"/backlinks",
|
|
19069
|
+
"/traffic",
|
|
19070
|
+
"/traffic/:projectName/:sourceId",
|
|
19071
|
+
"not-found",
|
|
19072
|
+
"other"
|
|
19073
|
+
];
|
|
19074
|
+
var uiPageSchema = z64.enum(UI_PAGES);
|
|
19075
|
+
var UI_PROJECT_TABS = [
|
|
19076
|
+
"overview",
|
|
19077
|
+
"portfolio",
|
|
19078
|
+
"search-console",
|
|
19079
|
+
"conversions",
|
|
19080
|
+
"local",
|
|
19081
|
+
"discovery",
|
|
19082
|
+
"queries",
|
|
19083
|
+
"properties",
|
|
19084
|
+
"report",
|
|
19085
|
+
"activity",
|
|
19086
|
+
"backlinks",
|
|
19087
|
+
"technical-aeo",
|
|
19088
|
+
"history",
|
|
19089
|
+
"settings",
|
|
19090
|
+
"other"
|
|
19091
|
+
];
|
|
19092
|
+
var uiProjectTabSchema = z64.enum(UI_PROJECT_TABS);
|
|
19093
|
+
var UI_ACTIONS = [
|
|
19094
|
+
"sweep.launch",
|
|
19095
|
+
"sweep.cancel",
|
|
19096
|
+
"site_audit.launch",
|
|
19097
|
+
"project.create",
|
|
19098
|
+
"project.update",
|
|
19099
|
+
"project.delete",
|
|
19100
|
+
"query.add",
|
|
19101
|
+
"query.delete",
|
|
19102
|
+
"query.generate",
|
|
19103
|
+
"competitor.save",
|
|
19104
|
+
"competitor.delete",
|
|
19105
|
+
"schedule.save",
|
|
19106
|
+
"schedule.delete",
|
|
19107
|
+
"provider.save",
|
|
19108
|
+
"settings.save",
|
|
19109
|
+
/** An OAuth flow was started; the connection is not confirmed yet. */
|
|
19110
|
+
"integration.connect_started",
|
|
19111
|
+
/** A connection was confirmed (credentials accepted, or a property/account chosen). */
|
|
19112
|
+
"integration.connect",
|
|
19113
|
+
"integration.disconnect",
|
|
19114
|
+
"traffic.sync",
|
|
19115
|
+
"notification.save",
|
|
19116
|
+
"notification.test",
|
|
19117
|
+
"measurement_plan.publish",
|
|
19118
|
+
"discovery.run",
|
|
19119
|
+
"api_key.create",
|
|
19120
|
+
"api_key.revoke",
|
|
19121
|
+
"export.download",
|
|
19122
|
+
"report.download",
|
|
19123
|
+
"aero.open",
|
|
19124
|
+
"aero.send",
|
|
19125
|
+
/** A shared filter settled on a new value (debounced; the value is never sent). */
|
|
19126
|
+
"filter.change",
|
|
19127
|
+
/** A table search settled on a non-empty query (debounced or Enter; the text is never sent). */
|
|
19128
|
+
"search.submit"
|
|
19129
|
+
];
|
|
19130
|
+
var uiActionSchema = z64.enum(UI_ACTIONS);
|
|
19131
|
+
var UI_INTEGRATIONS = [
|
|
19132
|
+
"google",
|
|
19133
|
+
"gsc",
|
|
19134
|
+
"ga",
|
|
19135
|
+
"bing",
|
|
19136
|
+
"gbp",
|
|
19137
|
+
"wordpress",
|
|
19138
|
+
"openai_ads",
|
|
19139
|
+
"google_ads",
|
|
19140
|
+
"gtm",
|
|
19141
|
+
"traffic_cloudflare",
|
|
19142
|
+
"traffic_vercel",
|
|
19143
|
+
"traffic_cloud_run",
|
|
19144
|
+
"traffic_wordpress"
|
|
19145
|
+
];
|
|
19146
|
+
var uiIntegrationSchema = z64.enum(UI_INTEGRATIONS);
|
|
19147
|
+
var UI_FILTERS = ["provider", "model", "location", "window", "query_class", "other"];
|
|
19148
|
+
var uiFilterSchema = z64.enum(UI_FILTERS);
|
|
19149
|
+
var UI_EXPORT_FORMATS = ["csv", "json", "html"];
|
|
19150
|
+
var UI_ERROR_KINDS = ["render", "unhandled", "api"];
|
|
19151
|
+
var UI_STATUS_CLASSES = ["4xx", "5xx", "network"];
|
|
19152
|
+
var UI_VITAL_METRICS = ["LCP", "INP", "CLS", "FCP", "TTFB"];
|
|
19153
|
+
var UI_VITAL_RATINGS = ["good", "needs-improvement", "poor"];
|
|
19154
|
+
var UI_COMPONENT_PATTERN = /^[a-z][a-z0-9-]{0,39}$/;
|
|
19155
|
+
var UI_ERROR_NAME_PATTERN = /^[a-z_$][\w$]{0,39}$/i;
|
|
19156
|
+
var UI_API_ROUTE_PATTERN = /^\/api\/v1(?:\/(?:[a-z][a-z0-9-]*(?:\.[a-z]+)?|\{[A-Za-z]+\}))*$/;
|
|
19157
|
+
var UI_API_ROUTE_MAX_LENGTH = 160;
|
|
19158
|
+
var UI_ROUTE_ID_COLLECTIONS = /* @__PURE__ */ new Set([
|
|
19159
|
+
"accounts",
|
|
19160
|
+
"activation-grants",
|
|
19161
|
+
"ad-groups",
|
|
19162
|
+
"ads",
|
|
19163
|
+
"cache",
|
|
19164
|
+
"campaigns",
|
|
19165
|
+
"competitors",
|
|
19166
|
+
"confirm",
|
|
19167
|
+
"connections",
|
|
19168
|
+
"containers",
|
|
19169
|
+
"contracts",
|
|
19170
|
+
"conversations",
|
|
19171
|
+
"dismissals",
|
|
19172
|
+
"insights",
|
|
19173
|
+
"jobs",
|
|
19174
|
+
"keys",
|
|
19175
|
+
"locations",
|
|
19176
|
+
"measurement-query-sets",
|
|
19177
|
+
"measurement-query-templates",
|
|
19178
|
+
"notifications",
|
|
19179
|
+
"operations",
|
|
19180
|
+
"projects",
|
|
19181
|
+
"providers",
|
|
19182
|
+
"queries",
|
|
19183
|
+
"recommendations",
|
|
19184
|
+
"runs",
|
|
19185
|
+
"screenshots",
|
|
19186
|
+
"segments",
|
|
19187
|
+
"sessions",
|
|
19188
|
+
"snapshots",
|
|
19189
|
+
"sources",
|
|
19190
|
+
"users",
|
|
19191
|
+
"versions"
|
|
19192
|
+
]);
|
|
19193
|
+
var UI_ROUTE_FIXED_CHILDREN = /* @__PURE__ */ new Set([
|
|
19194
|
+
"ads/account",
|
|
19195
|
+
"ads/activation-grants",
|
|
19196
|
+
"ads/ad-groups",
|
|
19197
|
+
"ads/ads",
|
|
19198
|
+
"ads/campaigns",
|
|
19199
|
+
"ads/connect",
|
|
19200
|
+
"ads/connection",
|
|
19201
|
+
"ads/conversions",
|
|
19202
|
+
"ads/delivery-diagnostics",
|
|
19203
|
+
"ads/files",
|
|
19204
|
+
"ads/geo",
|
|
19205
|
+
"ads/insights",
|
|
19206
|
+
"ads/live-delivery",
|
|
19207
|
+
"ads/operations",
|
|
19208
|
+
"ads/status",
|
|
19209
|
+
"ads/summary",
|
|
19210
|
+
"ads/sync",
|
|
19211
|
+
"keys/self",
|
|
19212
|
+
"locations/default",
|
|
19213
|
+
"locations/discover",
|
|
19214
|
+
"notifications/events",
|
|
19215
|
+
"operations/logs",
|
|
19216
|
+
"queries/generate",
|
|
19217
|
+
"queries/replace-preview",
|
|
19218
|
+
"runs/latest",
|
|
19219
|
+
"snapshots/diff"
|
|
19220
|
+
]);
|
|
19221
|
+
var PARAM_SEGMENT = /^\{[a-z]+\}$/i;
|
|
19222
|
+
function isUiApiRouteTemplate(route) {
|
|
19223
|
+
if (route.length > UI_API_ROUTE_MAX_LENGTH || route.includes("://")) return false;
|
|
19224
|
+
if (!UI_API_ROUTE_PATTERN.test(route)) return false;
|
|
19225
|
+
const segments = route.split("/").slice(3);
|
|
19226
|
+
return segments.every((segment, index) => {
|
|
19227
|
+
const previous = segments[index - 1];
|
|
19228
|
+
if (previous === void 0 || !UI_ROUTE_ID_COLLECTIONS.has(previous)) return true;
|
|
19229
|
+
return PARAM_SEGMENT.test(segment) || UI_ROUTE_FIXED_CHILDREN.has(`${previous}/${segment}`);
|
|
19230
|
+
});
|
|
19231
|
+
}
|
|
19232
|
+
var uiEventBaseSchema = z64.object({
|
|
19233
|
+
eventId: z64.string().uuid(),
|
|
19234
|
+
uiSessionId: z64.string().uuid(),
|
|
19235
|
+
page: uiPageSchema
|
|
19236
|
+
});
|
|
19237
|
+
var uiTelemetryEventSchema = z64.discriminatedUnion("event", [
|
|
19238
|
+
uiEventBaseSchema.extend({
|
|
19239
|
+
event: z64.literal("ui.page_viewed"),
|
|
19240
|
+
tab: uiProjectTabSchema.optional()
|
|
19241
|
+
}).strict(),
|
|
19242
|
+
uiEventBaseSchema.extend({
|
|
19243
|
+
event: z64.literal("ui.action"),
|
|
19244
|
+
action: uiActionSchema,
|
|
19245
|
+
tab: uiProjectTabSchema.optional(),
|
|
19246
|
+
integration: uiIntegrationSchema.optional(),
|
|
19247
|
+
format: z64.enum(UI_EXPORT_FORMATS).optional(),
|
|
19248
|
+
filter: uiFilterSchema.optional()
|
|
19249
|
+
}).strict(),
|
|
19250
|
+
uiEventBaseSchema.extend({
|
|
19251
|
+
event: z64.literal("ui.error"),
|
|
19252
|
+
kind: z64.enum(UI_ERROR_KINDS),
|
|
19253
|
+
tab: uiProjectTabSchema.optional(),
|
|
19254
|
+
component: z64.string().regex(UI_COMPONENT_PATTERN).optional(),
|
|
19255
|
+
errorName: z64.string().regex(UI_ERROR_NAME_PATTERN).optional(),
|
|
19256
|
+
route: z64.string().max(UI_API_ROUTE_MAX_LENGTH).refine(isUiApiRouteTemplate, "route must be a route template").optional(),
|
|
19257
|
+
method: z64.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).optional(),
|
|
19258
|
+
statusClass: z64.enum(UI_STATUS_CLASSES).optional(),
|
|
19259
|
+
status: z64.number().int().min(400).max(599).optional()
|
|
19260
|
+
}).strict(),
|
|
19261
|
+
uiEventBaseSchema.extend({
|
|
19262
|
+
event: z64.literal("ui.vitals"),
|
|
19263
|
+
metric: z64.enum(UI_VITAL_METRICS),
|
|
19264
|
+
rating: z64.enum(UI_VITAL_RATINGS)
|
|
19265
|
+
}).strict()
|
|
19266
|
+
]);
|
|
19267
|
+
|
|
19268
|
+
// ../contracts/src/feedback.ts
|
|
19269
|
+
import { z as z65 } from "zod";
|
|
19020
19270
|
|
|
19021
19271
|
// ../contracts/src/log-redaction.ts
|
|
19022
19272
|
var REDACTED = "[REDACTED]";
|
|
@@ -19168,7 +19418,7 @@ function redactEmbeddedUrls(value) {
|
|
|
19168
19418
|
|
|
19169
19419
|
// ../contracts/src/feedback.ts
|
|
19170
19420
|
var FEEDBACK_KINDS = ["struggle", "bug", "improvement", "other"];
|
|
19171
|
-
var feedbackKindSchema =
|
|
19421
|
+
var feedbackKindSchema = z65.enum(FEEDBACK_KINDS);
|
|
19172
19422
|
var FEEDBACK_LIMITS = {
|
|
19173
19423
|
summary: 500,
|
|
19174
19424
|
details: 4e3,
|
|
@@ -19176,17 +19426,17 @@ var FEEDBACK_LIMITS = {
|
|
|
19176
19426
|
command: 120,
|
|
19177
19427
|
errorCode: 40
|
|
19178
19428
|
};
|
|
19179
|
-
var feedbackSubmissionSchema =
|
|
19429
|
+
var feedbackSubmissionSchema = z65.object({
|
|
19180
19430
|
kind: feedbackKindSchema,
|
|
19181
|
-
summary:
|
|
19182
|
-
details:
|
|
19183
|
-
area:
|
|
19184
|
-
command:
|
|
19185
|
-
errorCode:
|
|
19431
|
+
summary: z65.string().trim().min(1).max(FEEDBACK_LIMITS.summary),
|
|
19432
|
+
details: z65.string().trim().min(1).max(FEEDBACK_LIMITS.details).optional(),
|
|
19433
|
+
area: z65.string().trim().min(1).max(FEEDBACK_LIMITS.area).optional(),
|
|
19434
|
+
command: z65.string().trim().min(1).max(FEEDBACK_LIMITS.command).optional(),
|
|
19435
|
+
errorCode: z65.string().trim().min(1).max(FEEDBACK_LIMITS.errorCode).optional()
|
|
19186
19436
|
}).strict();
|
|
19187
|
-
var feedbackAcceptedDtoSchema =
|
|
19188
|
-
accepted:
|
|
19189
|
-
id:
|
|
19437
|
+
var feedbackAcceptedDtoSchema = z65.object({
|
|
19438
|
+
accepted: z65.boolean(),
|
|
19439
|
+
id: z65.string()
|
|
19190
19440
|
});
|
|
19191
19441
|
function redactFeedbackText(value, limit) {
|
|
19192
19442
|
return truncateUtf16(
|
|
@@ -19203,90 +19453,90 @@ var SECRET_FLAG_VALUE = /(?<=^|[ \t])(--?(?:[a-z\d]+-)*(?:key|token|secret|passw
|
|
|
19203
19453
|
var BARE_CREDENTIAL = /\b(?:sk-[\w-]{16,}|AIza[\w-]{30,}|pplx-[A-Za-z0-9]{16,}|gh[pousr]_[A-Za-z0-9]{20,}|github_pat_\w{20,}|cnry_[\w-]{16,})/g;
|
|
19204
19454
|
|
|
19205
19455
|
// ../contracts/src/operational-logs.ts
|
|
19206
|
-
import { z as
|
|
19207
|
-
var operationalLogLevelSchema =
|
|
19208
|
-
var diagnosticContextSchema =
|
|
19209
|
-
runId:
|
|
19210
|
-
projectId:
|
|
19211
|
-
requestId:
|
|
19212
|
-
actor:
|
|
19213
|
-
credentialId:
|
|
19214
|
-
userAgent:
|
|
19215
|
-
actorSession:
|
|
19216
|
-
method:
|
|
19217
|
-
route:
|
|
19218
|
-
operationId:
|
|
19219
|
-
jobId:
|
|
19220
|
-
taskId:
|
|
19221
|
-
traceId:
|
|
19222
|
-
provider:
|
|
19223
|
-
errorCode:
|
|
19224
|
-
attempt:
|
|
19225
|
-
count:
|
|
19226
|
-
total:
|
|
19227
|
-
progress:
|
|
19228
|
-
httpStatus:
|
|
19229
|
-
statusCode:
|
|
19230
|
-
durationMs:
|
|
19231
|
-
bytes:
|
|
19232
|
-
retryAfterMs:
|
|
19233
|
-
retriable:
|
|
19234
|
-
retrying:
|
|
19235
|
-
cancelled:
|
|
19236
|
-
success:
|
|
19237
|
-
}).strict();
|
|
19238
|
-
var operationalLogEntryDtoSchema =
|
|
19239
|
-
cursor:
|
|
19240
|
-
ts:
|
|
19456
|
+
import { z as z66 } from "zod";
|
|
19457
|
+
var operationalLogLevelSchema = z66.enum(["trace", "debug", "info", "warn", "error", "fatal"]);
|
|
19458
|
+
var diagnosticContextSchema = z66.object({
|
|
19459
|
+
runId: z66.string().min(1).max(256).optional(),
|
|
19460
|
+
projectId: z66.string().min(1).max(256).optional(),
|
|
19461
|
+
requestId: z66.string().min(1).max(256).optional(),
|
|
19462
|
+
actor: z66.string().min(1).max(512).optional(),
|
|
19463
|
+
credentialId: z66.string().min(1).max(512).optional(),
|
|
19464
|
+
userAgent: z66.string().min(1).max(512).optional(),
|
|
19465
|
+
actorSession: z66.string().min(1).max(512).optional(),
|
|
19466
|
+
method: z66.string().min(1).max(16).optional(),
|
|
19467
|
+
route: z66.string().min(1).max(256).optional(),
|
|
19468
|
+
operationId: z66.string().min(1).max(256).optional(),
|
|
19469
|
+
jobId: z66.string().min(1).max(256).optional(),
|
|
19470
|
+
taskId: z66.string().min(1).max(256).optional(),
|
|
19471
|
+
traceId: z66.string().min(1).max(256).optional(),
|
|
19472
|
+
provider: z66.string().min(1).max(256).optional(),
|
|
19473
|
+
errorCode: z66.string().min(1).max(128).optional(),
|
|
19474
|
+
attempt: z66.number().finite().optional(),
|
|
19475
|
+
count: z66.number().finite().optional(),
|
|
19476
|
+
total: z66.number().finite().optional(),
|
|
19477
|
+
progress: z66.number().finite().optional(),
|
|
19478
|
+
httpStatus: z66.number().finite().optional(),
|
|
19479
|
+
statusCode: z66.number().finite().optional(),
|
|
19480
|
+
durationMs: z66.number().finite().optional(),
|
|
19481
|
+
bytes: z66.number().finite().optional(),
|
|
19482
|
+
retryAfterMs: z66.number().finite().optional(),
|
|
19483
|
+
retriable: z66.boolean().optional(),
|
|
19484
|
+
retrying: z66.boolean().optional(),
|
|
19485
|
+
cancelled: z66.boolean().optional(),
|
|
19486
|
+
success: z66.boolean().optional()
|
|
19487
|
+
}).strict();
|
|
19488
|
+
var operationalLogEntryDtoSchema = z66.object({
|
|
19489
|
+
cursor: z66.string().min(1).max(512),
|
|
19490
|
+
ts: z66.string().datetime(),
|
|
19241
19491
|
level: operationalLogLevelSchema,
|
|
19242
|
-
module:
|
|
19243
|
-
action:
|
|
19244
|
-
message:
|
|
19245
|
-
runId:
|
|
19246
|
-
projectId:
|
|
19492
|
+
module: z66.string().min(1).max(256),
|
|
19493
|
+
action: z66.string().min(1).max(256),
|
|
19494
|
+
message: z66.string().max(4096).optional(),
|
|
19495
|
+
runId: z66.string().min(1).max(256).optional(),
|
|
19496
|
+
projectId: z66.string().min(1).max(256).optional(),
|
|
19247
19497
|
context: diagnosticContextSchema
|
|
19248
19498
|
}).strict();
|
|
19249
|
-
var logQuerySchema =
|
|
19499
|
+
var logQuerySchema = z66.object({
|
|
19250
19500
|
level: operationalLogLevelSchema.optional(),
|
|
19251
|
-
module:
|
|
19252
|
-
runId:
|
|
19253
|
-
projectId:
|
|
19254
|
-
actor:
|
|
19255
|
-
requestId:
|
|
19256
|
-
since:
|
|
19257
|
-
until:
|
|
19258
|
-
limit:
|
|
19259
|
-
cursor:
|
|
19501
|
+
module: z66.string().trim().min(1).max(256).optional(),
|
|
19502
|
+
runId: z66.string().trim().min(1).max(256).optional(),
|
|
19503
|
+
projectId: z66.string().trim().min(1).max(256).optional(),
|
|
19504
|
+
actor: z66.string().trim().min(1).max(512).optional(),
|
|
19505
|
+
requestId: z66.string().trim().min(1).max(256).optional(),
|
|
19506
|
+
since: z66.string().datetime().optional(),
|
|
19507
|
+
until: z66.string().datetime().optional(),
|
|
19508
|
+
limit: z66.coerce.number().int().min(1).max(200).default(100),
|
|
19509
|
+
cursor: z66.string().trim().min(1).max(512).optional()
|
|
19260
19510
|
}).strict().superRefine((query, ctx) => {
|
|
19261
19511
|
if (query.since && query.until && Date.parse(query.since) > Date.parse(query.until)) {
|
|
19262
|
-
ctx.addIssue({ code:
|
|
19512
|
+
ctx.addIssue({ code: z66.ZodIssueCode.custom, path: ["until"], message: '"until" must be on or after "since".' });
|
|
19263
19513
|
}
|
|
19264
19514
|
});
|
|
19265
|
-
var retentionPolicySchema =
|
|
19266
|
-
maxEntries:
|
|
19267
|
-
maxAgeSeconds:
|
|
19515
|
+
var retentionPolicySchema = z66.object({
|
|
19516
|
+
maxEntries: z66.number().int().positive(),
|
|
19517
|
+
maxAgeSeconds: z66.number().int().positive()
|
|
19268
19518
|
}).strict();
|
|
19269
|
-
var operationalLogListDtoSchema =
|
|
19270
|
-
entries:
|
|
19271
|
-
nextCursor:
|
|
19519
|
+
var operationalLogListDtoSchema = z66.object({
|
|
19520
|
+
entries: z66.array(operationalLogEntryDtoSchema),
|
|
19521
|
+
nextCursor: z66.string().min(1).max(512).nullable(),
|
|
19272
19522
|
/** Matching entries left after this page. */
|
|
19273
|
-
truncated:
|
|
19523
|
+
truncated: z66.number().int().nonnegative(),
|
|
19274
19524
|
/** Entries evicted by the active retention policy. */
|
|
19275
|
-
dropped:
|
|
19276
|
-
retention:
|
|
19525
|
+
dropped: z66.number().int().nonnegative(),
|
|
19526
|
+
retention: z66.enum(["process", "durable"]),
|
|
19277
19527
|
retentionPolicy: retentionPolicySchema.optional(),
|
|
19278
19528
|
/** Best-effort persistence failures observed by this store. */
|
|
19279
|
-
captureErrors:
|
|
19280
|
-
observedAt:
|
|
19529
|
+
captureErrors: z66.number().int().nonnegative().optional(),
|
|
19530
|
+
observedAt: z66.string().datetime()
|
|
19281
19531
|
}).strict();
|
|
19282
19532
|
var OPERATIONAL_LOG_FIELDS_HEADER = "x-canonry-log-fields";
|
|
19283
19533
|
var OPERATIONAL_LOG_OPT_IN_CONTEXT_FIELDS = ["provider"];
|
|
19284
|
-
var diagnosticContextReadSchema =
|
|
19285
|
-
var operationalLogEntryReadSchema =
|
|
19286
|
-
var operationalLogListReadSchema =
|
|
19534
|
+
var diagnosticContextReadSchema = z66.object(diagnosticContextSchema.shape);
|
|
19535
|
+
var operationalLogEntryReadSchema = z66.object({ ...operationalLogEntryDtoSchema.shape, context: diagnosticContextReadSchema });
|
|
19536
|
+
var operationalLogListReadSchema = z66.object({
|
|
19287
19537
|
...operationalLogListDtoSchema.shape,
|
|
19288
|
-
entries:
|
|
19289
|
-
retentionPolicy:
|
|
19538
|
+
entries: z66.array(operationalLogEntryReadSchema),
|
|
19539
|
+
retentionPolicy: z66.object(retentionPolicySchema.shape).optional()
|
|
19290
19540
|
});
|
|
19291
19541
|
|
|
19292
19542
|
// ../contracts/src/semver.ts
|
|
@@ -19352,38 +19602,38 @@ function asRecord(value) {
|
|
|
19352
19602
|
}
|
|
19353
19603
|
|
|
19354
19604
|
// ../contracts/src/referral-assessment.ts
|
|
19355
|
-
import { z as
|
|
19356
|
-
var referralAssessmentQuerySchema =
|
|
19605
|
+
import { z as z67 } from "zod";
|
|
19606
|
+
var referralAssessmentQuerySchema = z67.object({
|
|
19357
19607
|
startDate: calendarDateSchema,
|
|
19358
19608
|
endDate: calendarDateSchema,
|
|
19359
|
-
sourceId:
|
|
19360
|
-
burstThreshold:
|
|
19361
|
-
ratioThreshold:
|
|
19362
|
-
limit:
|
|
19363
|
-
}).strict();
|
|
19364
|
-
var countsSchema =
|
|
19365
|
-
total:
|
|
19366
|
-
paid:
|
|
19367
|
-
organic:
|
|
19368
|
-
unknown:
|
|
19369
|
-
});
|
|
19370
|
-
var referralAssessmentSchema =
|
|
19371
|
-
scope:
|
|
19372
|
-
project:
|
|
19373
|
-
sourceId:
|
|
19374
|
-
attribution:
|
|
19375
|
-
unavailableDimensions:
|
|
19609
|
+
sourceId: z67.string().trim().min(1).optional(),
|
|
19610
|
+
burstThreshold: z67.number().int().min(1).max(1e6).optional(),
|
|
19611
|
+
ratioThreshold: z67.number().min(1).max(1e3).optional(),
|
|
19612
|
+
limit: z67.number().int().min(1).max(500).optional()
|
|
19613
|
+
}).strict();
|
|
19614
|
+
var countsSchema = z67.object({
|
|
19615
|
+
total: z67.number().int().nonnegative(),
|
|
19616
|
+
paid: z67.number().int().nonnegative(),
|
|
19617
|
+
organic: z67.number().int().nonnegative(),
|
|
19618
|
+
unknown: z67.number().int().nonnegative()
|
|
19619
|
+
});
|
|
19620
|
+
var referralAssessmentSchema = z67.object({
|
|
19621
|
+
scope: z67.object({
|
|
19622
|
+
project: z67.string(),
|
|
19623
|
+
sourceId: z67.string().nullable(),
|
|
19624
|
+
attribution: z67.literal("project-source-only"),
|
|
19625
|
+
unavailableDimensions: z67.array(z67.enum(["property", "target", "market"]))
|
|
19376
19626
|
}),
|
|
19377
|
-
window:
|
|
19378
|
-
rule:
|
|
19379
|
-
version:
|
|
19380
|
-
burstThreshold:
|
|
19381
|
-
ratioThreshold:
|
|
19382
|
-
calibration:
|
|
19383
|
-
grouping:
|
|
19384
|
-
confirmsAutomation:
|
|
19627
|
+
window: z67.object({ startDate: calendarDateSchema, endDate: calendarDateSchema, timeZone: z67.literal("UTC") }),
|
|
19628
|
+
rule: z67.object({
|
|
19629
|
+
version: z67.literal("hourly-normalized-path-v1"),
|
|
19630
|
+
burstThreshold: z67.number().int().positive(),
|
|
19631
|
+
ratioThreshold: z67.number().positive(),
|
|
19632
|
+
calibration: z67.enum(["uncalibrated-default", "request-override"]),
|
|
19633
|
+
grouping: z67.array(z67.string()),
|
|
19634
|
+
confirmsAutomation: z67.literal(false)
|
|
19385
19635
|
}),
|
|
19386
|
-
totals:
|
|
19636
|
+
totals: z67.object({
|
|
19387
19637
|
raw: countsSchema,
|
|
19388
19638
|
redirects: countsSchema,
|
|
19389
19639
|
subresources: countsSchema,
|
|
@@ -19391,42 +19641,42 @@ var referralAssessmentSchema = z66.object({
|
|
|
19391
19641
|
suspected: countsSchema,
|
|
19392
19642
|
adjustedEstimate: countsSchema
|
|
19393
19643
|
}),
|
|
19394
|
-
bursts:
|
|
19395
|
-
sourceId:
|
|
19396
|
-
product:
|
|
19397
|
-
landingPathNormalized:
|
|
19398
|
-
tsHour:
|
|
19644
|
+
bursts: z67.array(z67.object({
|
|
19645
|
+
sourceId: z67.string(),
|
|
19646
|
+
product: z67.string(),
|
|
19647
|
+
landingPathNormalized: z67.string(),
|
|
19648
|
+
tsHour: z67.string(),
|
|
19399
19649
|
counts: countsSchema
|
|
19400
19650
|
})),
|
|
19401
|
-
evidence:
|
|
19402
|
-
comparison:
|
|
19403
|
-
status:
|
|
19404
|
-
serverCountable:
|
|
19405
|
-
serverObservation:
|
|
19651
|
+
evidence: z67.object({ total: z67.number().int().nonnegative(), returned: z67.number().int().nonnegative(), truncated: z67.boolean() }),
|
|
19652
|
+
comparison: z67.object({
|
|
19653
|
+
status: z67.literal("unavailable"),
|
|
19654
|
+
serverCountable: z67.number().int().nonnegative(),
|
|
19655
|
+
serverObservation: z67.enum(["missing", "observed-zero", "observed-positive"]),
|
|
19406
19656
|
/**
|
|
19407
19657
|
* Dimension-deduplicated GA AI sessions. With no stored AI row in the
|
|
19408
19658
|
* window: `0` (`observed-zero`) when the latest GA sync queried the whole
|
|
19409
19659
|
* window (GA4 omits zero rows), else `null` (`missing`).
|
|
19410
19660
|
*/
|
|
19411
|
-
gaSessions:
|
|
19412
|
-
gaObservation:
|
|
19661
|
+
gaSessions: z67.number().int().nonnegative().nullable(),
|
|
19662
|
+
gaObservation: z67.enum(["missing", "observed-zero", "observed-positive"]),
|
|
19413
19663
|
/**
|
|
19414
19664
|
* Descriptive quotient only (`serverCountable / gaSessions`, a multiplier
|
|
19415
19665
|
* where 3 is three times as many, never a percent), rounded to 2
|
|
19416
19666
|
* decimals. Not a matched, coverage-complete comparison.
|
|
19417
19667
|
*/
|
|
19418
|
-
observedRatio:
|
|
19668
|
+
observedRatio: z67.number().nonnegative().nullable(),
|
|
19419
19669
|
/** Compares the rounded `observedRatio` with `rule.ratioThreshold`. */
|
|
19420
|
-
observedRatioAboveThreshold:
|
|
19421
|
-
ratio:
|
|
19422
|
-
reasons:
|
|
19423
|
-
gaScope:
|
|
19670
|
+
observedRatioAboveThreshold: z67.boolean().nullable(),
|
|
19671
|
+
ratio: z67.null(),
|
|
19672
|
+
reasons: z67.array(z67.string()),
|
|
19673
|
+
gaScope: z67.literal("project")
|
|
19424
19674
|
}),
|
|
19425
|
-
caveats:
|
|
19675
|
+
caveats: z67.array(z67.string())
|
|
19426
19676
|
});
|
|
19427
19677
|
|
|
19428
19678
|
// ../contracts/src/tolerant-read.ts
|
|
19429
|
-
import { z as
|
|
19679
|
+
import { z as z68 } from "zod";
|
|
19430
19680
|
var WRAPPER_TYPES = /* @__PURE__ */ new Set(["optional", "nullable", "default", "prefault", "readonly", "catch", "nonoptional"]);
|
|
19431
19681
|
var DEPTH_LIMIT = 64;
|
|
19432
19682
|
function defOf(schema) {
|
|
@@ -19437,9 +19687,9 @@ function cloneWith(schema, changes) {
|
|
|
19437
19687
|
}
|
|
19438
19688
|
function openPrimitive(values) {
|
|
19439
19689
|
if (values.length === 0) return void 0;
|
|
19440
|
-
if (values.every((value) => typeof value === "string")) return
|
|
19441
|
-
if (values.every((value) => typeof value === "number")) return
|
|
19442
|
-
if (values.every((value) => typeof value === "boolean")) return
|
|
19690
|
+
if (values.every((value) => typeof value === "string")) return z68.string();
|
|
19691
|
+
if (values.every((value) => typeof value === "number")) return z68.number();
|
|
19692
|
+
if (values.every((value) => typeof value === "boolean")) return z68.boolean();
|
|
19443
19693
|
return void 0;
|
|
19444
19694
|
}
|
|
19445
19695
|
function walk2(schema, open, memo, depth) {
|
|
@@ -19453,7 +19703,7 @@ function walk2(schema, open, memo, depth) {
|
|
|
19453
19703
|
const shape = Object.fromEntries(Object.entries(schema.shape).map(([key, child]) => [key, next(child)]));
|
|
19454
19704
|
const declared = def.catchall;
|
|
19455
19705
|
const catchall = open.get(schema) ?? (declared && defOf(declared).type !== "never" ? next(declared) : void 0);
|
|
19456
|
-
result = catchall ?
|
|
19706
|
+
result = catchall ? z68.object(shape).catchall(catchall) : z68.object(shape);
|
|
19457
19707
|
} else if (WRAPPER_TYPES.has(def.type)) {
|
|
19458
19708
|
const inner = def.innerType;
|
|
19459
19709
|
const mapped = next(inner);
|
|
@@ -19470,10 +19720,10 @@ function walk2(schema, open, memo, depth) {
|
|
|
19470
19720
|
const options = def.options;
|
|
19471
19721
|
const mapped = options.map(next);
|
|
19472
19722
|
const changed = mapped.some((option, index) => option !== options[index]);
|
|
19473
|
-
result = !changed ? schema : def.discriminator ?
|
|
19723
|
+
result = !changed ? schema : def.discriminator ? z68.union(mapped) : cloneWith(schema, { options: mapped });
|
|
19474
19724
|
} else if (def.type === "record") {
|
|
19475
19725
|
const keyType = def.keyType, valueType = def.valueType;
|
|
19476
|
-
const mappedKey = defOf(keyType).type === "enum" ?
|
|
19726
|
+
const mappedKey = defOf(keyType).type === "enum" ? z68.string() : keyType;
|
|
19477
19727
|
const mappedValue = next(valueType);
|
|
19478
19728
|
result = mappedKey === keyType && mappedValue === valueType ? schema : cloneWith(schema, { keyType: mappedKey, valueType: mappedValue });
|
|
19479
19729
|
} else if (def.type === "intersection") {
|
|
@@ -19489,7 +19739,7 @@ function walk2(schema, open, memo, depth) {
|
|
|
19489
19739
|
result = changed ? cloneWith(schema, { items: mappedItems, rest: mappedRest }) : schema;
|
|
19490
19740
|
} else if (def.type === "lazy") {
|
|
19491
19741
|
const getter = def.getter;
|
|
19492
|
-
result =
|
|
19742
|
+
result = z68.lazy(() => next(getter()));
|
|
19493
19743
|
} else if (def.type === "enum") {
|
|
19494
19744
|
result = openPrimitive(Object.values(def.entries)) ?? schema;
|
|
19495
19745
|
} else if (def.type === "literal") {
|
|
@@ -19504,8 +19754,8 @@ function tolerantReadSchema(schema, options = {}) {
|
|
|
19504
19754
|
}
|
|
19505
19755
|
|
|
19506
19756
|
// ../contracts/src/sentiment-read.ts
|
|
19507
|
-
import { z as
|
|
19508
|
-
var OPEN_COUNTS = { openKeys: [[sentimentCountsSchema,
|
|
19757
|
+
import { z as z69 } from "zod";
|
|
19758
|
+
var OPEN_COUNTS = { openKeys: [[sentimentCountsSchema, z69.number().int().nonnegative()]] };
|
|
19509
19759
|
var sentimentSettingsReadSchema = tolerantReadSchema(sentimentSettingsSchema, OPEN_COUNTS);
|
|
19510
19760
|
var sentimentSummaryReadSchema = tolerantReadSchema(sentimentSummarySchema, OPEN_COUNTS);
|
|
19511
19761
|
var sentimentEvidencePageReadSchema = tolerantReadSchema(sentimentEvidencePageSchema, OPEN_COUNTS);
|
|
@@ -19515,10 +19765,10 @@ var sentimentJobReadSchema = tolerantReadSchema(sentimentJobSchema, OPEN_COUNTS)
|
|
|
19515
19765
|
var sentimentJobsReadSchema = tolerantReadSchema(sentimentJobsSchema, OPEN_COUNTS);
|
|
19516
19766
|
|
|
19517
19767
|
// ../contracts/src/traffic-analytics.ts
|
|
19518
|
-
import { z as
|
|
19768
|
+
import { z as z70 } from "zod";
|
|
19519
19769
|
var TRAFFIC_ANALYTICS_PERIOD_OPTIONS = [7, 14, 30, 90];
|
|
19520
19770
|
var TRAFFIC_ANALYTICS_DEFAULT_PERIOD_DAYS = 30;
|
|
19521
|
-
var trafficAnalyticsPeriodSchema =
|
|
19771
|
+
var trafficAnalyticsPeriodSchema = z70.union([z70.literal(7), z70.literal(14), z70.literal(30), z70.literal(90)]).describe("Traffic activity window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");
|
|
19522
19772
|
function parseTrafficAnalyticsPeriod(value) {
|
|
19523
19773
|
if (value === void 0 || value === null || value === "") return TRAFFIC_ANALYTICS_DEFAULT_PERIOD_DAYS;
|
|
19524
19774
|
const parsed = typeof value === "number" ? value : Number(value);
|
|
@@ -19528,17 +19778,17 @@ function parseTrafficAnalyticsPeriod(value) {
|
|
|
19528
19778
|
}
|
|
19529
19779
|
return result.data;
|
|
19530
19780
|
}
|
|
19531
|
-
var trafficActivityCountSchema =
|
|
19532
|
-
var trafficActivitySummarySchema =
|
|
19781
|
+
var trafficActivityCountSchema = z70.object({ current: z70.number(), prior: z70.number(), deltaPct: percent().nullable() });
|
|
19782
|
+
var trafficActivitySummarySchema = z70.object({
|
|
19533
19783
|
/** ISO8601 inclusive lower bound of the selected window (default: 30 days). */
|
|
19534
|
-
windowStart:
|
|
19784
|
+
windowStart: z70.string(),
|
|
19535
19785
|
/** ISO8601 inclusive upper bound. */
|
|
19536
|
-
windowEnd:
|
|
19786
|
+
windowEnd: z70.string(),
|
|
19537
19787
|
/** Earliest stored project observation across crawler, user-fetch and referral hourly rows; not window-bound. */
|
|
19538
|
-
coverageStart:
|
|
19788
|
+
coverageStart: z70.string().nullable(),
|
|
19539
19789
|
/** Recording began on or before the prior window start. This does not establish uninterrupted ingestion. */
|
|
19540
|
-
priorWindowComplete:
|
|
19541
|
-
hasData:
|
|
19790
|
+
priorWindowComplete: z70.boolean(),
|
|
19791
|
+
hasData: z70.boolean().describe("True when the selected or prior window has stored crawler, user-fetch, countable referral or operator evidence, or the selected window has referral redirects. False means no qualifying stored evidence; it can occur with no, paused, errored or never-synced ingestion and out-of-window observations. It does not establish measured zero traffic or source health."),
|
|
19542
19792
|
/** Verified crawler hits during the selected period and the equal preceding period. */
|
|
19543
19793
|
verifiedCrawlerHits: trafficActivityCountSchema,
|
|
19544
19794
|
/** Unverified crawler hits during the selected period, separate from verified hits. */
|
|
@@ -19567,7 +19817,7 @@ var trafficActivitySummarySchema = z69.object({
|
|
|
19567
19817
|
* is exactly the thing to fix, so the summary must show it rather
|
|
19568
19818
|
* than render an empty section.
|
|
19569
19819
|
*/
|
|
19570
|
-
referralRedirects:
|
|
19820
|
+
referralRedirects: z70.number().int().nonnegative(),
|
|
19571
19821
|
/**
|
|
19572
19822
|
* `referralArrivals` split by traffic class. The three buckets sum to it.
|
|
19573
19823
|
*
|
|
@@ -19576,31 +19826,31 @@ var trafficActivitySummarySchema = z69.object({
|
|
|
19576
19826
|
* never be resolved. Reporting them as organic would overstate earned AI
|
|
19577
19827
|
* traffic by exactly a client's ad volume.
|
|
19578
19828
|
*/
|
|
19579
|
-
referralArrivalsByClass:
|
|
19829
|
+
referralArrivalsByClass: z70.object({
|
|
19580
19830
|
paid: trafficActivityCountSchema,
|
|
19581
19831
|
organic: trafficActivityCountSchema,
|
|
19582
19832
|
unclassified: trafficActivityCountSchema
|
|
19583
19833
|
}),
|
|
19584
19834
|
/** Pre-rendered one-line breakdown, e.g. "Paid 1,200 · Organic 24". Empty when there is nothing to split. */
|
|
19585
|
-
referralArrivalsClassSummary:
|
|
19835
|
+
referralArrivalsClassSummary: z70.string(),
|
|
19586
19836
|
/** Per-AI-operator breakdown (OpenAI, Anthropic, Google AI, Perplexity, …). */
|
|
19587
|
-
byOperator:
|
|
19588
|
-
operator:
|
|
19589
|
-
verifiedHits:
|
|
19837
|
+
byOperator: z70.array(z70.object({
|
|
19838
|
+
operator: z70.string(),
|
|
19839
|
+
verifiedHits: z70.number(),
|
|
19590
19840
|
/** claimed-bot UA, source IP not in a published range. */
|
|
19591
|
-
unverifiedHits:
|
|
19841
|
+
unverifiedHits: z70.number(),
|
|
19592
19842
|
/** Per-user fetches from this operator's AI surface (ChatGPT-User, …). */
|
|
19593
|
-
userFetchHits:
|
|
19594
|
-
referralArrivals:
|
|
19843
|
+
userFetchHits: z70.number(),
|
|
19844
|
+
referralArrivals: z70.number(),
|
|
19595
19845
|
deltaPct: percent().nullable()
|
|
19596
19846
|
})),
|
|
19597
19847
|
/**
|
|
19598
19848
|
* Top crawled paths during the selected period, with both verified and
|
|
19599
19849
|
* unverified crawler hits. These are request counts, not citation evidence.
|
|
19600
19850
|
*/
|
|
19601
|
-
topCrawledPaths:
|
|
19602
|
-
path:
|
|
19603
|
-
verifiedHits:
|
|
19851
|
+
topCrawledPaths: z70.array(z70.object({
|
|
19852
|
+
path: z70.string(),
|
|
19853
|
+
verifiedHits: z70.number(),
|
|
19604
19854
|
/**
|
|
19605
19855
|
* Hits from a crawler that identified itself but whose source IP could not
|
|
19606
19856
|
* be matched against the operator's published ranges. Additive, not an
|
|
@@ -19608,36 +19858,36 @@ var trafficActivitySummarySchema = z69.object({
|
|
|
19608
19858
|
* logs, for one), so for those projects every hit lands here and a
|
|
19609
19859
|
* verified-only view reports zero against real crawl activity.
|
|
19610
19860
|
*/
|
|
19611
|
-
unverifiedHits:
|
|
19861
|
+
unverifiedHits: z70.number().default(0),
|
|
19612
19862
|
/** How many distinct AI operators crawled this path in the window. */
|
|
19613
|
-
distinctOperators:
|
|
19863
|
+
distinctOperators: z70.number()
|
|
19614
19864
|
})),
|
|
19615
19865
|
/** AI products that sent ≥1 session in the window (referral by destination). */
|
|
19616
|
-
referralProducts:
|
|
19617
|
-
product:
|
|
19618
|
-
arrivals:
|
|
19619
|
-
distinctLandingPaths:
|
|
19866
|
+
referralProducts: z70.array(z70.object({
|
|
19867
|
+
product: z70.string(),
|
|
19868
|
+
arrivals: z70.number(),
|
|
19869
|
+
distinctLandingPaths: z70.number()
|
|
19620
19870
|
})),
|
|
19621
19871
|
/** Daily request counts during the selected period. */
|
|
19622
|
-
dailyTrend:
|
|
19623
|
-
date:
|
|
19624
|
-
verifiedCrawlerHits:
|
|
19872
|
+
dailyTrend: z70.array(z70.object({
|
|
19873
|
+
date: z70.string(),
|
|
19874
|
+
verifiedCrawlerHits: z70.number(),
|
|
19625
19875
|
/** See topCrawledPaths.unverifiedHits. Plotted alongside, never instead. */
|
|
19626
|
-
unverifiedCrawlerHits:
|
|
19627
|
-
userFetchHits:
|
|
19628
|
-
referralArrivals:
|
|
19876
|
+
unverifiedCrawlerHits: z70.number().default(0),
|
|
19877
|
+
userFetchHits: z70.number(),
|
|
19878
|
+
referralArrivals: z70.number()
|
|
19629
19879
|
})),
|
|
19630
19880
|
/**
|
|
19631
19881
|
* Top landing paths for AI-referral sessions during the selected period.
|
|
19632
19882
|
* Complements crawler paths with server-observed referral arrivals.
|
|
19633
19883
|
*/
|
|
19634
|
-
topReferralLandingPaths:
|
|
19635
|
-
path:
|
|
19636
|
-
arrivals:
|
|
19637
|
-
distinctProducts:
|
|
19884
|
+
topReferralLandingPaths: z70.array(z70.object({
|
|
19885
|
+
path: z70.string(),
|
|
19886
|
+
arrivals: z70.number(),
|
|
19887
|
+
distinctProducts: z70.number()
|
|
19638
19888
|
}))
|
|
19639
19889
|
});
|
|
19640
|
-
var trafficAnalyticsResponseSchema =
|
|
19890
|
+
var trafficAnalyticsResponseSchema = z70.object({
|
|
19641
19891
|
/** Null when no non-archived traffic source is connected. Connected sources without events return zero counts. */
|
|
19642
19892
|
activity: trafficActivitySummarySchema.nullable()
|
|
19643
19893
|
});
|
|
@@ -20368,6 +20618,7 @@ export {
|
|
|
20368
20618
|
groupIsoDateRanges,
|
|
20369
20619
|
deriveIndexCoverage,
|
|
20370
20620
|
normalizeQueryText,
|
|
20621
|
+
summarizeObservedQueryCounts,
|
|
20371
20622
|
citationVisibilityResponseSchema,
|
|
20372
20623
|
emptyCitationVisibility,
|
|
20373
20624
|
citationStateToCited,
|
|
@@ -20544,6 +20795,7 @@ export {
|
|
|
20544
20795
|
AGENT_NONE,
|
|
20545
20796
|
normalizeAgentSlug,
|
|
20546
20797
|
detectAgentRuntime,
|
|
20798
|
+
uiTelemetryEventSchema,
|
|
20547
20799
|
isSensitiveDiagnosticQueryKey,
|
|
20548
20800
|
redactLogValue,
|
|
20549
20801
|
redactLogString,
|