@sentientui/mcp 0.21.0 → 0.22.1

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.
@@ -1627,7 +1627,7 @@ function registerGuardrailTools(server, client) {
1627
1627
  "list_guardrail_events",
1628
1628
  {
1629
1629
  title: "List guardrail events",
1630
- description: "List every variant currently paused by a guardrail (a paused variant stops serving until unpaused, however long ago the pause fired). Pass `days` to narrow to pauses fired within the last N days." + UNTRUSTED_FIELDS_NOTE,
1630
+ description: "List every variant currently paused (a paused variant stops serving until unpaused, however long ago the pause fired). `source` says who paused it: 'guardrail' = automatically, for converting clearly worse; 'manual' = a teammate paused it by hand (do not suggest resuming those without asking who paused them). Pass `days` to narrow to pauses fired within the last N days." + UNTRUSTED_FIELDS_NOTE,
1631
1631
  inputSchema: {
1632
1632
  projectId: projectIdSchema,
1633
1633
  days: z8.number().int().min(1).max(365).optional().describe("Only pauses fired within the last N days. Omit for every still-paused variant.")
@@ -1636,9 +1636,10 @@ function registerGuardrailTools(server, client) {
1636
1636
  events: z8.array(
1637
1637
  z8.object({
1638
1638
  componentId: z8.string(),
1639
- variantIds: z8.array(z8.string()).describe("Variants paused by the guardrail"),
1639
+ variantIds: z8.array(z8.string()).describe("Variants paused together"),
1640
1640
  pausedAt: z8.string().nullable().describe("ISO timestamp the pause fired, or null"),
1641
- funnelId: z8.string().nullable().describe("Set when the pause came from a funnel guardrail")
1641
+ funnelId: z8.string().nullable().describe("Set when the pause came from a funnel guardrail"),
1642
+ source: z8.enum(["guardrail", "manual"]).describe("'guardrail' = paused automatically; 'manual' = paused by a teammate")
1642
1643
  })
1643
1644
  ).describe("Currently paused variants (empty if none)")
1644
1645
  },
@@ -1654,24 +1655,25 @@ function registerGuardrailTools(server, client) {
1654
1655
  const data = await client.get(`/projects/${id}/guardrail-events${query}`);
1655
1656
  const structuredContent = {
1656
1657
  events: data.guardrailEvents.map((e) => {
1657
- var _a;
1658
+ var _a, _b;
1658
1659
  return {
1659
1660
  componentId: e.componentId,
1660
1661
  variantIds: e.variantIds,
1661
1662
  pausedAt: e.pausedAt,
1662
- funnelId: (_a = e.funnelId) != null ? _a : null
1663
+ funnelId: (_a = e.funnelId) != null ? _a : null,
1664
+ source: (_b = e.source) != null ? _b : "guardrail"
1663
1665
  };
1664
1666
  })
1665
1667
  };
1666
1668
  if (!data.guardrailEvents.length) {
1667
- const scope = days != null ? `paused by a guardrail in the last ${days} days` : "currently paused by a guardrail";
1669
+ const scope = days != null ? `paused in the last ${days} days` : "currently paused";
1668
1670
  return {
1669
1671
  content: [{ type: "text", text: `No variants ${scope}.` }],
1670
1672
  structuredContent
1671
1673
  };
1672
1674
  }
1673
- const lines = data.guardrailEvents.map(
1674
- (e) => `- ${untrusted(e.componentId)}: variants [${e.variantIds.map((v) => untrusted(v)).join(", ")}] paused${e.pausedAt ? ` at ${e.pausedAt}` : ""}${e.funnelId ? ` (protecting the ${untrusted(e.funnelId)} funnel)` : ""}`
1675
+ const lines = structuredContent.events.map(
1676
+ (e) => `- ${untrusted(e.componentId)}: variants [${e.variantIds.map((v) => untrusted(v)).join(", ")}] ${e.source === "manual" ? "paused by a teammate" : "paused automatically by a guardrail"}${e.pausedAt ? ` at ${e.pausedAt}` : ""}${e.funnelId ? ` (protecting the ${untrusted(e.funnelId)} funnel)` : ""}`
1675
1677
  );
1676
1678
  return { content: [{ type: "text", text: lines.join("\n") }], structuredContent };
1677
1679
  })
@@ -2936,7 +2938,8 @@ function registerCellTools(server, client) {
2936
2938
  refinedFrom: z15.string().nullable().describe("Live version this one would replace; that version keeps serving until approval"),
2937
2939
  updatedAt: z15.string()
2938
2940
  })
2939
- )
2941
+ ),
2942
+ total: z15.number().int().describe("How many versions are waiting in all. The list holds at most the oldest 200; decide those to see the rest.")
2940
2943
  },
