snow-flow 8.40.1 → 8.41.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.
Files changed (36) hide show
  1. package/CLAUDE.md +62 -20
  2. package/dist/mcp/servicenow-mcp-unified/tools/applications/index.d.ts +2 -0
  3. package/dist/mcp/servicenow-mcp-unified/tools/applications/index.d.ts.map +1 -1
  4. package/dist/mcp/servicenow-mcp-unified/tools/applications/index.js +7 -1
  5. package/dist/mcp/servicenow-mcp-unified/tools/applications/index.js.map +1 -1
  6. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.d.ts +14 -0
  7. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.d.ts.map +1 -0
  8. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.js +220 -0
  9. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.js.map +1 -0
  10. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.d.ts +12 -0
  11. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.d.ts.map +1 -0
  12. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.js +236 -0
  13. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.js.map +1 -0
  14. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts +1 -3
  15. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts.map +1 -1
  16. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js +5 -10
  17. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js.map +1 -1
  18. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.d.ts +7 -5
  19. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.d.ts.map +1 -1
  20. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.js +195 -34
  21. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.js.map +1 -1
  22. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.d.ts +20 -0
  23. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.d.ts.map +1 -0
  24. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.js +474 -0
  25. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.js.map +1 -0
  26. package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_create_artifact.d.ts.map +1 -1
  27. package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_create_artifact.js +104 -8
  28. package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_create_artifact.js.map +1 -1
  29. package/dist/templates/agents-md-template.d.ts +1 -1
  30. package/dist/templates/agents-md-template.d.ts.map +1 -1
  31. package/dist/templates/agents-md-template.js +4 -4
  32. package/dist/templates/claude-md-template.d.ts +1 -1
  33. package/dist/templates/claude-md-template.d.ts.map +1 -1
  34. package/dist/templates/claude-md-template.js +17 -12
  35. package/dist/templates/claude-md-template.js.map +1 -1
  36. package/package.json +1 -1
