myagent-ai 1.3.3 → 1.3.4

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/core/version.py CHANGED
@@ -11,7 +11,7 @@ import subprocess
11
11
  from pathlib import Path
12
12
 
13
13
  # ── 基线版本(与 setup.py / package.json 保持一致) ──
14
- BASE_VERSION = "1.3.3"
14
+ BASE_VERSION = "1.3.4"
15
15
 
16
16
 
17
17
  def _version_from_git() -> str:
@@ -9,7 +9,7 @@ param(
9
9
 
10
10
  $ErrorActionPreference = "Stop"
11
11
  $PKG_NAME = "myagent-ai"
12
- $PKG_VERSION = "1.3.3"
12
+ $PKG_VERSION = "1.3.4"
13
13
 
14
14
  # Allow running scripts for the current process
15
15
  if ($PSVersionTable.PSVersion.Major -ge 5) {
@@ -57,13 +57,13 @@ function Check-Python {
57
57
  }
58
58
  # 尝试在常见安装路径查找
59
59
  $commonPaths = @(
60
+ "$env:LOCALAPPDATA\Programs\Python\Python314\python.exe",
61
+ "$env:LOCALAPPDATA\Programs\Python\Python313\python.exe",
60
62
  "$env:LOCALAPPDATA\Programs\Python\Python312\python.exe",
61
- "$env:LOCALAPPDATA\Programs\Python\Python311\python.exe",
62
- "$env:LOCALAPPDATA\Programs\Python\Python310\python.exe",
63
- "C:\Python312\python.exe",
64
- "C:\Python311\python.exe",
65
- "C:\Program Files\Python312\python.exe",
66
- "C:\Program Files\Python311\python.exe"
63
+ "C:\Python314\python.exe",
64
+ "C:\Python313\python.exe",
65
+ "C:\Program Files\Python314\python.exe",
66
+ "C:\Program Files\Python313\python.exe"
67
67
  )
68
68
  foreach ($pyPath in $commonPaths) {
69
69
  if (Test-Path $pyPath) {
@@ -79,14 +79,14 @@ function Check-Python {
79
79
  }
80
80
 
81
81
  function Install-Python {
82
- Write-Host "[*] Installing Python 3.12 ..." -ForegroundColor Yellow
82
+ Write-Host "[*] Installing Python 3.14 ..." -ForegroundColor Yellow
83
83
  $installAttempted = $false
84
84
 
85
85
  # Try winget first
86
86
  try {
87
87
  $null = (winget --version 2>$null)
88
88
  Write-Host " Using winget ..." -ForegroundColor Gray
89
- winget install Python.Python.3.12 --accept-package-agreements --accept-source-agreements
89
+ winget install Python.Python.3.14 --accept-package-agreements --accept-source-agreements
90
90
  $installAttempted = $true
91
91
  # 等待安装完成后刷新 PATH(重试多次)
92
92
  for ($i = 1; $i -le 5; $i++) {
@@ -96,9 +96,9 @@ function Install-Python {
96
96
  # winget 已完成安装,即使 Check-Python 失败也不再重复安装
97
97
  Refresh-Path
98
98
  $pyPaths = @(
99
- "$env:LOCALAPPDATA\Programs\Python\Python312\python.exe",
100
- "C:\Python312\python.exe",
101
- "C:\Program Files\Python312\python.exe"
99
+ "$env:LOCALAPPDATA\Programs\Python\Python314\python.exe",
100
+ "C:\Python314\python.exe",
101
+ "C:\Program Files\Python314\python.exe"
102
102
  )
103
103
  foreach ($pyPath in $pyPaths) {
104
104
  if (Test-Path $pyPath) {
@@ -121,11 +121,11 @@ function Install-Python {
121
121
  # 仅在 winget 未尝试时才从 python.org 下载(避免双重安装)
122
122
  if (-not $installAttempted) {
123
123
  # Fallback: download from python.org
124
- $pyUrl = "https://www.python.org/ftp/python/3.12.8/python-3.12.8-amd64.exe"
124
+ $pyUrl = "https://www.python.org/ftp/python/3.14.0/python-3.14.0-amd64.exe"
125
125
  $pyExe = Join-Path $env:TEMP "python-installer.exe"
126
126
 
127
127
  try {
128
- Write-Host " Downloading Python 3.12.8 ..." -ForegroundColor Gray
128
+ Write-Host " Downloading Python 3.14.0 ..." -ForegroundColor Gray
129
129
  Invoke-WebRequest -Uri $pyUrl -OutFile $pyExe -UseBasicParsing
130
130
 
131
131
  Write-Host " Installing (Add to PATH) ..." -ForegroundColor Gray
@@ -21,7 +21,7 @@ NO_DEPS=false
21
21
  DRY_RUN=false
22
22
  SCRIPT_URL="https://raw.githubusercontent.com/ctz168/myagent/main/install/install.sh"
23
23
  PKG_NAME="myagent-ai"
24
- PKG_VERSION="1.3.3"
24
+ PKG_VERSION="1.3.4"
25
25
 
26
26
  for arg in "$@"; do
27
27
  case "$arg" in
@@ -82,7 +82,7 @@ check_python() {
82
82
 
83
83
  # 按优先级尝试多个 Python 命令(包括版本号后缀的)
84
84
  local py_cmd=""
85
- for cmd in python3 python3.12 python3.11 python3.10 python; do
85
+ for cmd in python3 python3.14 python3.13 python3.12 python; do
86
86
  if command -v "$cmd" &>/dev/null; then
87
87
  py_cmd="$cmd"
88
88
  break
@@ -115,7 +115,7 @@ get_python_cmd() {
115
115
  return 0
116
116
  fi
117
117
  hash -r 2>/dev/null || true
118
- for cmd in python3 python3.12 python3.11 python3.10 python; do
118
+ for cmd in python3 python3.14 python3.13 python3.12 python; do
119
119
  if command -v "$cmd" &>/dev/null; then
120
120
  _PYTHON_CMD="$cmd"
121
121
  echo "$cmd"
@@ -127,30 +127,30 @@ get_python_cmd() {
127
127
  }
128
128
 
129
129
  install_python() {
130
- step "Installing Python 3.12 ..."
130
+ step "Installing Python 3.14 ..."
131
131
  local installed=false
132
132
 
133
133
  if [ "$OS" = "macos" ]; then
134
134
  if command -v brew &>/dev/null; then
135
135
  info "Using Homebrew ..."
136
- brew install python@3.12 && installed=true
136
+ brew install python@3.14 && installed=true
137
137
  # brew 安装后更新 PATH 并刷新缓存
138
- export PATH="$(brew --prefix python@3.12)/bin:$PATH"
138
+ export PATH="$(brew --prefix python@3.14)/bin:$PATH"
139
139
  hash -r
140
140
  # 等待文件系统同步(某些情况下 brew 完成后二进制文件不会立即可见)
141
141
  sleep 1
142
142
  if check_python; then return 0; fi
143
143
  # brew 已安装但 python3 软链接可能不存在,尝试手动查找
144
144
  local brew_py
145
- brew_py="$(brew --prefix python@3.12)/bin/python3"
145
+ brew_py="$(brew --prefix python@3.14)/bin/python3"
146
146
  if [ -x "$brew_py" ]; then
147
147
  _PYTHON_CMD="$brew_py"
148
148
  success "Python found at $brew_py"
149
149
  return 0
150
150
  fi
151
151
  # 尝试查找版本化的 python 二进制
152
- for ver in 3.12 3.11 3.10; do
153
- brew_py="$(brew --prefix python@3.12)/bin/python${ver}"
152
+ for ver in 3.14 3.13 3.12; do
153
+ brew_py="$(brew --prefix python@3.14)/bin/python${ver}"
154
154
  if [ -x "$brew_py" ]; then
155
155
  _PYTHON_CMD="$brew_py"
156
156
  success "Python found at $brew_py"
@@ -160,20 +160,20 @@ install_python() {
160
160
  # brew 已成功安装,即使 check_python 失败也不再重复安装
161
161
  if $installed; then
162
162
  warn "Python 已通过 Homebrew 安装,但 python3 命令暂不可用"
163
- info "请重启终端或运行: export PATH=\"$(brew --prefix python@3.12)/bin:\$PATH\""
164
- info "或直接使用: $(brew --prefix python@3.12)/bin/python3"
163
+ info "请重启终端或运行: export PATH=\"$(brew --prefix python@3.14)/bin:\$PATH\""
164
+ info "或直接使用: $(brew --prefix python@3.14)/bin/python3"
165
165
  # 将 brew python 路径设为 _PYTHON_CMD 供后续使用
166
- _PYTHON_CMD="$(brew --prefix python@3.12)/bin/python3"
166
+ _PYTHON_CMD="$(brew --prefix python@3.14)/bin/python3"
167
167
  return 0
168
168
  fi
169
169
  fi
170
170
  # 仅在 brew 未安装时才从 python.org 下载
171
171
  if ! $installed; then
172
- info "Downloading Python 3.12 ..."
173
- curl -fsSL -o /tmp/python.pkg "https://www.python.org/ftp/python/3.12.8/python-3.12.8-macos11.pkg"
172
+ info "Downloading Python 3.14 ..."
173
+ curl -fsSL -o /tmp/python.pkg "https://www.python.org/ftp/python/3.14.0/python-3.14.0-macos11.pkg"
174
174
  sudo installer -pkg /tmp/python.pkg -target /
175
175
  rm -f /tmp/python.pkg
176
- export PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:$PATH"
176
+ export PATH="/Library/Frameworks/Python.framework/Versions/3.14/bin:$PATH"
177
177
  hash -r
178
178
  if check_python; then return 0; fi
179
179
  fi
@@ -184,12 +184,12 @@ install_python() {
184
184
  if command -v apt-get &>/dev/null; then
185
185
  info "Using apt ..."
186
186
  sudo apt-get update -qq
187
- sudo apt-get install -y python3.12 python3.12-venv python3-pip 2>/dev/null || \
187
+ sudo apt-get install -y python3.14 python3.14-venv python3-pip 2>/dev/null || \
188
188
  sudo apt-get install -y python3 python3-venv python3-pip
189
189
  hash -r
190
190
  if check_python; then return 0; fi
191
191
  # apt 已安装但可能需要版本化命令
192
- for ver in 3.12 3.11 3.10; do
192
+ for ver in 3.14 3.13 3.12; do
193
193
  if command -v "python${ver}" &>/dev/null; then
194
194
  _PYTHON_CMD="python${ver}"
195
195
  success "Python found as python${ver}"
@@ -200,7 +200,7 @@ install_python() {
200
200
  fi
201
201
  if command -v dnf &>/dev/null; then
202
202
  info "Using dnf ..."
203
- sudo dnf install -y python3.12 2>/dev/null || sudo dnf install -y python3
203
+ sudo dnf install -y python3.14 2>/dev/null || sudo dnf install -y python3
204
204
  hash -r
205
205
  if check_python; then return 0; fi
206
206
  return 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {
package/setup.py CHANGED
@@ -9,7 +9,7 @@ from pathlib import Path
9
9
  _version_path = Path(__file__).parent / "core" / "version.py"
10
10
  _version_vars = {}
11
11
  exec(_version_path.read_text(), _version_vars)
12
- __version__ = _version_vars.get("BASE_VERSION", "1.3.3")
12
+ __version__ = _version_vars.get("BASE_VERSION", "1.3.4")
13
13
 
14
14
  setup(
15
15
  name="myagent",
package/start.js CHANGED
@@ -62,8 +62,8 @@ function resolvePackageDir() {
62
62
  // ── 查找 Python ────────────────────────────────────────────
63
63
  function findPython() {
64
64
  const candidates = IS_WIN
65
- ? ["python", "python3", "python3.12", "python3.11", "python3.10"]
66
- : ["python3", "python3.12", "python3.11", "python3.10", "python"];
65
+ ? ["python", "python3", "python3.14", "python3.13", "python3.12", "python3.11"]
66
+ : ["python3", "python3.14", "python3.13", "python3.12", "python"];
67
67
 
68
68
  for (const cmd of candidates) {
69
69
  try {
@@ -96,16 +96,16 @@ function findPythonOnWindows() {
96
96
  const programFilesX86 = process.env["ProgramFiles(x86)"] || "";
97
97
 
98
98
  const searchPaths = [
99
+ path.join(localAppData, "Programs", "Python", "Python314", "python.exe"),
100
+ path.join(localAppData, "Programs", "Python", "Python313", "python.exe"),
99
101
  path.join(localAppData, "Programs", "Python", "Python312", "python.exe"),
100
- path.join(localAppData, "Programs", "Python", "Python311", "python.exe"),
101
- path.join(localAppData, "Programs", "Python", "Python310", "python.exe"),
102
+ path.join(programFiles, "Python314", "python.exe"),
103
+ path.join(programFiles, "Python313", "python.exe"),
102
104
  path.join(programFiles, "Python312", "python.exe"),
103
- path.join(programFiles, "Python311", "python.exe"),
104
- path.join(programFiles, "Python310", "python.exe"),
105
- path.join(programFilesX86, "Python312", "python.exe"),
106
- path.join(programFilesX86, "Python311", "python.exe"),
107
- "C:\\Python312\\python.exe",
108
- "C:\\Python311\\python.exe",
105
+ path.join(programFilesX86, "Python314", "python.exe"),
106
+ path.join(programFilesX86, "Python313", "python.exe"),
107
+ "C:\\Python314\\python.exe",
108
+ "C:\\Python313\\python.exe",
109
109
  ];
110
110
 
111
111
  for (const pyPath of searchPaths) {