2941
2944
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false }
2942
2945
  },
@@ -2957,10 +2960,11 @@ function registerCellTools(server, client) {
2957
2960
  updatedAt: String(r.updatedAt)
2958
2961
  };
2959
2962
  });
2963
+ const total = typeof data.total === "number" ? data.total : reviews.length;
2960
2964
  if (reviews.length === 0) {
2961
2965
  return {
2962
2966
  content: [{ type: "text", text: "No generated versions are waiting for review." }],
2963
- structuredContent: { reviews }
2967
+ structuredContent: { reviews, total }
2964
2968
  };
2965
2969
  }
2966
2970
  const lines = reviews.map(
@@ -2971,8 +2975,11 @@ function registerCellTools(server, client) {
2971
2975
  r.refinedFrom ? ` Would replace ${untrusted(r.refinedFrom, 64)}, which keeps serving until approval.` : null
2972
2976
  ].filter((l) => l !== null).join("\n")
2973
2977
  );
2978
+ if (total > reviews.length) {
2979
+ lines.unshift(`Showing the ${reviews.length} oldest of ${total} versions waiting. Decide on these to see the rest.`, "");
2980
+ }
2974
2981
  lines.push("", "Approve or reject each with review_cell (slotId + persona) once the user has decided.");
2975
- return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: { reviews } };
2982
+ return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: { reviews, total } };
2976
2983
  })
2977
2984
  );
