@formigio/fazemos-cli 0.10.31 → 0.10.33
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/dist/governance.d.ts +29 -0
- package/dist/governance.js +406 -0
- package/dist/governance.js.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/wake.d.ts +39 -0
- package/dist/wake.js +304 -0
- package/dist/wake.js.map +1 -0
- package/package.json +1 -1
package/dist/wake.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* F36 — Inbox Auto-Wake: CLI command helpers.
|
|
3
|
+
*
|
|
4
|
+
* Exports `registerWakeCommands(program)` which wires the following commands
|
|
5
|
+
* into the root Commander program (mirrors the trigger group pattern):
|
|
6
|
+
*
|
|
7
|
+
* fazemos wake status [--json]
|
|
8
|
+
* → GET /api/control-plane/wake?project_id=<id>
|
|
9
|
+
* Reads the allow-listed (role, auto_wakeable, allow_listed, enabled)
|
|
10
|
+
* schedule + recent wake_fires (last 50 entries).
|
|
11
|
+
*
|
|
12
|
+
* fazemos wake disable --role <slug> --reason <text> [--until <iso>]
|
|
13
|
+
* → POST /api/control-plane/wake/disable { action: "disable", ... }
|
|
14
|
+
* Upserts a wake_disables row; timed (--until) or indefinite.
|
|
15
|
+
*
|
|
16
|
+
* fazemos wake enable --role <slug> --reason <text>
|
|
17
|
+
* → POST /api/control-plane/wake/disable { action: "enable", ... }
|
|
18
|
+
* Deletes the wake_disables row (re-enables auto-wake for that role).
|
|
19
|
+
*
|
|
20
|
+
* Auth: disable/enable require admin/owner (same as trigger/disable).
|
|
21
|
+
* status requires any active org member.
|
|
22
|
+
* Scope: project-scoped reads (project_id query param); writes are org+project.
|
|
23
|
+
*
|
|
24
|
+
* Spec: F36-inbox-auto-wake-tech-spec.md
|
|
25
|
+
* Manifest: cli_commands (fazemos wake status/disable/enable)
|
|
26
|
+
*
|
|
27
|
+
* Key differences from trigger.ts:
|
|
28
|
+
* - NO cadence dimension (wake_disables is UNIQUE(org_id, role), no cadence)
|
|
29
|
+
* - No fire-now command (wake fires are event-driven, not manually re-driveable v1)
|
|
30
|
+
* - Response shape: schedule has auto_wakeable + allow_listed fields
|
|
31
|
+
* - Endpoint: /api/control-plane/wake and /api/control-plane/wake/disable
|
|
32
|
+
*/
|
|
33
|
+
import type { Command } from 'commander';
|
|
34
|
+
/**
|
|
35
|
+
* Register `wake status`, `wake disable`, and `wake enable` into the root
|
|
36
|
+
* Commander program. Called from index.ts after `program` is created, alongside
|
|
37
|
+
* registerPauseCommands, registerBudgetCommands, and registerTriggerCommands.
|
|
38
|
+
*/
|
|
39
|
+
export declare function registerWakeCommands(program: Command): void;
|
package/dist/wake.js
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* F36 — Inbox Auto-Wake: CLI command helpers.
|
|
3
|
+
*
|
|
4
|
+
* Exports `registerWakeCommands(program)` which wires the following commands
|
|
5
|
+
* into the root Commander program (mirrors the trigger group pattern):
|
|
6
|
+
*
|
|
7
|
+
* fazemos wake status [--json]
|
|
8
|
+
* → GET /api/control-plane/wake?project_id=<id>
|
|
9
|
+
* Reads the allow-listed (role, auto_wakeable, allow_listed, enabled)
|
|
10
|
+
* schedule + recent wake_fires (last 50 entries).
|
|
11
|
+
*
|
|
12
|
+
* fazemos wake disable --role <slug> --reason <text> [--until <iso>]
|
|
13
|
+
* → POST /api/control-plane/wake/disable { action: "disable", ... }
|
|
14
|
+
* Upserts a wake_disables row; timed (--until) or indefinite.
|
|
15
|
+
*
|
|
16
|
+
* fazemos wake enable --role <slug> --reason <text>
|
|
17
|
+
* → POST /api/control-plane/wake/disable { action: "enable", ... }
|
|
18
|
+
* Deletes the wake_disables row (re-enables auto-wake for that role).
|
|
19
|
+
*
|
|
20
|
+
* Auth: disable/enable require admin/owner (same as trigger/disable).
|
|
21
|
+
* status requires any active org member.
|
|
22
|
+
* Scope: project-scoped reads (project_id query param); writes are org+project.
|
|
23
|
+
*
|
|
24
|
+
* Spec: F36-inbox-auto-wake-tech-spec.md
|
|
25
|
+
* Manifest: cli_commands (fazemos wake status/disable/enable)
|
|
26
|
+
*
|
|
27
|
+
* Key differences from trigger.ts:
|
|
28
|
+
* - NO cadence dimension (wake_disables is UNIQUE(org_id, role), no cadence)
|
|
29
|
+
* - No fire-now command (wake fires are event-driven, not manually re-driveable v1)
|
|
30
|
+
* - Response shape: schedule has auto_wakeable + allow_listed fields
|
|
31
|
+
* - Endpoint: /api/control-plane/wake and /api/control-plane/wake/disable
|
|
32
|
+
*/
|
|
33
|
+
import chalk from 'chalk';
|
|
34
|
+
import { api } from './api.js';
|
|
35
|
+
import { getActiveProjectId } from './config.js';
|
|
36
|
+
// ── Helpers ────────────────────────────────────────────────────────────────────
|
|
37
|
+
/**
|
|
38
|
+
* Validate an ISO 8601 timestamp string (used for --until on disable).
|
|
39
|
+
* The API is strict — malformed timestamps produce a 400.
|
|
40
|
+
*/
|
|
41
|
+
function validateIsoTimestamp(value) {
|
|
42
|
+
const d = new Date(value);
|
|
43
|
+
if (isNaN(d.getTime())) {
|
|
44
|
+
throw new Error(`--until must be a valid ISO 8601 timestamp (e.g. 2026-12-31T23:59:59Z), got: ${value}`);
|
|
45
|
+
}
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Human-readable fire_status label with colour.
|
|
50
|
+
*/
|
|
51
|
+
function fireStatusLabel(status) {
|
|
52
|
+
switch (status) {
|
|
53
|
+
case 'fired':
|
|
54
|
+
return chalk.green(status);
|
|
55
|
+
case 'failed':
|
|
56
|
+
return chalk.red(status);
|
|
57
|
+
case 'claimed':
|
|
58
|
+
return chalk.cyan(status);
|
|
59
|
+
case 'suppressed':
|
|
60
|
+
return chalk.yellow(status);
|
|
61
|
+
default:
|
|
62
|
+
return chalk.dim(status);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// ── Command registration ───────────────────────────────────────────────────────
|
|
66
|
+
/**
|
|
67
|
+
* Register `wake status`, `wake disable`, and `wake enable` into the root
|
|
68
|
+
* Commander program. Called from index.ts after `program` is created, alongside
|
|
69
|
+
* registerPauseCommands, registerBudgetCommands, and registerTriggerCommands.
|
|
70
|
+
*/
|
|
71
|
+
export function registerWakeCommands(program) {
|
|
72
|
+
// ── `fazemos wake` ───────────────────────────────────────────────────────────
|
|
73
|
+
//
|
|
74
|
+
// Parent command hosting sub-commands: status, disable, enable.
|
|
75
|
+
// The parent itself has no action (sub-commands always required).
|
|
76
|
+
const wakeCmd = program
|
|
77
|
+
.command('wake')
|
|
78
|
+
.description('Inspect and operate the inbox auto-wake control plane (AUTONOMY Phase 2).\n\n' +
|
|
79
|
+
'Sub-commands:\n' +
|
|
80
|
+
' status Show wake schedule + recent fire history (last 50 entries)\n' +
|
|
81
|
+
' disable Disable auto-wake for a role (timed or indefinite) (admin/owner)\n' +
|
|
82
|
+
' enable Re-enable a previously disabled auto-wake role (admin/owner)\n\n' +
|
|
83
|
+
'status is readable by any active org member.\n' +
|
|
84
|
+
'disable/enable require admin or owner role.\n' +
|
|
85
|
+
'All operations are project-scoped (uses active project or --project override).\n\n' +
|
|
86
|
+
'Auto-wake fires automatically when an eligible task dispatch arrives for an\n' +
|
|
87
|
+
'allow-listed, auto-wakeable role. Use `wake status` to see the live state\n' +
|
|
88
|
+
'and `wake disable` to pause a role\'s auto-wake (its dispatches still land\n' +
|
|
89
|
+
'in the inbox; auto-launch is suppressed until you `wake enable` it).');
|
|
90
|
+
// ── `fazemos wake status` ─────────────────────────────────────────────────────
|
|
91
|
+
//
|
|
92
|
+
// GET /api/control-plane/wake?project_id=<id>
|
|
93
|
+
//
|
|
94
|
+
// schedule: role, auto_wakeable, allow_listed, enabled (operator disable state).
|
|
95
|
+
// fires: last 50 wake_fires (dispatch_id, role, fire_status, suppress_code,
|
|
96
|
+
// claimed_at, fired_at).
|
|
97
|
+
//
|
|
98
|
+
// Usage:
|
|
99
|
+
// fazemos wake status
|
|
100
|
+
// fazemos wake status --json
|
|
101
|
+
wakeCmd
|
|
102
|
+
.command('status')
|
|
103
|
+
.description('Show inbox auto-wake schedule and recent fire history for the active project.\n\n' +
|
|
104
|
+
'Prints the configured role schedule alongside the last 50 wake fire records.\n\n' +
|
|
105
|
+
'Schedule fields:\n' +
|
|
106
|
+
' auto_wakeable — role is eligible for auto-wake (AUTO_WAKEABLE_ROLES env)\n' +
|
|
107
|
+
' allow_listed — role is in the wake allow-list (WAKE_ALLOWLIST env)\n' +
|
|
108
|
+
' enabled — no operator disable currently in effect\n\n' +
|
|
109
|
+
'fire_status values:\n' +
|
|
110
|
+
' claimed — wake claimed; launch in progress\n' +
|
|
111
|
+
' fired — dispatch/execution successfully created\n' +
|
|
112
|
+
' failed — wake failed; will retry on next eligible dispatch\n' +
|
|
113
|
+
' suppressed — canLaunch gate refused (org paused, budget, or fan-out cap)\n\n' +
|
|
114
|
+
'Readable by any active org member. Use --json for machine-readable output.')
|
|
115
|
+
.option('--json', 'output machine-readable JSON')
|
|
116
|
+
.action(async (opts) => {
|
|
117
|
+
try {
|
|
118
|
+
const projectId = getActiveProjectId();
|
|
119
|
+
if (!projectId) {
|
|
120
|
+
throw new Error('No active project. Run `fazemos projects switch <slug>` first.');
|
|
121
|
+
}
|
|
122
|
+
const data = await api('GET', `/api/control-plane/wake?project_id=${encodeURIComponent(projectId)}`, undefined, { noProjectHeader: true });
|
|
123
|
+
if (opts.json) {
|
|
124
|
+
console.log(JSON.stringify(data, null, 2));
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const { schedule, fires } = data;
|
|
128
|
+
// ── Schedule ──────────────────────────────────────────────────────────
|
|
129
|
+
if (schedule.length === 0) {
|
|
130
|
+
console.log(chalk.yellow('No wake schedule configured (WAKE_ALLOWLIST is empty or not set).'));
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
console.log(chalk.bold(`Wake schedule (${schedule.length} entries):`));
|
|
134
|
+
console.log();
|
|
135
|
+
for (const entry of schedule) {
|
|
136
|
+
const enabledLabel = entry.enabled
|
|
137
|
+
? chalk.green('enabled')
|
|
138
|
+
: chalk.red('disabled');
|
|
139
|
+
const autoWakeLabel = entry.auto_wakeable
|
|
140
|
+
? chalk.green('auto-wakeable')
|
|
141
|
+
: chalk.dim('not auto-wakeable');
|
|
142
|
+
const allowListLabel = entry.allow_listed
|
|
143
|
+
? chalk.cyan('allow-listed')
|
|
144
|
+
: chalk.dim('not allow-listed');
|
|
145
|
+
console.log(` ${chalk.cyan(entry.role.padEnd(32))} ${enabledLabel}`);
|
|
146
|
+
console.log(` ${autoWakeLabel} ${allowListLabel}`);
|
|
147
|
+
}
|
|
148
|
+
console.log();
|
|
149
|
+
}
|
|
150
|
+
// ── Recent fires ──────────────────────────────────────────────────────
|
|
151
|
+
if (fires.length === 0) {
|
|
152
|
+
console.log(chalk.dim('No recent wake fires.'));
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
console.log(chalk.bold(`Recent wake fires (${fires.length}):`));
|
|
156
|
+
console.log();
|
|
157
|
+
for (const fire of fires) {
|
|
158
|
+
const statusLabel = fireStatusLabel(fire.fire_status);
|
|
159
|
+
console.log(` ${chalk.cyan(fire.role.padEnd(32))} ${statusLabel}`);
|
|
160
|
+
if (fire.suppress_code) {
|
|
161
|
+
console.log(` suppressed: ${chalk.yellow(fire.suppress_code)}`);
|
|
162
|
+
}
|
|
163
|
+
console.log(` claimed: ${new Date(fire.claimed_at).toLocaleString()}`);
|
|
164
|
+
if (fire.fired_at) {
|
|
165
|
+
console.log(` fired: ${new Date(fire.fired_at).toLocaleString()}`);
|
|
166
|
+
}
|
|
167
|
+
console.log(` dispatch_id: ${chalk.dim(fire.dispatch_id)}`);
|
|
168
|
+
console.log(` id: ${chalk.dim(fire.id)}`);
|
|
169
|
+
console.log();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch (err) {
|
|
173
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
174
|
+
console.error(chalk.red(`Error: ${msg}`));
|
|
175
|
+
process.exit(1);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
// ── `fazemos wake disable` ────────────────────────────────────────────────────
|
|
179
|
+
//
|
|
180
|
+
// POST /api/control-plane/wake/disable { action: "disable", ... }
|
|
181
|
+
//
|
|
182
|
+
// Upserts a wake_disables row the evaluateAndWake predicate consults.
|
|
183
|
+
// Active disable → isWakeDisabled=true → no claim, no launch, still inbox-lands.
|
|
184
|
+
// --until <iso>: timed disable; omit for indefinite until `fazemos wake enable`.
|
|
185
|
+
//
|
|
186
|
+
// Note: NO --cadence flag (wake_disables is org-wide per role; no cadence dim).
|
|
187
|
+
//
|
|
188
|
+
// Usage:
|
|
189
|
+
// fazemos wake disable --role project-manager --reason "Pausing during Q4 planning"
|
|
190
|
+
// fazemos wake disable --role project-manager --until 2026-12-31T23:59:59Z --reason "Q4 planning"
|
|
191
|
+
wakeCmd
|
|
192
|
+
.command('disable')
|
|
193
|
+
.description('Disable auto-wake for a role (admin/owner only).\n\n' +
|
|
194
|
+
'Upserts a disable record for the given role. While disabled, eligible\n' +
|
|
195
|
+
'dispatches still land in the role\'s inbox but do NOT auto-launch a wake\n' +
|
|
196
|
+
'execution — the inbox must be drained manually or re-enabled.\n\n' +
|
|
197
|
+
' (no --until) Indefinite disable — remains until `fazemos wake enable`\n' +
|
|
198
|
+
' --until <iso> Timed disable — auto-expires at the given UTC timestamp\n\n' +
|
|
199
|
+
'Requires admin or owner role. --reason is mandatory (audit trail).')
|
|
200
|
+
.requiredOption('--role <slug>', 'role slug to disable (e.g. project-manager)')
|
|
201
|
+
.requiredOption('--reason <text>', 'reason for the disable (required for audit trail)')
|
|
202
|
+
.option('--until <iso>', 'ISO 8601 timestamp when the disable expires (omit for indefinite)')
|
|
203
|
+
.option('--json', 'output machine-readable JSON')
|
|
204
|
+
.action(async (opts) => {
|
|
205
|
+
try {
|
|
206
|
+
const projectId = getActiveProjectId();
|
|
207
|
+
if (!projectId) {
|
|
208
|
+
throw new Error('No active project. Run `fazemos projects switch <slug>` first.');
|
|
209
|
+
}
|
|
210
|
+
const body = {
|
|
211
|
+
action: 'disable',
|
|
212
|
+
project_id: projectId,
|
|
213
|
+
role: opts.role.trim().toLowerCase(),
|
|
214
|
+
reason: opts.reason,
|
|
215
|
+
};
|
|
216
|
+
if (opts.until !== undefined) {
|
|
217
|
+
body.until = validateIsoTimestamp(opts.until);
|
|
218
|
+
}
|
|
219
|
+
const data = await api('POST', '/api/control-plane/wake/disable', body, {
|
|
220
|
+
noProjectHeader: true,
|
|
221
|
+
});
|
|
222
|
+
if (opts.json) {
|
|
223
|
+
console.log(JSON.stringify(data, null, 2));
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (data.disabled) {
|
|
227
|
+
console.log(chalk.red(`⏸ Auto-wake disabled: ${chalk.cyan(opts.role.trim().toLowerCase())}`));
|
|
228
|
+
if (opts.until) {
|
|
229
|
+
console.log(` Expires at: ${new Date(opts.until).toLocaleString()}`);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
console.log(` Duration: indefinite (run \`fazemos wake enable\` to re-enable)`);
|
|
233
|
+
}
|
|
234
|
+
console.log(` Reason: ${opts.reason}`);
|
|
235
|
+
console.log();
|
|
236
|
+
console.log(chalk.dim(' Dispatches to this role still land in its inbox.'));
|
|
237
|
+
console.log(chalk.dim(' Auto-launch is suppressed until re-enabled.'));
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
console.log(chalk.yellow(`No change — auto-wake was already disabled for ${opts.role}.`));
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
catch (err) {
|
|
244
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
245
|
+
console.error(chalk.red(`Error: ${msg}`));
|
|
246
|
+
process.exit(1);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
// ── `fazemos wake enable` ─────────────────────────────────────────────────────
|
|
250
|
+
//
|
|
251
|
+
// POST /api/control-plane/wake/disable { action: "enable", ... }
|
|
252
|
+
//
|
|
253
|
+
// Deletes the wake_disables row (re-enables auto-wake for that role).
|
|
254
|
+
// After enable: the next eligible task dispatch to this role auto-launches.
|
|
255
|
+
//
|
|
256
|
+
// Note: NO --cadence flag (wake_disables has no cadence dimension).
|
|
257
|
+
//
|
|
258
|
+
// Usage:
|
|
259
|
+
// fazemos wake enable --role project-manager --reason "Re-enabling after Q4"
|
|
260
|
+
wakeCmd
|
|
261
|
+
.command('enable')
|
|
262
|
+
.description('Re-enable auto-wake for a previously disabled role (admin/owner only).\n\n' +
|
|
263
|
+
'Deletes the disable record for the given role, allowing the next eligible\n' +
|
|
264
|
+
'task dispatch to auto-launch a wake execution.\n\n' +
|
|
265
|
+
'Requires admin or owner role. --reason is mandatory (audit trail).')
|
|
266
|
+
.requiredOption('--role <slug>', 'role slug to enable (e.g. project-manager)')
|
|
267
|
+
.requiredOption('--reason <text>', 'reason for re-enabling (required for audit trail)')
|
|
268
|
+
.option('--json', 'output machine-readable JSON')
|
|
269
|
+
.action(async (opts) => {
|
|
270
|
+
try {
|
|
271
|
+
const projectId = getActiveProjectId();
|
|
272
|
+
if (!projectId) {
|
|
273
|
+
throw new Error('No active project. Run `fazemos projects switch <slug>` first.');
|
|
274
|
+
}
|
|
275
|
+
const body = {
|
|
276
|
+
action: 'enable',
|
|
277
|
+
project_id: projectId,
|
|
278
|
+
role: opts.role.trim().toLowerCase(),
|
|
279
|
+
reason: opts.reason,
|
|
280
|
+
};
|
|
281
|
+
const data = await api('POST', '/api/control-plane/wake/disable', body, {
|
|
282
|
+
noProjectHeader: true,
|
|
283
|
+
});
|
|
284
|
+
if (opts.json) {
|
|
285
|
+
console.log(JSON.stringify(data, null, 2));
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
if (data.enabled) {
|
|
289
|
+
console.log(chalk.green(`▶ Auto-wake enabled: ${chalk.cyan(opts.role.trim().toLowerCase())}`));
|
|
290
|
+
console.log(` Reason: ${opts.reason}`);
|
|
291
|
+
console.log(` The next eligible task dispatch to this role will auto-launch a wake execution.`);
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
console.log(chalk.dim(`No-op — auto-wake was not disabled for ${opts.role}.`));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
catch (err) {
|
|
298
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
299
|
+
console.error(chalk.red(`Error: ${msg}`));
|
|
300
|
+
process.exit(1);
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=wake.js.map
|
package/dist/wake.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wake.js","sourceRoot":"","sources":["../src/wake.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA4BjD,kFAAkF;AAElF;;;GAGG;AACH,SAAS,oBAAoB,CAAC,KAAa;IACzC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,IAAI,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,gFAAgF,KAAK,EAAE,CACxF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,MAAc;IACrC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,KAAK,SAAS;YACZ,OAAO,KAAK,C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