Compare commits
No commits in common. "main" and "v0.3.0" have entirely different histories.
76
README.md
76
README.md
|
|
@ -11,7 +11,7 @@
|
||||||
一条命令(Apple Silicon):
|
一条命令(Apple Silicon):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/raw/branch/main/install.sh | sh
|
curl -fsSL https://desktop-9el2944.taile9f15e.ts.net/wangd/agent-for-science/raw/branch/main/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
装完会自己打开。**不会弹「无法验证开发者」** —— 那个提示只对浏览器下载的文件出现,这条路用 `curl`,系统不会拦。
|
装完会自己打开。**不会弹「无法验证开发者」** —— 那个提示只对浏览器下载的文件出现,这条路用 `curl`,系统不会拦。
|
||||||
|
|
@ -24,51 +24,21 @@ curl -fsSL https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/raw/branc
|
||||||
先看再跑:
|
先看再跑:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/raw/branch/main/install.sh -o install.sh
|
curl -fsSL https://desktop-9el2944.taile9f15e.ts.net/wangd/agent-for-science/raw/branch/main/install.sh -o install.sh
|
||||||
less install.sh
|
less install.sh
|
||||||
sh install.sh
|
sh install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
只想看它打算做什么、先不动手:`AFS_DRY_RUN=1 sh install.sh`
|
只想看它打算做什么、先不动手:`AFS_DRY_RUN=1 sh install.sh`
|
||||||
|
|
||||||
也可以从 [Releases](https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/releases) 直接下 `.dmg` 拖进「应用程序」。走浏览器下载的话,第一次打开会被系统拦(应用还没买签名证书):
|
也可以从 [Releases](https://desktop-9el2944.taile9f15e.ts.net/wangd/agent-for-science/releases) 直接下 `.dmg` 拖进「应用程序」。走浏览器下载的话,第一次打开会被系统拦(应用还没买签名证书):
|
||||||
**系统设置 → 隐私与安全性 → 拉到最下面「仍要打开」→ 再确认一次**。每台机器只需要这一次。
|
**系统设置 → 隐私与安全性 → 拉到最下面「仍要打开」→ 再确认一次**。每台机器只需要这一次。
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## Windows 安装
|
## Windows
|
||||||
|
|
||||||
一条命令(PowerShell):
|
打包器已经能出便携目录和安装器,但还没在这里发布。先用 macOS 版。
|
||||||
|
|
||||||
```powershell
|
|
||||||
irm https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/raw/branch/main/install.ps1 | iex
|
|
||||||
```
|
|
||||||
|
|
||||||
装完会自己打开。**不会弹「Windows 已保护你的电脑」** —— SmartScreen 只拦带「网络来源标记」的文件,那个标记是浏览器打的,这条路用 `Invoke-WebRequest`,不打。
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>想先看脚本做什么,或者手动装</summary>
|
|
||||||
|
|
||||||
脚本只做四件事:下载 `Setup.exe` → 用 `SHA256SUMS` 核对 → 去掉网络来源标记 → 运行安装器(自解压到 `%LOCALAPPDATA%\Programs\AgentForScience` 并启动)。任何一步失败就停。
|
|
||||||
|
|
||||||
先看再跑:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
irm https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/raw/branch/main/install.ps1 -OutFile install.ps1
|
|
||||||
notepad install.ps1
|
|
||||||
.\install.ps1
|
|
||||||
```
|
|
||||||
|
|
||||||
只想看它打算做什么、先不动手:`$env:AFS_DRY_RUN=1; .\install.ps1`
|
|
||||||
只装不启动:`$env:AFS_NO_LAUNCH=1; .\install.ps1`
|
|
||||||
|
|
||||||
也可以从 [Releases](https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/releases) 直接下 `AgentForScience-Setup.exe` 双击。走浏览器下载的话,第一次运行 SmartScreen 会拦一下:**更多信息 → 仍要运行**。
|
|
||||||
|
|
||||||
**不需要管理员权限**,装在你自己的用户目录下。
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
> **双击启动后会有一个控制台黑窗** —— 那是壳(它负责起后端、开浏览器、退出时收摊)。**别关它**,关了后端就一起停了。内嵌窗口的版本还在做。
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -87,12 +57,8 @@ notepad install.ps1
|
||||||
|
|
||||||
发布件都带 ed25519 签名,签名对不上一律拒收。
|
发布件都带 ed25519 签名,签名对不上一律拒收。
|
||||||
|
|
||||||
> Windows 版的自更新还没接(v0.4.0 只发了安装器)。有新版本时重新跑一次上面那条 `irm ... | iex` 即可,项目数据不受影响。
|
|
||||||
|
|
||||||
## 你的东西放在哪
|
## 你的东西放在哪
|
||||||
|
|
||||||
**macOS**
|
|
||||||
|
|
||||||
```
|
```
|
||||||
~/.harness-framework/
|
~/.harness-framework/
|
||||||
db.sqlite 设置与索引(仅本人可读)
|
db.sqlite 设置与索引(仅本人可读)
|
||||||
|
|
@ -100,42 +66,24 @@ notepad install.ps1
|
||||||
logs/backend.log 出问题时看这里
|
logs/backend.log 出问题时看这里
|
||||||
```
|
```
|
||||||
|
|
||||||
**Windows**
|
卸载 = 把「应用程序」里的图标扔进废纸篓。数据留在上面那个目录,你自己决定要不要删。
|
||||||
|
|
||||||
```
|
|
||||||
%LOCALAPPDATA%\afs\ 数据(同上三样)
|
|
||||||
%LOCALAPPDATA%\Programs\AgentForScience\ 程序本体
|
|
||||||
```
|
|
||||||
|
|
||||||
卸载 = macOS 把「应用程序」里的图标扔进废纸篓;Windows 删掉 `%LOCALAPPDATA%\Programs\AgentForScience` 整个目录。两边数据都留在上面那个数据目录,你自己决定要不要删。
|
|
||||||
|
|
||||||
## 系统要求
|
## 系统要求
|
||||||
|
|
||||||
| | macOS | Windows |
|
- macOS 13 或更新,Apple Silicon(M 系列)
|
||||||
|---|---|---|
|
- 约 1.5 GB 磁盘
|
||||||
| 版本 | 13 或更新,Apple Silicon(M 系列) | 10 / 11,64 位 |
|
- 一个能用的模型 API key
|
||||||
| 磁盘 | 约 1.5 GB | 约 1 GB(装完 915 MB) |
|
|
||||||
| 权限 | 普通用户 | 普通用户,**不用管理员** |
|
|
||||||
|
|
||||||
两边都要一个能用的模型 API key。Python、git、LaTeX(tectonic)、跑实验用的 bash 都随包带,**不用先装任何东西**。
|
Python、git、LaTeX 都随包带,**不用先装任何东西**。
|
||||||
|
|
||||||
## 出问题了
|
## 出问题了
|
||||||
|
|
||||||
1. 看日志最后几十行:
|
1. 看 `~/.harness-framework/logs/backend.log` 最后几十行
|
||||||
- macOS:`~/.harness-framework/logs/backend.log`
|
|
||||||
- Windows:`%LOCALAPPDATA%\afs\logs\backend.log`
|
|
||||||
2. 应用自检:
|
2. 应用自检:
|
||||||
|
|
||||||
macOS
|
|
||||||
```sh
|
```sh
|
||||||
"/Applications/Agent for Science.app/Contents/Resources/python/bin/python3" -m app.launcher doctor
|
"/Applications/Agent for Science.app/Contents/Resources/python/bin/python3" -m app.launcher doctor
|
||||||
```
|
```
|
||||||
Windows
|
它会印出数据根、界面、harness、git、PDF 引擎、版本、沙箱各在哪 —— 有一项是 `not found` 就是它。
|
||||||
```powershell
|
|
||||||
& "$env:LOCALAPPDATA\Programs\AgentForScience\Resources\python\python.exe" -m app.launcher doctor
|
|
||||||
```
|
|
||||||
|
|
||||||
它会印出数据根、界面、harness、git、模型 shell、PDF 引擎、沙箱各在哪 —— 有一项是 `not found` 就是它。
|
|
||||||
3. 还是不行,把上面两样发给我。
|
3. 还是不行,把上面两样发给我。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
12
install.sh
12
install.sh
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ScienceMate —— 内网安装(macOS,不经浏览器,不弹 Gatekeeper)
|
# Agent for Science —— 内网安装(macOS,不经浏览器,不弹 Gatekeeper)
|
||||||
#
|
#
|
||||||
# curl -fsSL <发布目录>/install.sh | sh
|
# curl -fsSL <发布目录>/install.sh | sh
|
||||||
#
|
#
|
||||||
|
|
@ -24,11 +24,11 @@ set -eu
|
||||||
|
|
||||||
# 下面两行由打包器整行替换(占位符只能出现在这里,别处不许提它 —— 第一版把占位符
|
# 下面两行由打包器整行替换(占位符只能出现在这里,别处不许提它 —— 第一版把占位符
|
||||||
# 也写进了 case 的模式里,替换后要么语法错、要么把正确的地址当成"没填"拒掉)。
|
# 也写进了 case 的模式里,替换后要么语法错、要么把正确的地址当成"没填"拒掉)。
|
||||||
DEFAULT_URL="https://desktop-9el2944.taile9f15e.ts.net/wangd/sciencemate/releases/download/v0.4.4"
|
DEFAULT_URL="https://desktop-9el2944.taile9f15e.ts.net/wangd/agent-for-science/releases/download/v0.3.0"
|
||||||
DEFAULT_DMG="ScienceMate-0.4.4-arm64.dmg"
|
DEFAULT_DMG="Agent-for-Science-0.3.0-arm64.dmg"
|
||||||
BASE="${AFS_RELEASE_URL:-$DEFAULT_URL}"
|
BASE="${AFS_RELEASE_URL:-$DEFAULT_URL}"
|
||||||
DMG="$DEFAULT_DMG"
|
DMG="$DEFAULT_DMG"
|
||||||
APP="ScienceMate.app"
|
APP="Agent for Science.app"
|
||||||
DEST="${AFS_INSTALL_DIR:-/Applications}"
|
DEST="${AFS_INSTALL_DIR:-/Applications}"
|
||||||
DRY="${AFS_DRY_RUN:-}"
|
DRY="${AFS_DRY_RUN:-}"
|
||||||
# 私有 Forgejo 仓库的 release 资产要登录才下得到:AFS_AUTH="user:token"(只读 token 即可)。
|
# 私有 Forgejo 仓库的 release 资产要登录才下得到:AFS_AUTH="user:token"(只读 token 即可)。
|
||||||
|
|
@ -72,9 +72,9 @@ if [ -z "$DRY" ] && [ ! -w "$DEST" ]; then
|
||||||
DEST="$HOME/Applications"; mkdir -p "$DEST"
|
DEST="$HOME/Applications"; mkdir -p "$DEST"
|
||||||
say " /Applications 写不了,改装到 $DEST"
|
say " /Applications 写不了,改装到 $DEST"
|
||||||
fi
|
fi
|
||||||
if [ -z "$DRY" ] && pgrep -x ScienceMate >/dev/null 2>&1; then
|
if [ -z "$DRY" ] && pgrep -x AgentForScience >/dev/null 2>&1; then
|
||||||
say " 应用正在运行,先退出它"
|
say " 应用正在运行,先退出它"
|
||||||
osascript -e 'tell application "ScienceMate" to quit' >/dev/null 2>&1 || true
|
osascript -e 'tell application "Agent for Science" to quit' >/dev/null 2>&1 || true
|
||||||
sleep 2
|
sleep 2
|
||||||
fi
|
fi
|
||||||
run hdiutil attach "$WORK/$DMG" -nobrowse -readonly -quiet -mountpoint "$WORK/mnt"
|
run hdiutil attach "$WORK/$DMG" -nobrowse -readonly -quiet -mountpoint "$WORK/mnt"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue