aws-sdk-bedrockagentcore 1.56.0 → 1.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb7b52155366ef862784c13760dd432f6b3d131e90f7b1dd3022d0d6d35b1560
4
- data.tar.gz: f6c1676399424a71b00b8a8ceb53a00b22e4cb1b4547c593e858a90937956054
3
+ metadata.gz: 80eb8990a20e048a41ab853f5401b2b5f32d60f73c14c83676cdb308b21ca3f6
4
+ data.tar.gz: 36ff647c6656782b24e3f1f311d1b6a486e3e121debb20b384f418c08b5a390d
5
5
  SHA512:
6
- metadata.gz: f794c438005da7371edc77ada944fd8a181bb1655d875399f1eb18bb311b3f53b84aec98b42fce9342575ce493d06308c4c8848992fcd391b03a7880148c057f
7
- data.tar.gz: d24f39255446db5b0c233f7fc0b73303b781a90725a70ae41c47338a44440aa5d316d37d8b6fad887d7410236297f286a89df1ccf9e664a1ef8cd652d9d3d6f4
6
+ metadata.gz: 71bc461035b22c6181e84c8c721a7727f7c04aeec8c260ed445aeb93572a51cc0e60ae08ca3e0aa0f89cb901df3500f5934b5cf7a372fcfb798598a31fb6d1a5
7
+ data.tar.gz: 6c307e07d2804570e8ed7c969466d2572d8d51b388d1c3b8272c6d9f73c9dfbaca408a2bf68c9fdbfe6d21fb306b48f16ec65cb91d5883a4da1532d7cef17ed8
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.57.0 (2026-09-21)
5
+ ------------------
6
+
7
+ * Feature - Amazon Bedrock AgentCore Harness now supports lifecycle hooks for invocations and tool calls, with Lambda, SNS, and EventBridge targets. This release also adds apiBase for custom OpenAI-compatible endpoints.
8
+
4
9
  1.56.0 (2026-09-17)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.56.0
1
+ 1.57.0
@@ -3851,6 +3851,9 @@ module Aws::BedrockAgentCore
3851
3851
  # handler.on_runtime_client_error_event do |event|
3852
3852
  # event # => Aws::BedrockAgentCore::Types::runtimeClientError
3853
3853
  # end
3854
+ # handler.on_hook_event_event do |event|
3855
+ # event # => Aws::BedrockAgentCore::Types::hookEvent
3856
+ # end
3854
3857
  #
3855
3858
  # client.invoke_harness(
3856
3859
  # # params inputs
@@ -3887,6 +3890,9 @@ module Aws::BedrockAgentCore
3887
3890
  # stream.on_runtime_client_error_event do |event|
3888
3891
  # event # => Aws::BedrockAgentCore::Types::runtimeClientError
3889
3892
  # end
3893
+ # stream.on_hook_event_event do |event|
3894
+ # event # => Aws::BedrockAgentCore::Types::hookEvent
3895
+ # end
3890
3896
  # end
3891
3897
  #
3892
3898
  # client.invoke_harness(
@@ -3923,6 +3929,9 @@ module Aws::BedrockAgentCore
3923
3929
  # handler.on_runtime_client_error_event do |event|
3924
3930
  # event # => Aws::BedrockAgentCore::Types::runtimeClientError
3925
3931
  # end
3932
+ # handler.on_hook_event_event do |event|
3933
+ # event # => Aws::BedrockAgentCore::Types::hookEvent
3934
+ # end
3926
3935
  #
3927
3936
  # client.invoke_harness(
3928
3937
  # # params input
@@ -4004,6 +4013,7 @@ module Aws::BedrockAgentCore
4004
4013
  # open_ai_model_config: {
4005
4014
  # model_id: "ModelId", # required
4006
4015
  # api_key_arn: "ApiKeyArn", # required
4016
+ # api_base: "HarnessOpenAiApiBase",
4007
4017
  # max_tokens: 1,
4008
4018
  # temperature: 1.0,
4009
4019
  # top_p: 1.0,
@@ -4110,7 +4120,7 @@ module Aws::BedrockAgentCore
4110
4120
  #
4111
4121
  # # All events are available at resp.stream:
4112
4122
  # resp.stream #=> Enumerator
