Skip to content

The agent that grows with you

fix(desktop): a typed /approve or /deny runs on the owner, as on every surface

Teknium3c21c4133a03
diff --git a/apps/desktop/src/lib/desktop-slash-commands.test.ts b/apps/desktop/src/lib/desktop-slash-commands.test.ts
index 6a9003bbf63..c1d8ba76b0a 100644
--- a/apps/desktop/src/lib/desktop-slash-commands.test.ts
+++ b/apps/desktop/src/lib/desktop-slash-commands.test.ts
@@ -433,6 +433,15 @@ describe('registry-derived block-list (contract with hermes_cli/commands.py)', (
}
})
+ it('runs a typed /approve or /deny on the owner like every surface (the approval card stays approval.respond)', () => {
+ for (const name of ['/approve', '/deny']) {
+ expect(desktopSlashRegistry[name as keyof typeof desktopSlashRegistry]).toBeNull()
+ expect(isDesktopSlashCommand(name, 'all')).toBe(true)
+ expect(resolveDesktopCommand(name)?.surface.kind).toBe('exec')
+ expect(desktopSlashUnavailableMessage(name)).toBeNull()
+ }
+ })
+
it('recognizes offered built-ins and their aliases offline as Commands, never as skills (#116159)', () => {
// Cold catalog: nothing remembered, nothing cached. /context has no
// desktop disposition and no hand-typed TS row, so only the dump can
diff --git a/apps/desktop/src/lib/desktop-slash-registry.json b/apps/desktop/src/lib/desktop-slash-registry.json
index e97be70a87c..f1024337e67 100644
--- a/apps/desktop/src/lib/desktop-slash-registry.json
+++ b/apps/desktop/src/lib/desktop-slash-registry.json
@@ -1,7 +1,7 @@
{
"/agents": null,
"/approvals": null,
- "/approve": "messaging",
+ "/approve": null,
"/battery": null,
"/bg": null,
"/blueprint": null,
@@ -25,7 +25,7 @@
"/ctx": null,
"/curator": "advanced",
"/debug": null,
- "/deny": "messaging",
+ "/deny": null,
"/diff": null,
"/egress": null,
"/exit": "terminal",
diff --git a/hermes_cli/commands.py b/hermes_cli/commands.py
index ba6d73fcd20..1a96b807591 100644
--- a/hermes_cli/commands.py
+++ b/hermes_cli/commands.py
@@ -126,11 +126,9 @@ COMMAND_REGISTRY: list[CommandDef] = [
CommandDef("pause", "Pause new work globally (emergency stop); '/pause off' resumes", "Session",
gateway_only=True, args_hint="[reason | off]", busy_policy="dispatch"),
CommandDef("approve", "Approve a pending dangerous command", "Session",
- gateway_only=True, args_hint="[session|always]", busy_policy="dispatch",
- desktop="messaging"),
+ gateway_only=True, args_hint="[session|always]", busy_policy="dispatch"),
CommandDef("deny", "Deny a pending dangerous command (optionally with a reason)", "Session",
- gateway_only=True, args_hint="[all] [reason]", busy_policy="dispatch",
- desktop="messaging"),
+ gateway_only=True, args_hint="[all] [reason]", busy_policy="dispatch"),
CommandDef("bg", "Run a prompt in a separate background session", "Session",
args_hint="<prompt>", busy_policy="dispatch"),
CommandDef("btw", "Ask a side question about the current conversation without interrupting it", "Session",
diff --git a/website/docs/developer-guide/gateway-command-parity.md b/website/docs/developer-guide/gateway-command-parity.md
index d6eea532f1c..1a59cb280ec 100644
--- a/website/docs/developer-guide/gateway-command-parity.md
+++ b/website/docs/developer-guide/gateway-command-parity.md
@@ -32,7 +32,7 @@ handler does; `client-local (cli_only)` commands are terminal/UI features of a c
|---|---|---|---|---|---|---|
| `/agents` (/tasks) | refused | HermesCLI._handle_agents_command | delegation.pause | slash.exec: refused | refused | gateway-wide: lists every chat's running agents and the process's async jobs |
| `/approvals` | control | HermesCLI._handle_approvals_command | slash.exec | slash.exec | refused | per-session setting (gateway handler) |
-| `/approve` | control | messaging-only: unknown command | slash.exec | unavailable: messaging | refused | messaging-only |
+| `/approve` | control | messaging-only: unknown command | slash.exec | slash.exec | refused | messaging-only |
| `/battery` | refused | HermesCLI._handle_battery_command | sidecar: system.battery (preference not saved) | slash.exec: refused | refused | client-local (cli_only) |
| `/bg` | refused | HermesCLI._handle_background_command | prompt.background | action: background | refused | |
| `/blueprint` (/bp) | control | HermesCLI._handle_blueprint_command | slash.exec | slash.exec | refused | |
@@ -51,7 +51,7 @@ handler does; `client-local (cli_only)` commands are terminal/UI features of a c
| `/cron` | refused | HermesCLI._handle_cron_command | slash.exec | unavailable: terminal | refused | TUI session: bare `/cron` and `/cron list [--all]` read the profile's jobs; client-local (cli_only) |
| `/curator` | control | HermesCLI._handle_curator_command | slash.exec | unavailable: advanced | refused | |
| `/debug` | control | HermesCLI._handle_debug_command | slash.exec | slash.exec | refused | uploads logs to a public paste |
-| `/deny` | control | messaging-only: unknown command | slash.exec | unavailable: messaging | refused | messaging-only |
+| `/deny` | control | messaging-only: unknown command | slash.exec | slash.exec | refused | messaging-only |
| `/diff` | read | HermesCLI._handle_diff_command | slash.exec | slash.exec | refused | |
| `/egress` | control | HermesCLI._cmd_egress | slash.exec | slash.exec | refused | |
| `/export` | refused | HermesCLI._handle_export_command | slash.exec: refused | slash.exec: refused | refused | client-local (cli_only) |