/**
 * @module        sessionContext
 * @description   轻量级会话上下文，用于 harness 模式
 *
 * @author        eddy
 * @organization  wykj
 * @ownership     wykj/eddy
 *
 * @created       2026-03-31
 * @updated       2026-04-03
 *
 * @role          state
 * @layer         core
 * @boundedContext session
 */
import { mkdirSync } from 'node:fs';
import { resolve } from 'node:path';
import { resolveSessionPaths } from './paths.js';
export function createSessionContext(opts) {
    const cwd = opts?.cwd ? resolve(opts.cwd) : process.cwd();
    const sessionPaths = resolveSessionPaths();
    // Ensure directories exist
    mkdirSync(sessionPaths.stateDir, { recursive: true });
    mkdirSync(sessionPaths.logsDir, { recursive: true });
    return {
        projectName: 'standalone',
        cwd,
        tool: 'claude',
        maxWorkers: 0, // no pipeline worker slots in harness mode
        paths: {
            ...sessionPaths,
            repoDir: cwd,
        },
        config: {
            raw: { WORKER_TRANSPORT: 'acp-sdk' },
        },
    };
}
//# sourceMappingURL=sessionContext.js.map