4113
- # resp.stream.event_types #=> [:message_start, :content_block_start, :content_block_delta, :content_block_stop, :message_stop, :metadata, :internal_server_exception, :validation_exception, :runtime_client_error]
4123
+ # resp.stream.event_types #=> [:message_start, :content_block_start, :content_block_delta, :content_block_stop, :message_stop, :metadata, :internal_server_exception, :validation_exception, :runtime_client_error, :hook_event]
4114
4124
  #
4115
4125
  # # For :message_start event available at #on_message_start_event callback and response eventstream enumerator:
4116
4126
  # event.role #=> String, one of "user", "assistant"
@@ -4139,7 +4149,7 @@ module Aws::BedrockAgentCore
4139
4149
  # event.content_block_index #=> Integer
4140
4150
  #
4141
4151
  # # For :message_stop event available at #on_message_stop_event callback and response eventstream enumerator:
4142
- # event.stop_reason #=> String, one of "end_turn", "tool_use", "tool_result", "max_tokens", "stop_sequence", "content_filtered", "malformed_model_output", "malformed_tool_use", "interrupted", "partial_turn", "model_context_window_exceeded", "max_iterations_exceeded", "max_output_tokens_exceeded", "timeout_exceeded"
4152
+ # event.stop_reason #=> String, one of "end_turn", "tool_use", "tool_result", "max_tokens", "stop_sequence", "content_filtered", "malformed_model_output", "malformed_tool_use", "interrupted", "partial_turn", "model_context_window_exceeded", "max_iterations_exceeded", "max_output_tokens_exceeded", "timeout_exceeded", "hook_stopped"
4143
4153
  #
4144
4154
  # # For :metadata event available at #on_metadata_event callback and response eventstream enumerator:
4145
4155
  # event.usage.input_tokens #=> Integer
@@ -4162,6 +4172,13 @@ module Aws::BedrockAgentCore
4162
4172
  # # For :runtime_client_error event available at #on_runtime_client_error_event callback and response eventstream enumerator:
4163
4173
  # event.message #=> String
4164
4174
  #
4175
+ # # For :hook_event event available at #on_hook_event_event callback and response eventstream enumerator:
4176
+ # event.hook_event_id #=> String
4177
+ # event.name #=> String
4178
+ # event.type #=> String, one of "before_tool_call", "after_tool_call", "before_invocation", "after_invocation"
4179
+ # event.decision #=> String, one of "allow", "deny"
4180
+ # event.reason #=> String
4181
+ #
4165
4182
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeHarness AWS API Documentation
4166
4183
  #
4167
4184
  # @overload invoke_harness(params = {})
@@ -6566,7 +6583,7 @@ module Aws::BedrockAgentCore
6566
6583
  tracer: tracer
6567
6584
  )
6568
6585
  context[:gem_name] = 'aws-sdk-bedrockagentcore'
6569
- context[:gem_version] = '1.56.0'
6586
+ context[:gem_version] = '1.57.0'
6570
6587
  Seahorse::Client::Request.new(handlers, context)
6571
6588
  end
6572
6589
 
@@ -315,6 +315,12 @@ module Aws::BedrockAgentCore
315
315
  HarnessEndpointName = Shapes::StringShape.new(name: 'HarnessEndpointName')
316
316
  HarnessGatewayOutboundAuth = Shapes::UnionShape.new(name: 'HarnessGatewayOutboundAuth')
317
317
  HarnessGeminiModelConfig = Shapes::StructureShape.new(name: 'HarnessGeminiModelConfig')
318
+ HarnessHookDecision = Shapes::StringShape.new(name: 'HarnessHookDecision')
319
+ HarnessHookEvent = Shapes::StructureShape.new(name: 'HarnessHookEvent')
320
+ HarnessHookEventId = Shapes::StringShape.new(name: 'HarnessHookEventId')
321
+ HarnessHookEventReasonString = Shapes::StringShape.new(name: 'HarnessHookEventReasonString')
322
+ HarnessHookEventType = Shapes::StringShape.new(name: 'HarnessHookEventType')
323
+ HarnessHookName = Shapes::StringShape.new(name: 'HarnessHookName')
318
324
  HarnessInlineFunctionConfig = Shapes::StructureShape.new(name: 'HarnessInlineFunctionConfig')
319
325
  HarnessInlineFunctionDescription = Shapes::StringShape.new(name: 'HarnessInlineFunctionDescription')
320
326
  HarnessLiteLlmApiBase = Shapes::StringShape.new(name: 'HarnessLiteLlmApiBase')
