/// <reference types="node" />
/**
 * Environment variable passed to the bundled Next app so webpack can resolve dependencies
 * installed beside `ptbk` even when the app sources are materialized into a project cache.
 *
 * @private internal constant of `ptbk agents-server`
 */
export declare const PTBK_AGENTS_SERVER_NODE_MODULES_PATH_ENV = "PTBK_AGENTS_SERVER_NODE_MODULES_PATH";
/**
 * Environment variable used only by the CLI-owned production build.
 *
 * @private internal constant of `ptbk agents-server`
 */
export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION";
/**
 * Inputs controlling one cached Agents Server production build.
 *
 * @private internal type of `ptbk agents-server`
 */
type EnsureAgentsServerBuildOptions = {
    readonly appPath?: string;
    readonly environment?: NodeJS.ProcessEnv;
    readonly isBuildForced?: boolean;
    readonly onBuildEvent?: (event: string) => void;
    readonly onBuildOutput?: (chunk: string) => void;
};
/**
 * Paths needed after the Agents Server production build is ready.
 *
 * @private internal type of `ptbk agents-server`
 */
export type AgentsServerBuildArtifacts = {
    readonly appPath: string;
    readonly nodeModulesPath: string;
    readonly nextCliPath: string;
};
/**
 * Input paths required to validate or update the cached Agents Server build.
 *
 * @private internal type of `ptbk agents-server`
 */
type AgentsServerBuildCacheOptions = {
    readonly appPath: string;
    readonly environment?: NodeJS.ProcessEnv;
};
/**
 * Ensures that the local Agents Server production build exists and matches its source fingerprint.
 *
 * @private internal utility of `ptbk agents-server`
 */
export declare function ensureAgentsServerBuild(options?: EnsureAgentsServerBuildOptions): Promise<AgentsServerBuildArtifacts>;
/**
 * Returns true when the production build marker and source fingerprint still match.
 *
 * @private internal utility of `ptbk agents-server`
 */
export declare function isAgentsServerBuildCacheCurrent(options: AgentsServerBuildCacheOptions): Promise<boolean>;
/**
 * Persists the source fingerprint for the just-created production build.
 *
 * @private internal utility of `ptbk agents-server`
 */
export declare function writeAgentsServerBuildCache(options: AgentsServerBuildCacheOptions): Promise<void>;
/**
 * Finds the Agents Server app in a source checkout or generated CLI package.
 *
 * @private internal utility of `ptbk agents-server`
 */
export declare function resolveAgentsServerAppPath(): Promise<string>;
/**
 * Adds dependency-resolution environment required by the materialized Agents Server runtime.
 *
 * @private internal utility of `ptbk agents-server`
 */
export declare function createAgentsServerRuntimeEnvironment(environment: NodeJS.ProcessEnv, nodeModulesPath: string, options?: {
    readonly isNextValidationIgnored?: boolean;
}): NodeJS.ProcessEnv;
/**
 * Uses the source checkout app directly, but copies npm-packaged app sources out of `node_modules`.
 *
 * @private internal utility of `ptbk agents-server`
 */
export declare function resolveAgentsServerBuildAppPath(options: {
    readonly nodeModulesPath: string;
    readonly sourceAppPath: string;
}): Promise<string>;
export {};
