@atlisp/agent 0.1.13 → 0.1.14
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/agent.js +2 -1
- package/mcp/stdio-client.js +3 -2
- package/package.json +1 -1
package/agent.js
CHANGED
|
@@ -19,7 +19,8 @@ export class Agent {
|
|
|
19
19
|
return new Promise((resolve, reject) => {
|
|
20
20
|
console.error('[Agent] 正在启动 npx @atlisp/mcp...');
|
|
21
21
|
|
|
22
|
-
const
|
|
22
|
+
const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
23
|
+
const mcpProc = spawn(`${npxCmd} -y @atlisp/mcp --http`, {
|
|
23
24
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
24
25
|
detached: true,
|
|
25
26
|
shell: true,
|
package/mcp/stdio-client.js
CHANGED
|
@@ -16,8 +16,9 @@ export class StdioMcpClient {
|
|
|
16
16
|
async connect() {
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
18
|
try {
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const npxCmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
|
|
20
|
+
const cmdStr = `${npxCmd} -y ${this.command} ${this.args.join(' ')}`;
|
|
21
|
+
this.proc = spawn(cmdStr, {
|
|
21
22
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
22
23
|
shell: true,
|
|
23
24
|
});
|