@@ -325,6 +331,7 @@ module Aws::BedrockAgentCore
325
331
  HarnessMessages = Shapes::ListShape.new(name: 'HarnessMessages')
326
332
  HarnessMetadataEvent = Shapes::StructureShape.new(name: 'HarnessMetadataEvent')
327
333
  HarnessModelConfiguration = Shapes::UnionShape.new(name: 'HarnessModelConfiguration')
334
+ HarnessOpenAiApiBase = Shapes::StringShape.new(name: 'HarnessOpenAiApiBase')
328
335
  HarnessOpenAiApiFormat = Shapes::StringShape.new(name: 'HarnessOpenAiApiFormat')
329
336
  HarnessOpenAiModelConfig = Shapes::StructureShape.new(name: 'HarnessOpenAiModelConfig')
330
337
  HarnessReasoningContentBlock = Shapes::UnionShape.new(name: 'HarnessReasoningContentBlock')
@@ -1905,6 +1912,13 @@ module Aws::BedrockAgentCore
1905
1912
  HarnessGeminiModelConfig.add_member(:additional_params, Shapes::ShapeRef.new(shape: Document, location_name: "additionalParams"))
1906
1913
  HarnessGeminiModelConfig.struct_class = Types::HarnessGeminiModelConfig
1907
1914
 
1915
+ HarnessHookEvent.add_member(:hook_event_id, Shapes::ShapeRef.new(shape: HarnessHookEventId, required: true, location_name: "hookEventId"))
1916
+ HarnessHookEvent.add_member(:name, Shapes::ShapeRef.new(shape: HarnessHookName, required: true, location_name: "name"))
1917
+ HarnessHookEvent.add_member(:type, Shapes::ShapeRef.new(shape: HarnessHookEventType, required: true, location_name: "type"))
1918
+ HarnessHookEvent.add_member(:decision, Shapes::ShapeRef.new(shape: HarnessHookDecision, location_name: "decision"))
1919
+ HarnessHookEvent.add_member(:reason, Shapes::ShapeRef.new(shape: HarnessHookEventReasonString, location_name: "reason"))
1920
+ HarnessHookEvent.struct_class = Types::HarnessHookEvent
1921
+
1908
1922
  HarnessInlineFunctionConfig.add_member(:description, Shapes::ShapeRef.new(shape: HarnessInlineFunctionDescription, required: true, location_name: "description"))
1909
1923
  HarnessInlineFunctionConfig.add_member(:input_schema, Shapes::ShapeRef.new(shape: SensitiveJson, required: true, location_name: "inputSchema"))
1910
1924
  HarnessInlineFunctionConfig.struct_class = Types::HarnessInlineFunctionConfig
@@ -1948,6 +1962,7 @@ module Aws::BedrockAgentCore
1948
1962
 
1949
1963
  HarnessOpenAiModelConfig.add_member(:model_id, Shapes::ShapeRef.new(shape: ModelId, required: true, location_name: "modelId"))
1950
1964
  HarnessOpenAiModelConfig.add_member(:api_key_arn, Shapes::ShapeRef.new(shape: ApiKeyArn, required: true, location_name: "apiKeyArn"))
1965
+ HarnessOpenAiModelConfig.add_member(:api_base, Shapes::ShapeRef.new(shape: HarnessOpenAiApiBase, location_name: "apiBase"))
1951
1966
  HarnessOpenAiModelConfig.add_member(:max_tokens, Shapes::ShapeRef.new(shape: MaxTokens, location_name: "maxTokens"))
1952
1967
  HarnessOpenAiModelConfig.add_member(:temperature, Shapes::ShapeRef.new(shape: Temperature, location_name: "temperature"))
1953
1968
  HarnessOpenAiModelConfig.add_member(:top_p, Shapes::ShapeRef.new(shape: TopP, location_name: "topP"))
@@ -2293,6 +2308,7 @@ module Aws::BedrockAgentCore
2293
2308
  InvokeHarnessStreamOutput.add_member(:internal_server_exception, Shapes::ShapeRef.new(shape: InternalServerException, location_name: "internalServerException"))
2294
2309
  InvokeHarnessStreamOutput.add_member(:validation_exception, Shapes::ShapeRef.new(shape: ValidationException, location_name: "validationException"))
2295
2310
  InvokeHarnessStreamOutput.add_member(:runtime_client_error, Shapes::ShapeRef.new(shape: RuntimeClientError, location_name: "runtimeClientError"))
