@clossys/butler 0.1.1

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 (54) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/LICENSE +21 -0
  3. package/README.md +260 -0
  4. package/dist/audit-shape.check.d.ts +32 -0
  5. package/dist/audit-shape.check.d.ts.map +1 -0
  6. package/dist/audit-shape.check.js +7 -0
  7. package/dist/audit-shape.check.js.map +1 -0
  8. package/dist/cli.d.ts +54 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +426 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/contract.d.ts +256 -0
  13. package/dist/contract.d.ts.map +1 -0
  14. package/dist/contract.js +377 -0
  15. package/dist/contract.js.map +1 -0
  16. package/dist/inbound/index.d.ts +120 -0
  17. package/dist/inbound/index.d.ts.map +1 -0
  18. package/dist/inbound/index.js +125 -0
  19. package/dist/inbound/index.js.map +1 -0
  20. package/dist/index.d.ts +50 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +47 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/schema.d.ts +374 -0
  25. package/dist/schema.d.ts.map +1 -0
  26. package/dist/schema.js +304 -0
  27. package/dist/schema.js.map +1 -0
  28. package/dist/validation.d.ts +74 -0
  29. package/dist/validation.d.ts.map +1 -0
  30. package/dist/validation.js +140 -0
  31. package/dist/validation.js.map +1 -0
  32. package/dist/web/index.d.ts +5 -0
  33. package/dist/web/index.d.ts.map +1 -0
  34. package/dist/web/index.js +25 -0
  35. package/dist/web/index.js.map +1 -0
  36. package/dist/web/internal/peer-version.d.ts +53 -0
  37. package/dist/web/internal/peer-version.d.ts.map +1 -0
  38. package/dist/web/internal/peer-version.js +136 -0
  39. package/dist/web/internal/peer-version.js.map +1 -0
  40. package/dist/web/useStandingWants.d.ts +75 -0
  41. package/dist/web/useStandingWants.d.ts.map +1 -0
  42. package/dist/web/useStandingWants.js +66 -0
  43. package/dist/web/useStandingWants.js.map +1 -0
  44. package/package.json +93 -0
  45. package/src/audit-shape.check.ts +37 -0
  46. package/src/cli.ts +445 -0
  47. package/src/contract.ts +534 -0
  48. package/src/inbound/index.ts +190 -0
  49. package/src/index.ts +113 -0
  50. package/src/schema.ts +622 -0
  51. package/src/validation.ts +172 -0
  52. package/src/web/index.ts +27 -0
  53. package/src/web/internal/peer-version.ts +159 -0
  54. package/src/web/useStandingWants.ts +139 -0
