@narumitw/pi-langfuse 0.50.6 → 0.51.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 +82 -4
- package/dist/chunks/chunk-DBQAWNKG.ts +316 -0
- package/dist/chunks/chunk-DBQAWNKG.ts.map +7 -0
- package/dist/chunks/runtime-6ZHLVC3A.ts +352 -0
- package/dist/chunks/runtime-6ZHLVC3A.ts.map +7 -0
- package/dist/config.d.ts +33 -0
- package/dist/git.d.ts +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1551 -0
- package/dist/index.js.map +7 -0
- package/dist/index.ts +588 -479
- package/dist/index.ts.map +4 -4
- package/dist/langfuse.d.ts +13 -0
- package/dist/library-chunks/chunk-SAJ76IYU.js +316 -0
- package/dist/library-chunks/chunk-SAJ76IYU.js.map +7 -0
- package/dist/library-chunks/runtime-A6SQ6VEH.js +352 -0
- package/dist/library-chunks/runtime-A6SQ6VEH.js.map +7 -0
- package/dist/pi-session.d.ts +43 -0
- package/dist/public-api.d.ts +4 -0
- package/dist/runtime-core.d.ts +26 -0
- package/dist/runtime.d.ts +22 -0
- package/dist/sanitizer.d.ts +2 -0
- package/dist/tracing.d.ts +202 -0
- package/package.json +11 -3
- package/src/git.ts +60 -0
- package/src/index.ts +9 -0
- package/src/langfuse.ts +88 -292
- package/src/pi-session.ts +570 -0
- package/src/public-api.ts +17 -0
- package/src/runtime-core.ts +113 -0
- package/src/runtime.ts +234 -51
- package/src/sanitizer.ts +10 -7
- package/src/tracing.ts +52 -14
- package/dist/chunks/runtime-X75FRK2E.js +0 -215
- package/dist/chunks/runtime-X75FRK2E.js.map +0 -7
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
// @generated by scripts/build-runtime.mjs; do not edit.
|
|
2
|
-
// @ts-nocheck -- the generated entry uses a .ts extension for Pi's Jiti loader.
|
|
3
|
-
|
|
4
|
-
// src/runtime.ts
|
|
5
|
-
import { createHash } from "node:crypto";
|
|
6
|
-
import { LangfuseSpanProcessor } from "@langfuse/otel";
|
|
7
|
-
import {
|
|
8
|
-
LangfuseOtelSpanAttributes,
|
|
9
|
-
setLangfuseTracerProvider,
|
|
10
|
-
startObservation
|
|
11
|
-
} from "@langfuse/tracing";
|
|
12
|
-
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
|
|
13
|
-
var RUNTIME_KEY = /* @__PURE__ */ Symbol.for("@narumitw/pi-langfuse/runtime/v1");
|
|
14
|
-
var ProductionObservation = class {
|
|
15
|
-
constructor(native) {
|
|
16
|
-
this.native = native;
|
|
17
|
-
}
|
|
18
|
-
native;
|
|
19
|
-
update(attributes) {
|
|
20
|
-
const { sessionId, userId, ...observationAttributes } = attributes;
|
|
21
|
-
this.native.updateOtelSpanAttributes(observationAttributes);
|
|
22
|
-
applySessionId(this.native, sessionId);
|
|
23
|
-
applyUserId(this.native, userId);
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
updateTrace(attributes) {
|
|
27
|
-
const { input, output, metadata, name, sessionId, userId, tags, version } = attributes;
|
|
28
|
-
if (input !== void 0 || output !== void 0) {
|
|
29
|
-
this.native.setTraceIO({ input, output });
|
|
30
|
-
}
|
|
31
|
-
if (name !== void 0) {
|
|
32
|
-
this.native.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_NAME, name);
|
|
33
|
-
}
|
|
34
|
-
applySessionId(this.native, sessionId);
|
|
35
|
-
applyUserId(this.native, userId);
|
|
36
|
-
if (tags !== void 0) {
|
|
37
|
-
this.native.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_TAGS, tags);
|
|
38
|
-
}
|
|
39
|
-
if (version !== void 0) {
|
|
40
|
-
this.native.otelSpan.setAttribute(LangfuseOtelSpanAttributes.VERSION, version);
|
|
41
|
-
}
|
|
42
|
-
for (const [key, value] of Object.entries(metadata ?? {})) {
|
|
43
|
-
this.native.otelSpan.setAttribute(`${LangfuseOtelSpanAttributes.TRACE_METADATA}.${key}`, String(value));
|
|
44
|
-
}
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
end(endTime) {
|
|
48
|
-
this.native.end(endTime);
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var ProductionTraceBackend = class {
|
|
53
|
-
constructor(provider, processor) {
|
|
54
|
-
this.provider = provider;
|
|
55
|
-
this.processor = processor;
|
|
56
|
-
}
|
|
57
|
-
provider;
|
|
58
|
-
processor;
|
|
59
|
-
start(name, attributes, options) {
|
|
60
|
-
const { sessionId, userId, ...observationAttributes } = attributes;
|
|
61
|
-
const parent = options.parent;
|
|
62
|
-
const native = parent instanceof ProductionObservation ? startChild(parent.native, name, observationAttributes, options.asType) : startRoot(name, observationAttributes, options.asType);
|
|
63
|
-
applySessionId(native, sessionId);
|
|
64
|
-
applyUserId(native, userId);
|
|
65
|
-
return new ProductionObservation(native);
|
|
66
|
-
}
|
|
67
|
-
async forceFlush() {
|
|
68
|
-
await this.processor.forceFlush();
|
|
69
|
-
}
|
|
70
|
-
async shutdown() {
|
|
71
|
-
await this.provider.shutdown();
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
async function createProductionBackend(config, factoryOverrides = {}) {
|
|
75
|
-
const globalRuntime = globalThis;
|
|
76
|
-
const fingerprint = configFingerprint(config);
|
|
77
|
-
const existing = globalRuntime[RUNTIME_KEY];
|
|
78
|
-
if (existing) {
|
|
79
|
-
const runtime = await existing;
|
|
80
|
-
if (runtime.shutdown) {
|
|
81
|
-
throw new Error("Langfuse tracing was already shut down; restart Pi to enable it again.");
|
|
82
|
-
}
|
|
83
|
-
if (runtime.fingerprint !== fingerprint) {
|
|
84
|
-
throw new Error("Langfuse configuration changed; restart Pi to apply the new credentials.");
|
|
85
|
-
}
|
|
86
|
-
return runtime.backend;
|
|
87
|
-
}
|
|
88
|
-
const factories = { ...defaultFactories, ...factoryOverrides };
|
|
89
|
-
const initializing = initializeRuntime(config, fingerprint, factories);
|
|
90
|
-
globalRuntime[RUNTIME_KEY] = initializing;
|
|
91
|
-
try {
|
|
92
|
-
return (await initializing).backend;
|
|
93
|
-
} catch (error) {
|
|
94
|
-
delete globalRuntime[RUNTIME_KEY];
|
|
95
|
-
throw error;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
async function initializeRuntime(config, fingerprint, factories) {
|
|
99
|
-
const processor = factories.createProcessor(config);
|
|
100
|
-
let provider;
|
|
101
|
-
try {
|
|
102
|
-
provider = factories.createProvider(processor);
|
|
103
|
-
factories.selectProvider(provider);
|
|
104
|
-
} catch (error) {
|
|
105
|
-
await (provider?.shutdown() ?? processor.shutdown()).catch(() => void 0);
|
|
106
|
-
throw error;
|
|
107
|
-
}
|
|
108
|
-
const backend = new ProductionTraceBackend(provider, processor);
|
|
109
|
-
const runtime = { fingerprint, backend, shutdown: false };
|
|
110
|
-
const originalShutdown = backend.shutdown.bind(backend);
|
|
111
|
-
backend.shutdown = async () => {
|
|
112
|
-
if (runtime.shutdown) return;
|
|
113
|
-
runtime.shutdown = true;
|
|
114
|
-
await originalShutdown();
|
|
115
|
-
};
|
|
116
|
-
return runtime;
|
|
117
|
-
}
|
|
118
|
-
var defaultFactories = {
|
|
119
|
-
createProcessor: (config) => {
|
|
120
|
-
const secrets = [config.secretKey, config.publicKey];
|
|
121
|
-
return new LangfuseSpanProcessor({
|
|
122
|
-
publicKey: config.publicKey,
|
|
123
|
-
secretKey: config.secretKey,
|
|
124
|
-
baseUrl: config.baseUrl,
|
|
125
|
-
environment: config.environment ?? "",
|
|
126
|
-
release: config.release ?? "",
|
|
127
|
-
flushAt: 512,
|
|
128
|
-
flushInterval: 5,
|
|
129
|
-
timeout: 5,
|
|
130
|
-
mask: ({ data }) => maskSecrets(data, secrets),
|
|
131
|
-
shouldExportSpan: ({ otelSpan }) => typeof otelSpan.attributes["langfuse.observation.type"] === "string"
|
|
132
|
-
});
|
|
133
|
-
},
|
|
134
|
-
createProvider: (processor) => new NodeTracerProvider({ spanProcessors: [processor] }),
|
|
135
|
-
selectProvider: setLangfuseTracerProvider
|
|
136
|
-
};
|
|
137
|
-
function applySessionId(observation, sessionId) {
|
|
138
|
-
if (sessionId !== void 0) {
|
|
139
|
-
observation.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_SESSION_ID, sessionId);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function applyUserId(observation, userId) {
|
|
143
|
-
if (userId !== void 0) {
|
|
144
|
-
observation.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_USER_ID, userId);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function startRoot(name, attributes, type) {
|
|
148
|
-
if (type === "agent") {
|
|
149
|
-
return startObservation(name, attributes, { asType: "agent" });
|
|
150
|
-
}
|
|
151
|
-
if (type === "generation") {
|
|
152
|
-
return startObservation(name, attributes, {
|
|
153
|
-
asType: "generation"
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
if (type === "tool") {
|
|
157
|
-
return startObservation(name, attributes, { asType: "tool" });
|
|
158
|
-
}
|
|
159
|
-
return startObservation(name, attributes, { asType: "span" });
|
|
160
|
-
}
|
|
161
|
-
function startChild(parent, name, attributes, type) {
|
|
162
|
-
if (type === "agent") {
|
|
163
|
-
return parent.startObservation(name, attributes, {
|
|
164
|
-
asType: "agent"
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
if (type === "generation") {
|
|
168
|
-
return parent.startObservation(name, attributes, {
|
|
169
|
-
asType: "generation"
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
if (type === "tool") {
|
|
173
|
-
return parent.startObservation(name, attributes, {
|
|
174
|
-
asType: "tool"
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
return parent.startObservation(name, attributes, {
|
|
178
|
-
asType: "span"
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
function configFingerprint(config) {
|
|
182
|
-
return createHash("sha256").update(
|
|
183
|
-
`${config.publicKey}\0${config.secretKey}\0${config.baseUrl}\0${config.environment ?? ""}\0${config.release ?? ""}`
|
|
184
|
-
).digest("hex");
|
|
185
|
-
}
|
|
186
|
-
function maskSecrets(data, secrets) {
|
|
187
|
-
return maskSecretValue(data, secrets, /* @__PURE__ */ new WeakSet());
|
|
188
|
-
}
|
|
189
|
-
function maskSecretValue(data, secrets, active) {
|
|
190
|
-
if (typeof data === "string") {
|
|
191
|
-
let masked = data.replace(/\b(?:sk|pk)-lf-[A-Za-z0-9_-]+\b/g, "[LANGFUSE_KEY_REDACTED]");
|
|
192
|
-
for (const secret of secrets) {
|
|
193
|
-
if (secret) masked = masked.replaceAll(secret, "[LANGFUSE_KEY_REDACTED]");
|
|
194
|
-
}
|
|
195
|
-
return masked;
|
|
196
|
-
}
|
|
197
|
-
if (!data || typeof data !== "object") return data;
|
|
198
|
-
if (active.has(data)) return "[circular]";
|
|
199
|
-
active.add(data);
|
|
200
|
-
try {
|
|
201
|
-
if (Array.isArray(data)) {
|
|
202
|
-
return data.map((item) => maskSecretValue(item, secrets, active));
|
|
203
|
-
}
|
|
204
|
-
return Object.fromEntries(
|
|
205
|
-
Object.entries(data).map(([key, value]) => [key, maskSecretValue(value, secrets, active)])
|
|
206
|
-
);
|
|
207
|
-
} finally {
|
|
208
|
-
active.delete(data);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
export {
|
|
212
|
-
createProductionBackend,
|
|
213
|
-
maskSecrets
|
|
214
|
-
};
|
|
215
|
-
//# sourceMappingURL=runtime-X75FRK2E.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/runtime.ts"],
|
|
4
|
-
"sourcesContent": ["import { createHash } from \"node:crypto\";\nimport { LangfuseSpanProcessor } from \"@langfuse/otel\";\nimport {\n type LangfuseObservation,\n type LangfuseObservationAttributes,\n LangfuseOtelSpanAttributes,\n setLangfuseTracerProvider,\n startObservation,\n} from \"@langfuse/tracing\";\nimport type { SpanProcessor } from \"@opentelemetry/sdk-trace-base\";\nimport { NodeTracerProvider } from \"@opentelemetry/sdk-trace-node\";\nimport type { LangfuseConfig } from \"./config.js\";\nimport type { Observation, ObservationAttributes, ObservationType, TraceBackend } from \"./tracing.js\";\n\nconst RUNTIME_KEY = Symbol.for(\"@narumitw/pi-langfuse/runtime/v1\");\n\ninterface SharedRuntime {\n fingerprint: string;\n backend: ProductionTraceBackend;\n shutdown: boolean;\n}\n\ntype GlobalWithRuntime = typeof globalThis & {\n [RUNTIME_KEY]?: Promise<SharedRuntime>;\n};\n\nexport interface RuntimeFactories {\n createProcessor(config: LangfuseConfig): SpanProcessor;\n createProvider(processor: SpanProcessor): NodeTracerProvider;\n selectProvider(provider: NodeTracerProvider): void;\n}\n\nclass ProductionObservation implements Observation {\n constructor(readonly native: LangfuseObservation) {}\n\n update(attributes: ObservationAttributes): Observation {\n const { sessionId, userId, ...observationAttributes } = attributes;\n this.native.updateOtelSpanAttributes(observationAttributes as LangfuseObservationAttributes);\n applySessionId(this.native, sessionId);\n applyUserId(this.native, userId);\n return this;\n }\n\n updateTrace(attributes: ObservationAttributes): Observation {\n const { input, output, metadata, name, sessionId, userId, tags, version } = attributes;\n if (input !== undefined || output !== undefined) {\n this.native.setTraceIO({ input, output });\n }\n if (name !== undefined) {\n this.native.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_NAME, name);\n }\n applySessionId(this.native, sessionId);\n applyUserId(this.native, userId);\n if (tags !== undefined) {\n this.native.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_TAGS, tags);\n }\n if (version !== undefined) {\n this.native.otelSpan.setAttribute(LangfuseOtelSpanAttributes.VERSION, version);\n }\n for (const [key, value] of Object.entries(metadata ?? {})) {\n this.native.otelSpan.setAttribute(`${LangfuseOtelSpanAttributes.TRACE_METADATA}.${key}`, String(value));\n }\n return this;\n }\n\n end(endTime?: number): Observation {\n this.native.end(endTime);\n return this;\n }\n}\n\nclass ProductionTraceBackend implements TraceBackend {\n constructor(\n private readonly provider: NodeTracerProvider,\n private readonly processor: SpanProcessor,\n ) {}\n\n start(\n name: string,\n attributes: ObservationAttributes,\n options: { asType: ObservationType; parent?: Observation },\n ): Observation {\n const { sessionId, userId, ...observationAttributes } = attributes;\n const parent = options.parent;\n const native =\n parent instanceof ProductionObservation\n ? startChild(parent.native, name, observationAttributes, options.asType)\n : startRoot(name, observationAttributes, options.asType);\n applySessionId(native, sessionId);\n applyUserId(native, userId);\n return new ProductionObservation(native);\n }\n\n async forceFlush(): Promise<void> {\n await this.processor.forceFlush();\n }\n\n async shutdown(): Promise<void> {\n await this.provider.shutdown();\n }\n}\n\nexport async function createProductionBackend(\n config: LangfuseConfig,\n factoryOverrides: Partial<RuntimeFactories> = {},\n): Promise<TraceBackend> {\n const globalRuntime = globalThis as GlobalWithRuntime;\n const fingerprint = configFingerprint(config);\n const existing = globalRuntime[RUNTIME_KEY];\n if (existing) {\n const runtime = await existing;\n if (runtime.shutdown) {\n throw new Error(\"Langfuse tracing was already shut down; restart Pi to enable it again.\");\n }\n if (runtime.fingerprint !== fingerprint) {\n throw new Error(\"Langfuse configuration changed; restart Pi to apply the new credentials.\");\n }\n return runtime.backend;\n }\n\n const factories = { ...defaultFactories, ...factoryOverrides };\n const initializing = initializeRuntime(config, fingerprint, factories);\n globalRuntime[RUNTIME_KEY] = initializing;\n try {\n return (await initializing).backend;\n } catch (error) {\n delete globalRuntime[RUNTIME_KEY];\n throw error;\n }\n}\n\nasync function initializeRuntime(\n config: LangfuseConfig,\n fingerprint: string,\n factories: RuntimeFactories,\n): Promise<SharedRuntime> {\n const processor = factories.createProcessor(config);\n let provider: NodeTracerProvider | undefined;\n try {\n provider = factories.createProvider(processor);\n factories.selectProvider(provider);\n } catch (error) {\n await (provider?.shutdown() ?? processor.shutdown()).catch(() => undefined);\n throw error;\n }\n const backend = new ProductionTraceBackend(provider, processor);\n const runtime: SharedRuntime = { fingerprint, backend, shutdown: false };\n const originalShutdown = backend.shutdown.bind(backend);\n backend.shutdown = async () => {\n if (runtime.shutdown) return;\n runtime.shutdown = true;\n await originalShutdown();\n };\n return runtime;\n}\n\nconst defaultFactories: RuntimeFactories = {\n createProcessor: (config) => {\n const secrets = [config.secretKey, config.publicKey];\n return new LangfuseSpanProcessor({\n publicKey: config.publicKey,\n secretKey: config.secretKey,\n baseUrl: config.baseUrl,\n environment: config.environment ?? \"\",\n release: config.release ?? \"\",\n flushAt: 512,\n flushInterval: 5,\n timeout: 5,\n mask: ({ data }) => maskSecrets(data, secrets),\n shouldExportSpan: ({ otelSpan }) => typeof otelSpan.attributes[\"langfuse.observation.type\"] === \"string\",\n });\n },\n createProvider: (processor) => new NodeTracerProvider({ spanProcessors: [processor] }),\n selectProvider: setLangfuseTracerProvider,\n};\n\nfunction applySessionId(observation: LangfuseObservation, sessionId: string | undefined): void {\n if (sessionId !== undefined) {\n observation.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_SESSION_ID, sessionId);\n }\n}\n\nfunction applyUserId(observation: LangfuseObservation, userId: string | undefined): void {\n if (userId !== undefined) {\n observation.otelSpan.setAttribute(LangfuseOtelSpanAttributes.TRACE_USER_ID, userId);\n }\n}\n\nfunction startRoot(name: string, attributes: ObservationAttributes, type: ObservationType): LangfuseObservation {\n if (type === \"agent\") {\n return startObservation(name, attributes as LangfuseObservationAttributes, { asType: \"agent\" });\n }\n if (type === \"generation\") {\n return startObservation(name, attributes as LangfuseObservationAttributes, {\n asType: \"generation\",\n });\n }\n if (type === \"tool\") {\n return startObservation(name, attributes as LangfuseObservationAttributes, { asType: \"tool\" });\n }\n return startObservation(name, attributes as LangfuseObservationAttributes, { asType: \"span\" });\n}\n\nfunction startChild(\n parent: LangfuseObservation,\n name: string,\n attributes: ObservationAttributes,\n type: ObservationType,\n): LangfuseObservation {\n if (type === \"agent\") {\n return parent.startObservation(name, attributes as LangfuseObservationAttributes, {\n asType: \"agent\",\n });\n }\n if (type === \"generation\") {\n return parent.startObservation(name, attributes as LangfuseObservationAttributes, {\n asType: \"generation\",\n });\n }\n if (type === \"tool\") {\n return parent.startObservation(name, attributes as LangfuseObservationAttributes, {\n asType: \"tool\",\n });\n }\n return parent.startObservation(name, attributes as LangfuseObservationAttributes, {\n asType: \"span\",\n });\n}\n\nfunction configFingerprint(config: LangfuseConfig): string {\n return createHash(\"sha256\")\n .update(\n `${config.publicKey}\\0${config.secretKey}\\0${config.baseUrl}\\0${config.environment ?? \"\"}\\0${config.release ?? \"\"}`,\n )\n .digest(\"hex\");\n}\n\nexport function maskSecrets(data: unknown, secrets: readonly string[]): unknown {\n return maskSecretValue(data, secrets, new WeakSet<object>());\n}\n\nfunction maskSecretValue(data: unknown, secrets: readonly string[], active: WeakSet<object>): unknown {\n if (typeof data === \"string\") {\n let masked = data.replace(/\\b(?:sk|pk)-lf-[A-Za-z0-9_-]+\\b/g, \"[LANGFUSE_KEY_REDACTED]\");\n for (const secret of secrets) {\n if (secret) masked = masked.replaceAll(secret, \"[LANGFUSE_KEY_REDACTED]\");\n }\n return masked;\n }\n if (!data || typeof data !== \"object\") return data;\n if (active.has(data)) return \"[circular]\";\n\n active.add(data);\n try {\n if (Array.isArray(data)) {\n return data.map((item) => maskSecretValue(item, secrets, active));\n }\n return Object.fromEntries(\n Object.entries(data).map(([key, value]) => [key, maskSecretValue(value, secrets, active)]),\n );\n } finally {\n active.delete(data);\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,6BAA6B;AACtC;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,0BAA0B;AAInC,IAAM,cAAc,uBAAO,IAAI,kCAAkC;AAkBjE,IAAM,wBAAN,MAAmD;AAAA,EACjD,YAAqB,QAA6B;AAA7B;AAAA,EAA8B;AAAA,EAA9B;AAAA,EAErB,OAAO,YAAgD;AACrD,UAAM,EAAE,WAAW,QAAQ,GAAG,sBAAsB,IAAI;AACxD,SAAK,OAAO,yBAA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