@sentientui/mcp 0.14.2 → 0.15.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/dist/{chunk-AWRVJ4HY.js → chunk-3RJUYHO7.js} +65 -34
- package/dist/index.cjs +65 -34
- package/dist/index.js +1 -1
- package/dist/lib.cjs +65 -34
- package/dist/lib.js +1 -1
- package/package.json +1 -1
|
@@ -618,19 +618,38 @@ function registerComponentTools(server, client) {
|
|
|
618
618
|
|
|
619
619
|
// src/tools/insights.ts
|
|
620
620
|
import { z as z4 } from "zod";
|
|
621
|
+
var EMPTY_REASON_TEXT = {
|
|
622
|
+
no_events: "The snippet has not fired yet \u2014 nothing has reached us.",
|
|
623
|
+
no_traffic_yet: "Test traffic only so far; no genuine visitors yet.",
|
|
624
|
+
awaiting_profiles: "Still building visitor profiles before visitors can be grouped.",
|
|
625
|
+
no_variants: "Nothing to compare yet \u2014 no adaptive component is running.",
|
|
626
|
+
nothing_moved: "Enough data, and nothing moved this period. That is a result.",
|
|
627
|
+
job_never_ran: "The analysis job has not run yet.",
|
|
628
|
+
job_stale: "These numbers are out of date \u2014 the analysis job has not run recently."
|
|
629
|
+
};
|
|
621
630
|
function registerInsightTools(server, client) {
|
|
622
631
|
server.registerTool(
|
|
623
632
|
"get_insights",
|
|
624
633
|
{
|
|
625
634
|
title: "Get insights",
|
|
626
|
-
description: "
|
|
635
|
+
description: "What is known about this project right now: ranked findings with the evidence behind each one, plus (Growth tier) advisor recommendations. Says why it is empty when it is.",
|
|
627
636
|
inputSchema: { projectId: projectIdSchema },
|
|
628
637
|
outputSchema: {
|
|
629
|
-
status: z4.enum(["ok", "empty"]).describe("Whether
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
638
|
+
status: z4.enum(["ok", "empty"]).describe("Whether any findings exist yet"),
|
|
639
|
+
reached: z4.string().describe("Highest confidence tier earned: observed | patterned | tested"),
|
|
640
|
+
findings: z4.array(z4.object({
|
|
641
|
+
tier: z4.string().describe("observed | patterned | tested"),
|
|
642
|
+
kind: z4.string(),
|
|
643
|
+
headline: z4.string(),
|
|
644
|
+
audience: z4.string().nullable(),
|
|
645
|
+
sample: z4.number().describe("How many the finding is based on"),
|
|
646
|
+
coverage: z4.number().nullable().describe("Fraction of traffic this finding describes, when applicable")
|
|
647
|
+
})).describe("Ranked findings, each with the evidence behind it"),
|
|
648
|
+
emptyReason: z4.string().nullable().describe("Why there is nothing to report, when there is nothing"),
|
|
649
|
+
observations: z4.array(z4.string()).describe("Headlines of measured findings"),
|
|
650
|
+
recommendations: z4.array(z4.string()).describe("Headlines of interpreted findings (Growth tier)"),
|
|
651
|
+
isStale: z4.boolean().describe("True when the analysis has not run recently"),
|
|
652
|
+
generatedAt: z4.string().nullable().describe("ISO timestamp, or null")
|
|
634
653
|
},
|
|
635
654
|
annotations: {
|
|
636
655
|
readOnlyHint: true,
|
|
@@ -639,42 +658,54 @@ function registerInsightTools(server, client) {
|
|
|
639
658
|
}
|
|
640
659
|
},
|
|
641
660
|
withApiErrorGuidance(async ({ projectId }) => {
|
|
642
|
-
var _a, _b, _c, _d;
|
|
661
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
643
662
|
const id = encodeURIComponent(projectId);
|
|
644
|
-
const data = await client.get(`/projects/${id}/
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
isStale: false,
|
|
653
|
-
generatedAt: null
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
const observations = (_a = data.narratorBullets) != null ? _a : [];
|
|
658
|
-
const recommendations = (_b = data.advisorBullets) != null ? _b : [];
|
|
663
|
+
const data = await client.get(`/projects/${id}/evidence-report`);
|
|
664
|
+
const findings = (_a = data.findings) != null ? _a : [];
|
|
665
|
+
const measured = findings.filter((f) => !f.interpreted);
|
|
666
|
+
const interpreted = findings.filter((f) => f.interpreted);
|
|
667
|
+
const observations = measured.map((f) => f.headline);
|
|
668
|
+
const recommendations = interpreted.map((f) => f.headline);
|
|
669
|
+
const isStale = (_c = (_b = data.freshness) == null ? void 0 : _b.isStale) != null ? _c : false;
|
|
670
|
+
const emptyReason = (_d = data.emptyReason) != null ? _d : null;
|
|
659
671
|
const lines = [];
|
|
660
|
-
if (
|
|
672
|
+
if (emptyReason) lines.push((_e = EMPTY_REASON_TEXT[emptyReason]) != null ? _e : emptyReason);
|
|
673
|
+
if (isStale) lines.push("\u26A0 The analysis job has not run recently, so these numbers may have moved.");
|
|
674
|
+
if ((_f = data.interpretation) == null ? void 0 : _f.locked) {
|
|
675
|
+
lines.push(`${data.interpretation.count || "Some"} recommendations are available on the Growth plan.`);
|
|
676
|
+
} else if (((_g = data.interpretation) == null ? void 0 : _g.emptyReason) && !emptyReason) {
|
|
677
|
+
lines.push(`Recommendations: ${(_h = EMPTY_REASON_TEXT[data.interpretation.emptyReason]) != null ? _h : data.interpretation.emptyReason}`);
|
|
678
|
+
}
|
|
661
679
|
if (data.generatedAt) lines.push(`Generated: ${new Date(data.generatedAt).toUTCString()}`);
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
680
|
+
if (measured.length) {
|
|
681
|
+
lines.push("", "Findings:");
|
|
682
|
+
for (const f of measured) {
|
|
683
|
+
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${Math.round(f.provenance.coverage * 100)}% of visitors` : "";
|
|
684
|
+
lines.push(`- [${f.tier}] ${f.headline} (${f.provenance.sample} ${f.provenance.denominatorLabel}${cov})`);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
665
687
|
if (recommendations.length) {
|
|
666
|
-
lines.push("");
|
|
667
|
-
lines.push(
|
|
668
|
-
recommendations.forEach((b) => lines.push(`- ${b}`));
|
|
688
|
+
lines.push("", "Recommendations:");
|
|
689
|
+
for (const r of recommendations) lines.push(`- ${r}`);
|
|
669
690
|
}
|
|
670
691
|
return {
|
|
671
|
-
content: [{ type: "text", text: lines.join("\n") }],
|
|
692
|
+
content: [{ type: "text", text: lines.join("\n").trim() || "No findings yet." }],
|
|
672
693
|
structuredContent: {
|
|
673
|
-
status: "ok",
|
|
694
|
+
status: findings.length ? "ok" : "empty",
|
|
695
|
+
reached: (_i = data.reached) != null ? _i : "observed",
|
|
696
|
+
findings: findings.map((f) => ({
|
|
697
|
+
tier: f.tier,
|
|
698
|
+
kind: f.kind,
|
|
699
|
+
headline: f.headline,
|
|
700
|
+
audience: f.audience,
|
|
701
|
+
sample: f.provenance.sample,
|
|
702
|
+
coverage: f.provenance.coverage
|
|
703
|
+
})),
|
|
704
|
+
emptyReason,
|
|
674
705
|
observations,
|
|
675
706
|
recommendations,
|
|
676
|
-
isStale
|
|
677
|
-
generatedAt: (
|
|
707
|
+
isStale,
|
|
708
|
+
generatedAt: (_j = data.generatedAt) != null ? _j : null
|
|
678
709
|
}
|
|
679
710
|
};
|
|
680
711
|
})
|
|
@@ -1771,7 +1802,7 @@ function registerAgentTrafficTools(server, client) {
|
|
|
1771
1802
|
}
|
|
1772
1803
|
|
|
1773
1804
|
// src/server.ts
|
|
1774
|
-
var PKG_VERSION = true ? "0.
|
|
1805
|
+
var PKG_VERSION = true ? "0.15.0" : "0.0.0-dev";
|
|
1775
1806
|
function createMcpServer(client) {
|
|
1776
1807
|
const server = new McpServer(
|
|
1777
1808
|
{
|
package/dist/index.cjs
CHANGED
|
@@ -624,19 +624,38 @@ function registerComponentTools(server, client) {
|
|
|
624
624
|
|
|
625
625
|
// src/tools/insights.ts
|
|
626
626
|
var import_zod4 = require("zod");
|
|
627
|
+
var EMPTY_REASON_TEXT = {
|
|
628
|
+
no_events: "The snippet has not fired yet \u2014 nothing has reached us.",
|
|
629
|
+
no_traffic_yet: "Test traffic only so far; no genuine visitors yet.",
|
|
630
|
+
awaiting_profiles: "Still building visitor profiles before visitors can be grouped.",
|
|
631
|
+
no_variants: "Nothing to compare yet \u2014 no adaptive component is running.",
|
|
632
|
+
nothing_moved: "Enough data, and nothing moved this period. That is a result.",
|
|
633
|
+
job_never_ran: "The analysis job has not run yet.",
|
|
634
|
+
job_stale: "These numbers are out of date \u2014 the analysis job has not run recently."
|
|
635
|
+
};
|
|
627
636
|
function registerInsightTools(server, client) {
|
|
628
637
|
server.registerTool(
|
|
629
638
|
"get_insights",
|
|
630
639
|
{
|
|
631
640
|
title: "Get insights",
|
|
632
|
-
description: "
|
|
641
|
+
description: "What is known about this project right now: ranked findings with the evidence behind each one, plus (Growth tier) advisor recommendations. Says why it is empty when it is.",
|
|
633
642
|
inputSchema: { projectId: projectIdSchema },
|
|
634
643
|
outputSchema: {
|
|
635
|
-
status: import_zod4.z.enum(["ok", "empty"]).describe("Whether
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
644
|
+
status: import_zod4.z.enum(["ok", "empty"]).describe("Whether any findings exist yet"),
|
|
645
|
+
reached: import_zod4.z.string().describe("Highest confidence tier earned: observed | patterned | tested"),
|
|
646
|
+
findings: import_zod4.z.array(import_zod4.z.object({
|
|
647
|
+
tier: import_zod4.z.string().describe("observed | patterned | tested"),
|
|
648
|
+
kind: import_zod4.z.string(),
|
|
649
|
+
headline: import_zod4.z.string(),
|
|
650
|
+
audience: import_zod4.z.string().nullable(),
|
|
651
|
+
sample: import_zod4.z.number().describe("How many the finding is based on"),
|
|
652
|
+
coverage: import_zod4.z.number().nullable().describe("Fraction of traffic this finding describes, when applicable")
|
|
653
|
+
})).describe("Ranked findings, each with the evidence behind it"),
|
|
654
|
+
emptyReason: import_zod4.z.string().nullable().describe("Why there is nothing to report, when there is nothing"),
|
|
655
|
+
observations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of measured findings"),
|
|
656
|
+
recommendations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of interpreted findings (Growth tier)"),
|
|
657
|
+
isStale: import_zod4.z.boolean().describe("True when the analysis has not run recently"),
|
|
658
|
+
generatedAt: import_zod4.z.string().nullable().describe("ISO timestamp, or null")
|
|
640
659
|
},
|
|
641
660
|
annotations: {
|
|
642
661
|
readOnlyHint: true,
|
|
@@ -645,42 +664,54 @@ function registerInsightTools(server, client) {
|
|
|
645
664
|
}
|
|
646
665
|
},
|
|
647
666
|
withApiErrorGuidance(async ({ projectId }) => {
|
|
648
|
-
var _a2, _b, _c, _d;
|
|
667
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
649
668
|
const id = encodeURIComponent(projectId);
|
|
650
|
-
const data = await client.get(`/projects/${id}/
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
isStale: false,
|
|
659
|
-
generatedAt: null
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
const observations = (_a2 = data.narratorBullets) != null ? _a2 : [];
|
|
664
|
-
const recommendations = (_b = data.advisorBullets) != null ? _b : [];
|
|
669
|
+
const data = await client.get(`/projects/${id}/evidence-report`);
|
|
670
|
+
const findings = (_a2 = data.findings) != null ? _a2 : [];
|
|
671
|
+
const measured = findings.filter((f) => !f.interpreted);
|
|
672
|
+
const interpreted = findings.filter((f) => f.interpreted);
|
|
673
|
+
const observations = measured.map((f) => f.headline);
|
|
674
|
+
const recommendations = interpreted.map((f) => f.headline);
|
|
675
|
+
const isStale = (_c = (_b = data.freshness) == null ? void 0 : _b.isStale) != null ? _c : false;
|
|
676
|
+
const emptyReason = (_d = data.emptyReason) != null ? _d : null;
|
|
665
677
|
const lines = [];
|
|
666
|
-
if (
|
|
678
|
+
if (emptyReason) lines.push((_e = EMPTY_REASON_TEXT[emptyReason]) != null ? _e : emptyReason);
|
|
679
|
+
if (isStale) lines.push("\u26A0 The analysis job has not run recently, so these numbers may have moved.");
|
|
680
|
+
if ((_f = data.interpretation) == null ? void 0 : _f.locked) {
|
|
681
|
+
lines.push(`${data.interpretation.count || "Some"} recommendations are available on the Growth plan.`);
|
|
682
|
+
} else if (((_g = data.interpretation) == null ? void 0 : _g.emptyReason) && !emptyReason) {
|
|
683
|
+
lines.push(`Recommendations: ${(_h = EMPTY_REASON_TEXT[data.interpretation.emptyReason]) != null ? _h : data.interpretation.emptyReason}`);
|
|
684
|
+
}
|
|
667
685
|
if (data.generatedAt) lines.push(`Generated: ${new Date(data.generatedAt).toUTCString()}`);
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
686
|
+
if (measured.length) {
|
|
687
|
+
lines.push("", "Findings:");
|
|
688
|
+
for (const f of measured) {
|
|
689
|
+
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${Math.round(f.provenance.coverage * 100)}% of visitors` : "";
|
|
690
|
+
lines.push(`- [${f.tier}] ${f.headline} (${f.provenance.sample} ${f.provenance.denominatorLabel}${cov})`);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
671
693
|
if (recommendations.length) {
|
|
672
|
-
lines.push("");
|
|
673
|
-
lines.push(
|
|
674
|
-
recommendations.forEach((b) => lines.push(`- ${b}`));
|
|
694
|
+
lines.push("", "Recommendations:");
|
|
695
|
+
for (const r of recommendations) lines.push(`- ${r}`);
|
|
675
696
|
}
|
|
676
697
|
return {
|
|
677
|
-
content: [{ type: "text", text: lines.join("\n") }],
|
|
698
|
+
content: [{ type: "text", text: lines.join("\n").trim() || "No findings yet." }],
|
|
678
699
|
structuredContent: {
|
|
679
|
-
status: "ok",
|
|
700
|
+
status: findings.length ? "ok" : "empty",
|
|
701
|
+
reached: (_i = data.reached) != null ? _i : "observed",
|
|
702
|
+
findings: findings.map((f) => ({
|
|
703
|
+
tier: f.tier,
|
|
704
|
+
kind: f.kind,
|
|
705
|
+
headline: f.headline,
|
|
706
|
+
audience: f.audience,
|
|
707
|
+
sample: f.provenance.sample,
|
|
708
|
+
coverage: f.provenance.coverage
|
|
709
|
+
})),
|
|
710
|
+
emptyReason,
|
|
680
711
|
observations,
|
|
681
712
|
recommendations,
|
|
682
|
-
isStale
|
|
683
|
-
generatedAt: (
|
|
713
|
+
isStale,
|
|
714
|
+
generatedAt: (_j = data.generatedAt) != null ? _j : null
|
|
684
715
|
}
|
|
685
716
|
};
|
|
686
717
|
})
|
|
@@ -1777,7 +1808,7 @@ function registerAgentTrafficTools(server, client) {
|
|
|
1777
1808
|
}
|
|
1778
1809
|
|
|
1779
1810
|
// src/server.ts
|
|
1780
|
-
var PKG_VERSION = true ? "0.
|
|
1811
|
+
var PKG_VERSION = true ? "0.15.0" : "0.0.0-dev";
|
|
1781
1812
|
function createMcpServer(client) {
|
|
1782
1813
|
const server = new import_mcp.McpServer(
|
|
1783
1814
|
{
|
package/dist/index.js
CHANGED
package/dist/lib.cjs
CHANGED
|
@@ -648,19 +648,38 @@ function registerComponentTools(server, client) {
|
|
|
648
648
|
|
|
649
649
|
// src/tools/insights.ts
|
|
650
650
|
var import_zod4 = require("zod");
|
|
651
|
+
var EMPTY_REASON_TEXT = {
|
|
652
|
+
no_events: "The snippet has not fired yet \u2014 nothing has reached us.",
|
|
653
|
+
no_traffic_yet: "Test traffic only so far; no genuine visitors yet.",
|
|
654
|
+
awaiting_profiles: "Still building visitor profiles before visitors can be grouped.",
|
|
655
|
+
no_variants: "Nothing to compare yet \u2014 no adaptive component is running.",
|
|
656
|
+
nothing_moved: "Enough data, and nothing moved this period. That is a result.",
|
|
657
|
+
job_never_ran: "The analysis job has not run yet.",
|
|
658
|
+
job_stale: "These numbers are out of date \u2014 the analysis job has not run recently."
|
|
659
|
+
};
|
|
651
660
|
function registerInsightTools(server, client) {
|
|
652
661
|
server.registerTool(
|
|
653
662
|
"get_insights",
|
|
654
663
|
{
|
|
655
664
|
title: "Get insights",
|
|
656
|
-
description: "
|
|
665
|
+
description: "What is known about this project right now: ranked findings with the evidence behind each one, plus (Growth tier) advisor recommendations. Says why it is empty when it is.",
|
|
657
666
|
inputSchema: { projectId: projectIdSchema },
|
|
658
667
|
outputSchema: {
|
|
659
|
-
status: import_zod4.z.enum(["ok", "empty"]).describe("Whether
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
668
|
+
status: import_zod4.z.enum(["ok", "empty"]).describe("Whether any findings exist yet"),
|
|
669
|
+
reached: import_zod4.z.string().describe("Highest confidence tier earned: observed | patterned | tested"),
|
|
670
|
+
findings: import_zod4.z.array(import_zod4.z.object({
|
|
671
|
+
tier: import_zod4.z.string().describe("observed | patterned | tested"),
|
|
672
|
+
kind: import_zod4.z.string(),
|
|
673
|
+
headline: import_zod4.z.string(),
|
|
674
|
+
audience: import_zod4.z.string().nullable(),
|
|
675
|
+
sample: import_zod4.z.number().describe("How many the finding is based on"),
|
|
676
|
+
coverage: import_zod4.z.number().nullable().describe("Fraction of traffic this finding describes, when applicable")
|
|
677
|
+
})).describe("Ranked findings, each with the evidence behind it"),
|
|
678
|
+
emptyReason: import_zod4.z.string().nullable().describe("Why there is nothing to report, when there is nothing"),
|
|
679
|
+
observations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of measured findings"),
|
|
680
|
+
recommendations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of interpreted findings (Growth tier)"),
|
|
681
|
+
isStale: import_zod4.z.boolean().describe("True when the analysis has not run recently"),
|
|
682
|
+
generatedAt: import_zod4.z.string().nullable().describe("ISO timestamp, or null")
|
|
664
683
|
},
|
|
665
684
|
annotations: {
|
|
666
685
|
readOnlyHint: true,
|
|
@@ -669,42 +688,54 @@ function registerInsightTools(server, client) {
|
|
|
669
688
|
}
|
|
670
689
|
},
|
|
671
690
|
withApiErrorGuidance(async ({ projectId }) => {
|
|
672
|
-
var _a, _b, _c, _d;
|
|
691
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
673
692
|
const id = encodeURIComponent(projectId);
|
|
674
|
-
const data = await client.get(`/projects/${id}/
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
isStale: false,
|
|
683
|
-
generatedAt: null
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
const observations = (_a = data.narratorBullets) != null ? _a : [];
|
|
688
|
-
const recommendations = (_b = data.advisorBullets) != null ? _b : [];
|
|
693
|
+
const data = await client.get(`/projects/${id}/evidence-report`);
|
|
694
|
+
const findings = (_a = data.findings) != null ? _a : [];
|
|
695
|
+
const measured = findings.filter((f) => !f.interpreted);
|
|
696
|
+
const interpreted = findings.filter((f) => f.interpreted);
|
|
697
|
+
const observations = measured.map((f) => f.headline);
|
|
698
|
+
const recommendations = interpreted.map((f) => f.headline);
|
|
699
|
+
const isStale = (_c = (_b = data.freshness) == null ? void 0 : _b.isStale) != null ? _c : false;
|
|
700
|
+
const emptyReason = (_d = data.emptyReason) != null ? _d : null;
|
|
689
701
|
const lines = [];
|
|
690
|
-
if (
|
|
702
|
+
if (emptyReason) lines.push((_e = EMPTY_REASON_TEXT[emptyReason]) != null ? _e : emptyReason);
|
|
703
|
+
if (isStale) lines.push("\u26A0 The analysis job has not run recently, so these numbers may have moved.");
|
|
704
|
+
if ((_f = data.interpretation) == null ? void 0 : _f.locked) {
|
|
705
|
+
lines.push(`${data.interpretation.count || "Some"} recommendations are available on the Growth plan.`);
|
|
706
|
+
} else if (((_g = data.interpretation) == null ? void 0 : _g.emptyReason) && !emptyReason) {
|
|
707
|
+
lines.push(`Recommendations: ${(_h = EMPTY_REASON_TEXT[data.interpretation.emptyReason]) != null ? _h : data.interpretation.emptyReason}`);
|
|
708
|
+
}
|
|
691
709
|
if (data.generatedAt) lines.push(`Generated: ${new Date(data.generatedAt).toUTCString()}`);
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
710
|
+
if (measured.length) {
|
|
711
|
+
lines.push("", "Findings:");
|
|
712
|
+
for (const f of measured) {
|
|
713
|
+
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${Math.round(f.provenance.coverage * 100)}% of visitors` : "";
|
|
714
|
+
lines.push(`- [${f.tier}] ${f.headline} (${f.provenance.sample} ${f.provenance.denominatorLabel}${cov})`);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
695
717
|
if (recommendations.length) {
|
|
696
|
-
lines.push("");
|
|
697
|
-
lines.push(
|
|
698
|
-
recommendations.forEach((b) => lines.push(`- ${b}`));
|
|
718
|
+
lines.push("", "Recommendations:");
|
|
719
|
+
for (const r of recommendations) lines.push(`- ${r}`);
|
|
699
720
|
}
|
|
700
721
|
return {
|
|
701
|
-
content: [{ type: "text", text: lines.join("\n") }],
|
|
722
|
+
content: [{ type: "text", text: lines.join("\n").trim() || "No findings yet." }],
|
|
702
723
|
structuredContent: {
|
|
703
|
-
status: "ok",
|
|
724
|
+
status: findings.length ? "ok" : "empty",
|
|
725
|
+
reached: (_i = data.reached) != null ? _i : "observed",
|
|
726
|
+
findings: findings.map((f) => ({
|
|
727
|
+
tier: f.tier,
|
|
728
|
+
kind: f.kind,
|
|
729
|
+
headline: f.headline,
|
|
730
|
+
audience: f.audience,
|
|
731
|
+
sample: f.provenance.sample,
|
|
732
|
+
coverage: f.provenance.coverage
|
|
733
|
+
})),
|
|
734
|
+
emptyReason,
|
|
704
735
|
observations,
|
|
705
736
|
recommendations,
|
|
706
|
-
isStale
|
|
707
|
-
generatedAt: (
|
|
737
|
+
isStale,
|
|
738
|
+
generatedAt: (_j = data.generatedAt) != null ? _j : null
|
|
708
739
|
}
|
|
709
740
|
};
|
|
710
741
|
})
|
|
@@ -1801,7 +1832,7 @@ function registerAgentTrafficTools(server, client) {
|
|
|
1801
1832
|
}
|
|
1802
1833
|
|
|
1803
1834
|
// src/server.ts
|
|
1804
|
-
var PKG_VERSION = true ? "0.
|
|
1835
|
+
var PKG_VERSION = true ? "0.15.0" : "0.0.0-dev";
|
|
1805
1836
|
function createMcpServer(client) {
|
|
1806
1837
|
const server = new import_mcp.McpServer(
|
|
1807
1838
|
{
|
package/dist/lib.js
CHANGED