Repository navigation
feat: add macOS Desktop portable build (D0-Mac) - #59
Merged
pppolf merged 7 commits intoAug 14, 2026
Merged
Conversation
Split cmd/cyberagent-desktop by build tag: shared shell code under desktop, Windows WebView2/Acrylic/registry launcher code under windows, and a new darwin port. macOS uses bundled WKWebView with no runtime prerequisite probe, reports startup failures through a bounded strictly escaped osascript dialog, and launches workspace launchers only through the fixed /usr/bin/open with a validated .app set. Windows-only seams (Credential Manager, ConPTY terminal, Safe Web/WFP, controlled host execution) keep failing closed on macOS. scripts/build-desktop-darwin.sh emits an ad-hoc-signed, un-notarized build/desktop/Prayu.app with the same consecutive-build SHA-256 reproducibility check, and scripts/check-macos-compat.sh verifies Mach-O, code signature, metadata, and operator-preview package boundaries. The renderer reserves the native traffic-light space in the macOS titlebar.
Add a desktop-macos job that builds the embedded renderer, runs the desktop-tagged boundary tests, builds the portable .app with the reproducibility check, and uploads the bundle with its release metadata and compatibility report.
Add ADR 0096 and update the Desktop plan, project memory/status ledgers, and READMEs to document the darwin build-tag port, the open-based workspace launcher, the ad-hoc-signed portable .app, and the failing-closed Windows-only seams on macOS.
The frontend test environment is pinned to the Node.js 24 baseline used by CI and documented in the README. Newer local Node versions (for example v26) break the jsdom test environment, so the darwin build script now fails fast before the frontend checks with an actionable nvm/-SkipFrontend message instead of dumping unrelated test failures. The reproducibility comparison also keeps the second binary next to the first and reports both hashes when consecutive builds differ, so release diagnostics no longer discard the only evidence.
The Wails AssetServer serves the macOS renderer from the custom wails:// scheme whose request.Host is wails, not the Windows wails.localhost host. The shared origin gate rejected every macOS renderer request as Forbidden, leaving a white window, so the trusted host is now pinned per platform: wails.localhost on Windows and wails on macOS, still guarded by the wails.io User-Agent token and the empty server-form URL authority. Platform divergence guard tests lock each host to its own OS.
The macOS 26 SDK compiled the cgo objects at deployment target 26.0 while the external linker targeted 11.0, flooding every build with 'built for newer macOS version' warnings. The darwin build script now pins CGO_CFLAGS and CGO_LDFLAGS to -mmacosx-version-min=11.0, the bundle declares LSMinimumSystemVersion 11.0.0, and the compatibility checklist verifies the Mach-O deployment target matches the Go 1.25 macOS 11 minimum.
…build # Conflicts: # docs/PROJECT_MEMORY.md # docs/PROJECT_STATUS.md
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.
Summary
cmd/cyberagent-desktop按构建标签拆分为共享desktop壳与 Windows/darwin 平台实现。macOS 使用系统自带 WKWebView(无 WebView2 式预检)、有界严格转义的 osascript 启动失败对话框;工作区启动器只通过固定/usr/bin/open打开已验证的 .app(Finder、Terminal、Antigravity、PyCharm、WebStorm、Visual Studio Code)。Windows 专属的 Credential Manager、ConPTY 用户终端、Safe Web/WFP、受控宿主执行在 macOS 保持失败关闭,未放宽任何权限边界。scripts/build-desktop-darwin.sh产出 ad-hoc 签名、未公证的build/desktop/Prayu.app,含与 Windows 端一致的连续双构建 SHA-256 可复现校验;scripts/check-macos-compat.sh校验 Mach-O/架构/codesign/部署目标/元数据与 operator-preview 包边界,release_ready=false直到签名、公证与人工 macOS 矩阵完成。wails://scheme(请求 Host 为wails),进程内 API 网关现在按平台固定受信 Host(Windows 保持wails.localhost),并加平台隔离守卫测试。LSMinimumSystemVersion对齐),消除 macOS 26 SDK 下 "built for newer macOS version" 告警刷屏。desktop-macos任务(macos-latest,可复现构建 + 产物上传);Windows 任务与wv2runtime.error边界保持不变。边界见 ADR 0097(上游已占用 0096 编号,合并时已重编号)。main(Docker 生命周期所有权切片 / schema v97),冲突已解决。Validation
go test -tags "desktop" -count=1 ./cmd/cyberagent-desktop ./internal/desktop ./internal/webuigo build ./...、go vet ./...(含合并上游 v97 后的验证)./scripts/build-desktop-darwin.sh -VerifyReproducible:npm ci / check:api / 225 项前端测试 / Vite / Go 测试 / 连续双构建 SHA-256 一致 / codesign / 兼容检查全绿Audit
README.md、项目记忆账本与 ADR 0097 已更新