/** * @license * Copyright 2025 Vybestack LLC * SPDX-License-Identifier: Apache-2.0 */ /** * @plan PLAN-20260130-ASYNCTASK.P08 * @requirement REQ-ASYNC-003, REQ-ASYNC-004 */ import type { AsyncTaskManager, AsyncTaskInfo } from './asyncTaskManager.js'; /** * Generates next-turn reminders that include async task status and completion results. * Matches the format of TodoReminderService for consistency. * @pseudocode async-task-reminder-service.md */ export declare class AsyncTaskReminderService { private readonly taskManager; constructor(taskManager: AsyncTaskManager); /** * Generates status summary for inclusion in system instruction. * Format: * [ASYNC TASKS: X total] * [1] subagentName - [STATUS] (idPrefix...) * @pseudocode lines 012-038 */ generateStatusSummary(): string; /** * Generates a reminder string for the next turn. * Returns null if no async tasks need reporting. * The returned object includes the task IDs that were included in the * reminder so that only those specific tasks are marked as notified, * avoiding a TOCTOU race where a task completing between generation * and marking would be silently skipped. * @pseudocode lines 044-071 */ generateReminder(): { text: string; notifiedTaskIds: string[]; } | null; /** * Formats a completion notification matching sync task output format. * @param task The completed task * @returns Formatted string like sync task.ts formatSuccessContent/formatSuccessDisplay * @pseudocode lines 077-110 */ formatCompletionNotification(task: AsyncTaskInfo): string; /** * Checks if there are any pending notifications. * @pseudocode lines 116-118 */ hasPendingNotifications(): boolean; /** * Marks specific tasks as notified. * Pass the IDs returned by generateReminder() so only the tasks whose * content was actually delivered get marked — avoids a TOCTOU race with * tasks that complete between generation and delivery. * @pseudocode lines 120-127 */ markNotified(taskIds: string[]): void; /** * Gets status icon for display */ private getStatusIcon; }