Elevated Mode

Elevated Mode (/elevated directives)

它做什么

  • /elevated on 在 gateway host 上运行并保持 exec approvals(与 /elevated ask 相同)。
  • /elevated full 在 gateway host 上运行auto-approves exec(skips exec approvals)。
  • /elevated ask 在 gateway host 上运行但保持 exec approvals(与 /elevated on 相同)。
  • on/ask force exec.security=full;configured security/ask policy 仍然适用。
  • 仅当 agent 是sandboxed时改变 behavior(否则 exec 已经在 host 上运行)。
  • Directive forms:/elevated on|off|ask|full/elev on|off|ask|full
  • 仅接受 on|off|ask|full;其他内容返回 hint 且不改变 state。

它控制什么(以及它不控制什么)

  • Availability gatestools.elevated 是 global baseline。agents.list[].tools.elevated 可以进一步 per agent 限制 elevated(两者都必须 allow)。
  • Per-session state/elevated on|off|ask|full 为 current session key 设置 elevated level。
  • Inline directive:消息中的 /elevated on|ask|full 仅适用于该消息。
  • Groups:在 group chats 中,elevated directives 仅在 agent is mentioned 时 honored。绕过 mention requirements 的 command-only messages 被视为 mentioned。
  • Host execution:elevated forces exec onto the gateway host;full also sets security=full
  • Approvalsfull skips exec approvals;on/ask honor them when allowlist/ask rules require。
  • Unsandboxed agents:location 的 no-op;仅影响 gating、logging 和 status。
  • Tool policy still applies:如果 exec 被 tool policy denied,elevated 不能使用。
  • Separate from /exec/exec 为 authorized senders 调整 per-session defaults 且不需要 elevated。

Resolution order

  1. 消息上的 Inline directive(仅适用于该消息)。
  2. Session override(通过发送 directive-only message 设置)。
  3. Global default(config 中的 agents.defaults.elevatedDefault)。

Setting a session default

  • 发送directive 的消息(允许 whitespace),例如 /elevated full
  • 发送 confirmation reply(Elevated mode set to full... / Elevated mode disabled.)。
  • 如果 elevated access is disabled 或 sender is not on the approved allowlist,directive replies with an actionable error 且不改变 session state。
  • 发送 /elevated(或 /elevated:)不带 argument 查看 current elevated level。

Availability + allowlists

  • Feature gate:tools.elevated.enabled(默认可以通过 config off 即使 code supports it)。
  • Sender allowlist:tools.elevated.allowFrom with per-provider allowlists(例如 discordwhatsapp)。
  • Unprefixed allowlist entries 仅匹配 sender-scoped identity values(SenderIdSenderE164From);recipient routing fields 从不用于 elevated authorization。
  • Mutable sender metadata requires explicit prefixes:
    • name:<value> matches SenderName
    • username:<value> matches SenderUsername
    • tag:<value> matches SenderTag
    • id:<value>from:<value>e164:<value> available for explicit identity targeting
  • Per-agent gate:agents.list[].tools.elevated.enabled(optional;can only further restrict)。
  • Per-agent allowlist:agents.list[].tools.elevated.allowFrom(optional;when set,sender must match both global + per-agent allowlists)。
  • Discord fallback:如果省略 tools.elevated.allowFrom.discordchannels.discord.allowFrom list 用作 fallback(legacy:channels.discord.dm.allowFrom)。设置 tools.elevated.allowFrom.discord(甚至 [])来 override。Per-agent allowlists use the fallback。
  • All gates must pass;otherwise elevated is treated as unavailable。

Logging + status

  • Elevated exec calls logged at info level。
  • Session status includes elevated mode(例如 elevated=askelevated=full)。