Skip to content

Commit 609bb38

Browse files
Nick Ficanoclaude
andcommitted
chore: release v1.0.0; publish middleware to npm + mirror to GitHub Packages
The publish workflow's `find -maxdepth 2` silently skipped the middleware packages (which live at `packages/middleware/<name>/package.json`, depth 3), so @agentruntimecontrolprotocol/node, /express, /fastify, /hono, /bun, and /middleware-otel were never reaching npm. Bumped to depth 3 and added a parallel publish step that mirrors every workspace package to GitHub Packages (registry npm.pkg.github.com) using the built-in GITHUB_TOKEN with packages:write. Graduates the workspace to v1.0.0: peerDependency cascade under the `linked` group escalates the requested minor across the graph, which is the deliberate signal we want for the first full release that includes the middleware family. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e5a9a24 commit 609bb38

23 files changed

Lines changed: 223 additions & 38 deletions

.github/workflows/publish.yml

Lines changed: 75 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Publishes all @agentruntimecontrolprotocol/* workspace packages to npm after the `test` workflow
2-
# succeeds on main, skipping any package whose local version is already on the
3-
# registry. The workspace root (package.json `"private": true`) is never
4-
# published.
1+
# Publishes all @agentruntimecontrolprotocol/* workspace packages to npm and
2+
# GitHub Packages after the `test` workflow succeeds on main, skipping any
3+
# package whose local version is already on the target registry. The workspace
4+
# root (package.json `"private": true`) is never published.
55
#
66
# Required repo configuration:
77
# - Secret: NPM_TOKEN (npm automation token with publish rights to the
88
# @agentruntimecontrolprotocol scope — create at npmjs.com → Access Tokens → Automation)
9-
# - Settings > Actions > General > Workflow permissions: "Read and write"
10-
# is NOT required; this workflow only needs id-token:write (set below)
11-
# for npm provenance.
9+
# - The built-in GITHUB_TOKEN is used for GitHub Packages; the job grants
10+
# `packages: write` below.
11+
# - `id-token: write` is required for npm provenance (sigstore OIDC).
1212

1313
name: publish
1414

@@ -25,7 +25,7 @@ concurrency:
2525

2626
jobs:
2727
publish:
28-
name: publish to npm
28+
name: publish to npm + GitHub Packages
2929
runs-on: ubuntu-latest
3030
# Only run if the test workflow succeeded (or this was manually dispatched).
3131
if: >
@@ -35,6 +35,7 @@ jobs:
3535
permissions:
3636
contents: read
3737
id-token: write # required for npm provenance
38+
packages: write # required for GitHub Packages publish
3839

3940
steps:
4041
- name: Checkout
@@ -51,58 +52,105 @@ jobs:
5152
version: 9.15.0
5253
run_install: false
5354

54-
- name: Setup Node.js
55+
- name: Setup Node.js (npm registry)
5556
uses: actions/setup-node@v6
5657
with:
5758
node-version: "22"
5859
cache: "pnpm"
5960
registry-url: "https://registry.npmjs.org"
61+
scope: "@agentruntimecontrolprotocol"
6062

6163
- name: Install dependencies
6264
run: pnpm install --frozen-lockfile
6365

6466
- name: Build
6567
run: pnpm run build
6668

67-
- name: Publish workspace packages
68-
env:
69-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
69+
- name: Collect publishable packages
70+
id: collect
7071
run: |
7172
set -euo pipefail
72-
73-
# Collect every publishable (non-private) package directory by
74-
# scanning packages/ and packages/middleware/*.
75-
mapfile -t PACKAGE_DIRS < <(
76-
find packages -maxdepth 2 -name "package.json" \
73+
# Walk packages/ to depth 3 so packages/middleware/<name>/package.json
74+
# is included alongside packages/<name>/package.json.
75+
{
76+
find packages -maxdepth 3 -name "package.json" \
7777
-not -path "*/node_modules/*" \
78+
-not -path "*/dist/*" \
7879
| while IFS= read -r manifest; do
7980
dir=$(dirname "$manifest")
8081
private=$(node -p "require('./$manifest').private || false")
8182
[ "$private" = "false" ] && echo "$dir"
8283
done
83-
)
84+
} > .publish-dirs.txt
85+
echo "Packages to consider:"
86+
cat .publish-dirs.txt
8487
85-
published_count=0
86-
skipped_count=0
88+
- name: Publish to npm
89+
env:
90+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
91+
run: |
92+
set -euo pipefail
8793
88-
for dir in "${PACKAGE_DIRS[@]}"; do
94+
published=0
95+
skipped=0
96+
97+
while IFS= read -r dir; do
98+
[ -z "$dir" ] && continue
8999
name=$(node -p "require('./$dir/package.json').name")
90100
local_ver=$(node -p "require('./$dir/package.json').version")
91101
# npm view exits non-zero if the package was never published.
92-
npm_ver=$(npm view "$name" version 2>/dev/null || echo "")
102+
npm_ver=$(npm view "$name" version --registry=https://registry.npmjs.org 2>/dev/null || echo "")
93103
94104
if [ "$local_ver" = "$npm_ver" ]; then
95105
echo " [skip] $name@$local_ver — already on npm"
96-
skipped_count=$((skipped_count + 1))
106+
skipped=$((skipped + 1))
97107
else
98108
echo "[publish] $name@$local_ver (npm has '${npm_ver:-nothing}')"
99109
# publishConfig in each package.json carries access=public and
100110
# provenance=true; --provenance here is the CLI counterpart that
101111
# activates the OIDC token flow in GitHub Actions.
102-
(cd "$dir" && npm publish --provenance)
103-
published_count=$((published_count + 1))
112+
(cd "$dir" && npm publish --provenance --registry=https://registry.npmjs.org)
113+
published=$((published + 1))
114+
fi
115+
done < .publish-dirs.txt
116+
117+
echo ""
118+
echo "npm — published: $published skipped: $skipped"
119+
120+
- name: Setup Node.js (GitHub Packages registry)
121+
uses: actions/setup-node@v6
122+
with:
123+
node-version: "22"
124+
registry-url: "https://npm.pkg.github.com"
125+
scope: "@agentruntimecontrolprotocol"
126+
127+
- name: Publish to GitHub Packages
128+
env:
129+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130+
# GitHub Packages doesn't participate in the sigstore provenance
131+
# flow; override the publishConfig.provenance=true set per-package.
132+
NPM_CONFIG_PROVENANCE: "false"
133+
run: |
134+
set -euo pipefail
135+
136+
published=0
137+
skipped=0
138+
139+
while IFS= read -r dir; do
140+
[ -z "$dir" ] && continue
141+
name=$(node -p "require('./$dir/package.json').name")
142+
local_ver=$(node -p "require('./$dir/package.json').version")
143+
gh_ver=$(npm view "$name" version --registry=https://npm.pkg.github.com 2>/dev/null || echo "")
144+
145+
if [ "$local_ver" = "$gh_ver" ]; then
146+
echo " [skip] $name@$local_ver — already on GitHub Packages"
147+
skipped=$((skipped + 1))
148+
else
149+
echo "[publish] $name@$local_ver (GitHub Packages has '${gh_ver:-nothing}')"
150+
(cd "$dir" && npm publish --registry=https://npm.pkg.github.com)
151+
published=$((published + 1))
104152
fi
105-
done
153+
done < .publish-dirs.txt
106154
107155
echo ""
108-
echo "Done — published: $published_count skipped: $skipped_count"
156+
echo "GitHub Packages — published: $published skipped: $skipped"

examples/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# @agentruntimecontrolprotocol/examples
2+
3+
## 0.0.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- @agentruntimecontrolprotocol/sdk@1.0.0
9+
- @agentruntimecontrolprotocol/express@1.0.0
10+
- @agentruntimecontrolprotocol/fastify@1.0.0
11+
- @agentruntimecontrolprotocol/bun@1.0.0
12+
- @agentruntimecontrolprotocol/middleware-otel@1.0.0

examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agentruntimecontrolprotocol/examples",
3-
"version": "0.0.0",
3+
"version": "0.0.1",
44
"private": true,
55
"description": "Runnable examples for the ARCP TypeScript SDK. Not published.",
66
"type": "module",

packages/client/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# @agentruntimecontrolprotocol/client
2+
3+
## 1.0.0
4+
5+
### Minor Changes
6+
7+
- Publish the middleware packages (`@agentruntimecontrolprotocol/node`, `/express`, `/fastify`, `/hono`, `/bun`, `/middleware-otel`) to npm for the first time, and start mirroring every published package to GitHub Packages alongside npm. The publish workflow now walks `packages/middleware/*` so middleware manifests are no longer silently skipped.
8+
9+
### Patch Changes
10+
11+
- Updated dependencies
12+
- @agentruntimecontrolprotocol/core@1.0.0

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agentruntimecontrolprotocol/client",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"description": "Client implementation of the Agent Runtime Control Protocol (ARCP). Install alongside a transport from @agentruntimecontrolprotocol/core to talk to an @agentruntimecontrolprotocol/runtime server.",
55
"license": "Apache-2.0",
66
"repository": {

packages/core/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# @agentruntimecontrolprotocol/core
2+
3+
## 1.0.0
4+
5+
### Minor Changes
6+
7+
- Publish the middleware packages (`@agentruntimecontrolprotocol/node`, `/express`, `/fastify`, `/hono`, `/bun`, `/middleware-otel`) to npm for the first time, and start mirroring every published package to GitHub Packages alongside npm. The publish workflow now walks `packages/middleware/*` so middleware manifests are no longer silently skipped.

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agentruntimecontrolprotocol/core",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"description": "Shared primitives for the Agent Runtime Control Protocol (ARCP): envelope, errors, messages, transports, store, auth, and session state. Used by @agentruntimecontrolprotocol/client and @agentruntimecontrolprotocol/runtime.",
55
"license": "Apache-2.0",
66
"repository": {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# @agentruntimecontrolprotocol/bun
2+
3+
## 1.0.0
4+
5+
### Minor Changes
6+
7+
- Publish the middleware packages (`@agentruntimecontrolprotocol/node`, `/express`, `/fastify`, `/hono`, `/bun`, `/middleware-otel`) to npm for the first time, and start mirroring every published package to GitHub Packages alongside npm. The publish workflow now walks `packages/middleware/*` so middleware manifests are no longer silently skipped.
8+
9+
### Patch Changes
10+
11+
- Updated dependencies
12+
- @agentruntimecontrolprotocol/core@1.0.0
13+
- @agentruntimecontrolprotocol/runtime@1.0.0

packages/middleware/bun/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@agentruntimecontrolprotocol/bun",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"description": "Bun runtime helpers for the Agent Runtime Control Protocol (ARCP). Uses Bun's native WebSocket server (Bun.serve) to terminate ARCP connections; no external dependency on `ws`.",
55
"license": "Apache-2.0",
66
"repository": {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# @agentruntimecontrolprotocol/express
2+
3+
## 1.0.0
4+
5+
### Minor Changes
6+
7+
- Publish the middleware packages (`@agentruntimecontrolprotocol/node`, `/express`, `/fastify`, `/hono`, `/bun`, `/middleware-otel`) to npm for the first time, and start mirroring every published package to GitHub Packages alongside npm. The publish workflow now walks `packages/middleware/*` so middleware manifests are no longer silently skipped.
8+
9+
### Patch Changes
10+
11+
- Updated dependencies
12+
- @agentruntimecontrolprotocol/core@1.0.0
13+
- @agentruntimecontrolprotocol/runtime@1.0.0
14+
- @agentruntimecontrolprotocol/node@1.0.0

0 commit comments

Comments
 (0)