@canonry/canonry 7.32.0 → 7.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +24 -0
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +204 -4
- package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +14 -2
- package/assets/assets/{AuditHistoryPanel-cQyVA85P.js → AuditHistoryPanel-C5oZsvsR.js} +1 -1
- package/assets/assets/{BacklinksPage-UGZ_9N7F.js → BacklinksPage-CF5sGSTQ.js} +1 -1
- package/assets/assets/{HistoryPage-UJVFZ5LK.js → HistoryPage-DumL6cl5.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-ChpOxQfx.js → MeasurementPropertyPage-DCegOp_w.js} +3 -3
- package/assets/assets/ProjectPage-CWDk48Y6.js +8 -0
- package/assets/assets/RunsPage-Bb1VMWYu.js +1 -0
- package/assets/assets/{SettingsPage-DeKxjuTr.js → SettingsPage-CHGh169l.js} +1 -1
- package/assets/assets/{SiteHealthSection-COeVsgop.js → SiteHealthSection-bGzH9m9-.js} +3 -3
- package/assets/assets/{TrafficPage-DmMmeJKK.js → TrafficPage-cfnEZ2Mu.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-CUehseZe.js → TrafficSourceDetailPage-BQS0MAXE.js} +1 -1
- package/assets/assets/{extract-error-message-BsxdS7Po.js → extract-error-message-IWhACkO_.js} +1 -1
- package/assets/assets/index-BDY3-V1S.js +86 -0
- package/assets/assets/{react-sigma_core.esm.min--MbbBWzJ.js → react-sigma_core.esm.min-BQt189AI.js} +1 -1
- package/assets/assets/{v2-overview-adapter-D-IScpdp.js → v2-overview-adapter-ZC3VuoTT.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-WRHA54BN.js → chunk-65BHDVYO.js} +5604 -3984
- package/dist/{chunk-FW4GX2LO.js → chunk-BPFRGC7K.js} +3 -3
- package/dist/{chunk-2C6NWFN4.js → chunk-BWR5MNL5.js} +2 -2
- package/dist/chunk-C2I7M3B2.js +22948 -0
- package/dist/{chunk-42XUY243.js → chunk-E43JM3QV.js} +11430 -10405
- package/dist/chunk-HGMYEDAQ.js +79 -0
- package/dist/{chunk-QFXD7GR5.js → chunk-KOIOZ7QW.js} +193 -19
- package/dist/{chunk-ZIETXJYU.js → chunk-LYKDNJXR.js} +158 -104
- package/dist/chunk-WRUKKEGR.js +562 -0
- package/dist/chunk-WU2BRWXY.js +546 -0
- package/dist/{chunk-K5EGSSXC.js → chunk-WXX3NL4C.js} +108 -41
- package/dist/cli-catalog-J3O6W726.js +15 -0
- package/dist/cli-commands-QST2CPDG.js +15 -0
- package/dist/cli.js +136 -22525
- package/dist/{demo-server-G5OK7SWE.js → demo-server-KA7DWTY6.js} +5 -4
- package/dist/index.js +7 -6
- package/dist/{intelligence-service-3ZUVTIO7.js → intelligence-service-LHZZTJPH.js} +2 -2
- package/dist/mcp.js +30 -15
- package/package.json +10 -10
- package/assets/assets/ProjectPage-CvxuPSiC.js +0 -8
- package/assets/assets/RunsPage-C6U_YcDY.js +0 -1
- package/assets/assets/index-ahEr6Oc-.js +0 -86
|
@@ -21,20 +21,22 @@ import {
|
|
|
21
21
|
saveConfig,
|
|
22
22
|
saveConfigPatch,
|
|
23
23
|
sentimentInstallReadiness
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KOIOZ7QW.js";
|
|
25
25
|
import {
|
|
26
26
|
computeFactorAverages,
|
|
27
27
|
deleteSiteCrawlGraphLayout,
|
|
28
28
|
persistSiteCrawlGraphLayout,
|
|
29
29
|
prepareSiteCrawlGraphLayout,
|
|
30
30
|
recordedSharePct
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BWR5MNL5.js";
|
|
32
32
|
import {
|
|
33
33
|
CanonryMcpToolNames,
|
|
34
|
-
CliError,
|
|
35
34
|
PACKAGE_VERSION,
|
|
36
35
|
canonryMcpTools
|
|
37
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-LYKDNJXR.js";
|
|
37
|
+
import {
|
|
38
|
+
CliError
|
|
39
|
+
} from "./chunk-HGMYEDAQ.js";
|
|
38
40
|
import {
|
|
39
41
|
BingApiError,
|
|
40
42
|
CC_CACHE_DIR,
|
|
@@ -230,6 +232,7 @@ import {
|
|
|
230
232
|
siteCrawlRunRequests,
|
|
231
233
|
siteCrawlSnapshots,
|
|
232
234
|
siteLivenessState,
|
|
235
|
+
syncRunClaimKey,
|
|
233
236
|
toAlertView,
|
|
234
237
|
trafficSources,
|
|
235
238
|
usageCounters,
|
|
@@ -237,7 +240,7 @@ import {
|
|
|
237
240
|
webhookResponseReason,
|
|
238
241
|
webhookTargetRefusalReason,
|
|
239
242
|
writeAuditLog
|
|
240
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-65BHDVYO.js";
|
|
241
244
|
import {
|
|
242
245
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
243
246
|
AGENT_NONE,
|
|
@@ -281,7 +284,9 @@ import {
|
|
|
281
284
|
MeasurementPortfolioLists,
|
|
282
285
|
MemorySources,
|
|
283
286
|
ONBOARDING_FLOW_VERSION,
|
|
287
|
+
OPERATION_ACCESS_HEADER,
|
|
284
288
|
OUTSTANDING_PROVIDER_BATCH_STATUSES,
|
|
289
|
+
OperationAccesses,
|
|
285
290
|
OutcomeReasonCodes,
|
|
286
291
|
OutcomeStatuses,
|
|
287
292
|
OutcomeSurfaces,
|
|
@@ -307,6 +312,7 @@ import {
|
|
|
307
312
|
SITE_AUDIT_DEFAULT_PAGE_LIMIT,
|
|
308
313
|
SITE_AUDIT_MAX_EDGE_LIMIT,
|
|
309
314
|
SITE_AUDIT_MAX_PAGE_LIMIT,
|
|
315
|
+
STORED_ONLY_HEADER,
|
|
310
316
|
SchedulableRunKinds,
|
|
311
317
|
SentimentOutcomes,
|
|
312
318
|
SiteHealthLinkClassificationSources,
|
|
@@ -462,6 +468,7 @@ import {
|
|
|
462
468
|
splitList,
|
|
463
469
|
startOfDayHourInTimeZone,
|
|
464
470
|
statusClassOf,
|
|
471
|
+
storedOnlyRefused,
|
|
465
472
|
storedSentimentClassifierInputSchema,
|
|
466
473
|
summarizeRunUsage,
|
|
467
474
|
templateLinkDetection,
|
|
@@ -480,7 +487,7 @@ import {
|
|
|
480
487
|
winnabilityClassLabel,
|
|
481
488
|
withRetry,
|
|
482
489
|
withSkippedProviders
|
|
483
|
-
} from "./chunk-
|
|
490
|
+
} from "./chunk-E43JM3QV.js";
|
|
484
491
|
|
|
485
492
|
// src/runtime-context.ts
|
|
486
493
|
function cliRuntimeContext(env = process.env, stdio = process) {
|
|
@@ -659,6 +666,7 @@ function startBackgroundRefresh(getNow) {
|
|
|
659
666
|
})();
|
|
660
667
|
}
|
|
661
668
|
function checkLatestVersionForServer(opts) {
|
|
669
|
+
if (opts?.storedOnly) return memoryCache?.latest ? buildUpdateAvailable(PKG_VERSION, memoryCache.latest) : null;
|
|
662
670
|
if (!isUpdateCheckEnabled()) return null;
|
|
663
671
|
const getNow = opts?.now ?? Date.now;
|
|
664
672
|
const ttl = opts?.ttlMs ?? 60 * 60 * 1e3;
|
|
@@ -1863,14 +1871,19 @@ async function fetchOnce(url, accessToken, options) {
|
|
|
1863
1871
|
const controller = new AbortController();
|
|
1864
1872
|
const timeout = setTimeout(() => controller.abort(), options.timeoutMs ?? GTM_REQUEST_TIMEOUT_MS);
|
|
1865
1873
|
try {
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
+
let response;
|
|
1875
|
+
try {
|
|
1876
|
+
response = await fetchImpl(url, {
|
|
1877
|
+
method: "GET",
|
|
1878
|
+
headers: {
|
|
1879
|
+
authorization: `Bearer ${accessToken}`,
|
|
1880
|
+
accept: "application/json"
|
|
1881
|
+
},
|
|
1882
|
+
signal: controller.signal
|
|
1883
|
+
});
|
|
1884
|
+
} catch (error) {
|
|
1885
|
+
throw new Error(describeFetchError(error, url), { cause: error });
|
|
1886
|
+
}
|
|
1874
1887
|
const text = await response.text();
|
|
1875
1888
|
let body = void 0;
|
|
1876
1889
|
let invalidJson = false;
|
|
@@ -8344,7 +8357,7 @@ function nonBlank(value) {
|
|
|
8344
8357
|
return trimmed ? trimmed : void 0;
|
|
8345
8358
|
}
|
|
8346
8359
|
function resolveBuildCommit(env = process.env) {
|
|
8347
|
-
const embedded = true ? "
|
|
8360
|
+
const embedded = true ? "01789509e9cc5d3516928fae0e96bb1dedbdacd3" : void 0;
|
|
8348
8361
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
8349
8362
|
}
|
|
8350
8363
|
function resolveInstanceIdentity(env = process.env) {
|
|
@@ -12110,15 +12123,20 @@ function buildUrl(path11, queryPairs) {
|
|
|
12110
12123
|
}
|
|
12111
12124
|
async function adsFetch(apiKey, path11, queryPairs = [], method = "GET", body) {
|
|
12112
12125
|
const url = buildUrl(path11, queryPairs);
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12126
|
+
let res;
|
|
12127
|
+
try {
|
|
12128
|
+
res = await fetch(url, {
|
|
12129
|
+
method,
|
|
12130
|
+
headers: {
|
|
12131
|
+
Authorization: `Bearer ${apiKey}`,
|
|
12132
|
+
"Content-Type": "application/json"
|
|
12133
|
+
},
|
|
12134
|
+
body: body === void 0 ? void 0 : JSON.stringify(body),
|
|
12135
|
+
signal: AbortSignal.timeout(OPENAI_ADS_REQUEST_TIMEOUT_MS)
|
|
12136
|
+
});
|
|
12137
|
+
} catch (error) {
|
|
12138
|
+
throw new Error(describeFetchError(error, url), { cause: error });
|
|
12139
|
+
}
|
|
12122
12140
|
if (res.status === 401 || res.status === 403) {
|
|
12123
12141
|
const { code } = parseErrorEnvelope(await res.text());
|
|
12124
12142
|
adsClientLog("error", "http.auth-failed", { path: path11, httpStatus: res.status, code });
|
|
@@ -16455,6 +16473,7 @@ function refuseManagedSweepCancel(tool, ctx) {
|
|
|
16455
16473
|
var COMPETITOR_AUTO_ALIAS_MODE_REFUSAL = "Aero cannot change a project's competitorAutoAliases mode. Omit competitorAutoAliases to keep the stored mode, or ask the operator to change it.";
|
|
16456
16474
|
var COMPETITOR_AUTO_ALIAS_MODE_WRITES = /* @__PURE__ */ new Set([
|
|
16457
16475
|
CanonryMcpToolNames.canonry_project_upsert,
|
|
16476
|
+
CanonryMcpToolNames.canonry_project_update,
|
|
16458
16477
|
CanonryMcpToolNames.canonry_apply_config
|
|
16459
16478
|
]);
|
|
16460
16479
|
function requestedCompetitorAutoAliasMode(toolName, params, ctx) {
|
|
@@ -16463,6 +16482,10 @@ function requestedCompetitorAutoAliasMode(toolName, params, ctx) {
|
|
|
16463
16482
|
const request = isRecord8(params.request) ? params.request : {};
|
|
16464
16483
|
return { project: ctx.projectName, mode: request.competitorAutoAliases };
|
|
16465
16484
|
}
|
|
16485
|
+
if (toolName === CanonryMcpToolNames.canonry_project_update) {
|
|
16486
|
+
const request = isRecord8(params.request) ? params.request : {};
|
|
16487
|
+
return { project: params.project, mode: request.competitorAutoAliases };
|
|
16488
|
+
}
|
|
16466
16489
|
const config = isRecord8(params.config) ? params.config : {};
|
|
16467
16490
|
const metadata2 = isRecord8(config.metadata) ? config.metadata : {};
|
|
16468
16491
|
const spec = isRecord8(config.spec) ? config.spec : {};
|
|
@@ -16490,10 +16513,24 @@ function refuseCompetitorAutoAliasModeChange(tool, ctx) {
|
|
|
16490
16513
|
}
|
|
16491
16514
|
};
|
|
16492
16515
|
}
|
|
16516
|
+
var COMPETITOR_BULK_ADD_REFUSAL = "Aero cannot acknowledge measured bulk competitor growth. Review the stored evidence and acknowledge this operator action explicitly.";
|
|
16517
|
+
function refuseCompetitorBulkAddAcknowledgement(tool) {
|
|
16518
|
+
const write = tool.execute;
|
|
16519
|
+
return {
|
|
16520
|
+
...tool,
|
|
16521
|
+
execute: async (toolCallId, params, ...rest) => {
|
|
16522
|
+
const input = typeof params === "object" && params !== null ? params : void 0;
|
|
16523
|
+
const request = typeof input?.request === "object" && input.request !== null ? input.request : void 0;
|
|
16524
|
+
if (request?.acknowledgeBulkAdd === true) throw new Error(COMPETITOR_BULK_ADD_REFUSAL);
|
|
16525
|
+
return write(toolCallId, params, ...rest);
|
|
16526
|
+
}
|
|
16527
|
+
};
|
|
16528
|
+
}
|
|
16493
16529
|
function buildMcpAgentTools(registry, ctx, opts = {}) {
|
|
16494
16530
|
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) => {
|
|
16495
16531
|
const agentTool = mcpToAgentTool(tool, ctx);
|
|
16496
16532
|
if (COMPETITOR_AUTO_ALIAS_MODE_WRITES.has(tool.name)) return refuseCompetitorAutoAliasModeChange(agentTool, ctx);
|
|
16533
|
+
if (tool.name === "canonry_competitors_add") return refuseCompetitorBulkAddAcknowledgement(agentTool);
|
|
16497
16534
|
return opts.managedSweeps && tool.name === CanonryMcpToolNames.canonry_run_cancel ? refuseManagedSweepCancel(agentTool, ctx) : agentTool;
|
|
16498
16535
|
});
|
|
16499
16536
|
}
|
|
@@ -18753,19 +18790,27 @@ function queuedRun(result2) {
|
|
|
18753
18790
|
runStatus: typeof runStatus === "string" ? runStatus : null
|
|
18754
18791
|
};
|
|
18755
18792
|
}
|
|
18756
|
-
async function refreshAllIntegrations(client, projectName, now = /* @__PURE__ */ new Date()) {
|
|
18793
|
+
async function refreshAllIntegrations(client, projectName, now = /* @__PURE__ */ new Date(), claims) {
|
|
18757
18794
|
const integrations = [
|
|
18758
|
-
{ name: "gsc", completion: "queued", run: () => client.gscSync(projectName, {}) },
|
|
18759
|
-
{ name: "bing", completion: "queued", run: () => client.bingInspectSitemap(projectName, {}) },
|
|
18760
|
-
{ name: "ga", completion: "synchronous", run: () => client.gaSync(projectName, { days: gaRefreshDays(now) }) },
|
|
18761
|
-
{ name: "gbp", completion: "queued", run: () => client.triggerGbpSync(projectName, {}) },
|
|
18795
|
+
{ name: "gsc", kind: RunKinds["gsc-sync"], completion: "queued", run: () => client.gscSync(projectName, {}) },
|
|
18796
|
+
{ name: "bing", kind: RunKinds["bing-inspect-sitemap"], completion: "queued", run: () => client.bingInspectSitemap(projectName, {}) },
|
|
18797
|
+
{ name: "ga", kind: RunKinds["ga-sync"], completion: "synchronous", run: () => client.gaSync(projectName, { days: gaRefreshDays(now) }) },
|
|
18798
|
+
{ name: "gbp", kind: RunKinds["gbp-sync"], completion: "queued", run: () => client.triggerGbpSync(projectName, {}) },
|
|
18762
18799
|
// `ads` remains the OpenAI / ChatGPT Ads integration. For scheduled
|
|
18763
18800
|
// refreshes, Google providers have explicit names and fan out only here.
|
|
18764
|
-
{ name: "ads", completion: "queued", run: () => client.triggerAdsSync(projectName) },
|
|
18765
|
-
{ name: "google-ads", completion: "queued", run: () => client.triggerGoogleAdsSync(projectName) },
|
|
18766
|
-
{ name: "gtm", completion: "queued", run: () => client.triggerGtmSync(projectName) }
|
|
18801
|
+
{ name: "ads", kind: RunKinds["ads-sync"], completion: "queued", run: () => client.triggerAdsSync(projectName) },
|
|
18802
|
+
{ name: "google-ads", kind: RunKinds["google-ads-sync"], completion: "queued", run: () => client.triggerGoogleAdsSync(projectName) },
|
|
18803
|
+
{ name: "gtm", kind: RunKinds["gtm-sync"], completion: "queued", run: () => client.triggerGtmSync(projectName) }
|
|
18767
18804
|
];
|
|
18768
|
-
const results = await Promise.allSettled(integrations.map((
|
|
18805
|
+
const results = await Promise.allSettled(integrations.map(async (integration) => {
|
|
18806
|
+
const key = syncRunClaimKey(projectName, integration.kind);
|
|
18807
|
+
claims?.add(key);
|
|
18808
|
+
try {
|
|
18809
|
+
return await integration.run();
|
|
18810
|
+
} finally {
|
|
18811
|
+
claims?.delete(key);
|
|
18812
|
+
}
|
|
18813
|
+
}));
|
|
18769
18814
|
results.forEach((result2, idx) => {
|
|
18770
18815
|
const { name: integration, completion } = integrations[idx];
|
|
18771
18816
|
if (result2.status === "rejected") {
|
|
@@ -23465,6 +23510,8 @@ async function createServer(opts) {
|
|
|
23465
23510
|
surface: OutcomeSurfaces.system
|
|
23466
23511
|
});
|
|
23467
23512
|
const scheduledBacklinkReleases = /* @__PURE__ */ new Set();
|
|
23513
|
+
const scheduledSyncClaims = /* @__PURE__ */ new Set();
|
|
23514
|
+
const claimScheduledSync = (projectName, kind, sourceId) => scheduledSyncClaims.delete(syncRunClaimKey(projectName, kind, sourceId));
|
|
23468
23515
|
const agentEnabled = resolveAgentEnabled(process.env, opts.config);
|
|
23469
23516
|
const agentProactive = resolveAgentProactiveEnabled(process.env, opts.config);
|
|
23470
23517
|
const sessionRegistry = agentEnabled ? new SessionRegistry({
|
|
@@ -23929,7 +23976,10 @@ async function createServer(opts) {
|
|
|
23929
23976
|
getEffectiveProviderModels: () => effectiveProviderModels(registry),
|
|
23930
23977
|
getBatchEligibleProviderNames: () => batchEligibleProviderNames(registry),
|
|
23931
23978
|
onTrafficSyncRequested: (projectName, sourceId) => {
|
|
23932
|
-
|
|
23979
|
+
scheduledSyncClaims.add(syncRunClaimKey(projectName, RunKinds["traffic-sync"], sourceId));
|
|
23980
|
+
schedulerClient.trafficSync(projectName, sourceId).finally(() => {
|
|
23981
|
+
scheduledSyncClaims.delete(syncRunClaimKey(projectName, RunKinds["traffic-sync"], sourceId));
|
|
23982
|
+
}).catch((err) => {
|
|
23933
23983
|
app.log.error(
|
|
23934
23984
|
{
|
|
23935
23985
|
projectName,
|
|
@@ -23965,7 +24015,7 @@ async function createServer(opts) {
|
|
|
23965
24015
|
})();
|
|
23966
24016
|
},
|
|
23967
24017
|
onDataRefreshRequested: (projectName) => {
|
|
23968
|
-
void refreshAllIntegrations(schedulerClient, projectName);
|
|
24018
|
+
void refreshAllIntegrations(schedulerClient, projectName, /* @__PURE__ */ new Date(), scheduledSyncClaims);
|
|
23969
24019
|
},
|
|
23970
24020
|
onBacklinksSyncRequested: (projectName) => {
|
|
23971
24021
|
void syncLatestReleaseOnSchedule(projectName, {
|
|
@@ -24325,7 +24375,22 @@ async function createServer(opts) {
|
|
|
24325
24375
|
const namedAccountsInUse = () => anyUsersExist(opts.db);
|
|
24326
24376
|
const NAMED_ACCOUNTS_MESSAGE = "This install uses named accounts. Sign in with your name and password.";
|
|
24327
24377
|
const serverApiKeyMissing = () => new AppError("AUTH_INVALID", "Server API key not found \u2014 run canonry bootstrap", 401);
|
|
24328
|
-
|
|
24378
|
+
const rejectLegacySessionStoredOnly = async (request, reply) => {
|
|
24379
|
+
const header = request.headers[STORED_ONLY_HEADER];
|
|
24380
|
+
if (header !== "1" && header !== "true") return;
|
|
24381
|
+
const route = request.routeOptions.url ?? request.url;
|
|
24382
|
+
const operation = route.endsWith("/session/setup") ? "POST /api/v1/session/setup" : `${request.method.toUpperCase()} /api/v1/session`;
|
|
24383
|
+
const error = storedOnlyRefused("Stored-only mode refuses this operation", { operation, access: OperationAccesses.write });
|
|
24384
|
+
return reply.status(error.statusCode).send(error.toJSON());
|
|
24385
|
+
};
|
|
24386
|
+
const legacySessionRouteOptions = {
|
|
24387
|
+
onSend: async (_request, reply, payload) => {
|
|
24388
|
+
reply.header(OPERATION_ACCESS_HEADER, OperationAccesses.write);
|
|
24389
|
+
return payload;
|
|
24390
|
+
},
|
|
24391
|
+
preHandler: rejectLegacySessionStoredOnly
|
|
24392
|
+
};
|
|
24393
|
+
app.get(apiPrefix + "/session", legacySessionRouteOptions, async (request, reply) => {
|
|
24329
24394
|
if (namedAccountsInUse()) {
|
|
24330
24395
|
return reply.send({ authenticated: false, setupRequired: false });
|
|
24331
24396
|
}
|
|
@@ -24338,7 +24403,7 @@ async function createServer(opts) {
|
|
|
24338
24403
|
setupRequired: !opts.config.dashboardPasswordHash
|
|
24339
24404
|
});
|
|
24340
24405
|
});
|
|
24341
|
-
app.post(apiPrefix + "/session/setup", async (request, reply) => {
|
|
24406
|
+
app.post(apiPrefix + "/session/setup", legacySessionRouteOptions, async (request, reply) => {
|
|
24342
24407
|
if (namedAccountsInUse()) {
|
|
24343
24408
|
const err = forbidden(NAMED_ACCOUNTS_MESSAGE);
|
|
24344
24409
|
return reply.status(err.statusCode).send(err.toJSON());
|
|
@@ -24393,7 +24458,7 @@ async function createServer(opts) {
|
|
|
24393
24458
|
setSessionCookie(reply, sessionId);
|
|
24394
24459
|
return reply.send({ authenticated: true });
|
|
24395
24460
|
});
|
|
24396
|
-
app.post(apiPrefix + "/session", async (request, reply) => {
|
|
24461
|
+
app.post(apiPrefix + "/session", legacySessionRouteOptions, async (request, reply) => {
|
|
24397
24462
|
if (namedAccountsInUse()) {
|
|
24398
24463
|
const err2 = forbidden(NAMED_ACCOUNTS_MESSAGE);
|
|
24399
24464
|
return reply.status(err2.statusCode).send(err2.toJSON());
|
|
@@ -24447,7 +24512,7 @@ async function createServer(opts) {
|
|
|
24447
24512
|
const err = validationError("Either password or apiKey is required");
|
|
24448
24513
|
return reply.status(err.statusCode).send(err.toJSON());
|
|
24449
24514
|
});
|
|
24450
|
-
app.delete(apiPrefix + "/session", async (request, reply) => {
|
|
24515
|
+
app.delete(apiPrefix + "/session", legacySessionRouteOptions, async (request, reply) => {
|
|
24451
24516
|
const sessionId = parseCookieHeader(request.headers.cookie)[SESSION_COOKIE_NAME];
|
|
24452
24517
|
clearSession(sessionId);
|
|
24453
24518
|
reply.header(
|
|
@@ -24661,6 +24726,7 @@ async function createServer(opts) {
|
|
|
24661
24726
|
// Outcome telemetry reported from route code (`app.emitOutcome`).
|
|
24662
24727
|
onOutcome: handleRouteOutcome,
|
|
24663
24728
|
db: opts.db,
|
|
24729
|
+
claimScheduledSync,
|
|
24664
24730
|
sentiment: {
|
|
24665
24731
|
install: () => {
|
|
24666
24732
|
const configuration = loadSentimentInstallConfig();
|
|
@@ -25397,8 +25463,9 @@ async function createServer(opts) {
|
|
|
25397
25463
|
}
|
|
25398
25464
|
const buildCommit = resolveBuildCommit();
|
|
25399
25465
|
const instance = resolveInstanceIdentity();
|
|
25400
|
-
const healthHandler = () => {
|
|
25401
|
-
const
|
|
25466
|
+
const healthHandler = (request) => {
|
|
25467
|
+
const storedOnly = request.headers[STORED_ONLY_HEADER] === "1" || request.headers[STORED_ONLY_HEADER] === "true";
|
|
25468
|
+
const update = checkLatestVersionForServer({ storedOnly });
|
|
25402
25469
|
return {
|
|
25403
25470
|
status: "ok",
|
|
25404
25471
|
service: "canonry",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CLI_ROOT_SUMMARIES,
|
|
3
|
+
buildCliCatalog,
|
|
4
|
+
printCliCatalog,
|
|
5
|
+
renderTopLevelHelp
|
|
6
|
+
} from "./chunk-WRUKKEGR.js";
|
|
7
|
+
import "./chunk-WU2BRWXY.js";
|
|
8
|
+
import "./chunk-HGMYEDAQ.js";
|
|
9
|
+
import "./chunk-E43JM3QV.js";
|
|
10
|
+
export {
|
|
11
|
+
CLI_ROOT_SUMMARIES,
|
|
12
|
+
buildCliCatalog,
|
|
13
|
+
printCliCatalog,
|
|
14
|
+
renderTopLevelHelp
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
REGISTERED_CLI_COMMANDS
|
|
3
|
+
} from "./chunk-C2I7M3B2.js";
|
|
4
|
+
import "./chunk-WXX3NL4C.js";
|
|
5
|
+
import "./chunk-KOIOZ7QW.js";
|
|
6
|
+
import "./chunk-WU2BRWXY.js";
|
|
7
|
+
import "./chunk-RB2F4D3Z.js";
|
|
8
|
+
import "./chunk-BWR5MNL5.js";
|
|
9
|
+
import "./chunk-LYKDNJXR.js";
|
|
10
|
+
import "./chunk-HGMYEDAQ.js";
|
|
11
|
+
import "./chunk-65BHDVYO.js";
|
|
12
|
+
import "./chunk-E43JM3QV.js";
|
|
13
|
+
export {
|
|
14
|
+
REGISTERED_CLI_COMMANDS
|
|
15
|
+
};
|