1import * as agentcore from "@distilled.cloud/aws/bedrock-agentcore";
2import * as Layer from "effect/Layer";
3import * as Output from "../../Output.ts";
4import { makeAgentCoreHttpBinding } from "./BindingHttp.ts";
5import { InvokeAgentRuntimeCommand } from "./InvokeAgentRuntimeCommand.ts";
6import type { Runtime } from "./Runtime.ts";
7
8export const InvokeAgentRuntimeCommandHttp = Layer.effect(
9 InvokeAgentRuntimeCommand,
10 makeAgentCoreHttpBinding({
11 tag: "AWS.BedrockAgentCore.InvokeAgentRuntimeCommand",
12 operation: agentcore.invokeAgentRuntimeCommand,
13 actions: ["bedrock-agentcore:InvokeAgentRuntimeCommand"],
14 requestKey: "agentRuntimeArn",
15 identifier: (runtime: Runtime) => runtime.agentRuntimeArn,
16 arns: (runtime: Runtime) => [
17 runtime.agentRuntimeArn,
18 // qualified invocations target a runtime endpoint sub-resource.
19 Output.interpolate`${runtime.agentRuntimeArn}/runtime-endpoint/*`,
20 ],
21 }),
22);