mcp-teams 0.3.10 → 0.3.12
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/extension/background.js +16 -1
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
package/extension/background.js
CHANGED
|
@@ -1248,15 +1248,30 @@ let retryTimer = null;
|
|
|
1248
1248
|
export const HEARTBEAT_TIMEOUT_MS = 45_000;
|
|
1249
1249
|
/** The watchdog never waits less: a busy machine runs timers late, and that isn't a frozen hub. */
|
|
1250
1250
|
const MIN_HEARTBEAT_TIMEOUT_MS = 2_000;
|
|
1251
|
+
/**
|
|
1252
|
+
* A watchdog that runs later than this fraction of its wait after it was due finds the worker
|
|
1253
|
+
* stalled. Overdue timers run before the messages that came meanwhile are read, so the hub's ping
|
|
1254
|
+
* may wait unread: it waits once more instead, but not twice in a row, so a frozen hub is still
|
|
1255
|
+
* dropped (as in src/bridge.ts).
|
|
1256
|
+
*/
|
|
1257
|
+
const STALL_SLACK = 0.5;
|
|
1258
|
+
|
|
1259
|
+
/** Whether a check that waited `waitMs` and was due at `due` ran late (see STALL_SLACK). */
|
|
1260
|
+
function ranLate(due, waitMs) {
|
|
1261
|
+
return Date.now() - due > waitMs * STALL_SLACK;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1251
1264
|
let watchdog = null; // { socket, ms, timer } of the current connection
|
|
1252
1265
|
|
|
1253
1266
|
/** (Re)starts the watchdog of `socket`: no ping within `ms` drops it and connects again. */
|
|
1254
|
-
function watchHeartbeat(socket, ms) {
|
|
1267
|
+
function watchHeartbeat(socket, ms, afterLate = false) {
|
|
1255
1268
|
clearTimeout(watchdog?.timer);
|
|
1269
|
+
const due = Date.now() + ms;
|
|
1256
1270
|
const timer = setTimeout(() => {
|
|
1257
1271
|
if (watchdog?.timer !== timer) return;
|
|
1258
1272
|
watchdog = null;
|
|
1259
1273
|
if (ws !== socket) return;
|
|
1274
|
+
if (!afterLate && ranLate(due, ms)) return watchHeartbeat(socket, ms, true);
|
|
1260
1275
|
// Its close may never complete: nobody can be told the outcome of what came on it, now.
|
|
1261
1276
|
withdrawAll(socket);
|
|
1262
1277
|
reconnectNow();
|
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.3.
|
|
5
|
+
"version": "0.3.12",
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-teams",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
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": {
|