Skip to content

feat: add Windows x64 support - #31

Open
Paul-Yuchao-Dong wants to merge 1 commit into
actionbook:mainfrom
Paul-Yuchao-Dong:feat/windows-support
Open

feat: add Windows x64 support#31
Paul-Yuchao-Dong wants to merge 1 commit into
actionbook:mainfrom
Paul-Yuchao-Dong:feat/windows-support

Conversation

@Paul-Yuchao-Dong

Copy link
Copy Markdown

This PR adds native Windows x64 (x86_64-pc-windows-msvc) support to postagent.

Changes

  • New platform package postagent-win32-x64 — publishes a native Windows binary via npm, following the same optional-dependency pattern as the existing darwin/linux packages.
  • Binary resolutionbin-resolve.ts and postinstall.cjs now map win32-x64 to postagent-win32-x64, using .exe extension on Windows. chmod errors on Windows are caught (it's a no-op there).
  • CI matrix — Added x86_64-pc-windows-msvc target running on windows-latest to the publish workflow, and included the win32-x64 package in the publish loop.
  • Documentation — Updated README with platform support table and a build-from-source guide for Windows users who need to compile the Rust binary locally.

Testing

Tested on Windows 11 x64 with Node.js — postagent CLI resolves the native binary correctly, postinstall runs without errors, and the .exe extension is handled properly.

Fixes # (no existing issue — new platform target)

- Add win32-x64 to platform package map in bin-resolve.ts and postinstall.cjs
- Add postagent-win32-x64 optional dependency in package.json
- Create postagent-win32-x64 platform package with native binary target
- Handle .exe extension for Windows binaries
- Add Windows x64 build target (x86_64-pc-windows-msvc) to CI matrix
- Update README with platform support info and build-from-source guide
@4bmis

4bmis commented May 27, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

"postagent-win32-x64": "workspace:*"

P1 Badge Commit the lockfile update for the Windows package

This adds a new workspace optionalDependency, but pnpm-lock.yaml still lists only the existing four platform packages under packages/postagent. The release workflow runs pnpm install --frozen-lockfile, and the publish workflow runs pnpm install on GitHub Actions where pnpm defaults frozen lockfile to true in CI (pnpm docs), so the next release/publish install will fail as soon as it checks the out-of-sync manifest. Please regenerate and commit the lockfile entry for postagent-win32-x64.


"name": "postagent-win32-x64",
"version": "0.3.2",

P1 Badge Add the Windows package to the fixed version group

This introduces a sixth npm package, but .changeset/config.json still fixes only postagent plus the four existing platform packages, so pnpm version-packages will not bump postagent-win32-x64 with the rest of the release. After the first release, postagent can point Windows users at an older native binary package, violating the repo's version-lockstep rule and risking CLI/core mismatches. Add this package to the fixed group (and include it in the release changeset) before publishing.


npm install -g .

P2 Badge Point the source install command at the CLI package

Running this from the repository root does not install the CLI: the root package.json is a private workspace root with no name, version, or bin, and npm pack --dry-run . from that directory fails with Invalid package, must have name and version. Windows users following the fallback instructions will not get a postagent command; the global install step needs to target the actual CLI package/workspace after building the binary.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@4bmis

4bmis commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Hi @Paul-Yuchao-Dong , thanks for contribution! But there are some issues in this PR, please fix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants