snow-flow 8.33.6 → 8.33.7
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/email/snow_send_email.d.ts +4 -1
- package/dist/mcp/servicenow-mcp-unified/tools/email/snow_send_email.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/email/snow_send_email.js +111 -26
- package/dist/mcp/servicenow-mcp-unified/tools/email/snow_send_email.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.js +78 -7
- package/dist/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_update_incident.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_update_incident.js +36 -16
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_update_incident.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* snow_send_email
|
|
2
|
+
* snow_send_email - Send email notifications via ServiceNow
|
|
3
|
+
*
|
|
4
|
+
* Creates email records in sys_email table which are processed by ServiceNow's
|
|
5
|
+
* email engine. Supports recipients by username, email address, or sys_id.
|
|
3
6
|
*/
|
|
4
7
|
import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
|
|
5
8
|
export declare const toolDefinition: MCPToolDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_send_email.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/email/snow_send_email.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"snow_send_email.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/email/snow_send_email.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAgC5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CA8HxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4BAA4B,CAAC"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* snow_send_email
|
|
3
|
+
* snow_send_email - Send email notifications via ServiceNow
|
|
4
|
+
*
|
|
5
|
+
* Creates email records in sys_email table which are processed by ServiceNow's
|
|
6
|
+
* email engine. Supports recipients by username, email address, or sys_id.
|
|
4
7
|
*/
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
9
|
exports.author = exports.version = exports.toolDefinition = void 0;
|
|
@@ -9,7 +12,7 @@ const auth_js_1 = require("../../shared/auth.js");
|
|
|
9
12
|
const error_handler_js_1 = require("../../shared/error-handler.js");
|
|
10
13
|
exports.toolDefinition = {
|
|
11
14
|
name: 'snow_send_email',
|
|
12
|
-
description: 'Send email notification',
|
|
15
|
+
description: 'Send email notification via sys_email table (supports username, email, or sys_id)',
|
|
13
16
|
// Metadata for tool discovery (not sent to LLM)
|
|
14
17
|
category: 'automation',
|
|
15
18
|
subcategory: 'notifications',
|
|
@@ -17,45 +20,127 @@ exports.toolDefinition = {
|
|
|
17
20
|
complexity: 'beginner',
|
|
18
21
|
frequency: 'high',
|
|
19
22
|
// Permission enforcement
|
|
20
|
-
// Classification:
|
|
21
|
-
permission: '
|
|
22
|
-
allowedRoles: ['developer', '
|
|
23
|
+
// Classification: WRITE - Creates sys_email record
|
|
24
|
+
permission: 'write',
|
|
25
|
+
allowedRoles: ['developer', 'admin'],
|
|
23
26
|
inputSchema: {
|
|
24
27
|
type: 'object',
|
|
25
28
|
properties: {
|
|
26
|
-
to: {
|
|
29
|
+
to: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Recipient: username (admin), email (user@example.com), or sys_id'
|
|
32
|
+
},
|
|
27
33
|
subject: { type: 'string', description: 'Email subject' },
|
|
28
|
-
body: { type: 'string', description: 'Email body' },
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
body: { type: 'string', description: 'Email body (HTML supported)' },
|
|
35
|
+
body_text: { type: 'string', description: 'Plain text email body (alternative to body)' },
|
|
36
|
+
from: { type: 'string', description: 'Sender email address' },
|
|
37
|
+
reply_to: { type: 'string', description: 'Reply-to email address' },
|
|
38
|
+
cc: { type: 'string', description: 'CC recipients (comma-separated)' },
|
|
39
|
+
bcc: { type: 'string', description: 'BCC recipients (comma-separated)' },
|
|
40
|
+
importance: { type: 'string', enum: ['low', 'normal', 'high'], default: 'normal' }
|
|
32
41
|
},
|
|
33
|
-
required: ['to', 'subject'
|
|
42
|
+
required: ['to', 'subject']
|
|
34
43
|
}
|
|
35
44
|
};
|
|
36
45
|
async function execute(args, context) {
|
|
37
|
-
const { to, subject, body, from, cc, bcc } = args;
|
|
46
|
+
const { to, subject, body, body_text, from, reply_to, cc, bcc, importance = 'normal' } = args;
|
|
38
47
|
try {
|
|
39
48
|
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
// Resolve recipient to user sys_id if it's a username
|
|
50
|
+
let recipientsSysId = to;
|
|
51
|
+
let recipientsEmail = to;
|
|
52
|
+
// Check if 'to' is a username (no @ sign and no sys_id format)
|
|
53
|
+
if (!to.includes('@') && !to.match(/^[0-9a-f]{32}$/i)) {
|
|
54
|
+
// Try to resolve as username
|
|
55
|
+
try {
|
|
56
|
+
const userResponse = await client.get('/api/now/table/sys_user', {
|
|
57
|
+
params: {
|
|
58
|
+
sysparm_query: `user_name=${to}^ORemail=${to}`,
|
|
59
|
+
sysparm_fields: 'sys_id,email,user_name,name',
|
|
60
|
+
sysparm_limit: 1
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
if (userResponse.data.result && userResponse.data.result.length > 0) {
|
|
64
|
+
const user = userResponse.data.result[0];
|
|
65
|
+
recipientsSysId = user.sys_id;
|
|
66
|
+
recipientsEmail = user.email || to;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (userError) {
|
|
70
|
+
// If user lookup fails, treat as email address
|
|
71
|
+
console.warn(`Could not resolve user '${to}', treating as email address`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Build email record
|
|
75
|
+
const emailData = {
|
|
76
|
+
recipients: recipientsEmail,
|
|
77
|
+
subject: subject,
|
|
78
|
+
body: body || body_text || '',
|
|
79
|
+
type: 'send-ready',
|
|
80
|
+
state: 'ready'
|
|
81
|
+
};
|
|
82
|
+
// Add optional fields
|
|
83
|
+
if (from) {
|
|
84
|
+
emailData.from = from;
|
|
85
|
+
}
|
|
86
|
+
if (reply_to) {
|
|
87
|
+
emailData.reply_to = reply_to;
|
|
88
|
+
}
|
|
89
|
+
if (cc) {
|
|
90
|
+
emailData.cc = cc;
|
|
91
|
+
}
|
|
92
|
+
if (bcc) {
|
|
93
|
+
emailData.bcc = bcc;
|
|
94
|
+
}
|
|
95
|
+
// Set importance/priority
|
|
96
|
+
if (importance === 'high') {
|
|
97
|
+
emailData.importance = 'high';
|
|
98
|
+
}
|
|
99
|
+
else if (importance === 'low') {
|
|
100
|
+
emailData.importance = 'low';
|
|
101
|
+
}
|
|
102
|
+
// If 'to' is a user sys_id, also set user field
|
|
103
|
+
if (recipientsSysId.match(/^[0-9a-f]{32}$/i)) {
|
|
104
|
+
emailData.user = recipientsSysId;
|
|
105
|
+
}
|
|
106
|
+
// Create email record
|
|
107
|
+
const response = await client.post('/api/now/table/sys_email', emailData);
|
|
108
|
+
const emailRecord = response.data.result;
|
|
51
109
|
return (0, error_handler_js_1.createSuccessResult)({
|
|
52
110
|
sent: true,
|
|
53
|
-
|
|
54
|
-
|
|
111
|
+
email_sys_id: emailRecord.sys_id,
|
|
112
|
+
recipients: recipientsEmail,
|
|
113
|
+
subject: emailRecord.subject,
|
|
114
|
+
state: emailRecord.state,
|
|
115
|
+
type: emailRecord.type,
|
|
116
|
+
message: 'Email queued for delivery by ServiceNow email engine'
|
|
55
117
|
});
|
|
56
118
|
}
|
|
57
119
|
catch (error) {
|
|
58
|
-
|
|
120
|
+
// Extract ServiceNow error details
|
|
121
|
+
const snowError = error.response?.data?.error || {};
|
|
122
|
+
const errorMessage = snowError.message || error.message;
|
|
123
|
+
const errorDetail = snowError.detail || '';
|
|
124
|
+
if (error.response?.status === 400) {
|
|
125
|
+
return (0, error_handler_js_1.createErrorResult)(new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.VALIDATION_ERROR, `Failed to send email: ${errorMessage}`, {
|
|
126
|
+
details: {
|
|
127
|
+
status_code: 400,
|
|
128
|
+
snow_error: snowError,
|
|
129
|
+
error_detail: errorDetail,
|
|
130
|
+
provided_data: { to, subject },
|
|
131
|
+
suggestion: 'Verify recipient format (username, email, or sys_id) and that required fields are provided'
|
|
132
|
+
}
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
return (0, error_handler_js_1.createErrorResult)(error instanceof error_handler_js_1.SnowFlowError
|
|
136
|
+
? error
|
|
137
|
+
: new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.UNKNOWN_ERROR, `Failed to send email: ${errorMessage}`, {
|
|
138
|
+
details: {
|
|
139
|
+
snow_error: snowError,
|
|
140
|
+
error_detail: errorDetail,
|
|
141
|
+
status_code: error.response?.status
|
|
142
|
+
}
|
|
143
|
+
}));
|
|
59
144
|
}
|
|
60
145
|
}
|
|
61
146
|
exports.version = '1.0.0';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_send_email.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/email/snow_send_email.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"snow_send_email.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/email/snow_send_email.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAwCH,0BA8HC;AAnKD,kDAA8D;AAC9D,oEAAiH;AAEpG,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,mFAAmF;IAChG,gDAAgD;IAChD,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,eAAe,CAAC;IACtD,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,mDAAmD;IACnD,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kEAAkE;aAChF;YACD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE;YACzD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;YACpE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6CAA6C,EAAE;YACzF,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;YAC7D,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wBAAwB,EAAE;YACnE,EAAE,EAAE,EAAE,IAA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gBACE,OAAO,EAAE;oBACP,UAAU,EAAE,SAAS;oBACrB,YAAY,EAAE,WAAW;oBACzB,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM;iBACpC;aACF,CACF,CACN,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,yBAAyB,CAAC"}
|
package/dist/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_create_transform_map.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"snow_create_transform_map.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAyB5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CA+GxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4BAA4B,CAAC"}
|
|
@@ -24,28 +24,99 @@ exports.toolDefinition = {
|
|
|
24
24
|
type: 'object',
|
|
25
25
|
properties: {
|
|
26
26
|
name: { type: 'string', description: 'Transform map name' },
|
|
27
|
-
source_table: { type: 'string', description: 'Source import table' },
|
|
28
|
-
target_table: { type: 'string', description: 'Target table' },
|
|
29
|
-
run_business_rules: { type: 'boolean', default: true }
|
|
27
|
+
source_table: { type: 'string', description: 'Source import table (u_import_table)' },
|
|
28
|
+
target_table: { type: 'string', description: 'Target table (incident, task, etc.)' },
|
|
29
|
+
run_business_rules: { type: 'boolean', default: true },
|
|
30
|
+
description: { type: 'string', description: 'Transform map description' }
|
|
30
31
|
},
|
|
31
32
|
required: ['name', 'source_table', 'target_table']
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
async function execute(args, context) {
|
|
35
|
-
const { name, source_table, target_table, run_business_rules = true } = args;
|
|
36
|
+
const { name, source_table, target_table, run_business_rules = true, description } = args;
|
|
36
37
|
try {
|
|
37
38
|
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
39
|
+
// Verify source table exists (import tables usually start with u_ or start with import_)
|
|
40
|
+
try {
|
|
41
|
+
const sourceCheck = await client.get(`/api/now/table/sys_db_object`, {
|
|
42
|
+
params: {
|
|
43
|
+
sysparm_query: `name=${source_table}`,
|
|
44
|
+
sysparm_fields: 'name,label',
|
|
45
|
+
sysparm_limit: 1
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
if (!sourceCheck.data.result || sourceCheck.data.result.length === 0) {
|
|
49
|
+
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.VALIDATION_ERROR, `Source table '${source_table}' does not exist. Import tables typically start with 'u_' or 'import_'.`, { details: { source_table, suggestion: 'Create the import table first or verify the table name' } });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
if (error instanceof error_handler_js_1.SnowFlowError)
|
|
54
|
+
throw error;
|
|
55
|
+
// If table check fails, continue anyway (might be permission issue on sys_db_object)
|
|
56
|
+
}
|
|
57
|
+
// Verify target table exists
|
|
58
|
+
try {
|
|
59
|
+
const targetCheck = await client.get(`/api/now/table/sys_db_object`, {
|
|
60
|
+
params: {
|
|
61
|
+
sysparm_query: `name=${target_table}`,
|
|
62
|
+
sysparm_fields: 'name,label',
|
|
63
|
+
sysparm_limit: 1
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
if (!targetCheck.data.result || targetCheck.data.result.length === 0) {
|
|
67
|
+
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.VALIDATION_ERROR, `Target table '${target_table}' does not exist`, { details: { target_table } });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (error instanceof error_handler_js_1.SnowFlowError)
|
|
72
|
+
throw error;
|
|
73
|
+
// If table check fails, continue anyway
|
|
74
|
+
}
|
|
38
75
|
const transformData = {
|
|
39
76
|
name,
|
|
40
77
|
source: source_table,
|
|
41
78
|
target: target_table,
|
|
42
|
-
run_business_rules
|
|
79
|
+
run_business_rules: run_business_rules ? 'true' : 'false',
|
|
80
|
+
active: 'true'
|
|
43
81
|
};
|
|
82
|
+
if (description) {
|
|
83
|
+
transformData.description = description;
|
|
84
|
+
}
|
|
44
85
|
const response = await client.post('/api/now/table/sys_transform_map', transformData);
|
|
45
|
-
return (0, error_handler_js_1.createSuccessResult)({
|
|
86
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
87
|
+
created: true,
|
|
88
|
+
sys_id: response.data.result.sys_id,
|
|
89
|
+
name: response.data.result.name,
|
|
90
|
+
source_table: response.data.result.source,
|
|
91
|
+
target_table: response.data.result.target,
|
|
92
|
+
transform_map: response.data.result
|
|
93
|
+
});
|
|
46
94
|
}
|
|
47
95
|
catch (error) {
|
|
48
|
-
|
|
96
|
+
// Extract ServiceNow error details
|
|
97
|
+
const snowError = error.response?.data?.error || {};
|
|
98
|
+
const errorMessage = snowError.message || error.message;
|
|
99
|
+
const errorDetail = snowError.detail || '';
|
|
100
|
+
if (error.response?.status === 403) {
|
|
101
|
+
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.FORBIDDEN, `Permission denied: User does not have access to create transform maps. Required role: import_admin or admin.`, {
|
|
102
|
+
details: {
|
|
103
|
+
status_code: 403,
|
|
104
|
+
snow_error: snowError,
|
|
105
|
+
error_detail: errorDetail,
|
|
106
|
+
required_roles: ['import_admin', 'admin'],
|
|
107
|
+
suggestion: 'Request import_admin role or have an admin create the transform map'
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return (0, error_handler_js_1.createErrorResult)(error instanceof error_handler_js_1.SnowFlowError
|
|
112
|
+
? error
|
|
113
|
+
: new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.VALIDATION_ERROR, `Failed to create transform map: ${errorMessage}`, {
|
|
114
|
+
details: {
|
|
115
|
+
snow_error: snowError,
|
|
116
|
+
error_detail: errorDetail,
|
|
117
|
+
status_code: error.response?.status
|
|
118
|
+
}
|
|
119
|
+
}));
|
|
49
120
|
}
|
|
50
121
|
}
|
|
51
122
|
exports.version = '1.0.0';
|
package/dist/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_create_transform_map.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.ts"],"names":[],"mappings":";AAAA;;GAEG;;;
|
|
1
|
+
{"version":3,"file":"snow_create_transform_map.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/import-export/snow_create_transform_map.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAiCH,0BA+GC;AA7ID,kDAA8D;AAC9D,oEAAiH;AAEpG,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,sCAAsC;IACnD,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,eAAe;IAC5B,SAAS,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,CAAC;IAC9D,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,QAAQ;IAEnB,yBAAyB;IACzB,2DAA2D;IAC3D,UAAU,EAA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AY,EAAE,WAAW;oBACzB,WAAW,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM;iBACpC;aACF,CACF,CACN,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_update_incident.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/operations/snow_update_incident.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAkE5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"snow_update_incident.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/operations/snow_update_incident.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAkE5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwMxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4BAA4B,CAAC"}
|
|
@@ -107,23 +107,43 @@ async function execute(args, context) {
|
|
|
107
107
|
// Validate state transition
|
|
108
108
|
if (state && validate_state_transition) {
|
|
109
109
|
const currentState = parseInt(incident.state);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
// If already in requested state, this is a no-op (idempotent operation)
|
|
111
|
+
if (currentState === state) {
|
|
112
|
+
// Don't set state in updateData - no change needed
|
|
113
|
+
// Continue with other updates (assigned_to, work_notes, etc.)
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const validTransitions = {
|
|
117
|
+
1: [2, 6, 7], // New → In Progress, Resolved, Closed
|
|
118
|
+
2: [3, 6, 7], // In Progress → On Hold, Resolved, Closed
|
|
119
|
+
3: [2, 6, 7], // On Hold → In Progress, Resolved, Closed
|
|
120
|
+
6: [2, 7], // Resolved → In Progress, Closed
|
|
121
|
+
7: [2] // Closed → In Progress (reopen)
|
|
122
|
+
};
|
|
123
|
+
if (!validTransitions[currentState]?.includes(state)) {
|
|
124
|
+
const stateNames = {
|
|
125
|
+
1: 'New',
|
|
126
|
+
2: 'In Progress',
|
|
127
|
+
3: 'On Hold',
|
|
128
|
+
6: 'Resolved',
|
|
129
|
+
7: 'Closed'
|
|
130
|
+
};
|
|
131
|
+
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.VALIDATION_ERROR, `Invalid state transition: Cannot change from ${stateNames[currentState] || currentState} to ${stateNames[state] || state}`, {
|
|
132
|
+
details: {
|
|
133
|
+
current_state: currentState,
|
|
134
|
+
current_state_name: stateNames[currentState],
|
|
135
|
+
requested_state: state,
|
|
136
|
+
requested_state_name: stateNames[state],
|
|
137
|
+
valid_transitions: validTransitions[currentState]?.map((s) => ({
|
|
138
|
+
value: s,
|
|
139
|
+
name: stateNames[s]
|
|
140
|
+
})),
|
|
141
|
+
suggestion: 'Use validate_state_transition: false to skip validation, or transition through valid intermediate states'
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
updateData.state = state;
|
|
125
146
|
}
|
|
126
|
-
updateData.state = state;
|
|
127
147
|
// Validate resolution requirements
|
|
128
148
|
if (state === 6) { // Resolved
|
|
129
149
|
if (!resolution_code || !resolution_notes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_update_incident.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/operations/snow_update_incident.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA0EH,
|
|
1
|
+
{"version":3,"file":"snow_update_incident.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/operations/snow_update_incident.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA0EH,0BAwMC;AA/QD,kDAA8D;AAC9D,oEAAiH;AAEpG,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,gEAAgE;IAC7E,gDAAgD;IAChD,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC;IAClC,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,2DAA2D;IAC3D,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2BAA2B;aACzC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uDAAuD;gBACpE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACtB;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;YACD,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;aAC/C;YACD,UAAU,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Ac,EAAE,QAAQ,CAAC,KAAK;YAC9B,aAAa,EAAE,eAAe,CAAC,KAAK;YACpC,QAAQ,EAAE;gBACR,MAAM,EAAE,eAAe,CAAC,MAAM;gBAC9B,MAAM,EAAE,eAAe,CAAC,MAAM;gBAC9B,KAAK,EAAE,eAAe,CAAC,KAAK;gBAC5B,gBAAgB,EAAE,eAAe,CAAC,gBAAgB;gBAClD,WAAW,EAAE,eAAe,CAAC,WAAW;aACzC;YACD,GAAG,EAAE,GAAG,OAAO,CAAC,WAAW,uBAAuB,eAAe,CAAC,MAAM,EAAE;SAC3E,CAAC,CAAC;IAEL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,IAAA,oCAAiB,EACtB,KAAK,YAAY,gCAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CACvD,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "8.33.
|
|
3
|
+
"version": "8.33.7",
|
|
4
4
|
"description": "ServiceNow development with SnowCode - 75+ LLM providers (Claude, GPT, Gemini, Llama, Mistral, DeepSeek, Groq, Ollama) • 393 Optimized Tools • 2 MCP Servers • Multi-agent orchestration • Use ANY AI coding assistant (ML tools moved to Enterprise)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|