3.4 KiB
3.4 KiB
summary, read_when
| summary | read_when | |
|---|---|---|
| Elevated exec mode and /elevated directives |
|
Elevated Mode (/elevated directives)
What it does
/elevated onruns on the gateway host and keeps exec approvals (same as/elevated ask)./elevated fullruns on the gateway host and auto-approves exec (skips exec approvals)./elevated askruns on the gateway host but keeps exec approvals (same as/elevated on).on/askdo not forceexec.security=full; configured security/ask policy still applies.- Only changes behavior when the agent is sandboxed (otherwise exec already runs on the host).
- Directive forms:
/elevated on|off|ask|full,/elev on|off|ask|full. - Only
on|off|ask|fullare accepted; anything else returns a hint and does not change state.
What it controls (and what it doesn’t)
- 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. - Inline directive:
/elevated on|ask|fullinside a message applies to that message only. - Groups: In group chats, elevated directives are only honored when the agent is mentioned. Command-only messages that bypass mention requirements are treated as mentioned.
- Host execution: elevated forces
execonto the gateway host;fullalso setssecurity=full. - Approvals:
fullskips exec approvals;on/askhonor them when allowlist/ask rules require. - Unsandboxed agents: no-op for location; only affects gating, logging, and status.
- Tool policy still applies: if
execis denied by tool policy, elevated cannot be used.
Resolution order
- Inline directive on the message (applies only to that message).
- Session override (set by sending a directive-only message).
- Global default (
agents.defaults.elevatedDefaultin config).
Setting a session default
- Send a message that is only the directive (whitespace allowed), e.g.
/elevated full. - Confirmation reply is sent (
Elevated mode set to full.../Elevated mode disabled.). - If elevated access is disabled or the sender is not on the approved allowlist, the directive replies with an actionable error and does not change session state.
- Send
/elevated(or/elevated:) with no argument to see the current elevated level.
Availability + allowlists
- Feature gate:
tools.elevated.enabled(default can be off via config even if the code supports it). - Sender allowlist:
tools.elevated.allowFromwith per-provider allowlists (e.g.discord,whatsapp). - Per-agent gate:
agents.list[].tools.elevated.enabled(optional; can only further restrict). - Per-agent allowlist:
agents.list[].tools.elevated.allowFrom(optional; when set, the sender must match both global + per-agent allowlists). - Discord fallback: if
tools.elevated.allowFrom.discordis omitted, thechannels.discord.dm.allowFromlist is used as a fallback. Settools.elevated.allowFrom.discord(even[]) to override. Per-agent allowlists do not use the fallback. - All gates must pass; otherwise elevated is treated as unavailable.
Logging + status
- Elevated exec calls are logged at info level.
- Session status includes elevated mode (e.g.
elevated=ask,elevated=full).