@hasna/todos 0.11.48 → 0.11.49
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/index.js +14 -10
- package/dist/mcp/index.js +14 -10
- package/dist/server/index.js +14 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -42663,17 +42663,17 @@ function buildServer() {
|
|
|
42663
42663
|
return server;
|
|
42664
42664
|
}
|
|
42665
42665
|
async function main() {
|
|
42666
|
-
const {
|
|
42667
|
-
if (
|
|
42668
|
-
const
|
|
42669
|
-
const
|
|
42670
|
-
await
|
|
42671
|
-
console.error(`todos MCP HTTP mounted at http://127.0.0.1:${port}/mcp`);
|
|
42666
|
+
const { isStdioMode, resolveHttpPort } = await Promise.resolve().then(() => (init_http(), exports_http));
|
|
42667
|
+
if (isStdioMode()) {
|
|
42668
|
+
const server = buildServer();
|
|
42669
|
+
const transport = new StdioServerTransport;
|
|
42670
|
+
await server.connect(transport);
|
|
42672
42671
|
return;
|
|
42673
42672
|
}
|
|
42674
|
-
const
|
|
42675
|
-
const
|
|
42676
|
-
await
|
|
42673
|
+
const { startServer } = await Promise.resolve().then(() => (init_serve(), exports_serve));
|
|
42674
|
+
const port = resolveHttpPort();
|
|
42675
|
+
await startServer(port, { open: false, host: "127.0.0.1" });
|
|
42676
|
+
console.error(`todos MCP HTTP mounted at http://127.0.0.1:${port}/mcp`);
|
|
42677
42677
|
}
|
|
42678
42678
|
var agentFocusMap, isDirectRun;
|
|
42679
42679
|
var init_mcp2 = __esm(() => {
|
|
@@ -42720,6 +42720,7 @@ var exports_http = {};
|
|
|
42720
42720
|
__export(exports_http, {
|
|
42721
42721
|
startHttpServer: () => startHttpServer,
|
|
42722
42722
|
resolveHttpPort: () => resolveHttpPort,
|
|
42723
|
+
isStdioMode: () => isStdioMode,
|
|
42723
42724
|
isHttpMode: () => isHttpMode,
|
|
42724
42725
|
healthResponse: () => healthResponse,
|
|
42725
42726
|
handleMcpHttpRequest: () => handleMcpHttpRequest,
|
|
@@ -42730,6 +42731,9 @@ import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/
|
|
|
42730
42731
|
function isHttpMode() {
|
|
42731
42732
|
return process.argv.includes("--http") || process.env["MCP_HTTP"] === "1";
|
|
42732
42733
|
}
|
|
42734
|
+
function isStdioMode() {
|
|
42735
|
+
return process.argv.includes("--stdio") || process.env["MCP_STDIO"] === "1";
|
|
42736
|
+
}
|
|
42733
42737
|
function resolveHttpPort(defaultPort = DEFAULT_MCP_HTTP_PORT) {
|
|
42734
42738
|
const portFlag = process.argv.find((arg) => arg === "--port" || arg.startsWith("--port="));
|
|
42735
42739
|
if (portFlag) {
|
|
@@ -42781,7 +42785,7 @@ async function startHttpServer(port, options) {
|
|
|
42781
42785
|
console.error(`todos-mcp HTTP listening on http://127.0.0.1:${port}/mcp`);
|
|
42782
42786
|
return server;
|
|
42783
42787
|
}
|
|
42784
|
-
var DEFAULT_MCP_HTTP_PORT =
|
|
42788
|
+
var DEFAULT_MCP_HTTP_PORT = 8881, MCP_HTTP_NAME = "todos";
|
|
42785
42789
|
var init_http = __esm(() => {
|
|
42786
42790
|
init_mcp2();
|
|
42787
42791
|
});
|
package/dist/mcp/index.js
CHANGED
|
@@ -35683,6 +35683,7 @@ var exports_http = {};
|
|
|
35683
35683
|
__export(exports_http, {
|
|
35684
35684
|
startHttpServer: () => startHttpServer,
|
|
35685
35685
|
resolveHttpPort: () => resolveHttpPort,
|
|
35686
|
+
isStdioMode: () => isStdioMode,
|
|
35686
35687
|
isHttpMode: () => isHttpMode,
|
|
35687
35688
|
healthResponse: () => healthResponse,
|
|
35688
35689
|
handleMcpHttpRequest: () => handleMcpHttpRequest,
|
|
@@ -35693,6 +35694,9 @@ import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/
|
|
|
35693
35694
|
function isHttpMode() {
|
|
35694
35695
|
return process.argv.includes("--http") || process.env["MCP_HTTP"] === "1";
|
|
35695
35696
|
}
|
|
35697
|
+
function isStdioMode() {
|
|
35698
|
+
return process.argv.includes("--stdio") || process.env["MCP_STDIO"] === "1";
|
|
35699
|
+
}
|
|
35696
35700
|
function resolveHttpPort(defaultPort = DEFAULT_MCP_HTTP_PORT) {
|
|
35697
35701
|
const portFlag = process.argv.find((arg) => arg === "--port" || arg.startsWith("--port="));
|
|
35698
35702
|
if (portFlag) {
|
|
@@ -35744,7 +35748,7 @@ async function startHttpServer(port, options) {
|
|
|
35744
35748
|
console.error(`todos-mcp HTTP listening on http://127.0.0.1:${port}/mcp`);
|
|
35745
35749
|
return server;
|
|
35746
35750
|
}
|
|
35747
|
-
var DEFAULT_MCP_HTTP_PORT =
|
|
35751
|
+
var DEFAULT_MCP_HTTP_PORT = 8881, MCP_HTTP_NAME = "todos";
|
|
35748
35752
|
var init_http = __esm(() => {
|
|
35749
35753
|
init_mcp2();
|
|
35750
35754
|
});
|
|
@@ -37307,17 +37311,17 @@ function buildServer() {
|
|
|
37307
37311
|
return server;
|
|
37308
37312
|
}
|
|
37309
37313
|
async function main() {
|
|
37310
|
-
const {
|
|
37311
|
-
if (
|
|
37312
|
-
const
|
|
37313
|
-
const
|
|
37314
|
-
await
|
|
37315
|
-
console.error(`todos MCP HTTP mounted at http://127.0.0.1:${port}/mcp`);
|
|
37314
|
+
const { isStdioMode: isStdioMode2, resolveHttpPort: resolveHttpPort2 } = await Promise.resolve().then(() => (init_http(), exports_http));
|
|
37315
|
+
if (isStdioMode2()) {
|
|
37316
|
+
const server = buildServer();
|
|
37317
|
+
const transport = new StdioServerTransport;
|
|
37318
|
+
await server.connect(transport);
|
|
37316
37319
|
return;
|
|
37317
37320
|
}
|
|
37318
|
-
const
|
|
37319
|
-
const
|
|
37320
|
-
await
|
|
37321
|
+
const { startServer: startServer2 } = await Promise.resolve().then(() => (init_serve(), exports_serve));
|
|
37322
|
+
const port = resolveHttpPort2();
|
|
37323
|
+
await startServer2(port, { open: false, host: "127.0.0.1" });
|
|
37324
|
+
console.error(`todos MCP HTTP mounted at http://127.0.0.1:${port}/mcp`);
|
|
37321
37325
|
}
|
|
37322
37326
|
var agentFocusMap, isDirectRun;
|
|
37323
37327
|
var init_mcp2 = __esm(() => {
|
package/dist/server/index.js
CHANGED
|
@@ -76859,17 +76859,17 @@ function buildServer() {
|
|
|
76859
76859
|
return server;
|
|
76860
76860
|
}
|
|
76861
76861
|
async function main() {
|
|
76862
|
-
const {
|
|
76863
|
-
if (
|
|
76864
|
-
const
|
|
76865
|
-
const
|
|
76866
|
-
await
|
|
76867
|
-
console.error(`todos MCP HTTP mounted at http://127.0.0.1:${port}/mcp`);
|
|
76862
|
+
const { isStdioMode, resolveHttpPort } = await Promise.resolve().then(() => (init_http(), exports_http));
|
|
76863
|
+
if (isStdioMode()) {
|
|
76864
|
+
const server = buildServer();
|
|
76865
|
+
const transport = new StdioServerTransport;
|
|
76866
|
+
await server.connect(transport);
|
|
76868
76867
|
return;
|
|
76869
76868
|
}
|
|
76870
|
-
const
|
|
76871
|
-
const
|
|
76872
|
-
await
|
|
76869
|
+
const { startServer } = await Promise.resolve().then(() => (init_serve(), exports_serve));
|
|
76870
|
+
const port = resolveHttpPort();
|
|
76871
|
+
await startServer(port, { open: false, host: "127.0.0.1" });
|
|
76872
|
+
console.error(`todos MCP HTTP mounted at http://127.0.0.1:${port}/mcp`);
|
|
76873
76873
|
}
|
|
76874
76874
|
var agentFocusMap, isDirectRun;
|
|
76875
76875
|
var init_mcp3 = __esm(() => {
|
|
@@ -76918,6 +76918,7 @@ var exports_http = {};
|
|
|
76918
76918
|
__export(exports_http, {
|
|
76919
76919
|
startHttpServer: () => startHttpServer,
|
|
76920
76920
|
resolveHttpPort: () => resolveHttpPort,
|
|
76921
|
+
isStdioMode: () => isStdioMode,
|
|
76921
76922
|
isHttpMode: () => isHttpMode,
|
|
76922
76923
|
healthResponse: () => healthResponse,
|
|
76923
76924
|
handleMcpHttpRequest: () => handleMcpHttpRequest,
|
|
@@ -76927,6 +76928,9 @@ __export(exports_http, {
|
|
|
76927
76928
|
function isHttpMode() {
|
|
76928
76929
|
return process.argv.includes("--http") || process.env["MCP_HTTP"] === "1";
|
|
76929
76930
|
}
|
|
76931
|
+
function isStdioMode() {
|
|
76932
|
+
return process.argv.includes("--stdio") || process.env["MCP_STDIO"] === "1";
|
|
76933
|
+
}
|
|
76930
76934
|
function resolveHttpPort(defaultPort = DEFAULT_MCP_HTTP_PORT) {
|
|
76931
76935
|
const portFlag = process.argv.find((arg) => arg === "--port" || arg.startsWith("--port="));
|
|
76932
76936
|
if (portFlag) {
|
|
@@ -76978,7 +76982,7 @@ async function startHttpServer(port, options) {
|
|
|
76978
76982
|
console.error(`todos-mcp HTTP listening on http://127.0.0.1:${port}/mcp`);
|
|
76979
76983
|
return server;
|
|
76980
76984
|
}
|
|
76981
|
-
var DEFAULT_MCP_HTTP_PORT =
|
|
76985
|
+
var DEFAULT_MCP_HTTP_PORT = 8881, MCP_HTTP_NAME = "todos";
|
|
76982
76986
|
var init_http = __esm(() => {
|
|
76983
76987
|
init_webStandardStreamableHttp();
|
|
76984
76988
|
init_mcp3();
|