import type { ITtscLintPluginConfig } from "./structures";
export * from "./defaultFormat";
export * from "./structures/index";
/** A resolved contributor: Go sub-package name + absolute source directory. */
type TtscPluginContributor = {
    name: string;
    source: string;
};
/** Descriptor shape returned to ttsc's plugin builder by the factory. */
type TtscPluginDescriptor = {
    capabilities?: {
        diagnosticsTiming?: boolean;
        lsp?: boolean;
        projectContextArgs?: boolean;
        threadingArgs?: boolean;
    };
    contributors?: TtscPluginContributor[];
    name: string;
    reportsTypeScriptDiagnostics?: boolean;
    source: string;
    stage?: "check" | "transform";
};
/**
 * Context object injected by ttsc into every plugin factory call. The generic
 * `TConfig` is the tsconfig plugin entry shape.
 */
type TtscPluginFactoryContext<TConfig> = {
    binary: string;
    cwd: string;
    /** This descriptor's own directory — the ESM-safe replacement for `__dirname`. */
    dirname: string;
    /** This descriptor's own path — the ESM-safe replacement for `__filename`. */
    filename: string;
    plugin: TConfig;
    /**
     * Caller-declared anchor for plugin config-file discovery, present when the
     * embedder compiles through a generated tsconfig outside the project (see
     * `ITtscPluginFactoryContext.pluginConfigDir`).
     */
    pluginConfigDir?: string;
    projectRoot: string;
    tsconfig: string;
};
/**
 * Plugin descriptor factory consumed by ttsc package discovery.
 *
 * Contributor lint plugins come from one place: the project's lint config file
 * (`lint.config.{ts,cts,mts,js,cjs,mjs,json}` or `ttsc-lint.config.*`). The
 * tsconfig plugin entry carries no rule or plugin surface — it optionally names
 * the config file via `configFile`, otherwise the file is discovered by walking
 * upward from the tsconfig directory (or from the caller-declared
 * `pluginConfigDir` when the resolved tsconfig is a generated wrapper in a temp
 * directory).
 *
 * The factory locates the config file, evaluates it (via ttsx for TS / ESM
 * sources, `require` for CommonJS, `JSON.parse` for JSON), reads every
 * `plugins` map (top-level and inside array-form flat configs), and forwards
 * each contributor's Go source directory to ttsc's plugin builder via the
 * descriptor's `contributors` field.
 */
export default function createTtscPlugin(context: TtscPluginFactoryContext<ITtscLintPluginConfig>): TtscPluginDescriptor;
