Listener posts "Thinking..." placeholder and async-invokes a new exec-aide-conversation Lambda that runs a Bedrock Sonnet tool-use loop over 7 email tools, then updates the Slack message with the response.
22 lines
739 B
TypeScript
22 lines
739 B
TypeScript
import * as cdk from 'aws-cdk-lib';
|
|
import { Construct } from 'constructs';
|
|
import { EmailPipelineConstruct } from './constructs/email-pipeline';
|
|
import { SocketModeConstruct } from './constructs/socket-mode';
|
|
|
|
export class ExecAideStack extends cdk.Stack {
|
|
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
|
|
super(scope, id, props);
|
|
|
|
const emailPipeline = new EmailPipelineConstruct(this, 'EmailPipeline');
|
|
|
|
new SocketModeConstruct(this, 'SocketMode', {
|
|
table: emailPipeline.table,
|
|
conversationFnArn: emailPipeline.conversationFn.functionArn,
|
|
});
|
|
|
|
new cdk.CfnOutput(this, 'TableName', {
|
|
value: emailPipeline.table.tableName,
|
|
description: 'DynamoDB table name',
|
|
});
|
|
}
|
|
}
|