Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dist/
*.xcresult/
/apps/tray/ui/art/video/
/.worktrees/
/.claude/
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## 验证、实机验收与交付

- 校验门:Python 跑 `uv run ruff format --check .`、`uv run ruff check .`、`uv run pyright`、`uv run pytest`、`uv run python scripts/review_checks.py --base origin/main`;改动 `apps/tray` 另跑 `cargo fmt --check`、`cargo clippy --all-targets -- -D warnings`、`cargo test`(预览改动再跑 `AGENTNAVE_PREVIEW=1 CARGO_TARGET_DIR=target/preview cargo clippy --all-targets -- -D warnings`)。
- 校验门:Python 跑 `uv run ruff format --check .`、`uv run ruff check .`、`uv run pyright`、`uv run pytest`、`uv run python scripts/review_checks.py --base origin/main`;改动 `apps/tray` 另跑 `cargo fmt --check`、`cargo clippy --all-targets -- -D warnings`、`cargo test`(预览改动再跑 `AGENTNAVE_PREVIEW=1 CARGO_TARGET_DIR="$HOME/.cache/cargo-target-preview" cargo clippy --all-targets -- -D warnings`)。
- 界面预览(macOS)用 `scripts/preview_tray.sh`(仅用于前端/UI 验收,不改正式数据);未合并后端真机试跑仅在用户明确要求且不改 SQLite schema 时走 `scripts/install_local.sh install --ref <ref> --dogfood`,事后 `rollback`。交付预览版或正式版前须亲自实机检查运行中的托盘与设置页;合并/放弃 PR 后先退出并删 `~/Applications` 对应预览版再清 worktree。
- 新增 Provider 须同时接员工与 boss,且取得当次授权后至少完成一次真实调用验收(平时测试一律用 fake executable,任何真实 CLI 调用须先获配额授权)。
- 改动默认走独立 worktree、分支与 PR,不直提 `main`;合并前按 `agentnave-review` + `REVIEW.md` 完成独立评审(零席自验不算),涉及未测平台须等其 CI 到终态。
Expand Down
8 changes: 5 additions & 3 deletions scripts/preview_tray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ fi
ID=${AGENTNAVE_PREVIEW_ID:-io.github.timwongup.agentnave.preview${SLOT:+.$(printf %s "$SLOT" | tr -c 'A-Za-z0-9-' '-')}}
NAME=${AGENTNAVE_PREVIEW_NAME:-AgentNave 预览${SLOT:+ $SLOT}}
APP="$HOME/Applications/$NAME.app"
TARGET_DIR="$HOME/.cache/cargo-target-preview"
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' "$TRAY/Cargo.toml" | head -n 1)

# Its own target dir, so the preview flags never mix with a normal build. Optimized, as the installed
# Shared across worktrees to avoid duplicating ~3.7 GB per checkout, yet separate from the normal
# cargo target dir so preview flags never mix with a regular build. Optimized, as the installed
# app is: unoptimized, each page of data takes five times as long.
AGENTNAVE_PREVIEW=1 \
CARGO_PROFILE_DEV_OPT_LEVEL=2 \
TAURI_CONFIG="{\"identifier\":\"$ID\",\"productName\":\"$NAME\"}" \
CARGO_TARGET_DIR="$TRAY/target/preview" \
CARGO_TARGET_DIR="$TARGET_DIR" \
cargo build --manifest-path "$TRAY/Cargo.toml"

osascript -e "quit app id \"$ID\"" 2>/dev/null || true
rm -rf "$APP"
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
cp "$TRAY/target/preview/debug/agentnave-tray" "$APP/Contents/MacOS/agentnave-tray"
cp "$TARGET_DIR/debug/agentnave-tray" "$APP/Contents/MacOS/agentnave-tray"
cp "$TRAY/icons/icon.icns" "$APP/Contents/Resources/icon.icns"
cat > "$APP/Contents/Info.plist" <<PLIST
<?xml version="1.0" encoding="UTF-8"?>
Expand Down
Loading