diff --git a/.claude/skills/cfe-borrow/scripts/cfe-borrow.ps1 b/.claude/skills/cfe-borrow/scripts/cfe-borrow.ps1 index 22a6cff2..d0eb3dfd 100644 --- a/.claude/skills/cfe-borrow/scripts/cfe-borrow.ps1 +++ b/.claude/skills/cfe-borrow/scripts/cfe-borrow.ps1 @@ -489,7 +489,7 @@ function Borrow-Form { if ($fc.LocalName -eq 'ChildItems' -and -not $srcChildItems) { $reachedVisual = $true; $srcChildItems = $fc; continue } - if ($fc.LocalName -eq 'Events' -or $fc.LocalName -eq 'Attributes' -or $fc.LocalName -eq 'Commands' -or $fc.LocalName -eq 'Parameters') { + if ($fc.LocalName -eq 'Events' -or $fc.LocalName -eq 'Attributes' -or $fc.LocalName -eq 'Commands' -or $fc.LocalName -eq 'Parameters' -or $fc.LocalName -eq 'CommandSet') { $reachedVisual = $true; continue } if (-not $reachedVisual) { @@ -507,6 +507,8 @@ function Borrow-Form { $autoCmdXml = [regex]::Replace($autoCmdXml, $nsStripPattern, '') $autoCmdXml = [regex]::Replace($autoCmdXml, '[^<]*', '0') $autoCmdXml = $autoCmdXml -replace 'true', 'false' + # Strip ExcludedCommand (references to standard commands invalid in extension) + $autoCmdXml = [regex]::Replace($autoCmdXml, '\s*[^<]*', '') } # ChildItems: copy full tree, clean up base-config references @@ -520,6 +522,10 @@ function Borrow-Form { $childItemsXml = [regex]::Replace($childItemsXml, '\s*[^<]*', '') # Strip TitleDataPath (e.g. Объект.Товары.RowsCount — invalid without base attributes) $childItemsXml = [regex]::Replace($childItemsXml, '\s*[^<]*', '') + # Strip RowPictureDataPath (e.g. Список.СостояниеДокумента — invalid in extension) + $childItemsXml = [regex]::Replace($childItemsXml, '\s*[^<]*', '') + # Strip ExcludedCommand in nested AutoCommandBars (references to standard commands invalid in extension) + $childItemsXml = [regex]::Replace($childItemsXml, '\s*[^<]*', '') # Strip TypeLink blocks with human-readable DataPath (Items.XXX — can't convert to UUID) $childItemsXml = [regex]::Replace($childItemsXml, '(?s)\s*\s*Items\.[^<]*.*?', '') # Strip element-level Events (base form handlers not in extension) diff --git a/.claude/skills/cfe-borrow/scripts/cfe-borrow.py b/.claude/skills/cfe-borrow/scripts/cfe-borrow.py index 4c082d2e..3fd990fc 100644 --- a/.claude/skills/cfe-borrow/scripts/cfe-borrow.py +++ b/.claude/skills/cfe-borrow/scripts/cfe-borrow.py @@ -662,7 +662,7 @@ def main(): reached_visual = True src_auto_cmd = fc continue - if ln in ("ChildItems", "Events", "Attributes", "Commands", "Parameters"): + if ln in ("ChildItems", "Events", "Attributes", "Commands", "Parameters", "CommandSet"): reached_visual = True continue if not reached_visual: @@ -678,6 +678,8 @@ def main(): auto_cmd_xml = ns_strip_pattern.sub("", auto_cmd_xml) auto_cmd_xml = re.sub(r'[^<]*', '0', auto_cmd_xml) auto_cmd_xml = auto_cmd_xml.replace('true', 'false') + # Strip ExcludedCommand (references to standard commands invalid in extension) + auto_cmd_xml = re.sub(r'\s*[^<]*', '', auto_cmd_xml) # ChildItems: copy full tree, clean up base-config references child_items_xml = "" @@ -696,6 +698,10 @@ def main(): child_items_xml = re.sub(r'\s*[^<]*', '', child_items_xml) # Strip TitleDataPath child_items_xml = re.sub(r'\s*[^<]*', '', child_items_xml) + # Strip RowPictureDataPath (e.g. Список.СостояниеДокумента — invalid in extension) + child_items_xml = re.sub(r'\s*[^<]*', '', child_items_xml) + # Strip ExcludedCommand in nested AutoCommandBars (references to standard commands invalid in extension) + child_items_xml = re.sub(r'\s*[^<]*', '', child_items_xml) # Strip TypeLink blocks with human-readable DataPath (Items.XXX) child_items_xml = re.sub(r'\s*\s*Items\.[^<]*.*?', '', child_items_xml, flags=re.DOTALL) # Strip element-level Events