2978
2985
  server.registerTool(
@@ -3019,7 +3026,7 @@ function registerCellTools(server, client) {
3019
3026
  }
3020
3027
 
3021
3028
  // src/server.ts
3022
- var PKG_VERSION = true ? "0.21.0" : "0.0.0-dev";
3029
+ var PKG_VERSION = true ? "0.22.1" : "0.0.0-dev";
3023
3030
  function createMcpServer(client) {
3024
3031
  const server = new McpServer(
3025
3032
  {
package/dist/index.cjs CHANGED
@@ -1631,7 +1631,7 @@ function registerGuardrailTools(server, client) {
1631
1631
  "list_guardrail_events",
1632
1632
  {
1633
1633
  title: "List guardrail events",
1634
- description: "List every variant currently paused by a guardrail (a paused variant stops serving until unpaused, however long ago the pause fired). Pass `days` to narrow to pauses fired within the last N days." + UNTRUSTED_FIELDS_NOTE,
1634
+ description: "List every variant currently paused (a paused variant stops serving until unpaused, however long ago the pause fired). `source` says who paused it: 'guardrail' = automatically, for converting clearly worse; 'manual' = a teammate paused it by hand (do not suggest resuming those without asking who paused them). Pass `days` to narrow to pauses fired within the last N days." + UNTRUSTED_FIELDS_NOTE,
1635
1635
  inputSchema: {
1636
1636
  projectId: projectIdSchema,
1637
1637
  days: import_zod8.z.number().int().min(1).max(365).optional().describe("Only pauses fired within the last N days. Omit for every still-paused variant.")
@@ -1640,9 +1640,10 @@ function registerGuardrailTools(server, client) {
1640
1640
  events: import_zod8.z.array(
1641
1641
  import_zod8.z.object({
1642
1642
  componentId: import_zod8.z.string(),
1643
- variantIds: import_zod8.z.array(import_zod8.z.string()).describe("Variants paused by the guardrail"),
1643
+ variantIds: import_zod8.z.array(import_zod8.z.string()).describe("Variants paused together"),
1644
1644
  pausedAt: import_zod8.z.string().nullable().describe("ISO timestamp the pause fired, or null"),
1645
- funnelId: import_zod8.z.string().nullable().describe("Set when the pause came from a funnel guardrail")
1645
+ funnelId: import_zod8.z.string().nullable().describe("Set when the pause came from a funnel guardrail"),
1646
+ source: import_zod8.z.enum(["guardrail", "manual"]).describe("'guardrail' = paused automatically; 'manual' = paused by a teammate")
1646
1647
  })
1647
1648
  ).describe("Currently paused variants (empty if none)")
1648
1649
  },
@@ -1658,24 +1659,25 @@ function registerGuardrailTools(server, client) {
1658
1659
  const data = await client.get(`/projects/${id}/guardrail-events${query}`);
1659
1660
  const structuredContent = {
1660
1661
  events: data.guardrailEvents.map((e) => {
1661
- var _a2;
1662
+ var _a2, _b;
1662
1663
  return {
1663
1664
  componentId: e.componentId,
1664
1665
  variantIds: e.variantIds,
1665
1666
  pausedAt: e.pausedAt,
1666
- funnelId: (_a2 = e.funnelId) != null ? _a2 : null
1667
+ funnelId: (_a2 = e.funnelId) != null ? _a2 : null,
1668
+ source: (_b = e.source) != null ? _b : "guardrail"
1667
1669
  };
1668
1670
  })
1669
1671
  };
1670
1672
  if (!data.guardrailEvents.length) {
1671
- const scope = days != null ? `paused by a guardrail in the last ${days} days` : "currently paused by a guardrail";
1673
+ const scope = days != null ? `paused in the last ${days} days` : "currently paused";
1672
1674
  return {
1673
1675
  content: [{ type: "text", text: `No variants ${scope}.` }],
1674
1676
  structuredContent
1675
1677
  };
1676
1678
  }
1677
- const lines = data.guardrailEvents.map(
1678
- (e) => `- ${untrusted(e.componentId)}: variants [${e.variantIds.map((v) => untrusted(v)).join(", ")}] paused${e.pausedAt ? ` at ${e.pausedAt}` : ""}${e.funnelId ? ` (protecting the ${untrusted(e.funnelId)} funnel)` : ""}`
1679
+ const lines = structuredContent.events.map(
1680
+ (e) => `- ${untrusted(e.componentId)}: variants [${e.variantIds.map((v) => untrusted(v)).join(", ")}] ${e.source === "manual" ? "paused by a teammate" : "paused automatically by a guardrail"}${e.pausedAt ? ` at ${e.pausedAt}` : ""}${e.funnelId ? ` (protecting the ${untrusted(e.funnelId)} funnel)` : ""}`
1679
1681
  );
1680
1682
  return { content: [{ type: "text", text: lines.join("\n") }], structuredContent };
1681
1683
  })
@@ -2940,7 +2942,8 @@ function registerCellTools(server, client) {
2940
2942
  refinedFrom: import_zod15.z.string().nullable().describe("Live version this one would replace; that version keeps serving until approval"),
2941
2943
  updatedAt: import_zod15.z.string()
2942
2944
  })
2943
- )
2945
+ ),
2946
+ total: import_zod15.z.number().int().describe("How many versions are waiting in all. The list holds at most the oldest 200; decide those to see the rest.")
2944
2947
  },
2945
2948
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false }
2946
2949
  },
@@ -2961,10 +2964,11 @@ function registerCellTools(server, client) {
2961
2964
  updatedAt: String(r.updatedAt)
2962
2965
  };
2963
2966
  });
2967
+ const total = typeof data.total === "number" ? data.total : reviews.length;
2964
2968
  if (reviews.length === 0) {
2965
2969
  return {
2966
2970
  content: [{ type: "text", text: "No generated versions are waiting for review." }],
2967
- structuredContent: { reviews }
2971
+ structuredContent: { reviews, total }
2968
2972
  };
2969
2973
  }
2970
2974
  const lines = reviews.map(
@@ -2975,8 +2979,11 @@ function registerCellTools(server, client) {
2975
2979
  r.refinedFrom ? ` Would replace ${untrusted(r.refinedFrom, 64)}, which keeps serving until approval.` : null
2976
2980
  ].filter((l) => l !== null).join("\n")
2977
2981
  );