@@ -0,0 +1,236 @@
1
+ "use strict";
2
+ /**
3
+ * snow_list_applications - List Available Applications
4
+ *
5
+ * Lists all scoped applications in the ServiceNow instance with filtering
6
+ * and search capabilities. Useful for finding the right scope to work in.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.author = exports.version = exports.toolDefinition = void 0;
10
+ exports.execute = execute;
11
+ const auth_js_1 = require("../../shared/auth.js");
12
+ const error_handler_js_1 = require("../../shared/error-handler.js");
13
+ exports.toolDefinition = {
14
+ name: 'snow_list_applications',
15
+ description: `List all scoped applications in the ServiceNow instance.
16
+
17
+ 📋 USE THIS TO:
18
+ - Find available application scopes before switching
19
+ - Search for applications by name or scope prefix
20
+ - See which applications are active/inactive
21
+ - Decide which scope to use for development
22
+
23
+ 🔍 SEARCH OPTIONS:
24
+ - Filter by name (partial match)
25
+ - Filter by scope prefix (e.g., "x_myco")
26
+ - Filter by vendor
27
+ - Show only active or include inactive
28
+
29
+ 📊 RETURNS:
30
+ - List of applications with name, scope, version, vendor
31
+ - Count of artifacts in each application (optional)
32
+ - Indicates which scope is currently active`,
33
+ // Metadata for tool discovery (not sent to LLM)
34
+ category: 'development',
35
+ subcategory: 'applications',
36
+ use_cases: ['app-development', 'scoped-apps', 'development', 'discovery'],
37
+ complexity: 'beginner',
38
+ frequency: 'medium',
39
+ // Permission enforcement
40
+ // Classification: READ - Query only, no modifications
41
+ permission: 'read',
42
+ allowedRoles: ['developer', 'admin', 'stakeholder'],
43
+ inputSchema: {
44
+ type: 'object',
45
+ properties: {
46
+ search: {
47
+ type: 'string',
48
+ description: 'Search term to filter applications by name or scope (partial match)'
49
+ },
50
+ vendor: {
51
+ type: 'string',
52
+ description: 'Filter by vendor name (partial match)'
53
+ },
54
+ active_only: {
55
+ type: 'boolean',
56
+ description: 'Only show active applications (default: true)',
57
+ default: true
58
+ },
59
+ include_artifact_count: {
60
+ type: 'boolean',
61
+ description: 'Include count of artifacts in each application (slower, default: false)',
62
+ default: false
63
+ },
64
+ include_global: {
65
+ type: 'boolean',
66
+ description: 'Include "Global" scope in the list (default: true)',
67
+ default: true
68
+ },
69
+ limit: {
70
+ type: 'number',
71
+ description: 'Maximum number of applications to return (default: 50)',
72
+ default: 50
73
+ }
74
+ },
75
+ required: []
76
+ }
77
+ };
78
+ async function execute(args, context) {
79
+ const { search, vendor, active_only = true, include_artifact_count = false, include_global = true, limit = 50 } = args;
80
+ try {
81
+ const client = await (0, auth_js_1.getAuthenticatedClient)(context);
82
+ // Build query
83
+ const queryParts = [];
84
+ if (active_only) {
85
+ queryParts.push('active=true');
86
+ }
87
+ if (search) {
88
+ queryParts.push(`nameLIKE${search}^ORscopeLIKE${search}`);
89
+ }
90
+ if (vendor) {
91
+ queryParts.push(`vendorLIKE${vendor}`);
92
+ }
93
+ const query = queryParts.length > 0 ? queryParts.join('^') : '';
94
+ // Query applications
95
+ const response = await client.get('/api/now/table/sys_app', {
96
+ params: {
97
+ sysparm_query: query + '^ORDERBYname',
98
+ sysparm_fields: 'sys_id,name,scope,version,short_description,vendor,vendor_prefix,active,sys_created_on,sys_updated_on',
99
+ sysparm_limit: limit
100
+ }
101
+ });
102
+ const applications = response.data.result || [];
103
+ // Get current scope to mark it
104
+ let currentScopeId = 'global';
105
+ try {
106
+ const scopePrefResponse = await client.get('/api/now/table/sys_user_preference', {
107
+ params: {
108
+ sysparm_query: 'name=sys_scope^user=javascript:gs.getUserID()',
109
+ sysparm_fields: 'value',
110
+ sysparm_limit: 1
111
+ }
112
+ });
113
+ if (scopePrefResponse.data.result && scopePrefResponse.data.result.length > 0) {
114
+ currentScopeId = scopePrefResponse.data.result[0].value || 'global';
115
+ }
116
+ }
117
+ catch (e) {
118
+ // Ignore - default to global
119
+ }
120
+ // Build application list
121
+ const appList = [];
122
+ // Add global scope first if requested
123
+ if (include_global) {
124
+ const globalEntry = {
125
+ sys_id: 'global',
126
+ name: 'Global',
127
+ scope: 'global',
128
+ version: null,
129
+ short_description: 'Global scope for cross-application development',
130
+ vendor: 'ServiceNow',
131
+ is_global: true,
132
+ is_current: currentScopeId === 'global',
133
+ active: true
134
+ };
135
+ if (include_artifact_count) {
136
+ try {
137
+ const globalCountResponse = await client.get('/api/now/table/sys_metadata', {
138
+ params: {
139
+ sysparm_query: 'sys_scope=global',
140
+ sysparm_fields: 'sys_id',
141
+ sysparm_limit: 1,
142
+ sysparm_count: 'true'
143
+ }
144
+ });
145
+ globalEntry.artifact_count = parseInt(globalCountResponse.headers['x-total-count'] || '0', 10);
146
+ }
147
+ catch (e) {
148
+ globalEntry.artifact_count = 'unknown';
149
+ }
150
+ }
151
+ // Only add global if it matches search
152
+ if (!search || 'global'.includes(search.toLowerCase()) || 'Global'.toLowerCase().includes(search.toLowerCase())) {
153
+ appList.push(globalEntry);
154
+ }
155
+ }
156
+ // Process each application
157
+ for (const app of applications) {
158
+ const appEntry = {
159
+ sys_id: app.sys_id,
160
+ name: app.name,
161
+ scope: app.scope,
162
+ version: app.version || null,
163
+ short_description: app.short_description || null,
164
+ vendor: app.vendor || null,
165
+ vendor_prefix: app.vendor_prefix || null,
166
+ is_global: false,
167
+ is_current: currentScopeId === app.sys_id,
168
+ active: app.active === 'true' || app.active === true,
169
+ created_at: app.sys_created_on,
170
+ updated_at: app.sys_updated_on
171
+ };
172
+ // Get artifact count if requested
173
+ if (include_artifact_count) {
174
+ try {
175
+ const countResponse = await client.get('/api/now/table/sys_metadata', {
176
+ params: {
177
+ sysparm_query: `sys_scope=${app.sys_id}`,
178
+ sysparm_fields: 'sys_id',
179
+ sysparm_limit: 1,
180
+ sysparm_count: 'true'
181
+ }
182
+ });
183
+ appEntry.artifact_count = parseInt(countResponse.headers['x-total-count'] || '0', 10);
184
+ }
185
+ catch (e) {
186
+ appEntry.artifact_count = 'unknown';
187
+ }
188
+ }
189
+ appList.push(appEntry);
190
+ }
191
+ // Build result
192
+ const result = {
193
+ applications: appList,
194
+ total_count: appList.length,
195
+ current_scope: currentScopeId === 'global' ? 'Global' : appList.find(a => a.is_current)?.name || currentScopeId,
196
+ filters_applied: {
197
+ search: search || null,
198
+ vendor: vendor || null,
199
+ active_only,
200
+ include_global
201
+ }
202
+ };
203
+ // Add summary by vendor
204
+ const vendorSummary = {};
205
+ for (const app of appList) {
206
+ const v = app.vendor || 'Unknown';
207
+ vendorSummary[v] = (vendorSummary[v] || 0) + 1;
208
+ }
209
+ result.by_vendor = vendorSummary;
210
+ // Build message
211
+ let message = `Found ${appList.length} application${appList.length === 1 ? '' : 's'}`;
212
+ if (search) {
213
+ message += ` matching "${search}"`;
214
+ }
215
+ const currentApp = appList.find(a => a.is_current);
216
+ if (currentApp) {
217
+ message += `. Current scope: ${currentApp.is_global ? 'Global' : `"${currentApp.name}" (${currentApp.scope})`}`;
218
+ }
219
+ result.message = message;
220
+ // Add recommendations
221
+ result.recommendations = [];
222
+ if (appList.length === 0) {
223
+ result.recommendations.push('No applications found. Use snow_create_application to create a new scoped application.');
224
+ }
225
+ else if (!currentApp) {
226
+ result.recommendations.push('Current scope not in list. Use snow_switch_application_scope to switch to a listed scope.');
227
+ }
228
+ return (0, error_handler_js_1.createSuccessResult)(result);
229
+ }
230
+ catch (error) {
231
+ return (0, error_handler_js_1.createErrorResult)(error.message);
232
+ }
233
+ }
234
+ exports.version = '1.0.0';
235
+ exports.author = 'Snow-Flow Application Scope Enhancement';
236
+ //# sourceMappingURL=snow_list_applications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_list_applications.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAyEH,0BAsLC;AA5PD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE;;;;;;;;;;;;;;;;;4CAiB6B;IAC1C,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,CAAC,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,CAAC;IACzE,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,QAAQ;IAEnB,yBAAyB;IACzB,sDAAsD;IACtD,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC;IACnD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qEAAqE;aACnF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,+CAA+C;gBAC5D,OAAO,EAAE,IAAI;aACd;YACD,sBAAsB,EAAE;gBACtB,I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AClB,QAAA,MAAM,GAAG,yCAAyC,CAAC"}
@@ -9,9 +9,7 @@ export { toolDefinition as snow_create_workflow_activity_def, execute as snow_cr
9
9
  export { toolDefinition as snow_discover_automation_jobs_def, execute as snow_discover_automation_jobs_exec } from './snow_discover_automation_jobs.js';
10
10
  export { toolDefinition as snow_discover_events_def, execute as snow_discover_events_exec } from './snow_discover_events.js';
11
11
  export { toolDefinition as snow_discover_schedules_def, execute as snow_discover_schedules_exec } from './snow_discover_schedules.js';
12
- export { toolDefinition as snow_execute_background_script_def, execute as snow_execute_background_script_exec } from './snow_execute_background_script.js';
13
- export { toolDefinition as snow_execute_script_sync_def, execute as snow_execute_script_sync_exec } from './snow_execute_script_sync.js';
14
- export { toolDefinition as snow_execute_script_with_output_def, execute as snow_execute_script_with_output_exec } from './snow_execute_script_with_output.js';
12
+ export { toolDefinition as snow_execute_script_def, execute as snow_execute_script_exec } from './snow_execute_script.js';
15
13
  export { toolDefinition as snow_get_logs_def, execute as snow_get_logs_exec } from './snow_get_logs.js';
16
14
  export { toolDefinition as snow_get_email_logs_def, execute as snow_get_email_logs_exec } from './snow_get_email_logs.js';
17
15
  export { toolDefinition as snow_get_outbound_http_logs_def, execute as snow_get_outbound_http_logs_exec } from './snow_get_outbound_http_logs.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,IAAI,iCAAiC,EAAE,OAAO,IAAI,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxJ,OAAO,EAAE,cAAc,IAAI,0BAA0B,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACnI,OAAO,EAAE,cAAc,IAAI,+BAA+B,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAClJ,OAAO,EAAE,cAAc,IAAI,8BAA8B,EAAE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gCAAgC,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACrJ,OAAO,EAAE,cAAc,IAAI,6BAA6B,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAC5I,OAAO,EAAE,cAAc,IAAI,2BAA2B,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACtI,OAAO,EAAE,cAAc,IAAI,wBAAwB,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * Automation Tools - Export all automation tool modules
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.snow_trace_execution_exec = exports.snow_trace_execution_def = exports.snow_test_scheduled_job_exec = exports.snow_test_scheduled_job_def = exports.snow_test_rest_connection_exec = exports.snow_test_rest_connection_def = exports.snow_rest_message_test_suite_exec = exports.snow_rest_message_test_suite_def = exports.snow_property_manager_exec = exports.snow_property_manager_def = exports.snow_get_script_output_exec = exports.snow_get_script_output_def = exports.snow_get_slow_queries_exec = exports.snow_get_slow_queries_def = exports.snow_get_scheduled_job_logs_exec = exports.snow_get_scheduled_job_logs_def = exports.snow_get_flow_execution_logs_exec = exports.snow_get_flow_execution_logs_def = exports.snow_get_inbound_http_logs_exec = exports.snow_get_inbound_http_logs_def = exports.snow_get_outbound_http_logs_exec = exports.snow_get_outbound_http_logs_def = exports.snow_get_email_logs_exec = exports.snow_get_email_logs_def = exports.snow_get_logs_exec = exports.snow_get_logs_def = exports.snow_execute_script_with_output_exec = exports.snow_execute_script_with_output_def = exports.snow_execute_script_sync_exec = exports.snow_execute_script_sync_def = exports.snow_execute_background_script_exec = exports.snow_execute_background_script_def = exports.snow_discover_schedules_exec = exports.snow_discover_schedules_def = exports.snow_discover_events_exec = exports.snow_discover_events_def = exports.snow_discover_automation_jobs_exec = exports.snow_discover_automation_jobs_def = exports.snow_create_workflow_activity_exec = exports.snow_create_workflow_activity_def = exports.snow_create_sla_definition_exec = exports.snow_create_sla_definition_def = exports.snow_create_escalation_rule_exec = exports.snow_create_escalation_rule_def = exports.snow_create_event_rule_exec = exports.snow_create_event_rule_def = exports.snow_confirm_script_execution_exec = exports.snow_confirm_script_execution_def = void 0;
6
+ exports.snow_trace_execution_exec = exports.snow_trace_execution_def = exports.snow_test_scheduled_job_exec = exports.snow_test_scheduled_job_def = exports.snow_test_rest_connection_exec = exports.snow_test_rest_connection_def = exports.snow_rest_message_test_suite_exec = exports.snow_rest_message_test_suite_def = exports.snow_property_manager_exec = exports.snow_property_manager_def = exports.snow_get_script_output_exec = exports.snow_get_script_output_def = exports.snow_get_slow_queries_exec = exports.snow_get_slow_queries_def = exports.snow_get_scheduled_job_logs_exec = exports.snow_get_scheduled_job_logs_def = exports.snow_get_flow_execution_logs_exec = exports.snow_get_flow_execution_logs_def = exports.snow_get_inbound_http_logs_exec = exports.snow_get_inbound_http_logs_def = exports.snow_get_outbound_http_logs_exec = exports.snow_get_outbound_http_logs_def = exports.snow_get_email_logs_exec = exports.snow_get_email_logs_def = exports.snow_get_logs_exec = exports.snow_get_logs_def = exports.snow_execute_script_exec = exports.snow_execute_script_def = exports.snow_discover_schedules_exec = exports.snow_discover_schedules_def = exports.snow_discover_events_exec = exports.snow_discover_events_def = exports.snow_discover_automation_jobs_exec = exports.snow_discover_automation_jobs_def = exports.snow_create_workflow_activity_exec = exports.snow_create_workflow_activity_def = exports.snow_create_sla_definition_exec = exports.snow_create_sla_definition_def = exports.snow_create_escalation_rule_exec = exports.snow_create_escalation_rule_def = exports.snow_create_event_rule_exec = exports.snow_create_event_rule_def = exports.snow_confirm_script_execution_exec = exports.snow_confirm_script_execution_def = void 0;
7
7
  var snow_confirm_script_execution_js_1 = require("./snow_confirm_script_execution.js");
8
8
  Object.defineProperty(exports, "snow_confirm_script_execution_def", { enumerable: true, get: function () { return snow_confirm_script_execution_js_1.toolDefinition; } });
9
9
  Object.defineProperty(exports, "snow_confirm_script_execution_exec", { enumerable: true, get: function () { return snow_confirm_script_execution_js_1.execute; } });
@@ -28,15 +28,10 @@ Object.defineProperty(exports, "snow_discover_events_exec", { enumerable: true,
28
28
  var snow_discover_schedules_js_1 = require("./snow_discover_schedules.js");
29
29
  Object.defineProperty(exports, "snow_discover_schedules_def", { enumerable: true, get: function () { return snow_discover_schedules_js_1.toolDefinition; } });
30
30
  Object.defineProperty(exports, "snow_discover_schedules_exec", { enumerable: true, get: function () { return snow_discover_schedules_js_1.execute; } });
31
- var snow_execute_background_script_js_1 = require("./snow_execute_background_script.js");
32
- Object.defineProperty(exports, "snow_execute_background_script_def", { enumerable: true, get: function () { return snow_execute_background_script_js_1.toolDefinition; } });
33
- Object.defineProperty(exports, "snow_execute_background_script_exec", { enumerable: true, get: function () { return snow_execute_background_script_js_1.execute; } });
34
- var snow_execute_script_sync_js_1 = require("./snow_execute_script_sync.js");
35
- Object.defineProperty(exports, "snow_execute_script_sync_def", { enumerable: true, get: function () { return snow_execute_script_sync_js_1.toolDefinition; } });
36
- Object.defineProperty(exports, "snow_execute_script_sync_exec", { enumerable: true, get: function () { return snow_execute_script_sync_js_1.execute; } });
37
- var snow_execute_script_with_output_js_1 = require("./snow_execute_script_with_output.js");
38
- Object.defineProperty(exports, "snow_execute_script_with_output_def", { enumerable: true, get: function () { return snow_execute_script_with_output_js_1.toolDefinition; } });
39
- Object.defineProperty(exports, "snow_execute_script_with_output_exec", { enumerable: true, get: function () { return snow_execute_script_with_output_js_1.execute; } });
31
+ // Unified script execution tool (replaces snow_execute_script_sync, snow_execute_script_with_output, snow_execute_background_script)
32
+ var snow_execute_script_js_1 = require("./snow_execute_script.js");
33
+ Object.defineProperty(exports, "snow_execute_script_def", { enumerable: true, get: function () { return snow_execute_script_js_1.toolDefinition; } });
34
+ Object.defineProperty(exports, "snow_execute_script_exec", { enumerable: true, get: function () { return snow_execute_script_js_1.execute; } });
40
35
  var snow_get_logs_js_1 = require("./snow_get_logs.js");
41
36
  Object.defineProperty(exports, "snow_get_logs_def", { enumerable: true, get: function () { return snow_get_logs_js_1.toolDefinition; } });
42
37
  Object.defineProperty(exports, "snow_get_logs_exec", { enumerable: true, get: function () { return snow_get_logs_js_1.execute; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uFAAwJ;AAA/I,qJAAA,cAAc,OAAqC;AAAE,sJAAA,OAAO,OAAsC;AAC3G,yEAAmI;AAA1H,uIAAA,cAAc,OAA8B;AAAE,wIAAA,OAAO,OAA+B;AAC7F,mFAAkJ;AAAzI,iJAAA,cAAc,OAAmC;AAAE,kJAAA,OAAO,OAAoC;AACvG,iFAA+I;AAAtI,+IAAA,cAAc,OAAkC;AAAE,gJAAA,OAAO,OAAmC;AACrG,uFAAwJ;AAA/I,qJAAA,cAAc,OAAqC;AAAE,sJAAA,OAAO,OAAsC;AAC3G,uFAAwJ;AAA/I,qJAAA,cAAc,OAAqC;AAAE,sJAAA,OAAO,OAAsC;AAC3G,qEAA6H;AAApH,mIAAA,cAAc,OAA4B;AAAE,oIAAA,OAAO,OAA6B;AACzF,2EAAsI;AAA7H,yIAAA,cAAc,OAA+B;AAAE,0IAAA,OAAO,OAAgC;AAC/F,yFAA2J;AAAlJ,uJAAA,cAAc,OAAsC;AAAE,wJAAA,OAAO,OAAuC;AAC7G,6EAAyI;AAAhI,2IAAA,cAAc,OAAgC;AAAE,4IAAA,OAAO,OAAiC;AACjG,2FAA8J;AAArJ,yJAAA,cAAc,OAAuC;AAAE,0JAAA,OAAO,OAAwC;AAC/G,uDAAwG;AAA/F,qHAAA,cAAc,OAAqB;AAAE,sHAAA,OAAO,OAAsB;AAC3E,mEAA0H;AAAjH,iIAAA,cAAc,OAA2B;AAAE,kIAAA,OAAO,OAA4B;AACvF,mFAAkJ;AAAzI,iJAAA,cAAc,OAAmC;AAAE,kJAAA,OAAO,OAAoC;AAC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A6H;AAApH,mIAAA,cAAc,OAA4B;AAAE,oIAAA,OAAO,OAA6B;AACzF,2EAAsI;AAA7H,yIAAA,cAAc,OAA+B;AAAE,0IAAA,OAAO,OAAgC;AAC/F,qIAAqI;AACrI,mEAA0H;AAAjH,iIAAA,cAAc,OAA2B;AAAE,kIAAA,OAAO,OAA4B;AACvF,uDAAwG;AAA/F,qHAAA,cAAc,OAAqB;AAAE,sHAAA,OAAO,OAAsB;AAC3E,mEAA0H;AAAjH,iIAAA,cAAc,OAA2B;AAAE,kIAAA,OAAO,OAA4B;AACvF,mFAAkJ;AAAzI,iJAAA,cAAc,OAAmC;AAAE,kJAAA,OAAO,OAAoC;AACvG,iFAA+I;AAAtI,+IAAA,cAAc,OAAkC;AAAE,gJAAA,OAAO,OAAmC;AACrG,qFAAqJ;AAA5I,mJAAA,cAAc,OAAoC;AAAE,oJAAA,OAAO,OAAqC;AACzG,mFAAkJ;AAAzI,iJAAA,cAAc,OAAmC;AAAE,kJAAA,OAAO,OAAoC;AACvG,uEAAgI;AAAvH,qIAAA,cAAc,OAA6B;AAAE,sIAAA,OAAO,OAA8B;AAC3F,yEAAmI;AAA1H,uIAAA,cAAc,OAA8B;AAAE,wIAAA,OAAO,OAA+B;AAC7F,uEAAgI;AAAvH,qIAAA,cAAc,OAA6B;AAAE,sIAAA,OAAO,OAA8B;AAC3F,qFAAqJ;AAA5I,mJAAA,cAAc,OAAoC;AAAE,oJAAA,OAAO,OAAqC;AACzG,+EAA4I;AAAnI,6IAAA,cAAc,OAAiC;AAAE,8IAAA,OAAO,OAAkC;AACnG,2EAAsI;AAA7H,yIAAA,cAAc,OAA+B;AAAE,0IAAA,OAAO,OAAgC;AAC/F,qEAA6H;AAApH,mIAAA,cAAc,OAA4B;AAAE,oIAAA,OAAO,OAA6B"}
@@ -1,14 +1,16 @@
1
1
  /**
2
- * snow_confirm_script_execution - Confirm and execute approved background script
2
+ * snow_confirm_script_execution - Confirm and execute approved script
3
3
  *
4
- * Executes a background script after user approval. Only call this after user
5
- * explicitly approves script execution from snow_execute_background_script.
4
+ * Executes a script after user approval. Only call this after user
5
+ * explicitly approves script execution from snow_execute_script with requireConfirmation=true.
6
+ *
7
+ * Uses sysauto_script + sys_trigger approach for reliable execution.
6
8
  *
7
9
  * ⚠️ CRITICAL: ALL SCRIPTS MUST BE ES5 ONLY!
8
10
  */
