/** * log10x_setup_recurring — conversational wizard that configures a recurring * cost-reduction agent. * * The wizard mirrors advise_install's progressive Q-and-A pattern: each call * merges the user's latest answer into a wizard session (keyed on snapshot_id) * and either asks the next missing question or, once all answers are in, emits * the concrete artifacts (policy.yaml + scheduler manifest) and apply-instructions. * * Steps (in dependency order): * Q1. target_services — multi-select from log10x_services or user-supplied list * Q2. target_percent — integer 1-95, default 30 * Q3. schedule — preset or custom cron * Q4. scheduler — k8s_cron | github_actions | crontab * Q5. config_plane — gitops repo URL or direct kubectl path * Q6. exceptions — services to never touch (optional, default []) * Q7. confirm — final confirmation before emit * emit — writes artifacts, returns paths + apply-instructions * * State: wizard session stored in a simple in-process Map keyed on snapshot_id. * Each call updates the session with the newly supplied fields; unset fields * retain their prior values. */ import { z } from 'zod'; import { type StructuredOutput } from '../lib/output-types.js'; export declare const setupRecurringSchema: { /** * Opaque session handle returned on the first call (when omitted, a new * session is minted). Pass it back on every subsequent call so the wizard * can accumulate answers without requiring all fields in a single turn. */ session_id: z.ZodOptional; /** * Target services. An empty array means "all services". Supply the list * from `log10x_services` or let the user name them explicitly. The wizard * asks if omitted. */ target_services: z.ZodOptional>; /** * Desired savings percentage. Must be 1-95. Default 30. * The wizard asks if omitted. */ target_percent: z.ZodOptional; /** * Volume budget (GB/mo). Standing thermostat alternative to target_percent: * each tick cuts only the overage above this line; under budget = all pass. */ budget_gb_monthly: z.ZodOptional; /** * Tick schedule. Either a preset name or a raw 5-field cron expression. * The wizard asks if omitted. */ schedule: z.ZodOptional, z.ZodString]>>; /** * Scheduler runtime. Default: k8s_cron when kubectl is reachable, otherwise * github_actions. The wizard asks if omitted. */ scheduler: z.ZodOptional>; /** * Gitops repo URL or local path where the CLI writes cap CSVs. * The wizard asks if omitted. */ config_plane: z.ZodOptional; /** * Services that must never be touched regardless of savings opportunity. * Optional — defaults to empty. */ exceptions: z.ZodOptional>; /** * Minimum savings delta (percentage points) before a new CSV is committed. * Prevents noisy week-to-week churn. Default 2. */ min_delta_pp: z.ZodOptional; /** * Log10x env ID — scopes the metric queries. Auto-detected from * LOG10X_ENV_ID when not supplied. */ env_id: z.ZodOptional; /** * Kubernetes namespace for the CronJob (k8s_cron only). Default: log10x. */ namespace: z.ZodOptional; /** * Name of the k8s Secret that holds LOG10X_API_KEY (k8s_cron only). * Default: log10x-secret. */ secret_name: z.ZodOptional; /** * Skip all remaining questions and emit whatever is configured so far. * Useful for automated flows that supply all args in a single call. */ confirm: z.ZodOptional; }; declare const schemaObj: z.ZodObject<{ /** * Opaque session handle returned on the first call (when omitted, a new * session is minted). Pass it back on every subsequent call so the wizard * can accumulate answers without requiring all fields in a single turn. */ session_id: z.ZodOptional; /** * Target services. An empty array means "all services". Supply the list * from `log10x_services` or let the user name them explicitly. The wizard * asks if omitted. */ target_services: z.ZodOptional>; /** * Desired savings percentage. Must be 1-95. Default 30. * The wizard asks if omitted. */ target_percent: z.ZodOptional; /** * Volume budget (GB/mo). Standing thermostat alternative to target_percent: * each tick cuts only the overage above this line; under budget = all pass. */ budget_gb_monthly: z.ZodOptional; /** * Tick schedule. Either a preset name or a raw 5-field cron expression. * The wizard asks if omitted. */ schedule: z.ZodOptional, z.ZodString]>>; /** * Scheduler runtime. Default: k8s_cron when kubectl is reachable, otherwise * github_actions. The wizard asks if omitted. */ scheduler: z.ZodOptional>; /** * Gitops repo URL or local path where the CLI writes cap CSVs. * The wizard asks if omitted. */ config_plane: z.ZodOptional; /** * Services that must never be touched regardless of savings opportunity. * Optional — defaults to empty. */ exceptions: z.ZodOptional>; /** * Minimum savings delta (percentage points) before a new CSV is committed. * Prevents noisy week-to-week churn. Default 2. */ min_delta_pp: z.ZodOptional; /** * Log10x env ID — scopes the metric queries. Auto-detected from * LOG10X_ENV_ID when not supplied. */ env_id: z.ZodOptional; /** * Kubernetes namespace for the CronJob (k8s_cron only). Default: log10x. */ namespace: z.ZodOptional; /** * Name of the k8s Secret that holds LOG10X_API_KEY (k8s_cron only). * Default: log10x-secret. */ secret_name: z.ZodOptional; /** * Skip all remaining questions and emit whatever is configured so far. * Useful for automated flows that supply all args in a single call. */ confirm: z.ZodOptional; }, "strip", z.ZodTypeAny, { namespace?: string | undefined; env_id?: string | undefined; session_id?: string | undefined; budget_gb_monthly?: number | undefined; target_percent?: number | undefined; target_services?: string[] | undefined; schedule?: string | undefined; scheduler?: "k8s_cron" | "github_actions" | "crontab" | "eventbridge" | "container_apps_job" | undefined; config_plane?: string | undefined; exceptions?: string[] | undefined; min_delta_pp?: number | undefined; secret_name?: string | undefined; confirm?: boolean | undefined; }, { namespace?: string | undefined; env_id?: string | undefined; session_id?: string | undefined; budget_gb_monthly?: number | undefined; target_percent?: number | undefined; target_services?: string[] | undefined; schedule?: string | undefined; scheduler?: "k8s_cron" | "github_actions" | "crontab" | "eventbridge" | "container_apps_job" | undefined; config_plane?: string | undefined; exceptions?: string[] | undefined; min_delta_pp?: number | undefined; secret_name?: string | undefined; confirm?: boolean | undefined; }>; export type SetupRecurringArgs = z.infer; export declare function executeSetupRecurring(args: SetupRecurringArgs): Promise; export {};