@plitzi/sdk-event-bridge 0.38.4 → 0.38.6

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +348 -0
  2. package/package.json +6 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,353 @@
1
1
  # @plitzi/sdk-event-bridge
2
2
 
3
+ ## 0.38.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 3bce653: ## Fixes
8
+
9
+ - **The dev tools draw their icons again.** The panel lives in a shadow root of its own, which the page's stylesheets
10
+ never reach, and Font Awesome moved to a sheet of its own in 0.38.5 (`plitzi-sdk-icons.css`): the badge and every tab
11
+ lost their icons. The panel now links that sheet inside its root, beside its own. Where it is served is the SDK's
12
+ new `sdkIconsStylePath` — the page server sends `/sdk-assets/plitzi-sdk-icons.css`, the same sheet the document
13
+ links — which the `iframe` and `shadow` render modes read too: they had `/plitzi-sdk-icons.css` hard-coded, a path a
14
+ page server does not serve.
15
+
16
+ - Updated dependencies [3bce653]
17
+ - @plitzi/sdk-shared@0.38.6
18
+
19
+ ## 0.38.5
20
+
21
+ ### Patch Changes
22
+
23
+ - 3bce653: ## Agents work through the MCP: the builder's AI chat is gone
24
+
25
+ An agent reaches a space through the MCP, from whatever harness the person already uses; Plitzi no longer runs one of
26
+ its own inside the builder. **Breaking** for whoever imported what that chat was built on:
27
+
28
+ - **The builder's Assistant panel is removed**, with its conversations, attachments, previews and provider settings.
29
+ - **`@plitzi/sdk-mcp` no longer exports the in-process AI engine**: `AIEngine`, `toolResponseOk`, `toolResponseErr`,
30
+ `zodToJsonSchema`, `getAllowedModes`, `bindTools`, `isToolActive`, `resolveToolHandler`, `isCallToolResult`,
31
+ `toolResponseFromResult` and `buildAgentGuide`. The MCP server, its tools and `@plitzi/sdk-mcp/server` are unchanged;
32
+ the tool functions are still exported to run in-process.
33
+ - **`@plitzi/sdk-shared` drops the chat's types** — `AITypes` (`AiContext`, `AiMode`, `AiMessageAttachment`,
34
+ `AiUsage`, …) and `McpTypes` (`McpTool`, `McpToolHandler`, `McpContent`, …), with their `./types/AITypes` and
35
+ `./types/McpTypes/index` subpaths — and no longer depends on `@modelcontextprotocol/sdk`.
36
+ - **A change's `origin` is never `coworker`**: `ChangeOrigin` is `builder`, `mcp`, `autofix`, `api` or `system`, and
37
+ the History panel's filter follows.
38
+ - **The builder's platform flags are gone**: `PlatformFlags` is no longer part of the builder's first query, nor
39
+ `platformFlags` of its store — `assistanceAI` was the only one.
40
+ - **Plitzi's own deployment no longer offers the `ai.complete` task** to flows.
41
+ - **Each MCP tool says whether it only reads** (`readOnlyHint`, from the tool's `access`), so a host can run a read
42
+ without asking and ask before a write. Until now `access` was read only by the builder's chat.
43
+ - **The MCP works over the JSON adapters.** `createJsonAdapters` offers `getSchema` and `getStyle`, and — for a space
44
+ read from a path — `saveSchema` and `saveStyle`, each writing its document back into the file. **Breaking**:
45
+ `saveOfflineData` is gone from `SSRAdapters`; nothing called it, and it was the JSON adapters' only write, so an MCP
46
+ over them could neither read nor save.
47
+
48
+ ## Lighter pages: icons on their own
49
+ - **Font Awesome is a stylesheet of its own**, `plitzi-sdk-icons.css`, with its fonts as files beside it
50
+ (`webfonts/`) instead of base64 inside `plitzi-sdk.css` — which drops from 287 KB to 103 KB. A page fetches a face
51
+ only when it shows an icon of that style, and a new SDK version no longer downloads the fonts again. The page server
52
+ links it after `plitzi-sdk.css` (`SSRTemplateProps.iconsCssPath`), the SDK's iframe and shadow modes load it beside
53
+ the stylesheet, and the package exports it: **a project that imports `@plitzi/plitzi-sdk/plitzi-sdk.css` imports
54
+ `@plitzi/plitzi-sdk/plitzi-sdk-icons.css` too** — `plitzi upgrade` adds it to `src/main.ts`, and a new project has
55
+ it. The MCP's rendered widgets inline the sheet, fonts and all, only for a widget that draws an icon.
56
+ - **Material Icons is no longer loaded.** Nothing in Plitzi used it; every page paid a request to Google for it.
57
+ - **A page loads only the plugins it draws.** The page server sends the rest as their declaration
58
+ (`PluginEntry.deferred`, `pluginDeclarationOf` in `@plitzi/sdk-shared/plugins/declaration`); the SDK registers each
59
+ as a stand-in that knows its types from the start, and loads its code and stylesheet the first time one of its
60
+ elements is drawn — on a page reached by navigating too, with no server involved. What a page draws is
61
+ `pageElementTypes` (`@plitzi/sdk-shared/schema/pageElements`): the page, its layouts, the components and references
62
+ it holds. `render()` takes a plugin as `{ load, css, declaration }` beside `{ component }`.
63
+ - **The space travels beside the page, not inside it.** The page names it (`<link id="plitzi-space">`,
64
+ `SSRTemplateProps.spaceDocumentPath`), the browser fetches it while the scripts load, and the page server answers
65
+ `/_plitzi/space/<hash>.json` behind the same gates as its pages — `immutable`, since the name is its content's hash:
66
+ one download for every page and every visit until the space changes. The website's docs page went from 2.6 MB to
67
+ 0.5 MB. Still the whole space, so every navigation after the first page stays in the browser. A draft preview and a
68
+ deployment's own `templateFn` keep it inline.
69
+ - **An arrival on screen plays as the page arrives.** A `motion: { on: 'view' }` element already in view was held
70
+ invisible until the SDK hydrated — the page's content, and a page rendered `ssrOnly` forever. The page server's
71
+ document now sees it as soon as it is parsed, and hands over to the SDK once the page is live.
72
+
73
+ ## Server data: one request per question, the newest winning, and a way to stop
74
+ - **A link asks for its page's server data once.** The navigation's prefetch already brought it; the route change that
75
+ followed asked again — two renders per click. `useRscSync` now asks only for a location the store does not hold.
76
+ - **Answers land in the order they were asked.** `refreshRsc` joins a refresh already in flight for the same URL and
77
+ aborts one a newer refresh would overwrite (a whole payload asked again, an element asked again); a whole payload
78
+ keeps what an element asked for after it. A slow answer no longer paints a page the visitor has left.
79
+ - **Stopping.** `cancelRsc(store, ids)`, an `apiContainer`'s `cancelQuery` callback (`cancelApi(id)` in authoring) and
80
+ `queryCache.cancel(key)` for a browser provider: the request is dropped and what is shown stays. The server hears it:
81
+ `SSRRscContext.signal` aborts when the browser hangs up, and the default `getRscData` stops every element still
82
+ resolving — a shared render run only once nobody is waiting on it.
83
+ - **Pending.** A server provider's `isLoading` is true while it is asked again (`rsc.refreshing`). The `navigation`
84
+ source says `pending` and `pendingLocation` while a link waits for its destination's data; a second link clicked
85
+ before the first went supersedes it, and the first never goes.
86
+ - **A bound `input` asks again.** An `apiContainer`'s `input` is a prop now: bound to state, every change refetches a
87
+ server provider. What a refresh asks for (`req.ctx.rscParams`) wins over the `input` the element was saved with.
88
+ - **A section cut by its budget says how to give it more** (`rsc.elementTimeoutMs`).
89
+
90
+ ## Flows
91
+ - **`whileRunning('latest')`**: a new firing stops the run in progress — no further step; its `runServerAction` is
92
+ cancelled (request and server run) and its `webHook` aborted — and runs. A search as you type. The step's context
93
+ carries the `signal`. Offered in the builder and the MCP.
94
+ - `onApiSuccess` / `onApiError` fire once per answer: a cancelled request or a loading flag that came and went no
95
+ longer runs the flow again.
96
+ - **A debounce is `whileRunning('latest')` and a `delay` first**: `delayTime` ends its wait the moment its run is
97
+ superseded, so only the last firing gets past it. Its `time` is a number.
98
+
99
+ ## Server actions
100
+ - **The request budget is never silent.** A task that caught the refused fetch hid `maxRequests`; the step that ran
101
+ into it now logs it, and the server logs it once, naming `createServer({ action: { limits: { maxRequests } } })`.
102
+ - **`invalid_input` says what the value was and which type takes it** — `windows (text, got a list; declare the field
103
+ \`json\` to take it)`. The templates reference documents that a param that is only `|json_encode` is the value it
104
+ encodes.
105
+ - **`kv` survives a restart with no database.** `createFileKv({ file })` (`@plitzi/sdk-server/actions`) keeps the
106
+ in-process store in one JSON file, written whole as soon as anything changes — for one process.
107
+ `createSqliteKv({ file } | { db })` (`@plitzi/sdk-server/sqlite`, new entry) is a table in a SQLite file over
108
+ `node:sqlite`, every operation one statement, shared safely by every process on the file. Both pass the adapter
109
+ contract every store is held to. The `09-schedules` example uses it rather than its own copy, whose counters read
110
+ `22.0`.
111
+
112
+ ## Authoring
113
+ - **What a space declares and never uses** is suggested now: `unused-class`, `unused-token`, `unused-component`, and
114
+ `literal-colour` — a class painted from the palette typing out a scheme token's light value. A suggestion about
115
+ declarations names them in `subjects`, so the MCP says one a batch left unused beside the ones the space had.
116
+ `unusedDeclarations(schema, style)` is the rule itself, for anything else that says "unused" (the builder does).
117
+ - **`pageFamily(shape, entries)`** writes pages of one shape from data: each page its id, slug, titles, folder and
118
+ layout, and its body built inside `scope(entry.id, …)` so two pages never give one id.
119
+ - **`action-output-path`** (warned): `.data` read on a provider fed by a server action, which publishes its output at
120
+ the root. **`actionSource(id, sample)`** types such a provider by a sample of its output.
121
+ - A value template (`returns: 'value'`, a computed, a step param) may name its parts with `{% set %}` before its one
122
+ expression, and is still that expression's value.
123
+ - `abs()`, `floor()`, `ceil()`, `clamp()` are refused with how they are written here (`x|abs`,
124
+ `x|round(0, 'floor')`, `min(max(x, low), high)`).
125
+ - An unknown attribute is reported against the element's props, not as "'id' does not exist in type ElementSpec[]".
126
+ - `explain` answers a builder's name (`reloadApi`, `cancelApi`) with its step, and knows `whileRunning`.
127
+ - A component's instance takes `quiet`, like any element — `component(id, { quiet: ['repeated-shape'] })`: instances
128
+ whose slots are filled alike on purpose stop being offered as a repeat, and an exported instance that carries one
129
+ typechecks.
130
+ - `container` and `text` take a `title`. A trigger's `preview` may hold numbers, flags, lists and `null`.
131
+ - **A Markdown element's headings are sections a link can name.** Each renders with the anchor its words read as
132
+ (`## Server data` → `#server-data`, numbered when repeated), and a link's `hash` may name one: `anchor-missing` counts
133
+ them, so a table of contents built from the Markdown is checked like any other link.
134
+ - `answerAction(page, actionId, output)` (testing): a test that would save something answers that server action in
135
+ the browser — the server's `kv`, and what the developer kept, are never written. A stream step gets its `done` frame.
136
+
137
+ ## Plugins
138
+ - **A plugin's stylesheet sits below the space's.** The cascade order is now `… utilities, plitzi-sdk-plugin,
139
+ plitzi-sdk-runtime`, and whatever builds a plugin writes its CSS into `plitzi-sdk-plugin` (`inPluginLayer` from
140
+ `@plitzi/sdk-shared/style`): `plitzi pack plugin`, a server compiling one (`action: 'compile'`), and the stylesheet a
141
+ server copies or downloads for one. A space's classes and `customCss` now win over what the plugin's author shipped,
142
+ whatever the specificity — as they do over a built-in element. A plugin packed before this ships unlayered and still
143
+ wins until it is packed again.
144
+ - **Declared param types reach the callback.** A param declared `number` (new, a text box in the builder) or `boolean`
145
+ is handed over as one — written `5000`, or bound to text that says it; an empty number as nothing, so the component's
146
+ default applies.
147
+ - **`useElementVisible(id)`** (`@plitzi/plitzi-sdk`): whether another element is on the page — its own `visible`, every
148
+ container around it, the breakpoint — kept current while the plugin is mounted, at that plugin's cost alone.
149
+ - **A page open on a development server loads again when the server restarts** (`devReload`): `start:dev` restarting
150
+ on a change to the server's code reached the open page only when somebody reloaded it.
151
+ - **A saved plugin is swapped into the open page** (`devReload`, server mode): the page server rebuilds the plugin
152
+ whose source changed and the page renders the new component in place, keeping its state — no restart, no reload. A
153
+ change to its declaration (what the builder and the linter know of it) still reloads the page. `render()` takes
154
+ `{ hotPlugins: true }` and answers `{ unmount, replacePlugin }`; `PluginManager.rebuild(name)` and `onSources`. A new
155
+ folder in `src/plugins` is registered without a restart (`server.plugins.register`), from `create` and `create --from` alike.
156
+ - **A plugin brings its own server half.** `functions/index.ts` beside the component — the `defineFunctions` a
157
+ space's functions use — answers routes under `/fn/plugins/<type>/` and runs steps named `<type>.<action>` (origin
158
+ `'plugin'`, the builder's **Plugins** group). It runs with a narrower `ctx`: its own `kv` (prefixed
159
+ `plugin:<type>:`, its `rateLimit` and `sign` too), none of the space's credentials, no realtime publishing or grants;
160
+ its routes and tasks outside its namespace are refused, as are a space's routes under `/fn/plugins/`. The component
161
+ reaches its routes with `usePluginRoute(type)` (`@plitzi/plitzi-sdk`; `undefined` where no server runs code).
162
+ A page server takes them as `functions.plugins` (`{ [type]: FunctionsDefinition }`), swaps one with
163
+ `server.functions.setPlugin`, and asks a cloud adapter with `actionLookups.getPluginFunctions(spaceId, version)`.
164
+ `plitzi pack plugin` carries the source in the zip as `functions.source.json` (`PLUGIN_FUNCTIONS_SOURCE`, named by
165
+ the manifest's `functions`; `loadFunctionsSource` builds it) — kept privately by the platform, never published.
166
+ - **A plugin lays out the space's elements it holds.** `elementChildren(children)` (`@plitzi/plitzi-sdk`) hands
167
+ over each child element with the id it was authored under, for a dock, tabs or a masonry to place in boxes of its
168
+ own — instead of writing styles onto elements it does not render.
169
+ - **`useDisplayMode()`** (`@plitzi/plitzi-sdk`): `desktop`, `tablet` or `mobile`, at the widths the space's styles are
170
+ compiled at — not a breakpoint of the plugin's own.
171
+ - **A file a library needs whole travels inside the bundle**, imported as Vite imports it: `worker.js?raw` (its text — a
172
+ worker from a Blob), `engine.wasm?inline` (a base64 data URI). `plitzi pack` and a server compiling a plugin share
173
+ one build (`@plitzi/sdk-shared/plugins/bundle`), so a server now inlines `.avif`, `.ttf` and `.otf` as `pack` did.
174
+
175
+ ## CLI and page checks
176
+ - **`plitzi lint`** reads a local space's source the way eslint reads code, for what the document cannot show:
177
+ `file-too-long`, `pages-in-one-file`, `inline-records` (rows of data written in code → `src/data/`), `repeated-css`,
178
+ `special-case-in-map`, `colour-not-token`, `positional-id`, `unused-file` — each at file:line with what to write
179
+ instead — and authoring's suggestions at the line that wrote them. `--json`, `--strict`, `--max-warnings <n>`;
180
+ `// plitzi-lint-disable-next-line <code> -- why` for a departure on purpose. Projects get `npm run lint:space`
181
+ (`upgrade` adds it to older ones). `doctor` stays the project's and never reads the space.
182
+ - **`--template blank`** starts with only the colours its page uses: a token declared and read by nothing is one
183
+ authoring now points out.
184
+ - **The welcome space is written as a folder**, not one 800-line file: `src/space/index.ts` (the page), `tokens.ts`,
185
+ `theme.ts`, `content.ts` — the shape a space keeps as it grows, and clean under `plitzi lint`. **Breaking** for
186
+ whoever called it: `blankSpaceSource()` is now `blankTemplateFiles({ name, dir, plugin })`, which returns the files by
187
+ path; `toPortableSource` keeps imports of the files beside it. A plugin package's preview space is
188
+ `preview/space/index.ts`.
189
+ - **`check`, `shot` and the generated visual tests settle instead of waiting for `networkidle`**, which never came on a
190
+ page with a realtime channel: `openPage` (`@plitzi/sdk-authoring`) waits for load, then quiet, counting no stream
191
+ that stays open.
192
+ - **The server is the project's in `src/config/serverOptions.ts`; `src/main.ts` stays the CLI's.** `create` writes
193
+ `src/config/serverOptions.ts` (handed to `createServer`, typed from `ServerConfig`, now exported by
194
+ `@plitzi/sdk-server`) and, with `--source local`, `src/actions/index.ts` (the space’s server actions), which `main.ts` wires
195
+ for calls, renders and schedules. What `main.ts` wires itself (the space's adapters, the plugins, `public/`,
196
+ `src/data/`, `src/functions/`, the actions' lookups) is left out of `serverOptions`' type and comes after it, so no option unwires it.
197
+ `upgrade` writes either file into a project that has none — only when the `main.ts` reading it is the CLI's — and
198
+ never replaces it; `create --from` projects read `serverOptions.ts` too.
199
+ - **`upgrade packages` brings up the scripts the CLI wrote and nobody changed** (`.plitzi/scaffold.json` now records
200
+ them); a script the project changed is left and said, as before.
201
+ - `start:dev` restarts on a change to the server's code — `src/main.ts`, `src/config/`, `src/actions/` and
202
+ `src/functions/` (there from the start, kept by a `.gitkeep`); a plugin is swapped in the open page instead, and its
203
+ `functions/` set again, without a restart. A function imports its siblings with `.ts`, as `src/`.
204
+ - `add plugin --server` writes the plugin's server half (`functions/index.ts`, a `GET`/`POST /state` example on its
205
+ `kv`); a package gets `@plitzi/sdk-server` as a devDependency for its types. Refused in a client-mode project.
206
+ - `add plugin`: `--prop rows:list` and `--prop meta:json` for data a binding fills; `--headless` writes
207
+ `drawsNothing: true`; the generated events hook never fires on the builder's canvas.
208
+ - A `channel` with no tag is boxless to a page check, like a provider; an empty list is said to have no rows, with what
209
+ to do, instead of "no size (0×0)".
210
+ - **A server-mode project keeps its `kv` in `state/kv.json`** (`createFileKv`; ignored by git): what the space's actions
211
+ save outlives a restart, `start:dev`'s included. `action.kv` in `src/config/serverOptions.ts` names another store.
212
+ - A server-mode project types what its plugins import besides code (`plitzi/assets.d.ts`): a stylesheet, an image,
213
+ `?raw`, `?inline` — a client-mode one has them from `vite/client`.
214
+ - **A project made from a space runs the server `create` writes.** It has the same `src/main.ts` as any project: it
215
+ now takes a free port and writes `tmp/dev-server.json` (which `check`, `shot` and the visual tests read), answers
216
+ `/health`, and re-authors its pages on save instead of waiting for a restart. Its actions are `src/actions/` and its
217
+ connectors `src/connectors/`, both there from the start, and `start:dev` restarts on them; `src/actions/index.ts`
218
+ exports `actions` and `connectors`, as a `create` project's does (`push` reads that). Before, `upgrade` showed its
219
+ `main.ts` as the project's own, and `--take all` would have put `create`'s server in place of the space's.
220
+ - **A `--source cloud` server project starts.** Its key is in `.env`, which nothing read: `npm start` stopped on "Set
221
+ PLITZI_HOST_KEY". Every server project's `src/main.ts` now reads `.env` itself (`process.loadEnvFile`), and every
222
+ one is given a signing key there (`PLITZI_SIGNING_SECRET`, made for it by `create`) — `ctx.sign` refused in a project
223
+ `create` wrote, a plugin's server half included. `PORT` is no longer written into `.env`, where it pinned 8080. A
224
+ cloud project keeps its `kv` in `state/kv.json` too.
225
+ - **`upgrade` keeps the package manager a project was written for** (`.plitzi/scaffold.json`) when it has no lockfile
226
+ of its own yet: a yarn or pnpm project not installed (`--no-install`), or sitting in a monorepo folder, was taken for
227
+ npm and its `AGENTS.md`, Playwright config and `.gitignore` replaced with npm's commands.
228
+ - `author`, `check`, `fix` and `push` know the element types of a project's built-only plugins
229
+ (`vendor/plugins/*/plugin-manifest.json`, every element each provides), as its server does.
230
+ - **`import` reaches Plitzi only when told to.** A site not served from this machine needs `--account` — ask the
231
+ person's Plitzi account whether one of their spaces verified its domain, signing in — and without it is refused,
232
+ saying so, before any request: an agent running `import` in a local project opened a sign-in nobody asked for. The
233
+ CLI skill and the generated `AGENTS.md` say to run `import` only when the user asks, and to ask before `--account`.
234
+ - **A server project's data is no longer on the internet.** It was `public/data/*.json`, served to anyone as a file;
235
+ it is `src/data/*.json`, which the server reads and never serves (`dataDir`, new in `createServer`): a provider with
236
+ `runtime: 'server'` and `query: '/data/<file>'` reads it, and the page arrives with it. `projectData`
237
+ (`@plitzi/sdk-authoring/node`) and `authorSpace`'s `serverData` hold bindings to those files, and a provider asking
238
+ for `/data/…` from the browser is refused (`server-data-in-browser`): nothing would answer it. What a provider reads
239
+ is still in the page it renders — data a page must not carry is a server action's to read. A client-mode project
240
+ keeps `public/data/`, which the browser has to fetch. The catalog template follows the mode
241
+ (`catalogTemplateFiles({ mode })`). `public/` holds only what is meant for everyone.
242
+ - **The project's own server code is `src/functions/`**, with the rest of its source — typechecked with it, left out of
243
+ `tsconfig.build.json` (the server builds it at boot). `functions pull`/`push`/`dev`, `push`, `pull` and `create
244
+ --from` follow. The `kv` folder is `state/` (it was `data/`, beside a data folder that was something else).
245
+ - **What is the CLI's is in `plitzi/`, apart from `src/`.** `plitzi/author.ts`, `plitzi/assets.d.ts` (server mode) or
246
+ `plitzi/preflight.css` (client mode), and `plitzi/README.md` — which says what each folder of `src/` is, instead of a
247
+ README in every one. `src/main.ts` stays where an entry point is looked for, the CLI's all the same.
248
+ `src/plugins/declarations.ts` is gone: a plugin is declared by its folder's `declaration.ts`, found by the server,
249
+ `author`, `check`, `fix`, `push` and the visual test alike (`pluginDeclarations` from `@plitzi/sdk-authoring/node`;
250
+ Vite's `import.meta.glob` in client mode).
251
+ - `functions.plugins` is in `SSRServerConfig`'s type and checked as the server starts: a project passing its plugins'
252
+ server halves did not typecheck.
253
+ - **A project's source is folders that grow.** The space is `src/space/` — its `index.ts` exports it as `space` and
254
+ assembles the rest (the catalog template's `src/site/` is `src/space/` now; `create --from` writes the space's own
255
+ `index.ts` there, exported as `space` too). The server actions are `src/actions/` — `index.ts` lists them, one action
256
+ a file, as `create --from` already had them — and what the server does besides serving the space is
257
+ `src/config/serverOptions.ts`. `start:dev` watches `src/config` and `src/actions` whole.
258
+ - **One server for every project, kept by `upgrade`.** `src/main.ts` runs what a project holds from where it lands — a
259
+ runtime in `src/runtime/` (or built only, `vendor/runtime.bundle`), plugins built only (`vendor/plugins/`), the
260
+ actions' connectors — so `create --from` writes no `main.ts` or `.prettierignore` of its own any more, and `upgrade`
261
+ keeps both current in projects made from a space too. `loadRuntimeModule` (`@plitzi/sdk-server/runtime`): a project's
262
+ runtime module, or nothing when it has none.
263
+ - **`plitzi add runtime`** writes `src/runtime/index.ts` — run by the project's server (`npm start` answers its
264
+ endpoints) and sent by `plitzi runtime push`, whose default entry it is now — and has `start:dev` restart on it. A
265
+ space taken out with a runtime gets `src/runtime/index.ts` handing over the module its source starts at.
266
+ - **`push` sends the space's files back as their CDN addresses.** `create --from` and `pull` write each CDN address as
267
+ the project's path (`/assets/a.png`, served from `public/assets/`); `push` sent those paths as they were, and the
268
+ space's pictures and data pointed at nothing on Plitzi. It also says, before sending, what Plitzi would not have: a
269
+ provider reading a file `src/data/` does not hold, and a file the space names that is not on its CDN.
270
+ - **`push` sends a project's data and its files.** Two new parts: `data` — `src/data/` whole, kept by Plitzi as the
271
+ space's own data (private, frozen with each publish, read by the page server of the version it renders; refused when
272
+ the space's copy changed since the project last had it, unless `--force`) — and `files` — each changed file of
273
+ `public/assets/`, put at the same path under the space's `assets/` on its CDN, so a pull brings it back where it was.
274
+ `create --from` and `pull` write the space's data into `src/data/`. `getData` joins the action lookups
275
+ (`ActionLookupsConfig`), and the page server resolves `/data/<file>` through it when there is no `dataDir`.
276
+ - **A space's data is edited in the builder and by agents.** The builder's Server view has a **Data** tab: the JSON
277
+ files the space's server providers read (`/data/<file>`), a file list and a JSON editor, saved whole against the
278
+ copy it read (⌘S; a newer copy is refused, a broken file named). The MCP reads it as `plitzi://data/{env}` and writes
279
+ it with `upsertDataFile` / `deleteDataFile` (`getData` / `saveData` among the adapters; a file that is not JSON is
280
+ refused as it is written), and the guide has a Data section. One write path for the builder, agents and `plitzi push`
281
+ (`SpaceData` / `SpaceSaveData` over GraphQL, under `spaceManage`), one history. `DataDraft` / `DataSaveResult` are
282
+ in `@plitzi/sdk-shared`. The builder's file list is shared by Functions and Data (`modules/FileTree`).
283
+ - **`plitzi doctor`**: whether the project the CLI set up is whole, checked against what it is now — a developer may
284
+ change any file. Packages (declared, installed at versions that agree, one copy of the SDK and of React), the CLI's
285
+ files and scripts (as `upgrade` sees them, one planner for both), the file each Node script starts and every folder
286
+ `start:dev` watches, the TypeScript configs, `.gitignore` and `.env` (never in git; the signing secret as long as the
287
+ project's server wants it), the code Node runs as written (relative imports with their extension, JSON with its
288
+ attribute, no JSX, every package declared — walked with esbuild), each plugin folder against its declaration, the data
289
+ files, `src/functions/` built by the project's own sdk-server, `.plitzi/` and the skills. Each finding has an area, a
290
+ code, the file and its fix; `--json`, `--strict`; exit 1 on an error. It never checks the space — `npm run author`
291
+ and `check` do — and every report says so. A layout an older CLI left (`src/space.ts`, `src/author.ts`,
292
+ `functions/` at the root…) is its own area, checked first and alone. `--fix` repairs what is simple and safe —
293
+ that layout moved with every import, URL and script following (and the scaffold record with it), dead files,
294
+ `.gitignore`, `"type": "module"`, a watched folder, a signing secret — then checks again; `--dry-run` says what.
295
+ Each report ends with what to run next. `upgrade` writes no file over an older layout, and says `doctor --fix`.
296
+ `buildFunctions` and `FunctionsBuildError` are exported from
297
+ `@plitzi/sdk-server/functions-runner`, `MIN_SIGNING_SECRET_LENGTH` from `@plitzi/sdk-server/actions`.
298
+ - **`--dry-run`** on every command that writes or sends — `create`, `add plugin`, `add runtime`, `pull`, `push`,
299
+ `pack plugin`, `source`, `import`, `upload plugin`, `functions pull`/`push`, `runtime push`/`start`/`stop`/`size`/
300
+ `vars`, `skills update`, `doctor --fix`: each file it would write (`+` new, `~` replaced, `-` removed), what it would install or run, what it would
301
+ send and where, and none of it done. It still reads what it needs to say so.
302
+ - **A new project is formatted from the start**, every template and mode: its first `format` changes nothing. The CLI's
303
+ own files are in its `.prettierignore`, so formatting never turns one into a file `upgrade` believes was changed.
304
+
305
+ ## Builder
306
+ - **The pages panel keeps its folders as you left them** — open or closed, per space, across reloads — the way the
307
+ style inspector keeps its sections. A folder starts closed.
308
+ - **Usages**, a panel beside Layers: where each component, class, token, space variable and data source is used,
309
+ page by page — what reads it and which elements — and which nothing uses, by authoring's own rule. A click selects
310
+ the element, inside a component too.
311
+ - **Revealing an element inside a component opens the component** (the Usages panel, ⌘P, the issues and the history all
312
+ reveal through it); before, the selection was dropped. **Panels stay open** when a component opens or closes.
313
+ - **The canvas dims a page's layout around its body again when the layout or its slot draws no box**
314
+ (`display: contents`, which the efficiency guide recommends): the hole was measured as a rect of zeros and the whole
315
+ page was dimmed. A box-less element is measured by what it holds, and the mask by the box that positions it.
316
+ - **Elements is one category at a time.** A row of chips — each category with its count, and the space's components as
317
+ one more — picks what the panel shows, remembered between sessions, so the panel stays the same height however many
318
+ elements plugins add. A search looks through every category and the components at once. Each element is a tile: its
319
+ icon, its whole name, and what it is on hover. Container, Button, Form, Form Control, Dropdown Popup, List Item, Rich
320
+ Text, Dialog Container and Tab Container Item have icons of their own (`sdk-elements`), none shared with another
321
+ element or with the component and snippet icons.
322
+ - **Layers reads as a tree and is driven from the keyboard.** A guide per depth, a chevron that turns, the component's
323
+ name beside an element that is one, and the selected row kept in view. ↑/↓, Home/End, → to open or go in, ← to close
324
+ or go up. A row under a closed ancestor is no longer shown. (plitzi-ui's `Tree`.)
325
+ - **Motion and preview no longer share an icon.** Playing the page's motion is a wand, which pulses while it plays;
326
+ preview is an eye, and a pen to go back to editing.
327
+ - **A component's settings fit their modal, however many props it has.** The modal is wider; the name and folder
328
+ share a line, and each prop is one compact row — its name, its kind, required, remove — with what a binding writes to
329
+ read it (`{{ props.<name> }}`) or what is wrong with it, and what it is for, beneath. The fields scroll and the buttons
330
+ stay in view. Props and slots are titled sections, and a slot shows its id.
331
+
332
+ ## Packages
333
+ - **`GET /auth/continue` takes `?fallback=`**: where to go when `redirect` is refused, vetted by the same check. A sign-in
334
+ screen's way back sends its site there, so leaving without signing in never lands on "you are signed in".
335
+ - **Markdown renders headings you can link to and code you can copy.** A heading carries its anchor and a `#` link to
336
+ itself; a fenced block a header with its language and a **Copy** button. The anchor is `@plitzi/sdk-shared`'s:
337
+ `anchorOf`, `uniqueAnchor` and `markdownHeadings` (`schema/anchor`, `schema/markdownHeadings`) — what the element
338
+ renders, what authoring checks a link against and what a table of contents is built from are one function. Needs
339
+ `@plitzi/plitzi-ui` 1.6.31 (its `Markdown` takes `headingAnchor`).
340
+ - **Every package declares what it imports, and nothing more.** `react` is a peer of `sdk-auth`, `sdk-event-bridge`,
341
+ `sdk-interactions`, `sdk-style` and `sdk-variables`; `sdk-schema` depends on `immer`, `sdk-elements` on
342
+ `@dr.pogodin/react-helmet`, `sdk-plugins` on `@plitzi/plitzi-ui`, `sdk-style` on `@plitzi/sdk-event-bridge` and
343
+ `sdk-dev-tools` on `@plitzi/sdk-plugins` — each worked only because `@plitzi/plitzi-sdk` brought them, and failed
344
+ installed alone or under a strict linker. `prop-types` and the `@plitzi/*` dependencies nothing imported are gone:
345
+ `sdk-mcp` no longer declares `@plitzi/sdk-elements`, which its code does not import — it still arrives through
346
+ `@plitzi/plitzi-sdk`.
347
+
348
+ - Updated dependencies [3bce653]
349
+ - @plitzi/sdk-shared@0.38.5
350
+
3
351
  ## 0.38.4
4
352
 
5
353
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-event-bridge",
3
- "version": "0.38.4",
3
+ "version": "0.38.6",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist"
@@ -46,14 +46,17 @@
46
46
  "type": "module",
47
47
  "sideEffects": false,
48
48
  "dependencies": {
49
- "@plitzi/sdk-shared": "0.38.4",
50
- "prop-types": "^15.8.1"
49
+ "@plitzi/sdk-shared": "0.38.6"
51
50
  },
52
51
  "devDependencies": {
53
52
  "@testing-library/react": "^16.3.3",
54
53
  "eslint": "^9.39.5",
54
+ "react": "^19.3.0",
55
55
  "typescript": "^6.0.3",
56
56
  "vite": "^8.3.2",
57
57
  "vitest": "^5.0.3"
58
+ },
59
+ "peerDependencies": {
60
+ "react": "^19"
58
61
  }
59
62
  }