9
11
  import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
10
12
  export declare const toolDefinition: MCPToolDefinition;
11
13
  export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
12
- export declare const version = "1.0.0";
13
- export declare const author = "Snow-Flow SDK Migration";
14
+ export declare const version = "2.0.0";
15
+ export declare const author = "Snow-Flow SDK";
14
16
  //# sourceMappingURL=snow_confirm_script_execution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"snow_confirm_script_execution.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;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,CAuDxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"snow_confirm_script_execution.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAyC5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAoNxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,kBAAkB,CAAC"}
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  /**
3
- * snow_confirm_script_execution - Confirm and execute approved background script
3
+ * snow_confirm_script_execution - Confirm and execute approved script
4
4
  *
5
- * Executes a background script after user approval. Only call this after user
6
- * explicitly approves script execution from snow_execute_background_script.
5
+ * Executes a script after user approval. Only call this after user
6
+ * explicitly approves script execution from snow_execute_script with requireConfirmation=true.
7
+ *
8
+ * Uses sysauto_script + sys_trigger approach for reliable execution.
7
9
  *
8
10
  * ⚠️ CRITICAL: ALL SCRIPTS MUST BE ES5 ONLY!
9
11
  */
@@ -14,15 +16,14 @@ const auth_js_1 = require("../../shared/auth.js");
14
16
  const error_handler_js_1 = require("../../shared/error-handler.js");
