@canonry/canonry 7.68.2 → 7.69.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/{AgentSetupPage-8oLO0OyH.js → AgentSetupPage-CKRlDQZp.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-DWwuFP2S.js +4 -0
- package/assets/assets/ProjectPage-D7jNMDzn.js +9 -0
- package/assets/assets/{RunsPage-BAs6sABy.js → RunsPage-vVs_xnqi.js} +1 -1
- package/assets/assets/{SettingsPage-DcSDIWnl.js → SettingsPage-wY4KTSfr.js} +1 -1
- package/assets/assets/SiteHealthSection-DEwB7O4i.js +2 -0
- package/assets/assets/{TrafficPage-CxFJj1rx.js → TrafficPage-DDpApkaw.js} +4 -4
- package/assets/assets/{index-CqNwsqjm.css → index-CIGmRg9U.css} +1 -1
- package/assets/assets/index-DPFsoLdC.js +60 -0
- package/assets/assets/{react-sigma_core.esm.min-Cd5EDtIB.js → react-sigma_core.esm.min-D2CArzQ5.js} +1 -1
- package/assets/assets/{service-CREaLXip.js → service-D57MOMmG.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{ads-4NQ5BO2A.js → ads-UTME46NF.js} +3 -3
- package/dist/{agent-SR7IUYLK.js → agent-PYDTNLR4.js} +7 -7
- package/dist/{agent-ask-F3T4GB33.js → agent-ask-NA4QFFM6.js} +3 -3
- package/dist/{agent-conversations-D54I2N5I.js → agent-conversations-3S56EX4U.js} +3 -3
- package/dist/{agent-memory-BWUJGV3E.js → agent-memory-D2RT5TVJ.js} +3 -3
- package/dist/{agent-providers-WNKOKIZY.js → agent-providers-5C2DRUR3.js} +3 -3
- package/dist/{agent-transcript-GM22FSJK.js → agent-transcript-SY5BZPO3.js} +3 -3
- package/dist/{analytics-RLLQBQOK.js → analytics-GUENANBB.js} +3 -3
- package/dist/{apply-RGJKLQKC.js → apply-R5K6RGEH.js} +3 -3
- package/dist/{backfill-GRVBAKFQ.js → backfill-B2EXGQCW.js} +9 -9
- package/dist/{backlinks-VE2JOWKE.js → backlinks-X55GUIQL.js} +3 -3
- package/dist/{bing-BUSRXSSR.js → bing-5NTEC247.js} +3 -3
- package/dist/{bootstrap-5KXIZP4O.js → bootstrap-UDEEVI4Z.js} +10 -10
- package/dist/{cdp-RR5HU43T.js → cdp-WWVZ6IBS.js} +7 -7
- package/dist/{chunk-4Q64QWKU.js → chunk-3LTLLHCD.js} +4 -4
- package/dist/{chunk-535S4WXN.js → chunk-3ZF3T3OG.js} +1 -1
- package/dist/{chunk-KXJDLN64.js → chunk-42JQQZZQ.js} +5 -5
- package/dist/{chunk-6R76X2XV.js → chunk-6JGQT4OH.js} +25 -2
- package/dist/{chunk-D33TZL7S.js → chunk-6RI7JFFI.js} +1 -1
- package/dist/{chunk-34GYS64G.js → chunk-7W4KNDAW.js} +2 -2
- package/dist/{chunk-CUR2SI66.js → chunk-BGTJTKOJ.js} +2 -2
- package/dist/{chunk-JZRCF3IX.js → chunk-BRT5GE3Z.js} +5 -5
- package/dist/{chunk-ROCSYWLF.js → chunk-CNSLBHFP.js} +1 -1
- package/dist/{chunk-TPZ6RLGX.js → chunk-CSDDKEL6.js} +1 -1
- package/dist/{chunk-LX5IQZHL.js → chunk-DW3KF33I.js} +4 -4
- package/dist/{chunk-35XANOXF.js → chunk-EIRIZPR6.js} +2 -2
- package/dist/{chunk-7PPEX3GD.js → chunk-G6VOLODK.js} +4 -4
- package/dist/{chunk-D4TXUHVA.js → chunk-JGO7LGVN.js} +60 -10
- package/dist/{chunk-MDJG5NPR.js → chunk-JNRMODJS.js} +1 -1
- package/dist/{chunk-YTYOUQQ7.js → chunk-JZ2A55L5.js} +31 -23
- package/dist/{chunk-FLCTZSLI.js → chunk-KDV5NQZH.js} +1 -1
- package/dist/{chunk-BVEACCUM.js → chunk-MBNXKKOD.js} +2 -2
- package/dist/{chunk-T742QYXD.js → chunk-NHF3OGZN.js} +3 -3
- package/dist/{chunk-UHDLVX3T.js → chunk-OQR4F7WF.js} +2 -2
- package/dist/{chunk-AGHKWDUB.js → chunk-PHHQVV3G.js} +3 -3
- package/dist/{chunk-4PDSDRB2.js → chunk-PJYXLC3D.js} +1 -1
- package/dist/{chunk-CQVK5RLO.js → chunk-QBR7BWO6.js} +8 -8
- package/dist/{chunk-4KVUUBKF.js → chunk-QNSMMQJY.js} +3 -3
- package/dist/{chunk-R5YKG2YP.js → chunk-R7RTWOOV.js} +1 -1
- package/dist/{chunk-4U3HIUCW.js → chunk-RJSJNR76.js} +3 -3
- package/dist/{chunk-XU7GZ544.js → chunk-RPYSCFFA.js} +1 -1
- package/dist/{chunk-2M27P4W5.js → chunk-RSK7E53V.js} +1 -1
- package/dist/{chunk-HF7ONR3Z.js → chunk-RVEXUQHP.js} +2 -2
- package/dist/{chunk-ON2RUGPD.js → chunk-SFMCFMJR.js} +1 -1
- package/dist/{chunk-VXBAMLKH.js → chunk-SSNKQTRX.js} +3 -3
- package/dist/{chunk-5TCY7FYS.js → chunk-ULUKHNE4.js} +1 -1
- package/dist/{chunk-JQGH3D7W.js → chunk-WZZIA3LD.js} +334 -334
- package/dist/{chunk-QZUEQP5G.js → chunk-XOCF2U54.js} +1 -1
- package/dist/{citations-IYQAT5QA.js → citations-ILU2CNT2.js} +3 -3
- package/dist/{cli-catalog-U5ZXWV7J.js → cli-catalog-ZBTUYNJA.js} +3 -3
- package/dist/{cli-commands-MMMD7K74.js → cli-commands-YXL7KV5B.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-RRISAXMS.js → competitor-NXSL3AWD.js} +3 -3
- package/dist/{content-NBEVQ7CZ.js → content-TGWYXNBI.js} +3 -3
- package/dist/{dashboard-EMHIZOZ4.js → dashboard-IDCQTIYG.js} +6 -6
- package/dist/{demo-57LZOEH6.js → demo-6X6IDMPT.js} +1 -1
- package/dist/{demo-server-EGKJKILE.js → demo-server-HKJWIYPQ.js} +11 -11
- package/dist/{discover-L5EFJ6AD.js → discover-NW7NKL2Z.js} +3 -3
- package/dist/{discover-eval-6JJZLKRJ.js → discover-eval-2BVYL62I.js} +3 -3
- package/dist/{doctor-QBTFEURQ.js → doctor-6I3LPYM7.js} +3 -3
- package/dist/{evidence-I5MK557J.js → evidence-ZTAMPBEP.js} +3 -3
- package/dist/{export-cmd-36EZW5ZP.js → export-cmd-4CXUQVYT.js} +3 -3
- package/dist/{ga-7GUXDQ3L.js → ga-2YXMDGHQ.js} +3 -3
- package/dist/{gbp-W7YHYMB7.js → gbp-LTPPWTUR.js} +3 -3
- package/dist/{google-OXQFPJ76.js → google-KTUJ4D3T.js} +4 -4
- package/dist/{google-marketing-TKCACXPQ.js → google-marketing-FAKTAI5S.js} +1 -1
- package/dist/{health-cmd-PG3ST3S6.js → health-cmd-C75E3NPQ.js} +3 -3
- package/dist/{history-NWLOV4HF.js → history-HE734BPT.js} +3 -3
- package/dist/index.d.ts +71 -71
- package/dist/index.js +24 -24
- package/dist/{init-3I6WH2FY.js → init-QWTQCLAK.js} +11 -11
- package/dist/{insights-2XU6EXSV.js → insights-4GUVXY2V.js} +3 -3
- package/dist/intelligence-service-PAMFRLPE.js +15 -0
- package/dist/{journeys-LIZVLLV5.js → journeys-BZCKKFG7.js} +3 -3
- package/dist/{keys-M4WPOLHC.js → keys-CMN3FUDW.js} +3 -3
- package/dist/{keyword-TETX5PQP.js → keyword-QUM65R7C.js} +3 -3
- package/dist/{logs-BI4265UF.js → logs-HH7EP7YK.js} +3 -3
- package/dist/{mcp-RA6NUGQM.js → mcp-76T6WX4K.js} +2 -2
- package/dist/mcp.js +9 -9
- package/dist/{measurement-plan-LM5GXYNS.js → measurement-plan-2D2KQLTW.js} +5 -5
- package/dist/{notify-BFKYHACB.js → notify-VP5YYBJO.js} +3 -3
- package/dist/{organic-evidence-RUBPJCQ4.js → organic-evidence-EAUZJVET.js} +3 -3
- package/dist/{overview-6WOQ7K7F.js → overview-MCX3OHXK.js} +4 -4
- package/dist/{project-2DMAPH2U.js → project-HMELPKXT.js} +3 -3
- package/dist/{query-SAWKYRSY.js → query-J7UTKCY5.js} +3 -3
- package/dist/{research-J4J527SF.js → research-O4FYADRL.js} +3 -3
- package/dist/{results-export-SESXZCWZ.js → results-export-4JHIHSWW.js} +3 -3
- package/dist/{run-XTG3RSBA.js → run-YJ3Y7FIE.js} +4 -4
- package/dist/{schedule-WQUD7BAI.js → schedule-6SXEB245.js} +3 -3
- package/dist/{search-QNYEHVCA.js → search-MVL346VH.js} +3 -3
- package/dist/{serve-7SCK3TEE.js → serve-4E6LBEHL.js} +25 -25
- package/dist/{session-KB3HFDGB.js → session-KFFTQBJU.js} +12 -12
- package/dist/{settings-P5E7KIOV.js → settings-UKVP6TDD.js} +3 -3
- package/dist/{skills-YQDZ6EOW.js → skills-DF336KFJ.js} +2 -2
- package/dist/{snapshot-LMBEQKXR.js → snapshot-YKWGIRTM.js} +3 -3
- package/dist/{src-X4GNC6AB.js → src-WDWTA7ON.js} +2 -2
- package/dist/{status-4G7OU4RY.js → status-4PDQOFYS.js} +4 -4
- package/dist/{technical-aeo-TBCA6DF2.js → technical-aeo-XJRWNW24.js} +3 -3
- package/dist/{telemetry-JGUQ6S45.js → telemetry-TXB7NGPP.js} +4 -4
- package/dist/{tools-FB7DZH74.js → tools-5DBHZB4K.js} +11 -11
- package/dist/{traffic-U6MUCCBI.js → traffic-AP22ENAC.js} +5 -5
- package/dist/{users-P7BMJH2I.js → users-44XJB4ZN.js} +3 -3
- package/dist/{visibility-stats-3BJR34GR.js → visibility-stats-5DMILJO6.js} +3 -3
- package/dist/{wordpress-X5FQOR5K.js → wordpress-P6J44TMN.js} +3 -3
- package/package.json +1 -1
- package/assets/assets/MeasurementPropertyPage--nWpGvGH.js +0 -4
- package/assets/assets/ProjectPage-of9Q7JDS.js +0 -9
- package/assets/assets/SiteHealthSection-DS4icWI5.js +0 -2
- package/assets/assets/index-XtskVqLa.js +0 -60
- package/dist/intelligence-service-VUOMVRAD.js +0 -15
|
@@ -493,6 +493,14 @@ function queryTrackingPreviewStale(expectedWorkspaceVersion, actualWorkspaceVers
|
|
|
493
493
|
{ expectedWorkspaceVersion, actualWorkspaceVersion }
|
|
494
494
|
);
|
|
495
495
|
}
|
|
496
|
+
function embedQueryLimitReached(limit, attempted) {
|
|
497
|
+
return new AppError(
|
|
498
|
+
"EMBED_QUERY_LIMIT",
|
|
499
|
+
`This dashboard can track up to ${limit} queries. Remove one to add another.`,
|
|
500
|
+
409,
|
|
501
|
+
{ limit, attempted }
|
|
502
|
+
);
|
|
503
|
+
}
|
|
496
504
|
function runNotCancellable(runId, status) {
|
|
497
505
|
return new AppError("RUN_NOT_CANCELLABLE", `Run '${runId}' is already in terminal state '${status}' and cannot be cancelled`, 409);
|
|
498
506
|
}
|
|
@@ -20699,6 +20707,7 @@ var PROJECTS_WRITE_SCOPE = "projects.write";
|
|
|
20699
20707
|
var ADS_WRITE_SCOPE = "ads.write";
|
|
20700
20708
|
var ADS_APPROVE_SCOPE = "ads.approve";
|
|
20701
20709
|
var ADS_ACTIVATE_SCOPE = "ads.activate";
|
|
20710
|
+
var EMBED_QUERIES_WRITE_SCOPE = "embed.queries.write";
|
|
20702
20711
|
var GOOGLE_MARKETING_LIVE_READ_SCOPE = "google-marketing.read-live";
|
|
20703
20712
|
var GOOGLE_MARKETING_WRITE_SCOPE = "google-marketing.write";
|
|
20704
20713
|
function grantsWrite(scope) {
|
|
@@ -20706,7 +20715,7 @@ function grantsWrite(scope) {
|
|
|
20706
20715
|
}
|
|
20707
20716
|
function restrictedWriteScopes(scopes) {
|
|
20708
20717
|
const writes = scopes.filter(grantsWrite);
|
|
20709
|
-
const restricted = /* @__PURE__ */ new Set([ADS_WRITE_SCOPE, ADS_APPROVE_SCOPE, ADS_ACTIVATE_SCOPE, RESEARCH_RUN_SCOPE, SEO_RUN_SCOPE, SEO_WRITE_SCOPE, GBP_POSTS_WRITE_SCOPE]);
|
|
20718
|
+
const restricted = /* @__PURE__ */ new Set([ADS_WRITE_SCOPE, ADS_APPROVE_SCOPE, ADS_ACTIVATE_SCOPE, RESEARCH_RUN_SCOPE, SEO_RUN_SCOPE, SEO_WRITE_SCOPE, GBP_POSTS_WRITE_SCOPE, EMBED_QUERIES_WRITE_SCOPE]);
|
|
20710
20719
|
return writes.length > 0 && writes.every((scope) => restricted.has(scope)) ? writes : null;
|
|
20711
20720
|
}
|
|
20712
20721
|
function intersectScopes(authority, requested) {
|
|
@@ -25149,6 +25158,14 @@ function escapeLikePattern(value) {
|
|
|
25149
25158
|
}
|
|
25150
25159
|
|
|
25151
25160
|
// ../contracts/src/embed.ts
|
|
25161
|
+
var EMBED_QUERY_LIMIT_HEADER = "x-canonry-embed-query-limit";
|
|
25162
|
+
var EMBED_QUERY_LIMIT_MAX = 1e3;
|
|
25163
|
+
function parseEmbedQueryLimit(raw) {
|
|
25164
|
+
const value = Array.isArray(raw) ? raw[0] : raw;
|
|
25165
|
+
if (typeof value !== "string" || !/^[1-9]\d{0,3}$/.test(value)) return void 0;
|
|
25166
|
+
const limit = Number(value);
|
|
25167
|
+
return limit <= EMBED_QUERY_LIMIT_MAX ? limit : void 0;
|
|
25168
|
+
}
|
|
25152
25169
|
function embedProjectTabsError(projectTabs) {
|
|
25153
25170
|
if (projectTabs?.some((tab) => tab.trim().toLowerCase() === "report")) {
|
|
25154
25171
|
return "The report embed tab has been retired. Remove report from the allowed tabs; explicitly configure overview to display AI Visibility.";
|
|
@@ -25254,16 +25271,18 @@ function parseRenderTokenOverride(raw) {
|
|
|
25254
25271
|
if (typeof value !== "string" || value.length === 0 || value.length > 4096) return void 0;
|
|
25255
25272
|
return value;
|
|
25256
25273
|
}
|
|
25257
|
-
function embedClientConfigForRequest(resolved, projectTabsOverride, themeOverride, renderTokenOverride) {
|
|
25274
|
+
function embedClientConfigForRequest(resolved, projectTabsOverride, themeOverride, renderTokenOverride, queryLimitOverride) {
|
|
25258
25275
|
const base = buildEmbedClientConfig(resolved);
|
|
25259
25276
|
if (!base) return void 0;
|
|
25260
25277
|
const tabs = normalizeIdTokens(splitList(projectTabsOverride));
|
|
25261
25278
|
const theme = parseThemeOverride(themeOverride);
|
|
25262
25279
|
const renderToken = parseRenderTokenOverride(renderTokenOverride);
|
|
25280
|
+
const queryLimit = parseEmbedQueryLimit(queryLimitOverride);
|
|
25263
25281
|
let out = base;
|
|
25264
25282
|
if (tabs) out = { ...out, projectTabs: tabs };
|
|
25265
25283
|
if (theme) out = { ...out, theme };
|
|
25266
25284
|
if (renderToken) out = { ...out, renderToken };
|
|
25285
|
+
if (queryLimit !== void 0) out = { ...out, queries: { limit: queryLimit } };
|
|
25267
25286
|
return out;
|
|
25268
25287
|
}
|
|
25269
25288
|
function serializeForInlineScript(value) {
|
|
@@ -26455,6 +26474,7 @@ export {
|
|
|
26455
26474
|
measurementIdempotencyKeyRequired,
|
|
26456
26475
|
measurementIdempotencyKeyConflict,
|
|
26457
26476
|
queryTrackingPreviewStale,
|
|
26477
|
+
embedQueryLimitReached,
|
|
26458
26478
|
runNotCancellable,
|
|
26459
26479
|
unsupportedKind,
|
|
26460
26480
|
notImplemented,
|
|
@@ -27512,11 +27532,14 @@ export {
|
|
|
27512
27532
|
ADS_WRITE_SCOPE,
|
|
27513
27533
|
ADS_APPROVE_SCOPE,
|
|
27514
27534
|
ADS_ACTIVATE_SCOPE,
|
|
27535
|
+
EMBED_QUERIES_WRITE_SCOPE,
|
|
27515
27536
|
GOOGLE_MARKETING_LIVE_READ_SCOPE,
|
|
27516
27537
|
GOOGLE_MARKETING_WRITE_SCOPE,
|
|
27517
27538
|
restrictedWriteScopes,
|
|
27518
27539
|
intersectScopes,
|
|
27519
27540
|
isReadOnlyKey,
|
|
27541
|
+
EMBED_QUERY_LIMIT_HEADER,
|
|
27542
|
+
parseEmbedQueryLimit,
|
|
27520
27543
|
embedProjectTabsError,
|
|
27521
27544
|
splitList,
|
|
27522
27545
|
parseOriginList,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XOCF2U54.js";
|
|
9
9
|
import {
|
|
10
10
|
SITE_CRAWL_GRAPH_MAX_EDGES,
|
|
11
11
|
SITE_CRAWL_GRAPH_MAX_NODES,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
factorStatusFromDistribution,
|
|
16
16
|
factorStatusFromScore,
|
|
17
17
|
roundPreservingTotal
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6JGQT4OH.js";
|
|
19
19
|
|
|
20
20
|
// src/site-audit-factors.ts
|
|
21
21
|
function recordedSharePct(factor) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6RI7JFFI.js";
|
|
4
4
|
import {
|
|
5
5
|
PACKAGE_VERSION
|
|
6
6
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
sentimentSettingsReadSchema,
|
|
37
37
|
sentimentSummaryReadSchema,
|
|
38
38
|
upgradeCommandFor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-6JGQT4OH.js";
|
|
40
40
|
|
|
41
41
|
// ../api-client-generated/src/generated/core/bodySerializer.gen.ts
|
|
42
42
|
var jsonBodySerializer = {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isStoredPageReadTool,
|
|
6
6
|
isStoredReadTool,
|
|
7
7
|
truncateToolResult
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DW3KF33I.js";
|
|
9
9
|
import {
|
|
10
10
|
CANONRY_MCP_TOOLKITS
|
|
11
11
|
} from "./chunk-NDTU7FGL.js";
|
|
@@ -22,15 +22,15 @@ import {
|
|
|
22
22
|
resolveApiKeyFor,
|
|
23
23
|
resolveModelForProvider,
|
|
24
24
|
validateAgentProviderRegistry
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-6RI7JFFI.js";
|
|
26
26
|
import {
|
|
27
27
|
CanonryMcpToolNames,
|
|
28
28
|
canonryMcpTools
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QNSMMQJY.js";
|
|
30
30
|
import {
|
|
31
31
|
agentToolEvents,
|
|
32
32
|
llmUsageEvents
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XOCF2U54.js";
|
|
34
34
|
import {
|
|
35
35
|
MeasurementPortfolioLists,
|
|
36
36
|
SeoCapabilities,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
describeError,
|
|
40
40
|
validationError,
|
|
41
41
|
visibilityReportRequestSchema
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-6JGQT4OH.js";
|
|
43
43
|
|
|
44
44
|
// src/agent/session.ts
|
|
45
45
|
import fs3 from "fs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithUsageTags
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BGTJTKOJ.js";
|
|
4
4
|
import {
|
|
5
5
|
CanonryMcpToolNames,
|
|
6
6
|
canonryMcpTools
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QNSMMQJY.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
10
|
} from "./chunk-HGMYEDAQ.js";
|
|
11
11
|
import {
|
|
12
12
|
buildOpenApiDocument
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JGO7LGVN.js";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_COMPETITOR_AUTO_ALIAS_MODE,
|
|
16
16
|
MeasurementPortfolioLists,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
seoDatasetWithoutVendor,
|
|
24
24
|
seoProviderSchema,
|
|
25
25
|
truncateUtf16
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6JGQT4OH.js";
|
|
27
27
|
|
|
28
28
|
// src/agent/tools.ts
|
|
29
29
|
import { Type as Type2 } from "@earendil-works/pi-ai";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseJsonColumn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XOCF2U54.js";
|
|
4
4
|
import {
|
|
5
5
|
AI_ENGINE_DOMAINS,
|
|
6
6
|
AI_ENGINE_SELF_DOMAINS,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
retryAfterDelayMs,
|
|
27
27
|
usageCount,
|
|
28
28
|
withRetry
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6JGQT4OH.js";
|
|
30
30
|
|
|
31
31
|
// ../provider-openai/src/normalize.ts
|
|
32
32
|
import OpenAI from "openai";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registeredProviderNames
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3ZF3T3OG.js";
|
|
4
4
|
import {
|
|
5
5
|
configExists,
|
|
6
6
|
loadConfigRaw
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6RI7JFFI.js";
|
|
8
8
|
|
|
9
9
|
// src/setup-state.ts
|
|
10
10
|
import fs from "fs";
|
|
@@ -28,7 +28,7 @@ async function buildSetupState() {
|
|
|
28
28
|
}
|
|
29
29
|
if (dbPath && fs.existsSync(dbPath)) {
|
|
30
30
|
try {
|
|
31
|
-
const { createClient, projects, queries: queriesTable } = await import("./src-
|
|
31
|
+
const { createClient, projects, queries: queriesTable } = await import("./src-WDWTA7ON.js");
|
|
32
32
|
const db = createClient(dbPath);
|
|
33
33
|
project_count = db.select({ id: projects.id }).from(projects).all().length;
|
|
34
34
|
const firstQuery = db.select({ id: queriesTable.id }).from(queriesTable).limit(1).all();
|
|
@@ -47,7 +47,7 @@ function queueServeHandoff() {
|
|
|
47
47
|
async function runPendingServeHandoff(format) {
|
|
48
48
|
if (!pendingServeHandoff) return;
|
|
49
49
|
pendingServeHandoff = false;
|
|
50
|
-
const { serveCommand } = await import("./serve-
|
|
50
|
+
const { serveCommand } = await import("./serve-4E6LBEHL.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
normalizeCloudflareWorkerEvent,
|
|
10
10
|
sessionizeJourneyRequests,
|
|
11
11
|
verifyRequestSignature
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CNSLBHFP.js";
|
|
13
13
|
import {
|
|
14
14
|
currentOutcomeAttribution,
|
|
15
15
|
getRequestContext,
|
|
16
16
|
registerRequestContext,
|
|
17
17
|
requestAuditIdentity,
|
|
18
18
|
sanitizeRequestContext
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KDV5NQZH.js";
|
|
20
20
|
import {
|
|
21
21
|
SentimentIdempotencyConflict,
|
|
22
22
|
SentimentRepository,
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
userSessions,
|
|
157
157
|
users,
|
|
158
158
|
writeNegativeReviewMaxStars
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-XOCF2U54.js";
|
|
160
160
|
import {
|
|
161
161
|
ADS_ACTIVATE_SCOPE,
|
|
162
162
|
ADS_ACTIVATION_ABSOLUTE_MAX_ENTITIES,
|
|
@@ -234,6 +234,8 @@ import {
|
|
|
234
234
|
DiscoveryCompetitorTypes,
|
|
235
235
|
DiscoveryPromoteCompetitorSkipReasons,
|
|
236
236
|
DiscoverySessionStatuses,
|
|
237
|
+
EMBED_QUERIES_WRITE_SCOPE,
|
|
238
|
+
EMBED_QUERY_LIMIT_HEADER,
|
|
237
239
|
FeatureNames,
|
|
238
240
|
GA4_AI_ASSISTANT_CHANNEL_GROUP,
|
|
239
241
|
GA_OVERVIEW_HISTORY_DAYS,
|
|
@@ -609,6 +611,7 @@ import {
|
|
|
609
611
|
domainClassificationsResponseDtoSchema,
|
|
610
612
|
effectiveBrandNames,
|
|
611
613
|
effectiveDomains,
|
|
614
|
+
embedQueryLimitReached,
|
|
612
615
|
emptyCitationVisibility,
|
|
613
616
|
emptySentimentCounts,
|
|
614
617
|
escapeLikePattern,
|
|
@@ -925,6 +928,7 @@ import {
|
|
|
925
928
|
organicEvidenceDtoSchema,
|
|
926
929
|
outcomeSurfaceSchema,
|
|
927
930
|
parseBoundedRate,
|
|
931
|
+
parseEmbedQueryLimit,
|
|
928
932
|
parseInclusiveEndMs,
|
|
929
933
|
parseMeasurementDraftEtagVersion,
|
|
930
934
|
parseMeasurementRunManifestV1,
|
|
@@ -1188,7 +1192,7 @@ import {
|
|
|
1188
1192
|
wordpressSchemaDeployResultDtoSchema,
|
|
1189
1193
|
wordpressSchemaStatusResultDtoSchema,
|
|
1190
1194
|
wordpressStatusDtoSchema
|
|
1191
|
-
} from "./chunk-
|
|
1195
|
+
} from "./chunk-6JGQT4OH.js";
|
|
1192
1196
|
|
|
1193
1197
|
// ../api-routes/src/user-session.ts
|
|
1194
1198
|
import crypto2 from "crypto";
|
|
@@ -6285,17 +6289,25 @@ function isTechnicalAeoRead(request, url) {
|
|
|
6285
6289
|
}
|
|
6286
6290
|
return rest === "technical-aeo" || rest === "technical-aeo/pages" || rest === "technical-aeo/trend" || rest === "technical-aeo/crawl" || rest === "technical-aeo/graph" || rest === "technical-aeo/subgraph" || rest === "technical-aeo/path" || rest === "technical-aeo/changes" || rest === "technical-aeo/crawl/pages/audit" || rest === "technical-aeo/crawl/pages" || rest === "technical-aeo/runs" || rest === "technical-aeo/structure" || rest === "technical-aeo/internal-links" || rest === "technical-aeo/internal-links/neighbors" || rest === "technical-aeo/dead-links";
|
|
6287
6291
|
}
|
|
6292
|
+
function isEmbedQueryWrite(request) {
|
|
6293
|
+
return request.routeOptions.config.writeScope === EMBED_QUERIES_WRITE_SCOPE && (principalScopes(request) ?? []).includes(EMBED_QUERIES_WRITE_SCOPE);
|
|
6294
|
+
}
|
|
6295
|
+
function isEmbedQueryRead(request, url) {
|
|
6296
|
+
if (parseEmbedQueryLimit(request.headers[EMBED_QUERY_LIMIT_HEADER]) === void 0) return false;
|
|
6297
|
+
return projectRouteRest(url) === "query-tracking";
|
|
6298
|
+
}
|
|
6288
6299
|
function enforceEmbedProjectTabs(request, configuredTabs) {
|
|
6289
6300
|
const policy = requestEmbedProjectTabs(request, configuredTabs);
|
|
6290
6301
|
if (policy === void 0) return;
|
|
6291
6302
|
if (request.method === "OPTIONS") return;
|
|
6292
6303
|
const { tabs } = policy;
|
|
6293
|
-
if (policy.fromEmbedSurface && WRITE_METHODS2.has(request.method)) {
|
|
6304
|
+
if (policy.fromEmbedSurface && WRITE_METHODS2.has(request.method) && !isEmbedQueryWrite(request)) {
|
|
6294
6305
|
throw forbidden("This endpoint is not available in embed mode.");
|
|
6295
6306
|
}
|
|
6296
6307
|
if (WRITE_METHODS2.has(request.method)) return;
|
|
6297
6308
|
const url = request.url.split("?")[0];
|
|
6298
6309
|
if (isProjectShellRead(request, url)) return;
|
|
6310
|
+
if (isEmbedQueryRead(request, url)) return;
|
|
6299
6311
|
if (tabs.includes("overview") && isOverviewRead(url)) return;
|
|
6300
6312
|
if (tabs.includes("technical-aeo") && isTechnicalAeoRead(request, url)) return;
|
|
6301
6313
|
throw forbidden("This endpoint is not available for the configured embed tabs.");
|
|
@@ -24929,6 +24941,31 @@ function readVisibilityComparisonRuns(db, projectId, since, until, includeEviden
|
|
|
24929
24941
|
// ../api-routes/src/query-tracking.ts
|
|
24930
24942
|
import crypto24 from "crypto";
|
|
24931
24943
|
import { and as and33, desc as desc17, eq as eq41, inArray as inArray22, isNotNull as isNotNull5, isNull as isNull8, ne as ne8 } from "drizzle-orm";
|
|
24944
|
+
|
|
24945
|
+
// ../api-routes/src/embed-queries.ts
|
|
24946
|
+
function embedQueryWriteLimit(request) {
|
|
24947
|
+
const principal = request.principal;
|
|
24948
|
+
const scopes = principal?.scopes ?? request.apiKey?.scopes ?? [];
|
|
24949
|
+
if (!scopes.includes(EMBED_QUERIES_WRITE_SCOPE)) return void 0;
|
|
24950
|
+
if (scopes.includes(WILDCARD_SCOPE) || scopes.includes(MEASUREMENT_PLAN_WRITE_SCOPE)) return void 0;
|
|
24951
|
+
const projectId = principal?.kind === "api-key" ? principal.projectId : request.apiKey?.projectId;
|
|
24952
|
+
if (!projectId) throw forbidden("An embedded query key must be scoped to one project.");
|
|
24953
|
+
const limit = parseEmbedQueryLimit(request.headers[EMBED_QUERY_LIMIT_HEADER]);
|
|
24954
|
+
if (limit === void 0) throw forbidden("An embedded query change needs the dashboard query limit.");
|
|
24955
|
+
return limit;
|
|
24956
|
+
}
|
|
24957
|
+
function assertEmbedQueryChange(mutation) {
|
|
24958
|
+
const plain = mutation.additions.length + mutation.removals.length === 1 && (mutation.edits ?? []).length === 0 && mutation.additions.every((addition) => addition.input.source === "manual" && addition.audience === void 0 && addition.contexts === void 0 && addition.queryClass === void 0) && mutation.removals.every((removal) => removal.queryId !== void 0 && removal.audience === void 0);
|
|
24959
|
+
if (!plain) throw forbidden("An embedded dashboard can add or remove one query at a time.");
|
|
24960
|
+
}
|
|
24961
|
+
function assertEmbedQueryWorkspace(mode) {
|
|
24962
|
+
if (mode !== "simple") throw forbidden("Your agency manages the queries for this project.");
|
|
24963
|
+
}
|
|
24964
|
+
function assertWithinEmbedQueryLimit(before, after, limit) {
|
|
24965
|
+
if (after > limit && after > before) throw embedQueryLimitReached(limit, after);
|
|
24966
|
+
}
|
|
24967
|
+
|
|
24968
|
+
// ../api-routes/src/query-tracking.ts
|
|
24932
24969
|
var SOURCE_LIMIT = 100;
|
|
24933
24970
|
var MAX_REVIEW_AGE_MS = 15 * 60 * 1e3;
|
|
24934
24971
|
var MAX_REVIEW_FUTURE_SKEW_MS = 60 * 1e3;
|
|
@@ -26345,17 +26382,21 @@ async function queryTrackingRoutes(app, opts = {}) {
|
|
|
26345
26382
|
const project = resolveProject(app.db, request.params.name);
|
|
26346
26383
|
return workspaceDto(app.db, readWorkspace(app.db, project), opts);
|
|
26347
26384
|
});
|
|
26348
|
-
app.post("/projects/:name/query-tracking/preview", async (request) => {
|
|
26349
|
-
|
|
26385
|
+
app.post("/projects/:name/query-tracking/preview", { config: { writeScope: EMBED_QUERIES_WRITE_SCOPE } }, async (request) => {
|
|
26386
|
+
const embedLimit = embedQueryWriteLimit(request);
|
|
26387
|
+
if (embedLimit === void 0) requireScope(request, MEASUREMENT_PLAN_WRITE_SCOPE);
|
|
26350
26388
|
const parsed = queryTrackingPreviewRequestSchema.safeParse(request.body);
|
|
26351
26389
|
if (!parsed.success) throw validationError("Invalid query tracking preview payload", { issues: parsed.error.issues });
|
|
26390
|
+
if (embedLimit !== void 0) assertEmbedQueryChange(parsed.data);
|
|
26352
26391
|
const project = resolveProject(app.db, request.params.name);
|
|
26353
26392
|
const state = readWorkspace(app.db, project);
|
|
26393
|
+
if (embedLimit !== void 0) assertEmbedQueryWorkspace(state.mode);
|
|
26354
26394
|
if (parsed.data.expectedWorkspaceVersion !== state.workspaceVersion) {
|
|
26355
26395
|
throw queryTrackingPreviewStale(parsed.data.expectedWorkspaceVersion, state.workspaceVersion);
|
|
26356
26396
|
}
|
|
26357
26397
|
const reviewedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
26358
26398
|
const candidate = buildCandidate(app.db, state, parsed.data, opts, reviewedAt);
|
|
26399
|
+
if (embedLimit !== void 0) assertWithinEmbedQueryLimit(state.queryRows.length, candidate.queryRows.size, embedLimit);
|
|
26359
26400
|
return queryTrackingPreviewResponseSchema.parse({
|
|
26360
26401
|
mode: state.mode,
|
|
26361
26402
|
workspaceVersion: state.workspaceVersion,
|
|
@@ -26367,10 +26408,12 @@ async function queryTrackingRoutes(app, opts = {}) {
|
|
|
26367
26408
|
workload: candidate.workload
|
|
26368
26409
|
});
|
|
26369
26410
|
});
|
|
26370
|
-
app.post("/projects/:name/query-tracking/commit", async (request, reply) => {
|
|
26371
|
-
|
|
26411
|
+
app.post("/projects/:name/query-tracking/commit", { config: { writeScope: EMBED_QUERIES_WRITE_SCOPE } }, async (request, reply) => {
|
|
26412
|
+
const embedLimit = embedQueryWriteLimit(request);
|
|
26413
|
+
if (embedLimit === void 0) requireScope(request, MEASUREMENT_PLAN_WRITE_SCOPE);
|
|
26372
26414
|
const parsed = queryTrackingCommitRequestSchema.safeParse(request.body);
|
|
26373
26415
|
if (!parsed.success) throw validationError("Invalid query tracking commit payload", { issues: parsed.error.issues });
|
|
26416
|
+
if (embedLimit !== void 0) assertEmbedQueryChange(parsed.data);
|
|
26374
26417
|
const project = resolveProject(app.db, request.params.name);
|
|
26375
26418
|
const lookup = { operation: "query-tracking.commit", key: parsed.data.previewToken, checksum: requestChecksum(parsed.data) };
|
|
26376
26419
|
const replay = replayReceipt(app.db, project.id, lookup, reply);
|
|
@@ -26382,6 +26425,7 @@ async function queryTrackingRoutes(app, opts = {}) {
|
|
|
26382
26425
|
const currentProject = tx.select().from(projects).where(eq41(projects.id, project.id)).get();
|
|
26383
26426
|
if (!currentProject) throw notFound("Project", project.name);
|
|
26384
26427
|
const state = readWorkspace(tx, currentProject);
|
|
26428
|
+
if (embedLimit !== void 0) assertEmbedQueryWorkspace(state.mode);
|
|
26385
26429
|
if (parsed.data.expectedWorkspaceVersion !== state.workspaceVersion) {
|
|
26386
26430
|
throw queryTrackingPreviewStale(parsed.data.expectedWorkspaceVersion, state.workspaceVersion);
|
|
26387
26431
|
}
|
|
@@ -26389,6 +26433,7 @@ async function queryTrackingRoutes(app, opts = {}) {
|
|
|
26389
26433
|
if (parsed.data.previewToken !== mutationPreviewToken(candidate, parsed.data, reviewedAt)) {
|
|
26390
26434
|
throw queryTrackingPreviewStale(parsed.data.expectedWorkspaceVersion, state.workspaceVersion);
|
|
26391
26435
|
}
|
|
26436
|
+
if (embedLimit !== void 0) assertWithinEmbedQueryLimit(state.queryRows.length, candidate.queryRows.size, embedLimit);
|
|
26392
26437
|
if (!candidate.diff.noOp && !rowsEqual(new Map(state.queryRows.map((row) => [row.id, row])), candidate.queryRows)) {
|
|
26393
26438
|
assertNoActivePlanlessSweep(tx, { projectId: project.id, projectName: project.name });
|
|
26394
26439
|
}
|
|
@@ -26401,7 +26446,12 @@ async function queryTrackingRoutes(app, opts = {}) {
|
|
|
26401
26446
|
actor: "api",
|
|
26402
26447
|
action: "query-tracking.updated",
|
|
26403
26448
|
entityType: "query",
|
|
26404
|
-
diff: {
|
|
26449
|
+
diff: {
|
|
26450
|
+
added: candidate.diff.added.length,
|
|
26451
|
+
removed: candidate.diff.removed.length,
|
|
26452
|
+
reused: candidate.diff.reused.length,
|
|
26453
|
+
...embedLimit !== void 0 ? { via: "embed" } : {}
|
|
26454
|
+
}
|
|
26405
26455
|
}));
|
|
26406
26456
|
active = null;
|
|
26407
26457
|
} else if (!candidate.diff.noOp) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
answerServiceAdapters,
|
|
3
3
|
answerServiceDescriptors
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SFMCFMJR.js";
|
|
5
5
|
import {
|
|
6
6
|
AeroLlmUsageFeatures,
|
|
7
7
|
aeroTurnStatus,
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
resolveConfiguredAgentProvider,
|
|
28
28
|
resolveSessionProviderAndModel,
|
|
29
29
|
setAeroSystemPrompt
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BRT5GE3Z.js";
|
|
31
31
|
import {
|
|
32
32
|
AeroToolProfiles,
|
|
33
33
|
AeroToolScopes,
|
|
34
34
|
buildAeroStateTools,
|
|
35
35
|
isAeroToolProfile,
|
|
36
36
|
truncateToolResult
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-DW3KF33I.js";
|
|
38
38
|
import {
|
|
39
39
|
getGoogleAuthConfig,
|
|
40
40
|
getGoogleConnection,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
removeCloudflareTrafficConnection,
|
|
54
54
|
removeCloudflareTrafficConnectionBySourceId,
|
|
55
55
|
upsertCloudflareTrafficConnection
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-RPYSCFFA.js";
|
|
57
57
|
import {
|
|
58
58
|
claudeAdapter,
|
|
59
59
|
embedQueries,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
openaiAdapter,
|
|
65
65
|
openrouterAdapter,
|
|
66
66
|
perplexityAdapter
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-EIRIZPR6.js";
|
|
68
68
|
import {
|
|
69
69
|
classifyUsageSurface,
|
|
70
70
|
createApiUsageTelemetry,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
startOutcomeTimer,
|
|
77
77
|
trackFeatureCompleted,
|
|
78
78
|
trackInstallState
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-3LTLLHCD.js";
|
|
80
80
|
import {
|
|
81
81
|
isLoopbackBindHost
|
|
82
82
|
} from "./chunk-TSENU4GG.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
isApiProviderRegistrable,
|
|
85
85
|
isCdpProviderRegistrable,
|
|
86
86
|
registeredProviderNames
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-3ZF3T3OG.js";
|
|
88
88
|
import {
|
|
89
89
|
checkLatestVersionForServer,
|
|
90
90
|
getOrCreateAnonymousId,
|
|
@@ -95,17 +95,17 @@ import {
|
|
|
95
95
|
recordDashboardEvent,
|
|
96
96
|
setTelemetryPreference,
|
|
97
97
|
trackEvent
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-RVEXUQHP.js";
|
|
99
99
|
import {
|
|
100
100
|
createCanonryMcpServer
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-PHHQVV3G.js";
|
|
102
102
|
import {
|
|
103
103
|
CANONRY_MCP_TIERS,
|
|
104
104
|
CANONRY_MCP_TOOLKIT_NAMES
|
|
105
105
|
} from "./chunk-NDTU7FGL.js";
|
|
106
106
|
import {
|
|
107
107
|
ApiClient
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-BGTJTKOJ.js";
|
|
109
109
|
import {
|
|
110
110
|
AGENT_PROVIDERS,
|
|
111
111
|
adapterSupportsBatch,
|
|
@@ -136,21 +136,21 @@ import {
|
|
|
136
136
|
saveConfigPatch,
|
|
137
137
|
sentimentInstallReadiness,
|
|
138
138
|
updateSharedProviderExecutionGate
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-6RI7JFFI.js";
|
|
140
140
|
import {
|
|
141
141
|
getBundledSkillSnapshots
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-JNRMODJS.js";
|
|
143
143
|
import {
|
|
144
144
|
computeFactorAverages,
|
|
145
145
|
deleteSiteCrawlGraphLayout,
|
|
146
146
|
persistSiteCrawlGraphLayout,
|
|
147
147
|
prepareSiteCrawlGraphLayout,
|
|
148
148
|
recordedSharePct
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-7W4KNDAW.js";
|
|
150
150
|
import {
|
|
151
151
|
CanonryMcpToolNames,
|
|
152
152
|
canonryMcpTools
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-QNSMMQJY.js";
|
|
154
154
|
import {
|
|
155
155
|
PACKAGE_VERSION
|
|
156
156
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -162,11 +162,11 @@ import {
|
|
|
162
162
|
addLogListener,
|
|
163
163
|
createFastifyLogger,
|
|
164
164
|
createLogger
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-42JQQZZQ.js";
|
|
166
166
|
import {
|
|
167
167
|
computeCitedCompetitorDomains,
|
|
168
168
|
determineCitationState
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-R7RTWOOV.js";
|
|
170
170
|
import {
|
|
171
171
|
BingApiError,
|
|
172
172
|
CC_CACHE_DIR,
|
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
webhookResponseReason,
|
|
287
287
|
webhookTargetRefusalReason,
|
|
288
288
|
writeAuditLog
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-JGO7LGVN.js";
|
|
290
290
|
import {
|
|
291
291
|
OperationalLogStore,
|
|
292
292
|
SentimentIdempotencyConflict,
|
|
@@ -372,7 +372,7 @@ import {
|
|
|
372
372
|
siteLivenessState,
|
|
373
373
|
trafficSources,
|
|
374
374
|
usageCounters
|
|
375
|
-
} from "./chunk-
|
|
375
|
+
} from "./chunk-XOCF2U54.js";
|
|
376
376
|
import {
|
|
377
377
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
378
378
|
AI_ENGINE_DOMAINS,
|
|
@@ -389,6 +389,7 @@ import {
|
|
|
389
389
|
CheckStatuses,
|
|
390
390
|
DEFAULT_VIEWER_RESEARCH_DAILY_RUN_LIMIT,
|
|
391
391
|
DiscoveryCompetitorTypes,
|
|
392
|
+
EMBED_QUERY_LIMIT_HEADER,
|
|
392
393
|
FEEDBACK_LIMITS,
|
|
393
394
|
FeatureNames,
|
|
394
395
|
GBP_NO_SELECTED_LOCATIONS_ERROR,
|
|
@@ -621,7 +622,7 @@ import {
|
|
|
621
622
|
winnabilityClassLabel,
|
|
622
623
|
withRetry,
|
|
623
624
|
withSkippedProviders
|
|
624
|
-
} from "./chunk-
|
|
625
|
+
} from "./chunk-6JGQT4OH.js";
|
|
625
626
|
|
|
626
627
|
// src/google-marketing-runtime.ts
|
|
627
628
|
import crypto2 from "crypto";
|
|
@@ -5804,7 +5805,7 @@ function nonBlank(value) {
|
|
|
5804
5805
|
return trimmed ? trimmed : void 0;
|
|
5805
5806
|
}
|
|
5806
5807
|
function resolveBuildCommit(env = process.env) {
|
|
5807
|
-
const embedded = true ? "
|
|
5808
|
+
const embedded = true ? "b237135d4193b22493d7723946c7a8964b181a4f" : void 0;
|
|
5808
5809
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
5809
5810
|
}
|
|
5810
5811
|
function resolveInstanceIdentity(env = process.env) {
|
|
@@ -21303,7 +21304,7 @@ async function createServer(opts) {
|
|
|
21303
21304
|
const assetsDir = opts.assetsDir ?? path5.join(dirname, "..", "assets");
|
|
21304
21305
|
if (fs5.existsSync(assetsDir)) {
|
|
21305
21306
|
const indexPath = path5.join(assetsDir, "index.html");
|
|
21306
|
-
const injectConfig = (html, projectTabsOverride, themeOverride, renderTokenOverride) => {
|
|
21307
|
+
const injectConfig = (html, projectTabsOverride, themeOverride, renderTokenOverride, queryLimitOverride) => {
|
|
21307
21308
|
const clientConfig = {};
|
|
21308
21309
|
if (basePath) clientConfig.basePath = basePath;
|
|
21309
21310
|
const dashboardConfig = {};
|
|
@@ -21338,7 +21339,13 @@ async function createServer(opts) {
|
|
|
21338
21339
|
};
|
|
21339
21340
|
}
|
|
21340
21341
|
if (embed.enabled) {
|
|
21341
|
-
const embedClient = embedClientConfigForRequest(
|
|
21342
|
+
const embedClient = embedClientConfigForRequest(
|
|
21343
|
+
embed,
|
|
21344
|
+
projectTabsOverride,
|
|
21345
|
+
themeOverride,
|
|
21346
|
+
renderTokenOverride,
|
|
21347
|
+
queryLimitOverride
|
|
21348
|
+
);
|
|
21342
21349
|
const projectTabsError = embedProjectTabsError(embedClient?.projectTabs);
|
|
21343
21350
|
if (projectTabsError) throw validationError(projectTabsError);
|
|
21344
21351
|
if (embedClient) clientConfig.embed = embedClient;
|
|
@@ -21355,7 +21362,8 @@ async function createServer(opts) {
|
|
|
21355
21362
|
html,
|
|
21356
21363
|
reply.request.headers["x-canonry-embed-tabs"],
|
|
21357
21364
|
reply.request.headers["x-canonry-embed-theme"],
|
|
21358
|
-
reply.request.headers["x-canonry-embed-render-token"]
|
|
21365
|
+
reply.request.headers["x-canonry-embed-render-token"],
|
|
21366
|
+
reply.request.headers[EMBED_QUERY_LIMIT_HEADER]
|
|
21359
21367
|
)
|
|
21360
21368
|
);
|
|
21361
21369
|
};
|