You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move a wiki page through the CLI and MCP, with a skill for renaming entities #227
Add a CLI command and MCP operation to move a wiki page, and a skill that documents how to rename or retitle an entity.
Problem
Since #226, an entity of a Category:Property subclass is stored at Property:<name>. An update is refused when the uuid already exists on another Property: page. This happens in two cases:
The update changes name of a property.
The property lives on an old page Property:OSW<uuid> and its name differs from that title. On wiki-dev.open-semantic-lab.org a title search finds 40 pages titled Property:OSW....
The error tells the user to move the old page to the new title and then repeat the update. The CLI and the MCP server have no way to do that. WtPage.move exists in https://github.com/OpenSemanticLab/osw-python/blob/main/src/osw/wtsite.py, but no command or operation calls it, so an agent cannot follow the error message.
Proposal
A move operation in osw.service.ops, exposed as a CLI command (for example osw page move <from> <to>) and as an MCP tool.
Keep a redirect at the old title by default.
Guard it with the provenance ledger in the same way as delete_entity, so pages this server did not write need an explicit confirmation.
Refuse when the target title already exists. On wiki-dev, Property:HasDirectoryTree and Property:HasComponentRole exist next to old OSW-id pages with the same name.
A skill for creating and changing entities, shipped with the package next to osl-tasks. It documents the procedure an agent follows when a store is refused because the uuid exists under another title:
Read the entity and confirm that the rename is intended.
Move the page to the new title with the move operation, keeping the redirect.
Repeat the update with the new name, without meta.wiki_page.title.
The skill should warn against writing the old title into meta.wiki_page.title before a move. get_title prefers that field, so after the move the next update would target the old title again.
Open point
It is not verified whether the redirect left by a move keeps HasUuid in SMW. If it does, the check from #226 refuses the update after the move. The move operation would then need to handle the redirect, or the check would need to ignore redirect pages.
Activity