snow-flow 10.0.1-dev.482 → 10.0.1-dev.484

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "10.0.1-dev.482",
3
+ "version": "10.0.1-dev.484",
4
4
  "name": "snow-flow",
5
5
  "description": "Snow-Flow - ServiceNow Multi-Agent Development Framework powered by AI",
6
6
  "license": "Elastic-2.0",
@@ -1169,10 +1169,9 @@ async function addActionViaGraphQL(
1169
1169
  var inp = recordActionResult.inputs[ri];
1170
1170
  var val = inp.value?.value || '';
1171
1171
  if (inp.name === 'record' && val.startsWith('{{')) {
1172
- // Both value and displayValue must be set (matching processflow XML format)
1172
+ // UI only sends `value` for the record pill (no displayValue)
1173
1173
  updateInputs.push({
1174
1174
  name: 'record',
1175
- displayValue: { schemaless: false, schemalessValue: '', value: val },
1176
1175
  value: { schemaless: false, schemalessValue: '', value: val }
1177
1176
  });
1178
1177
  } else if (inp.name === 'table_name') {
@@ -1702,15 +1701,22 @@ async function transformActionInputsForRecordAction(
1702
1701
 
1703
1702
  if (isShorthand || !recordVal) {
1704
1703
  // Auto-fill with trigger's current record data pill
1705
- // The processflow XML shows both value AND displayValue must be set to the pill reference
1704
+ // UI only sends the pill in `value`; displayValue stays empty
1706
1705
  var pillRef = '{{' + dataPillBase + '}}';
1707
1706
  recordInput.value = { schemaless: false, schemalessValue: '', value: pillRef };
1708
- recordInput.displayValue = { schemaless: false, schemalessValue: '', value: pillRef };
1707
+ recordInput.displayValue = { value: '' };
1709
1708
  usedInstances.push({ uiUniqueIdentifier: uuid, inputName: 'record' });
1710
1709
  steps.record_transform = { original: recordVal, pill: pillRef };
1711
1710
  } else if (isAlreadyPill) {
1712
- // Also ensure displayValue is set for existing pill references
1713
- recordInput.displayValue = { schemaless: false, schemalessValue: '', value: recordVal };
1711
+ // Check if the pill contains a shorthand that needs rewriting to the full dataPillBase
1712
+ var innerVal = recordVal.replace(/^\{\{/, '').replace(/\}\}$/, '').trim();
1713
+ if (RECORD_PILL_SHORTHANDS.includes(innerVal.toLowerCase())) {
1714
+ var pillRef2 = '{{' + dataPillBase + '}}';
1715
+ recordInput.value = { schemaless: false, schemalessValue: '', value: pillRef2 };
1716
+ steps.record_transform = { original: recordVal, pill: pillRef2 };
1717
+ }
1718
+ // UI keeps displayValue empty for pill references
1719
+ recordInput.displayValue = { value: '' };
1714
1720
  usedInstances.push({ uiUniqueIdentifier: uuid, inputName: 'record' });
1715
1721
  }
1716
1722
  }
@@ -1816,7 +1822,8 @@ async function transformActionInputsForRecordAction(
1816
1822
  reference_display: tblLabel,
1817
1823
  type: 'reference',
1818
1824
  base_type: 'reference',
1819
- attributes: {},
1825
+ attributes: '',
1826
+ choices: {},
1820
1827
  usedInstances: usedInstances
1821
1828
  });
1822
1829
 
@@ -1866,7 +1873,7 @@ async function transformActionInputsForRecordAction(
1866
1873
  base_type: fMeta.type,
1867
1874
  parent_table_name: tableRef,
1868
1875
  column_name: fieldCol,
1869
- attributes: {},
1876
+ attributes: '',
1870
1877
  usedInstances: [{ uiUniqueIdentifier: uuid, inputName: fieldCol }]
1871
1878
  });
1872
1879
  }
@@ -2174,7 +2181,7 @@ async function addFlowLogicViaGraphQL(
2174
2181
  inputs: [
2175
2182
  {
2176
2183
  name: 'condition_name',
2177
- value: { schemaless: false, schemalessValue: '', value: 'label' }
2184
+ value: { schemaless: false, schemalessValue: '', value: inputResult.resolvedInputs['condition_name'] || '' }
2178
2185
  },
2179
2186
  {
2180
2187
  name: 'condition',