diff --git a/.claude/skills/meta-compile/scripts/meta-compile.ps1 b/.claude/skills/meta-compile/scripts/meta-compile.ps1
index c944290d..b9bdc4ad 100644
--- a/.claude/skills/meta-compile/scripts/meta-compile.ps1
+++ b/.claude/skills/meta-compile/scripts/meta-compile.ps1
@@ -1,4 +1,4 @@
-# meta-compile v1.9 — Compile 1C metadata object from JSON
+# meta-compile v1.10 — Compile 1C metadata object from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[Parameter(Mandatory)]
@@ -136,6 +136,9 @@ $script:validEnumValues = @{
"ReuseSessions" = @("DontUse","AutoUse")
"FillChecking" = @("DontCheck","ShowError","ShowWarning")
"Indexing" = @("DontIndex","Index","IndexWithAdditionalOrder")
+ "SubordinationUse" = @("ToItems","ToFolders","ToFoldersAndItems")
+ "CodeSeries" = @("WholeCatalog","WithinSubordination")
+ "ChoiceMode" = @("BothWays","QuickChoice","FromForm")
}
function Normalize-EnumValue {
@@ -498,6 +501,7 @@ function Parse-AttributeShorthand {
flags = @(if ($val.flags) { $val.flags } else { @() })
fillChecking = if ($val.fillChecking) { "$($val.fillChecking)" } else { "" }
indexing = if ($val.indexing) { "$($val.indexing)" } else { "" }
+ multiLine = if ($val.multiLine -eq $true) { $true } else { $false }
}
}
@@ -760,7 +764,8 @@ function Emit-Attribute {
param([string]$indent, $parsed, [string]$context)
# $context: "catalog", "document", "object", "processor", "tabular", "processor-tabular", "register"
$attrName = $parsed.name
- if ($script:reservedAttrNames.ContainsKey($attrName) -or $script:reservedAttrNames.ContainsValue($attrName)) {
+ if ($context -notin @("tabular", "processor-tabular") -and
+ ($script:reservedAttrNames.ContainsKey($attrName) -or $script:reservedAttrNames.ContainsValue($attrName))) {
Write-Warning "Attribute '$attrName' conflicts with a standard attribute name. This may cause errors when loading into 1C."
}
$uuid = New-Guid-String
@@ -787,7 +792,8 @@ function Emit-Attribute {
X "$indent`t`t"
X "$indent`t`tfalse"
X "$indent`t`t"
- X "$indent`t`tfalse"
+ $multiLine = if ($parsed.multiLine -eq $true -or $parsed.flags -contains "multiline") { "true" } else { "false" }
+ X "$indent`t`t$multiLine"
X "$indent`t`tfalse"
X "$indent`t`t"
X "$indent`t`t"
@@ -931,7 +937,8 @@ function Emit-Dimension {
X "$indent`t`t"
X "$indent`t`tfalse"
X "$indent`t`t"
- X "$indent`t`tfalse"
+ $multiLine = if ($parsed.multiLine -eq $true -or $parsed.flags -contains "multiline") { "true" } else { "false" }
+ X "$indent`t`t$multiLine"
X "$indent`t`tfalse"
X "$indent`t`t"
X "$indent`t`t"
@@ -1024,7 +1031,8 @@ function Emit-Resource {
X "$indent`t`t"
X "$indent`t`tfalse"
X "$indent`t`t"
- X "$indent`t`tfalse"
+ $multiLine = if ($parsed.multiLine -eq $true -or $parsed.flags -contains "multiline") { "true" } else { "false" }
+ X "$indent`t`t$multiLine"
X "$indent`t`tfalse"
X "$indent`t`t"
X "$indent`t`t"
@@ -1078,12 +1086,25 @@ function Emit-CatalogProperties {
$hierarchyType = Get-EnumProp "HierarchyType" "hierarchyType" "HierarchyFoldersAndItems"
X "$i$hierarchical"
X "$i$hierarchyType"
- X "$ifalse"
- X "$i2"
- X "$itrue"
+ $limitLevelCount = if ($def.limitLevelCount -eq $true) { "true" } else { "false" }
+ $levelCount = if ($null -ne $def.levelCount) { "$($def.levelCount)" } else { "2" }
+ $foldersOnTop = if ($def.foldersOnTop -eq $false) { "false" } else { "true" }
+ X "$i$limitLevelCount"
+ X "$i$levelCount"
+ X "$i$foldersOnTop"
X "$itrue"
- X "$i"
- X "$iToItems"
+ if ($def.owners -and $def.owners.Count -gt 0) {
+ X "$i"
+ foreach ($ownerRef in $def.owners) {
+ $fullRef = if ("$ownerRef" -match '\.') { "$ownerRef" } else { "Catalog.$ownerRef" }
+ X "$i`t$fullRef"
+ }
+ X "$i"
+ } else {
+ X "$i"
+ }
+ $subordinationUse = Get-EnumProp "SubordinationUse" "subordinationUse" "ToItems"
+ X "$i$subordinationUse"
$codeLength = if ($null -ne $def.codeLength) { "$($def.codeLength)" } else { "9" }
$descriptionLength = if ($null -ne $def.descriptionLength) { "$($def.descriptionLength)" } else { "25" }
@@ -1096,7 +1117,8 @@ function Emit-CatalogProperties {
X "$i$descriptionLength"
X "$i$codeType"
X "$i$codeAllowedLength"
- X "$iWholeCatalog"
+ $codeSeries = Get-EnumProp "CodeSeries" "codeSeries" "WholeCatalog"
+ X "$i$codeSeries"
X "$i$checkUnique"
X "$i$autonumbering"
@@ -1107,8 +1129,10 @@ function Emit-CatalogProperties {
X "$i"
X "$iAuto"
X "$iInDialog"
- X "$itrue"
- X "$iBothWays"
+ $quickChoice = if ($def.quickChoice -eq $false) { "false" } else { "true" }
+ $choiceMode = Get-EnumProp "ChoiceMode" "choiceMode" "BothWays"
+ X "$i$quickChoice"
+ X "$i$choiceMode"
X "$i"
X "$i`tCatalog.$objName.StandardAttribute.Description"
X "$i`tCatalog.$objName.StandardAttribute.Code"
diff --git a/.claude/skills/meta-compile/scripts/meta-compile.py b/.claude/skills/meta-compile/scripts/meta-compile.py
index eb2a2f53..f2742cb8 100644
--- a/.claude/skills/meta-compile/scripts/meta-compile.py
+++ b/.claude/skills/meta-compile/scripts/meta-compile.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# meta-compile v1.9 — Compile 1C metadata object from JSON
+# meta-compile v1.10 — Compile 1C metadata object from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
@@ -196,6 +196,9 @@ valid_enum_values = {
'ReuseSessions': ['DontUse', 'AutoUse'],
'FillChecking': ['DontCheck', 'ShowError', 'ShowWarning'],
'Indexing': ['DontIndex', 'Index', 'IndexWithAdditionalOrder'],
+ 'SubordinationUse': ['ToItems', 'ToFolders', 'ToFoldersAndItems'],
+ 'CodeSeries': ['WholeCatalog', 'WithinSubordination'],
+ 'ChoiceMode': ['BothWays', 'QuickChoice', 'FromForm'],
}
def normalize_enum_value(prop_name, value):
@@ -461,6 +464,7 @@ def parse_attribute_shorthand(val):
'flags': list(val.get('flags', [])),
'fillChecking': str(val['fillChecking']) if val.get('fillChecking') else '',
'indexing': str(val['indexing']) if val.get('indexing') else '',
+ 'multiLine': True if val.get('multiLine') is True else False,
}
def parse_enum_value_shorthand(val):
@@ -725,7 +729,7 @@ RESERVED_ATTR_NAMES_RU = {
def emit_attribute(indent, parsed, context):
attr_name = parsed['name']
- if attr_name in RESERVED_ATTR_NAMES or attr_name in RESERVED_ATTR_NAMES_RU:
+ if context not in ('tabular', 'processor-tabular') and (attr_name in RESERVED_ATTR_NAMES or attr_name in RESERVED_ATTR_NAMES_RU):
print(f"WARNING: Attribute '{attr_name}' conflicts with a standard attribute name. This may cause errors when loading into 1C.", file=sys.stderr)
uid = new_uuid()
X(f'{indent}')
@@ -746,7 +750,8 @@ def emit_attribute(indent, parsed, context):
X(f'{indent}\t\t')
X(f'{indent}\t\tfalse')
X(f'{indent}\t\t')
- X(f'{indent}\t\tfalse')
+ multi_line = 'true' if (parsed.get('multiLine') is True or 'multiline' in parsed.get('flags', [])) else 'false'
+ X(f'{indent}\t\t{multi_line}')
X(f'{indent}\t\tfalse')
X(f'{indent}\t\t')
X(f'{indent}\t\t')
@@ -864,7 +869,8 @@ def emit_dimension(indent, parsed, register_type):
X(f'{indent}\t\t')
X(f'{indent}\t\tfalse')
X(f'{indent}\t\t')
- X(f'{indent}\t\tfalse')
+ multi_line = 'true' if (parsed.get('multiLine') is True or 'multiline' in parsed.get('flags', [])) else 'false'
+ X(f'{indent}\t\t{multi_line}')
X(f'{indent}\t\tfalse')
X(f'{indent}\t\t')
X(f'{indent}\t\t')
@@ -937,7 +943,8 @@ def emit_resource(indent, parsed, register_type):
X(f'{indent}\t\t')
X(f'{indent}\t\tfalse')
X(f'{indent}\t\t')
- X(f'{indent}\t\tfalse')
+ multi_line = 'true' if (parsed.get('multiLine') is True or 'multiline' in parsed.get('flags', [])) else 'false'
+ X(f'{indent}\t\t{multi_line}')
X(f'{indent}\t\tfalse')
X(f'{indent}\t\t')
X(f'{indent}\t\t')
@@ -979,12 +986,24 @@ def emit_catalog_properties(indent):
hierarchy_type = get_enum_prop('HierarchyType', 'hierarchyType', 'HierarchyFoldersAndItems')
X(f'{i}{hierarchical}')
X(f'{i}{hierarchy_type}')
- X(f'{i}false')
- X(f'{i}2')
- X(f'{i}true')
+ limit_level_count = 'true' if defn.get('limitLevelCount') is True else 'false'
+ level_count = str(defn['levelCount']) if defn.get('levelCount') is not None else '2'
+ folders_on_top = 'false' if defn.get('foldersOnTop') is False else 'true'
+ X(f'{i}{limit_level_count}')
+ X(f'{i}{level_count}')
+ X(f'{i}{folders_on_top}')
X(f'{i}true')
- X(f'{i}')
- X(f'{i}ToItems')
+ owners = defn.get('owners', [])
+ if owners:
+ X(f'{i}')
+ for owner_ref in owners:
+ full_ref = owner_ref if '.' in str(owner_ref) else f'Catalog.{owner_ref}'
+ X(f'{i}\t{full_ref}')
+ X(f'{i}')
+ else:
+ X(f'{i}')
+ subordination_use = get_enum_prop('SubordinationUse', 'subordinationUse', 'ToItems')
+ X(f'{i}{subordination_use}')
code_length = str(defn['codeLength']) if defn.get('codeLength') is not None else '9'
description_length = str(defn['descriptionLength']) if defn.get('descriptionLength') is not None else '25'
code_type = get_enum_prop('CodeType', 'codeType', 'String')
@@ -995,7 +1014,8 @@ def emit_catalog_properties(indent):
X(f'{i}{description_length}')
X(f'{i}{code_type}')
X(f'{i}{code_allowed_length}')
- X(f'{i}WholeCatalog')
+ code_series = get_enum_prop('CodeSeries', 'codeSeries', 'WholeCatalog')
+ X(f'{i}{code_series}')
X(f'{i}{check_unique}')
X(f'{i}{autonumbering}')
default_presentation = get_enum_prop('DefaultPresentation', 'defaultPresentation', 'AsDescription')
@@ -1004,8 +1024,10 @@ def emit_catalog_properties(indent):
X(f'{i}')
X(f'{i}Auto')
X(f'{i}InDialog')
- X(f'{i}true')
- X(f'{i}BothWays')
+ quick_choice = 'false' if defn.get('quickChoice') is False else 'true'
+ choice_mode = get_enum_prop('ChoiceMode', 'choiceMode', 'BothWays')
+ X(f'{i}{quick_choice}')
+ X(f'{i}{choice_mode}')
X(f'{i}')
X(f'{i}\tCatalog.{obj_name}.StandardAttribute.Description')
X(f'{i}\tCatalog.{obj_name}.StandardAttribute.Code')