duplicate_memory
Create an independent copy of a memory file under a new path, giving it its own address and history. Use to fork a memory into a variant while leaving the original unchanged.
Instructions
MUTATING: copy one curated memory file to a new path under a new stable identity. Writes to local disk and appends to the change timeline. The original is left untouched, and the copy gets its own docmancer://memory address and its own history, so the two diverge from here and editing one does not affect the other. Use it to fork an existing memory into a variant. Use move_memory instead when the original should not survive. Not idempotent: calling it twice with the same new_relative_path fails on the second call rather than creating a second copy. Parameters: address identifies the file to copy; new_relative_path is the copy's path in the tree, including the .md suffix, and must not already exist; expected_hash is the source file's current content_hash from read_memory, which guards against copying a revision you have not seen; project_path project root whose memory tree the operation applies to. Omit it to use the machine-wide tree, and always omit it when this server was started pinned to a project. Returns an object with the new copy's address, path, content_hash, and revision id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Stable docmancer://memory/<id> address, relative path, or exact title of the memory file. | |
| project_path | No | Project root whose memory tree the operation applies to. Omit it to use the machine-wide tree, and always omit it when this server was started pinned to a project. | |
| expected_hash | Yes | The file's current content_hash from a prior read_memory call. A stale value fails safely instead of overwriting a newer revision. | |
| new_relative_path | Yes | Relative path, including the .md suffix, for the memory file inside its selected memory tree. |