page-action-cache 1.0.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.
Files changed (73) hide show
  1. package/dist/actions-executor.d.ts +62 -0
  2. package/dist/actions-executor.d.ts.map +1 -0
  3. package/dist/actions-executor.js +339 -0
  4. package/dist/actions-executor.js.map +1 -0
  5. package/dist/cache-invalidator.d.ts +70 -0
  6. package/dist/cache-invalidator.d.ts.map +1 -0
  7. package/dist/cache-invalidator.js +212 -0
  8. package/dist/cache-invalidator.js.map +1 -0
  9. package/dist/cache-store.d.ts +80 -0
  10. package/dist/cache-store.d.ts.map +1 -0
  11. package/dist/cache-store.js +361 -0
  12. package/dist/cache-store.js.map +1 -0
  13. package/dist/cache-strategy.d.ts +65 -0
  14. package/dist/cache-strategy.d.ts.map +1 -0
  15. package/dist/cache-strategy.js +237 -0
  16. package/dist/cache-strategy.js.map +1 -0
  17. package/dist/hooks-entry.d.ts +18 -0
  18. package/dist/hooks-entry.d.ts.map +1 -0
  19. package/dist/hooks-entry.js +27 -0
  20. package/dist/hooks-entry.js.map +1 -0
  21. package/dist/hooks.d.ts +10 -0
  22. package/dist/hooks.d.ts.map +1 -0
  23. package/dist/hooks.js +277 -0
  24. package/dist/hooks.js.map +1 -0
  25. package/dist/index.d.ts +24 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +34 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/scenario-recognizer.d.ts +45 -0
  30. package/dist/scenario-recognizer.d.ts.map +1 -0
  31. package/dist/scenario-recognizer.js +213 -0
  32. package/dist/scenario-recognizer.js.map +1 -0
  33. package/dist/security-policy.d.ts +62 -0
  34. package/dist/security-policy.d.ts.map +1 -0
  35. package/dist/security-policy.js +219 -0
  36. package/dist/security-policy.js.map +1 -0
  37. package/dist/tools.d.ts +209 -0
  38. package/dist/tools.d.ts.map +1 -0
  39. package/dist/tools.js +383 -0
  40. package/dist/tools.js.map +1 -0
  41. package/dist/types.d.ts +336 -0
  42. package/dist/types.d.ts.map +1 -0
  43. package/dist/types.js +8 -0
  44. package/dist/types.js.map +1 -0
  45. package/dist/ux-enhancer.d.ts +60 -0
  46. package/dist/ux-enhancer.d.ts.map +1 -0
  47. package/dist/ux-enhancer.js +218 -0
  48. package/dist/ux-enhancer.js.map +1 -0
  49. package/dist/variable-resolver.d.ts +28 -0
  50. package/dist/variable-resolver.d.ts.map +1 -0
  51. package/dist/variable-resolver.js +201 -0
  52. package/dist/variable-resolver.js.map +1 -0
  53. package/docs/API.md +555 -0
  54. package/docs/IMPLEMENTATION.md +1792 -0
  55. package/docs/INTEGRATION.md +387 -0
  56. package/docs/README.md +183 -0
  57. package/index.ts +118 -0
  58. package/openclaw.plugin.json +208 -0
  59. package/package.json +76 -0
  60. package/skills/page-action-cache/SKILL.md +216 -0
  61. package/src/actions-executor.ts +441 -0
  62. package/src/cache-invalidator.ts +271 -0
  63. package/src/cache-store.ts +457 -0
  64. package/src/cache-strategy.ts +327 -0
  65. package/src/hooks-entry.ts +114 -0
  66. package/src/hooks.ts +332 -0
  67. package/src/index.ts +104 -0
  68. package/src/scenario-recognizer.ts +259 -0
  69. package/src/security-policy.ts +268 -0
  70. package/src/tools.ts +437 -0
  71. package/src/types.ts +482 -0
  72. package/src/ux-enhancer.ts +266 -0
  73. package/src/variable-resolver.ts +258 -0
