@zhin.js/plugin-rss 1.1.8 → 1.1.10
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 +12 -0
- package/commands/rss-add/[url]/index.js +12 -10
- package/commands/rss-add/[url]/index.ts +12 -10
- package/commands/rss-check/[[url]]/index.js +8 -7
- package/commands/rss-check/[[url]]/index.ts +8 -7
- package/commands/rss-list/index.js +9 -7
- package/commands/rss-list/index.ts +9 -7
- package/commands/rss-preview/[url]/index.js +7 -6
- package/commands/rss-preview/[url]/index.ts +7 -6
- package/commands/rss-remove/[url]/index.js +8 -7
- package/commands/rss-remove/[url]/index.ts +8 -7
- package/lib/admin-i18n.d.ts +219 -0
- package/lib/admin-i18n.d.ts.map +1 -0
- package/lib/admin-i18n.js +216 -0
- package/lib/admin-i18n.js.map +1 -0
- package/lib/admin-tasks.d.ts +40 -2
- package/lib/admin-tasks.d.ts.map +1 -1
- package/lib/admin-tasks.js +99 -72
- package/lib/admin-tasks.js.map +1 -1
- package/lib/channel.d.ts +2 -1
- package/lib/channel.d.ts.map +1 -1
- package/lib/channel.js +3 -3
- package/lib/channel.js.map +1 -1
- package/lib/feed.d.ts +2 -1
- package/lib/feed.d.ts.map +1 -1
- package/lib/feed.js +6 -5
- package/lib/feed.js.map +1 -1
- package/lib/i18n.d.ts +2 -0
- package/lib/i18n.d.ts.map +1 -0
- package/lib/i18n.js +168 -0
- package/lib/i18n.js.map +1 -0
- package/lib/poll.d.ts +3 -1
- package/lib/poll.d.ts.map +1 -1
- package/lib/poll.js +23 -18
- package/lib/poll.js.map +1 -1
- package/lib/quiet-hours.d.ts +5 -0
- package/lib/quiet-hours.d.ts.map +1 -1
- package/lib/quiet-hours.js +9 -4
- package/lib/quiet-hours.js.map +1 -1
- package/lib/runtime.d.ts +3 -0
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js.map +1 -1
- package/lib/storage.d.ts +3 -0
- package/lib/storage.d.ts.map +1 -0
- package/lib/storage.js +57 -0
- package/lib/storage.js.map +1 -0
- package/package.json +7 -7
- package/plugin.js +12 -4
- package/schema.json +6 -1
- package/skills/rss/tools/rss_list_subscriptions/index.js +4 -3
- package/skills/rss/tools/rss_list_subscriptions/index.ts +4 -3
- package/skills/rss/tools/rss_preview_feed/index.js +4 -3
- package/skills/rss/tools/rss_preview_feed/index.ts +4 -3
- package/src/admin-i18n.ts +218 -0
- package/src/admin-tasks.ts +95 -72
- package/src/channel.ts +4 -2
- package/src/feed.ts +7 -5
- package/src/i18n.ts +168 -0
- package/src/poll.ts +24 -18
- package/src/quiet-hours.ts +11 -4
- package/src/runtime.ts +3 -0
- package/src/storage.ts +59 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { type Locale } from 'zhin.js/i18n';
|
|
2
|
+
import { PluginTaskError } from 'zhin.js/plugin-runtime';
|
|
3
|
+
declare const catalog: {
|
|
4
|
+
readonly invalidTarget: {
|
|
5
|
+
readonly "zh-CN": "请提供完整有效的目标账号、会话、父容器和线程";
|
|
6
|
+
readonly en: "Provide a complete valid account, conversation, parent container and thread.";
|
|
7
|
+
};
|
|
8
|
+
readonly requestReused: {
|
|
9
|
+
readonly "zh-CN": "同一请求 ID 已用于其他内容";
|
|
10
|
+
readonly en: "This request ID was already used for different content.";
|
|
11
|
+
};
|
|
12
|
+
readonly invalidAction: {
|
|
13
|
+
readonly "zh-CN": "任务 ID 或操作无效";
|
|
14
|
+
readonly en: "Invalid task ID or action.";
|
|
15
|
+
};
|
|
16
|
+
readonly updateParameters: {
|
|
17
|
+
readonly "zh-CN": "仅编辑操作接受参数";
|
|
18
|
+
readonly en: "Only the update action accepts parameters.";
|
|
19
|
+
};
|
|
20
|
+
readonly finished: {
|
|
21
|
+
readonly "zh-CN": "任务已结束,不能再次取消";
|
|
22
|
+
readonly en: "This task has ended and cannot be cancelled again.";
|
|
23
|
+
};
|
|
24
|
+
readonly invalidMutation: {
|
|
25
|
+
readonly "zh-CN": "操作须包含 UUID requestId 和读取到的 expectedRevision";
|
|
26
|
+
readonly en: "The operation requires a UUID requestId and the expectedRevision read from the task list.";
|
|
27
|
+
};
|
|
28
|
+
readonly replayConflict: {
|
|
29
|
+
readonly "zh-CN": "同一操作请求 ID 已用于其他内容,禁止重放";
|
|
30
|
+
readonly en: "This operation request ID was used for different content and cannot be replayed.";
|
|
31
|
+
};
|
|
32
|
+
readonly delivering: {
|
|
33
|
+
readonly "zh-CN": "投递中或未确认;不会自动重试";
|
|
34
|
+
readonly en: "Delivery is in progress or unconfirmed; no automatic retry.";
|
|
35
|
+
};
|
|
36
|
+
readonly exactTarget: {
|
|
37
|
+
readonly "zh-CN": "管理员 RSS 需要支持精确目标的 Outbound Host";
|
|
38
|
+
readonly en: "Administrator RSS requires an Outbound Host with exact-target delivery.";
|
|
39
|
+
};
|
|
40
|
+
readonly quota: {
|
|
41
|
+
readonly "zh-CN": "管理员 RSS 订阅已达 8 条上限,请先取消任务";
|
|
42
|
+
readonly en: "The administrator RSS limit of 8 subscriptions has been reached. Cancel a task first.";
|
|
43
|
+
};
|
|
44
|
+
readonly duplicate: {
|
|
45
|
+
readonly "zh-CN": "此完整目标已有该源的管理员订阅,请先核实原任务";
|
|
46
|
+
readonly en: "This exact target already has an administrator subscription for this feed. Check the existing task.";
|
|
47
|
+
};
|
|
48
|
+
readonly duplicateUpdate: {
|
|
49
|
+
readonly "zh-CN": "此完整目标已有该源的管理员订阅";
|
|
50
|
+
readonly en: "This exact target already has an administrator subscription for this feed.";
|
|
51
|
+
};
|
|
52
|
+
readonly notFound: {
|
|
53
|
+
readonly "zh-CN": "未找到当前实例的管理员 RSS 订阅;聊天订阅不在此入口管理";
|
|
54
|
+
readonly en: "No administrator RSS subscription was found in this instance. Chat subscriptions are managed separately.";
|
|
55
|
+
};
|
|
56
|
+
readonly pauseState: {
|
|
57
|
+
readonly "zh-CN": "仅待轮询订阅可以暂停";
|
|
58
|
+
readonly en: "Only scheduled subscriptions can be paused.";
|
|
59
|
+
};
|
|
60
|
+
readonly resumeState: {
|
|
61
|
+
readonly "zh-CN": "仅暂停订阅可以恢复;未确认投递不能恢复或重试";
|
|
62
|
+
readonly en: "Only paused subscriptions can be resumed. Unconfirmed deliveries cannot be resumed or retried.";
|
|
63
|
+
};
|
|
64
|
+
readonly updateState: {
|
|
65
|
+
readonly "zh-CN": "编辑前请先暂停订阅;未确认投递不能编辑";
|
|
66
|
+
readonly en: "Pause the subscription before editing. Unconfirmed deliveries cannot be edited.";
|
|
67
|
+
};
|
|
68
|
+
readonly stopped: {
|
|
69
|
+
readonly "zh-CN": "管理员 RSS 服务属于已停止的插件实例";
|
|
70
|
+
readonly en: "This administrator RSS service belongs to a stopped plugin instance.";
|
|
71
|
+
};
|
|
72
|
+
readonly retired: {
|
|
73
|
+
readonly "zh-CN": "管理员 RSS 服务属于未发布或已退役的 generation";
|
|
74
|
+
readonly en: "This administrator RSS service belongs to an unpublished or retired generation.";
|
|
75
|
+
};
|
|
76
|
+
readonly invalidParameters: {
|
|
77
|
+
readonly "zh-CN": "参数须包含有效 HTTP(S) RSS 地址及可选的三项静默设置";
|
|
78
|
+
readonly en: "Provide a valid HTTP(S) feed URL and optionally all three quiet-hours settings.";
|
|
79
|
+
};
|
|
80
|
+
readonly invalidQuiet: {
|
|
81
|
+
readonly "zh-CN": "静默设置无效";
|
|
82
|
+
readonly en: "Invalid quiet-hours settings.";
|
|
83
|
+
};
|
|
84
|
+
readonly invalidUrl: {
|
|
85
|
+
readonly "zh-CN": "请提供有效 HTTP(S) RSS 地址,不接受 URL 用户名或密码";
|
|
86
|
+
readonly en: "Provide a valid HTTP(S) feed URL without a username or password.";
|
|
87
|
+
};
|
|
88
|
+
readonly revision: {
|
|
89
|
+
readonly "zh-CN": "订阅状态已变化,请刷新后重新确认";
|
|
90
|
+
readonly en: "Subscription state changed. Refresh it and confirm again.";
|
|
91
|
+
};
|
|
92
|
+
readonly capacity: {
|
|
93
|
+
readonly "zh-CN": "管理员 RSS 状态达到 8 条或 60 KiB 上限,请先取消并整理订阅";
|
|
94
|
+
readonly en: "Administrator RSS reached the 8-task or 60 KiB limit. Cancel and clean up subscriptions first.";
|
|
95
|
+
};
|
|
96
|
+
readonly capacityReserved: {
|
|
97
|
+
readonly "zh-CN": "管理员 RSS 状态空间不足以保留静默摘要及去重游标;请先取消并整理订阅,现有数据未改动";
|
|
98
|
+
readonly en: "There is not enough RSS storage for quiet-hour summaries and deduplication cursors. Cancel and clean up subscriptions first; existing data has not changed.";
|
|
99
|
+
};
|
|
100
|
+
readonly corrupt: {
|
|
101
|
+
readonly "zh-CN": "管理员 RSS 持久状态格式无效,已停止管理员轮询与投递;请保留原数据核查";
|
|
102
|
+
readonly en: "Administrator RSS storage is invalid. Polling and delivery have stopped; preserve the original data for investigation.";
|
|
103
|
+
};
|
|
104
|
+
readonly waiting: {
|
|
105
|
+
readonly "zh-CN": "等待首次抓取建立基线,不发送历史文章";
|
|
106
|
+
readonly en: "Waiting for the first fetch to establish a baseline; historical articles will not be sent.";
|
|
107
|
+
};
|
|
108
|
+
readonly paused: {
|
|
109
|
+
readonly "zh-CN": "管理员暂停并清空待发摘要;恢复时重新建立基线,不补发历史文章";
|
|
110
|
+
readonly en: "Paused by an administrator and pending summaries cleared. Resuming establishes a new baseline without backfilling articles.";
|
|
111
|
+
};
|
|
112
|
+
readonly resumed: {
|
|
113
|
+
readonly "zh-CN": "已恢复,等待重新建立基线,不补发历史文章";
|
|
114
|
+
readonly en: "Resumed; waiting for a new baseline without backfilling articles.";
|
|
115
|
+
};
|
|
116
|
+
readonly edited: {
|
|
117
|
+
readonly "zh-CN": "已编辑并清空待发摘要,保持暂停,恢复后首次抓取只建立基线";
|
|
118
|
+
readonly en: "Updated and pending summaries cleared; still paused. The first fetch after resuming only establishes a baseline.";
|
|
119
|
+
};
|
|
120
|
+
readonly cancelled: {
|
|
121
|
+
readonly "zh-CN": "管理员取消并清空待发摘要;已经开始的投递无法撤回";
|
|
122
|
+
readonly en: "Cancelled by an administrator and pending summaries cleared. A delivery already in progress cannot be recalled.";
|
|
123
|
+
};
|
|
124
|
+
readonly fetchFailed: {
|
|
125
|
+
readonly "zh-CN": "源站抓取失败;尚未尝试投递,下轮重查";
|
|
126
|
+
readonly en: "Feed fetch failed. No delivery was attempted; it will be checked on the next poll.";
|
|
127
|
+
};
|
|
128
|
+
readonly baseline: {
|
|
129
|
+
readonly "zh-CN": "已建立基线;从后续新文章开始推送";
|
|
130
|
+
readonly en: "Baseline established; only future articles will be delivered.";
|
|
131
|
+
};
|
|
132
|
+
readonly noNew: {
|
|
133
|
+
readonly "zh-CN": "抓取完成,暂无新文章";
|
|
134
|
+
readonly en: "Fetch completed; no new articles.";
|
|
135
|
+
};
|
|
136
|
+
readonly quietPending: {
|
|
137
|
+
readonly "zh-CN": "静默中,已积累更新;退出静默后的首轮轮询汇总";
|
|
138
|
+
readonly en: "Quiet hours are active; updates are queued for the first poll after quiet hours.";
|
|
139
|
+
};
|
|
140
|
+
readonly summaryDelivering: {
|
|
141
|
+
readonly "zh-CN": "摘要投递中或未确认;不会自动重试";
|
|
142
|
+
readonly en: "Summary delivery is in progress or unconfirmed; no automatic retry.";
|
|
143
|
+
};
|
|
144
|
+
readonly unknown: {
|
|
145
|
+
readonly "zh-CN": "平台未确认投递,请核实目标会话后取消并另建订阅;不会自动重试";
|
|
146
|
+
readonly en: "The platform did not confirm delivery. Check the target conversation, then cancel and create another subscription; no automatic retry.";
|
|
147
|
+
};
|
|
148
|
+
readonly delivered: {
|
|
149
|
+
readonly "zh-CN": "已确认投递;等待后续新文章";
|
|
150
|
+
readonly en: "Delivery confirmed; waiting for future articles.";
|
|
151
|
+
};
|
|
152
|
+
readonly rejected: {
|
|
153
|
+
readonly "zh-CN": "平台明确未投递或拒绝;订阅已停止";
|
|
154
|
+
readonly en: "The platform confirmed no delivery or rejected it. The subscription has stopped.";
|
|
155
|
+
};
|
|
156
|
+
readonly quietDescription: {
|
|
157
|
+
readonly "zh-CN": "静默 {timezone} {start}–{end}";
|
|
158
|
+
readonly en: "Quiet hours: {timezone} {start}–{end}";
|
|
159
|
+
};
|
|
160
|
+
readonly pendingDescription: {
|
|
161
|
+
readonly "zh-CN": "待汇总{count} 条更新";
|
|
162
|
+
readonly en: "Queued summary: {count} updates";
|
|
163
|
+
};
|
|
164
|
+
readonly summaryDescription: {
|
|
165
|
+
readonly "zh-CN": "本次摘要{count} 条更新";
|
|
166
|
+
readonly en: "Current summary: {count} updates";
|
|
167
|
+
};
|
|
168
|
+
readonly countCapped: {
|
|
169
|
+
readonly "zh-CN": "至少{count}";
|
|
170
|
+
readonly en: "at least {count}";
|
|
171
|
+
};
|
|
172
|
+
readonly pollDescription: {
|
|
173
|
+
readonly "zh-CN": "实例轮询 {cron}";
|
|
174
|
+
readonly en: "Instance polling: {cron}";
|
|
175
|
+
};
|
|
176
|
+
readonly checkedDescription: {
|
|
177
|
+
readonly "zh-CN": "最近抓取 {at}";
|
|
178
|
+
readonly en: "Last fetched: {at}";
|
|
179
|
+
};
|
|
180
|
+
readonly stateNote: {
|
|
181
|
+
readonly "zh-CN": "状态不代表平台连接健康";
|
|
182
|
+
readonly en: "State does not represent platform connection health.";
|
|
183
|
+
};
|
|
184
|
+
readonly quietFields: {
|
|
185
|
+
readonly "zh-CN": "静默时区、开始和结束时间须全部填写;三项全部留空关闭静默";
|
|
186
|
+
readonly en: "Provide the quiet timezone, start and end together. Leave all three empty to disable quiet hours.";
|
|
187
|
+
};
|
|
188
|
+
readonly quietZoneOffset: {
|
|
189
|
+
readonly "zh-CN": "请填写有效 IANA 时区,如 Asia/Shanghai;不能使用 +08:00 等偏移";
|
|
190
|
+
readonly en: "Use an IANA timezone such as Asia/Shanghai, not a fixed offset such as +08:00.";
|
|
191
|
+
};
|
|
192
|
+
readonly quietZone: {
|
|
193
|
+
readonly "zh-CN": "请填写有效 IANA 时区,如 Asia/Shanghai";
|
|
194
|
+
readonly en: "Use a valid IANA timezone such as Asia/Shanghai.";
|
|
195
|
+
};
|
|
196
|
+
readonly quietClock: {
|
|
197
|
+
readonly "zh-CN": "静默时间须为 HH:mm(24 小时制),开始和结束不能相同";
|
|
198
|
+
readonly en: "Use HH:mm in 24-hour format; quiet start and end must be different.";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
export declare const adminText: (locale: Locale | undefined, key: "invalidTarget" | "requestReused" | "invalidAction" | "updateParameters" | "finished" | "invalidMutation" | "replayConflict" | "delivering" | "exactTarget" | "quota" | "duplicate" | "duplicateUpdate" | "notFound" | "pauseState" | "resumeState" | "updateState" | "stopped" | "retired" | "invalidParameters" | "invalidQuiet" | "invalidUrl" | "revision" | "capacity" | "capacityReserved" | "corrupt" | "waiting" | "paused" | "resumed" | "edited" | "cancelled" | "fetchFailed" | "baseline" | "noNew" | "quietPending" | "summaryDelivering" | "unknown" | "delivered" | "rejected" | "quietDescription" | "pendingDescription" | "summaryDescription" | "countCapped" | "pollDescription" | "checkedDescription" | "stateNote" | "quietFields" | "quietZoneOffset" | "quietZone" | "quietClock", values?: import("zhin.js").MessageValues) => string;
|
|
202
|
+
export type AdminTextKey = keyof typeof catalog;
|
|
203
|
+
export declare function isAdminTextKey(value: unknown): value is AdminTextKey;
|
|
204
|
+
/** Persist a stable presentation key; preserve legacy text for older readers. */
|
|
205
|
+
export declare function taskDetail(detailKey: AdminTextKey): {
|
|
206
|
+
detailKey: "invalidTarget" | "requestReused" | "invalidAction" | "updateParameters" | "finished" | "invalidMutation" | "replayConflict" | "delivering" | "exactTarget" | "quota" | "duplicate" | "duplicateUpdate" | "notFound" | "pauseState" | "resumeState" | "updateState" | "stopped" | "retired" | "invalidParameters" | "invalidQuiet" | "invalidUrl" | "revision" | "capacity" | "capacityReserved" | "corrupt" | "waiting" | "paused" | "resumed" | "edited" | "cancelled" | "fetchFailed" | "baseline" | "noNew" | "quietPending" | "summaryDelivering" | "unknown" | "delivered" | "rejected" | "quietDescription" | "pendingDescription" | "summaryDescription" | "countCapped" | "pollDescription" | "checkedDescription" | "stateNote" | "quietFields" | "quietZoneOffset" | "quietZone" | "quietClock";
|
|
207
|
+
detail: string;
|
|
208
|
+
};
|
|
209
|
+
export declare function formatTaskDetail(task: {
|
|
210
|
+
detail: string;
|
|
211
|
+
detailKey?: AdminTextKey;
|
|
212
|
+
}, locale?: Locale): string;
|
|
213
|
+
export declare class LocalizedTaskError extends PluginTaskError {
|
|
214
|
+
readonly messageKey: AdminTextKey;
|
|
215
|
+
constructor(code: ConstructorParameters<typeof PluginTaskError>[0], messageKey: AdminTextKey);
|
|
216
|
+
localize(locale?: Locale): PluginTaskError;
|
|
217
|
+
}
|
|
218
|
+
export {};
|
|
219
|
+
//# sourceMappingURL=admin-i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-i18n.d.ts","sourceRoot":"","sources":["../src/admin-i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqMH,CAAC;AACX,eAAO,MAAM,SAAS,m2BAA0B,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,OAAO,CAAC;AAChD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAAuE;AAE5I,iFAAiF;AACjF,wBAAgB,UAAU,CAAC,SAAS,EAAE,YAAY;;;EAAkE;AACpH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,YAAY,CAAA;CAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5G;AAED,qBAAa,kBAAmB,SAAQ,eAAe;IACrD,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC;gBACtB,IAAI,EAAE,qBAAqB,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,YAAY;IAG5F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe;CAC3C"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { createMessages } from 'zhin.js/i18n';
|
|
2
|
+
import { PluginTaskError } from 'zhin.js/plugin-runtime';
|
|
3
|
+
const catalog = {
|
|
4
|
+
"invalidTarget": {
|
|
5
|
+
"zh-CN": "请提供完整有效的目标账号、会话、父容器和线程",
|
|
6
|
+
"en": "Provide a complete valid account, conversation, parent container and thread."
|
|
7
|
+
},
|
|
8
|
+
"requestReused": {
|
|
9
|
+
"zh-CN": "同一请求 ID 已用于其他内容",
|
|
10
|
+
"en": "This request ID was already used for different content."
|
|
11
|
+
},
|
|
12
|
+
"invalidAction": {
|
|
13
|
+
"zh-CN": "任务 ID 或操作无效",
|
|
14
|
+
"en": "Invalid task ID or action."
|
|
15
|
+
},
|
|
16
|
+
"updateParameters": {
|
|
17
|
+
"zh-CN": "仅编辑操作接受参数",
|
|
18
|
+
"en": "Only the update action accepts parameters."
|
|
19
|
+
},
|
|
20
|
+
"finished": {
|
|
21
|
+
"zh-CN": "任务已结束,不能再次取消",
|
|
22
|
+
"en": "This task has ended and cannot be cancelled again."
|
|
23
|
+
},
|
|
24
|
+
"invalidMutation": {
|
|
25
|
+
"zh-CN": "操作须包含 UUID requestId 和读取到的 expectedRevision",
|
|
26
|
+
"en": "The operation requires a UUID requestId and the expectedRevision read from the task list."
|
|
27
|
+
},
|
|
28
|
+
"replayConflict": {
|
|
29
|
+
"zh-CN": "同一操作请求 ID 已用于其他内容,禁止重放",
|
|
30
|
+
"en": "This operation request ID was used for different content and cannot be replayed."
|
|
31
|
+
},
|
|
32
|
+
"delivering": {
|
|
33
|
+
"zh-CN": "投递中或未确认;不会自动重试",
|
|
34
|
+
"en": "Delivery is in progress or unconfirmed; no automatic retry."
|
|
35
|
+
},
|
|
36
|
+
"exactTarget": {
|
|
37
|
+
"zh-CN": "管理员 RSS 需要支持精确目标的 Outbound Host",
|
|
38
|
+
"en": "Administrator RSS requires an Outbound Host with exact-target delivery."
|
|
39
|
+
},
|
|
40
|
+
"quota": {
|
|
41
|
+
"zh-CN": "管理员 RSS 订阅已达 8 条上限,请先取消任务",
|
|
42
|
+
"en": "The administrator RSS limit of 8 subscriptions has been reached. Cancel a task first."
|
|
43
|
+
},
|
|
44
|
+
"duplicate": {
|
|
45
|
+
"zh-CN": "此完整目标已有该源的管理员订阅,请先核实原任务",
|
|
46
|
+
"en": "This exact target already has an administrator subscription for this feed. Check the existing task."
|
|
47
|
+
},
|
|
48
|
+
"duplicateUpdate": {
|
|
49
|
+
"zh-CN": "此完整目标已有该源的管理员订阅",
|
|
50
|
+
"en": "This exact target already has an administrator subscription for this feed."
|
|
51
|
+
},
|
|
52
|
+
"notFound": {
|
|
53
|
+
"zh-CN": "未找到当前实例的管理员 RSS 订阅;聊天订阅不在此入口管理",
|
|
54
|
+
"en": "No administrator RSS subscription was found in this instance. Chat subscriptions are managed separately."
|
|
55
|
+
},
|
|
56
|
+
"pauseState": {
|
|
57
|
+
"zh-CN": "仅待轮询订阅可以暂停",
|
|
58
|
+
"en": "Only scheduled subscriptions can be paused."
|
|
59
|
+
},
|
|
60
|
+
"resumeState": {
|
|
61
|
+
"zh-CN": "仅暂停订阅可以恢复;未确认投递不能恢复或重试",
|
|
62
|
+
"en": "Only paused subscriptions can be resumed. Unconfirmed deliveries cannot be resumed or retried."
|
|
63
|
+
},
|
|
64
|
+
"updateState": {
|
|
65
|
+
"zh-CN": "编辑前请先暂停订阅;未确认投递不能编辑",
|
|
66
|
+
"en": "Pause the subscription before editing. Unconfirmed deliveries cannot be edited."
|
|
67
|
+
},
|
|
68
|
+
"stopped": {
|
|
69
|
+
"zh-CN": "管理员 RSS 服务属于已停止的插件实例",
|
|
70
|
+
"en": "This administrator RSS service belongs to a stopped plugin instance."
|
|
71
|
+
},
|
|
72
|
+
"retired": {
|
|
73
|
+
"zh-CN": "管理员 RSS 服务属于未发布或已退役的 generation",
|
|
74
|
+
"en": "This administrator RSS service belongs to an unpublished or retired generation."
|
|
75
|
+
},
|
|
76
|
+
"invalidParameters": {
|
|
77
|
+
"zh-CN": "参数须包含有效 HTTP(S) RSS 地址及可选的三项静默设置",
|
|
78
|
+
"en": "Provide a valid HTTP(S) feed URL and optionally all three quiet-hours settings."
|
|
79
|
+
},
|
|
80
|
+
"invalidQuiet": {
|
|
81
|
+
"zh-CN": "静默设置无效",
|
|
82
|
+
"en": "Invalid quiet-hours settings."
|
|
83
|
+
},
|
|
84
|
+
"invalidUrl": {
|
|
85
|
+
"zh-CN": "请提供有效 HTTP(S) RSS 地址,不接受 URL 用户名或密码",
|
|
86
|
+
"en": "Provide a valid HTTP(S) feed URL without a username or password."
|
|
87
|
+
},
|
|
88
|
+
"revision": {
|
|
89
|
+
"zh-CN": "订阅状态已变化,请刷新后重新确认",
|
|
90
|
+
"en": "Subscription state changed. Refresh it and confirm again."
|
|
91
|
+
},
|
|
92
|
+
"capacity": {
|
|
93
|
+
"zh-CN": "管理员 RSS 状态达到 8 条或 60 KiB 上限,请先取消并整理订阅",
|
|
94
|
+
"en": "Administrator RSS reached the 8-task or 60 KiB limit. Cancel and clean up subscriptions first."
|
|
95
|
+
},
|
|
96
|
+
"capacityReserved": {
|
|
97
|
+
"zh-CN": "管理员 RSS 状态空间不足以保留静默摘要及去重游标;请先取消并整理订阅,现有数据未改动",
|
|
98
|
+
"en": "There is not enough RSS storage for quiet-hour summaries and deduplication cursors. Cancel and clean up subscriptions first; existing data has not changed."
|
|
99
|
+
},
|
|
100
|
+
"corrupt": {
|
|
101
|
+
"zh-CN": "管理员 RSS 持久状态格式无效,已停止管理员轮询与投递;请保留原数据核查",
|
|
102
|
+
"en": "Administrator RSS storage is invalid. Polling and delivery have stopped; preserve the original data for investigation."
|
|
103
|
+
},
|
|
104
|
+
"waiting": {
|
|
105
|
+
"zh-CN": "等待首次抓取建立基线,不发送历史文章",
|
|
106
|
+
"en": "Waiting for the first fetch to establish a baseline; historical articles will not be sent."
|
|
107
|
+
},
|
|
108
|
+
"paused": {
|
|
109
|
+
"zh-CN": "管理员暂停并清空待发摘要;恢复时重新建立基线,不补发历史文章",
|
|
110
|
+
"en": "Paused by an administrator and pending summaries cleared. Resuming establishes a new baseline without backfilling articles."
|
|
111
|
+
},
|
|
112
|
+
"resumed": {
|
|
113
|
+
"zh-CN": "已恢复,等待重新建立基线,不补发历史文章",
|
|
114
|
+
"en": "Resumed; waiting for a new baseline without backfilling articles."
|
|
115
|
+
},
|
|
116
|
+
"edited": {
|
|
117
|
+
"zh-CN": "已编辑并清空待发摘要,保持暂停,恢复后首次抓取只建立基线",
|
|
118
|
+
"en": "Updated and pending summaries cleared; still paused. The first fetch after resuming only establishes a baseline."
|
|
119
|
+
},
|
|
120
|
+
"cancelled": {
|
|
121
|
+
"zh-CN": "管理员取消并清空待发摘要;已经开始的投递无法撤回",
|
|
122
|
+
"en": "Cancelled by an administrator and pending summaries cleared. A delivery already in progress cannot be recalled."
|
|
123
|
+
},
|
|
124
|
+
"fetchFailed": {
|
|
125
|
+
"zh-CN": "源站抓取失败;尚未尝试投递,下轮重查",
|
|
126
|
+
"en": "Feed fetch failed. No delivery was attempted; it will be checked on the next poll."
|
|
127
|
+
},
|
|
128
|
+
"baseline": {
|
|
129
|
+
"zh-CN": "已建立基线;从后续新文章开始推送",
|
|
130
|
+
"en": "Baseline established; only future articles will be delivered."
|
|
131
|
+
},
|
|
132
|
+
"noNew": {
|
|
133
|
+
"zh-CN": "抓取完成,暂无新文章",
|
|
134
|
+
"en": "Fetch completed; no new articles."
|
|
135
|
+
},
|
|
136
|
+
"quietPending": {
|
|
137
|
+
"zh-CN": "静默中,已积累更新;退出静默后的首轮轮询汇总",
|
|
138
|
+
"en": "Quiet hours are active; updates are queued for the first poll after quiet hours."
|
|
139
|
+
},
|
|
140
|
+
"summaryDelivering": {
|
|
141
|
+
"zh-CN": "摘要投递中或未确认;不会自动重试",
|
|
142
|
+
"en": "Summary delivery is in progress or unconfirmed; no automatic retry."
|
|
143
|
+
},
|
|
144
|
+
"unknown": {
|
|
145
|
+
"zh-CN": "平台未确认投递,请核实目标会话后取消并另建订阅;不会自动重试",
|
|
146
|
+
"en": "The platform did not confirm delivery. Check the target conversation, then cancel and create another subscription; no automatic retry."
|
|
147
|
+
},
|
|
148
|
+
"delivered": {
|
|
149
|
+
"zh-CN": "已确认投递;等待后续新文章",
|
|
150
|
+
"en": "Delivery confirmed; waiting for future articles."
|
|
151
|
+
},
|
|
152
|
+
"rejected": {
|
|
153
|
+
"zh-CN": "平台明确未投递或拒绝;订阅已停止",
|
|
154
|
+
"en": "The platform confirmed no delivery or rejected it. The subscription has stopped."
|
|
155
|
+
},
|
|
156
|
+
"quietDescription": {
|
|
157
|
+
"zh-CN": "静默 {timezone} {start}–{end}",
|
|
158
|
+
"en": "Quiet hours: {timezone} {start}–{end}"
|
|
159
|
+
},
|
|
160
|
+
"pendingDescription": {
|
|
161
|
+
"zh-CN": "待汇总{count} 条更新",
|
|
162
|
+
"en": "Queued summary: {count} updates"
|
|
163
|
+
},
|
|
164
|
+
"summaryDescription": {
|
|
165
|
+
"zh-CN": "本次摘要{count} 条更新",
|
|
166
|
+
"en": "Current summary: {count} updates"
|
|
167
|
+
},
|
|
168
|
+
"countCapped": {
|
|
169
|
+
"zh-CN": "至少{count}",
|
|
170
|
+
"en": "at least {count}"
|
|
171
|
+
},
|
|
172
|
+
"pollDescription": {
|
|
173
|
+
"zh-CN": "实例轮询 {cron}",
|
|
174
|
+
"en": "Instance polling: {cron}"
|
|
175
|
+
},
|
|
176
|
+
"checkedDescription": {
|
|
177
|
+
"zh-CN": "最近抓取 {at}",
|
|
178
|
+
"en": "Last fetched: {at}"
|
|
179
|
+
},
|
|
180
|
+
"stateNote": {
|
|
181
|
+
"zh-CN": "状态不代表平台连接健康",
|
|
182
|
+
"en": "State does not represent platform connection health."
|
|
183
|
+
},
|
|
184
|
+
"quietFields": {
|
|
185
|
+
"zh-CN": "静默时区、开始和结束时间须全部填写;三项全部留空关闭静默",
|
|
186
|
+
"en": "Provide the quiet timezone, start and end together. Leave all three empty to disable quiet hours."
|
|
187
|
+
},
|
|
188
|
+
"quietZoneOffset": {
|
|
189
|
+
"zh-CN": "请填写有效 IANA 时区,如 Asia/Shanghai;不能使用 +08:00 等偏移",
|
|
190
|
+
"en": "Use an IANA timezone such as Asia/Shanghai, not a fixed offset such as +08:00."
|
|
191
|
+
},
|
|
192
|
+
"quietZone": {
|
|
193
|
+
"zh-CN": "请填写有效 IANA 时区,如 Asia/Shanghai",
|
|
194
|
+
"en": "Use a valid IANA timezone such as Asia/Shanghai."
|
|
195
|
+
},
|
|
196
|
+
"quietClock": {
|
|
197
|
+
"zh-CN": "静默时间须为 HH:mm(24 小时制),开始和结束不能相同",
|
|
198
|
+
"en": "Use HH:mm in 24-hour format; quiet start and end must be different."
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
export const adminText = createMessages(catalog);
|
|
202
|
+
export function isAdminTextKey(value) { return typeof value === 'string' && Object.hasOwn(catalog, value); }
|
|
203
|
+
/** Persist a stable presentation key; preserve legacy text for older readers. */
|
|
204
|
+
export function taskDetail(detailKey) { return { detailKey, detail: adminText('zh-CN', detailKey) }; }
|
|
205
|
+
export function formatTaskDetail(task, locale) {
|
|
206
|
+
return task.detailKey ? adminText(locale, task.detailKey) : task.detail;
|
|
207
|
+
}
|
|
208
|
+
export class LocalizedTaskError extends PluginTaskError {
|
|
209
|
+
messageKey;
|
|
210
|
+
constructor(code, messageKey) {
|
|
211
|
+
super(code, adminText('zh-CN', messageKey));
|
|
212
|
+
this.messageKey = messageKey;
|
|
213
|
+
}
|
|
214
|
+
localize(locale) { return new PluginTaskError(this.code, adminText(locale, this.messageKey)); }
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=admin-i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-i18n.js","sourceRoot":"","sources":["../src/admin-i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,OAAO,GAAG;IACd,eAAe,EAAE;QACf,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE,8EAA8E;KACrF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,iBAAiB;QAC1B,IAAI,EAAE,yDAAyD;KAChE;IACD,eAAe,EAAE;QACf,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,4BAA4B;KACnC;IACD,kBAAkB,EAAE;QAClB,OAAO,EAAE,WAAW;QACpB,IAAI,EAAE,4CAA4C;KACnD;IACD,UAAU,EAAE;QACV,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,oDAAoD;KAC3D;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE,6CAA6C;QACtD,IAAI,EAAE,2FAA2F;KAClG;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE,kFAAkF;KACzF;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE,6DAA6D;KACpE;IACD,aAAa,EAAE;QACb,OAAO,EAAE,iCAAiC;QAC1C,IAAI,EAAE,yEAAyE;KAChF;IACD,OAAO,EAAE;QACP,OAAO,EAAE,2BAA2B;QACpC,IAAI,EAAE,uFAAuF;KAC9F;IACD,WAAW,EAAE;QACX,OAAO,EAAE,yBAAyB;QAClC,IAAI,EAAE,qGAAqG;KAC5G;IACD,iBAAiB,EAAE;QACjB,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IAAqB,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;CAC1H"}
|
package/lib/admin-tasks.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type AdminTextKey } from './admin-i18n.js';
|
|
2
|
+
import { type Locale } from 'zhin.js/i18n';
|
|
1
3
|
import { type DeliveryTarget, type OutboundHost, type PluginStateStore } from 'zhin.js';
|
|
2
4
|
import { generationAdmissionSource, type JsonValue, type PluginTaskAction, type PluginTaskMutation, type PluginTaskProvider, type PluginTaskSnapshot } from 'zhin.js/plugin-runtime';
|
|
3
5
|
import { fetchFeed, type RssConfig } from './feed.js';
|
|
@@ -9,6 +11,7 @@ type Task = {
|
|
|
9
11
|
readonly version: string;
|
|
10
12
|
readonly url: string;
|
|
11
13
|
readonly target: DeliveryTarget;
|
|
14
|
+
readonly locale?: Locale;
|
|
12
15
|
readonly createdAt: number;
|
|
13
16
|
readonly state: 'scheduled' | 'paused' | 'unknown' | 'failed' | 'cancelled';
|
|
14
17
|
readonly seen: readonly string[] | null;
|
|
@@ -16,6 +19,7 @@ type Task = {
|
|
|
16
19
|
readonly lastCheckAt: number | null;
|
|
17
20
|
readonly lastRunAt: number | null;
|
|
18
21
|
readonly detail: string;
|
|
22
|
+
readonly detailKey?: AdminTextKey;
|
|
19
23
|
readonly quiet?: RssQuietHours;
|
|
20
24
|
readonly pending?: PendingSummary | null;
|
|
21
25
|
};
|
|
@@ -47,6 +51,13 @@ type FeedLoader = typeof fetchFeed;
|
|
|
47
51
|
/** Administrator subscriptions use their own owner-bound durable pool and per-task cursors. */
|
|
48
52
|
export declare class AdministratorRssTasks implements PluginTaskProvider {
|
|
49
53
|
#private;
|
|
54
|
+
readonly i18n: {
|
|
55
|
+
readonly en: {
|
|
56
|
+
readonly title: "Administrator RSS subscriptions";
|
|
57
|
+
readonly description: "Deliver new articles to an exact account, conversation and thread, independently of chat subscriptions.";
|
|
58
|
+
readonly effects: readonly ["Fetches the feed on the instance pollCron schedule. The first successful fetch after creation or resuming only establishes a baseline; historical articles are not sent.", "New articles use the unified send pipeline and the complete selected target. Pausing or cancelling cannot recall a delivery already in progress.", "Unconfirmed delivery is never retried or resumed automatically. Check the target conversation before cancelling and creating another subscription.", "Each instance supports 8 tasks and retains 32 operation receipts and 64 recent article identifiers. An article that disappears for a long time may be treated as new when it returns.", "Only administrator subscriptions with all three quiet-hours fields defer and summarize delivery. The first poll after quiet hours sends the pending summary; the next poll fetches the feed. Reminders and chat subscriptions are unaffected.", "A summary stores up to 3 short items, further limited by maxItems, and counts up to 10000 updates before showing “at least”. Pausing, editing or cancelling clears pending summaries; resuming establishes a new baseline without backfilling."];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
50
61
|
readonly title = "\u7BA1\u7406\u5458 RSS \u8BA2\u9605";
|
|
51
62
|
readonly description = "\u5411\u7CBE\u786E\u8D26\u53F7\u3001\u4F1A\u8BDD\u4E0E\u7EBF\u7A0B\u63A8\u9001\u65B0\u6587\u7AE0\uFF0C\u72EC\u7ACB\u4E8E\u804A\u5929\u521B\u5EFA\u7684 RSS \u8BA2\u9605";
|
|
52
63
|
readonly schema: {
|
|
@@ -58,34 +69,61 @@ export declare class AdministratorRssTasks implements PluginTaskProvider {
|
|
|
58
69
|
readonly type: "string";
|
|
59
70
|
readonly minLength: 1;
|
|
60
71
|
readonly maxLength: 2048;
|
|
72
|
+
readonly 'x-i18n': {
|
|
73
|
+
readonly en: {
|
|
74
|
+
readonly title: "RSS / Atom URL";
|
|
75
|
+
readonly description: "HTTP(S) URL without a username or password";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
61
78
|
readonly title: "RSS / Atom 地址";
|
|
62
79
|
readonly description: "HTTP(S) 地址,不接受 URL 用户名或密码";
|
|
63
80
|
};
|
|
64
81
|
readonly quietTimezone: {
|
|
65
82
|
readonly type: "string";
|
|
66
83
|
readonly maxLength: 128;
|
|
84
|
+
readonly 'x-i18n': {
|
|
85
|
+
readonly en: {
|
|
86
|
+
readonly title: "Quiet timezone (optional)";
|
|
87
|
+
readonly description: "For example Asia/Shanghai. Fill in all three quiet-hours fields to enable, or leave all empty to disable.";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
67
90
|
readonly title: "静默时区(可选)";
|
|
68
91
|
readonly description: "如 Asia/Shanghai;三项全部留空关闭静默,启用须全部填写";
|
|
69
92
|
};
|
|
70
93
|
readonly quietStart: {
|
|
71
94
|
readonly type: "string";
|
|
72
95
|
readonly maxLength: 5;
|
|
96
|
+
readonly 'x-i18n': {
|
|
97
|
+
readonly en: {
|
|
98
|
+
readonly title: "Quiet start (optional)";
|
|
99
|
+
readonly description: "HH:mm, inclusive, such as 22:00. Timezone and end time are also required.";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
73
102
|
readonly title: "静默开始(可选)";
|
|
74
103
|
readonly description: "HH:mm,包含此分钟,如 22:00;须同时填写时区和结束时间";
|
|
75
104
|
};
|
|
76
105
|
readonly quietEnd: {
|
|
77
106
|
readonly type: "string";
|
|
78
107
|
readonly maxLength: 5;
|
|
108
|
+
readonly 'x-i18n': {
|
|
109
|
+
readonly en: {
|
|
110
|
+
readonly title: "Quiet end (optional)";
|
|
111
|
+
readonly description: "HH:mm, exclusive, such as 08:00. Start and end must be different.";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
79
114
|
readonly title: "静默结束(可选)";
|
|
80
115
|
readonly description: "HH:mm,不包含此分钟,如 08:00;开始和结束不能相同";
|
|
81
116
|
};
|
|
82
117
|
};
|
|
83
118
|
};
|
|
84
119
|
readonly effects: string[];
|
|
120
|
+
readonly projectLocale: Locale;
|
|
85
121
|
get [generationAdmissionSource](): import("zhin.js").GenerationAdmissionGate[];
|
|
86
|
-
constructor(state: PluginStateStore, outbound: OutboundHost, config: Readonly<RssConfig>, load?: FeedLoader);
|
|
122
|
+
constructor(state: PluginStateStore, outbound: OutboundHost, config: Readonly<RssConfig>, load?: FeedLoader, projectLocale?: Locale);
|
|
87
123
|
stop(): void;
|
|
88
|
-
read(
|
|
124
|
+
read(options?: {
|
|
125
|
+
readonly locale?: Locale;
|
|
126
|
+
}): Promise<PluginTaskSnapshot>;
|
|
89
127
|
create(input: PluginTaskMutation & Readonly<{
|
|
90
128
|
target: DeliveryTarget;
|
|
91
129
|
parameters: Readonly<Record<string, JsonValue>>;
|
package/lib/admin-tasks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-tasks.d.ts","sourceRoot":"","sources":["../src/admin-tasks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin-tasks.d.ts","sourceRoot":"","sources":["../src/admin-tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+E,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEjI,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAwB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9G,OAAO,EAAiC,yBAAyB,EAC/D,KAAK,SAAS,EAAmB,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAC/E,KAAK,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,SAAS,EAA4B,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAEhF,OAAO,EAA+D,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEnH,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAQlD,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAC/F,QAAQ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