release-core-test

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Release Core (Test)

发布核心包(测试版)

Publish ONLY the
cyrus-core
package (and
claude-runner
if needed) as a dev/test prerelease to npm under the
test
dist-tag. This is a developer convenience for iterating on
cyrus-core
without going through the full release flow.
仅将
cyrus-core
包(必要时包含
claude-runner
)作为开发/测试预发布版本发布到npm的
test
dist-tag下。这是为了方便开发者迭代
cyrus-core
而无需走完整发布流程的便捷操作。

What this skill does NOT do

此技能不包含的操作

This skill is intentionally minimal. It does NOT:
  • Update
    CHANGELOG.md
    or
    CHANGELOG.internal.md
  • Create a git tag
  • Create a GitHub release
  • Move any Linear issues
  • Open a pull request
  • Commit the version bump (the bumped
    package.json
    is left as a local working-tree change)
It also does NOT publish any other workspace package (no
edge-worker
, no
cyrus
CLI, no
linear-event-transport
, etc.). The only exception is
claude-runner
, which is republished if and only if its
workspace:*
reference would otherwise resolve to an unpublished version (see step 3 below).
本技能刻意设计得极简,它不会
  • 更新
    CHANGELOG.md
    CHANGELOG.internal.md
  • 创建git标签
  • 创建GitHub发布版本
  • 移动任何Linear工单
  • 发起拉取请求
  • 提交版本更新(更新后的
    package.json
    仅保留为本地工作区变更)
它也不会发布任何其他工作区包(不包括
edge-worker
cyrus
CLI、
linear-event-transport
等)。唯一的例外是
claude-runner
,只有当它的
workspace:*
引用指向未发布版本时,才会重新发布(见下方步骤3)。

Workflow

工作流程

1. Install dependencies from repo root

1. 从仓库根目录安装依赖

bash
pnpm install
bash
pnpm install

2. Build all packages from repo root

2. 从仓库根目录构建所有包

bash
pnpm build
Building all packages ensures
workspace:*
dependencies are resolved before publishing.
bash
pnpm build
构建所有包可确保在发布前解析
workspace:*
依赖。

3. Determine whether
claude-runner
needs republishing

3. 判断是否需要重新发布
claude-runner

cyrus-core
depends on
claude-runner
via
workspace:*
. When
cyrus-core
is published, that
workspace:*
is rewritten to the version currently in
packages/claude-runner/package.json
. If that version isn't actually on npm yet (because
claude-runner
has local changes since its last publish), consumers installing
cyrus-core@test
will fail to resolve the dependency.
Run both of these deterministic checks:
bash
undefined
cyrus-core
通过
workspace:*
依赖于
claude-runner
。当发布
cyrus-core
时,
workspace:*
会被重写为
packages/claude-runner/package.json
中的当前版本。如果该版本尚未发布到npm(因为
claude-runner
自上次发布后有本地变更),那么安装
cyrus-core@test
的用户将无法解析该依赖。
运行以下两个确定性检查:
bash
undefined

(a) Is the local claude-runner version already on npm?

(a) 本地claude-runner版本是否已在npm上?

LOCAL_CR=$(node -p "require('./packages/claude-runner/package.json').version") npm view "cyrus-claude-runner@${LOCAL_CR}" version 2>/dev/null
LOCAL_CR=$(node -p "require('./packages/claude-runner/package.json').version") npm view "cyrus-claude-runner@${LOCAL_CR}" version 2>/dev/null

(b) Does claude-runner have uncommitted/unpushed source changes since its last publish?

(b) claude-runner自上次发布后是否有未提交/未推送的源码变更?

git diff --quiet HEAD -- packages/claude-runner/src packages/claude-runner/package.json && echo "clean" || echo "dirty"

Republish `claude-runner` if **either**: (a) returns nothing (local version is not on npm), **or** (b) prints `dirty`. If both pass cleanly, skip this step. If you're unsure, ask the user.

To republish:

```bash
git diff --quiet HEAD -- packages/claude-runner/src packages/claude-runner/package.json && echo "clean" || echo "dirty"

如果以下任一情况成立,则重新发布`claude-runner`:(a) 无返回结果(本地版本未在npm上),**或** (b) 输出`dirty`。如果两项检查均通过,则跳过此步骤。若不确定,请询问用户。

重新发布步骤:

```bash

Determine the next -test.N for claude-runner (same algorithm as cyrus-core below)

确定claude-runner的下一个-test.N版本(与下方cyrus-core的算法相同)

Bump packages/claude-runner/package.json to e.g. 0.0.X-test.N

将packages/claude-runner/package.json更新为例如0.0.X-test.N

cd packages/claude-runner pnpm publish --access public --no-git-checks --tag test cd ../.. pnpm install # refresh lockfile so cyrus-core picks up the new claude-runner

Otherwise, skip this step entirely.
cd packages/claude-runner pnpm publish --access public --no-git-checks --tag test cd ../.. pnpm install # 更新锁文件,使cyrus-core获取新的claude-runner版本

否则,完全跳过此步骤。

4. Bump
cyrus-core
to the next
-test.N
prerelease version

4. 将
cyrus-core
升级到下一个
-test.N
预发布版本

