@hasna/coders 0.2.5 → 0.2.6
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/cli.mjs +7 -4
- package/dist/cli.mjs.map +3 -3
- package/dist/coders-mcp.mjs +12 -8
- package/dist/coders-mcp.mjs.map +3 -3
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -106868,6 +106868,10 @@ __export(http_exports, {
|
|
|
106868
106868
|
startMcpHttpServer: () => startMcpHttpServer
|
|
106869
106869
|
});
|
|
106870
106870
|
import { createServer } from "node:http";
|
|
106871
|
+
async function defaultBuildServer() {
|
|
106872
|
+
const { buildServer: buildServer2 } = await Promise.resolve().then(() => (init_server3(), server_exports));
|
|
106873
|
+
return buildServer2();
|
|
106874
|
+
}
|
|
106871
106875
|
function resolveMcpHttpPort(explicit) {
|
|
106872
106876
|
if (explicit != null && !Number.isNaN(explicit)) return explicit;
|
|
106873
106877
|
const env3 = process.env.MCP_HTTP_PORT;
|
|
@@ -106896,7 +106900,7 @@ async function readJsonBody(req) {
|
|
|
106896
106900
|
const text = Buffer.concat(chunks).toString("utf8");
|
|
106897
106901
|
return text ? JSON.parse(text) : void 0;
|
|
106898
106902
|
}
|
|
106899
|
-
async function handleStatelessMcpNode(req, res, getServer =
|
|
106903
|
+
async function handleStatelessMcpNode(req, res, getServer = defaultBuildServer) {
|
|
106900
106904
|
const server = await getServer();
|
|
106901
106905
|
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: void 0 });
|
|
106902
106906
|
await server.connect(transport);
|
|
@@ -106913,7 +106917,7 @@ function healthPayload(name = MCP_SERVICE_NAME) {
|
|
|
106913
106917
|
async function startMcpHttpServer(options2 = {}) {
|
|
106914
106918
|
const port = options2.port ?? resolveMcpHttpPort();
|
|
106915
106919
|
const host = "127.0.0.1";
|
|
106916
|
-
const getServer = options2.getServer ??
|
|
106920
|
+
const getServer = options2.getServer ?? defaultBuildServer;
|
|
106917
106921
|
const name = options2.name ?? MCP_SERVICE_NAME;
|
|
106918
106922
|
const httpServer = createServer(async (req, res) => {
|
|
106919
106923
|
const url2 = new URL(req.url ?? "/", `http://${host}:${port}`);
|
|
@@ -106953,7 +106957,6 @@ var init_http = __esm({
|
|
|
106953
106957
|
"src/mcp/http.ts"() {
|
|
106954
106958
|
"use strict";
|
|
106955
106959
|
init_streamableHttp();
|
|
106956
|
-
init_server3();
|
|
106957
106960
|
DEFAULT_MCP_HTTP_PORT = 8805;
|
|
106958
106961
|
MCP_SERVICE_NAME = "coders";
|
|
106959
106962
|
}
|
|
@@ -109032,7 +109035,7 @@ var VERSION, BUILD_TIME, PACKAGE_NAME, ISSUES_URL, startupTimestamps, originalCw
|
|
|
109032
109035
|
var init_index = __esm({
|
|
109033
109036
|
"src/cli/index.ts"() {
|
|
109034
109037
|
VERSION = "0.1.2";
|
|
109035
|
-
BUILD_TIME = "2026-05-28T10:
|
|
109038
|
+
BUILD_TIME = "2026-05-28T10:09:00.587Z";
|
|
109036
109039
|
PACKAGE_NAME = "@hasna/coders";
|
|
109037
109040
|
ISSUES_URL = "https://github.com/hasnaxyz/open-coders/issues";
|
|
109038
109041
|
startupTimestamps = {};
|