@xcanwin/manyoyo 8.3.3 → 8.5.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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/bin/manyoyo.js +111 -48
  3. package/docker/manyoyo.Dockerfile +41 -8
  4. package/docker/res/agent/update-agents.sh +1 -1
  5. package/docker/res/playwright/browser.json +9 -12
  6. package/docker/res/playwright/chrome-policy.json +3 -0
  7. package/docker/res/playwright/env +3 -0
  8. package/docker/res/playwright/playwright-cli.sh +5 -0
  9. package/docker/res/playwright/stealth.init.js +11 -9
  10. package/lib/browser-background.js +23 -0
  11. package/lib/container-env.sh +34 -0
  12. package/lib/container-exec.js +132 -0
  13. package/lib/container-id.js +11 -0
  14. package/lib/container-init.sh +40 -0
  15. package/lib/container-manage-options.js +35 -0
  16. package/lib/container-network.js +615 -0
  17. package/lib/container-run.js +27 -3
  18. package/lib/container-state.js +467 -0
  19. package/lib/egress-denied.js +128 -0
  20. package/lib/egress-proxy.js +315 -0
  21. package/lib/egress-sidecar-main.js +112 -0
  22. package/lib/egress-sidecar.js +276 -0
  23. package/lib/env-text.js +62 -0
  24. package/lib/json5-text-edit.js +5 -5
  25. package/lib/network-endpoints.js +99 -0
  26. package/lib/network-policy.js +269 -0
  27. package/lib/plugin/fingerprint.js +65 -50
  28. package/lib/plugin/playwright-extensions.js +0 -9
  29. package/lib/plugin/playwright-server.js +22 -2
  30. package/lib/plugin/playwright.js +55 -16
  31. package/lib/port-forward.js +137 -0
  32. package/lib/web/AGENTS.md +4 -0
  33. package/lib/web/container-manage.js +506 -0
  34. package/lib/web/denied-notify.js +52 -0
  35. package/lib/web/index.html +81 -77
  36. package/lib/web/server.js +352 -135
  37. package/manyoyo.example.json +20 -2
  38. package/package.json +13 -8
@@ -29,6 +29,24 @@
29
29
  "volumes": [],
30
30
  "ports": ["8888:8888"],
31
31
 
32
+ // 网络策略(新建容器时写入,Web「容器」页随时改,不需要重启容器)。不写 = 默认收紧:允许公网,
33
+ // 禁止宿主机其他端口、局域网 / 私有网段、云元数据与其他容器。
34
+ // preset:restricted(默认)/ allowlist(域名白名单,需要 serve 运行)/ open(不加规则)
35
+ "network": {
36
+ "preset": "restricted",
37
+ // 允许容器访问的宿主机端口(宿主机上监听 0.0.0.0 的服务)
38
+ "host": [],
39
+ // 直连放行的 IP 规则,例如局域网里的模型网关:{ "cidr": "192.168.1.50", "ports": "8000", "proto": "tcp" }
40
+ "egress": { "domains": [], "rules": [] },
41
+ // 端口暴露(需要 serve 运行):监听地址默认 127.0.0.1;绑 0.0.0.0 等于局域网 / 公网可见
42
+ "expose": []
43
+ },
44
+
45
+ // 容器每次启动(新建、重启、serve 拉起)都由容器内 init 执行一次的 bash 脚本;新建容器时写入,之后在 Web「容器」页随时改
46
+ "autostart": "",
47
+ // serve 启动时是否自动拉起此容器(配合 autostart 使用)
48
+ "autostartOnServe": false,
49
+
32
50
  // 仅首次创建容器时执行一次(创建后、常规 shell 前)
33
51
  "first": {
34
52
  // 仅支持绝对路径,如 /abs/path.env
@@ -81,8 +99,8 @@
81
99
  "timezoneId": "",
82
100
  // 强制 navigator.platform;留空则使用浏览器真实值(推荐,与 UA、字体、WebGL 自洽)
83
101
  "navigatorPlatform": "",
84
- // 是否禁用 WebRTC(默认 false)
85
- "disableWebRTC": false,
102
+ // 是否禁用 WebRTC(默认 true:否则 STUN 会暴露本机公网 IP;需要视频会议类网站时设为 false)
103
+ "disableWebRTC": true,
86
104
  // chrome 模式读取的 DevToolsActivePort 文件;留空时自动探测常见路径
87
105
  "devtoolsActivePortPath": "",
88
106
  // playwright ext-download 的 CRX prodversion 参数
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "8.3.3",
4
- "imageVersion": "2.1.1-common",
5
- "playwrightCliVersion": "0.1.21",
3
+ "version": "8.5.0",
4
+ "imageVersion": "2.2.0-common",
5
+ "playwrightCliVersion": "0.1.19",
6
+ "patchrightCoreVersion": "1.63.0",
7
+ "patchrightCoreIntegrity": "sha512-nuRJVTMVKoOFzY8vmwFqJZR3F0trUCKiPzDSgCOPq/yHHTefm9czILV23dXJsi5mvS7sCy7U1CqG7edA/21DtQ==",
6
8
  "description": "MANYOYO – open-source AI agent sandbox: run AI coding agents (Claude Code / Codex / Gemini) safely in Docker/Podman",
7
9
  "keywords": [
8
10
  "manyoyo",
@@ -39,7 +41,7 @@
39
41
  "test:web": "node scripts/web.js test",
40
42
  "prepack": "npm run build:web",
41
43
  "test": "jest --coverage && npm run test:web",
42
- "test:unit": "jest test/ --testPathIgnorePatterns '<rootDir>/temp/' '<rootDir>/test/integration/' && npm run test:web",
44
+ "test:unit": "jest test/ --testPathIgnorePatterns '<rootDir>/temp/' '<rootDir>/.claude/' '<rootDir>/test/integration/' && npm run test:web",
43
45
  "test:integration": "jest test/integration/ --runInBand",
44
46
  "test:installer": "jest test/installer.test.js",
45
47
  "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",
@@ -66,9 +68,9 @@
66
68
  "manyoyo.example.json"
67
69
  ],
68
70
  "dependencies": {
69
- "@playwright/cli": "0.1.21",
70
71
  "commander": "^15.0.0",
71
72
  "json5": "^2.2.3",
73
+ "patchright-core": "1.63.0",
72
74
  "ws": "^8.21.3"
73
75
  },
74
76
  "devDependencies": {
@@ -88,13 +90,16 @@
88
90
  ],
89
91
  "testEnvironment": "node",
90
92
  "modulePathIgnorePatterns": [
91
- "<rootDir>/temp/"
93
+ "<rootDir>/temp/",
94
+ "<rootDir>/.claude/"
92
95
  ],
93
96
  "testPathIgnorePatterns": [
94
- "<rootDir>/temp/"
97
+ "<rootDir>/temp/",
98
+ "<rootDir>/.claude/"
95
99
  ],
96
100
  "watchPathIgnorePatterns": [
97
- "<rootDir>/temp/"
101
+ "<rootDir>/temp/",
102
+ "<rootDir>/.claude/"
98
103
  ]
99
104
  }
100
105
  }