Repository navigation
Description
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
nameof a property. - The property lives on an old page
Property:OSW<uuid>and itsnamediffers from that title. On wiki-dev.open-semantic-lab.org a title search finds 40 pages titledProperty: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 exampleosw 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:HasDirectoryTreeandProperty:HasComponentRoleexist next to old OSW-id pages with the samename. - Report the SMW error
smw-change-propagation-protectionclearly. In a live test in feat: title Property entities by name and refuse a rename on update #226, SMW locked a property page for about 27 minutes after an update.
-
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, withoutmeta.wiki_page.title.
The skill should warn against writing the old title into
meta.wiki_page.titlebefore a move.get_titleprefers 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