//#region ../core/dist/memory/auto-extract.js
/**
* Extract durable knowledge from a provider session transcript and store it
* in brain.db via the LLM extraction gate.
*
* Replaces the legacy `ACTION_PATTERNS` keyword-regex extractor. The LLM
* returns typed, structured memories with justification and importance
* scoring; only high-value items are persisted.
*
* Behaviour:
*   - Returns silently when transcript is empty/non-string.
*   - Returns silently when `brain.llmExtraction.enabled` is false OR when
*     `ANTHROPIC_API_KEY` is not set (best-effort degradation).
*   - Never throws — all errors are swallowed so session end cannot be
*     blocked by a failed extraction.
*
* @param projectRoot - Absolute path to project root.
* @param sessionId - The CLEO session ID being processed.
* @param transcript - Plain-text provider transcript (user/assistant turns).
*/
async function extractFromTranscript(projectRoot, sessionId, transcript) {
	try {
		if (typeof transcript !== "string" || transcript.trim().length === 0) return;
		const { extractFromTranscript: runLlmExtraction } = await import('./llm-extraction-DuIdhNKI.js');
		await runLlmExtraction({
			projectRoot,
			sessionId,
			transcript
		});
	} catch {}
}

export { extractFromTranscript };
//# sourceMappingURL=auto-extract-rR2baYuu.js.map
