@sentientui/mcp 0.18.3 → 0.18.4
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-FPHH4LA7.js → chunk-X3CXBGWM.js} +26 -1
- package/dist/index.cjs +26 -1
- package/dist/index.js +1 -1
- package/dist/lib.cjs +26 -1
- package/dist/lib.js +1 -1
- package/package.json +1 -1
|
@@ -1905,6 +1905,31 @@ combined tag contains the site's config, so its hash differs per site; the split
|
|
|
1905
1905
|
byte-identical everywhere, so one hash covers it. Existing three-tag and config + loader installs
|
|
1906
1906
|
keep working.
|
|
1907
1907
|
|
|
1908
|
+
## Capture AI assistants (server-side, any framework)
|
|
1909
|
+
|
|
1910
|
+
AI assistants that fetch pages for their users (ChatGPT-User, Claude-User, Perplexity-User)
|
|
1911
|
+
and AI crawlers (GPTBot, ClaudeBot, \u2026) run no JavaScript, so the snippet and the React SDK never
|
|
1912
|
+
see them. Only your server does. Without server-side capture the dashboard's agent line reads
|
|
1913
|
+
"not measured", not zero. Capture only observes: it never changes what is served.
|
|
1914
|
+
|
|
1915
|
+
- Next.js with AdaptiveRoot: already on (captureAgents defaults to true).
|
|
1916
|
+
- Edge (Vercel Routing Middleware, Cloudflare Workers, Netlify Edge) \u2014 covers ANY framework on
|
|
1917
|
+
those hosts, static sites included:
|
|
1918
|
+
import { captureAgentRequest } from '@sentientui/core/server';
|
|
1919
|
+
captureAgentRequest(request, { apiKey: 'pk_...', source: 'edge', waitUntil });
|
|
1920
|
+
waitUntil is required on edge runtimes (ctx.waitUntil.bind(ctx) on Workers; waitUntil from
|
|
1921
|
+
'@vercel/functions' on Vercel), or the platform drops the request when the response returns.
|
|
1922
|
+
- Node servers (Express, Nuxt/Nitro on Node, any (req, res, next) stack):
|
|
1923
|
+
import { sentientAgentMiddleware } from '@sentientui/core/server';
|
|
1924
|
+
app.use(sentientAgentMiddleware({ apiKey: 'pk_...' }));
|
|
1925
|
+
- Hono / Remix / React Router / Astro / SvelteKit: call captureAgentRequest(request, { apiKey })
|
|
1926
|
+
from the request hook.
|
|
1927
|
+
|
|
1928
|
+
Only the path is sent (never the query string), with the user agent. The API re-derives the
|
|
1929
|
+
agent itself and collapses the same fetch reported twice (e.g. edge + SSR), so running two
|
|
1930
|
+
capture paths does not double-count. Hosted builders (Shopify themes, Webflow, Squarespace, Wix)
|
|
1931
|
+
give no per-request hook and stay unmeasured.
|
|
1932
|
+
|
|
1908
1933
|
## Testing the integration
|
|
1909
1934
|
|
|
1910
1935
|
Use '@sentientui/react/testing': renderWithSentient(ui, { variants, slots, persona }) forces
|
|
@@ -2246,7 +2271,7 @@ function registerCellTools(server, client) {
|
|
|
2246
2271
|
}
|
|
2247
2272
|
|
|
2248
2273
|
// src/server.ts
|
|
2249
|
-
var PKG_VERSION = true ? "0.18.
|
|
2274
|
+
var PKG_VERSION = true ? "0.18.4" : "0.0.0-dev";
|
|
2250
2275
|
function createMcpServer(client) {
|
|
2251
2276
|
const server = new McpServer(
|
|
2252
2277
|
{
|
package/dist/index.cjs
CHANGED
|
@@ -1911,6 +1911,31 @@ combined tag contains the site's config, so its hash differs per site; the split
|
|
|
1911
1911
|
byte-identical everywhere, so one hash covers it. Existing three-tag and config + loader installs
|
|
1912
1912
|
keep working.
|
|
1913
1913
|
|
|
1914
|
+
## Capture AI assistants (server-side, any framework)
|
|
1915
|
+
|
|
1916
|
+
AI assistants that fetch pages for their users (ChatGPT-User, Claude-User, Perplexity-User)
|
|
1917
|
+
and AI crawlers (GPTBot, ClaudeBot, \u2026) run no JavaScript, so the snippet and the React SDK never
|
|
1918
|
+
see them. Only your server does. Without server-side capture the dashboard's agent line reads
|
|
1919
|
+
"not measured", not zero. Capture only observes: it never changes what is served.
|
|
1920
|
+
|
|
1921
|
+
- Next.js with AdaptiveRoot: already on (captureAgents defaults to true).
|
|
1922
|
+
- Edge (Vercel Routing Middleware, Cloudflare Workers, Netlify Edge) \u2014 covers ANY framework on
|
|
1923
|
+
those hosts, static sites included:
|
|
1924
|
+
import { captureAgentRequest } from '@sentientui/core/server';
|
|
1925
|
+
captureAgentRequest(request, { apiKey: 'pk_...', source: 'edge', waitUntil });
|
|
1926
|
+
waitUntil is required on edge runtimes (ctx.waitUntil.bind(ctx) on Workers; waitUntil from
|
|
1927
|
+
'@vercel/functions' on Vercel), or the platform drops the request when the response returns.
|
|
1928
|
+
- Node servers (Express, Nuxt/Nitro on Node, any (req, res, next) stack):
|
|
1929
|
+
import { sentientAgentMiddleware } from '@sentientui/core/server';
|
|
1930
|
+
app.use(sentientAgentMiddleware({ apiKey: 'pk_...' }));
|
|
1931
|
+
- Hono / Remix / React Router / Astro / SvelteKit: call captureAgentRequest(request, { apiKey })
|
|
1932
|
+
from the request hook.
|
|
1933
|
+
|
|
1934
|
+
Only the path is sent (never the query string), with the user agent. The API re-derives the
|
|
1935
|
+
agent itself and collapses the same fetch reported twice (e.g. edge + SSR), so running two
|
|
1936
|
+
capture paths does not double-count. Hosted builders (Shopify themes, Webflow, Squarespace, Wix)
|
|
1937
|
+
give no per-request hook and stay unmeasured.
|
|
1938
|
+
|
|
1914
1939
|
## Testing the integration
|
|
1915
1940
|
|
|
1916
1941
|
Use '@sentientui/react/testing': renderWithSentient(ui, { variants, slots, persona }) forces
|
|
@@ -2252,7 +2277,7 @@ function registerCellTools(server, client) {
|
|
|
2252
2277
|
}
|
|
2253
2278
|
|
|
2254
2279
|
// src/server.ts
|
|
2255
|
-
var PKG_VERSION = true ? "0.18.
|
|
2280
|
+
var PKG_VERSION = true ? "0.18.4" : "0.0.0-dev";
|
|
2256
2281
|
function createMcpServer(client) {
|
|
2257
2282
|
const server = new import_mcp.McpServer(
|
|
2258
2283
|
{
|
package/dist/index.js
CHANGED
package/dist/lib.cjs
CHANGED
|
@@ -1935,6 +1935,31 @@ combined tag contains the site's config, so its hash differs per site; the split
|
|
|
1935
1935
|
byte-identical everywhere, so one hash covers it. Existing three-tag and config + loader installs
|
|
1936
1936
|
keep working.
|
|
1937
1937
|
|
|
1938
|
+
## Capture AI assistants (server-side, any framework)
|
|
1939
|
+
|
|
1940
|
+
AI assistants that fetch pages for their users (ChatGPT-User, Claude-User, Perplexity-User)
|
|
1941
|
+
and AI crawlers (GPTBot, ClaudeBot, \u2026) run no JavaScript, so the snippet and the React SDK never
|
|
1942
|
+
see them. Only your server does. Without server-side capture the dashboard's agent line reads
|
|
1943
|
+
"not measured", not zero. Capture only observes: it never changes what is served.
|
|
1944
|
+
|
|
1945
|
+
- Next.js with AdaptiveRoot: already on (captureAgents defaults to true).
|
|
1946
|
+
- Edge (Vercel Routing Middleware, Cloudflare Workers, Netlify Edge) \u2014 covers ANY framework on
|
|
1947
|
+
those hosts, static sites included:
|
|
1948
|
+
import { captureAgentRequest } from '@sentientui/core/server';
|
|
1949
|
+
captureAgentRequest(request, { apiKey: 'pk_...', source: 'edge', waitUntil });
|
|
1950
|
+
waitUntil is required on edge runtimes (ctx.waitUntil.bind(ctx) on Workers; waitUntil from
|
|
1951
|
+
'@vercel/functions' on Vercel), or the platform drops the request when the response returns.
|
|
1952
|
+
- Node servers (Express, Nuxt/Nitro on Node, any (req, res, next) stack):
|
|
1953
|
+
import { sentientAgentMiddleware } from '@sentientui/core/server';
|
|
1954
|
+
app.use(sentientAgentMiddleware({ apiKey: 'pk_...' }));
|
|
1955
|
+
- Hono / Remix / React Router / Astro / SvelteKit: call captureAgentRequest(request, { apiKey })
|
|
1956
|
+
from the request hook.
|
|
1957
|
+
|
|
1958
|
+
Only the path is sent (never the query string), with the user agent. The API re-derives the
|
|
1959
|
+
agent itself and collapses the same fetch reported twice (e.g. edge + SSR), so running two
|
|
1960
|
+
capture paths does not double-count. Hosted builders (Shopify themes, Webflow, Squarespace, Wix)
|
|
1961
|
+
give no per-request hook and stay unmeasured.
|
|
1962
|
+
|
|
1938
1963
|
## Testing the integration
|
|
1939
1964
|
|
|
1940
1965
|
Use '@sentientui/react/testing': renderWithSentient(ui, { variants, slots, persona }) forces
|
|
@@ -2276,7 +2301,7 @@ function registerCellTools(server, client) {
|
|
|
2276
2301
|
}
|
|
2277
2302
|
|
|
2278
2303
|
// src/server.ts
|
|
2279
|
-
var PKG_VERSION = true ? "0.18.
|
|
2304
|
+
var PKG_VERSION = true ? "0.18.4" : "0.0.0-dev";
|
|
2280
2305
|
function createMcpServer(client) {
|
|
2281
2306
|
const server = new import_mcp.McpServer(
|
|
2282
2307
|
{
|
package/dist/lib.js
CHANGED