/** * plan-generator — AI 验证剧本生成(v8.3.350+) * * 只切片不解析语义:从 020-specs/{单元}/{端}/UI_SPEC.md 抓「页面清单/交互流程」段、 * TEST.md 抓「测试用例」段,原文组装成自然语言场景。语义理解交给执行 AI。 */ import type { EnvironmentConfig } from '../environment-config'; import type { AccountEnvVarHint, AccountVerificationHint, AiVerifyPlan, AiVerifyScenario, AiVerifySkipped, ScopeUnit } from './types'; /** * 收集迭代级原型/设计稿素材(v8.3.355+):扫描 010-requirements 下的 * prototypes/、assets/designs/、assets/prototypes/、assets/screenshots/ 目录。 * 收集图片与 HTML 绝对路径——执行 AI 打开对照理解界面(复杂流程的视觉参照物)。 */ export declare function collectPrototypeAssets(iterDir: string): string[]; /** 分层开关配置(settings.tests.layered,缺省全开) */ export interface LayeredToggle { common?: boolean; modules?: boolean; } /** 分层默认开关(未配置时公共层 + 模块层全开) */ export declare const DEFAULT_LAYERED: Required; /** 段落切片结果 */ interface Section { title: string; body: string[]; } /** accounts.yaml 的解析形态(宽松:只取需要的字段) */ interface AccountsFile { [env: string]: { accounts?: Record; }; } /** 环境内嵌账号(environments/{env}.yaml tests.accounts,v8.3.351+ 权威源) */ type InlineAccount = { username?: string; password?: string; note?: string; platforms?: string[]; /** v8.3.354+: 登录验证码约定(type + 取码说明 note),剧本头集中声明 */ verification?: { type?: string; note?: string; }; }; export interface PlanGenerateInput { iteration: string; iterDir: string; env: string; envConfig: EnvironmentConfig; units: ScopeUnit[]; /** 端过滤(空为不过滤) */ platformFilter: string[]; projectRoot: string; /** accounts.yaml 绝对路径(不存在时剧本标注无账号) */ accountsPath: string; /** 分层开关(settings.tests.layered,缺省全开) */ layered?: LayeredToggle; } export interface PlanGenerateOutput { plan: AiVerifyPlan; planJsonPath: string; planMdPath: string; } /** 按 ^#{2,3} 标题切段,返回 {标题, 正文行数组} */ export declare function sliceSections(markdown: string): Section[]; /** 空模板检测 */ export declare function isSkeleton(content: string): boolean; /** 扫描账号配置中的 ${VAR} 环境变量引用(password/username),返回引用提示列表。双源:环境内嵌(权威源,ref=账号名) + accounts.yaml(兑底,ref={env}.{name}) */ export declare function collectEnvVarRefs(accounts: AccountsFile | null, inline?: Record): AccountEnvVarHint[]; /** * 收集登录验证码约定(v8.3.354+):双源(环境内嵌权威源 + accounts.yaml 兑底), * 剧本头集中声明取码说明——只落「通道指引」不落码本身。 */ export declare function collectAccountVerifications(accounts: AccountsFile | null, env: string, inline?: Record): AccountVerificationHint[]; /** * 公共能力层场景(CLI 模板生成,不解析规格语义): * 每端固定三类——入口可达性 / 登录态 / 全局导航。先于模块层执行(登录就绪是模块场景前置)。 * 登录态场景无账号时进 skipped(不阻断其它公共场景)。 */ export declare function buildCommonScenarios(input: { env: string; baseUrls: Record; platformFilter: string[]; accounts: AccountsFile | null; /** 环境内嵌账号(tests.accounts,权威源;缺失时 accounts 兑底) */ inlineAccounts?: Record; }): { scenarios: AiVerifyScenario[]; skipped: AiVerifySkipped[]; }; /** 生成剧本(plan.json + AI_VERIFY_PLAN.md) */ export declare function generateAiVerifyPlan(input: PlanGenerateInput): Promise; export {}; //# sourceMappingURL=plan-generator.d.ts.map