amq-remote
Let the owner reach this running agent from Buzz, on the phone or in Buzz Desktop. Use when the user types /amq-remote (Claude Code) or $amq-remote (Codex), /amq-remote --native, /amq-remote off, or /amq-remote status, or asks to control this session from Buzz. Not for AMQ messaging between agents (use amq-cli).
avivsinai · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add avivsinai/agent-message-queue --skill amq-remote技能说明
name: amq-remote version: 0.98.0 # x-release-please-version description: Let the owner reach this running agent from Buzz, on the phone or in Buzz Desktop. Use when the user types /amq-remote (Claude Code) or $amq-remote (Codex), /amq-remote --native, /amq-remote off, or /amq-remote status, or asks to control this session from Buzz. Not for AMQ messaging between agents (use amq-cli). metadata: short-description: Reach this agent from Buzz compatibility: claude-code, codex-cli
AMQ Remote
/amq-remote gives this session its own Buzz agent, with its own DM. The
owner DMs that agent from the Buzz phone app or Buzz Desktop. Several
sessions can be connected at once; each has its own agent. The same session
connecting again gets its own agent back. A different session never gets
another session's agent.
In Codex the skill is invoked as $amq-remote (Codex does not register /
commands for skills); the commands below are the same. Codex runs sandboxed:
attach writes ~/.amq/remote, so the first attach may be refused until the
user reruns it with approval — ask for that one approval, do not work around
it.
- Default (AMQ mailbox). Each DM arrives as an AMQ message from
buzzin this agent's inbox. This agent answers withamq reply --id <id>, and that reply is shown in the DM. A reply with--kind statusshows as progress; any other reply is the final answer. No Stop hook and no wake are needed. Noticing the message is this agent's own business (a wake, a built-in consumer, monitor, or the next drain). --native. For a session that is not on AMQ: each DM is typed into this exact conversation, and the harness's own final answer goes back. On Claude Code it needs the AMQ Stop hook.
Run the steps in order. When a step says to stop, show the user the command's own message. Do not work around a refusal.
/amq-remote (connect)
- Tools. Run
command -v amq-remote amq-acp. If either is missing, tell the user to runbrew install avivsinai/tap/amq, then stop. - Connect.
- Default: run
amq-remote attach --self --json. It usesAM_ROOTandAM_ME. If it says this session is not an AMQ participant, offer--native. --native: use$AM_ROOTwhen set, else$HOME/.amq/remote/root(create it private with(umask 077 && mkdir -p "$HOME/.amq/remote/root")). Runamq-remote attach --self --native --root "$ROOT" --json.- If it exits 6 and names
amq-remote claude install-stop-hook(Claude Code with--native), tell the user this adds one Stop hook to~/.claude/settings.json; it always exits 0, andamq-remote claude uninstall-stop-hookremoves it. Ask once, run it, then run the attach again. - Any other failure: show its message and stop.
- Default: run
- Tell the owner only what is still needed. The JSON has
name,label,agent,helper,draft,reused, andagent_namewhen there is an agent. Say "Connected: ." and then exactly one of:agentisrunning: "DM <agent_name> in Buzz." Nothing else is needed.agentisoffline: "Start <agent_name> in Buzz Desktop (Agents, the agent, Start), then DM it. If you deleted it, runamq-acp setup --session <name>and import the file."agentismissinganddraftis true: "Buzz Desktop opens Create agent for it: pick AMQ Remote, then Create and start."agentismissingandhelperismissing: this machine has no helper yet. Runamq-acp setup --helper --out "$HOME/Downloads/AMQ Remote helper.agent.json"once, and show its printed steps as they are (Buzz Desktop: Agents, then + then Import, pick that file, then Start, and turn on Auto-start). Later sessions then need only the Create agent dialog.agentismissingotherwise: this session's one-time setup. Runamq-acp setup --session <name> --out "$HOME/Downloads/AMQ <name>.agent.json"and show its printed steps as they are. If the JSON haswarning, show it too.
--nativeon Claude Code only: the approval hook. Runamq-remote doctor --root "$ROOT" --jsonand read itsfailinglist; the exit code is not the signal. If anative_capabilityentry says the PermissionRequest hook is not installed and there is no relay share (the usual--nativecase), tell the user: "This adds one PermissionRequest hook. It exits at once in sessions that are not connected. It lets Buzz deny a tool call only: ❌ in the DM denies, and allow stays in Claude's terminal.amq-remote claude uninstall-approval-hookremoves it." Ask once, then runamq-remote claude install-approval-hook. If the entry is for a Claude target shared through a relay share, tell the user: "This adds one PermissionRequest hook. It exits at once in sessions that are not shared. It pins your Buzz public key and this share's relay, body, DM channel and target, so only your signed ✅, or your yes in the approval's thread, in this DM can allow a tool call. Do not allow Claude to edit .claude for a session, use bypassPermissions mode, or allow every Bash command: each lets the pin be changed. The relay is trusted to return the message's full edit and deletion history; replacing the amq-remote binary, or a settings edit you approve, defeats the pin. Run the install again if the share's relay or channel changes. Another decision hook you have can answer first.amq-remote claude uninstall-approval-hookremoves it." Ask once, then runamq-remote claude install-approval-hook --root "$ROOT". If doctor reportsclaude_approval_pin_warnings, show them to the user.- Add one line for the carrier:
- Default: "DMs arrive in this agent's AMQ inbox. Stop in Buzz stops waiting; a delivered message may still be acted on."
--native: "A DM sent while this session is busy waits. Buzz Stop cannot interrupt a Claude turn."- When