@cplace/mcp-server 1.12.1 → 1.12.2

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.
@@ -0,0 +1,8 @@
1
+ {
2
+ "tags": [
3
+ "low-code",
4
+ "container",
5
+ "dashboard"
6
+ ],
7
+ "requiredApp": "cf.cplace.lowCodeWidgetRenderer"
8
+ }
@@ -0,0 +1,44 @@
1
+ ## Overview
2
+
3
+ This is the **bridge widget** between two different "widget" worlds in cplace. It does not render anything itself — it embeds an *author-built* low-code widget into a layout.
4
+
5
+ There are two distinct concepts that share the word "widget":
6
+
7
+ - **Layout widgets** (charts, tables, KPI tiles, this Embedded Widget) — platform/app widgets you place directly in a layout via `layout.define(...)`. They are what `cplace_list_widget_definitions` describes.
8
+ - **Low-Code Widget Builder widgets** — self-contained custom HTML/CSS/JS widgets authored in the Widget Builder and stored as **pages** of type `cf.cplace.lowCodeWidget.widgetDefinition`. They are *not* layout widgets and do not appear in the layout widget catalog.
9
+
10
+ The Embedded Widget is the **only** way to surface a Widget Builder widget on a page: you point it at a widget-definition page and it renders that widget's approved code. Build the widget itself in the **Low-Code Widget Builder** first; this widget just places the result.
11
+
12
+ ## When to Use This Widget
13
+
14
+ - You have (or will build) a custom HTML/CSS/JS widget in the Widget Builder and need to show it on a page or dashboard.
15
+ - You need interactivity and write-back beyond what `lowCodeText` (read-only computed HTML) or `lowCodeButton` (a single action) offer.
16
+
17
+ If you only need a computed number or a small read-only HTML fragment, prefer the **Low-Code Text** widget inside a rich string instead — it is much lighter than authoring a full Widget Builder widget.
18
+
19
+ ## Operating Modes (data source)
20
+
21
+ The embedded widget can either run its own baked-in data source or take one from the embedding layout:
22
+
23
+ - **Self-contained** (the default): the widget uses the `search` configured on its own definition. Best for landing pages and dashboards that should always show the same scope.
24
+ - **Embedding-page override**: the embedding layout supplies the data source, so the same widget renders data scoped to the host record. Best for detail widgets (e.g. KPI tiles on a record page). This is toggled by the `useDataSource` attribute.
25
+
26
+ ## Design Considerations
27
+
28
+ - **Author and approve the widget first.** This widget references an existing widget-definition page; it cannot create one. Widget code follows a Draft → Pending Review → Approved workflow, and the *renderer* shows the **approved** code. A widget that only has draft code will not render its latest edits here — approve it first.
29
+ - **App split.** Displaying an embedded widget requires the **Low-Code Widget Renderer** app; *authoring* widgets requires the **Low-Code Widget Builder** app. A workspace may have the Renderer without the Builder (display-only).
30
+ - **Height.** Embedded low-code widgets render in an isolated frame; if content is clipped, increase the configured height (or use auto height where appropriate).
31
+
32
+ ## Common Pitfalls
33
+
34
+ - **Confusing the two widget worlds.** Looking for a low-code widget in the layout catalog will fail — it lives as a `widgetDefinition` page. Use this Embedded Widget to bring it into a layout.
35
+ - **Pointing at an unapproved widget.** Only approved widget code renders; recent draft edits will not appear until the widget is approved.
36
+ - **Expecting the embedding context for free.** Whether the widget sees the host record's data depends on the `useDataSource` setting — decide it deliberately.
37
+
38
+ ## Related Widgets
39
+
40
+ | Widget | When to use instead |
41
+ |--------|---------------------|
42
+ | **Low-Code Text** (`cf.cplace.lowCodeWidgets.lowCodeText`) | Read-only computed text/HTML inside a rich string — no custom JS or write-back needed |
43
+ | **Low-Code Button** (`cf.cplace.lowCodeWidgets.lowCodeButton`) | A single user-triggered action, not a full custom widget |
44
+ | **Text without Widget Frame** (`cf.cplace.demoWidgets.demoRichString`) | Styled static HTML, or a host container for the lighter low-code widgets |
@@ -0,0 +1 @@
1
+ Embeds an author-built Low-Code Widget Builder widget (a `cf.cplace.lowCodeWidget.widgetDefinition` page) into a layout. Use it to place a custom HTML/CSS/JS widget — built and approved in the Widget Builder — onto a page or dashboard.
@@ -0,0 +1,7 @@
1
+ **Semantic Clarification**: Controls *where the widget's data comes from* — its own search vs. the embedding layout's.
2
+
3
+ **Valid Values**:
4
+ - `false` (self-contained, the common default): the widget uses the `search` baked into its own definition. Best for landing pages and dashboards that always show the same scope.
5
+ - `true` (embedding override): the embedding layout's data source supplies the widget's `pages`, so the same widget renders data scoped to the host record. Best for detail widgets (e.g. KPI tiles on a record page).
6
+
7
+ **Note**: When `false`, a `VALID_INCOMPLETE` warning about the `selection` attribute is expected and harmless. When `true`, configure the layout's data source (`search` / `tableWidgetId` / `selection`) accordingly.
@@ -0,0 +1,10 @@
1
+ **Warning**: This is the UID of a widget-*definition* page, not a layout widget kind.
2
+
3
+ **Correct Usage**: Pass the page UID (e.g. `page/abc123…`) of a `cf.cplace.lowCodeWidget.widgetDefinition` page — a widget built in the Low-Code Widget Builder. The Embedded Widget renders that page's **approved** code.
4
+
5
+ **Workflow**:
6
+ 1. Build and approve the widget in the Low-Code Widget Builder (it is a page of type `cf.cplace.lowCodeWidget.widgetDefinition`).
7
+ 2. Find that page's UID.
8
+ 3. Use the UID here.
9
+
10
+ **Note**: If only draft code exists, the latest edits will not render until the widget is approved.
@@ -147,3 +147,6 @@ Often used as a connected data source for the Low-Code Button. The table widget
147
147
 