15
17
  exports.toolDefinition = {
16
18
  name: 'snow_confirm_script_execution',
17
- description: '⚡ INTERNAL: Confirms and executes background script after user approval',
19
+ description: '⚡ Confirms and executes script after user approval (use after snow_execute_script with requireConfirmation=true)',
18
20
  // Metadata for tool discovery (not sent to LLM)
19
21
  category: 'automation',
20
22
  subcategory: 'script-execution',
21
23
  use_cases: ['automation', 'scripts', 'execution'],
22
24
  complexity: 'advanced',
23
- frequency: 'high',
25
+ frequency: 'medium',
24
26
  // Permission enforcement
25
- // Classification: WRITE - Write operation based on name pattern
26
27
  permission: 'write',
27
28
  allowedRoles: ['developer', 'admin'],
28
29
  inputSchema: {
@@ -39,46 +40,206 @@ exports.toolDefinition = {
39
40
  userConfirmed: {
40
41
  type: 'boolean',
41
42
  description: 'User confirmation (must be true)'
43
+ },
44
+ description: {
45
+ type: 'string',
46
+ description: 'Description of what the script does',
47
+ default: 'Confirmed script execution'
48
+ },
49
+ timeout: {
50
+ type: 'number',
51
+ description: 'Timeout in milliseconds for polling execution results',
52
+ default: 30000
42
53
  }
43
54
  },
44
55
  required: ['script', 'executionId', 'userConfirmed']
45
56
  }
46
57
  };
