mo-auth
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese前置约束
Pre-Constraints
CRITICAL — 先阅读 ,其中包含 初始化、认证、输出解析以及安全规则
共享规则mocliCRITICAL — Read first, which includes initialization, authentication, output parsing, and security rules
Shared Rulesmoclimocli auth - 墨问 Auth 认证
mocli auth - MoWen Auth Authentication
本技能提供墨问 Auth 认证的能力,指导你如何通过 完成 API Key 的配置与更新、获取当前的配置信息、获取 API Key 对应的账户,在墨问平台上的 Profile 信息。
mocli authThis skill provides MoWen Auth Authentication capabilities, guiding you on how to complete API Key configuration and update, obtain current configuration information, get the account corresponding to the API Key, and retrieve Profile information on the MoWen platform through .
mocli auth使用原则
Usage Principles
- 用户提供新的 API Key 或要求初始化认证时,使用 。
mocli auth init --apik <api-key>- 用户明确要求更换、覆盖、重新配置 API Key 时,使用 。
mocli auth init --apik <api-key> --force - 用户要查看当前认证状态时,使用 ;用户还要查看账号资料时,使用
mocli auth info。mocli auth info --profile - 所有响应展示都必须隐藏 API Key。即使 返回的是脱敏值,也不要额外复述完整密钥。
mocli - 其它命令返回 时,引导用户重新提供 API Key,并使用
reason=AUTH更新。init --force
- 用户明确要求更换、覆盖、重新配置 API Key 时,使用
- When users provide a new API Key or request authentication initialization, use .
mocli auth init --apik <api-key>- When users explicitly request to replace, overwrite, or reconfigure the API Key, use .
mocli auth init --apik <api-key> --force - When users want to check the current authentication status, use ; when users also want to view account profile, use
mocli auth info.mocli auth info --profile - All response displays must hide the API Key. Do not repeat the full key even if returns a desensitized value.
mocli - When other commands return , guide users to provide the API Key again and use
reason=AUTHto update.init --force
- When users explicitly request to replace, overwrite, or reconfigure the API Key, use
mocli auth init --apik <api-key> [--force]
mocli auth init --apik <api-key> [--force]
初始化 API Key。可选参数 用于更换(覆盖)已有 API Key。该命令会写入本地认证配置,执行前需要确认用户确实要初始化或覆盖。
--forceInitialize the API Key. The optional parameter is used to replace (overwrite) an existing API Key. This command will write to the local authentication configuration, and you need to confirm that the user really wants to initialize or overwrite before execution.
--force使用示例
Usage Examples
- 我的墨问 apikey 是 <apikey>, 帮我完成认证/初始化
mocli auth init --apik xxxxxx- 我的墨问 apikey 换了,帮我更新一下
mocli auth init --apik xxxxxx --force
- 我的墨问 apikey 换了,帮我更新一下
- My MoWen apikey is <apikey>, help me complete authentication/initialization
mocli auth init --apik xxxxxx- My MoWen apikey has changed, help me update it
mocli auth init --apik xxxxxx --force
- My MoWen apikey has changed, help me update it
mocli auth info [--profile]
mocli auth info [--profile]
获取当前认证配置。可选参数 用于额外获取当前 API Key 对应账户在墨问平台上的 Profile(用户信息)。
--profileObtain current authentication configuration. The optional parameter is used to additionally retrieve the Profile (user information) of the account corresponding to the current API Key on the MoWen platform.
--profile使用示例
Usage Examples
- 查看我的墨问认证信息
mocli auth info- 查看我的墨问认证信息并返回我的用户资料
mocli auth info --profile
- 查看我的墨问认证信息并返回我的用户资料
- Check my MoWen authentication information
mocli auth info- Check my MoWen authentication information and return my user profile
mocli auth info --profile
- Check my MoWen authentication information and return my user profile
输出示例
Output Example
{
"code": 0,
"status": "OK",
"reply": {
"auth": {
"api_key": "hx3jrU31xxs**********0BVvUm4ytQK",
"mo_uid": "KBqt7yiVrXBa9DJIJuUm3"
},
"profile": {
"uid": "KBqt7yiVrXBa9DJIJuUm3",
"name": "精卫鸟zzz🇨🇳",
"intro": "in culpa nostrud",
"regist_at": 1662465648,
"member": {
"is_member": true,
"plans": {
"pro": {
"type": "pro",
"status": 64,
"expire_at": 1852446600011
}
}
}
}
}
}{
"code": 0,
"status": "OK",
"reply": {
"auth": {
"api_key": "hx3jrU31xxs**********0BVvUm4ytQK",
"mo_uid": "KBqt7yiVrXBa9DJIJuUm3"
},
"profile": {
"uid": "KBqt7yiVrXBa9DJIJuUm3",
"name": "精卫鸟zzz🇨🇳",
"intro": "in culpa nostrud",
"regist_at": 1662465648,
"member": {
"is_member": true,
"plans": {
"pro": {
"type": "pro",
"status": 64,
"expire_at": 1852446600011
}
}
}
}
}
}reply 字段说明
Reply Field Description
| 字段 | 类型 | 说明 | 引用字段 |
|---|---|---|---|
| object | 认证信息 | |
| object | 用户在墨问平台上的 Profile(用户信息) | |
| Field | Type | Description | Reference Field |
|---|---|---|---|
| object | Authentication information | |
| object | User's Profile (user information) on the MoWen platform | |
展示注意事项
Display Notes
- 属于敏感信息。展示认证状态时只说明“已配置”或展示脱敏片段,不要输出完整密钥。
auth.api_key- 可展示,用于帮助用户确认当前认证账号。
auth.mo_uid - 如果 存在,可展示
profile、profile.name、profile.uid、会员状态等非敏感信息。profile.intro - 如果命令失败且 ,不要继续调用需要认证的命令;先提示用户重新初始化 API Key。
reason=AUTH
- is sensitive information. When displaying authentication status, only indicate "configured" or show a desensitized fragment, do not output the full key.
auth.api_key- can be displayed to help users confirm the currently authenticated account.
auth.mo_uid - If exists, non-sensitive information such as
profile,profile.name,profile.uid, and membership status can be displayed.profile.intro - If the command fails and , do not continue to call commands requiring authentication; first prompt the user to re-initialize the API Key.
reason=AUTH
展示规则
Display Rules
** 参考 **
公共展示规则** Reference **
Public Display Rules