/** * Variable Resolution Service - Decoupled variable resolution logic * * This service separates variable resolution concerns from execution context, * implementing proper dependency injection and single responsibility principle. * * The service is responsible for: * - Resolving variables ($ARG_*, $STAGE_*, $CONTEXT_*, $ENV_*) * - Managing variable context state * - Validating variable references */ import { type VariableContext, type VariableScope } from './variables.js'; export interface VariableDefinition { full: string; path: string; scope: VariableScope; } export interface VariableResolutionOptions { strict?: boolean; } /** * Variable Resolution Service - Handles all variable resolution logic * * This service encapsulates variable resolution logic, making it injectable * and testable independently of execution context. */ export declare class VariableResolutionService { private resolver; constructor(context: VariableContext, options?: VariableResolutionOptions); /** * Resolve all variables in a value (string, object, or array) */ resolve(value: T): T; /** * Resolve a single variable by scope and path */ resolveVariable(scope: VariableScope, path: string): unknown; /** * Validate that all variables in a value can be resolved */ validateVariables(value: unknown): string[]; /** * Update the variable context with new values */ updateContext(updates: Partial): void; /** * Add stage outputs to the context */ addStageOutputs(stageName: string, outputs: Record): void; /** * Get the current variable context */ getContext(): VariableContext; /** * Extract variable references from a string */ static extractVariables(str: string): VariableDefinition[]; /** * Check if a string contains variables */ static hasVariables(str: string): boolean; /** * Create a new VariableResolutionService with initial context */ static createWithContext(args?: Record, stages?: Record>, sessionContext?: Record, options?: VariableResolutionOptions): VariableResolutionService; /** * Export stage outputs for session storage * Allows persisting stage outputs between commands in the same session */ exportStageOutputs(): Record>; /** * Import stage outputs from a previous session * Allows resuming with access to previous command outputs */ importStageOutputs(stages: Record>): void; } //# sourceMappingURL=variable-resolution.service.d.ts.map