@xcanwin/manyoyo 5.10.6 → 5.11.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/README.md CHANGED
@@ -61,7 +61,7 @@ AI Agent CLI 往往需要:
61
61
  ```bash
62
62
  npm install -g @xcanwin/manyoyo
63
63
  podman pull ubuntu:24.04 # 仅 Podman 需要
64
- manyoyo build --iv 1.9.0-common
64
+ manyoyo build --iv 1.9.1-common
65
65
  manyoyo init all
66
66
  manyoyo run -r claude
67
67
  manyoyo serve 127.0.0.1:3000 -U admin -P 123456 # Web UI 模式
@@ -148,13 +148,13 @@ manyoyo config command
148
148
 
149
149
  ```bash
150
150
  # common 版本
151
- manyoyo build --iv 1.9.0-common
151
+ manyoyo build --iv 1.9.1-common
152
152
 
153
153
  # full 版本
154
- manyoyo build --iv 1.9.0-full
154
+ manyoyo build --iv 1.9.1-full
155
155
 
156
156
  # 仅更新已有镜像内 Agent CLI 到 latest,不重建 Dockerfile
157
- manyoyo build --iv 1.9.0-full --update-agents --yes
157
+ manyoyo build --iv 1.9.1-full --update-agents --yes
158
158
 
159
159
  # 自定义工具集
160
160
  manyoyo build --iba TOOL=go,codex,java,gemini
package/bin/manyoyo.js CHANGED
@@ -713,6 +713,32 @@ function showImagePullHint(err) {
713
713
  console.log(`${YELLOW} 你可以: (1) 更新 ~/.manyoyo/manyoyo.json 的 imageVersion。 (2) 或先执行 ${MANYOYO_NAME} build --iv <x.y.z-后缀> 构建镜像。${NC}`);
714
714
  }
715
715
 
