agentworkshop 0.7.58 → 0.7.59
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/92fd7e2e-18f2-45c3-8588-d93004dda6e3.json +1 -0
- package/.output/server/chunks/_/nitro.mjs +917 -917
- package/.output/server/package.json +1 -1
- package/cli/commands/mcp.mjs +6 -0
- package/config.yml +1 -1
- package/mcp/aw-mcp-server.mjs +4 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/builds/meta/082ac92a-d8d0-4e78-8d5a-b4a610080231.json +0 -1
package/cli/commands/mcp.mjs
CHANGED
|
@@ -150,5 +150,11 @@ export async function run(argv) {
|
|
|
150
150
|
if (flags.port) process.env.AW_PORT = String(flags.port)
|
|
151
151
|
const { runStdio } = await import('../../mcp/aw-mcp-server.mjs')
|
|
152
152
|
runStdio()
|
|
153
|
+
// runStdio 是事件驱动的:这里绝不能 return —— main() 返回会触发 bin 的 process.exit,
|
|
154
|
+
// stdio 服务刚启动就被自己杀掉(0.7.58 实测 `aw mcp` 秒退无输出)。挂起直至 stdin 关闭。
|
|
155
|
+
await new Promise((resolve) => {
|
|
156
|
+
if (process.stdin.readableEnded) resolve()
|
|
157
|
+
else process.stdin.on('end', resolve)
|
|
158
|
+
})
|
|
153
159
|
return 0
|
|
154
160
|
}
|
package/config.yml
CHANGED
package/mcp/aw-mcp-server.mjs
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
import { createInterface } from 'node:readline'
|
|
26
26
|
import { resolve } from 'node:path'
|
|
27
27
|
import { pathToFileURL } from 'node:url'
|
|
28
|
+
import { realpathSync } from 'node:fs'
|
|
28
29
|
import { discoverInstance, discoverWithReport, readMcpEnabled } from './discovery.mjs'
|
|
29
30
|
|
|
30
31
|
const DEFAULT_TIMEOUT_MS = Number(process.env.AW_MCP_TIMEOUT_MS ?? 30_000)
|
|
@@ -790,7 +791,9 @@ export function runStdio() {
|
|
|
790
791
|
process.stdout.on('error', () => process.exit(0))
|
|
791
792
|
}
|
|
792
793
|
|
|
793
|
-
|
|
794
|
+
// argv 路径必须先 realpath 再对比:nvm-windows 全局安装经目录 junction(C:\nvm4w\nodejs → 实际版本目录),
|
|
795
|
+
// import.meta.url 是 realpath 而 argv 不是 —— 直接字符串对比恒 false,全局用户的 MCP 直连会静默退出(0.7.58 实测)。
|
|
796
|
+
const isMain = process.argv[1] && import.meta.url === pathToFileURL(realpathSync(resolve(process.argv[1]))).href
|
|
794
797
|
if (isMain) {
|
|
795
798
|
runStdio()
|
|
796
799
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"082ac92a-d8d0-4e78-8d5a-b4a610080231","timestamp":1791807018658,"prerendered":[]}
|