feat(cursor): wire executor through portal, admin, and wechat routes

Register cursor in LLM executor bindings, route page/code tasks through
cursor runtime selection, and bootstrap wechat cursor policy services.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-27 09:33:47 +08:00
parent a29e1ec5c8
commit ad6dcc283f
17 changed files with 343 additions and 16 deletions
@@ -34,6 +34,8 @@ export async function bootstrapPortalIntegrationServices({
sessionSnapshotService = null,
wechatScheduleLlmConfigService,
wechatIntentRouter = null,
wechatCursorExecutorPolicyService = null,
agentRunGateway = null,
llmProviderService,
chatIntentRouter,
systemDisclosurePolicyService,
@@ -119,6 +121,8 @@ export async function bootstrapPortalIntegrationServices({
? mindSpacePublicFinish
: null,
pageDataDeliveryReviewer,
wechatCursorExecutorPolicyService,
agentRunGateway,
apiFetch: tkmindProxy.apiFetch,
startAgentSession: ({
userId,
@@ -13,6 +13,7 @@ import { createSystemDisclosurePolicyService } from '../system-disclosure-policy
import { createWechatScheduleLlmConfigService } from '../wechat-schedule-llm-config.mjs';
import { createWechatIntentRouterConfigService } from '../wechat-intent-router-config.mjs';
import { createManagedWechatIntentRouter } from '../wechat-intent-router.mjs';
import { createWechatCursorExecutorAdminConfigService } from '../wechat-cursor-executor-admin-config.mjs';
export async function bootstrapPortalMemorySessionServices({
pool,
@@ -34,6 +35,8 @@ export async function bootstrapPortalMemorySessionServices({
createWechatScheduleLlmConfigService,
createWechatIntentRouterConfigServiceFn =
createWechatIntentRouterConfigService,
createWechatCursorExecutorAdminConfigServiceFn =
createWechatCursorExecutorAdminConfigService,
createManagedWechatIntentRouterFn =
createManagedWechatIntentRouter,
createConversationMemoryServiceFn =
@@ -79,6 +82,8 @@ export async function bootstrapPortalMemorySessionServices({
createWechatScheduleLlmConfigServiceFn(pool);
const wechatIntentRouterConfigService =
createWechatIntentRouterConfigServiceFn(pool, { env });
const wechatCursorExecutorPolicyService =
createWechatCursorExecutorAdminConfigServiceFn(pool);
const wechatIntentRouter =
createManagedWechatIntentRouterFn({
llmProviderService,
@@ -156,6 +161,7 @@ export async function bootstrapPortalMemorySessionServices({
agentCodeRunPolicyService,
wechatScheduleLlmConfigService,
wechatIntentRouterConfigService,
wechatCursorExecutorPolicyService,
wechatIntentRouter,
conversationMemoryService,
memoryV2,