148
148
  ### Attribute Group Widgets
149
149
  Common embedding containers for Low-Code Button widgets, allowing the button to be positioned alongside other page content.
150
+
151
+ ### Low-Code Widget Builder (Embedded Widget)
152
+ Consider the **Low-Code Widget Builder** instead when you need more than a single button — a full custom widget with its own HTML/CSS/JS, client-side interactivity, and write-back. Those widgets are authored in the Widget Builder (as `cf.cplace.lowCodeWidget.widgetDefinition` pages) and placed via the Embedded Widget (`cf.cplace.lowCodeWidgetBuilder.embeddedWidget`). The Low-Code Button remains the right choice for a single user-triggered action.
@@ -62,6 +62,7 @@ This widget can **only** be embedded inside rich string widgets. It cannot be pl
62
62
  - For user-triggered actions -- use the **Low-Code Button** instead
63
63
  - For standalone chart visualizations -- use **cplaceJS Highcharts** or **cplaceJS Line Chart**
64
64
  - For simple static text -- use the **Rich String** widget directly
65
+ - For a full custom widget with its own HTML/CSS/JS, client interactivity, and write-back -- build it in the **Low-Code Widget Builder** and embed it via the Embedded Widget (`cf.cplace.lowCodeWidgetBuilder.embeddedWidget`). Low-Code Text is read-only computed HTML inside a rich string; the Widget Builder is the right tool when you need an interactive, self-contained widget.
65
66
 
66
67
  ### Script Execution Considerations
67
68
  - Scripts execute synchronously during page rendering and on every re-evaluation
@@ -56,6 +56,7 @@ The widget can access pages from multiple sources: search queries, explicit sele
56
56
  |--------|---------------------|
57
57
  | **Citizen AI Streaming Chat** | Recommended for all new use cases - this is the replacement for the deprecated Chat Widget |
58
58
  | **Ask Your Page Widget** (`cf.cplace.citizenAi.askYourPageWidget`) | When you need simple, pre-configured "Ask Your Page" functionality without custom scripting |
59
+ | **Low-Code Widget Builder** (Embedded Widget `cf.cplace.lowCodeWidgetBuilder.embeddedWidget`) | When you need a full custom HTML/CSS/JS widget with your own UI and write-back rather than a chat interface — author it in the Widget Builder and embed it. AI calls can still be made from the widget's server script via Citizen AI. |
59
60
 
60
61
  ## Related Patterns
61
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplace/mcp-server",
3
- "version": "1.12.1",
3
+ "version": "1.12.2",
4
4
  "description": "MCP server that provides Claude Desktop with tools to interact with cplace APIs",
5
5
  "main": "dist/public-api.js",
6
6
  "types": "dist/public-api.d.ts",