@nestr/mcp 0.1.52 → 0.1.54
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/build/http.js +124 -55
- package/build/http.js.map +1 -1
- package/build/oauth/file-store.d.ts +14 -0
- package/build/oauth/file-store.d.ts.map +1 -0
- package/build/oauth/file-store.js +366 -0
- package/build/oauth/file-store.js.map +1 -0
- package/build/oauth/flow.d.ts +13 -13
- package/build/oauth/flow.d.ts.map +1 -1
- package/build/oauth/flow.js +21 -19
- package/build/oauth/flow.js.map +1 -1
- package/build/oauth/redis-store.d.ts +17 -0
- package/build/oauth/redis-store.d.ts.map +1 -0
- package/build/oauth/redis-store.js +174 -0
- package/build/oauth/redis-store.js.map +1 -0
- package/build/oauth/storage.d.ts +28 -103
- package/build/oauth/storage.d.ts.map +1 -1
- package/build/oauth/storage.js +49 -478
- package/build/oauth/storage.js.map +1 -1
- package/build/oauth/store.d.ts +80 -0
- package/build/oauth/store.d.ts.map +1 -0
- package/build/oauth/store.js +37 -0
- package/build/oauth/store.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuthStore Interface
|
|
3
|
+
*
|
|
4
|
+
* Abstraction layer for OAuth state storage. Two implementations:
|
|
5
|
+
* - FileStore (default): JSON files on disk, for local dev and stdio mode
|
|
6
|
+
* - RedisStore: Redis-backed, for multi-pod production deployment (REDIS_URL)
|
|
7
|
+
*/
|
|
8
|
+
// ============ Store Singleton ============
|
|
9
|
+
let _store = null;
|
|
10
|
+
/**
|
|
11
|
+
* Initialize the global store. Must be called once at startup (before handling requests).
|
|
12
|
+
*/
|
|
13
|
+
export async function initStore() {
|
|
14
|
+
if (_store)
|
|
15
|
+
return _store;
|
|
16
|
+
if (process.env.REDIS_URL) {
|
|
17
|
+
const { createRedisStore } = await import("./redis-store.js");
|
|
18
|
+
_store = await createRedisStore(process.env.REDIS_URL);
|
|
19
|
+
console.log("OAuth store: Redis");
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const { createFileStore } = await import("./file-store.js");
|
|
23
|
+
_store = createFileStore();
|
|
24
|
+
console.log("OAuth store: file-based");
|
|
25
|
+
}
|
|
26
|
+
return _store;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the initialized store. Throws if initStore() hasn't been called.
|
|
30
|
+
*/
|
|
31
|
+
export function getStore() {
|
|
32
|
+
if (!_store) {
|
|
33
|
+
throw new Error("OAuth store not initialized. Call initStore() during startup.");
|
|
34
|
+
}
|
|
35
|
+
return _store;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/oauth/store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAoFH,4CAA4C;AAE5C,IAAI,MAAM,GAAsB,IAAI,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC9D,MAAM,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACpC,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAC5D,MAAM,GAAG,eAAe,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ;IACtB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestr/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.54",
|
|
4
4
|
"mcpName": "io.nestr/mcp",
|
|
5
5
|
"description": "MCP server for Nestr - the platform for self-organizing teams practicing Holacracy, Sociocracy, and role-based work. Manage circles, roles, tactical meetings, governance meetings, tensions, and more.",
|
|
6
6
|
"author": "Nestr <dev@nestr.io>",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"express": "^5.0.1",
|
|
69
69
|
"express-rate-limit": "^8.3.1",
|
|
70
70
|
"helmet": "^8.1.0",
|
|
71
|
+
"ioredis": "^5.4.0",
|
|
71
72
|
"mcpcat": "^0.1.13",
|
|
72
73
|
"zod": "^3.25.0"
|
|
73
74
|
},
|