snow-flow 4.5.26 → 4.5.28

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/CLAUDE.md CHANGED
@@ -94,6 +94,11 @@ User: "Create agent workspace"
94
94
  3. **User says "Custom script for Z"** → Scripts are appropriate
95
95
  4. **User says "Check/verify/test"** → Scripts for verification are good
96
96
 
97
+ **🎯 Workspace Feature Development:**
98
+ - **"Create workspace list"** → Use `snow_create_uib_component` (list component) + `snow_create_uib_data_broker`
99
+ - **"Add workspace tab"** → Use `snow_create_uib_page` + `snow_add_uib_page_element`
100
+ - **"Configure workspace panel"** → Use `snow_create_uib_component` + `snow_add_uib_page_element`
101
+
97
102
  ### The Verification-First Approach
98
103
 
99
104
  ```javascript
@@ -655,14 +660,13 @@ Snow-Flow now automatically sets its Update Set as the user's current Update Set
655
660
  - `snow_import_flow_from_xml` - Import flows from XML (only programmatic creation method)
656
661
 
657
662
  **Agent Workspace Tools:**
658
- - `snow_create_workspace` - Create agent workspace configurations (uses sys_aw_master_config)
659
- - `snow_create_workspace_tab` - **DEPRECATED:** Modern workspaces use UX pages
660
- - `snow_create_contextual_panel` - **DEPRECATED:** Modern workspaces use UX components
663
+ - `snow_create_workspace` - Create agent workspace configurations (uses sys_aw_master_config with all required fields)
661
664
  - `snow_discover_workspaces` - Find all workspace configurations
662
665
 
663
- **⚠️ IMPORTANT:** Modern ServiceNow Agent Workspaces use **UX Pages (sys_ux_*)** for configuration, not legacy sys_aw_* tables. Use UI Builder tools instead:
664
- - **Workspace tabs** → Use `snow_add_uib_page_element` with UX page components
665
- - **Contextual panels** → Use UI Builder component library with data brokers
666
+ **⚠️ MODERN APPROACH:** For workspace tabs and panels, use **UI Builder tools** with correct table structure:
667
+ - **Workspace pages** → `snow_create_uib_page` (creates sys_ux_page + sys_ux_page_registry)
668
+ - **Workspace components** → `snow_add_uib_page_element` (adds to sys_ux_page via sys_ux_page_element)
669
+ - **Data connections** → `snow_create_uib_data_broker` (connects via sys_ux_data_broker)
666
670
 
667
671
  **Mobile App Tools:**
668
672
  - `snow_configure_mobile_app` - Configure mobile applications
@@ -132,23 +132,6 @@ class ServiceNowFlowWorkspaceMobileMCP {
132
132
  required: ['name', 'tables']
133
133
  }
134
134
  },
135
- {
136
- name: 'snow_create_workspace_tab',
137
- description: 'Creates a custom tab in Agent Workspace for specific record types or views.',
138
- inputSchema: {
139
- type: 'object',
140
- properties: {
141
- workspace: { type: 'string', description: 'Parent workspace sys_id' },
142
- name: { type: 'string', description: 'Tab name' },
143
- label: { type: 'string', description: 'Tab label' },
144
- table: { type: 'string', description: 'Table for the tab' },
145
- view: { type: 'string', description: 'View to display' },
146
- order: { type: 'number', description: 'Tab order' },
147
- condition: { type: 'string', description: 'Condition to show tab' }
148
- },
149
- required: ['workspace', 'name', 'table']
150
- }
151
- },
152
135
  {
153
136
  name: 'snow_create_workspace_list',
154
137
  description: 'Creates a custom list configuration for Agent Workspace.',
@@ -166,23 +149,6 @@ class ServiceNowFlowWorkspaceMobileMCP {
166
149
  required: ['workspace', 'name', 'table']
167
150
  }
168
151
  },
169
- {
170
- name: 'snow_create_contextual_panel',
171
- description: 'Creates a contextual side panel for Agent Workspace to show related information.',
172
- inputSchema: {
173
- type: 'object',
174
- properties: {
175
- name: { type: 'string', description: 'Panel name' },
176
- table: { type: 'string', description: 'Table context' },
177
- type: { type: 'string', description: 'Panel type: related_records, knowledge, timeline, custom' },
178
- position: { type: 'string', description: 'Position: right, left', default: 'right' },
179
- width: { type: 'number', description: 'Panel width in pixels' },
180
- content: { type: 'string', description: 'Panel content or script' },
181
- condition: { type: 'string', description: 'Condition to show panel' }
182
- },
183
- required: ['name', 'table', 'type']
184
- }
185
- },
186
152
  {
187
153
  name: 'snow_configure_workspace_notifications',
188
154
  description: 'Configures notification preferences for Agent Workspace.',
@@ -741,15 +707,6 @@ class ServiceNowFlowWorkspaceMobileMCP {
741
707
  case 'snow_create_workspace':
742
708
  result = await this.createWorkspace(args);
743
709
  break;
744
- case 'snow_create_workspace_tab':
745
- result = await this.createWorkspaceTab(args);
746
- break;
747
- case 'snow_create_workspace_list':
748
- result = await this.createWorkspaceList(args);
749
- break;
750
- case 'snow_create_contextual_panel':
751
- result = await this.createContextualPanel(args);
752
- break;
753
710
  case 'snow_configure_workspace_notifications':
754
711
  result = await this.configureWorkspaceNotifications(args);
755
712
  break;
@@ -1376,167 +1333,6 @@ ${args.roles ? `👥 Roles: ${args.roles.join(', ')}` : ''}
1376
1333
  throw new types_js_1.McpError(types_js_1.ErrorCode.InternalError, `Failed to create workspace: ${error}`);
1377
1334
  }
1378
1335
  }
1379
- async createWorkspaceTab(args) {
1380
- try {
1381
- this.logger.info('Creating workspace tab...');
1382
- // Fix from user feedback: Validate workspace exists first to prevent 400 errors
1383
- const workspaceCheck = await this.client.getRecord('sys_aw_master_config', args.workspace);
1384
- if (!workspaceCheck.success) {
1385
- return {
1386
- success: false,
1387
- error: `Workspace ${args.workspace} not found. Create workspace first using snow_create_workspace.`,
1388
- suggestion: 'Use snow_discover_workspaces to find available workspaces.',
1389
- http_status: 404,
1390
- remediation: 'Verify workspace sys_id is correct or create new workspace first'
1391
- };
1392
- }
1393
- const tabData = {
1394
- workspace: args.workspace,
1395
- name: args.name,
1396
- label: args.label || args.name,
1397
- table: args.table,
1398
- view: args.view || 'list', // Fix: use 'list' instead of 'default'
1399
- order: args.order || 100,
1400
- condition: args.condition || '', // Make condition optional to prevent 400 errors
1401
- active: true
1402
- };
1403
- const response = await this.client.createRecord('sys_aw_tab', tabData);
1404
- if (!response.success) {
1405
- // Enhanced error handling based on user feedback
1406
- if (response.error?.includes('400') || response.error?.includes('Bad Request')) {
1407
- return {
1408
- success: false,
1409
- error: 'Invalid workspace tab configuration. Complex conditions may not be supported.',
1410
- suggestion: 'Try with simpler parameters: remove complex conditions and use basic table references.',
1411
- http_status: 400,
1412
- remediation: 'Check ServiceNow workspace tab documentation for supported field types'
1413
- };
1414
- }
1415
- return {
1416
- success: false,
1417
- error: response.error,
1418
- suggestion: 'Check workspace tab parameters and permissions'
1419
- };
1420
- }
1421
- // Fix from user feedback: Return proper success object instead of content array
1422
- return {
1423
- success: true,
1424
- tab: response.data,
1425
- message: `Workspace tab '${args.name}' created successfully for table ${args.table}`,
1426
- sys_id: response.data.sys_id,
1427
- configuration: {
1428
- workspace: args.workspace,
1429
- table: args.table,
1430
- view: args.view || 'list',
1431
- order: args.order || 100,
1432
- condition: args.condition || 'none'
1433
- }
1434
- };
1435
- }
1436
- catch (error) {
1437
- this.logger.error('Failed to create workspace tab:', error);
1438
- throw new types_js_1.McpError(types_js_1.ErrorCode.InternalError, `Failed to create workspace tab: ${error}`);
1439
- }
1440
- }
1441
- async createWorkspaceList(args) {
1442
- try {
1443
- this.logger.info('Creating workspace list...');
1444
- const listData = {
1445
- workspace: args.workspace,
1446
- name: args.name,
1447
- table: args.table,
1448
- filter: args.filter || '',
1449
- fields: args.fields ? args.fields.join(',') : '',
1450
- order_by: args.order_by || '',
1451
- max_entries: args.max_entries || 50
1452
- };
1453
- const response = await this.client.createRecord('sys_aw_list', listData);
1454
- if (!response.success) {
1455
- throw new Error(`Failed to create workspace list: ${response.error}`);
1456
- }
1457
- return {
1458
- content: [{
1459
- type: 'text',
1460
- text: `✅ Workspace List created!
1461
-
1462
- 📋 **${args.name}**
1463
- 🆔 sys_id: ${response.data.sys_id}
1464
- 📊 Table: ${args.table}
1465
- ${args.filter ? `🔍 Filter: ${args.filter}` : ''}
1466
- 📝 Fields: ${args.fields ? args.fields.length : 'Default'}
1467
- 🔢 Max Entries: ${args.max_entries || 50}
1468
-
1469
- ✨ List configured for workspace!`
1470
- }]
1471
- };
1472
- }
1473
- catch (error) {
1474
- this.logger.error('Failed to create workspace list:', error);
1475
- throw new types_js_1.McpError(types_js_1.ErrorCode.InternalError, `Failed to create workspace list: ${error}`);
1476
- }
1477
- }
1478
- async createContextualPanel(args) {
1479
- try {
1480
- this.logger.info('Creating contextual panel...');
1481
- // Fix from user feedback: Validate table exists to prevent 400 errors
1482
- const tableCheck = await this.client.searchRecords('sys_db_object', `name=${args.table}`, 1);
1483
- if (!tableCheck.success || tableCheck.data.result.length === 0) {
1484
- return {
1485
- success: false,
1486
- error: `Table '${args.table}' not found or not accessible.`,
1487
- suggestion: 'Verify table name is correct and you have read permissions.',
1488
- remediation: 'Use standard ServiceNow tables like: incident, task, sys_user, change_request'
1489
- };
1490
- }
1491
- const panelData = {
1492
- name: args.name,
1493
- table: args.table,
1494
- type: args.type || 'related_records', // Set default type
1495
- position: args.position || 'right',
1496
- width: args.width || 300,
1497
- content: args.content || '',
1498
- condition: args.condition || '',
1499
- active: true
1500
- };
1501
- const response = await this.client.createRecord('sys_aw_context_panel', panelData);
1502
- if (!response.success) {
1503
- // Enhanced error handling based on user feedback
1504
- if (response.error?.includes('400') || response.error?.includes('Bad Request')) {
1505
- return {
1506
- success: false,
1507
- error: 'Invalid contextual panel configuration. Check panel type and table compatibility.',
1508
- suggestion: 'Try with type: "related_records" and standard ServiceNow tables.',
1509
- http_status: 400,
1510
- remediation: 'Verify panel type is supported and table has proper relationships'
1511
- };
1512
- }
1513
- return {
1514
- success: false,
1515
- error: response.error,
1516
- suggestion: 'Check contextual panel parameters and workspace permissions'
1517
- };
1518
- }
1519
- return {
1520
- content: [{
1521
- type: 'text',
1522
- text: `✅ Contextual Panel created!
1523
-
1524
- 📊 **${args.name}**
1525
- 🆔 sys_id: ${response.data.sys_id}
1526
- 📋 Table: ${args.table}
1527
- 📊 Type: ${args.type}
1528
- 📍 Position: ${args.position || 'right'}
1529
- 📐 Width: ${args.width || 300}px
1530
-
1531
- ✨ Panel added to workspace!`
1532
- }]
1533
- };
1534
- }
1535
- catch (error) {
1536
- this.logger.error('Failed to create contextual panel:', error);
1537
- throw new types_js_1.McpError(types_js_1.ErrorCode.InternalError, `Failed to create contextual panel: ${error}`);
1538
- }
1539
- }
1540
1336
  async configureWorkspaceNotifications(args) {
1541
1337
  try {
1542
1338
  this.logger.info('Configuring workspace notifications...');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "4.5.26",
3
+ "version": "4.5.28",
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",