kiro-discord-bot

指令參考 #

指令主要以 slash command 使用,大多也支援 ! 文字指令。敏感管理與帳務用量介面會在 Discord 支援時使用 ephemeral private response。

頻道設定與狀態 #

Command用途
/cwd開啟私密 project/CWD setup panel。用於初始化或切換頻道專案。
/start <cwd>進階直接綁定 CWD;一般建議用 /cwd。
/status顯示 agent 狀態、queue、context、session ID 與 uptime。
/doctor執行部署、權限與 ACP 診斷。
/reset重置目前 channel 或 thread agent session。
/restart停止目前 parent channel 內所有活躍 runtime;下一則訊息會用相同頻道設定啟動新的 runtime process。
/clear清除目前目標的對話歷史。
/compact在支援時要求 active engine 壓縮對話 context;若使用率仍偏高,請用 /clear 讓目前目標重新開始乾淨 session。

在 parent channel 使用 /clear 時,會清 active agent session,並清除 bot-local channel chat log,避免未來 session continuity 再使用。於 Discord thread 內使用 /clear 時,若 active thread agent 正在執行會同步清除該 agent session,並且一定會截斷 bot-local thread-<id> chat log、清除已保存的 ACP session metadata,避免 /reset 載回先前 agent session;即使目前沒有 active in-memory thread agent,本地 thread 清除仍會執行。Discord thread 中仍可見的訊息,後續仍可能透過 Discord API 被用來重建 context,因此不想保留的細節請直接刪除或編輯。Memory rules、flash memory、steering 與專案檔案仍會生效。

工作控制 #

Command用途
/cancel要求目前 ACP session 取消 active task。
/interrupt先 soft cancel;若同一任務仍卡住,再中斷 process group。
/pause將目前目標切成 mention-only。Parent channel 也會停用新任務 thread。
/back恢復 full-listen 與 parent channel 新任務開 thread。
`/thread [onoff]`查詢或設定未來 parent-channel task 是否建立 Discord thread。
`/silent [onoffcompactfullfolded]`控制進度輸出可見度。預設是 folded:只更新同一張即時進度卡,最終回答不變。on/compact 會發送精簡工具開始訊息;off/full 會發送詳細工具輸出。
`/webhook mode:<statusonoff>`查詢或設定帶 bot tag 的 Discord channel webhook 監聽。開啟後,webhook 訊息仍必須以真正的 bot mention(例如 <@BOT_ID>)開頭;在頻道內用 /webhook mode:status 可看到這個 bot 的實際 tag。
/webshare start/stop/status/revoke管理目前 channel 或 thread 的 WebShare browser control link。此連結會在停止或撤銷前,於此 target 委派 opener 的 Discord authority;詳見 WebShare。

/webshare start 會在 WebShare 已啟用且 requester 可管理 target 時,以 private response 回傳 control/view links。/webshare stop 會結束 opener 的 active share,並解除其 Discord-side lockout。/webshare status 顯示 active share state。/webshare revoke 是 manager 用於連結外洩或 opener 不在場時的 emergency path。WebShare 訊息會明確標示 via WebShare;v1 只允許明確選取的 user mentions 與 bot,不允許 roles、@everyone 或 @here。

Model 與 Agent Mode #

Command用途
/model顯示目前 model。
/model <model-id>切換目前頻道/討論串 agent 的 model。Kiro 可使用 fallback model list;OMP 會從 active ACP session 驗證 model ID。
/models列出可用 models。Kiro 可 fallback 到 kiro-cli;OMP 的 model catalog 來自 ACP session/new,因此需要頻道/討論串 agent 已啟動。
/agent列出目前頻道/討論串 agent 的可用 modes。
/agent <mode-id>切換 agent mode,例如 planner/guide mode 或 active ACP session 回報的 OMP modes。
/engine顯示目前的 agent 引擎(kiro/omp)與已啟用的引擎清單。
/engine <kiro_or_omp>切換此頻道/討論串的引擎(僅限 AGENT_ENGINES_ENABLED 列出的引擎)。會在新引擎開全新 session,並重放最近的對話內容。

Memory 與 Steering #

Command用途
/memory新增、列出、移除或清除持久 memory rules。
/flashmemory管理 session-scoped emphasis rules。
`/steering <statuscreateedit>`管理目前專案共用的 AGENTS.md guidance。

只要 memory rule 還在 /memory list 看得到,就會影響未來 turns。若要完全淘汰過期指引,移除後再執行 /clear 與 /reset。

Memory、flash memory、steering 與 session cleanup 的操作差異見 日常工作流。

MCP 與 Admin #

Command用途
/mcp status顯示 catalog 與目前 channel policy。
/mcp enable / /mcp disable在 channel scope 啟用或停用 server。
/mcp manage開啟私密 MCP policy panel,掃描 tools 並管理 allowlist。
/audit [limit]私密檢視目前 channel/thread 的 audit events。
/usage [user]私密顯示全伺服器今日、本周、本月至今的 agent 用量;engine 有回傳 metering metadata 時會包含 credits 或 USD cost。一般成員預設只看自己;具備管理伺服器或系統管理員權限者可留空查看所有使用者或指定其他成員。
/usage-history [user] [period] [status] [source]私密查詢全伺服器詳細用量紀錄。period 可選 7d、30d、this-month、last-month;status 可選 all、success、failed;source 可選 all、message、webhook、webshare、command、cron、monitor。一般成員可查詢自己;查詢其他成員需要管理伺服器或系統管理員權限。

