/**
 * get_session_settings — inspect model/thinking controls for the current session.
 *
 * Lives behind the meta-tool wall (get_tool_info + execute_tool).
 */
import { Type } from '@sinclair/typebox';
import { GET_SESSION_SETTINGS } from '../../../tool-names.js';
import { formatModelRef } from '../../providers/model-resolver.js';
const TOOL_DESCRIPTION = 'Inspect the current session model, thinking level, selectable thinking levels, and available models only when the user asks about session settings.';
const schema = Type.Object({});
async function getSettingsPayload(session) {
    const availableModels = await session.modelRegistry.getAvailable();
    return {
        current_model: session.model ? formatModelRef(session.model) : null,
        thinking_level: session.thinkingLevel,
        available_thinking_levels: session.getAvailableThinkingLevels(),
        available_models: availableModels.map(formatModelRef)
    };
}
function textResult(text) {
    return { content: [{ type: 'text', text }], details: undefined };
}
export function createGetSessionSettingsTool(session) {
    return {
        name: GET_SESSION_SETTINGS,
        label: 'Get session settings',
        isReadOnly: true,
        description: TOOL_DESCRIPTION,
        parameters: schema,
        async execute() {
            const payload = await getSettingsPayload(session());
            return textResult(JSON.stringify(payload, null, 2));
        }
    };
}
//# sourceMappingURL=get-session-settings.js.map