@justmpm/comunicate 0.1.1 → 0.1.3
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/bin-wrapper.d.ts +8 -0
- package/dist/bin-wrapper.d.ts.map +1 -0
- package/dist/bin-wrapper.js +24 -0
- package/dist/bin-wrapper.js.map +1 -0
- package/dist/comunicate/index.d.ts.map +1 -1
- package/dist/comunicate/index.js +7 -2
- package/dist/comunicate/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin-wrapper.d.ts","sourceRoot":"","sources":["../src/bin-wrapper.ts"],"names":[],"mappings":";AACA;;;;GAIG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper para o comando comunicate
|
|
4
|
+
* - Sem argumentos: inicia o servidor MCP
|
|
5
|
+
* - Com argumentos: executa CLI
|
|
6
|
+
*/
|
|
7
|
+
import { spawn } from 'child_process';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
import { resolve, dirname } from 'path';
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = dirname(__filename);
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
// Se não houver argumentos, inicia o servidor MCP
|
|
14
|
+
// Se houver argumentos, executa o CLI
|
|
15
|
+
const script = args.length === 0 ? 'mcp-server.js' : 'cli.js';
|
|
16
|
+
const scriptPath = resolve(__dirname, script);
|
|
17
|
+
const child = spawn('node', [scriptPath, ...args], {
|
|
18
|
+
stdio: 'inherit',
|
|
19
|
+
shell: true
|
|
20
|
+
});
|
|
21
|
+
child.on('exit', (code) => {
|
|
22
|
+
process.exit(code ?? 0);
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=bin-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin-wrapper.js","sourceRoot":"","sources":["../src/bin-wrapper.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAExC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,kDAAkD;AAClD,sCAAsC;AACtC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC9D,MAAM,UAAU,GAAG,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,EAAE;IACjD,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,IAAI;CACZ,CAAC,CAAC;AAEH,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;IACxB,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/comunicate/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/comunicate/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwBH;;GAEG;AACH,eAAO,MAAM,OAAO,QAAe,CAAC;AAEpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
package/dist/comunicate/index.js
CHANGED
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
* Arquitetura File-Based para Windows
|
|
4
4
|
*/
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
|
-
import { resolve } from 'path';
|
|
6
|
+
import { resolve, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
7
8
|
/**
|
|
8
9
|
* Lê a versão do package.json
|
|
9
10
|
*/
|
|
10
11
|
function getVersion() {
|
|
11
12
|
try {
|
|
12
|
-
|
|
13
|
+
// Usar import.meta.url para encontrar o package.json relativo ao arquivo atual
|
|
14
|
+
// Funciona tanto em desenvolvimento quanto quando instalado globalmente
|
|
15
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
+
const __dirname = dirname(__filename);
|
|
17
|
+
const packagePath = resolve(__dirname, '../../package.json');
|
|
13
18
|
const packageContent = readFileSync(packagePath, 'utf-8');
|
|
14
19
|
const packageJson = JSON.parse(packageContent);
|
|
15
20
|
return packageJson.version || '0.0.0';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/comunicate/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/comunicate/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC;;GAEG;AACH,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,+EAA+E;QAC/E,wEAAwE;QACxE,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;QAC7D,MAAM,cAAc,GAAG,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC1D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC/C,OAAO,WAAW,CAAC,OAAO,IAAI,OAAO,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAEpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justmpm/comunicate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Sistema de Comunicação Entre Agentes - @justmpm/comunicate File-Based para Windows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/mcp-server.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"comunicate": "dist/
|
|
8
|
+
"comunicate": "dist/bin-wrapper.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/",
|