feat(goose): complete v1.49 phase3 closeout gates and context fusion plan
Expand Goose v1.49 smoke coverage (memory chat, portal resume, page e2e, multiturn provider), add canary memory policy lock, refresh baselines, and ignore one-off evidence artifacts. Document headroom-based context runtime fusion plan; include auth, scheduled-task, and wechat intent fixes on branch. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -109,6 +109,18 @@ const SCHEDULED_TASK_CLARIFICATION_PATTERNS = [
|
||||
/缺(?:少|失)/u,
|
||||
];
|
||||
|
||||
const SCHEDULED_TASK_SETUP_PATTERNS = [
|
||||
/定时(?:自动)?任务已(?:成功)?(?:设置|创建|写入|存在)/u,
|
||||
/已成功(?:设置|创建|写入)定时/u,
|
||||
/scheduled_task_create/u,
|
||||
/任务 ID/u,
|
||||
/无需重复创建/u,
|
||||
/已存在且处于/u,
|
||||
/正常运行中/u,
|
||||
];
|
||||
|
||||
const SIMPLE_REMINDER_BLOCKERS = /页面|\.html|HTML|生成.{0,8}页|新闻|报告|摘要|搜索|weather|forecast/i;
|
||||
|
||||
const DEFAULT_SCHEDULED_TASK_DELIVERY_POLL_INTERVAL_MS = 5_000;
|
||||
|
||||
export function resolveScheduledTaskDeliveryPollIntervalMs(
|
||||
@@ -153,6 +165,24 @@ export function deliveryTextPromisesPublicHtml(text) {
|
||||
&& /\.html/i.test(normalized);
|
||||
}
|
||||
|
||||
export function isSimpleScheduledTaskReminder(task) {
|
||||
const spec = String(task?.taskSpec ?? '').trim();
|
||||
if (!spec || spec.length > 300) return false;
|
||||
if (SIMPLE_REMINDER_BLOCKERS.test(spec)) return false;
|
||||
if (/scheduled_task|定时任务已|task_id/i.test(spec)) return false;
|
||||
return /^提醒/u.test(spec);
|
||||
}
|
||||
|
||||
export function buildSimpleScheduledTaskReminderDelivery(task) {
|
||||
const spec = String(task?.taskSpec ?? '').trim();
|
||||
const match = spec.match(/^提醒\s*(\S+)[::]\s*(.+)$/su);
|
||||
if (match) {
|
||||
const [, name, body] = match;
|
||||
return `${name},${body}`.trim();
|
||||
}
|
||||
return spec;
|
||||
}
|
||||
|
||||
export function looksLikeScheduledTaskNonDelivery(text, { readyPaths = [] } = {}) {
|
||||
if (Array.isArray(readyPaths) && readyPaths.length > 0) return false;
|
||||
const normalized = String(text ?? '').trim();
|
||||
@@ -160,6 +190,9 @@ export function looksLikeScheduledTaskNonDelivery(text, { readyPaths = [] } = {}
|
||||
if (SCHEDULED_TASK_CLARIFICATION_PATTERNS.some((pattern) => pattern.test(normalized))) {
|
||||
return true;
|
||||
}
|
||||
if (SCHEDULED_TASK_SETUP_PATTERNS.some((pattern) => pattern.test(normalized))) {
|
||||
return true;
|
||||
}
|
||||
if (deliveryTextPromisesPublicHtml(normalized)) return true;
|
||||
if (/https?:\/\//i.test(normalized)) return false;
|
||||
if (/public\/[^\s]+\.html/i.test(normalized)) return false;
|
||||
@@ -552,6 +585,22 @@ export async function executeScheduledTask(task, {
|
||||
}
|
||||
|
||||
const requestId = crypto.randomUUID();
|
||||
if (isSimpleScheduledTaskReminder(task)) {
|
||||
const deliveryText = buildSimpleScheduledTaskReminderDelivery(task);
|
||||
logger.info?.('[ScheduledTask] direct reminder delivery', {
|
||||
taskId: task.id,
|
||||
userId: task.userId,
|
||||
requestId,
|
||||
});
|
||||
return {
|
||||
sessionId: null,
|
||||
requestId,
|
||||
deliveryText,
|
||||
messages: [],
|
||||
readyPaths: [],
|
||||
executor: 'direct_reminder',
|
||||
};
|
||||
}
|
||||
const userMessage = buildScheduledTaskExecutionPrompt(task);
|
||||
const publishDir = h5Root && task.userId
|
||||
? path.join(h5Root, 'MindSpace', task.userId)
|
||||
|
||||
Reference in New Issue
Block a user