snow-flow 8.39.13 → 8.40.0
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 +190 -0
- package/dist/mcp/servicenow-mcp-unified/tools/applications/index.d.ts +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/applications/index.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/applications/index.js +4 -1
- package/dist/mcp/servicenow-mcp-unified/tools/applications/index.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_create_application.d.ts +9 -3
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_create_application.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_create_application.js +239 -13
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_create_application.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_switch_application_scope.d.ts +18 -0
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_switch_application_scope.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_switch_application_scope.js +297 -0
- package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_switch_application_scope.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.d.ts +2 -2
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.js +172 -21
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.d.ts +2 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.js +194 -47
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.d.ts +3 -3
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.js +190 -142
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.js +48 -4
- package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_update_set_manage.d.ts.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_update_set_manage.js +74 -4
- package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_update_set_manage.js.map +1 -1
- package/dist/utils/servicenow-client.d.ts +2 -1
- package/dist/utils/servicenow-client.d.ts.map +1 -1
- package/dist/utils/servicenow-client.js +112 -10
- package/dist/utils/servicenow-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* snow_execute_script_with_output - Execute
|
|
3
|
+
* snow_execute_script_with_output - Execute scripts with full output capture
|
|
4
4
|
*
|
|
5
|
-
* Execute server-side JavaScript in ServiceNow
|
|
6
|
-
*
|
|
5
|
+
* Execute server-side JavaScript in ServiceNow with comprehensive output capture
|
|
6
|
+
* using Fix Scripts. Captures gs.print, gs.info, gs.warn, gs.error.
|
|
7
7
|
*
|
|
8
8
|
* ⚠️ CRITICAL: ALL SCRIPTS MUST BE ES5 ONLY!
|
|
9
9
|
* ServiceNow runs on Rhino engine - no const/let/arrow functions/template literals.
|
|
@@ -15,7 +15,7 @@ const auth_js_1 = require("../../shared/auth.js");
|
|
|
15
15
|
const error_handler_js_1 = require("../../shared/error-handler.js");
|
|
16
16
|
exports.toolDefinition = {
|
|
17
17
|
name: 'snow_execute_script_with_output',
|
|
18
|
-
description: 'Execute server-side JavaScript with output capture (ES5 only
|
|
18
|
+
description: 'Execute server-side JavaScript with full output capture using Fix Scripts (ES5 only)',
|
|
19
19
|
// Metadata for tool discovery (not sent to LLM)
|
|
20
20
|
category: 'automation',
|
|
21
21
|
subcategory: 'script-execution',
|
|
@@ -43,13 +43,18 @@ exports.toolDefinition = {
|
|
|
43
43
|
type: 'boolean',
|
|
44
44
|
description: 'Validate ES5 syntax before execution',
|
|
45
45
|
default: true
|
|
46
|
+
},
|
|
47
|
+
timeout: {
|
|
48
|
+
type: 'number',
|
|
49
|
+
description: 'Timeout in milliseconds for polling execution results',
|
|
50
|
+
default: 30000
|
|
46
51
|
}
|
|
47
52
|
},
|
|
48
53
|
required: ['script']
|
|
49
54
|
}
|
|
50
55
|
};
|
|
51
56
|
async function execute(args, context) {
|
|
52
|
-
const { script, scope = 'global', validate_es5 = true } = args;
|
|
57
|
+
const { script, scope = 'global', validate_es5 = true, timeout = 30000 } = args;
|
|
53
58
|
try {
|
|
54
59
|
// ES5 validation
|
|
55
60
|
if (validate_es5) {
|
|
@@ -65,169 +70,212 @@ async function execute(args, context) {
|
|
|
65
70
|
}
|
|
66
71
|
}
|
|
67
72
|
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
68
|
-
//
|
|
73
|
+
// Create unique execution ID for tracking
|
|
74
|
+
const executionId = `output_${Date.now()}_${Math.random().toString(36).substring(7)}`;
|
|
75
|
+
const outputMarker = `SNOW_FLOW_EXEC_${executionId}`;
|
|
76
|
+
// Wrap script with comprehensive output capture
|
|
69
77
|
const wrappedScript = `
|
|
70
|
-
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
78
|
+
// Snow-Flow Script Execution with Output Capture - ID: ${executionId}
|
|
79
|
+
var __sfOutput = [];
|
|
80
|
+
var __sfStartTime = new GlideDateTime();
|
|
81
|
+
var __sfResult = null;
|
|
82
|
+
var __sfError = null;
|
|
75
83
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
// Store original gs methods
|
|
85
|
+
var __sfOrigPrint = gs.print;
|
|
86
|
+
var __sfOrigInfo = gs.info;
|
|
87
|
+
var __sfOrigWarn = gs.warn;
|
|
88
|
+
var __sfOrigError = gs.error;
|
|
80
89
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
90
|
+
// Override gs methods to capture output
|
|
91
|
+
gs.print = function(msg) {
|
|
92
|
+
var m = String(msg);
|
|
93
|
+
__sfOutput.push({level: 'print', message: m, timestamp: new GlideDateTime().getDisplayValue()});
|
|
94
|
+
__sfOrigPrint(m);
|
|
95
|
+
};
|
|
88
96
|
|
|
89
|
-
gs.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
gs.info = function(msg) {
|
|
98
|
+
var m = String(msg);
|
|
99
|
+
__sfOutput.push({level: 'info', message: m, timestamp: new GlideDateTime().getDisplayValue()});
|
|
100
|
+
__sfOrigInfo(m);
|
|
101
|
+
};
|
|
93
102
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
// Modify the wrapped script to use gs.print for final output
|
|
100
|
-
const executableScript = `
|
|
101
|
-
var __output = [];
|
|
102
|
-
var __originalPrint = gs.print;
|
|
103
|
-
var __originalInfo = gs.info;
|
|
104
|
-
var __originalWarn = gs.warn;
|
|
105
|
-
var __originalError = gs.error;
|
|
103
|
+
gs.warn = function(msg) {
|
|
104
|
+
var m = String(msg);
|
|
105
|
+
__sfOutput.push({level: 'warn', message: m, timestamp: new GlideDateTime().getDisplayValue()});
|
|
106
|
+
__sfOrigWarn(m);
|
|
107
|
+
};
|
|
106
108
|
|
|
107
|
-
gs.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
gs.error = function(msg) {
|
|
110
|
+
var m = String(msg);
|
|
111
|
+
__sfOutput.push({level: 'error', message: m, timestamp: new GlideDateTime().getDisplayValue()});
|
|
112
|
+
__sfOrigError(m);
|
|
113
|
+
};
|
|
111
114
|
|
|
115
|
+
// Execute the user script
|
|
112
116
|
try {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
gs.info('=== Snow-Flow Script Execution Started ===');
|
|
118
|
+
|
|
119
|
+
__sfResult = (function() {
|
|
120
|
+
${script}
|
|
121
|
+
})();
|
|
122
|
+
|
|
123
|
+
gs.info('=== Snow-Flow Script Execution Completed ===');
|
|
124
|
+
|
|
125
|
+
if (__sfResult !== undefined && __sfResult !== null) {
|
|
126
|
+
gs.info('Script returned: ' + (typeof __sfResult === 'object' ? JSON.stringify(__sfResult) : String(__sfResult)));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
} catch(e) {
|
|
130
|
+
__sfError = e.toString();
|
|
131
|
+
gs.error('=== Snow-Flow Script Execution Failed ===');
|
|
132
|
+
gs.error('Error: ' + e.toString());
|
|
133
|
+
if (e.stack) {
|
|
134
|
+
gs.error('Stack: ' + e.stack);
|
|
135
|
+
}
|
|
117
136
|
}
|
|
118
137
|
|
|
119
|
-
gs
|
|
120
|
-
gs.
|
|
121
|
-
gs.
|
|
122
|
-
gs.
|
|
138
|
+
// Restore original gs methods
|
|
139
|
+
gs.print = __sfOrigPrint;
|
|
140
|
+
gs.info = __sfOrigInfo;
|
|
141
|
+
gs.warn = __sfOrigWarn;
|
|
142
|
+
gs.error = __sfOrigError;
|
|
143
|
+
|
|
144
|
+
// Calculate execution time
|
|
145
|
+
var __sfEndTime = new GlideDateTime();
|
|
146
|
+
var __sfExecTimeMs = Math.abs(GlideDateTime.subtract(__sfStartTime, __sfEndTime).getNumericValue());
|
|
147
|
+
|
|
148
|
+
// Build result object
|
|
149
|
+
var __sfResultObj = {
|
|
150
|
+
executionId: '${executionId}',
|
|
151
|
+
success: __sfError === null,
|
|
152
|
+
result: __sfResult,
|
|
153
|
+
error: __sfError,
|
|
154
|
+
output: __sfOutput,
|
|
155
|
+
executionTimeMs: __sfExecTimeMs,
|
|
156
|
+
completedAt: __sfEndTime.getDisplayValue()
|
|
157
|
+
};
|
|
123
158
|
|
|
124
|
-
//
|
|
125
|
-
gs.
|
|
159
|
+
// Store result in system property for retrieval
|
|
160
|
+
gs.setProperty('${outputMarker}', JSON.stringify(__sfResultObj));
|
|
161
|
+
gs.info('${outputMarker}:DONE');
|
|
126
162
|
`;
|
|
127
|
-
//
|
|
163
|
+
// Step 1: Create Scheduled Script Job (sysauto_script)
|
|
164
|
+
const jobName = `Snow-Flow Output Capture - ${executionId}`;
|
|
165
|
+
const createResponse = await client.post('/api/now/table/sysauto_script', {
|
|
166
|
+
name: jobName,
|
|
167
|
+
script: wrappedScript,
|
|
168
|
+
active: true,
|
|
169
|
+
run_type: 'on_demand',
|
|
170
|
+
conditional: false
|
|
171
|
+
});
|
|
172
|
+
if (!createResponse.data?.result?.sys_id) {
|
|
173
|
+
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.SERVICENOW_API_ERROR, 'Failed to create scheduled script job', { details: createResponse.data });
|
|
174
|
+
}
|
|
175
|
+
const jobSysId = createResponse.data.result.sys_id;
|
|
176
|
+
// Step 2: Create sys_trigger to execute immediately
|
|
128
177
|
const now = new Date();
|
|
129
|
-
|
|
178
|
+
const triggerTime = new Date(now.getTime() + 2000); // 2 seconds from now
|
|
179
|
+
const triggerTimeStr = triggerTime.toISOString().replace('T', ' ').substring(0, 19);
|
|
130
180
|
try {
|
|
131
|
-
|
|
132
|
-
name:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
181
|
+
await client.post('/api/now/table/sys_trigger', {
|
|
182
|
+
name: jobName,
|
|
183
|
+
next_action: triggerTimeStr,
|
|
184
|
+
trigger_type: 0, // Run Once
|
|
185
|
+
state: 0, // Ready
|
|
186
|
+
document: 'sysauto_script',
|
|
187
|
+
document_key: jobSysId,
|
|
188
|
+
claimed_by: '',
|
|
189
|
+
system_id: 'snow-flow'
|
|
138
190
|
});
|
|
139
191
|
}
|
|
140
|
-
catch (
|
|
141
|
-
//
|
|
142
|
-
const status = apiError.response?.status;
|
|
143
|
-
const errorData = apiError.response?.data;
|
|
144
|
-
if (status === 400) {
|
|
145
|
-
let errorMessage = 'Script execution failed with ServiceNow 400 error';
|
|
146
|
-
let errorDetails = {
|
|
147
|
-
script_length: script.length,
|
|
148
|
-
script_preview: script.substring(0, 200) + (script.length > 200 ? '...' : '')
|
|
149
|
-
};
|
|
150
|
-
// Try to extract specific error from ServiceNow response
|
|
151
|
-
if (errorData?.error) {
|
|
152
|
-
errorMessage = `ServiceNow rejected script: ${errorData.error.message || errorData.error.detail || 'Unknown error'}`;
|
|
153
|
-
errorDetails.servicenow_error = errorData.error;
|
|
154
|
-
}
|
|
155
|
-
// Add helpful hints
|
|
156
|
-
if (script.length > 1000) {
|
|
157
|
-
errorDetails.hint = 'Script is very large (>1000 chars). Consider breaking into smaller operations or using snow_create_business_rule for complex logic.';
|
|
158
|
-
}
|
|
159
|
-
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.VALIDATION_ERROR, errorMessage, {
|
|
160
|
-
retryable: false,
|
|
161
|
-
details: errorDetails
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
throw apiError; // Re-throw other errors
|
|
165
|
-
}
|
|
166
|
-
const jobId = jobResponse.data.result.sys_id;
|
|
167
|
-
// Wait for execution - scheduled jobs execute asynchronously
|
|
168
|
-
// Give the ServiceNow scheduler time to pick up and execute the job
|
|
169
|
-
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
170
|
-
// Retrieve output from sys_log (only logs from the last 10 seconds)
|
|
171
|
-
const tenSecondsAgo = new Date(Date.now() - 10000).toISOString().replace('T', ' ').substring(0, 19);
|
|
172
|
-
const logResponse = await client.get('/api/now/table/sys_log', {
|
|
173
|
-
params: {
|
|
174
|
-
sysparm_query: `messageLIKESNOW_FLOW_OUTPUT^sys_created_on>${tenSecondsAgo}^ORDERBYDESCsys_created_on`,
|
|
175
|
-
sysparm_limit: 10,
|
|
176
|
-
sysparm_fields: 'message,sys_created_on'
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
// Clean up job
|
|
180
|
-
try {
|
|
181
|
-
await client.delete(`/api/now/table/sysauto_script/${jobId}`);
|
|
182
|
-
}
|
|
183
|
-
catch (cleanupError) {
|
|
184
|
-
console.warn('Failed to cleanup scheduled job');
|
|
192
|
+
catch (triggerError) {
|
|
193
|
+
// If trigger creation fails, job won't auto-execute
|
|
185
194
|
}
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
195
|
+
// Step 3: Poll for execution results
|
|
196
|
+
const startTime = Date.now();
|
|
197
|
+
let result = null;
|
|
198
|
+
let attempts = 0;
|
|
199
|
+
const maxAttempts = Math.ceil(timeout / 2000);
|
|
200
|
+
while (Date.now() - startTime < timeout && attempts < maxAttempts) {
|
|
201
|
+
attempts++;
|
|
202
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
203
|
+
try {
|
|
204
|
+
// Check sys_properties for output marker
|
|
205
|
+
const propResponse = await client.get('/api/now/table/sys_properties', {
|
|
206
|
+
params: {
|
|
207
|
+
sysparm_query: `name=${outputMarker}`,
|
|
208
|
+
sysparm_fields: 'value,sys_id',
|
|
209
|
+
sysparm_limit: 1
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
if (propResponse.data?.result?.[0]?.value) {
|
|
194
213
|
try {
|
|
195
|
-
|
|
214
|
+
result = JSON.parse(propResponse.data.result[0].value);
|
|
215
|
+
// Delete the property after reading
|
|
216
|
+
const propSysId = propResponse.data.result[0].sys_id;
|
|
217
|
+
if (propSysId) {
|
|
218
|
+
await client.delete(`/api/now/table/sys_properties/${propSysId}`).catch(() => { });
|
|
219
|
+
}
|
|
196
220
|
break;
|
|
197
221
|
}
|
|
198
|
-
catch (
|
|
199
|
-
|
|
222
|
+
catch (parseErr) {
|
|
223
|
+
// Continue polling
|
|
200
224
|
}
|
|
201
225
|
}
|
|
202
226
|
}
|
|
227
|
+
catch (pollError) {
|
|
228
|
+
// Continue polling
|
|
229
|
+
}
|
|
203
230
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
231
|
+
// Step 4: Cleanup - delete the scheduled job
|
|
232
|
+
try {
|
|
233
|
+
await client.delete(`/api/now/table/sysauto_script/${jobSysId}`);
|
|
234
|
+
}
|
|
235
|
+
catch (cleanupError) {
|
|
236
|
+
// Ignore cleanup errors
|
|
237
|
+
}
|
|
238
|
+
// Step 5: Format and return results
|
|
239
|
+
if (result) {
|
|
240
|
+
// Organize output by level
|
|
241
|
+
const organized = {
|
|
242
|
+
print: result.output.filter((o) => o.level === 'print').map((o) => o.message),
|
|
243
|
+
info: result.output.filter((o) => o.level === 'info').map((o) => o.message),
|
|
244
|
+
warn: result.output.filter((o) => o.level === 'warn').map((o) => o.message),
|
|
245
|
+
error: result.output.filter((o) => o.level === 'error').map((o) => o.message),
|
|
246
|
+
success: result.success
|
|
247
|
+
};
|
|
248
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
249
|
+
success: result.success,
|
|
250
|
+
result: result.result,
|
|
251
|
+
error: result.error,
|
|
252
|
+
output: organized,
|
|
253
|
+
raw_output: result.output,
|
|
254
|
+
execution_time_ms: result.executionTimeMs,
|
|
255
|
+
execution_id: executionId
|
|
256
|
+
}, {
|
|
257
|
+
script_length: script.length,
|
|
258
|
+
scope,
|
|
259
|
+
es5_validated: validate_es5,
|
|
260
|
+
method: 'sysauto_script_with_trigger'
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
// Script was saved but execution couldn't be confirmed
|
|
265
|
+
return (0, error_handler_js_1.createSuccessResult)({
|
|
266
|
+
success: true,
|
|
267
|
+
execution_id: executionId,
|
|
268
|
+
message: 'Script was saved as scheduled job but automatic execution could not be confirmed. The sys_trigger may not have been created (permissions) or the scheduler has not yet picked it up.',
|
|
269
|
+
scheduled_job_sys_id: jobSysId,
|
|
270
|
+
action_required: 'Navigate to System Scheduler > Scheduled Jobs and run the script manually',
|
|
271
|
+
script_name: jobName
|
|
272
|
+
}, {
|
|
273
|
+
script_length: script.length,
|
|
274
|
+
scope,
|
|
275
|
+
es5_validated: validate_es5,
|
|
276
|
+
method: 'scheduled_job_pending'
|
|
212
277
|
});
|
|
213
278
|
}
|
|
214
|
-
// Organize output by level
|
|
215
|
-
const organized = {
|
|
216
|
-
print: output.filter(o => o.level === 'print').map(o => o.message),
|
|
217
|
-
info: output.filter(o => o.level === 'info').map(o => o.message),
|
|
218
|
-
warn: output.filter(o => o.level === 'warn').map(o => o.message),
|
|
219
|
-
error: output.filter(o => o.level === 'error').map(o => o.message),
|
|
220
|
-
success: output.some(o => o.level === 'success')
|
|
221
|
-
};
|
|
222
|
-
return (0, error_handler_js_1.createSuccessResult)({
|
|
223
|
-
success: organized.error.length === 0,
|
|
224
|
-
output: organized,
|
|
225
|
-
raw_output: output
|
|
226
|
-
}, {
|
|
227
|
-
script_length: script.length,
|
|
228
|
-
scope,
|
|
229
|
-
es5_validated: validate_es5
|
|
230
|
-
});
|
|
231
279
|
}
|
|
232
280
|
catch (error) {
|
|
233
281
|
return (0, error_handler_js_1.createErrorResult)(error instanceof error_handler_js_1.SnowFlowError
|
package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_execute_script_with_output.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;
|
|
1
|
+
{"version":3,"file":"snow_execute_script_with_output.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAgDH,0BA4PC;AAzSD,kDAA8D;AAC9D,oEAAiH;AAEpG,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,iCAAiC;IACvC,WAAW,EAAE,sFAAsF;IACnG,gDAAgD;IAChD,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,kBAAkB;IAC/B,SAAS,EAAE,CAAC,YAAY,EAAE,SAAS,EAAE,gBAAgB,CAAC;IACtD,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,sEAAsE;IACtE,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,2FAA2F;aACzG;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;gBAChE,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;aAC1B;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,sCAAsC;gBACnD,OAAO,EAAE,IAAI;aACd;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uDAAuD;gBACpE,OAAO,EAAE,KAAK;aACf;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;CACF,CAAC;AAEK,KAAK,UAAU,OAAO,CAAC,IAAS,EAAE,OAA0B;IACjE,MAAM,EAAE,MAAM,EAA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GAAG,EAAE,yBAAyB,EAAE;QACrF,EAAE,KAAK,EAAE,wBAAwB,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,0BAA0B,EAAE;QACpF,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,0BAA0B,EAAE;KAC1E,CAAC;IAEF,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE;QACxC,IAAI,KAAK,CAAC;QACV,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAC3C,UAAU,CAAC,IAAI,CAAC;gBACd,IAAI;gBACJ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM;gBACvD,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;gBACd,GAAG;aACJ,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;AACxD,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,yBAAyB,CAAC"}
|
package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_ensure_active_update_set.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"snow_ensure_active_update_set.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBA2C5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAkHxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4BAA4B,CAAC"}
|
|
@@ -43,15 +43,53 @@ exports.toolDefinition = {
|
|
|
43
43
|
type: 'boolean',
|
|
44
44
|
description: 'Create Update Set if it doesn\'t exist',
|
|
45
45
|
default: true
|
|
46
|
+
},
|
|
47
|
+
application_scope: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Application scope for the Update Set. Use "global" (default) for global scope, or provide a scoped application sys_id or scope name.',
|
|
50
|
+
default: 'global'
|
|
46
51
|
}
|
|
47
52
|
},
|
|
48
53
|
required: ['name']
|
|
49
54
|
}
|
|
50
55
|
};
|
|
51
56
|
async function execute(args, context) {
|
|
52
|
-
const { name, description = `Snow-Flow: ${name}`, sync_with_user = true, create_if_missing = true } = args;
|
|
57
|
+
const { name, description = `Snow-Flow: ${name}`, sync_with_user = true, create_if_missing = true, application_scope = 'global' } = args;
|
|
53
58
|
try {
|
|
54
59
|
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
60
|
+
// Resolve application scope
|
|
61
|
+
let resolvedApplicationId = 'global';
|
|
62
|
+
let resolvedApplicationName = 'Global';
|
|
63
|
+
let resolvedApplicationScope = 'global';
|
|
64
|
+
if (application_scope && application_scope !== 'global') {
|
|
65
|
+
// Try to find by sys_id first
|
|
66
|
+
let appResponse = await client.get('/api/now/table/sys_app', {
|
|
67
|
+
params: {
|
|
68
|
+
sysparm_query: `sys_id=${application_scope}`,
|
|
69
|
+
sysparm_fields: 'sys_id,name,scope',
|
|
70
|
+
sysparm_limit: 1
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
// Try by scope name
|
|
74
|
+
if (!appResponse.data.result || appResponse.data.result.length === 0) {
|
|
75
|
+
appResponse = await client.get('/api/now/table/sys_app', {
|
|
76
|
+
params: {
|
|
77
|
+
sysparm_query: `scope=${application_scope}`,
|
|
78
|
+
sysparm_fields: 'sys_id,name,scope',
|
|
79
|
+
sysparm_limit: 1
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (appResponse.data.result && appResponse.data.result.length > 0) {
|
|
84
|
+
const app = appResponse.data.result[0];
|
|
85
|
+
resolvedApplicationId = app.sys_id;
|
|
86
|
+
resolvedApplicationName = app.name;
|
|
87
|
+
resolvedApplicationScope = app.scope;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
return (0, error_handler_js_1.createErrorResult)(`Application not found: "${application_scope}". Use "global" for global scope.`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
55
93
|
// Check if Update Set exists
|
|
56
94
|
const existingResponse = await client.get('/api/now/table/sys_update_set', {
|
|
57
95
|
params: {
|
|
@@ -70,12 +108,12 @@ async function execute(args, context) {
|
|
|
70
108
|
}
|
|
71
109
|
}
|
|
72
110
|
else if (create_if_missing) {
|
|
73
|
-
// Create new Update Set
|
|
111
|
+
// Create new Update Set with resolved application scope
|
|
74
112
|
const createResponse = await client.post('/api/now/table/sys_update_set', {
|
|
75
113
|
name,
|
|
76
114
|
description,
|
|
77
115
|
state: 'in progress',
|
|
78
|
-
application:
|
|
116
|
+
application: resolvedApplicationId
|
|
79
117
|
});
|
|
80
118
|
updateSet = createResponse.data.result;
|
|
81
119
|
}
|
|
@@ -100,7 +138,13 @@ async function execute(args, context) {
|
|
|
100
138
|
description: updateSet.description,
|
|
101
139
|
state: 'in progress',
|
|
102
140
|
is_current: sync_with_user,
|
|
103
|
-
created: existingResponse.data.result.length === 0
|
|
141
|
+
created: existingResponse.data.result.length === 0,
|
|
142
|
+
application_scope: {
|
|
143
|
+
sys_id: resolvedApplicationId,
|
|
144
|
+
name: resolvedApplicationName,
|
|
145
|
+
scope: resolvedApplicationScope,
|
|
146
|
+
is_global: resolvedApplicationId === 'global'
|
|
147
|
+
}
|
|
104
148
|
});
|
|
105
149
|
}
|
|
106
150
|
catch (error) {
|
package/dist/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_ensure_active_update_set.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"snow_ensure_active_update_set.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/update-sets/snow_ensure_active_update_set.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAmDH,0BAkHC;AAlKD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,oEAAoE;IACjF,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,iBAAiB,CAAC;IAC3D,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,sFAAsF;IACtF,UAAU,EAAE,OAAO;IACnB,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;IACpC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6CAA6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AAC,CAAC;IAEL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,IAAA,oCAAiB,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snow_update_set_manage.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/update-sets/snow_update_set_manage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"snow_update_set_manage.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/update-sets/snow_update_set_manage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAoH5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAyBxF;AAsoBD,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,kCAAkC,CAAC"}
|