@rudderjs/ai 1.2.0 → 1.4.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/README.md +74 -2
- package/boost/guidelines.md +24 -1
- package/dist/agent.d.ts +104 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +377 -79
- package/dist/agent.js.map +1 -1
- package/dist/conversation-persistence.d.ts +46 -0
- package/dist/conversation-persistence.d.ts.map +1 -0
- package/dist/conversation-persistence.js +152 -0
- package/dist/conversation-persistence.js.map +1 -0
- package/dist/conversation.d.ts +2 -7
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +3 -1
- package/dist/conversation.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/providers/anthropic.d.ts +3 -0
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +61 -10
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/google-cache-registry.d.ts +145 -0
- package/dist/providers/google-cache-registry.d.ts.map +1 -0
- package/dist/providers/google-cache-registry.js +209 -0
- package/dist/providers/google-cache-registry.js.map +1 -0
- package/dist/providers/google.d.ts +21 -2
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +90 -36
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/openai.d.ts +10 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +57 -6
- package/dist/providers/openai.js.map +1 -1
- package/dist/server/provider.d.ts +8 -0
- package/dist/server/provider.d.ts.map +1 -1
- package/dist/server/provider.js +17 -1
- package/dist/server/provider.js.map +1 -1
- package/dist/sub-agent-run-store.d.ts +106 -0
- package/dist/sub-agent-run-store.d.ts.map +1 -0
- package/dist/sub-agent-run-store.js +80 -0
- package/dist/sub-agent-run-store.js.map +1 -0
- package/dist/types.d.ts +174 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/util/hash.d.ts +11 -0
- package/dist/util/hash.d.ts.map +1 -0
- package/dist/util/hash.js +23 -0
- package/dist/util/hash.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -231,7 +231,7 @@ new Researcher().asTool({
|
|
|
231
231
|
})
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
The wrapped subagent runs via `prompt()` (non-streaming)
|
|
234
|
+
The wrapped subagent runs via `prompt()` (non-streaming) by default — to surface inner-agent progress as `tool-update` chunks in the parent stream, pass `streaming: true` (or a custom `(chunk) => SubAgentUpdate | null` projector). When the sub-agent's model emits a *client* tool call, opt into the suspend/resume protocol with `suspendable: { runStore }` — the parent loop halts with the inner agent's `pendingClientToolCalls`, the snapshot persists in the run store, and the host resumes via `Agent.resumeAsTool(subRunId, browserResults, { runStore, agent })`. See `docs/guide/ai.md` for the full flow. `InMemorySubAgentRunStore` works for tests; `CachedSubAgentRunStore` plugs into `@rudderjs/cache` for cross-process persistence. Suspend without streaming throws at builder time.
|
|
235
235
|
|
|
236
236
|
### Tool execution context
|
|
237
237
|
|
|
@@ -252,7 +252,7 @@ const myTool = toolDefinition({
|
|
|
252
252
|
})
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
The primary consumer is `@
|
|
255
|
+
The primary consumer is `@pilotiq-pro/ai`'s `runAgentTool`, which uses
|
|
256
256
|
`ctx.toolCallId` to correlate sub-agent suspensions with the parent's
|
|
257
257
|
`run_agent` call (see "Pausing the loop from a server tool" below).
|
|
258
258
|
|
|
@@ -338,6 +338,63 @@ const output = Output.object({
|
|
|
338
338
|
// Use with agent (append output instructions to system prompt)
|
|
339
339
|
```
|
|
340
340
|
|
|
341
|
+
### Prompt caching
|
|
342
|
+
|
|
343
|
+
Mark stable parts of the prompt as cacheable. Provider adapters translate the markers to native primitives — Anthropic adds `cache_control: { type: 'ephemeral' }` to the last content block of each marked region. Cache hits typically save 50–90% on input tokens for long system prompts and tool definitions.
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
class SupportAgent extends Agent {
|
|
347
|
+
instructions() { return LONG_SYSTEM_PROMPT } // 50k tokens of policy
|
|
348
|
+
tools() { return [...biggToolList] } // 30k tokens of tool defs
|
|
349
|
+
|
|
350
|
+
cacheable() {
|
|
351
|
+
return { instructions: true, tools: true }
|
|
352
|
+
// ^ both eligible — Anthropic caches up to the last marked block
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
await new SupportAgent().prompt('How do I reset my password?')
|
|
357
|
+
// ↑ first call: cache miss; subsequent calls within 5 minutes: cache hit
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Cache the first N messages of a multi-turn conversation:
|
|
361
|
+
|
|
362
|
+
```ts
|
|
363
|
+
class ChatAgent extends Agent {
|
|
364
|
+
cacheable() { return { messages: 4 } } // cache up to message[3]
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Per-call override:
|
|
369
|
+
|
|
370
|
+
```ts
|
|
371
|
+
await agent.prompt('one-off', { cache: false }) // disable for this call
|
|
372
|
+
await agent.prompt('different', { cache: { tools: true } }) // replace agent default
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
Google's `cachedContent` is the only provider with a stateful cache resource — its TTL is configurable via the `ttl` field (default `'1h'`):
|
|
376
|
+
|
|
377
|
+
```ts
|
|
378
|
+
class SupportAgent extends Agent {
|
|
379
|
+
cacheable() {
|
|
380
|
+
return { instructions: true, tools: true, ttl: '6h' }
|
|
381
|
+
// ^ Google-only; Anthropic/OpenAI ignore it
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
When `@rudderjs/cache` is installed and registered, the Google cache registry uses it for cross-process / cross-restart persistence so multi-worker deployments don't create duplicate cache resources. Without it, the registry falls back to in-memory storage and warns once on first use.
|
|
387
|
+
|
|
388
|
+
**Provider support:**
|
|
389
|
+
|
|
390
|
+
| Provider | Status |
|
|
391
|
+
|---|---|
|
|
392
|
+
| Anthropic | ✓ — `cache_control` on system, tools, and Nth message |
|
|
393
|
+
| OpenAI | ✓ — `prompt_cache_key` for routing affinity (caching is automatic above 1024 tokens) |
|
|
394
|
+
| Google | ✓ — `cachedContent` resource translation, with TTL refresh and 404 recovery |
|
|
395
|
+
|
|
396
|
+
Other adapters ignore the markers — the request runs uncached.
|
|
397
|
+
|
|
341
398
|
### Failover
|
|
342
399
|
|
|
343
400
|
Try multiple providers in order — if the primary fails, fall through to the next:
|
|
@@ -547,6 +604,21 @@ const response = await agent('You are helpful.').prompt('Follow up question', {
|
|
|
547
604
|
|
|
548
605
|
Works with both `.prompt()` and `.stream()`. History messages are prepended after the system prompt, before the current user message.
|
|
549
606
|
|
|
607
|
+
### Auto-persist conversations
|
|
608
|
+
|
|
609
|
+
Override `conversational()` on an agent class to auto-load and auto-save threads without threading user ids through every call site:
|
|
610
|
+
|
|
611
|
+
```ts
|
|
612
|
+
class ChatAgent extends Agent {
|
|
613
|
+
conversational() { return { user: Auth.user()?.id } }
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
await new ChatAgent().prompt('Hi') // auto-loads + auto-saves
|
|
617
|
+
await new ChatAgent().prompt('Continue?') // resumes same thread (per user + class)
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
Returning `false` (the default) keeps the agent stateless. Async returns are awaited; an optional `historyLimit` caps loaded messages. Per-call escape hatches: `prompt(input, { conversation: false })` or `agent.forUser(id).prompt()` / `agent.continue(id).prompt()` — explicit always wins. See `docs/guide/ai.md` for the full precedence chain.
|
|
621
|
+
|
|
550
622
|
### Model Selection
|
|
551
623
|
|
|
552
624
|
Configure available models for user selection (used by `@rudderjs/panels` chat UI):
|
package/boost/guidelines.md
CHANGED
|
@@ -50,6 +50,17 @@ Provider auto-discovery (`defaultProviders()`) finds `AiProvider` automatically
|
|
|
50
50
|
|
|
51
51
|
Agents support failover: `failover() { return ['openai/gpt-4o'] }`. The same pattern is on the media generators: `ImageGenerator.of('...').model('openai/dall-e-3').failover('google/imagen-3').generate()` (also `AudioGenerator`, `Transcription`).
|
|
52
52
|
|
|
53
|
+
**Prompt caching.** Mark stable parts of the prompt as cacheable — providers translate to native primitives (Anthropic `cache_control`, OpenAI `prompt_cache_key`, Google `cachedContent`).
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
class SupportAgent extends Agent {
|
|
57
|
+
cacheable() { return { instructions: true, tools: true, messages: 2 } }
|
|
58
|
+
// ^ cache first 2 messages
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Per-call override: `agent.prompt(input, { cache: false })` to disable; `{ cache: {...} }` to replace. All three big providers (Anthropic, OpenAI, Google) are wired up. The `ttl` field is Google-only and defaults to `'1h'`; Anthropic and OpenAI ignore it.
|
|
63
|
+
|
|
53
64
|
### Tools
|
|
54
65
|
|
|
55
66
|
Define tools with Zod schemas. Tools are either `server` (executed on backend) or `client` (forwarded to frontend):
|
|
@@ -80,7 +91,7 @@ class Planner extends Agent implements HasTools {
|
|
|
80
91
|
}
|
|
81
92
|
```
|
|
82
93
|
|
|
83
|
-
|
|
94
|
+
By default the subagent runs via `prompt()` (non-streaming). Pass `streaming: true` to surface inner progress as `tool-update` chunks (default projection emits `agent_start` / `tool_call` / `agent_done`); pass `(chunk) => SubAgentUpdate | null` for a custom projector. To propagate inner client-tool calls upward through the parent loop, also pass `suspendable: { runStore }` (suspend without streaming throws at builder time) — the host's continuation calls `Agent.resumeAsTool(subRunId, results, { runStore, agent })` to resume the inner agent with the browser's results. `InMemorySubAgentRunStore` works for tests; `CachedSubAgentRunStore` plugs into `@rudderjs/cache` for multi-worker persistence.
|
|
84
95
|
|
|
85
96
|
### Middleware
|
|
86
97
|
|
|
@@ -124,6 +135,18 @@ const response = await myAgent.forUser('user-123').prompt('Hello') // creates c
|
|
|
124
135
|
const follow = await myAgent.continue(response.conversationId).prompt('Follow up')
|
|
125
136
|
```
|
|
126
137
|
|
|
138
|
+
For chat agents that should always auto-persist for the active user, override `conversational()` on the class — `agent.prompt(input)` then auto-loads + auto-saves without each caller passing the user id:
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
class ChatAgent extends Agent {
|
|
142
|
+
conversational() { return { user: Auth.user()?.id } } // null user → opt-out
|
|
143
|
+
}
|
|
144
|
+
await new ChatAgent().prompt('Hi') // auto-loads thread
|
|
145
|
+
await new ChatAgent().prompt('still you?') // resumes per (user, class)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Returning `false` (default) keeps the agent stateless. Optional `historyLimit: N` caps loaded messages. Per-call `{ conversation: false }` opts out; `forUser`/`continue` always win.
|
|
149
|
+
|
|
127
150
|
### Streaming
|
|
128
151
|
|
|
129
152
|
Use `.stream()` for real-time token delivery:
|
package/dist/agent.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { ServerToolBuilder } from './tool.js';
|
|
3
3
|
import { QueuedPromptBuilder } from './queue-job.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { SubAgentRunStore } from './sub-agent-run-store.js';
|
|
5
|
+
import type { AgentPromptOptions, AiMessage, AiMiddleware, AgentResponse, AgentStep, AgentStreamResponse, AnyTool, CacheableConfig, ConversationalSpec, ConversationStore, SubAgentUpdate, HasMiddleware, HasTools, PrepareStepResult, StopCondition, StreamChunk } from './types.js';
|
|
5
6
|
/** Stop after N steps */
|
|
6
7
|
export declare function stepCountIs(n: number): StopCondition;
|
|
7
8
|
/** Stop when a specific tool is called in the latest step */
|
|
@@ -27,6 +28,58 @@ export declare abstract class Agent {
|
|
|
27
28
|
temperature(): number | undefined;
|
|
28
29
|
/** Max tokens for response */
|
|
29
30
|
maxTokens(): number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Declarative prompt-cache configuration.
|
|
33
|
+
*
|
|
34
|
+
* Override on a subclass to mark stable parts of the prompt as cacheable
|
|
35
|
+
* — provider adapters translate to native primitives (Anthropic
|
|
36
|
+
* `cache_control`, OpenAI `prompt_cache_key`, Google `cachedContent`)
|
|
37
|
+
* so cache hits can save 50–90% on input tokens for long system prompts,
|
|
38
|
+
* tool definitions, or stable conversation context.
|
|
39
|
+
*
|
|
40
|
+
* Returning `undefined` (the default) means no caching. Per-call override
|
|
41
|
+
* via `agent.prompt(input, { cache: false })` disables caching for that
|
|
42
|
+
* call; passing a {@link CacheableConfig} for `cache` replaces the agent
|
|
43
|
+
* default for that call.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* class SupportAgent extends Agent {
|
|
47
|
+
* instructions() { return LONG_SYSTEM_PROMPT }
|
|
48
|
+
* tools() { return [tool1, tool2, tool3] }
|
|
49
|
+
* cacheable() {
|
|
50
|
+
* return { instructions: true, tools: true }
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
*/
|
|
54
|
+
cacheable(): CacheableConfig | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Opt into auto-persisted conversation behavior. Override on a subclass
|
|
57
|
+
* to declare *which* user owns the thread and (optionally) which
|
|
58
|
+
* specific thread, and the framework will load history before each
|
|
59
|
+
* `prompt()`/`stream()` call and append the new turn after it — without
|
|
60
|
+
* any caller having to remember `forUser()` / `continue()`.
|
|
61
|
+
*
|
|
62
|
+
* Returning `false` (the default) disables auto-persist; the agent runs
|
|
63
|
+
* stateless. Returning a {@link ConversationalSpec} opts in:
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* class ChatAgent extends Agent {
|
|
67
|
+
* conversational() {
|
|
68
|
+
* return { user: Auth.user()?.id } // null user → falsy → opt-out
|
|
69
|
+
* }
|
|
70
|
+
* }
|
|
71
|
+
*
|
|
72
|
+
* await new ChatAgent().prompt('Hi') // auto-loads + auto-saves
|
|
73
|
+
*
|
|
74
|
+
* **Precedence (high → low):**
|
|
75
|
+
* 1. Explicit `agent.forUser(id).prompt()` / `agent.continue(id).prompt()`
|
|
76
|
+
* 2. Per-call `prompt(input, { conversation: false | {...} })`
|
|
77
|
+
* 3. This method's return value
|
|
78
|
+
*
|
|
79
|
+
* Async returns are supported — useful when the user identity is fetched
|
|
80
|
+
* from an async DI binding.
|
|
81
|
+
*/
|
|
82
|
+
conversational(): false | ConversationalSpec | Promise<false | ConversationalSpec>;
|
|
30
83
|
/**
|
|
31
84
|
* Default for `AgentPromptOptions.parallelTools`. When `true` (default),
|
|
32
85
|
* multiple tool calls within a single step run their `execute()` functions
|
|
@@ -78,15 +131,57 @@ export declare abstract class Agent {
|
|
|
78
131
|
inputSchema: TInput;
|
|
79
132
|
prompt: (input: z.infer<TInput>) => string;
|
|
80
133
|
modelOutput?: (response: AgentResponse) => string | Promise<string>;
|
|
134
|
+
streaming?: AsToolStreamingOption;
|
|
135
|
+
suspendable?: AsToolSuspendableOption;
|
|
81
136
|
}): ServerToolBuilder<z.infer<TInput>, AgentResponse>;
|
|
82
137
|
asTool(options: {
|
|
83
138
|
name: string;
|
|
84
139
|
description: string;
|
|
85
140
|
modelOutput?: (response: AgentResponse) => string | Promise<string>;
|
|
141
|
+
streaming?: AsToolStreamingOption;
|
|
142
|
+
suspendable?: AsToolSuspendableOption;
|
|
86
143
|
}): ServerToolBuilder<{
|
|
87
144
|
prompt: string;
|
|
88
145
|
}, AgentResponse>;
|
|
146
|
+
/**
|
|
147
|
+
* Resume a sub-agent run that previously paused with
|
|
148
|
+
* `pauseForClientTools` (typically from {@link Agent.asTool} with
|
|
149
|
+
* `suspendable: { runStore }` set). Loads the snapshot, validates the
|
|
150
|
+
* incoming tool-result ids against the pending set, and re-runs the
|
|
151
|
+
* inner loop with those results appended.
|
|
152
|
+
*
|
|
153
|
+
* Returns either a `'completed'` result (the inner agent finished) or
|
|
154
|
+
* a `'paused'` continuation pointing at a fresh `subRunId` for the
|
|
155
|
+
* next round-trip.
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* const r = await Agent.resumeAsTool(subRunId, browserResults, { runStore, agent: subAgent })
|
|
159
|
+
* if (r.kind === 'completed') {
|
|
160
|
+
* feedToolResultBackToParent(r.response.text)
|
|
161
|
+
* } else {
|
|
162
|
+
* emitPendingClientToolsSse(r.subRunId, r.pendingToolCallIds)
|
|
163
|
+
* }
|
|
164
|
+
*/
|
|
165
|
+
static resumeAsTool(subRunId: string, clientToolResults: ReadonlyArray<{
|
|
166
|
+
toolCallId: string;
|
|
167
|
+
result: unknown;
|
|
168
|
+
}>, options: {
|
|
169
|
+
runStore: SubAgentRunStore;
|
|
170
|
+
agent: Agent;
|
|
171
|
+
}): Promise<{
|
|
172
|
+
kind: 'completed';
|
|
173
|
+
response: AgentResponse;
|
|
174
|
+
} | {
|
|
175
|
+
kind: 'paused';
|
|
176
|
+
subRunId: string;
|
|
177
|
+
pendingToolCallIds: string[];
|
|
178
|
+
}>;
|
|
89
179
|
}
|
|
180
|
+
type ChunkProjector = (chunk: StreamChunk) => SubAgentUpdate | null;
|
|
181
|
+
type AsToolStreamingOption = boolean | ChunkProjector;
|
|
182
|
+
type AsToolSuspendableOption = {
|
|
183
|
+
runStore: SubAgentRunStore;
|
|
184
|
+
};
|
|
90
185
|
/**
|
|
91
186
|
* Wraps an Agent to add conversation memory.
|
|
92
187
|
* Created via `agent.forUser(id)` or `agent.continue(id)`.
|
|
@@ -100,6 +195,13 @@ export declare class ConversableAgent {
|
|
|
100
195
|
continue(conversationId: string): this;
|
|
101
196
|
prompt(input: string, options?: AgentPromptOptions): Promise<AgentResponse>;
|
|
102
197
|
stream(input: string, options?: AgentPromptOptions): AgentStreamResponse;
|
|
198
|
+
/**
|
|
199
|
+
* Translate the wrapper's explicit-form state (`forUser` / `continue`)
|
|
200
|
+
* into a {@link ConversationalSpec}. The explicit chain bypasses the
|
|
201
|
+
* agent's `conversational()` declaration entirely — `forUser` always
|
|
202
|
+
* wins over class defaults.
|
|
203
|
+
*/
|
|
204
|
+
private toSpec;
|
|
103
205
|
}
|
|
104
206
|
/**
|
|
105
207
|
* Create an anonymous agent inline.
|
|
@@ -136,4 +238,5 @@ export interface InvalidToolArgumentsError {
|
|
|
136
238
|
message: string;
|
|
137
239
|
}>;
|
|
138
240
|
}
|
|
241
|
+
export {};
|
|
139
242
|
//# sourceMappingURL=agent.d.ts.map
|
package/dist/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,KAAK,EAA4B,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAMpD,OAAO,KAAK,EAAuB,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAYrF,OAAO,KAAK,EACV,kBAAkB,EAClB,SAAS,EACT,YAAY,EAEZ,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,OAAO,EACP,eAAe,EAIf,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EAEd,aAAa,EACb,QAAQ,EAER,iBAAiB,EAEjB,aAAa,EACb,WAAW,EAOZ,MAAM,YAAY,CAAA;AA8BnB,yBAAyB;AACzB,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,aAAa,CAEpD;AAED,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,CAK3D;AAID,8BAAsB,KAAK;IACzB,yCAAyC;IACzC,QAAQ,CAAC,YAAY,IAAI,MAAM;IAE/B,uFAAuF;IACvF,KAAK,IAAI,MAAM,GAAG,SAAS;IAE3B,sCAAsC;IACtC,QAAQ,IAAI,MAAM,EAAE;IAEpB,yDAAyD;IACzD,QAAQ,IAAI,MA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