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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentworkshop-prod",
3
- "version": "0.7.58",
3
+ "version": "0.7.59",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
@@ -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
@@ -12,7 +12,7 @@
12
12
  app:
13
13
  name: AgentWorkShop
14
14
  title: AgentWorkShop
15
- version: 0.7.58
15
+ version: 0.7.59
16
16
  description: 基于 Nuxt 4 的配置驱动运行范式
17
17
 
18
18
  # 运行模式(dev/prod 实际由启动命令决定,此处仅作运行时展示)
@@ -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
- const isMain = process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href
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,6 +1,6 @@
1
1
  {
2
2
  "name": "agentworkshop",
3
- "version": "0.7.58",
3
+ "version": "0.7.59",
4
4
  "type": "module",
5
5
  "description": "AgentWorkShop 软件开发系统 - 基于 Nuxt 4 的配置驱动运行范式",
6
6
  "license": "Apache-2.0",
@@ -1 +0,0 @@
1
- {"id":"082ac92a-d8d0-4e78-8d5a-b4a610080231","timestamp":1791807018658,"prerendered":[]}