@brightbeamai/chap-coordinator-mcp 0.3.2 → 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/dist/cli.js
CHANGED
|
@@ -925,12 +925,15 @@ var META_SERVER_INFO = "io.modelcontextprotocol/serverInfo";
|
|
|
925
925
|
var LIST_TTL_MS = 36e5;
|
|
926
926
|
var ServerDiscoverRequestSchema = z.object({
|
|
927
927
|
method: z.literal("server/discover"),
|
|
928
|
-
|
|
928
|
+
// `.passthrough()` keeps unknown keys under zod 3 and zod 4 alike, and the
|
|
929
|
+
// package accepts both majors. The zod 4 name for the same thing does not
|
|
930
|
+
// exist in zod 3, where it stopped the package at import.
|
|
931
|
+
params: z.optional(z.object({ _meta: z.optional(z.record(z.string(), z.unknown())) }).passthrough())
|
|
929
932
|
});
|
|
930
933
|
function makeChapMcpServer(coord, options = {}) {
|
|
931
934
|
const serverInfo = {
|
|
932
935
|
name: options.name ?? "chap",
|
|
933
|
-
version: options.version ?? "0.3.
|
|
936
|
+
version: options.version ?? "0.3.4"
|
|
934
937
|
};
|
|
935
938
|
const server = new Server(
|
|
936
939
|
serverInfo,
|
|
@@ -994,7 +997,25 @@ function makeChapMcpServer(coord, options = {}) {
|
|
|
994
997
|
content: [{ type: "text", text: `Unknown CHAP tool: ${toolName}` }]
|
|
995
998
|
});
|
|
996
999
|
}
|
|
997
|
-
|
|
1000
|
+
if (!filter(toolName)) {
|
|
1001
|
+
return terminal({
|
|
1002
|
+
isError: true,
|
|
1003
|
+
content: [{ type: "text", text: `CHAP tool not offered by this server: ${toolName}` }]
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
const args = { ...coerceToolArgs(toolName, rawArgs) };
|
|
1007
|
+
if (options.participant !== void 0) {
|
|
1008
|
+
if (args.from !== void 0 && args.from !== options.participant) {
|
|
1009
|
+
return terminal({
|
|
1010
|
+
isError: true,
|
|
1011
|
+
content: [{
|
|
1012
|
+
type: "text",
|
|
1013
|
+
text: `This server acts as ${options.participant}; a call cannot name another from (${JSON.stringify(args.from)}).`
|
|
1014
|
+
}]
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
args.from = options.participant;
|
|
1018
|
+
}
|
|
998
1019
|
const envelope = {
|
|
999
1020
|
jsonrpc: "2.0",
|
|
1000
1021
|
id: nextId(),
|
|
@@ -1035,7 +1056,7 @@ function makeChapMcpServer(coord, options = {}) {
|
|
|
1035
1056
|
}
|
|
1036
1057
|
|
|
1037
1058
|
// src/cli.ts
|
|
1038
|
-
var VERSION = "0.3.
|
|
1059
|
+
var VERSION = "0.3.4";
|
|
1039
1060
|
var DEFAULT_PROFILES = [
|
|
1040
1061
|
"core/1.0",
|
|
1041
1062
|
"review/1.0",
|