@xcanwin/manyoyo 7.1.6 → 8.1.0

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/lib/worktrees.js CHANGED
@@ -17,6 +17,19 @@ function defaultRunGitCommand(targetPath, args) {
17
17
  return String(result.stdout || '').trim();
18
18
  }
19
19
 
20
+ // macOS 上未装 Xcode 命令行工具时,/usr/bin/git 是会弹安装框的占位命令,先检测而不是调用它
21
+ function assertGitUsable(deps = {}) {
22
+ const platform = deps.platform || process.platform;
23
+ if (platform !== 'darwin') {
24
+ return;
25
+ }
26
+ const runCommand = deps.runCommand || ((command, args) => spawnSync(command, args, { encoding: 'utf-8' }));
27
+ const result = runCommand('xcode-select', ['-p']);
28
+ if (!result || result.error || result.status !== 0) {
29
+ throw new Error('该功能需要 Xcode 命令行工具(--wt / --wtr 依赖 git)。请在终端执行: xcode-select --install,安装完成后重试。');
30
+ }
31
+ }
32
+
20
33
  function normalizeAbsolutePath(targetPath) {
21
34
  return path.resolve(String(targetPath || '').trim());
22
35
  }
@@ -41,6 +54,8 @@ function detectGitWorktreeContext(targetPath, deps = {}) {
41
54
  throw new Error(`启用 --worktrees 时宿主机路径必须为目录: ${absoluteTargetPath}`);
42
55
  }
43
56
 
57
+ assertGitUsable(deps);
58
+
44
59
  let repoRoot;
45
60
  let commonDirRaw;
46
61
  try {
@@ -5,9 +5,20 @@
5
5
  "containerName": "my-dev",
6
6
  "hostPath": "/path/to/your/project",
7
7
  "containerPath": "/path/to/your/project",
8
- "imageName": "localhost/xcanwin/manyoyo",
8
+ "imageName": "ghcr.io/xcanwin/manyoyo",
9
9
  "imageVersion": "1.8.8-common",
10
10
  "containerMode": "common",
11
+ // 容器运行时:auto(默认,自动选择)/ docker / podman,仅全局配置生效
12
+ "containerRuntime": "auto",
13
+ // serve 是否每天检查一次新版本(默认 true;请求只带固定的 User-Agent,不附带任何本机信息),仅全局配置生效
14
+ "updateCheck": true,
15
+ // 容器内 apt / npm / pip 软件源(http/https;留空或不写 = 各自的官方默认源),仅全局配置生效。
16
+ // apt 只填镜像站主机(保留 /ubuntu 路径),例如 https://mirrors.aliyun.com;镜像本身不变,新建容器时生效
17
+ "mirrors": {
18
+ "apt": "",
19
+ "npm": "",
20
+ "pip": ""
21
+ },
11
22
 
12
23
  // 容器启动环境(env 按 key 合并覆盖;其余数组参数会累加)
13
24
  // 仅支持绝对路径,如 /abs/path.env
@@ -52,12 +63,12 @@
52
63
  // "serve": {
53
64
  // "title": "My MANYOYO",
54
65
  // "quickChat": {
55
- // "path": "~/.manyoyo/workpath/",
66
+ // "path": "~/.manyoyo/work/",
56
67
  // "run": "claude"
57
68
  // }
58
69
  // },
59
70
 
60
- // 可选插件(manyoyo playwright / manyoyo plugin playwright)
71
+ // 可选插件(manyoyo playwright)
61
72
  "plugins": {
62
73
  "playwright": {
63
74
  // mixed: 支持容器+宿主机;container: 仅容器;host: 仅宿主机
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "7.1.6",
4
- "imageVersion": "1.9.2-common",
3
+ "version": "8.1.0",
4
+ "imageVersion": "2.1.0-common",
5
5
  "playwrightCliVersion": "0.1.21",
6
6
  "description": "AI Agent CLI Security Sandbox for Docker and Podman",
7
7
  "keywords": [
@@ -30,17 +30,21 @@
30
30
  "my": "bin/manyoyo.js"
31
31
  },
32
32
  "scripts": {
33
+ "start": "node bin/manyoyo.js",
34
+ "serve:dev": "node bin/manyoyo.js serve 127.0.0.1:3000",
33
35
  "dev:release": "node scripts/dev-release.js",
34
- "build:web-shadcn": "node scripts/build-web-shadcn.js",
35
- "dev:web-shadcn": "node scripts/dev-web-shadcn.js",
36
- "test:web-shadcn": "node scripts/test-web-shadcn.js",
37
- "prepack": "npm run build:web-shadcn",
38
- "install-link": "npm link",
39
- "test": "jest --coverage && npm run test:web-shadcn",
40
- "test:unit": "jest test/ && npm run test:web-shadcn",
41
- "lint": "echo 'Lint check passed'",
36
+ "build:web": "node scripts/web.js build",
37
+ "dev:web": "node scripts/web.js dev",
38
+ "test:web": "node scripts/web.js test",
39
+ "prepack": "npm run build:web",
40
+ "test": "jest --coverage && npm run test:web",
41
+ "test:unit": "jest test/ --testPathIgnorePatterns '<rootDir>/temp/' '<rootDir>/test/integration/' && npm run test:web",
42
+ "test:integration": "jest test/integration/",
43
+ "test:installer": "jest test/installer.test.js",
44
+ "lint:sh": "command -v shellcheck >/dev/null 2>&1 || { echo '未安装 shellcheck:macOS 用 brew install shellcheck,Debian/Ubuntu 用 sudo apt install shellcheck,或用 docker run --rm -v \"$PWD:/mnt\" -w /mnt koalaman/shellcheck:stable scripts/install.sh scripts/offline/*.sh' >&2; exit 1; } && shellcheck -s sh -x -e SC1091 scripts/install.sh scripts/offline/*.sh",
42
45
  "docs:dev": "vitepress dev docs --host 127.0.0.1 --port 5173",
43
46
  "docs:build": "vitepress build docs",
47
+ "docs:check": "npm run docs:build && node scripts/check-docs-seo.js",
44
48
  "docs:preview": "vitepress preview docs --host 127.0.0.1 --port 4173"
45
49
  },
46
50
  "homepage": "https://xcanwin.github.io/manyoyo/",