Algorithm:
  1. Read the current version from
    packages/core/package.json
    (e.g.
    0.1.22
    ).
  2. Bump the patch (e.g.
    0.1.23
    ).
  3. Append
    -test.N
    , starting at
    N = 0
    and incrementing while
    <bumped>-test.N
    already exists on npm (including aborted/stale prior attempts).
Use this one-liner to find existing
-test.N
versions for the bumped patch and pick the next N:
bash
BUMPED=0.1.23   # the patch-bumped base, no suffix
npm view cyrus-core versions --json \
  | jq -r '.[]' \
  | grep -E "^${BUMPED}-test\.[0-9]+$" \
  | awk -F'test.' '{print $2}' \
  | sort -n | tail -1
算法:
  1. packages/core/package.json
    读取当前版本(例如
    0.1.22
    )。
  2. 升级补丁版本(例如
    0.1.23
    )。
  3. 追加
    -test.N
    ,从
    N = 0
    开始递增,直到
    <bumped>-test.N
    在npm上不存在(包括之前中止/失效的尝试)。
使用以下单行命令查找已存在的补丁升级后的
-test.N
版本并选择下一个N值:
bash
BUMPED=0.1.23   # 升级补丁后的基础版本,无后缀
npm view cyrus-core versions --json \
  | jq -r '.[]' \
  | grep -E "^${BUMPED}-test\.[0-9]+$" \
  | awk -F'test.' '{print $2}' \
  | sort -n | tail -1

If empty, use N=0. Otherwise use (max + 1).

如果无结果,使用N=0。否则使用(最大值 + 1)。


Write the chosen version (e.g. `0.1.23-test.0`) back into `packages/core/package.json`. Do NOT commit this change — leave it as a local working-tree edit so the developer can decide whether to keep it.

将选定的版本(例如`0.1.23-test.0`)写回`packages/core/package.json`。**不要**提交此变更——将其保留为本地工作区编辑,由开发者决定是否保留。

5. Publish
cyrus-core
with the
test
dist-tag

5. 以
test
dist-tag发布
cyrus-core

bash
cd packages/core
pnpm publish --access public --no-git-checks --tag test
cd ../..
Using
--tag test
means:
  • npm install cyrus-core@test
    will install this version.
  • The
    latest
    dist-tag is not moved, so production installs (
    npm install cyrus-core
    ) are unaffected.
bash
cd packages/core
pnpm publish --access public --no-git-checks --tag test
cd ../..
使用
--tag test
意味着:
  • npm install cyrus-core@test
    将安装此版本。
  • latest
    dist-tag不会被改动,因此生产环境安装(
    npm install cyrus-core
    )不受影响。

6. Verify the dist-tags landed correctly

6. 验证dist-tag是否正确设置

bash
npm view cyrus-core dist-tags
Confirm that
latest
is unchanged from before the publish and
test
now points to the version you just published. If
latest
moved, something is wrong — stop and investigate before telling anyone to install it.
bash
npm view cyrus-core dist-tags
确认
latest
与发布前保持一致,
test
现在指向你刚发布的版本。如果
latest
发生变动,说明出现问题——在告知他人安装前,请停止操作并排查问题。

7. Print install instructions

7. 打印安装说明

After publishing, print both forms so the developer can copy/paste:
Published cyrus-core@<version> under dist-tag `test`.

Install with:
  npm install cyrus-core@test
or pinned:
  npm install cyrus-core@<version>
If
claude-runner
was also republished in step 3, include its version too.
发布完成后,打印两种安装方式供开发者复制粘贴:
已将cyrus-core@<version>发布到dist-tag `test`下。

安装方式:
  npm install cyrus-core@test
或指定版本:
  npm install cyrus-core@<version>
如果步骤3中也重新发布了
claude-runner
,请同时包含其版本。

Key Notes

关键注意事项

  • Always use
    --no-git-checks
    so you can publish from a feature branch with a dirty working tree.
  • Always use
    --tag test
    so the
    latest
    dist-tag is preserved for real releases.
  • Prerelease versions (anything with a
    -
    suffix like
    -test.0
    ) are never auto-installed by
    npm install cyrus-core
    without an explicit tag or version spec, so this is safe to run repeatedly.
  • Run
    pnpm install
    after publishing
    claude-runner
    (if applicable) so the lockfile reflects the new published version before
    cyrus-core
    is built/published.
  • pnpm install
    +
    pnpm build
    from root takes ~3 minutes combined on a clean tree — plan command timeouts accordingly.
  • 始终使用
    --no-git-checks
    ,以便你可以从带有未提交工作区的功能分支进行发布。
  • 始终使用
    --tag test
    ,以保留
    latest
    dist-tag用于正式版本。
  • 预发布版本(任何带有
    -
    后缀的版本,如
    -test.0
    )在没有显式标签或版本规范的情况下,不会被
    npm install cyrus-core
    自动安装,因此可以安全重复执行此流程。
  • 如果重新发布了
    claude-runner
    (适用时),请在发布后运行
    pnpm install
    ,以便在构建/发布
    cyrus-core
    前,锁文件能反映新发布的版本。
  • 在干净的工作区中,从根目录运行
    pnpm install
    +
    pnpm build
    总共需要约3分钟——请据此规划命令超时时间。

Examples

示例

  • "release core test" - Run a dev release of cyrus-core
  • "/release-core-test" - Invoke this skill
  • "release core test" - 运行cyrus-core的开发版本发布
  • "/release-core-test" - 调用此技能