Improve WeChat MP replies and ship MindSpace/H5 production updates.
Add WeChat service account routing with sync acks, connectivity tests, and context isolation; document deploy runbooks; and bundle related MindSpace, voice, Plaza, and server gateway changes for production rollout. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+9
-2
@@ -20,6 +20,8 @@ import { createPlazaInteractionService } from './plaza-interactions.mjs';
|
||||
import { createPlazaOpsService } from './plaza-ops.mjs';
|
||||
import { createNoopPlazaRedis } from './plaza-redis.mjs';
|
||||
import { ensureAlgorithmConfig, loadAlgorithmConfig } from './plaza-algorithm.mjs';
|
||||
import { createWechatAdminService } from './wechat-admin.mjs';
|
||||
import { loadWechatMpConfig } from './wechat-mp.mjs';
|
||||
|
||||
const noop = () => {};
|
||||
|
||||
@@ -32,7 +34,7 @@ const noop = () => {};
|
||||
* @param {string} [env.apiSecret] Goosed/relay API secret.
|
||||
* @param {number} [env.defaultSignupBalanceCents]
|
||||
* @param {boolean} [env.ensureAdminUser] Ensure an admin account exists on boot (default true).
|
||||
* @returns {Promise<{pool, userAuth, llmProviderService, plazaPosts, plazaOps}>}
|
||||
* @returns {Promise<{pool, userAuth, llmProviderService, plazaPosts, plazaOps, wechatAdmin}>}
|
||||
*/
|
||||
export async function createAdminServices(env = {}) {
|
||||
if (!isDatabaseConfigured()) {
|
||||
@@ -85,6 +87,11 @@ export async function createAdminServices(env = {}) {
|
||||
}
|
||||
|
||||
const llmProviderService = createLlmProviderService(pool, { apiTarget, apiSecret });
|
||||
const wechatAdmin = createWechatAdminService(pool, {
|
||||
config: loadWechatMpConfig(),
|
||||
scheduleEnabled: process.env.H5_SCHEDULE_ENABLED === '1',
|
||||
reminderWorkerEnabled: process.env.H5_REMINDER_WORKER_ENABLED === '1',
|
||||
});
|
||||
|
||||
return { pool, userAuth, llmProviderService, plazaPosts, plazaOps };
|
||||
return { pool, userAuth, llmProviderService, plazaPosts, plazaOps, wechatAdmin };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user