@canonry/canonry 7.72.2 → 7.74.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-L64W5J35.js} +3 -3
- package/dist/{agent-LCD2VG7C.js → agent-CMQ34CFD.js} +7 -7
- package/dist/{agent-ask-OBHTCYFR.js → agent-ask-3KEYJSZV.js} +3 -3
- package/dist/{agent-conversations-VMZ4NFIX.js → agent-conversations-4KKPOTCP.js} +3 -3
- package/dist/{agent-memory-UPFJFNWC.js → agent-memory-VOSRZ57W.js} +3 -3
- package/dist/{agent-providers-4GOWLBZK.js → agent-providers-SLXTYMDS.js} +3 -3
- package/dist/{agent-transcript-RGXIVZUP.js → agent-transcript-Q6OEZROG.js} +3 -3
- package/dist/{analytics-FBK4XV5P.js → analytics-LSF6NYII.js} +3 -3
- package/dist/{apply-Y2DVE3YB.js → apply-7O3RES7N.js} +3 -3
- package/dist/{backfill-NE55YL6X.js → backfill-7ARSKYDG.js} +9 -9
- package/dist/{backlinks-YWHFC7DZ.js → backlinks-4YAC374B.js} +3 -3
- package/dist/{bing-7BP3DWPK.js → bing-SHAYDXAA.js} +3 -3
- package/dist/{bootstrap-Z7QSKVPL.js → bootstrap-BHLBGQKJ.js} +10 -10
- package/dist/{cdp-OL6RENO3.js → cdp-QWJE6SFY.js} +7 -7
- package/dist/{chunk-J523Y7X2.js → chunk-2Y6MSB4J.js} +1 -1
- package/dist/{chunk-GA2EHZTI.js → chunk-3WPTMLQI.js} +22 -6
- package/dist/{chunk-QDN3FL2A.js → chunk-3YIKSZHN.js} +2 -1
- 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-QKDKVPMR.js → chunk-AJMDETJA.js} +4 -4
- package/dist/{chunk-HZSE3WSG.js → chunk-AZQNJX3T.js} +2 -2
- package/dist/{chunk-ATT3ZCSS.js → chunk-BICUWFV4.js} +38 -16
- package/dist/{chunk-MJYO6UK2.js → chunk-DL3LTSBV.js} +2 -2
- package/dist/{chunk-6MYHGP46.js → chunk-DLVGMRM5.js} +1 -1
- package/dist/{chunk-TOX6HAQJ.js → chunk-EXGETCJR.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-NZZWJCKS.js → chunk-HJHFW455.js} +3 -3
- package/dist/{chunk-DRGCVTYH.js → chunk-JPM3VC6A.js} +1 -1
- package/dist/{chunk-H4HNXCDF.js → chunk-KOWOQ3JZ.js} +2 -2
- package/dist/{chunk-UWBJWKDQ.js → chunk-L5GIL45X.js} +2 -2
- package/dist/{chunk-P3UGNR2Y.js → chunk-LS47ZAX2.js} +5 -5
- package/dist/{chunk-IV6VZ63E.js → chunk-MB3IUJ6Z.js} +18 -14
- package/dist/{chunk-3AG3LPZX.js → chunk-MRSNLKSM.js} +1 -1
- package/dist/{chunk-JE5QURTR.js → chunk-NXFNXXYM.js} +184 -92
- package/dist/{chunk-Q25JQANW.js → chunk-O4D66XPL.js} +17 -2
- package/dist/{chunk-O7WOCTBD.js → chunk-PAIYFNNY.js} +71 -3
- package/dist/{chunk-JEBY6MS6.js → chunk-QS6RIP37.js} +1 -1
- package/dist/{chunk-4LTL5RNY.js → chunk-SCRPC2PQ.js} +4 -4
- package/dist/{chunk-YXAKL5HM.js → chunk-SF5JLMLG.js} +6791 -6777
- package/dist/{chunk-UZKNS5PL.js → chunk-TXUNPPWD.js} +254 -92
- package/dist/{chunk-NZLK3KHQ.js → chunk-WLNYLQTX.js} +6 -6
- package/dist/{chunk-7KOAP47B.js → chunk-WLWOGBLJ.js} +363 -248
- package/dist/{chunk-CF6BUJRK.js → chunk-WY2C6FFA.js} +8 -8
- package/dist/{chunk-BZZDFIY2.js → chunk-XDQJOZKJ.js} +1 -1
- package/dist/{chunk-TEDY3MHN.js → chunk-YTSE2EZP.js} +3 -3
- package/dist/{chunk-G7SGQUW4.js → chunk-ZMDIARSG.js} +345 -337
- package/dist/{citations-RVSC67GE.js → citations-EENLZULG.js} +3 -3
- package/dist/{cli-catalog-NEZE5QU5.js → cli-catalog-BXHG544D.js} +3 -3
- package/dist/{cli-commands-ARJWPTFW.js → cli-commands-7BG5M2KF.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-BX3M3OYS.js → competitor-CW5LMXJ6.js} +3 -3
- package/dist/{content-PKJMVMHJ.js → content-BX6UGRRU.js} +3 -3
- package/dist/{dashboard-SVHZBVM6.js → dashboard-M2TKT2LW.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-2EZUZFNR.js} +3 -3
- package/dist/{discover-eval-6ORCVYYR.js → discover-eval-IS2GRYVV.js} +3 -3
- package/dist/{doctor-TVZRMBSS.js → doctor-DPEIBV3E.js} +3 -3
- package/dist/{evidence-FNIAFBBG.js → evidence-UGC4ZWNA.js} +3 -3
- package/dist/{export-cmd-HQNF2SSD.js → export-cmd-7OVM23C4.js} +3 -3
- package/dist/{ga-PIO5OXMK.js → ga-FUADE4K4.js} +3 -3
- package/dist/{gbp-3R5FME43.js → gbp-R4M663R5.js} +3 -3
- package/dist/{google-BYZREX2O.js → google-WTOTC5SL.js} +4 -4
- package/dist/{google-marketing-SPQ2GW6X.js → google-marketing-IXPMUBXZ.js} +1 -1
- package/dist/{health-cmd-HH5RYMSV.js → health-cmd-QKDO6VIT.js} +3 -3
- package/dist/{history-Q35NLLMJ.js → history-LEBTYXVW.js} +3 -3
- package/dist/index.d.ts +249 -72
- package/dist/index.js +25 -25
- package/dist/{init-Q33HEJJN.js → init-BKOT4UY2.js} +12 -11
- package/dist/{insights-SH73B4PD.js → insights-OBHQ5GHV.js} +3 -3
- package/dist/intelligence-service-EJQQNO65.js +16 -0
- package/dist/{journeys-SIV7HPW7.js → journeys-PTMCJHOL.js} +3 -3
- package/dist/{keys-O656YWSW.js → keys-W2FZNFOR.js} +3 -3
- package/dist/{keyword-FZ2N4EW7.js → keyword-Y6WABJPU.js} +3 -3
- package/dist/{logs-2NPN7HBI.js → logs-KRSH53GN.js} +3 -3
- package/dist/mcp-6LJW6LEJ.js +19 -0
- package/dist/mcp.js +20 -14
- package/dist/{measurement-plan-JQKVSJRL.js → measurement-plan-RHLKXNYG.js} +5 -5
- package/dist/{notify-VTAYBHC6.js → notify-HRK2HQTU.js} +3 -3
- package/dist/{organic-evidence-HPXXEPOW.js → organic-evidence-EX2VL5CE.js} +3 -3
- package/dist/{overview-FSBNDYZJ.js → overview-254QNXAC.js} +4 -4
- package/dist/{project-MAPPXURS.js → project-UOYX7T4J.js} +3 -3
- package/dist/{query-R6DLPIPJ.js → query-JMVOMNRS.js} +3 -3
- package/dist/{research-FXKOEUQB.js → research-PAPX7KO5.js} +3 -3
- package/dist/{results-export-X2PUM63S.js → results-export-3BXIIDP2.js} +3 -3
- package/dist/{run-6ENTG4IO.js → run-WQXLV4MS.js} +4 -4
- package/dist/{schedule-DMMVRT7P.js → schedule-3WJ5F3BF.js} +3 -3
- package/dist/{search-FHI6APT7.js → search-RVGFOZAT.js} +3 -3
- package/dist/{serve-SJTQQQQE.js → serve-BPM2P3GY.js} +26 -26
- package/dist/{session-VHCKM3AI.js → session-76DT5W6D.js} +13 -13
- package/dist/{settings-FMB4QED4.js → settings-MRJ566D6.js} +3 -3
- package/dist/{skills-HBIMHSOI.js → skills-F6AXQHTO.js} +2 -2
- package/dist/{snapshot-RBA2EL7R.js → snapshot-7GBDFFVB.js} +3 -3
- package/dist/{src-BXXGJOQB.js → src-52USCS7O.js} +4 -2
- package/dist/{status-ATFDFAVG.js → status-S6CZV2LU.js} +4 -4
- package/dist/{technical-aeo-JWQTGCTB.js → technical-aeo-Q73ZF2FD.js} +3 -3
- package/dist/{telemetry-6QFGJL2I.js → telemetry-BT4OOPN6.js} +4 -4
- package/dist/{tools-4VRHKUBE.js → tools-HYOV77FY.js} +11 -11
- package/dist/{traffic-5R7M4CK5.js → traffic-EFLF62IZ.js} +5 -5
- package/dist/{users-24TIUYJY.js → users-MYXGNUIZ.js} +3 -3
- package/dist/{visibility-stats-YLQPPBJJ.js → visibility-stats-QENASZW6.js} +3 -3
- package/dist/{wordpress-7VDPHMUZ.js → wordpress-CYLQHE5L.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
|
@@ -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,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-NXFNXXYM.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-BPM2P3GY.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NXFNXXYM.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-SF5JLMLG.js";
|
|
40
40
|
|
|
41
41
|
// ../api-client-generated/src/generated/core/bodySerializer.gen.ts
|
|
42
42
|
var jsonBodySerializer = {
|
|
@@ -3035,6 +3035,11 @@ var getApiV1Doctor = (options) => (options?.client ?? client).get({
|
|
|
3035
3035
|
url: "/api/v1/doctor",
|
|
3036
3036
|
...options
|
|
3037
3037
|
});
|
|
3038
|
+
var getApiV1McpProfile = (options) => (options?.client ?? client).get({
|
|
3039
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3040
|
+
url: "/api/v1/mcp/profile",
|
|
3041
|
+
...options
|
|
3042
|
+
});
|
|
3038
3043
|
var getApiV1Status = (options) => (options?.client ?? client).get({
|
|
3039
3044
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3040
3045
|
url: "/api/v1/status",
|
|
@@ -3522,8 +3527,8 @@ function classifyStoredOnlyRequest(method, url) {
|
|
|
3522
3527
|
access: operationAccess(operation.slice(0, separator), operation.slice(separator + 1), OperationAccesses.live)
|
|
3523
3528
|
};
|
|
3524
3529
|
}
|
|
3525
|
-
function storedOnlyRequestHeaders(method, url) {
|
|
3526
|
-
if (!["1", "true"].includes((process.env.CANONRY_STORED_ONLY ?? "").toLowerCase())) return {};
|
|
3530
|
+
function storedOnlyRequestHeaders(method, url, storedOnly = false) {
|
|
3531
|
+
if (!storedOnly && !["1", "true"].includes((process.env.CANONRY_STORED_ONLY ?? "").toLowerCase())) return {};
|
|
3527
3532
|
const { operation, access } = classifyStoredOnlyRequest(method, url);
|
|
3528
3533
|
if (access !== OperationAccesses.stored) {
|
|
3529
3534
|
throw new CliError({
|
|
@@ -3535,8 +3540,8 @@ function storedOnlyRequestHeaders(method, url) {
|
|
|
3535
3540
|
}
|
|
3536
3541
|
return { [STORED_ONLY_HEADER]: "1" };
|
|
3537
3542
|
}
|
|
3538
|
-
function storedOnlyProbeHeaders() {
|
|
3539
|
-
return ["1", "true"].includes((process.env.CANONRY_STORED_ONLY ?? "").toLowerCase()) ? { [STORED_ONLY_HEADER]: "1" } : {};
|
|
3543
|
+
function storedOnlyProbeHeaders(storedOnly = false) {
|
|
3544
|
+
return storedOnly || ["1", "true"].includes((process.env.CANONRY_STORED_ONLY ?? "").toLowerCase()) ? { [STORED_ONLY_HEADER]: "1" } : {};
|
|
3540
3545
|
}
|
|
3541
3546
|
var SAFE_CLIENT_NAME = /^\w[\w./-]{0,127}$/;
|
|
3542
3547
|
var SAFE_ACTOR_SESSION = /^\w[\w.:-]{0,127}$/;
|
|
@@ -3588,6 +3593,8 @@ var ApiClient = class {
|
|
|
3588
3593
|
apiKey;
|
|
3589
3594
|
probePromise = null;
|
|
3590
3595
|
probeSkipped;
|
|
3596
|
+
storedOnly;
|
|
3597
|
+
signal;
|
|
3591
3598
|
heyClient;
|
|
3592
3599
|
requestHeaders;
|
|
3593
3600
|
/** Tracks the base URL most recently applied to `heyClient` so probe-driven updates only re-configure when something actually changed. */
|
|
@@ -3596,6 +3603,8 @@ var ApiClient = class {
|
|
|
3596
3603
|
this.originUrl = baseUrl.replace(/\/$/, "");
|
|
3597
3604
|
this.apiKey = apiKey;
|
|
3598
3605
|
this.probeSkipped = opts?.skipProbe ?? false;
|
|
3606
|
+
this.storedOnly = opts?.storedOnly === true;
|
|
3607
|
+
this.signal = opts?.signal;
|
|
3599
3608
|
this.heyClientBaseUrl = this.originUrl;
|
|
3600
3609
|
const actorSession = safeActorSession(opts?.actorSession);
|
|
3601
3610
|
const surface = opts?.surface ?? "cli";
|
|
@@ -3609,15 +3618,19 @@ var ApiClient = class {
|
|
|
3609
3618
|
};
|
|
3610
3619
|
this.heyClient = createClient2({ baseUrl: this.originUrl, apiKey: this.apiKey, headers: this.requestHeaders });
|
|
3611
3620
|
this.heyClient.interceptors.request.use((request) => {
|
|
3612
|
-
for (const [key, value] of Object.entries(storedOnlyRequestHeaders(request.method, request.url.toString()))) request.headers.set(key, value);
|
|
3621
|
+
for (const [key, value] of Object.entries(storedOnlyRequestHeaders(request.method, request.url.toString(), this.storedOnly))) request.headers.set(key, value);
|
|
3613
3622
|
const tags = usageTagStore.getStore();
|
|
3614
3623
|
if (tags?.mcpTool) request.headers.set(USAGE_TELEMETRY_HEADERS.mcpTool, tags.mcpTool);
|
|
3615
3624
|
if (tags?.mcpCall) request.headers.set(USAGE_TELEMETRY_HEADERS.mcpCall, tags.mcpCall);
|
|
3616
3625
|
const mcpClient = normalizeAgentSlug(tags?.mcpClient);
|
|
3617
3626
|
if (mcpClient) request.headers.set(USAGE_TELEMETRY_HEADERS.mcpClient, mcpClient);
|
|
3618
|
-
return request;
|
|
3627
|
+
return this.signal || tags?.signal ? new Request(request, { signal: this.requestSignal(request.signal) }) : request;
|
|
3619
3628
|
});
|
|
3620
3629
|
}
|
|
3630
|
+
requestSignal(signal) {
|
|
3631
|
+
const signals = [this.signal, usageTagStore.getStore()?.signal, signal].filter((entry) => entry !== void 0);
|
|
3632
|
+
return signals.length > 1 ? AbortSignal.any(signals) : signals[0];
|
|
3633
|
+
}
|
|
3621
3634
|
/**
|
|
3622
3635
|
* On first API call, probe /health to auto-discover basePath when the user
|
|
3623
3636
|
* hasn't configured one locally. This lets `canonry run` in a separate shell
|
|
@@ -3631,8 +3644,8 @@ var ApiClient = class {
|
|
|
3631
3644
|
try {
|
|
3632
3645
|
const origin = new URL(this.originUrl).origin;
|
|
3633
3646
|
const res = await fetch(`${origin}/health`, {
|
|
3634
|
-
headers: storedOnlyProbeHeaders(),
|
|
3635
|
-
signal: AbortSignal.timeout(2e3)
|
|
3647
|
+
headers: storedOnlyProbeHeaders(this.storedOnly),
|
|
3648
|
+
signal: this.requestSignal(AbortSignal.timeout(2e3))
|
|
3636
3649
|
});
|
|
3637
3650
|
if (res.ok) {
|
|
3638
3651
|
const body = await res.json();
|
|
@@ -3797,7 +3810,7 @@ var ApiClient = class {
|
|
|
3797
3810
|
*/
|
|
3798
3811
|
async streamPost(path, body, signal) {
|
|
3799
3812
|
const candidateUrl = `${this.originUrl}/api/v1${path}`;
|
|
3800
|
-
const storedOnlyHeaders = storedOnlyRequestHeaders("POST", candidateUrl);
|
|
3813
|
+
const storedOnlyHeaders = storedOnlyRequestHeaders("POST", candidateUrl, this.storedOnly);
|
|
3801
3814
|
await this.probeBasePath();
|
|
3802
3815
|
const url = `${this.originUrl}/api/v1${path}`;
|
|
3803
3816
|
const headers = {
|
|
@@ -3808,7 +3821,12 @@ var ApiClient = class {
|
|
|
3808
3821
|
};
|
|
3809
3822
|
let res;
|
|
3810
3823
|
try {
|
|
3811
|
-
res = await fetch(url, {
|
|
3824
|
+
res = await fetch(url, {
|
|
3825
|
+
method: "POST",
|
|
3826
|
+
headers,
|
|
3827
|
+
body: JSON.stringify(body ?? {}),
|
|
3828
|
+
signal: this.requestSignal(signal)
|
|
3829
|
+
});
|
|
3812
3830
|
} catch (err) {
|
|
3813
3831
|
if (err instanceof CliError) throw err;
|
|
3814
3832
|
const msg = describeError(err);
|
|
@@ -3861,6 +3879,9 @@ var ApiClient = class {
|
|
|
3861
3879
|
() => getApiV1ProjectsByNameDeletePreview({ client: this.heyClient, path: { name } })
|
|
3862
3880
|
);
|
|
3863
3881
|
}
|
|
3882
|
+
async getMcpProfile() {
|
|
3883
|
+
return this.invoke(() => getApiV1McpProfile({ client: this.heyClient }));
|
|
3884
|
+
}
|
|
3864
3885
|
async getStatus(opts) {
|
|
3865
3886
|
return this.invoke(
|
|
3866
3887
|
() => getApiV1Status({ client: this.heyClient, query: { project: opts?.project, problems: opts?.problems } })
|
|
@@ -3916,11 +3937,12 @@ var ApiClient = class {
|
|
|
3916
3937
|
if (opts.until) params.set("until", opts.until);
|
|
3917
3938
|
if (opts.includeProbes) params.set("includeProbes", "true");
|
|
3918
3939
|
const url = `${this.originUrl}/api/v1/projects/${encodeURIComponent(project)}/results/export?${params.toString()}`;
|
|
3919
|
-
const storedOnlyHeaders = storedOnlyRequestHeaders("GET", url);
|
|
3940
|
+
const storedOnlyHeaders = storedOnlyRequestHeaders("GET", url, this.storedOnly);
|
|
3920
3941
|
let res;
|
|
3921
3942
|
try {
|
|
3922
3943
|
res = await fetch(url, {
|
|
3923
|
-
headers: { ...this.requestHeaders, ...storedOnlyHeaders }
|
|
3944
|
+
headers: { ...this.requestHeaders, ...storedOnlyHeaders },
|
|
3945
|
+
signal: this.requestSignal()
|
|
3924
3946
|
});
|
|
3925
3947
|
} catch (err) {
|
|
3926
3948
|
const message = describeError(err);
|
|
@@ -4758,10 +4780,10 @@ var ApiClient = class {
|
|
|
4758
4780
|
* never run the CLI about a newer release.
|
|
4759
4781
|
*/
|
|
4760
4782
|
async getServerUpdateAvailable() {
|
|
4761
|
-
if (storedOnlyProbeHeaders()[STORED_ONLY_HEADER]) return null;
|
|
4783
|
+
if (storedOnlyProbeHeaders(this.storedOnly)[STORED_ONLY_HEADER]) return null;
|
|
4762
4784
|
try {
|
|
4763
4785
|
await this.probeBasePath();
|
|
4764
|
-
const res = await fetch(`${this.originUrl}/health`, { signal: AbortSignal.timeout(2e3) });
|
|
4786
|
+
const res = await fetch(`${this.originUrl}/health`, { signal: this.requestSignal(AbortSignal.timeout(2e3)) });
|
|
4765
4787
|
if (!res.ok) return null;
|
|
4766
4788
|
const body = await res.json();
|
|
4767
4789
|
return parseServerUpdateAvailable(body?.updateAvailable);
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
loadConfig,
|
|
6
6
|
loadConfigRaw,
|
|
7
7
|
saveConfigPatch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NXFNXXYM.js";
|
|
9
9
|
import {
|
|
10
10
|
CANONRY_NPM_PACKAGE_URL,
|
|
11
11
|
compareSemver,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
updateCheckEnvOptOut,
|
|
19
19
|
upgradeCaveatFor,
|
|
20
20
|
upgradeCommandFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SF5JLMLG.js";
|
|
22
22
|
|
|
23
23
|
// src/runtime-context.ts
|
|
24
24
|
function cliRuntimeContext(env = process.env, stdio = process) {
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
configExists,
|
|
3
3
|
loadConfigRaw,
|
|
4
4
|
saveConfigPatch
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NXFNXXYM.js";
|
|
6
6
|
import {
|
|
7
7
|
BUNDLED_SKILL_NAMES,
|
|
8
8
|
installSkills
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HEL6DKDN.js";
|
|
10
10
|
import {
|
|
11
11
|
PACKAGE_VERSION
|
|
12
12
|
} from "./chunk-AOJU5LKX.js";
|
|
13
13
|
import {
|
|
14
14
|
SKILL_MANIFEST_FILENAME,
|
|
15
15
|
SkillsClients
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SF5JLMLG.js";
|
|
17
17
|
|
|
18
18
|
// src/skills-autosync.ts
|
|
19
19
|
import fs from "fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
resolveCliAccess,
|
|
4
4
|
resolveCliAccessForInvocation,
|
|
5
5
|
windowOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3YIKSZHN.js";
|
|
7
7
|
import {
|
|
8
8
|
emitJsonl
|
|
9
9
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-HGMYEDAQ.js";
|
|
15
15
|
import {
|
|
16
16
|
OperationAccesses
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SF5JLMLG.js";
|
|
18
18
|
|
|
19
19
|
// src/cli-catalog.ts
|
|
20
20
|
import { createRequire } from "module";
|
|
@@ -111,7 +111,7 @@ async function dispatchRegisteredCommand(args, fallbackFormat, specs) {
|
|
|
111
111
|
const accessValue = accessFilterFromArgs(argsWithoutHelp);
|
|
112
112
|
validateAccessFilter(accessValue);
|
|
113
113
|
if (fallbackFormat !== "text") {
|
|
114
|
-
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-
|
|
114
|
+
const { printCliCatalog: printCliCatalog2 } = await import("./cli-catalog-BXHG544D.js");
|
|
115
115
|
const group2 = argsWithoutHelp.find((arg) => !arg.startsWith("--"));
|
|
116
116
|
printCliCatalog2(specs, fallbackFormat, group2, accessValue);
|
|
117
117
|
return true;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
trackIntegrationConnection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SCRPC2PQ.js";
|
|
4
4
|
import {
|
|
5
5
|
cliRuntimeContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DL3LTSBV.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-BICUWFV4.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,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithUsageTags
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BICUWFV4.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-BICUWFV4.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;
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
measurementDraftUpsertGroupRequestSchema,
|
|
24
24
|
measurementDraftUpsertMarketRequestSchema,
|
|
25
25
|
measurementDraftUpsertTargetRequestSchema
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-SF5JLMLG.js";
|
|
27
27
|
|
|
28
28
|
// src/measurement-draft-actions.ts
|
|
29
29
|
import { z } from "zod";
|