@xcanwin/manyoyo 5.1.4 → 5.1.6

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.
@@ -80,6 +80,7 @@ ENV LANG=C.UTF-8 \
80
80
  RUN <<EOX
81
81
  # 配置 APT 镜像源
82
82
  sed -i "s|http://[^/]*\.ubuntu\.com|${APT_MIRROR}|g" /etc/apt/sources.list.d/ubuntu.sources
83
+ ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
83
84
 
84
85
  # 安装所有基础依赖
85
86
  # 网络与连接
@@ -182,13 +183,13 @@ EOF
182
183
  cp -a /tmp/openai-skills/skills/.system "$HOME/.codex/skills/.system"
183
184
  rm -rf /tmp/openai-skills
184
185
  CODEX_INSTALLER="$HOME/.codex/skills/.system/skill-installer/scripts/install-skill-from-github.py"
185
- python "$CODEX_INSTALLER" --repo openai/skills --path \
186
+ python3 "$CODEX_INSTALLER" --repo openai/skills --path \
186
187
  skills/.curated/doc \
187
188
  skills/.curated/spreadsheet \
188
189
  skills/.curated/pdf \
189
190
  skills/.curated/security-best-practices \
190
191
  skills/.curated/security-threat-model
191
- python "$CODEX_INSTALLER" --repo anthropics/skills --path \
192
+ python3 "$CODEX_INSTALLER" --repo anthropics/skills --path \
192
193
  skills/pptx \
193
194
  skills/theme-factory \
194
195
  skills/frontend-design \
@@ -56,6 +56,14 @@ const SCENE_DEFS = {
56
56
  const VALID_RUNTIME = new Set(['container', 'host', 'mixed']);
57
57
  const VALID_ACTIONS = new Set(['up', 'down', 'status', 'health', 'logs']);
58
58
  const CONTAINER_EXTENSION_ROOT = '/app/extensions';
59
+ const DEFAULT_FINGERPRINT_PROFILE = {
60
+ userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36',
61
+ locale: 'zh-CN',
62
+ acceptLanguage: 'zh-CN,zh;q=0.9',
63
+ timezoneId: 'Asia/Shanghai',
64
+ width: 1366,
65
+ height: 768
66
+ };
59
67
 
60
68
  function sleep(ms) {
61
69
  return new Promise(resolve => setTimeout(resolve, ms));
@@ -362,7 +370,7 @@ class PlaywrightPlugin {
362
370
  if (!this.sceneConfigMissing(sceneName)) {
363
371
  return;
364
372
  }
365
- this.runCmd(['npx', '-y', 'playwright-core', 'install', this.defaultBrowserName(sceneName)], { check: true });
373
+ this.runCmd(['npx', '-y', 'playwright-core', 'install', '--with-deps', this.defaultBrowserName(sceneName)], { check: true });
366
374
  }
367
375
 
368
376
  scenePidFile(sceneName) {
@@ -510,13 +518,21 @@ class PlaywrightPlugin {
510
518
  const def = SCENE_DEFS[sceneName];
511
519
  const port = this.scenePort(sceneName);
512
520
  const extensionPaths = asStringArray(options.extensionPaths, []);
521
+ const baseLaunchArgs = [
522
+ `--user-agent=${DEFAULT_FINGERPRINT_PROFILE.userAgent}`,
523
+ `--lang=${DEFAULT_FINGERPRINT_PROFILE.locale}`,
524
+ `--window-size=${DEFAULT_FINGERPRINT_PROFILE.width},${DEFAULT_FINGERPRINT_PROFILE.height}`,
525
+ '--disable-blink-features=AutomationControlled',
526
+ '--force-webrtc-ip-handling-policy=disable_non_proxied_udp'
527
+ ];
513
528
  const launchOptions = {
514
529
  channel: 'chromium',
515
- headless: def.headless
530
+ headless: def.headless,
531
+ args: [...baseLaunchArgs]
516
532
  };
517
533
 
518
534
  if (extensionPaths.length > 0) {
519
- launchOptions.args = this.buildExtensionLaunchArgs(extensionPaths);
535
+ launchOptions.args.push(...this.buildExtensionLaunchArgs(extensionPaths));
520
536
  }
521
537
 
522
538
  return {
@@ -535,7 +551,20 @@ class PlaywrightPlugin {
535
551
  browserName: 'chromium',
536
552
  launchOptions,
537
553
  contextOptions: {
538
- userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36'
554
+ userAgent: DEFAULT_FINGERPRINT_PROFILE.userAgent,
555
+ locale: DEFAULT_FINGERPRINT_PROFILE.locale,
556
+ timezoneId: DEFAULT_FINGERPRINT_PROFILE.timezoneId,
557
+ viewport: {
558
+ width: DEFAULT_FINGERPRINT_PROFILE.width,
559
+ height: DEFAULT_FINGERPRINT_PROFILE.height
560
+ },
561
+ screen: {
562
+ width: DEFAULT_FINGERPRINT_PROFILE.width,
563
+ height: DEFAULT_FINGERPRINT_PROFILE.height
564
+ },
565
+ extraHTTPHeaders: {
566
+ 'Accept-Language': DEFAULT_FINGERPRINT_PROFILE.acceptLanguage
567
+ }
539
568
  }
540
569
  }
541
570
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcanwin/manyoyo",
3
- "version": "5.1.4",
3
+ "version": "5.1.6",
4
4
  "imageVersion": "1.8.1-common",
5
5
  "description": "AI Agent CLI Security Sandbox for Docker and Podman",
6
6
  "keywords": [