/** * dsh-auto-approval-llm * * LLM-assisted approval with a human countdown fallback for DeepSeek Harness. * * Design (revised after expert review): * - Complements dsh-auto-mode: it only claims `approval/request` asks from * sessions whose permission preset is `auto`. * - It is registered with `prepend: true`, so it acts as the single terminal * answerer for the asks it handles and never opens a second approval popup. * - It runs its own second-model review (arguments recovered from the session * log by callId), then asks the human through `ctx.userQuestions.ask()` with * a bounded countdown. On timeout it applies `timeoutAction`; the default is * fail-closed `reject`. * - If `autoSwitchPolicyToAsk` is enabled it only switches sessions that are * already in the `auto` preset and whose approval override is `never`. */ import type { Context } from '@deepseek-ai/cordis'; import z from '@deepseek-ai/schemastery'; export declare const name = "dsh-auto-approval-llm"; export declare const inject: string[]; export interface Config { enabled: boolean; autoSwitchPolicyToAsk: boolean; reviewerProvider?: string; reviewerModel?: string; reviewerProtocol: 'openai' | 'anthropic'; reviewerBaseUrl: string; timeoutAction: string; llmReviewScope: 'low-or-above' | 'medium-or-above' | 'high'; llmTakeoverScope: 'low' | 'medium-or-below' | 'high-or-below'; defaultReviewMode: 'manual' | 'smart' | 'unattended'; lowRiskSeconds: number; mediumRiskSeconds: number; highRiskSeconds: number; safetyPrompt?: string; allowlist: string[]; denyList: string[]; humanOnlyList: string[]; rulesText: string; rulesDryRun: boolean; maxConsecutiveDenials: number; maxTotalDenials: number; maxArgsChars: number; notifyUser: boolean; showSessionPanel: 'on' | 'auto' | 'off'; breakerAntiHijackMs: number; aiButtonPosition: 'header' | 'floating'; workspaceRoot?: string; dshHome?: string; tempRoots?: string[]; classifierTimeoutMs?: number; classifierMaxOutputTokens?: number; debug: boolean; } export declare const Config: z; export declare function apply(ctx: Context, rawConfig: Config): void;