export * as SessionCompaction from "./compaction" import { LLM, LLMError, LLMEvent, Message, type LLMRequest, type Model } from "@opencode-ai/llm" import { DateTime, Effect, Stream } from "effect" import type { Config } from "../config" import type { EventV2 } from "../event" import { SessionEvent } from "./event" import { SessionMessage } from "./message" import { SessionSchema } from "./schema" import { Token } from "../util/token" const DEFAULT_BUFFER = 20_000 const DEFAULT_KEEP_TOKENS = 8_000 const TOOL_OUTPUT_MAX_CHARS = 2_000 const SUMMARY_OUTPUT_TOKENS = 4_096 const SUMMARY_TEMPLATE = `Output exactly the Markdown structure shown inside