@plitzi/sdk-mcp 0.38.11 → 0.38.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,130 @@
1
1
  # @plitzi/sdk-mcp
2
2
 
3
+ ## 0.38.13
4
+
5
+ ### Patch Changes
6
+
7
+ - v0.38.13
8
+ - Updated dependencies
9
+ - @plitzi/plitzi-sdk@0.38.13
10
+ - @plitzi/sdk-authoring@0.38.13
11
+ - @plitzi/sdk-schema@0.38.13
12
+ - @plitzi/sdk-server@0.38.13
13
+ - @plitzi/sdk-shared@0.38.13
14
+ - @plitzi/sdk-style@0.38.13
15
+
16
+ ## 0.38.12
17
+
18
+ ### Patch Changes
19
+
20
+ - 1301338: ## Builder
21
+
22
+ - **Icons in the canvas again** (`@plitzi/plitzi-builder`): the canvas inlined the SDK's Font Awesome sheet into its
23
+ `<style>`, where the sheet's `url(webfonts/…)` resolved against the editor's URL — a `srcdoc` frame takes it as its
24
+ base — so every icon was a 404 under `/spaces/<space>/webfonts/` and drew as an empty box. Only the Vite dev server,
25
+ which rewrites the URL, hid it. The canvas and the element preview now link the sheet from where the host serves it:
26
+ a new prop, `sdkIconsStylePath`, the one the host already gives the pages it renders
27
+ (`/sdk-assets/plitzi-sdk-icons.css` for sdk-server). Absent, the canvas links no icon sheet.
28
+
29
+ ## Plugins
30
+ - **A plugin's other elements, hosted by `custom`** (`@plitzi/sdk-elements`): `custom({ renderType: 'jamDisc' })` on a
31
+ space with a plugin installed whose main element is another (`plitzi plugin pack` of several folders: the first is the
32
+ plugin, the rest go in it) rendered "Custom Component jamDisc Not Found" — the page registers only the plugin's main
33
+ element, and a `custom` host looked nowhere else. It now loads the type from the installed plugin that packs it, as
34
+ an element of the type itself always did, so the two ways the docs give to place a plugin's element are the same
35
+ everywhere: in a project `plitzi create` wrote, and once the project is on Plitzi.
36
+ - **One way to place a plugin's element** (`@plitzi/sdk-authoring`, `@plitzi/cli`, docs): from its declaration,
37
+ `const seatPicker = defineElement(declaration)` then `seatPicker({ id, … })` — typed by what it
38
+ declares, and the element the builder adds when somebody drops it. The welcome space `plitzi create` writes, the
39
+ plugin package's preview, `plitzi plugin add` and `plitzi explain` all write it so (the template's
40
+ `PluginHostOptions` now takes the plugin's `type` and `declaration: { from, attributes? }`; `custom`/`element` hosting
41
+ is gone). `pluginFolders(folder)` (`@plitzi/sdk-authoring/node`) reads each plugin with the folder it is in;
42
+ `pluginDeclarations` is built on it. A `custom({ renderType })` naming a plugin the space was handed the declaration
43
+ of is offered the declaration instead — suggestion `plugin-custom-host`. `custom` stays for a component registered
44
+ by name with no declaration. The skills, the CLI README, the MCP guide, `docs/en` and the website say the same.
45
+ - **`definePlugin`** (`@plitzi/sdk-authoring/plugin`, a new entry of 3 KB with nothing else in it): a plugin's
46
+ declaration written from what only it can say —
47
+ `definePlugin<SeatPickerAttributes>()({ type, label, attributes, triggers, callbacks })` — and every other field
48
+ at the default all plugins share (the builder's gestures, the catalogue entry, each attribute bindable, an empty
49
+ style). It answers the whole declaration, branded with its attributes, so `defineElement(declaration)` is typed
50
+ without a generic. `plitzi plugin add` and `create --plugin` write declarations with it (about a third of the lines).
51
+ - **`usePluginTrigger(declaration)`** (`@plitzi/plitzi-sdk`): fires a plugin's declared event on its element — the
52
+ event name and what each hands a flow typed off the declaration's `preview` — on a live page only. The hook every
53
+ plugin wrote for itself (and `plugin add` generated as `use<Name>Events`) is gone from the scaffold.
54
+ - **Attributes as the types their defaults are** (`@plitzi/sdk-elements`): a plugin's attribute bound from text — a
55
+ state, a row, a channel message — reaches its component as the number or the flag its declared default is (`'112'`
56
+ as 112, `'true'` as true). A plugin no longer types its props `number | string` and parses them.
57
+
58
+ ## Server actions and functions
59
+ - **Task params with rules** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`): a task declares `required`, a text's
60
+ `maxLength` and a number's `min`/`max`, and the runner refuses a call that breaks any of them — every rule broken at
61
+ once, in the words the page shows (`Title is required; Seconds is at most 300`) — before the code runs. A `text` param
62
+ bound to a number arrives as its digits. The manifest keeps the rules, so the platform's sandbox checks the same.
63
+ - **`taskAction(task, { trigger })`** (`@plitzi/sdk-authoring`): the action that runs one of the space's tasks and
64
+ answers its result, derived from the task — its id (`<namespace>-<action>`), name, description and input (the task's
65
+ params, once). An action of more than one step is still `defineAction`.
66
+ - **`ctx.rateLimit(bucket, { …, refuse })`**: past the limit the call is refused with those words instead of answering
67
+ `allowed: false` for the code to check — natively and in the sandbox.
68
+
69
+ ## Authoring
70
+ - **`runServerActionOrNotify(id, params, fallback)`**: a server action run and the notice the visitor reads when it
71
+ fails — the action's own refusal, or the fallback — as two steps to spread into a flow.
72
+ - **`repeated-shape` reads what copies bind**: copies whose bindings read their data in different forms (a count, a
73
+ total of a quota) and copies holding a provider resolved on the server (found by its own id) are no longer offered
74
+ as one component.
75
+ - **`element-color-inherited`** (suggestion): `elements` giving a heading, a text, a link… `color: inherit` or the
76
+ page's own colour. **A link inherits the page's colour** (`@plitzi/plitzi-sdk`, `@plitzi/sdk-elements`) rather than
77
+ holding the SDK's grey — the same by default, and the space's palette inside a card that is a link. The template
78
+ every space starts from writes its colours once, on the page.
79
+
80
+ ## Fixes
81
+ - **A dialog opened with an id** (`@plitzi/sdk-elements`): `openDialog('dialog', '{{ row.id }}')` reads the id as its
82
+ `content`, as `openModal` already did — a numeric id parsed as the number and the dialog's bindings read nothing.
83
+ - **A select's chevron** (`@plitzi/plitzi-sdk`): a drawn chevron in the field's own colour, sized by its type, in place
84
+ of the `▼` glyph — and laid out in the box, so it ends where the box's padding begins whatever that padding is, and
85
+ the chosen option stops short of it instead of running under it. A disabled select's is faded.
86
+ - **Every element has its settings** (`@plitzi/plitzi-builder`, `@plitzi/sdk-elements`): the builder found none for
87
+ `tabContainerHeader` (registered under a misspelt type), `themeToggle`, `dropdownPopup`, `loading` and `notFound`.
88
+ The theme toggle's panel sets its mode, its labels and whether it offers "System"; the registry is typed by element
89
+ type and must hold one for each.
90
+ - **A plugin's panel** (`@plitzi/cli`): `plitzi doctor` warns of a plugin with no `Settings.tsx`, or one its entry never
91
+ passes as `pluginSettings` (`plugin-settings-missing`); the example `create` writes has its panel, as every element
92
+ `plugin add` writes does, and the panels it generates are laid out as the project's Prettier lays them out.
93
+ - **A refused or failed run reaches `onFlowError` in every mode** (`@plitzi/sdk-interactions`): an awaited server
94
+ action the server refused fired no `onFlowError` on the element that started it, as `detached` and `stream` ones do
95
+ — a board rolling its edits back on a refusal never did; and a run answered `status: 'failed'` fired `onFlowEnd`
96
+ (detached) or nothing (awaited) rather than `onFlowError`.
97
+ - **A source renamed** (`@plitzi/sdk-shared`): the binding picker lists a provider, a form or a modal by the name its
98
+ element has now, not the one it had when it mounted.
99
+ - **A text's words in the builder** (`@plitzi/sdk-elements`): a `paragraph`, `text` or `heading` whose `content` is
100
+ `0` shows `0` while editing too, not its placeholder; one bound to nothing shows nothing rather than `null`.
101
+ - **Built-in declarations** (`@plitzi/sdk-shared`): `elementDeclaration` fills in what every element shares — the
102
+ builder's gestures, Plitzi's catalogue entry, a visible element with no bindings, its style named by its label —
103
+ from the defaults `definePlugin` uses; each element's declaration says only what is its own (a third of the lines).
104
+
105
+ ## Typed for plugins and hosts
106
+ - **`usePlitzi()` and `PlitziProvider`** (`@plitzi/sdk-shared/hooks/usePlitzi`, `@plitzi/plitzi-sdk`): what were
107
+ `usePlitziServiceContext()` and `PlitziServiceProvider` (and `PlitziServiceContextValue`, now `PlitziContextValue`),
108
+ holding only what the host rendering a space knows — `settings`, `root`, `utils`. Its `contexts` and
109
+ `customContexts` are gone: every context it carried is a shared one already, imported from its own module
110
+ (`@plitzi/sdk-interactions/InteractionsContext`, `@plitzi/sdk-shared/network/NetworkContext`…), and
111
+ `PluginsContext` moves to `@plitzi/sdk-shared/plugins/PluginsContext` beside the others.
112
+ - **`InteractionsManagerApi`** (`@plitzi/sdk-shared`): the interactions manager as everything outside
113
+ `@plitzi/sdk-interactions` reaches it, declared where every package can name it and implemented by
114
+ `InteractionsManager`, so `use(InteractionsContext)` is typed — `interactionTrigger`, `createChildManager`… — where it
115
+ was `any`.
116
+ - **`getPathsFromObject`** (`@plitzi/sdk-shared/helpers/utils`), spelt right; `getPathsFromObeject` is gone.
117
+ - **`ElementWords` places itself** (`@plitzi/sdk-elements`): `contentPlacement` and the element's children, so a button
118
+ and a link write their words once.
119
+
120
+ - Updated dependencies [1301338]
121
+ - @plitzi/plitzi-sdk@0.38.12
122
+ - @plitzi/sdk-server@0.38.12
123
+ - @plitzi/sdk-authoring@0.38.12
124
+ - @plitzi/sdk-schema@0.38.12
125
+ - @plitzi/sdk-shared@0.38.12
126
+ - @plitzi/sdk-style@0.38.12
127
+
3
128
  ## 0.38.11
4
129
 
5
130
  ### Patch Changes
@@ -132,7 +132,8 @@ Never download a whole tree you do not need.
132
132
  - \`plitzi://types\` — element types **observed in this space** (ground truth): props, slots, subTypes, plus each
133
133
  type's \`label\`, \`description\` (what it is FOR) and \`category\`, and a \`source\` (\`builtin\` | \`plugin\` | \`unknown\`).
134
134
  Read the descriptions to pick the right type — e.g. \`apiContainer\` fetches backend data into the frontend,
135
- \`link\` navigates between pages, \`list\` repeats a template over a data array. \`plugin\` types are custom elements.
135
+ \`link\` navigates between pages, \`list\` repeats a template over a data array. \`plugin\` types are the elements
136
+ of the plugins the space installed: added by their type, like a built-in.
136
137
  - \`plitzi://css-properties\` — valid kebab-case CSS property keys.
137
138
  - \`plitzi://explain/{name}\` — what a name means: an element type's attributes, triggers and callbacks; a step's
138
139
  params and what it publishes; what a trigger hands its flow; a problem code's fix. \`plitzi://explain/steps\` (or
@@ -258,8 +259,8 @@ space already had is not repeated on every batch — and none of them blocks any
258
259
  page being shown: the \`current\` state marks it (see *Pages & folders*).
259
260
  - \`repeated-shape\` — one structure written again with other words: a **component** with props
260
261
  (\`upsertComponent { fromRef }\` turns one copy into it), or, for sibling rows of data, one \`repeatElement\`/\`list\`.
261
- A few cards a person rewords by hand can stay cards; siblings that read different data or keep different state are
262
- controls written alike, and are not offered.
262
+ A few cards a person rewords by hand can stay cards; siblings that bind different data, keep different state, fill
263
+ from a template of their own or render on the server are controls written alike, and are not offered.
263
264
  - \`content-attribute\` — a \`button\` or \`link\` whose children are only a \`text\` and/or a \`fontAwesome\`: its words
264
265
  are its own \`content\` and the icon its \`icon\`. What the text's class adds (\`white-space: nowrap\`) moves to the
265
266
  box's class — never the class itself; the icon's class goes in the \`icon\` slot.
@@ -270,6 +271,8 @@ space already had is not repeated on every batch — and none of them blocks any
270
271
  - \`unused-class\`, \`unused-token\`, \`unused-component\` — declared and read by nothing: remove it
271
272
  (\`deleteDefinition\`, \`deleteStyleVariable\`, \`deleteComponent\`), or use it where it was meant to go. Said
272
273
  when a batch leaves one behind.
274
+ - \`element-color-inherited\` — the space's \`elements\` giving a type \`color: inherit\` or the page's own colour,
275
+ which every element — a link's words included — takes by itself: remove it, and name the colour once on the page.
273
276
  - \`literal-colour\` — a class painted from the palette typing out a token's light value: \`var(--token)\` when it
274
277
  should follow the scheme; a token of one value when it must stay the same in both.
275
278
  \`plitzi://explain/<code>\` explains each. Take one unless the copies are about to diverge; one left on purpose is
@@ -72,7 +72,7 @@ var createMcpServer = async ({ adapters, getGrant, preview, screenshot, logger,
72
72
  const getSpace = () => spacePromise ??= loadSpace();
73
73
  const server = new McpServer({
74
74
  name: "plitzi-mcp",
75
- version: "0.38.11"
75
+ version: "0.38.13"
76
76
  }, { instructions: hasSpace ? serverInstructions : widgetsOnlyInstructions });
77
77
  const { getChanges } = adapters;
78
78
  registerResources(server, getSpace, MCP_ENV, log, hasSpace, getChanges ? (query) => getChanges(requireSpaceId(), MCP_ENV, query) : void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-mcp",
3
- "version": "0.38.11",
3
+ "version": "0.38.13",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist",
@@ -30,12 +30,12 @@
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/ext-apps": "^1.7.5",
32
32
  "@modelcontextprotocol/sdk": "^1.32.0",
33
- "@plitzi/plitzi-sdk": "0.38.11",
34
- "@plitzi/sdk-authoring": "0.38.11",
35
- "@plitzi/sdk-schema": "0.38.11",
36
- "@plitzi/sdk-server": "0.38.11",
37
- "@plitzi/sdk-shared": "0.38.11",
38
- "@plitzi/sdk-style": "0.38.11",
33
+ "@plitzi/plitzi-sdk": "0.38.13",
34
+ "@plitzi/sdk-authoring": "0.38.13",
35
+ "@plitzi/sdk-schema": "0.38.13",
36
+ "@plitzi/sdk-server": "0.38.13",
37
+ "@plitzi/sdk-shared": "0.38.13",
38
+ "@plitzi/sdk-style": "0.38.13",
39
39
  "ejs": "^6.0.1",
40
40
  "esbuild": "^0.28.2",
41
41
  "zod": "^4.6.5"