mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-24 16:41:14 +00:00
Phase 3 of #107237. Removes config.apply/config.patch/restart from the regular-agent gateway tool (mirroring Phase 2's update.run removal); only config.get and config.schema.lookup reads remain. Persistent config changes and restarts now go exclusively through the human-approved openclaw delegation path — closing the last unmediated agent config-write surface. gateway stays owner-only/control-plane gated (config reads expose secrets and host topology). Legacy setups can re-enable writes via the existing per-agent tool allowlist; no new config key. Net -2271 LOC. Refs #107237
25 KiB
25 KiB
title, sidebarTitle, summary, read_when
| title | sidebarTitle | summary | read_when | |||
|---|---|---|---|---|---|---|
| Slash commands | Slash commands | All available slash commands, directives, and inline shortcuts — configuration, routing, and per-surface behavior. |
|
The Gateway handles commands sent as standalone messages starting with /.
Host-only bash commands use ! <cmd> (with /bash <cmd> as an alias).
When a conversation is bound to an ACP session, normal text routes to the ACP
harness. Gateway management commands remain local: /acp ... always reaches
the OpenClaw command handler, and /status plus /unfocus stay local whenever
command handling is enabled for the surface.
Three command types
Standalone `/...` messages handled by the Gateway. Must be sent as the only content in the message. `/think`, `/fast`, `/verbose`, `/trace`, `/reasoning`, `/elevated`, `/exec`, `/model`, `/queue` — stripped from the message before the model sees it. Persist session settings when sent alone; act as inline hints when sent with other text. `/help`, `/commands`, `/status`, `/whoami` — run immediately and are stripped before the model sees the remaining text. Authorized senders only. - Directives are stripped from the message before the model sees it. - In **directive-only** messages (the message is only directives), they persist to the session and reply with an acknowledgement. - In **normal chat** messages with other text, they act as inline hints and do **not** persist session settings. - Directives only apply for **authorized senders**. If `commands.allowFrom` is set, it is the only allowlist used; otherwise authorization comes from channel allowlists/pairing plus `commands.useAccessGroups`. Unauthorized senders see directives treated as plain text.Configuration
{
commands: {
native: "auto",
nativeSkills: "auto",
text: true,
bash: false,
bashForegroundMs: 2000,
config: false,
mcp: false,
plugins: false,
debug: false,
restart: true,
ownerAllowFrom: ["discord:123456789012345678"],
ownerDisplay: "raw",
ownerDisplaySecret: "${OWNER_ID_HASH_SECRET}",
allowFrom: {
"*": ["user1"],
discord: ["user:123"],
},
useAccessGroups: true,
},
}
Command list
Commands come from three sources:
- Core built-ins:
src/auto-reply/commands-registry.shared.ts - Generated dock commands:
src/auto-reply/commands-registry.data.ts - Plugin commands: plugin
registerCommand()calls
Availability depends on config flags, channel surface, and installed/enabled plugins.