@mandate-os/sdk 0.1.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.
@@ -0,0 +1,573 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { isRiskLevel, isToolId, isZone } from './mandates';
3
+ import { isPolicyGatewayRoute, recommendedToolForRoute, } from './enforced-capabilities';
4
+ export const readOnlyShellPatterns = [
5
+ /^\s*(ls|pwd|cat|sed|rg|find)\b/i,
6
+ /^\s*git\s+(status|diff|log|show)\b/i,
7
+ /^\s*(pnpm|npm)\s+(test|lint|build)\b/i,
8
+ /^\s*(vitest|jest|tsc|eslint)\b/i,
9
+ ];
10
+ export const defaultHostGatewayRules = [
11
+ {
12
+ id: 'github.issue.label.command',
13
+ channel: 'shell',
14
+ matcher: '^gh\\s+issue\\s+edit\\b(?=.*(?:--add-label|--remove-label)\\b)',
15
+ flags: 'i',
16
+ tool: 'issue.label',
17
+ title: 'Change GitHub issue labels',
18
+ description: 'Attempt to change labels on a GitHub issue with command: {command}',
19
+ zone: 'domestic',
20
+ riskLevel: 'low',
21
+ route: 'enforced.github.issue.label',
22
+ },
23
+ {
24
+ id: 'github.pr.draft.command',
25
+ channel: 'shell',
26
+ matcher: '^gh\\s+pr\\s+ready\\b(?=.*--undo\\b)',
27
+ flags: 'i',
28
+ tool: 'pr.draft',
29
+ title: 'Convert a GitHub pull request to draft',
30
+ description: 'Attempt to convert a GitHub pull request to draft with command: {command}',
31
+ zone: 'domestic',
32
+ riskLevel: 'low',
33
+ route: 'enforced.github.pull_request.draft',
34
+ },
35
+ {
36
+ id: 'github.repo.read.command',
37
+ channel: 'shell',
38
+ matcher: '^gh\\s+(issue|pr|repo)\\s+(view|list|status)\\b',
39
+ flags: 'i',
40
+ tool: 'repo.read',
41
+ title: 'Read GitHub repository state',
42
+ description: 'Inspect GitHub repository state with command: {command}',
43
+ zone: 'domestic',
44
+ riskLevel: 'low',
45
+ route: 'generic',
46
+ },
47
+ {
48
+ id: 'git.push.command',
49
+ channel: 'shell',
50
+ matcher: '^git\\s+push\\b',
51
+ flags: 'i',
52
+ tool: 'pr.draft',
53
+ title: 'Push code changes to a remote branch',
54
+ description: 'Push a git branch with command: {command}',
55
+ zone: 'domestic',
56
+ riskLevel: 'medium',
57
+ route: 'generic',
58
+ },
59
+ {
60
+ id: 'release.publish.command',
61
+ channel: 'shell',
62
+ matcher: '^(npm|pnpm)\\s+publish\\b',
63
+ flags: 'i',
64
+ tool: 'deploy.prod',
65
+ title: 'Publish a package or release artifact',
66
+ description: 'Publish a package or release artifact with command: {command}',
67
+ zone: 'oecd',
68
+ riskLevel: 'high',
69
+ route: 'generic',
70
+ },
71
+ {
72
+ id: 'kubernetes.mutation.command',
73
+ channel: 'shell',
74
+ matcher: '^(kubectl|helm)\\s+(apply|delete|patch|scale|rollout|set|replace|upgrade|uninstall)\\b',
75
+ flags: 'i',
76
+ tool: 'deploy.prod',
77
+ title: 'Mutate cluster state',
78
+ description: 'Apply a cluster mutation with command: {command}',
79
+ zone: 'oecd',
80
+ riskLevel: 'high',
81
+ route: 'generic',
82
+ },
83
+ {
84
+ id: 'terraform.mutation.command',
85
+ channel: 'shell',
86
+ matcher: '^terraform\\s+(apply|destroy)\\b',
87
+ flags: 'i',
88
+ tool: 'deploy.prod',
89
+ title: 'Mutate infrastructure with Terraform',
90
+ description: 'Apply infrastructure changes with command: {command}',
91
+ zone: 'oecd',
92
+ riskLevel: 'high',
93
+ route: 'generic',
94
+ },
95
+ {
96
+ id: 'cloud.mutation.command',
97
+ channel: 'shell',
98
+ matcher: '^(aws|gcloud|az)\\b.*\\b(create|delete|deploy|apply|start|stop|update|put|run|invoke)\\b',
99
+ flags: 'i',
100
+ tool: 'deploy.prod',
101
+ title: 'Mutate cloud infrastructure',
102
+ description: 'Apply a cloud infrastructure mutation with command: {command}',
103
+ zone: 'oecd',
104
+ riskLevel: 'high',
105
+ route: 'generic',
106
+ },
107
+ {
108
+ id: 'github.issue.label.tool',
109
+ channel: 'mcp',
110
+ matcher: '(^|[._:-])(github|gh)([._:-].*)?(issue|issues)([._:-].*)?label([._:-]|$)',
111
+ flags: 'i',
112
+ tool: 'issue.label',
113
+ title: 'Change GitHub issue labels',
114
+ description: 'Attempt to change GitHub issue labels with MCP tool {toolName}',
115
+ zone: 'domestic',
116
+ riskLevel: 'low',
117
+ route: 'enforced.github.issue.label',
118
+ },
119
+ {
120
+ id: 'github.pr.draft.tool',
121
+ channel: 'mcp',
122
+ matcher: '(^|[._:-])(github|gh)([._:-].*)?(pull[_-]?request|pr)([._:-].*)?draft([._:-]|$)',
123
+ flags: 'i',
124
+ tool: 'pr.draft',
125
+ title: 'Convert a GitHub pull request to draft',
126
+ description: 'Attempt to convert a GitHub pull request to draft with MCP tool {toolName}',
127
+ zone: 'domestic',
128
+ riskLevel: 'low',
129
+ route: 'enforced.github.pull_request.draft',
130
+ },
131
+ {
132
+ id: 'repo.read.tool',
133
+ channel: 'mcp',
134
+ matcher: '(github|repo|git).*(read|get|view|list|search|fetch)|(read|get|view|list|search|fetch).*(github|repo|git)',
135
+ flags: 'i',
136
+ tool: 'repo.read',
137
+ title: 'Read repository state',
138
+ description: 'Inspect repository state with MCP tool {toolName}',
139
+ zone: 'domestic',
140
+ riskLevel: 'low',
141
+ route: 'generic',
142
+ },
143
+ {
144
+ id: 'docs.publish.tool',
145
+ channel: 'mcp',
146
+ matcher: '(docs|documentation|notion|confluence).*(publish|deploy|write|update|create)|(publish|deploy).*(docs|documentation|notion|confluence)',
147
+ flags: 'i',
148
+ tool: 'docs.publish',
149
+ title: 'Publish documentation or public content',
150
+ description: 'Publish public-facing content with MCP tool {toolName}',
151
+ zone: 'oecd',
152
+ riskLevel: 'medium',
153
+ route: 'generic',
154
+ },
155
+ {
156
+ id: 'deploy.prod.tool',
157
+ channel: 'mcp',
158
+ matcher: '(deploy|kubernetes|kubectl|helm|terraform|vercel|netlify|cloudflare|aws|gcloud|azure|az)',
159
+ flags: 'i',
160
+ tool: 'deploy.prod',
161
+ title: 'Mutate deployed infrastructure',
162
+ description: 'Apply infrastructure changes with MCP tool {toolName}',
163
+ zone: 'oecd',
164
+ riskLevel: 'high',
165
+ route: 'generic',
166
+ },
167
+ {
168
+ id: 'erp.read.tool',
169
+ channel: 'mcp',
170
+ matcher: '(erp|sap|netsuite|invoice|procurement).*(read|get|list|query|search)|(read|get|list|query|search).*(erp|sap|netsuite|invoice|procurement)',
171
+ flags: 'i',
172
+ tool: 'erp.read',
173
+ title: 'Read finance or procurement context',
174
+ description: 'Read finance or procurement context with MCP tool {toolName}',
175
+ zone: 'eea',
176
+ riskLevel: 'low',
177
+ route: 'generic',
178
+ },
179
+ {
180
+ id: 'payment.execute.tool',
181
+ channel: 'mcp',
182
+ matcher: '(payment|stripe|billing).*(charge|capture|pay|invoice)|(charge|capture|pay|invoice).*(payment|stripe|billing)',
183
+ flags: 'i',
184
+ tool: 'payment.execute',
185
+ title: 'Execute a payment or capture funds',
186
+ description: 'Execute a payment or capture funds with MCP tool {toolName}',
187
+ zone: 'oecd',
188
+ riskLevel: 'high',
189
+ route: 'generic',
190
+ },
191
+ {
192
+ id: 'support.refund.tool',
193
+ channel: 'mcp',
194
+ matcher: '(refund|credit)',
195
+ flags: 'i',
196
+ tool: 'support.refund',
197
+ title: 'Issue a refund or service credit',
198
+ description: 'Issue a refund or credit with MCP tool {toolName}',
199
+ zone: 'domestic',
200
+ riskLevel: 'medium',
201
+ route: 'generic',
202
+ },
203
+ ];
204
+ export const openClawPolicyGatewayRules = [
205
+ {
206
+ id: 'openclaw.browser.read',
207
+ channel: 'browser',
208
+ matcher: '^(status|profiles|tabs|snapshot|screenshot|console|network|pdf|inspect|open|focus|close)$',
209
+ flags: 'i',
210
+ tool: 'browser.read',
211
+ title: 'Inspect browser state',
212
+ description: 'Inspect browser state with OpenClaw browser action {browserAction}',
213
+ zone: 'oecd',
214
+ riskLevel: 'low',
215
+ route: 'generic',
216
+ },
217
+ {
218
+ id: 'openclaw.browser.mutate',
219
+ channel: 'browser',
220
+ matcher: '^(start|stop|navigate|back|forward|reload|click|double-click|type|fill|select|upload|drag|wait|evaluate|state|cookies|storage|action)$',
221
+ flags: 'i',
222
+ tool: 'browser.mutate',
223
+ title: 'Mutate browser state',
224
+ description: 'Mutate browser state with OpenClaw browser action {browserAction}',
225
+ zone: 'oecd',
226
+ riskLevel: 'medium',
227
+ route: 'enforced.openclaw.browser.mutate',
228
+ },
229
+ {
230
+ id: 'openclaw.agent.spawn',
231
+ channel: 'agent',
232
+ matcher: '^(sessions_spawn|spawn|subagent|run)$',
233
+ flags: 'i',
234
+ tool: 'agent.spawn',
235
+ title: 'Spawn a sub-agent session',
236
+ description: 'Spawn an OpenClaw sub-agent with message: {message}',
237
+ zone: 'domestic',
238
+ riskLevel: 'medium',
239
+ route: 'enforced.openclaw.agent.spawn',
240
+ },
241
+ {
242
+ id: 'openclaw.node.command',
243
+ channel: 'node',
244
+ matcher: '.+',
245
+ tool: 'node.command',
246
+ title: 'Run a node command',
247
+ description: 'Execute a node-host command: {command}',
248
+ zone: 'domestic',
249
+ riskLevel: 'medium',
250
+ route: 'generic',
251
+ },
252
+ {
253
+ id: 'openclaw.session.control',
254
+ channel: 'session',
255
+ matcher: '.+',
256
+ tool: 'session.control',
257
+ title: 'Control an OpenClaw session',
258
+ description: 'Control an OpenClaw session with operation: {operation}',
259
+ zone: 'domestic',
260
+ riskLevel: 'medium',
261
+ route: 'generic',
262
+ },
263
+ {
264
+ id: 'openclaw.shell.exec',
265
+ channel: 'shell',
266
+ matcher: '.+',
267
+ tool: 'shell.exec',
268
+ title: 'Execute a shell command',
269
+ description: 'Execute a shell command through OpenClaw: {command}',
270
+ zone: 'domestic',
271
+ riskLevel: 'medium',
272
+ route: 'enforced.openclaw.exec',
273
+ },
274
+ ];
275
+ export class MandateOsPolicyGateway {
276
+ constructor(options) {
277
+ this.options = options;
278
+ this.defaultMandateId = normalizeOptionalText(options.defaultMandateId);
279
+ this.defaultSource = normalizeOptionalText(options.defaultSource);
280
+ this.hostName = normalizeOptionalText(options.hostName) || 'policy-gateway';
281
+ this.unmatchedPermission = normalizePermission(options.unmatchedPermission, 'ask');
282
+ this.rules = options.rules.map(resolvePolicyGatewayRule);
283
+ }
284
+ async evaluateAttempt(input) {
285
+ const subject = input.subject.trim();
286
+ if (!subject) {
287
+ return {
288
+ permission: 'allow',
289
+ decision: 'local_allow',
290
+ };
291
+ }
292
+ const rule = this.findRule(input.channel, subject);
293
+ if (!rule) {
294
+ return this.createUnmatchedResult(input.channel, `No MandateOS policy rule matched the ${input.channel} subject: ${truncate(subject, 200)}. Add a custom rule or call MandateOS explicitly before continuing.`);
295
+ }
296
+ return this.evaluateMatchedAttempt({
297
+ channel: input.channel,
298
+ rule,
299
+ subject,
300
+ mandateId: input.mandateId,
301
+ source: input.source,
302
+ host: input.host,
303
+ details: input.details,
304
+ context: input.context || {},
305
+ });
306
+ }
307
+ createUnmatchedResult(channel, agentMessage) {
308
+ const permission = this.unmatchedPermission;
309
+ return {
310
+ permission,
311
+ decision: 'unmatched',
312
+ userMessage: permission === 'allow'
313
+ ? undefined
314
+ : 'MandateOS could not classify this action automatically.',
315
+ agentMessage: permission === 'allow'
316
+ ? undefined
317
+ : `${agentMessage} Configure a custom rule or use MandateOS explicitly.`,
318
+ };
319
+ }
320
+ findRule(channel, subject) {
321
+ return this.rules.find((rule) => rule.channel === channel && rule.pattern.test(subject));
322
+ }
323
+ async evaluateMatchedAttempt(input) {
324
+ const mandateId = normalizeOptionalText(input.mandateId) || this.defaultMandateId;
325
+ if (!mandateId) {
326
+ return {
327
+ permission: 'deny',
328
+ decision: 'misconfigured',
329
+ ruleId: input.rule.id,
330
+ route: input.rule.route || 'generic',
331
+ userMessage: 'MandateOS policy gateway is missing a mandate id and cannot evaluate this action.',
332
+ agentMessage: 'Configure MANDATE_OS_MCP_DEFAULT_MANDATE_ID or pass a mandate id into the policy gateway before retrying.',
333
+ };
334
+ }
335
+ const action = createActionScenario(input.rule, input.subject, input.context);
336
+ const evaluation = await this.options.client.evaluateActions({
337
+ mandateId,
338
+ source: normalizeOptionalText(input.source) ||
339
+ this.defaultSource ||
340
+ `${input.host || this.hostName}.${input.channel}`,
341
+ details: {
342
+ host: input.host || this.hostName,
343
+ channel: input.channel,
344
+ matchedRuleId: input.rule.id,
345
+ subject: truncate(input.subject, 500),
346
+ ...(input.details || {}),
347
+ },
348
+ actions: [action],
349
+ });
350
+ const receipt = evaluation.data.receipts[0];
351
+ if (!receipt) {
352
+ throw new Error('MandateOS policy gateway did not receive a receipt for the evaluated action.');
353
+ }
354
+ if (receipt.decision === 'allowed') {
355
+ if (input.rule.route && input.rule.route !== 'generic') {
356
+ const recommendedTool = recommendedToolForRoute(input.rule.route);
357
+ return {
358
+ permission: 'deny',
359
+ decision: 'redirect_enforced',
360
+ ruleId: input.rule.id,
361
+ route: input.rule.route,
362
+ action,
363
+ receipt,
364
+ evaluation: evaluation.data,
365
+ recommendedTool,
366
+ userMessage: 'Direct execution blocked. Use the MandateOS enforced execution tool instead.',
367
+ agentMessage: `MandateOS allowed this action but the direct path is blocked. Use ${recommendedTool} instead. Receipt ${receipt.id} was allowed for ${receipt.title}.`,
368
+ };
369
+ }
370
+ return {
371
+ permission: 'allow',
372
+ decision: 'policy_allowed',
373
+ ruleId: input.rule.id,
374
+ route: input.rule.route || 'generic',
375
+ action,
376
+ receipt,
377
+ evaluation: evaluation.data,
378
+ };
379
+ }
380
+ if (receipt.decision === 'approval') {
381
+ return {
382
+ permission: 'ask',
383
+ decision: 'policy_approval',
384
+ ruleId: input.rule.id,
385
+ route: input.rule.route || 'generic',
386
+ action,
387
+ receipt,
388
+ evaluation: evaluation.data,
389
+ userMessage: 'MandateOS requires approval for this action.',
390
+ agentMessage: `MandateOS returned approval for ${receipt.title}. Reasons: ${receipt.reasons.join(' ')}`,
391
+ };
392
+ }
393
+ return {
394
+ permission: 'deny',
395
+ decision: 'policy_blocked',
396
+ ruleId: input.rule.id,
397
+ route: input.rule.route || 'generic',
398
+ action,
399
+ receipt,
400
+ evaluation: evaluation.data,
401
+ userMessage: 'MandateOS blocked this action.',
402
+ agentMessage: `MandateOS blocked ${receipt.title}. Reasons: ${receipt.reasons.join(' ')}`,
403
+ };
404
+ }
405
+ }
406
+ export function parsePolicyGatewayRules(input) {
407
+ const rulesProperty = input && typeof input === 'object' && 'rules' in input
408
+ ? input.rules
409
+ : undefined;
410
+ const source = Array.isArray(input)
411
+ ? input
412
+ : Array.isArray(rulesProperty)
413
+ ? rulesProperty
414
+ : null;
415
+ if (!source) {
416
+ throw new Error('MandateOS policy rules must be a JSON array or an object with a rules array.');
417
+ }
418
+ return source.map((entry, index) => {
419
+ const rule = entry && typeof entry === 'object' && !Array.isArray(entry)
420
+ ? entry
421
+ : null;
422
+ if (!rule) {
423
+ throw new Error(`MandateOS policy rule at index ${index} must be an object.`);
424
+ }
425
+ const id = normalizeOptionalText(rule.id);
426
+ const channel = normalizeOptionalText(rule.channel);
427
+ const matcher = rule.matcher;
428
+ const flags = normalizeOptionalText(rule.flags) || undefined;
429
+ const tool = normalizeOptionalText(rule.tool);
430
+ const title = normalizeOptionalText(rule.title);
431
+ const description = normalizeOptionalText(rule.description);
432
+ const zone = normalizeOptionalText(rule.zone);
433
+ const riskLevel = normalizeOptionalText(rule.riskLevel);
434
+ const route = normalizeOptionalText(rule.route);
435
+ const amountNok = normalizeOptionalNumber(rule.amountNok);
436
+ const termMonths = normalizeOptionalNumber(rule.termMonths);
437
+ if (!id) {
438
+ throw new Error(`MandateOS policy rule at index ${index} is missing id.`);
439
+ }
440
+ if (!isPolicyGatewayChannel(channel)) {
441
+ throw new Error(`MandateOS policy rule ${id} has invalid channel ${String(rule.channel)}.`);
442
+ }
443
+ if (typeof matcher !== 'string') {
444
+ throw new Error(`MandateOS policy rule ${id} must use a string matcher when loaded from JSON.`);
445
+ }
446
+ if (!title) {
447
+ throw new Error(`MandateOS policy rule ${id} is missing title.`);
448
+ }
449
+ if (!description) {
450
+ throw new Error(`MandateOS policy rule ${id} is missing description.`);
451
+ }
452
+ if (!isToolId(tool)) {
453
+ throw new Error(`MandateOS policy rule ${id} has invalid tool.`);
454
+ }
455
+ if (!isZone(zone)) {
456
+ throw new Error(`MandateOS policy rule ${id} has invalid zone.`);
457
+ }
458
+ if (!isRiskLevel(riskLevel)) {
459
+ throw new Error(`MandateOS policy rule ${id} has invalid riskLevel.`);
460
+ }
461
+ if (route && !isPolicyGatewayRoute(route)) {
462
+ throw new Error(`MandateOS policy rule ${id} has invalid route.`);
463
+ }
464
+ return {
465
+ id,
466
+ channel,
467
+ matcher,
468
+ flags,
469
+ tool,
470
+ title,
471
+ description,
472
+ amountNok: amountNok ?? undefined,
473
+ termMonths: termMonths ?? undefined,
474
+ zone,
475
+ riskLevel,
476
+ route: route || 'generic',
477
+ };
478
+ });
479
+ }
480
+ export function normalizeMcpToolName(value) {
481
+ return value.trim().replace(/^MCP:/i, '').trim();
482
+ }
483
+ export function isMandateOsToolName(value) {
484
+ const normalized = normalizeMcpToolName(value).toLowerCase();
485
+ return (normalized.startsWith('mandateos_') ||
486
+ normalized.startsWith('mcp__mandateos__') ||
487
+ normalized.includes('__mandateos_'));
488
+ }
489
+ export function summarizeJson(value) {
490
+ if (value == null) {
491
+ return '';
492
+ }
493
+ try {
494
+ return truncate(JSON.stringify(value), 220);
495
+ }
496
+ catch {
497
+ return truncate(String(value), 220);
498
+ }
499
+ }
500
+ export function isReadOnlyShellCommand(command) {
501
+ return readOnlyShellPatterns.some((pattern) => pattern.test(command.trim()));
502
+ }
503
+ export function isPolicyGatewayChannel(value) {
504
+ return ['shell', 'mcp', 'browser', 'agent', 'node', 'session'].includes(value);
505
+ }
506
+ export function normalizePermission(value, fallback) {
507
+ return value === 'allow' || value === 'ask' || value === 'deny'
508
+ ? value
509
+ : fallback;
510
+ }
511
+ export function normalizeOptionalText(value) {
512
+ return typeof value === 'string' ? value.trim() : '';
513
+ }
514
+ export function normalizeOptionalNumber(value) {
515
+ if (typeof value === 'number' && Number.isFinite(value)) {
516
+ return Math.round(value);
517
+ }
518
+ if (typeof value === 'string' && value.trim().length > 0) {
519
+ const parsed = Number(value);
520
+ if (Number.isFinite(parsed)) {
521
+ return Math.round(parsed);
522
+ }
523
+ }
524
+ return undefined;
525
+ }
526
+ export function splitCommaSeparatedList(value) {
527
+ return value
528
+ .split(',')
529
+ .map((entry) => entry.trim())
530
+ .filter((entry) => entry.length > 0);
531
+ }
532
+ export function truncate(value, maxLength) {
533
+ return value.length <= maxLength
534
+ ? value
535
+ : `${value.slice(0, maxLength - 3)}...`;
536
+ }
537
+ function resolvePolicyGatewayRule(rule) {
538
+ return {
539
+ ...rule,
540
+ route: rule.route || 'generic',
541
+ pattern: rule.matcher instanceof RegExp
542
+ ? rule.matcher
543
+ : new RegExp(rule.matcher, rule.flags),
544
+ };
545
+ }
546
+ function createActionScenario(rule, subject, context) {
547
+ const token = createStableToken(`${rule.channel}:${rule.id}:${subject}`);
548
+ return {
549
+ id: truncate(`${rule.channel}.${rule.id}.${token}`, 120),
550
+ title: truncate(fillTemplate(rule.title, context), 160),
551
+ description: truncate(fillTemplate(rule.description, context), 1000),
552
+ tool: rule.tool,
553
+ amountNok: rule.amountNok ?? 0,
554
+ termMonths: rule.termMonths ?? 0,
555
+ zone: rule.zone,
556
+ riskLevel: rule.riskLevel,
557
+ receiptSuffix: token.slice(0, 10),
558
+ };
559
+ }
560
+ function fillTemplate(template, values) {
561
+ return template.replace(/\{([a-zA-Z0-9_]+)\}/g, (_match, key) => {
562
+ const value = values[key];
563
+ return typeof value === 'string'
564
+ ? truncate(value, 220)
565
+ : value == null
566
+ ? ''
567
+ : truncate(String(value), 220);
568
+ });
569
+ }
570
+ function createStableToken(value) {
571
+ return createHash('sha256').update(value).digest('hex').slice(0, 12);
572
+ }
573
+ //# sourceMappingURL=policy-gateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy-gateway.js","sourceRoot":"","sources":["../../../packages/mandate-os-sdk/src/policy-gateway.ts"],"names":[],"mappings":"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