@@ -0,0 +1,209 @@
1
+ /**
2
+ * Custom Tools
3
+ * 自定义工具 - 提供给 LLM 使用的工具接口
4
+ */
5
+ /**
6
+ * execute_cached 工具 - 执行缓存的页面操作序列
7
+ */
8
+ export declare function createExecuteCachedTool(): {
9
+ name: string;
10
+ label: string;
11
+ description: string;
12
+ parameters: {
13
+ type: string;
14
+ properties: {
15
+ cacheKey: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ fromIndex: {
20
+ type: string;
21
+ description: string;
22
+ };
23
+ toIndex: {
24
+ type: string;
25
+ description: string;
26
+ };
27
+ dryRun: {
28
+ type: string;
29
+ description: string;
30
+ };
31
+ force: {
32
+ type: string;
33
+ description: string;
34
+ };
35
+ };
36
+ };
37
+ required: string[];
38
+ };
39
+ /**
40
+ * execute_cached 工具执行函数
41
+ */
42
+ export declare function executeCached(_toolCallId: string, args: any): Promise<{
43
+ content: {
44
+ type: string;
45
+ text: string;
46
+ }[];
47
+ }>;
48
+ /**
49
+ * cache_stats 工具 - 查看缓存统计
50
+ */
51
+ export declare function createCacheStatsTool(): {
52
+ name: string;
53
+ label: string;
54
+ description: string;
55
+ parameters: {
56
+ type: string;
57
+ properties: {};
58
+ };
59
+ };
60
+ /**
61
+ * cache_stats 工具执行函数
62
+ */
63
+ export declare function cacheStats(_toolCallId: string, _args: any): Promise<{
64
+ content: {
65
+ type: string;
66
+ text: string;
67
+ }[];
68
+ }>;
69
+ /**
70
+ * cache_list 工具 - 列出所有缓存
71
+ */
72
+ export declare function createCacheListTool(): {
73
+ name: string;
74
+ label: string;
75
+ description: string;
76
+ parameters: {
77
+ type: string;
78
+ properties: {
79
+ limit: {
80
+ type: string;
81
+ description: string;
82
+ };
83
+ filterScenario: {
84
+ type: string;
85
+ description: string;
86
+ };
87
+ };
88
+ };
89
+ };
90
+ /**
91
+ * cache_list 工具执行函数
92
+ */
93
+ export declare function cacheList(_toolCallId: string, args: any): Promise<{
94
+ content: {
95
+ type: string;
96
+ text: string;
97
+ }[];
98
+ }>;
99
+ /**
100
+ * cache_clear 工具 - 清空缓存
101
+ */
102
+ export declare function createCacheClearTool(): {
103
+ name: string;
104
+ label: string;
105
+ description: string;
106
+ parameters: {
107
+ type: string;
108
+ properties: {
109
+ scenario: {
110
+ type: string;
111
+ description: string;
112
+ };
113
+ };
114
+ };
115
+ };
116
+ /**
117
+ * cache_clear 工具执行函数
118
+ */
119
+ export declare function cacheClear(_toolCallId: string, args: any): Promise<{
120
+ content: {
121
+ type: string;
122
+ text: string;
123
+ }[];
124
+ }>;
125
+ /**
126
+ * scenario_list 工具 - 列出所有场景
127
+ */
128
+ export declare function createScenarioListTool(): {
129
+ name: string;
130
+ label: string;
131
+ description: string;
132
+ parameters: {
133
+ type: string;
134
+ properties: {};
135
+ };
136
+ };
137
+ /**
138
+ * scenario_list 工具执行函数
139
+ */
140
+ export declare function scenarioList(_toolCallId: string, _args: any): Promise<{
141
+ content: {
142
+ type: string;
143
+ text: string;
144
+ }[];
145
+ }>;
146
+ /**
147
+ * force_refresh 工具 - 强制刷新指定缓存
148
+ */
149
+ export declare function createForceRefreshTool(): {
150
+ name: string;
151
+ label: string;
152
+ description: string;
153
+ parameters: {
154
+ type: string;
155
+ properties: {
156
+ url: {
157
+ type: string;
158
+ description: string;
159
+ };
160
+ viewport: {
161
+ type: string;
162
+ description: string;
163
+ properties: {
164
+ width: {
165
+ type: string;
166
+ };
167
+ height: {
168
+ type: string;
169
+ };
170
+ };
171
+ };
172
+ };
173
+ };
174
+ required: string[];
175
+ };
176
+ /**
177
+ * force_refresh 工具执行函数
178
+ */
179
+ export declare function forceRefresh(_toolCallId: string, args: any): Promise<{
180
+ content: {
181
+ type: string;
182
+ text: string;
183
+ }[];
184
+ }>;
185
+ export declare const CACHE_TOOLS: {
186
+ definition: {
187
+ name: string;
188
+ label: string;
189
+ description: string;
190
+ parameters: {
191
+ type: string;
192
+ properties: {};
193
+ };
194
+ };
195
+ execute: typeof cacheStats;
196
+ }[];
197
+ /**
198
+ * 获取所有工具定义
199
+ */
200
+ export declare function getToolDefinitions(): {
201
+ name: string;
202
+ label: string;
203
+ description: string;
204
+ parameters: {
205
+ type: string;
206
+ properties: {};
207
+ };
208
+ }[];
209
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH;;GAEG;AACH,wBAAgB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCtC;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;;;;;GAgFjE;AAED;;GAEG;AACH,wBAAgB,oBAAoB;;;;;;;;EAUnC;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;;;;;GAW/D;AAED;;GAEG;AACH,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;EAmBlC;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;;;;;GAgC7D;AAED;;GAEG;AACH,wBAAgB,oBAAoB;;;;;;;;;;;;;EAenC;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;;;;;GAkC9D;AAED;;GAEG;AACH,wBAAgB,sBAAsB;;;;;;;;EAUrC;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;;;;;GAsBjE;AAED;;GAEG;AACH,wBAAgB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBrC;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;;;;;GA2BhE;AAMD,eAAO,MAAM,WAAW;;;;;;;;;;;GAyBvB,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB;;;;;;;;IAOjC"}
package/dist/tools.js ADDED
@@ -0,0 +1,383 @@
1
+ /**
2
+ * Custom Tools
3
+ * 自定义工具 - 提供给 LLM 使用的工具接口
4
+ */
5
+ import { getCacheStore } from "./cache-store.js";
6
+ import { getScenarioRecognizer } from "./scenario-recognizer.js";
7
+ import { getUXEnhancer } from "./ux-enhancer.js";
8
+ import { getActionsExecutor } from "./actions-executor.js";
9
+ // ============================================================================
10
+ // 工具定义
11
+ // ============================================================================
12
+ /**
13
+ * execute_cached 工具 - 执行缓存的页面操作序列
14
+ */
15
+ export function createExecuteCachedTool() {
16
+ return {
17
+ name: "execute_cached",
18
+ label: "Execute Cached Actions",
19
+ description: "执行缓存的页面操作序列,跳过 LLM 分析。大幅降低 token 消耗和操作延迟。",
20
+ parameters: {
21
+ type: "object",
22
+ properties: {
23
+ cacheKey: {
24
+ type: "string",
25
+ description: "缓存键(从 cache_info 中获取)",
26
+ },
27
+ fromIndex: {
28
+ type: "number",
29
+ description: "从第几个操作开始执行(默认 0)",
30
+ },
31
+ toIndex: {
32
+ type: "number",
33
+ description: "执行到第几个操作(不指定则执行全部)",
34
+ },
35
+ dryRun: {
36
+ type: "boolean",
37
+ description: "试运行模式,不实际执行",
38
+ },
39
+ force: {
40
+ type: "boolean",
41
+ description: "强制执行(忽略页面变化检测)",
42
+ },
43
+ },
44
+ },
45
+ required: ["cacheKey"],
46
+ };
47
+ }
48
+ /**
49
+ * execute_cached 工具执行函数
50
+ */
51
+ export async function executeCached(_toolCallId, args) {
52
+ const { cacheKey, fromIndex, toIndex, dryRun = false, force = false, } = args;
53
+ const cacheStore = getCacheStore();
54
+ const uxEnhancer = getUXEnhancer();
55
+ // 获取缓存条目
56
+ const entry = cacheStore.listEntries().find((e) => e.key === cacheKey);
57
+ if (!entry) {
58
+ return {
59
+ content: [
60
+ {
61
+ type: "text",
62
+ text: "缓存不存在或已过期。请重新分析页面。",
63
+ },
64
+ ],
65
+ };
66
+ }
67
+ // 检查页面变化(强制模式跳过)
68
+ if (!force && !dryRun) {
69
+ // TODO: 实际获取页面 HTML 进行检测
70
+ // const html = await fetchPageHTML(entry.url, entry.viewport);
71
+ // const changeResult = await cacheInvalidator.detectPageChange(html, entry.url, entry.viewport, entry);
72
+ // 简化处理:暂时跳过检测
73
+ console.log(`[execute_cached] Skipping page change detection for ${entry.url}`);
74
+ }
75
+ // 解析变量
76
+ let variables = {};
77
+ if (entry.variables) {
78
+ variables = entry.variables;
79
+ }
80
+ // 获取执行器
81
+ const executor = getActionsExecutor();
82
+ if (dryRun) {
83
+ // 试运行模式,只返回不执行
84
+ const actionsToExecute = entry.actions.slice(fromIndex || 0, toIndex !== undefined ? toIndex + 1 : undefined);
85
+ return {
86
+ content: [
87
+ {
88
+ type: "text",
89
+ text: uxEnhancer.generateDryRunResult(actionsToExecute),
90
+ },
91
+ ],
92
+ };
93
+ }
94
+ // 逐个执行操作
95
+ const results = await executor.executeBatch(entry.actions, variables, {
96
+ fromIndex,
97
+ toIndex,
98
+ atomic: true, // 原子执行
99
+ });
100
+ // 更新缓存统计
101
+ cacheStore.updateExecutionStats(cacheKey, results);
102
+ return {
103
+ content: [
104
+ {
105
+ type: "text",
106
+ text: uxEnhancer.generateExecutionReport(results, force),
107
+ },
108
+ ],
109
+ };
110
+ }
111
+ /**
112
+ * cache_stats 工具 - 查看缓存统计
113
+ */
114
+ export function createCacheStatsTool() {
115
+ return {
116
+ name: "cache_stats",
117
+ label: "Cache Statistics",
118
+ description: "查看页面操作缓存的统计信息,包括命中率、节省的 token 等。",
119
+ parameters: {
120
+ type: "object",
121
+ properties: {},
122
+ },
123
+ };
124
+ }
125
+ /**
126
+ * cache_stats 工具执行函数
127
+ */
128
+ export async function cacheStats(_toolCallId, _args) {
129
+ const uxEnhancer = getUXEnhancer();
130
+ return {
131
+ content: [
132
+ {
133
+ type: "text",
134
+ text: uxEnhancer.generateStatsReport(),
135
+ },
136
+ ],
137
+ };
138
+ }
139
+ /**
140
+ * cache_list 工具 - 列出所有缓存
141
+ */
142
+ export function createCacheListTool() {
143
+ return {
144
+ name: "cache_list",
145
+ label: "List Cache Entries",
146
+ description: "列出所有页面操作缓存条目,包括场景、URL、访问次数等。",
147
+ parameters: {
148
+ type: "object",
149
+ properties: {
150
+ limit: {
151
+ type: "number",
152
+ description: "最多返回的条目数(默认 20)",
153
+ },
154
+ filterScenario: {
155
+ type: "string",
156
+ description: "按场景过滤(如 login, checkout)",
157
+ },
158
+ },
159
+ },
160
+ };
161
+ }
162
+ /**
163
+ * cache_list 工具执行函数
164
+ */
165
+ export async function cacheList(_toolCallId, args) {
166
+ const { limit = 20, filterScenario } = args;
167
+ const cacheStore = getCacheStore();
168
+ let entries = cacheStore.listEntries();
169
+ // 过滤场景
170
+ if (filterScenario) {
171
+ entries = entries.filter((e) => e.scenario === filterScenario);
172
+ }
173
+ // 限制数量
174
+ entries = entries.slice(0, limit);
175
+ let text = `\n【缓存条目列表】(共 ${entries.length} 条)\n\n`;
176
+ entries.forEach((entry, i) => {
177
+ text += `${i + 1}. ${entry.scenario} (${entry.cacheLevel})\n`;
178
+ text += ` URL: ${entry.url}\n`;
179
+ text += ` 访问次数: ${entry.accessCount}\n`;
180
+ text += ` 成功率: ${((entry.successCount / (entry.successCount + entry.failCount || 1)) * 100).toFixed(0)}%\n`;
181
+ text += ` 最后访问: ${new Date(entry.lastAccessTime).toLocaleString()}\n\n`;
182
+ });
183
+ return {
184
+ content: [
185
+ {
186
+ type: "text",
187
+ text,
188
+ },
189
+ ],
190
+ };
191
+ }
192
+ /**
193
+ * cache_clear 工具 - 清空缓存
194
+ */
195
+ export function createCacheClearTool() {
196
+ return {
197
+ name: "cache_clear",
198
+ label: "Clear Cache",
199
+ description: "清空所有页面操作缓存。慎用!",
200
+ parameters: {
201
+ type: "object",
202
+ properties: {
203
+ scenario: {
204
+ type: "string",
205
+ description: "只清空指定场景的缓存(可选)",
206
+ },
207
+ },
208
+ },
209
+ };
210
+ }
211
+ /**
212
+ * cache_clear 工具执行函数
213
+ */
214
+ export async function cacheClear(_toolCallId, args) {
215
+ const { scenario } = args;
216
+ const cacheStore = getCacheStore();
217
+ if (scenario) {
218
+ // 清空指定场景
219
+ let count = 0;
220
+ const entries = cacheStore.listEntries();
221
+ for (const entry of entries) {
222
+ if (entry.scenario === scenario) {
223
+ cacheStore.delete(entry.url, entry.viewport);
224
+ count++;
225
+ }
226
+ }
227
+ return {
228
+ content: [
229
+ {
230
+ type: "text",
231
+ text: `已清空场景 "${scenario}" 的 ${count} 条缓存。`,
232
+ },
233
+ ],
234
+ };
235
+ }
236
+ else {
237
+ // 清空所有缓存
238
+ cacheStore.clear();
239
+ return {
240
+ content: [
241
+ {
242
+ type: "text",
243
+ text: "已清空所有缓存。",
244
+ },
245
+ ],
246
+ };
247
+ }
248
+ }
249
+ /**
250
+ * scenario_list 工具 - 列出所有场景
251
+ */
252
+ export function createScenarioListTool() {
253
+ return {
254
+ name: "scenario_list",
255
+ label: "List Scenarios",
256
+ description: "列出所有支持的缓存场景及其匹配规则。",
257
+ parameters: {
258
+ type: "object",
259
+ properties: {},
260
+ },
261
+ };
262
+ }
263
+ /**
264
+ * scenario_list 工具执行函数
265
+ */
266
+ export async function scenarioList(_toolCallId, _args) {
267
+ const scenarioRecognizer = getScenarioRecognizer();
268
+ const rules = scenarioRecognizer.getRules();
269
+ let text = "\n【支持的缓存场景】\n\n";
270
+ rules.forEach((rule, i) => {
271
+ text += `${i + 1}. ${rule.scenario}\n`;
272
+ text += ` 关键词: ${rule.keywords.join(", ")}\n`;
273
+ text += ` URL 模式: ${rule.urlPatterns.join(", ") || "无"}\n`;
274
+ text += ` 缓存层级: ${rule.cacheLevel}\n`;
275
+ text += ` 置信度: ${rule.confidence}\n\n`;
276
+ });
277
+ return {
278
+ content: [
279
+ {
280
+ type: "text",
281
+ text,
282
+ },
283
+ ],
284
+ };
285
+ }
286
+ /**
287
+ * force_refresh 工具 - 强制刷新指定缓存
288
+ */
289
+ export function createForceRefreshTool() {
290
+ return {
291
+ name: "force_refresh",
292
+ label: "Force Refresh Cache",
293
+ description: "强制刷新指定页面的缓存,下次访问将重新分析。",
294
+ parameters: {
295
+ type: "object",
296
+ properties: {
297
+ url: {
298
+ type: "string",
299
+ description: "页面 URL",
300
+ },
301
+ viewport: {
302
+ type: "object",
303
+ description: "视口尺寸(可选)",
304
+ properties: {
305
+ width: { type: "number" },
306
+ height: { type: "number" },
307
+ },
308
+ },
309
+ },
310
+ },
311
+ required: ["url"],
312
+ };
313
+ }
314
+ /**
315
+ * force_refresh 工具执行函数
316
+ */
317
+ export async function forceRefresh(_toolCallId, args) {
318
+ const { url, viewport } = args;
319
+ const cacheStore = getCacheStore();
320
+ const vp = viewport || { width: 1920, height: 1080 };
321
+ const deleted = cacheStore.delete(url, vp);
322
+ if (deleted) {
323
+ return {
324
+ content: [
325
+ {
326
+ type: "text",
327
+ text: `已强制刷新缓存:${url}`,
328
+ },
329
+ ],
330
+ };
331
+ }
332
+ else {
333
+ return {
334
+ content: [
335
+ {
336
+ type: "text",
337
+ text: `未找到缓存:${url}`,
338
+ },
339
+ ],
340
+ };
341
+ }
342
+ }
343
+ // ============================================================================
344
+ // 工具注册表
345
+ // ============================================================================
346
+ export const CACHE_TOOLS = [
347
+ {
348
+ definition: createExecuteCachedTool(),
349
+ execute: executeCached,
350
+ },
351
+ {
352
+ definition: createCacheStatsTool(),
353
+ execute: cacheStats,
354
+ },
355
+ {
356
+ definition: createCacheListTool(),
357
+ execute: cacheList,
358
+ },
359
+ {
360
+ definition: createCacheClearTool(),
361
+ execute: cacheClear,
362
+ },
363
+ {
364
+ definition: createScenarioListTool(),
365
+ execute: scenarioList,
366
+ },
367
+ {
368
+ definition: createForceRefreshTool(),
369
+ execute: forceRefresh,
370
+ },
371
+ ];
372
+ /**
373
+ * 获取所有工具定义
374
+ */
375
+ export function getToolDefinitions() {
376
+ return CACHE_TOOLS.map((tool) => ({
377
+ name: tool.definition.name,
378
+ label: tool.definition.label,
379
+ description: tool.definition.description,
380
+ parameters: tool.definition.parameters,
381
+ }));
382
+ }
383
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,+EAA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