Skip to content

Commit 1cd34d3

Browse files
MajorTalclaude
andcommitted
docs(publish skill): drop @run402/functions from the four-pack
@run402/functions source moved to the private gateway monorepo (kychee-com/run402-private at packages/functions/) so it can co-evolve with the gateway code that bundles it. The npm package on the registry stays unchanged — only the source of truth and publish location moved. The /publish skill in this repo now publishes three packages: - run402-mcp (root) - run402 (cli/) - @run402/sdk (sdk/) For @run402/functions, run /publish-functions in the private repo (or cd packages/functions && npm publish from there). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ddea54a commit 1cd34d3

1 file changed

Lines changed: 12 additions & 29 deletions

File tree

.claude/commands/publish.md

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
Publish the four npm packages in this monorepo (`run402-mcp`, `run402` CLI, `@run402/sdk`, `@run402/functions`). Run each step in order, stopping on any failure.
1+
Publish the three npm packages in this monorepo (`run402-mcp`, `run402` CLI, `@run402/sdk`). Run each step in order, stopping on any failure.
22

3-
**Default behavior is lockstep** — all four packages bumped to the same version. The skill prompts you in the version-bump step if you want to bump only a subset.
3+
> **`@run402/functions` is no longer published from this repo.** Its source moved to the private gateway monorepo (`kychee-com/run402-private` at `packages/functions/`) so it can co-evolve with the gateway code that calls it. Publish that package from there. Run `/publish-functions` in the private repo, or `cd packages/functions && npm publish`.
4+
5+
**Default behavior is lockstep** — all three packages bumped to the same version. The skill prompts you in the version-bump step if you want to bump only a subset.
46

57
## Pre-publish checks
68

