fix(wechat): pass inbound messages to goose and gate side effects at MCP tools
Memind CI / Test, build, and release guards (push) Failing after 14m19s

Stop ITL regex from intercepting new messages before Agent execution; move
scheduled task and schedule write confirmation to MCP tool calls with draft commit on 确认.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-28 22:16:23 +08:00
parent fef2df119d
commit e13df82021
11 changed files with 586 additions and 398 deletions
+19
View File
@@ -1,3 +1,4 @@
import { commitAgentSideEffectTool } from './agent-side-effect-tools.mjs';
import { resolveScheduleTimestamp } from './schedule-time.mjs';
import { buildScheduledTaskCreatePayload } from './scheduled-task-intent.mjs';
import { isUnifiedTasksEnabled } from './task-unified-config.mjs';
@@ -136,5 +137,23 @@ export async function commitIntentDraft({
return committed;
}
if (kind === 'agent_tool') {
const committed = await commitAgentSideEffectTool(payload.toolName, payload.toolArgs, {
userId,
scheduleService,
scheduledTaskService,
timezone,
env,
});
await maybeSyncUnifiedTask({
taskUnifiedService,
userId,
kind: committed.kind === 'scheduled_task' ? 'scheduled_task' : kind,
committed,
env,
});
return committed;
}
throw new Error(`不支持的草稿类型:${kind}`);
}