mcp-teams 0.3.41 → 0.3.42

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/build.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "0.3.41",
2
+ "version": "0.3.42",
3
3
  "buildId": "b80780726765"
4
4
  }
@@ -1826,6 +1826,21 @@ function reconnectNow() {
1826
1826
  retryMs = RETRY_MIN_MS;
1827
1827
  }
1828
1828
 
1829
+ let reconnecting = true; // false only after stopReconnecting()
1830
+
1831
+ /**
1832
+ * For tests only (nothing in the extension calls it): the worker never connects again, and no
1833
+ * retry or watchdog is left waiting. A test's teardown calls it before the hub's connections end
1834
+ * and its fake chrome goes, since a retry would otherwise run connect() without chrome.
1835
+ */
1836
+ export function stopReconnecting() {
1837
+ reconnecting = false;
1838
+ clearTimeout(retryTimer);
1839
+ retryTimer = null;
1840
+ clearTimeout(watchdog?.timer);
1841
+ watchdog = null;
1842
+ }
1843
+
1829
1844
  /**
1830
1845
  * The pairing token: one saved under Advanced, else the one setup wrote into this
1831
1846
  * folder (pairing.json, only in the installed copy). Null when there is none.
@@ -1847,7 +1862,7 @@ async function pairingToken(saved) {
1847
1862
  * the port gets nothing.
1848
1863
  */
1849
1864
  async function connect() {
1850
- if (starting || (ws && (ws.readyState === WebSocket.OPEN || ws.readyState === WebSocket.CONNECTING))) return;
1865
+ if (!reconnecting || starting || (ws && (ws.readyState === WebSocket.OPEN || ws.readyState === WebSocket.CONNECTING))) return;
1851
1866
  clearTimeout(retryTimer);
1852
1867
  retryTimer = null;
1853
1868
  starting = true;
@@ -1863,7 +1878,8 @@ async function connect() {
1863
1878
  } finally {
1864
1879
  starting = false;
1865
1880
  }
1866
- if (ws) return;
1881
+ // stopReconnecting() may have run while the storage read was waiting.
1882
+ if (ws || !reconnecting) return;
1867
1883
  state = "connecting";
1868
1884
  const socket = new WebSocket(`ws://127.0.0.1:${port || DEFAULT_PORT}`);
1869
1885
  ws = socket;
@@ -1932,7 +1948,7 @@ async function connect() {
1932
1948
  // When a server session ends, another one takes over the port within a second:
1933
1949
  // retry soon, backing off to the alarm's pace.
1934
1950
  clearTimeout(retryTimer);
1935
- retryTimer = setTimeout(connect, retryMs);
1951
+ retryTimer = reconnecting ? setTimeout(connect, retryMs) : null;
1936
1952
  retryMs = Math.min(retryMs * 2, RETRY_MAX_MS);
1937
1953
  if (state === "unauthorized" && !authed && lastError) {
1938
1954
  // refuse() said why.
@@ -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.41",
5
+ "version": "0.3.42",
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.41",
3
+ "version": "0.3.42",
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": {