snow-flow 8.41.1 → 8.41.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.
- package/package.json +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.d.ts +0 -15
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.js +0 -393
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_background_script.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.d.ts +0 -15
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.js +0 -267
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_sync.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.d.ts +0 -15
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.js +0 -311
- package/dist/mcp/servicenow-mcp-unified/tools/automation/snow_execute_script_with_output.js.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_deploy.d.ts +0 -12
- package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_deploy.d.ts.map +0 -1
- package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_deploy.js +0 -375
- package/dist/mcp/servicenow-mcp-unified/tools/deployment/snow_deploy.js.map +0 -1
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* snow_deploy - Deploy ServiceNow artifacts with validation
|
|
4
|
-
*
|
|
5
|
-
* Deploys widgets, pages, flows, and other artifacts to ServiceNow
|
|
6
|
-
* with automatic ES5 validation, coherence checking, and Update Set management.
|
|
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_deploy',
|
|
15
|
-
description: 'Deploy ServiceNow artifacts (widgets, pages, flows) with automatic validation and Update Set management',
|
|
16
|
-
// Metadata for tool discovery (not sent to LLM)
|
|
17
|
-
category: 'development',
|
|
18
|
-
subcategory: 'deployment',
|
|
19
|
-
use_cases: ['deployment', 'validation', 'artifacts'],
|
|
20
|
-
complexity: 'intermediate',
|
|
21
|
-
frequency: 'high',
|
|
22
|
-
// Permission enforcement
|
|
23
|
-
// Classification: WRITE - Create/update/delete operation
|
|
24
|
-
permission: 'write',
|
|
25
|
-
allowedRoles: ['developer', 'admin'],
|
|
26
|
-
inputSchema: {
|
|
27
|
-
type: 'object',
|
|
28
|
-
properties: {
|
|
29
|
-
type: {
|
|
30
|
-
type: 'string',
|
|
31
|
-
enum: ['widget', 'page', 'flow', 'application', 'component'],
|
|
32
|
-
description: 'Type of artifact to deploy'
|
|
33
|
-
},
|
|
34
|
-
config: {
|
|
35
|
-
type: 'object',
|
|
36
|
-
description: 'Artifact configuration (fields depend on type)',
|
|
37
|
-
properties: {
|
|
38
|
-
name: { type: 'string', description: 'Artifact name' },
|
|
39
|
-
title: { type: 'string', description: 'Display title' },
|
|
40
|
-
description: { type: 'string', description: 'Artifact description' },
|
|
41
|
-
template: { type: 'string', description: 'HTML template (for widgets)' },
|
|
42
|
-
script: { type: 'string', description: 'Server script (for widgets)' },
|
|
43
|
-
client_script: { type: 'string', description: 'Client script (for widgets)' },
|
|
44
|
-
css: { type: 'string', description: 'CSS styles (for widgets)' },
|
|
45
|
-
option_schema: { type: 'string', description: 'Option schema JSON (for widgets)' }
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
validate_coherence: {
|
|
49
|
-
type: 'boolean',
|
|
50
|
-
description: 'Validate widget coherence (HTML/Client/Server communication)',
|
|
51
|
-
default: true
|
|
52
|
-
},
|
|
53
|
-
skip_coherence_check: {
|
|
54
|
-
type: 'boolean',
|
|
55
|
-
description: 'Skip coherence validation entirely (use when validator reports false positives)',
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
58
|
-
validate_es5: {
|
|
59
|
-
type: 'boolean',
|
|
60
|
-
description: 'Validate ES5 syntax in server scripts',
|
|
61
|
-
default: true
|
|
62
|
-
},
|
|
63
|
-
create_update_set: {
|
|
64
|
-
type: 'boolean',
|
|
65
|
-
description: 'Create new Update Set for this deployment',
|
|
66
|
-
default: false
|
|
67
|
-
},
|
|
68
|
-
update_set_name: {
|
|
69
|
-
type: 'string',
|
|
70
|
-
description: 'Name for new Update Set (if create_update_set=true)'
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
required: ['type', 'config']
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
async function execute(args, context) {
|
|
77
|
-
const { type, config, validate_coherence = true, skip_coherence_check = false, validate_es5 = true, create_update_set = false, update_set_name } = args;
|
|
78
|
-
try {
|
|
79
|
-
const client = await (0, auth_js_1.getAuthenticatedClient)(context);
|
|
80
|
-
// Step 1: Pre-deployment validation
|
|
81
|
-
if (type === 'widget') {
|
|
82
|
-
// ES5 validation for server script
|
|
83
|
-
if (validate_es5 && config.script) {
|
|
84
|
-
const es5Validation = validateES5Syntax(config.script);
|
|
85
|
-
if (!es5Validation.valid) {
|
|
86
|
-
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.ES5_SYNTAX_ERROR, 'Server script contains non-ES5 syntax', {
|
|
87
|
-
retryable: false,
|
|
88
|
-
details: {
|
|
89
|
-
violations: es5Validation.violations.map(v => ({
|
|
90
|
-
type: v.type,
|
|
91
|
-
line: v.line,
|
|
92
|
-
code: v.code,
|
|
93
|
-
fix: v.fix
|
|
94
|
-
}))
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
// Widget coherence validation
|
|
100
|
-
if (validate_coherence && !skip_coherence_check) {
|
|
101
|
-
const coherenceResult = validateWidgetCoherence(config);
|
|
102
|
-
if (!coherenceResult.coherent) {
|
|
103
|
-
const criticalIssues = coherenceResult.issues.filter(i => i.severity === 'critical');
|
|
104
|
-
if (criticalIssues.length > 0) {
|
|
105
|
-
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.WIDGET_COHERENCE_ERROR, 'Widget coherence validation failed. Use skip_coherence_check: true to bypass this validation.', {
|
|
106
|
-
retryable: false,
|
|
107
|
-
details: {
|
|
108
|
-
critical: criticalIssues,
|
|
109
|
-
warnings: coherenceResult.issues.filter(i => i.severity === 'warning'),
|
|
110
|
-
analysis: coherenceResult.analysis,
|
|
111
|
-
suggestion: 'If these properties are initialized conditionally (e.g., inside if blocks), use skip_coherence_check: true'
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
// Step 2: Create/ensure Update Set if needed
|
|
119
|
-
let updateSetId;
|
|
120
|
-
if (create_update_set && update_set_name) {
|
|
121
|
-
const updateSetResponse = await client.post('/api/now/table/sys_update_set', {
|
|
122
|
-
name: update_set_name,
|
|
123
|
-
description: `Deployment: ${config.name || 'Artifact'}`,
|
|
124
|
-
state: 'in progress'
|
|
125
|
-
});
|
|
126
|
-
updateSetId = updateSetResponse.data.result.sys_id;
|
|
127
|
-
// Set as current Update Set
|
|
128
|
-
await client.put(`/api/now/table/sys_update_set/${updateSetId}`, {
|
|
129
|
-
is_current: true
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
// Step 3: Deploy artifact based on type
|
|
133
|
-
let deploymentResult;
|
|
134
|
-
switch (type) {
|
|
135
|
-
case 'widget':
|
|
136
|
-
deploymentResult = await deployWidget(client, config);
|
|
137
|
-
break;
|
|
138
|
-
case 'page':
|
|
139
|
-
deploymentResult = await deployPage(client, config);
|
|
140
|
-
break;
|
|
141
|
-
case 'flow':
|
|
142
|
-
deploymentResult = await deployFlow(client, config);
|
|
143
|
-
break;
|
|
144
|
-
default:
|
|
145
|
-
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.INVALID_REQUEST, `Unsupported artifact type: ${type}`, { retryable: false });
|
|
146
|
-
}
|
|
147
|
-
// Step 4: Return success result
|
|
148
|
-
return (0, error_handler_js_1.createSuccessResult)({
|
|
149
|
-
sys_id: deploymentResult.sys_id,
|
|
150
|
-
table: deploymentResult.table,
|
|
151
|
-
name: config.name,
|
|
152
|
-
type,
|
|
153
|
-
url: `${context.instanceUrl}/nav_to.do?uri=${deploymentResult.table}.do?sys_id=${deploymentResult.sys_id}`
|
|
154
|
-
}, {
|
|
155
|
-
updateSetId,
|
|
156
|
-
validations: {
|
|
157
|
-
es5: validate_es5 ? 'passed' : 'skipped',
|
|
158
|
-
coherence: validate_coherence ? 'passed' : 'skipped'
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
return (0, error_handler_js_1.createErrorResult)(error instanceof error_handler_js_1.SnowFlowError
|
|
164
|
-
? error
|
|
165
|
-
: new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.DEPLOYMENT_FAILED, error.message, { originalError: error }));
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Deploy Service Portal widget
|
|
170
|
-
*/
|
|
171
|
-
async function deployWidget(client, config) {
|
|
172
|
-
const widgetData = {
|
|
173
|
-
id: config.name,
|
|
174
|
-
name: config.title || config.name,
|
|
175
|
-
description: config.description || '',
|
|
176
|
-
template: config.template || '',
|
|
177
|
-
script: config.script || '',
|
|
178
|
-
client_script: config.client_script || '',
|
|
179
|
-
css: config.css || '',
|
|
180
|
-
option_schema: config.option_schema || ''
|
|
181
|
-
};
|
|
182
|
-
// Check if widget exists
|
|
183
|
-
const existingResponse = await client.get('/api/now/table/sp_widget', {
|
|
184
|
-
params: {
|
|
185
|
-
sysparm_query: `id=${config.name}`,
|
|
186
|
-
sysparm_limit: 1
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
let result;
|
|
190
|
-
if (existingResponse.data.result.length > 0) {
|
|
191
|
-
// Update existing widget
|
|
192
|
-
const sys_id = existingResponse.data.result[0].sys_id;
|
|
193
|
-
const updateResponse = await client.put(`/api/now/table/sp_widget/${sys_id}`, widgetData);
|
|
194
|
-
result = updateResponse.data.result;
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
// Create new widget
|
|
198
|
-
const createResponse = await client.post('/api/now/table/sp_widget', widgetData);
|
|
199
|
-
result = createResponse.data.result;
|
|
200
|
-
}
|
|
201
|
-
return {
|
|
202
|
-
sys_id: result.sys_id,
|
|
203
|
-
table: 'sp_widget'
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Deploy UI Builder page
|
|
208
|
-
*/
|
|
209
|
-
async function deployPage(client, config) {
|
|
210
|
-
const pageData = {
|
|
211
|
-
name: config.name,
|
|
212
|
-
title: config.title || config.name,
|
|
213
|
-
description: config.description || ''
|
|
214
|
-
};
|
|
215
|
-
const response = await client.post('/api/now/table/sys_ux_page', pageData);
|
|
216
|
-
return {
|
|
217
|
-
sys_id: response.data.result.sys_id,
|
|
218
|
-
table: 'sys_ux_page'
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Deploy Flow Designer flow (via XML import only)
|
|
223
|
-
*/
|
|
224
|
-
async function deployFlow(client, config) {
|
|
225
|
-
throw new error_handler_js_1.SnowFlowError(error_handler_js_1.ErrorType.INVALID_REQUEST, 'Flow deployment requires XML import via snow_import_flow_from_xml', { retryable: false });
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Validate ES5 syntax in JavaScript code
|
|
229
|
-
*/
|
|
230
|
-
function validateES5Syntax(code) {
|
|
231
|
-
const violations = [];
|
|
232
|
-
// Check for const/let
|
|
233
|
-
const constLetPattern = /\b(const|let)\s+/g;
|
|
234
|
-
let match;
|
|
235
|
-
while ((match = constLetPattern.exec(code)) !== null) {
|
|
236
|
-
violations.push({
|
|
237
|
-
type: match[1] === 'const' ? 'const' : 'let',
|
|
238
|
-
line: code.substring(0, match.index).split('\n').length,
|
|
239
|
-
code: match[0],
|
|
240
|
-
fix: `Use 'var' instead of '${match[1]}'`
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
// Check for arrow functions
|
|
244
|
-
const arrowPattern = /\([^)]*\)\s*=>/g;
|
|
245
|
-
while ((match = arrowPattern.exec(code)) !== null) {
|
|
246
|
-
violations.push({
|
|
247
|
-
type: 'arrow_function',
|
|
248
|
-
line: code.substring(0, match.index).split('\n').length,
|
|
249
|
-
code: match[0],
|
|
250
|
-
fix: 'Use function() {} instead of arrow function'
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
// Check for template literals
|
|
254
|
-
const templatePattern = /`[^`]*`/g;
|
|
255
|
-
while ((match = templatePattern.exec(code)) !== null) {
|
|
256
|
-
violations.push({
|
|
257
|
-
type: 'template_literal',
|
|
258
|
-
line: code.substring(0, match.index).split('\n').length,
|
|
259
|
-
code: match[0],
|
|
260
|
-
fix: 'Use string concatenation with + instead of template literals'
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
return {
|
|
264
|
-
valid: violations.length === 0,
|
|
265
|
-
violations
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Validate widget coherence (HTML/Client/Server communication)
|
|
270
|
-
*/
|
|
271
|
-
function validateWidgetCoherence(config) {
|
|
272
|
-
const issues = [];
|
|
273
|
-
const analysis = {
|
|
274
|
-
serverInitializedData: [],
|
|
275
|
-
conditionalData: [],
|
|
276
|
-
clientMethods: [],
|
|
277
|
-
htmlReferences: [],
|
|
278
|
-
inputActions: []
|
|
279
|
-
};
|
|
280
|
-
// Extract data properties from server script
|
|
281
|
-
if (config.script) {
|
|
282
|
-
// Find all data assignments (both conditional and unconditional)
|
|
283
|
-
const dataPattern = /data\.(\w+)\s*=/g;
|
|
284
|
-
let match;
|
|
285
|
-
const script = config.script;
|
|
286
|
-
while ((match = dataPattern.exec(script)) !== null) {
|
|
287
|
-
const propertyName = match[1];
|
|
288
|
-
const assignmentIndex = match.index;
|
|
289
|
-
// Check if this assignment is inside a conditional block
|
|
290
|
-
// Look backwards from the assignment to find if/else/switch statements
|
|
291
|
-
const beforeAssignment = script.substring(0, assignmentIndex);
|
|
292
|
-
const linesBeforeAssignment = beforeAssignment.split('\n');
|
|
293
|
-
// Simple heuristic: check if within an if/else/switch block
|
|
294
|
-
// Count opening and closing braces to determine depth
|
|
295
|
-
let braceDepth = 0;
|
|
296
|
-
let inConditional = false;
|
|
297
|
-
for (let i = linesBeforeAssignment.length - 1; i >= 0; i--) {
|
|
298
|
-
const line = linesBeforeAssignment[i];
|
|
299
|
-
// Count braces
|
|
300
|
-
const openBraces = (line.match(/\{/g) || []).length;
|
|
301
|
-
const closeBraces = (line.match(/\}/g) || []).length;
|
|
302
|
-
braceDepth += closeBraces - openBraces;
|
|
303
|
-
// Check for conditional keywords
|
|
304
|
-
if (/\b(if|else|switch|case)\b/.test(line) && braceDepth > 0) {
|
|
305
|
-
inConditional = true;
|
|
306
|
-
break;
|
|
307
|
-
}
|
|
308
|
-
// If we've reached the top level, stop looking
|
|
309
|
-
if (braceDepth <= 0) {
|
|
310
|
-
break;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
if (inConditional) {
|
|
314
|
-
analysis.conditionalData.push(propertyName);
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
317
|
-
analysis.serverInitializedData.push(propertyName);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
// Extract input.action handlers
|
|
321
|
-
const actionPattern = /input\.action\s*===?\s*['"](\w+)['"]/g;
|
|
322
|
-
while ((match = actionPattern.exec(config.script)) !== null) {
|
|
323
|
-
analysis.inputActions.push(match[1]);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
// Extract data references from HTML
|
|
327
|
-
if (config.template) {
|
|
328
|
-
const htmlDataPattern = /\{\{data\.(\w+)\}\}/g;
|
|
329
|
-
let match;
|
|
330
|
-
while ((match = htmlDataPattern.exec(config.template)) !== null) {
|
|
331
|
-
analysis.htmlReferences.push(match[1]);
|
|
332
|
-
}
|
|
333
|
-
// Check if HTML references exist in server data
|
|
334
|
-
analysis.htmlReferences.forEach(ref => {
|
|
335
|
-
const isUnconditional = analysis.serverInitializedData.includes(ref);
|
|
336
|
-
const isConditional = analysis.conditionalData.includes(ref);
|
|
337
|
-
if (!isUnconditional && !isConditional) {
|
|
338
|
-
// Not found at all - critical error
|
|
339
|
-
issues.push({
|
|
340
|
-
type: 'missing_data',
|
|
341
|
-
severity: 'critical',
|
|
342
|
-
description: `HTML references data.${ref} but server doesn't initialize it`,
|
|
343
|
-
location: 'template',
|
|
344
|
-
fix: `Add 'data.${ref} = ...;' to server script`
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
else if (!isUnconditional && isConditional) {
|
|
348
|
-
// Found but only conditionally - warning
|
|
349
|
-
issues.push({
|
|
350
|
-
type: 'conditional_data',
|
|
351
|
-
severity: 'warning',
|
|
352
|
-
description: `HTML references data.${ref} which is only initialized conditionally (e.g., inside if blocks)`,
|
|
353
|
-
location: 'template',
|
|
354
|
-
fix: `Consider initializing data.${ref} unconditionally or using ng-if in template to handle undefined state`
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
// Extract methods from client script
|
|
360
|
-
if (config.client_script) {
|
|
361
|
-
const methodPattern = /(?:c|$scope)\.(\w+)\s*=\s*function/g;
|
|
362
|
-
let match;
|
|
363
|
-
while ((match = methodPattern.exec(config.client_script)) !== null) {
|
|
364
|
-
analysis.clientMethods.push(match[1]);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
return {
|
|
368
|
-
coherent: issues.filter(i => i.severity === 'critical').length === 0,
|
|
369
|
-
issues,
|
|
370
|
-
analysis
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
exports.version = '1.0.0';
|
|
374
|
-
exports.author = 'Snow-Flow SDK Migration';
|
|
375
|
-
//# sourceMappingURL=snow_deploy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snow_deploy.js","sourceRoot":"","sources":["../../../../../src/mcp/servicenow-mcp-unified/tools/deployment/snow_deploy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAuEH,0BAuHC;AA3LD,kDAA8D;AAC9D,oEAAiH;AAEpG,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,yGAAyG;IACtH,gDAAgD;IAChD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,YAAY;IACzB,SAAS,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,CAAC;IACpD,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,MAAM;IAEjB,yBAAyB;IACzB,yDAAyD;IACzD,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,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,CAAC;gBAC5D,WAAW,EAAE,4BAA4B;aAC1C;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;gBAC7D,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ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