package/dist/cli.js ADDED
@@ -0,0 +1,426 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * `butler-check` — one bin, three gates, dispatched on `argv[0]` matching a
4
+ * subcommand name EXACTLY.
5
+ *
6
+ * Dispatch is on `argv[0]`, never on `basename(process.argv[1])`. A bin-name
7
+ * dispatch would see `cli.js` wherever this gate is invoked by its compiled
8
+ * path — which is exactly how this repository's own `npm run check` invokes
9
+ * other packages' gates — and would silently run the wrong command, or none.
10
+ *
11
+ * Presentation only: parse argv, load JSON files, run the pure checkers in
12
+ * `contract.ts`, print a report, pick an exit code. Every decision worth
13
+ * testing lives in `contract.ts` and is tested there directly, against
14
+ * plain values, with no filesystem involved.
15
+ *
16
+ * EXIT CODES — the contract a consumer's CI depends on (this repository's
17
+ * own contribution guide, "Gate CLIs exit `0` clean, `1` findings, `2`
18
+ * could not run"):
19
+ *
20
+ * 0 — ran cleanly against a non-empty record set and found nothing.
21
+ * 1 — ran cleanly and found at least one real violation.
22
+ * 2 — could not run. Kept strictly distinct from `1`, because "I checked
23
+ * and it is fine" and "I never checked" are different answers and a
24
+ * gate that reports the second as the first is worse than no gate.
25
+ *
26
+ * `2` is genuinely reachable here, on every subcommand, and each route is
27
+ * tested:
28
+ * - a record store that cannot be read — missing file, unreadable file,
29
+ * a directory where a file was named, invalid JSON, or JSON that does
30
+ * not validate against this package's own schema;
31
+ * - nothing to scan — an empty record set, which is not a clean run, it
32
+ * is a run that examined nothing;
33
+ * - a required declared value that was not supplied — the confidence
34
+ * floor, or the denial-invalidation policy. Neither has a default
35
+ * anywhere in this package, and a run missing one declines rather than
36
+ * inventing one of the consumer's own values;
37
+ * - NO GATE SELECTED AT ALL. A bare `butler-check` with no subcommand is
38
+ * a run that never happened, and it exits `2`, not `0` — see `main()`'s
39
+ * own comment for why an explicitly requested `--help` is the one
40
+ * argument-shaped `0` here and a dropped argument is not.
41
+ */
42
+ import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
43
+ import { resolve } from "node:path";
44
+ import { fileURLToPath } from "node:url";
45
+ import { checkConfirmationCompleteness, checkCurrency, checkWithdrawalParity, } from "./contract.js";
46
+ import { validateConfirmationRecords, validateInstructionUsages, validateIntentRecords, validatePreferencePaths, validateStandingInstructions, } from "./schema.js";
47
+ const USAGE = `Usage: butler-check <gate> [arguments]
48
+
49
+ Gates:
50
+ confirmation-completeness <intents-file> <confirmations-file> --floor <0..1>
51
+ Fails when an acted-on intent has no confirmation record, when it was
52
+ acted on against a "misread" or "unclear" read-back, or when a reading
53
+ below the declared floor was acted on with no explicit hand-off.
54
+
55
+ currency <instructions-file> <usages-file> --invalidate-denial-on-policy-bump <true|false>
56
+ Fails when a standing instruction was relied on past its own declared
57
+ window, after the policy version it answered was superseded, or while
58
+ there was no answer on record at all.
59
+
60
+ withdrawal-parity <paths-file>
61
+ Fails when withdrawing takes more steps than granting, demands a
62
+ contact or an account granting did not, or is not offered at all.
63
+
64
+ Options:
65
+ --help Print this message and exit 0. Also available per gate.
66
+
67
+ Exit codes: 0 = clean, 1 = at least one finding, 2 = could not run (bad
68
+ arguments, a missing/unreadable/unparseable/invalid file, an empty record
69
+ set, or a required declared value that was not supplied).
70
+ `;
71
+ const CONFIRMATION_USAGE = `Usage: butler-check confirmation-completeness <intents-file> <confirmations-file> --floor <0..1>
72
+
73
+ intents-file JSON array of IntentRecord objects. Required.
74
+ confirmations-file JSON array of ConfirmationRecord objects. Required. May be an empty array — an empty CONFIRMATION set is a real, checkable state (every acted-on intent is then unconfirmed); an empty INTENT set is not, and exits 2.
75
+ --floor <0..1> The declared confidence floor. Required, with no default: the number below which a reading is too weak to act on is one of the consumer's own values, and this gate will not invent one.
76
+
77
+ Exit codes: 0 = every acted-on intent is accounted for, 1 = at least one is not, 2 = could not run.
78
+ `;
79
+ const CURRENCY_USAGE = `Usage: butler-check currency <instructions-file> <usages-file> --invalidate-denial-on-policy-bump <true|false>
80
+
81
+ instructions-file JSON array of StandingInstruction objects. Required.
82
+ usages-file JSON array of InstructionUsage objects — one entry per occasion an instruction was actually relied on. Required.
83
+ --invalidate-denial-on-policy-bump <true|false>
84
+ Whether a policy-version bump also invalidates a stored denial. Required, with no default in either direction: that is a jurisdiction judgment this package does not make.
85
+
86
+ Exit codes: 0 = every usage relied on a current answer, 1 = at least one did not, 2 = could not run.
87
+ `;
88
+ const WITHDRAWAL_USAGE = `Usage: butler-check withdrawal-parity <paths-file>
89
+
90
+ paths-file JSON array of PreferencePath objects: for one surface and one topic, the measured cost of the grant route and of the withdraw route. Required.
91
+
92
+ Exit codes: 0 = withdrawing is no harder than granting anywhere, 1 = somewhere it is, 2 = could not run.
93
+ `;
94
+ const GATES = ["confirmation-completeness", "currency", "withdrawal-parity"];
95
+ /** Exported for `cli.test.ts` — anything wrong with the arguments themselves always maps to exit code 2, never 1. */
96
+ export class CliInputError extends Error {
97
+ }
98
+ /**
99
+ * One argv parser for all three gates. `--name value` and `--name=value`
100
+ * are both accepted; an unknown flag is a `CliInputError`, never a silently
101
+ * ignored argument — a typo in a flag that carries a required declared
102
+ * value must not read as that value being absent by choice.
103
+ */
104
+ function parseArgs(argv, knownOptions) {
105
+ const positional = [];
106
+ const options = new Map();
107
+ let help = false;
108
+ for (let i = 0; i < argv.length; i++) {
109
+ const arg = argv[i];
110
+ if (arg === "--help" || arg === "-h") {
111
+ help = true;
112
+ continue;
113
+ }
114
+ if (!arg.startsWith("-")) {
115
+ positional.push(arg);
116
+ continue;
117
+ }
118
+ const equals = arg.indexOf("=");
119
+ const name = equals === -1 ? arg : arg.slice(0, equals);
120
+ if (!knownOptions.includes(name))
121
+ throw new CliInputError(`unknown flag "${name}"`);
122
+ if (equals !== -1) {
123
+ options.set(name, arg.slice(equals + 1));
124
+ continue;
125
+ }
126
+ const next = argv[i + 1];
127
+ if (next === undefined || next.startsWith("-"))
128
+ throw new CliInputError(`flag "${name}" requires a value`);
129
+ options.set(name, next);
130
+ i++;
131
+ }
132
+ return { positional, options, help };
133
+ }
134
+ /**
135
+ * Why this record store cannot be read, or `undefined` if it can be.
136
+ *
137
+ * Deliberately NOT a `CliInputError`. A malformed argument is the caller's
138
+ * mistake and belongs with the other argv errors; a record store that is
139
+ * missing, unreadable, or is a directory where a file was named is the
140
+ * store's condition, and it is exactly the "could not run" state this
141
+ * gate's `2` exists for. Reporting it through the normal return path
142
+ * rather than an exception is what lets `main()` itself be observed
143
+ * returning `2` for it — a decline path nothing ever exercises is a
144
+ * decline path nobody knows works.
145
+ */
146
+ function fileProblem(label, path) {
147
+ if (!existsSync(path))
148
+ return `${label} "${path}" does not exist`;
149
+ let stat;
150
+ try {
151
+ stat = statSync(path);
152
+ }
153
+ catch (error) {
154
+ return `cannot stat ${label} "${path}": ${error instanceof Error ? error.message : String(error)}`;
155
+ }
156
+ if (!stat.isFile())
157
+ return `${label} "${path}" is not a file`;
158
+ return undefined;
159
+ }
160
+ /**
161
+ * Reads and JSON-parses a file, never throwing: an I/O failure or a syntax
162
+ * error comes back as `{ ok: false, detail }`. This CLI is the only place
163
+ * in this package that reads anything off disk — every checker in
164
+ * `contract.ts` is pure.
165
+ */
166
+ function readJsonFile(label, path) {
167
+ let raw;
168
+ try {
169
+ raw = readFileSync(path, "utf8");
170
+ }
171
+ catch (error) {
172
+ return { ok: false, detail: `cannot read ${label} "${path}": ${error instanceof Error ? error.message : String(error)}` };
173
+ }
174
+ try {
175
+ return { ok: true, value: JSON.parse(raw) };
176
+ }
177
+ catch (error) {
178
+ return { ok: false, detail: `${label} "${path}" is not valid JSON: ${error instanceof Error ? error.message : String(error)}` };
179
+ }
180
+ }
181
+ /**
182
+ * Load one record file and validate it against this package's own schema.
183
+ * Returns the records, or `undefined` having already printed why — a file
184
+ * that is missing, unreadable, unparseable, or schema-invalid never
185
+ * reaches a checker at all: it is "could not run", decided here.
186
+ */
187
+ function loadRecords(label, path, validate) {
188
+ const problem = fileProblem(label, path);
189
+ if (problem !== undefined) {
190
+ console.error(`\n${label} could not be loaded: ${problem}`);
191
+ console.error("Refusing to report a pass against a record store that could not be read.");
192
+ return undefined;
193
+ }
194
+ const json = readJsonFile(label, path);
195
+ if (!json.ok) {
196
+ console.error(`\n${label} could not be loaded: ${json.detail}`);
197
+ console.error("Refusing to report a pass against a record store that could not be read.");
198
+ return undefined;
199
+ }
200
+ const shape = validate(json.value);
201
+ if (!shape.ok) {
202
+ console.error(`\n${label} "${path}" did not validate:`);
203
+ for (const issue of shape.issues)
204
+ console.error(` ${issue.path}: ${issue.message}`);
205
+ console.error("Refusing to report a pass against records this package cannot trust.");
206
+ return undefined;
207
+ }
208
+ return shape.value;
209
+ }
210
+ /** `--floor 0.8`. No default: a missing or unparseable floor is a decline, never an assumed number. */
211
+ function parseFloor(raw) {
212
+ if (raw === undefined)
213
+ throw new CliInputError("--floor is required; this gate has no default confidence floor");
214
+ const value = Number(raw);
215
+ if (!Number.isFinite(value) || value < 0 || value > 1) {
216
+ throw new CliInputError(`--floor must be a number between 0 and 1 inclusive, got "${raw}"`);
217
+ }
218
+ return value;
219
+ }
220
+ /** Exactly `true` or `false`. No default in either direction, and no truthiness: "yes", "1" and "" are all input errors. */
221
+ function parseBooleanFlag(name, raw) {
222
+ if (raw === undefined)
223
+ throw new CliInputError(`${name} is required; this gate has no default in either direction`);
224
+ if (raw === "true")
225
+ return true;
226
+ if (raw === "false")
227
+ return false;
228
+ throw new CliInputError(`${name} must be exactly "true" or "false", got "${raw}"`);
229
+ }
230
+ function printConfirmationReport(result) {
231
+ console.log(`${result.intentsChecked} intent(s) checked against ${result.confirmationsChecked} confirmation(s), floor ${result.floorApplied}.`);
232
+ for (const finding of result.findings) {
233
+ console.log(` [${finding.kind}] ${finding.intentId}${finding.actorId ? ` (actor ${finding.actorId})` : ""} — ${finding.message}`);
234
+ }
235
+ if (result.ok)
236
+ console.log("Confirmation completeness: satisfied.");
237
+ else if (result.reason === "unconfirmed-intents")
238
+ console.log("Confirmation completeness: violated.");
239
+ else
240
+ console.log(`Confirmation completeness: indeterminate (${result.reason}).`);
241
+ }
242
+ function printCurrencyReport(result) {
243
+ console.log(`${result.instructionsChecked} standing instruction(s) checked against ${result.usagesChecked} usage(s).`);
244
+ for (const finding of result.findings) {
245
+ console.log(` [${finding.kind}] ${finding.instructionId} (actor ${finding.actorId}, used ${finding.usedAt}) — ${finding.message}`);
246
+ }
247
+ if (result.ok)
248
+ console.log("Currency: satisfied.");
249
+ else if (result.reason === "stale-instructions-used")
250
+ console.log("Currency: violated.");
251
+ else
252
+ console.log(`Currency: indeterminate (${result.reason}).`);
253
+ }
254
+ function printWithdrawalReport(result) {
255
+ console.log(`${result.pathsChecked} preference path(s) checked.`);
256
+ for (const finding of result.findings) {
257
+ console.log(` [${finding.kind}] ${finding.surfaceId} / ${finding.topic} — ${finding.message}`);
258
+ }
259
+ if (result.ok)
260
+ console.log("Withdrawal parity: satisfied.");
261
+ else if (result.reason === "withdrawal-harder-than-granting")
262
+ console.log("Withdrawal parity: violated.");
263
+ else
264
+ console.log(`Withdrawal parity: indeterminate (${result.reason}).`);
265
+ }
266
+ /**
267
+ * The one mapping every gate shares: a real violation is `1`; an
268
+ * indeterminate reason — nothing was compared — is `2`, never `0` and never
269
+ * conflated with a violation.
270
+ */
271
+ function exitCodeFor(ok, reason, violationReason) {
272
+ if (ok)
273
+ return 0;
274
+ return reason === violationReason ? 1 : 2;
275
+ }
276
+ function runConfirmationCompleteness(argv) {
277
+ const args = parseArgs(argv, ["--floor"]);
278
+ if (args.help) {
279
+ console.log(CONFIRMATION_USAGE);
280
+ return 0;
281
+ }
282
+ const [intentsArg, confirmationsArg, ...extra] = args.positional;
283
+ if (intentsArg === undefined)
284
+ throw new CliInputError("intents-file is required");
285
+ if (confirmationsArg === undefined)
286
+ throw new CliInputError("confirmations-file is required");
287
+ if (extra.length > 0)
288
+ throw new CliInputError(`unexpected extra argument "${extra[0]}"`);
289
+ const minimumConfidence = parseFloor(args.options.get("--floor"));
290
+ const intentsFile = resolve(intentsArg);
291
+ const confirmationsFile = resolve(confirmationsArg);
292
+ console.log(`Intents file: ${intentsFile}`);
293
+ console.log(`Confirmations file: ${confirmationsFile}`);
294
+ const intents = loadRecords("intents-file", intentsFile, validateIntentRecords);
295
+ if (intents === undefined)
296
+ return 2;
297
+ const confirmations = loadRecords("confirmations-file", confirmationsFile, validateConfirmationRecords);
298
+ if (confirmations === undefined)
299
+ return 2;
300
+ const result = checkConfirmationCompleteness(intents, confirmations, { minimumConfidence });
301
+ printConfirmationReport(result);
302
+ return exitCodeFor(result.ok, result.reason, "unconfirmed-intents");
303
+ }
304
+ function runCurrency(argv) {
305
+ const args = parseArgs(argv, ["--invalidate-denial-on-policy-bump"]);
306
+ if (args.help) {
307
+ console.log(CURRENCY_USAGE);
308
+ return 0;
309
+ }
310
+ const [instructionsArg, usagesArg, ...extra] = args.positional;
311
+ if (instructionsArg === undefined)
312
+ throw new CliInputError("instructions-file is required");
313
+ if (usagesArg === undefined)
314
+ throw new CliInputError("usages-file is required");
315
+ if (extra.length > 0)
316
+ throw new CliInputError(`unexpected extra argument "${extra[0]}"`);
317
+ const invalidateDenialOnPolicyBump = parseBooleanFlag("--invalidate-denial-on-policy-bump", args.options.get("--invalidate-denial-on-policy-bump"));
318
+ const instructionsFile = resolve(instructionsArg);
319
+ const usagesFile = resolve(usagesArg);
320
+ console.log(`Instructions file: ${instructionsFile}`);
321
+ console.log(`Usages file: ${usagesFile}`);
322
+ const instructions = loadRecords("instructions-file", instructionsFile, validateStandingInstructions);
323
+ if (instructions === undefined)
324
+ return 2;
325
+ const usages = loadRecords("usages-file", usagesFile, validateInstructionUsages);
326
+ if (usages === undefined)
327
+ return 2;
328
+ const result = checkCurrency(instructions, usages, { invalidateDenialOnPolicyBump });
329
+ printCurrencyReport(result);
330
+ return exitCodeFor(result.ok, result.reason, "stale-instructions-used");
331
+ }
332
+ function runWithdrawalParity(argv) {
333
+ const args = parseArgs(argv, []);
334
+ if (args.help) {
335
+ console.log(WITHDRAWAL_USAGE);
336
+ return 0;
337
+ }
338
+ const [pathsArg, ...extra] = args.positional;
339
+ if (pathsArg === undefined)
340
+ throw new CliInputError("paths-file is required");
341
+ if (extra.length > 0)
342
+ throw new CliInputError(`unexpected extra argument "${extra[0]}"`);
343
+ const pathsFile = resolve(pathsArg);
344
+ console.log(`Paths file: ${pathsFile}`);
345
+ const paths = loadRecords("paths-file", pathsFile, validatePreferencePaths);
346
+ if (paths === undefined)
347
+ return 2;
348
+ const result = checkWithdrawalParity(paths);
349
+ printWithdrawalReport(result);
350
+ return exitCodeFor(result.ok, result.reason, "withdrawal-harder-than-granting");
351
+ }
352
+ /**
353
+ * Exported (unlike a typical CLI `main`) so `cli.test.ts` can exercise the
354
+ * whole argv-to-exit-code contract directly, against real `mkdtemp` temp
355
+ * directories, without spawning a subprocess per case. Takes `argv` as a
356
+ * parameter rather than reading `process.argv` itself for exactly that
357
+ * reason — `run()` below is the only caller that reads the real
358
+ * `process.argv`.
359
+ */
360
+ export function main(argv) {
361
+ const first = argv[0];
362
+ // An EXPLICITLY requested `--help` is a run that did exactly what was
363
+ // asked, so it is `0`. A BARE invocation is not: no gate was selected, so
364
+ // nothing was checked, and reporting that clean is the precise fail-open
365
+ // shape this repository's own contribution guide forbids ("a check that
366
+ // cannot run must fail (`2`), never pass (`0`)"). A CI step with a dropped
367
+ // argument, a wrapper that loses `$1`, or a gate renamed out from under
368
+ // its caller all arrive here, and all three must go red rather than green
369
+ // on the strength of having examined nothing. Usage still prints — on
370
+ // stderr, because it is now a diagnostic rather than the thing asked for.
371
+ if (first === "--help" || first === "-h") {
372
+ console.log(USAGE);
373
+ return 0;
374
+ }
375
+ if (first === undefined) {
376
+ console.error("butler-check: no gate selected, so nothing was checked.");
377
+ console.error(`\n${USAGE}`);
378
+ return 2;
379
+ }
380
+ if (first === "confirmation-completeness")
381
+ return runConfirmationCompleteness(argv.slice(1));
382
+ if (first === "currency")
383
+ return runCurrency(argv.slice(1));
384
+ if (first === "withdrawal-parity")
385
+ return runWithdrawalParity(argv.slice(1));
386
+ throw new CliInputError(`unknown gate "${first}"; expected one of ${GATES.join(", ")}`);
387
+ }
388
+ function run() {
389
+ try {
390
+ process.exitCode = main(process.argv.slice(2));
391
+ }
392
+ catch (error) {
393
+ if (error instanceof CliInputError) {
394
+ console.error(`butler-check: ${error.message}`);
395
+ console.error(`\n${USAGE}`);
396
+ process.exitCode = 2;
397
+ }
398
+ else {
399
+ console.error(`butler-check: unexpected error: ${error instanceof Error ? (error.stack ?? error.message) : String(error)}`);
400
+ process.exitCode = 2;
401
+ }
402
+ }
403
+ }
404
+ /**
405
+ * `npm install` publishes `bin` entries as symlinks, so comparing
406
+ * `process.argv[1]` to `import.meta.url` without resolving symlinks on both
407
+ * sides fails the moment this file is invoked the only way it ships — as an
408
+ * installed CLI — and fails silently: `run()` never fires, nothing prints,
409
+ * and the exit code is 0. Resolving both real paths is the fix.
410
+ */
411
+ function detectMainModule() {
412
+ const argvPath = process.argv[1];
413
+ if (argvPath === undefined)
414
+ return false;
415
+ const modulePath = fileURLToPath(import.meta.url);
416
+ try {
417
+ return realpathSync(resolve(argvPath)) === realpathSync(modulePath);
418
+ }
419
+ catch {
420
+ return resolve(argvPath) === modulePath;
421
+ }
422
+ }
423
+ if (detectMainModule()) {
424
+ run();
425
+ }
426
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAA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