import { V as VarlockPlugin } from './env-graph-DgoRWqJl.js';
export { C as CoercionError, D as Debugger, P as PluginCacheAccessor, R as ResolutionError, a as Resolver, b as SchemaError, c as ValidationError, d as createDebug } from './env-graph-DgoRWqJl.js';
import '@env-spec/parser';
import '@env-spec/utils/type-utils';

/**
 * Parse a cache-TTL string or number into milliseconds.
 *
 * Wraps {@link parseDuration} with cache-specific semantics: the keyword
 * `"forever"` means "cache until manually cleared" and returns
 * {@link TTL_FOREVER}. A TTL of `0` is rejected as ambiguous.
 *
 * @example
 *   parseTtl("30s")      // 30_000
 *   parseTtl("1h")       // 3_600_000
 *   parseTtl("forever")  // Infinity (TTL_FOREVER)
 */
declare function parseTtl(ttl: string | number): number;

/**
 * Resolve and validate a cacheTtl value from a plugin's init decorator.
 *
 * Returns the validated TTL (string or number) if valid, or undefined if
 * the resolver is not set or the resolved value is false/null/empty (disabled).
 *
 * Throws on invalid TTL format — the error will be caught by the decorator
 * execution handler and surfaced as a plugin-level error.
 */
declare function resolveCacheTtl(cacheTtlResolver: {
    resolve(): Promise<any>;
} | undefined): Promise<string | number | undefined>;

/**
 * The current plugin instance, available as a module import rather than a global.
 * Valid during plugin module execution; throws if accessed outside that window.
 *
 * Usage in a plugin:
 *   import { plugin } from 'varlock/plugin-lib';
 *   plugin.name = 'my-plugin';
 *   plugin.registerResolverFunction({ ... });
 */
declare const plugin: VarlockPlugin;

export { parseTtl, plugin, resolveCacheTtl };
