import { SessionEngine, } from "./session_engine.js";
export class CoreSession {
    engine;
    constructor(options) {
        this.engine = new SessionEngine(options);
    }
    reset() {
        this.engine.reset();
    }
    dispose() {
        this.engine.dispose();
    }
    setPersona(persona, systemPrompt, subagentPrompts) {
        this.engine.setPersona(persona, systemPrompt, subagentPrompts);
    }
    setRiskLevel(level) {
        this.engine.setRiskLevel(level);
    }
    setConfig(config) {
        this.engine.setConfig(config);
    }
    setPromptContext(context) {
        this.engine.setPromptContext(context);
    }
    onEvent(handler) {
        return this.engine.onEvent(handler);
    }
    async terminateSubagent(id) {
        return await this.engine.terminateSubagent(id);
    }
    addUserText(textForModel, options) {
        return this.engine.addUserText(textForModel, options);
    }
    addMessage(message, options) {
        return this.engine.addMessage(message, options);
    }
    replaceMessage(index, message) {
        return this.engine.replaceMessage(index, message);
    }
    replaceMessageById(historyEntryId, message) {
        return this.engine.replaceMessageById(historyEntryId, message);
    }
    listRewindCandidates() {
        return this.engine.listRewindCandidates();
    }
    rewindToHistoryEntryId(historyEntryId) {
        return this.engine.rewindToHistoryEntryId(historyEntryId);
    }
    get history() {
        return this.engine.history;
    }
    get rawHistory() {
        return this.engine.rawHistory;
    }
    get rawHistoryEntries() {
        return this.engine.rawHistoryEntriesSnapshot;
    }
    get historyEntries() {
        return this.engine.historyEntriesSnapshot;
    }
    get sessionId() {
        return this.engine.sessionIdValue;
    }
    async compact(options) {
        return await this.engine.compact(options);
    }
    async *events(signal) {
        return yield* this.engine.processTurn(signal);
    }
}
//# sourceMappingURL=core_session.js.map