snow-flow 4.5.2 → 4.5.5

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.
@@ -1,3 +1,3 @@
1
- export declare const CLAUDE_MD_TEMPLATE = "# Snow-Flow ServiceNow Development Framework\n\n## \uD83D\uDEA8 ABSOLUTE RULES - NO EXCEPTIONS\n\n### \uD83D\uDD34 CRITICAL: Widget Debugging MUST Use Local Sync!\n\n**When user reports ANY widget issue, ALWAYS use:**\n```\nsnow_pull_artifact({ sys_id: 'widget_sys_id' })\n```\n\n**NEVER use snow_query_table for widgets!** It will hit token limits and you can't use native tools.\n\n**Common scenarios requiring snow_pull_artifact:**\n- \"Widget skips questions\" \u2192 snow_pull_artifact\n- \"Form doesn't submit\" \u2192 snow_pull_artifact \n- \"Data not displaying\" \u2192 snow_pull_artifact\n- \"Button doesn't work\" \u2192 snow_pull_artifact\n- \"Debug this widget\" \u2192 snow_pull_artifact\n- \"Fix widget issue\" \u2192 snow_pull_artifact\n- Widget script > 1000 chars \u2192 snow_pull_artifact\n\n### Rule #1: NO MOCK DATA - EVERYTHING REAL & COMPLETE\n**FORBIDDEN:** Mock data, placeholders, TODOs, stub implementations, test values, simulations, \"this would normally...\", partial implementations.\n**REQUIRED:** Complete, production-ready, fully functional code. Take time to implement EVERYTHING properly. Real integrations, comprehensive error handling, full validation.\n\n### Rule #2: ES5 ONLY - ServiceNow Rhino Engine\n**NEVER USE:** const/let, arrow functions =>, template literals `${}`, destructuring, for...of, default parameters, classes\n**ALWAYS USE:** var, function(){}, string concatenation +, traditional for loops, typeof checks\n\n### Rule #3: VERIFY FIRST - Never Assume\nTest before claiming broken. Check resources exist. Validate configurations. Evidence-based fixes only.\n\n## \uD83D\uDCCB MCP SERVERS & TOOLS (18 Servers, 200+ Tools)\n\n### 1. **servicenow-local-development** \uD83D\uDD27 Widget/Artifact Sync [USE THIS FOR WIDGETS!]\n```\nsnow_pull_artifact - Pull ANY artifact to local files (ALWAYS use for widgets!)\nsnow_push_artifact - Push local changes back to ServiceNow \nsnow_cleanup_artifacts - Clean local artifact cache\nsnow_get_sync_status - Check artifact sync status\nsnow_list_local_artifacts - List all pulled artifacts\n```\n**\u26A0\uFE0F CRITICAL: For ANY widget work, use snow_pull_artifact FIRST, not snow_query_table!**\n\n### 2. **servicenow-deployment** \uD83D\uDE80 Complete Deployment System\n```\nsnow_deploy - Create NEW artifacts (widgets, flows, scripts, pages)\nsnow_update - UPDATE existing artifacts directly\nsnow_validate_deployment - Validate before deploy\nsnow_rollback_deployment - Rollback failed deployments\nsnow_preview_widget - Preview widget rendering\nsnow_widget_test - Test widget functionality\nsnow_deployment_history - View deployment history\nsnow_check_widget_coherence - Validate HTML/Client/Server communication\n```\n\n### 3. **servicenow-operations** \uD83D\uDCCA Core Operations\n```\nsnow_query_table - Universal table query (NOT for widgets - use snow_pull_artifact!)\nsnow_query_incidents - Query and analyze incidents\nsnow_analyze_incident - AI-powered incident analysis\nsnow_auto_resolve_incident - Automated resolution\nsnow_cmdb_search - Configuration database search\nsnow_user_lookup - Find users and groups\nsnow_operational_metrics - Performance metrics\nsnow_knowledge_search - Search knowledge base\nsnow_catalog_item_manager - Manage service catalog\n```\n\n### 4. **servicenow-automation** \u2699\uFE0F Scripts & Automation\n```\nsnow_execute_background_script - Run ES5 scripts (autoConfirm available)\nsnow_execute_script_with_output - Execute with output capture\nsnow_execute_script_sync - Synchronous execution\nsnow_get_script_output - Retrieve script results\nsnow_schedule_job - Create scheduled jobs\nsnow_create_event - Trigger system events\nsnow_get_logs - Access system logs\nsnow_test_rest_connection - Test REST endpoints\nsnow_trace_execution - Performance tracing\n```\n\n### 5. **servicenow-platform-development** \uD83C\uDFD7\uFE0F Development Artifacts\n```\nsnow_create_ui_page - Create UI pages\nsnow_create_script_include - Reusable scripts\nsnow_create_business_rule - Business rules\nsnow_create_client_script - Client-side scripts\nsnow_create_ui_policy - UI policies\nsnow_create_ui_action - UI actions\nsnow_create_acl - Access controls\nsnow_create_ui_macro - UI macros\n```\n\n### 6. **servicenow-integration** \uD83D\uDD0C Integrations\n```\nsnow_create_rest_message - REST integrations\nsnow_create_soap_message - SOAP integrations\nsnow_create_transform_map - Data transformation\nsnow_create_import_set - Import management\nsnow_test_web_service - Test services\nsnow_configure_email - Email configuration\nsnow_create_data_source - Data sources\n```\n\n### 7. **servicenow-system-properties** \u2699\uFE0F Properties\n```\nsnow_property_get - Get property value\nsnow_property_set - Set property value\nsnow_property_list - List by pattern\nsnow_property_bulk_update - Bulk operations\nsnow_property_export/import - Export/Import JSON\nsnow_property_validate - Validate properties\n```\n\n### 8. **servicenow-update-set** \uD83D\uDCE6 Change Management\n```\nsnow_update_set_create - Create update set\nsnow_update_set_switch - Switch active set\nsnow_update_set_complete - Mark complete\nsnow_update_set_export - Export as XML\nsnow_update_set_preview - Preview changes\nsnow_ensure_active_update_set - Auto-create if needed\n```\n\n### 9. **servicenow-development-assistant** \uD83E\uDD16 AI Assistant\n```\nsnow_find_artifact - Find any artifact by name/type\nsnow_edit_artifact - Edit existing artifacts\nsnow_analyze_artifact - Analyze dependencies\nsnow_comprehensive_search - Deep search all tables\nsnow_analyze_requirements - Requirement analysis\nsnow_generate_code - Pattern-based generation\nsnow_optimize_script - Performance optimization\n```\n\n### 10. **servicenow-security-compliance** \uD83D\uDEE1\uFE0F Security\n```\nsnow_create_security_policy - Security policies\nsnow_audit_compliance - SOX/GDPR/HIPAA audit\nsnow_scan_vulnerabilities - Vulnerability scan\nsnow_assess_risk - Risk assessment\nsnow_review_access_control - ACL review\nsnow_encrypt_field - Field encryption\nsnow_audit_trail_analysis - Audit analysis\n```\n\n### 11. **servicenow-reporting-analytics** \uD83D\uDCC8 Reporting\n```\nsnow_create_report - Create reports\nsnow_create_dashboard - Build dashboards\nsnow_define_kpi - Define KPIs\nsnow_schedule_report - Schedule delivery\nsnow_analyze_data_quality - Data quality\nsnow_create_pa_widget - Performance analytics\n```\n\n### 12. **servicenow-machine-learning** \uD83E\uDDE0 AI/ML\n```\nml_train_incident_classifier - Train LSTM classifier\nml_predict_change_risk - Risk prediction\nml_detect_anomalies - Anomaly detection\nml_forecast_incidents - Time series forecast\nml_cluster_similar - Similarity clustering\nml_performance_analytics - Native PA ML\n```\n\n### 13. **servicenow-change-virtualagent-pa** \uD83D\uDD04 Change & Virtual Agent\n```\nsnow_create_change_request - Change requests\nsnow_assess_change_risk - Risk assessment\nsnow_create_nlu_model - NLU models\nsnow_train_virtual_agent - Train VA\nsnow_configure_conversation - VA conversations\nsnow_analyze_pa_trends - Performance trends\n```\n\n### 14. **servicenow-cmdb-event-hr-csm-devops** \uD83C\uDFE2 Enterprise\n```\nsnow_manage_ci - Configuration items\nsnow_correlate_events - Event correlation\nsnow_manage_hr_case - HR cases\nsnow_csm_project - Customer projects\nsnow_devops_pipeline - CI/CD pipelines\nsnow_manage_cmdb_relationships - CI relationships\n```\n\n### 15. **servicenow-knowledge-catalog** \uD83D\uDCDA Knowledge & Catalog (v3.6.10 Corrected!)\n```\nsnow_create_knowledge_article - KB articles\nsnow_create_catalog_item - Catalog items\nsnow_create_catalog_variable - Variable sets\nsnow_create_catalog_ui_policy - CORRECTED: Creates in 2 tables (conditions as string, actions as records)\nsnow_order_catalog_item - Order catalog items\nsnow_discover_catalogs - Discover available catalogs\n```\n**\u2705 Corrected UI Policy (v3.6.10):** Conditions stored as query string in catalog_conditions field. Actions created in catalog_ui_policy_action table. Based on actual ServiceNow structure!\n\n### 16. **servicenow-flow-workspace-mobile** \uD83D\uDCF1 Modern UX\n```\nsnow_create_flow - Flow Designer flows\nsnow_add_flow_action - Flow actions\nsnow_create_workspace - Workspace config\nsnow_configure_mobile_app - Mobile apps\nsnow_configure_offline_sync - Offline mode\n```\n\n### 17. **servicenow-advanced-features** \uD83C\uDFAF Advanced\n```\nsnow_performance_optimization - Optimize instance\nsnow_batch_operations - Bulk processing\nsnow_instance_scan - Health check\nsnow_dependency_analysis - Dependencies\nsnow_code_search - Search all code\n```\n\n### 18. **snow-flow** \uD83C\uDF9B\uFE0F Orchestration\n```\nswarm_init - Initialize agent swarms\nagent_spawn - Create specialized agents\ntask_orchestrate - Complex task coordination\nmemory_search - Search persistent memory\nneural_train - Train neural networks\n```\n\n## \uD83D\uDD04 Critical Workflows\n\n### Widget Debugging (ALWAYS use Local Sync!)\n```javascript\n// \u2705 CORRECT - Local sync for debugging\nawait snow_pull_artifact({ sys_id: 'widget_sys_id' });\n// Edit with native tools (search, multi-file, etc.)\nawait snow_push_artifact({ sys_id: 'widget_sys_id' });\n\n// \u274C WRONG - Token limit explosion\nawait snow_query_table({ table: 'sp_widget', query: 'sys_id=...' });\n```\n\n### Verification Pattern\n```javascript\n// Always verify with REAL data, not placeholders\nawait snow_execute_script_with_output({\n script: `\n var gr = new GlideRecord('incident');\n gr.addQuery('active', true);\n gr.query();\n gs.info('Found: ' + gr.getRowCount() + ' active incidents');\n \n // Test actual property\n var prop = gs.getProperty('instance_name');\n gs.info('Instance: ' + prop);\n `\n});\n```\n\n### Complete Widget Creation (NO PLACEHOLDERS)\n```javascript\nawait snow_deploy({\n type: 'widget',\n config: {\n name: 'my_widget',\n title: 'Production Widget',\n template: '<div ng-repeat=\"item in data.items\">{{item.name}}</div>',\n script: `\n (function() {\n data.items = [];\n var gr = new GlideRecord('incident');\n gr.addQuery('active', true);\n gr.setLimit(10);\n gr.query();\n while (gr.next()) {\n data.items.push({\n name: gr.getDisplayValue('number'),\n description: gr.getDisplayValue('short_description')\n });\n }\n })();\n `,\n client_script: `\n function($scope) {\n var c = this;\n c.refresh = function() {\n c.server.get().then(function(r) {\n console.log('Refreshed');\n });\n };\n }\n `\n }\n});\n```\n\n### Catalog UI Policy (v3.6.10 Corrected)\n```javascript\nawait snow_create_catalog_ui_policy({\n cat_item: 'catalog_item_sys_id',\n short_description: 'Dynamic Field Control',\n // Conditions converted to ServiceNow query string format\n conditions: [\n {\n catalog_variable: 'user_type', // Can use name or sys_id\n operation: 'is', // or 'is not', 'contains', 'is empty', etc.\n value: 'employee',\n and_or: 'AND' // Connect with AND or OR\n },\n {\n catalog_variable: 'department',\n operation: 'is not empty',\n value: ''\n }\n ],\n // Actions still create separate records\n actions: [\n {\n catalog_variable: 'manager_approval',\n visible: true,\n mandatory: true\n },\n {\n catalog_variable: 'cost_center',\n mandatory: true\n }\n ]\n});\n// Creates policy with conditions as query string in catalog_conditions field\n// Actions created as separate records in catalog_ui_policy_action table\n```\n\n## \u26A1 Command Reference\n\n### Core Commands\n- `snow-flow init` - Initialize project with this CLAUDE.md\n- `snow-flow auth login` - Authenticate with ServiceNow\n- `snow-flow status` - System status\n- `snow-flow swarm \"<task>\"` - Multi-agent coordination\n\n### Development Flow\n1. **Pull artifact**: `snow_pull_artifact` for local editing\n2. **Edit locally**: Use Claude's native search/edit tools\n3. **Push changes**: `snow_push_artifact` to ServiceNow\n4. **Test**: `snow_execute_script_with_output` with REAL code\n5. **Deploy**: `snow_update_set_complete` when ready\n\n## \uD83C\uDFAF Golden Rules\n\n1. **NO MOCK DATA** - Everything real, complete, production-ready\n2. **ES5 ONLY** - var, function(){}, no modern JS\n3. **VERIFY FIRST** - Test before assuming\n4. **LOCAL SYNC** - Use snow_pull_artifact for widgets\n5. **COMPLETE CODE** - No TODOs, no placeholders\n6. **TOKEN AWARE** - Use batch operations\n7. **UPDATE SETS** - Track all changes\n\n## \uD83D\uDCCA Quick Reference\n\n| Issue | Solution |\n|-------|----------|\n| Widget doesn't work | `snow_pull_artifact` \u2192 debug locally |\n| Script syntax error | ES5 only! var, function(){} |\n| Can't find table | `snow_discover_table_fields` |\n| Property missing | `snow_property_manager` |\n| Need to test | `snow_execute_script_with_output` |\n| Deployment failed | `snow_rollback_deployment` |\n\nRemember: TAKE THE TIME. DO IT RIGHT. NO MOCK DATA. NO EXCEPTIONS.";
1
+ export declare const CLAUDE_MD_TEMPLATE = "# Snow-Flow ServiceNow Development Framework\n\n## \uD83D\uDEA8 ABSOLUTE RULES - NO EXCEPTIONS\n\n### \uD83D\uDD34 CRITICAL: Widget Debugging MUST Use Local Sync!\n\n**When user reports ANY widget issue, ALWAYS use:**\n```\nsnow_pull_artifact({ sys_id: 'widget_sys_id' })\n```\n\n**NEVER use snow_query_table for widgets!** It will hit token limits and you can't use native tools.\n\n**Common scenarios requiring snow_pull_artifact:**\n- \"Widget skips questions\" \u2192 snow_pull_artifact\n- \"Form doesn't submit\" \u2192 snow_pull_artifact \n- \"Data not displaying\" \u2192 snow_pull_artifact\n- \"Button doesn't work\" \u2192 snow_pull_artifact\n- \"Debug this widget\" \u2192 snow_pull_artifact\n- \"Fix widget issue\" \u2192 snow_pull_artifact\n- Widget script > 1000 chars \u2192 snow_pull_artifact\n\n### Rule #1: NO MOCK DATA - EVERYTHING REAL & COMPLETE\n**FORBIDDEN:** Mock data, placeholders, TODOs, stub implementations, test values, simulations, \"this would normally...\", partial implementations.\n**REQUIRED:** Complete, production-ready, fully functional code. Take time to implement EVERYTHING properly. Real integrations, comprehensive error handling, full validation.\n\n### Rule #2: ES5 ONLY - ServiceNow Rhino Engine\n**NEVER USE:** const/let, arrow functions =>, template literals `${}`, destructuring, for...of, default parameters, classes\n**ALWAYS USE:** var, function(){}, string concatenation +, traditional for loops, typeof checks\n\n### Rule #3: VERIFY FIRST - Never Assume\nTest before claiming broken. Check resources exist. Validate configurations. Evidence-based fixes only.\n\n## \uD83D\uDCCB MCP SERVERS & TOOLS (18 Servers, 200+ Tools)\n\n### 1. **servicenow-local-development** \uD83D\uDD27 Widget/Artifact Sync [USE THIS FOR WIDGETS!]\n```\nsnow_pull_artifact - Pull ANY artifact to local files (ALWAYS use for widgets!)\nsnow_push_artifact - Push local changes back to ServiceNow \nsnow_cleanup_artifacts - Clean local artifact cache\nsnow_get_sync_status - Check artifact sync status\nsnow_list_local_artifacts - List all pulled artifacts\n```\n**\u26A0\uFE0F CRITICAL: For ANY widget work, use snow_pull_artifact FIRST, not snow_query_table!**\n\n### 2. **servicenow-deployment** \uD83D\uDE80 Complete Deployment System\n```\nsnow_deploy - Create NEW artifacts (widgets, flows, scripts, pages)\nsnow_update - UPDATE existing artifacts directly\nsnow_validate_deployment - Validate before deploy\nsnow_rollback_deployment - Rollback failed deployments\nsnow_preview_widget - Preview widget rendering\nsnow_widget_test - Test widget functionality\nsnow_deployment_history - View deployment history\nsnow_check_widget_coherence - Validate HTML/Client/Server communication\n```\n\n### 3. **servicenow-operations** \uD83D\uDCCA Core Operations\n```\nsnow_query_table - Universal table query (NOT for widgets - use snow_pull_artifact!)\nsnow_query_incidents - Query and analyze incidents\nsnow_analyze_incident - AI-powered incident analysis\nsnow_auto_resolve_incident - Automated resolution\nsnow_cmdb_search - Configuration database search\nsnow_user_lookup - Find users and groups\nsnow_operational_metrics - Performance metrics\nsnow_knowledge_search - Search knowledge base\nsnow_catalog_item_manager - Manage service catalog\n```\n\n### 4. **servicenow-automation** \u2699\uFE0F Scripts & Automation\n```\nsnow_execute_background_script - Run ES5 scripts (autoConfirm available)\nsnow_execute_script_with_output - Execute with output capture\nsnow_execute_script_sync - Synchronous execution\nsnow_get_script_output - Retrieve script results\nsnow_schedule_job - Create scheduled jobs\nsnow_create_event - Trigger system events\nsnow_get_logs - Access system logs\nsnow_test_rest_connection - Test REST endpoints\nsnow_trace_execution - Performance tracing\n```\n\n### 5. **servicenow-platform-development** \uD83C\uDFD7\uFE0F Development Artifacts\n```\nsnow_create_ui_page - Create UI pages\nsnow_create_script_include - Reusable scripts\nsnow_create_business_rule - Business rules\nsnow_create_client_script - Client-side scripts\nsnow_create_ui_policy - UI policies\nsnow_create_ui_action - UI actions\nsnow_create_acl - Access controls\nsnow_create_ui_macro - UI macros\n```\n\n### 6. **servicenow-integration** \uD83D\uDD0C Integrations\n```\nsnow_create_rest_message - REST integrations\nsnow_create_soap_message - SOAP integrations\nsnow_create_transform_map - Data transformation\nsnow_create_import_set - Import management\nsnow_test_web_service - Test services\nsnow_configure_email - Email configuration\nsnow_create_data_source - Data sources\n```\n\n### 7. **servicenow-system-properties** \u2699\uFE0F Properties\n```\nsnow_property_get - Get property value\nsnow_property_set - Set property value\nsnow_property_list - List by pattern\nsnow_property_bulk_update - Bulk operations\nsnow_property_export/import - Export/Import JSON\nsnow_property_validate - Validate properties\n```\n\n### 8. **servicenow-update-set** \uD83D\uDCE6 Change Management\n```\nsnow_update_set_create - Create update set\nsnow_update_set_switch - Switch active set\nsnow_update_set_complete - Mark complete\nsnow_update_set_export - Export as XML\nsnow_update_set_preview - Preview changes\nsnow_ensure_active_update_set - Auto-create if needed\n```\n\n### 9. **servicenow-development-assistant** \uD83E\uDD16 AI Assistant\n```\nsnow_find_artifact - Find any artifact by name/type\nsnow_edit_artifact - Edit existing artifacts\nsnow_analyze_artifact - Analyze dependencies\nsnow_comprehensive_search - Deep search all tables\nsnow_analyze_requirements - Requirement analysis\nsnow_generate_code - Pattern-based generation\nsnow_optimize_script - Performance optimization\n```\n\n### 10. **servicenow-security-compliance** \uD83D\uDEE1\uFE0F Security\n```\nsnow_create_security_policy - Security policies\nsnow_audit_compliance - SOX/GDPR/HIPAA audit\nsnow_scan_vulnerabilities - Vulnerability scan\nsnow_assess_risk - Risk assessment\nsnow_review_access_control - ACL review\nsnow_encrypt_field - Field encryption\nsnow_audit_trail_analysis - Audit analysis\n```\n\n### 11. **servicenow-reporting-analytics** \uD83D\uDCC8 Reporting\n```\nsnow_create_report - Create reports\nsnow_create_dashboard - Build dashboards\nsnow_define_kpi - Define KPIs\nsnow_schedule_report - Schedule delivery\nsnow_analyze_data_quality - Data quality\nsnow_create_pa_widget - Performance analytics\n```\n\n### 12. **servicenow-machine-learning** \uD83E\uDDE0 AI/ML\n```\nml_train_incident_classifier - Train LSTM classifier\nml_predict_change_risk - Risk prediction\nml_detect_anomalies - Anomaly detection\nml_forecast_incidents - Time series forecast\nml_cluster_similar - Similarity clustering\nml_performance_analytics - Native PA ML\n```\n\n### 13. **servicenow-change-virtualagent-pa** \uD83D\uDD04 Change & Virtual Agent\n```\nsnow_create_change_request - Change requests\nsnow_assess_change_risk - Risk assessment\nsnow_create_nlu_model - NLU models\nsnow_train_virtual_agent - Train VA\nsnow_configure_conversation - VA conversations\nsnow_analyze_pa_trends - Performance trends\n```\n\n### 14. **servicenow-cmdb-event-hr-csm-devops** \uD83C\uDFE2 Enterprise\n```\nsnow_manage_ci - Configuration items\nsnow_correlate_events - Event correlation\nsnow_manage_hr_case - HR cases\nsnow_csm_project - Customer projects\nsnow_devops_pipeline - CI/CD pipelines\nsnow_manage_cmdb_relationships - CI relationships\n```\n\n### 15. **servicenow-knowledge-catalog** \uD83D\uDCDA Knowledge & Catalog (v3.6.10 Corrected!)\n```\nsnow_create_knowledge_article - KB articles\nsnow_create_catalog_item - Catalog items\nsnow_create_catalog_variable - Variable sets\nsnow_create_catalog_ui_policy - CORRECTED: Creates in 2 tables (conditions as string, actions as records)\nsnow_order_catalog_item - Order catalog items\nsnow_discover_catalogs - Discover available catalogs\n```\n**\u2705 Corrected UI Policy (v3.6.10):** Conditions stored as query string in catalog_conditions field. Actions created in catalog_ui_policy_action table. Based on actual ServiceNow structure!\n\n### 16. **servicenow-flow-workspace-mobile** \uD83D\uDCF1 Modern UX + UI Builder\n```\n# Flow Designer Tools\nsnow_list_flows - List Flow Designer flows\nsnow_execute_flow - Execute flows programmatically \nsnow_get_flow_execution_status - Monitor flow status\nsnow_get_flow_execution_history - Flow execution history\nsnow_get_flow_details - Flow configuration details\nsnow_import_flow_from_xml - Import flows from XML\n\n# Agent Workspace Tools \nsnow_create_workspace - Create agent workspace configurations\nsnow_create_workspace_tab - Add custom workspace tabs\nsnow_create_contextual_panel - Add contextual side panels\nsnow_discover_workspaces - Find all workspace configurations\n\n# Mobile App Tools\nsnow_configure_mobile_app - Configure mobile applications\nsnow_send_push_notification - Send push notifications \nsnow_configure_offline_sync - Setup offline synchronization\n\n# \uD83C\uDD95 COMPLETE UI BUILDER INTEGRATION (15 NEW TOOLS!)\n# Page Management (sys_ux_page)\nsnow_create_uib_page - Create UI Builder pages with routing\nsnow_update_uib_page - Update page configuration\nsnow_delete_uib_page - Delete pages with dependency validation\nsnow_discover_uib_pages - Find all UI Builder pages\n\n# Component Library (sys_ux_lib_*) \nsnow_create_uib_component - Create custom UI components\nsnow_update_uib_component - Update component source & schema\nsnow_discover_uib_components - Browse component library\nsnow_clone_uib_component - Clone & modify existing components\n\n# Data Integration (sys_ux_data_broker)\nsnow_create_uib_data_broker - Connect ServiceNow data sources\nsnow_configure_uib_data_broker - Update queries & caching\n\n# Layout Management (sys_ux_page_element)\nsnow_add_uib_page_element - Add components to pages\nsnow_update_uib_page_element - Update component properties\nsnow_remove_uib_page_element - Remove elements with validation\n\n# Advanced UI Builder Features\nsnow_create_uib_page_registry - Configure URL routing\nsnow_discover_uib_routes - Find all page routes\nsnow_create_uib_client_script - Add client-side scripts\nsnow_create_uib_client_state - Manage page state \nsnow_create_uib_event - Create custom events\nsnow_analyze_uib_page_performance - Performance analysis\nsnow_validate_uib_page_structure - Structure validation\nsnow_discover_uib_page_usage - Usage analytics\n```\n\n### 17. **servicenow-advanced-features** \uD83C\uDFAF Advanced\n```\nsnow_performance_optimization - Optimize instance\nsnow_batch_operations - Bulk processing\nsnow_instance_scan - Health check\nsnow_dependency_analysis - Dependencies\nsnow_code_search - Search all code\n```\n\n### 18. **snow-flow** \uD83C\uDF9B\uFE0F Orchestration\n```\nswarm_init - Initialize agent swarms\nagent_spawn - Create specialized agents\ntask_orchestrate - Complex task coordination\nmemory_search - Search persistent memory\nneural_train - Train neural networks\n```\n\n## \uD83D\uDD04 Critical Workflows\n\n### Widget Debugging (ALWAYS use Local Sync!)\n```javascript\n// \u2705 CORRECT - Local sync for debugging\nawait snow_pull_artifact({ sys_id: 'widget_sys_id' });\n// Edit with native tools (search, multi-file, etc.)\nawait snow_push_artifact({ sys_id: 'widget_sys_id' });\n\n// \u274C WRONG - Token limit explosion\nawait snow_query_table({ table: 'sp_widget', query: 'sys_id=...' });\n```\n\n### Verification Pattern\n```javascript\n// Always verify with REAL data, not placeholders\nawait snow_execute_script_with_output({\n script: `\n var gr = new GlideRecord('incident');\n gr.addQuery('active', true);\n gr.query();\n gs.info('Found: ' + gr.getRowCount() + ' active incidents');\n \n // Test actual property\n var prop = gs.getProperty('instance_name');\n gs.info('Instance: ' + prop);\n `\n});\n```\n\n### Complete Widget Creation (NO PLACEHOLDERS)\n```javascript\nawait snow_deploy({\n type: 'widget',\n config: {\n name: 'my_widget',\n title: 'Production Widget',\n template: '<div ng-repeat=\"item in data.items\">{{item.name}}</div>',\n script: `\n (function() {\n data.items = [];\n var gr = new GlideRecord('incident');\n gr.addQuery('active', true);\n gr.setLimit(10);\n gr.query();\n while (gr.next()) {\n data.items.push({\n name: gr.getDisplayValue('number'),\n description: gr.getDisplayValue('short_description')\n });\n }\n })();\n `,\n client_script: `\n function($scope) {\n var c = this;\n c.refresh = function() {\n c.server.get().then(function(r) {\n console.log('Refreshed');\n });\n };\n }\n `\n }\n});\n```\n\n### Catalog UI Policy (v3.6.10 Corrected)\n```javascript\nawait snow_create_catalog_ui_policy({\n cat_item: 'catalog_item_sys_id',\n short_description: 'Dynamic Field Control',\n // Conditions converted to ServiceNow query string format\n conditions: [\n {\n catalog_variable: 'user_type', // Can use name or sys_id\n operation: 'is', // or 'is not', 'contains', 'is empty', etc.\n value: 'employee',\n and_or: 'AND' // Connect with AND or OR\n },\n {\n catalog_variable: 'department',\n operation: 'is not empty',\n value: ''\n }\n ],\n // Actions still create separate records\n actions: [\n {\n catalog_variable: 'manager_approval',\n visible: true,\n mandatory: true\n },\n {\n catalog_variable: 'cost_center',\n mandatory: true\n }\n ]\n});\n// Creates policy with conditions as query string in catalog_conditions field\n// Actions created as separate records in catalog_ui_policy_action table\n```\n\n## \u26A1 Command Reference\n\n### Core Commands\n- `snow-flow init` - Initialize project with this CLAUDE.md\n- `snow-flow auth login` - Authenticate with ServiceNow\n- `snow-flow status` - System status\n- `snow-flow swarm \"<task>\"` - Multi-agent coordination\n\n### Development Flow\n1. **Pull artifact**: `snow_pull_artifact` for local editing\n2. **Edit locally**: Use Claude's native search/edit tools\n3. **Push changes**: `snow_push_artifact` to ServiceNow\n4. **Test**: `snow_execute_script_with_output` with REAL code\n5. **Deploy**: `snow_update_set_complete` when ready\n\n## \uD83C\uDFAF Golden Rules\n\n1. **NO MOCK DATA** - Everything real, complete, production-ready\n2. **ES5 ONLY** - var, function(){}, no modern JS\n3. **VERIFY FIRST** - Test before assuming\n4. **LOCAL SYNC** - Use snow_pull_artifact for widgets\n5. **COMPLETE CODE** - No TODOs, no placeholders\n6. **TOKEN AWARE** - Use batch operations\n7. **UPDATE SETS** - Track all changes\n\n## \uD83D\uDCCA Quick Reference\n\n| Issue | Solution |\n|-------|----------|\n| Widget doesn't work | `snow_pull_artifact` \u2192 debug locally |\n| Script syntax error | ES5 only! var, function(){} |\n| Can't find table | `snow_discover_table_fields` |\n| Property missing | `snow_property_manager` |\n| Need to test | `snow_execute_script_with_output` |\n| Deployment failed | `snow_rollback_deployment` |\n\nRemember: TAKE THE TIME. DO IT RIGHT. NO MOCK DATA. NO EXCEPTIONS.";
2
2
  export declare const CLAUDE_MD_TEMPLATE_VERSION = "3.6.2-CONSOLIDATED";
