import type { CliConfig } from "./schema.js"; import type { Env } from "../ci/env.js"; import type { Plugin, TallyConfig } from "@tallyrelease/core"; /** Imports a module resolved from the repo root and returns its default export. */ export type ImportPlugin = (specifier: string) => Promise; /** * `ImportPlugin` with jiti, so `.ts` files load without a build step. No disk * cache, so transpiled code cannot be planted between runs. */ export declare const jitiImport: (root: string) => ImportPlugin; /** * Why a privileged command may not load local plugins, undefined when it may: * never on a pull request head, else only when allowed by flag or env. */ export declare const localPluginsDenied: (onPrHead: boolean, env: Env, allowFlag: boolean) => string | undefined; export interface ResolveOptions { importPlugin: ImportPlugin; /** Why local plugins (`path`) may not load; undefined when they may. */ localDenied?: string | undefined; } export interface ResolvedPlugins { /** The config without cli-owned plugin keys, as core reads it. */ config: TallyConfig; /** Built-in plugins, then loaded plugins in config order. */ plugins: Plugin[]; } /** * Resolves `config.plugins` to plugins: a built-in by name, else the file at * `path`, else the package `package`. Core checks the API version and * validates the options. */ export declare const resolvePlugins: (config: CliConfig, opts: ResolveOptions) => Promise;