@clowder-ai/connector-telegram 0.0.0-stage → 0.1.0-alpha.5
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.en.md +48 -0
- package/README.md +24 -2
- package/assets/icon.svg +4 -0
- package/dist/TelegramAdapter.d.ts +229 -0
- package/dist/TelegramAdapter.d.ts.map +1 -0
- package/dist/TelegramAdapter.js +923 -0
- package/dist/TelegramAdapter.js.map +1 -0
- package/dist/command-ingress.d.ts +10 -0
- package/dist/command-ingress.d.ts.map +1 -0
- package/dist/command-ingress.js +13 -0
- package/dist/command-ingress.js.map +1 -0
- package/dist/execution-status.d.ts +27 -0
- package/dist/execution-status.d.ts.map +1 -0
- package/dist/execution-status.js +48 -0
- package/dist/execution-status.js.map +1 -0
- package/dist/inbound-download.d.ts +13 -0
- package/dist/inbound-download.d.ts.map +1 -0
- package/dist/inbound-download.js +70 -0
- package/dist/inbound-download.js.map +1 -0
- package/dist/inbound-media-source.d.ts +25 -0
- package/dist/inbound-media-source.d.ts.map +1 -0
- package/dist/inbound-media-source.js +111 -0
- package/dist/inbound-media-source.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle-action.d.ts +30 -0
- package/dist/lifecycle-action.d.ts.map +1 -0
- package/dist/lifecycle-action.js +457 -0
- package/dist/lifecycle-action.js.map +1 -0
- package/dist/materialize-media.d.ts +7 -0
- package/dist/materialize-media.d.ts.map +1 -0
- package/dist/materialize-media.js +35 -0
- package/dist/materialize-media.js.map +1 -0
- package/dist/media-notice.d.ts +6 -0
- package/dist/media-notice.d.ts.map +1 -0
- package/dist/media-notice.js +50 -0
- package/dist/media-notice.js.map +1 -0
- package/dist/plugin-entrypoint.d.ts +7 -0
- package/dist/plugin-entrypoint.d.ts.map +1 -0
- package/dist/plugin-entrypoint.js +445 -0
- package/dist/plugin-entrypoint.js.map +1 -0
- package/dist/reply-sender-map.d.ts +10 -0
- package/dist/reply-sender-map.d.ts.map +1 -0
- package/dist/reply-sender-map.js +123 -0
- package/dist/reply-sender-map.js.map +1 -0
- package/dist/runtime.d.ts +61 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +82 -0
- package/dist/runtime.js.map +1 -0
- package/dist/telegram-html-formatter.d.ts +3 -0
- package/dist/telegram-html-formatter.d.ts.map +1 -0
- package/dist/telegram-html-formatter.js +42 -0
- package/dist/telegram-html-formatter.js.map +1 -0
- package/dist/thread-mappings.d.ts +46 -0
- package/dist/thread-mappings.d.ts.map +1 -0
- package/dist/thread-mappings.js +62 -0
- package/dist/thread-mappings.js.map +1 -0
- package/dist/token.d.ts +2 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/token.js +8 -0
- package/dist/token.js.map +1 -0
- package/dist/types.d.ts +58 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/npm-shrinkwrap.json +229 -0
- package/package.json +55 -4
- package/plugin.yaml +59 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Telegram Connector
|
|
2
|
+
|
|
3
|
+
[Chinese](README.md) · English
|
|
4
|
+
|
|
5
|
+
`@clowder-ai/connector-telegram` packages Telegram Bot long-poll ingress and Bot API egress for a Clowder AI
|
|
6
|
+
Host. It accepts private human messages, preserves Telegram message and file IDs, renders safe Telegram HTML,
|
|
7
|
+
splits messages without cutting surrogate pairs or HTML entities, and drains polling before shutdown.
|
|
8
|
+
|
|
9
|
+
## Authority boundary
|
|
10
|
+
|
|
11
|
+
The Host owns the bot token, connector/thread bindings, admission and wake routing, durable polling cursor,
|
|
12
|
+
delivery retry/dead-letter state, grants, and lifecycle. The package never derives wake authority from `@`
|
|
13
|
+
text and never writes an undeclared local cursor. Provider updates are sent only through a Host-issued opaque
|
|
14
|
+
`connector_binding` address.
|
|
15
|
+
|
|
16
|
+
## Configuration
|
|
17
|
+
|
|
18
|
+
`botToken` is a required secret issued by BotFather. The Host must project only this manifest-declared value;
|
|
19
|
+
the package does not read repository `.env` files or log the token.
|
|
20
|
+
|
|
21
|
+
## Safety and recovery
|
|
22
|
+
|
|
23
|
+
Only private, non-bot messages enter the connector. Long polling has bounded conflict backoff and closes the
|
|
24
|
+
Bot API session on drain. A Host-owned cursor is committed only after accepted delivery so restart and
|
|
25
|
+
rollback do not double-run the package and preserved Core poller.
|
|
26
|
+
|
|
27
|
+
The Host-loadable builtin runtime is implemented in this package and uses only the existing Host
|
|
28
|
+
config/secret, connector-binding, messaging, and state surfaces. Adapter exports remain testable with
|
|
29
|
+
isolated fixtures.
|
|
30
|
+
|
|
31
|
+
Inbound Telegram file IDs remain in manifest-declared private plugin state. Public messages contain only a
|
|
32
|
+
`pmr_*` reference and `sourceEventId`; the declared media source serves bounded chunks and settlement deletes
|
|
33
|
+
the private locator.
|
|
34
|
+
|
|
35
|
+
## Commands and configuration
|
|
36
|
+
|
|
37
|
+
The builtin entrypoint intercepts `/where`, `/new`, `/threads`, `/use`, `/thread`, `/commands`, `/cats`,
|
|
38
|
+
`/status`, `/history`, `/unbind`, `/allow-group`, `/deny-group`, `/focus`, and `/ask` before ordinary ingress.
|
|
39
|
+
Commands reply through the provider and keep their audit quiet. Only an explicit body in `/thread` or
|
|
40
|
+
`/ask` requests Agent invocation; successful delivery is acknowledged only after the Host accepts it.
|
|
41
|
+
`/use` traverses the owner-visible live thread inventory beyond the first 50 rows, deduplicates IDs and
|
|
42
|
+
rejects a non-progressing or exhausted traversal instead of selecting from an incomplete list.
|
|
43
|
+
|
|
44
|
+
This adapter supports direct conversations only. Configure the original account/login fields and receive messages;
|
|
45
|
+
there is no group-permission page, permission initialization or legacy-import step. Group management commands
|
|
46
|
+
do not grant a direct-message sender administrator authority. Existing stored data is not deleted.
|
|
47
|
+
|
|
48
|
+
The Host owns installation, grants, credentials and lifecycle; saving configuration preserves enable intent. The language link opens a separate document and does not imply automatic language selection.
|
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Telegram 连接器
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
简体中文 · [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
通过 Telegram Bot 与 Clowder AI 私聊,支持长轮询收消息、文本与媒体回复,以及安全的 Telegram HTML 排版。
|
|
6
|
+
|
|
7
|
+
## 开始使用
|
|
8
|
+
|
|
9
|
+
1. 使用 BotFather 创建机器人,取得 `botToken`。
|
|
10
|
+
2. 在插件设置保存这个密钥,然后启用插件。
|
|
11
|
+
3. 在 Telegram 私聊机器人。只接收人类用户的私聊,不接收机器人消息或群聊。
|
|
12
|
+
|
|
13
|
+
此连接器没有群权限设置或额外初始化步骤。群管理命令不会为私聊发送者授予管理员权限。
|
|
14
|
+
|
|
15
|
+
## 消息与恢复
|
|
16
|
+
|
|
17
|
+
回复按 Telegram 限制分段,避免截断 Unicode 字符或 HTML 实体。轮询游标在宿主确认接收后才提交;停用停止轮询并关闭会话。网络冲突采用有界退避。媒体文件标识仅存于私有状态,对外只提供受限引用,读取结算后清理。
|
|
18
|
+
|
|
19
|
+
## 对话命令
|
|
20
|
+
|
|
21
|
+
可使用 `/where`、`/new`、`/threads`、`/use`、`/thread`、`/commands`、`/cats`、`/status`、`/history`、`/unbind`、`/focus` 和 `/ask` 查看位置、切换对话或发起请求。`/thread`、`/ask` 只有显式携带正文时才请求猫执行,宿主接受投递后才确认成功。`/use` 会遍历可见对话,列表不完整时不猜测选择。
|
|
22
|
+
|
|
23
|
+
`/allow-group`、`/deny-group` 仅适用于支持群聊且已配置管理员的连接器,不能通过普通私聊文本取得管理权。
|
|
24
|
+
|
|
25
|
+
宿主管理安装、授权、凭据和启停;配置保存不自动改变启用意图。英文文档是独立文件,互链不代表页面已支持自动语言切换。
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telegram Bot Adapter
|
|
3
|
+
* Inbound: Parse Telegram update → extract private text message
|
|
4
|
+
* Outbound: Send reply via Bot API
|
|
5
|
+
*
|
|
6
|
+
* Uses grammy for long polling (no public webhook needed).
|
|
7
|
+
* MVP: DM-only, text-only, single-owner.
|
|
8
|
+
*
|
|
9
|
+
* F088 Multi-Platform Chat Gateway
|
|
10
|
+
*/
|
|
11
|
+
import { Bot, InputFile } from 'grammy';
|
|
12
|
+
import type { ConnectorLogger, RichBlock } from './types.js';
|
|
13
|
+
export declare const TELEGRAM_MEDIA_MAX_BYTES: {
|
|
14
|
+
readonly image: 10000000;
|
|
15
|
+
readonly file: 50000000;
|
|
16
|
+
readonly audio: 50000000;
|
|
17
|
+
};
|
|
18
|
+
type TelegramStartOptions = Parameters<Bot['start']>[0];
|
|
19
|
+
interface TelegramPollingControls {
|
|
20
|
+
start: (options: TelegramStartOptions) => Promise<void>;
|
|
21
|
+
stop: () => Promise<void>;
|
|
22
|
+
close: () => Promise<unknown>;
|
|
23
|
+
sleep: (ms: number) => Promise<void>;
|
|
24
|
+
backoffMs: readonly number[];
|
|
25
|
+
maxConflictRetries: number;
|
|
26
|
+
}
|
|
27
|
+
export interface TelegramAttachment {
|
|
28
|
+
type: 'image' | 'file' | 'audio';
|
|
29
|
+
telegramFileId: string;
|
|
30
|
+
fileName?: string;
|
|
31
|
+
duration?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface TelegramInboundMessage {
|
|
34
|
+
chatId: string;
|
|
35
|
+
text: string;
|
|
36
|
+
messageId: string;
|
|
37
|
+
senderId: string;
|
|
38
|
+
attachments?: TelegramAttachment[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Durable backing for the (executionId, chatId)-keyed inline-final map and the
|
|
42
|
+
* consumed markers. The Host-owned plugin storage survives restarts; the
|
|
43
|
+
* adapter stays storage-agnostic.
|
|
44
|
+
*/
|
|
45
|
+
export interface InlineFinalPersistence {
|
|
46
|
+
save(entry: {
|
|
47
|
+
readonly executionId: string;
|
|
48
|
+
readonly externalChatId: string;
|
|
49
|
+
readonly platformMessageId: string;
|
|
50
|
+
readonly registeredAt: number;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
remove(executionId: string, externalChatId: string): Promise<void>;
|
|
53
|
+
saveConsumed(entry: {
|
|
54
|
+
readonly executionId: string;
|
|
55
|
+
readonly externalChatId: string;
|
|
56
|
+
readonly consumedAt: number;
|
|
57
|
+
}): Promise<void>;
|
|
58
|
+
removeConsumed(executionId: string, externalChatId: string): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
export declare class TelegramAdapter {
|
|
61
|
+
readonly connectorId = "telegram";
|
|
62
|
+
private readonly bot;
|
|
63
|
+
private readonly botToken;
|
|
64
|
+
private readonly log;
|
|
65
|
+
private sendMessageFn;
|
|
66
|
+
private readonly placeholderChats;
|
|
67
|
+
/** Legacy deliveries without executionId remain FIFO; lifecycle deliveries use the exact map below. */
|
|
68
|
+
private readonly pendingInlineFinal;
|
|
69
|
+
/** Lifecycle+chat-keyed placeholders already consumed by a K2 inline final must not be edited again. */
|
|
70
|
+
private readonly pendingInlineFinalByLifecycle;
|
|
71
|
+
/** (executionId, chatId) -> consumedAt. A fresh `started` clears the marker for its key. */
|
|
72
|
+
private readonly consumedInlineFinal;
|
|
73
|
+
private readonly inlineFinalPersistence;
|
|
74
|
+
private botApiSendMessageFn;
|
|
75
|
+
private botApiEditMessageFn;
|
|
76
|
+
private botApiDeleteMessageFn;
|
|
77
|
+
private sendMediaFns;
|
|
78
|
+
private pollingStopped;
|
|
79
|
+
private pollingRunId;
|
|
80
|
+
private pollingControls;
|
|
81
|
+
private inboundFetchFn;
|
|
82
|
+
private inboundMediaTimeoutMs;
|
|
83
|
+
private getFileFn;
|
|
84
|
+
constructor(botToken: string, log: ConnectorLogger, inlineFinalPersistence?: InlineFinalPersistence);
|
|
85
|
+
downloadInboundMedia(locator: {
|
|
86
|
+
readonly platformKey: string;
|
|
87
|
+
}): Promise<Buffer>;
|
|
88
|
+
private getPollingControls;
|
|
89
|
+
/**
|
|
90
|
+
* Parse a Telegram update into an inbound message.
|
|
91
|
+
* Supports text, photo, document, and voice messages.
|
|
92
|
+
* Returns null for group or bot messages.
|
|
93
|
+
*/
|
|
94
|
+
parseUpdate(update: unknown): TelegramInboundMessage | null;
|
|
95
|
+
/**
|
|
96
|
+
* Send a reply to a Telegram chat.
|
|
97
|
+
* K2: If a executionId is supplied, edits only that lifecycle's placeholder. Legacy
|
|
98
|
+
* deliveries without executionId retain the per-chat FIFO behavior.
|
|
99
|
+
* If editMessage fails (message deleted etc.), falls back to sending a new message.
|
|
100
|
+
* K3: Splits content exceeding 4096 chars into multiple messages.
|
|
101
|
+
*/
|
|
102
|
+
sendReply(externalChatId: string, content: string, _metadata?: Record<string, unknown>, executionId?: string): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Start long polling for inbound messages.
|
|
105
|
+
* Handles text, photo, document, and voice DMs.
|
|
106
|
+
*/
|
|
107
|
+
startPolling(handler: (msg: TelegramInboundMessage) => Promise<void>): void;
|
|
108
|
+
private runPollingLoop;
|
|
109
|
+
private recoverPollingConflict;
|
|
110
|
+
/**
|
|
111
|
+
* Stop long polling gracefully.
|
|
112
|
+
*/
|
|
113
|
+
stopPolling(): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Send a rich message as Telegram HTML-formatted text.
|
|
116
|
+
* K2: If a executionId is supplied, edits only that lifecycle's placeholder. Legacy
|
|
117
|
+
* deliveries without executionId retain the per-chat FIFO behavior.
|
|
118
|
+
* Falls back to plain text edit if HTML parse fails.
|
|
119
|
+
* Falls back to sending a new message if editMessage fails entirely.
|
|
120
|
+
* K3: HTML parse error falls back to plain text; long plain text is split.
|
|
121
|
+
*/
|
|
122
|
+
sendRichMessage(externalChatId: string, textContent: string, blocks: RichBlock[], catDisplayName: string, executionId?: string): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* Send a placeholder message for streaming and return its message ID.
|
|
125
|
+
* Records the externalChatId mapping so deleteMessage can clean it up later.
|
|
126
|
+
*/
|
|
127
|
+
sendPlaceholder(externalChatId: string, text: string): Promise<string>;
|
|
128
|
+
/**
|
|
129
|
+
* Delete a placeholder message after outbound delivery succeeds.
|
|
130
|
+
* No-op if platformMessageId is unknown (delivery failed before placeholder was registered).
|
|
131
|
+
* Cleans up the mapping after deletion to prevent double-delete.
|
|
132
|
+
*/
|
|
133
|
+
deleteMessage(platformMessageId: string, externalChatId?: string): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Edit an already-sent message in place (for streaming progressive updates and K2 inline final).
|
|
136
|
+
* Truncates to Telegram's 4096-char limit.
|
|
137
|
+
* opts.parse_mode: pass 'HTML' when editing with rich HTML content (K2 sendRichMessage inline).
|
|
138
|
+
*/
|
|
139
|
+
editMessage(externalChatId: string, platformMessageId: string, text: string, opts?: {
|
|
140
|
+
parse_mode?: string;
|
|
141
|
+
}): Promise<boolean>;
|
|
142
|
+
/** Stop lifecycle-final correlation while leaving a blocked recovery message visible. */
|
|
143
|
+
preserveInlinePlaceholder(externalChatId: string, platformMessageId: string, executionId: string): void;
|
|
144
|
+
/**
|
|
145
|
+
* K2: Register a pending inline-final placeholder.
|
|
146
|
+
* Lifecycle-aware deliveries use (executionId, chatId) as the exact correlation
|
|
147
|
+
* key, so two bindings of one thread never evict each other; callers without a
|
|
148
|
+
* executionId retain the legacy per-chat FIFO behavior. Consumed on first use.
|
|
149
|
+
* A new registration for a key also clears any consumed marker left by the
|
|
150
|
+
* previous round so its fresh placeholder stays editable.
|
|
151
|
+
*/
|
|
152
|
+
registerInlinePlaceholder(externalChatId: string, platformMessageId: string, executionId?: string): void;
|
|
153
|
+
/** True once a K2 inline final consumed this (lifecycle, chat) placeholder; later lifecycle edits must not overwrite the delivered body. */
|
|
154
|
+
isInlineFinalConsumed(executionId: string, externalChatId: string): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Settle ends the lifecycle, closing the delivered-but-not-yet-settled window
|
|
157
|
+
* the consumed marker protects; the SDK allows only one started per
|
|
158
|
+
* lifecycle, so without this the marker would linger until the 24h TTL.
|
|
159
|
+
* Best-effort persisted removal, mirroring registerInlinePlaceholder.
|
|
160
|
+
*/
|
|
161
|
+
clearInlineFinalConsumed(executionId: string, externalChatId: string): void;
|
|
162
|
+
/** Seed a pending inline-final recovered from durable storage after a plugin restart. */
|
|
163
|
+
restoreInlinePlaceholder(executionId: string, externalChatId: string, platformMessageId: string, registeredAt: number): void;
|
|
164
|
+
/** Seed a consumed marker recovered from durable storage after a plugin restart. */
|
|
165
|
+
restoreInlineFinalConsumed(executionId: string, externalChatId: string, consumedAt: number): void;
|
|
166
|
+
/**
|
|
167
|
+
* Warn without letting a dead logger turn a swallowed failure into an
|
|
168
|
+
* unhandled rejection: context.logger runs assertActive() and throws after
|
|
169
|
+
* feature revocation, and this plugin shares the Host process.
|
|
170
|
+
*/
|
|
171
|
+
private safeWarn;
|
|
172
|
+
private persistSave;
|
|
173
|
+
private persistRemove;
|
|
174
|
+
private persistConsumed;
|
|
175
|
+
private persistRemoveConsumed;
|
|
176
|
+
private pruneConsumedInlineFinals;
|
|
177
|
+
private takeInlinePlaceholder;
|
|
178
|
+
/**
|
|
179
|
+
* K2: Clear a registered inline-final placeholder without delivering content.
|
|
180
|
+
* Called when delivery is skipped so stale state doesn't corrupt the next delivery.
|
|
181
|
+
* Removes the specific platformMessageId from the FIFO queue (K3: queue per chatId).
|
|
182
|
+
* If the placeholder was already consumed by sendReply/sendRichMessage, this is a no-op.
|
|
183
|
+
* Deletes the streaming card from Telegram when entry was still pending (delivery skipped).
|
|
184
|
+
*/
|
|
185
|
+
clearInlinePlaceholder(chatId: string, platformMessageId?: string, executionId?: string): Promise<void>;
|
|
186
|
+
/** Send Host-authorized bytes to Telegram before the action entitlement closes. */
|
|
187
|
+
sendMedia(externalChatId: string, payload: {
|
|
188
|
+
type: 'image' | 'file' | 'audio';
|
|
189
|
+
content: AsyncIterable<Uint8Array>;
|
|
190
|
+
fileName?: string;
|
|
191
|
+
}): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Test helper: inject a mock sendMessage function.
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
_injectSendMessage(fn: (chatId: string, text: string, opts?: Record<string, unknown>) => Promise<unknown>): void;
|
|
197
|
+
/**
|
|
198
|
+
* Test helper: inject mock media send functions.
|
|
199
|
+
* @internal
|
|
200
|
+
*/
|
|
201
|
+
_injectSendMedia(fns: {
|
|
202
|
+
sendPhoto: (chatId: number, input: string | InputFile) => Promise<unknown>;
|
|
203
|
+
sendDocument: (chatId: number, input: string | InputFile) => Promise<unknown>;
|
|
204
|
+
sendVoice: (chatId: number, input: string | InputFile) => Promise<unknown>;
|
|
205
|
+
}): void;
|
|
206
|
+
/** @internal */
|
|
207
|
+
_injectGetFile(fn: (fileId: string, signal: AbortSignal) => Promise<{
|
|
208
|
+
file_path?: string;
|
|
209
|
+
}>): void;
|
|
210
|
+
/** @internal */
|
|
211
|
+
_injectInboundFetch(fn: typeof fetch): void;
|
|
212
|
+
/** @internal */
|
|
213
|
+
_injectInboundMediaTimeout(timeoutMs: number): void;
|
|
214
|
+
/** @internal */
|
|
215
|
+
_injectBotApiSendMessage(fn: (chatId: number, text: string) => Promise<{
|
|
216
|
+
message_id: number;
|
|
217
|
+
}>): void;
|
|
218
|
+
/** @internal */
|
|
219
|
+
_injectBotApiEditMessage(fn: (chatId: number, messageId: number, text: string, options?: Record<string, unknown>) => Promise<void>): void;
|
|
220
|
+
/** @internal */
|
|
221
|
+
_injectBotApiDeleteMessage(fn: (chatId: number, messageId: number) => Promise<void>): void;
|
|
222
|
+
/**
|
|
223
|
+
* Test helper: inject long polling lifecycle controls.
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
_injectPollingControls(fns: Partial<TelegramPollingControls>): void;
|
|
227
|
+
}
|
|
228
|
+
export {};
|
|
229
|
+
//# sourceMappingURL=TelegramAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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