@composer-app/mcp 0.0.3 → 0.0.4-beta.0
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/dist/{chunk-GPFWLOYB.js → chunk-WZIAULKX.js} +17 -3
- package/dist/cli.js +1 -1
- package/dist/mcp.js +1 -1
- package/package.json +1 -1
|
@@ -4533,11 +4533,25 @@ function resolveServerAnchor(doc, spec) {
|
|
|
4533
4533
|
};
|
|
4534
4534
|
}
|
|
4535
4535
|
|
|
4536
|
+
// src/version.ts
|
|
4537
|
+
import { readFileSync } from "fs";
|
|
4538
|
+
var pkg = JSON.parse(
|
|
4539
|
+
readFileSync(new URL("../package.json", import.meta.url), "utf8")
|
|
4540
|
+
);
|
|
4541
|
+
var COMPOSER_MCP_VERSION = pkg.version;
|
|
4542
|
+
|
|
4536
4543
|
// src/roomState.ts
|
|
4537
4544
|
var HAD_UPGRADE_403 = /* @__PURE__ */ Symbol("composer.upgrade403");
|
|
4538
4545
|
var TerminalDetectingWS = class extends WebSocket {
|
|
4539
|
-
constructor(
|
|
4540
|
-
|
|
4546
|
+
constructor(address, protocols, options) {
|
|
4547
|
+
const existingHeaders = options?.headers ?? {};
|
|
4548
|
+
super(address, protocols, {
|
|
4549
|
+
...options,
|
|
4550
|
+
headers: {
|
|
4551
|
+
...existingHeaders,
|
|
4552
|
+
"X-Composer-Client": COMPOSER_MCP_VERSION
|
|
4553
|
+
}
|
|
4554
|
+
});
|
|
4541
4555
|
this.on("unexpected-response", (_req, res) => {
|
|
4542
4556
|
if (res.statusCode === 403) {
|
|
4543
4557
|
this[HAD_UPGRADE_403] = true;
|
|
@@ -6595,7 +6609,7 @@ async function dispatchTool(name, args, signal) {
|
|
|
6595
6609
|
}
|
|
6596
6610
|
function buildServer() {
|
|
6597
6611
|
const server = new Server(
|
|
6598
|
-
{ name: "composer-mcp", version:
|
|
6612
|
+
{ name: "composer-mcp", version: COMPOSER_MCP_VERSION },
|
|
6599
6613
|
{ capabilities: { tools: {} } }
|
|
6600
6614
|
);
|
|
6601
6615
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
package/dist/cli.js
CHANGED
package/dist/mcp.js
CHANGED