47
58
  async function execute(args, context) {
48
- const { script, executionId, userConfirmed } = args;
59
+ const { script, executionId, userConfirmed, description = 'Confirmed script execution', timeout = 30000 } = args;
49
60
  try {
50
61
  // Security check - must have user confirmation
51
62
  if (!userConfirmed) {
52
63
  throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.INVALID_REQUEST, 'User confirmation required for script execution', { retryable: false });
53
64
  }
54
65
  const client = await (0, auth_js_1.getAuthenticatedClient)(context);
55
- // Generate execution timestamp
56
- const executionTimestamp = new Date().toISOString();
57
- // Create background script execution record for audit trail
58
- const executionRecord = {
59
- name: `Snow-Flow Background Script - ${executionId}`,
60
- script: script,
66
+ const outputMarker = `SNOW_FLOW_CONFIRM_${executionId}`;
67
+ // Wrap script with output capture
68
+ const wrappedScript = `
69
+ // Snow-Flow Confirmed Execution - ID: ${executionId}
70
+ // Description: ${description.replace(/'/g, "\\'")}
71
+ var __sfOutput = [];
72
+ var __sfStartTime = new GlideDateTime();
73
+ var __sfResult = null;
74
+ var __sfError = null;
75
+
76
+ var __sfOrigPrint = gs.print;
77
+ var __sfOrigInfo = gs.info;
78
+ var __sfOrigWarn = gs.warn;
79
+ var __sfOrigError = gs.error;
80
+
81
+ gs.print = function(msg) {
82
+ var m = String(msg);
83
+ __sfOutput.push({level: 'print', message: m});
84
+ __sfOrigPrint(m);
85
+ };
86
+
87
+ gs.info = function(msg) {
88
+ var m = String(msg);
89
+ __sfOutput.push({level: 'info', message: m});
90
+ __sfOrigInfo(m);
91
+ };
92
+
93
+ gs.warn = function(msg) {
94
+ var m = String(msg);
95
+ __sfOutput.push({level: 'warn', message: m});
96
+ __sfOrigWarn(m);
97
+ };
98
+
99
+ gs.error = function(msg) {
100
+ var m = String(msg);
101
+ __sfOutput.push({level: 'error', message: m});
102
+ __sfOrigError(m);
103
+ };
104
+
105
+ try {
106
+ gs.info('=== Snow-Flow Confirmed Execution Started ===');
107
+ __sfResult = (function() {
108
+ ${script}
109
+ })();
110
+ gs.info('=== Snow-Flow Confirmed Execution Completed ===');
111
+ } catch(e) {
112
+ __sfError = e.toString();
113
+ gs.error('Error: ' + e.toString());
114
+ }
115
+
116
+ gs.print = __sfOrigPrint;
117
+ gs.info = __sfOrigInfo;
118
+ gs.warn = __sfOrigWarn;
119
+ gs.error = __sfOrigError;
120
+
121
+ var __sfEndTime = new GlideDateTime();
122
+ var __sfExecTimeMs = Math.abs(GlideDateTime.subtract(__sfStartTime, __sfEndTime).getNumericValue());
123
+
124
+ var __sfResultObj = {
125
+ executionId: '${executionId}',
126
+ success: __sfError === null,
127
+ result: __sfResult,
128
+ error: __sfError,
129
+ output: __sfOutput,
130
+ executionTimeMs: __sfExecTimeMs
131
+ };
132
+
133
+ gs.setProperty('${outputMarker}', JSON.stringify(__sfResultObj));
134
+ gs.info('${outputMarker}:DONE');
135
+ `;
136
+ // Create Scheduled Script Job
137
+ const jobName = `Snow-Flow Confirm - ${executionId}`;
138
+ const createResponse = await client.post('/api/now/table/sysauto_script', {
139
+ name: jobName,
140
+ script: wrappedScript,
61
141
  active: true,
62
- description: `Background script executed via Snow-Flow MCP - Execution ID: ${executionId}`
63
- };
64
- // Execute script using sys_script table (Background Scripts)
65
- const scriptResponse = await client.post('/api/now/table/sys_script', executionRecord);
66
- if (!scriptResponse.data.result) {
67
- throw new Error('Failed to create background script execution record');
68
- }
69
- const scriptSysId = scriptResponse.data.result.sys_id;
70
- return (0, error_handler_js_1.createSuccessResult)({
71
- executed: true,
72
- execution_id: executionId,
73
- script_sys_id: scriptSysId,
74
- executed_at: executionTimestamp,
75
- status: 'Script saved for execution',
76
- message: 'Script was saved to ServiceNow Background Scripts module. Run manually from the ServiceNow interface.',
77
- access_url: 'System Administration > Scripts - Background'
78
- }, {
79
- operation: 'background_script_execution',
80
- audit_id: executionId
142
+ run_type: 'on_demand',
143
+ conditional: false
81
144
  });
145
+ if (!createResponse.data?.result?.sys_id) {
146
+ throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.SERVICENOW_API_ERROR, 'Failed to create scheduled script job', { details: createResponse.data });
147
+ }
148
+ const jobSysId = createResponse.data.result.sys_id;
149
+ // Create sys_trigger to execute immediately
150
+ const now = new Date();
151
+ const triggerTime = new Date(now.getTime() + 2000);
152
+ const triggerTimeStr = triggerTime.toISOString().replace('T', ' ').substring(0, 19);
153
+ try {
154
+ await client.post('/api/now/table/sys_trigger', {
155
+ name: jobName,
156
+ next_action: triggerTimeStr,
157
+ trigger_type: 0,
158
+ state: 0,
159
+ document: 'sysauto_script',
160
+ document_key: jobSysId,
161
+ claimed_by: '',
162
+ system_id: 'snow-flow'
163
+ });
164
+ }
165
+ catch (triggerError) {
166
+ // Continue anyway
167
+ }
168
+ // Poll for execution results
169
+ const startTime = Date.now();
170
+ let result = null;
171
+ let attempts = 0;
172
+ const maxAttempts = Math.ceil(timeout / 2000);
173
+ while (Date.now() - startTime < timeout && attempts < maxAttempts) {
174
+ attempts++;
175
+ await new Promise(resolve => setTimeout(resolve, 2000));
176
+ try {
177
+ const propResponse = await client.get('/api/now/table/sys_properties', {
178
+ params: {
179
+ sysparm_query: `name=${outputMarker}`,
180
+ sysparm_fields: 'value,sys_id',
181
+ sysparm_limit: 1
182
+ }
183
+ });
184
+ if (propResponse.data?.result?.[0]?.value) {
185
+ try {
186
+ result = JSON.parse(propResponse.data.result[0].value);
187
+ const propSysId = propResponse.data.result[0].sys_id;
188
+ if (propSysId) {
189
+ await client.delete(`/api/now/table/sys_properties/${propSysId}`).catch(() => { });
190
+ }
191
+ break;
192
+ }
193
+ catch (parseErr) {
194
+ // Continue polling
195
+ }
196
+ }
197
+ }
198
+ catch (pollError) {
199
+ // Continue polling
200
+ }
201
+ }
202
+ // Cleanup scheduled job
203
+ try {
204
+ await client.delete(`/api/now/table/sysauto_script/${jobSysId}`);
205
+ }
206
+ catch (cleanupError) {
207
+ // Ignore
208
+ }
209
+ if (result) {
210
+ const organized = {
211
+ print: result.output.filter((o) => o.level === 'print').map((o) => o.message),
212
+ info: result.output.filter((o) => o.level === 'info').map((o) => o.message),
213
+ warn: result.output.filter((o) => o.level === 'warn').map((o) => o.message),
214
+ error: result.output.filter((o) => o.level === 'error').map((o) => o.message)
215
+ };
216
+ return (0, error_handler_js_1.createSuccessResult)({
217
+ executed: true,
218
+ execution_id: executionId,
219
+ success: result.success,
220
+ result: result.result,
221
+ error: result.error,
222
+ output: organized,
223
+ raw_output: result.output,
224
+ execution_time_ms: result.executionTimeMs,
225
+ user_confirmed: true
226
+ }, {
227
+ operation: 'confirmed_script_execution',
228
+ method: 'sysauto_script_with_trigger'
229
+ });
230
+ }
231
+ else {
232
+ return (0, error_handler_js_1.createSuccessResult)({
233
+ executed: false,
234
+ execution_id: executionId,
235
+ scheduled_job_sys_id: jobSysId,
236
+ message: 'Script was saved but execution could not be confirmed.',
237
+ action_required: `Navigate to System Scheduler > Scheduled Jobs and run: ${jobName}`
238
+ }, {
239
+ operation: 'confirmed_script_pending',
240
+ method: 'scheduled_job_pending'
241
+ });
242
+ }
82
243
  }
83
244
  catch (error) {
84
245
  return (0, error_handler_js_1.createErrorResult)(error instanceof error_handler_js_1.SnowFlowError
@@ -86,6 +247,6 @@ async function execute(args, context) {
86
247
  : new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.UNKNOWN_ERROR, error.message, { originalError: error }));
87
248
  }
88
249
  }
