@intentfi/agent-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.
package/dist/cli.js ADDED
@@ -0,0 +1,417 @@
1
+ #!/usr/bin/env node
2
+ import { createPublicClient, createWalletClient, http, } from "viem";
3
+ import { privateKeyToAccount } from "viem/accounts";
4
+ import { arbitrum, base } from "viem/chains";
5
+ import { IntentFiClient } from "./client";
6
+ async function main() {
7
+ const args = parseArgs(process.argv.slice(2));
8
+ const client = new IntentFiClient({
9
+ baseUrl: flagString(args.flags, "base-url"),
10
+ apiKey: flagString(args.flags, "api-key"),
11
+ transport: (flagString(args.flags, "transport") ??
12
+ process.env.INTENTFI_TRANSPORT),
13
+ });
14
+ if (!args.command) {
15
+ printUsage();
16
+ process.exit(1);
17
+ }
18
+ if (args.command === "auth" && args.subcommand === "siwe") {
19
+ await runAuthSiwe(client, args);
20
+ return;
21
+ }
22
+ if (args.command === "run") {
23
+ await runIntent(client, args);
24
+ return;
25
+ }
26
+ if (args.command === "watch") {
27
+ await watchWorkflow(client, args);
28
+ return;
29
+ }
30
+ if (args.command === "execute") {
31
+ await executeWorkflow(client, args);
32
+ return;
33
+ }
34
+ printUsage();
35
+ process.exit(1);
36
+ }
37
+ async function runAuthSiwe(client, args) {
38
+ const privateKey = flagString(args.flags, "private-key") ??
39
+ process.env.AGENT_E2E_PRIVATE_KEY ??
40
+ process.env.INTENTFI_PRIVATE_KEY;
41
+ if (!privateKey) {
42
+ throw new Error("Missing private key. Set INTENTFI_PRIVATE_KEY (preferred), AGENT_E2E_PRIVATE_KEY, or --private-key.");
43
+ }
44
+ const account = privateKeyToAccount(asHexPrivateKey(privateKey));
45
+ const chainId = Number(flagString(args.flags, "chain-id") ?? "8453");
46
+ const walletType = (flagString(args.flags, "wallet-type") ?? "eoa");
47
+ const label = flagString(args.flags, "label") ?? `intentfi-cli-${Date.now()}`;
48
+ const scopesRaw = flagString(args.flags, "scopes");
49
+ // Client-side convenience default. Server requires explicit scopes —
50
+ // an empty or missing list returns 400.
51
+ const scopes = scopesRaw
52
+ ? scopesRaw
53
+ .split(",")
54
+ .map((value) => value.trim())
55
+ .filter((value) => value.length > 0)
56
+ : ["limits:read", "workflow:create", "workflow:read", "batch:prepare", "batch:submit"];
57
+ if (scopes.length === 0) {
58
+ throw new Error("At least one scope is required. Use --scopes to specify.");
59
+ }
60
+ const expiresAtMsRaw = flagString(args.flags, "expires-at-ms");
61
+ let expiresAtMs;
62
+ if (expiresAtMsRaw !== undefined) {
63
+ const parsedExpiresAtMs = Number.parseInt(expiresAtMsRaw, 10);
64
+ if (!Number.isInteger(parsedExpiresAtMs) || parsedExpiresAtMs <= 0) {
65
+ throw new Error("--expires-at-ms must be a positive integer timestamp in milliseconds.");
66
+ }
67
+ expiresAtMs = parsedExpiresAtMs;
68
+ }
69
+ const challenge = await client.requestSiweChallenge({
70
+ address: account.address,
71
+ walletType,
72
+ chainId,
73
+ });
74
+ const signature = await account.signMessage({ message: challenge.message });
75
+ const minted = await client.mintApiKeyWithSiwe({
76
+ message: challenge.message,
77
+ signature,
78
+ walletType,
79
+ scopes,
80
+ label,
81
+ ...(expiresAtMs !== undefined ? { expiresAtMs } : {}),
82
+ });
83
+ console.log(`minted key prefix: ${minted.key.keyPrefix}`);
84
+ console.log(`api key: ${minted.apiKey}`);
85
+ }
86
+ async function runIntent(client, args) {
87
+ const intent = args.positional.join(" ").trim();
88
+ if (!intent) {
89
+ throw new Error("Usage: intentfi run \"<intent>\" [--chain-id 8453]");
90
+ }
91
+ const chainId = Number(flagString(args.flags, "chain-id") ?? "8453");
92
+ const operationId = flagString(args.flags, "operation-id") ?? `op_${Date.now()}`;
93
+ const waitMs = Number(flagString(args.flags, "wait-ms") ?? "120000");
94
+ const created = await client.createWorkflow({
95
+ intent,
96
+ chainId,
97
+ operationId,
98
+ });
99
+ console.log(`workflowId: ${created.workflowId}`);
100
+ const current = await client.getWorkflow({
101
+ workflowId: created.workflowId,
102
+ waitMs,
103
+ });
104
+ console.log(`status: ${current.workflow.status}`);
105
+ console.log(`nextAction: ${current.workflow.nextAction?.type ?? "UNKNOWN"}`);
106
+ }
107
+ async function watchWorkflow(client, args) {
108
+ const workflowId = args.positional[0]?.trim();
109
+ if (!workflowId) {
110
+ throw new Error("Usage: intentfi watch <workflowId> [--wait-ms 120000]");
111
+ }
112
+ const waitMs = Number(flagString(args.flags, "wait-ms") ?? "120000");
113
+ const minDelayMs = Number(flagString(args.flags, "min-delay-ms") ?? "500");
114
+ const maxDelayMs = Number(flagString(args.flags, "max-delay-ms") ?? "30000");
115
+ let consecutiveErrors = 0;
116
+ while (true) {
117
+ try {
118
+ const current = await client.getWorkflow({ workflowId, waitMs });
119
+ const status = String(current.workflow.status ?? "UNKNOWN");
120
+ const nextAction = current.workflow.nextAction?.type ?? "UNKNOWN";
121
+ console.log(`[workflow ${workflowId}] status=${status} nextAction=${nextAction}`);
122
+ if (status === "COMPLETED" || status === "FAILED") {
123
+ break;
124
+ }
125
+ consecutiveErrors = 0;
126
+ const defaultDelayMs = current.status === 202
127
+ ? Math.max(minDelayMs, Math.min(maxDelayMs, Math.round(waitMs / 4)))
128
+ : minDelayMs;
129
+ const delayMs = clampDelayMs(current.retryAfterMs ?? defaultDelayMs, minDelayMs, maxDelayMs);
130
+ await sleep(delayMs);
131
+ }
132
+ catch (error) {
133
+ consecutiveErrors += 1;
134
+ const backoffMs = clampDelayMs(1000 * Math.pow(2, Math.min(6, consecutiveErrors - 1)), minDelayMs, maxDelayMs);
135
+ console.error(`[workflow ${workflowId}] watch error: ${error instanceof Error ? error.message : String(error)} (retrying in ${backoffMs}ms)`);
136
+ await sleep(backoffMs);
137
+ }
138
+ }
139
+ }
140
+ async function executeWorkflow(client, args) {
141
+ const workflowId = args.positional[0]?.trim();
142
+ if (!workflowId) {
143
+ throw new Error("Usage: intentfi execute <workflowId> [--wait-ms 120000] [--dry-run true]");
144
+ }
145
+ const waitMs = Number(flagString(args.flags, "wait-ms") ?? "120000");
146
+ const dryRun = (flagString(args.flags, "dry-run") ?? "true").toLowerCase() !== "false";
147
+ const waitForReceipts = parseBoolean(flagString(args.flags, "wait-receipts"), true);
148
+ const watchTerminal = parseBoolean(flagString(args.flags, "watch-terminal"), true);
149
+ const maxSteps = Number(flagString(args.flags, "max-steps") ?? "20");
150
+ let account;
151
+ if (!dryRun) {
152
+ const privateKey = flagString(args.flags, "private-key") ??
153
+ process.env.AGENT_E2E_PRIVATE_KEY ??
154
+ process.env.INTENTFI_PRIVATE_KEY;
155
+ if (!privateKey) {
156
+ throw new Error("Missing private key for execution. Set INTENTFI_PRIVATE_KEY (preferred), AGENT_E2E_PRIVATE_KEY, or --private-key.");
157
+ }
158
+ account = privateKeyToAccount(asHexPrivateKey(privateKey));
159
+ }
160
+ const rpcOverride = flagString(args.flags, "rpc-url");
161
+ const maxValueWei = parseBigInt(flagString(args.flags, "max-value-wei") ??
162
+ process.env.AGENT_E2E_MAX_VALUE_WEI ??
163
+ "10000000000000000", "max-value-wei");
164
+ console.log(`[workflow ${workflowId}] execute start (dryRun=${dryRun ? "true" : "false"})`);
165
+ for (let step = 0; step < maxSteps; step += 1) {
166
+ const current = await client.getWorkflow({ workflowId, waitMs });
167
+ const status = String(current.workflow.status ?? "UNKNOWN");
168
+ const nextAction = current.workflow.nextAction?.type ?? "UNKNOWN";
169
+ console.log(`[workflow ${workflowId}] state status=${status} nextAction=${nextAction}`);
170
+ if (status === "COMPLETED" || status === "FAILED") {
171
+ console.log(`[workflow ${workflowId}] terminal status=${status}`);
172
+ return;
173
+ }
174
+ if (nextAction !== "PREPARE_BATCH" && nextAction !== "SUBMIT_BATCH") {
175
+ const delayMs = clampDelayMs(current.retryAfterMs ?? Math.max(1000, Math.round(waitMs / 4)), 500, 30000);
176
+ await sleep(delayMs);
177
+ continue;
178
+ }
179
+ const prepared = nextAction === "SUBMIT_BATCH"
180
+ ? mapSubmissionContextToPrepared(await client.getActiveSubmissionContext({ workflowId }))
181
+ : await waitForPreparedManifest(client, workflowId, flagString(args.flags, "request-id")
182
+ ? `${flagString(args.flags, "request-id")}_prepare_${step}`
183
+ : `req_prepare_${workflowId}_${Date.now()}_${step}`, waitMs);
184
+ console.log(`manifestHash: ${prepared.manifestHash}`);
185
+ console.log(`calls: ${prepared.manifest.calls.length}`);
186
+ if (dryRun) {
187
+ console.log("dry-run enabled: prepared active step without broadcasting transactions.");
188
+ return;
189
+ }
190
+ const chainId = Number(prepared.manifest.chainId);
191
+ const { rpcUrl, chain } = resolveChainAndRpc(chainId, rpcOverride);
192
+ if (!account) {
193
+ throw new Error("Execution account missing.");
194
+ }
195
+ const walletClient = createWalletClient({
196
+ account,
197
+ transport: http(rpcUrl),
198
+ ...(chain ? { chain } : {}),
199
+ });
200
+ const publicClient = createPublicClient({
201
+ transport: http(rpcUrl),
202
+ ...(chain ? { chain } : {}),
203
+ });
204
+ const submittedTransactions = [];
205
+ for (let index = 0; index < prepared.manifest.calls.length; index += 1) {
206
+ const call = prepared.manifest.calls[index];
207
+ const value = parseOptionalBigInt(call.value) ?? 0n;
208
+ if (value > maxValueWei) {
209
+ throw new Error(`Refusing call ${index}: value ${value.toString()} exceeds max-value-wei ${maxValueWei.toString()}.`);
210
+ }
211
+ const gas = parseOptionalBigInt(call.gasLimit);
212
+ const txHash = await walletClient.sendTransaction({
213
+ to: call.to,
214
+ data: call.data,
215
+ value,
216
+ ...(gas ? { gas } : {}),
217
+ });
218
+ submittedTransactions.push({ manifestCallIndex: index, txHash });
219
+ console.log(` tx[${index}] sent: ${txHash}`);
220
+ if (waitForReceipts) {
221
+ await publicClient.waitForTransactionReceipt({ hash: txHash });
222
+ console.log(` tx[${index}] confirmed`);
223
+ }
224
+ }
225
+ const submitRequestId = flagString(args.flags, "request-id")
226
+ ? `${flagString(args.flags, "request-id")}_submit_${step}`
227
+ : `req_submit_${workflowId}_${Date.now()}_${step}`;
228
+ const submitted = await client.submitActiveTransactions({
229
+ workflowId,
230
+ requestId: submitRequestId,
231
+ manifestHash: prepared.manifestHash,
232
+ transactions: submittedTransactions,
233
+ waitMs,
234
+ });
235
+ console.log(`[workflow ${workflowId}] submit status=${submitted.result.status ?? "UNKNOWN"} http=${submitted.status}`);
236
+ if (!watchTerminal) {
237
+ return;
238
+ }
239
+ }
240
+ throw new Error(`Execution loop exceeded max-steps (${maxSteps}) without terminal workflow state.`);
241
+ }
242
+ async function waitForPreparedManifest(client, workflowId, requestId, waitMs) {
243
+ while (true) {
244
+ let prepared = null;
245
+ try {
246
+ prepared = await client.prepareActive({
247
+ workflowId,
248
+ requestId,
249
+ waitMs,
250
+ });
251
+ }
252
+ catch (error) {
253
+ if (!hasErrorCode(error, "ACTIVE_STEP_NOT_PREPAREABLE")) {
254
+ throw error;
255
+ }
256
+ const context = await client.getActiveSubmissionContext({ workflowId });
257
+ return mapSubmissionContextToPrepared(context);
258
+ }
259
+ if (prepared.result.kind === "ready") {
260
+ return prepared.result;
261
+ }
262
+ const latest = await client.getWorkflow({ workflowId, waitMs: 0 });
263
+ const latestNextAction = latest.workflow.nextAction?.type ?? "UNKNOWN";
264
+ if (latestNextAction === "SUBMIT_BATCH") {
265
+ const context = await client.getActiveSubmissionContext({ workflowId });
266
+ return mapSubmissionContextToPrepared(context);
267
+ }
268
+ const retryAfterMs = clampDelayMs(prepared.result.retryAfterMs, 500, 30000);
269
+ console.log(`[workflow ${workflowId}] prepare pending: reason=${prepared.result.reason} retryAfterMs=${retryAfterMs}`);
270
+ await sleep(retryAfterMs);
271
+ }
272
+ }
273
+ function mapSubmissionContextToPrepared(context) {
274
+ return {
275
+ kind: "ready",
276
+ batchId: context.batchId,
277
+ manifestHash: context.manifestHash,
278
+ manifestVersion: context.manifestVersion,
279
+ validUntilMs: context.validUntilMs,
280
+ callCount: context.callCount,
281
+ manifest: context.manifest,
282
+ };
283
+ }
284
+ function hasErrorCode(error, code) {
285
+ if (typeof error === "object" &&
286
+ error !== null &&
287
+ "code" in error &&
288
+ typeof error.code === "string" &&
289
+ error.code === code) {
290
+ return true;
291
+ }
292
+ const message = error instanceof Error ? error.message : String(error);
293
+ return message.includes(code);
294
+ }
295
+ function resolveChainAndRpc(chainId, rpcOverride) {
296
+ const fromFlag = rpcOverride?.trim();
297
+ if (fromFlag) {
298
+ return {
299
+ rpcUrl: fromFlag,
300
+ chain: chainId === 8453 ? base : chainId === 42161 ? arbitrum : null,
301
+ };
302
+ }
303
+ const fromEnv = process.env.AGENT_E2E_RPC_URL?.trim() ||
304
+ process.env.INTENTFI_RPC_URL?.trim();
305
+ if (fromEnv) {
306
+ return {
307
+ rpcUrl: fromEnv,
308
+ chain: chainId === 8453 ? base : chainId === 42161 ? arbitrum : null,
309
+ };
310
+ }
311
+ if (chainId === 8453) {
312
+ return { rpcUrl: "https://mainnet.base.org", chain: base };
313
+ }
314
+ if (chainId === 42161) {
315
+ return { rpcUrl: "https://arb1.arbitrum.io/rpc", chain: arbitrum };
316
+ }
317
+ throw new Error(`Unsupported chainId ${chainId}. Pass --rpc-url for custom chains.`);
318
+ }
319
+ function parseArgs(raw) {
320
+ const command = raw[0];
321
+ const maybeSubcommand = raw[1];
322
+ const hasSubcommand = command === "auth";
323
+ const startIndex = hasSubcommand ? 2 : 1;
324
+ const positional = [];
325
+ const flags = {};
326
+ for (let index = startIndex; index < raw.length; index += 1) {
327
+ const token = raw[index];
328
+ if (!token)
329
+ continue;
330
+ if (!token.startsWith("--")) {
331
+ positional.push(token);
332
+ continue;
333
+ }
334
+ const key = token.slice(2);
335
+ const next = raw[index + 1];
336
+ if (!next || next.startsWith("--")) {
337
+ flags[key] = true;
338
+ continue;
339
+ }
340
+ flags[key] = next;
341
+ index += 1;
342
+ }
343
+ return {
344
+ command,
345
+ subcommand: hasSubcommand ? maybeSubcommand : undefined,
346
+ positional,
347
+ flags,
348
+ };
349
+ }
350
+ function flagString(flags, key) {
351
+ const value = flags[key];
352
+ return typeof value === "string" ? value : undefined;
353
+ }
354
+ function parseBoolean(raw, fallback) {
355
+ if (!raw)
356
+ return fallback;
357
+ const normalized = raw.trim().toLowerCase();
358
+ if (normalized === "true" || normalized === "1")
359
+ return true;
360
+ if (normalized === "false" || normalized === "0")
361
+ return false;
362
+ return fallback;
363
+ }
364
+ function asHexPrivateKey(value) {
365
+ const trimmed = value.trim();
366
+ if (!/^0x[0-9a-fA-F]{64}$/.test(trimmed)) {
367
+ throw new Error("private key must be 0x-prefixed 32-byte hex");
368
+ }
369
+ return trimmed;
370
+ }
371
+ function parseBigInt(raw, field) {
372
+ try {
373
+ return BigInt(raw.trim());
374
+ }
375
+ catch {
376
+ throw new Error(`${field} must be a valid integer.`);
377
+ }
378
+ }
379
+ function parseOptionalBigInt(value) {
380
+ if (value === undefined || value === null)
381
+ return undefined;
382
+ if (typeof value === "bigint")
383
+ return value;
384
+ if (typeof value === "number" && Number.isFinite(value)) {
385
+ return BigInt(Math.trunc(value));
386
+ }
387
+ if (typeof value === "string") {
388
+ const trimmed = value.trim();
389
+ if (!trimmed)
390
+ return undefined;
391
+ try {
392
+ return BigInt(trimmed);
393
+ }
394
+ catch {
395
+ return undefined;
396
+ }
397
+ }
398
+ return undefined;
399
+ }
400
+ function clampDelayMs(value, minMs, maxMs) {
401
+ const safe = Number.isFinite(value) ? value : minMs;
402
+ return Math.max(minMs, Math.min(maxMs, Math.round(safe)));
403
+ }
404
+ async function sleep(ms) {
405
+ await new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
406
+ }
407
+ function printUsage() {
408
+ console.log("intentfi auth siwe [--chain-id 8453] [--expires-at-ms <unix-ms>]");
409
+ console.log("intentfi run \"<intent>\" [--chain-id 8453] [--wait-ms 120000] [--transport rest|mcp]");
410
+ console.log("intentfi watch <workflowId> [--wait-ms 120000] [--min-delay-ms 500] [--max-delay-ms 30000] [--transport rest|mcp]");
411
+ console.log("intentfi execute <workflowId> [--wait-ms 120000] [--dry-run true|false] [--rpc-url <url>] [--transport rest|mcp]");
412
+ console.log("for signing flows, set INTENTFI_PRIVATE_KEY (preferred) or pass --private-key for local debugging.");
413
+ }
414
+ main().catch((error) => {
415
+ console.error(error instanceof Error ? error.message : error);
416
+ process.exitCode = 1;
417
+ });
@@ -0,0 +1,104 @@
1
+ import type { ActiveSubmissionContext, ExecutionArtifactInput, GatewayWalletType, PrepareActiveResult, SubmittedTransaction, TransportMode, WorkflowDetail } from "./types";
2
+ type FetchLike = typeof fetch;
3
+ type ClientOptions = {
4
+ baseUrl?: string;
5
+ apiKey?: string;
6
+ transport?: TransportMode;
7
+ fetchImpl?: FetchLike;
8
+ };
9
+ type MintKeyArgs = {
10
+ message: string;
11
+ signature: string;
12
+ walletType: "eoa" | "base" | "porto";
13
+ scopes: string[];
14
+ label?: string;
15
+ expiresAtMs?: number;
16
+ };
17
+ export declare class IntentFiClient {
18
+ readonly baseUrl: string;
19
+ private readonly apiKey?;
20
+ readonly transport: TransportMode;
21
+ private readonly fetchImpl;
22
+ private mcpSessionId?;
23
+ constructor(options?: ClientOptions);
24
+ requestSiweChallenge(args: {
25
+ address: string;
26
+ walletType?: "eoa" | "base" | "porto";
27
+ chainId?: number;
28
+ }): Promise<{
29
+ message: string;
30
+ nonce: string;
31
+ expiresAtMs: number;
32
+ }>;
33
+ mintApiKeyWithSiwe(args: MintKeyArgs): Promise<{
34
+ apiKey: string;
35
+ key: {
36
+ keyPrefix: string;
37
+ keyId: string;
38
+ };
39
+ }>;
40
+ createWorkflow(args: {
41
+ intent: string;
42
+ operationId: string;
43
+ chainId?: number;
44
+ }): Promise<{
45
+ workflowId: string;
46
+ }>;
47
+ getWorkflow(args: {
48
+ workflowId: string;
49
+ waitMs?: number;
50
+ }): Promise<{
51
+ workflow: WorkflowDetail;
52
+ status: number;
53
+ retryAfterMs?: number;
54
+ }>;
55
+ prepareActive(args: {
56
+ workflowId: string;
57
+ requestId: string;
58
+ waitMs?: number;
59
+ }): Promise<{
60
+ result: PrepareActiveResult;
61
+ status: number;
62
+ }>;
63
+ getActiveSubmissionContext(args: {
64
+ workflowId: string;
65
+ }): Promise<ActiveSubmissionContext>;
66
+ submitActiveTransactions(args: {
67
+ workflowId: string;
68
+ requestId: string;
69
+ manifestHash: string;
70
+ transactions: SubmittedTransaction[];
71
+ waitMs?: number;
72
+ }): Promise<{
73
+ result: Record<string, unknown>;
74
+ status: number;
75
+ }>;
76
+ submitActiveSendCalls(args: {
77
+ workflowId: string;
78
+ requestId: string;
79
+ bundleId: string;
80
+ manifestHash: string;
81
+ walletType: GatewayWalletType;
82
+ bundleTxHash?: string;
83
+ executionArtifact?: ExecutionArtifactInput;
84
+ waitMs?: number;
85
+ }): Promise<{
86
+ result: Record<string, unknown>;
87
+ status: number;
88
+ }>;
89
+ private createWorkflowRest;
90
+ private getWorkflowRest;
91
+ private prepareActiveRest;
92
+ private submitActiveTransactionsRest;
93
+ private submitActiveSendCallsRest;
94
+ mcpInitialize(): Promise<void>;
95
+ mcpToolCall<T>(name: string, args: Record<string, unknown>, options?: {
96
+ stream?: boolean;
97
+ }, attempt?: number): Promise<T>;
98
+ private withApiKey;
99
+ private assertApiKey;
100
+ private fetchJson;
101
+ private fetchEnvelope;
102
+ }
103
+ export {};
104
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EAEtB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,KAAK,SAAS,GAAG,OAAO,KAAK,CAAC;AAE9B,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC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