export type ConsumerLegacyMenuAction = { id: string; label: string; execute: () => Promise; }; export type ConsumerLegacyMenuContext = { runFullAudit: () => Promise; runStrictRepoAndStaged: () => Promise; runStrictStagedOnly: () => Promise; runStandardCriticalHigh: () => Promise; runEngineStagedNoPreflight: () => Promise; runEngineUnstagedNoPreflight: () => Promise; runEngineStagedAndUnstagedNoPreflight: () => Promise; runEngineFullRepoNoPreflight: () => Promise; runPatternChecks: () => Promise; runEslintAudit: () => Promise; runAstIntelligence: () => Promise; runFileDiagnostics: () => Promise; runExportMarkdown: () => Promise; }; export const createConsumerLegacyMenuActions = ( params: ConsumerLegacyMenuContext ): ReadonlyArray => { return [ { id: '1', label: 'Full audit (repo analysis)', execute: params.runFullAudit, }, { id: '2', label: 'Strict REPO+STAGING (CI/CD)', execute: params.runStrictRepoAndStaged, }, { id: '3', label: 'Strict STAGING only (dev)', execute: params.runStrictStagedOnly, }, { id: '4', label: 'Standard CRITICAL/HIGH', execute: params.runStandardCriticalHigh, }, { id: '11', label: 'Engine audit · STAGED only (no preflight · PRE_COMMIT)', execute: params.runEngineStagedNoPreflight, }, { id: '12', label: 'Engine audit · UNSTAGED only (no preflight · PRE_COMMIT)', execute: params.runEngineUnstagedNoPreflight, }, { id: '13', label: 'Engine audit · STAGED + UNSTAGED (no preflight · PRE_COMMIT)', execute: params.runEngineStagedAndUnstagedNoPreflight, }, { id: '14', label: 'Engine audit · tracked repo files (AUTO runtime rules · PRE_COMMIT)', execute: params.runEngineFullRepoNoPreflight, }, { id: '5', label: 'Pattern checks', execute: params.runPatternChecks, }, { id: '6', label: 'ESLint Admin+Web', execute: params.runEslintAudit, }, { id: '7', label: 'AST Intelligence', execute: params.runAstIntelligence, }, { id: '8', label: 'Export Markdown', execute: params.runExportMarkdown, }, { id: '9', label: 'File diagnostics', execute: params.runFileDiagnostics, }, { id: '10', label: 'Exit', execute: async () => {}, }, ]; };