Gaunt Sloth Assistant
    Preparing search index...

    Interface GthConfig

    This is a processed Gaunt Sloth config ready to be passed down into components.

    Default values can be found in DEFAULT_CONFIG

    interface GthConfig {
        builtInTools?: string[];
        builtInToolsConfig?: BuiltInToolsConfig;
        canInterruptInferenceWithEsc: boolean;
        commands?: {
            ask?: {
                builtInTools?: string[];
                filesystem?: string[] | "read" | "all" | "none";
            };
            chat?: {
                builtInTools?: string[];
                filesystem?: string[]
                | "read"
                | "all"
                | "none";
            };
            code?: {
                builtInTools?: string[];
                devTools?: GthDevToolsConfig;
                filesystem?: string[]
                | "read"
                | "all"
                | "none";
            };
            pr?: {
                builtInTools?: string[];
                contentProvider?: string;
                filesystem?: string[]
                | "read"
                | "all"
                | "none";
                logWorkForReviewInSeconds?: number;
                requirementsProvider?: string;
            };
            review?: {
                builtInTools?: string[];
                contentProvider?: string;
                filesystem?: string[]
                | "read"
                | "all"
                | "none";
                requirementsProvider?: string;
            };
        };
        contentProvider: string;
        contentProviderConfig?: Record<string, unknown>;
        customToolsConfig?: CustomToolsConfig;
        debugLog?: boolean;
        filesystem: string[] | "read" | "all" | "none";
        hooks?: {
            afterAgentInit?: RunnerHook | RunnerHook[];
            beforeAgentInit?: RunnerHook | RunnerHook[];
            beforeProcessMessages?: BeforeMessageHook | BeforeMessageHook[];
            createAgent?: (config: GthConfig) => Promise<GthAgentInterface>;
            createRunnableConfig?: (
                config: GthConfig,
            ) => Promise<RunnableConfig<Record<string, any>>>;
            postModelHook?: LangChainHook;
            preModelHook?: LangChainHook;
        };
        llm: BaseChatModel;
        mcpServers?: Record<
            string,
            | {
                args: string[];
                command: string;
                cwd?: string;
                encoding?: string;
                env?: Record<string, string>;
                restart?: { delayMs?: number; enabled?: boolean; maxAttempts?: number };
                stderr?: "pipe" | "overlapped" | "inherit" | "ignore";
                transport?: "stdio";
                type?: "stdio";
            } & {
                defaultToolTimeout?: number;
                outputHandling?: | "content"
                | "artifact"
                | {
                    audio?: "content"
                    | "artifact";
                    image?: "content" | "artifact";
                    resource?: "content" | "artifact";
                    text?: "content" | "artifact";
                };
            }
            | {
                authProvider?: OAuthClientProvider;
                automaticSSEFallback?: boolean;
                headers?: Record<string, string>;
                reconnect?: { delayMs?: number; enabled?: boolean; maxAttempts?: number };
                transport?: "http" | "sse";
                type?: "http" | "sse";
                url: string;
            } & {
                defaultToolTimeout?: number;
                outputHandling?: | "content"
                | "artifact"
                | {
                    audio?: "content"
                    | "artifact";
                    image?: "content" | "artifact";
                    resource?: "content" | "artifact";
                    text?: "content" | "artifact";
                };
            },
        >;
        projectGuidelines: string;
        projectReviewInstructions: string;
        requirementsProvider: string;
        requirementsProviderConfig?: Record<string, unknown>;
        streamOutput: boolean;
        streamSessionInferenceLog: boolean;
        tools?:
            | StructuredToolInterface<ToolInputSchemaBase, any, any>[]
            | BaseToolkit[]
            | ServerTool[];
        useColour: boolean;
        writeOutputToFile: boolean;
    }
    Index

    Properties

    builtInTools?: string[]
    builtInToolsConfig?: BuiltInToolsConfig
    canInterruptInferenceWithEsc: boolean

    Allow inference to be interrupted with esc. Only has an effect in TTY mode.

    commands?: {
        ask?: {
            builtInTools?: string[];
            filesystem?: string[] | "read" | "all" | "none";
        };
        chat?: {
            builtInTools?: string[];
            filesystem?: string[]
            | "read"
            | "all"
            | "none";
        };
        code?: {
            builtInTools?: string[];
            devTools?: GthDevToolsConfig;
            filesystem?: string[]
            | "read"
            | "all"
            | "none";
        };
        pr?: {
            builtInTools?: string[];
            contentProvider?: string;
            filesystem?: string[]
            | "read"
            | "all"
            | "none";
            logWorkForReviewInSeconds?: number;
            requirementsProvider?: string;
        };
        review?: {
            builtInTools?: string[];
            contentProvider?: string;
            filesystem?: string[]
            | "read"
            | "all"
            | "none";
            requirementsProvider?: string;
        };
    }
    contentProvider: string

    Content Provider. Provider used to fetch content (usually diff) for review or pr command.

    DEFAULT_CONFIG#contentProvider

    contentProviderConfig?: Record<string, unknown>
    customToolsConfig?: CustomToolsConfig
    debugLog?: boolean

    Log messages and events to gaunt-sloth.log, use llm.verbose or gth --verbose as more intrusive option, setting verbose to LangChain / LangGraph

    filesystem: string[] | "read" | "all" | "none"
    hooks?: {
        afterAgentInit?: RunnerHook | RunnerHook[];
        beforeAgentInit?: RunnerHook | RunnerHook[];
        beforeProcessMessages?: BeforeMessageHook | BeforeMessageHook[];
        createAgent?: (config: GthConfig) => Promise<GthAgentInterface>;
        createRunnableConfig?: (
            config: GthConfig,
        ) => Promise<RunnableConfig<Record<string, any>>>;
        postModelHook?: LangChainHook;
        preModelHook?: LangChainHook;
    }

    Hooks are only available on JS config

    Type declaration

    • OptionalafterAgentInit?: RunnerHook | RunnerHook[]

      After agent init.

    • OptionalbeforeAgentInit?: RunnerHook | RunnerHook[]
    • OptionalbeforeProcessMessages?: BeforeMessageHook | BeforeMessageHook[]
    • OptionalcreateAgent?: (config: GthConfig) => Promise<GthAgentInterface>
    • OptionalcreateRunnableConfig?: (config: GthConfig) => Promise<RunnableConfig<Record<string, any>>>
    • OptionalpostModelHook?: LangChainHook

      LangGraph postModelHook Provide 'skip' if you don't need default hook.

    • OptionalpreModelHook?: LangChainHook

      LangGraph preModelHook Provide 'skip' if you don't need default hook.

    llm: BaseChatModel
    mcpServers?: Record<
        string,
        | {
            args: string[];
            command: string;
            cwd?: string;
            encoding?: string;
            env?: Record<string, string>;
            restart?: { delayMs?: number; enabled?: boolean; maxAttempts?: number };
            stderr?: "pipe" | "overlapped" | "inherit" | "ignore";
            transport?: "stdio";
            type?: "stdio";
        } & {
            defaultToolTimeout?: number;
            outputHandling?: | "content"
            | "artifact"
            | {
                audio?: "content"
                | "artifact";
                image?: "content" | "artifact";
                resource?: "content" | "artifact";
                text?: "content" | "artifact";
            };
        }
        | {
            authProvider?: OAuthClientProvider;
            automaticSSEFallback?: boolean;
            headers?: Record<string, string>;
            reconnect?: { delayMs?: number; enabled?: boolean; maxAttempts?: number };
            transport?: "http" | "sse";
            type?: "http" | "sse";
            url: string;
        } & {
            defaultToolTimeout?: number;
            outputHandling?: | "content"
            | "artifact"
            | {
                audio?: "content"
                | "artifact";
                image?: "content" | "artifact";
                resource?: "content" | "artifact";
                text?: "content" | "artifact";
            };
        },
    >
    projectGuidelines: string
    projectReviewInstructions: string
    requirementsProvider: string
    requirementsProviderConfig?: Record<string, unknown>
    streamOutput: boolean

    Stream output. Some models do not support streaming. Set value to false for them.

    DEFAULT_CONFIG#streamOutput

    streamSessionInferenceLog: boolean

    Stream session log instead of writing it when inference streaming is complete. (only works when streamOutput is true)

    tools?:
        | StructuredToolInterface<ToolInputSchemaBase, any, any>[]
        | BaseToolkit[]
        | ServerTool[]
    useColour: boolean

    Use colour in ouptut

    writeOutputToFile: boolean

    Should the output be written to md file. (e.g. gth_2025-07-26_22-59-06_REVIEW.md)