Skip to content

chore(process-daemon): release 0.3.2 under the @opencode scope - #59879

Merged
jlongster merged 1 commit into
devfrom
process-daemon-0-3-2
Oct 28, 2026
Merged

jlongster merged 1 commit into
devfrom
process-daemon-0-3-2

Conversation

@jlongster

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Prepares the first process-daemon release under the @opencode npm scope.

  • Bumps opencode-pty from 0.3.1 to 0.3.2 in Cargo.toml, Cargo.lock (only the opencode-pty entry), and npm/package.json (version and all 8 optionalDependencies).
  • Renames the npm scope from @opencode-ai to @opencode everywhere in the publishing flow:
    • The dispatcher's name and optionalDependencies keys in npm/package.json.
    • The platform package lookup in npm/index.js. The dispatcher resolves @opencode/pty-<platform> at runtime, so the scope here has to match the published names.
    • Platform package names in script/npm-packages.mjs.
    • The final name="@opencode/pty" publish check, the release notes, and the header comment in release-process-daemon.yml.
    • The release/npm section of the package README. It also now says the trusted publisher must be configured with no environment, because the release job doesn't use one.
  • The crate, binary, env vars, and runtime paths are unchanged. git grep "@opencode-ai/pty" -- packages/process-daemon .github now returns nothing.

Consumers are not switched yet. core, server, and cli keep @opencode-ai/pty@0.3.1 until @opencode/pty@0.3.2 is on npm. A follow-up PR will update these references:

  • packages/core/package.json:108, packages/server/package.json:40, packages/cli/package.json:34
  • packages/core/src/persistent-pty/pty-binding.ts:2
  • packages/server/test/persistent-pty.test.ts:6
  • packages/cli/script/opencode-pty.ts:19,29
  • packages/cli/script/build.ts:74
  • bunfig.toml:5 (minimumReleaseAgeExcludes: the dispatcher and 8 platform names)
  • bun.lock (regenerate)

Publishing auth findings

  • The main release.yml publish-npm job publishes everything under @opencode/* (@opencode/cli*, @opencode/sdk, @opencode/core, ...) via .github/release/publish-npm.sh. It uses npm trusted publishing (OIDC): id-token: write, npm publish --provenance, and environment: release. No workflow references NPM_TOKEN or NODE_AUTH_TOKEN; the latest @opencode/sdk was published by GitHub Actions <npm-oidc-no-reply@github.com>.
  • All 9 @opencode/pty* packages already exist on npm as placeholders (0.0.0 and 0.0.0-stage, latest = 0.0.0, maintainer thdxr). They were created on 2026-10-27. So the "trusted publishing needs an existing package" problem doesn't apply: trusted publishers can be configured on them right now.
  • Recommendation: keep trusted publishing as-is and don't add a token. The workflow already has id-token: write, installs npm ≥ 11.5.1, and publishes with --provenance. The only remaining work is npm-side configuration (below).

Maintainer steps

Before tagging:

  1. On npmjs.com, add a trusted publisher to each of the 9 packages: @opencode/pty and @opencode/pty-{darwin-arm64,darwin-x64,linux-arm64-gnu,linux-arm64-musl,linux-x64-gnu,linux-x64-musl,win32-arm64,win32-x64}. Use GitHub Actions, repo anomalyco/opencode, workflow release-process-daemon.yml, and leave the environment blank. The release job has no environment:, unlike release.yml.
  2. Optional: add a tag ruleset for process-daemon-v* limiting who can create those tags.
  3. Merge this PR.

Tagging:

git tag process-daemon-v0.3.2 <merge commit> && git push origin process-daemon-v0.3.2

After the release:

  1. Check that npm view @opencode/pty@0.3.2 and the platform packages exist with provenance. Publishing 0.3.2 moves latest off the 0.0.0 placeholder.
  2. Open the consumer switch PR listed above.
  3. Deprecate the old packages, for example:
    npm deprecate "@opencode-ai/pty" "Moved to @opencode/pty"
    for p in darwin-arm64 darwin-x64 linux-arm64-gnu linux-arm64-musl linux-x64-gnu linux-x64-musl win32-arm64 win32-x64; do
      npm deprecate "@opencode-ai/pty-$p" "Moved to @opencode/pty-$p"
    done
    Do this only after the consumers have switched, so OpenCode's own installs don't print deprecation warnings.

How did you verify your code works?

  • cargo fmt --check: passes. cargo clippy --locked --all-targets --all-features -- -D warnings: passes.
  • cargo run --locked -- --version prints opencode-pty 0.3.2 (protocol 7), which matches the workflow smoke test.
  • node --check passes on npm/index.js, npm/bin/opencode-pty.js, and script/npm-packages.mjs, and npm/package.json parses as JSON.
  • Ran script/npm-packages.mjs against archives for all 8 targets: the real local binary for darwin-arm64 and dummy binaries for the rest. All generated names are @opencode/pty-* at 0.3.2 and exactly match the dispatcher's optionalDependencies keys. The versions agree, and os/cpu/libc are correct.
  • npm pack --dry-run succeeds on all 9 generated packages.
  • Packed the dispatcher and darwin-arm64 packages and installed them into a temp dir. node_modules/.bin/opencode-pty --version prints opencode-pty 0.3.2 (protocol 7). import { binaryPath } from "@opencode/pty" resolves to an existing @opencode/pty-darwin-arm64/bin/opencode-pty.
  • The workflow YAML parses.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@jlongster
jlongster requested a review from a team October 28, 2026 11:00

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I ran script/npm-packages.mjs on dummy archives for all 8 targets. Every generated package is @opencode/pty* at 0.3.2 and matches the dispatcher's optionalDependencies. I then packed and installed the dispatcher with linux-x64-gnu, as the workflow's validation step does: opencode-pty --version and binaryPath both resolve through the new scope. Nothing under packages/process-daemon or .github still mentions @opencode-ai/pty.

Public API: the published package names change from @opencode-ai/pty and @opencode-ai/pty-<platform> to @opencode/pty and @opencode/pty-<platform>, starting at 0.3.2. The existing @opencode-ai/pty@0.3.1 packages stay on npm, so current consumers keep working until the follow-up switch. The binaryPath export, binary name, env vars and runtime paths are unchanged.

No blocking concerns.

@jlongster
jlongster merged commit 4d33928 into dev Oct 28, 2026
28 of 29 checks passed
@jlongster
jlongster deleted the process-daemon-0-3-2 branch October 28, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants