/** * The infrastructure a handler in scope depends on (change: add-iac-deploy-binding-commands). * * `analyze_env_impact` answers "what breaks if I rename this variable?" and `analyze_impact` * crosses to infrastructure when asked. An agent about to edit a deployed handler should see, * unasked, the two facts it cannot read off the function itself: which resource runs it, and * which infrastructure site sets each environment variable it reads. * * Both come from indexed evidence, not inference: a `deploys_symbol` edge the deploy binder * resolved literally, and the declaration sites the env-declaration scan found. * * The field is about a DEPLOYED handler, and reading its configuration is the expensive half (a * re-read of its files, then a repository-wide scan of every infrastructure manifest). So nothing * is read at all until a resource in the graph binds to a function in scope: a task that touches * no handler pays one pass over the edge list and stops. * * Read-only, bounded, fail-quiet. */ import type { SerializedCallGraph } from '../../analyzer/call-graph.js'; export interface DeployedResource { /** `aws_lambda_function.orders`. */ resource: string; /** The ecosystem tag the resource node carries. */ ecosystem: string; /** `main.tf:12`. */ declaredAt: string; /** The function in scope it runs. */ runs: string; } export interface EnvSite { ecosystem: string; resource: string; at: string; } export interface InfrastructureBriefing { /** Resources bound to a function in scope by a `deploys_symbol` edge. */ deployedBy: DeployedResource[]; /** Environment variables functions in scope read, with the sites that set each. */ environment: Array<{ name: string; setBy: EnvSite[]; setByOmitted?: number; undeclared?: true; }>; omitted?: { resources?: number; variables?: number; }; /** What the infrastructure scan could not read, so `undeclared` is never an absolute claim. */ scanBoundaries?: string[]; note: string; } /** * The infrastructure facts for `functions` (the orient scope), or undefined when there are none: * no resource runs them and none of them reads a variable. */ export declare function infrastructureForFunctions(root: string, cg: SerializedCallGraph, functions: ReadonlyArray<{ name: string; filePath: string; }>): Promise; //# sourceMappingURL=deploy-briefing.d.ts.map