Skip to main content

Module ops

Module ops 

Source
Expand description

Edits that must mean the same thing in every client (the editor, the CLI, an agent over MCP): renaming a node and renaming a type or link type. Each takes the model and returns an Edit: the nodes to write (new or changed files) and the ids whose files go. Nothing here touches the disk.

Structs§

Edit
What a rename changes: write each node in write (by its id) and remove the files of the ids in delete.

Functions§

id_problem
Why to cannot be the id of the node now called from, or None.
rename_def
Rename a type or a link type, given its definition node, and everything that uses the old name: nodes of the type (or links of the link type), rule filters and checks, and link types whose from/to list the type. With ids, nodes of a renamed type whose id follows <type>-name get the new type in their id too (references are fixed).
rename_node
Rename a node (its file, and every link, parent, plane membership and rule filter that names it).