@plitzi/sdk-event-bridge 0.38.18 → 0.38.20

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 +87 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,92 @@
1
1
  # @plitzi/sdk-event-bridge
2
2
 
3
+ ## 0.38.20
4
+
5
+ ### Patch Changes
6
+
7
+ - c7c241a: ## Security
8
+
9
+ - **The `Origin` fallback reads the request's own authority before a forwarded one** (`@plitzi/sdk-server`): 0.38.19
10
+ took `X-Forwarded-Host` first, and with no proxy in front a client could send one naming this host on another port,
11
+ making that port's `Origin` this server's own. Now `:authority` or `Host` decide whenever they name the host the
12
+ request is answered as; `X-Forwarded-Host` only when they do not — a host that took its hostname from the header
13
+ (Express's `trust proxy`) trusts the proxy that wrote it. No option to set: what the host resolved says which one it
14
+ believes. The write guard (`crossSiteWrites`), the sign-in's login-CSRF check and `createOriginGuardMiddleware`
15
+ share it.
16
+
17
+ ## Server
18
+ - **`ctx.oauth`: OAuth 2.0 for a space's code, any provider** (`@plitzi/sdk-server`, `@plitzi/sdk-shared`): a
19
+ connection is data in `defineFunctions({ oauth: { calendar: { issuer | authorizeUrl + tokenUrl, credential, scopes,
20
+ authorizeParams, clientAuth } } })` — an OpenID provider by its `issuer` (endpoints discovered), any other by its
21
+ endpoints; none is known to the platform by name. `ctx.oauth.connect(name, { returnTo, owner? })` answers the
22
+ consent URL (authorization code with PKCE); the platform answers `/fn/oauth/callback` — the one address to register
23
+ with every provider — exchanges the code with the app's id and secret from the named credential, and sends the
24
+ visitor back to `returnTo` with `?oauth=<name>&oauth_result=connected` (or `&oauth_error=`). `ctx.oauth.fetch(name,
25
+ url)` writes the token in, renewed before it lapses and once more on a 401, only to `allow.hosts`; `status` and
26
+ `disconnect` (revoked where the provider says). A token is a signed-in visitor's own by default, `{ owner: 'space' }`
27
+ the space's, or a key of the code's own; it is kept in the space's `kv` sealed with a key of the space's that no
28
+ `ctx.sign` reaches, so the code never holds one. In the sandbox, natively and in a space's runtime alike; a plugin's
29
+ functions declare and reach none. Needs `signingSecret`. Runs also carry the `origin` of the request that started
30
+ them (`ctx.origin` of a task context), what the callback address is made of.
31
+
32
+ ## Packages
33
+ - **No path a package does not export is written anywhere in the packages** (`@plitzi/plitzi-sdk`,
34
+ `@plitzi/sdk-shared`): two JSDoc comments sent readers to `@plitzi/sdk-authoring/testing`, which is not an entry —
35
+ `inspectRenders` is exported by `@plitzi/sdk-authoring`. `yarn check:specifiers` (in CI after the build) reads every
36
+ `@plitzi/<package>/<path>` the workspace writes — the code, its built declarations, JSDoc, skills and docs — against
37
+ what that package exports, so an import somebody would copy into a project and get `ERR_MODULE_NOT_FOUND` from cannot
38
+ be published again.
39
+
40
+ - **The packages that run in Node say which Node** (`@plitzi/sdk-server`, `@plitzi/cli`, `@plitzi/sdk-mcp`,
41
+ `@plitzi/sdk-authoring`): `"engines": { "node": ">=22.18" }`, the floor every project the CLI makes already declares —
42
+ installed on an older Node they now say so, instead of failing on the first API it lacks (`--env-file-if-exists`,
43
+ `--permission`, `Set#union`). The browser's packages declare none: a bundler reads them.
44
+
45
+ - **A short render guide, and each part of it alone** (`@plitzi/sdk-mcp`): `renderGuideText` stays the whole guide
46
+ (~30k characters); `renderGuideCore` is a third of it for an agent that counts its tokens — a voice assistant, a small
47
+ model — with the model of a render, the element types, the host's theme and what to do on a refusal, and the address
48
+ of every other section; `renderGuideTopics[topic]` and `renderGuideTopicUri(topic)` (`plitzi://render/guide/repeat`,
49
+ `…/data`…) serve each one, cut from the one text. The MCP server answers them as resources and through `plitzi_read`.
50
+
51
+ ## CLI
52
+ - **What Plitzi decided reaches the agent writing a report** (`@plitzi/cli`): `plitzi feedback`'s brief lists what was
53
+ reported and kept as it is — with why, and what to do instead — so a report files it under `changed` as `decided`
54
+ rather than carrying it as open, and the page has that status.
55
+
56
+ - **The CLI skill says what `ERR_MODULE_NOT_FOUND` into a `@plitzi` package's `dist` is** (`@plitzi/cli`): an import of
57
+ a path the package does not export — a file rather than its folder — with `plitzi doctor` to name each one and
58
+ `plitzi upgrade migrations --write` to rewrite it.
59
+
60
+ - Updated dependencies [c7c241a]
61
+ - @plitzi/sdk-shared@0.38.20
62
+
63
+ ## 0.38.19
64
+
65
+ ### Patch Changes
66
+
67
+ - 92a9f1b: ## Security
68
+
69
+ - **The `Origin` fallback tells the ports apart over HTTP/2 too** (`@plitzi/sdk-server`): a browser that sends no
70
+ `Sec-Fetch-Site` (Safari before 16.4, older webviews) is judged by its `Origin`, compared with the authority the
71
+ request was addressed to. HTTP/2 carries no `Host` header — the authority is `:authority` — and the comparison then
72
+ fell back to the host's NAME, so every port and scheme of it counted as this server's own: what 0.38.18 closed for
73
+ `same-site` stayed open there, over TLS, where a Plitzi server speaks HTTP/2. The authority is now `:authority`,
74
+ `Host`, or the `X-Forwarded-Host` a proxy in front wrote — whichever names the host the request is answered as — port
75
+ included; when none does, the origin is not taken as its own. The write guard (`crossSiteWrites`), the sign-in's
76
+ login-CSRF check and `createOriginGuardMiddleware` share it.
77
+
78
+ ## Packages
79
+ - **The server evaluates rules without the query editor** (`@plitzi/sdk-shared`, `@plitzi/sdk-auth`,
80
+ `@plitzi/sdk-elements`, `@plitzi/sdk-interactions`, `@plitzi/plitzi-builder`): every evaluation of a `when` rule
81
+ group imports `QueryBuilderEvaluator` from `@plitzi/plitzi-ui/QueryBuilder/evaluator` — the evaluator alone — instead
82
+ of the `QueryBuilder` barrel, which brings the editor's React components, or `QueryBuilder/helpers`, which brings the
83
+ SQL and MongoDB formatters. `@plitzi/sdk-shared/helpers` reads `get` and `omit` from `@plitzi/plitzi-ui/helpers/lodash`.
84
+ Importing `@plitzi/sdk-server` loads 19 modules of `@plitzi/plitzi-ui` (26 before) and neither
85
+ `class-variance-authority` nor `clsx`, and starts in ~125 ms (~150 before). Needs `@plitzi/plitzi-ui` 1.6.34.
86
+
87
+ - Updated dependencies [92a9f1b]
88
+ - @plitzi/sdk-shared@0.38.19
89
+
3
90
  ## 0.38.18
4
91
 
5
92
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-event-bridge",
3
- "version": "0.38.18",
3
+ "version": "0.38.20",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist"
@@ -28,7 +28,7 @@
28
28
  "type": "module",
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
- "@plitzi/sdk-shared": "0.38.18"
31
+ "@plitzi/sdk-shared": "0.38.20"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@testing-library/react": "^16.3.3",