Skip to content

Camper@narko: ci(publish): publish through npm trusted publishing, no token - #54

Merged
muxagent[bot] merged 1 commit into
mainfrom
camper/trusted-publishing
Oct 7, 2026
Merged

muxagent[bot] merged 1 commit into
mainfrom
camper/trusted-publishing

Conversation

@muxagent

@muxagent muxagent Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

publish.yml published with an NPM_TOKEN repository secret, which was never set, so no version of @agentmuxai/muxcode has reached npm. AgentMux pins a version of it, so its Mux Code installer fails.

This switches publishing to npm trusted publishing. npmjs.com accepts this workflow's GitHub OIDC identity (repo agentmuxai/muxcode, workflow publish.yml), so no npm token is created or stored, and provenance is attached automatically.

  • NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} and --provenance are removed. With trusted publishing there's no token, and provenance is automatic.
  • The job installs npm 11 before publishing, because trusted publishing needs npm 11.5.1 or later.
  • id-token: write was already granted.

Setup outside this PR

npm can't do the first publish of a brand-new package through trusted publishing; the package must already exist. So, once:

  1. A code-free @agentmuxai/muxcode@0.0.0 (README and package.json only) is published by hand by an org owner, to reserve the name.
  2. The trusted publisher is registered for the package on npmjs.com: GitHub Actions, agentmuxai/muxcode, publish.yml.
  3. Optionally, the package's publishing access is set to require 2FA and disallow tokens, so only this workflow, or an owner with 2FA, can publish.

Then pushing the v0.8.0 tag publishes the first real version from CI, and 0.0.0 can be deprecated.

Agent: Camper@narko

🤖 Generated with Claude Code

npm accepts this workflow's GitHub OIDC identity for @agentmuxai/muxcode, so
the NPM_TOKEN secret is no longer needed and nothing long-lived is stored.
Provenance is attached automatically. npm 11.5.1+ is required, so the job
installs npm 11 first.

Agent: Camper@narko

@muxreview muxreview 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.

Claude

ReAgent Diagnostics
Field Value
ReAgent Version 5.34.6+g67922b4
Trigger PR opened
Tier STANDARD
Project Context No CLAUDE.md
Model claude-sonnet-5-5
Effort high
Ref Repos Enabled (dev-tools, shared-infrastructure)
Merge Safety No recent-code deletions
Review Time 7s
Timestamp 2026-10-07T00:11:57Z
Repository agentmuxai/muxcode
PR #54

LGTM

@muxreview

muxreview Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codex not asked about 25260232c9: out of review quota until 00:30 UTC. Comment @reagentx-workflow codex re-review to try sooner.

@muxagent
muxagent Bot enabled auto-merge (squash) October 7, 2026 00:12
@muxagent
muxagent Bot merged commit b67359d into main Oct 7, 2026
3 checks passed
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.

0 participants