mcp-teams 0.3.48 → 0.3.49

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.48",
3
- "buildId": "af1a6fe8696c"
2
+ "version": "0.3.49",
3
+ "buildId": "5733c89d846b"
4
4
  }
@@ -109,7 +109,7 @@ const TRAFFIC_KEY = "traffic";
109
109
  const TRAFFIC_UNTIL_KEY = "trafficUntil";
110
110
  const TRAFFIC_RECORD_MS = 30 * 60_000;
111
111
  let traffic = null;
112
- let trafficSave = null;
112
+ let trafficSave = null; // { timer, store }: the pending save, and the storage it goes to
113
113
  let trafficQueue = Promise.resolve();
114
114
  let trafficUntil = null; // ms since 1970 when recording ends (0: off); null until read from storage
115
115
 
@@ -130,13 +130,25 @@ function updateTraffic(fn, { ifRecording = false } = {}) {
130
130
  const next = fn(traffic);
131
131
  if (next === traffic) return;
132
132
  traffic = next;
133
- clearTimeout(trafficSave);
134
- trafficSave = setTimeout(() => chrome.storage.session.set({ [TRAFFIC_KEY]: traffic }), 500);
133
+ clearTimeout(trafficSave?.timer);
134
+ // The storage is taken now: the save goes where the request was recorded, whatever `chrome` is
135
+ // by then (in tests, the next test's fake or none).
136
+ const store = chrome.storage.session;
137
+ trafficSave = { store, timer: setTimeout(savePendingTraffic, 500) };
135
138
  })
136
139
  .catch(() => {});
137
140
  return trafficQueue;
138
141
  }
139
142
 
143
+ /** Saves the log now if a save is pending (also for tests, instead of waiting half a second). */
144
+ export function savePendingTraffic() {
145
+ if (!trafficSave) return;
146
+ const { store, timer } = trafficSave;
147
+ clearTimeout(timer);
148
+ trafficSave = null;
149
+ store.set({ [TRAFFIC_KEY]: traffic }).catch(() => {}); // kept in memory: the next change saves again
150
+ }
151
+
140
152
  const trafficFilter = { urls: teams.TRAFFIC_URLS, types: ["xmlhttprequest", "other", "media"] };
141
153
 
142
154
  function recordRequest(details) {
@@ -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.48",
5
+ "version": "0.3.49",
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.48",
3
+ "version": "0.3.49",
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": {