2982
+ if (total > reviews.length) {
2983
+ lines.unshift(`Showing the ${reviews.length} oldest of ${total} versions waiting. Decide on these to see the rest.`, "");
2984
+ }
2978
2985
  lines.push("", "Approve or reject each with review_cell (slotId + persona) once the user has decided.");
2979
- return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: { reviews } };
2986
+ return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: { reviews, total } };
2980
2987
  })
2981
2988
  );
2982
2989
  server.registerTool(
@@ -3023,7 +3030,7 @@ function registerCellTools(server, client) {
3023
3030
  }
3024
3031
 
3025
3032
  // src/server.ts
3026
- var PKG_VERSION = true ? "0.21.0" : "0.0.0-dev";
3033
+ var PKG_VERSION = true ? "0.22.1" : "0.0.0-dev";
3027
3034
  function createMcpServer(client) {
3028
3035
  const server = new import_mcp.McpServer(
3029
3036
  {
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ApiClient,
4
4
  createMcpServer
5
- } from "./chunk-K7JN3LOH.js";
5
+ } from "./chunk-LD4CVJVO.js";
6
6
 
7
7
  // src/index.ts
8
8
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
package/dist/lib.cjs CHANGED
@@ -1657,7 +1657,7 @@ function registerGuardrailTools(server, client) {
1657
1657
  "list_guardrail_events",
1658
1658
  {
1659
1659
  title: "List guardrail events",
1660
- description: "List every variant currently paused by a guardrail (a paused variant stops serving until unpaused, however long ago the pause fired). Pass `days` to narrow to pauses fired within the last N days." + UNTRUSTED_FIELDS_NOTE,
1660
+ description: "List every variant currently paused (a paused variant stops serving until unpaused, however long ago the pause fired). `source` says who paused it: 'guardrail' = automatically, for converting clearly worse; 'manual' = a teammate paused it by hand (do not suggest resuming those without asking who paused them). Pass `days` to narrow to pauses fired within the last N days." + UNTRUSTED_FIELDS_NOTE,
1661
1661
  inputSchema: {
1662
1662
  projectId: projectIdSchema,
1663
1663
  days: import_zod8.z.number().int().min(1).max(365).optional().describe("Only pauses fired within the last N days. Omit for every still-paused variant.")
@@ -1666,9 +1666,10 @@ function registerGuardrailTools(server, client) {
1666
1666
  events: import_zod8.z.array(
1667
1667
  import_zod8.z.object({
1668
1668
  componentId: import_zod8.z.string(),
1669
- variantIds: import_zod8.z.array(import_zod8.z.string()).describe("Variants paused by the guardrail"),
1669
+ variantIds: import_zod8.z.array(import_zod8.z.string()).describe("Variants paused together"),
1670
1670
  pausedAt: import_zod8.z.string().nullable().describe("ISO timestamp the pause fired, or null"),
1671
- funnelId: import_zod8.z.string().nullable().describe("Set when the pause came from a funnel guardrail")
1671
+ funnelId: import_zod8.z.string().nullable().describe("Set when the pause came from a funnel guardrail"),
1672
+ source: import_zod8.z.enum(["guardrail", "manual"]).describe("'guardrail' = paused automatically; 'manual' = paused by a teammate")
1672
1673
  })
1673
1674
  ).describe("Currently paused variants (empty if none)")
1674
1675
  },
@@ -1684,24 +1685,25 @@ function registerGuardrailTools(server, client) {
1684
1685
  const data = await client.get(`/projects/${id}/guardrail-events${query}`);
1685
1686
  const structuredContent = {
1686
1687
  events: data.guardrailEvents.map((e) => {
1687
- var _a;
1688
+ var _a, _b;
1688
1689
  return {
1689
1690
  componentId: e.componentId,
1690
1691
  variantIds: e.variantIds,
1691
1692
  pausedAt: e.pausedAt,
1692
- funnelId: (_a = e.funnelId) != null ? _a : null
1693
+ funnelId: (_a = e.funnelId) != null ? _a : null,
1694
+ source: (_b = e.source) != null ? _b : "guardrail"
1693
1695
  };
1694
1696
  })
1695
1697
  };
1696
1698
  if (!data.guardrailEvents.length) {
1697
- const scope = days != null ? `paused by a guardrail in the last ${days} days` : "currently paused by a guardrail";
1699
+ const scope = days != null ? `paused in the last ${days} days` : "currently paused";
1698
1700
  return {
1699
1701
  content: [{ type: "text", text: `No variants ${scope}.` }],
1700
1702
  structuredContent
1701
1703
  };
1702
1704
  }
1703
- const lines = data.guardrailEvents.map(
1704
- (e) => `- ${untrusted(e.componentId)}: variants [${e.variantIds.map((v) => untrusted(v)).join(", ")}] paused${e.pausedAt ? ` at ${e.pausedAt}` : ""}${e.funnelId ? ` (protecting the ${untrusted(e.funnelId)} funnel)` : ""}`
1705
+ const lines = structuredContent.events.map(
1706
+ (e) => `- ${untrusted(e.componentId)}: variants [${e.variantIds.map((v) => untrusted(v)).join(", ")}] ${e.source === "manual" ? "paused by a teammate" : "paused automatically by a guardrail"}${e.pausedAt ? ` at ${e.pausedAt}` : ""}${e.funnelId ? ` (protecting the ${untrusted(e.funnelId)} funnel)` : ""}`
1705
1707
  );
1706
1708
  return { content: [{ type: "text", text: lines.join("\n") }], structuredContent };
1707
1709
  })
@@ -2966,7 +2968,8 @@ function registerCellTools(server, client) {
2966
2968
  refinedFrom: import_zod15.z.string().nullable().describe("Live version this one would replace; that version keeps serving until approval"),
2967
2969
  updatedAt: import_zod15.z.string()
2968
2970
  })
2969
- )
2971
+ ),
2972
+ total: import_zod15.z.number().int().describe("How many versions are waiting in all. The list holds at most the oldest 200; decide those to see the rest.")
2970
2973
  },
2971
2974
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false }
2972
2975
  },
