@sentientui/mcp 0.15.0 → 0.16.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-3RJUYHO7.js → chunk-SUMKFRQP.js} +26 -9
- package/dist/index.cjs +26 -9
- package/dist/index.js +1 -1
- package/dist/lib.cjs +26 -9
- package/dist/lib.js +1 -1
- package/package.json +1 -1
|
@@ -624,8 +624,11 @@ var EMPTY_REASON_TEXT = {
|
|
|
624
624
|
awaiting_profiles: "Still building visitor profiles before visitors can be grouped.",
|
|
625
625
|
no_variants: "Nothing to compare yet \u2014 no adaptive component is running.",
|
|
626
626
|
nothing_moved: "Enough data, and nothing moved this period. That is a result.",
|
|
627
|
-
|
|
628
|
-
|
|
627
|
+
// The stale/never-ran texts name the remedy: an agent that is not told about
|
|
628
|
+
// refresh_insights has no way to know it can fix this itself.
|
|
629
|
+
job_never_ran: "The analysis job has not run yet. Call refresh_insights to run it now.",
|
|
630
|
+
job_stale: "These numbers are out of date \u2014 the analysis job has not run recently. Call refresh_insights to regenerate them.",
|
|
631
|
+
data_unavailable: "The project data could not be read just now \u2014 nothing is wrong with the setup. Retry shortly."
|
|
629
632
|
};
|
|
630
633
|
function registerInsightTools(server, client) {
|
|
631
634
|
server.registerTool(
|
|
@@ -649,7 +652,14 @@ function registerInsightTools(server, client) {
|
|
|
649
652
|
observations: z4.array(z4.string()).describe("Headlines of measured findings"),
|
|
650
653
|
recommendations: z4.array(z4.string()).describe("Headlines of interpreted findings (Growth tier)"),
|
|
651
654
|
isStale: z4.boolean().describe("True when the analysis has not run recently"),
|
|
652
|
-
generatedAt: z4.string().nullable().describe("ISO timestamp, or null")
|
|
655
|
+
generatedAt: z4.string().nullable().describe("ISO timestamp, or null"),
|
|
656
|
+
nextUnlock: z4.object({
|
|
657
|
+
tier: z4.string(),
|
|
658
|
+
needs: z4.string(),
|
|
659
|
+
have: z4.number(),
|
|
660
|
+
need: z4.number(),
|
|
661
|
+
surface: z4.string().nullable()
|
|
662
|
+
}).nullable().describe("The nearest gap that would raise the confidence tier, when there is one")
|
|
653
663
|
},
|
|
654
664
|
annotations: {
|
|
655
665
|
readOnlyHint: true,
|
|
@@ -658,7 +668,7 @@ function registerInsightTools(server, client) {
|
|
|
658
668
|
}
|
|
659
669
|
},
|
|
660
670
|
withApiErrorGuidance(async ({ projectId }) => {
|
|
661
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
671
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
662
672
|
const id = encodeURIComponent(projectId);
|
|
663
673
|
const data = await client.get(`/projects/${id}/evidence-report`);
|
|
664
674
|
const findings = (_a = data.findings) != null ? _a : [];
|
|
@@ -670,17 +680,23 @@ function registerInsightTools(server, client) {
|
|
|
670
680
|
const emptyReason = (_d = data.emptyReason) != null ? _d : null;
|
|
671
681
|
const lines = [];
|
|
672
682
|
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.");
|
|
683
|
+
if (isStale) lines.push("\u26A0 The analysis job has not run recently, so these numbers may have moved. Call refresh_insights to regenerate them.");
|
|
674
684
|
if ((_f = data.interpretation) == null ? void 0 : _f.locked) {
|
|
675
685
|
lines.push(`${data.interpretation.count || "Some"} recommendations are available on the Growth plan.`);
|
|
676
686
|
} else if (((_g = data.interpretation) == null ? void 0 : _g.emptyReason) && !emptyReason) {
|
|
677
687
|
lines.push(`Recommendations: ${(_h = EMPTY_REASON_TEXT[data.interpretation.emptyReason]) != null ? _h : data.interpretation.emptyReason}`);
|
|
678
688
|
}
|
|
679
689
|
if (data.generatedAt) lines.push(`Generated: ${new Date(data.generatedAt).toUTCString()}`);
|
|
690
|
+
const nextUnlock = (_i = data.nextUnlock) != null ? _i : null;
|
|
691
|
+
if (nextUnlock) {
|
|
692
|
+
const remaining = nextUnlock.need - nextUnlock.have;
|
|
693
|
+
const where = nextUnlock.surface ? `On ${nextUnlock.surface}: ` : "";
|
|
694
|
+
lines.push(`${where}${remaining} more ${nextUnlock.needs} would unlock the next confidence level (${nextUnlock.tier}).`);
|
|
695
|
+
}
|
|
680
696
|
if (measured.length) {
|
|
681
697
|
lines.push("", "Findings:");
|
|
682
698
|
for (const f of measured) {
|
|
683
|
-
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${Math.round(f.provenance.coverage * 100)}
|
|
699
|
+
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${f.provenance.coverage < 5e-3 ? "under 1%" : `${Math.round(f.provenance.coverage * 100)}%`} of visitors` : "";
|
|
684
700
|
lines.push(`- [${f.tier}] ${f.headline} (${f.provenance.sample} ${f.provenance.denominatorLabel}${cov})`);
|
|
685
701
|
}
|
|
686
702
|
}
|
|
@@ -692,7 +708,7 @@ function registerInsightTools(server, client) {
|
|
|
692
708
|
content: [{ type: "text", text: lines.join("\n").trim() || "No findings yet." }],
|
|
693
709
|
structuredContent: {
|
|
694
710
|
status: findings.length ? "ok" : "empty",
|
|
695
|
-
reached: (
|
|
711
|
+
reached: (_j = data.reached) != null ? _j : "observed",
|
|
696
712
|
findings: findings.map((f) => ({
|
|
697
713
|
tier: f.tier,
|
|
698
714
|
kind: f.kind,
|
|
@@ -705,7 +721,8 @@ function registerInsightTools(server, client) {
|
|
|
705
721
|
observations,
|
|
706
722
|
recommendations,
|
|
707
723
|
isStale,
|
|
708
|
-
generatedAt: (
|
|
724
|
+
generatedAt: (_k = data.generatedAt) != null ? _k : null,
|
|
725
|
+
nextUnlock
|
|
709
726
|
}
|
|
710
727
|
};
|
|
711
728
|
})
|
|
@@ -1802,7 +1819,7 @@ function registerAgentTrafficTools(server, client) {
|
|
|
1802
1819
|
}
|
|
1803
1820
|
|
|
1804
1821
|
// src/server.ts
|
|
1805
|
-
var PKG_VERSION = true ? "0.
|
|
1822
|
+
var PKG_VERSION = true ? "0.16.0" : "0.0.0-dev";
|
|
1806
1823
|
function createMcpServer(client) {
|
|
1807
1824
|
const server = new McpServer(
|
|
1808
1825
|
{
|
package/dist/index.cjs
CHANGED
|
@@ -630,8 +630,11 @@ var EMPTY_REASON_TEXT = {
|
|
|
630
630
|
awaiting_profiles: "Still building visitor profiles before visitors can be grouped.",
|
|
631
631
|
no_variants: "Nothing to compare yet \u2014 no adaptive component is running.",
|
|
632
632
|
nothing_moved: "Enough data, and nothing moved this period. That is a result.",
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
// The stale/never-ran texts name the remedy: an agent that is not told about
|
|
634
|
+
// refresh_insights has no way to know it can fix this itself.
|
|
635
|
+
job_never_ran: "The analysis job has not run yet. Call refresh_insights to run it now.",
|
|
636
|
+
job_stale: "These numbers are out of date \u2014 the analysis job has not run recently. Call refresh_insights to regenerate them.",
|
|
637
|
+
data_unavailable: "The project data could not be read just now \u2014 nothing is wrong with the setup. Retry shortly."
|
|
635
638
|
};
|
|
636
639
|
function registerInsightTools(server, client) {
|
|
637
640
|
server.registerTool(
|
|
@@ -655,7 +658,14 @@ function registerInsightTools(server, client) {
|
|
|
655
658
|
observations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of measured findings"),
|
|
656
659
|
recommendations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of interpreted findings (Growth tier)"),
|
|
657
660
|
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")
|
|
661
|
+
generatedAt: import_zod4.z.string().nullable().describe("ISO timestamp, or null"),
|
|
662
|
+
nextUnlock: import_zod4.z.object({
|
|
663
|
+
tier: import_zod4.z.string(),
|
|
664
|
+
needs: import_zod4.z.string(),
|
|
665
|
+
have: import_zod4.z.number(),
|
|
666
|
+
need: import_zod4.z.number(),
|
|
667
|
+
surface: import_zod4.z.string().nullable()
|
|
668
|
+
}).nullable().describe("The nearest gap that would raise the confidence tier, when there is one")
|
|
659
669
|
},
|
|
660
670
|
annotations: {
|
|
661
671
|
readOnlyHint: true,
|
|
@@ -664,7 +674,7 @@ function registerInsightTools(server, client) {
|
|
|
664
674
|
}
|
|
665
675
|
},
|
|
666
676
|
withApiErrorGuidance(async ({ projectId }) => {
|
|
667
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
677
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
668
678
|
const id = encodeURIComponent(projectId);
|
|
669
679
|
const data = await client.get(`/projects/${id}/evidence-report`);
|
|
670
680
|
const findings = (_a2 = data.findings) != null ? _a2 : [];
|
|
@@ -676,17 +686,23 @@ function registerInsightTools(server, client) {
|
|
|
676
686
|
const emptyReason = (_d = data.emptyReason) != null ? _d : null;
|
|
677
687
|
const lines = [];
|
|
678
688
|
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.");
|
|
689
|
+
if (isStale) lines.push("\u26A0 The analysis job has not run recently, so these numbers may have moved. Call refresh_insights to regenerate them.");
|
|
680
690
|
if ((_f = data.interpretation) == null ? void 0 : _f.locked) {
|
|
681
691
|
lines.push(`${data.interpretation.count || "Some"} recommendations are available on the Growth plan.`);
|
|
682
692
|
} else if (((_g = data.interpretation) == null ? void 0 : _g.emptyReason) && !emptyReason) {
|
|
683
693
|
lines.push(`Recommendations: ${(_h = EMPTY_REASON_TEXT[data.interpretation.emptyReason]) != null ? _h : data.interpretation.emptyReason}`);
|
|
684
694
|
}
|
|
685
695
|
if (data.generatedAt) lines.push(`Generated: ${new Date(data.generatedAt).toUTCString()}`);
|
|
696
|
+
const nextUnlock = (_i = data.nextUnlock) != null ? _i : null;
|
|
697
|
+
if (nextUnlock) {
|
|
698
|
+
const remaining = nextUnlock.need - nextUnlock.have;
|
|
699
|
+
const where = nextUnlock.surface ? `On ${nextUnlock.surface}: ` : "";
|
|
700
|
+
lines.push(`${where}${remaining} more ${nextUnlock.needs} would unlock the next confidence level (${nextUnlock.tier}).`);
|
|
701
|
+
}
|
|
686
702
|
if (measured.length) {
|
|
687
703
|
lines.push("", "Findings:");
|
|
688
704
|
for (const f of measured) {
|
|
689
|
-
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${Math.round(f.provenance.coverage * 100)}
|
|
705
|
+
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${f.provenance.coverage < 5e-3 ? "under 1%" : `${Math.round(f.provenance.coverage * 100)}%`} of visitors` : "";
|
|
690
706
|
lines.push(`- [${f.tier}] ${f.headline} (${f.provenance.sample} ${f.provenance.denominatorLabel}${cov})`);
|
|
691
707
|
}
|
|
692
708
|
}
|
|
@@ -698,7 +714,7 @@ function registerInsightTools(server, client) {
|
|
|
698
714
|
content: [{ type: "text", text: lines.join("\n").trim() || "No findings yet." }],
|
|
699
715
|
structuredContent: {
|
|
700
716
|
status: findings.length ? "ok" : "empty",
|
|
701
|
-
reached: (
|
|
717
|
+
reached: (_j = data.reached) != null ? _j : "observed",
|
|
702
718
|
findings: findings.map((f) => ({
|
|
703
719
|
tier: f.tier,
|
|
704
720
|
kind: f.kind,
|
|
@@ -711,7 +727,8 @@ function registerInsightTools(server, client) {
|
|
|
711
727
|
observations,
|
|
712
728
|
recommendations,
|
|
713
729
|
isStale,
|
|
714
|
-
generatedAt: (
|
|
730
|
+
generatedAt: (_k = data.generatedAt) != null ? _k : null,
|
|
731
|
+
nextUnlock
|
|
715
732
|
}
|
|
716
733
|
};
|
|
717
734
|
})
|
|
@@ -1808,7 +1825,7 @@ function registerAgentTrafficTools(server, client) {
|
|
|
1808
1825
|
}
|
|
1809
1826
|
|
|
1810
1827
|
// src/server.ts
|
|
1811
|
-
var PKG_VERSION = true ? "0.
|
|
1828
|
+
var PKG_VERSION = true ? "0.16.0" : "0.0.0-dev";
|
|
1812
1829
|
function createMcpServer(client) {
|
|
1813
1830
|
const server = new import_mcp.McpServer(
|
|
1814
1831
|
{
|
package/dist/index.js
CHANGED
package/dist/lib.cjs
CHANGED
|
@@ -654,8 +654,11 @@ var EMPTY_REASON_TEXT = {
|
|
|
654
654
|
awaiting_profiles: "Still building visitor profiles before visitors can be grouped.",
|
|
655
655
|
no_variants: "Nothing to compare yet \u2014 no adaptive component is running.",
|
|
656
656
|
nothing_moved: "Enough data, and nothing moved this period. That is a result.",
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
// The stale/never-ran texts name the remedy: an agent that is not told about
|
|
658
|
+
// refresh_insights has no way to know it can fix this itself.
|
|
659
|
+
job_never_ran: "The analysis job has not run yet. Call refresh_insights to run it now.",
|
|
660
|
+
job_stale: "These numbers are out of date \u2014 the analysis job has not run recently. Call refresh_insights to regenerate them.",
|
|
661
|
+
data_unavailable: "The project data could not be read just now \u2014 nothing is wrong with the setup. Retry shortly."
|
|
659
662
|
};
|
|
660
663
|
function registerInsightTools(server, client) {
|
|
661
664
|
server.registerTool(
|
|
@@ -679,7 +682,14 @@ function registerInsightTools(server, client) {
|
|
|
679
682
|
observations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of measured findings"),
|
|
680
683
|
recommendations: import_zod4.z.array(import_zod4.z.string()).describe("Headlines of interpreted findings (Growth tier)"),
|
|
681
684
|
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")
|
|
685
|
+
generatedAt: import_zod4.z.string().nullable().describe("ISO timestamp, or null"),
|
|
686
|
+
nextUnlock: import_zod4.z.object({
|
|
687
|
+
tier: import_zod4.z.string(),
|
|
688
|
+
needs: import_zod4.z.string(),
|
|
689
|
+
have: import_zod4.z.number(),
|
|
690
|
+
need: import_zod4.z.number(),
|
|
691
|
+
surface: import_zod4.z.string().nullable()
|
|
692
|
+
}).nullable().describe("The nearest gap that would raise the confidence tier, when there is one")
|
|
683
693
|
},
|
|
684
694
|
annotations: {
|
|
685
695
|
readOnlyHint: true,
|
|
@@ -688,7 +698,7 @@ function registerInsightTools(server, client) {
|
|
|
688
698
|
}
|
|
689
699
|
},
|
|
690
700
|
withApiErrorGuidance(async ({ projectId }) => {
|
|
691
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
701
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
692
702
|
const id = encodeURIComponent(projectId);
|
|
693
703
|
const data = await client.get(`/projects/${id}/evidence-report`);
|
|
694
704
|
const findings = (_a = data.findings) != null ? _a : [];
|
|
@@ -700,17 +710,23 @@ function registerInsightTools(server, client) {
|
|
|
700
710
|
const emptyReason = (_d = data.emptyReason) != null ? _d : null;
|
|
701
711
|
const lines = [];
|
|
702
712
|
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.");
|
|
713
|
+
if (isStale) lines.push("\u26A0 The analysis job has not run recently, so these numbers may have moved. Call refresh_insights to regenerate them.");
|
|
704
714
|
if ((_f = data.interpretation) == null ? void 0 : _f.locked) {
|
|
705
715
|
lines.push(`${data.interpretation.count || "Some"} recommendations are available on the Growth plan.`);
|
|
706
716
|
} else if (((_g = data.interpretation) == null ? void 0 : _g.emptyReason) && !emptyReason) {
|
|
707
717
|
lines.push(`Recommendations: ${(_h = EMPTY_REASON_TEXT[data.interpretation.emptyReason]) != null ? _h : data.interpretation.emptyReason}`);
|
|
708
718
|
}
|
|
709
719
|
if (data.generatedAt) lines.push(`Generated: ${new Date(data.generatedAt).toUTCString()}`);
|
|
720
|
+
const nextUnlock = (_i = data.nextUnlock) != null ? _i : null;
|
|
721
|
+
if (nextUnlock) {
|
|
722
|
+
const remaining = nextUnlock.need - nextUnlock.have;
|
|
723
|
+
const where = nextUnlock.surface ? `On ${nextUnlock.surface}: ` : "";
|
|
724
|
+
lines.push(`${where}${remaining} more ${nextUnlock.needs} would unlock the next confidence level (${nextUnlock.tier}).`);
|
|
725
|
+
}
|
|
710
726
|
if (measured.length) {
|
|
711
727
|
lines.push("", "Findings:");
|
|
712
728
|
for (const f of measured) {
|
|
713
|
-
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${Math.round(f.provenance.coverage * 100)}
|
|
729
|
+
const cov = f.provenance.coverage !== null && f.provenance.coverage < 0.999 ? `, covering ${f.provenance.coverage < 5e-3 ? "under 1%" : `${Math.round(f.provenance.coverage * 100)}%`} of visitors` : "";
|
|
714
730
|
lines.push(`- [${f.tier}] ${f.headline} (${f.provenance.sample} ${f.provenance.denominatorLabel}${cov})`);
|
|
715
731
|
}
|
|
716
732
|
}
|
|
@@ -722,7 +738,7 @@ function registerInsightTools(server, client) {
|
|
|
722
738
|
content: [{ type: "text", text: lines.join("\n").trim() || "No findings yet." }],
|
|
723
739
|
structuredContent: {
|
|
724
740
|
status: findings.length ? "ok" : "empty",
|
|
725
|
-
reached: (
|
|
741
|
+
reached: (_j = data.reached) != null ? _j : "observed",
|
|
726
742
|
findings: findings.map((f) => ({
|
|
727
743
|
tier: f.tier,
|
|
728
744
|
kind: f.kind,
|
|
@@ -735,7 +751,8 @@ function registerInsightTools(server, client) {
|
|
|
735
751
|
observations,
|
|
736
752
|
recommendations,
|
|
737
753
|
isStale,
|
|
738
|
-
generatedAt: (
|
|
754
|
+
generatedAt: (_k = data.generatedAt) != null ? _k : null,
|
|
755
|
+
nextUnlock
|
|
739
756
|
}
|
|
740
757
|
};
|
|
741
758
|
})
|
|
@@ -1832,7 +1849,7 @@ function registerAgentTrafficTools(server, client) {
|
|
|
1832
1849
|
}
|
|
1833
1850
|
|
|
1834
1851
|
// src/server.ts
|
|
1835
|
-
var PKG_VERSION = true ? "0.
|
|
1852
|
+
var PKG_VERSION = true ? "0.16.0" : "0.0.0-dev";
|
|
1836
1853
|
function createMcpServer(client) {
|
|
1837
1854
|
const server = new import_mcp.McpServer(
|
|
1838
1855
|
{
|
package/dist/lib.js
CHANGED