import type { KnowledgeBase } from '../../../../../schema'; import type { AgentCoreComponentProps } from '../../base-props'; import { aws_iam as iam } from 'aws-cdk-lib'; import { Construct } from 'constructs'; export interface AgentCoreKnowledgeBaseProps extends AgentCoreComponentProps { /** * The knowledge base configuration. The L3 only models project-owned KBs; * external KBs are wired by their literal 10-char ID on a connector gateway * target rather than as an AgentCoreKnowledgeBase. */ knowledgeBase: KnowledgeBase; /** * Parsed connectorParameters for each non-S3 data source, keyed by the * data source's `connectorConfigFile` path. The CLI reads the JSON file and * passes the parsed object here; the L3 emits it verbatim. Optional — only * required when the KB has non-S3 data sources. */ connectorParametersByFile?: Record>; } /** * AgentCore Knowledge Base component construct. * * Wave 1 scope: creates an FMKB-style Knowledge Base + S3 Data Source via the * CfnResource escape hatch. Typed L1 (CfnKnowledgeBase / CfnDataSource) cannot * be used because the MANAGED knowledge base type and the * MANAGED_KNOWLEDGE_BASE_CONNECTOR data source type are both private-beta and * not in the public CFN schema; typed L1 rejects them at synth time. * * The IAM service role trusts `bedrock.amazonaws.com`. * * Wave 1 does NOT create a connector gateway target. The `knowledgeBase.gateway` * field is accepted but ignored. Wave 2 lights up gateway wiring. */ export declare class AgentCoreKnowledgeBase extends Construct { /** The KB physical name (`${projectName}_${kb.name}`). */ readonly knowledgeBaseName: string; /** The KB id (CfnResource Ref). */ readonly knowledgeBaseId: string; /** The KB ARN (CfnResource attribute). */ readonly knowledgeBaseArn: string; /** The KB service role. */ readonly role: iam.Role; /** * Each created data source, in the order specified in the KB schema's * `dataSources[]` array. Exposed so the L3 can emit per-DS CFN outputs * (id + URI) without recomputing names or hashes — consumers (e.g. the CLI * post-deploy hook) read these outputs to map URI → DS id deterministically * instead of parsing physical names. */ readonly dataSources: { uri: string; id: string; }[]; private readonly cfnKnowledgeBase; private readonly cfnDataSources; constructor(scope: Construct, id: string, props: AgentCoreKnowledgeBaseProps); /** * Parse `s3://bucket[/prefix]` into its components. Bucket name follows * the standard S3 naming rules; the regex in S3DataSourceSchema is the * authority. Prefix (when present) is passed through to the DataSource's * `inclusionPrefixes` so ingestion is scoped to the path the user named. * * `prefix` is `undefined` when the URI is `s3://bucket` or `s3://bucket/`. * It is the substring after the first `/` otherwise (without a leading * slash) so `s3://b/docs/eng/` yields `'docs/eng/'`. */ private parseS3Uri; } //# sourceMappingURL=AgentCoreKnowledgeBase.d.ts.map