mcp-teams 0.2.13 → 0.2.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/README.md +10 -0
- package/dist/bridge.js +256 -26
- package/dist/bridge.js.map +1 -1
- package/dist/fairqueue.js +83 -0
- package/dist/fairqueue.js.map +1 -0
- package/dist/tools.js +20 -18
- package/dist/tools.js.map +1 -1
- package/extension/background.js +372 -105
- package/extension/manifest.json +1 -1
- package/extension/teams.js +18 -0
- package/package.json +1 -1
package/extension/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvoz9Wexl4ZqY9YtEyBZsu/Qi5Ft5EjNUNB8b30wgt3AR8TjXI5UumcPQFBIm7ZfvBsjgrh6tBJlygsgFbZ5cB1EiI+WSz/2Wcqwz4eowKMXXPvGuDGrO+2O2zbSpTG19/MwTljI+g0TLfn8Vkoqd8z9MskKk+vCZjjV0Jk8QjVEdHypgM7H8zTuUM06SO12IIZMdeE3IURzf35zbjlfPPkJiDWoo3wB9nxAvLd57xrQhPUB/lGtCJk9mS3SY+/VwOlG5kJ9WS/RCHXcs5Qs7huIlKIatmFz7YiducvTR3DKBbjqbMTyqHzXkmkUmJRqzsYtgtKcz0C0cjFOt6uNdhwIDAQAB",
|
|
4
4
|
"name": "mcp-teams bridge",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.14",
|
|
6
6
|
"description": "Lets AI assistants (via the mcp-teams MCP server) read and search Microsoft Teams chats, channels and meeting transcripts and, with your explicit confirmation, post messages.",
|
|
7
7
|
"minimum_chrome_version": "116",
|
|
8
8
|
"icons": {
|
package/extension/teams.js
CHANGED
|
@@ -78,6 +78,24 @@ export function serviceUrl(path, base) {
|
|
|
78
78
|
return url;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
// ------------------------------------------------------------ throttling
|
|
82
|
+
|
|
83
|
+
const RETRY_AFTER_DEFAULT_MS = 5_000;
|
|
84
|
+
const RETRY_AFTER_MIN_MS = 1_000;
|
|
85
|
+
const RETRY_AFTER_MAX_MS = 60_000;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* How long to leave a service alone after a 429, from its Retry-After header: seconds or an
|
|
89
|
+
* HTTP date. 5 s when it's missing or unreadable, at least 1 s, at most 60 s (a request's own limit).
|
|
90
|
+
*/
|
|
91
|
+
export function retryAfterMs(value, now = Date.now()) {
|
|
92
|
+
const v = String(value ?? "").trim();
|
|
93
|
+
let ms = RETRY_AFTER_DEFAULT_MS;
|
|
94
|
+
if (/^\d+(\.\d+)?$/.test(v)) ms = Number(v) * 1000;
|
|
95
|
+
else if (v && !Number.isNaN(Date.parse(v))) ms = Date.parse(v) - now;
|
|
96
|
+
return Math.min(RETRY_AFTER_MAX_MS, Math.max(RETRY_AFTER_MIN_MS, Math.round(ms)));
|
|
97
|
+
}
|
|
98
|
+
|
|
81
99
|
// ------------------------------------------------------------ read_messages cursor
|
|
82
100
|
|
|
83
101
|
const toBase64Url = (s) => btoa(String.fromCharCode(...new TextEncoder().encode(s))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "MCP server that lets AI assistants work with Microsoft Teams (web) through a Chrome/Edge extension bridge",
|
|
5
5
|
"keywords": ["mcp", "model-context-protocol", "teams", "microsoft-teams", "microsoft-365", "chat", "claude", "chrome-extension"],
|
|
6
6
|
"repository": {
|