Feat/move weixin login to auth and update docs (#1945)
* move weixin to auth and update docs * fix ci test
This commit is contained in:
parent
ce1619051d
commit
b23a6b3f54
21 changed files with 23 additions and 25 deletions
|
|
@ -524,7 +524,7 @@ Connectez PicoClaw au réseau social des Agents simplement en envoyant un seul m
|
|||
| Commande | Description |
|
||||
| ------------------------- | ---------------------------------------- |
|
||||
| `picoclaw onboard` | Initialiser la config & le workspace |
|
||||
| `picoclaw onboard weixin` | Connecter un compte WeChat via QR |
|
||||
| `picoclaw auth weixin` | Connecter un compte WeChat via QR |
|
||||
| `picoclaw agent -m "..."` | Chatter avec l'agent |
|
||||
| `picoclaw agent` | Mode chat interactif |
|
||||
| `picoclaw gateway` | Démarrer le gateway |
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ Hubungkan PicoClaw ke Jaringan Sosial Agent hanya dengan mengirim satu pesan mel
|
|||
| Perintah | Deskripsi |
|
||||
| -------------------------- | -------------------------------- |
|
||||
| `picoclaw onboard` | Inisialisasi konfigurasi & workspace |
|
||||
| `picoclaw onboard weixin` | Hubungkan akun WeChat via QR |
|
||||
| `picoclaw auth weixin` | Hubungkan akun WeChat via QR |
|
||||
| `picoclaw agent -m "..."` | Chat dengan agent |
|
||||
| `picoclaw agent` | Mode chat interaktif |
|
||||
| `picoclaw gateway` | Mulai gateway |
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ Connetti PicoClaw al Social Network degli Agent semplicemente inviando un singol
|
|||
| Comando | Descrizione |
|
||||
| ------------------------- | ---------------------------------- |
|
||||
| `picoclaw onboard` | Inizializza config & workspace |
|
||||
| `picoclaw onboard weixin` | Connetti account WeChat tramite QR |
|
||||
| `picoclaw auth weixin` | Connetti account WeChat tramite QR |
|
||||
| `picoclaw agent -m "..."` | Chatta con l'agent |
|
||||
| `picoclaw agent` | Modalità chat interattiva |
|
||||
| `picoclaw gateway` | Avvia il gateway |
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ CLI または統合チャットアプリからメッセージを 1 つ送るだ
|
|||
| コマンド | 説明 |
|
||||
| ------------------------- | ------------------------------ |
|
||||
| `picoclaw onboard` | 設定&ワークスペースの初期化 |
|
||||
| `picoclaw onboard weixin` | WeChat アカウントを QR で接続 |
|
||||
| `picoclaw auth weixin` | WeChat アカウントを QR で接続 |
|
||||
| `picoclaw agent -m "..."` | Agent とチャット |
|
||||
| `picoclaw agent` | インタラクティブチャットモード |
|
||||
| `picoclaw gateway` | Gateway を起動 |
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ Connect PicoClaw to the Agent Social Network simply by sending a single message
|
|||
| Command | Description |
|
||||
| ------------------------- | -------------------------------- |
|
||||
| `picoclaw onboard` | Initialize config & workspace |
|
||||
| `picoclaw onboard weixin` | Connect WeChat account via QR |
|
||||
| `picoclaw auth weixin` | Connect WeChat account via QR |
|
||||
| `picoclaw agent -m "..."` | Chat with the agent |
|
||||
| `picoclaw agent` | Interactive chat mode |
|
||||
| `picoclaw gateway` | Start the gateway |
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ Conecte o PicoClaw à Rede Social de Agents simplesmente enviando uma única men
|
|||
| Comando | Descrição |
|
||||
| ------------------------- | -------------------------------------- |
|
||||
| `picoclaw onboard` | Inicializar config e workspace |
|
||||
| `picoclaw onboard weixin` | Conectar conta WeChat via QR |
|
||||
| `picoclaw auth weixin` | Conectar conta WeChat via QR |
|
||||
| `picoclaw agent -m "..."` | Conversar com o agent |
|
||||
| `picoclaw agent` | Modo de chat interativo |
|
||||
| `picoclaw gateway` | Iniciar o gateway |
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ Kết nối PicoClaw với Mạng xã hội Agent chỉ bằng cách gửi một
|
|||
| Lệnh | Mô tả |
|
||||
| ------------------------- | ---------------------------------------- |
|
||||
| `picoclaw onboard` | Khởi tạo cấu hình & workspace |
|
||||
| `picoclaw onboard weixin` | Kết nối tài khoản WeChat qua QR |
|
||||
| `picoclaw auth weixin` | Kết nối tài khoản WeChat qua QR |
|
||||
| `picoclaw agent -m "..."` | Trò chuyện với agent |
|
||||
| `picoclaw agent` | Chế độ trò chuyện tương tác |
|
||||
| `picoclaw gateway` | Khởi động gateway |
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ PicoClaw 原生支持 [MCP](https://modelcontextprotocol.io/) — 连接任意 M
|
|||
| 命令 | 说明 |
|
||||
| ------------------------- | ---------------------- |
|
||||
| `picoclaw onboard` | 初始化配置与工作区 |
|
||||
| `picoclaw onboard weixin` | 扫码连接微信个人号 |
|
||||
| `picoclaw auth weixin` | 扫码连接微信个人号 |
|
||||
| `picoclaw agent -m "..."` | 与 Agent 对话 |
|
||||
| `picoclaw agent` | 交互式对话模式 |
|
||||
| `picoclaw gateway` | 启动网关 |
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ func NewAuthCommand() *cobra.Command {
|
|||
newLogoutCommand(),
|
||||
newStatusCommand(),
|
||||
newModelsCommand(),
|
||||
newWeixinCommand(),
|
||||
)
|
||||
|
||||
return cmd
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ func TestNewAuthCommand(t *testing.T) {
|
|||
"logout",
|
||||
"status",
|
||||
"models",
|
||||
"weixin",
|
||||
}
|
||||
|
||||
subcommands := cmd.Commands()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package onboard
|
||||
package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
@ -27,7 +27,7 @@ to authorize your account. On success, the bot token is saved to the picoclaw
|
|||
config so you can start the gateway immediately.
|
||||
|
||||
Example:
|
||||
picoclaw onboard weixin`,
|
||||
picoclaw auth weixin`,
|
||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||
return runWeixinOnboard(baseURL, proxy, time.Duration(timeout)*time.Second)
|
||||
},
|
||||
|
|
@ -16,7 +16,7 @@ func NewOnboardCommand() *cobra.Command {
|
|||
cmd := &cobra.Command{
|
||||
Use: "onboard",
|
||||
Aliases: []string{"o"},
|
||||
Short: "Initialize picoclaw configuration, workspace, and channel accounts",
|
||||
Short: "Initialize picoclaw configuration and workspace",
|
||||
// Run without subcommands → original onboard flow
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(args) == 0 {
|
||||
|
|
@ -30,8 +30,5 @@ func NewOnboardCommand() *cobra.Command {
|
|||
cmd.Flags().BoolVar(&encrypt, "enc", false,
|
||||
"Enable credential encryption (generates SSH key and prompts for passphrase)")
|
||||
|
||||
// Channel onboarding subcommands
|
||||
cmd.AddCommand(newWeixinCommand())
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ func TestNewOnboardCommand(t *testing.T) {
|
|||
require.NotNil(t, cmd)
|
||||
|
||||
assert.Equal(t, "onboard", cmd.Use)
|
||||
assert.Equal(t, "Initialize picoclaw configuration, workspace, and channel accounts", cmd.Short)
|
||||
assert.Equal(t, "Initialize picoclaw configuration and workspace", cmd.Short)
|
||||
|
||||
assert.Len(t, cmd.Aliases, 1)
|
||||
assert.True(t, cmd.HasAlias("o"))
|
||||
|
|
@ -28,6 +28,5 @@ func TestNewOnboardCommand(t *testing.T) {
|
|||
encFlag := cmd.Flags().Lookup("enc")
|
||||
require.NotNil(t, encFlag, "expected --enc flag to be registered")
|
||||
assert.Equal(t, "false", encFlag.DefValue, "--enc should default to false")
|
||||
assert.True(t, cmd.HasSubCommands())
|
||||
assert.NotNil(t, cmd.Commands())
|
||||
assert.False(t, cmd.HasSubCommands())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ PicoClaw supports connecting to your personal WeChat account using the official
|
|||
The easiest way to set up the Weixin channel is using the interactive onboarding command:
|
||||
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
|
||||
This command will:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ PicoClaw 支持使用腾讯官方 iLink API 连接您的个人微信账号。
|
|||
最简单的方法是使用交互式 onboarding 命令进行一键激活:
|
||||
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
|
||||
该命令将:
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ PicoClaw supports connecting to your personal WeChat account using the official
|
|||
|
||||
Run the interactive QR login flow:
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
Scan the printed QR code with your WeChat mobile app. On success, the token is saved to your config.
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ PicoClaw prend en charge la connexion à votre compte WeChat personnel via l'API
|
|||
|
||||
Lancez le flux de connexion interactif par QR code :
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
Scannez le QR code affiché avec votre application WeChat mobile. Une fois connecté, le token est sauvegardé dans votre configuration.
|
||||
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ PicoClaw は Tencent iLink 公式 API を使用して WeChat 個人アカウン
|
|||
|
||||
インタラクティブな QR ログインフローを実行します:
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
WeChat モバイルアプリで表示された QR コードをスキャンしてください。ログイン成功後、トークンが設定ファイルに保存されます。
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ O PicoClaw suporta conexão com sua conta pessoal do WeChat usando a API oficial
|
|||
|
||||
Execute o fluxo de login interativo por QR code:
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
Escaneie o QR code exibido com seu aplicativo WeChat mobile. Após o login bem-sucedido, o token é salvo na sua configuração.
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ PicoClaw hỗ trợ kết nối với tài khoản WeChat cá nhân của bạn
|
|||
|
||||
Chạy luồng đăng nhập QR tương tác:
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
Quét mã QR được in ra bằng ứng dụng WeChat trên điện thoại. Sau khi đăng nhập thành công, token sẽ được lưu vào cấu hình.
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ PicoClaw 通过腾讯 iLink 官方 API 支持连接微信个人号。
|
|||
|
||||
运行交互式扫码登录流程:
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
picoclaw auth weixin
|
||||
```
|
||||
用微信手机端扫描打印出的二维码。登录成功后,token 会自动保存到配置文件。
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue