snow-flow 4.5.46 → 4.5.47

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/README.md CHANGED
@@ -9,6 +9,11 @@
9
9
 
10
10
  ---
11
11
 
12
+ TO FIX TEMP CLAUDE CODE INK ERROR, RUN BEFORE SWARM COMMAND:
13
+ ```bash
14
+ npm install -g @anthropic-ai/claude-code@1.0.95 --save-exact
15
+ ```
16
+
12
17
  ## What is Snow-Flow?
13
18
 
14
19
  Snow-Flow is a conversational ServiceNow development platform that bridges Claude Code with ServiceNow through specialized MCP (Model Context Protocol) servers. Instead of navigating ServiceNow's web interface, you develop through natural conversation with Claude Code, which orchestrates multi-agent workflows to handle complex ServiceNow operations.
@@ -310,4 +315,4 @@ MIT License - see [LICENSE](LICENSE) file for details.
310
315
 
311
316
  ---
312
317
 
313
- **Snow-Flow: Conversational ServiceNow development through Claude Code.**
318
+ **Snow-Flow: Conversational ServiceNow development through Claude Code.**
@@ -2582,6 +2582,15 @@ ${configList}${layoutsText}${offlineText}
2582
2582
  async snow_create_ux_experience(args) {
2583
2583
  try {
2584
2584
  this.logger.info(`Creating UX Experience: ${args.name}`);
2585
+ // Test mode validation - reject fake test data
2586
+ if (args.name && (args.name.toLowerCase().includes('test') || args.name === 'Test Experience')) {
2587
+ return {
2588
+ success: false,
2589
+ error: 'Test mode detected. This tool requires a real workspace name.',
2590
+ suggestion: 'Use a realistic workspace name like "IT Support Workspace" or "Customer Service Hub"',
2591
+ test_mode: true
2592
+ };
2593
+ }
2585
2594
  // Find default shell macroponent - usually x_snc_app_shell_uib_app_shell
2586
2595
  const shellQuery = await this.client.searchRecords('sys_ux_macroponent', 'name=x_snc_app_shell_uib_app_shell');
2587
2596
  let shellSysId = null;
@@ -2600,8 +2609,19 @@ ${configList}${layoutsText}${offlineText}
2600
2609
  root_macroponent: shellSysId,
2601
2610
  description: args.description || `Experience for ${args.name}`
2602
2611
  };
2612
+ // Check if UX framework is available
2613
+ const uxCheck = await this.client.searchRecords('sys_ux_experience', '', 1);
2614
+ if (!uxCheck.success) {
2615
+ return {
2616
+ success: false,
2617
+ error: 'Now Experience Framework (UXF) is not available in this ServiceNow instance.',
2618
+ suggestion: 'UX Workspace creation requires the Now Experience Framework plugin. Contact your ServiceNow administrator.',
2619
+ plugin_required: 'Now Experience Framework (UXF)',
2620
+ licensing_note: 'UXF may require additional ServiceNow licensing'
2621
+ };
2622
+ }
2603
2623
  const result = await this.client.createRecord('sys_ux_experience', experienceData);
2604
- if (result.success) {
2624
+ if (result.success && result.data && result.data.result && result.data.result.sys_id) {
2605
2625
  this.logger.info(`✅ UX Experience created with sys_id: ${result.data.result.sys_id}`);
2606
2626
  return {
2607
2627
  success: true,
@@ -2611,7 +2631,8 @@ ${configList}${layoutsText}${offlineText}
2611
2631
  };
2612
2632
  }
2613
2633
  else {
2614
- throw new Error(`Failed to create experience: ${result.data.error}`);
2634
+ const error = (result.data && result.data.error) || (result.error) || 'Unknown error creating experience';
2635
+ throw new Error(`Failed to create experience: ${error}`);
2615
2636
  }
2616
2637
  }
2617
2638
  catch (error) {
@@ -2626,10 +2647,23 @@ ${configList}${layoutsText}${offlineText}
2626
2647
  async snow_create_ux_app_config(args) {
2627
2648
  try {
2628
2649
  this.logger.info(`Creating UX App Config: ${args.name}`);
2650
+ // Validate experience_sys_id format
2651
+ if (!args.experience_sys_id || args.experience_sys_id.length !== 32) {
2652
+ return {
2653
+ success: false,
2654
+ error: `Invalid experience_sys_id: '${args.experience_sys_id}'. Must be a valid 32-character ServiceNow sys_id.`,
2655
+ suggestion: 'Use the sys_id returned from snow_create_ux_experience (Step 1)',
2656
+ validation_error: true
2657
+ };
2658
+ }
2629
2659
  // Validate experience exists
2630
2660
  const experienceCheck = await this.client.getRecord('sys_ux_experience', args.experience_sys_id);
2631
2661
  if (!experienceCheck.success) {
2632
- throw new Error(`Experience with sys_id ${args.experience_sys_id} not found`);
2662
+ return {
2663
+ success: false,
2664
+ error: `Experience with sys_id ${args.experience_sys_id} not found. Please create the experience first using snow_create_ux_experience.`,
2665
+ suggestion: 'Run Step 1: snow_create_ux_experience before creating app config'
2666
+ };
2633
2667
  }
2634
2668
  // Create app config record
2635
2669
  const configData = {
@@ -2639,7 +2673,7 @@ ${configList}${layoutsText}${offlineText}
2639
2673
  // landing_page_route will be set in Step 6
2640
2674
  };
2641
2675
  const result = await this.client.createRecord('sys_ux_app_config', configData);
2642
- if (result.success) {
2676
+ if (result.success && result.data && result.data.result && result.data.result.sys_id) {
2643
2677
  this.logger.info(`✅ UX App Config created with sys_id: ${result.data.result.sys_id}`);
2644
2678
  return {
2645
2679
  success: true,
@@ -2649,7 +2683,8 @@ ${configList}${layoutsText}${offlineText}
2649
2683
  };
2650
2684
  }
2651
2685
  else {
2652
- throw new Error(`Failed to create app config: ${result.data.error}`);
2686
+ const error = (result.data && result.data.error) || (result.error) || 'Unknown error creating app config';
2687
+ throw new Error(`Failed to create app config: ${error}`);
2653
2688
  }
2654
2689
  }
2655
2690
  catch (error) {
@@ -2680,7 +2715,7 @@ ${configList}${layoutsText}${offlineText}
2680
2715
  description: args.description || `Page macroponent for ${args.name}`
2681
2716
  };
2682
2717
  const result = await this.client.createRecord('sys_ux_macroponent', macroponentData);
2683
- if (result.success) {
2718
+ if (result.success && result.data && result.data.result && result.data.result.sys_id) {
2684
2719
  this.logger.info(`✅ UX Page Macroponent created with sys_id: ${result.data.result.sys_id}`);
2685
2720
  return {
2686
2721
  success: true,
@@ -2690,7 +2725,8 @@ ${configList}${layoutsText}${offlineText}
2690
2725
  };
2691
2726
  }
2692
2727
  else {
2693
- throw new Error(`Failed to create page macroponent: ${result.data.error}`);
2728
+ const error = (result.data && result.data.error) || (result.error) || 'Unknown error creating page macroponent';
2729
+ throw new Error(`Failed to create page macroponent: ${error}`);
2694
2730
  }
2695
2731
  }
2696
2732
  catch (error) {
@@ -2708,11 +2744,19 @@ ${configList}${layoutsText}${offlineText}
2708
2744
  // Validate app config and macroponent exist
2709
2745
  const configCheck = await this.client.getRecord('sys_ux_app_config', args.app_config_sys_id);
2710
2746
  if (!configCheck.success) {
2711
- throw new Error(`App Config with sys_id ${args.app_config_sys_id} not found`);
2747
+ return {
2748
+ success: false,
2749
+ error: `App Config with sys_id ${args.app_config_sys_id} not found. Please create the app config first using snow_create_ux_app_config.`,
2750
+ suggestion: 'Run Step 2: snow_create_ux_app_config before creating page registry'
2751
+ };
2712
2752
  }
2713
2753
  const macroponentCheck = await this.client.getRecord('sys_ux_macroponent', args.macroponent_sys_id);
2714
2754
  if (!macroponentCheck.success) {
2715
- throw new Error(`Macroponent with sys_id ${args.macroponent_sys_id} not found`);
2755
+ return {
2756
+ success: false,
2757
+ error: `Macroponent with sys_id ${args.macroponent_sys_id} not found. Please create the macroponent first using snow_create_ux_page_macroponent.`,
2758
+ suggestion: 'Run Step 3: snow_create_ux_page_macroponent before creating page registry'
2759
+ };
2716
2760
  }
2717
2761
  // Create page registry record
2718
2762
  const registryData = {
@@ -2722,7 +2766,7 @@ ${configList}${layoutsText}${offlineText}
2722
2766
  description: args.description || `Page registry for ${args.sys_name}`
2723
2767
  };
2724
2768
  const result = await this.client.createRecord('sys_ux_page_registry', registryData);
2725
- if (result.success) {
2769
+ if (result.success && result.data && result.data.result && result.data.result.sys_id) {
2726
2770
  this.logger.info(`✅ UX Page Registry created with sys_id: ${result.data.result.sys_id}`);
2727
2771
  return {
2728
2772
  success: true,
@@ -2733,7 +2777,8 @@ ${configList}${layoutsText}${offlineText}
2733
2777
  };
2734
2778
  }
2735
2779
  else {
2736
- throw new Error(`Failed to create page registry: ${result.data.error}`);
2780
+ const error = (result.data && result.data.error) || (result.error) || 'Unknown error creating page registry';
2781
+ throw new Error(`Failed to create page registry: ${error}`);
2737
2782
  }
2738
2783
  }
2739
2784
  catch (error) {
@@ -2751,7 +2796,11 @@ ${configList}${layoutsText}${offlineText}
2751
2796
  // Validate app config exists
2752
2797
  const configCheck = await this.client.getRecord('sys_ux_app_config', args.app_config_sys_id);
2753
2798
  if (!configCheck.success) {
2754
- throw new Error(`App Config with sys_id ${args.app_config_sys_id} not found`);
2799
+ return {
2800
+ success: false,
2801
+ error: `App Config with sys_id ${args.app_config_sys_id} not found. Please create the app config first using snow_create_ux_app_config.`,
2802
+ suggestion: 'Run Step 2: snow_create_ux_app_config before creating route'
2803
+ };
2755
2804
  }
2756
2805
  // Create route record
2757
2806
  const routeData = {
@@ -2762,7 +2811,7 @@ ${configList}${layoutsText}${offlineText}
2762
2811
  description: args.description || `Route for page ${args.page_sys_name}`
2763
2812
  };
2764
2813
  const result = await this.client.createRecord('sys_ux_app_route', routeData);
2765
- if (result.success) {
2814
+ if (result.success && result.data && result.data.result && result.data.result.sys_id) {
2766
2815
  this.logger.info(`✅ UX App Route created with sys_id: ${result.data.result.sys_id}`);
2767
2816
  return {
2768
2817
  success: true,
@@ -2774,7 +2823,8 @@ ${configList}${layoutsText}${offlineText}
2774
2823
  };
2775
2824
  }
2776
2825
  else {
2777
- throw new Error(`Failed to create app route: ${result.data.error}`);
2826
+ const error = (result.data && result.data.error) || (result.error) || 'Unknown error creating app route';
2827
+ throw new Error(`Failed to create app route: ${error}`);
2778
2828
  }
2779
2829
  }
2780
2830
  catch (error) {
@@ -2804,7 +2854,8 @@ ${configList}${layoutsText}${offlineText}
2804
2854
  };
2805
2855
  }
2806
2856
  else {
2807
- throw new Error(`Failed to update app config: ${result.data.error}`);
2857
+ const error = (result.data && result.data.error) || (result.error) || 'Unknown error updating app config';
2858
+ throw new Error(`Failed to update app config: ${error}`);
2808
2859
  }
2809
2860
  }
2810
2861
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "4.5.46",
3
+ "version": "4.5.47",
4
4
  "description": "Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 240+ ServiceNow tools including complete 6-step UX Workspace creation workflow.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",