fix(tasks): guard loop name length and surface loop ownership in the UI

Review follow-up:

- Reject loop files whose frontmatter name exceeds MAX_TASK_NAME_LENGTH
  (80): task names are clamped at storage time, so a raw name longer than
  the limit could never match the stored task identity. The file is treated
  as malformed (definition: null) instead of creating an unreachable
  definition; MAX_TASK_NAME_LENGTH is now exported from project-config.js
  and shared with loops.js.
- Surface loop-sourced tasks in the scheduled-tasks dialog: tasks carrying
  loopFile show a 'Managed by loop file <path>' note, and the enable
  toggle / edit / delete actions are disabled with an explanatory tooltip,
  since the file remains authoritative and would revert any such change.
  run-now stays available. New locale keys added to all 11 message files
  (i18n parity test enforces exact key sets).
- ScheduledTask type gains an optional loopFile field (additive, unknown
  to older clients).
This commit is contained in:
makeittech
2026-08-06 09:38:18 +03:00
parent 359225d363
commit 59a6c1b70d
17 changed files with 96 additions and 7 deletions
+3
View File
@@ -269,6 +269,9 @@ export const dict: Record<I18nKey, string> = {
'sessions.scheduledTasks.dialog.taskToggle.pauseAria': '{taskName} 일시 중지',
'sessions.scheduledTasks.dialog.taskToggle.enabled': '활성화됨',
'sessions.scheduledTasks.dialog.taskToggle.paused': '일시 중지됨',
'sessions.scheduledTasks.dialog.loopFile.note': '루프 파일에서 관리됨: {file}',
'sessions.scheduledTasks.dialog.loopFile.toggleDisabled': '활성화 여부는 루프 파일이 제어합니다. Markdown frontmatter에서 enabled를 설정하세요',
'sessions.scheduledTasks.dialog.loopFile.actionsDisabled': '루프 작업은 .agents/loops Markdown 파일에서 구성합니다',
'sessions.scheduledTasks.editor.title.edit': '예약 작업 편집',
'sessions.scheduledTasks.editor.title.new': '새 예약 작업',
'sessions.scheduledTasks.editor.description': '새 세션을 만들고 프롬프트를 보내는 서버 작업을 설정합니다.',