@canonry/canonry 7.118.0 → 7.118.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{backfill-CWC3W72X.js → backfill-UCUWFGCR.js} +3 -3
- package/dist/{chunk-RLDRNIB4.js → chunk-A5X7CSVB.js} +1 -1
- package/dist/{chunk-CDPZTIK2.js → chunk-DSDNQLJO.js} +1 -1
- package/dist/{chunk-O67HAPZL.js → chunk-EHOA2RFV.js} +1 -1
- package/dist/{chunk-NJWBSLRW.js → chunk-ISLMLTSB.js} +3 -3
- package/dist/{chunk-HIPSMSH3.js → chunk-OBRB7CN6.js} +14 -14
- package/dist/{chunk-SG7E3WTC.js → chunk-TO6J7C35.js} +1 -1
- package/dist/{chunk-3C6A63IG.js → chunk-WEZC57IK.js} +1 -1
- package/dist/{chunk-OKPD7X4P.js → chunk-YWRXCL3J.js} +6 -6
- package/dist/{chunk-UKFXP4R5.js → chunk-ZFHVEEXB.js} +30 -10
- package/dist/{cli-commands-HZNVXGGC.js → cli-commands-TJHBC2HQ.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{dashboard-DCYRYQ6M.js → dashboard-OY75SNYT.js} +1 -1
- package/dist/{demo-X44XG3CF.js → demo-643NLHIX.js} +1 -1
- package/dist/{demo-server-SPMBNVZA.js → demo-server-W7YKCOQJ.js} +2 -2
- package/dist/index.d.ts +96 -96
- package/dist/index.js +6 -6
- package/dist/{init-ZMIYUSPN.js → init-CYZUNXPV.js} +1 -1
- package/dist/{intelligence-service-TGXLLDIW.js → intelligence-service-NGD2KVLQ.js} +2 -2
- package/dist/{serve-5WZQBOXG.js → serve-RBBLESEQ.js} +7 -7
- package/dist/{session-3YQ2HXJW.js → session-4BIHTXY3.js} +3 -3
- package/dist/{tools-QYZRDVAH.js → tools-V2V7RUTA.js} +2 -2
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
backfillSnapshotAttributionCommand,
|
|
11
11
|
backfillTrafficClassificationCommand,
|
|
12
12
|
replayQueryAuditLog
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-ISLMLTSB.js";
|
|
14
|
+
import "./chunk-A5X7CSVB.js";
|
|
15
15
|
import "./chunk-LBNJVTGN.js";
|
|
16
16
|
import "./chunk-VU3TF5CD.js";
|
|
17
17
|
import "./chunk-Q7LU7GTH.js";
|
|
@@ -19,7 +19,7 @@ import "./chunk-35DM6ZZ2.js";
|
|
|
19
19
|
import {
|
|
20
20
|
backfillProjectAnswerMentions,
|
|
21
21
|
backfillProjectAnswerMentionsInChunks
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZFHVEEXB.js";
|
|
23
23
|
import "./chunk-NZZSWCNM.js";
|
|
24
24
|
import "./chunk-GSQQ6VVV.js";
|
|
25
25
|
import "./chunk-G3HBHMML.js";
|
|
@@ -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-RBBLESEQ.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
reparseStoredResult4,
|
|
9
9
|
reparseStoredResult5,
|
|
10
10
|
resolveStoredApiResponse
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-A5X7CSVB.js";
|
|
12
12
|
import {
|
|
13
13
|
loadConfig
|
|
14
14
|
} from "./chunk-LBNJVTGN.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
createRunCompetitorResolver,
|
|
26
26
|
readMarketCompetitorNames,
|
|
27
27
|
refreshSnapshotMentionIdentity
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ZFHVEEXB.js";
|
|
29
29
|
import {
|
|
30
30
|
RawEventSampleEventTypes,
|
|
31
31
|
auditLog,
|
|
@@ -430,7 +430,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
async function backfillInsightsCommand(project, opts) {
|
|
433
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
433
|
+
const { IntelligenceService } = await import("./intelligence-service-NGD2KVLQ.js");
|
|
434
434
|
const config = loadConfig();
|
|
435
435
|
const db = createClient(config.database);
|
|
436
436
|
migrate(db);
|
|
@@ -783,7 +783,7 @@ var DEMO_CLI_COMMANDS = [{
|
|
|
783
783
|
options: { host: stringOption(), port: stringOption(), "trust-proxy": multiStringOption() },
|
|
784
784
|
allowPositionals: false,
|
|
785
785
|
run: async (input) => {
|
|
786
|
-
const { demoCommand } = await import("./demo-
|
|
786
|
+
const { demoCommand } = await import("./demo-643NLHIX.js");
|
|
787
787
|
await demoCommand({
|
|
788
788
|
host: getString(input.values, "host"),
|
|
789
789
|
port: getString(input.values, "port"),
|
|
@@ -804,7 +804,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
804
804
|
allowPositionals: false,
|
|
805
805
|
supportsDryRun: true,
|
|
806
806
|
run: async (input) => {
|
|
807
|
-
const { backfillAnswerVisibilityCommand } = await import("./backfill-
|
|
807
|
+
const { backfillAnswerVisibilityCommand } = await import("./backfill-UCUWFGCR.js");
|
|
808
808
|
await backfillAnswerVisibilityCommand({
|
|
809
809
|
project: getString(input.values, "project"),
|
|
810
810
|
dryRun: input.dryRun,
|
|
@@ -821,7 +821,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
821
821
|
allowPositionals: false,
|
|
822
822
|
supportsDryRun: true,
|
|
823
823
|
run: async (input) => {
|
|
824
|
-
const { backfillAnswerMentionsCommand } = await import("./backfill-
|
|
824
|
+
const { backfillAnswerMentionsCommand } = await import("./backfill-UCUWFGCR.js");
|
|
825
825
|
await backfillAnswerMentionsCommand({
|
|
826
826
|
project: getString(input.values, "project"),
|
|
827
827
|
dryRun: input.dryRun,
|
|
@@ -839,7 +839,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
839
839
|
},
|
|
840
840
|
supportsDryRun: true,
|
|
841
841
|
run: async (input) => {
|
|
842
|
-
const { backfillInsightsCommand } = await import("./backfill-
|
|
842
|
+
const { backfillInsightsCommand } = await import("./backfill-UCUWFGCR.js");
|
|
843
843
|
const usage = "canonry backfill insights <project> [--from-run <id>] [--to-run <id>] [--since <date>] [--dry-run] [--format json]";
|
|
844
844
|
const project3 = requireProject(input, "backfill insights", usage);
|
|
845
845
|
await backfillInsightsCommand(project3, {
|
|
@@ -859,7 +859,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
859
859
|
},
|
|
860
860
|
allowPositionals: false,
|
|
861
861
|
run: async (input) => {
|
|
862
|
-
const { backfillNormalizedPathsCommand } = await import("./backfill-
|
|
862
|
+
const { backfillNormalizedPathsCommand } = await import("./backfill-UCUWFGCR.js");
|
|
863
863
|
await backfillNormalizedPathsCommand({
|
|
864
864
|
project: getString(input.values, "project"),
|
|
865
865
|
format: input.format
|
|
@@ -874,7 +874,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
874
874
|
},
|
|
875
875
|
allowPositionals: false,
|
|
876
876
|
run: async (input) => {
|
|
877
|
-
const { backfillAiReferralPathsCommand } = await import("./backfill-
|
|
877
|
+
const { backfillAiReferralPathsCommand } = await import("./backfill-UCUWFGCR.js");
|
|
878
878
|
await backfillAiReferralPathsCommand({
|
|
879
879
|
project: getString(input.values, "project"),
|
|
880
880
|
format: input.format
|
|
@@ -886,7 +886,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
886
886
|
usage: "canonry backfill snapshot-attribution <project> [--dry-run] [--format json]",
|
|
887
887
|
supportsDryRun: true,
|
|
888
888
|
run: async (input) => {
|
|
889
|
-
const { backfillSnapshotAttributionCommand } = await import("./backfill-
|
|
889
|
+
const { backfillSnapshotAttributionCommand } = await import("./backfill-UCUWFGCR.js");
|
|
890
890
|
const usage = "canonry backfill snapshot-attribution <project> [--dry-run] [--format json]";
|
|
891
891
|
const project3 = requireProject(input, "backfill snapshot-attribution", usage);
|
|
892
892
|
await backfillSnapshotAttributionCommand({
|
|
@@ -905,7 +905,7 @@ var BACKFILL_CLI_COMMANDS = [
|
|
|
905
905
|
allowPositionals: false,
|
|
906
906
|
supportsDryRun: true,
|
|
907
907
|
run: async (input) => {
|
|
908
|
-
const { backfillTrafficClassificationCommand } = await import("./backfill-
|
|
908
|
+
const { backfillTrafficClassificationCommand } = await import("./backfill-UCUWFGCR.js");
|
|
909
909
|
await backfillTrafficClassificationCommand({
|
|
910
910
|
project: getString(input.values, "project"),
|
|
911
911
|
dryRun: input.dryRun,
|
|
@@ -1551,7 +1551,7 @@ var DASHBOARD_CLI_COMMANDS = [
|
|
|
1551
1551
|
usage: "canonry dashboard reset-password [--format json]",
|
|
1552
1552
|
help: "Clears the dashboard password from config.yaml, so the dashboard asks for a new one after a restart.\nLocal only: it edits the config file under CANONRY_CONFIG_DIR and does not call the server.",
|
|
1553
1553
|
run: async (input) => {
|
|
1554
|
-
const { resetDashboardPassword } = await import("./dashboard-
|
|
1554
|
+
const { resetDashboardPassword } = await import("./dashboard-OY75SNYT.js");
|
|
1555
1555
|
await resetDashboardPassword({ format: input.format });
|
|
1556
1556
|
}
|
|
1557
1557
|
},
|
|
@@ -7390,7 +7390,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
7390
7390
|
options: { access: stringOption() },
|
|
7391
7391
|
run: async (input) => {
|
|
7392
7392
|
if (input.positionals.length > 1) throw usageError("Expected at most one command group");
|
|
7393
|
-
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-OFMWOBCF.js"), import("./cli-commands-
|
|
7393
|
+
const [{ printCliCatalog }, { REGISTERED_CLI_COMMANDS: REGISTERED_CLI_COMMANDS2 }] = await Promise.all([import("./cli-catalog-OFMWOBCF.js"), import("./cli-commands-TJHBC2HQ.js")]);
|
|
7394
7394
|
printCliCatalog(REGISTERED_CLI_COMMANDS2, input.format, input.positionals[0], getString(input.values, "access"));
|
|
7395
7395
|
}
|
|
7396
7396
|
},
|
|
@@ -7439,7 +7439,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
7439
7439
|
},
|
|
7440
7440
|
allowPositionals: false,
|
|
7441
7441
|
run: async (input) => {
|
|
7442
|
-
const { initCommand } = await import("./init-
|
|
7442
|
+
const { initCommand } = await import("./init-CYZUNXPV.js");
|
|
7443
7443
|
await initCommand({
|
|
7444
7444
|
force: getBoolean(input.values, "force"),
|
|
7445
7445
|
ref: getString(input.values, "ref"),
|
|
@@ -7495,7 +7495,7 @@ var SYSTEM_CLI_COMMANDS = [
|
|
|
7495
7495
|
allowPositionals: false,
|
|
7496
7496
|
run: async (input) => {
|
|
7497
7497
|
applyServerEnv(input.values);
|
|
7498
|
-
const { serveCommand } = await import("./serve-
|
|
7498
|
+
const { serveCommand } = await import("./serve-RBBLESEQ.js");
|
|
7499
7499
|
await serveCommand(input.format);
|
|
7500
7500
|
}
|
|
7501
7501
|
},
|
|
@@ -8871,8 +8871,8 @@ var AGENT_CLI_COMMANDS = [
|
|
|
8871
8871
|
"timeout-ms": stringOption()
|
|
8872
8872
|
},
|
|
8873
8873
|
run: async (input) => {
|
|
8874
|
-
const { coerceAgentProvider } = await import("./session-
|
|
8875
|
-
const { AERO_TOOL_PROFILES, isAeroToolProfile } = await import("./tools-
|
|
8874
|
+
const { coerceAgentProvider } = await import("./session-4BIHTXY3.js");
|
|
8875
|
+
const { AERO_TOOL_PROFILES, isAeroToolProfile } = await import("./tools-V2V7RUTA.js");
|
|
8876
8876
|
const { agentAsk } = await import("./agent-ask-MZRUCCJO.js");
|
|
8877
8877
|
const usage = `canonry agent ask <project> "<prompt>" [--provider ${AGENT_PROVIDER_IDS.join("|")}] [--model <id>] [--scope all|read-only] [--profile default|ads-operator] [--context <json>] [--conversation <id>] [--max-tool-calls <n>] [--timeout-ms <ms>] [--format json]`;
|
|
8878
8878
|
const project3 = requireProject(input, "agent.ask", usage);
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
resolveConfiguredAgentProvider,
|
|
25
25
|
resolveSessionProviderAndModel,
|
|
26
26
|
setAeroSystemPrompt
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EHOA2RFV.js";
|
|
28
28
|
import {
|
|
29
29
|
answerServiceAdapters,
|
|
30
30
|
answerServiceDescriptors
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
buildAeroStateTools,
|
|
39
39
|
isAeroToolProfile,
|
|
40
40
|
truncateToolResult
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-WEZC57IK.js";
|
|
42
42
|
import {
|
|
43
43
|
getGoogleAuthConfig,
|
|
44
44
|
getGoogleConnection,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
openrouterAdapter,
|
|
70
70
|
perplexityAdapter,
|
|
71
71
|
startTrafficReclassification
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-A5X7CSVB.js";
|
|
73
73
|
import {
|
|
74
74
|
classifyUsageSurface,
|
|
75
75
|
createApiUsageTelemetry,
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
} from "./chunk-VU3TF5CD.js";
|
|
170
170
|
import {
|
|
171
171
|
IntelligenceService
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-TO6J7C35.js";
|
|
173
173
|
import {
|
|
174
174
|
computeCitedCompetitorDomains,
|
|
175
175
|
determineCitationState
|
|
@@ -330,7 +330,7 @@ import {
|
|
|
330
330
|
webhookTargetRefusalReason,
|
|
331
331
|
webhookUserAgent,
|
|
332
332
|
writeAuditLog
|
|
333
|
-
} from "./chunk-
|
|
333
|
+
} from "./chunk-ZFHVEEXB.js";
|
|
334
334
|
import {
|
|
335
335
|
OperationalLogStore,
|
|
336
336
|
SentimentIdempotencyConflict,
|
|
@@ -6467,7 +6467,7 @@ function nonBlank(value) {
|
|
|
6467
6467
|
return trimmed ? trimmed : void 0;
|
|
6468
6468
|
}
|
|
6469
6469
|
function resolveBuildCommit(env = process.env) {
|
|
6470
|
-
const embedded = true ? "
|
|
6470
|
+
const embedded = true ? "99f3cf8fccc6c0c8fe565f04295292eb21eaf3d6" : void 0;
|
|
6471
6471
|
return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
|
|
6472
6472
|
}
|
|
6473
6473
|
function resolveInstanceIdentity(env = process.env) {
|
|
@@ -2816,8 +2816,7 @@ function detectRegressions(currentRun, previousRun) {
|
|
|
2816
2816
|
for (const snap of previousRun.snapshots) {
|
|
2817
2817
|
if (snap.cited === true) {
|
|
2818
2818
|
previousCited.set(snapshotKey(snap), {
|
|
2819
|
-
citationUrl: snap.citationUrl
|
|
2820
|
-
position: snap.position
|
|
2819
|
+
citationUrl: snap.citationUrl
|
|
2821
2820
|
});
|
|
2822
2821
|
}
|
|
2823
2822
|
}
|
|
@@ -2829,7 +2828,6 @@ function detectRegressions(currentRun, previousRun) {
|
|
|
2829
2828
|
query: snap.query,
|
|
2830
2829
|
provider: snap.provider,
|
|
2831
2830
|
previousCitationUrl: prev.citationUrl,
|
|
2832
|
-
previousPosition: prev.position,
|
|
2833
2831
|
currentRunId: currentRun.runId,
|
|
2834
2832
|
previousRunId: previousRun.runId
|
|
2835
2833
|
});
|
|
@@ -2867,7 +2865,6 @@ function detectGains(currentRun, previousRun) {
|
|
|
2867
2865
|
query: snap.query,
|
|
2868
2866
|
provider: snap.provider,
|
|
2869
2867
|
citationUrl: snap.citationUrl,
|
|
2870
|
-
position: snap.position,
|
|
2871
2868
|
snippet: snap.snippet,
|
|
2872
2869
|
runId: currentRun.runId
|
|
2873
2870
|
});
|
|
@@ -2896,7 +2893,6 @@ function detectFirstCitations(currentRun, previousRun) {
|
|
|
2896
2893
|
query: snap.query,
|
|
2897
2894
|
provider: snap.provider,
|
|
2898
2895
|
citationUrl: snap.citationUrl,
|
|
2899
|
-
position: snap.position,
|
|
2900
2896
|
runId: currentRun.runId
|
|
2901
2897
|
});
|
|
2902
2898
|
}
|
|
@@ -2927,7 +2923,6 @@ function detectProviderPickups(currentRun, previousRun) {
|
|
|
2927
2923
|
query: snap.query,
|
|
2928
2924
|
provider: snap.provider,
|
|
2929
2925
|
citationUrl: snap.citationUrl,
|
|
2930
|
-
position: snap.position,
|
|
2931
2926
|
runId: currentRun.runId
|
|
2932
2927
|
});
|
|
2933
2928
|
}
|
|
@@ -3093,7 +3088,7 @@ function generateInsights(input) {
|
|
|
3093
3088
|
recommendation: {
|
|
3094
3089
|
action: "audit",
|
|
3095
3090
|
target: reg.previousCitationUrl,
|
|
3096
|
-
reason:
|
|
3091
|
+
reason: `${reg.provider} cited ${reg.previousCitationUrl ?? "your domain"} for "${reg.query}" in the previous run but not in this one. Run agent-readiness to check for content or schema issues.`
|
|
3097
3092
|
},
|
|
3098
3093
|
cause,
|
|
3099
3094
|
createdAt: now
|
|
@@ -3110,7 +3105,7 @@ function generateInsights(input) {
|
|
|
3110
3105
|
recommendation: {
|
|
3111
3106
|
action: "monitor",
|
|
3112
3107
|
target: gain.citationUrl,
|
|
3113
|
-
reason:
|
|
3108
|
+
reason: `${gain.provider} now cites ${gain.citationUrl ?? "your domain"} for "${gain.query}"; the previous run did not. Monitor to confirm the citation persists.`
|
|
3114
3109
|
},
|
|
3115
3110
|
createdAt: now
|
|
3116
3111
|
});
|
|
@@ -79591,6 +79586,13 @@ function unrecoveredAlert(projectName, unrecovered) {
|
|
|
79591
79586
|
next
|
|
79592
79587
|
};
|
|
79593
79588
|
}
|
|
79589
|
+
var CREDENTIALS_REJECTED = /\bHTTP 40[13]\b/;
|
|
79590
|
+
function failingSourceNext(project, failing) {
|
|
79591
|
+
if (failing.some((s) => s.lastError && CREDENTIALS_REJECTED.test(s.lastError))) {
|
|
79592
|
+
return `The provider rejected the saved token or key, so every sync will fail until it is replaced. Reconnect the source with a new one (\`cnry traffic sources ${project}\` shows its settings), then run a backfill for the missing days before the provider stops keeping those logs.`;
|
|
79593
|
+
}
|
|
79594
|
+
return `Check the source with \`cnry traffic sources ${project}\`, then reconnect it if needed.`;
|
|
79595
|
+
}
|
|
79594
79596
|
var sourceConnectedCheck = {
|
|
79595
79597
|
id: "traffic.source.connected",
|
|
79596
79598
|
category: CheckCategories.integrations,
|
|
@@ -79628,6 +79630,9 @@ var sourceConnectedCheck = {
|
|
|
79628
79630
|
return {
|
|
79629
79631
|
status: recovering ? CheckStatuses.warn : CheckStatuses.fail,
|
|
79630
79632
|
code: recovering ? "traffic.source.all-errored-recently" : "traffic.source.all-errored",
|
|
79633
|
+
// No server-side data arrives at all, and the gap is lost for good once
|
|
79634
|
+
// the provider's log retention passes it: someone has to act.
|
|
79635
|
+
...recovering ? {} : { urgent: true },
|
|
79631
79636
|
summary: recovering ? `The latest sync failed for all ${activeSources.length} active traffic source(s) (${failuresInARow} in a row; this fails at ${SYNC_FAILURE_WINDOW}). ${sinceText}` : `All ${activeSources.length} active traffic source(s) are in error state. ${sinceText}`,
|
|
79632
79637
|
remediation: errored[0].lastError ? `Latest error: "${errored[0].lastError}". Re-connect the source or run \`canonry traffic sync <project> --source <id>\` to retry.` : "Run `canonry traffic sources <project>` to inspect the failing source(s) and re-connect.",
|
|
79633
79638
|
details: {
|
|
@@ -79644,17 +79649,32 @@ var sourceConnectedCheck = {
|
|
|
79644
79649
|
} : {
|
|
79645
79650
|
label: "Traffic sync failing",
|
|
79646
79651
|
line: `Traffic syncs for ${errored.map((s) => s.displayName).join(", ")} failed ${failuresInARow} times in a row${lastDataAt ? `, with no new data since ${formatCalendarDay(lastDataAt.slice(0, 10))}` : ""}.`,
|
|
79647
|
-
next:
|
|
79652
|
+
next: failingSourceNext(ctx.project.name, errored)
|
|
79648
79653
|
}
|
|
79649
79654
|
};
|
|
79650
79655
|
}
|
|
79651
79656
|
if (errored.length > 0) {
|
|
79657
|
+
const failing = errored.filter((s) => readSyncRunState(ctx.db, ctx.project.id, RunKinds["traffic-sync"], { sourceId: s.id }).repeatedFailure);
|
|
79658
|
+
const lastDataAt = failing.map((s) => s.lastSyncedAt).filter((at) => !!at).sort()[0] ?? null;
|
|
79652
79659
|
return {
|
|
79653
79660
|
status: CheckStatuses.warn,
|
|
79654
79661
|
code: "traffic.source.partially-errored",
|
|
79662
|
+
...failing.length > 0 ? { urgent: true } : {},
|
|
79655
79663
|
summary: `${errored.length} of ${activeSources.length} active traffic source(s) are in error state.`,
|
|
79656
79664
|
remediation: "Run `canonry traffic sources <project>` to inspect the failing sources individually.",
|
|
79657
|
-
details: {
|
|
79665
|
+
details: {
|
|
79666
|
+
sourceCount: activeSources.length,
|
|
79667
|
+
pausedCount: sources.length - activeSources.length,
|
|
79668
|
+
erroredIds: errored.map((s) => s.id),
|
|
79669
|
+
failingIds: failing.map((s) => s.id)
|
|
79670
|
+
},
|
|
79671
|
+
...failing.length > 0 ? {
|
|
79672
|
+
alert: {
|
|
79673
|
+
label: "Traffic sync failing",
|
|
79674
|
+
line: `Traffic syncs for ${failing.map((s) => s.displayName).join(", ")} failed ${SYNC_FAILURE_WINDOW} or more times in a row${lastDataAt ? `, with no new data since ${formatCalendarDay(lastDataAt.slice(0, 10))}` : ""}. Other sources are still reporting.`,
|
|
79675
|
+
next: failingSourceNext(ctx.project.name, failing)
|
|
79676
|
+
}
|
|
79677
|
+
} : {}
|
|
79658
79678
|
};
|
|
79659
79679
|
}
|
|
79660
79680
|
return {
|
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node --import tsx
|
|
2
2
|
import {
|
|
3
3
|
REGISTERED_CLI_COMMANDS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OBRB7CN6.js";
|
|
5
5
|
import "./chunk-6GO5VVAC.js";
|
|
6
6
|
import {
|
|
7
7
|
buildSetupState,
|
|
8
8
|
runPendingServeHandoff
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DSDNQLJO.js";
|
|
10
10
|
import "./chunk-VJWDBFSL.js";
|
|
11
11
|
import "./chunk-QOFWKOKD.js";
|
|
12
12
|
import "./chunk-TSENU4GG.js";
|
|
@@ -40,7 +40,7 @@ function parseDemoTrustedProxies(values) {
|
|
|
40
40
|
async function demoCommand(options) {
|
|
41
41
|
const { host, port } = parseDemoListenOptions(options);
|
|
42
42
|
const trustProxy = parseDemoTrustedProxies(options.trustProxy);
|
|
43
|
-
const { createDemoServer } = await import("./demo-server-
|
|
43
|
+
const { createDemoServer } = await import("./demo-server-W7YKCOQJ.js");
|
|
44
44
|
const app = await createDemoServer({ trustProxy });
|
|
45
45
|
let stopping = false;
|
|
46
46
|
const stop = () => {
|
|
@@ -19,7 +19,7 @@ import "./chunk-VU3TF5CD.js";
|
|
|
19
19
|
import {
|
|
20
20
|
HISTORY_WINDOW_RUNS,
|
|
21
21
|
IntelligenceService
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TO6J7C35.js";
|
|
23
23
|
import {
|
|
24
24
|
determineCitationState
|
|
25
25
|
} from "./chunk-Q7LU7GTH.js";
|
|
@@ -27,7 +27,7 @@ import "./chunk-35DM6ZZ2.js";
|
|
|
27
27
|
import {
|
|
28
28
|
apiRoutes,
|
|
29
29
|
assessConversionTrackingIntegrity
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZFHVEEXB.js";
|
|
31
31
|
import "./chunk-NZZSWCNM.js";
|
|
32
32
|
import "./chunk-GSQQ6VVV.js";
|
|
33
33
|
import {
|