import type { AgentCoreProjectSpec, HarnessSpec } from '../../../schema'; import { AgentCoreConfigBundle } from '../components/primitives/config-bundle/AgentCoreConfigBundle'; import { AgentCoreDataset } from '../components/primitives/dataset/AgentCoreDataset'; import { AgentCoreEvaluator } from '../components/primitives/evaluator/AgentCoreEvaluator'; import { AgentCoreOnlineEvaluationConfig } from '../components/primitives/evaluator/AgentCoreOnlineEvaluationConfig'; import type { AgentCoreHarness } from '../components/primitives/harness/AgentCoreHarness'; import type { AgentCoreHarnessRole } from '../components/primitives/harness/AgentCoreHarnessRole'; import type { HarnessRoleConfig } from '../components/primitives/harness/AgentCoreHarnessRole'; import { AgentCoreKnowledgeBase } from '../components/primitives/knowledge-base/AgentCoreKnowledgeBase'; import { AgentCoreMemory } from '../components/primitives/memory/AgentCoreMemory'; import { AgentCorePolicyEngine } from '../components/primitives/policy/AgentCorePolicyEngine'; import { AgentEnvironment } from './AgentEnvironment'; import { Construct } from 'constructs'; /** * A harness deployment unit: the role-scoped config (for the IAM role + container build) * plus, when deploying via CDK, the full validated spec and its config directory. */ export interface HarnessDeploymentConfig extends HarnessRoleConfig { /** Full validated harness spec — when present, the harness is synthesized as a CFN resource. */ readonly spec?: HarnessSpec; /** Directory containing this harness's harness.json (for resolving a system-prompt file path). */ readonly harnessDir?: string; } export interface AgentCoreApplicationProps { /** * The full project specification (v2 schema). */ spec: AgentCoreProjectSpec; /** * Optional harness configurations. * Each entry creates (or imports) an IAM execution role for a harness, and — when a full * `spec` is provided — synthesizes the `AWS::BedrockAgentCore::Harness` CFN resource. */ harnesses?: HarnessDeploymentConfig[]; /** * Parsed connectorParameters for non-S3 KB data sources, keyed by the data * source's `connectorConfigFile` path. Supplied by the caller (which reads * the JSON files); forwarded to each AgentCoreKnowledgeBase. Optional — * required only when a KB has non-S3 data sources. */ connectorParametersByFile?: Record>; /** * Deployed credential state for resolving credential names to ARNs. * Used by harness skill git auth to look up credential provider ARNs at synth time. */ credentials?: Record; } /** * AgentCore Application L3 Construct - v2 resource-centric model. * * Creates: * - Agent environments (runtimes) for each agent (may be empty for memory-only deployments) * - Memory resources at project level * - Evaluator resources at project level * - Online evaluation config resources at project level * - Wires all agents to all memories (implicit access) * - Wires credentials to all agents * * Creation order: memories → evaluators → agents → online evaluation configs * * All child constructs use stable logical IDs derived from resource names * via the logical-ids utility to ensure deterministic CloudFormation updates. */ export declare class AgentCoreApplication extends Construct { /** Agent environments keyed by agent name */ readonly environments: Map; /** Memories keyed by memory name */ readonly memories: Map; /** * Knowledge bases keyed by KB name. * * Public so Wave 2 can resolve `knowledgeBaseId` when wiring connector * gateway targets — `app.knowledgeBases.get(kbName).knowledgeBaseId`. * Do not narrow this back to private without updating Wave 2's lookup * path; the contract is consumed cross-construct. */ readonly knowledgeBases: Map; /** Evaluators keyed by evaluator name */ readonly evaluators: Map; /** Online evaluation configs keyed by config name */ readonly onlineEvalConfigs: Map; /** Policy engines keyed by engine name */ readonly policyEngines: Map; /** Config bundles keyed by bundle name */ readonly configBundles: Map; /** Datasets keyed by dataset name */ readonly datasets: Map; /** Harness roles keyed by harness name */ readonly harnessRoles: Map; /** Harness CFN resources keyed by harness name (only those deployed via CDK with a full spec) */ readonly harnesses: Map; constructor(scope: Construct, id: string, props: AgentCoreApplicationProps); /** * Resolve a harness's referenced memory into the in-stack ARN token + the * retrievalConfig derived from that memory's strategy namespaces. * Direct ARN (`memory.arn`) takes precedence over a by-name reference. */ private resolveHarnessMemory; /** * Creates CloudFormation outputs for harnesses deployed via CDK. * Per-harness: HarnessId, HarnessArn, Status, Version, AgentRuntimeArn. * (The execution-role ARN output is emitted separately by AgentCoreHarnessRole.) */ private createHarnessOutputs; /** * Wire all memories to all agents in the project. * In the v2 schema, all resources within a project have implicit access. */ private wireMemoriesToAgents; /** * Wire credentials to all agents. * Sets credential provider name env vars for each agent. */ private wireCredentialsToAgents; /** * Wire each harness role to its specific `existing` memory (if configured). * Unlike agents which get implicit access to all memories, harnesses only get access to the * single memory they reference. An `existing` ref resolves to a memory ARN one of two ways: * - by name → a sibling project memory (looked up in `this.memories`); or * - by ARN → an EXTERNAL memory not defined in this project. * Both must receive the data-plane grant, scoped to the resolved ARN. (Managed/disabled/omitted * memory is granted separately by AgentCoreHarnessRole's AgentCoreManagedMemory statement.) */ private wireMemoriesToHarnesses; /** * Creates CloudFormation outputs for memories. * Produces per-memory outputs (Id, Arn) plus aggregate outputs for backwards compatibility. */ private createMemoryOutputs; /** * Creates CloudFormation outputs for evaluators. */ private createEvaluatorOutputs; /** * Creates CloudFormation outputs for online eval configs. */ private createOnlineEvaluationConfigOutputs; /** * Creates CloudFormation outputs for datasets. * Produces per-dataset outputs (Id, Arn). */ private createDatasetOutputs; /** * Creates CloudFormation outputs for knowledge bases and their data sources. * * Per-KB outputs: Id, Arn. * Per-DS outputs: DataSourceN.Id and DataSourceN.Uri, where N is the index * into the local `dataSources[]` array. Consumers (e.g. the CLI post-deploy * hook) read these to map local URI → deployed DS id deterministically * instead of parsing physical names. */ private createKnowledgeBaseOutputs; /** * Creates CloudFormation outputs for policy engines and their policies. * Produces per-engine outputs (Id, Arn) and per-policy outputs (Id, Arn). */ private createPolicyOutputs; private createConfigBundleOutputs; /** * Resolve placeholder component keys (e.g., {{runtime:name}}, {{gateway:name}}) * to CDK token references from already-created constructs. */ private resolveConfigBundleComponents; private resolveComponentKey; } //# sourceMappingURL=AgentCoreApplication.d.ts.map