89
- exports.version = '1.0.0';
90
- exports.author = 'Snow-Flow SDK Migration';
250
+ exports.version = '2.0.0';
251
+ exports.author = 'Snow-Flow SDK';
91
252
  //# sourceMappingURL=snow_confirm_script_execution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"snow_confirm_script_execution.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAwCH,0BAuDC;AA5FD,kDA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D,MAAM,eAAe,GAAG;YACtB,IAAI,EAAE,iCAAiC,WAAW,EAAE;YACpD,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,gEAAgE,WAAW,EAAE;SAC3F,CAAC;QAEF,6DAA6D;QAC7D,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE,eAAe,CAAC,CAAC;QAEvF,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAEtD,OAAO,IAAA,sCAAmB,EAAC;YACzB,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,WAAW;YACzB,aAAa,EAAE,WAAW;YAC1B,WAAW,EAAE,kBAAkB;YAC/B,MAAM,EAAE,4BAA4B;YACpC,OAAO,EAAE,uGAAuG;YAChH,UAAU,EAAE,8CAA8C;SAC3D,EAAE;YACD,SAAS,EAAE,6BAA6B;YACxC,QAAQ,EAAE,WAAW;SACtB,CAAC,CAAC;IAEL,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,IAAA,oCAAiB,EACtB,KAAK,YAAY,gCAAa;YAC5B,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,gCAAa,CAAC,4BAAS,CAAC,aAAa,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CACxF,CAAC;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,OAAO,GAAG,OAAO,CAAC;AAClB,QAAA,MAAM,GAAG,yBAAyB,CAAC"}
1
+ {"version":3,"file":"snow_confirm_script_execution.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.ts"],"names":[],"mappings":";AAAA;;;;;;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