import type { AgentEnvSpec } from '../../../../schema'; import { Asset } from 'aws-cdk-lib/aws-s3-assets'; import { Construct } from 'constructs'; /** * Props for bundled code zip assets. */ export interface BundledCodeZipAssetProps { /** * The agent configuration containing code bundling details. */ readonly config: AgentEnvSpec; } /** * Result of packaging code into a zip. */ export interface PackageResult { /** Absolute path to the created zip file */ artifactPath: string; /** Size of the zip in bytes */ sizeBytes: number; } /** * Abstract base class for CDK constructs that package code into a zip and upload to the bootstrap bucket. * * IMPORTANT: This does NOT use CDK's bundling feature. CDK bundling always re-zips * the output directory, which would create a ZIP-of-a-ZIP and break runtime contracts. * * Instead, subclasses: * 1. Implement packageCode() to create the final ZIP artifact * 2. The base class creates an Asset pointing directly at the ZIP (no bundling) * 3. CDK uploads the ZIP as-is to the bootstrap bucket * * Subclasses implement language-specific packaging by overriding: * - `packageCode()`: Creates the zip artifact and returns its path */ export declare abstract class BundledCodeZipAsset extends Construct { /** * The underlying CDK Asset containing the zip. */ readonly asset: Asset; /** * The agent configuration used for this asset. */ protected readonly config: AgentEnvSpec; /** * The resolved absolute path to the code location. */ protected readonly resolvedCodeLocation: string; /** * The resolved path to the agentcore config directory. * Used as artifactDir for packaging to ensure build artifacts go to the right place. */ protected readonly configRoot: string; constructor(scope: Construct, id: string, props: BundledCodeZipAssetProps); /** * S3 bucket name where the asset is uploaded (CDK bootstrap bucket). */ get s3BucketName(): string; /** * S3 object key for the uploaded zip asset. */ get s3ObjectKey(): string; /** * Package the code into a zip file. * Subclasses implement language-specific packaging logic. * * @returns The path to the created zip file and its size */ protected abstract packageCode(): PackageResult; } //# sourceMappingURL=BundledCodeZipAsset.d.ts.map