@@ -2987,10 +2990,11 @@ function registerCellTools(server, client) {
2987
2990
  updatedAt: String(r.updatedAt)
2988
2991
  };
2989
2992
  });
2993
+ const total = typeof data.total === "number" ? data.total : reviews.length;
2990
2994
  if (reviews.length === 0) {
2991
2995
  return {
2992
2996
  content: [{ type: "text", text: "No generated versions are waiting for review." }],
2993
- structuredContent: { reviews }
2997
+ structuredContent: { reviews, total }
2994
2998
  };
2995
2999
  }
2996
3000
  const lines = reviews.map(
@@ -3001,8 +3005,11 @@ function registerCellTools(server, client) {
3001
3005
  r.refinedFrom ? ` Would replace ${untrusted(r.refinedFrom, 64)}, which keeps serving until approval.` : null
3002
3006
  ].filter((l) => l !== null).join("\n")
3003
3007
  );
3008
+ if (total > reviews.length) {
3009
+ lines.unshift(`Showing the ${reviews.length} oldest of ${total} versions waiting. Decide on these to see the rest.`, "");
3010
+ }
3004
3011
  lines.push("", "Approve or reject each with review_cell (slotId + persona) once the user has decided.");
3005
- return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: { reviews } };
3012
+ return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: { reviews, total } };
3006
3013
  })
3007
3014
  );
3008
3015
  server.registerTool(
@@ -3049,7 +3056,7 @@ function registerCellTools(server, client) {
3049
3056
  }
3050
3057
 
3051
3058
  // src/server.ts
3052
- var PKG_VERSION = true ? "0.21.0" : "0.0.0-dev";
3059
+ var PKG_VERSION = true ? "0.22.1" : "0.0.0-dev";
3053
3060
  function createMcpServer(client) {
3054
3061
  const server = new import_mcp.McpServer(
3055
3062
  {
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-K7JN3LOH.js";
7
+ } from "./chunk-LD4CVJVO.js";
8
8
 
9
9
  // src/tool-catalog.ts
10
10
  var TOOL_CATALOG = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentientui/mcp",
3
- "version": "0.21.0",
3
+ "version": "0.22.1",
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",
@@ -48,7 +48,7 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@modelcontextprotocol/sdk": "^1.29.0",
51
+ "@modelcontextprotocol/sdk": "^1.32.1",
52
52
  "zod": "^3.23.8"
53
53
  },
54
54
  "devDependencies": {