@webmcp-auto-ui/ui 2.5.28 → 2.5.29

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.
@@ -1,124 +0,0 @@
1
- ---
2
- widget: notebook-compact
3
- description: Reactive minimalist notebook with a left gutter showing cell types and named outputs. Cells chain via variable names (→ rows, → df) and display fresh/stale status. Minimal chrome, ideal for quick data exploration.
4
- schema:
5
- type: object
6
- properties:
7
- id:
8
- type: string
9
- description: Unique notebook identifier (for save/share via hyperskill)
10
- title:
11
- type: string
12
- description: Notebook title
13
- mode:
14
- type: string
15
- enum: [edit, view]
16
- description: edit allows run/edit/reorder; view hides all controls for read-only display
17
- cells:
18
- type: array
19
- description: Ordered list of cells (markdown, sql, js)
20
- items:
21
- type: object
22
- required: [type, content]
23
- properties:
24
- type:
25
- type: string
26
- enum: [md, sql, js]
27
- content:
28
- type: string
29
- description: Cell source (markdown text or code)
30
- name:
31
- type: string
32
- description: Optional cell name
33
- varname:
34
- type: string
35
- description: Named output variable (code cells only), displayed as → varname
36
- hideSource:
37
- type: boolean
38
- hideResult:
39
- type: boolean
40
- ---
41
-
42
- ## When to use
43
-
44
- Use `notebook-compact` when the user wants to explore data quickly with a minimal, reactive interface. Ideal for:
45
- - Iterative SQL / JS exploration where output variables feed each other
46
- - Quick prototyping where chrome should fade into the background
47
- - Hackathon playgrounds where users expect a familiar "type, see, share" flow
48
- - Situations where the reactive dataflow (fresh/stale status) helps the user reason about stale results
49
-
50
- Prefer over `notebook-workspace` when there is no multi-source concern and no publish/dashboard end goal.
51
- Prefer over `notebook-document` when collaboration and comments are not central.
52
- Prefer over `notebook-editorial` when the result is a working session, not a publication.
53
-
54
- ## How to use
55
-
56
- 1. **Create the widget** with a title and 2–4 seed cells:
57
- ```
58
- widget_display({name: "notebook-compact", params: {
59
- title: "Exploration",
60
- cells: [
61
- {type: "md", content: "### Quick look\n\nLet's inspect the data."},
62
- {type: "sql", content: "select * from source limit 10", varname: "rows"},
63
- {type: "js", content: "console.table(rows)"}
64
- ]
65
- }})
66
- ```
67
-
68
- 2. **Name outputs** (`varname`) on the SQL/JS cells so the gutter displays `→ varname` and downstream cells can reference them. Named outputs are injected into the scope of every JS cell executed after them; if a downstream cell's code mentions `varname` (word-boundary match), it is flagged **stale** whenever the upstream cell re-runs, so the user sees what needs replaying.
69
-
70
- 3. **Start markdown cells with a heading** (`### Title`) — the first line renders larger and gives the cell an anchor.
71
-
72
- 4. **Let the user iterate** — they can add cells with `+ md / + sql / + js`, reorder via the drag handle, toggle source/result, and run cells with the green pill button.
73
-
74
- ## Notes
75
-
76
- - The Run button lives at the left of each cell's title row, right after the type label.
77
- - Stop (red pill) appears while running, with a live elapsed timer.
78
- - After a run, Run becomes the replay button (same green pill, re-click to re-run).
79
- - **SQL cells** are dispatched to the first matching `*_query_sql` tool on the connected MCP data server (auto-detected).
80
- - **JS cells** execute on the main thread via `new Function(...)` with upstream named outputs injected as scope — `console.log` / `console.table` results are captured and rendered inline. Note: there is no worker isolation yet, so a `while (true)` loop or other synchronous blocker will freeze the UI thread.
81
- - Deletions prompt a confirmation modal and are recorded in the history panel; they can be restored from there.
82
- - `mode: "view"` hides all controls (run, delete, drag, add), making the notebook read-only.
83
-
84
- ## Left pane — connected data servers
85
-
86
- When one or more MCP data servers are connected, a collapsible **left pane** (bookmark-bar styling, collapsed by default) lists their recipes and tools. Clicking any recipe opens it in a viewer modal; each fenced code block inside the recipe has a `↳ inject` button that drops the snippet into the notebook as a new cell.
87
-
88
- Two toolbar buttons flank this pane:
89
-
90
- - **`+ md`** — 3-tab modal (New / File / URL) to create a markdown cell from scratch, a local `.md` file, or a remote URL.
91
- - **`+ recipe`** — 3-tab modal (Browser / File / URL) to import a recipe from a connected server, a local `.recipe.md` file, or a URL.
92
-
93
- ## Share & publish
94
-
95
- The `share` button offers **four formats**:
96
-
97
- - **Hyperskill link** — copies both the canonical Hyperskill URL and a short domain-scoped URL (`?n=<token>`). Opens at `nb.hyperskills.net` (read-only public viewer) when mode is `view`.
98
- - **Markdown** — downloads a `.md` file with the notebook content.
99
- - **PNG** — snapshots the rendered notebook to an image.
100
- - **JSON** — exports the full widget state for programmatic reuse.
101
-
102
- ## Integration with connected data servers
103
-
104
- If a MCP **data** server is connected (e.g. `tricoteuses`, `metmuseum`), BEFORE seeding cells:
105
-
106
- 1. Call `{server}_list_recipes()` or `{server}_search_recipes(query)` to find recipes that match the user's intent.
107
- 2. Call `{server}_list_tools()` to see available tables/endpoints.
108
- 3. For each high-signal recipe or table, seed ONE cell that demonstrates it: an SQL `SELECT ... LIMIT 10`, a `run_script` call, or a short markdown note.
109
- 4. Pass the server metadata via the `servers:` param so the UI can render the server menu modal and populate the left pane:
110
-
111
- ```ts
112
- widget_display({
113
- name: 'notebook-compact',
114
- params: {
115
- title: '...',
116
- cells: [...],
117
- servers: [{ name: 'tricoteuses', url: 'https://...', kind: 'data' }]
118
- }
119
- })
120
- ```
121
-
122
- If NO data server is connected, seed generic markdown-only cells that explain the notebook's purpose and invite the user to connect an MCP server.
123
-
124
- **Filter rule**: only include MCP *data* servers (`kind: 'data'`) in `servers:`. Do NOT include WebMCP UI servers like `autoui` — they don't expose queryable data and would clutter the menu.
@@ -1,139 +0,0 @@
1
- ---
2
- widget: notebook-document
3
- description: Collaborative notebook styled as a shared document. Optional editor avatars at the top (opt-in), inline highlights in prose, optional margin comments next to cells (editable + threaded replies). Minimal cell chrome, reads as a report with conversation around it.
4
- schema:
5
- type: object
6
- properties:
7
- id:
8
- type: string
9
- title:
10
- type: string
11
- mode:
12
- type: string
13
- enum: [edit, view]
14
- presence:
15
- type: array
16
- description: Optional list of editors to display as avatars at the top (opt-in). When absent or empty, no presence indicator is rendered.
17
- items:
18
- type: object
19
- properties:
20
- name:
21
- type: string
22
- color:
23
- type: string
24
- cells:
25
- type: array
26
- items:
27
- type: object
28
- required: [type, content]
29
- properties:
30
- type:
31
- type: string
32
- enum: [md, sql, js]
33
- content:
34
- type: string
35
- description: For md cells, markdown is rendered and sanitized (use <mark> for inline highlights).
36
- hideSource:
37
- type: boolean
38
- hideResult:
39
- type: boolean
40
- comment:
41
- type: object
42
- description: Optional margin comment attached to a code cell. Editable after creation; supports replies.
43
- properties:
44
- who:
45
- type: string
46
- when:
47
- type: string
48
- description: ISO timestamp or relative label. Relative time is recomputed from lastEditAt at render.
49
- body:
50
- type: string
51
- replies:
52
- type: array
53
- items:
54
- type: object
55
- properties:
56
- who: {type: string}
57
- when: {type: string}
58
- body: {type: string}
59
- ---
60
-
61
- ## When to use
62
-
63
- Use `notebook-document` when the notebook is meant to be read and discussed by a team:
64
- - Shared analyses where colleagues leave margin comments on specific cells
65
- - Onboarding guides, knowledge docs, incident retros
66
- - Any context where the notebook should feel like a Google Doc / Notion page, not a developer tool
67
-
68
- Prose cells can contain `<mark>` highlights inline to draw attention to a sentence, and code cells can carry an optional margin comment object showing who commented and when — comments are editable after creation and support threaded replies via a `+ reply` button.
69
-
70
- ## How to use
71
-
72
- 1. **Create with prose-heavy seed content** and inline highlights for emphasis:
73
- ```
74
- widget_display({name: "notebook-document", params: {
75
- title: "Weekly review",
76
- cells: [
77
- {type: "md", content: "Here is this week's summary. <mark>Pay attention to this metric.</mark> More context follows."},
78
- {type: "sql", content: "select ...", comment: {who: "reviewer", when: "2m", body: "Can we filter X here?"}},
79
- {type: "js", content: "// visualization"}
80
- ]
81
- }})
82
- ```
83
-
84
- 2. **Attach comments to code cells** by adding a `comment` object. The cell row splits into two columns (cell + comment) only when a comment exists. Comments can be edited inline after creation, and replies can be threaded under them via `+ reply`.
85
-
86
- 3. **Keep prose short** — the layout punishes walls of text. Break them into several markdown cells with their own handles.
87
-
88
- ## Notes
89
-
90
- - Every cell (prose or code) has its own drag handle for reordering.
91
- - Prose cells are rendered via an HTML-sanitizing markdown pipeline — `<mark>` is preserved, script/style and other dangerous tags are stripped (XSS closed).
92
- - `<mark>` inside markdown renders with an amber tint; use sparingly.
93
- - **Presence is opt-in**: the row of editor avatars and the "X editors online" label appear **only** when the `presence` param is explicitly provided with at least one entry. Without `presence`, nothing is rendered — no fake collaborators.
94
- - A timestamp under the title reads `edited Xs ago`, computed in real time from the notebook's last edit.
95
- - The footer shows a single `share` link that opens the share modal. (Live invite/collaboration is not available in this build.)
96
- - **SQL cells** dispatch to the connected MCP server's `*_query_sql` tool (auto-detected). **JS cells** run in an isolated Web Worker with upstream named outputs in scope.
97
- - Like the other notebook widgets, `mode: "view"` removes all editing and running controls.
98
-
99
- ## Left pane — resources from connected servers
100
-
101
- A collapsible **left pane** (bookmark-bar styling, collapsed by default) lists recipes and tools exposed by connected MCP data servers. Clicking any recipe opens a viewer modal; fenced code blocks expose a `↳ inject` button that drops the snippet in as a new cell.
102
-
103
- Two toolbar buttons flank this pane:
104
-
105
- - **`+ md`** — 3-tab modal (New / File / URL) to create a markdown cell from scratch, a local `.md` file, or a URL.
106
- - **`+ recipe`** — 3-tab modal (Browser / File / URL) to import a recipe from a connected server, a local `.recipe.md` file, or a URL.
107
-
108
- ## Share
109
-
110
- The `share` button offers **four formats**:
111
-
112
- - **Hyperskill link** — copies both the canonical Hyperskill URL and a short domain-scoped URL (`?n=<token>`). The read-only public viewer lives at `nb.hyperskills.net`.
113
- - **Markdown** — downloads a `.md` file.
114
- - **PNG** — snapshots the rendered document.
115
- - **JSON** — exports full widget state.
116
-
117
- ## Integration with connected data servers
118
-
119
- When a MCP **data** server is connected (for instance `tricoteuses` or `metmuseum`), the document should open on real material rather than empty placeholders. Before seeding cells, the agent takes a short discovery pass:
120
-
121
- 1. It calls `{server}_list_recipes()` or `{server}_search_recipes(query)` to locate recipes aligned with the user's topic.
122
- 2. It calls `{server}_list_tools()` to learn which tables and endpoints the server exposes.
123
- 3. For each relevant recipe or table, it seeds a single cell that grounds the document — a short SQL `SELECT ... LIMIT 10`, a `run_script` call, or a prose cell that introduces what the data shows. A margin `comment` on a code cell is a natural way to flag an open question for collaborators.
124
- 4. It passes the server metadata through the `servers:` param so the share affordance and the left pane reflect what is in play:
125
-
126
- ```ts
127
- widget_display({
128
- name: 'notebook-document',
129
- params: {
130
- title: '...',
131
- cells: [...],
132
- servers: [{ name: 'tricoteuses', url: 'https://...', kind: 'data' }]
133
- }
134
- })
135
- ```
136
-
137
- When no data server is connected, seed a prose-only skeleton that frames the discussion and invites the reader (or a colleague) to link an MCP server.
138
-
139
- **Filter rule**: only MCP *data* servers (`kind: 'data'`) appear in `servers:`. WebMCP UI servers such as `autoui` are excluded — they carry no queryable data and would clutter the collaborative view.
@@ -1,119 +0,0 @@
1
- ---
2
- widget: notebook-workspace
3
- description: Dense analyst workspace with a header bar (title, draft/published tag, run all, publish) and a left sidebar listing data sources and cells for navigation. Cells display their name, execution time, and row counts. Targets data-team workflows with a publishable deliverable.
4
- schema:
5
- type: object
6
- properties:
7
- id:
8
- type: string
9
- title:
10
- type: string
11
- mode:
12
- type: string
13
- enum: [edit, view]
14
- cells:
15
- type: array
16
- items:
17
- type: object
18
- required: [type, content]
19
- properties:
20
- type:
21
- type: string
22
- enum: [md, sql, js]
23
- content:
24
- type: string
25
- name:
26
- type: string
27
- description: Cell name shown in sidebar navigation (e.g. "intro", "sql_sales", "plot")
28
- hideSource:
29
- type: boolean
30
- hideResult:
31
- type: boolean
32
- ---
33
-
34
- ## When to use
35
-
36
- Use `notebook-workspace` for analyst-oriented work that needs:
37
- - Multi-cell analyses with named, navigable cells (sidebar)
38
- - A clear separation between the editing context and a publishable "app" view
39
- - A data source reference permanently visible (even as placeholder: "no source connected")
40
- - Team workflows where "run all" and "publish" are distinct actions
41
-
42
- This layout is more enterprise-flavoured than `notebook-compact`. Prefer it when the user is building something to hand off, not just exploring.
43
-
44
- ## How to use
45
-
46
- 1. **Create with named cells** so the sidebar navigation is meaningful:
47
- ```
48
- widget_display({name: "notebook-workspace", params: {
49
- title: "My analysis",
50
- cells: [
51
- {type: "md", name: "intro", content: "What we are investigating."},
52
- {type: "sql", name: "fetch_rows", content: "select * from source limit 100"},
53
- {type: "js", name: "visualize", content: "// chart the rows"}
54
- ]
55
- }})
56
- ```
57
-
58
- 2. **The sidebar shows** data sources (when connected) and the numbered list of cells. Clicking a cell item scrolls to it and focuses its textarea for immediate editing.
59
-
60
- 3. **The header has** `run all` / `share` / `publish` buttons.
61
- - **`run all`** sequentially executes every non-markdown cell from top to bottom.
62
- - **`publish`** is the primary (accent-coloured) CTA — it flips the notebook to `mode: 'view'`, tags it `published` (from `draft`), and emits a Hyperskill share link automatically.
63
- - The **title** is editable inline in the header and persists across reloads via localStorage.
64
-
65
- ## Notes
66
-
67
- - Cells are added via buttons in the sidebar (not in the header).
68
- - Run controls (green/red pill) sit at the left of each cell's header, right after the drag handle.
69
- - Each cell head can be renamed inline in the sidebar (click the "N · name" item).
70
- - The sidebar under "sources" shows a placeholder when no MCP source is connected. Each source row is clickable: a `connect via mcp…` entry opens the servers modal so the user can hook one up without leaving the notebook.
71
- - **SQL cells** dispatch to the connected MCP server's `*_query_sql` tool (auto-detected).
72
- - **JS cells** execute in an isolated Web Worker with upstream named outputs injected as scope.
73
-
74
- ## Left pane — resources from connected servers
75
-
76
- A collapsible **left pane** (bookmark-bar styling, collapsed by default) lists recipes and tools exposed by connected MCP data servers. Clicking any recipe opens a viewer modal; each fenced code block inside exposes a `↳ inject` button that drops the snippet into the notebook as a new cell.
77
-
78
- Two toolbar buttons flank this pane:
79
-
80
- - **`+ md`** — 3-tab modal (New / File / URL) to create a markdown cell from scratch, from a local `.md` file, or from a URL.
81
- - **`+ recipe`** — 3-tab modal (Browser / File / URL) to import a recipe from a connected server, a local `.recipe.md` file, or a URL.
82
-
83
- ## Share & publish
84
-
85
- The `share` button offers **four formats**:
86
-
87
- - **Hyperskill link** — copies both the canonical Hyperskill URL and a short domain-scoped URL (`?n=<token>`). The published view is served read-only at `nb.hyperskills.net`.
88
- - **Markdown** — downloads a `.md` file with the notebook content.
89
- - **PNG** — snapshots the rendered notebook.
90
- - **JSON** — exports full widget state.
91
-
92
- `publish` wraps these: it sets `mode: 'view'`, tags the notebook `published`, and copies the Hyperskill link in one gesture — the canonical way to hand off a finished analysis.
93
-
94
- ## Integration with connected data servers
95
-
96
- If a MCP **data** server is currently connected (the user has linked one, e.g. `tricoteuses`, `metmuseum`), BEFORE seeding cells the agent MUST:
97
-
98
- 1. Call `{server}_list_recipes()` or `{server}_search_recipes(query)` to discover data recipes relevant to the user's intent.
99
- 2. Call `{server}_list_tools()` to see available tables and endpoints.
100
- 3. For each high-signal recipe or table, seed ONE named cell that demonstrates it — typical shapes:
101
- - an SQL `SELECT ... LIMIT 10` with a meaningful cell name (e.g. `fetch_amendments`)
102
- - a `run_script` invocation for recipes requiring code
103
- - a short markdown cell describing the recipe and its parameters
104
- 4. Pass the server metadata via the `servers:` param so the sidebar "sources" section, the left pane, and the server menu modal render correctly:
105
-
106
- ```ts
107
- widget_display({
108
- name: 'notebook-workspace',
109
- params: {
110
- title: '...',
111
- cells: [...],
112
- servers: [{ name: 'tricoteuses', url: 'https://...', kind: 'data' }]
113
- }
114
- })
115
- ```
116
-
117
- If NO data server is connected, seed generic markdown-only cells that describe the intended analysis and invite the user to connect an MCP server — this matches the "no source connected" sidebar placeholder.
118
-
119
- **Filter rule**: only MCP *data* servers (`kind: 'data'`) belong in `servers:`. Do NOT include WebMCP UI servers such as `autoui` — they expose no queryable data and would clutter the sources sidebar.