@brightbeamai/chap-coordinator-mcp 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/README.md +1 -1
- package/dist/cli.cjs +25 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +25 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +24 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ const coord = new Coordinator({
|
|
|
60
60
|
defaultProfiles: ["core/1.0", "review/1.0", "audit-scitt/1.0"],
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
const server = makeChapMcpServer(coord, { name: "chap", version: "0.3.
|
|
63
|
+
const server = makeChapMcpServer(coord, { name: "chap", version: "0.3.4" });
|
|
64
64
|
await server.connect(new StdioServerTransport());
|
|
65
65
|
```
|
|
66
66
|
|
package/dist/cli.cjs
CHANGED
|
@@ -944,12 +944,15 @@ var META_SERVER_INFO = "io.modelcontextprotocol/serverInfo";
|
|
|
944
944
|
var LIST_TTL_MS = 36e5;
|
|
945
945
|
var ServerDiscoverRequestSchema = import_zod.z.object({
|
|
946
946
|
method: import_zod.z.literal("server/discover"),
|
|
947
|
-
|
|
947
|
+
// `.passthrough()` keeps unknown keys under zod 3 and zod 4 alike, and the
|
|
948
|
+
// package accepts both majors. The zod 4 name for the same thing does not
|
|
949
|
+
// exist in zod 3, where it stopped the package at import.
|
|
950
|
+
params: import_zod.z.optional(import_zod.z.object({ _meta: import_zod.z.optional(import_zod.z.record(import_zod.z.string(), import_zod.z.unknown())) }).passthrough())
|
|
948
951
|
});
|
|
949
952
|
function makeChapMcpServer(coord, options = {}) {
|
|
950
953
|
const serverInfo = {
|
|
951
954
|
name: options.name ?? "chap",
|
|
952
|
-
version: options.version ?? "0.3.
|
|
955
|
+
version: options.version ?? "0.3.4"
|
|
953
956
|
};
|
|
954
957
|
const server = new import_server.Server(
|
|
955
958
|
serverInfo,
|
|
@@ -1013,7 +1016,25 @@ function makeChapMcpServer(coord, options = {}) {
|
|
|
1013
1016
|
content: [{ type: "text", text: `Unknown CHAP tool: ${toolName}` }]
|
|
1014
1017
|
});
|
|
1015
1018
|
}
|
|
1016
|
-
|
|
1019
|
+
if (!filter(toolName)) {
|
|
1020
|
+
return terminal({
|
|
1021
|
+
isError: true,
|
|
1022
|
+
content: [{ type: "text", text: `CHAP tool not offered by this server: ${toolName}` }]
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
const args = { ...coerceToolArgs(toolName, rawArgs) };
|
|
1026
|
+
if (options.participant !== void 0) {
|
|
1027
|
+
if (args.from !== void 0 && args.from !== options.participant) {
|
|
1028
|
+
return terminal({
|
|
1029
|
+
isError: true,
|
|
1030
|
+
content: [{
|
|
1031
|
+
type: "text",
|
|
1032
|
+
text: `This server acts as ${options.participant}; a call cannot name another from (${JSON.stringify(args.from)}).`
|
|
1033
|
+
}]
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
args.from = options.participant;
|
|
1037
|
+
}
|
|
1017
1038
|
const envelope = {
|
|
1018
1039
|
jsonrpc: "2.0",
|
|
1019
1040
|
id: nextId(),
|
|
@@ -1054,7 +1075,7 @@ function makeChapMcpServer(coord, options = {}) {
|
|
|
1054
1075
|
}
|
|
1055
1076
|
|
|
1056
1077
|
// src/cli.ts
|
|
1057
|
-
var VERSION = "0.3.
|
|
1078
|
+
var VERSION = "0.3.4";
|
|
1058
1079
|
var DEFAULT_PROFILES = [
|
|
1059
1080
|
"core/1.0",
|
|
1060
1081
|
"review/1.0",
|