import type { StoredCommand } from './command-dispatcher.js'; import type { TwinNow } from './twin-now.js'; /** * AI 가 어떤 태도를 냈나 — **세 갈래여야 한다.** * * 「모르겠다」가 없으면 모를 때 동의로 답한다. 그리고 승인자가 그것을 「AI 가 괜찮다고 했다」로 읽는다. * 자동 승인 편향이 거기서 시작한다. */ export type AdvisorStance = 'object' | 'concur' | 'unsure'; export interface AdvisorOpinion { stance: AdvisorStance; /** 사람이 읽는 문장. AI 가 쓴 그대로 — 우리가 다듬지 않는다(다듬으면 누가 말한 것인지 흐려진다). */ text: string; /** 무엇을 보고 말했나 — 주의 식별자·값. 승인자가 근거를 되짚을 수 있게. */ basis?: string[]; } /** 의견을 내는 자리 — 앱이 채운다(headless-twin 은 `twin-ai` 를 부르지 않는다). */ export interface ActuationAdvisor { /** 화면이 출처를 말해야 한다 — 「AI 의견」. 사람의 의견과 섞이면 안 된다. */ label: string; /** * 이 조치에 대해 한마디. * * 실패·시간초과면 `undefined` 를 돌려준다. 지어내지 않는다. */ advise(input: { domainId: string; command: StoredCommand; twinNow: TwinNow; locale?: string; }): Promise; } /** 앱이 부팅에서 한 번 부른다. */ export declare function setActuationAdvisor(next: ActuationAdvisor): void; export declare function actuationAdvisor(): ActuationAdvisor | undefined; /** 의견을 물은 결과 — **없음도 사실이다.** */ export interface AdvisorResult { /** 누가 말했나. 없으면 아무도 말하지 않았다. */ by?: string; opinion?: AdvisorOpinion; /** * 의견이 없으면 왜 없나. * * 빈칸을 「AI 가 반대하지 않았다」로 읽으면 안 된다. 화면이 이 문장을 그대로 보여야 한다. */ absent?: string; } /** 몇 초까지 기다리나 — 승인 화면이 이것 때문에 안 열리면 안 된다. */ export declare const ADVISOR_BUDGET_MS = 8000; /** * 의견을 묻는다 — **없으면 없다고 답한다.** * * 실패를 삼키지 않는다. AI 가 죽어 있어서 의견이 없는 것과 AI 가 반대할 것이 없어서 조용한 것은 다른 * 사실이고, 승인하는 사람에게 그 차이가 크다. */ export declare function askAdvisor(args: { domainId: string; command: StoredCommand; twinNow: TwinNow; locale?: string; budgetMs?: number; }): Promise;