@cephalization/phoenix-insight 1.0.0 → 1.0.2
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/chunk-KEQDYZIE.js +237 -0
- package/dist/chunk-KEQDYZIE.js.map +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +3942 -806
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -0
- package/package.json +10 -8
- package/dist/agent/index.js +0 -235
- package/dist/commands/index.js +0 -3
- package/dist/commands/px-fetch-more-spans.js +0 -98
- package/dist/commands/px-fetch-more-trace.js +0 -110
- package/dist/commands/report-tool.js +0 -239
- package/dist/config/index.js +0 -165
- package/dist/config/loader.js +0 -141
- package/dist/config/schema.js +0 -53
- package/dist/modes/index.js +0 -17
- package/dist/modes/local.js +0 -141
- package/dist/modes/sandbox.js +0 -129
- package/dist/modes/types.js +0 -1
- package/dist/observability/index.js +0 -65
- package/dist/progress.js +0 -209
- package/dist/prompts/index.js +0 -1
- package/dist/prompts/system.js +0 -37
- package/dist/server/session.js +0 -357
- package/dist/server/ui.js +0 -232
- package/dist/server/websocket.js +0 -212
- package/dist/snapshot/client.js +0 -74
- package/dist/snapshot/context.js +0 -441
- package/dist/snapshot/datasets.js +0 -68
- package/dist/snapshot/experiments.js +0 -135
- package/dist/snapshot/index.js +0 -262
- package/dist/snapshot/projects.js +0 -44
- package/dist/snapshot/prompts.js +0 -199
- package/dist/snapshot/spans.js +0 -104
- package/dist/snapshot/utils.js +0 -112
- package/dist/tsconfig.esm.tsbuildinfo +0 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
// src/modes/sandbox.ts
|
|
2
|
+
import { tool } from "ai";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
var SandboxMode = class {
|
|
5
|
+
bash;
|
|
6
|
+
// Will be typed as Bash from just-bash
|
|
7
|
+
initialized = false;
|
|
8
|
+
bashToolPromise = null;
|
|
9
|
+
snapshotRoot = "/phoenix/";
|
|
10
|
+
constructor() {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get the absolute root path of the Phoenix snapshot directory
|
|
14
|
+
* For sandbox mode, this is always the virtual path "/phoenix/"
|
|
15
|
+
*/
|
|
16
|
+
getSnapshotRoot() {
|
|
17
|
+
return this.snapshotRoot;
|
|
18
|
+
}
|
|
19
|
+
async init() {
|
|
20
|
+
if (this.initialized) return;
|
|
21
|
+
try {
|
|
22
|
+
const { Bash } = await import("just-bash");
|
|
23
|
+
this.bash = new Bash({ cwd: "/phoenix" });
|
|
24
|
+
this.initialized = true;
|
|
25
|
+
} catch (error) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
`Failed to initialize sandbox mode: ${error instanceof Error ? error.message : String(error)}`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async writeFile(path2, content) {
|
|
32
|
+
await this.init();
|
|
33
|
+
try {
|
|
34
|
+
const fullPath = path2.startsWith("/phoenix") ? path2 : `/phoenix${path2.startsWith("/") ? "" : "/"}${path2}`;
|
|
35
|
+
const dirname2 = fullPath.substring(0, fullPath.lastIndexOf("/"));
|
|
36
|
+
if (dirname2) {
|
|
37
|
+
await this.bash.exec(`mkdir -p ${dirname2}`);
|
|
38
|
+
}
|
|
39
|
+
this.bash.fs.writeFileSync(fullPath, content);
|
|
40
|
+
} catch (error) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
`Failed to write file ${path2}: ${error instanceof Error ? error.message : String(error)}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async exec(command) {
|
|
47
|
+
await this.init();
|
|
48
|
+
try {
|
|
49
|
+
const result = await this.bash.exec(command);
|
|
50
|
+
return {
|
|
51
|
+
stdout: result.stdout || "",
|
|
52
|
+
stderr: result.stderr || "",
|
|
53
|
+
exitCode: result.exitCode || 0
|
|
54
|
+
};
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (error && typeof error === "object" && "exitCode" in error) {
|
|
57
|
+
return {
|
|
58
|
+
stdout: error.stdout || "",
|
|
59
|
+
stderr: error.stderr || error.toString(),
|
|
60
|
+
exitCode: error.exitCode || 1
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
stdout: "",
|
|
65
|
+
stderr: error?.toString() || "Unknown error",
|
|
66
|
+
exitCode: 1
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
async getBashTool() {
|
|
71
|
+
if (!this.bashToolPromise) {
|
|
72
|
+
this.bashToolPromise = this.createBashTool();
|
|
73
|
+
}
|
|
74
|
+
return this.bashToolPromise;
|
|
75
|
+
}
|
|
76
|
+
async createBashTool() {
|
|
77
|
+
await this.init();
|
|
78
|
+
return tool({
|
|
79
|
+
description: "Execute bash commands in the sandbox filesystem",
|
|
80
|
+
inputSchema: z.object({
|
|
81
|
+
command: z.string().describe("The bash command to execute")
|
|
82
|
+
}),
|
|
83
|
+
execute: async ({ command }) => {
|
|
84
|
+
const result = await this.exec(command);
|
|
85
|
+
if (result.exitCode !== 0) {
|
|
86
|
+
return {
|
|
87
|
+
success: false,
|
|
88
|
+
stdout: result.stdout,
|
|
89
|
+
stderr: result.stderr,
|
|
90
|
+
exitCode: result.exitCode,
|
|
91
|
+
error: `Command failed with exit code ${result.exitCode}`
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
success: true,
|
|
96
|
+
stdout: result.stdout,
|
|
97
|
+
stderr: result.stderr,
|
|
98
|
+
exitCode: result.exitCode
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
async cleanup() {
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// src/modes/local.ts
|
|
108
|
+
import { exec as execCallback } from "child_process";
|
|
109
|
+
import { promisify } from "util";
|
|
110
|
+
import * as fs from "fs/promises";
|
|
111
|
+
import * as path from "path";
|
|
112
|
+
import * as os from "os";
|
|
113
|
+
import { tool as tool2 } from "ai";
|
|
114
|
+
import { z as z2 } from "zod";
|
|
115
|
+
var execAsync = promisify(execCallback);
|
|
116
|
+
var LocalMode = class {
|
|
117
|
+
workDir;
|
|
118
|
+
toolCreated = false;
|
|
119
|
+
bashToolPromise = null;
|
|
120
|
+
constructor() {
|
|
121
|
+
const timestamp = Date.now().toString() + "-" + Math.random().toString(36).substring(7);
|
|
122
|
+
this.workDir = path.join(
|
|
123
|
+
os.homedir(),
|
|
124
|
+
".phoenix-insight",
|
|
125
|
+
"snapshots",
|
|
126
|
+
timestamp,
|
|
127
|
+
"phoenix"
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get the absolute root path of the Phoenix snapshot directory
|
|
132
|
+
* For local mode, this is the actual filesystem path
|
|
133
|
+
*/
|
|
134
|
+
getSnapshotRoot() {
|
|
135
|
+
return this.workDir;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Initialize the working directory
|
|
139
|
+
*/
|
|
140
|
+
async init() {
|
|
141
|
+
try {
|
|
142
|
+
await fs.mkdir(this.workDir, { recursive: true });
|
|
143
|
+
} catch (error) {
|
|
144
|
+
throw new Error(
|
|
145
|
+
`Failed to initialize local mode directory at ${this.workDir}: ${error instanceof Error ? error.message : String(error)}`
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async writeFile(filePath, content) {
|
|
150
|
+
await this.init();
|
|
151
|
+
const cleanPath = filePath.startsWith("/phoenix") ? filePath.substring(8) : filePath.startsWith("/") ? filePath.substring(1) : filePath;
|
|
152
|
+
const fullPath = path.join(this.workDir, cleanPath);
|
|
153
|
+
const dirname2 = path.dirname(fullPath);
|
|
154
|
+
await fs.mkdir(dirname2, { recursive: true });
|
|
155
|
+
await fs.writeFile(fullPath, content, "utf-8");
|
|
156
|
+
}
|
|
157
|
+
async exec(command) {
|
|
158
|
+
await this.init();
|
|
159
|
+
try {
|
|
160
|
+
const { stdout, stderr } = await execAsync(command, {
|
|
161
|
+
cwd: this.workDir,
|
|
162
|
+
shell: "/bin/bash",
|
|
163
|
+
encoding: "utf-8",
|
|
164
|
+
timeout: 6e4
|
|
165
|
+
// 60 second timeout for bash commands
|
|
166
|
+
});
|
|
167
|
+
return {
|
|
168
|
+
stdout: stdout || "",
|
|
169
|
+
stderr: stderr || "",
|
|
170
|
+
exitCode: 0
|
|
171
|
+
};
|
|
172
|
+
} catch (error) {
|
|
173
|
+
if (error.code !== void 0) {
|
|
174
|
+
return {
|
|
175
|
+
stdout: error.stdout || "",
|
|
176
|
+
stderr: error.stderr || error.message || "Command failed",
|
|
177
|
+
exitCode: error.code || 1
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
return {
|
|
181
|
+
stdout: "",
|
|
182
|
+
stderr: error.message || "Unknown error",
|
|
183
|
+
exitCode: 1
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
async getBashTool() {
|
|
188
|
+
if (!this.bashToolPromise) {
|
|
189
|
+
this.bashToolPromise = this.createBashTool();
|
|
190
|
+
}
|
|
191
|
+
return this.bashToolPromise;
|
|
192
|
+
}
|
|
193
|
+
async createBashTool() {
|
|
194
|
+
return tool2({
|
|
195
|
+
description: "Execute bash commands in the local filesystem",
|
|
196
|
+
inputSchema: z2.object({
|
|
197
|
+
command: z2.string().describe("The bash command to execute")
|
|
198
|
+
}),
|
|
199
|
+
execute: async ({ command }) => {
|
|
200
|
+
const result = await this.exec(command);
|
|
201
|
+
if (result.exitCode !== 0) {
|
|
202
|
+
return {
|
|
203
|
+
success: false,
|
|
204
|
+
stdout: result.stdout,
|
|
205
|
+
stderr: result.stderr,
|
|
206
|
+
exitCode: result.exitCode,
|
|
207
|
+
error: `Command failed with exit code ${result.exitCode}`
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
success: true,
|
|
212
|
+
stdout: result.stdout,
|
|
213
|
+
stderr: result.stderr,
|
|
214
|
+
exitCode: result.exitCode
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
async cleanup() {
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
// src/modes/index.ts
|
|
224
|
+
function createSandboxMode() {
|
|
225
|
+
return new SandboxMode();
|
|
226
|
+
}
|
|
227
|
+
async function createLocalMode() {
|
|
228
|
+
return new LocalMode();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export {
|
|
232
|
+
SandboxMode,
|
|
233
|
+
LocalMode,
|
|
234
|
+
createSandboxMode,
|
|
235
|
+
createLocalMode
|
|
236
|
+
};
|
|
237
|
+
//# sourceMappingURL=chunk-KEQDYZIE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/modes/sandbox.ts","../src/modes/local.ts","../src/modes/index.ts"],"sourcesContent":["import type { ExecutionMode } from \"./types.js\";\nimport { tool } from \"ai\";\nimport { z } from \"zod\";\n\n/**\n * Sandbox execution mode using just-bash for isolated execution\n * - In-memory filesystem\n * - Simulated bash commands\n * - No disk or network access\n */\nexport class SandboxMode implements ExecutionMode {\n private bash: any; // Will be typed as Bash from just-bash\n private initialized = false;\n private bashToolPromise: Promise<any> | null = null;\n private readonly snapshotRoot = \"/phoenix/\";\n\n constructor() {\n // We'll initialize in the init method since we need async imports\n }\n\n /**\n * Get the absolute root path of the Phoenix snapshot directory\n * For sandbox mode, this is always the virtual path \"/phoenix/\"\n */\n getSnapshotRoot(): string {\n return this.snapshotRoot;\n }\n\n private async init() {\n if (this.initialized) return;\n\n try {\n // Dynamic imports for ESM modules\n const { Bash } = await import(\"just-bash\");\n\n // Initialize just-bash with /phoenix as the working directory\n this.bash = new Bash({ cwd: \"/phoenix\" });\n\n this.initialized = true;\n } catch (error) {\n throw new Error(\n `Failed to initialize sandbox mode: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n }\n\n async writeFile(path: string, content: string): Promise<void> {\n await this.init();\n\n try {\n // Ensure the path starts with /phoenix\n const fullPath = path.startsWith(\"/phoenix\")\n ? path\n : `/phoenix${path.startsWith(\"/\") ? \"\" : \"/\"}${path}`;\n\n // Create parent directories if they don't exist\n const dirname = fullPath.substring(0, fullPath.lastIndexOf(\"/\"));\n if (dirname) {\n await this.bash.exec(`mkdir -p ${dirname}`);\n }\n\n // Write the file using just-bash's filesystem\n // We'll use the InMemoryFs directly for better performance\n this.bash.fs.writeFileSync(fullPath, content);\n } catch (error) {\n throw new Error(\n `Failed to write file ${path}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n }\n\n async exec(\n command: string\n ): Promise<{ stdout: string; stderr: string; exitCode: number }> {\n await this.init();\n\n try {\n const result = await this.bash.exec(command);\n\n // just-bash returns a different structure, so we need to normalize it\n return {\n stdout: result.stdout || \"\",\n stderr: result.stderr || \"\",\n exitCode: result.exitCode || 0,\n };\n } catch (error) {\n // If the command fails, just-bash throws an error\n // Extract what we can from the error\n if (error && typeof error === \"object\" && \"exitCode\" in error) {\n return {\n stdout: (error as any).stdout || \"\",\n stderr: (error as any).stderr || error.toString(),\n exitCode: (error as any).exitCode || 1,\n };\n }\n\n // Fallback for unexpected errors\n return {\n stdout: \"\",\n stderr: error?.toString() || \"Unknown error\",\n exitCode: 1,\n };\n }\n }\n\n async getBashTool(): Promise<any> {\n // Only create the tool once and cache it\n if (!this.bashToolPromise) {\n this.bashToolPromise = this.createBashTool();\n }\n return this.bashToolPromise;\n }\n\n private async createBashTool(): Promise<any> {\n await this.init();\n\n // Create a bash tool compatible with the AI SDK\n // Similar to local mode, we'll create it directly using the tool function\n return tool({\n description: \"Execute bash commands in the sandbox filesystem\",\n inputSchema: z.object({\n command: z.string().describe(\"The bash command to execute\"),\n }),\n execute: async ({ command }) => {\n const result = await this.exec(command);\n\n // Return result in a format similar to bash-tool\n if (result.exitCode !== 0) {\n // Include error details in the response\n return {\n success: false,\n stdout: result.stdout,\n stderr: result.stderr,\n exitCode: result.exitCode,\n error: `Command failed with exit code ${result.exitCode}`,\n };\n }\n\n return {\n success: true,\n stdout: result.stdout,\n stderr: result.stderr,\n exitCode: result.exitCode,\n };\n },\n });\n }\n\n async cleanup(): Promise<void> {\n // No-op for in-memory mode - garbage collection will handle cleanup\n // We could optionally clear the filesystem here if needed\n }\n}\n","import type { ExecutionMode } from \"./types.js\";\nimport { exec as execCallback } from \"node:child_process\";\nimport { promisify } from \"node:util\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport * as os from \"node:os\";\nimport { tool } from \"ai\";\nimport { z } from \"zod\";\n\nconst execAsync = promisify(execCallback);\n\n/**\n * Local execution mode using real bash and persistent filesystem\n * - Real bash execution via child_process\n * - Persistent storage in ~/.phoenix-insight/\n * - Full system access\n */\nexport class LocalMode implements ExecutionMode {\n private workDir: string;\n private toolCreated = false;\n private bashToolPromise: Promise<any> | null = null;\n\n constructor() {\n // Create a timestamped directory for this snapshot\n // Add a small random component to ensure uniqueness even if created at the same millisecond\n const timestamp =\n Date.now().toString() + \"-\" + Math.random().toString(36).substring(7);\n this.workDir = path.join(\n os.homedir(),\n \".phoenix-insight\",\n \"snapshots\",\n timestamp,\n \"phoenix\"\n );\n }\n\n /**\n * Get the absolute root path of the Phoenix snapshot directory\n * For local mode, this is the actual filesystem path\n */\n getSnapshotRoot(): string {\n return this.workDir;\n }\n\n /**\n * Initialize the working directory\n */\n private async init() {\n try {\n // Create the directory structure if it doesn't exist\n await fs.mkdir(this.workDir, { recursive: true });\n } catch (error) {\n throw new Error(\n `Failed to initialize local mode directory at ${this.workDir}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n }\n\n async writeFile(filePath: string, content: string): Promise<void> {\n await this.init();\n\n // Ensure the path is relative to phoenix root\n const cleanPath = filePath.startsWith(\"/phoenix\")\n ? filePath.substring(8) // Remove /phoenix prefix\n : filePath.startsWith(\"/\")\n ? filePath.substring(1) // Remove leading slash\n : filePath;\n\n const fullPath = path.join(this.workDir, cleanPath);\n\n // Create parent directories if they don't exist\n const dirname = path.dirname(fullPath);\n await fs.mkdir(dirname, { recursive: true });\n\n // Write the file\n await fs.writeFile(fullPath, content, \"utf-8\");\n }\n\n async exec(\n command: string\n ): Promise<{ stdout: string; stderr: string; exitCode: number }> {\n await this.init();\n\n try {\n // Execute the command in the phoenix directory with a timeout\n const { stdout, stderr } = await execAsync(command, {\n cwd: this.workDir,\n shell: \"/bin/bash\",\n encoding: \"utf-8\",\n timeout: 60000, // 60 second timeout for bash commands\n });\n\n return {\n stdout: stdout || \"\",\n stderr: stderr || \"\",\n exitCode: 0,\n };\n } catch (error: any) {\n // Handle command execution errors\n if (error.code !== undefined) {\n return {\n stdout: error.stdout || \"\",\n stderr: error.stderr || error.message || \"Command failed\",\n exitCode: error.code || 1,\n };\n }\n\n // Handle other errors\n return {\n stdout: \"\",\n stderr: error.message || \"Unknown error\",\n exitCode: 1,\n };\n }\n }\n\n async getBashTool(): Promise<any> {\n // Only create the tool once and cache it\n if (!this.bashToolPromise) {\n this.bashToolPromise = this.createBashTool();\n }\n return this.bashToolPromise;\n }\n\n private async createBashTool(): Promise<any> {\n // We can't use bash-tool directly for local mode since it's designed for just-bash\n // Instead, we'll create a tool using the AI SDK's tool function\n // This ensures compatibility with the AI SDK\n\n // Return a bash tool that executes real bash commands\n return tool({\n description: \"Execute bash commands in the local filesystem\",\n inputSchema: z.object({\n command: z.string().describe(\"The bash command to execute\"),\n }),\n execute: async ({ command }) => {\n const result = await this.exec(command);\n\n // Return result in a format similar to bash-tool\n if (result.exitCode !== 0) {\n // Include error details in the response\n return {\n success: false,\n stdout: result.stdout,\n stderr: result.stderr,\n exitCode: result.exitCode,\n error: `Command failed with exit code ${result.exitCode}`,\n };\n }\n\n return {\n success: true,\n stdout: result.stdout,\n stderr: result.stderr,\n exitCode: result.exitCode,\n };\n },\n });\n }\n\n async cleanup(): Promise<void> {\n // Optional: Clean up old snapshots\n // For now, we'll keep all snapshots for user reference\n // Users can manually clean ~/.phoenix-insight/ if needed\n // We could implement logic to:\n // 1. Keep only the last N snapshots\n // 2. Delete snapshots older than X days\n // 3. Provide a separate cleanup command\n // For this implementation, we do nothing\n }\n}\n","export * from \"./types.js\";\nexport * from \"./sandbox.js\";\nexport * from \"./local.js\";\n\nimport { SandboxMode } from \"./sandbox.js\";\nimport { LocalMode } from \"./local.js\";\nimport type { ExecutionMode } from \"./types.js\";\n\n/**\n * Creates a new sandbox execution mode\n */\nexport function createSandboxMode(): ExecutionMode {\n return new SandboxMode();\n}\n\n/**\n * Creates a new local execution mode\n */\nexport async function createLocalMode(): Promise<ExecutionMode> {\n return new LocalMode();\n}\n"],"mappings":";AACA,SAAS,YAAY;AACrB,SAAS,SAAS;AAQX,IAAM,cAAN,MAA2C;AAAA,EACxC;AAAA;AAAA,EACA,cAAc;AAAA,EACd,kBAAuC;AAAA,EAC9B,eAAe;AAAA,EAEhC,cAAc;AAAA,EAEd;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,kBAA0B;AACxB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAc,OAAO;AACnB,QAAI,KAAK,YAAa;AAEtB,QAAI;AAEF,YAAM,EAAE,KAAK,IAAI,MAAM,OAAO,WAAW;AAGzC,WAAK,OAAO,IAAI,KAAK,EAAE,KAAK,WAAW,CAAC;AAExC,WAAK,cAAc;AAAA,IACrB,SAAS,OAAO;AACd,YAAM,IAAI;AAAA,QACR,sCAAsC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC;AAAA,MAC9F;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,UAAUA,OAAc,SAAgC;AAC5D,UAAM,KAAK,KAAK;AAEhB,QAAI;AAEF,YAAM,WAAWA,MAAK,WAAW,UAAU,IACvCA,QACA,WAAWA,MAAK,WAAW,GAAG,IAAI,KAAK,GAAG,GAAGA,KAAI;AAGrD,YAAMC,WAAU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