3
3
  //# sourceMappingURL=claude-md-template.d.ts.map
@@ -200,13 +200,58 @@ snow_discover_catalogs - Discover available catalogs
200
200
  \`\`\`
201
201
  **✅ Corrected UI Policy (v3.6.10):** Conditions stored as query string in catalog_conditions field. Actions created in catalog_ui_policy_action table. Based on actual ServiceNow structure!
202
202
 
203
- ### 16. **servicenow-flow-workspace-mobile** 📱 Modern UX
204
- \`\`\`
205
- snow_create_flow - Flow Designer flows
206
- snow_add_flow_action - Flow actions
207
- snow_create_workspace - Workspace config
208
- snow_configure_mobile_app - Mobile apps
209
- snow_configure_offline_sync - Offline mode
203
+ ### 16. **servicenow-flow-workspace-mobile** 📱 Modern UX + UI Builder
204
+ \`\`\`
205
+ # Flow Designer Tools
206
+ snow_list_flows - List Flow Designer flows
207
+ snow_execute_flow - Execute flows programmatically
208
+ snow_get_flow_execution_status - Monitor flow status
209
+ snow_get_flow_execution_history - Flow execution history
210
+ snow_get_flow_details - Flow configuration details
211
+ snow_import_flow_from_xml - Import flows from XML
212
+
213
+ # Agent Workspace Tools
214
+ snow_create_workspace - Create agent workspace configurations
215
+ snow_create_workspace_tab - Add custom workspace tabs
216
+ snow_create_contextual_panel - Add contextual side panels
217
+ snow_discover_workspaces - Find all workspace configurations
218
+
219
+ # Mobile App Tools
220
+ snow_configure_mobile_app - Configure mobile applications
221
+ snow_send_push_notification - Send push notifications
222
+ snow_configure_offline_sync - Setup offline synchronization
223
+
224
+ # 🆕 COMPLETE UI BUILDER INTEGRATION (15 NEW TOOLS!)
225
+ # Page Management (sys_ux_page)
226
+ snow_create_uib_page - Create UI Builder pages with routing
227
+ snow_update_uib_page - Update page configuration
228
+ snow_delete_uib_page - Delete pages with dependency validation
229
+ snow_discover_uib_pages - Find all UI Builder pages
230
+
231
+ # Component Library (sys_ux_lib_*)
232
+ snow_create_uib_component - Create custom UI components
233
+ snow_update_uib_component - Update component source & schema
234
+ snow_discover_uib_components - Browse component library
235
+ snow_clone_uib_component - Clone & modify existing components
236
+
237
+ # Data Integration (sys_ux_data_broker)
238
+ snow_create_uib_data_broker - Connect ServiceNow data sources
239
+ snow_configure_uib_data_broker - Update queries & caching
240
+
241
+ # Layout Management (sys_ux_page_element)
242
+ snow_add_uib_page_element - Add components to pages
243
+ snow_update_uib_page_element - Update component properties
244
+ snow_remove_uib_page_element - Remove elements with validation
245
+
246
+ # Advanced UI Builder Features
247
+ snow_create_uib_page_registry - Configure URL routing
248
+ snow_discover_uib_routes - Find all page routes
249
+ snow_create_uib_client_script - Add client-side scripts
250
+ snow_create_uib_client_state - Manage page state
251
+ snow_create_uib_event - Create custom events
252
+ snow_analyze_uib_page_performance - Performance analysis
253
+ snow_validate_uib_page_structure - Structure validation
254
+ snow_discover_uib_page_usage - Usage analytics
210
255
  \`\`\`
211
256
 
212
257
  ### 17. **servicenow-advanced-features** 🎯 Advanced
@@ -877,7 +877,32 @@ snow-flow sync status ${widget.sys_id}
877
877
  // Silent fail for custom tables
878
878
  }
879
879
  }
880
- // Generate detailed error message
880
+ // Check if errors suggest OAuth/authentication issues
881
+ const authErrors = errors.filter(({ error }) => {
882
+ const errorStr = error.toLowerCase();
883
+ return errorStr.includes('401') ||
884
+ errorStr.includes('unauthorized') ||
885
+ errorStr.includes('token') ||
886
+ errorStr.includes('oauth') ||
887
+ errorStr.includes('authentication') ||
888
+ errorStr.includes('access denied') ||
889
+ errorStr.includes('forbidden') && errorStr.includes('token');
890
+ });
891
+ if (authErrors.length > 0) {
892
+ console.log(`\n🔐 OAuth/Authentication Error Detected!`);
893
+ console.log(`❌ All API calls are failing with authentication errors`);
894
+ console.log(`\n⚠️ Authentication errors:`);
895
+ authErrors.forEach(({ table, error }) => {
896
+ console.log(` ${table}: ${error}`);
897
+ });
898
+ console.log(`\n🔧 OAuth Token Resolution Steps:`);
899
+ console.log(` 1. Your OAuth token has expired or is invalid`);
900
+ console.log(` 2. Run: snow-flow auth login`);
901
+ console.log(` 3. Or check if your ServiceNow instance is accessible`);
902
+ console.log(` 4. Verify your client credentials are correct`);
903
+ throw new Error(`OAuth authentication failed. Your ServiceNow access token has expired or is invalid. Please run 'snow-flow auth login' to re-authenticate.`);
904
+ }
905
+ // Generate detailed error message for non-auth errors
881
906
  console.log(`\n❌ Artifact detection failed!`);
882
907
  console.log(`🔍 Searched sys_metadata + ${tables.length} registered tables + ${customTables.length} custom tables`);
883
908
  if (errors.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "4.5.2",
3
+ "version": "4.5.5",
4
4
  "description": "Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 200+ ServiceNow tools for comprehensive platform development.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -354,6 +354,60 @@
354
354
  "robustness": "high",
355
355
  "flexibility": "maximum"
356
356
  }
357
+ },
358
+ "snow_create_uib_page": {
359
+ "name": "UI Builder Page Creation",
360
+ "description": "Create complete UI Builder pages in Now Experience Framework using official ServiceNow sys_ux_page API. Includes automatic routing configuration and full UXF integration for modern ServiceNow UI development.",
361
+ "category": "ui_builder",
362
+ "features": [
363
+ "uxf_integration",
364
+ "automatic_routing",
365
+ "page_management",
366
+ "responsive_design",
367
+ "theme_support",
368
+ "access_control"
369
+ ],
370
+ "metrics": {
371
+ "page_creation": "conversational",
372
+ "routing": "automatic",
373
+ "framework": "now_experience"
374
+ }
375
+ },
376
+ "snow_create_uib_component": {
377
+ "name": "UI Builder Component Development",
378
+ "description": "Create custom UI Builder components using official ServiceNow sys_ux_lib_component and sys_ux_lib_source_script APIs. Full component lifecycle management including source code, properties schema, and dependency management.",
379
+ "category": "ui_builder",
380
+ "features": [
381
+ "custom_components",
382
+ "source_code_management",
383
+ "properties_schema",
384
+ "dependency_tracking",
385
+ "version_control",
386
+ "component_cloning"
387
+ ],
388
+ "metrics": {
389
+ "component_types": "unlimited",
390
+ "reusability": "high",
391
+ "customization": "complete"
392
+ }
393
+ },
394
+ "snow_add_uib_page_element": {
395
+ "name": "UI Builder Layout Management",
396
+ "description": "Add and manage components on UI Builder pages using official ServiceNow sys_ux_page_element API. Full layout control with responsive design, data broker binding, and conditional display logic.",
397
+ "category": "ui_builder",
398
+ "features": [
399
+ "drag_drop_equivalent",
400
+ "responsive_config",
401
+ "data_broker_binding",
402
+ "conditional_display",
403
+ "css_management",
404
+ "position_control"
405
+ ],
406
+ "metrics": {
407
+ "layout_flexibility": "complete",
408
+ "data_binding": "automatic",
409
+ "responsive": "native"
410
+ }
357
411
  }
358
412
  },
359
413
  "mcpCapabilities": {
@@ -374,11 +428,15 @@
374
428
  "fallbackMode": "No fallback - proper error messages when licenses unavailable"
375
429
  },
376
430
  "processMining": true,
431
+ "uiBuilderIntegration": true,
432
+ "nowExperienceFramework": true,
377
433
  "performanceMetrics": {
378
434
  "apiCallReduction": "80%",
379
435
  "analysisSpeed": "60% faster",
380
436
  "automationLevel": "90%",
381
- "dataAccuracy": "100% real"
437
+ "dataAccuracy": "100% real",
438
+ "uiBuilderToolsCount": "15",
439
+ "totalToolsCount": "235+"
382
440
  }
383
441
  },
384
442
  "author": "Snow-Flow Team",
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
6
6
  <title>Snow-Flow | Conversational ServiceNow Development Platform</title>
7
- <meta name="description" content="Snow-Flow: Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 200+ ServiceNow tools for comprehensive platform development.">
7
+ <meta name="description" content="Snow-Flow: Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 235+ ServiceNow tools including complete UI Builder integration for comprehensive platform development.">
8
8
 
9
9
  <!-- Modern CSS -->
10
10
  <link rel="stylesheet" href="css/style.css">
@@ -131,7 +131,7 @@
131
131
  </span>
132
132
  <span class="pill pill-pulse" style="animation-delay: 2.4s">
133
133
  <span class="pill-icon">⚡</span>
134
- <span class="pill-text">200+ ServiceNow Tools</span>
134
+ <span class="pill-text">235+ Tools + UI Builder</span>
135
135
  </span>
136
136
  <span class="pill pill-float" style="animation-delay: 2.6s">
137
137
  <span class="pill-icon">🏗️</span>
@@ -752,12 +752,13 @@ and historical patterns. Deploy as real-time API" \
752
752
  <strong style="color: #10b981;">12+ Artifact Types</strong>
753
753
  </div>
754
754
  <ul style="color: rgba(255,255,255,0.7); font-size: var(--font-sm); list-style: none; padding: 0;">
755
- <li>✅ snow_pull_artifact</li>
755
+ <li>✅ snow_pull_artifact (Widgets, Flows, Scripts)</li>
756
756
  <li>✅ snow_push_artifact</li>
757
757
  <li>✅ snow_validate_artifact_coherence</li>
758
- <li>✅ Widgets, Flows, Scripts</li>
759
- <li>✅ Full Claude Code integration</li>
760
- <li>✅ ES5 validation & conversion</li>
758
+ <li>✅ 🆕 snow_create_uib_page (UI Builder)</li>
759
+ <li>✅ 🆕 snow_add_uib_page_element</li>
760
+ <li>✅ Full Claude Code + UXF integration</li>
761
+ <li>✅ ES5 validation & UI Builder support</li>
761
762
  </ul>
762
763
  </div>
763
764
  </div>
@@ -879,9 +880,18 @@ and historical patterns. Deploy as real-time API" \
879
880
 
880
881
  <div class="code-block" style="max-width: 800px; margin: 0 auto; padding: var(--space-10);">
881
882
  <button class="copy-btn" style="position: absolute; top: var(--space-4); right: var(--space-4); background: var(--gradient-accent); color: var(--black); border: none; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); cursor: pointer;">Copy</button>
882
- <code style="font-size: var(--font-md); line-height: var(--leading-loose);">npm install -g snow-flow
883
+ <code style="font-size: var(--font-md); line-height: var(--leading-loose);"># 1. FIRST: Install & Setup Claude Code (REQUIRED!)
884
+ npm install -g @anthropic-ai/claude-code
885
+ claude login
886
+ cd /your/project
887
+ claude --dangerously-skip-permissions
888
+
889
+ # 2. THEN: Install and configure Snow-Flow
890
+ npm install -g snow-flow
883
891
  snow-flow init
884
892
  snow-flow auth login
893
+
894
+ # 3. Start building with natural language
885
895
  snow-flow swarm "Create incident dashboard widget"</code>
886
896
  </div>
887
897
 
@@ -915,27 +925,42 @@ snow-flow swarm "Create incident dashboard widget"</code>
915
925
  <div id="quickstart" class="tab-content active">
916
926
  <div class="grid grid-cols-1 lg:grid-cols-2" style="gap: var(--space-8);">
917
927
  <div>
918
- <h3 style="font-size: var(--font-2xl); font-weight: 700; margin-bottom: var(--space-6);">🚀 Get Started in 3 Minutes</h3>
928
+ <h3 style="font-size: var(--font-2xl); font-weight: 700; margin-bottom: var(--space-6);">🚀 Get Started - Prerequisites First!</h3>
929
+ <div class="alert" style="background: var(--orange-100); border: 1px solid var(--orange-400); padding: var(--space-3); border-radius: var(--radius-md); margin-bottom: var(--space-6);">
930
+ <strong>⚠️ IMPORTANT:</strong> Claude Code must be running BEFORE starting Snow-Flow!
931
+ </div>
919
932
  <div class="step-list">
933
+ <div class="step" style="margin-bottom: var(--space-6); padding: var(--space-4); border-left: 4px solid var(--orange-500);">
934
+ <h4 style="font-weight: 600; margin-bottom: var(--space-2);">1. Install & Setup Claude Code</h4>
935
+ <div class="code-block" style="margin: var(--space-2) 0;">
936
+ <code># Install Claude Code first:
937
+ npm install -g @anthropic-ai/claude-code
938
+ claude login
939
+ cd /your/project
940
+ claude --dangerously-skip-permissions</code>
941
+ </div>
942
+ <p style="color: var(--orange-600); font-size: var(--font-sm);"><strong>Required to prevent stdio errors!</strong></p>
943
+ </div>
920
944
  <div class="step" style="margin-bottom: var(--space-6); padding: var(--space-4); border-left: 4px solid var(--black);">
921
- <h4 style="font-weight: 600; margin-bottom: var(--space-2);">1. Install Snow-Flow</h4>
945
+ <h4 style="font-weight: 600; margin-bottom: var(--space-2);">2. Install Snow-Flow</h4>
922
946
  <div class="code-block" style="margin: var(--space-2) 0;">
923
947
  <code>npm install -g snow-flow</code>
924
948
  </div>
925
949
  </div>
926
950
  <div class="step" style="margin-bottom: var(--space-6); padding: var(--space-4); border-left: 4px solid var(--black);">
927
- <h4 style="font-weight: 600; margin-bottom: var(--space-2);">2. Initialize Project</h4>
951
+ <h4 style="font-weight: 600; margin-bottom: var(--space-2);">3. Configure Snow-Flow</h4>
928
952
  <div class="code-block" style="margin: var(--space-2) 0;">
929
- <code>snow-flow init</code>
953
+ <code>snow-flow init
954
+ snow-flow auth login</code>
930
955
  </div>
931
956
  <p style="color: var(--gray-600); font-size: var(--font-sm);">Creates .env, .claude/, and CLAUDE.md files</p>
932
957
  </div>
933
- <div class="step" style="margin-bottom: var(--space-6); padding: var(--space-4); border-left: 4px solid var(--black);">
934
- <h4 style="font-weight: 600; margin-bottom: var(--space-2);">3. Authenticate</h4>
958
+ <div class="step" style="margin-bottom: var(--space-6); padding: var(--space-4); border-left: 4px solid var(--green-500);">
959
+ <h4 style="font-weight: 600; margin-bottom: var(--space-2);">4. Start Building</h4>
935
960
  <div class="code-block" style="margin: var(--space-2) 0;">
936
- <code>snow-flow auth login</code>
961
+ <code>snow-flow swarm "Create incident dashboard widget"</code>
937
962
  </div>
938
- <p style="color: var(--gray-600); font-size: var(--font-sm);">Connect to your ServiceNow instance</p>
963
+ <p style="color: var(--green-600); font-size: var(--font-sm);">✅ Natural language commands for instant ServiceNow development</p>
939
964
  </div>
940
965
  </div>
941
966
  </div>
@@ -991,31 +1016,56 @@ snow-flow --help</code>
991
1016
  </div>
992
1017
 
993
1018
  <div>
994
- <h4 style="font-weight: 600; margin-bottom: var(--space-4);">ServiceNow OAuth Setup</h4>
1019
+ <h4 style="font-weight: 600; margin-bottom: var(--space-4);">🔑 ServiceNow OAuth Setup Guide</h4>
995
1020
  <div class="step-list">
996
- <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--gray-50); border-radius: var(--radius-md);">
1021
+ <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--blue-50); border-radius: var(--radius-md);">
997
1022
  <strong>1. Navigate to System OAuth → Application Registry</strong>
1023
+ <p style="font-size: var(--font-xs); color: var(--gray-600); margin-top: var(--space-1);">In ServiceNow navigator, search for "Application Registry"</p>
998
1024
  </div>
999
- <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--gray-50); border-radius: var(--radius-md);">
1000
- <strong>2. Create OAuth endpoint for external clients</strong>
1025
+ <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--blue-50); border-radius: var(--radius-md);">
1026
+ <strong>2. Click "New" → "Create an OAuth API endpoint"</strong>
1027
+ <p style="font-size: var(--font-xs); color: var(--gray-600); margin-top: var(--space-1);">Choose the endpoint option, not client credentials</p>
1001
1028
  </div>
1002
- <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--gray-50); border-radius: var(--radius-md);">
1003
- <strong>3. Copy Client ID & Secret to .env</strong>
1029
+ <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--blue-50); border-radius: var(--radius-md);">
1030
+ <strong>3. Fill Required Fields:</strong>
1031
+ <ul style="margin-top: var(--space-2); font-size: var(--font-xs); color: var(--gray-600);">
1032
+ <li>• <strong>Name:</strong> Snow-Flow Integration</li>
1033
+ <li>• <strong>Client ID:</strong> snow-flow-client</li>
1034
+ <li>• <strong>Redirect URL:</strong> http://localhost:3000/callback</li>
1035
+ </ul>
1004
1036
  </div>
1005
- <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--gray-50); border-radius: var(--radius-md);">
1006
- <strong>4. Set redirect URL: http://localhost:3000/callback</strong>
1037
+ <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--green-50); border-radius: var(--radius-md);">
1038
+ <strong>4. Save and Copy Credentials</strong>
1039
+ <p style="font-size: var(--font-xs); color: var(--gray-600); margin-top: var(--space-1);">Copy the <strong>Client ID</strong> and <strong>Client Secret</strong> - you'll need these for authentication</p>
1040
+ </div>
1041
+ <div style="margin-bottom: var(--space-4); padding: var(--space-3); background: var(--green-50); border-radius: var(--radius-md);">
1042
+ <strong>5. Run Snow-Flow Authentication</strong>
1043
+ <div class="code-block" style="margin: var(--space-2) 0; font-size: var(--font-xs);">
1044
+ <code>snow-flow auth login</code>
1045
+ </div>
1046
+ <p style="font-size: var(--font-xs); color: var(--gray-600);">This will open browser, enter your ServiceNow credentials, and save tokens automatically</p>
1007
1047
  </div>
1008
1048
  </div>
1049
+
1050
+ <div class="alert" style="background: var(--blue-100); border: 1px solid var(--blue-400); padding: var(--space-4); border-radius: var(--radius-md); margin-bottom: var(--space-6);">
1051
+ <h5 style="color: var(--blue-600); font-weight: 600; margin-bottom: var(--space-2);">💡 OAuth Token Management</h5>
1052
+ <ul style="font-size: var(--font-sm); color: var(--gray-700);">
1053
+ <li>• <strong>Automatic Refresh:</strong> Snow-Flow handles token refresh automatically</li>
1054
+ <li>• <strong>Secure Storage:</strong> Tokens stored locally in encrypted format</li>
1055
+ <li>• <strong>Expiration Handling:</strong> Clear error messages when tokens expire</li>
1056
+ <li>• <strong>Re-authentication:</strong> Simply run <code>snow-flow auth login</code> again</li>
1057
+ </ul>
1058
+ </div>
1009
1059
  </div>
1010
1060
  </div>
1011
1061
  </div>
1012
1062
 
1013
1063
  <!-- Claude Setup Tab -->
1014
1064
  <div id="claude-setup" class="tab-content">
1015
- <h3 style="font-size: var(--font-2xl); font-weight: 700; margin-bottom: var(--space-6);">🤖 Claude Code Setup</h3>
1065
+ <h3 style="font-size: var(--font-2xl); font-weight: 700; margin-bottom: var(--space-6);">🤖 Claude Code Prerequisites</h3>
1016
1066
 
1017
- <div class="alert" style="background: var(--yellow-100); border: 1px solid var(--yellow-400); padding: var(--space-4); border-radius: var(--radius-md); margin-bottom: var(--space-6);">
1018
- <strong>⚠️ CRITICAL:</strong> Must run <code>claude login</code> first to fix "dangerously skip permissions" errors!
1067
+ <div class="alert" style="background: var(--red-100); border: 1px solid var(--red-400); padding: var(--space-4); border-radius: var(--radius-md); margin-bottom: var(--space-6);">
1068
+ <strong>🚨 MANDATORY PREREQUISITES:</strong> Before using Snow-Flow, Claude Code MUST be installed, logged in, and running in your project directory with --dangerously-skip-permissions to prevent stdio errors!
1019
1069
  </div>
1020
1070
 
1021
1071
  <div class="grid grid-cols-1 lg:grid-cols-2" style="gap: var(--space-8);">
@@ -1210,13 +1260,40 @@ patterns. Deploy as real-time API"</code>
1210
1260
  <div>
1211
1261
  <h4 style="font-weight: 600; margin-bottom: var(--space-4);">Common Issues</h4>
1212
1262
 
1263
+ <div class="issue" style="margin-bottom: var(--space-6); padding: var(--space-4); border: 1px solid var(--red-300); border-radius: var(--radius-md);">
1264
+ <h5 style="color: var(--red-600); font-weight: 600; margin-bottom: var(--space-2);">🔐 OAuth Token Expired - "Could not find artifact"</h5>
1265
+ <p style="margin-bottom: var(--space-3); font-size: var(--font-sm);"><strong>Error:</strong> "Could not find artifact with sys_id xyz... It may be in a custom table or you may lack permissions."</p>
1266
+ <p style="margin-bottom: var(--space-3); font-size: var(--font-sm); color: var(--orange-600);"><strong>Real Cause:</strong> Your ServiceNow OAuth token has expired, not missing artifact!</p>
1267
+ <div class="code-block" style="font-size: var(--font-xs);">
1268
+ <code># SOLUTION: Re-authenticate
1269
+ snow-flow auth login</code>
1270
+ </div>
1271
+ <p style="margin-top: var(--space-2); font-size: var(--font-xs); color: var(--gray-500);">Fixed in v4.5.3: Now shows clear OAuth error instead of misleading "artifact not found"</p>
1272
+ </div>
1273
+
1274
+ <div class="issue" style="margin-bottom: var(--space-6); padding: var(--space-4); border: 1px solid var(--red-300); border-radius: var(--radius-md);">
1275
+ <h5 style="color: var(--red-600); font-weight: 600; margin-bottom: var(--space-2);">📡 Stdio Connection Errors</h5>
1276
+ <p style="margin-bottom: var(--space-3); font-size: var(--font-sm);"><strong>Error:</strong> Cannot connect to stdio/MCP servers</p>
1277
+ <p style="margin-bottom: var(--space-3); font-size: var(--font-sm); color: var(--orange-600);"><strong>Cause:</strong> Claude Code not running or wrong startup order</p>
1278
+ <div class="code-block" style="font-size: var(--font-xs);">
1279
+ <code># SOLUTION: Install and start Claude Code FIRST
1280
+ npm install -g @anthropic-ai/claude-code
1281
+ claude login
1282
+ cd /your/project
1283
+ claude --dangerously-skip-permissions
1284
+
1285
+ # THEN start Snow-Flow
1286
+ snow-flow init</code>
1287
+ </div>
1288
+ </div>
1289
+
1213
1290
  <div class="issue" style="margin-bottom: var(--space-6); padding: var(--space-4); border: 1px solid var(--red-300); border-radius: var(--radius-md);">
1214
1291
  <h5 style="color: var(--red-600); font-weight: 600; margin-bottom: var(--space-2);">❌ Permission Errors in Claude Code</h5>
1215
1292
  <p style="margin-bottom: var(--space-3); font-size: var(--font-sm);">"dangerously skip permissions" error</p>
1216
1293
  <div class="code-block" style="font-size: var(--font-xs);">
1217
1294
  <code># SOLUTION: Login first!
1218
1295
  claude login
1219
- claude --mcp-config .claude/claude_desktop_config.json</code>
1296
+ claude --dangerously-skip-permissions</code>
1220
1297
  </div>
1221
1298
  </div>
1222
1299