{"version":3,"sources":["../../subagents/types.ts"],"sourcesContent":["/**\n * Types for Explore subagent\n */\n\nimport type { WarpGrepContext } from '../tools/warp_grep/types.js';\n\n/** Thoroughness level for exploration */\nexport type ExploreThoroughness = 'quick' | 'medium' | 'thorough';\n\n/** Configuration for creating an Explore subagent */\nexport interface ExploreSubagentConfig {\n  /** Morph API key for WarpGrep searches */\n  morphApiKey?: string;\n  /** Root directory of the repository to search */\n  repoRoot: string;\n  /** How thorough the exploration should be */\n  thoroughness?: ExploreThoroughness;\n  /** Maximum number of model turns (defaults based on thoroughness) */\n  maxTurns?: number;\n  /** Timeout in milliseconds for the entire exploration */\n  timeout?: number;\n  /** Timeout in milliseconds for waiting for host reply to send_message */\n  replyTimeout?: number;\n  /** Glob patterns to exclude from search */\n  excludes?: string[];\n  /** Glob patterns to include in search */\n  includes?: string[];\n}\n\n/** Result from an exploration */\nexport interface ExploreResult {\n  /** Whether the exploration completed successfully */\n  success: boolean;\n  /** Concise summary of findings (for model consumption) */\n  summary: string;\n  /** Full code contexts found during exploration (for app consumption) */\n  contexts: WarpGrepContext[];\n  /** Number of WarpGrep searches performed */\n  searchCount: number;\n  /** Total duration in milliseconds */\n  durationMs: number;\n  /** Error message if exploration failed */\n  error?: string;\n}\n\n/** Progress event for a single exploration step */\nexport interface ExploreStep {\n  /** Step number (1-based) */\n  step: number;\n  /** The search request sent to WarpGrep */\n  searchRequest: string;\n  /** Number of contexts returned */\n  contextsFound: number;\n  /** Whether this is the final step */\n  isFinal: boolean;\n}\n\n/** Message sent between host and subagent */\nexport interface SubagentMessage {\n  /** Who sent the message */\n  from: 'explore' | 'host';\n  /** Message content */\n  content: string;\n  /** Timestamp */\n  timestamp: number;\n}\n\n/** Union type for streaming events */\nexport type ExploreEvent =\n  | { type: 'step'; step: number; searchRequest: string; contextsFound: number; isFinal: boolean }\n  | { type: 'message'; from: 'explore' | 'host'; content: string; timestamp: number };\n\n/** Callback for message events */\nexport type MessageHandler = (message: SubagentMessage, reply: (text: string) => void) => void;\n\n/** Callback for step events */\nexport type StepHandler = (step: ExploreStep) => void;\n\n/** Session returned by explore.run() */\nexport interface ExploreSession {\n  /** Listen for events */\n  on(event: 'message', handler: MessageHandler): ExploreSession;\n  on(event: 'step', handler: StepHandler): ExploreSession;\n  /** Send a message to the subagent */\n  send(text: string): void;\n  /** Promise that resolves with the final result */\n  result: Promise<ExploreResult>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}