2311
+ InvokeHarnessStreamOutput.add_member(:hook_event, Shapes::ShapeRef.new(shape: HarnessHookEvent, event: true, location_name: "hookEvent"))
2296
2312
  InvokeHarnessStreamOutput.struct_class = Types::InvokeHarnessStreamOutput
2297
2313
 
2298
2314
  KeyList.member = Shapes::ShapeRef.new(shape: String)
@@ -189,6 +189,10 @@ module Aws::BedrockAgentCore
189
189
  @event_emitter.on(:runtime_client_error, block) if block_given?
190
190
  end
191
191
 
192
+ def on_hook_event_event(&block)
193
+ @event_emitter.on(:hook_event, block) if block_given?
194
+ end
195
+
192
196
  def on_error_event(&block)
193
197
  @event_emitter.on(:error, block) if block_given?
194
198
  end
@@ -211,6 +215,7 @@ module Aws::BedrockAgentCore
211
215
  on_internal_server_exception_event(&block)
212
216
  on_validation_exception_event(&block)
213
217
  on_runtime_client_error_event(&block)
218
+ on_hook_event_event(&block)
214
219
  on_error_event(&block)
215
220
  on_initial_response_event(&block)
216
221
  on_unknown_event(&block)
@@ -4768,6 +4768,43 @@ module Aws::BedrockAgentCore
4768
4768
  include Aws::Structure
4769
4769
  end
4770
4770
 
4771
+ # A lifecycle hook event emitted in the invocation stream for visibility
4772
+ # into hook decisions.
4773
+ #
4774
+ # @!attribute [rw] hook_event_id
4775
+ # The unique identifier for this hook event.
4776
+ # @return [String]
4777
+ #
4778
+ # @!attribute [rw] name
4779
+ # The name of the hook that ran.
4780
+ # @return [String]
4781
+ #
4782
+ # @!attribute [rw] type
4783
+ # The type of lifecycle hook event.
4784
+ # @return [String]
4785
+ #
4786
+ # @!attribute [rw] decision
4787
+ # The decision applied to the hook event. This field is present only
4788
+ # for blocking Lambda targets.
4789
+ # @return [String]
4790
+ #
4791
+ # @!attribute [rw] reason
4792
+ # The optional reason for the applied decision.
4793
+ # @return [String]
4794
+ #
4795
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/HarnessHookEvent AWS API Documentation
4796
+ #
4797
+ class HarnessHookEvent < Struct.new(
4798
+ :hook_event_id,
4799
+ :name,
4800
+ :type,
4801
+ :decision,
4802
+ :reason,
4803
+ :event_type)
4804
+ SENSITIVE = []
4805
+ include Aws::Structure
4806
+ end
4807
+
4771
4808
  # Configuration for an inline function tool. When the agent calls this
4772
4809
  # tool, the tool call is returned to the caller for external execution.
4773
4810
  #
@@ -4956,6 +4993,10 @@ module Aws::BedrockAgentCore
4956
4993
  # The ARN of your OpenAI API key on AgentCore Identity.
4957
4994
  # @return [String]
4958
4995
  #
4996
+ # @!attribute [rw] api_base
4997
+ # Optional custom endpoint URL for an OpenAI-compatible endpoint.
4998
+ # @return [String]
4999
+ #
4959
5000
  # @!attribute [rw] max_tokens
4960
5001
  # The maximum number of tokens to allow in the generated response per
4961
5002
  # iteration.
@@ -4983,12 +5024,13 @@ module Aws::BedrockAgentCore
4983
5024
  class HarnessOpenAiModelConfig < Struct.new(
4984
5025
  :model_id,
4985
5026
  :api_key_arn,
5027
+ :api_base,
4986
5028
  :max_tokens,
4987
5029
  :temperature,
4988
5030
  :top_p,
4989
5031
  :api_format,
4990
5032
  :additional_params)
4991
- SENSITIVE = []
5033
+ SENSITIVE = [:api_base]
4992
5034
  include Aws::Structure
4993
5035
  end
4994
5036
 
@@ -11631,7 +11673,8 @@ module Aws::BedrockAgentCore
11631
11673
  :metadata,
11632
11674
  :internal_server_exception,
11633
11675
  :validation_exception,
11634
- :runtime_client_error
11676
+ :runtime_client_error,
11677
+ :hook_event
11635
11678
  ]
