Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Publish: build + npm release executor. Triggered by a vX.Y.Z tag, or
# dispatched by release.yml after it tags a version.
#
# Matrix-builds postagent-core for the four supported targets (darwin
# arm64/x64, linux x64/arm64-gnu), drops each binary into its platform
# package, builds the postagent JS bundle, and publishes all five packages
# to npm. Does not touch version numbers — that is release.yml's job.
# Matrix-builds postagent-core for all supported targets (darwin
# arm64/x64, linux x64/arm64-gnu, windows x64), drops each binary into its
# platform package, builds the postagent JS bundle, and publishes all
# packages to npm. Does not touch version numbers — that is release.yml's job.

name: Publish

Expand Down Expand Up @@ -39,6 +39,10 @@ jobs:
runner: ubuntu-latest
package: postagent-linux-arm64-gnu
binary: postagent-core
- target: x86_64-pc-windows-msvc
runner: windows-latest
package: postagent-win32-x64
binary: postagent-core.exe

runs-on: ${{ matrix.runner }}

Expand Down Expand Up @@ -92,6 +96,7 @@ jobs:
for pkg in postagent-darwin-arm64 postagent-darwin-x64 postagent-linux-x64-gnu postagent-linux-arm64-gnu; do
cp artifacts/$pkg/* packages/$pkg/bin/
done
cp artifacts/postagent-win32-x64/* packages/postagent-win32-x64/bin/
chmod +x packages/postagent-darwin-*/bin/postagent-core
chmod +x packages/postagent-linux-*/bin/postagent-core

Expand All @@ -103,7 +108,7 @@ jobs:

- name: Publish platform packages
run: |
for pkg in postagent-darwin-arm64 postagent-darwin-x64 postagent-linux-x64-gnu postagent-linux-arm64-gnu; do
for pkg in postagent-darwin-arm64 postagent-darwin-x64 postagent-linux-x64-gnu postagent-linux-arm64-gnu postagent-win32-x64; do
pnpm --filter $pkg publish --no-git-checks --access public
done
env:
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,31 @@ No more installing a new MCP server or CLI for each app your agent uses. Postage

## Install

Supports macOS (ARM64/x64), Linux (x64/ARM64), and Windows (x64).

```bash
npm install -g postagent
```

### Build from source (Windows)

On Windows, if the prebuilt binary is unavailable, you can compile from source:

```bash
# 1. Install Rust: https://rustup.rs
# 2. Clone and build the native binary
git clone https://github.com/actionbook/postagent.git
cd postagent
cargo build --release --manifest-path packages/postagent-core/Cargo.toml

# 3. Place the binary where the CLI expects it
mkdir -p packages/postagent-win32-x64/bin
copy packages\postagent-core\target\release\postagent-core.exe packages\postagent-win32-x64\bin\

# 4. Link for development
npm install -g .
```

## Quickstart

Postagent is meant to be driven by an agent, not by you. After installing, just tell your agent it has `postagent` available, then send it a task — for example:
Expand Down
7 changes: 7 additions & 0 deletions packages/postagent-win32-x64/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# postagent-win32-x64

## 0.3.2

### Patch Changes

- Initial Windows x64 native binary support.
Empty file.
23 changes: 23 additions & 0 deletions packages/postagent-win32-x64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "postagent-win32-x64",
"version": "0.3.2",
"description": "Postagent CLI native binary for Windows x64",
"os": [
"win32"
],
"cpu": [
"x64"
],
"bin": {
"postagent-core": "bin/postagent-core.exe"
},
"files": [
"bin/postagent-core.exe"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/actionbook/postagent.git",
"directory": "packages/postagent-win32-x64"
}
}
3 changes: 2 additions & 1 deletion packages/postagent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"postagent-darwin-arm64": "workspace:*",
"postagent-darwin-x64": "workspace:*",
"postagent-linux-x64-gnu": "workspace:*",
"postagent-linux-arm64-gnu": "workspace:*"
"postagent-linux-arm64-gnu": "workspace:*",
"postagent-win32-x64": "workspace:*"
}
}
10 changes: 8 additions & 2 deletions packages/postagent/scripts/postinstall.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const PLATFORM_PACKAGES = {
"darwin-x64": "postagent-darwin-x64",
"linux-x64": "postagent-linux-x64-gnu",
"linux-arm64": "postagent-linux-arm64-gnu",
"win32-x64": "postagent-win32-x64",
};

function resolvePackageDir(packageName) {
Expand All @@ -34,9 +35,14 @@ function main() {
const packageDir = resolvePackageDir(packageName);
if (!packageDir) return;

const binaryPath = path.join(packageDir, "bin", "postagent-core");
const binaryName = process.platform === "win32" ? "postagent-core.exe" : "postagent-core";
const binaryPath = path.join(packageDir, "bin", binaryName);
if (fs.existsSync(binaryPath)) {
fs.chmodSync(binaryPath, 0o755);
try {
fs.chmodSync(binaryPath, 0o755);
} catch {
// chmod is a no-op on Windows; ignore the error
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/postagent/src/bin-resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const PLATFORM_PACKAGES: Record<string, string> = {
"darwin-x64": "postagent-darwin-x64",
"linux-x64": "postagent-linux-x64-gnu",
"linux-arm64": "postagent-linux-arm64-gnu",
"win32-x64": "postagent-win32-x64",
};

const require = createRequire(import.meta.url);
Expand Down Expand Up @@ -48,7 +49,7 @@ export function resolveBinary(): string {
process.exit(1);
}

const binaryName = "postagent-core";
const binaryName = process.platform === "win32" ? "postagent-core.exe" : "postagent-core";
const packageDir = resolvePackageDir(packageName);

if (!packageDir) {
Expand Down