@plitzi/sdk-auth 0.38.19 → 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.
- package/CHANGELOG.md +61 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @plitzi/sdk-auth
|
|
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-navigation@0.38.20
|
|
62
|
+
- @plitzi/sdk-shared@0.38.20
|
|
63
|
+
|
|
3
64
|
## 0.38.19
|
|
4
65
|
|
|
5
66
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-auth",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.20",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@plitzi/nexus": "^1.4.0",
|
|
34
34
|
"@plitzi/plitzi-ui": "^1.6.34",
|
|
35
|
-
"@plitzi/sdk-navigation": "0.38.
|
|
36
|
-
"@plitzi/sdk-shared": "0.38.
|
|
35
|
+
"@plitzi/sdk-navigation": "0.38.20",
|
|
36
|
+
"@plitzi/sdk-shared": "0.38.20"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"eslint": "^9.39.5",
|