feat: add Windows support + multi-platform GitHub Actions release#25
Open
lk19940215 wants to merge 16 commits into
Open
feat: add Windows support + multi-platform GitHub Actions release#25lk19940215 wants to merge 16 commits into
lk19940215 wants to merge 16 commits into
Conversation
reset-password only sets auth_password_hash but does not ensure auth_jwt_secret exists. When the database is wiped and password is reset via CLI, the user cannot log in because JWT token generation fails with 'JWT secret not configured'. Check for missing auth_jwt_secret during reset-password and generate one if needed, matching the behavior of the /api/auth/setup flow. Closes vibe-coding-labs#14
…word-jwt-secret fix(reset-password): generate JWT secret if missing
…-labs#21) 扫码登录的 fetchUserInfoWithPtKey 此前裸调 v1 userInfo + 写死 clientVersion 2.4.5,与 7fcf9df 适配 JoyCode 2.7 时引入的 color gateway 鉴权(HMAC 签名 + v2 端点 + 2.7.5)脱节。二维码生成与扫码 轮询(qr.m.jd.com)均正常,但确认后用 pt_key 换用户信息这步走的 是 2.7 已弃用的旧路径,导致即使拿到有效 pt_key 也换不出用户信息。 改为复用 joycode.Client.UserInfo(),与 OAuth 登录走同一套鉴权, 消除两条登录链路的分叉。 Closes vibe-coding-labs#21 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ogin-color-gateway fix(auth): 扫码登录走 color gateway 鉴权,修复 vibe-coding-labs#21 京东登录失败
仓库已从 vibe-coding-labs/JoyCodeProxy 改名为 JoyCode2Api,本次把代码侧 全面对齐到新名: - go module: github.com/vibe-coding-labs/JoyCodeProxy → JoyCode2Api - 23 个 .go 文件的 import 路径同步更新 - cmd/JoyCodeProxy/ 目录改名 cmd/JoyCode2Api/(git mv 保留历史) - 构建配置跟随: Dockerfile / scripts/release.sh / web/vite.config.ts - 二进制名与发布产物名 JoyCodeProxy → JoyCode2Api - 前端 GitHub 链接、README、dashboard ghRepo 常量对齐新仓库 - 重新构建前端 embed 资源 不改: docs/superpowers/plans/ 历史规划文档(保持历史原貌); JWT issuer "joycode-proxy"(改会使现有 dashboard 会话全部失效,不在范围); .gitignore 中 snake_case/kebab 产物防御规则(保留以防本地旧二进制误提交)。 验证: go build/vet/test 全过;前端构建产物无旧链接残留; 启动重构后二进制 /health、/api/qr-login/init、/v1/models 路由均正常。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…/module-path-joycode2api refactor: module 路径与二进制名对齐 JoyCode2Api
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Switch sqlite driver from mattn/go-sqlite3 (CGO) to modernc.org/sqlite (pure Go). With CGO disabled the binary cross-compiles to darwin without a macOS SDK, restoring the darwin-arm64 release artifact that v0.6.0 had to ship without. Driver name sqlite3 -> sqlite; DSNs adapted (proxy.db WAL via _pragma, read-only JoyCode IDE db via file: URI mode=ro). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
新增「从源码构建」章节:git clone + CGO_ENABLED=0 编译当前平台的说明, 以及一段可原样复制粘贴给 AI Agent(Claude Code / Cursor 等)的一键指令, 由 Agent 自动完成 clone / build / 后台启动 / 默认浏览器打开 Dashboard。 顺带把构建章节的 Go 版本要求从 1.22+ 修正为 1.25+(与 go.mod 一致)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Refactor base URLs to be configurable via environment variables.
Make BaseURL and SaasBaseURL configurable
跟进 PR vibe-coding-labs#24 的格式规范化:var 块与 envOr 改用 tab 缩进、const 块等号重新对齐。功能改动由 @WslzGmzs 贡献,本提交仅做 gofmt,无逻辑变更。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add GitHub Actions workflow (.github/workflows/release.yml) that builds binaries for darwin-arm64, darwin-amd64, linux-amd64, windows-amd64 - Add process_unix.go / process_windows.go for platform-specific process management (daemon detach, terminate, kill, liveness check) - Add service_windows.go for Windows service management via NSSM - Update daemon.go to use platform-abstracted helpers instead of direct Unix syscalls (Setpgid, SIGTERM, SIGKILL, Signal(0)) - Update credentials.go to support Windows/Linux JoyCode IDE state paths and fix SQLite URI encoding for Windows backslash paths All 4 platforms verified with CGO_ENABLED=0 cross-compilation. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
用 opus 4.6 thinkings ,支持 windows 、macos intel 。 AI 弄得,代码做了AI复审 |
- Fix SQLite URI for Windows drive letter paths (C:\... → /C:/...) - Fix workflow_dispatch to checkout tag commit instead of HEAD - Fix service_windows.go MkdirAll error handling - Update service.go description to include Windows (NSSM) Co-authored-by: Cursor <cursoragent@cursor.com>
rootCmd has SilenceErrors: true which suppresses cobra default error output. The main function was calling os.Exit(1) without printing the error, causing users to see silent failures on credential validation. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
概要
新增 Windows 和 macOS Intel 跨平台支持,并添加 GitHub Actions CI/CD 流水线实现自动化多平台构建与发布。
变更内容
GitHub Actions 发布工作流 (
.github/workflows/release.yml)v*)或手动workflow_dispatchWindows 进程管理 (
process_unix.go,process_windows.go)daemon.go中的 Unix 特定系统调用(Setpgid、SIGTERM、SIGKILL、Signal(0))提取到平台特定文件,使用 build tags 隔离CREATE_NEW_PROCESS_GROUP、taskkill /T、OpenProcessWindows 服务管理 (
service_windows.go)installService、uninstallService、serviceStatus跨平台凭据检测 (
credentials.go)LoadFromSystem()支持 Windows(%APPDATA%)和 Linux(~/.config)路径C:\...→file:/C:/...)Bug 修复 (
main.go)SilenceErrors: true导致静默退出)已测试平台
向后兼容性
process_unix.go完整保留daemon.go调用相同函数签名,仅通过 build tags 分发测试计划
--help、serve、whoami命令验证通过