export const DEFAULT_BUILTIN_TOOL_NAMES = ["read", "bash", "edit", "write"];
export class InitialSessionContext {
    profileName;
    sessionId;
    parentSessionId;
    model;
    skills;
    tools;
    subagents;
    mcpServers;
    piPackages;
    contextFiles;
    builtinTools;
    builtinToolNames;
    autoContextFiles;
    toolPackages;
    constructor(options) {
        this.profileName = options.profileName;
        this.sessionId = options.sessionId;
        this.parentSessionId = options.parentSessionId;
        this.model = options.model ? { ...options.model } : undefined;
        this.skills = [...(options.skills ?? [])];
        this.tools = [...(options.tools ?? [])];
        this.subagents = [...(options.subagents ?? [])];
        this.mcpServers = [...(options.mcpServers ?? [])];
        this.piPackages = [...(options.piPackages ?? [])];
        this.contextFiles = [...(options.contextFiles ?? [])];
        this.builtinTools = options.builtinTools ?? "default";
        this.builtinToolNames = [...(options.builtinToolNames ?? DEFAULT_BUILTIN_TOOL_NAMES)];
        this.autoContextFiles = options.autoContextFiles ?? true;
        this.toolPackages = { ...(options.toolPackages ?? {}) };
    }
}
export class InitialSessionContextBuilder {
    profileName;
    sessionId;
    parentSessionId;
    model;
    skills = [];
    tools = [];
    subagents = [];
    mcpServers = [];
    piPackages = [];
    contextFiles = [];
    builtinTools = "default";
    builtinToolNames = [...DEFAULT_BUILTIN_TOOL_NAMES];
    autoContextFiles = true;
    toolPackages = {};
    constructor(profileName) {
        this.profileName = profileName;
    }
    withSessionId(sessionId) {
        this.sessionId = sessionId;
        return this;
    }
    withParentSessionId(parentSessionId) {
        this.parentSessionId = parentSessionId;
        return this;
    }
    withModel(model) {
        this.model = { ...model };
        return this;
    }
    withBuiltinTools(mode) {
        this.builtinTools = mode;
        return this;
    }
    withBuiltinToolNames(names) {
        this.builtinToolNames = [...names];
        return this;
    }
    withAutoContextFiles(enabled) {
        this.autoContextFiles = enabled;
        return this;
    }
    withToolPackages(packages) {
        this.toolPackages = { ...packages };
        return this;
    }
    addSkill(skill) {
        this.skills.push(skill);
        return this;
    }
    addSkills(skills) {
        this.skills.push(...skills);
        return this;
    }
    addTool(tool) {
        this.tools.push(tool);
        return this;
    }
    addTools(tools) {
        this.tools.push(...tools);
        return this;
    }
    addSubagent(subagent) {
        this.subagents.push(subagent);
        return this;
    }
    addSubagents(subagents) {
        this.subagents.push(...subagents);
        return this;
    }
    withMcpServers(mcpServers) {
        this.mcpServers = [...mcpServers];
        return this;
    }
    withPiPackages(packages) {
        this.piPackages = [...packages];
        return this;
    }
    addPiPackage(pkg) {
        this.piPackages.push(pkg);
        return this;
    }
    addPiPackages(packages) {
        this.piPackages.push(...packages);
        return this;
    }
    addContextFile(contextFile) {
        this.contextFiles.push(contextFile);
        return this;
    }
    addContextFiles(contextFiles) {
        this.contextFiles.push(...contextFiles);
        return this;
    }
    createSession() {
        return new InitialSessionContext({
            profileName: this.profileName,
            sessionId: this.sessionId,
            parentSessionId: this.parentSessionId,
            model: this.model,
            skills: this.skills,
            tools: this.tools,
            subagents: this.subagents,
            mcpServers: this.mcpServers,
            piPackages: this.piPackages,
            contextFiles: this.contextFiles,
            builtinTools: this.builtinTools,
            builtinToolNames: this.builtinToolNames,
            autoContextFiles: this.autoContextFiles,
            toolPackages: this.toolPackages,
        });
    }
}
