@plitzi/sdk-shared 0.32.12 → 0.32.14
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 +16 -0
- package/dist/types/ServerTypes.d.ts +27 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @plitzi/sdk-shared
|
|
2
2
|
|
|
3
|
+
## 0.32.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- v0.32.14
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @plitzi/nexus@0.32.14
|
|
10
|
+
|
|
11
|
+
## 0.32.13
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- v0.32.13
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @plitzi/nexus@0.32.13
|
|
18
|
+
|
|
3
19
|
## 0.32.12
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -412,6 +412,18 @@ export type OAuthAdapters = {
|
|
|
412
412
|
} | undefined>;
|
|
413
413
|
store: OAuthStore;
|
|
414
414
|
};
|
|
415
|
+
/** A connection a visitor may take WITHOUT signing in, for a server whose public surface needs no identity — the
|
|
416
|
+
* MCP App, the tool and resource listings, the guide. The consent screen offers it as a second button beside the
|
|
417
|
+
* sign-in, and the grant is whatever `target` grants: point it at a target that carries no space, never at one
|
|
418
|
+
* that does, since nobody proved who they are. */
|
|
419
|
+
export type OAuthGuestConfig = {
|
|
420
|
+
/** Handed straight to {@link OAuthAdapters.issueToken} when a visitor takes the guest connection. */
|
|
421
|
+
target: OAuthGrantTarget;
|
|
422
|
+
/** Button text. Defaults to 'Continue without an account'. */
|
|
423
|
+
label?: string;
|
|
424
|
+
/** Who the grant is issued as. Defaults to `{ id: 'guest', label: 'Guest' }`. */
|
|
425
|
+
user?: OAuthUser;
|
|
426
|
+
};
|
|
415
427
|
/** What the built-in consent screen shows around the form. Ignored when `renderConsent` replaces the page. */
|
|
416
428
|
export type OAuthBranding = {
|
|
417
429
|
/** Shown as the heading, e.g. 'Plitzi'. Defaults to 'Plitzi'. */
|
|
@@ -432,6 +444,12 @@ export type OAuthConsentView = {
|
|
|
432
444
|
hidden: Record<string, string>;
|
|
433
445
|
/** Offered on the 'target' step only. */
|
|
434
446
|
targets: OAuthGrantTarget[];
|
|
447
|
+
/** Offered on the 'credentials' step when the deployment allows a guest connection. The form must submit a
|
|
448
|
+
* `guest` field for it (any non-empty value), which is what tells the server to skip authentication. */
|
|
449
|
+
guest?: {
|
|
450
|
+
label: string;
|
|
451
|
+
description?: string;
|
|
452
|
+
};
|
|
435
453
|
/** Who logged in, on the 'target' step. */
|
|
436
454
|
user?: OAuthUser;
|
|
437
455
|
/** A message to show the user, e.g. after a failed login. */
|
|
@@ -442,7 +460,13 @@ export type OAuthConsentView = {
|
|
|
442
460
|
* authorization code with PKCE). ENTIRELY OPTIONAL: without this config no endpoint is mounted, discovery keeps
|
|
443
461
|
* answering 404 and the server stays anonymous, which is a working setup — the public surface (handshake, tool
|
|
444
462
|
* and resource listing, the guide, plitzi_render) never needed a token. Configure it only to let a remote host
|
|
445
|
-
* that cannot send custom headers — Claude Desktop, ChatGPT — obtain a space-scoped one.
|
|
463
|
+
* that cannot send custom headers — Claude Desktop, ChatGPT — obtain a space-scoped one.
|
|
464
|
+
*
|
|
465
|
+
* Configuring it also protects the MCP endpoint: a JSON-RPC call that presents no verifiable bearer is answered
|
|
466
|
+
* with RFC 6750's 401 challenge rather than the anonymous surface, because that 401 is the only thing a host runs
|
|
467
|
+
* its flow off — it ignores a `WWW-Authenticate` header on a 200, and a server that never sends one is treated as
|
|
468
|
+
* needing no authorization at all, leaving a completed grant with nowhere to attach. Offer a grant target that
|
|
469
|
+
* carries no space ({@link OAuthGrantTarget}) so the public surface stays one consent away. */
|
|
446
470
|
export type OAuthConfig = {
|
|
447
471
|
adapters: OAuthAdapters;
|
|
448
472
|
/** The issuer/resource identifier published in the metadata documents. Defaults to the origin the request came
|
|
@@ -455,6 +479,8 @@ export type OAuthConfig = {
|
|
|
455
479
|
codeTtlSeconds?: number;
|
|
456
480
|
/** How long a refresh grant lives, in seconds. Default 30 days. Set 0 to issue no refresh tokens. */
|
|
457
481
|
refreshTtlSeconds?: number;
|
|
482
|
+
/** Offer a connection that needs no account — see {@link OAuthGuestConfig}. Omit to require sign-in. */
|
|
483
|
+
guest?: OAuthGuestConfig;
|
|
458
484
|
branding?: OAuthBranding;
|
|
459
485
|
/** Replaces the built-in consent screen — return a full HTML document for the given step. */
|
|
460
486
|
renderConsent?: (view: OAuthConsentView) => string | Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plitzi/sdk-shared",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.14",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -1230,7 +1230,7 @@
|
|
|
1230
1230
|
},
|
|
1231
1231
|
"dependencies": {
|
|
1232
1232
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
1233
|
-
"@plitzi/nexus": "0.32.
|
|
1233
|
+
"@plitzi/nexus": "0.32.14",
|
|
1234
1234
|
"@plitzi/plitzi-ui": "^1.6.18",
|
|
1235
1235
|
"date-fns": "^4.4.0",
|
|
1236
1236
|
"date-fns-tz": "^3.2.0",
|