@ractive-ch/tab-mcp 0.3.1 → 0.4.0
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/README.md +2 -2
- package/exchange.d.ts +12 -3
- package/identity.d.ts +2 -1
- package/index.js +347 -123
- package/index.js.map +16 -16
- package/log.d.ts +5 -0
- package/main.js +347 -123
- package/main.js.map +16 -16
- package/notopen.d.ts +8 -2
- package/oauth/cimd.d.ts +15 -1
- package/oauth/oidc.d.ts +5 -1
- package/oauth/pairing.d.ts +2 -0
- package/oauth/server.d.ts +2 -0
- package/package.json +1 -1
- package/protocol.d.ts +1 -0
- package/ratelimit.d.ts +2 -0
- package/relay.d.ts +2 -0
- package/session.d.ts +10 -3
- package/store/memory.d.ts +1 -1
- package/store/sqlite.d.ts +1 -1
- package/store/types.d.ts +12 -4
- package/testing.js +27 -5
- package/testing.js.map +3 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ and gets an MCP address. The user adds that address to an AI app and pairs it by
|
|
|
10
10
|
a code from the page on the relay's sign-in page. The relay then forwards the AI app's
|
|
11
11
|
requests to the page. It knows nothing about the tools themselves.
|
|
12
12
|
|
|
13
|
-
**Status: 0.
|
|
13
|
+
**Status: 0.4.0.** Until 1.0, a new minor version can still change settings and the API.
|
|
14
14
|
The relay speaks MCP revision 2026-07-28 only and accepts AI apps that register through
|
|
15
15
|
OAuth Client ID Metadata Documents; see [compatibility](https://github.com/ractive/tab-mcp/blob/main/docs/compatibility.md)
|
|
16
16
|
for which apps work.
|
|
@@ -32,7 +32,7 @@ Or with Docker (linux/amd64 and linux/arm64):
|
|
|
32
32
|
docker run -d -p 127.0.0.1:8080:8080 -v tab-mcp-data:/data \
|
|
33
33
|
-e TAB_MCP_PUBLIC_URL=https://relay.example.com \
|
|
34
34
|
-e TAB_MCP_ALLOWED_ORIGINS=https://app.example.com \
|
|
35
|
-
ractive/tab-mcp:0.
|
|
35
|
+
ractive/tab-mcp:0.4.0
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
The image is also on `ghcr.io/ractive/tab-mcp`. Put the relay behind a reverse proxy
|
package/exchange.d.ts
CHANGED
|
@@ -16,19 +16,28 @@ export declare const RelayErrorCode: {
|
|
|
16
16
|
readonly badResponse: -31007;
|
|
17
17
|
readonly storeUnavailable: -31008;
|
|
18
18
|
readonly signedOut: -31009;
|
|
19
|
+
readonly restarting: -31010;
|
|
19
20
|
};
|
|
20
21
|
export type CancelReason = "client_closed" | "timeout" | "error";
|
|
21
22
|
/**
|
|
22
23
|
* What to do when the page goes away mid-request (DEC-074): send the request
|
|
23
24
|
* to the page again once it is back (only while nothing was sent to the AI
|
|
24
|
-
* app),
|
|
25
|
-
*
|
|
25
|
+
* app), answer with this JSON-RPC message at HTTP 200, or fail with this
|
|
26
|
+
* error (no body and no error: 503, `-31003`).
|
|
26
27
|
*/
|
|
27
28
|
export type PageGoneReply = {
|
|
28
29
|
retry: true;
|
|
29
30
|
} | {
|
|
30
31
|
retry: false;
|
|
31
32
|
body?: string;
|
|
33
|
+
} | {
|
|
34
|
+
retry: false;
|
|
35
|
+
error: {
|
|
36
|
+
status: number;
|
|
37
|
+
code: number;
|
|
38
|
+
message: string;
|
|
39
|
+
headers: Record<string, string>;
|
|
40
|
+
};
|
|
32
41
|
};
|
|
33
42
|
export interface ExchangeOptions {
|
|
34
43
|
id: string;
|
|
@@ -89,5 +98,5 @@ export declare class Exchange {
|
|
|
89
98
|
* nothing was sent, else a JSON-RPC error event if the stream is at an
|
|
90
99
|
* event boundary.
|
|
91
100
|
*/
|
|
92
|
-
fail(status: number, code: number, message: string, cancelTab: boolean): void;
|
|
101
|
+
fail(status: number, code: number, message: string, cancelTab: boolean, headers?: Record<string, string>): void;
|
|
93
102
|
}
|
package/identity.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export declare function identityKey(issuer: string, subject: string): string;
|
|
|
20
20
|
/** Verifies tab assertions (DEC-076) and remembers used `jti`s. */
|
|
21
21
|
export declare class TabAssertionVerifier {
|
|
22
22
|
#private;
|
|
23
|
-
|
|
23
|
+
/** `maxSeen` replaces `MAX_SEEN_JTI` (tests only). */
|
|
24
|
+
constructor(oidc: OidcConfig, keys?: KeySource, maxSeen?: number);
|
|
24
25
|
/**
|
|
25
26
|
* Check an assertion for an MCP address; returns the binding key. Throws
|
|
26
27
|
* `JwtError` with a short reason for the log.
|