Add scheduled task automation skill with worker execution pipeline.
Memind CI / Test, build, and release guards (push) Failing after 18s
Memind CI / Test, build, and release guards (push) Failing after 18s
Introduce scheduled-task-automation for H5 and WeChat, persist tasks in h5_scheduled_tasks, and run due jobs via a dedicated worker that executes agent tasks and delivers results. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
// Keep browser-safe: do not import user-publish.mjs (uses node:fs/path/url).
|
||||
import { shouldUseScheduledTaskAutomation } from './scheduled-task-intent.mjs';
|
||||
|
||||
const PUBLISH_SKILL_NAME = 'static-page-publish';
|
||||
export const PAGE_DATA_COLLECT_SKILL_NAME = 'page-data-collect';
|
||||
export const EXCEL_ANALYST_SKILL_NAME = 'excel-analyst';
|
||||
export const SCHEDULED_TASK_AUTOMATION_SKILL_NAME = 'scheduled-task-automation';
|
||||
export const AIDER_DEVELOPMENT_SKILL_NAME = 'aider-development';
|
||||
export const SKILL_ROUTER_V2_ENV = 'TKMIND_SKILL_ROUTER_V2';
|
||||
|
||||
@@ -297,6 +300,12 @@ export function buildChatSkillPrompt(promptKey, skillName) {
|
||||
'只有用户明确要求 Word / docx 下载时,才先 `load_skill` → `docx-generate`,生成 `public/*.docx` 并确认文件已存在,再写 HTML 并用同目录相对路径链接该文档。' +
|
||||
'只有用户明确要求长图下载时,才先 `load_skill` → `long-image-download`,调用 `generate_long_image` 生成 `public/*.long.png` 并确认文件已存在,再给长图预览链接和 `?download=long-image` 下载链接。不要在没有明确需求时强制生成伴生文件。'
|
||||
);
|
||||
case 'scheduled-task-automation':
|
||||
return (
|
||||
`请使用 ${skillName ?? SCHEDULED_TASK_AUTOMATION_SKILL_NAME} 技能:这是定时自动任务(Scheduled Automation),不是待办提醒。` +
|
||||
'先澄清缺失的执行时间或 taskSpec,再调用 scheduled_task_create / scheduled_task_list / scheduled_task_cancel。' +
|
||||
'禁止在当前对话立即执行长任务;工具成功返回后才能确认已设置。一次性任务用 runAtLocal,循环任务用 hour/minute/weekday。我的需求是:'
|
||||
);
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
@@ -407,6 +416,12 @@ function buildManifestSkillPrompt(route) {
|
||||
}
|
||||
|
||||
function buildLegacyAutoChatSkillPrefix(trimmed, grantedSkills) {
|
||||
if (
|
||||
grantedSkills.includes(SCHEDULED_TASK_AUTOMATION_SKILL_NAME) &&
|
||||
shouldUseScheduledTaskAutomation(trimmed)
|
||||
) {
|
||||
return buildChatSkillPrompt('scheduled-task-automation', SCHEDULED_TASK_AUTOMATION_SKILL_NAME);
|
||||
}
|
||||
if (
|
||||
grantedSkills.includes(EXCEL_ANALYST_SKILL_NAME) &&
|
||||
isExcelAnalysisIntent(trimmed)
|
||||
|
||||
Reference in New Issue
Block a user