m365connector 0.3.3 → 0.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "m365connector",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "MCP server for M365 Connector browser extension",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -333,7 +333,7 @@ export function registerTools(registry, context) {
333
333
  const wsResult = await context.ws.sendRequest(
334
334
  "open",
335
335
  { conversation_id: conversationId, context: readContext, fullContent: Boolean(args.fullContent) },
336
- { timeoutMs: 60000 }
336
+ { timeoutMs: args.fullContent ? 90000 : 60000 }
337
337
  );
338
338
 
339
339
  return asObject(wsResult);
package/src/ws-server.js CHANGED
@@ -44,7 +44,7 @@ export class WsServer {
44
44
  this.wss.once("error", reject);
45
45
  });
46
46
 
47
- this.logger.error(`[m365connector/ws] listening on ws://${this.host}:${this.port}`);
47
+ this.logger.info(`[m365connector/ws] listening on ws://${this.host}:${this.port}`);
48
48
  }
49
49
 
50
50
  async stop() {
@@ -96,6 +96,7 @@ export class WsServer {
96
96
 
97
97
  return new Promise((resolve, reject) => {
98
98
  const timeout = setTimeout(() => {
99
+ this.logger.warn(`[m365connector/ws] request timed out: type=${type} id=${id}`);
99
100
  this.pending.delete(id);
100
101
  reject(new Error(`WebSocket request timed out after ${timeoutMs}ms`));
101
102
  }, timeoutMs);
@@ -130,7 +131,7 @@ export class WsServer {
130
131
  if (this.client && this.client.readyState === WebSocket.OPEN) {
131
132
  // MV3 service workers can die silently without sending a close frame.
132
133
  // When the extension reconnects, replace the stale connection.
133
- this.logger.error("[m365connector/ws] replacing existing connection with new one");
134
+ this.logger.info("[m365connector/ws] replacing existing connection with new one");
134
135
  try { this.client.terminate(); } catch (_e) { /* ignored */ }
135
136
  this.handleClose(this.client);
136
137
  }
@@ -147,14 +148,14 @@ export class WsServer {
147
148
  });
148
149
 
149
150
  socket.on("close", (code, reason) => {
150
- this.logger.error(`[m365connector/ws] socket close: code=${code}, reason=${String(reason)}`);
151
+ this.logger.info(`[m365connector/ws] socket close: code=${code}, reason=${String(reason)}`);
151
152
  this.handleClose(socket);
152
153
  });
153
154
 
154
155
  socket.on("error", (err) => {
155
156
  this.logger.warn("[m365connector/ws] client socket error:", err.message);
156
157
  });
157
- this.logger.error("[m365connector/ws] extension connected");
158
+ this.logger.info("[m365connector/ws] extension connected");
158
159
  }
159
160
 
160
161
  async handleMessage(socket, rawData) {
@@ -197,6 +198,6 @@ export class WsServer {
197
198
  this.pending.delete(id);
198
199
  }
199
200
 
200
- this.logger.error("[m365connector/ws] extension disconnected");
201
+ this.logger.info("[m365connector/ws] extension disconnected");
201
202
  }
202
203
  }