/** * log10x_advise_retriever — wizard front door (v2, wizard pattern). * * Progressive Q-and-A driver for a k8s install of the Log10x Retriever. * Mirrors the advise_install wizard pattern: each call merges the user's * latest answer into a RetrieverWizardSession (held alongside the discovery * snapshot) and either: * * 1. Asks the next missing question, or * 2. Once all answers are in, emits a concrete install plan. * * Six wizard steps (in dependency order): * * Step 1 — Cluster prerequisites (EKS OIDC provider) * Step 2 — AWS resource detection (S3 + SQS + IRSA from snapshot) * Step 3 — infra_mode: 'terraform' | 'cli' | 'existing' * Step 4 — S3 + SQS URLs (auto-filled from snapshot when present) * Step 5 — IRSA role ARN (auto-filled from snapshot when present) * Step 6 — License JWT (same path as advise_install) * * AUTO-SKIP LOGIC: when the snapshot already has all four SQS URLs, an IRSA * role, and the input bucket, the wizard skips straight to license * acquisition (happy path for returning users who ran Terraform first). * * LEGACY ONE-SHOT PRESERVED: when all infra args are supplied explicitly on * the first call (no wizard state), the tool still emits a plan immediately * (backward-compat with callers that supply everything at once). */ import { z } from 'zod'; import { type StructuredOutput } from '../lib/output-types.js'; import type { WizardSession } from '../lib/discovery/types.js'; import { resolveClusterConfig } from '../lib/env-config/resolve-cluster-config.js'; type ResolveClusterConfigFn = typeof resolveClusterConfig; /** TEST-ONLY — inject a custom resolver for env-config lookups. */ export declare function _setResolveClusterConfigForTests(fn: ResolveClusterConfigFn | undefined): void; export declare const adviseRetrieverSchema: { snapshot_id: z.ZodString; infra_mode: z.ZodOptional>; index_source_bucket: z.ZodOptional; index_bucket: z.ZodOptional; iam_role_arn: z.ZodOptional; index_queue_url: z.ZodOptional; query_queue_url: z.ZodOptional; subquery_queue_url: z.ZodOptional; stream_queue_url: z.ZodOptional; storage_provider: z.ZodOptional>; storage_account: z.ZodOptional; input_container: z.ZodOptional; index_container: z.ZodOptional; resource_group: z.ZodOptional; location: z.ZodOptional; aks_cluster_name: z.ZodOptional; azure_client_id: z.ZodOptional; azure_tenant_id: z.ZodOptional; azure_queues: z.ZodOptional; query: z.ZodOptional; subquery: z.ZodOptional; stream: z.ZodOptional; }, "strip", z.ZodTypeAny, { query?: string | undefined; index?: string | undefined; subquery?: string | undefined; stream?: string | undefined; }, { query?: string | undefined; index?: string | undefined; subquery?: string | undefined; stream?: string | undefined; }>>; license_source: z.ZodDefault>; license_jwt_paste: z.ZodOptional; release_name: z.ZodOptional; namespace: z.ZodOptional; action: z.ZodOptional>; destination: z.ZodOptional; }; declare const schemaObj: z.ZodObject<{ snapshot_id: z.ZodString; infra_mode: z.ZodOptional>; index_source_bucket: z.ZodOptional; index_bucket: z.ZodOptional; iam_role_arn: z.ZodOptional; index_queue_url: z.ZodOptional; query_queue_url: z.ZodOptional; subquery_queue_url: z.ZodOptional; stream_queue_url: z.ZodOptional; storage_provider: z.ZodOptional>; storage_account: z.ZodOptional; input_container: z.ZodOptional; index_container: z.ZodOptional; resource_group: z.ZodOptional; location: z.ZodOptional; aks_cluster_name: z.ZodOptional; azure_client_id: z.ZodOptional; azure_tenant_id: z.ZodOptional; azure_queues: z.ZodOptional; query: z.ZodOptional; subquery: z.ZodOptional; stream: z.ZodOptional; }, "strip", z.ZodTypeAny, { query?: string | undefined; index?: string | undefined; subquery?: string | undefined; stream?: string | undefined; }, { query?: string | undefined; index?: string | undefined; subquery?: string | undefined; stream?: string | undefined; }>>; license_source: z.ZodDefault>; license_jwt_paste: z.ZodOptional; release_name: z.ZodOptional; namespace: z.ZodOptional; action: z.ZodOptional>; destination: z.ZodOptional; }, "strip", z.ZodTypeAny, { snapshot_id: string; license_source: "demo" | "signin" | "paste"; namespace?: string | undefined; storage_account?: string | undefined; destination?: string | undefined; action?: "all" | "install" | "verify" | "teardown" | undefined; location?: string | undefined; infra_mode?: "terraform" | "cli" | "existing" | undefined; index_source_bucket?: string | undefined; index_bucket?: string | undefined; iam_role_arn?: string | undefined; index_queue_url?: string | undefined; query_queue_url?: string | undefined; subquery_queue_url?: string | undefined; stream_queue_url?: string | undefined; storage_provider?: "aws" | "azure" | undefined; input_container?: string | undefined; index_container?: string | undefined; resource_group?: string | undefined; aks_cluster_name?: string | undefined; azure_client_id?: string | undefined; azure_tenant_id?: string | undefined; azure_queues?: { query?: string | undefined; index?: string | undefined; subquery?: string | undefined; stream?: string | undefined; } | undefined; license_jwt_paste?: string | undefined; release_name?: string | undefined; }, { snapshot_id: string; namespace?: string | undefined; storage_account?: string | undefined; destination?: string | undefined; action?: "all" | "install" | "verify" | "teardown" | undefined; location?: string | undefined; infra_mode?: "terraform" | "cli" | "existing" | undefined; index_source_bucket?: string | undefined; index_bucket?: string | undefined; iam_role_arn?: string | undefined; index_queue_url?: string | undefined; query_queue_url?: string | undefined; subquery_queue_url?: string | undefined; stream_queue_url?: string | undefined; storage_provider?: "aws" | "azure" | undefined; input_container?: string | undefined; index_container?: string | undefined; resource_group?: string | undefined; aks_cluster_name?: string | undefined; azure_client_id?: string | undefined; azure_tenant_id?: string | undefined; azure_queues?: { query?: string | undefined; index?: string | undefined; subquery?: string | undefined; stream?: string | undefined; } | undefined; license_source?: "demo" | "signin" | "paste" | undefined; license_jwt_paste?: string | undefined; release_name?: string | undefined; }>; export type AdviseRetrieverArgs = z.infer; /** * Wizard session for the Retriever. Stored separately from the install * wizard's WizardSession (different field set), keyed by * `.retriever-session.json` on disk. */ export interface RetrieverWizardSession { snapshotId: string; /** 'terraform' | 'cli' | 'existing'. Auto-set to 'existing' when all infra detected. */ infraMode?: 'terraform' | 'cli' | 'existing'; /** Resolved S3 input bucket. */ inputBucket?: string; /** Resolved S3 index prefix. */ indexBucket?: string; /** Resolved IRSA role ARN. */ irsaRoleArn?: string; /** Resolved SQS URLs. */ sqsIndexUrl?: string; sqsQueryUrl?: string; sqsSubqueryUrl?: string; sqsStreamUrl?: string; /** License fields — same as WizardSession. */ licenseJwt?: string; /** * Whether the licence in `licenseJwt` came from the caller (`license_source: * "paste"`) rather than being minted by the wizard. Only a caller-supplied * licence is written into an emitted values file. */ licenseSupplied?: boolean; isDemoLicense?: boolean; licenseSource?: 'signin' | 'demo' | 'paste'; licenseReason?: WizardSession['licenseReason']; /** Release/namespace overrides. */ releaseName?: string; namespace?: string; /** Azure Blob path: storage provider and the four answers the AKS plan needs. */ storageProvider?: 'aws' | 'azure'; storageAccount?: string; inputContainer?: string; indexContainer?: string; resourceGroup?: string; location?: string; aksClusterName?: string; azureClientId?: string; azureTenantId?: string; updatedAt: string; } export declare function executeAdviseRetriever(args: AdviseRetrieverArgs): Promise; export {};