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
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:
@@ -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}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user