feat(health): wire H5 health page, WeChat channel, and observation API.
Expose /health and /api/health/observations behind MEMIND_HEALTH_ENABLED, redirect ordinary chat health intents without persisting, and run a dedicated WeChat menu flow with confirm-before-write semantics. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+13
@@ -74,6 +74,9 @@ import { attachPortalUserMemoryRoutes } from './server/portal-user-memory-routes
|
||||
import { attachPortalUserModelRoutes } from './server/portal-user-model-routes.mjs';
|
||||
import { attachPortalTemporalRecallRoutes } from './server/portal-temporal-recall-routes.mjs';
|
||||
import { attachPortalGoalRunRoutes } from './server/portal-goal-run-routes.mjs';
|
||||
import { attachPortalHealthRoutes } from './server/portal-health-routes.mjs';
|
||||
import { createHealthChannelSessionStore } from './health-channel-session-store.mjs';
|
||||
import { createInMemoryHealthObservationStore } from './health-observation-store.mjs';
|
||||
import { assertMindSpaceRoute, mindspaceFlags } from './mindspace-flags.mjs';
|
||||
import { loadMindSpaceConfigCached } from './mindspace-config.mjs';
|
||||
import { createMindspaceSeoDiscoveryService } from './mindspace-seo-discovery-service.mjs';
|
||||
@@ -322,6 +325,8 @@ let subscriptionService = null;
|
||||
let wechatPayClient = null;
|
||||
let wechatOAuthService = null;
|
||||
let wechatMpService = null;
|
||||
const healthObservationStore = createInMemoryHealthObservationStore();
|
||||
const healthChannelStore = createHealthChannelSessionStore();
|
||||
let notificationDispatcher = null;
|
||||
let scheduleService = null;
|
||||
let scheduledTaskService = null;
|
||||
@@ -583,6 +588,8 @@ async function bootstrapUserAuth() {
|
||||
apiSecret: API_SECRET,
|
||||
mindSpacePages,
|
||||
mindSpacePageLiveEdit,
|
||||
healthChannelStore,
|
||||
healthObservationStore,
|
||||
logger: console,
|
||||
});
|
||||
wechatMpService =
|
||||
@@ -905,6 +912,12 @@ attachPortalGoalRunRoutes(api, {
|
||||
env: process.env,
|
||||
});
|
||||
|
||||
attachPortalHealthRoutes({
|
||||
api,
|
||||
observationStore: healthObservationStore,
|
||||
env: process.env,
|
||||
});
|
||||
|
||||
attachPortalMindSpaceSpaceRoutes(api, {
|
||||
getMindSpace: () => mindSpace,
|
||||
getScheduleService: () => scheduleService,
|
||||
|
||||
Reference in New Issue
Block a user