11636
11679
  end
11637
11680
 
@@ -56,7 +56,7 @@ module Aws::BedrockAgentCore
56
56
  autoload :Endpoints, 'aws-sdk-bedrockagentcore/endpoints'
57
57
  autoload :EventStreams, 'aws-sdk-bedrockagentcore/event_streams'
58
58
 
59
- GEM_VERSION = '1.56.0'
59
+ GEM_VERSION = '1.57.0'
60
60
 
61
61
  end
62
62
 
data/sig/client.rbs CHANGED
@@ -1016,6 +1016,7 @@ module Aws
1016
1016
  open_ai_model_config: {
1017
1017
  model_id: ::String,
1018
1018
  api_key_arn: ::String,
1019
+ api_base: ::String?,
1019
1020
  max_tokens: ::Integer?,
1020
1021
  temperature: ::Float?,
1021
1022
  top_p: ::Float?,
data/sig/types.rbs CHANGED
@@ -1431,6 +1431,16 @@ module Aws::BedrockAgentCore
1431
1431
  SENSITIVE: []
1432
1432
  end
1433
1433
 
1434
+ class HarnessHookEvent
1435
+ attr_accessor hook_event_id: ::String
1436
+ attr_accessor name: ::String
1437
+ attr_accessor type: ("before_tool_call" | "after_tool_call" | "before_invocation" | "after_invocation")
1438
+ attr_accessor decision: ("allow" | "deny")
1439
+ attr_accessor reason: ::String
1440
+ attr_accessor event_type: untyped
1441
+ SENSITIVE: []
1442
+ end
1443
+
1434
1444
  class HarnessInlineFunctionConfig
1435
1445
  attr_accessor description: ::String
1436
1446
  attr_accessor input_schema: untyped
@@ -1461,7 +1471,7 @@ module Aws::BedrockAgentCore
1461
1471
  end
1462
1472
 
1463
1473
  class HarnessMessageStopEvent
1464
- attr_accessor stop_reason: ("end_turn" | "tool_use" | "tool_result" | "max_tokens" | "stop_sequence" | "content_filtered" | "malformed_model_output" | "malformed_tool_use" | "interrupted" | "partial_turn" | "model_context_window_exceeded" | "max_iterations_exceeded" | "max_output_tokens_exceeded" | "timeout_exceeded")
1474
+ attr_accessor stop_reason: ("end_turn" | "tool_use" | "tool_result" | "max_tokens" | "stop_sequence" | "content_filtered" | "malformed_model_output" | "malformed_tool_use" | "interrupted" | "partial_turn" | "model_context_window_exceeded" | "max_iterations_exceeded" | "max_output_tokens_exceeded" | "timeout_exceeded" | "hook_stopped")
1465
1475
  attr_accessor event_type: untyped
1466
1476
  SENSITIVE: []
1467
1477
  end
@@ -1496,12 +1506,13 @@ module Aws::BedrockAgentCore
1496
1506
  class HarnessOpenAiModelConfig
1497
1507
  attr_accessor model_id: ::String
1498
1508
  attr_accessor api_key_arn: ::String
1509
+ attr_accessor api_base: ::String
1499
1510
  attr_accessor max_tokens: ::Integer
1500
1511
  attr_accessor temperature: ::Float
1501
1512
  attr_accessor top_p: ::Float
1502
1513
  attr_accessor api_format: ("chat_completions" | "responses")
1503
1514
  attr_accessor additional_params: untyped
1504
- SENSITIVE: []
1515
+ SENSITIVE: [:api_base]
1505
1516
  end
1506
1517
 
1507
1518
  class HarnessReasoningContentBlock
@@ -3449,7 +3460,7 @@ module Aws::BedrockAgentCore
3449
3460
  end
3450
3461
 
3451
3462
  class InvokeHarnessStreamOutput < Enumerator[untyped, untyped]
3452
- def event_types: () -> [:message_start, :content_block_start, :content_block_delta, :content_block_stop, :message_stop, :metadata, :internal_server_exception, :validation_exception, :runtime_client_error]
3463
+ def event_types: () -> [:message_start, :content_block_start, :content_block_delta, :content_block_stop, :message_stop, :metadata, :internal_server_exception, :validation_exception, :runtime_client_error, :hook_event]
3453
3464
  end
3454
3465
  end
3455
3466
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockagentcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.56.0
4
+ version: 1.57.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services