import { z } from 'zod/v4'; import type { DaggerEnv, DaggerEnvConfig } from './dagger-env.js'; /** * A single secret returned by `infisical export --format=json` */ export type InfisicalSecret = z.infer; export declare const InfisicalSecret: z.ZodObject<{ key: z.ZodString; value: z.ZodString; }, z.core.$strip>; /** * Infisical secrets provider configuration */ export interface InfisicalProviderConfig { /** Infisical project ID */ projectId: string; /** Infisical environment slug (e.g. `prod`) */ env: string; /** Infisical folder path to fetch secrets from (e.g. `/ci/my-repo`) */ path: string; } /** * 1Password secrets provider configuration */ export interface OnePasswordProviderConfig { /** 1Password vault ID */ opVault: string; /** 1Password item ID */ opItem: string; /** 1Password sections to include for secrets */ opSections: Array<{ label: string; id: string; }>; } /** * Configuration shared by all secrets providers */ export interface RunDaggerCommandBaseConfig { /** Commands that should include Docker socket if available */ dockerCommands?: string[]; /** Hook to run before executing the command (e.g., vendor file setup) */ beforeCommand?: () => Promise; /** DaggerEnv instance for schema validation and type safety */ daggerEnv: DaggerEnv; /** * Secrets to pass to Dagger alongside the ones fetched from the provider, * taking precedence on conflict. Entries with an undefined value are * skipped, so short-lived credentials that only exist in some environments * (e.g. a CI-issued token) can be forwarded without a separate config path. */ additionalSecrets?: Record; } /** * Configuration for running Dagger commands with Infisical or 1Password integration */ export type RunDaggerCommandConfig = RunDaggerCommandBaseConfig & (InfisicalProviderConfig | OnePasswordProviderConfig); /** * Options for individual command execution */ export interface RunDaggerCommandOptions { /** Arguments to pass to the Dagger command */ args?: Record; /** Additional environment variables */ env?: Record; /** Additional command-line arguments */ extraArgs?: string[]; } /** * Creates a function to run Dagger commands with Infisical or 1Password integration * @param config Configuration for the command runner * @returns Function to execute Dagger commands */ export declare function createDaggerCommandRunner(config: RunDaggerCommandBaseConfig & InfisicalProviderConfig): (commandName: string, options?: RunDaggerCommandOptions) => Promise; export declare function createDaggerCommandRunner(config: RunDaggerCommandBaseConfig & OnePasswordProviderConfig): (commandName: string, options?: RunDaggerCommandOptions) => Promise; //# sourceMappingURL=run-dagger-cmd.d.ts.map