@sentientui/mcp 0.18.1 → 0.18.3

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.
@@ -1804,10 +1804,11 @@ time.
1804
1804
  1. Run \`npx @sentientui/cli init\` (detects Next App/Pages, Vite, Remix, CRA; installs
1805
1805
  @sentientui/react; writes .env.local; scaffolds an example). It does NOT edit your layout \u2014
1806
1806
  it prints the wrap snippet for step 2.
1807
- 2. Wrap the root layout with <AdaptiveRoot apiKey context> (from '@sentientui/react/next';
1808
- other React apps use <AdaptiveProvider> from '@sentientui/react') and add
1809
- suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes pre-paint.
1810
- Nothing adapts and nothing is tracked until this wrap is in place.
1807
+ 2. Wrap the root layout with <AdaptiveRoot apiKey>{children}</AdaptiveRoot> (from
1808
+ '@sentientui/react/next'; other React apps use <AdaptiveProvider> from '@sentientui/react')
1809
+ and add suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes
1810
+ pre-paint. Nothing adapts and nothing is tracked until this wrap is in place. Declare no
1811
+ components here: every <Adaptive> registers itself when it renders (see Rung 2).
1811
1812
  3. \`npm run dev\`, then open the app with \`?sentient_persona=a\` vs
1812
1813
  \`?sentient_persona=b\` to see it adapt \u2014 in keyless local mode any key drives the built-in
1813
1814
  heuristic. No API key needed. Against a real project the key must be one you declared.
@@ -1844,9 +1845,17 @@ original:
1844
1845
 
1845
1846
  Mount + deploy registers the region. SentientUI writes versions per visitor type in the
1846
1847
  dashboard ("Who sees what") \u2014 no redeploy. The children render for holdout traffic, unknown
1847
- visitor types, types with no version yet, and every error path. No server preload: mounted
1848
- regions are requested in one batched call. First visit shows the original briefly, then swaps;
1849
- return visits start from the last version. Keyless local mode renders originals only. Pass
1848
+ visitor types, types with no version yet, and every error path. Mounted regions are requested
1849
+ in one batched call after mount: the first visit shows the original briefly, then swaps; return
1850
+ visits start from the last version. Keyless local mode renders originals only.
1851
+
1852
+ Optional server preload (Next.js App Router): registrySlotIds={['hero-cta']} for generated
1853
+ regions, components={[{ id, variantIds }]} for code variants, both on AdaptiveRoot \u2014 the first
1854
+ paint then shows the served version. List ONLY ids rendered on every page that AdaptiveRoot
1855
+ wraps (in app/layout.tsx, every route): a declared id is decided on every request, rendered or
1856
+ not, and those visits count as views that can never convert.
1857
+
1858
+ Pass
1850
1859
  onFormSubmit to allow form versions; set reportBaselineText={false} on regions wrapping
1851
1860
  personalized or account content. (Formerly <AdaptiveSlot>.)
1852
1861
 
@@ -2106,18 +2115,23 @@ function registerCellTools(server, client) {
2106
2115
  personas: z15.array(personaOutput),
2107
2116
  cells: z15.array(cellOutput),
2108
2117
  autoFill: z15.boolean(),
2109
- personaSource: z15.string().describe("Active persona-set source: default | declared | discovered"),
2118
+ // Nullable: a project with no persona set at all reports null, not a
2119
+ // string. That is the NORMAL state since the default vocabulary was
2120
+ // emptied, so a non-nullable schema failed output validation on most
2121
+ // projects and the tool returned nothing but a zod error.
2122
+ personaSource: z15.string().nullable().describe('Active persona-set source: default | declared | discovered, or null when the project has no persona set (one "everyone" row)'),
2110
2123
  undecidedShare: z15.number()
2111
2124
  },
2112
2125
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false }
2113
2126
  },
2114
2127
  withApiErrorGuidance(async ({ projectId }) => {
2128
+ var _a;
2115
2129
  const id = encodeURIComponent(projectId);
2116
2130
  const data = await client.get(`/projects/${id}/cells`);
2117
2131
  const byCell = new Map(data.cells.map((c) => [`${c.slotId}::${c.persona}`, c]));
2118
2132
  const lines = [
2119
2133
  `Slots: ${data.slots.map((s) => `${untrusted(s.displayName)}${s.live === false ? " [draft]" : ""}`).join(", ") || "(none published)"}`,
2120
- `Auto-fill on first miss: ${data.autoFill ? "ON" : "off"} \xB7 persona source: ${data.personaSource}`
2134
+ `Auto-fill on first miss: ${data.autoFill ? "ON" : "off"} \xB7 persona source: ${(_a = data.personaSource) != null ? _a : 'none (one "everyone" row)'}`
2121
2135
  ];
2122
2136
  for (const p of data.personas) {
2123
2137
  const states = data.slots.map((s) => {
@@ -2232,7 +2246,7 @@ function registerCellTools(server, client) {
2232
2246
  }
2233
2247
 
2234
2248
  // src/server.ts
2235
- var PKG_VERSION = true ? "0.18.1" : "0.0.0-dev";
2249
+ var PKG_VERSION = true ? "0.18.3" : "0.0.0-dev";
2236
2250
  function createMcpServer(client) {
2237
2251
  const server = new McpServer(
2238
2252
  {
package/dist/index.cjs CHANGED
@@ -1810,10 +1810,11 @@ time.
1810
1810
  1. Run \`npx @sentientui/cli init\` (detects Next App/Pages, Vite, Remix, CRA; installs
1811
1811
  @sentientui/react; writes .env.local; scaffolds an example). It does NOT edit your layout \u2014
1812
1812
  it prints the wrap snippet for step 2.
1813
- 2. Wrap the root layout with <AdaptiveRoot apiKey context> (from '@sentientui/react/next';
1814
- other React apps use <AdaptiveProvider> from '@sentientui/react') and add
1815
- suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes pre-paint.
1816
- Nothing adapts and nothing is tracked until this wrap is in place.
1813
+ 2. Wrap the root layout with <AdaptiveRoot apiKey>{children}</AdaptiveRoot> (from
1814
+ '@sentientui/react/next'; other React apps use <AdaptiveProvider> from '@sentientui/react')
1815
+ and add suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes
1816
+ pre-paint. Nothing adapts and nothing is tracked until this wrap is in place. Declare no
1817
+ components here: every <Adaptive> registers itself when it renders (see Rung 2).
1817
1818
  3. \`npm run dev\`, then open the app with \`?sentient_persona=a\` vs
1818
1819
  \`?sentient_persona=b\` to see it adapt \u2014 in keyless local mode any key drives the built-in
1819
1820
  heuristic. No API key needed. Against a real project the key must be one you declared.
@@ -1850,9 +1851,17 @@ original:
1850
1851
 
1851
1852
  Mount + deploy registers the region. SentientUI writes versions per visitor type in the
1852
1853
  dashboard ("Who sees what") \u2014 no redeploy. The children render for holdout traffic, unknown
1853
- visitor types, types with no version yet, and every error path. No server preload: mounted
1854
- regions are requested in one batched call. First visit shows the original briefly, then swaps;
1855
- return visits start from the last version. Keyless local mode renders originals only. Pass
1854
+ visitor types, types with no version yet, and every error path. Mounted regions are requested
1855
+ in one batched call after mount: the first visit shows the original briefly, then swaps; return
1856
+ visits start from the last version. Keyless local mode renders originals only.
1857
+
1858
+ Optional server preload (Next.js App Router): registrySlotIds={['hero-cta']} for generated
1859
+ regions, components={[{ id, variantIds }]} for code variants, both on AdaptiveRoot \u2014 the first
1860
+ paint then shows the served version. List ONLY ids rendered on every page that AdaptiveRoot
1861
+ wraps (in app/layout.tsx, every route): a declared id is decided on every request, rendered or
1862
+ not, and those visits count as views that can never convert.
1863
+
1864
+ Pass
1856
1865
  onFormSubmit to allow form versions; set reportBaselineText={false} on regions wrapping
1857
1866
  personalized or account content. (Formerly <AdaptiveSlot>.)
1858
1867
 
@@ -2112,18 +2121,23 @@ function registerCellTools(server, client) {
2112
2121
  personas: import_zod15.z.array(personaOutput),
2113
2122
  cells: import_zod15.z.array(cellOutput),
2114
2123
  autoFill: import_zod15.z.boolean(),
2115
- personaSource: import_zod15.z.string().describe("Active persona-set source: default | declared | discovered"),
2124
+ // Nullable: a project with no persona set at all reports null, not a
2125
+ // string. That is the NORMAL state since the default vocabulary was
2126
+ // emptied, so a non-nullable schema failed output validation on most
2127
+ // projects and the tool returned nothing but a zod error.
2128
+ personaSource: import_zod15.z.string().nullable().describe('Active persona-set source: default | declared | discovered, or null when the project has no persona set (one "everyone" row)'),
2116
2129
  undecidedShare: import_zod15.z.number()
2117
2130
  },
2118
2131
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false }
2119
2132
  },
2120
2133
  withApiErrorGuidance(async ({ projectId }) => {
2134
+ var _a2;
2121
2135
  const id = encodeURIComponent(projectId);
2122
2136
  const data = await client.get(`/projects/${id}/cells`);
2123
2137
  const byCell = new Map(data.cells.map((c) => [`${c.slotId}::${c.persona}`, c]));
2124
2138
  const lines = [
2125
2139
  `Slots: ${data.slots.map((s) => `${untrusted(s.displayName)}${s.live === false ? " [draft]" : ""}`).join(", ") || "(none published)"}`,
2126
- `Auto-fill on first miss: ${data.autoFill ? "ON" : "off"} \xB7 persona source: ${data.personaSource}`
2140
+ `Auto-fill on first miss: ${data.autoFill ? "ON" : "off"} \xB7 persona source: ${(_a2 = data.personaSource) != null ? _a2 : 'none (one "everyone" row)'}`
2127
2141
  ];
2128
2142
  for (const p of data.personas) {
2129
2143
  const states = data.slots.map((s) => {
@@ -2238,7 +2252,7 @@ function registerCellTools(server, client) {
2238
2252
  }
2239
2253
 
2240
2254
  // src/server.ts
2241
- var PKG_VERSION = true ? "0.18.1" : "0.0.0-dev";
2255
+ var PKG_VERSION = true ? "0.18.3" : "0.0.0-dev";
2242
2256
  function createMcpServer(client) {
2243
2257
  const server = new import_mcp.McpServer(
2244
2258
  {
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ApiClient,
4
4
  createMcpServer
5
- } from "./chunk-HEMPCGWX.js";
5
+ } from "./chunk-FPHH4LA7.js";
6
6
 
7
7
  // src/index.ts
8
8
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/dist/lib.cjs CHANGED
@@ -1834,10 +1834,11 @@ time.
1834
1834
  1. Run \`npx @sentientui/cli init\` (detects Next App/Pages, Vite, Remix, CRA; installs
1835
1835
  @sentientui/react; writes .env.local; scaffolds an example). It does NOT edit your layout \u2014
1836
1836
  it prints the wrap snippet for step 2.
1837
- 2. Wrap the root layout with <AdaptiveRoot apiKey context> (from '@sentientui/react/next';
1838
- other React apps use <AdaptiveProvider> from '@sentientui/react') and add
1839
- suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes pre-paint.
1840
- Nothing adapts and nothing is tracked until this wrap is in place.
1837
+ 2. Wrap the root layout with <AdaptiveRoot apiKey>{children}</AdaptiveRoot> (from
1838
+ '@sentientui/react/next'; other React apps use <AdaptiveProvider> from '@sentientui/react')
1839
+ and add suppressHydrationWarning to <html> \u2014 an inline script sets persona attributes
1840
+ pre-paint. Nothing adapts and nothing is tracked until this wrap is in place. Declare no
1841
+ components here: every <Adaptive> registers itself when it renders (see Rung 2).
1841
1842
  3. \`npm run dev\`, then open the app with \`?sentient_persona=a\` vs
1842
1843
  \`?sentient_persona=b\` to see it adapt \u2014 in keyless local mode any key drives the built-in
1843
1844
  heuristic. No API key needed. Against a real project the key must be one you declared.
@@ -1874,9 +1875,17 @@ original:
1874
1875
 
1875
1876
  Mount + deploy registers the region. SentientUI writes versions per visitor type in the
1876
1877
  dashboard ("Who sees what") \u2014 no redeploy. The children render for holdout traffic, unknown
1877
- visitor types, types with no version yet, and every error path. No server preload: mounted
1878
- regions are requested in one batched call. First visit shows the original briefly, then swaps;
1879
- return visits start from the last version. Keyless local mode renders originals only. Pass
1878
+ visitor types, types with no version yet, and every error path. Mounted regions are requested
1879
+ in one batched call after mount: the first visit shows the original briefly, then swaps; return
1880
+ visits start from the last version. Keyless local mode renders originals only.
1881
+
1882
+ Optional server preload (Next.js App Router): registrySlotIds={['hero-cta']} for generated
1883
+ regions, components={[{ id, variantIds }]} for code variants, both on AdaptiveRoot \u2014 the first
1884
+ paint then shows the served version. List ONLY ids rendered on every page that AdaptiveRoot
1885
+ wraps (in app/layout.tsx, every route): a declared id is decided on every request, rendered or
1886
+ not, and those visits count as views that can never convert.
1887
+
1888
+ Pass
1880
1889
  onFormSubmit to allow form versions; set reportBaselineText={false} on regions wrapping
1881
1890
  personalized or account content. (Formerly <AdaptiveSlot>.)
1882
1891
 
@@ -2136,18 +2145,23 @@ function registerCellTools(server, client) {
2136
2145
  personas: import_zod15.z.array(personaOutput),
2137
2146
  cells: import_zod15.z.array(cellOutput),
2138
2147
  autoFill: import_zod15.z.boolean(),
2139
- personaSource: import_zod15.z.string().describe("Active persona-set source: default | declared | discovered"),
2148
+ // Nullable: a project with no persona set at all reports null, not a
2149
+ // string. That is the NORMAL state since the default vocabulary was
2150
+ // emptied, so a non-nullable schema failed output validation on most
2151
+ // projects and the tool returned nothing but a zod error.
2152
+ personaSource: import_zod15.z.string().nullable().describe('Active persona-set source: default | declared | discovered, or null when the project has no persona set (one "everyone" row)'),
2140
2153
  undecidedShare: import_zod15.z.number()
2141
2154
  },
2142
2155
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false }
2143
2156
  },
2144
2157
  withApiErrorGuidance(async ({ projectId }) => {
2158
+ var _a;
2145
2159
  const id = encodeURIComponent(projectId);
2146
2160
  const data = await client.get(`/projects/${id}/cells`);
2147
2161
  const byCell = new Map(data.cells.map((c) => [`${c.slotId}::${c.persona}`, c]));
2148
2162
  const lines = [
2149
2163
  `Slots: ${data.slots.map((s) => `${untrusted(s.displayName)}${s.live === false ? " [draft]" : ""}`).join(", ") || "(none published)"}`,
2150
- `Auto-fill on first miss: ${data.autoFill ? "ON" : "off"} \xB7 persona source: ${data.personaSource}`
2164
+ `Auto-fill on first miss: ${data.autoFill ? "ON" : "off"} \xB7 persona source: ${(_a = data.personaSource) != null ? _a : 'none (one "everyone" row)'}`
2151
2165
  ];
2152
2166
  for (const p of data.personas) {
2153
2167
  const states = data.slots.map((s) => {
@@ -2262,7 +2276,7 @@ function registerCellTools(server, client) {
2262
2276
  }
2263
2277
 
2264
2278
  // src/server.ts
2265
- var PKG_VERSION = true ? "0.18.1" : "0.0.0-dev";
2279
+ var PKG_VERSION = true ? "0.18.3" : "0.0.0-dev";
2266
2280
  function createMcpServer(client) {
2267
2281
  const server = new import_mcp.McpServer(
2268
2282
  {
package/dist/lib.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  ApiError,
5
5
  PUBLIC_UI_RESOURCE_URIS,
6
6
  createMcpServer
7
- } from "./chunk-HEMPCGWX.js";
7
+ } from "./chunk-FPHH4LA7.js";
8
8
  export {
9
9
  ApiClient,
10
10
  ApiError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentientui/mcp",
3
- "version": "0.18.1",
3
+ "version": "0.18.3",
4
4
  "description": "MCP server for SentientUI — exposes project data and actions to AI agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://sentient-ui.com",