mcp-teams 0.3.69 → 0.3.70
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 +1 -1
- package/dist/build.json +2 -2
- package/dist/hubLog.js +34 -24
- package/dist/hubLog.js.map +1 -1
- package/extension/manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ Events: `start` and `exit` (with its `reason`: `stdin-closed`, `SIGTERM`, …; a
|
|
|
79
79
|
|
|
80
80
|
A `teams` line gives the tabs, whether a session is captured and for which services, `stale=yes` when the tab keeps calling but made no signed-in call for 5 minutes (a captured but expired session looks like that), whether the signed-in account is the `first` seen, the `same` or `changed`, and in `ms` how long the read took. A read over 2.5 s adds `slow=yes` and is logged even when nothing changed, for the 1st and every 10th slow read in a row. A failed read is `status=unreadable kind=… ms=… failures=N`, where `kind` is `timeout` (no answer in 15 s for the hub's own read), `closed` (the connection went while it waited), `not-connected`, `not-hub` or `error` (anything else, such as the extension's error answer), and `failures` counts the failures in a row: the 1st, every 10th, one of a new kind and the first after the extension reconnects are logged, and the read that works again says `after=N`. A read get_version's caller cancelled is `status=aborted`, and isn't counted.
|
|
81
81
|
|
|
82
|
-
It holds metadata only: never message text, names, chat ids, tokens, regions or who is signed in. With several AI sessions, all of their servers write to the same file (each line names its `pid`). For a `[Hub health]` report, attach `server.log` (and `server.log.1`) first. A file like `server.log.1234-ab12cd34.rotating` is an older part of the log that couldn't be moved to `server.log.1` because another program (a virus scanner, a viewer) held that open; attach it too, or delete it.
|
|
82
|
+
It holds metadata only: never message text, names, chat ids, tokens, regions or who is signed in. With several AI sessions, all of their servers write to the same file (each line names its `pid`). For a `[Hub health]` report, attach `server.log` (and `server.log.1`) first. A file like `server.log.1234-ab12cd34.rotating` is an older part of the log that couldn't be moved to `server.log.1` because another program (a virus scanner, a viewer) held that open; attach it too, or delete it. `server.log.lock` (and `hub.log.lock` for the native host's log) exists only while a server moves the log; one left by a server that died then is removed after 30 s.
|
|
83
83
|
|
|
84
84
|
### When the extension's console shows connection errors
|
|
85
85
|
|
package/dist/build.json
CHANGED
package/dist/hubLog.js
CHANGED
|
@@ -8,22 +8,26 @@
|
|
|
8
8
|
* their own so the rotation and what a line holds can be tested without a host process.
|
|
9
9
|
*/
|
|
10
10
|
import { randomBytes } from "node:crypto";
|
|
11
|
-
import { appendFileSync, mkdirSync,
|
|
11
|
+
import { appendFileSync, closeSync, mkdirSync, openSync, renameSync, statSync, unlinkSync } from "node:fs";
|
|
12
12
|
import { dirname } from "node:path";
|
|
13
13
|
/** hub.log moves to hub.log.1 once it is larger than this. */
|
|
14
14
|
export const HUB_LOG_MAX_BYTES = 1024 * 1024;
|
|
15
|
+
/** A rotation lock older than this was left by a process that died while rotating. */
|
|
16
|
+
const STALE_LOCK_MS = 30_000;
|
|
15
17
|
/**
|
|
16
18
|
* Moves `file` to `file`.1 once it is larger than maxBytes, safely while other processes append
|
|
17
19
|
* and rotate too (#143: about ten servers share server.log). Renaming straight to .1 could, when
|
|
18
20
|
* two processes saw the big file at once, move the other's fresh small file over the rotated one
|
|
19
|
-
* and lose it. So
|
|
20
|
-
*
|
|
21
|
-
*
|
|
21
|
+
* and lose it. So only the process that created `<file>.lock` (exclusively) rotates, and only when
|
|
22
|
+
* the file is still big under the lock; one that finds the lock taken skips rotating for this line
|
|
23
|
+
* (a later line tries again). Nothing is copied back or deleted: a line another process writes
|
|
24
|
+
* late, through the log it opened before the move, lands in the moved file and is kept (#152:
|
|
25
|
+
* setting a small file aside, appending it back and deleting it lost such lines).
|
|
22
26
|
*
|
|
23
27
|
* When .1 can't be replaced (on Windows, another program such as a virus scanner or a viewer holds
|
|
24
|
-
* it open), the big
|
|
25
|
-
* a
|
|
26
|
-
*
|
|
28
|
+
* it open), the big log moves aside as `<file>.<pid>-<random>.rotating` instead, and the live log
|
|
29
|
+
* starts afresh. Such a file is an older part of the log, safe to read or delete. A lock left by a
|
|
30
|
+
* process that died while rotating is removed once it is STALE_LOCK_MS old.
|
|
27
31
|
*
|
|
28
32
|
* `seenSize`: the size this process saw (tests: one seen just before another process rotated).
|
|
29
33
|
*/
|
|
@@ -35,35 +39,41 @@ export function rotate(file, maxBytes, seenSize) {
|
|
|
35
39
|
catch {
|
|
36
40
|
return; // no log yet
|
|
37
41
|
}
|
|
38
|
-
const
|
|
42
|
+
const lock = `${file}.lock`;
|
|
39
43
|
try {
|
|
40
|
-
|
|
44
|
+
closeSync(openSync(lock, "wx", 0o600));
|
|
41
45
|
}
|
|
42
46
|
catch {
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
let big;
|
|
46
|
-
try {
|
|
47
|
-
big = statSync(claim).size > maxBytes;
|
|
48
|
-
}
|
|
49
|
-
catch {
|
|
50
|
-
return; // can't tell: left as the .rotating file, nothing is lost
|
|
51
|
-
}
|
|
52
|
-
if (big) {
|
|
47
|
+
// Another process is rotating, or one died doing so.
|
|
53
48
|
try {
|
|
54
|
-
|
|
49
|
+
if (Date.now() - statSync(lock).mtimeMs > STALE_LOCK_MS)
|
|
50
|
+
unlinkSync(lock);
|
|
55
51
|
}
|
|
56
52
|
catch {
|
|
57
|
-
//
|
|
53
|
+
// gone already, or can't be removed now: a later line tries again
|
|
58
54
|
}
|
|
59
55
|
return;
|
|
60
56
|
}
|
|
61
57
|
try {
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
if (statSync(file).size <= maxBytes)
|
|
59
|
+
return; // another process rotated first
|
|
60
|
+
try {
|
|
61
|
+
renameSync(file, `${file}.1`);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
renameSync(file, `${file}.${process.pid}-${randomBytes(4).toString("hex")}.rotating`); // .1 is held
|
|
65
|
+
}
|
|
64
66
|
}
|
|
65
67
|
catch {
|
|
66
|
-
//
|
|
68
|
+
// can't move it now: it keeps growing until a later line can
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
try {
|
|
72
|
+
unlinkSync(lock);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
// removed once it is stale
|
|
76
|
+
}
|
|
67
77
|
}
|
|
68
78
|
}
|
|
69
79
|
/** A logger appending to `file`. Logging never throws: a log it can't write must not stop the host. */
|
package/dist/hubLog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hubLog.js","sourceRoot":"","sources":["../src/hubLog.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"hubLog.js","sourceRoot":"","sources":["../src/hubLog.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;AAK7C,sFAAsF;AACtF,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,MAAM,CAAC,IAAY,EAAE,QAAgB,EAAE,QAAiB;IACtE,IAAI,CAAC;QACH,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,QAAQ;YAAE,OAAO;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,aAAa;IACvB,CAAC;IACD,MAAM,IAAI,GAAG,GAAG,IAAI,OAAO,CAAC;IAC5B,IAAI,CAAC;QACH,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC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TyqHzXkmkUmJRqzsYtgtKcz0C0cjFOt6uNdhwIDAQAB",
|
|
4
4
|
"name": "mcp-teams bridge",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.70",
|
|
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.70",
|
|
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": {
|