Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/release-process-daemon.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Process daemon release

# Publishes the opencode-pty binaries and the @opencode-ai/pty npm packages from packages/process-daemon.
# Publishes the opencode-pty binaries and the @opencode/pty npm packages from packages/process-daemon.
# Only process-daemon-v<version> tags publish; pull requests that touch the release pipeline build and pack
# without publishing.

Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1 ||
gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --draft --verify-tag --latest=false \
--title "process-daemon v$version" \
--notes "opencode-pty $version (protocol $PROTOCOL_VERSION) from packages/process-daemon, published to npm as @opencode-ai/pty@$version."
--notes "opencode-pty $version (protocol $PROTOCOL_VERSION) from packages/process-daemon, published to npm as @opencode/pty@$version."
gh release upload "$GITHUB_REF_NAME" dist/*.tar.gz dist/SHA256SUMS dist/release-manifest.json --clobber --repo "$GITHUB_REPOSITORY"
gh release edit "$GITHUB_REF_NAME" --draft=false --latest=false --repo "$GITHUB_REPOSITORY"
- name: Publish npm packages
Expand All @@ -314,7 +314,7 @@ jobs:
npm publish "$package" --access public --provenance
fi
done
name="@opencode-ai/pty"
name="@opencode/pty"
if ! npm view "$name@$version" version >/dev/null 2>&1; then
npm publish dist/npm/opencode-pty --access public --provenance
fi
2 changes: 1 addition & 1 deletion packages/process-daemon/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/process-daemon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opencode-pty"
version = "0.3.1"
version = "0.3.2"
edition = "2024"
rust-version = "1.90"
description = "Persistent PTY service for OpenCode"
Expand Down
9 changes: 5 additions & 4 deletions packages/process-daemon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,19 +382,20 @@ instruction-set extensions from CI runners (Windows builds set
`OPENCODE_ZIG_CPU=baseline`, since the Unix Zig wrapper is a shell script).
Linux GNU artifacts support glibc 2.30 and newer.

Tagged releases also publish `@opencode-ai/pty` to npm with optional,
Tagged releases also publish `@opencode/pty` to npm with optional,
platform-specific binary packages. Installing the npm package selects the native
binary for the current platform (`opencode-pty.exe` on Windows) and exposes
its path as `binaryPath`:

```js
import { binaryPath } from "@opencode-ai/pty"
import { binaryPath } from "@opencode/pty"
```

npm publishing uses trusted publishing with provenance. Each of the nine
packages (`@opencode-ai/pty` and the eight `@opencode-ai/pty-<platform>`
packages (`@opencode/pty` and the eight `@opencode/pty-<platform>`
packages) must list anomalyco/opencode with workflow
`release-process-daemon.yml` as its trusted publisher.
`release-process-daemon.yml` as its trusted publisher, with no environment
(the release job does not use one).

Pull requests that change the release pipeline run the same build and npm
packing without publishing anything.
Expand Down
2 changes: 1 addition & 1 deletion packages/process-daemon/npm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const suffix = [process.platform, arch, libc].filter(Boolean).join("-")
export const binaryPath =
supported && arch
? path.join(
path.dirname(require.resolve(`@opencode-ai/pty-${suffix}/package.json`)),
path.dirname(require.resolve(`@opencode/pty-${suffix}/package.json`)),
"bin",
process.platform === "win32" ? "opencode-pty.exe" : "opencode-pty",
)
Expand Down
20 changes: 10 additions & 10 deletions packages/process-daemon/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opencode-ai/pty",
"version": "0.3.1",
"name": "@opencode/pty",
"version": "0.3.2",
"description": "Persistent PTY service for OpenCode",
"type": "module",
"license": "MIT",
Expand All @@ -25,14 +25,14 @@
"index.js"
],
"optionalDependencies": {
"@opencode-ai/pty-darwin-arm64": "0.3.1",
"@opencode-ai/pty-darwin-x64": "0.3.1",
"@opencode-ai/pty-linux-arm64-gnu": "0.3.1",
"@opencode-ai/pty-linux-arm64-musl": "0.3.1",
"@opencode-ai/pty-linux-x64-gnu": "0.3.1",
"@opencode-ai/pty-linux-x64-musl": "0.3.1",
"@opencode-ai/pty-win32-arm64": "0.3.1",
"@opencode-ai/pty-win32-x64": "0.3.1"
"@opencode/pty-darwin-arm64": "0.3.2",
"@opencode/pty-darwin-x64": "0.3.2",
"@opencode/pty-linux-arm64-gnu": "0.3.2",
"@opencode/pty-linux-arm64-musl": "0.3.2",
"@opencode/pty-linux-x64-gnu": "0.3.2",
"@opencode/pty-linux-x64-musl": "0.3.2",
"@opencode/pty-win32-arm64": "0.3.2",
"@opencode/pty-win32-x64": "0.3.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/process-daemon/script/npm-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ await mkdir(output, { recursive: true })

for (const target of targets) {
const suffix = [target.platform, target.arch, target.suffix].filter(Boolean).join("-")
const name = `@opencode-ai/pty-${suffix}`
const name = `@opencode/pty-${suffix}`
const directory = path.join(output, `opencode-pty-${suffix}`)
const archive = path.join(dist, `opencode-pty-${manifest.version}-${target.target}.tar.gz`)
const binary = target.platform === "win32" ? "opencode-pty.exe" : "opencode-pty"
Expand Down
Loading