@akiojin/unity-mcp-server 2.43.0 → 2.43.1
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/package.json
CHANGED
|
@@ -11,10 +11,6 @@ function encodeContentLength(message) {
|
|
|
11
11
|
return header + json;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function encodeNdjson(message) {
|
|
15
|
-
return `${JSON.stringify(message)}\n`;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
14
|
function parseJson(text) {
|
|
19
15
|
return JSONRPCMessageSchema.parse(JSON.parse(text));
|
|
20
16
|
}
|
|
@@ -63,8 +59,9 @@ export class HybridStdioServerTransport {
|
|
|
63
59
|
|
|
64
60
|
send(message) {
|
|
65
61
|
return new Promise(resolve => {
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
// Always use Content-Length framing for output (MCP protocol standard)
|
|
63
|
+
// Input remains hybrid (Content-Length or NDJSON) for client compatibility
|
|
64
|
+
const payload = encodeContentLength(message);
|
|
68
65
|
if (this._stdout.write(payload)) {
|
|
69
66
|
resolve();
|
|
70
67
|
} else {
|