Skip to content

Commit 1fee557

Browse files
committed
rename folder to bedrock-agent
1 parent 2bcb1bc commit 1fee557

File tree

6 files changed

+5
-8
lines changed

6 files changed

+5
-8
lines changed

packages/event-handler/src/bedrock-agent-function/BedrockAgentFunctionResolver.ts renamed to packages/event-handler/src/bedrock-agent/BedrockAgentFunctionResolver.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// TODO: rename folder to just bedrock-agent
2-
31
import { EnvironmentVariablesService } from '@aws-lambda-powertools/commons';
42
import type { Context } from 'aws-lambda';
53
import type {
@@ -10,7 +8,7 @@ import type {
108
ResponseOptions,
119
Tool,
1210
ToolFunction,
13-
} from '../types/bedrock-agent-function.js';
11+
} from '../types/bedrock-agent.js';
1412
import type { GenericLogger } from '../types/common.js';
1513
import { assertBedrockAgentFunctionEvent } from './utils.js';
1614

@@ -212,7 +210,6 @@ export class BedrockAgentFunctionResolver {
212210
}
213211

214212
try {
215-
// TODO: use apply to ensure that `this` is bound properly when used as decorator
216213
const res = await tool.handler(toolParams, event, context);
217214
const body = res == null ? '' : JSON.stringify(res);
218215
return this.#buildResponse({

packages/event-handler/src/bedrock-agent-function/utils.ts renamed to packages/event-handler/src/bedrock-agent/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isRecord, isString } from '@aws-lambda-powertools/commons/typeutils';
2-
import type { BedrockAgentFunctionEvent } from '../types/bedrock-agent-function.js';
2+
import type { BedrockAgentFunctionEvent } from '../types/bedrock-agent.js';
33

44
/**
55
* Asserts that the provided event is a BedrockAgentFunctionEvent.

packages/event-handler/src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type {
1313
BedrockAgentFunctionEvent,
1414
BedrockAgentFunctionResponse,
1515
ResolverOptions,
16-
} from './bedrock-agent-function.js';
16+
} from './bedrock-agent.js';
1717

1818
export type {
1919
GenericLogger,

packages/event-handler/tests/unit/bedrock-agent/BedrockAgentFunctionResolver.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import context from '@aws-lambda-powertools/testing-utils/context';
22
import type { Context } from 'aws-lambda';
33
import { beforeEach, describe, expect, it, vi } from 'vitest';
4-
import { BedrockAgentFunctionResolver } from '../../../src/bedrock-agent-function/index.js';
4+
import { BedrockAgentFunctionResolver } from '../../../src/bedrock-agent/index.js';
55
import type {
66
BedrockAgentFunctionEvent,
77
Configuration,
88
Parameter,
99
ParameterValue,
1010
ToolFunction,
11-
} from '../../../src/types/bedrock-agent-function.js';
11+
} from '../../../src/types/bedrock-agent';
1212

1313
function createEvent(functionName: string, parameters?: Parameter[]) {
1414
return {

0 commit comments

Comments
 (0)