Renombrar paquete a @nucleoriofrio/webmcp y fix crash de stdin

- Renombrar de @jason.today/webmcp a @nucleoriofrio/webmcp en package.json, config.js, websocket-server.js, build/index.js y README
- Fix crash de stdin cuando no hay TTY: agregar check process.stdin.isTTY y try/catch en setRawMode
- Bump version a 0.2.0
This commit is contained in:
2026-02-12 23:54:07 -06:00
parent 511dba09c5
commit 78e1e72b89
5 changed files with 29 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
# WebMCP - Fork Nucleo Rio Frio # WebMCP - Fork Nucleo Rio Frio
> **IMPORTANTE: Este es un fork modificado de [@jason.today/webmcp](https://github.com/jasonjmcghee/webmcp) v0.1.13.** > **IMPORTANTE: Este es un fork modificado de [@jason.today/webmcp](https://github.com/jasonjmcghee/webmcp) v0.1.13, renombrado a `@nucleoriofrio/webmcp`.**
> La documentación original, diagramas de arquitectura y explicaciones detalladas del protocolo se encuentran en el repositorio upstream. > La documentación original, diagramas de arquitectura y explicaciones detalladas del protocolo se encuentran en el repositorio upstream.
> Las APIs base deberían ser idénticas — si encontrás discrepancias entre este fork y la documentación original, reportalo porque se supone que deben ser compatibles salvo por los parches descritos abajo. > Las APIs base deberían ser idénticas — si encontrás discrepancias entre este fork y la documentación original, reportalo porque se supone que deben ser compatibles salvo por los parches descritos abajo.
@@ -59,7 +59,7 @@ npm install git+https://gitea.nucleoriofrio.com/nucleo000/webmcp.git
### En tu HTML ### En tu HTML
```html ```html
<script src="node_modules/@jason.today/webmcp/src/webmcp.js"></script> <script src="node_modules/@nucleoriofrio/webmcp/src/webmcp.js"></script>
<script> <script>
const webmcp = new WebMCP({ const webmcp = new WebMCP({
color: '#00d4ff', color: '#00d4ff',
@@ -88,7 +88,7 @@ En `.claude/settings.json` o settings del proyecto:
"mcpServers": { "mcpServers": {
"webmcp": { "webmcp": {
"command": "node", "command": "node",
"args": ["node_modules/@jason.today/webmcp/src/websocket-server.js", "--mcp"] "args": ["node_modules/@nucleoriofrio/webmcp/src/websocket-server.js", "--mcp"]
} }
} }
} }
@@ -118,6 +118,6 @@ El código JavaScript recibe `args` como parámetro y debe retornar un string. S
## Referencia upstream ## Referencia upstream
- **Repositorio original:** https://github.com/jasonjmcghee/webmcp - **Repositorio original:** https://github.com/jasonjmcghee/webmcp
- **npm:** https://www.npmjs.com/package/@jason.today/webmcp - **npm (original):** https://www.npmjs.com/package/@jason.today/webmcp
- **Versión base:** 0.1.13 - **Versión base:** 0.1.13
- **Licencia:** MIT (sin cambios) - **Licencia:** MIT (sin cambios)

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +1,16 @@
{ {
"name": "@jason.today/webmcp", "name": "@nucleoriofrio/webmcp",
"version": "0.1.13", "version": "0.2.0",
"description": "WebSocket-based Model Context Protocol implementation", "description": "Fork de WebMCP con registro dinamico de herramientas - Nucleo Rio Frio",
"main": "src/websocket-server.js", "main": "src/websocket-server.js",
"bin": { "bin": {
"@jason.today/webmcp": "./build/index.js" "@nucleoriofrio/webmcp": "./build/index.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/jasonjmcghee/webmcp.git" "url": "git+https://gitea.nucleoriofrio.com/nucleo000/webmcp.git"
}, },
"author": "Jason McGhee", "author": "Nucleo Rio Frio (fork de Jason McGhee)",
"scripts": { "scripts": {
"start-daemon": "node src/websocket-server.js", "start-daemon": "node src/websocket-server.js",
"stop-daemon": "node src/websocket-server.js --quit", "stop-daemon": "node src/websocket-server.js --quit",

View File

@@ -64,7 +64,7 @@ async function configureMcpClientWithPath(clientConfigPath) {
"command": "npx", "command": "npx",
"args": [ "args": [
"-y", "-y",
"@jason.today/webmcp@latest", "@nucleoriofrio/webmcp@latest",
"--mcp" "--mcp"
] ]
} }

View File

@@ -1569,7 +1569,7 @@ async function daemonize() {
console.error(`Server started as daemon with PID: ${child.pid}`); console.error(`Server started as daemon with PID: ${child.pid}`);
console.error(`Use 'node websocket-server.js --quit' to stop the server`); console.error(`Use 'node websocket-server.js --quit' to stop the server`);
console.error(`Use 'node websocket-server.js --new <encoded-pair>' to authorize a channel-token pair`); console.error(`Use 'node websocket-server.js --new <encoded-pair>' to authorize a channel-token pair`);
console.error(`Put 'npx @jason.today/webmcp --mcp' in your mcp client config`); console.error(`Put 'npx @nucleoriofrio/webmcp --mcp' in your mcp client config`);
if (!CONFIG.startMCP) { if (!CONFIG.startMCP) {
process.exit(0); process.exit(0);
} }
@@ -1730,7 +1730,7 @@ const main = async () => {
console.error(`Server is already running with PID: ${serverStatus.pid}`); console.error(`Server is already running with PID: ${serverStatus.pid}`);
console.error(`Use 'node websocket-server.js --quit' to stop the server`); console.error(`Use 'node websocket-server.js --quit' to stop the server`);
console.error(`Use 'node websocket-server.js --new <encoded-pair>' to authorize a channel-token pair`); console.error(`Use 'node websocket-server.js --new <encoded-pair>' to authorize a channel-token pair`);
console.error(`Put 'npx @jason.today/webmcp --mcp' in your mcp client config`); console.error(`Put 'npx @nucleoriofrio/webmcp --mcp' in your mcp client config`);
if (CONFIG.startMCP) { if (CONFIG.startMCP) {
return; return;
} else { } else {
@@ -1801,7 +1801,8 @@ const main = async () => {
process.on('SIGTERM', () => shutdownGracefully('SIGTERM')); process.on('SIGTERM', () => shutdownGracefully('SIGTERM'));
// Enable keyboard input handling for CTRL+C on Windows // Enable keyboard input handling for CTRL+C on Windows
if (process.platform === 'win32') { if (process.platform === 'win32' && process.stdin.isTTY) {
try {
process.stdin.setRawMode(true); process.stdin.setRawMode(true);
process.stdin.resume(); process.stdin.resume();
process.stdin.on('data', (data) => { process.stdin.on('data', (data) => {
@@ -1810,6 +1811,9 @@ const main = async () => {
shutdownGracefully('CTRL+C'); shutdownGracefully('CTRL+C');
} }
}); });
} catch (e) {
// stdin not available, ignore
}
} }
}; };