@akshar5/cohall 0.12.5 → 0.12.7
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/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/bin/chunk-04a27ybz.js +460 -0
- package/bin/chunk-04a27ybz.js.map +10 -0
- package/bin/chunk-27xa296w.js +40 -0
- package/bin/chunk-27xa296w.js.map +9 -0
- package/bin/chunk-39by7csf.js +267 -0
- package/bin/chunk-39by7csf.js.map +11 -0
- package/bin/chunk-61m7z93m.js +256 -0
- package/bin/chunk-61m7z93m.js.map +10 -0
- package/bin/chunk-7dgeftrk.js +23 -0
- package/bin/chunk-7dgeftrk.js.map +10 -0
- package/bin/chunk-7ss2d5n4.js +50 -0
- package/bin/chunk-7ss2d5n4.js.map +10 -0
- package/bin/chunk-89ga9j8t.js +269 -0
- package/bin/chunk-89ga9j8t.js.map +10 -0
- package/bin/chunk-90k4bw6t.js +2801 -0
- package/bin/chunk-90k4bw6t.js.map +14 -0
- package/bin/chunk-akct7v1q.js +2160 -0
- package/bin/chunk-akct7v1q.js.map +15 -0
- package/bin/chunk-b3ba95j4.js +1867 -0
- package/bin/chunk-b3ba95j4.js.map +13 -0
- package/bin/chunk-d2sykjmx.js +665 -0
- package/bin/chunk-d2sykjmx.js.map +10 -0
- package/bin/chunk-g6b3zmtw.js +268 -0
- package/bin/chunk-g6b3zmtw.js.map +10 -0
- package/bin/chunk-p493vm5f.js +21 -0
- package/bin/chunk-p493vm5f.js.map +10 -0
- package/bin/chunk-zxrjgp9k.js +415 -0
- package/bin/chunk-zxrjgp9k.js.map +11 -0
- package/bin/cohall.js +18 -9103
- package/bin/cohall.js.map +5 -30
- package/deploy/windows/install-device.ps1 +2 -0
- package/docs/install.md +6 -2
- package/docs/integrations.md +6 -3
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __returnValue = (v) => v;
|
|
4
|
+
function __exportSetter(name, newValue) {
|
|
5
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
+
}
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
set: __exportSetter.bind(all, name)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
17
|
+
|
|
18
|
+
// packages/protocol/src/version.ts
|
|
19
|
+
var version = "0.12.7";
|
|
20
|
+
|
|
21
|
+
export { __export, __require, version };
|
|
22
|
+
|
|
23
|
+
//# debugId=0E7C11049ECE6BC564756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../packages/protocol/src/version.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"declare const __COHALL_VERSION__: string\nexport const version =\n typeof __COHALL_VERSION__ === \"undefined\" ? \"0.0.0-development\" : __COHALL_VERSION__\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AACO,IAAM,UACuD;",
|
|
8
|
+
"debugId": "0E7C11049ECE6BC564756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readMcpHostDiagnostics
|
|
3
|
+
} from "./chunk-89ga9j8t.js";
|
|
4
|
+
import"./chunk-p493vm5f.js";
|
|
5
|
+
import {
|
|
6
|
+
configurationPath
|
|
7
|
+
} from "./chunk-g6b3zmtw.js";
|
|
8
|
+
import"./chunk-04a27ybz.js";
|
|
9
|
+
import {
|
|
10
|
+
version
|
|
11
|
+
} from "./chunk-7dgeftrk.js";
|
|
12
|
+
|
|
13
|
+
// apps/device/src/mcp-diagnostics.ts
|
|
14
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
15
|
+
import {
|
|
16
|
+
getDefaultEnvironment,
|
|
17
|
+
StdioClientTransport
|
|
18
|
+
} from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
19
|
+
var checkMcp = async (entrypoint, relayUrl, token) => {
|
|
20
|
+
const client = new Client({ name: "cohall-doctor", version });
|
|
21
|
+
const transport = new StdioClientTransport({
|
|
22
|
+
command: process.execPath,
|
|
23
|
+
args: [entrypoint, "mcp"],
|
|
24
|
+
env: {
|
|
25
|
+
...getDefaultEnvironment(),
|
|
26
|
+
COHALL_CONFIG: configurationPath(),
|
|
27
|
+
COHALL_MCP_SELF_TEST: "1",
|
|
28
|
+
COHALL_RELAY_URL: relayUrl,
|
|
29
|
+
COHALL_CLIENT_TOKEN: token
|
|
30
|
+
},
|
|
31
|
+
stderr: "pipe"
|
|
32
|
+
});
|
|
33
|
+
try {
|
|
34
|
+
await client.connect(transport, { timeout: 5000 });
|
|
35
|
+
const { tools } = await client.listTools(undefined, { timeout: 5000 });
|
|
36
|
+
if (tools.length === 0)
|
|
37
|
+
return { status: "error", error: "MCP server exposed no tools" };
|
|
38
|
+
return { status: "ok", tool_count: tools.length };
|
|
39
|
+
} catch (cause) {
|
|
40
|
+
return { status: "error", error: cause instanceof Error ? cause.message : String(cause) };
|
|
41
|
+
} finally {
|
|
42
|
+
await client.close();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
readMcpHostDiagnostics,
|
|
47
|
+
checkMcp
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
//# debugId=9C41699A8196A8D364756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../apps/device/src/mcp-diagnostics.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { version } from \"@cohall/protocol\"\nimport { Client } from \"@modelcontextprotocol/sdk/client/index.js\"\nimport {\n getDefaultEnvironment,\n StdioClientTransport,\n} from \"@modelcontextprotocol/sdk/client/stdio.js\"\nimport { configurationPath } from \"./config.ts\"\n\nexport const checkMcp = async (\n entrypoint: string,\n relayUrl: string,\n token: string,\n): Promise<{ status: \"ok\"; tool_count: number } | { status: \"error\"; error: string }> => {\n const client = new Client({ name: \"cohall-doctor\", version })\n const transport = new StdioClientTransport({\n command: process.execPath,\n args: [entrypoint, \"mcp\"],\n env: {\n ...getDefaultEnvironment(),\n COHALL_CONFIG: configurationPath(),\n COHALL_MCP_SELF_TEST: \"1\",\n COHALL_RELAY_URL: relayUrl,\n COHALL_CLIENT_TOKEN: token,\n },\n stderr: \"pipe\",\n })\n\n try {\n await client.connect(transport, { timeout: 5_000 })\n const { tools } = await client.listTools(undefined, { timeout: 5_000 })\n if (tools.length === 0) return { status: \"error\", error: \"MCP server exposed no tools\" }\n return { status: \"ok\", tool_count: tools.length }\n } catch (cause) {\n return { status: \"error\", error: cause instanceof Error ? cause.message : String(cause) }\n } finally {\n await client.close()\n }\n}\n\nexport {\n readMcpHostDiagnostics,\n type McpHostDiagnostics,\n type McpHostSession,\n} from \"./mcp-host-diagnostics.ts\"\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;AACA;AACA;AAAA;AAAA;AAAA;AAMO,IAAM,WAAW,OACtB,YACA,UACA,UACuF;AAAA,EACvF,MAAM,SAAS,IAAI,OAAO,EAAE,MAAM,iBAAiB,QAAQ,CAAC;AAAA,EAC5D,MAAM,YAAY,IAAI,qBAAqB;AAAA,IACzC,SAAS,QAAQ;AAAA,IACjB,MAAM,CAAC,YAAY,KAAK;AAAA,IACxB,KAAK;AAAA,SACA,sBAAsB;AAAA,MACzB,eAAe,kBAAkB;AAAA,MACjC,sBAAsB;AAAA,MACtB,kBAAkB;AAAA,MAClB,qBAAqB;AAAA,IACvB;AAAA,IACA,QAAQ;AAAA,EACV,CAAC;AAAA,EAED,IAAI;AAAA,IACF,MAAM,OAAO,QAAQ,WAAW,EAAE,SAAS,KAAM,CAAC;AAAA,IAClD,QAAQ,UAAU,MAAM,OAAO,UAAU,WAAW,EAAE,SAAS,KAAM,CAAC;AAAA,IACtE,IAAI,MAAM,WAAW;AAAA,MAAG,OAAO,EAAE,QAAQ,SAAS,OAAO,8BAA8B;AAAA,IACvF,OAAO,EAAE,QAAQ,MAAM,YAAY,MAAM,OAAO;AAAA,IAChD,OAAO,OAAO;AAAA,IACd,OAAO,EAAE,QAAQ,SAAS,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE;AAAA,YACxF;AAAA,IACA,MAAM,OAAO,MAAM;AAAA;AAAA;",
|
|
8
|
+
"debugId": "9C41699A8196A8D364756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readBoundedFile
|
|
3
|
+
} from "./chunk-p493vm5f.js";
|
|
4
|
+
import {
|
|
5
|
+
configurationPath
|
|
6
|
+
} from "./chunk-g6b3zmtw.js";
|
|
7
|
+
import {
|
|
8
|
+
Timestamp,
|
|
9
|
+
now
|
|
10
|
+
} from "./chunk-04a27ybz.js";
|
|
11
|
+
import {
|
|
12
|
+
version
|
|
13
|
+
} from "./chunk-7dgeftrk.js";
|
|
14
|
+
|
|
15
|
+
// apps/device/src/mcp-host-diagnostics.ts
|
|
16
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
17
|
+
import { Schema } from "effect";
|
|
18
|
+
import { randomUUID } from "node:crypto";
|
|
19
|
+
import { constants } from "node:fs";
|
|
20
|
+
import { lstat, mkdir, open, opendir, rename, rm, writeFile } from "node:fs/promises";
|
|
21
|
+
import { join } from "node:path";
|
|
22
|
+
var maxRecords = 8;
|
|
23
|
+
var maxRecordBytes = 4096;
|
|
24
|
+
var retentionMs = 7 * 24 * 60 * 60 * 1000;
|
|
25
|
+
var recordName = /^[\da-f]{8}-[\da-f]{4}-4[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}\.json$/;
|
|
26
|
+
var text = Schema.String.check(Schema.isMaxLength(128));
|
|
27
|
+
var count = Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }));
|
|
28
|
+
var McpHostSession = Schema.Struct({
|
|
29
|
+
schema_version: Schema.Literal(1),
|
|
30
|
+
launch_id: Schema.String.check(Schema.isUUID(4)),
|
|
31
|
+
launched_at: Timestamp,
|
|
32
|
+
server_version: text,
|
|
33
|
+
initialized_at: Schema.optionalKey(Timestamp),
|
|
34
|
+
client: Schema.optionalKey(Schema.Struct({ name: text, version: text })),
|
|
35
|
+
tools_list: Schema.optionalKey(Schema.Struct({ at: Timestamp, tool_count: count })),
|
|
36
|
+
tools_call_count: count,
|
|
37
|
+
last_tool_call_at: Schema.optionalKey(Timestamp),
|
|
38
|
+
closed_at: Schema.optionalKey(Timestamp)
|
|
39
|
+
});
|
|
40
|
+
var storagePath = (configPath) => `${configPath}.mcp-hosts`;
|
|
41
|
+
var replaceRecord = async (source, target) => {
|
|
42
|
+
for (let attempt = 0;; attempt += 1) {
|
|
43
|
+
try {
|
|
44
|
+
await rename(source, target);
|
|
45
|
+
return;
|
|
46
|
+
} catch (cause) {
|
|
47
|
+
if (attempt === 5 || !(cause instanceof Error && ("code" in cause) && (cause.code === "EPERM" || cause.code === "EACCES" || cause.code === "EBUSY"))) {
|
|
48
|
+
throw cause;
|
|
49
|
+
}
|
|
50
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
var recordsIn = async (directory) => {
|
|
55
|
+
const records = [];
|
|
56
|
+
let entries = 0;
|
|
57
|
+
for await (const entry of await opendir(directory)) {
|
|
58
|
+
if (++entries > 64)
|
|
59
|
+
throw new Error("MCP host diagnostics directory exceeded its entry limit");
|
|
60
|
+
if (!recordName.test(entry.name))
|
|
61
|
+
continue;
|
|
62
|
+
const path = join(directory, entry.name);
|
|
63
|
+
const metadata = await lstat(path).catch((cause) => {
|
|
64
|
+
if (cause instanceof Error && "code" in cause && cause.code === "ENOENT")
|
|
65
|
+
return;
|
|
66
|
+
throw cause;
|
|
67
|
+
});
|
|
68
|
+
if (metadata !== undefined)
|
|
69
|
+
records.push({ path, modified: metadata.mtimeMs });
|
|
70
|
+
}
|
|
71
|
+
return records.sort((left, right) => right.modified - left.modified || left.path.localeCompare(right.path));
|
|
72
|
+
};
|
|
73
|
+
var readMcpHostDiagnostics = async (configPath = configurationPath()) => {
|
|
74
|
+
const path = storagePath(configPath);
|
|
75
|
+
const warnings = [];
|
|
76
|
+
let records;
|
|
77
|
+
try {
|
|
78
|
+
records = await recordsIn(path);
|
|
79
|
+
} catch (cause) {
|
|
80
|
+
if (cause instanceof Error && "code" in cause && cause.code === "ENOENT") {
|
|
81
|
+
return { status: "not_observed", path, sessions: [], warnings };
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
status: "unavailable",
|
|
85
|
+
path,
|
|
86
|
+
sessions: [],
|
|
87
|
+
warnings,
|
|
88
|
+
error: `Cannot read MCP host diagnostics at ${path}. Restore access to this diagnostics directory, then restart the Cohall MCP connection in your host.`
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const sessions = [];
|
|
92
|
+
let invalid = 0;
|
|
93
|
+
for (const record of records.filter((record2) => record2.modified >= Date.now() - retentionMs).slice(0, maxRecords)) {
|
|
94
|
+
try {
|
|
95
|
+
const handle = await open(record.path, constants.O_RDONLY | (process.platform === "win32" ? 0 : constants.O_NOFOLLOW | constants.O_NONBLOCK));
|
|
96
|
+
try {
|
|
97
|
+
const metadata = await handle.stat();
|
|
98
|
+
if (!metadata.isFile() || metadata.size > maxRecordBytes)
|
|
99
|
+
throw new Error("Invalid record");
|
|
100
|
+
const data = await readBoundedFile(handle, maxRecordBytes);
|
|
101
|
+
if (data.length > maxRecordBytes)
|
|
102
|
+
throw new Error("Invalid record");
|
|
103
|
+
sessions.push(Schema.decodeUnknownSync(McpHostSession)(JSON.parse(data.toString("utf8"))));
|
|
104
|
+
} finally {
|
|
105
|
+
await handle.close();
|
|
106
|
+
}
|
|
107
|
+
} catch (cause) {
|
|
108
|
+
if (!(cause instanceof Error && ("code" in cause) && cause.code === "ENOENT"))
|
|
109
|
+
invalid += 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (invalid > 0) {
|
|
113
|
+
warnings.push(`${invalid} MCP host diagnostics record(s) could not be read. Reset the diagnostics directory ${path}, then restart the Cohall MCP connection in your host.`);
|
|
114
|
+
}
|
|
115
|
+
if (sessions.length === 0 && invalid > 0) {
|
|
116
|
+
return {
|
|
117
|
+
status: "unavailable",
|
|
118
|
+
path,
|
|
119
|
+
sessions,
|
|
120
|
+
warnings,
|
|
121
|
+
error: "No valid MCP host diagnostics records could be read"
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const latest = sessions[0];
|
|
125
|
+
if (latest !== undefined) {
|
|
126
|
+
if (latest.initialized_at === undefined) {
|
|
127
|
+
warnings.push(`${latest.closed_at === undefined ? "An MCP launch was recorded" : "A recorded MCP launch ended"} without client initialization. If your host still lacks Cohall tools, check its MCP command and selected config, then restart its Cohall connection.`);
|
|
128
|
+
} else if (latest.tools_list?.tool_count === 0) {
|
|
129
|
+
warnings.push("A recorded MCP launch returned an empty tools list. If Cohall tools are missing, check the host's Cohall MCP command and update or restart its connection.");
|
|
130
|
+
} else if (latest.tools_list === undefined && latest.tools_call_count === 0) {
|
|
131
|
+
warnings.push("An MCP host initialized Cohall but no tool discovery or calls were observed. If Cohall tools are missing, refresh or restart its MCP connection in that host.");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return {
|
|
135
|
+
status: sessions.some((session) => session.initialized_at !== undefined) ? "observed" : "not_observed",
|
|
136
|
+
path,
|
|
137
|
+
sessions,
|
|
138
|
+
warnings
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
var createMcpHostDiagnostics = (server) => {
|
|
142
|
+
const transport = new StdioServerTransport;
|
|
143
|
+
if (process.env.COHALL_MCP_SELF_TEST === "1")
|
|
144
|
+
return transport;
|
|
145
|
+
const directory = storagePath(configurationPath());
|
|
146
|
+
let session = McpHostSession.make({
|
|
147
|
+
schema_version: 1,
|
|
148
|
+
launch_id: randomUUID(),
|
|
149
|
+
launched_at: now(),
|
|
150
|
+
server_version: version,
|
|
151
|
+
tools_call_count: 0
|
|
152
|
+
});
|
|
153
|
+
const path = join(directory, `${session.launch_id}.json`);
|
|
154
|
+
let dirty = true;
|
|
155
|
+
let disabled = false;
|
|
156
|
+
let stopped = false;
|
|
157
|
+
let writing;
|
|
158
|
+
let timer;
|
|
159
|
+
const schedule = () => {
|
|
160
|
+
if (disabled || stopped || timer !== undefined)
|
|
161
|
+
return;
|
|
162
|
+
timer = setTimeout(() => {
|
|
163
|
+
timer = undefined;
|
|
164
|
+
flush();
|
|
165
|
+
}, 250);
|
|
166
|
+
timer.unref();
|
|
167
|
+
};
|
|
168
|
+
const flush = () => {
|
|
169
|
+
if (writing !== undefined)
|
|
170
|
+
return writing;
|
|
171
|
+
if (!dirty || disabled)
|
|
172
|
+
return Promise.resolve();
|
|
173
|
+
dirty = false;
|
|
174
|
+
const snapshot = session;
|
|
175
|
+
writing = (async () => {
|
|
176
|
+
await mkdir(directory, { recursive: true, mode: 448 });
|
|
177
|
+
await recordsIn(directory);
|
|
178
|
+
const temporary = `${path}.tmp`;
|
|
179
|
+
try {
|
|
180
|
+
const json = `${JSON.stringify(snapshot)}
|
|
181
|
+
`;
|
|
182
|
+
if (Buffer.byteLength(json) > maxRecordBytes)
|
|
183
|
+
throw new Error("Record exceeded its limit");
|
|
184
|
+
await writeFile(temporary, json, { flag: "wx", mode: 384 });
|
|
185
|
+
await replaceRecord(temporary, path);
|
|
186
|
+
} finally {
|
|
187
|
+
await rm(temporary, { force: true });
|
|
188
|
+
}
|
|
189
|
+
const records = await recordsIn(directory);
|
|
190
|
+
const expired = records.filter((record, index) => index >= maxRecords || record.modified < Date.now() - retentionMs);
|
|
191
|
+
await Promise.all(expired.map((record) => rm(record.path, { force: true })));
|
|
192
|
+
})().catch((cause) => {
|
|
193
|
+
disabled = true;
|
|
194
|
+
const reason = cause instanceof Error ? "code" in cause && typeof cause.code === "string" ? cause.code : cause.message : "Unknown filesystem error";
|
|
195
|
+
console.error(`Cohall MCP host diagnostics are unavailable (${reason.replace(/[\r\n]/g, " ").slice(0, 160)}). Check diagnostics storage access; MCP tools remain available.`);
|
|
196
|
+
}).finally(() => {
|
|
197
|
+
writing = undefined;
|
|
198
|
+
if (dirty)
|
|
199
|
+
schedule();
|
|
200
|
+
});
|
|
201
|
+
return writing;
|
|
202
|
+
};
|
|
203
|
+
const changed = () => {
|
|
204
|
+
dirty = true;
|
|
205
|
+
schedule();
|
|
206
|
+
};
|
|
207
|
+
const shutdown = async () => {
|
|
208
|
+
if (stopped)
|
|
209
|
+
return;
|
|
210
|
+
stopped = true;
|
|
211
|
+
clearTimeout(timer);
|
|
212
|
+
session = { ...session, closed_at: now() };
|
|
213
|
+
dirty = true;
|
|
214
|
+
await writing;
|
|
215
|
+
await flush();
|
|
216
|
+
};
|
|
217
|
+
flush();
|
|
218
|
+
process.once("beforeExit", () => void shutdown());
|
|
219
|
+
const initialized = server.oninitialized;
|
|
220
|
+
server.oninitialized = () => {
|
|
221
|
+
initialized?.();
|
|
222
|
+
const client = server.getClientVersion();
|
|
223
|
+
session = {
|
|
224
|
+
...session,
|
|
225
|
+
initialized_at: now(),
|
|
226
|
+
...client === undefined ? {} : { client: { name: client.name.slice(0, 128), version: client.version.slice(0, 128) } }
|
|
227
|
+
};
|
|
228
|
+
changed();
|
|
229
|
+
};
|
|
230
|
+
const closed = server.onclose;
|
|
231
|
+
server.onclose = () => {
|
|
232
|
+
closed?.();
|
|
233
|
+
shutdown();
|
|
234
|
+
};
|
|
235
|
+
const pendingLists = new Set;
|
|
236
|
+
const start = transport.start.bind(transport);
|
|
237
|
+
transport.start = async () => {
|
|
238
|
+
const receive = transport.onmessage;
|
|
239
|
+
transport.onmessage = (message) => {
|
|
240
|
+
if ("id" in message && message.id !== undefined && "method" in message) {
|
|
241
|
+
if (message.method === "tools/list" && pendingLists.size < 32)
|
|
242
|
+
pendingLists.add(message.id);
|
|
243
|
+
if (message.method === "tools/call") {
|
|
244
|
+
session = {
|
|
245
|
+
...session,
|
|
246
|
+
tools_call_count: Math.min(session.tools_call_count + 1, Number.MAX_SAFE_INTEGER),
|
|
247
|
+
last_tool_call_at: now()
|
|
248
|
+
};
|
|
249
|
+
changed();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
receive?.(message);
|
|
253
|
+
};
|
|
254
|
+
await start();
|
|
255
|
+
};
|
|
256
|
+
const send = transport.send.bind(transport);
|
|
257
|
+
transport.send = async (message) => {
|
|
258
|
+
await send(message);
|
|
259
|
+
if ("id" in message && message.id !== undefined && pendingLists.delete(message.id) && "result" in message && Array.isArray(message.result.tools)) {
|
|
260
|
+
session = { ...session, tools_list: { at: now(), tool_count: message.result.tools.length } };
|
|
261
|
+
changed();
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
return transport;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export { readMcpHostDiagnostics, createMcpHostDiagnostics };
|
|
268
|
+
|
|
269
|
+
//# debugId=5FF31F74D757DF0564756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../apps/device/src/mcp-host-diagnostics.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { now, Timestamp, version } from \"@cohall/protocol\"\nimport type { Server } from \"@modelcontextprotocol/sdk/server/index.js\"\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\"\nimport type { RequestId } from \"@modelcontextprotocol/sdk/types.js\"\nimport { Schema } from \"effect\"\nimport { randomUUID } from \"node:crypto\"\nimport { constants } from \"node:fs\"\nimport { lstat, mkdir, open, opendir, rename, rm, writeFile } from \"node:fs/promises\"\nimport { join } from \"node:path\"\nimport { readBoundedFile } from \"./bounded-file.ts\"\nimport { configurationPath } from \"./config.ts\"\n\nconst maxRecords = 8\nconst maxRecordBytes = 4_096\nconst retentionMs = 7 * 24 * 60 * 60 * 1_000\nconst recordName = /^[\\da-f]{8}-[\\da-f]{4}-4[\\da-f]{3}-[89ab][\\da-f]{3}-[\\da-f]{12}\\.json$/\nconst text = Schema.String.check(Schema.isMaxLength(128))\nconst count = Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: Number.MAX_SAFE_INTEGER }))\n\nexport const McpHostSession = Schema.Struct({\n schema_version: Schema.Literal(1),\n launch_id: Schema.String.check(Schema.isUUID(4)),\n launched_at: Timestamp,\n server_version: text,\n initialized_at: Schema.optionalKey(Timestamp),\n client: Schema.optionalKey(Schema.Struct({ name: text, version: text })),\n tools_list: Schema.optionalKey(Schema.Struct({ at: Timestamp, tool_count: count })),\n tools_call_count: count,\n last_tool_call_at: Schema.optionalKey(Timestamp),\n closed_at: Schema.optionalKey(Timestamp),\n})\nexport interface McpHostSession extends Schema.Schema.Type<typeof McpHostSession> {}\n\nexport type McpHostDiagnostics = {\n readonly path: string\n readonly sessions: ReadonlyArray<McpHostSession>\n readonly warnings: ReadonlyArray<string>\n} & (\n | { readonly status: \"observed\" | \"not_observed\" }\n | { readonly status: \"unavailable\"; readonly error: string }\n)\n\nconst storagePath = (configPath: string): string => `${configPath}.mcp-hosts`\n\nconst replaceRecord = async (source: string, target: string): Promise<void> => {\n // Windows can briefly block replacement while another program holds the file.\n for (let attempt = 0; ; attempt += 1) {\n try {\n await rename(source, target)\n return\n } catch (cause) {\n if (\n attempt === 5 ||\n !(\n cause instanceof Error &&\n \"code\" in cause &&\n (cause.code === \"EPERM\" || cause.code === \"EACCES\" || cause.code === \"EBUSY\")\n )\n ) {\n throw cause\n }\n await new Promise<void>((resolve) => setTimeout(resolve, 50))\n }\n }\n}\n\nconst recordsIn = async (directory: string) => {\n const records: Array<{ path: string; modified: number }> = []\n let entries = 0\n for await (const entry of await opendir(directory)) {\n if (++entries > 64) throw new Error(\"MCP host diagnostics directory exceeded its entry limit\")\n if (!recordName.test(entry.name)) continue\n const path = join(directory, entry.name)\n const metadata = await lstat(path).catch((cause: unknown) => {\n if (cause instanceof Error && \"code\" in cause && cause.code === \"ENOENT\") return undefined\n throw cause\n })\n if (metadata !== undefined) records.push({ path, modified: metadata.mtimeMs })\n }\n return records.sort(\n (left, right) => right.modified - left.modified || left.path.localeCompare(right.path),\n )\n}\n\nexport const readMcpHostDiagnostics = async (\n configPath = configurationPath(),\n): Promise<McpHostDiagnostics> => {\n const path = storagePath(configPath)\n const warnings: Array<string> = []\n let records: Awaited<ReturnType<typeof recordsIn>>\n try {\n records = await recordsIn(path)\n } catch (cause) {\n if (cause instanceof Error && \"code\" in cause && cause.code === \"ENOENT\") {\n return { status: \"not_observed\", path, sessions: [], warnings }\n }\n return {\n status: \"unavailable\",\n path,\n sessions: [],\n warnings,\n error: `Cannot read MCP host diagnostics at ${path}. Restore access to this diagnostics directory, then restart the Cohall MCP connection in your host.`,\n }\n }\n const sessions: Array<McpHostSession> = []\n let invalid = 0\n for (const record of records\n .filter((record) => record.modified >= Date.now() - retentionMs)\n .slice(0, maxRecords)) {\n try {\n const handle = await open(\n record.path,\n constants.O_RDONLY |\n (process.platform === \"win32\" ? 0 : constants.O_NOFOLLOW | constants.O_NONBLOCK),\n )\n try {\n const metadata = await handle.stat()\n if (!metadata.isFile() || metadata.size > maxRecordBytes) throw new Error(\"Invalid record\")\n const data = await readBoundedFile(handle, maxRecordBytes)\n if (data.length > maxRecordBytes) throw new Error(\"Invalid record\")\n sessions.push(Schema.decodeUnknownSync(McpHostSession)(JSON.parse(data.toString(\"utf8\"))))\n } finally {\n await handle.close()\n }\n } catch (cause) {\n if (!(cause instanceof Error && \"code\" in cause && cause.code === \"ENOENT\")) invalid += 1\n }\n }\n if (invalid > 0) {\n warnings.push(\n `${invalid} MCP host diagnostics record(s) could not be read. Reset the diagnostics directory ${path}, then restart the Cohall MCP connection in your host.`,\n )\n }\n if (sessions.length === 0 && invalid > 0) {\n return {\n status: \"unavailable\",\n path,\n sessions,\n warnings,\n error: \"No valid MCP host diagnostics records could be read\",\n }\n }\n const latest = sessions[0]\n if (latest !== undefined) {\n if (latest.initialized_at === undefined) {\n warnings.push(\n `${latest.closed_at === undefined ? \"An MCP launch was recorded\" : \"A recorded MCP launch ended\"} without client initialization. If your host still lacks Cohall tools, check its MCP command and selected config, then restart its Cohall connection.`,\n )\n } else if (latest.tools_list?.tool_count === 0) {\n warnings.push(\n \"A recorded MCP launch returned an empty tools list. If Cohall tools are missing, check the host's Cohall MCP command and update or restart its connection.\",\n )\n } else if (latest.tools_list === undefined && latest.tools_call_count === 0) {\n warnings.push(\n \"An MCP host initialized Cohall but no tool discovery or calls were observed. If Cohall tools are missing, refresh or restart its MCP connection in that host.\",\n )\n }\n }\n return {\n status: sessions.some((session) => session.initialized_at !== undefined)\n ? \"observed\"\n : \"not_observed\",\n path,\n sessions,\n warnings,\n }\n}\n\nexport const createMcpHostDiagnostics = (server: Server): StdioServerTransport => {\n const transport = new StdioServerTransport()\n if (process.env.COHALL_MCP_SELF_TEST === \"1\") return transport\n const directory = storagePath(configurationPath())\n let session = McpHostSession.make({\n schema_version: 1,\n launch_id: randomUUID(),\n launched_at: now(),\n server_version: version,\n tools_call_count: 0,\n })\n const path = join(directory, `${session.launch_id}.json`)\n let dirty = true\n let disabled = false\n let stopped = false\n let writing: Promise<void> | undefined\n let timer: ReturnType<typeof setTimeout> | undefined\n\n const schedule = () => {\n if (disabled || stopped || timer !== undefined) return\n timer = setTimeout(() => {\n timer = undefined\n void flush()\n }, 250)\n timer.unref()\n }\n const flush = (): Promise<void> => {\n if (writing !== undefined) return writing\n if (!dirty || disabled) return Promise.resolve()\n dirty = false\n const snapshot = session\n writing = (async () => {\n await mkdir(directory, { recursive: true, mode: 0o700 })\n await recordsIn(directory)\n const temporary = `${path}.tmp`\n try {\n const json = `${JSON.stringify(snapshot)}\\n`\n if (Buffer.byteLength(json) > maxRecordBytes) throw new Error(\"Record exceeded its limit\")\n await writeFile(temporary, json, { flag: \"wx\", mode: 0o600 })\n await replaceRecord(temporary, path)\n } finally {\n await rm(temporary, { force: true })\n }\n const records = await recordsIn(directory)\n const expired = records.filter(\n (record, index) => index >= maxRecords || record.modified < Date.now() - retentionMs,\n )\n await Promise.all(expired.map((record) => rm(record.path, { force: true })))\n })()\n .catch((cause: unknown) => {\n disabled = true\n const reason =\n cause instanceof Error\n ? \"code\" in cause && typeof cause.code === \"string\"\n ? cause.code\n : cause.message\n : \"Unknown filesystem error\"\n console.error(\n `Cohall MCP host diagnostics are unavailable (${reason.replace(/[\\r\\n]/g, \" \").slice(0, 160)}). Check diagnostics storage access; MCP tools remain available.`,\n )\n })\n .finally(() => {\n writing = undefined\n if (dirty) schedule()\n })\n return writing\n }\n const changed = () => {\n dirty = true\n schedule()\n }\n const shutdown = async () => {\n if (stopped) return\n stopped = true\n clearTimeout(timer)\n session = { ...session, closed_at: now() }\n dirty = true\n await writing\n await flush()\n }\n void flush()\n process.once(\"beforeExit\", () => void shutdown())\n const initialized = server.oninitialized\n server.oninitialized = () => {\n initialized?.()\n const client = server.getClientVersion()\n session = {\n ...session,\n initialized_at: now(),\n ...(client === undefined\n ? {}\n : { client: { name: client.name.slice(0, 128), version: client.version.slice(0, 128) } }),\n }\n changed()\n }\n const closed = server.onclose\n server.onclose = () => {\n closed?.()\n void shutdown()\n }\n const pendingLists = new Set<RequestId>()\n const start = transport.start.bind(transport)\n transport.start = async () => {\n const receive = transport.onmessage\n transport.onmessage = (message) => {\n if (\"id\" in message && message.id !== undefined && \"method\" in message) {\n if (message.method === \"tools/list\" && pendingLists.size < 32) pendingLists.add(message.id)\n if (message.method === \"tools/call\") {\n session = {\n ...session,\n tools_call_count: Math.min(session.tools_call_count + 1, Number.MAX_SAFE_INTEGER),\n last_tool_call_at: now(),\n }\n changed()\n }\n }\n receive?.(message)\n }\n await start()\n }\n const send = transport.send.bind(transport)\n transport.send = async (message) => {\n await send(message)\n if (\n \"id\" in message &&\n message.id !== undefined &&\n pendingLists.delete(message.id) &&\n \"result\" in message &&\n Array.isArray(message.result.tools)\n ) {\n session = { ...session, tools_list: { at: now(), tool_count: message.result.tools.length } }\n changed()\n }\n }\n return transport\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;AAEA;AAEA;AACA;AACA;AACA;AACA;AAIA,IAAM,aAAa;AACnB,IAAM,iBAAiB;AACvB,IAAM,cAAc,IAAI,KAAK,KAAK,KAAK;AACvC,IAAM,aAAa;AACnB,IAAM,OAAO,OAAO,OAAO,MAAM,OAAO,YAAY,GAAG,CAAC;AACxD,IAAM,QAAQ,OAAO,IAAI,MAAM,OAAO,UAAU,EAAE,SAAS,GAAG,SAAS,OAAO,iBAAiB,CAAC,CAAC;AAE1F,IAAM,iBAAiB,OAAO,OAAO;AAAA,EAC1C,gBAAgB,OAAO,QAAQ,CAAC;AAAA,EAChC,WAAW,OAAO,OAAO,MAAM,OAAO,OAAO,CAAC,CAAC;AAAA,EAC/C,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,gBAAgB,OAAO,YAAY,SAAS;AAAA,EAC5C,QAAQ,OAAO,YAAY,OAAO,OAAO,EAAE,MAAM,MAAM,SAAS,KAAK,CAAC,CAAC;AAAA,EACvE,YAAY,OAAO,YAAY,OAAO,OAAO,EAAE,IAAI,WAAW,YAAY,MAAM,CAAC,CAAC;AAAA,EAClF,kBAAkB;AAAA,EAClB,mBAAmB,OAAO,YAAY,SAAS;AAAA,EAC/C,WAAW,OAAO,YAAY,SAAS;AACzC,CAAC;AAYD,IAAM,cAAc,CAAC,eAA+B,GAAG;AAEvD,IAAM,gBAAgB,OAAO,QAAgB,WAAkC;AAAA,EAE7E,SAAS,UAAU,IA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