Bỏ qua để đến nội dung

Quản lý kênh

Kênh giúp cùng một runtime Bestie local chạy trên các bề mặt chat ngoài terminal. Dùng bestie channels để xem adapter nào đã cấu hình, kiểm tra trạng thái daemon và chạy chẩn đoán riêng cho từng kênh.

Bestie hiện có hai channel adapter:

Kênh Polling Attachment Voice Tiến trình tool Approval
Telegram Voice input và voice reply
Zalo Không Không

Dùng Telegram khi bạn cần workflow attachment hoặc voice. Dùng Zalo cho owner-only text chat qua adapter Zalo hiện tại.

Liệt kê toàn bộ kênh Bestie biết:

Terminal window
bestie channels
bestie channels list
bestie channels status

Các lệnh này in bảng gồm:

  • tên kênh
  • kênh có đang bật trong config không
  • owner id đã được cấu hình chưa
  • tên biến môi trường chứa token
  • trạng thái daemon của kênh đó

Trạng thái daemon có thể là RUN, STALE hoặc STOP. STALE nghĩa là Bestie tìm thấy file state nhưng process được ghi lại không còn chạy.

Chạy chẩn đoán cho mọi kênh:

Terminal window
bestie channels doctor

Chạy chẩn đoán cho một kênh:

Terminal window
bestie channels doctor --channel telegram
bestie channels doctor --channel zalo

Thêm --connect khi bạn muốn Doctor gọi network check riêng của kênh:

Terminal window
bestie channels doctor --channel telegram --connect
bestie channels doctor --channel zalo --connect

Cho automation, xuất JSON:

Terminal window
bestie channels doctor --channel all --json
bestie channels doctor --channel telegram --connect --json
bestie channels doctor --channel zalo --connect --json

Channel Doctor lọc báo cáo Doctor đầy đủ xuống các check liên quan đến kênh đã chọn. Lệnh exit non-zero khi nhóm check đó có lỗi.

Chạy Telegram polling ở foreground:

Terminal window
bestie channels telegram

Chạy Zalo polling ở foreground:

Terminal window
bestie channels zalo

Để smoke check, xử lý một batch polling rồi thoát:

Terminal window
bestie channels telegram --once
bestie channels zalo --once

Để chạy local lâu dài, dùng daemon:

Terminal window
bestie daemon start --channel telegram
bestie daemon start --channel zalo
bestie daemon status --channel all

Dùng lệnh setup riêng của từng kênh:

Terminal window
bestie channels telegram setup
bestie channels zalo setup

Setup lưu phần cấu hình không phải secret vào .bestie/config.json và lưu token vào .bestie/.env.

Telegram cũng hỗ trợ tìm owner từ tin nhắn gần nhất:

Terminal window
bestie channels telegram whoami

Cả Telegram và Zalo hỗ trợ các lệnh runtime local từ tài khoản owner đã cấu hình:

/help
/status
/providers
/memory
/memory pending
/memory pause
/memory resume
/approvals
/approve <id>
/deny <id>

Telegram còn hỗ trợ /start/doctor.

Nhóm lệnh memory có thêm các dạng như /memory list, /memory analyze, /memory cleanup dry-run, /memory governance status, /memory maintenance status, /memory maintenance install/memory maintenance remove.

Slash command không hỗ trợ sẽ trả về một fallback ngắn, không được gửi sang LLM.

Chạy setup cho kênh đó:

Terminal window
bestie channels telegram setup
bestie channels zalo setup

Sau đó kiểm tra lại:

Terminal window
bestie channels list

Set owner id trong config hoặc chạy lại setup. Với Telegram, bạn có thể gửi một tin nhắn cho bot rồi chạy:

Terminal window
bestie channels telegram whoami

Restart daemon của kênh đó:

Terminal window
bestie daemon restart --channel telegram
bestie daemon restart --channel zalo

Channel adapter đang hỗ trợ là telegramzalo. Chạy:

Terminal window
bestie channels --help

Sau đó đọc guide riêng của từng kênh để setup và chạy đúng cách.