snow-flow 8.40.0 → 8.40.2

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 (31) hide show
  1. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.d.ts +14 -0
  2. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.d.ts.map +1 -0
  3. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.js +220 -0
  4. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.js.map +1 -0
  5. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.d.ts +12 -0
  6. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.d.ts.map +1 -0
  7. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.js +236 -0
  8. package/dist/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.js.map +1 -0
  9. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts +1 -3
  10. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.d.ts.map +1 -1
  11. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js +5 -10
  12. package/dist/mcp/servicenow-mcp-unified/tools/automation/index.js.map +1 -1
  13. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.d.ts +7 -5
  14. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.d.ts.map +1 -1
  15. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.js +195 -34
  16. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_confirm_script_execution.js.map +1 -1
  17. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.d.ts +20 -0
  18. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.d.ts.map +1 -0
  19. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.js +474 -0
  20. package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script.js.map +1 -0
  21. package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_create_artifact.d.ts.map +1 -1
  22. package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_create_artifact.js +7 -1
  23. package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_create_artifact.js.map +1 -1
  24. package/dist/templates/agents-md-template.d.ts +1 -1
  25. package/dist/templates/agents-md-template.d.ts.map +1 -1
  26. package/dist/templates/agents-md-template.js +4 -4
  27. package/dist/templates/claude-md-template.d.ts +1 -1
  28. package/dist/templates/claude-md-template.d.ts.map +1 -1
  29. package/dist/templates/claude-md-template.js +17 -12
  30. package/dist/templates/claude-md-template.js.map +1 -1
  31. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ /**
2
+ * snow_get_current_scope - Get Current Application Scope
3
+ *
4
+ * Returns the current application scope for the OAuth service account,
5
+ * including details about the scope and the active Update Set.
6
+ *
7
+ * Useful for verifying which scope you're working in before creating artifacts.
8
+ */
9
+ import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
10
+ export declare const toolDefinition: MCPToolDefinition;
11
+ 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 Application Scope Enhancement";
14
+ //# sourceMappingURL=snow_get_current_scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_get_current_scope.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;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,CA8LxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4CAA4C,CAAC"}
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ /**
3
+ * snow_get_current_scope - Get Current Application Scope
4
+ *
5
+ * Returns the current application scope for the OAuth service account,
6
+ * including details about the scope and the active Update Set.
7
+ *
8
+ * Useful for verifying which scope you're working in before creating artifacts.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.author = exports.version = exports.toolDefinition = void 0;
12
+ exports.execute = execute;
13
+ const auth_js_1 = require("../../shared/auth.js");
14
+ const error_handler_js_1 = require("../../shared/error-handler.js");
15
+ exports.toolDefinition = {
16
+ name: 'snow_get_current_scope',
17
+ description: `Get the current application scope and active Update Set.
18
+
19
+ 🔍 USE THIS TO:
20
+ - Verify which scope you're currently working in before creating artifacts
21
+ - Check if you have an active Update Set in the current scope
22
+ - Understand the development context before starting work
23
+
24
+ 📋 RETURNS:
25
+ - Current application scope (name, sys_id, scope prefix)
26
+ - Whether it's global or a scoped application
27
+ - Current active Update Set (if any)
28
+ - Recommendations for next steps`,
29
+ // Metadata for tool discovery (not sent to LLM)
30
+ category: 'development',
31
+ subcategory: 'applications',
32
+ use_cases: ['app-development', 'scoped-apps', 'development', 'context-check'],
33
+ complexity: 'beginner',
34
+ frequency: 'high',
35
+ // Permission enforcement
36
+ // Classification: READ - Query only, no modifications
37
+ permission: 'read',
38
+ allowedRoles: ['developer', 'admin', 'stakeholder'],
39
+ inputSchema: {
40
+ type: 'object',
41
+ properties: {
42
+ include_update_set: {
43
+ type: 'boolean',
44
+ description: 'Include information about the current Update Set (default: true)',
45
+ default: true
46
+ },
47
+ include_recent_artifacts: {
48
+ type: 'boolean',
49
+ description: 'Include count of recent artifacts created in current scope (default: false)',
50
+ default: false
51
+ }
52
+ },
53
+ required: []
54
+ }
55
+ };
56
+ async function execute(args, context) {
57
+ const { include_update_set = true, include_recent_artifacts = false } = args;
58
+ try {
59
+ const client = await (0, auth_js_1.getAuthenticatedClient)(context);
60
+ // Get current scope preference
61
+ const scopePrefResponse = await client.get('/api/now/table/sys_user_preference', {
62
+ params: {
63
+ sysparm_query: 'name=sys_scope^user=javascript:gs.getUserID()',
64
+ sysparm_fields: 'value',
65
+ sysparm_limit: 1
66
+ }
67
+ });
68
+ let currentScope = {
69
+ sys_id: 'global',
70
+ name: 'Global',
71
+ scope: 'global',
72
+ is_global: true
73
+ };
74
+ // If we have a scope preference, look up the application details
75
+ if (scopePrefResponse.data.result && scopePrefResponse.data.result.length > 0) {
76
+ const scopeValue = scopePrefResponse.data.result[0].value;
77
+ if (scopeValue && scopeValue !== 'global') {
78
+ // Look up the application
79
+ const appResponse = await client.get(`/api/now/table/sys_app/${scopeValue}`, {
80
+ params: {
81
+ sysparm_fields: 'sys_id,name,scope,version,short_description,vendor,active'
82
+ }
83
+ });
84
+ if (appResponse.data.result) {
85
+ const app = appResponse.data.result;
86
+ currentScope = {
87
+ sys_id: app.sys_id,
88
+ name: app.name,
89
+ scope: app.scope,
90
+ version: app.version || null,
91
+ short_description: app.short_description || null,
92
+ vendor: app.vendor || null,
93
+ is_global: false,
94
+ is_active: app.active === 'true' || app.active === true
95
+ };
96
+ }
97
+ }
98
+ }
99
+ // Build result
100
+ const result = {
101
+ current_scope: currentScope,
102
+ update_set: null,
103
+ recommendations: []
104
+ };
105
+ // Get current Update Set if requested
106
+ if (include_update_set) {
107
+ const updateSetPrefResponse = await client.get('/api/now/table/sys_user_preference', {
108
+ params: {
109
+ sysparm_query: 'name=sys_update_set^user=javascript:gs.getUserID()',
110
+ sysparm_fields: 'value',
111
+ sysparm_limit: 1
112
+ }
113
+ });
114
+ if (updateSetPrefResponse.data.result && updateSetPrefResponse.data.result.length > 0) {
115
+ const updateSetId = updateSetPrefResponse.data.result[0].value;
116
+ if (updateSetId) {
117
+ const updateSetResponse = await client.get(`/api/now/table/sys_update_set/${updateSetId}`, {
118
+ params: {
119
+ sysparm_fields: 'sys_id,name,description,state,application,sys_created_on'
120
+ }
121
+ });
122
+ if (updateSetResponse.data.result) {
123
+ const us = updateSetResponse.data.result;
124
+ // Get application name for the Update Set
125
+ let usAppName = 'Global';
126
+ let usAppScope = 'global';
127
+ if (us.application && us.application !== 'global') {
128
+ try {
129
+ const usAppResponse = await client.get(`/api/now/table/sys_app/${us.application}`, {
130
+ params: {
131
+ sysparm_fields: 'name,scope'
132
+ }
133
+ });
134
+ if (usAppResponse.data.result) {
135
+ usAppName = usAppResponse.data.result.name;
136
+ usAppScope = usAppResponse.data.result.scope;
137
+ }
138
+ }
139
+ catch (e) {
140
+ // Ignore - might be global
141
+ }
142
+ }
143
+ result.update_set = {
144
+ sys_id: us.sys_id,
145
+ name: us.name,
146
+ description: us.description || null,
147
+ state: us.state,
148
+ created_at: us.sys_created_on,
149
+ application: {
150
+ sys_id: us.application || 'global',
151
+ name: usAppName,
152
+ scope: usAppScope
153
+ },
154
+ scope_matches: (us.application === currentScope.sys_id) ||
155
+ (us.application === 'global' && currentScope.is_global)
156
+ };
157
+ // Check for scope mismatch
158
+ if (!result.update_set.scope_matches) {
159
+ result.recommendations.push(`⚠️ SCOPE MISMATCH: Current scope is "${currentScope.name}" but Update Set is in "${usAppName}". ` +
160
+ `Consider switching scope or creating a new Update Set.`);
161
+ }
162
+ }
163
+ }
164
+ }
165
+ if (!result.update_set) {
166
+ result.recommendations.push('⚠️ No active Update Set! Create one with snow_update_set_manage before making changes.');
167
+ }
168
+ }
169
+ // Get recent artifact count if requested
170
+ if (include_recent_artifacts && !currentScope.is_global) {
171
+ try {
172
+ // Count artifacts in the current scope from the last 24 hours
173
+ const oneDayAgo = new Date(Date.now() - 24 * 60 * 60 * 1000).toISOString();
174
+ const artifactCountResponse = await client.get('/api/now/table/sys_metadata', {
175
+ params: {
176
+ sysparm_query: `sys_scope=${currentScope.sys_id}^sys_created_on>=${oneDayAgo}`,
177
+ sysparm_fields: 'sys_id',
178
+ sysparm_limit: 100
179
+ }
180
+ });
181
+ result.recent_artifacts = {
182
+ count: artifactCountResponse.data.result?.length || 0,
183
+ period: 'last 24 hours',
184
+ scope: currentScope.scope
185
+ };
186
+ }
187
+ catch (e) {
188
+ // Ignore - optional feature
189
+ }
190
+ }
191
+ // Add general recommendations
192
+ if (currentScope.is_global) {
193
+ result.recommendations.push('You are in Global scope. Artifacts created will be available across all applications.');
194
+ result.recommendations.push('Consider creating a scoped application if building a complete feature set.');
195
+ }
196
+ else {
197
+ result.recommendations.push(`You are in "${currentScope.name}" scope (${currentScope.scope}). ` +
198
+ `Artifacts created will belong to this application.`);
199
+ }
200
+ // Build summary message
201
+ let message = `Current scope: ${currentScope.is_global ? 'Global' : `"${currentScope.name}" (${currentScope.scope})`}`;
202
+ if (result.update_set) {
203
+ message += ` | Update Set: "${result.update_set.name}" (${result.update_set.state})`;
204
+ if (!result.update_set.scope_matches) {
205
+ message += ' ⚠️ SCOPE MISMATCH';
206
+ }
207
+ }
208
+ else {
209
+ message += ' | No active Update Set';
210
+ }
211
+ result.message = message;
212
+ return (0, error_handler_js_1.createSuccessResult)(result);
213
+ }
214
+ catch (error) {
215
+ return (0, error_handler_js_1.createErrorResult)(error.message);
216
+ }
217
+ }
218
+ exports.version = '1.0.0';
219
+ exports.author = 'Snow-Flow Application Scope Enhancement';
220
+ //# sourceMappingURL=snow_get_current_scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_get_current_scope.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/applications/snow_get_current_scope.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAiDH,0BA8LC;AA5OD,kDAA8D;AAC9D,oEAAuF;AAE1E,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE;;;;;;;;;;;iCAWkB;IAC/B,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,CAAC,iBAAiB,EAAE,aAAa,EAAE,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AC,MAAM,CAAC,CAAC;IACrC,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,yCAAyC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * snow_list_applications - List Available Applications
3
+ *
4
+ * Lists all scoped applications in the ServiceNow instance with filtering
5
+ * and search capabilities. Useful for finding the right scope to work in.
6
+ */
7
+ import { MCPToolDefinition, ServiceNowContext, ToolResult } from '../../shared/types.js';
8
+ export declare const toolDefinition: MCPToolDefinition;
9
+ export declare function execute(args: any, context: ServiceNowContext): Promise<ToolResult>;
10
+ export declare const version = "1.0.0";
11
+ export declare const author = "Snow-Flow Application Scope Enhancement";
12
+ //# sourceMappingURL=snow_list_applications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snow_list_applications.d.ts","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/applications/snow_list_applications.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIzF,eAAO,MAAM,cAAc,EAAE,iBAiE5B,CAAC;AAEF,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAsLxF;AAED,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,MAAM,4CAA4C,CAAC"}
@@ -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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wFAAwF,CAAC,CAAC;QACxH,CAAC;aAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YACvB,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,2FAA2F,CAAC,CAAC;QAC3H,CAAC;QAED,OAAO,IAAA,sCAAmB,EAAC,MAAM,CAAC,CAAC;IACrC,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,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/t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,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAClJ,OAAO,EAAE,cAAc,IAAI,yBAAyB,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAChI,OAAO,EAAE,cAAc,IAAI,0BAA0B,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACnI,OAAO,EAAE,cAAc,IAAI,yBAAyB,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAChI,OAAO,EAAE,cAAc,IAAI,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,OAA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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"}