diff --git a/.claude/skills/skd-compile/scripts/skd-compile.ps1 b/.claude/skills/skd-compile/scripts/skd-compile.ps1
index 184aa66e..355790f4 100644
--- a/.claude/skills/skd-compile/scripts/skd-compile.ps1
+++ b/.claude/skills/skd-compile/scripts/skd-compile.ps1
@@ -1,4 +1,4 @@
-# skd-compile v1.40 — Compile 1C DCS from JSON
+# skd-compile v1.41 — Compile 1C DCS from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
param(
[string]$DefinitionFile,
@@ -853,6 +853,10 @@ function Emit-Field {
if ($fieldDef.attrRestrict) {
$f["attrRestrict"] = @($fieldDef.attrRestrict)
}
+ # availableValues — array of {value, presentation}
+ if ($fieldDef.availableValues) {
+ $f["availableValues"] = $fieldDef.availableValues
+ }
# orderExpression — {expression, orderType, autoOrder}
if ($fieldDef.orderExpression) {
$f["orderExpression"] = $fieldDef.orderExpression
@@ -956,6 +960,27 @@ function Emit-Field {
X "$indent`t"
}
+ # AvailableValues — list of allowed values with optional multilang presentation
+ if ($f["availableValues"]) {
+ foreach ($av in $f["availableValues"]) {
+ X "$indent`t"
+ $avVal = $av.value
+ $avType = if ($av.valueType) { "$($av.valueType)" } else { '' }
+ if (-not $avType) {
+ if ($avVal -is [bool]) { $avType = 'xs:boolean' }
+ elseif ($avVal -is [int] -or $avVal -is [long] -or $avVal -is [double]) { $avType = 'xs:decimal' }
+ elseif ("$avVal" -match '^\d{4}-\d{2}-\d{2}T') { $avType = 'xs:dateTime' }
+ else { $avType = 'xs:string' }
+ }
+ $avStr = if ($avVal -is [bool]) { "$avVal".ToLower() } else { Esc-Xml "$avVal" }
+ X "$indent`t`t$avStr"
+ if ($av.presentation) {
+ Emit-MLText -tag "presentation" -text $av.presentation -indent "$indent`t`t"
+ }
+ X "$indent`t"
+ }
+ }
+
# Appearance
if ($f.appearance -and $f.appearance.Count -gt 0) {
X "$indent`t"
diff --git a/.claude/skills/skd-compile/scripts/skd-compile.py b/.claude/skills/skd-compile/scripts/skd-compile.py
index 0eb42577..8cd1ed12 100644
--- a/.claude/skills/skd-compile/scripts/skd-compile.py
+++ b/.claude/skills/skd-compile/scripts/skd-compile.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# skd-compile v1.40 — Compile 1C DCS from JSON
+# skd-compile v1.41 — Compile 1C DCS from JSON
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
import json
@@ -646,6 +646,9 @@ def emit_field(lines, field_def, indent):
# attrRestrict
if field_def.get('attrRestrict'):
f['attrRestrict'] = list(field_def['attrRestrict'])
+ # availableValues — array of {value, presentation}
+ if field_def.get('availableValues'):
+ f['availableValues'] = field_def['availableValues']
# orderExpression — {expression, orderType, autoOrder}
if field_def.get('orderExpression'):
f['orderExpression'] = field_def['orderExpression']
@@ -732,6 +735,27 @@ def emit_field(lines, field_def, indent):
emit_value_type(lines, f['type'], f'{indent}\t\t')
lines.append(f'{indent}\t')
+ # AvailableValues — list of allowed values with optional multilang presentation
+ if f.get('availableValues'):
+ for av in f['availableValues']:
+ lines.append(f'{indent}\t')
+ av_val = av.get('value')
+ av_type = str(av.get('valueType', '')) if av.get('valueType') else ''
+ if not av_type:
+ if isinstance(av_val, bool):
+ av_type = 'xs:boolean'
+ elif isinstance(av_val, (int, float)):
+ av_type = 'xs:decimal'
+ elif re.match(r'^\d{4}-\d{2}-\d{2}T', str(av_val)):
+ av_type = 'xs:dateTime'
+ else:
+ av_type = 'xs:string'
+ av_str = str(av_val).lower() if isinstance(av_val, bool) else esc_xml(str(av_val))
+ lines.append(f'{indent}\t\t{av_str}')
+ if av.get('presentation'):
+ emit_mltext(lines, f'{indent}\t\t', 'presentation', av['presentation'])
+ lines.append(f'{indent}\t')
+
# Appearance
if f.get('appearance') and len(f['appearance']) > 0:
lines.append(f'{indent}\t')