AGENTS.md
June 15, 2026 · View on GitHub
- To test opencode in
packages/opencode, runbun dev. - To regenerate the JavaScript SDK, run
./packages/sdk/js/script/build.ts. - ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
- The default branch in this repo is
feat/nuwaxcode. - Release Workflow:
- Changelog: Update
CHANGELOG-nuwaxcode.mdwith new version details. - Bump Version: Update
packages/opencode/package.jsonversion field. 2.1 Version Consistency Rule (Mandatory):packages/opencode/package.jsonis the only version source of truth.- All
optionalDependenciesentries matchingnuwaxcode-*must equal the same version. - Rebuild binaries before publish, then run:
bun run script/check-version-consistency.ts --phase pre --version <version>
- After publish, run:
bun run script/check-version-consistency.ts --phase post --version <version>
- Any mismatch must fail the release immediately.
- Commit & Push: Push changes to
feat/nuwaxcodebranch. - Tag & Trigger CI(仅此方式触发,无 workflow_dispatch):
git tag v<version> && git push origin v<version>- 发版前在仓库内完成:
CHANGELOG-nuwaxcode.md、packages/opencode/package.json版本号。 - CI
.github/workflows/build-release.yml:拉取 models.dev → 全平台构建 → GitHub Release → npm。 - npm 发布与校验与
scripts/release-publish.sh一致(check-version-consistencypre/post、清理dist/nuwaxcode)。需配置 secretNPM_TOKEN。 - npm dist-tag:预发布版本(如
1.3.0-beta.8)自动发布到beta;稳定版(如1.2.3)发布到latest。逻辑见scripts/resolve-npm-dist-tag.sh。
- 发版前在仓库内完成:
- Verify:
https://github.com/nuwax-ai/nuwaxcode/releases/tag/v<version>与npm view nuwaxcode@<version> version。 - Electron Integration: Update
NUWAXCODE_VERSIONin Electron client'sscripts/prepare/prepare-nuwaxcode.jsandinstallVersioninsrc/main/services/system/dependencies.ts, then runnode scripts/prepare/prepare-nuwaxcode.js. - 本地全量发版(含构建):
./release.sh <version> [otp|--no-otp];仅 npm 发布段:./scripts/release-publish.sh <version>(需已存在packages/opencode/dist)。
- Changelog: Update