@sentientui/mcp 0.18.4 → 0.20.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/AGENTS.md +63 -30
- package/README.md +45 -29
- package/dist/{chunk-X3CXBGWM.js → chunk-35I5EJTS.js} +898 -204
- package/dist/index.cjs +901 -204
- package/dist/index.js +6 -1
- package/dist/lib.cjs +945 -204
- package/dist/lib.d.cts +29 -2
- package/dist/lib.d.ts +29 -2
- package/dist/lib.js +48 -1
- package/package.json +1 -1
package/dist/lib.d.cts
CHANGED
|
@@ -2,7 +2,23 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
2
2
|
|
|
3
3
|
declare class ApiError extends Error {
|
|
4
4
|
status: number;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The server's human sentence (body.message / body.reason), kept beside the
|
|
7
|
+
* machine code. The code alone is what apiErrorGuidance matches on, but
|
|
8
|
+
* dropping the sentence meant a 409 "Unpromote this variant before hiding
|
|
9
|
+
* it." or a 400 "a URL-reached goal needs a URL pattern" reached the agent
|
|
10
|
+
* as a bare `variant_promoted` / `invalid_goal` with no way to act on it.
|
|
11
|
+
*/
|
|
12
|
+
detail?: string | undefined;
|
|
13
|
+
constructor(status: number, message: string,
|
|
14
|
+
/**
|
|
15
|
+
* The server's human sentence (body.message / body.reason), kept beside the
|
|
16
|
+
* machine code. The code alone is what apiErrorGuidance matches on, but
|
|
17
|
+
* dropping the sentence meant a 409 "Unpromote this variant before hiding
|
|
18
|
+
* it." or a 400 "a URL-reached goal needs a URL pattern" reached the agent
|
|
19
|
+
* as a bare `variant_promoted` / `invalid_goal` with no way to act on it.
|
|
20
|
+
*/
|
|
21
|
+
detail?: string | undefined);
|
|
6
22
|
}
|
|
7
23
|
declare class ApiClient {
|
|
8
24
|
private baseUrl;
|
|
@@ -20,6 +36,8 @@ declare class ApiClient {
|
|
|
20
36
|
});
|
|
21
37
|
get<T = unknown>(path: string): Promise<T>;
|
|
22
38
|
post<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
39
|
+
patch<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
40
|
+
delete<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
23
41
|
private request;
|
|
24
42
|
}
|
|
25
43
|
|
|
@@ -36,4 +54,13 @@ declare function createMcpServer(client: ApiClient): McpServer;
|
|
|
36
54
|
*/
|
|
37
55
|
declare const PUBLIC_UI_RESOURCE_URIS: readonly string[];
|
|
38
56
|
|
|
39
|
-
|
|
57
|
+
type ToolAccess = 'read' | 'write';
|
|
58
|
+
type ToolCatalogEntry = {
|
|
59
|
+
name: string;
|
|
60
|
+
access: ToolAccess;
|
|
61
|
+
summary: string;
|
|
62
|
+
};
|
|
63
|
+
declare const TOOL_CATALOG: readonly ToolCatalogEntry[];
|
|
64
|
+
declare const TOOL_NAMES: readonly string[];
|
|
65
|
+
|
|
66
|
+
export { ApiClient, ApiError, PUBLIC_UI_RESOURCE_URIS, TOOL_CATALOG, TOOL_NAMES, type ToolAccess, type ToolCatalogEntry, createMcpServer };
|
package/dist/lib.d.ts
CHANGED
|
@@ -2,7 +2,23 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
2
2
|
|
|
3
3
|
declare class ApiError extends Error {
|
|
4
4
|
status: number;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The server's human sentence (body.message / body.reason), kept beside the
|
|
7
|
+
* machine code. The code alone is what apiErrorGuidance matches on, but
|
|
8
|
+
* dropping the sentence meant a 409 "Unpromote this variant before hiding
|
|
9
|
+
* it." or a 400 "a URL-reached goal needs a URL pattern" reached the agent
|
|
10
|
+
* as a bare `variant_promoted` / `invalid_goal` with no way to act on it.
|
|
11
|
+
*/
|
|
12
|
+
detail?: string | undefined;
|
|
13
|
+
constructor(status: number, message: string,
|
|
14
|
+
/**
|
|
15
|
+
* The server's human sentence (body.message / body.reason), kept beside the
|
|
16
|
+
* machine code. The code alone is what apiErrorGuidance matches on, but
|
|
17
|
+
* dropping the sentence meant a 409 "Unpromote this variant before hiding
|
|
18
|
+
* it." or a 400 "a URL-reached goal needs a URL pattern" reached the agent
|
|
19
|
+
* as a bare `variant_promoted` / `invalid_goal` with no way to act on it.
|
|
20
|
+
*/
|
|
21
|
+
detail?: string | undefined);
|
|
6
22
|
}
|
|
7
23
|
declare class ApiClient {
|
|
8
24
|
private baseUrl;
|
|
@@ -20,6 +36,8 @@ declare class ApiClient {
|
|
|
20
36
|
});
|
|
21
37
|
get<T = unknown>(path: string): Promise<T>;
|
|
22
38
|
post<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
39
|
+
patch<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
40
|
+
delete<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
23
41
|
private request;
|
|
24
42
|
}
|
|
25
43
|
|
|
@@ -36,4 +54,13 @@ declare function createMcpServer(client: ApiClient): McpServer;
|
|
|
36
54
|
*/
|
|
37
55
|
declare const PUBLIC_UI_RESOURCE_URIS: readonly string[];
|
|
38
56
|
|
|
39
|
-
|
|
57
|
+
type ToolAccess = 'read' | 'write';
|
|
58
|
+
type ToolCatalogEntry = {
|
|
59
|
+
name: string;
|
|
60
|
+
access: ToolAccess;
|
|
61
|
+
summary: string;
|
|
62
|
+
};
|
|
63
|
+
declare const TOOL_CATALOG: readonly ToolCatalogEntry[];
|
|
64
|
+
declare const TOOL_NAMES: readonly string[];
|
|
65
|
+
|
|
66
|
+
export { ApiClient, ApiError, PUBLIC_UI_RESOURCE_URIS, TOOL_CATALOG, TOOL_NAMES, type ToolAccess, type ToolCatalogEntry, createMcpServer };
|
package/dist/lib.js
CHANGED
|
@@ -4,10 +4,57 @@ import {
|
|
|
4
4
|
ApiError,
|
|
5
5
|
PUBLIC_UI_RESOURCE_URIS,
|
|
6
6
|
createMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-35I5EJTS.js";
|
|
8
|
+
|
|
9
|
+
// src/tool-catalog.ts
|
|
10
|
+
var TOOL_CATALOG = [
|
|
11
|
+
// Projects
|
|
12
|
+
{ name: "list_projects", access: "read", summary: "List the projects this credential can see (an sk_ key sees only its own project)" },
|
|
13
|
+
{ name: "create_project", access: "write", summary: "Create a project and return its pk_ public key (account login only \u2014 not an sk_ key or demo token)" },
|
|
14
|
+
{ name: "get_project_stats", access: "read", summary: "Ingestion health: status, 24h events and sessions, and /v1/agent API calls" },
|
|
15
|
+
{ name: "add_origin", access: "write", summary: "Allow-list a site origin so the SDK's events from it are accepted" },
|
|
16
|
+
// Components and variants
|
|
17
|
+
{ name: "list_components", access: "read", summary: "Adaptive components with variant counts and impressions" },
|
|
18
|
+
{ name: "get_variant_performance", access: "read", summary: "Per-(component, variant) rates with their n and the server's evidence verdict vs the baseline" },
|
|
19
|
+
{ name: "get_variant_brief", access: "read", summary: "Evidence-driven brief for writing a new code-native variant" },
|
|
20
|
+
{ name: "get_test_brief", access: "read", summary: "Ready-to-paste test code that forces one of a component's real variants" },
|
|
21
|
+
{ name: "create_variant", access: "write", summary: "Create a no-code managed text variant as a draft" },
|
|
22
|
+
{ name: "update_variant", access: "write", summary: "Edit a managed variant's name or text, or activate a draft (status active) / move it back to draft" },
|
|
23
|
+
{ name: "delete_variant_draft", access: "write", summary: "Delete a managed variant that is still a draft" },
|
|
24
|
+
{ name: "pause_variant", access: "write", summary: "Pause a variant so no new traffic is assigned to it (undo with resume_variant)" },
|
|
25
|
+
{ name: "resume_variant", access: "write", summary: "Resume a paused variant \u2014 manual or guardrail pause" },
|
|
26
|
+
{ name: "retire_variant", access: "write", summary: "Retire (archive) an active variant (undo with restore_variant)" },
|
|
27
|
+
{ name: "restore_variant", access: "write", summary: "Bring a retired variant back to active" },
|
|
28
|
+
// Goals, funnels, guardrails
|
|
29
|
+
{ name: "get_goal_funnel", access: "read", summary: "Per-goal conversion summary (windowed) with descriptive all-time per-variant rates \u2014 not a step funnel (see get_funnel_report)" },
|
|
30
|
+
{ name: "list_goals", access: "read", summary: "Defined goals (id, role, event, status), including ones with no conversions yet" },
|
|
31
|
+
{ name: "list_funnels", access: "read", summary: "Defined multi-step funnels" },
|
|
32
|
+
{ name: "get_funnel_report", access: "read", summary: "Step-by-step funnel drop-off" },
|
|
33
|
+
{ name: "list_guardrail_events", access: "read", summary: "Every variant currently paused by a guardrail (optionally only pauses from the last N days)" },
|
|
34
|
+
// Audience and layout
|
|
35
|
+
{ name: "get_persona_breakdown", access: "read", summary: "Visitor clusters with session counts and reliability (all retained sessions)" },
|
|
36
|
+
{ name: "get_layout_stats", access: "read", summary: "Per-persona section order with bandit pulls and reward (cumulative state)" },
|
|
37
|
+
// Insights
|
|
38
|
+
{ name: "get_insights", access: "read", summary: "Ranked measured findings with their sample, plus AI narrations marked unmeasured" },
|
|
39
|
+
{ name: "refresh_insights", access: "write", summary: "Regenerate AI insights (Starter+ and an editor/admin role; a paid model call)" },
|
|
40
|
+
// Generated versions (persona x slot cells)
|
|
41
|
+
{ name: "get_cell_matrix", access: "read", summary: 'The "Who sees what" matrix of generated versions per visitor type and region' },
|
|
42
|
+
{ name: "get_cell_detail", access: "read", summary: "One cell's generated version, why it was written, and how it performs" },
|
|
43
|
+
{ name: "generate_cell", access: "write", summary: "Queue AI generation for one cell \u2014 publishes automatically, or waits for approval when review mode is on" },
|
|
44
|
+
{ name: "list_cell_reviews", access: "read", summary: "Generated versions waiting for approval (review mode)" },
|
|
45
|
+
{ name: "review_cell", access: "write", summary: "Approve (publish) or reject one generated version waiting for review" },
|
|
46
|
+
// Agent traffic
|
|
47
|
+
{ name: "get_agent_traffic", access: "read", summary: "Which AI crawlers, agentic browsers and agent API callers read the site (windowed)" },
|
|
48
|
+
{ name: "get_agent_legibility", access: "read", summary: "Whether the pages agents read are machine-legible, with fixes" },
|
|
49
|
+
// Setup
|
|
50
|
+
{ name: "get_integration_guide", access: "read", summary: "SDK setup guide (static \u2014 same for every project)" }
|
|
51
|
+
];
|
|
52
|
+
var TOOL_NAMES = TOOL_CATALOG.map((t) => t.name);
|
|
8
53
|
export {
|
|
9
54
|
ApiClient,
|
|
10
55
|
ApiError,
|
|
11
56
|
PUBLIC_UI_RESOURCE_URIS,
|
|
57
|
+
TOOL_CATALOG,
|
|
58
|
+
TOOL_NAMES,
|
|
12
59
|
createMcpServer
|
|
13
60
|
};
|