@mongodb-js/mcp-types 1.15.0-alpha.9 → 2.0.1-alpha.1
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/dist/sessionStore.d.ts +11 -1
- package/dist/sessionStore.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/sessionStore.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ISession } from "./session.js";
|
|
|
4
4
|
export type CloseableTransport = {
|
|
5
5
|
close(): Promise<void>;
|
|
6
6
|
};
|
|
7
|
-
export type SessionCloseReason = "idle_timeout" | "transport_closed" | "server_stop" | "unknown";
|
|
7
|
+
export type SessionCloseReason = "idle_timeout" | "transport_closed" | "server_stop" | "unknown" | "evicted";
|
|
8
8
|
export interface ISessionStore<T extends CloseableTransport = CloseableTransport> {
|
|
9
9
|
/**
|
|
10
10
|
* Returns the transport for the given session id or `undefined` if the
|
|
@@ -47,6 +47,16 @@ export type SessionStoreConstructorArgs<TMetrics extends MetricDefinitions = Met
|
|
|
47
47
|
idleTimeoutMS: number;
|
|
48
48
|
notificationTimeoutMS: number;
|
|
49
49
|
maxSessions: number;
|
|
50
|
+
/**
|
|
51
|
+
* When the store is at `maxSessions` and a new session arrives, evict the
|
|
52
|
+
* least-recently-used session instead of rejecting — but only if it has been
|
|
53
|
+
* idle for at least this long (ms). Must be < `idleTimeoutMS` (the background
|
|
54
|
+
* reaper already removes anything past that), or the valve never fires. If a
|
|
55
|
+
* session idle >= this exists, it is closed locally to make room; otherwise
|
|
56
|
+
* the new session is rejected. Defaults to 120_000 (2 min), clamped to
|
|
57
|
+
* `idleTimeoutMS`.
|
|
58
|
+
*/
|
|
59
|
+
evictionIdleGraceMS?: number;
|
|
50
60
|
};
|
|
51
61
|
logger: ILoggerBase;
|
|
52
62
|
metrics: IMetrics<TMetrics>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionStore.d.ts","sourceRoot":"","sources":["../src/sessionStore.ts"],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AQ,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClB,YAAY,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,kBAAkB,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxF,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC;AAED,MAAM,MAAM,2BAA2B,CAAC,QAAQ,SAAS,iBAAiB,GAAG,iBAAiB,IAAI;IAC9F,OAAO,EAAE;QACL,aAAa,EAAE,MAAM,CAAC;QACtB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,WAAW,EAAE,MAAM,CAAC;QACpB;;;;;;;;WAQG;QACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAChC,CAAC;IACF,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAC5B,UAAU,SAAS,kBAAkB,GAAG,kBAAkB,EAC1D,QAAQ,SAAS,iBAAiB,GAAG,iBAAiB,IACtD,CAAC,IAAI,EAAE,2BAA2B,CAAC,QAAQ,CAAC,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongodb-js/mcp-types",
|
|
3
3
|
"description": "Shared TypeScript types and interfaces for MongoDB MCP server packages",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1-alpha.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "MongoDB <info@mongodb.com>",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/node": "^25.6.0",
|
|
28
28
|
"mongodb-log-writer": "^2.5.13",
|
|
29
29
|
"typescript": "^5.9.2",
|
|
30
|
-
"vitest": "^4.1.
|
|
30
|
+
"vitest": "^4.1.10"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"compile": "tsc --project tsconfig.json",
|