snow-flow 10.0.28 → 10.0.29

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.28",
3
+ "version": "10.0.29",
4
4
  "name": "snow-flow",
5
5
  "description": "Snow-Flow - ServiceNow Multi-Agent Development Framework powered by AI",
6
6
  "license": "Elastic-2.0",
@@ -966,6 +966,17 @@ async function addTriggerViaGraphQL(
966
966
  }
967
967
  if (!trigDefId) return { success: false, error: 'Trigger definition not found for: ' + triggerType, steps };
968
968
 
969
+ // Validate: record-based triggers REQUIRE a table parameter
970
+ var trigNameLC = trigName.toLowerCase();
971
+ var trigTypeLC = trigType.toLowerCase();
972
+ var trigCategoryLC = trigCategory.toLowerCase();
973
+ var isRecordTrigger = ['record', 'crud'].some(function (kw) {
974
+ return trigNameLC.includes(kw) || trigTypeLC.includes(kw) || trigCategoryLC.includes(kw);
975
+ });
976
+ if (isRecordTrigger && !table) {
977
+ return { success: false, error: 'Trigger type "' + trigName + '" requires a table parameter (e.g. table: "incident"). Record-based triggers must know which table to watch.', steps };
978
+ }
979
+
969
980
  // Build full trigger inputs and outputs from triggerpicker API (matching UI format)
970
981
  // Pass empty table/condition — values are set via separate UPDATE (two-step, matching UI)
971
982
  var triggerData = await buildTriggerInputsForInsert(client, trigDefId!, trigType, undefined, undefined);