Documentation v0.28.0

v0.22.3 -> v0.23.0

Summary

Brings Telegram online as a first-class chat runtime alongside Discord, with shared session naming, background push, and a TUI-driven enablement flow. Reworks the cross-runtime confirmation gate so chat platforms no longer block each other in-flight. CLI surface narrows as Discord auth moves into the TUI wizard.

翻譯 將 Telegram 接入為與 Discord 並列的對話 runtime,共用 session 命名、背景推播與 TUI 啟用流程。重塑跨 runtime 的 confirm gate,讓多平台不再相互阻塞。CLI 表面收斂,Discord 授權移入 TUI wizard。

⚠️ Breaking Changes

Pending gate switched from global flag to runtime-scoped listener registry

The confirmation / ask_user / store_secret gate no longer uses the global pending.Active atomic flag. Each runtime now registers a prefix-matched listener and claims only matching queue entries, so Telegram, Discord, and CLI can run their own confirm flows side by side without one runtime blocking another.

Before:

// global gate
if pending.Active.Load() {
    // confirm flow is in flight somewhere
}

After:

// per-session gate, prefix-routed listeners
if pending.HasListener(sessionID) {
    // a listener with a matching prefix is registered for this session
}

// register a listener for a runtime (TUI / CLI use "", Telegram daemon uses "tg-")
unregister := pending.RegisterListener("tg-")
defer unregister()

// claim the next entry whose session matches the prefix
entry := pending.PickNextFor("tg-")

Migration:

// Old call sites reading the global flag
if pending.Active.Load() { ... }

// New form: scope the check to the session you are dispatching for
if pending.HasListener(sess.ID) { ... }

Package path also moved: internal/pending/internal/runtime/pending.go. Fork maintainers consuming the internal package must update imports and replace Active reads with HasListener(sessionID); daemon-side runtimes must register a listener (with the appropriate session prefix) at boot and call the returned unregister on shutdown.

翻譯

Confirmation/ask_userstore_secret 流程的閘門由全域 pending.Active atomic flag,改為 runtime 各自 RegisterListener(prefix) 並以 HasListener(sessionID) 檢查、PickNextFor(prefix) 取對應條目。Telegram、Discord、CLI 可並行各自 confirm flow,互不阻塞。

Package 路徑由 internal/pending/ 移至 internal/runtime/pending.go。Fork 維護者需同步更新 import,把 pending.Active.Load() 改成 pending.HasListener(sess.ID),daemon 側 runtime 啟動時需以對應 prefix 註冊 listener,停機時呼叫回傳的 unregister

agen discord CLI subcommand removed

Discord enablement moved entirely into the TUI /discord popup chain (token entry, verification, keychain write, daemon reload). The CLI subcommand and its standalone addDiscord.go entry are gone.

Migration:

# Old
agen discord <action>

# New
agen           # start TUI
/discord       # popup chain handles token + verification + keychain
翻譯

agen discord CLI 子命令與獨立的 addDiscord.go 入口移除。Discord 啟用統一由 TUI /discord popup chain 處理(token 輸入、驗證、keychain 寫入、daemon reload)。

Changes

FEAT

翻譯
  • 新增 Telegram bot 啟用與 daemon reload 支援
  • 新增 Telegram runtime 支援,並改善 session 處理
  • 新增 Telegram 結果推送,把背景 push hook 抽成通用 runtime registry
  • 新增 Telegram 語音檔案投遞,並重用 bot client 做 push

UPDATE

翻譯
  • 新增 Telegram chat 授權驗證,並收斂事件 log 雜訊
  • 引入 chat-platform 系統 prompt 組裝器,並調整 Telegram 回覆排版
  • 升級 Telegram confirm/ask_user 流程與 go-bot 依賴

REFACTOR

翻譯
  • 改善 runtime 狀態顯示,並持久化 bot username
  • 將 session 切換 popup 限制在可見視窗範圍
  • Telegram :name 前綴訊息走 named session 路由(與 TUI exec.Run 對齊)

REMOVE

翻譯
  • 移除 agen discord CLI 子命令,授權流程改由 TUI 內處理

Scope


Generated by SKILL