import { z } from 'zod'; import { PostExecutionAction, RenderError } from './render'; /** * Ensure the Node.js runtime cache is initialized. * In browser environments, this resolves immediately. * In Node.js, this waits for the async initialization to complete. * * This is primarily useful for testing to ensure runtime values are available. */ export declare function ensureRuntimeCacheReady(): Promise; /** * Known LLM providers (model creators, not hosting platforms). * Hosting platforms like AWS Bedrock and Azure are not included here * because the provider represents who created the model, which determines * the prompt optimization strategy. */ export declare const LLM_PROVIDERS: readonly ["anthropic", "openai", "google", "meta", "mistral", "deepseek", "xai", "cohere", "unspecified"]; export type LlmProvider = typeof LLM_PROVIDERS[number]; /** * Infer the LLM provider from a model name/ID. * Returns the provider if the model matches a known pattern, or null if unknown. */ export declare function inferProviderFromModel(model: string): LlmProvider | null; /** * Schema for LLM configuration. * When a model is specified but provider is not, the provider is automatically * inferred from the model name. */ export declare const llmConfigSchema: z.ZodPipe; provider: z.ZodDefault>; maxTokens: z.ZodOptional; temperature: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ model: string; provider: "unspecified" | "anthropic" | "openai" | "google" | "meta" | "mistral" | "deepseek" | "xai" | "cohere"; maxTokens?: number | undefined; temperature?: number | undefined; }, { model: string; provider: "unspecified" | "anthropic" | "openai" | "google" | "meta" | "mistral" | "deepseek" | "xai" | "cohere"; maxTokens?: number | undefined; temperature?: number | undefined; }>>; /** * Schema for output configuration */ export declare const outputConfigSchema: z.ZodObject<{ format: z.ZodDefault>; trim: z.ZodDefault; indent: z.ZodDefault; }, z.core.$strip>; /** * Schema for code configuration */ export declare const codeConfigSchema: z.ZodObject<{ language: z.ZodDefault; highlight: z.ZodOptional; }, z.core.$strip>; /** * Schema for user/caller context configuration */ export declare const userConfigSchema: z.ZodObject<{ editor: z.ZodDefault; }, z.core.$strip>; /** * Schema for runtime configuration (auto-detected values) */ export declare const runtimeConfigSchema: z.ZodObject<{ hostname: z.ZodString; username: z.ZodString; cwd: z.ZodString; platform: z.ZodString; os: z.ZodString; locale: z.ZodString; timestamp: z.ZodNumber; date: z.ZodString; time: z.ZodString; uuid: z.ZodString; }, z.core.$loose>; /** * Schema for prompt configuration (controls Prompt component default sections) */ export declare const promptConfigSchema: z.ZodObject<{ includeRole: z.ZodDefault; includeFormat: z.ZodDefault; includeConstraints: z.ZodDefault; includeSuccessCriteria: z.ZodDefault; includeGuardrails: z.ZodDefault; defaultRole: z.ZodDefault; defaultExpertise: z.ZodDefault; delimiter: z.ZodDefault>; }, z.core.$strip>; /** * Schema for the full environment context */ export declare const environmentContextSchema: z.ZodObject<{ llm: z.ZodPipe, z.ZodPipe; provider: z.ZodDefault>; maxTokens: z.ZodOptional; temperature: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ model: string; provider: "unspecified" | "anthropic" | "openai" | "google" | "meta" | "mistral" | "deepseek" | "xai" | "cohere"; maxTokens?: number | undefined; temperature?: number | undefined; }, { model: string; provider: "unspecified" | "anthropic" | "openai" | "google" | "meta" | "mistral" | "deepseek" | "xai" | "cohere"; maxTokens?: number | undefined; temperature?: number | undefined; }>>>; output: z.ZodPipe, z.ZodObject<{ format: z.ZodDefault>; trim: z.ZodDefault; indent: z.ZodDefault; }, z.core.$strip>>; code: z.ZodPipe, z.ZodObject<{ language: z.ZodDefault; highlight: z.ZodOptional; }, z.core.$strip>>; user: z.ZodPipe, z.ZodObject<{ editor: z.ZodDefault; }, z.core.$strip>>; runtime: z.ZodPipe, z.ZodObject<{ hostname: z.ZodOptional; username: z.ZodOptional; cwd: z.ZodOptional; platform: z.ZodOptional; os: z.ZodOptional; locale: z.ZodOptional; timestamp: z.ZodOptional; date: z.ZodOptional; time: z.ZodOptional; uuid: z.ZodOptional; }, z.core.$loose>>; prompt: z.ZodPipe, z.ZodObject<{ includeRole: z.ZodDefault; includeFormat: z.ZodDefault; includeConstraints: z.ZodDefault; includeSuccessCriteria: z.ZodDefault; includeGuardrails: z.ZodDefault; defaultRole: z.ZodDefault; defaultExpertise: z.ZodDefault; delimiter: z.ZodDefault>; }, z.core.$strip>>; }, z.core.$strip>; /** * LLM configuration for prompt rendering */ export type LlmConfig = z.infer; /** * Output configuration for rendered prompts */ export type OutputConfig = z.infer; /** * Code-related configuration */ export type CodeConfig = z.infer; /** * User/caller context configuration */ export type UserConfig = z.infer; /** * Prompt configuration for default section behavior */ export type PromptConfig = z.infer; /** * Runtime configuration gathered from the environment */ export type RuntimeConfig = z.infer; /** * Environment context containing all configuration */ export type EnvironmentContext = z.infer; /** * Render context passed to components during rendering */ export interface RenderContext { inputs: Map; env: EnvironmentContext; postExecution: PostExecutionAction[]; errors: RenderError[]; metadata: Map; } /** * Default environment configuration */ export declare const DEFAULT_ENVIRONMENT: EnvironmentContext; /** * Create an environment context with optional overrides. * Validates input against the schema. */ export declare function createEnvironment(overrides?: Partial): EnvironmentContext; /** * Create a runtime configuration from the current environment. * Works in both Node.js and browser environments. * * In Node.js, system values (hostname, username, os) are loaded asynchronously * via dynamic import to avoid bundling Node.js modules in browser builds. * If the cache isn't ready on first call, defaults are used temporarily. */ export declare function createRuntimeConfig(): RuntimeConfig; //# sourceMappingURL=context.d.ts.map