feat: macOS 构建支持 — agents/skills 预置 + 文档完善 - #6
Closed
000x7b-stack wants to merge 1 commit into
Closed
Conversation
- Add preseed_portable_data() to build-macos-arm64.sh: injects builtin agents, skills, and tools into the .app bundle's CLAUDE_CONFIG_DIR, mirroring the Windows portable build (build-portable-win.ps1) - Update BUILD.md with comprehensive macOS build guide: prerequisites, build steps, output structure, env vars, and troubleshooting - Update README.md: add macOS DMG download badge, macOS quick start, and macOS source build instructions The preseeding step runs before code signing so the entire bundle (including injected data) gets sealed. On first launch, determine_startup_portable_dir() detects app-mode.json and enters portable mode automatically — users get agents/skills/tools out of the box without manual setup.
PR quality triageChanged areas: area:desktop, area:docs CLI core policy: No CLI-core policy block detected. Missing-test policy: No missing-test policy block detected. Coverage baseline policy: No coverage-baseline policy block detected. CLI core files:
Coverage policy files:
Expected checks:
Test coverage signals:
Risk notes:
Hard merge gates still come from GitHub Actions, not AI review. Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask: @dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
为 macOS 构建流程添加 agents/skills/tools 预置逻辑,使 macOS DMG 产物开箱即用,与 Windows 便携版体验对齐。
改动内容
1.
desktop/scripts/build-macos-arm64.sh— 添加预置逻辑新增
preseed_portable_data()函数,在 .app 签名后注入到 canonical copy:Contents/MacOS/CLAUDE_CONFIG_DIR/下创建便携数据骨架app-mode.json({"mode":"portable"}),启动时determine_startup_portable_dir()自动命中便携模式2.
BUILD.md— 添加 macOS 构建指南3.
README.md— 更新下载与构建说明背景
macOS 构建脚本 (
build-macos-arm64.sh) 已存在于仓库,但缺少 agents/skills 预置步骤——打出的 .app 内没有数据,用户首次启动后需要手动复制。本 PR 对齐 Windows 便携版的预置逻辑,实现开箱即用。影响范围
scripts/build-macos-arm64.sh新增预置函数 + 修复 codesign/命名问题BUILD.md新增 macOS 构建指南,README.md更新下载/构建说明测试说明
自动化测试
bun run lint(desktop TypeScript 类型检查)✅ 通过bun test(15 个单元测试)✅ 全部通过,0 失败bash -n desktop/scripts/build-macos-arm64.sh(语法校验)✅ 通过完整构建验证(真机 macOS Apple Silicon)
./scripts/build-macos-arm64.sh完整执行 ✅ 成功{"mode":"portable"}✅手工功能测试(真机 macOS)
~/Workspace/lab/Hello-Java-Sec项目执行 quick 模式代码审计,4 个并行 Agent 正常工作,成功生成完整审计报告门禁说明
CONTRIBUTING.md 中提到的
bun run verify/bun run check:desktop等门禁脚本在当前仓库的 package.json 中不存在(仅有check:native、kimo、start),已用等效的bun run lint+bun test+ 完整构建替代。剩余风险
data/tools/bin/darwin/目录为空(.gitignore 排除),macOS 便携版的安全工具探测会回退到系统 PATH 查找--no-sign构建的 .app 首次打开需要用户手动在系统设置中允许。正式发布需要 Apple Developer 证书 (SIGN_BUILD=1)