@cnbcool/cnb-cli 1.23.0 → 1.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -74,7 +74,7 @@ The platform and repo are inferred from the `cwd` git remote (`cnb_run`, `cnb_st
74
74
  The cli usage conventions ship inside the MCP instructions and tool descriptions, always matching the cli version. Tools:
75
75
 
76
76
  - `cnb_run` — run a cnb command; arguments are passed as an array without a shell; pass `cwd` to infer the repo from a workspace
77
- - `cnb_skill` — platform knowledge base on demand: no arguments lists the bundled skills, `query` searches them, `name` (+ `path` for a sub-file) returns the content
77
+ - `cnb_guide` — platform guide on demand (`.cnb.yml` and CI diagnosis, attachment upload, official docs): no arguments lists the topics, `query` searches them, `name` (+ `path` for a sub-file) returns the content; pass `cwd` to fill in the platform host
78
78
  - `cnb_login` — OAuth2 device authorization, returns an auth link; the token is shared with `cnb login` in `~/.cnb/token`
79
79
  - `cnb_status` / `cnb_logout` — check or clear the login
80
80
 
package/README.md CHANGED
@@ -100,14 +100,14 @@ cli 的用法约定(常用命令、参数、输出约定)随包内置在 MCP
100
100
  | 工具 | 作用 | 参数 |
101
101
  | --- | --- | --- |
102
102
  | `cnb_run` | 执行任意 `cnb` 命令,覆盖 Issues / PR / 仓库 / 构建 / 制品库等全部 OpenAPI 操作 | `args`:`cnb` 之后的参数数组;`cwd`:工作区绝对路径 |
103
- | `cnb_skill` | 平台知识库:按需返回写 `.cnb.yml`、评审 PR、提交规范、附件上传、查官方文档的判断口径 | `query`:关键词检索;`name` + `path`:取指定技能与分册 |
103
+ | `cnb_guide` | 平台指南:按需返回 `.cnb.yml` 写法与 CI 诊断、附件上传、官方文档查法 | `query`:检索;`name` + `path`:取主题与分册;`cwd`:按平台填站点域名 |
104
104
  | `cnb_status` | 查看登录状态,过期时自动用 refresh_token 刷新 | `cwd` |
105
105
  | `cnb_login` | OAuth2 设备授权登录,返回授权链接,token 写入 `~/.cnb/token` | `cwd` |
106
106
  | `cnb_logout` | 退出登录,删除本机对应平台的登录态 | `cwd` |
107
107
 
108
108
  `cnb_run` 的 `args` 按数组原样传给 cli、不经过 shell:多行正文直接作为一个元素传入(如 `["issues","comment","--number","12","--body","第一行\n第二行"]`),无需引号或转义。`login`、`mcp` 两个子命令被拦截,登录请用 `cnb_login`。
109
109
 
110
- `cnb_skill` 按需取内容,不占常驻上下文:不传参数列出全部技能;`{"query":"定时任务 怎么配"}` 返回命中片段;`{"name":"cnb-pipeline"}` 取主干并列出分册;`{"name":"cnb-pipeline","path":"references/crontab.md"}` 取具体分册。
110
+ `cnb_guide` 按需取内容,不占常驻上下文:不传参数列出全部主题;`{"query":"定时任务没触发"}` 返回最相关的几段与出处;`{"name":"cnb-pipeline"}` 取主干并列出分册;`{"name":"cnb-pipeline","path":"crontab.md"}` 取分册。原文按 cli 与流水线环境写成,返回时开头会附 MCP 下的等价做法(命令改走 `cnb_run`、`CNB_*` 变量本地没有值、站点域名按 `cwd` 推断)。
111
111
 
112
112
  ### 自动推断
113
113
 
@@ -130,9 +130,9 @@ cli 的用法约定(常用命令、参数、输出约定)随包内置在 MCP
130
130
 
131
131
  MCP 覆盖 cli 的全部命令能力,相当于「cnb-api skill + cli」,不需要再安装 skills。
132
132
 
133
- 流程知识以 `cnb_skill` 的形式内置:取自仓库 `skills/` 下的 `cnb-pipeline`、`cnb-code-review`、`cnb-code-commit`、`cnb-upload-attachment`、`cnb-docs`,随包版本更新,按需检索与取用。
133
+ 平台规则以 `cnb_guide` 的形式内置:取自仓库 `skills/` 下的 `cnb-pipeline`、`cnb-upload-attachment`、`cnb-docs`,随包版本更新。
134
134
 
135
- 安装 skills 仍然适用:不配 MCP、在本地直接用 Agent 干活时;或需要 `cnb-npc-search`、`cnb-tapd-resource-fetcher` 等未内置的技能。
135
+ 不配 MCP、在本地直接用 Agent 干活时,或需要 `cnb-code-review`、`cnb-code-commit`、`cnb-npc-search` 等未内置的技能时,仍按上文安装 skills。
136
136
 
137
137
  ### 认证与安全
138
138