Audit data 請使用 slash /audit;usage data 請使用 slash /usage 或 /usage-history。文字 !audit 不回傳 audit rows,文字 !usage 只會提示改用 slash,因為 Discord 無法讓這類文字回覆變成 private。 Bot 管理者包含具備對應 Discord 管理權限的成員,或列在 BOT_GM_USER_IDS 的 user ID。設定 GM 白名單後,非管理者仍可能看得到管理型 slash commands,但 bot 會在執行前拒絕。

Audit rows、audit prompt investigations 與 usage attribution 的行為見 Audit、用量與隱私。

Scoped Skills #

使用 scoped skills 可把經 review 的 reusable procedures 存到 server、channel、project,或 channel/project scope。建議以自然語言請 agent 草擬與更新 skill;slash commands 是 fallback 與 admin shortcuts。Scope precedence、bot-tools 行為、audit 與 recovery 見 Scoped Skills。

Command用途
/skill list [query]Manager 會看到已安裝 skills,包含已停用項目;其他使用者只看到 effective skills。
/skill get skill_id:<id-or-slug>Manager 可在 scope 檢查後讀取已安裝 skill;其他使用者只能讀取 effective skills。
/skill create用明確欄位建立 skill;預設已安裝但停用。
/skill disable / /skill enable / /skill restore / /skill rollback管理 authorized scope 的 lifecycle state。
/skill history skill_id:<id-or-slug> [scope]顯示近期 lifecycle audit history。

A2A #

只有在 NATS/process A2A 已啟用後才使用 A2A commands;未啟用 A2A 的 bot 不會註冊 /a2a 或 bot_a2a_* MCP tools,避免一般 session 浪費 context 在不可用的委派介面上。先執行 /a2a peers,再由接收端頻道管理員在該頻道執行 /a2a allow peer_agent:<runtime> 建立 receiver consent。Delegation 與 status flows 需要相對應的 enabled policy/readiness。從 NATS server、.env 到 Discord policy 的完整 setup 見 使用 NATS 啟用 A2A。協議關鍵字見 A2A 協議模型。

Command用途
/a2a peers列出可見 runtime peers、skills、trust、stale/online status 與 delivery readiness。
/a2a allow peer_agent:<runtime>直接允許該精確 runtime 傳工作到此頻道。
/a2a ask peer_agent:<runtime> message:<text>對 runtime 排入一般 delegated task。
/a2a status [task]查看 durable task state 與 events。Queued task 不代表完成,必須到 terminal state。
/a2a cancel task:<task>要求取消 remote A2A task。
/a2a reply task:<task> input:<text>當 task 是 TASK_STATE_INPUT_REQUIRED 時提供 input。
/a2a authorize task:<task> approve:true_or_false當 task 是 TASK_STATE_AUTH_REQUIRED 時 approve 或 deny。
/a2a revoke peer_agent:<runtime>停止允許該精確 runtime 傳工作到此頻道。

進階 policy changes 刻意不放在一般 /a2a slash surface。一般 commands 只涵蓋 peer discovery、接收端 allow/revoke、task queueing、status、cancel、input 與 authorization。Capabilities、outbound delegate targets、transcript sharing、policy-wide limits 必須走受信任的 admin/operator policy path;不要期待一般 bot-tools policy workflow 可變更這些設定。

排程 #

Command用途
/cron透過表單建立 recurring scheduled task。
/cron-prompt <description>用自然語言建立 scheduled task。
/cron-list列出 scheduled tasks 與管理按鈕。
/cron-run <name>手動執行 scheduled task。
/monitor-prompt <description>用自然語言建立背景監控。
/monitor-list列出背景監控與 pause/resume/run/edit/delete 按鈕。
/monitor-run <name>手動執行監控檢查;仍然只有條件命中時才公開發訊。
/remind <time> <content>建立一次性 reminder,到期時 tag requester。

排程指令必須在 parent channel 使用。Cron agent 執行時使用該頻道當下 CWD。Monitor check 也使用目前 CWD,但條件未命中時不會產生任何公開 Discord artifact:沒有 thread、沒有 parent link、沒有 progress、沒有 final message。

Monitor slash commands(/monitor-prompt、/monitor-list、/monitor-run 與 monitor 管理按鈕)要求 requester 對目標頻道具備 Manage Channels 權限。

Scheduling scope、monitor 行為、MCP-created jobs 與 owner expectations 見 Cron 與提醒。

Thread Helpers #

在 Discord thread 內,/status、/reset、/cancel、/interrupt、/compact、/clear、/model 通常會作用在目前 thread agent。!close 可關閉目前 thread agent,!close-thread <thread_id> 可從 parent channel scope 關閉 inactive thread agent。