snow-flow 8.41.9 → 8.41.15
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/dist/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.d.ts +11 -2
- package/dist/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.js +184 -23
- package/dist/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.d.ts +15 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.js +273 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.d.ts +125 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.js +2459 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_manage_flow.js.map +1 -0
- package/dist/templates/claude-md-template.d.ts +2 -2
- package/dist/templates/claude-md-template.d.ts.map +1 -1
- package/dist/templates/claude-md-template.js +24 -42
- package/dist/templates/claude-md-template.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* snow_create_business_rule
|
|
3
|
+
*
|
|
4
|
+
* Creates server-side business rules in ServiceNow.
|
|
5
|
+
* Supports all major business rule configurations including:
|
|
6
|
+
* - Trigger conditions (insert/update/delete/query)
|
|
7
|
+
* - Filter conditions (encoded query)
|
|
8
|
+
* - Script conditions
|
|
9
|
+
* - Execution order
|
|
10
|
+
* - Role conditions
|
|
11
|
+
* - Abort actions and messages
|
|
3
12
|
*/
|
|
4
13
|
import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
|
|
5
14
|
export declare const toolDefinition: MCPToolDefinition;
|
|
6
15
|
export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
|
|
7
|
-
export declare const version = "
|
|
8
|
-
export declare const author = "Snow-Flow
|
|
16
|
+
export declare const version = "2.0.0";
|
|
17
|
+
export declare const author = "Snow-Flow v8.41.15";
|
|
9
18
|
//# sourceMappingURL=snow_create_business_rule.d.ts.map
|
package/dist/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_create_business_rule.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"snow_create_business_rule.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAyH5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAqGxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* snow_create_business_rule
|
|
4
|
+
*
|
|
5
|
+
* Creates server-side business rules in ServiceNow.
|
|
6
|
+
* Supports all major business rule configurations including:
|
|
7
|
+
* - Trigger conditions (insert/update/delete/query)
|
|
8
|
+
* - Filter conditions (encoded query)
|
|
9
|
+
* - Script conditions
|
|
10
|
+
* - Execution order
|
|
11
|
+
* - Role conditions
|
|
12
|
+
* - Abort actions and messages
|
|
4
13
|
*/
|
|
5
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
15
|
exports.author = exports.version = exports.toolDefinition = void 0;
|
|
@@ -9,7 +18,7 @@ const auth_js_1 = require("../../shared/auth.js");
|
|
|
9
18
|
const error_handler_js_1 = require("../../shared/error-handler.js");
|
|
10
19
|
exports.toolDefinition = {
|
|
11
20
|
name: 'snow_create_business_rule',
|
|
12
|
-
description: 'Create server-side business rule (ES5 only!)',
|
|
21
|
+
description: 'Create server-side business rule with full configuration options (ES5 only for scripts!)',
|
|
13
22
|
// Metadata for tool discovery (not sent to LLM)
|
|
14
23
|
category: 'development',
|
|
15
24
|
subcategory: 'platform',
|
|
@@ -23,44 +32,196 @@ exports.toolDefinition = {
|
|
|
23
32
|
inputSchema: {
|
|
24
33
|
type: 'object',
|
|
25
34
|
properties: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
// Basic Info
|
|
36
|
+
name: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Business rule name'
|
|
39
|
+
},
|
|
40
|
+
table: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'Table name (e.g., incident, task, sys_user)'
|
|
43
|
+
},
|
|
44
|
+
description: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Description of what this business rule does'
|
|
47
|
+
},
|
|
48
|
+
// When to Run
|
|
49
|
+
when: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
enum: ['before', 'after', 'async', 'display'],
|
|
52
|
+
default: 'before',
|
|
53
|
+
description: 'When to execute: before (before DB), after (after DB), async (scheduled), display (form load)'
|
|
54
|
+
},
|
|
55
|
+
order: {
|
|
56
|
+
type: 'number',
|
|
57
|
+
default: 100,
|
|
58
|
+
description: 'Execution order (lower = runs first). Default: 100'
|
|
59
|
+
},
|
|
60
|
+
// Trigger Operations
|
|
61
|
+
insert: {
|
|
62
|
+
type: 'boolean',
|
|
63
|
+
default: false,
|
|
64
|
+
description: 'Run on insert operations'
|
|
65
|
+
},
|
|
66
|
+
update: {
|
|
67
|
+
type: 'boolean',
|
|
68
|
+
default: false,
|
|
69
|
+
description: 'Run on update operations'
|
|
70
|
+
},
|
|
71
|
+
delete: {
|
|
72
|
+
type: 'boolean',
|
|
73
|
+
default: false,
|
|
74
|
+
description: 'Run on delete operations'
|
|
75
|
+
},
|
|
76
|
+
query: {
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
default: false,
|
|
79
|
+
description: 'Run on query operations'
|
|
80
|
+
},
|
|
81
|
+
// Conditions
|
|
82
|
+
filter_condition: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
description: 'Encoded query filter (e.g., "active=true^priority=1"). Record must match this to trigger the rule.'
|
|
85
|
+
},
|
|
86
|
+
condition: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'Script condition that must return true (ES5 only!). E.g., "current.priority == 1"'
|
|
89
|
+
},
|
|
90
|
+
role_conditions: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Comma-separated role sys_ids. Only users with these roles trigger the rule.'
|
|
93
|
+
},
|
|
94
|
+
// Script
|
|
95
|
+
script: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Script to execute (ES5 ONLY! No const/let/arrow functions). Use current/previous objects.'
|
|
98
|
+
},
|
|
99
|
+
// Actions
|
|
100
|
+
abort_action: {
|
|
101
|
+
type: 'boolean',
|
|
102
|
+
default: false,
|
|
103
|
+
description: 'Abort the database action (only works with "before" rules)'
|
|
104
|
+
},
|
|
105
|
+
add_message: {
|
|
106
|
+
type: 'boolean',
|
|
107
|
+
default: false,
|
|
108
|
+
description: 'Add an info message to the user'
|
|
109
|
+
},
|
|
110
|
+
message: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
description: 'Message text to display (requires add_message=true)'
|
|
113
|
+
},
|
|
114
|
+
// Advanced
|
|
115
|
+
active: {
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
default: true,
|
|
118
|
+
description: 'Whether the business rule is active'
|
|
119
|
+
},
|
|
120
|
+
access: {
|
|
121
|
+
type: 'string',
|
|
122
|
+
enum: ['package_private', 'public'],
|
|
123
|
+
default: 'package_private',
|
|
124
|
+
description: 'Access level for the business rule'
|
|
125
|
+
},
|
|
126
|
+
application_scope: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Application scope sys_id (leave empty for global)'
|
|
129
|
+
}
|
|
36
130
|
},
|
|
37
|
-
required: ['name', 'table'
|
|
131
|
+
required: ['name', 'table']
|
|
38
132
|
}
|
|
39
133
|
};
|
|
40
134
|
async function execute(args, context) {
|
|
41
|
-
const {
|
|
135
|
+
const {
|
|
136
|
+
// Basic
|
|
137
|
+
name, table, description,
|
|
138
|
+
// When
|
|
139
|
+
when = 'before', order = 100,
|
|
140
|
+
// Operations
|
|
141
|
+
insert = false, update = false, delete: del = false, query = false,
|
|
142
|
+
// Conditions
|
|
143
|
+
filter_condition, condition, role_conditions,
|
|
144
|
+
// Script
|
|
145
|
+
script,
|
|
146
|
+
// Actions
|
|
147
|
+
abort_action = false, add_message = false, message,
|
|
148
|
+
// Advanced
|
|
149
|
+
active = true, access = 'package_private', application_scope } = args;
|
|
150
|
+
// Validate: at least one operation must be selected
|
|
151
|
+
if (!insert && !update && !del && !query) {
|
|
152
|
+
return (0, error_handler_js_1.createErrorResult)('At least one operation must be selected: insert, update, delete, or query');
|
|
153
|
+
}
|
|
154
|
+
// Validate: script is required unless it's just an abort action
|
|
155
|
+
if (!script && !abort_action) {
|
|
156
|
+
return (0, error_handler_js_1.createErrorResult)('Either script or abort_action is required');
|
|
157
|
+
}
|
|
42
158
|
try {
|
|
43
159
|
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
160
|
+
// Build the business rule data object
|
|
44
161
|
const brData = {
|
|
45
162
|
name,
|
|
46
163
|
collection: table,
|
|
47
164
|
when,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
active
|
|
165
|
+
order,
|
|
166
|
+
action_insert: insert,
|
|
167
|
+
action_update: update,
|
|
168
|
+
action_delete: del,
|
|
169
|
+
action_query: query,
|
|
170
|
+
active,
|
|
171
|
+
access
|
|
54
172
|
};
|
|
173
|
+
// Optional fields
|
|
174
|
+
if (description)
|
|
175
|
+
brData.description = description;
|
|
176
|
+
if (filter_condition)
|
|
177
|
+
brData.filter_condition = filter_condition;
|
|
55
178
|
if (condition)
|
|
56
179
|
brData.condition = condition;
|
|
180
|
+
if (role_conditions)
|
|
181
|
+
brData.role_conditions = role_conditions;
|
|
182
|
+
if (script)
|
|
183
|
+
brData.script = script;
|
|
184
|
+
if (abort_action)
|
|
185
|
+
brData.abort_action = abort_action;
|
|
186
|
+
if (add_message)
|
|
187
|
+
brData.add_message = add_message;
|
|
188
|
+
if (message)
|
|
189
|
+
brData.message = message;
|
|
190
|
+
if (application_scope)
|
|
191
|
+
brData.sys_scope = application_scope;
|
|
57
192
|
const response = await client.post('/api/now/table/sys_script', brData);
|
|
58
|
-
|
|
193
|
+
const result = response.data.result;
|
|
194
|
+
// Build response with helpful info
|
|
195
|
+
const instanceUrl = (client.defaults?.baseURL || '').replace('/api/now', '');
|
|
196
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
197
|
+
created: true,
|
|
198
|
+
business_rule: {
|
|
199
|
+
sys_id: result.sys_id,
|
|
200
|
+
name: result.name,
|
|
201
|
+
table: result.collection,
|
|
202
|
+
when: result.when,
|
|
203
|
+
order: result.order,
|
|
204
|
+
operations: {
|
|
205
|
+
insert: result.action_insert === 'true',
|
|
206
|
+
update: result.action_update === 'true',
|
|
207
|
+
delete: result.action_delete === 'true',
|
|
208
|
+
query: result.action_query === 'true'
|
|
209
|
+
},
|
|
210
|
+
active: result.active === 'true',
|
|
211
|
+
url: `${instanceUrl}/sys_script.do?sys_id=${result.sys_id}`
|
|
212
|
+
},
|
|
213
|
+
tips: [
|
|
214
|
+
'Use "current" to access the current record being processed',
|
|
215
|
+
'Use "previous" to access the previous values (on update)',
|
|
216
|
+
'Use "gs" for GlideSystem methods like gs.info(), gs.addInfoMessage()',
|
|
217
|
+
'Remember: ES5 ONLY - no const, let, arrow functions, or template literals!'
|
|
218
|
+
]
|
|
219
|
+
});
|
|
59
220
|
}
|
|
60
221
|
catch (error) {
|
|
61
|
-
return (0, error_handler_js_1.createErrorResult)(error.message);
|
|
222
|
+
return (0, error_handler_js_1.createErrorResult)(`Failed to create business rule: ${error.response?.data?.error?.message || error.message}`);
|
|
62
223
|
}
|
|
63
224
|
}
|
|
64
|
-
exports.version = '
|
|
65
|
-
exports.author = 'Snow-Flow
|
|
225
|
+
exports.version = '2.0.0';
|
|
226
|
+
exports.author = 'Snow-Flow v8.41.15';
|
|
66
227
|
//# sourceMappingURL=snow_create_business_rule.js.map
|
package/dist/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_create_business_rule.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"snow_create_business_rule.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/business-rules/snow_create_business_rule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAiIH,0BAqGC;AAnOD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,0FAA0F;IACvG,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAA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ACF,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,IAAA,oCAAiB,EAAC,mCAAmC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACvH,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snow_flow_discover - Discover available Flow Designer components
|
|
3
|
+
*
|
|
4
|
+
* Discovers available trigger types, action types, and subflows
|
|
5
|
+
* that can be used when creating flows programmatically.
|
|
6
|
+
*
|
|
7
|
+
* @version 1.0.0
|
|
8
|
+
* @author Snow-Flow v8.3.0 - Flow Designer Discovery
|
|
9
|
+
*/
|
|
10
|
+
import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
|
|
11
|
+
export declare const toolDefinition: MCPToolDefinition;
|
|
12
|
+
export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
|
|
13
|
+
export declare const version = "1.0.0";
|
|
14
|
+
export declare const author = "Snow-Flow v8.3.0 - Flow Designer Discovery";
|
|
15
|
+
//# sourceMappingURL=snow_flow_discover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snow_flow_discover.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAkCzF,eAAO,MAAM,cAAc,EAAE,iBAmD5B,CAAC;AAIF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAsOxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,+CAA+C,CAAC"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* snow_flow_discover - Discover available Flow Designer components
|
|
4
|
+
*
|
|
5
|
+
* Discovers available trigger types, action types, and subflows
|
|
6
|
+
* that can be used when creating flows programmatically.
|
|
7
|
+
*
|
|
8
|
+
* @version 1.0.0
|
|
9
|
+
* @author Snow-Flow v8.3.0 - Flow Designer Discovery
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.author = exports.version = exports.toolDefinition = void 0;
|
|
13
|
+
exports.execute = execute;
|
|
14
|
+
const auth_js_1 = require("../../shared/auth.js");
|
|
15
|
+
const error_handler_js_1 = require("../../shared/error-handler.js");
|
|
16
|
+
// ==================== TOOL DEFINITION ====================
|
|
17
|
+
exports.toolDefinition = {
|
|
18
|
+
name: 'snow_flow_discover',
|
|
19
|
+
description: `Discover available Flow Designer components.
|
|
20
|
+
|
|
21
|
+
Discovers:
|
|
22
|
+
- Trigger types: Record triggers, scheduled, API, email, etc.
|
|
23
|
+
- Action types: Create record, update record, log, send email, etc.
|
|
24
|
+
- Subflows: Reusable flow components
|
|
25
|
+
- Spokes: Integration action packages (Jira, Slack, etc.)
|
|
26
|
+
|
|
27
|
+
Use this to find the correct sys_id or name for triggers and actions
|
|
28
|
+
when creating flows programmatically with snow_create_flow.`,
|
|
29
|
+
category: 'automation',
|
|
30
|
+
subcategory: 'flow-designer',
|
|
31
|
+
use_cases: ['discovery', 'flow-creation', 'documentation'],
|
|
32
|
+
complexity: 'beginner',
|
|
33
|
+
frequency: 'medium',
|
|
34
|
+
permission: 'read',
|
|
35
|
+
allowedRoles: ['developer', 'stakeholder', 'admin'],
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
discover: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
enum: ['trigger_types', 'action_types', 'subflows', 'spokes', 'all'],
|
|
42
|
+
description: 'What to discover',
|
|
43
|
+
default: 'all'
|
|
44
|
+
},
|
|
45
|
+
category: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
description: 'Filter by category (for action types)'
|
|
48
|
+
},
|
|
49
|
+
search: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Search term to filter results'
|
|
52
|
+
},
|
|
53
|
+
limit: {
|
|
54
|
+
type: 'number',
|
|
55
|
+
description: 'Maximum results per category',
|
|
56
|
+
default: 50
|
|
57
|
+
},
|
|
58
|
+
include_inactive: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
description: 'Include inactive items',
|
|
61
|
+
default: false
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
// ==================== MAIN EXECUTOR ====================
|
|
67
|
+
async function execute(args, context) {
|
|
68
|
+
const { discover = 'all', category, search, limit = 50, include_inactive = false } = args;
|
|
69
|
+
try {
|
|
70
|
+
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
71
|
+
const results = {};
|
|
72
|
+
// ==================== TRIGGER TYPES ====================
|
|
73
|
+
// Note: sys_hub_trigger_type doesn't have 'label' or 'active' fields
|
|
74
|
+
if (discover === 'trigger_types' || discover === 'all') {
|
|
75
|
+
console.log('Discovering trigger types...');
|
|
76
|
+
try {
|
|
77
|
+
let query = '';
|
|
78
|
+
if (search) {
|
|
79
|
+
query = `nameLIKE${search}`;
|
|
80
|
+
}
|
|
81
|
+
const response = await client.get('/api/now/table/sys_hub_trigger_type', {
|
|
82
|
+
params: {
|
|
83
|
+
sysparm_query: query,
|
|
84
|
+
sysparm_limit: limit,
|
|
85
|
+
sysparm_fields: 'sys_id,name,description,table_name'
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
if (response.data.result) {
|
|
89
|
+
results.trigger_types = response.data.result.map((t) => ({
|
|
90
|
+
sys_id: t.sys_id,
|
|
91
|
+
name: t.name,
|
|
92
|
+
label: t.name, // Use name as label (label field doesn't exist)
|
|
93
|
+
description: t.description,
|
|
94
|
+
table_name: t.table_name
|
|
95
|
+
}));
|
|
96
|
+
console.log(`Found ${results.trigger_types.length} trigger types`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error('Failed to fetch trigger types:', error.message);
|
|
101
|
+
results.trigger_types_error = error.message;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// ==================== ACTION TYPES ====================
|
|
105
|
+
// Note: sys_hub_action_type_base doesn't have 'label' or 'active' fields
|
|
106
|
+
if (discover === 'action_types' || discover === 'all') {
|
|
107
|
+
console.log('Discovering action types...');
|
|
108
|
+
try {
|
|
109
|
+
let query = ''; // No 'active' field on this table
|
|
110
|
+
if (category) {
|
|
111
|
+
query += (query ? '^' : '') + `category=${category}`;
|
|
112
|
+
}
|
|
113
|
+
if (search) {
|
|
114
|
+
query += (query ? '^' : '') + `nameLIKE${search}`;
|
|
115
|
+
}
|
|
116
|
+
const response = await client.get('/api/now/table/sys_hub_action_type_base', {
|
|
117
|
+
params: {
|
|
118
|
+
sysparm_query: query,
|
|
119
|
+
sysparm_limit: limit,
|
|
120
|
+
sysparm_fields: 'sys_id,name,category,description,spoke'
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
if (response.data.result) {
|
|
124
|
+
results.action_types = response.data.result.map((a) => ({
|
|
125
|
+
sys_id: a.sys_id,
|
|
126
|
+
name: a.name,
|
|
127
|
+
label: a.name, // Use name as label (label field doesn't exist)
|
|
128
|
+
category: a.category,
|
|
129
|
+
description: a.description,
|
|
130
|
+
spoke: a.spoke
|
|
131
|
+
}));
|
|
132
|
+
console.log(`Found ${results.action_types.length} action types`);
|
|
133
|
+
// Group by category for easier browsing
|
|
134
|
+
const byCategory = {};
|
|
135
|
+
for (const action of results.action_types) {
|
|
136
|
+
const cat = action.category || 'Uncategorized';
|
|
137
|
+
if (!byCategory[cat])
|
|
138
|
+
byCategory[cat] = [];
|
|
139
|
+
byCategory[cat].push(action);
|
|
140
|
+
}
|
|
141
|
+
results.action_types_by_category = byCategory;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
console.error('Failed to fetch action types:', error.message);
|
|
146
|
+
results.action_types_error = error.message;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// ==================== SUBFLOWS ====================
|
|
150
|
+
if (discover === 'subflows' || discover === 'all') {
|
|
151
|
+
console.log('Discovering subflows...');
|
|
152
|
+
try {
|
|
153
|
+
let query = include_inactive ? '' : 'active=true';
|
|
154
|
+
query += (query ? '^' : '') + 'type=subflow';
|
|
155
|
+
if (search) {
|
|
156
|
+
query += `^nameLIKE${search}^ORinternal_nameLIKE${search}`;
|
|
157
|
+
}
|
|
158
|
+
const response = await client.get('/api/now/table/sys_hub_flow', {
|
|
159
|
+
params: {
|
|
160
|
+
sysparm_query: query,
|
|
161
|
+
sysparm_limit: limit,
|
|
162
|
+
sysparm_fields: 'sys_id,name,internal_name,description'
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
if (response.data.result) {
|
|
166
|
+
results.subflows = response.data.result.map((s) => ({
|
|
167
|
+
sys_id: s.sys_id,
|
|
168
|
+
name: s.name,
|
|
169
|
+
internal_name: s.internal_name,
|
|
170
|
+
description: s.description
|
|
171
|
+
}));
|
|
172
|
+
console.log(`Found ${results.subflows.length} subflows`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
console.error('Failed to fetch subflows:', error.message);
|
|
177
|
+
results.subflows_error = error.message;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// ==================== SPOKES (Integration Hubs) ====================
|
|
181
|
+
if (discover === 'spokes' || discover === 'all') {
|
|
182
|
+
console.log('Discovering spokes...');
|
|
183
|
+
try {
|
|
184
|
+
let query = include_inactive ? '' : 'active=true';
|
|
185
|
+
if (search) {
|
|
186
|
+
query += (query ? '^' : '') + `nameLIKE${search}^ORlabelLIKE${search}`;
|
|
187
|
+
}
|
|
188
|
+
const response = await client.get('/api/now/table/sys_hub_spoke', {
|
|
189
|
+
params: {
|
|
190
|
+
sysparm_query: query,
|
|
191
|
+
sysparm_limit: limit,
|
|
192
|
+
sysparm_fields: 'sys_id,name,label,description,version'
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
if (response.data.result) {
|
|
196
|
+
results.spokes = response.data.result.map((s) => ({
|
|
197
|
+
sys_id: s.sys_id,
|
|
198
|
+
name: s.name,
|
|
199
|
+
label: s.label || s.name,
|
|
200
|
+
description: s.description,
|
|
201
|
+
version: s.version
|
|
202
|
+
}));
|
|
203
|
+
console.log(`Found ${results.spokes.length} spokes`);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch (error) {
|
|
207
|
+
console.error('Failed to fetch spokes:', error.message);
|
|
208
|
+
results.spokes_error = error.message;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// ==================== COMMON ACTIONS REFERENCE ====================
|
|
212
|
+
// Add a quick reference for common action types
|
|
213
|
+
results.common_action_reference = {
|
|
214
|
+
'Core Actions': [
|
|
215
|
+
{ name: 'Log', description: 'Write a message to the system log' },
|
|
216
|
+
{ name: 'Create Record', description: 'Create a new record in a table' },
|
|
217
|
+
{ name: 'Update Record', description: 'Update an existing record' },
|
|
218
|
+
{ name: 'Delete Record', description: 'Delete a record' },
|
|
219
|
+
{ name: 'Look Up Records', description: 'Query records from a table' },
|
|
220
|
+
{ name: 'Look Up Record', description: 'Get a single record by sys_id' },
|
|
221
|
+
{ name: 'Set Flow Variables', description: 'Set flow variable values' }
|
|
222
|
+
],
|
|
223
|
+
'Communication': [
|
|
224
|
+
{ name: 'Send Email', description: 'Send an email notification' },
|
|
225
|
+
{ name: 'Send Event', description: 'Fire a system event' },
|
|
226
|
+
{ name: 'Create Task', description: 'Create a task record' }
|
|
227
|
+
],
|
|
228
|
+
'Approvals': [
|
|
229
|
+
{ name: 'Ask For Approval', description: 'Request approval from users' },
|
|
230
|
+
{ name: 'Wait For Condition', description: 'Wait until a condition is met' }
|
|
231
|
+
],
|
|
232
|
+
'Scripting': [
|
|
233
|
+
{ name: 'Run Script', description: 'Execute a server-side script' }
|
|
234
|
+
]
|
|
235
|
+
};
|
|
236
|
+
// ==================== COMMON TRIGGER REFERENCE ====================
|
|
237
|
+
results.common_trigger_reference = {
|
|
238
|
+
'Record Triggers': [
|
|
239
|
+
{ name: 'Created', description: 'When a record is created' },
|
|
240
|
+
{ name: 'Updated', description: 'When a record is updated' },
|
|
241
|
+
{ name: 'Deleted', description: 'When a record is deleted' },
|
|
242
|
+
{ name: 'Created or Updated', description: 'When a record is created or updated' }
|
|
243
|
+
],
|
|
244
|
+
'Scheduled Triggers': [
|
|
245
|
+
{ name: 'Scheduled', description: 'Run on a schedule (daily, weekly, etc.)' },
|
|
246
|
+
{ name: 'Interval', description: 'Run at fixed intervals' }
|
|
247
|
+
],
|
|
248
|
+
'Other Triggers': [
|
|
249
|
+
{ name: 'REST API', description: 'Triggered via REST API call' },
|
|
250
|
+
{ name: 'Inbound Email', description: 'Triggered by incoming email' },
|
|
251
|
+
{ name: 'Service Catalog', description: 'Triggered by catalog request' }
|
|
252
|
+
]
|
|
253
|
+
};
|
|
254
|
+
// Build summary
|
|
255
|
+
const summary = {
|
|
256
|
+
trigger_types: results.trigger_types?.length || 0,
|
|
257
|
+
action_types: results.action_types?.length || 0,
|
|
258
|
+
subflows: results.subflows?.length || 0,
|
|
259
|
+
spokes: results.spokes?.length || 0
|
|
260
|
+
};
|
|
261
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
262
|
+
discovered: discover,
|
|
263
|
+
summary,
|
|
264
|
+
...results
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
catch (error) {
|
|
268
|
+
return (0, error_handler_js_1.createErrorResult)(`Failed to discover flow components: ${error.message}`);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.version = '1.0.0';
|
|
272
|
+
exports.author = 'Snow-Flow v8.3.0 - Flow Designer Discovery';
|
|
273
|
+
//# sourceMappingURL=snow_flow_discover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snow_flow_discover.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/flow-designer/snow_flow_discover.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA2FH,0BAsOC;AA9TD,kDAA8D;AAC9D,oEAAuF;AA8BvF,4DAA4D;AAE/C,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;;;;;4DAS6C;IAE1D,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,eAAe,CAAC;IAC1D,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,QAAQ;IAEnB,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,OAAO,CAAC;IAEnD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAC;gBACpE,WAAW,EAAE,kBAAkB;gBAC/B,OAAO,EAAE,KAAK;aACf;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;gBAC3C,OAAO,EAAE,EAA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