Expand description
POST /api/v1/file/rename: an agent renames a file or folder in its folder (Pane action
rename with target file). It is the Files pane’s and the Editor tab’s fs.rename, so the
name rules, the refusals and the fs:renamed event are the same, and every Editor tab open on
the file follows (docs/specs/SPEC_EDITOR_TAB_RENAME_2026_11_14.md §8).
A container agent names a path in its /workspace: the entry is renamed there and nowhere
else, and the answer names the new path as the container sees it. An SSH host is reached as
the user, so it takes the agent’s signed identity and the user’s consent for that host, as
pane.open does; a container agent has no such identity to give, and is told so.
Constants§
- NO_
REMOTE_ 🔒FOR_ CONTAINERS - A container agent asked for a file on an SSH host.
- NO_
WORKSPACE 🔒 - The container agent’s pane has no folder recorded.
- NO_WSL 🔒
- A WSL distribution was named as the connection.
Functions§
- forbidden 🔒
- handle_
file_ 🔒rename POST /api/v1/file/rename. agentmux-mcp’sPane(rename, targetfile) calls it.- not_
done 🔒 fs.renamesaid no: a name that exists, a name the platform refuses, no permission, a protected place.- rename_
file 🔒 - Renames
req.pathtoreq.namein its folder, for a container agent (containeris its pane) or for a caller on the host. The new path, as the caller names paths. - rename_
in_ 🔒workspace - A container agent’s rename:
rawis renamed where it lies inworkspace(its/workspaceon the host), and the answer is the container’s own name for the new path. - ssh_
host 🔒 - The SSH host
connectionnames, in its canonical form;Nonefor this computer. A WSL distribution is refused: its files are renamed by their Windows path.
Type Aliases§
- Refusal 🔒
- A refusal: its status, and the sentence the caller is told.