fix(mcp): distinguish roof support levels from stories

This commit is contained in:
Aymeric Rabot
2026-04-27 16:45:27 -04:00
parent 3d5c87a651
commit 058ee747c9
10 changed files with 481 additions and 25 deletions
+11
View File
@@ -45,6 +45,17 @@ export function registerCreateWall(
`Node ${levelId} is a ${parent.type}, expected level`,
)
}
if (
typeof parent.metadata === 'object' &&
parent.metadata !== null &&
'role' in parent.metadata &&
parent.metadata.role === 'roof'
) {
throwMcpError(
ErrorCode.InvalidParams,
`Roof support level ${levelId} is not an occupied story; create walls on an occupied level instead`,
)
}
const wall = WallNode.parse({
start: start as [number, number],