@canonry/canonry 7.72.2 → 7.73.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-D39M9CRK.js → AgentSetupPage-D7YVdPWO.js} +1 -1
- package/assets/assets/{AuditHistoryPanel-BS-iFyHX.js → AuditHistoryPanel-yrgfS5B_.js} +1 -1
- package/assets/assets/{BacklinksPage-BW2bEGF4.js → BacklinksPage-DJM6z03g.js} +1 -1
- package/assets/assets/{HistoryPage-Dh6o2iVd.js → HistoryPage-CNvAVJ1S.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-DL9cbtVz.js → MeasurementPropertyPage-BVVYhOxR.js} +1 -1
- package/assets/assets/{ProjectPage-DXh97uDN.js → ProjectPage-CPRD8kR9.js} +1 -1
- package/assets/assets/{RunsPage-BM4ETLsm.js → RunsPage-Ck33dcjz.js} +1 -1
- package/assets/assets/{SettingsPage-DpJTB2-Q.js → SettingsPage-CS_t4Dai.js} +1 -1
- package/assets/assets/{SiteHealthSection-CmlMQ17V.js → SiteHealthSection-BurKnHpn.js} +2 -2
- package/assets/assets/ToneBadge-Df8oiKsQ.js +60 -0
- package/assets/assets/{TrafficPage-ClH3Dxnm.js → TrafficPage-DAiY698E.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-DE-NyNGz.js → TrafficSourceDetailPage-clJSX2rr.js} +1 -1
- package/assets/assets/{account-context-BwV6ox8O.js → account-context-DDEhuoP2.js} +1 -1
- package/assets/assets/{card-DhkoBNyY.js → card-DbR-lBY3.js} +1 -1
- package/assets/assets/{extract-error-message-dNDtiSBo.js → extract-error-message-7_Vm2DQF.js} +1 -1
- package/assets/assets/{format-helpers-Bt4tx-f3.js → format-helpers-vtahpXTQ.js} +1 -1
- package/assets/assets/{index-MbApCekj.js → index-BIhCeXvc.js} +4 -4
- package/assets/assets/{query-client-D-zMw63p.js → query-client-TlFXYJ9o.js} +1 -1
- package/assets/assets/{react-query-EdiRRB2q.js → react-query-C5Mv8xfD.js} +1 -1
- package/assets/assets/{react-sigma_core.esm.min-Bidr1Gxk.js → react-sigma_core.esm.min-DmggJ7YC.js} +1 -1
- package/assets/assets/{service-BUi8JgGI.js → service-CLFURPuM.js} +1 -1
- package/assets/index.html +7 -7
- package/dist/{ads-FFUUMS4J.js → ads-TX5622SS.js} +3 -3
- package/dist/{agent-LCD2VG7C.js → agent-AIOQL66U.js} +7 -7
- package/dist/{agent-ask-OBHTCYFR.js → agent-ask-A6GIJTBX.js} +3 -3
- package/dist/{agent-conversations-VMZ4NFIX.js → agent-conversations-LHWLKOPQ.js} +3 -3
- package/dist/{agent-memory-UPFJFNWC.js → agent-memory-F54BPEYN.js} +3 -3
- package/dist/{agent-providers-4GOWLBZK.js → agent-providers-L74KZOSG.js} +3 -3
- package/dist/{agent-transcript-RGXIVZUP.js → agent-transcript-IH65H755.js} +3 -3
- package/dist/{analytics-FBK4XV5P.js → analytics-YWCY2KSY.js} +3 -3
- package/dist/{apply-Y2DVE3YB.js → apply-BLUUYG2N.js} +3 -3
- package/dist/{backfill-NE55YL6X.js → backfill-6WO5CH6Z.js} +9 -9
- package/dist/{backlinks-YWHFC7DZ.js → backlinks-NC7AUGTK.js} +3 -3
- package/dist/{bing-7BP3DWPK.js → bing-WQUEYHVC.js} +3 -3
- package/dist/{bootstrap-Z7QSKVPL.js → bootstrap-AXZV4BBC.js} +10 -10
- package/dist/{cdp-OL6RENO3.js → cdp-DUG5PMUD.js} +7 -7
- package/dist/{chunk-J523Y7X2.js → chunk-2Y6MSB4J.js} +1 -1
- package/dist/{chunk-G7SGQUW4.js → chunk-3ANSG6YT.js} +345 -337
- package/dist/{chunk-GA2EHZTI.js → chunk-3WPTMLQI.js} +22 -6
- package/dist/{chunk-QDN3FL2A.js → chunk-3YIKSZHN.js} +2 -1
- package/dist/{chunk-H4HNXCDF.js → chunk-4B6DE7BB.js} +2 -2
- package/dist/{chunk-UWBJWKDQ.js → chunk-4JMTDLFV.js} +2 -2
- package/dist/{chunk-IY4AJ6DN.js → chunk-5PA7SJ2M.js} +5 -5
- package/dist/{chunk-JO73L677.js → chunk-6ATKY252.js} +2 -2
- package/dist/{chunk-XR6ZVMYK.js → chunk-6W5AR4IW.js} +1 -1
- package/dist/{chunk-IZMT4WLZ.js → chunk-6YW24AUN.js} +2 -2
- package/dist/{chunk-HZSE3WSG.js → chunk-AZQNJX3T.js} +2 -2
- package/dist/{chunk-CF6BUJRK.js → chunk-B6R223HQ.js} +8 -8
- package/dist/{chunk-6MYHGP46.js → chunk-DLVGMRM5.js} +1 -1
- package/dist/{chunk-P3UGNR2Y.js → chunk-ETVM3T7K.js} +5 -5
- package/dist/{chunk-IV6VZ63E.js → chunk-F5D4GPZQ.js} +18 -14
- package/dist/{chunk-NZLK3KHQ.js → chunk-GNBATQS3.js} +6 -6
- package/dist/{chunk-TEDY3MHN.js → chunk-GUFKUPKZ.js} +3 -3
- package/dist/{chunk-BADJCT6U.js → chunk-GWDMWKM6.js} +1 -1
- package/dist/{chunk-PPM6Z7CM.js → chunk-HEL6DKDN.js} +1 -1
- package/dist/{chunk-QKDKVPMR.js → chunk-HGMTGC34.js} +4 -4
- package/dist/{chunk-UZKNS5PL.js → chunk-HIGBV77K.js} +254 -92
- package/dist/{chunk-NZZWJCKS.js → chunk-HJHFW455.js} +3 -3
- package/dist/{chunk-JE5QURTR.js → chunk-HKV4UWG5.js} +1 -1
- package/dist/{chunk-DRGCVTYH.js → chunk-JPM3VC6A.js} +1 -1
- package/dist/{chunk-TOX6HAQJ.js → chunk-JQNVNB63.js} +3 -3
- package/dist/{chunk-3AG3LPZX.js → chunk-MRSNLKSM.js} +1 -1
- package/dist/{chunk-O7WOCTBD.js → chunk-PAIYFNNY.js} +71 -3
- package/dist/{chunk-MJYO6UK2.js → chunk-PRSQ4R47.js} +2 -2
- package/dist/{chunk-JEBY6MS6.js → chunk-QS6RIP37.js} +1 -1
- package/dist/{chunk-4LTL5RNY.js → chunk-S77W2XSI.js} +4 -4
- package/dist/{chunk-YXAKL5HM.js → chunk-SF5JLMLG.js} +6791 -6777
- package/dist/{chunk-Q25JQANW.js → chunk-T5PWWDMJ.js} +17 -2
- package/dist/{chunk-ATT3ZCSS.js → chunk-WH2M2MQF.js} +38 -16
- package/dist/{chunk-7KOAP47B.js → chunk-WLWOGBLJ.js} +363 -248
- package/dist/{chunk-BZZDFIY2.js → chunk-XDQJOZKJ.js} +1 -1
- package/dist/{citations-RVSC67GE.js → citations-FUZ6DGP5.js} +3 -3
- package/dist/{cli-catalog-NEZE5QU5.js → cli-catalog-BXHG544D.js} +3 -3
- package/dist/{cli-commands-ARJWPTFW.js → cli-commands-GMOR67F5.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-BX3M3OYS.js → competitor-QDCH7PLT.js} +3 -3
- package/dist/{content-PKJMVMHJ.js → content-JX2CPIPR.js} +3 -3
- package/dist/{dashboard-SVHZBVM6.js → dashboard-OOWMLMKV.js} +6 -6
- package/dist/{demo-GLV22DPY.js → demo-GKSMSKOY.js} +1 -1
- package/dist/{demo-server-GPM4C4Q2.js → demo-server-UQO4XKHN.js} +12 -12
- package/dist/{discover-JDP44ZHX.js → discover-YQSVQRUV.js} +3 -3
- package/dist/{discover-eval-6ORCVYYR.js → discover-eval-FN5RL6QI.js} +3 -3
- package/dist/{doctor-TVZRMBSS.js → doctor-YHJLAEJJ.js} +3 -3
- package/dist/{evidence-FNIAFBBG.js → evidence-KUPZMBIK.js} +3 -3
- package/dist/{export-cmd-HQNF2SSD.js → export-cmd-YSEPTUUF.js} +3 -3
- package/dist/{ga-PIO5OXMK.js → ga-WNS7Q7TF.js} +3 -3
- package/dist/{gbp-3R5FME43.js → gbp-5NYFK4TW.js} +3 -3
- package/dist/{google-BYZREX2O.js → google-T4CF4WCI.js} +4 -4
- package/dist/{google-marketing-SPQ2GW6X.js → google-marketing-IXPMUBXZ.js} +1 -1
- package/dist/{health-cmd-HH5RYMSV.js → health-cmd-2W37CF6J.js} +3 -3
- package/dist/{history-Q35NLLMJ.js → history-PA3O6ZHX.js} +3 -3
- package/dist/index.d.ts +188 -11
- package/dist/index.js +25 -25
- package/dist/{init-Q33HEJJN.js → init-I3P7FINF.js} +12 -11
- package/dist/{insights-SH73B4PD.js → insights-O5PUVHTW.js} +3 -3
- package/dist/intelligence-service-EJQQNO65.js +16 -0
- package/dist/{journeys-SIV7HPW7.js → journeys-GU34O3HE.js} +3 -3
- package/dist/{keys-O656YWSW.js → keys-RXBFRNUS.js} +3 -3
- package/dist/{keyword-FZ2N4EW7.js → keyword-MASR36DK.js} +3 -3
- package/dist/{logs-2NPN7HBI.js → logs-OTA7MV4P.js} +3 -3
- package/dist/mcp-ZQYN2NET.js +19 -0
- package/dist/mcp.js +20 -14
- package/dist/{measurement-plan-JQKVSJRL.js → measurement-plan-ZGVO36TN.js} +5 -5
- package/dist/{notify-VTAYBHC6.js → notify-KS5CR3S2.js} +3 -3
- package/dist/{organic-evidence-HPXXEPOW.js → organic-evidence-CTH52AC5.js} +3 -3
- package/dist/{overview-FSBNDYZJ.js → overview-IRCIDE5H.js} +4 -4
- package/dist/{project-MAPPXURS.js → project-H5XPI5CT.js} +3 -3
- package/dist/{query-R6DLPIPJ.js → query-2R6EZG5T.js} +3 -3
- package/dist/{research-FXKOEUQB.js → research-OA3UQAV3.js} +3 -3
- package/dist/{results-export-X2PUM63S.js → results-export-XUXU3WMX.js} +3 -3
- package/dist/{run-6ENTG4IO.js → run-7IIOB6AS.js} +4 -4
- package/dist/{schedule-DMMVRT7P.js → schedule-DUTPZB5C.js} +3 -3
- package/dist/{search-FHI6APT7.js → search-TWUJD7KH.js} +3 -3
- package/dist/{serve-SJTQQQQE.js → serve-BYHHULUU.js} +26 -26
- package/dist/{session-VHCKM3AI.js → session-M5XSTGPI.js} +13 -13
- package/dist/{settings-FMB4QED4.js → settings-GQXU5M3H.js} +3 -3
- package/dist/{skills-HBIMHSOI.js → skills-F6AXQHTO.js} +2 -2
- package/dist/{snapshot-RBA2EL7R.js → snapshot-QFKUO4QK.js} +3 -3
- package/dist/{src-BXXGJOQB.js → src-52USCS7O.js} +4 -2
- package/dist/{status-ATFDFAVG.js → status-42LPR7YH.js} +4 -4
- package/dist/{technical-aeo-JWQTGCTB.js → technical-aeo-SUILL4MY.js} +3 -3
- package/dist/{telemetry-6QFGJL2I.js → telemetry-RITB7YZH.js} +4 -4
- package/dist/{tools-4VRHKUBE.js → tools-DGWJOLNS.js} +11 -11
- package/dist/{traffic-5R7M4CK5.js → traffic-3YC3HUNT.js} +5 -5
- package/dist/{users-24TIUYJY.js → users-BST5DQ5R.js} +3 -3
- package/dist/{visibility-stats-YLQPPBJJ.js → visibility-stats-NCNP4AL2.js} +3 -3
- package/dist/{wordpress-7VDPHMUZ.js → wordpress-4HQDLQVE.js} +3 -3
- package/package.json +10 -6
- package/assets/assets/ToneBadge-CmvL5mFG.js +0 -60
- package/dist/intelligence-service-LVRH4RJG.js +0 -16
- package/dist/mcp-RHQY3DV6.js +0 -14
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
dedupeGscSitemapUrls,
|
|
3
3
|
resolveDiscoveredGscSitemapUrls,
|
|
4
4
|
submitGscSitemapBatches
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2Y6MSB4J.js";
|
|
6
6
|
import {
|
|
7
7
|
measurementDraftOperationSchema,
|
|
8
8
|
runMeasurementDraftAction
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MRSNLKSM.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError
|
|
12
12
|
} from "./chunk-HGMYEDAQ.js";
|
|
@@ -77,6 +77,7 @@ import {
|
|
|
77
77
|
keywordGenerateRequestSchema,
|
|
78
78
|
logQuerySchema,
|
|
79
79
|
maxOperationAccess,
|
|
80
|
+
mcpProfileDtoSchema,
|
|
80
81
|
measurementChangesQuerySchema,
|
|
81
82
|
measurementDataQualityQuerySchema,
|
|
82
83
|
measurementDiscoveryRequestSchema,
|
|
@@ -177,7 +178,7 @@ import {
|
|
|
177
178
|
trafficSeriesGranularitySchema,
|
|
178
179
|
visibilityCompareSelectionSchema,
|
|
179
180
|
visibilityReportRequestSchema
|
|
180
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-SF5JLMLG.js";
|
|
181
182
|
|
|
182
183
|
// src/mcp/tool-registry.ts
|
|
183
184
|
import { z as z2 } from "zod";
|
|
@@ -239,13 +240,15 @@ function uniqueStrings(values) {
|
|
|
239
240
|
// src/mcp/tool-registry.ts
|
|
240
241
|
var readAnnotations = (openWorldHint) => ({
|
|
241
242
|
readOnlyHint: true,
|
|
242
|
-
|
|
243
|
+
idempotentHint: true,
|
|
244
|
+
destructiveHint: false,
|
|
245
|
+
openWorldHint: Boolean(openWorldHint)
|
|
243
246
|
});
|
|
244
247
|
var writeAnnotations = (opts) => ({
|
|
245
248
|
readOnlyHint: false,
|
|
246
249
|
idempotentHint: opts.idempotentHint,
|
|
247
250
|
destructiveHint: Boolean(opts.destructiveHint),
|
|
248
|
-
|
|
251
|
+
openWorldHint: opts.openWorldHint ?? true
|
|
249
252
|
});
|
|
250
253
|
function toolOperationAccess(tool) {
|
|
251
254
|
const derived = maxOperationAccess(tool.openApiOperations.map((operation) => {
|
|
@@ -1557,6 +1560,19 @@ var rawCanonryMcpTools = [
|
|
|
1557
1560
|
openApiOperations: ["POST /api/v1/projects/{name}/query-tracking/commit"],
|
|
1558
1561
|
handler: (client, input) => client.commitQueryTracking(input.project, input.request)
|
|
1559
1562
|
}),
|
|
1563
|
+
defineTool({
|
|
1564
|
+
name: "canonry_mcp_profile",
|
|
1565
|
+
requiresConnectionProfile: true,
|
|
1566
|
+
title: "Read the connected Canonry identity",
|
|
1567
|
+
description: "Read the signed-in user identity, effective read scope and instance audience. Requires a named user connection; an unbound API key has no user profile.",
|
|
1568
|
+
access: "read",
|
|
1569
|
+
tier: "core",
|
|
1570
|
+
inputSchema: emptyInputSchema,
|
|
1571
|
+
outputSchema: mcpProfileDtoSchema,
|
|
1572
|
+
annotations: readAnnotations(),
|
|
1573
|
+
openApiOperations: ["GET /api/v1/mcp/profile"],
|
|
1574
|
+
handler: (client) => client.getMcpProfile()
|
|
1575
|
+
}),
|
|
1560
1576
|
defineTool({
|
|
1561
1577
|
name: "canonry_projects_list",
|
|
1562
1578
|
title: "List Canonry projects",
|
|
@@ -2398,7 +2414,7 @@ var rawCanonryMcpTools = [
|
|
|
2398
2414
|
access: "write",
|
|
2399
2415
|
tier: "bing",
|
|
2400
2416
|
inputSchema: projectInputSchema,
|
|
2401
|
-
annotations: writeAnnotations({ idempotentHint: true }),
|
|
2417
|
+
annotations: writeAnnotations({ idempotentHint: true, openWorldHint: false }),
|
|
2402
2418
|
openApiOperations: ["GET /api/v1/projects/{name}/bing/coverage"],
|
|
2403
2419
|
handler: (client, input) => client.bingCoverage(input.project)
|
|
2404
2420
|
}),
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
AppError,
|
|
6
6
|
parseWindowIn,
|
|
7
7
|
resolveDateRange
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SF5JLMLG.js";
|
|
9
9
|
|
|
10
10
|
// src/cli-access.ts
|
|
11
11
|
var CLI_ACCESS_BY_ID = Object.freeze({
|
|
@@ -245,6 +245,7 @@ var CLI_ACCESS_BY_ID = Object.freeze({
|
|
|
245
245
|
"mcp": "write",
|
|
246
246
|
"mcp.config": "write",
|
|
247
247
|
"mcp.install": "write",
|
|
248
|
+
"mcp.profile": "stored",
|
|
248
249
|
"measurement-plan.advanced": "write",
|
|
249
250
|
"measurement-plan.assignments.apply": "write",
|
|
250
251
|
"measurement-plan.assignments.preview": "stored",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
trackIntegrationConnection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S77W2XSI.js";
|
|
4
4
|
import {
|
|
5
5
|
cliRuntimeContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PRSQ4R47.js";
|
|
7
7
|
|
|
8
8
|
// src/cli-connection-telemetry.ts
|
|
9
9
|
function trackCliConnection(properties) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WH2M2MQF.js";
|
|
4
4
|
import {
|
|
5
5
|
emitJsonl
|
|
6
6
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
formatMicros,
|
|
20
20
|
formatRunErrorOneLine,
|
|
21
21
|
resolveProviderInput
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-SF5JLMLG.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/run.ts
|
|
25
25
|
function getClient() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLogger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AZQNJX3T.js";
|
|
4
4
|
import {
|
|
5
5
|
pickProjectCitedDomain
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JPM3VC6A.js";
|
|
7
7
|
import {
|
|
8
8
|
GBP_INSIGHT_PROVIDER,
|
|
9
9
|
PERSISTENT_GAP_THRESHOLD,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
mergeGscQueryTotalsWithFallback,
|
|
18
18
|
readGscQueryDailyRows,
|
|
19
19
|
readLatestGscDataDate
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WLWOGBLJ.js";
|
|
21
21
|
import {
|
|
22
22
|
competitors,
|
|
23
23
|
gbpDailyMetrics,
|
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
queries,
|
|
36
36
|
querySnapshots,
|
|
37
37
|
runs
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PAIYFNNY.js";
|
|
39
39
|
import {
|
|
40
40
|
CitationStates,
|
|
41
41
|
RunKinds,
|
|
42
42
|
RunStatuses,
|
|
43
43
|
RunTriggers,
|
|
44
44
|
effectiveDomains
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-SF5JLMLG.js";
|
|
46
46
|
|
|
47
47
|
// src/intelligence-service.ts
|
|
48
48
|
import { eq, desc, asc, and, ne, or, inArray, gte, lte, isNull, sql, exists } from "drizzle-orm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseJsonColumn
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PAIYFNNY.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-SF5JLMLG.js";
|
|
30
30
|
|
|
31
31
|
// ../provider-openai/src/normalize.ts
|
|
32
32
|
import OpenAI from "openai";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
siteCrawlGraphNodes,
|
|
6
6
|
siteCrawlPages,
|
|
7
7
|
siteCrawlSnapshots
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PAIYFNNY.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-SF5JLMLG.js";
|
|
19
19
|
|
|
20
20
|
// src/site-audit-factors.ts
|
|
21
21
|
function recordedSharePct(factor) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getRequestContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GWDMWKM6.js";
|
|
4
4
|
import {
|
|
5
5
|
diagnosticIdentity,
|
|
6
6
|
redactLogString,
|
|
7
7
|
redactLogValue
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SF5JLMLG.js";
|
|
9
9
|
|
|
10
10
|
// ../api-routes/src/runtime-logger.ts
|
|
11
11
|
import { format } from "util";
|
|
@@ -7,27 +7,27 @@ import {
|
|
|
7
7
|
reparseStoredResult4,
|
|
8
8
|
reparseStoredResult5,
|
|
9
9
|
resolveStoredApiResponse
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6ATKY252.js";
|
|
11
11
|
import {
|
|
12
12
|
loadConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HKV4UWG5.js";
|
|
14
14
|
import {
|
|
15
15
|
isMachineFormat
|
|
16
16
|
} from "./chunk-HGMYEDAQ.js";
|
|
17
17
|
import {
|
|
18
18
|
determineCitationState
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JPM3VC6A.js";
|
|
20
20
|
import {
|
|
21
21
|
backfillProjectAnswerMentions,
|
|
22
22
|
competitorIdentityColumns,
|
|
23
23
|
createRunCompetitorResolver,
|
|
24
24
|
readMarketCompetitorNames,
|
|
25
25
|
refreshSnapshotMentionIdentity
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WLWOGBLJ.js";
|
|
27
27
|
import {
|
|
28
28
|
classifyAiUserFetch,
|
|
29
29
|
classifyCrawler
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-QS6RIP37.js";
|
|
31
31
|
import {
|
|
32
32
|
aiUserFetchEventsHourly,
|
|
33
33
|
auditLog,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
querySnapshots,
|
|
43
43
|
rawEventSamples,
|
|
44
44
|
runs
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PAIYFNNY.js";
|
|
46
46
|
import {
|
|
47
47
|
ProviderNames,
|
|
48
48
|
RetrievalContracts,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
extractRecommendedCompetitors,
|
|
60
60
|
normalizeUrlPath,
|
|
61
61
|
openRouterRouteModel
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-SF5JLMLG.js";
|
|
63
63
|
|
|
64
64
|
// src/commands/backfill.ts
|
|
65
65
|
import { setImmediate as yieldToEventLoop } from "timers/promises";
|
|
@@ -437,7 +437,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
439
|
async function backfillInsightsCommand(project, opts) {
|
|
440
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
440
|
+
const { IntelligenceService } = await import("./intelligence-service-EJQQNO65.js");
|
|
441
441
|
const config = loadConfig();
|
|
442
442
|
const db = createClient(config.database);
|
|
443
443
|
migrate(db);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithUsageTags
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WH2M2MQF.js";
|
|
4
4
|
import {
|
|
5
5
|
CanonryMcpToolNames,
|
|
6
6
|
canonryMcpTools
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3WPTMLQI.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-WLWOGBLJ.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-SF5JLMLG.js";
|
|
27
27
|
|
|
28
28
|
// src/agent/tools.ts
|
|
29
29
|
import { Type as Type2 } from "@earendil-works/pi-ai";
|
|
@@ -884,7 +884,7 @@ function refuseCompetitorBulkAddAcknowledgement(tool) {
|
|
|
884
884
|
};
|
|
885
885
|
}
|
|
886
886
|
function buildMcpAgentTools(registry, ctx, opts = {}) {
|
|
887
|
-
return registry.filter((tool) => !AERO_EXCLUDED_MCP_TOOLS.has(tool.name)).filter((tool) => opts.includeNames ? opts.includeNames.has(tool.name) : true).filter((tool) => opts.readOnly ? tool.access === "read" : true).filter((tool) => opts.managedSweeps ? !AERO_MANAGED_SWEEP_MCP_TOOLS.has(tool.name) : true).map((tool) => {
|
|
887
|
+
return registry.filter((tool) => !AERO_EXCLUDED_MCP_TOOLS.has(tool.name) && !tool.requiresConnectionProfile).filter((tool) => opts.includeNames ? opts.includeNames.has(tool.name) : true).filter((tool) => opts.readOnly ? tool.access === "read" : true).filter((tool) => opts.managedSweeps ? !AERO_MANAGED_SWEEP_MCP_TOOLS.has(tool.name) : true).map((tool) => {
|
|
888
888
|
const agentTool = mcpToAgentTool(tool, ctx);
|
|
889
889
|
if (COMPETITOR_AUTO_ALIAS_MODE_WRITES.has(tool.name)) return refuseCompetitorAutoAliasModeChange(agentTool, ctx);
|
|
890
890
|
if (tool.name === "canonry_competitors_add") return refuseCompetitorBulkAddAcknowledgement(agentTool);
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
createApiClient,
|
|
8
8
|
runWithUsageTags
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WH2M2MQF.js";
|
|
10
10
|
import {
|
|
11
11
|
canonryMcpTools,
|
|
12
12
|
mcpOutputSchema,
|
|
13
13
|
toolOperationAccess
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3WPTMLQI.js";
|
|
15
15
|
import {
|
|
16
16
|
PACKAGE_VERSION
|
|
17
17
|
} from "./chunk-AOJU5LKX.js";
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
isReadOnlyKey,
|
|
25
25
|
restrictedWriteScopes,
|
|
26
26
|
upgradeCaveatFor
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-SF5JLMLG.js";
|
|
28
28
|
|
|
29
29
|
// src/mcp/server.ts
|
|
30
30
|
import { randomUUID } from "crypto";
|
|
31
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
31
|
+
import { CLIENT_INFO_META_KEY, McpServer } from "@modelcontextprotocol/server";
|
|
32
32
|
import { z } from "zod";
|
|
33
33
|
|
|
34
34
|
// src/mcp/results.ts
|
|
@@ -452,7 +452,7 @@ ${updateNoticeInstructions(update)}` : SERVER_INSTRUCTIONS
|
|
|
452
452
|
});
|
|
453
453
|
server.validateToolInput = async (_tool, args) => args;
|
|
454
454
|
const entries = [];
|
|
455
|
-
for (const registryTool of getCanonryMcpTools(scope, options.tiers, options.credentialScopes, options.operator)) {
|
|
455
|
+
for (const registryTool of getCanonryMcpTools(scope, options.tiers, options.credentialScopes, options.operator, options.connectionProfile)) {
|
|
456
456
|
const tool = registryTool;
|
|
457
457
|
const handler = tool.handler;
|
|
458
458
|
const registered = server.registerTool(
|
|
@@ -464,12 +464,16 @@ ${updateNoticeInstructions(update)}` : SERVER_INSTRUCTIONS
|
|
|
464
464
|
outputSchema: tool.outputSchema ? mcpOutputSchema(tool.outputSchema) : void 0,
|
|
465
465
|
annotations: tool.annotations
|
|
466
466
|
},
|
|
467
|
-
async (input) => withToolErrors(async () => {
|
|
467
|
+
async (input, context) => withToolErrors(async () => {
|
|
468
468
|
const parsed = tool.inputSchema.parse(input ?? {});
|
|
469
|
+
const envelope = context.mcpReq.envelope;
|
|
470
|
+
const identity = envelope && CLIENT_INFO_META_KEY in envelope ? envelope[CLIENT_INFO_META_KEY] : void 0;
|
|
471
|
+
const clientName = typeof identity === "object" && identity !== null && "name" in identity && typeof identity.name === "string" ? identity.name : server.server.getClientVersion()?.name;
|
|
469
472
|
return runWithUsageTags(client, {
|
|
470
473
|
mcpTool: tool.name,
|
|
471
474
|
mcpCall: randomUUID(),
|
|
472
|
-
mcpClient:
|
|
475
|
+
mcpClient: clientName,
|
|
476
|
+
signal: context.mcpReq.signal
|
|
473
477
|
}, () => handler(client, parsed));
|
|
474
478
|
})
|
|
475
479
|
);
|
|
@@ -500,8 +504,8 @@ function registerMetaTools(server, catalog, opts) {
|
|
|
500
504
|
{
|
|
501
505
|
title: "Guide a Canonry workflow",
|
|
502
506
|
description: "Start here: route an intent to available stored-evidence tools, separately listed actions requiring approval, and workflow guidance. No provider calls or installation required. Optionally include full toolkit details.",
|
|
503
|
-
inputSchema: helpInputSchema
|
|
504
|
-
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false }
|
|
507
|
+
inputSchema: helpInputSchema,
|
|
508
|
+
annotations: { readOnlyHint: true, idempotentHint: true, destructiveHint: false, openWorldHint: false }
|
|
505
509
|
},
|
|
506
510
|
async (input) => {
|
|
507
511
|
try {
|
|
@@ -522,9 +526,9 @@ function registerMetaTools(server, catalog, opts) {
|
|
|
522
526
|
"canonry_load_toolkit",
|
|
523
527
|
{
|
|
524
528
|
title: "Load a Canonry MCP toolkit",
|
|
525
|
-
description: `Register a toolkit's tools for this session and emit one notifications/tools/list_changed. Idempotent. Loaded toolkits remain loaded for the rest of the session. Wait for this call to return before calling any newly enabled tool \u2014 pipelining the call with a tools/call on the same connection can race the registration and fail with "
|
|
526
|
-
inputSchema: loadToolkitInputSchema
|
|
527
|
-
annotations: { readOnlyHint: false, idempotentHint: true, destructiveHint: false }
|
|
529
|
+
description: `Register a toolkit's tools for this session and emit one notifications/tools/list_changed. Idempotent. Loaded toolkits remain loaded for the rest of the session. Wait for this call to return before calling any newly enabled tool \u2014 pipelining the call with a tools/call on the same connection can race the registration and fail with "Tool ... disabled".`,
|
|
530
|
+
inputSchema: loadToolkitInputSchema,
|
|
531
|
+
annotations: { readOnlyHint: false, idempotentHint: true, destructiveHint: false, openWorldHint: false }
|
|
528
532
|
},
|
|
529
533
|
async (input) => withToolErrors(async () => {
|
|
530
534
|
const parsed = loadToolkitInputSchema.parse(input ?? {});
|
|
@@ -532,10 +536,10 @@ function registerMetaTools(server, catalog, opts) {
|
|
|
532
536
|
})
|
|
533
537
|
);
|
|
534
538
|
}
|
|
535
|
-
function getCanonryMcpTools(scope = "all", tiers, credentialScopes, operator = false) {
|
|
539
|
+
function getCanonryMcpTools(scope = "all", tiers, credentialScopes, operator = false, connectionProfile = false) {
|
|
536
540
|
const readOnly = scope === "read-only" || credentialScopes !== void 0 && isReadOnlyKey(credentialScopes);
|
|
537
541
|
const restricted = credentialScopes && restrictedWriteScopes(credentialScopes);
|
|
538
|
-
const authorized = canonryMcpTools.filter((tool) => !tool.requiresOperator || operator);
|
|
542
|
+
const authorized = canonryMcpTools.filter((tool) => (!tool.requiresOperator || operator) && (!tool.requiresConnectionProfile || connectionProfile));
|
|
539
543
|
const byScope = scope === "stored-only" ? authorized.filter((tool) => toolOperationAccess(tool) === OperationAccesses.stored) : readOnly ? authorized.filter((tool) => tool.access === "read") : authorized.filter((tool) => {
|
|
540
544
|
if (!restricted || tool.access === "read") return true;
|
|
541
545
|
if (tool.requiredScope && restricted.includes(tool.requiredScope)) return true;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
isStoredPageReadTool,
|
|
6
6
|
isStoredReadTool,
|
|
7
7
|
truncateToolResult
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ETVM3T7K.js";
|
|
9
9
|
import {
|
|
10
10
|
CANONRY_MCP_TOOLKITS
|
|
11
11
|
} from "./chunk-NDTU7FGL.js";
|
|
@@ -22,18 +22,18 @@ import {
|
|
|
22
22
|
resolveApiKeyFor,
|
|
23
23
|
resolveModelForProvider,
|
|
24
24
|
validateAgentProviderRegistry
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-HKV4UWG5.js";
|
|
26
26
|
import {
|
|
27
27
|
CanonryMcpToolNames,
|
|
28
28
|
canonryMcpTools
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3WPTMLQI.js";
|
|
30
30
|
import {
|
|
31
31
|
createLogger
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AZQNJX3T.js";
|
|
33
33
|
import {
|
|
34
34
|
agentToolEvents,
|
|
35
35
|
llmUsageEvents
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-PAIYFNNY.js";
|
|
37
37
|
import {
|
|
38
38
|
MeasurementPortfolioLists,
|
|
39
39
|
SeoCapabilities,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
describeError,
|
|
43
43
|
validationError,
|
|
44
44
|
visibilityReportRequestSchema
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-SF5JLMLG.js";
|
|
46
46
|
|
|
47
47
|
// src/agent/session.ts
|
|
48
48
|
import fs3 from "fs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WH2M2MQF.js";
|
|
4
4
|
import {
|
|
5
5
|
emitJsonl
|
|
6
6
|
} from "./chunk-Z7IUAJOF.js";
|
|
7
7
|
import {
|
|
8
8
|
measurementDraftOperationSchema,
|
|
9
9
|
runMeasurementDraftAction
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MRSNLKSM.js";
|
|
11
11
|
import {
|
|
12
12
|
isMachineFormat,
|
|
13
13
|
systemError
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
unattributedAnswersLabel,
|
|
38
38
|
uncheckedSourcesLabel,
|
|
39
39
|
visibilityReportRequestSchema
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-SF5JLMLG.js";
|
|
41
41
|
|
|
42
42
|
// src/commands/measurement-plan.ts
|
|
43
43
|
import crypto from "crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registeredProviderNames
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DLVGMRM5.js";
|
|
4
4
|
import {
|
|
5
5
|
configExists,
|
|
6
6
|
loadConfigRaw
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HKV4UWG5.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-52USCS7O.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-BYHHULUU.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|