@@ -13,22 +15,21 @@ Publish the four npm packages in this monorepo (`run402-mcp`, `run402` CLI, `@ru
1315

1416
**Step 1 — pick the bump kind.** Ask the user: patch, minor, or major.
1517

16-
**Step 2 — pick which packages.** Ask the user: *"Bump which packages? [all | comma-separated subset of mcp,cli,sdk,functions]"* — default `all`.
18+
**Step 2 — pick which packages.** Ask the user: *"Bump which packages? [all | comma-separated subset of mcp,cli,sdk]"* — default `all`.
1719

18-
- `all` → lockstep release. All four packages bumped to the same new version. This is the recommended default; "Run402 v1.46.0" should mean one thing.
19-
- Comma-separated subset (e.g., `functions` or `mcp,cli`) → selective release. Only the listed packages are bumped and published; the others retain their current published versions. The selected set is brought back into sync at the chosen target version.
20-
- Reject any tokens not in `mcp,cli,sdk,functions,all`.
20+
- `all` → lockstep release. All three packages bumped to the same new version. This is the recommended default; "Run402 v1.46.0" should mean one thing.
21+
- Comma-separated subset (e.g., `mcp,cli`) → selective release. Only the listed packages are bumped and published; the others retain their current published versions. The selected set is brought back into sync at the chosen target version.
22+
- Reject any tokens not in `mcp,cli,sdk,all`. If the user asks for `functions`, redirect: "That package is now published from the private repo (`kychee-com/run402-private`). Run `/publish-functions` there."
2123

2224
**Step 3 — compute the target version.** Read the *highest* current version across the selected packages (in case they've diverged), apply the bump kind, get one target version. Apply that exact target version to every selected package.
2325

24-
The four packages and their `package.json` files:
26+
The three packages and their `package.json` files:
2527

2628
| ID | npm name | path |
2729
|---|---|---|
2830
| `mcp` | `run402-mcp` | `package.json` (root) |
2931
| `cli` | `run402` | `cli/package.json` |
3032
| `sdk` | `@run402/sdk` | `sdk/package.json` |
31-
| `functions` | `@run402/functions` | `functions/package.json` |
3233

3334
**Step 4 — apply the bumps.**
3435

@@ -54,14 +55,13 @@ For lockstep (`all`), the commit message is `chore: bump version to v<target>`.
5455

5556
Run these in sequence. If any check fails, stop and fix the root cause. Do **not** `npm publish`.
5657

57-
Pack the four tarballs (skip any package not in the selected set):
58+
Pack the three tarballs (skip any package not in the selected set):
5859

5960
```
6061
SMOKE=/tmp/smoke-<new_version> && rm -rf $SMOKE && mkdir $SMOKE
6162
npm pack --pack-destination $SMOKE # mcp
6263
(cd cli && npm pack --pack-destination $SMOKE) # cli
6364
(cd sdk && npm pack --pack-destination $SMOKE) # sdk
64-
(cd functions && npm pack --pack-destination $SMOKE) # functions
6565
```
6666

6767
1. **CLI** — extract, install, check `--version`:
@@ -87,12 +87,6 @@ npm pack --pack-destination $SMOKE # mcp
8787
(cd $SMOKE/sdk/package && node -e "import('./dist/index.js').then(m => console.log('OK iso', typeof m.Run402)).catch(e => { console.error('FAIL', e.message); process.exit(1) })")
8888
```
8989

90-
4. **Functions** (`@run402/functions`) — run the dedicated tarball smoke script. It builds, packs in its own scratch, installs, exports-checks, exercises `getUser()` end-to-end with a signed JWT, and verifies the deprecated `run402-functions` import path is NOT resolvable:
91-
```
92-
node functions/test/smoke-tarball.mjs
93-
```
94-
Expect `✓ All smoke checks passed`. The script exits non-zero on any failure. **This catches the jsonwebtoken bundling regression class** (e.g., if `auth.ts` reverts to `createRequire`, or if `jsonwebtoken` is dropped from runtime deps).
95-
9690
## Publish
9791

9892
Skip any step whose package was NOT in the selected set from the version-bump prompt.
@@ -114,19 +108,9 @@ Skip any step whose package was NOT in the selected set from the version-bump pr
114108
```
115109
The SDK's `prepack` script copies `core/dist/*.js` and `core/dist/*.d.ts` into `core-dist/` so the published tarball is self-contained. The SDK ships two entry points: `@run402/sdk` (isomorphic — works in Node, Deno, Bun, V8 isolates) and `@run402/sdk/node` (Node defaults: keystore + allowance + x402-wrapped fetch).
116110

117-
4. **Functions** (`@run402/functions`):
118-
```
119-
cd functions && npm publish
120-
```
121-
The package has `publishConfig.access: public` set in `package.json`, so no `--access public` flag is needed. The published tarball contains `dist/` only (the source tests are excluded via the `files` allowlist).
122-
123-
5. **First-time deprecation of `run402-functions`** — IF this is the first `@run402/functions` release (i.e., before this run, the previously-published `run402-functions` package was the canonical name), run:
124-
```
125-
npm deprecate run402-functions@"*" "renamed to @run402/functions; install @run402/functions instead"
126-
```
127-
This step is idempotent — safe to re-run on subsequent publishes. Verify with `npm view run402-functions deprecated` showing the message.
111+
4. **OpenClaw skill**: No registry publish needed. The OpenClaw skill is distributed as a directory copy and uses `run402-mcp` via npx. Confirm to the user that OpenClaw is automatically up to date since its SKILL.md `install` field points to the `run402-mcp` npm package.
128112

129-
6. **OpenClaw skill**: No registry publish needed. The OpenClaw skill is distributed as a directory copy and uses `run402-mcp` via npx. Confirm to the user that OpenClaw is automatically up to date since its SKILL.md `install` field points to the `run402-mcp` npm package.
113+
5. **`@run402/functions` is NOT published here.** Skip it. That package ships from `kychee-com/run402-private` at `packages/functions/`. The gateway and the in-function helpers live in the same monorepo there so they can be tested together. Run `/publish-functions` in the private repo when you need to ship a new `@run402/functions` version. The npm package on the registry stays at the same name — only the source of truth moved.
130114

131115
## Post-publish
132116

@@ -156,7 +140,6 @@ Skip any step whose package was NOT in the selected set from the version-bump pr
156140
- https://www.npmjs.com/package/run402-mcp
157141
- https://www.npmjs.com/package/run402
158142
- https://www.npmjs.com/package/@run402/sdk
159-
- https://www.npmjs.com/package/@run402/functions
160143

161144
## Twitter summary
162145

0 commit comments

Comments
 (0)