import { Command, Interfaces } from '@oclif/core'; import type { CommandError } from '@oclif/core/interfaces'; import { type Logger, type SpecificationInput, Thymian, type ThymianPlugin, type TrafficInput } from '@thymian/core'; import { ErrorCache } from './error-cache.js'; import { Feedback } from './feedback.js'; import type { ThymianConfig } from './thymian-config.js'; export type CommandFlags = Interfaces.InferredFlags<(typeof BaseCliRunCommand)['baseFlags'] & T['flags']>; export type CommandArgs = Interfaces.InferredArgs; export declare abstract class BaseCliRunCommand extends Command { static enableJsonFlag: boolean; /** * Whether this command requires API specifications to run. * Commands that operate independently of specs (e.g. `serve`, `http-linter:overview`) * can set this to `false` to skip the spec resolution chain (Steps C–F). */ static requiresSpecifications: boolean; /** * Whether this command requires traffic inputs to run. * Only `analyze` sets this to `true`. When enabled, traffic is resolved * via --traffic flag → config → thymian.traffic-search hook → guidance. */ static requiresTraffic: boolean; static baseFlags: { verbose: Interfaces.BooleanFlag; debug: Interfaces.BooleanFlag; guidance: Interfaces.BooleanFlag; "log-level": Interfaces.OptionFlag; config: Interfaces.OptionFlag; autoload: Interfaces.BooleanFlag; plugin: Interfaces.OptionFlag; option: Interfaces.OptionFlag; spec: Interfaces.OptionFlag; traffic: Interfaces.OptionFlag; "rule-set": Interfaces.OptionFlag; "rule-severity": Interfaces.OptionFlag; "sort-reports-by": Interfaces.OptionFlag<"rule" | "endpoint" | "severity" | undefined, Interfaces.CustomOptions>; timeout: Interfaces.OptionFlag; "idle-timeout": Interfaces.OptionFlag; cwd: Interfaces.OptionFlag; "suppress-feedback": Interfaces.BooleanFlag; "validate-specs": Interfaces.BooleanFlag; }; protected flags: CommandFlags; protected args: CommandArgs; protected logger: Logger; protected thymianConfig: ThymianConfig; protected thymian: Thymian; protected feedback?: Feedback; protected errorCache?: ErrorCache; /** * Whether guidance output is enabled for this command run. * Resolved from `--guidance`/`--no-guidance` flag with TTY auto-detection fallback. */ protected guidanceEnabled: boolean; init(): Promise; protected catch(err: CommandError): Promise; protected printStackTraces(err: unknown): void; protected shouldAutoload(): boolean; /** * Run the `thymian.spec-search` oclif hook to let plugins discover specification files. * Returns results grouped by plugin, each containing typed SpecificationInput[]. */ private runSpecSearch; /** * Run the `thymian.traffic-search` oclif hook to let plugins discover traffic files. * Returns results grouped by plugin, each containing typed TrafficInput[]. */ private runTrafficSearch; /** * Apply `-o` flag overrides to the loaded Thymian configuration. * * Each override targets a specific plugin by name and sets a deeply * nested property on its `options` object. If the plugin entry does * not yet exist in the config it will be created. */ protected overridePluginOptions(): void; /** * Maps CLI flags onto plugin options before plugins are registered — the one * place where a flag is wired to a specific plugin's config. Add future * flag→plugin mappings here. The mapping logic lives in * `apply-plugin-options.ts` so it can be unit-tested without a command. * * Currently: `--sort-reports-by` is forwarded to the reporter plugin (see * `applyReporterSortReportsBy` for the flag-wins precedence over `-o`/config * and the never-auto-register guard). The terminal renderer receives the flag * via a separate channel (`handleWorkflowOutcome`). */ protected applyOptionsToPlugins(): void; /** * Re-resolve log level considering the config file. * Only applies config.logLevel if no explicit flag was set. */ private resolveLogLevelWithConfig; setThymian(thymian: Thymian): void; protected loadPluginModule(nameOrPath: string): Promise; protected registerPlugin(nameOrPath: string): Promise; protected addPluginsToThymianConfig(): Promise; protected registerPluginsFromConfig(): Promise; shouldSuppressFeedback(): boolean; /** * Write a guidance message to stderr when guidance is enabled. * This is the single choke-point for all guidance output — if * `this.guidanceEnabled` is false, the method is a no-op. */ guidance(message: string): void; } //# sourceMappingURL=base-cli-run-command.d.ts.map