import { HerdClient } from "./HerdClient.js";
import { Device } from "./Device.js";
import { TrailAction } from "./trails/types.js";
import { ResourceProvider } from "./trails/ResourceProvider.js";
export interface TrailEngineOptions {
    autoBuild?: boolean;
    silent?: boolean;
    cacheDirectory?: string;
    cacheEnabled?: boolean;
}
export interface RunTrailOptions {
    actionName?: string;
    params?: Record<string, any>;
    silent?: boolean;
    device?: Device;
    actions?: Record<string, TrailAction>;
    resources?: ResourceProvider;
}
/**
 * Checks if a string is a remote trail identifier (organization/name format)
 */
export declare function isRemoteTrailIdentifier(identifier: string): boolean;
export declare function parseTrailIdentifier(trailIdentifier: string): {
    org: string;
    trail: string;
    version: string | undefined;
};
export declare class TrailEngine {
    private client;
    private cacheManager;
    private autoBuild;
    private silent;
    private cacheEnabled;
    constructor(client: HerdClient, options?: TrailEngineOptions);
    /**
     * Loads a trail from a path or remote source
     * @param trailIdentifier Local path or organization/trail name
     * @param version Optional version for remote trails
     */
    loadTrail(trailIdentifier: string): Promise<{
        actions: Record<string, TrailAction>;
        resources: ResourceProvider;
        trailPath: string;
        version: string | undefined;
    }>;
    /**
     * Runs a trail action
     * @param trailIdentifier Local path or organization/trail name
     * @param options Runtime options including action name and parameters
     */
    runTrail(trailIdentifier: string, options?: RunTrailOptions): Promise<any>;
    /**
     * Clear the trail cache
     */
    clearCache(): Promise<void>;
    /**
     * Get the current cache directory
     */
    getCacheDirectory(): string;
    /**
     * Publishes a trail to the registry
     * @param trailPath Path to the trail directory
     * @param organizationId Organization ID to publish under
     * @param options Publishing options
     */
    publishTrail(trailPath: string, organizationTag?: string, options?: {
        isPublic?: boolean;
        version?: string;
        silent?: boolean;
    }): Promise<any>;
    /**
     * Checks if a path points to a directory containing source trail files.
     */
    private isLocalTrailDirectory;
}
