/** * Task Creator - creates tasks in Mirra Memory based on Claude Code session output * * This module: * 1. Queries Claude Code for what needs testing after a session ends * 2. Parses Claude's structured JSON response * 3. Creates tasks in Mirra Memory with appropriate metadata */ import { MirraSDK } from '@mirra-messenger/sdk'; import { TaskQueryResponse, TaskItem, TaskCreationMetadata } from './types'; /** * Query Claude Code for what needs testing * * Uses --resume to continue the same session context so Claude knows * what work was done. Parses the JSON response. * * @param claudePath - Path to the claude binary * @param claudeSessionId - Claude's internal session ID for --resume * @param workingDir - Directory where the session ran * @returns Parsed task query response or null on failure */ export declare function queryForTasks(claudePath: string, claudeSessionId: string, workingDir: string): Promise; /** * Create tasks in Mirra Memory * * @param sdk - Mirra SDK instance * @param tasks - Array of task items from Claude's response * @param metadata - Session metadata to attach to tasks * @param assignToUsername - Optional username to assign tasks to * @param groupId - Optional group ID for context * @returns Array of created task IDs */ export declare function createTasksInMirra(sdk: MirraSDK, tasks: TaskItem[], metadata: TaskCreationMetadata, assignToUsername?: string, groupId?: string): Promise; /** * Send a notification about created tasks to the Mirra group * * @param sdk - Mirra SDK instance * @param groupId - Group to send notification to * @param sessionId - Session ID for automation metadata * @param taskCount - Number of tasks created * @param summary - Summary of what was implemented */ export declare function notifyTasksCreated(sdk: MirraSDK, groupId: string, sessionId: string, taskCount: number, summary: string): Promise; /** * Process options for task creation */ export interface ProcessSessionOptions { claudePath: string; claudeSessionId: string; workingDir: string; sessionId: string; sdk: MirraSDK; assignToUsername?: string; groupId?: string; sendNotification?: boolean; } /** * Result of processing a session for tasks */ export interface ProcessSessionResult { tasksCreated: number; taskIds: string[]; summary: string | null; needsTesting: boolean; } /** * Main entry point: Query Claude and create tasks * * This is called from the Stop hook after a session ends. * It queries Claude for what needs testing and creates tasks in Mirra Memory. * * @param options - Processing options including session info and SDK * @returns Result with task count and summary */ export declare function processSessionForTasks(options: ProcessSessionOptions): Promise; //# sourceMappingURL=task-creator.d.ts.map