@botiverse/oar 0.3.0 → 0.3.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.
package/README.md
CHANGED
|
@@ -72,5 +72,11 @@ reasons must be presented as unknown rather than guessed.
|
|
|
72
72
|
|
|
73
73
|
Operational failures (network errors, timeouts, malformed responses) still reject
|
|
74
74
|
the promise. Reasons do not include tokens, credential values, or raw provider
|
|
75
|
-
responses.
|
|
76
|
-
|
|
75
|
+
responses.
|
|
76
|
+
|
|
77
|
+
Claude account usage delegates to its native stream-json `get_usage` request
|
|
78
|
+
(with `skip_behaviors: true`). OAR does not read Claude credentials or call its
|
|
79
|
+
HTTP quota endpoint. A native `rate_limits_available: false` becomes
|
|
80
|
+
`quota_unavailable`; it does not prove invalid credentials. Older CLIs that
|
|
81
|
+
reject the control request return `endpoint_unavailable`. Query-process session
|
|
82
|
+
totals are not returned as account usage.
|
|
@@ -1,31 +1,10 @@
|
|
|
1
1
|
import type { AccountUsageReader, AccountUsageSnapshot } from "../../contracts/account-usage.js";
|
|
2
|
+
/** Native get_usage reply, not the HTTP endpoint's unrelated limits[] shape. */
|
|
3
|
+
export declare function projectClaudeUsage(payload: unknown, email?: string): AccountUsageSnapshot;
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* ```json
|
|
7
|
-
* {
|
|
8
|
-
* "limits": [
|
|
9
|
-
* { "kind": "session", "group": "session", "percent": 17, "severity": "normal",
|
|
10
|
-
* "resets_at": "2026-08-26T13:49:59.725522+00:00", "scope": null, "is_active": false },
|
|
11
|
-
* { "kind": "weekly_all", "group": "weekly", "percent": 72, "severity": "normal",
|
|
12
|
-
* "resets_at": "2026-08-28T06:59:59.725547+00:00", "scope": null, "is_active": false },
|
|
13
|
-
* { "kind": "weekly_scoped", "group": "weekly", "percent": 100, "severity": "critical",
|
|
14
|
-
* "resets_at": "2026-08-28T06:59:59.725963+00:00",
|
|
15
|
-
* "scope": { "model": { "display_name": "Fable" } }, "is_active": true }
|
|
16
|
-
* ]
|
|
17
|
-
* }
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare function projectClaudeUsage(payload: unknown, email?: string, plan?: string): AccountUsageSnapshot;
|
|
21
|
-
/** Extract Claude Code's explicit subscription tier from a confirmed login. */
|
|
22
|
-
export declare function claudeAccountPlan(payload: unknown): string | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Reads Claude account usage in two steps: `claude auth status --json` for the
|
|
25
|
-
* login gate and account email, then a single read-only request to Anthropic's
|
|
26
|
-
* structured usage endpoint using the persisted `/login` OAuth token. This
|
|
27
|
-
* replaces the older `claude -p /usage` subprocess, which was slower and only
|
|
28
|
-
* returned pre-rendered text.
|
|
5
|
+
* Only native control queries; no prompt, credential reads or direct HTTP.
|
|
6
|
+
* Fresh-process session totals are deliberately not exposed as account usage.
|
|
7
|
+
* initialize provides optional account identity; get_usage owns quota access.
|
|
29
8
|
*/
|
|
30
9
|
export declare const claudeAccountUsage: AccountUsageReader;
|
|
31
10
|
//# sourceMappingURL=account-usage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-usage.d.ts","sourceRoot":"","sources":["../../../src/runtimes/claude/account-usage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"account-usage.d.ts","sourceRoot":"","sources":["../../../src/runtimes/claude/account-usage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAsB,MAAM,kCAAkC,CAAC;AAmBrH,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAmDzF;AAaD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,kBAiEhC,CAAC"}
|
|
@@ -1,210 +1,154 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { runExecutable } from "../../shared/executable/index.js";
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { spawnLineProcess } from "../../shared/executable/index.js";
|
|
5
3
|
import { utcInstantFromDate } from "../../shared/instant.js";
|
|
6
|
-
import { asNumber, asRecord, parseJson } from "../../shared/json.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// only consults the persisted login credential.
|
|
12
|
-
const OAUTH_BETA = "oauth-2025-04-20";
|
|
13
|
-
const PROFILE_SCOPE = "user:profile";
|
|
14
|
-
function parseStoredOAuth(raw) {
|
|
15
|
-
const oauth = asRecord(asRecord(parseJson(raw))?.claudeAiOauth);
|
|
16
|
-
const accessToken = oauth?.accessToken;
|
|
17
|
-
if (typeof accessToken !== "string" || accessToken.length === 0) {
|
|
4
|
+
import { asNumber, asRecord, asRecordList, parseJson } from "../../shared/json.js";
|
|
5
|
+
function windowOf(label, value) {
|
|
6
|
+
const entry = asRecord(value);
|
|
7
|
+
const percent = asNumber(entry?.utilization);
|
|
8
|
+
if (percent === null || percent < 0) {
|
|
18
9
|
return null;
|
|
19
10
|
}
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return join(base, ".credentials.json");
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Read Claude Code's persisted `/login` OAuth credential, mirroring the
|
|
30
|
-
* `getClaudeAIOAuthTokens()` fallback: the plaintext credentials file (Linux,
|
|
31
|
-
* and the macOS/Windows fallback), then the macOS Keychain, which stores the
|
|
32
|
-
* same JSON blob. Any failure degrades to `null`; never throws.
|
|
33
|
-
*/
|
|
34
|
-
async function readStoredOAuth(timeoutMs) {
|
|
35
|
-
try {
|
|
36
|
-
return parseStoredOAuth(readFileSync(credentialsFilePath(), "utf8"));
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
// No file (or unreadable): fall through to the platform keystore.
|
|
40
|
-
}
|
|
41
|
-
if (platform() === "darwin") {
|
|
42
|
-
const keychain = await runExecutable("security", ["find-generic-password", "-w", "-s", "Claude Code-credentials"], { timeoutMs });
|
|
43
|
-
if (keychain.ok) {
|
|
44
|
-
try {
|
|
45
|
-
return parseStoredOAuth(keychain.stdout);
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
function usageWindowLabel(kind, scope) {
|
|
55
|
-
const modelName = asRecord(scope?.model)?.display_name;
|
|
56
|
-
switch (kind) {
|
|
57
|
-
case "session":
|
|
58
|
-
return "Current session";
|
|
59
|
-
case "weekly_all":
|
|
60
|
-
return "Current week (all models)";
|
|
61
|
-
case "weekly_scoped":
|
|
62
|
-
return typeof modelName === "string" ? `Current week (${modelName})` : "Current week";
|
|
63
|
-
default:
|
|
64
|
-
return typeof kind === "string" && kind.length > 0 ? kind : "Usage limit";
|
|
65
|
-
}
|
|
11
|
+
const reset = typeof entry?.resets_at === "string" ? utcInstantFromDate(new Date(entry.resets_at)) : null;
|
|
12
|
+
return {
|
|
13
|
+
label,
|
|
14
|
+
usedRatio: Math.min(1, Number((percent / 100).toFixed(6))),
|
|
15
|
+
...(reset === null ? {} : { resetsAt: reset }),
|
|
16
|
+
};
|
|
66
17
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"Content-Type": "application/json",
|
|
74
|
-
"User-Agent": `claude-code/${version}`,
|
|
75
|
-
},
|
|
76
|
-
signal: AbortSignal.timeout(Math.min(timeoutMs, 5000)),
|
|
77
|
-
});
|
|
18
|
+
/** Native get_usage reply, not the HTTP endpoint's unrelated limits[] shape. */
|
|
19
|
+
export function projectClaudeUsage(payload, email) {
|
|
20
|
+
const root = asRecord(payload);
|
|
21
|
+
if (root?.rate_limits_available === false) {
|
|
22
|
+
// The CLI does not distinguish auth mode, missing scope, etc. here.
|
|
23
|
+
return { kind: "unsupported", reason: "quota_unavailable" };
|
|
78
24
|
}
|
|
79
|
-
|
|
80
|
-
throw new Error("
|
|
25
|
+
if (root?.rate_limits_available !== true) {
|
|
26
|
+
throw new Error("Claude get_usage returned an invalid availability flag");
|
|
81
27
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return
|
|
28
|
+
const limits = asRecord(root.rate_limits);
|
|
29
|
+
if (limits === null) {
|
|
30
|
+
// Available in principle, but the runtime could not supply a snapshot.
|
|
31
|
+
throw new Error("Claude get_usage did not return account rate limits");
|
|
86
32
|
}
|
|
87
|
-
const date = new Date(value);
|
|
88
|
-
return Number.isNaN(date.getTime()) ? null : utcInstantFromDate(date);
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Project the `/api/oauth/usage` payload. The authoritative shape is its
|
|
92
|
-
* `limits` array; a representative (subscription) response is:
|
|
93
|
-
*
|
|
94
|
-
* ```json
|
|
95
|
-
* {
|
|
96
|
-
* "limits": [
|
|
97
|
-
* { "kind": "session", "group": "session", "percent": 17, "severity": "normal",
|
|
98
|
-
* "resets_at": "2026-08-26T13:49:59.725522+00:00", "scope": null, "is_active": false },
|
|
99
|
-
* { "kind": "weekly_all", "group": "weekly", "percent": 72, "severity": "normal",
|
|
100
|
-
* "resets_at": "2026-08-28T06:59:59.725547+00:00", "scope": null, "is_active": false },
|
|
101
|
-
* { "kind": "weekly_scoped", "group": "weekly", "percent": 100, "severity": "critical",
|
|
102
|
-
* "resets_at": "2026-08-28T06:59:59.725963+00:00",
|
|
103
|
-
* "scope": { "model": { "display_name": "Fable" } }, "is_active": true }
|
|
104
|
-
* ]
|
|
105
|
-
* }
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
export function projectClaudeUsage(payload, email, plan) {
|
|
109
|
-
const limits = asRecord(payload)?.limits;
|
|
110
33
|
const windows = [];
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
34
|
+
const add = (label, value) => {
|
|
35
|
+
const window = windowOf(label, value);
|
|
36
|
+
if (window !== null) {
|
|
37
|
+
windows.push(window);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
add("Current session", limits.five_hour);
|
|
41
|
+
add("Current week (all models)", limits.seven_day);
|
|
42
|
+
add("Current week (OAuth apps)", limits.seven_day_oauth_apps);
|
|
43
|
+
if (Array.isArray(limits.model_scoped)) {
|
|
44
|
+
for (const entry of asRecordList(limits.model_scoped)) {
|
|
45
|
+
if (typeof entry.display_name === "string" && entry.display_name.trim().length > 0) {
|
|
46
|
+
add(`Current week (${entry.display_name})`, entry);
|
|
118
47
|
}
|
|
119
|
-
const resetsAt = resetInstant(limit.resets_at);
|
|
120
|
-
windows.push({
|
|
121
|
-
label: usageWindowLabel(limit.kind, asRecord(limit.scope)),
|
|
122
|
-
usedRatio: Number((percent / 100).toFixed(6)),
|
|
123
|
-
...(resetsAt === null ? {} : { resetsAt }),
|
|
124
|
-
});
|
|
125
|
-
rateLimited ||= limit.severity === "critical" || percent >= 100;
|
|
126
48
|
}
|
|
127
49
|
}
|
|
50
|
+
else {
|
|
51
|
+
add("Current week (Opus)", limits.seven_day_opus);
|
|
52
|
+
add("Current week (Sonnet)", limits.seven_day_sonnet);
|
|
53
|
+
}
|
|
54
|
+
const includedExhausted = windows.some((window) => window.usedRatio >= 1);
|
|
55
|
+
const extra = asRecord(limits.extra_usage);
|
|
56
|
+
const extraWindow = extra?.is_enabled === true ? windowOf("Extra usage", extra) : null;
|
|
57
|
+
if (extraWindow !== null) {
|
|
58
|
+
windows.push(extraWindow);
|
|
59
|
+
}
|
|
128
60
|
if (windows.length === 0) {
|
|
129
|
-
throw new Error("Claude
|
|
61
|
+
throw new Error("Claude get_usage returned no usable windows");
|
|
130
62
|
}
|
|
63
|
+
const plan = typeof root.subscription_type === "string" ? root.subscription_type.trim() : "";
|
|
131
64
|
return {
|
|
132
65
|
kind: "available",
|
|
133
|
-
...(plan ===
|
|
66
|
+
...(plan.length === 0 ? {} : { plan }),
|
|
134
67
|
...(email === undefined ? {} : { email }),
|
|
135
|
-
rateLimited,
|
|
68
|
+
rateLimited: includedExhausted && !(extraWindow !== null && extraWindow.usedRatio < 1),
|
|
136
69
|
windows,
|
|
137
70
|
};
|
|
138
71
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return undefined;
|
|
72
|
+
function controlFailure(reply) {
|
|
73
|
+
const detail = typeof reply.error === "string" ? reply.error : "Malformed control response";
|
|
74
|
+
if (/unsupported control request subtype|unknown control request|not supported in this context|not available on this connection/iu.test(detail)) {
|
|
75
|
+
return { kind: "unsupported", reason: "endpoint_unavailable" };
|
|
144
76
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
function isConfirmedNonSubscriptionLogin(authStatus) {
|
|
149
|
-
if (typeof authStatus.apiKeySource === "string") {
|
|
150
|
-
return true;
|
|
77
|
+
if (/not logged in|authentication required|please (?:run )?\/login/iu.test(detail)) {
|
|
78
|
+
return { kind: "reauth_required", reason: "not_authenticated" };
|
|
151
79
|
}
|
|
152
|
-
|
|
153
|
-
// endpoints) as `oauth_token`. They authenticate inference, not a claude.ai
|
|
154
|
-
// subscription, so the profile-scoped usage endpoint is inapplicable.
|
|
155
|
-
return typeof authStatus.authMethod === "string"
|
|
156
|
-
&& authStatus.authMethod !== "claude.ai";
|
|
80
|
+
throw new Error(`Claude usage control request failed: ${detail}`);
|
|
157
81
|
}
|
|
158
82
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
* replaces the older `claude -p /usage` subprocess, which was slower and only
|
|
163
|
-
* returned pre-rendered text.
|
|
83
|
+
* Only native control queries; no prompt, credential reads or direct HTTP.
|
|
84
|
+
* Fresh-process session totals are deliberately not exposed as account usage.
|
|
85
|
+
* initialize provides optional account identity; get_usage owns quota access.
|
|
164
86
|
*/
|
|
165
87
|
export const claudeAccountUsage = async (installation, options = {}) => {
|
|
166
88
|
if (installation.via !== "executable") {
|
|
167
89
|
return { kind: "unsupported", reason: "unsupported_installation" };
|
|
168
90
|
}
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
91
|
+
const child = spawnLineProcess(installation.command, [
|
|
92
|
+
"-p", "--input-format", "stream-json", "--output-format", "stream-json",
|
|
93
|
+
"--verbose", "--no-session-persistence",
|
|
94
|
+
], { env: { ...process.env, CLAUDECODE: undefined } });
|
|
95
|
+
let pending = null;
|
|
96
|
+
let ended = false;
|
|
97
|
+
let timedOut = false;
|
|
98
|
+
child.onLine((line) => {
|
|
99
|
+
const message = asRecord(parseJson(line));
|
|
100
|
+
const inner = asRecord(message?.response);
|
|
101
|
+
if (message?.type === "control_response" && pending !== null && inner?.request_id === pending.id) {
|
|
102
|
+
pending.resolve(inner);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
child.onExit(() => {
|
|
106
|
+
ended = true;
|
|
107
|
+
pending?.resolve(null);
|
|
108
|
+
});
|
|
109
|
+
child.stdin.on("error", () => {
|
|
110
|
+
ended = true;
|
|
111
|
+
pending?.resolve(null);
|
|
112
|
+
});
|
|
113
|
+
const timer = setTimeout(() => {
|
|
114
|
+
timedOut = true;
|
|
115
|
+
pending?.resolve(null);
|
|
116
|
+
child.kill();
|
|
117
|
+
}, options.timeoutMs ?? 15_000);
|
|
118
|
+
const query = async (request) => {
|
|
119
|
+
if (ended || timedOut) {
|
|
120
|
+
throw new Error("Claude exited or timed out before answering usage queries");
|
|
121
|
+
}
|
|
122
|
+
const id = `oar-usage-${randomUUID()}`;
|
|
123
|
+
const { promise, resolve } = Promise.withResolvers();
|
|
124
|
+
pending = { id, resolve };
|
|
125
|
+
child.write(`${JSON.stringify({ type: "control_request", request_id: id, request })}\n`);
|
|
126
|
+
const reply = await promise;
|
|
127
|
+
pending = null;
|
|
128
|
+
if (reply === null) {
|
|
129
|
+
throw new Error("Claude exited or timed out before answering usage query");
|
|
130
|
+
}
|
|
131
|
+
return reply;
|
|
132
|
+
};
|
|
133
|
+
try {
|
|
134
|
+
await child.spawned;
|
|
135
|
+
const initialized = await query({ subtype: "initialize" });
|
|
136
|
+
if (initialized.subtype !== "success") {
|
|
137
|
+
return controlFailure(initialized);
|
|
138
|
+
}
|
|
139
|
+
const account = asRecord(asRecord(initialized.response)?.account);
|
|
140
|
+
const email = typeof account?.email === "string" && account.email.trim().length > 0
|
|
141
|
+
? account.email.trim() : undefined;
|
|
142
|
+
const reply = await query({ subtype: "get_usage", skip_behaviors: true });
|
|
143
|
+
if (reply.subtype !== "success") {
|
|
144
|
+
return controlFailure(reply);
|
|
145
|
+
}
|
|
146
|
+
return projectClaudeUsage(reply.response, email);
|
|
203
147
|
}
|
|
204
|
-
|
|
205
|
-
|
|
148
|
+
finally {
|
|
149
|
+
clearTimeout(timer);
|
|
150
|
+
child.kill();
|
|
151
|
+
await child.exited;
|
|
206
152
|
}
|
|
207
|
-
const payload = parseJson(await response.text());
|
|
208
|
-
return projectClaudeUsage(payload, email, plan);
|
|
209
153
|
};
|
|
210
154
|
//# sourceMappingURL=account-usage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-usage.js","sourceRoot":"","sources":["../../../src/runtimes/claude/account-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"account-usage.js","sourceRoot":"","sources":["../../../src/runtimes/claude/account-usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAmB,MAAM,sBAAsB,CAAC;AAEpG,SAAS,QAAQ,CAAC,KAAa,EAAE,KAAc;IAC7C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9B,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC7C,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,KAAK,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1G,OAAO;QACL,KAAK;QACL,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;KAC/C,CAAC;AACJ,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,kBAAkB,CAAC,OAAgB,EAAE,KAAc;IACjE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