提升模式(/elevated 指令)
What it does
/elevated on在 Gateway 閘道器主機上執行,並保留 exec 核准(與/elevated ask相同)。/elevated full在 Gateway 閘道器主機上執行 且 自動核准 exec(略過 exec 核准)。/elevated ask在 Gateway 閘道器主機上執行,但保留 exec 核准(與/elevated on相同)。on/ask不會 強制exec.security=full;已設定的安全性/詢問政策仍然適用。- 僅在代理程式為 sandboxed 時才會改變行為(否則 exec 已在主機上執行)。
- 指令形式:
/elevated on|off|ask|full、/elev on|off|ask|full。 - 僅接受
on|off|ask|full;任何其他值都會回傳提示,且不會變更狀態。
控制範圍(以及不包含的部分)
- Availability gates:
tools.elevatedis the global baseline.agents.list[].tools.elevatedcan further restrict elevated per agent (both must allow). - Per-session state:
/elevated on|off|ask|fullsets the elevated level for the current session key. - 行內指令:訊息內的
/elevated on|ask|full僅套用於該則訊息。 - 群組:在群組聊天中,只有在提及代理程式時才會採用提升指令。可略過提及需求的純指令訊息會被視為已提及。 Command-only messages that bypass mention requirements are treated as mentioned. Command-only messages that bypass mention requirements are treated as mentioned.
- 主機執行:提升會將
exec強制到 Gateway 閘道器主機;full也會設定security=full。 - 核准:
full會略過 exec 核准;on/ask在允許清單/詢問規則要求時會遵循核准。 - Unsandboxed agents: no-op for location; only affects gating, logging, and status.
- 工具政策仍然適用:若
exec被工具政策拒絕,則無法使用提升模式。 - 與
/exec分離:/exec會為已授權的寄件者調整每個工作階段的預設值,且不需要提升模式。
Resolution order
- Inline directive on the message (applies only to that message).
- Session override (set by sending a directive-only message).
- 全域預設(設定中的
agents.defaults.elevatedDefault)。
Setting a session default
- 傳送一則 僅 包含指令的訊息(允許空白),例如
/elevated full。 - 會傳送確認回覆(
Elevated mode set to full.../Elevated mode disabled.)。 - 若已停用 elevated 存取,或傳送者不在核准的允許清單中,該指令會回覆可操作的錯誤訊息,且不會變更工作階段狀態。
- 傳送
/elevated(或/elevated:)且不帶參數,可查看目前的提升層級。
可用性+允許清單
- 功能閘門:
tools.elevated.enabled(即使程式碼支援,預設也可透過設定關閉)。 - 寄件者允許清單:
tools.elevated.allowFrom,並提供各提供者的允許清單(例如discord、whatsapp)。 - 每個代理程式的閘門:
agents.list[].tools.elevated.enabled(選用;只能進一步限制)。 - 每個代理程式的允許清單:
agents.list[].tools.elevated.allowFrom(選用;設定後,寄件者必須同時符合 全域+每個代理程式 的允許清單)。 - Discord 備援:若未設定
tools.elevated.allowFrom.discord,則會使用channels.discord.allowFrom清單作為備援(舊版:channels.discord.dm.allowFrom)。 Discord 後備:若省略tools.elevated.allowFrom.discord,會使用channels.discord.dm.allowFrom清單作為後備。設定tools.elevated.allowFrom.discord(即使是[])即可覆寫。每個代理程式的允許清單 不會 使用後備。 Settools.elevated.allowFrom.discord(even[]) to override. Per-agent allowlists do not use the fallback. - 必須通過所有閘門;否則提升模式會被視為不可用。
記錄+狀態
- 提升的 exec 呼叫會以 info 等級記錄。
-
- 工作階段狀態包含提升模式(例如
elevated=ask、elevated=full)。
- 工作階段狀態包含提升模式(例如