716
+ function getCommandFailureText(err) {
717
+ const stderr = err && err.stderr ? err.stderr.toString() : '';
718
+ const stdout = err && err.stdout ? err.stdout.toString() : '';
719
+ const message = err && err.message ? err.message : '';
720
+ return `${message}\n${stderr}\n${stdout}`;
721
+ }
722
+
723
+ function getContainerRuntimeUnavailableHint(command, err) {
724
+ const text = getCommandFailureText(err);
725
+ if (/Cannot connect to Podman|unable to connect to Podman socket|podman machine start|podman system connection/i.test(text)) {
726
+ return [
727
+ '',
728
+ `提示: 当前 ${command} 命令正在连接 Podman machine,但连接不可用。`,
729
+ '请先在宿主机执行: podman machine start'
730
+ ].join('\n');
731
+ }
732
+ if (/Cannot connect to the Docker daemon|docker daemon is not running|Is the docker daemon running/i.test(text)) {
733
+ return [
734
+ '',
735
+ `提示: 当前 ${command} 命令无法连接容器运行时。`,
736
+ '请先启动 Docker Desktop / Docker daemon,或确认 Podman machine 已启动。'
737
+ ].join('\n');
738
+ }
739
+ return '';
740
+ }
741
+
716
742
  function runCmd(cmd, args, options = {}) {
717
743
  const result = spawnSync(cmd, args, { encoding: 'utf-8', ...options });
718
744
  if (result.error) {
@@ -732,7 +758,15 @@ function runCmd(cmd, args, options = {}) {
732
758
  }
733
759
 
734
760
  function dockerExecArgs(args, options = {}) {
735
- return runCmd(DOCKER_CMD, args, options);
761
+ try {
762
+ return runCmd(DOCKER_CMD, args, options);
763
+ } catch (e) {
764
+ const hint = getContainerRuntimeUnavailableHint(DOCKER_CMD, e);
765
+ if (hint && e && e.message && !e.message.includes(hint)) {
766
+ e.message = `${e.message}${hint}`;
767
+ }
768
+ throw e;
769
+ }
736
770
  }
737
771
 
738
772
  function containerExists(name) {
@@ -115,7 +115,7 @@ function prepareNodeBuildCache(ctx, cache, archNode) {
115
115
  throw new Error('Node.js download failed');
116
116
  }
117
117
 
118
- function prepareJdtlsBuildCache(ctx, cache, imageTool) {
118
+ function prepareJdtlsBuildCache(ctx, cache, imageTool, arch) {
119
119
  const { RED, GREEN, YELLOW, NC } = ctx.colors;
120
120
  if (!(imageTool === 'full' || imageTool.includes('java'))) return;
121
121
 
@@ -135,7 +135,8 @@ function prepareJdtlsBuildCache(ctx, cache, imageTool) {
135
135
 
136
136
  try {
137
137
  ensureDirectoryIfMissing(tmpDir);
138
- ctx.runCmd('curl', ['-fsSL', 'https://mirrors.tencent.com/alpine/latest-stable/community/x86_64/jdtls-1.53.0-r0.apk', '-o', apkPath], { stdio: 'inherit' });
138
+ const alpineArch = arch === 'arm64' ? 'aarch64' : 'x86_64';
139
+ ctx.runCmd('curl', ['-fsSL', `https://mirrors.tencent.com/alpine/latest-stable/community/${alpineArch}/jdtls-1.58.0-r0.apk`, '-o', apkPath], { stdio: 'inherit' });
139
140
  ctx.runCmd('tar', ['-xzf', apkPath, '-C', tmpDir], { stdio: 'inherit' });
140
141
  ctx.runCmd('tar', ['-czf', jdtlsPath, '-C', path.join(tmpDir, 'usr', 'share', 'jdtls'), '.'], { stdio: 'inherit' });
141
142
  touchBuildCache(cache, jdtlsKey);
@@ -238,7 +239,7 @@ function createBuildCacheArtifacts(ctx, cache, imageTool, archInfo) {
238
239
  },
239
240
  {
240
241
  name: 'jdtls',
241
- prepare: () => prepareJdtlsBuildCache(ctx, cache, imageTool)
242
+ prepare: () => prepareJdtlsBuildCache(ctx, cache, imageTool, archInfo.arch)
242
243
  },
243
244
  {
244
245
  name: 'gopls',
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "5.10.6",
4
- "imageVersion": "1.9.0-common",
5
- "playwrightCliVersion": "0.1.1",
3
+ "version": "5.11.3",
4
+ "imageVersion": "1.9.1-common",
5
+ "playwrightCliVersion": "0.1.14",
6
6
  "description": "AI Agent CLI Security Sandbox for Docker and Podman",
7
7
  "keywords": [
8
8
  "manyoyo",
@@ -57,14 +57,14 @@
57
57
  "manyoyo.example.json"
58
58
  ],
59
59
  "dependencies": {
60
- "@playwright/mcp": "0.0.68",
60
+ "@playwright/mcp": "0.0.76",
61
61
  "@xterm/addon-fit": "^0.11.0",
62
62
  "@xterm/xterm": "^6.0.0",
63
- "commander": "^14.0.3",
63
+ "commander": "^15.0.0",
64
64
  "json5": "^2.2.3",
65
- "marked": "^17.0.5",
66
- "playwright": "1.58.2",
67
- "ws": "^8.20.0"
65
+ "marked": "^18.0.5",
66
+ "playwright": "1.61.0",
67
+ "ws": "^8.21.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@codemirror/commands": "^6.10.3",
@@ -76,20 +76,20 @@
76
76
  "@codemirror/lang-python": "^6.2.1",
77
77
  "@codemirror/lang-yaml": "^6.1.3",
78
78
  "@codemirror/language": "^6.12.3",
79
- "@codemirror/search": "^6.6.0",
79
+ "@codemirror/search": "^6.7.1",
80
80
  "@codemirror/state": "^6.6.0",
81
- "@codemirror/view": "^6.41.0",
81
+ "@codemirror/view": "^6.43.1",
82
82
  "codemirror": "^6.0.2",
83
- "jest": "^30.3.0",
83
+ "jest": "^30.4.2",
84
84
  "vitepress": "^1.6.4"
85
85
  },
86
86
  "overrides": {
87
87
  "esbuild": "^0.25.12",
88
88
  "glob": "^13.0.6",
89
- "minimatch": "^10.2.2",
90
- "postcss": "^8.5.10",
89
+ "minimatch": "^10.2.5",
90
+ "postcss": "^8.5.15",
91
91
  "test-exclude": "^8.0.0",
92
- "vite": "^6.4.2"
92
+ "vite": "^6.4.3"
93
93
  },
94
94
  "jest": {
95
95
  "testMatch": [