@plitzi/sdk-mcp 0.38.10 → 0.38.12
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,300 @@
|
|
|
1
1
|
# @plitzi/sdk-mcp
|
|
2
2
|
|
|
3
|
+
## 0.38.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1301338: ## Builder
|
|
8
|
+
|
|
9
|
+
- **Icons in the canvas again** (`@plitzi/plitzi-builder`): the canvas inlined the SDK's Font Awesome sheet into its
|
|
10
|
+
`<style>`, where the sheet's `url(webfonts/…)` resolved against the editor's URL — a `srcdoc` frame takes it as its
|
|
11
|
+
base — so every icon was a 404 under `/spaces/<space>/webfonts/` and drew as an empty box. Only the Vite dev server,
|
|
12
|
+
which rewrites the URL, hid it. The canvas and the element preview now link the sheet from where the host serves it:
|
|
13
|
+
a new prop, `sdkIconsStylePath`, the one the host already gives the pages it renders
|
|
14
|
+
(`/sdk-assets/plitzi-sdk-icons.css` for sdk-server). Absent, the canvas links no icon sheet.
|
|
15
|
+
|
|
16
|
+
## Plugins
|
|
17
|
+
- **A plugin's other elements, hosted by `custom`** (`@plitzi/sdk-elements`): `custom({ renderType: 'jamDisc' })` on a
|
|
18
|
+
space with a plugin installed whose main element is another (`plitzi plugin pack` of several folders: the first is the
|
|
19
|
+
plugin, the rest go in it) rendered "Custom Component jamDisc Not Found" — the page registers only the plugin's main
|
|
20
|
+
element, and a `custom` host looked nowhere else. It now loads the type from the installed plugin that packs it, as
|
|
21
|
+
an element of the type itself always did, so the two ways the docs give to place a plugin's element are the same
|
|
22
|
+
everywhere: in a project `plitzi create` wrote, and once the project is on Plitzi.
|
|
23
|
+
- **One way to place a plugin's element** (`@plitzi/sdk-authoring`, `@plitzi/cli`, docs): from its declaration,
|
|
24
|
+
`const seatPicker = defineElement(declaration)` then `seatPicker({ id, … })` — typed by what it
|
|
25
|
+
declares, and the element the builder adds when somebody drops it. The welcome space `plitzi create` writes, the
|
|
26
|
+
plugin package's preview, `plitzi plugin add` and `plitzi explain` all write it so (the template's
|
|
27
|
+
`PluginHostOptions` now takes the plugin's `type` and `declaration: { from, attributes? }`; `custom`/`element` hosting
|
|
28
|
+
is gone). `pluginFolders(folder)` (`@plitzi/sdk-authoring/node`) reads each plugin with the folder it is in;
|
|
29
|
+
`pluginDeclarations` is built on it. A `custom({ renderType })` naming a plugin the space was handed the declaration
|
|
30
|
+
of is offered the declaration instead — suggestion `plugin-custom-host`. `custom` stays for a component registered
|
|
31
|
+
by name with no declaration. The skills, the CLI README, the MCP guide, `docs/en` and the website say the same.
|
|
32
|
+
- **`definePlugin`** (`@plitzi/sdk-authoring/plugin`, a new entry of 3 KB with nothing else in it): a plugin's
|
|
33
|
+
declaration written from what only it can say —
|
|
34
|
+
`definePlugin<SeatPickerAttributes>()({ type, label, attributes, triggers, callbacks })` — and every other field
|
|
35
|
+
at the default all plugins share (the builder's gestures, the catalogue entry, each attribute bindable, an empty
|
|
36
|
+
style). It answers the whole declaration, branded with its attributes, so `defineElement(declaration)` is typed
|
|
37
|
+
without a generic. `plitzi plugin add` and `create --plugin` write declarations with it (about a third of the lines).
|
|
38
|
+
- **`usePluginTrigger(declaration)`** (`@plitzi/plitzi-sdk`): fires a plugin's declared event on its element — the
|
|
39
|
+
event name and what each hands a flow typed off the declaration's `preview` — on a live page only. The hook every
|
|
40
|
+
plugin wrote for itself (and `plugin add` generated as `use<Name>Events`) is gone from the scaffold.
|
|
41
|
+
- **Attributes as the types their defaults are** (`@plitzi/sdk-elements`): a plugin's attribute bound from text — a
|
|
42
|
+
state, a row, a channel message — reaches its component as the number or the flag its declared default is (`'112'`
|
|
43
|
+
as 112, `'true'` as true). A plugin no longer types its props `number | string` and parses them.
|
|
44
|
+
|
|
45
|
+
## Server actions and functions
|
|
46
|
+
- **Task params with rules** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`): a task declares `required`, a text's
|
|
47
|
+
`maxLength` and a number's `min`/`max`, and the runner refuses a call that breaks any of them — every rule broken at
|
|
48
|
+
once, in the words the page shows (`Title is required; Seconds is at most 300`) — before the code runs. A `text` param
|
|
49
|
+
bound to a number arrives as its digits. The manifest keeps the rules, so the platform's sandbox checks the same.
|
|
50
|
+
- **`taskAction(task, { trigger })`** (`@plitzi/sdk-authoring`): the action that runs one of the space's tasks and
|
|
51
|
+
answers its result, derived from the task — its id (`<namespace>-<action>`), name, description and input (the task's
|
|
52
|
+
params, once). An action of more than one step is still `defineAction`.
|
|
53
|
+
- **`ctx.rateLimit(bucket, { …, refuse })`**: past the limit the call is refused with those words instead of answering
|
|
54
|
+
`allowed: false` for the code to check — natively and in the sandbox.
|
|
55
|
+
|
|
56
|
+
## Authoring
|
|
57
|
+
- **`runServerActionOrNotify(id, params, fallback)`**: a server action run and the notice the visitor reads when it
|
|
58
|
+
fails — the action's own refusal, or the fallback — as two steps to spread into a flow.
|
|
59
|
+
- **`repeated-shape` reads what copies bind**: copies whose bindings read their data in different forms (a count, a
|
|
60
|
+
total of a quota) and copies holding a provider resolved on the server (found by its own id) are no longer offered
|
|
61
|
+
as one component.
|
|
62
|
+
- **`element-color-inherited`** (suggestion): `elements` giving a heading, a text, a link… `color: inherit` or the
|
|
63
|
+
page's own colour. **A link inherits the page's colour** (`@plitzi/plitzi-sdk`, `@plitzi/sdk-elements`) rather than
|
|
64
|
+
holding the SDK's grey — the same by default, and the space's palette inside a card that is a link. The template
|
|
65
|
+
every space starts from writes its colours once, on the page.
|
|
66
|
+
|
|
67
|
+
## Fixes
|
|
68
|
+
- **A dialog opened with an id** (`@plitzi/sdk-elements`): `openDialog('dialog', '{{ row.id }}')` reads the id as its
|
|
69
|
+
`content`, as `openModal` already did — a numeric id parsed as the number and the dialog's bindings read nothing.
|
|
70
|
+
- **A select's chevron** (`@plitzi/plitzi-sdk`): a drawn chevron in the field's own colour, sized by its type, in place
|
|
71
|
+
of the `▼` glyph — and laid out in the box, so it ends where the box's padding begins whatever that padding is, and
|
|
72
|
+
the chosen option stops short of it instead of running under it. A disabled select's is faded.
|
|
73
|
+
- **Every element has its settings** (`@plitzi/plitzi-builder`, `@plitzi/sdk-elements`): the builder found none for
|
|
74
|
+
`tabContainerHeader` (registered under a misspelt type), `themeToggle`, `dropdownPopup`, `loading` and `notFound`.
|
|
75
|
+
The theme toggle's panel sets its mode, its labels and whether it offers "System"; the registry is typed by element
|
|
76
|
+
type and must hold one for each.
|
|
77
|
+
- **A plugin's panel** (`@plitzi/cli`): `plitzi doctor` warns of a plugin with no `Settings.tsx`, or one its entry never
|
|
78
|
+
passes as `pluginSettings` (`plugin-settings-missing`); the example `create` writes has its panel, as every element
|
|
79
|
+
`plugin add` writes does, and the panels it generates are laid out as the project's Prettier lays them out.
|
|
80
|
+
- **A refused or failed run reaches `onFlowError` in every mode** (`@plitzi/sdk-interactions`): an awaited server
|
|
81
|
+
action the server refused fired no `onFlowError` on the element that started it, as `detached` and `stream` ones do
|
|
82
|
+
— a board rolling its edits back on a refusal never did; and a run answered `status: 'failed'` fired `onFlowEnd`
|
|
83
|
+
(detached) or nothing (awaited) rather than `onFlowError`.
|
|
84
|
+
- **A source renamed** (`@plitzi/sdk-shared`): the binding picker lists a provider, a form or a modal by the name its
|
|
85
|
+
element has now, not the one it had when it mounted.
|
|
86
|
+
- **A text's words in the builder** (`@plitzi/sdk-elements`): a `paragraph`, `text` or `heading` whose `content` is
|
|
87
|
+
`0` shows `0` while editing too, not its placeholder; one bound to nothing shows nothing rather than `null`.
|
|
88
|
+
- **Built-in declarations** (`@plitzi/sdk-shared`): `elementDeclaration` fills in what every element shares — the
|
|
89
|
+
builder's gestures, Plitzi's catalogue entry, a visible element with no bindings, its style named by its label —
|
|
90
|
+
from the defaults `definePlugin` uses; each element's declaration says only what is its own (a third of the lines).
|
|
91
|
+
|
|
92
|
+
## Typed for plugins and hosts
|
|
93
|
+
- **`usePlitzi()` and `PlitziProvider`** (`@plitzi/sdk-shared/hooks/usePlitzi`, `@plitzi/plitzi-sdk`): what were
|
|
94
|
+
`usePlitziServiceContext()` and `PlitziServiceProvider` (and `PlitziServiceContextValue`, now `PlitziContextValue`),
|
|
95
|
+
holding only what the host rendering a space knows — `settings`, `root`, `utils`. Its `contexts` and
|
|
96
|
+
`customContexts` are gone: every context it carried is a shared one already, imported from its own module
|
|
97
|
+
(`@plitzi/sdk-interactions/InteractionsContext`, `@plitzi/sdk-shared/network/NetworkContext`…), and
|
|
98
|
+
`PluginsContext` moves to `@plitzi/sdk-shared/plugins/PluginsContext` beside the others.
|
|
99
|
+
- **`InteractionsManagerApi`** (`@plitzi/sdk-shared`): the interactions manager as everything outside
|
|
100
|
+
`@plitzi/sdk-interactions` reaches it, declared where every package can name it and implemented by
|
|
101
|
+
`InteractionsManager`, so `use(InteractionsContext)` is typed — `interactionTrigger`, `createChildManager`… — where it
|
|
102
|
+
was `any`.
|
|
103
|
+
- **`getPathsFromObject`** (`@plitzi/sdk-shared/helpers/utils`), spelt right; `getPathsFromObeject` is gone.
|
|
104
|
+
- **`ElementWords` places itself** (`@plitzi/sdk-elements`): `contentPlacement` and the element's children, so a button
|
|
105
|
+
and a link write their words once.
|
|
106
|
+
|
|
107
|
+
- Updated dependencies [1301338]
|
|
108
|
+
- @plitzi/plitzi-sdk@0.38.12
|
|
109
|
+
- @plitzi/sdk-server@0.38.12
|
|
110
|
+
- @plitzi/sdk-authoring@0.38.12
|
|
111
|
+
- @plitzi/sdk-schema@0.38.12
|
|
112
|
+
- @plitzi/sdk-shared@0.38.12
|
|
113
|
+
- @plitzi/sdk-style@0.38.12
|
|
114
|
+
|
|
115
|
+
## 0.38.11
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- cadf70a: - **`server.cache.invalidate` drops what a page is rendered from** (`@plitzi/sdk-server`): the pages, the RSC answers
|
|
120
|
+
and the schema data they are rendered from go together. It dropped the pages alone, and the next request rendered
|
|
121
|
+
the same page again from the schema still cached under the same key — a publish that invalidated the space changed
|
|
122
|
+
nothing until the schema's TTL ran out. `clear()` and `size` cover the three. A filter on `hostname` drops the schema
|
|
123
|
+
data too, which belongs to no one host. `server.cache` is `null` only when nothing is cached (`cacheTtlMs: 0` and
|
|
124
|
+
`rsc.cacheTtlMs: 0`).
|
|
125
|
+
|
|
126
|
+
## Style inspector
|
|
127
|
+
- **Finds a property** (`@plitzi/sdk-style`): a search above the categories narrows them to the ones that edit what was
|
|
128
|
+
typed — a CSS name in any order of its words (`border radius` finds the four corners), a category's title, or a
|
|
129
|
+
common word for it (`bg`, `rounded`) — opens them, and shows the advanced rows when the match lives there. Escape
|
|
130
|
+
clears it. The categories' properties live in one list (`categoryKeys.ts`) that the dots, the advanced hint and the
|
|
131
|
+
search all read.
|
|
132
|
+
- **Rows that fit**: a section with more than two controls puts its label above them and lays them out in as many
|
|
133
|
+
columns as the panel is wide, instead of one row where every label was cut (`Appearan…`, `Cell Spaci…`, the five
|
|
134
|
+
scroll-snap controls). A row's label column is 80px.
|
|
135
|
+
- **Where a value comes from, said quietly**: the label's tint keeps its four meanings — set here, from a token, bound
|
|
136
|
+
to data, inherited — without the solid blocks of colour; hovering says which (an inherited one names its selector and
|
|
137
|
+
breakpoint) and that a click resets it, the click shows it by striking the label through. The footer's info icon
|
|
138
|
+
holds the legend, and its arrow folds every category.
|
|
139
|
+
- **What is being edited**: an "Editing … › Hover" line under the pickers whenever the rules being written are not the
|
|
140
|
+
selector's plain ones, with a button back to them. Ancestor, pseudo-element and condition fold behind a toggle —
|
|
141
|
+
never while one is in use.
|
|
142
|
+
- The class being edited is the panel's one strong mark (violet), the element's type defaults a softer one; the tools'
|
|
143
|
+
tabs fit the panel and are reachable from the keyboard.
|
|
144
|
+
|
|
145
|
+
- **Lists edited in a popover, all alike**: box and text shadows, transforms, transitions and filters share one row
|
|
146
|
+
(the CSS it writes, a swatch, a remove button) and one popover (a title, a close button, Escape, the focus moved
|
|
147
|
+
into it). What none of them could read is now kept and edited as text instead of being replaced with a default — a
|
|
148
|
+
token for the whole value, `drop-shadow(…)`, `url(#…)`.
|
|
149
|
+
- **Values read the way CSS writes them**: a shadow with two, three or four lengths and its color on either end;
|
|
150
|
+
`rgba(…)` inside text shadows and filters no longer split; negative shadow offsets accepted; a transition with any
|
|
151
|
+
of its parts left out; brightness, contrast and saturation past 1. Transition presets are written as CSS — the
|
|
152
|
+
preset names (`easeInQuad`) made the browser drop the whole declaration — the curve can be dragged into one of your
|
|
153
|
+
own, and the preview stops with the editor. `font-color` (not CSS) became `color`.
|
|
154
|
+
- **Background layers keep what they hold**: a repeating gradient (now a switch), a radial gradient's explicit size, a
|
|
155
|
+
token or `image-set()` as a layer (a "Custom (CSS)" layer), a one-value position read as CSS reads it (`20%` is
|
|
156
|
+
`20% center`), lists shorter than the layers repeated as CSS repeats them, an unset repeat read as tiling, two-position
|
|
157
|
+
stops, negative angles — every one of them was rewritten on the next edit of any layer. Defaults are no longer
|
|
158
|
+
written back, and "Token values" no longer bakes resolved tokens into the layers.
|
|
159
|
+
- **A layer's editor in two halves** — what it draws, then where it goes (size, position, tile, attachment, clip,
|
|
160
|
+
which now offers `text`). The gradient's stops sit on one bar, each a handle that drags or moves with the arrow keys;
|
|
161
|
+
the stop's color and position below it. Previews and swatches resolve the space's tokens.
|
|
162
|
+
- Spacing tells margin (dashed, outside) from padding; Border's sides are labelled and readable in the dark theme; a
|
|
163
|
+
class's menu says what each action does to whom; the Style Manager opens at a size that holds both columns.
|
|
164
|
+
|
|
165
|
+
## Builder
|
|
166
|
+
- **Shortcuts**: `?` shows every shortcut the builder answers to — the same list the "Nothing selected" card teaches
|
|
167
|
+
from — and ⌘\ / Ctrl+\ hides both side panels for the canvas alone and brings back the ones that were open. Both
|
|
168
|
+
work with the canvas focused.
|
|
169
|
+
- **Panels keep their width**: each side panel opens at the width it was left at; the right one starts at 380px.
|
|
170
|
+
- **Text no smaller than 11px** across the builder's panels (it went down to 10px in fifty places).
|
|
171
|
+
|
|
172
|
+
## Realtime
|
|
173
|
+
- **A page hears what it sent when it asks to** (`@plitzi/sdk-shared`, `@plitzi/sdk-server`, `@plitzi/sdk-elements`):
|
|
174
|
+
`publishOn('room', 'react', data, { echo: true })`, `useChannel().publish(type, data, { echo: true })` and the
|
|
175
|
+
channel's `publish` callback (`echo`) hand the message back to the page that sent it too, once the server took it —
|
|
176
|
+
stamped like everyone's, with `echo: true`, its `from` the channel's `me`. Without it a page still never hears its
|
|
177
|
+
own messages, and the docs said "every page on its topic hears it": they now say every OTHER page. Presence never
|
|
178
|
+
echoes.
|
|
179
|
+
- **A topic is opened only once it names one** (`@plitzi/sdk-elements`): `useChannel` — and so the `channel` element —
|
|
180
|
+
opens a topic only when a channel of the space covers it, by the same `matchChannel` the server decides by. A topic
|
|
181
|
+
written from data that has not arrived (`room:` while its provider loads, or its template still as text) asked the
|
|
182
|
+
server for both, was refused with a 403 and a console error on every load, and is now waited for.
|
|
183
|
+
- **Pages that watch** (`@plitzi/sdk-server`, `@plitzi/cli`): a connection whose page carries the `plitzi-observer`
|
|
184
|
+
cookie hears its topics and says nothing on them — no `$join`, no presence, its publishes taken and dropped.
|
|
185
|
+
`page check`, `page shot` and `verify` load pages that way, so checking a live site is no longer a visitor walking
|
|
186
|
+
into a room (`X walked in`, a member more in every picture). `--presence` takes part as a visitor does.
|
|
187
|
+
|
|
188
|
+
## Authoring
|
|
189
|
+
- **`template-in-value`** (refused): a `{{ }}` inside an attribute that is an object or a list — a provider's
|
|
190
|
+
`input`, a list's `items`, a plugin's settings — is never evaluated: only an attribute that is text is interpolated,
|
|
191
|
+
and the page server reads attributes as saved. A provider's `input` also replaced the route param of the same name
|
|
192
|
+
the action was already given, so `input: { room: '{{ navigation.routeParams.room }}' }` reached the task as `""` and
|
|
193
|
+
the page answered 404; its refusal says the action is handed the page's route and query params already. Anything
|
|
194
|
+
else is a binding on the attribute. `mockData`, a sample, is not held to it.
|
|
195
|
+
- **Rules on top of a class need no `id`** (`class: [card, { gap: '6px' }]`): they are named after the id the element
|
|
196
|
+
is given, written or not. `modifier-without-id` is gone; a one-off tweak no longer needs a name nothing reads.
|
|
197
|
+
- **Typed list rows have `inTemplate`**, as untyped ones do, and `bindTemplate`, `visibleWhen`, `hiddenWhen` and
|
|
198
|
+
`variantFrom` take a typed source's path as well as a name: turning a list typed broke every template of its rows.
|
|
199
|
+
- **`when({ field, operator: 'empty' })`** takes no `value` (nor `notEmpty`), as flows.md recommends; it did not
|
|
200
|
+
type-check.
|
|
201
|
+
- **Data-driven colours**: a style binding on a custom property (`{ to: '--who', category: 'style' }`) is written as
|
|
202
|
+
named — it was camel-cased into `who` — so a class reads `var(--who, var(--muted))`. A style binding's value carrying
|
|
203
|
+
`;` or braces is not written: the page server writes inline styles as text, and such a value added declarations of
|
|
204
|
+
its own. `binding-target-unknown` on `style` or a CSS property says to bind it in the `style` category.
|
|
205
|
+
- `unknown-attribute` for `decorative` on an `svg` or a `fontAwesome` says what it means: without a `label` it is
|
|
206
|
+
already hidden from screen readers.
|
|
207
|
+
|
|
208
|
+
- **A folder nobody declared says where to declare it**: `folder-undeclared` (a page, a layout, a folder's parent)
|
|
209
|
+
ends with `pageFolders: [{ id, name }]` on the space, and with the line of the `pageFamily` that wrote the page. A
|
|
210
|
+
folder starts its pages' addresses (`/docs/quickstart`), so a misspelt one is never declared on the author's behalf.
|
|
211
|
+
The skill's `pageFamily` example declares its folder.
|
|
212
|
+
- **A tag is an element**: a `subType` this element has not but another has — `container({ subType: 'ol' })` — names
|
|
213
|
+
that element (`list({ subType: 'ol' })`) instead of the value two letters away (`dl`). Read off the elements'
|
|
214
|
+
declarations, for every element and tag.
|
|
215
|
+
- **A `pageFamily`'s body is written once**: `repeated-shape` and `repeated-on-pages` no longer count the same part of
|
|
216
|
+
each page of one family as copies — they were offering a component for exactly what the docs recommend. Copies within
|
|
217
|
+
one page, or across pages written one by one, are still offered.
|
|
218
|
+
- **Colour emoji are not text to `page check`**: a character painted in its own colours (🎲, `❤️`, a keycap, a ZWJ
|
|
219
|
+
sequence) is left out of the contrast measure, which compared `color` with the tile behind it and failed `verify`
|
|
220
|
+
in the theme whose text colour was close to the tile. A symbol drawn as text (✓, ★) is still measured.
|
|
221
|
+
|
|
222
|
+
- **`declared-callback-target`** (refused): a value beside `on` in `declaredCallback(…, { on, date })` — written as
|
|
223
|
+
`openModal`'s target reads — was read nowhere, and the step ran without it. Refused, with the `params` it goes in
|
|
224
|
+
(`{ on: 'calendar', params: { date } }`) and whether it is one of the callback's declared params.
|
|
225
|
+
- The skill's list rows show the typed form beside the untyped one: with `items` typed by a sample, `r.item` is a path
|
|
226
|
+
(`from: r.item.title`), not text to put in a template string.
|
|
227
|
+
- **`slot-not-class`** (refused): rules written in place in a slot — `slots: { error: [fieldError, { color }] }`, past
|
|
228
|
+
the type in JavaScript or a spec rebuilt from JSON — were taken for a declaration with no rules, and `authorSpace`
|
|
229
|
+
failed later with `Cannot read properties of undefined (reading 'desktop')`, naming nothing. Refused where the slot
|
|
230
|
+
is written, naming the slot and the element, with the `styles()` declaration to hand instead.
|
|
231
|
+
|
|
232
|
+
## CLI
|
|
233
|
+
- **`page shot --click` (and `--clip`, `--wait-for`, `--scroll-to`, `--steps`) takes any selector**: a value that is
|
|
234
|
+
not an element's name (letters, digits, `-`, `_`) is a selector, CSS or Playwright's own (`button:has-text("Orbit")`).
|
|
235
|
+
It was wrapped as a name, and an invalid selector ended the command with Playwright's stack trace; it is now refused
|
|
236
|
+
with the reason.
|
|
237
|
+
|
|
238
|
+
- **`plitzi functions add <package>`**: a package the functions use comes with them, as a function carries its
|
|
239
|
+
dependencies. Installed in the project, it is bundled (web APIs only, minified, its licence kept) into
|
|
240
|
+
`src/functions/vendor/<package>.js`, with a `.d.ts` re-exporting the installed package's types, imported as
|
|
241
|
+
`./vendor/<package>.js` and pushed, built and run with the rest — nothing is resolved anywhere else, so the builder,
|
|
242
|
+
the sandbox and the push are unchanged. A package that reaches Node (`fs`, `node:*`) is refused, naming what it
|
|
243
|
+
reached; one past the functions' 1 MB is too; one that reads `process`/`Buffer` is warned about. The build's refusal
|
|
244
|
+
of a package import now names the command.
|
|
245
|
+
- **`page shot` targets**: a bare word is an element's name, or — no element named so — a tag (`textarea`); resolved on
|
|
246
|
+
the loaded page for `--click`, `--clip`, `--scroll-to`, `--wait-for` and `--steps`. In `--steps`, `type` takes a
|
|
247
|
+
quoted element with spaces (`type ".panel textarea" hola`) — it was cut at its first space and typed the rest — and
|
|
248
|
+
fails when the click leaves no field focused, rather than sending the keys to the page's shortcuts.
|
|
249
|
+
|
|
250
|
+
## Server
|
|
251
|
+
- **`server.listen()` resolves once the port answers** (`@plitzi/sdk-server`) — in a fleet, once the first worker
|
|
252
|
+
does. `serveProject` writes `tmp/dev-server.json` and says `pages on …` after it, not on the line after `listen`:
|
|
253
|
+
for about 0.4 s a tool trusting the line (CI, Playwright's `webServer`, `page check`) was refused. A port it cannot
|
|
254
|
+
take still ends the process, or goes to `onListenError`, and the promise is then never resolved.
|
|
255
|
+
- **Runs set for later** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`, `@plitzi/sdk-authoring`, `@plitzi/plitzi-builder`):
|
|
256
|
+
a turn that runs out, a bot's move, a hold that lapses — one run starting one of the space's actions in N seconds,
|
|
257
|
+
whether or not a page is still open. The action says it may be with a **`later` trigger** (no access rule: the run
|
|
258
|
+
that set it was let in); a flow sets it with `flow.later { action, in, input, key }`, a function with
|
|
259
|
+
`ctx.later({ … })`, and `flow.cancelLater` / `ctx.cancelLater(key)` drops it. A `key` names it: set again under the
|
|
260
|
+
same key, the one still waiting is replaced — the newer of two set at once, on every replica — and a running one is
|
|
261
|
+
left. It is a job of the queue schedules use: due by the store's clock (0 s to 30 days, about a second late at most),
|
|
262
|
+
once across replicas, retried, shown in Automations → Queue. Refused before anything is queued, with why: no `later`
|
|
263
|
+
trigger, one switched off, a time out of range, a key that is not one, a server with no jobs. A plugin's functions
|
|
264
|
+
set none. `ActionJobQueue` gains `cancelPending({ spaceId, key, olderThan? })` and jobs a `key`: the memory, Mongo
|
|
265
|
+
and MySQL queues implement it, and the shared contract tests it. **MySQL**: `action_jobs` gains `job_key` (and the
|
|
266
|
+
`action_jobs_key` index), added on first use; with `createTables: false`, run that statement of
|
|
267
|
+
`mysqlJobSchemaUpgrades()`. A queue of a deployment's own implements `cancelPending` (`09-schedules` shows one).
|
|
268
|
+
- **A project's `kv` file has one holder** (`@plitzi/sdk-server`): `createFileKv` takes `<file>.lock` with its pid;
|
|
269
|
+
a second process — another `npm start`, a `--watch` left running — is refused, naming the first (`the server of
|
|
270
|
+
"orbita", on port 8080`) instead of both writing their whole map over each other's changes, and a lock whose process
|
|
271
|
+
is gone is taken over. `close()` writes what is pending and lets go. A server with `workers` opens the file once, in
|
|
272
|
+
the primary, and its workers reach it through the fleet (`fleetKv`): each used to open a copy of its own.
|
|
273
|
+
- **A self-hosted project's credentials** (`@plitzi/sdk-server`, `@plitzi/cli`): `serveProject` answers
|
|
274
|
+
`getCredential` from `PLITZI_CREDENTIALS` in `.env` — one JSON object, credential id → its keys — so
|
|
275
|
+
`ctx.fetch({ credential })`, a connector and an `http.request` step work on the project's own server, not only in
|
|
276
|
+
`functions dev`. The same variable for both (it was `PLITZI_FUNCTIONS_CREDENTIALS`, read by the CLI alone); a value
|
|
277
|
+
that is not that object is refused with how to write it, instead of every credential going missing.
|
|
278
|
+
- **`HOST` beyond loopback says where to open it**: with `HOST=0.0.0.0`, `serveProject` prints the machine's network
|
|
279
|
+
addresses — what a tablet on the same Wi-Fi opens — and that anyone on that network can. `.env.example` names `HOST`
|
|
280
|
+
and `PLITZI_CREDENTIALS`.
|
|
281
|
+
|
|
282
|
+
## SDK
|
|
283
|
+
- **`useElementSize(ref)`** (`@plitzi/plitzi-sdk`): the size a plugin's own box is drawn at, followed as it changes —
|
|
284
|
+
what `useDisplayMode()` cannot say: a tablet held upright is `mobile` by the window and still a week wide by the
|
|
285
|
+
plugin's box. `undefined` until measured, so the server's page and the hydrated one agree. The breakpoints are
|
|
286
|
+
unchanged.
|
|
287
|
+
- The functions docs say how a task's `params` types (how the builder edits them: `codemirror-json`) and an action's
|
|
288
|
+
`input` types (what the value is: `json`) correspond.
|
|
289
|
+
|
|
290
|
+
- Updated dependencies [cadf70a]
|
|
291
|
+
- @plitzi/plitzi-sdk@0.38.11
|
|
292
|
+
- @plitzi/sdk-server@0.38.11
|
|
293
|
+
- @plitzi/sdk-authoring@0.38.11
|
|
294
|
+
- @plitzi/sdk-schema@0.38.11
|
|
295
|
+
- @plitzi/sdk-shared@0.38.11
|
|
296
|
+
- @plitzi/sdk-style@0.38.11
|
|
297
|
+
|
|
3
298
|
## 0.38.10
|
|
4
299
|
|
|
5
300
|
### 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
|
|
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
|
|
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.
|
|
75
|
+
version: "0.38.12"
|
|
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);
|
|
@@ -21,7 +21,7 @@ var actionTriggerParams = z.object({
|
|
|
21
21
|
"public",
|
|
22
22
|
"session",
|
|
23
23
|
"role"
|
|
24
|
-
]).optional().describe("Who may start a run THIS way
|
|
24
|
+
]).optional().describe("Who may start a run THIS way — required, except on schedule and later (no caller)"),
|
|
25
25
|
permissions: z.string().optional().describe("Comma separated; only for access \"role\""),
|
|
26
26
|
input: z.string().optional().describe("JSON map of ActionField by name: what a caller may send this way. Undeclared keys are DROPPED"),
|
|
27
27
|
signatureCredential: z.string().optional().describe("webhook only: the credential holding the signing secret. NAMING it is what turns verification on; without it anyone who learns the URL can start a run"),
|
|
@@ -55,7 +55,7 @@ var actionNode = z.object({
|
|
|
55
55
|
id: z.string(),
|
|
56
56
|
title: z.string(),
|
|
57
57
|
type: z.enum(["trigger", "task"]).describe("A trigger heads a chain; the rest are tasks"),
|
|
58
|
-
action: z.string().describe("A trigger names its KIND — call | webhook | schedule | render | custom — and one action may have several, one per kind, each heading
|
|
58
|
+
action: z.string().describe("A trigger names its KIND — call | webhook | schedule | later | render | custom — and one action may have several, one per kind, each heading a chain. A task names \"<namespace>.<action>\" from plitzi://actions/{env}/tasks. A browser step (setState, navigate) cannot run here"),
|
|
59
59
|
params: z.record(z.string(), z.unknown()).default({}).describe("A task: that task's params. A trigger: ActionTriggerParams — access, input, signature*, cron"),
|
|
60
60
|
afterNode: z.string().default("").describe("Id of the next step; empty ends the chain"),
|
|
61
61
|
beforeNode: z.string().default(""),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-mcp",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.12",
|
|
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.
|
|
34
|
-
"@plitzi/sdk-authoring": "0.38.
|
|
35
|
-
"@plitzi/sdk-schema": "0.38.
|
|
36
|
-
"@plitzi/sdk-server": "0.38.
|
|
37
|
-
"@plitzi/sdk-shared": "0.38.
|
|
38
|
-
"@plitzi/sdk-style": "0.38.
|
|
33
|
+
"@plitzi/plitzi-sdk": "0.38.12",
|
|
34
|
+
"@plitzi/sdk-authoring": "0.38.12",
|
|
35
|
+
"@plitzi/sdk-schema": "0.38.12",
|
|
36
|
+
"@plitzi/sdk-server": "0.38.12",
|
|
37
|
+
"@plitzi/sdk-shared": "0.38.12",
|
|
38
|
+
"@plitzi/sdk-style": "0.38.12",
|
|
39
39
|
"ejs": "^6.0.1",
|
|
40
40
|
"esbuild": "^0.28.2",
|
|
41
41
|
"zod": "^4.6.5"
|