Add smart ACK provider for WeChat MP replies

Replace fixed ackText with a rule-based AckProvider that picks
response templates by message type and intent (translate, summary,
rewrite, poster, ppt, mindmap, code, search, schedule). Pure sync,
zero I/O, auto-falls back to config.ackText on any error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
john
2026-06-26 15:19:03 +08:00
parent 9ed4fd48d7
commit 9b4a25799f
162 changed files with 17276 additions and 2054 deletions
+13
View File
@@ -79,6 +79,7 @@ const CONSOLES = {
plazaPosts: services.plazaPosts,
plazaOps: services.plazaOps,
wechatAdmin: services.wechatAdmin,
subscriptionService: services.subscriptionService,
}),
},
ops: {
@@ -173,6 +174,18 @@ async function main() {
app.use((req, res) => res.status(404).json({ message: 'not found' }));
if (services.subscriptionService) {
const subExpiryTimer = setInterval(async () => {
try {
const n = await services.subscriptionService.expireStaleSubscriptions();
if (n > 0) console.log(`Expired ${n} stale subscription(s)`);
} catch (err) {
console.warn('Subscription expiry check failed:', err);
}
}, 60 * 60 * 1000);
subExpiryTimer.unref?.();
}
app.listen(PORT, HOST, () => {
console.log(`memind_adm @ http://${HOST}:${PORT} (public host: ${PUBLIC_HOST})`);
for (const { console_, allowedHosts, ipAllowlist, guarded } of summary) {