publish

A release agent for publishing software packages to npm and binary downloads through GitHub Releases. It runs the release process through GitHub Actions, which are automated workflows defined in a repository.

In plain words
What is it for?
Use it to release npm packages, create GitHub Release binaries, update CDN pointers for supported packages, publish channel builds, and publish the separate bailian-kb-dsh package.
Why use it?
It provides one documented route for creating stable or channel releases and handles the different outputs each release may need. This reduces the risk of publishing manually from the wrong place or with the wrong version settings.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/modelstudioai/cli/publish
Clone the repo
git clone --depth 1 https://github.com/modelstudioai/cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,602 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02602
Opus 5 $0.00000 $0.01301
Sonnet 5 $0.00000 $0.00520
Haiku 4.5 $0.00000 $0.00260

Measured 2d ago against content hash 88e7b90c479c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

publish scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/publish.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

发布(npm + GitHub Release 二进制)

触发条件

  • 准备发布 channel(mcp/plugin 等)或正式版到 npm GitHub Releases 二进制
  • 准备打 git tag(仅 stable)

发布方式:GitHub Actions 总入口

发版必须通过 CI 完成,不要本地手动 pnpm publish

入口:GitHub Actions → Publish workflow(.github/workflows/publish.yml)→ Run workflow。

编排关系(重要):

publish-stable.mjs / publish-channel.mjs   ← 唯一发版入口
        ├─ npm(pnpm publish)
        └─ binary(lib/binary-release
              → binary-build
              → gh-release
              → oss-direct-upload)

tools/release/lib/binary-release.mjs 等是实现,一般不要单独当发版入口(调试可用)。

bailian-kb-dsh(独立版本、npm-only)

同一个 Publish 入口,package=bailian-kb-dsh。它走单独的 tools/release/publish-kb-dsh.mjs,不复用 publish-stable.mjs / publish-channel.mjs(版本独立、无 binary、无 OSS CDN)。详见 dsh-plugin.md

两种模式:

模式 用途 触发方式
channel npm dist-tag +(仅 bailian-cli)二进制 + CDN 一律覆盖 sync-release.json mode=channel,channel 填 npm dist-tag
stable npm latest + GitHub Release v<ver> + CDN manifest.json(及 latest.json 别名) mode=stable,需 production environment 审批

可选 flag:--skip-binary(仅发 npm,紧急逃生)。

CDN 滚动指针(bailian-cli)

发布模式 CDN 指针 本机安装 / 更新
channel 始终覆盖 sync-release.json BAILIAN_CHANNEL=sync-release / install --channel sync-release
stable manifest.json(+ latest.json 默认安装 / bl update(无 channel)

workflow 的 channel 输入只决定 npm dist-tag(如 mcp / plugin / sync-release),不再生成 release-test.json 这类旁路文件。

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 142 lines · 0 tokens per session scan A 88e7b90c479c

Subscribe to this mod's changes

publish is an agent published in the GitHub repository modelstudioai/cli (320 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,602 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.