sino-bc-cli 1.8.13 → 1.8.15
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.
|
@@ -20,7 +20,7 @@ description: >
|
|
|
20
20
|
|
|
21
21
|
## 环境与配置
|
|
22
22
|
|
|
23
|
-
身份令牌及 OAuth 刷新令牌、到期时间、认证上下文存于平台密钥存储(macOS/Linux 为 `~/.sino-bc-cli/secrets/` 下的 AES 密文;Windows 为当前用户凭据库),不在 `config.json` 里,不会被回显。macOS 可用 `/auth keychain-downgrade` 把主密钥落到文件。主体绑定由 Agent 保存在当前任务中,不写全局配置。登录用 `/auth login`;手动令牌用 `/set-config auth-token <AT> [RT]`(RT 可空)。网关缺省 `https://agent.beyondclick.com`,可用 `/set-config gateway-url` 改写;业务请求与 `/auth`
|
|
23
|
+
身份令牌及 OAuth 刷新令牌、到期时间、认证上下文存于平台密钥存储(macOS/Linux 为 `~/.sino-bc-cli/secrets/` 下的 AES 密文;Windows 为当前用户凭据库),不在 `config.json` 里,不会被回显。macOS 可用 `/auth keychain-downgrade` 把主密钥落到文件。主体绑定由 Agent 保存在当前任务中,不写全局配置。登录用 `/auth login`;手动令牌用 `/set-config auth-token <AT> [RT]`(RT 可空)。网关缺省 `https://agent.beyondclick.com`,可用 `/set-config gateway-url` 改写;业务请求与 `/auth` 登录、换票、刷新共用该根。改网关只改地址,不清除 AT/RT,也不丢弃对话里的 `--corporation-id` / `--auth-context-id`。重新登录或 `authContextId` 变化后再 `/tenant list` 重绑。`/init` 只装技能,不问网关、不写令牌。详情 → [`references/config-and-env.md`](references/config-and-env.md)。
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
# 升级 CLI(会自动刷新技能)
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
| 来源头 | `X-GATEWAY-TYPE: A2C-CLI`(固定写入,不开放配置) |
|
|
10
10
|
|
|
11
11
|
`/get-config --json` 查看生效取值(含 `gatewayUrl`;密钥默认打码,加 `--show-secret` 才是明文)。
|
|
12
|
-
可写配置:访问令牌 `sino-bc-cli /set-config auth-token <AT> [<RT>]`(也可用 `--auth-token <AT> [<RT>]` / `--auth-token=<AT> [<RT>]`;RT 可空;不同身份持有各自的令牌,没有内置默认值);网关根 `sino-bc-cli /set-config gateway-url <URL>`。查看状态用 `/auth status`,清除用 `/auth logout`;交互身份可用 `/auth login` 在浏览器完成设备授权(成功后进度流与 json 信封 `data.message` 为「授权成功,本机身份已就绪」,不含 AT/RT)。AT 剩余不超过 5 分钟时业务调用会自动刷新(OAuth 凭证,或手动凭证且配置了 RT);RT 过期/失效需重新授权;暂时失败保留凭证。只写 AT 不写 RT 会清掉旧 RT。只改 `refresh-token`、不改 AT 时保留 `authContextId`。logout 清除整套凭证。登录、换票、刷新与业务请求使用同一生效网关根。将 `gateway-url`
|
|
13
|
-
查询可用主体:`sino-bc-cli /tenant list`(每次现查,不缓存)。认证上下文:`sino-bc-cli /auth status` 的 `authContextId`。每次 tenant 调用传入 `--corporation-id` 与 `--auth-context-id`。`/auth status` 另含 JWT `userType` 与已缓存的 `sso` / `system` / `passport`(passport 为按主体 ID 分槽的 map,没有当前主体)。资料缓存在配置目录的 `identity-cache.json`(权限 `0o600`),不进 `config.json`、不进密钥存储。logout
|
|
12
|
+
可写配置:访问令牌 `sino-bc-cli /set-config auth-token <AT> [<RT>]`(也可用 `--auth-token <AT> [<RT>]` / `--auth-token=<AT> [<RT>]`;RT 可空;不同身份持有各自的令牌,没有内置默认值);网关根 `sino-bc-cli /set-config gateway-url <URL>`。查看状态用 `/auth status`,清除用 `/auth logout`;交互身份可用 `/auth login` 在浏览器完成设备授权(成功后进度流与 json 信封 `data.message` 为「授权成功,本机身份已就绪」,不含 AT/RT)。AT 剩余不超过 5 分钟时业务调用会自动刷新(OAuth 凭证,或手动凭证且配置了 RT);RT 过期/失效需重新授权;暂时失败保留凭证。只写 AT 不写 RT 会清掉旧 RT。只改 `refresh-token`、不改 AT 时保留 `authContextId`。logout 清除整套凭证。登录、换票、刷新与业务请求使用同一生效网关根。将 `gateway-url` 写成与当前不同的地址只改网关根,不清凭证,也不丢弃对话中的主体对。归一化后相同(含仅末尾 `/` 不同)同样不清凭证。`env` / `corporation-id` / `apifox-token` 是未知键。
|
|
13
|
+
查询可用主体:`sino-bc-cli /tenant list`(每次现查,不缓存)。认证上下文:`sino-bc-cli /auth status` 的 `authContextId`。每次 tenant 调用传入 `--corporation-id` 与 `--auth-context-id`。`/auth status` 另含 JWT `userType` 与已缓存的 `sso` / `system` / `passport`(passport 为按主体 ID 分槽的 map,没有当前主体)。资料缓存在配置目录的 `identity-cache.json`(权限 `0o600`),不进 `config.json`、不进密钥存储。logout、uninstall 与空凭证墓碑时删除该文件;改网关不删。缓存不得用来填充 `--corporation-id`。
|
|
14
14
|
|
|
15
15
|
维护者同步接口文档只读进程环境变量 `APIFOX_TOKEN`,不要写入 `config.json`。不要在业务任务里读取或设置它。
|
|
16
16
|
|