From 6bc14fe0711fe76bf5f0f7595a7ce1946906857a Mon Sep 17 00:00:00 2001 From: notgitika Date: Thu, 23 Jul 2026 19:38:30 -0400 Subject: [PATCH 1/8] fix: preserve generated API reference content --- scripts/extract_api_model.py | 16 ++++++-- scripts/render_adoc.py | 42 ++++++++++++++++++-- tests/unit/scripts/test_extract_api_model.py | 41 +++++++++++++++++++ tests/unit/scripts/test_render_adoc.py | 40 +++++++++++++++++++ 4 files changed, 132 insertions(+), 7 deletions(-) create mode 100644 tests/unit/scripts/test_extract_api_model.py diff --git a/scripts/extract_api_model.py b/scripts/extract_api_model.py index 2d03c3f0..9963ba92 100644 --- a/scripts/extract_api_model.py +++ b/scripts/extract_api_model.py @@ -43,8 +43,8 @@ ("knowledge-base", "Knowledge Base", "bedrock_agentcore.knowledge_base"), ] -_SECTION_RE = re.compile(r"^\s*(Args|Arguments|Returns|Raises|Example|Examples):\s*$") -_ARG_RE = re.compile(r"^\s+(\w+)\s*(?:\(([^)]+)\))?:\s*(.*)$") +_SECTION_RE = re.compile(r"^\s*(Args|Arguments|Returns|Raises|Example|Examples)(?:\s+\([^)]+\))?:\s*$") +_ARG_RE = re.compile(r"^\s+(\*{0,2}\w+)\s*(?:\(([^)]+)\))?:\s*(.*)$") # The SDK mixes Google-style ("Args:") and reST-style (":param x:") docstrings, # so we also recognize the reST field forms and pull them out of the prose. @@ -100,7 +100,8 @@ def parse_google_docstring(doc): result["summary"] = " ".join(summary) section = "description" - desc, example_buf = [], [] + desc, example_bufs = [], [] + example_buf = None while i < len(lines): line = lines[i] m = _SECTION_RE.match(line) @@ -114,6 +115,9 @@ def parse_google_docstring(doc): "example": "example", "examples": "example", }[name] + if section == "example": + example_buf = [] + example_bufs.append(example_buf) i += 1 continue if section == "description": @@ -141,6 +145,8 @@ def parse_google_docstring(doc): am = _ARG_RE.match(line) if am: result["raises"].append({"type": am.group(1), "description": am.group(3).strip()}) + elif result["raises"] and line.strip(): + result["raises"][-1]["description"] += " " + line.strip() elif section == "example": example_buf.append(line) i += 1 # always advance — non-header branches above don't, else infinite loop @@ -149,7 +155,7 @@ def parse_google_docstring(doc): # instead of, or mixed with, Google sections. Pull those out of the prose. desc = extract_rest_fields(desc, result) result["description"] = "\n".join(desc).strip() - if example_buf: + for example_buf in example_bufs: code = "\n".join(example_buf).strip() # strip a leading ```python fence if the docstring used one code = re.sub(r"^```\w*\n?|\n?```$", "", code).strip() @@ -177,6 +183,8 @@ def _own_docstring(obj): def entry_from_object(name, obj): """Build a doc-model entry for a class or function.""" doc = parse_google_docstring(_own_docstring(obj)) + if name == "__init__" and doc["summary"] == "Represents an actor within a session.": + doc["summary"] = "Initializes an Actor instance for the specified session." try: signature = inspect.signature(obj) # Drop the implicit `self`/`cls` receiver from method signatures. diff --git a/scripts/render_adoc.py b/scripts/render_adoc.py index 38ba71f8..8e8f86ad 100644 --- a/scripts/render_adoc.py +++ b/scripts/render_adoc.py @@ -55,12 +55,48 @@ SCHEMA_VERSION = 1 +def normalize_style(text): + """Apply style-safe substitutions to generated prose.""" + if not text: + return "" + text = re.sub(r"\be\.g\.(?:,)?", "for example,", text, flags=re.IGNORECASE) + text = text.replace( + "This feature is in preview and may change in future releases.", + "This feature is in preview and might change in future releases.", + ) + text = text.replace( + "This class provides convenient delegation to MemorySessionManager operations.", + "Use this class to delegate operations to MemorySessionManager.", + ) + return re.sub(r"\bAWS\b", "{aws}", text) + + +def normalize_param_description(text): + """Normalize recurring parameter-description style issues.""" + text = normalize_style(clean_rst(text)).strip() + substitutions = ( + (r"^Optional\b", "An optional"), + (r"^(?:\{aws\}|AWS)\s+region\b", "The {aws} Region"), + (r"^id of\b", "The ID of"), + (r"^Behaviour\b", "The behavior"), + (r"^Behavior\b", "The behavior"), + (r"^Memory resource ID\b", "The memory resource ID"), + (r"^Strategy name\b", "The name of the memory strategy"), + (r"^Strategy ID\b", "The ID of the memory strategy"), + ) + for pattern, replacement in substitutions: + text = re.sub(pattern, replacement, text, count=1, flags=re.IGNORECASE) + return text + + def esc(text): """Escape AsciiDoc-significant characters in inline text.""" if not text: return "" # Guard the couple of chars that start AsciiDoc markup in running prose. - return text.replace("|", "\\|").replace("{", "\\{") + marker = "\0AWS_ENTITY\0" + text = normalize_style(text).replace("{aws}", marker) + return text.replace("|", "\\|").replace("{", "\\{").replace(marker, "{aws}") # Match markdown code fences that may be indented (reST/Google docstrings often @@ -94,7 +130,7 @@ def _admonition_repl(m): # Convert roles: :class:`Foo` -> `Foo` text = _RST_ROLE_RE.sub(r"`\1`", text) - return text + return normalize_style(text) _ADOC_ADMONITION_RE = re.compile( @@ -171,7 +207,7 @@ def render_params(params, out): req = "" if p.get("required") else " _(optional)_" typ = f"`{p['type']}`" if p.get("type") else "" out.append(f"`{p['name']}`{req} {typ}::") - out.append(esc(clean_rst(p.get("description", ""))) or "_No description._") + out.append(esc(normalize_param_description(p.get("description", ""))) or "_No description._") out.append("") diff --git a/tests/unit/scripts/test_extract_api_model.py b/tests/unit/scripts/test_extract_api_model.py new file mode 100644 index 00000000..460daa49 --- /dev/null +++ b/tests/unit/scripts/test_extract_api_model.py @@ -0,0 +1,41 @@ +"""Tests for the Python API doc-model extractor.""" + +import importlib.util +from pathlib import Path + +_EXTRACT_PATH = Path(__file__).resolve().parents[3] / "scripts" / "extract_api_model.py" +_spec = importlib.util.spec_from_file_location("extract_api_model", _EXTRACT_PATH) +extract_api_model = importlib.util.module_from_spec(_spec) +_spec.loader.exec_module(extract_api_model) + + +def test_multiline_fields_and_named_examples_are_preserved(): + doc = """Run an evaluation. + + Args: + wait_config: Optional WaitConfig for polling behavior. + **kwargs: Arguments forwarded to the API. + + Returns: + A list of spans. + + Raises: + ValueError: If the dataset is empty or all scenarios fail during + execution. + + Example (Runtime agent): + >>> run("runtime") + + Example (Custom agent): + >>> run("custom") + """ + + parsed = extract_api_model.parse_google_docstring(doc) + + assert [param["name"] for param in parsed["params"]] == ["wait_config", "**kwargs"] + assert parsed["returns"]["description"] == "A list of spans." + assert parsed["raises"][0]["description"] == ("If the dataset is empty or all scenarios fail during execution.") + assert [example["code"] for example in parsed["examples"]] == [ + '>>> run("runtime")', + '>>> run("custom")', + ] diff --git a/tests/unit/scripts/test_render_adoc.py b/tests/unit/scripts/test_render_adoc.py index 1d159b20..223e8e30 100644 --- a/tests/unit/scripts/test_render_adoc.py +++ b/tests/unit/scripts/test_render_adoc.py @@ -58,6 +58,20 @@ def test_indented_fence_is_handled(self): def test_plain_prose_passthrough(self): assert render_adoc.render_prose("just text") == ["just text"] + def test_generated_prose_uses_aws_style(self): + out = "\n".join( + render_adoc.render_prose( + "This AWS client is experimental. " + "This feature is in preview and may change in future releases. " + "Use a value (e.g., example)." + ) + ) + assert "might change" in out + assert "for example, example" in out + assert "This {aws} client" in out + assert " may change" not in out + assert "e.g." not in out + class TestRenderEntry: def test_no_fence_leaks_in_description(self): @@ -79,6 +93,32 @@ def test_params_render_as_definition_list(self): assert "`name`" in adoc assert "The name." in adoc + @pytest.mark.parametrize( + ("source", "expected"), + [ + ("Optional WaitConfig.", "An optional WaitConfig."), + ("AWS region.", "The {aws} Region."), + ("id of the actor", "The ID of the actor"), + ("Behaviour manager.", "The behavior manager."), + ("Memory resource ID", "The memory resource ID"), + ("Strategy name.", "The name of the memory strategy."), + ], + ) + def test_parameter_descriptions_use_aws_style(self, source, expected): + adoc = _render( + _entry( + params=[ + { + "name": "value", + "type": "str", + "required": True, + "description": source, + } + ] + ) + ) + assert expected in adoc + def test_example_stray_fence_stripped(self): # A closing fence plus trailing prose swept into the example must not leak. code = "a = 1\n```\nNotes: not code." From fca6a90aa86e60a723ea564523cb352c45680d37 Mon Sep 17 00:00:00 2001 From: notgitika Date: Fri, 24 Jul 2026 15:58:09 -0400 Subject: [PATCH 2/8] fix: normalize generated API reference style --- scripts/extract_api_model.py | 11 +++++++++ scripts/render_adoc.py | 24 ++++++++++++++++++++ tests/unit/scripts/test_extract_api_model.py | 11 +++++++++ tests/unit/scripts/test_render_adoc.py | 17 ++++++++++++++ 4 files changed, 63 insertions(+) diff --git a/scripts/extract_api_model.py b/scripts/extract_api_model.py index 9963ba92..732c4700 100644 --- a/scripts/extract_api_model.py +++ b/scripts/extract_api_model.py @@ -52,6 +52,15 @@ _REST_RETURNS_RE = re.compile(r"^\s*:returns?:\s*(.*)$") _REST_RAISES_RE = re.compile(r"^\s*:raises?\s+([\w.]+):\s*(.*)$") +SUMMARY_OVERRIDES = { + "Actor": ( + "Provides a handle for an actor within a session, delegating operations to the associated MemorySessionManager." + ), + "ActorProfile": "Describes the simulated actor's identity and objective.", + "BatchEvaluationSummary": "Provides aggregated results from a completed batch evaluation.", + "ConfigBundleRef": "References a configuration bundle version parsed from OTEL baggage.", +} + def extract_rest_fields(lines, result): """Pull reST field lines (:param:/:returns:/:raises:) out of `lines`. @@ -183,6 +192,8 @@ def _own_docstring(obj): def entry_from_object(name, obj): """Build a doc-model entry for a class or function.""" doc = parse_google_docstring(_own_docstring(obj)) + if name in SUMMARY_OVERRIDES: + doc["summary"] = SUMMARY_OVERRIDES[name] if name == "__init__" and doc["summary"] == "Represents an actor within a session.": doc["summary"] = "Initializes an Actor instance for the specified session." try: diff --git a/scripts/render_adoc.py b/scripts/render_adoc.py index 8e8f86ad..1a190c80 100644 --- a/scripts/render_adoc.py +++ b/scripts/render_adoc.py @@ -60,10 +60,34 @@ def normalize_style(text): if not text: return "" text = re.sub(r"\be\.g\.(?:,)?", "for example,", text, flags=re.IGNORECASE) + text = re.sub( + r"\bAWS Bedrock(?: AgentCore)? Code\s*Interpreter\b", + "AgentCore Code Interpreter", + text, + flags=re.IGNORECASE, + ) + text = re.sub(r"\bAWS Bedrock AgentCore\b", "Amazon Bedrock AgentCore", text) + text = re.sub(r"\bAWS Bedrock\b", "Amazon Bedrock", text) + text = re.sub(r"\bAgentCore Memory\b", "AgentCore memory", text) + text = re.sub(r"\bAgentCore Runtime\b", "AgentCore runtime", text) + text = text.replace( + "BedrockAgentCore Runtime Package.", + "Amazon Bedrock AgentCore runtime package.", + ) + text = text.replace( + "Bedrock AgentCore Policy Engine client.", + "Policy Engine client for Amazon Bedrock AgentCore.", + ) + text = text.replace( + "Client for Bedrock AgentCore Policy Engine operations.", + "Provides a client for Policy in AgentCore.", + ) + text = re.sub(r"\bAgentCore SDK\b", "AgentCore Python SDK", text) text = text.replace( "This feature is in preview and may change in future releases.", "This feature is in preview and might change in future releases.", ) + text = text.replace("validation will ensure", "validation ensures") text = text.replace( "This class provides convenient delegation to MemorySessionManager operations.", "Use this class to delegate operations to MemorySessionManager.", diff --git a/tests/unit/scripts/test_extract_api_model.py b/tests/unit/scripts/test_extract_api_model.py index 460daa49..013bb726 100644 --- a/tests/unit/scripts/test_extract_api_model.py +++ b/tests/unit/scripts/test_extract_api_model.py @@ -39,3 +39,14 @@ def test_multiline_fields_and_named_examples_are_preserved(): '>>> run("runtime")', '>>> run("custom")', ] + + +def test_public_class_summaries_use_action_verbs(): + class Actor: + """Represents an actor within a session.""" + + Actor.__module__ = "bedrock_agentcore.memory" + + entry = extract_api_model.entry_from_object("Actor", Actor) + + assert entry["summary"].startswith("Provides a handle") diff --git a/tests/unit/scripts/test_render_adoc.py b/tests/unit/scripts/test_render_adoc.py index 223e8e30..10b6628b 100644 --- a/tests/unit/scripts/test_render_adoc.py +++ b/tests/unit/scripts/test_render_adoc.py @@ -72,6 +72,23 @@ def test_generated_prose_uses_aws_style(self): assert " may change" not in out assert "e.g." not in out + @pytest.mark.parametrize( + ("source", "expected"), + [ + ("AWS Bedrock AgentCore client.", "Amazon Bedrock AgentCore client."), + ("AgentCore Memory client.", "AgentCore memory client."), + ("AgentCore Runtime endpoint.", "AgentCore runtime endpoint."), + ("AWS Bedrock Code Interpreter.", "AgentCore Code Interpreter."), + ("Bedrock AgentCore SDK tools.", "Bedrock AgentCore Python SDK tools."), + ( + "If both values are set, validation will ensure they match.", + "If both values are set, validation ensures they match.", + ), + ], + ) + def test_generated_prose_normalizes_service_names_and_voice(self, source, expected): + assert render_adoc.render_prose(source) == [expected] + class TestRenderEntry: def test_no_fence_leaks_in_description(self): From 6e723fe0c58f2c8ce41d42eca5c322a72b0cfc73 Mon Sep 17 00:00:00 2001 From: notgitika Date: Mon, 27 Jul 2026 15:16:03 -0400 Subject: [PATCH 3/8] fix: normalize remaining API reference style --- scripts/render_adoc.py | 34 +++++++++++++++++++------- tests/unit/scripts/test_render_adoc.py | 10 +++++++- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/scripts/render_adoc.py b/scripts/render_adoc.py index 1a190c80..5c5bf236 100644 --- a/scripts/render_adoc.py +++ b/scripts/render_adoc.py @@ -66,14 +66,6 @@ def normalize_style(text): text, flags=re.IGNORECASE, ) - text = re.sub(r"\bAWS Bedrock AgentCore\b", "Amazon Bedrock AgentCore", text) - text = re.sub(r"\bAWS Bedrock\b", "Amazon Bedrock", text) - text = re.sub(r"\bAgentCore Memory\b", "AgentCore memory", text) - text = re.sub(r"\bAgentCore Runtime\b", "AgentCore runtime", text) - text = text.replace( - "BedrockAgentCore Runtime Package.", - "Amazon Bedrock AgentCore runtime package.", - ) text = text.replace( "Bedrock AgentCore Policy Engine client.", "Policy Engine client for Amazon Bedrock AgentCore.", @@ -82,6 +74,20 @@ def normalize_style(text): "Client for Bedrock AgentCore Policy Engine operations.", "Provides a client for Policy in AgentCore.", ) + text = re.sub(r"\bAWS Bedrock AgentCore\b", "Amazon Bedrock AgentCore", text) + text = re.sub(r"\bAWS Bedrock\b", "Amazon Bedrock", text) + text = re.sub( + r"(? Date: Mon, 27 Jul 2026 15:47:54 -0400 Subject: [PATCH 4/8] fix: remove batch internals from API docs --- scripts/extract_api_model.py | 12 ++++++++-- tests/unit/scripts/test_extract_api_model.py | 23 ++++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/scripts/extract_api_model.py b/scripts/extract_api_model.py index 732c4700..dbfa964f 100644 --- a/scripts/extract_api_model.py +++ b/scripts/extract_api_model.py @@ -25,6 +25,7 @@ import json import re import sys +import textwrap PACKAGE = "bedrock_agentcore" @@ -59,6 +60,11 @@ "ActorProfile": "Describes the simulated actor's identity and objective.", "BatchEvaluationSummary": "Provides aggregated results from a completed batch evaluation.", "ConfigBundleRef": "References a configuration bundle version parsed from OTEL baggage.", + "delete_all_long_term_memories_in_namespace": ("Deletes all long-term memory records in the specified namespace."), +} + +DESCRIPTION_OVERRIDES = { + "delete_all_long_term_memories_in_namespace": "Retrieves all records and deletes them in batches.", } @@ -138,7 +144,7 @@ def parse_google_docstring(doc): { "name": am.group(1), "type": (am.group(2) or "").strip() or None, - "required": "optional" not in (am.group(2) or "").lower(), + "required": not am.group(1).startswith("*") and "optional" not in (am.group(2) or "").lower(), "description": am.group(3).strip(), } ) @@ -165,7 +171,7 @@ def parse_google_docstring(doc): desc = extract_rest_fields(desc, result) result["description"] = "\n".join(desc).strip() for example_buf in example_bufs: - code = "\n".join(example_buf).strip() + code = textwrap.dedent("\n".join(example_buf)).strip() # strip a leading ```python fence if the docstring used one code = re.sub(r"^```\w*\n?|\n?```$", "", code).strip() if code: @@ -194,6 +200,8 @@ def entry_from_object(name, obj): doc = parse_google_docstring(_own_docstring(obj)) if name in SUMMARY_OVERRIDES: doc["summary"] = SUMMARY_OVERRIDES[name] + if name in DESCRIPTION_OVERRIDES: + doc["description"] = DESCRIPTION_OVERRIDES[name] if name == "__init__" and doc["summary"] == "Represents an actor within a session.": doc["summary"] = "Initializes an Actor instance for the specified session." try: diff --git a/tests/unit/scripts/test_extract_api_model.py b/tests/unit/scripts/test_extract_api_model.py index 013bb726..9953eac6 100644 --- a/tests/unit/scripts/test_extract_api_model.py +++ b/tests/unit/scripts/test_extract_api_model.py @@ -14,6 +14,7 @@ def test_multiline_fields_and_named_examples_are_preserved(): Args: wait_config: Optional WaitConfig for polling behavior. + *args: Positional arguments forwarded to the API. **kwargs: Arguments forwarded to the API. Returns: @@ -25,6 +26,7 @@ def test_multiline_fields_and_named_examples_are_preserved(): Example (Runtime agent): >>> run("runtime") + >>> run("runtime-again") Example (Custom agent): >>> run("custom") @@ -32,11 +34,12 @@ def test_multiline_fields_and_named_examples_are_preserved(): parsed = extract_api_model.parse_google_docstring(doc) - assert [param["name"] for param in parsed["params"]] == ["wait_config", "**kwargs"] + assert [param["name"] for param in parsed["params"]] == ["wait_config", "*args", "**kwargs"] + assert [param["required"] for param in parsed["params"]] == [True, False, False] assert parsed["returns"]["description"] == "A list of spans." assert parsed["raises"][0]["description"] == ("If the dataset is empty or all scenarios fail during execution.") assert [example["code"] for example in parsed["examples"]] == [ - '>>> run("runtime")', + '>>> run("runtime")\n>>> run("runtime-again")', '>>> run("custom")', ] @@ -50,3 +53,19 @@ class Actor: entry = extract_api_model.entry_from_object("Actor", Actor) assert entry["summary"].startswith("Provides a handle") + + +def test_internal_batch_size_is_removed_from_public_method_description(): + def delete_all_long_term_memories_in_namespace(): + """Delete all records. + + This method processes records in chunks of 100. + """ + + entry = extract_api_model.entry_from_object( + "delete_all_long_term_memories_in_namespace", + delete_all_long_term_memories_in_namespace, + ) + + assert entry["summary"] == "Deletes all long-term memory records in the specified namespace." + assert entry["description"] == "Retrieves all records and deletes them in batches." From cfa8561b878ebb3de095177fdd73212e8fc6e5f4 Mon Sep 17 00:00:00 2001 From: notgitika Date: Mon, 27 Jul 2026 15:53:30 -0400 Subject: [PATCH 5/8] fix: preserve released API reference formatting --- scripts/render_adoc.py | 9 +++++++++ tests/unit/scripts/test_render_adoc.py | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/scripts/render_adoc.py b/scripts/render_adoc.py index 5c5bf236..e7eff7a3 100644 --- a/scripts/render_adoc.py +++ b/scripts/render_adoc.py @@ -94,6 +94,15 @@ def normalize_style(text): "This feature is in preview and might change in future releases.", ) text = text.replace("validation will ensure", "validation ensures") + text = text.replace( + "Delete all long-term memory records within a specific namespace.", + "Deletes all long-term memory records in the specified namespace.", + ) + text = text.replace( + "This method retrieves all memory records in the specified namespace and performs\n" + "batch deletion operations using the Amazon Bedrock AgentCore API, processing in chunks of 100.", + "Retrieves all records and deletes them in batches.", + ) text = text.replace( "This class provides convenient delegation to MemorySessionManager operations.", "Use this class to delegate operations to MemorySessionManager.", diff --git a/tests/unit/scripts/test_render_adoc.py b/tests/unit/scripts/test_render_adoc.py index 6ee838b9..53b4488c 100644 --- a/tests/unit/scripts/test_render_adoc.py +++ b/tests/unit/scripts/test_render_adoc.py @@ -90,6 +90,10 @@ def test_generated_prose_uses_aws_style(self): "If both values are set, validation will ensure they match.", "If both values are set, validation ensures they match.", ), + ( + "Delete all long-term memory records within a specific namespace.", + "Deletes all long-term memory records in the specified namespace.", + ), ], ) def test_generated_prose_normalizes_service_names_and_voice(self, source, expected): From 5e0442326c13f13c1f1c3eeefc39c3609e4811e9 Mon Sep 17 00:00:00 2001 From: notgitika Date: Mon, 27 Jul 2026 16:02:01 -0400 Subject: [PATCH 6/8] fix: normalize Code Interpreter service name --- scripts/render_adoc.py | 2 +- tests/unit/scripts/test_render_adoc.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/render_adoc.py b/scripts/render_adoc.py index e7eff7a3..bc6f5c3f 100644 --- a/scripts/render_adoc.py +++ b/scripts/render_adoc.py @@ -61,7 +61,7 @@ def normalize_style(text): return "" text = re.sub(r"\be\.g\.(?:,)?", "for example,", text, flags=re.IGNORECASE) text = re.sub( - r"\bAWS Bedrock(?: AgentCore)? Code\s*Interpreter\b", + r"\bAWS (?:Bedrock(?: AgentCore)? )?Code\s*Interpreter\b", "AgentCore Code Interpreter", text, flags=re.IGNORECASE, diff --git a/tests/unit/scripts/test_render_adoc.py b/tests/unit/scripts/test_render_adoc.py index 53b4488c..774a3f24 100644 --- a/tests/unit/scripts/test_render_adoc.py +++ b/tests/unit/scripts/test_render_adoc.py @@ -81,6 +81,7 @@ def test_generated_prose_uses_aws_style(self): ("AgentCore Memory client.", "AgentCore memory client."), ("AgentCore Runtime endpoint.", "AgentCore runtime endpoint."), ("AWS Bedrock Code Interpreter.", "AgentCore Code Interpreter."), + ("AWS Code Interpreter.", "AgentCore Code Interpreter."), ("Bedrock AgentCore SDK tools.", "Amazon Bedrock AgentCore Python SDK tools."), ( "Bedrock AgentCore Policy Engine client.", From 02bc6300572591ff27fc5abad88089294fcf3ce9 Mon Sep 17 00:00:00 2001 From: notgitika Date: Mon, 27 Jul 2026 17:22:14 -0400 Subject: [PATCH 7/8] fix: qualify generated API service names --- scripts/extract_api_model.py | 6 +++++- scripts/render_adoc.py | 17 +++++++++++------ tests/unit/scripts/test_extract_api_model.py | 18 +++++++++++++++++- tests/unit/scripts/test_render_adoc.py | 16 +++++++++++++--- 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/scripts/extract_api_model.py b/scripts/extract_api_model.py index dbfa964f..5df113fe 100644 --- a/scripts/extract_api_model.py +++ b/scripts/extract_api_model.py @@ -58,13 +58,17 @@ "Provides a handle for an actor within a session, delegating operations to the associated MemorySessionManager." ), "ActorProfile": "Describes the simulated actor's identity and objective.", + "AgentCoreRuntimeClient": "Generates WebSocket authentication for Amazon Bedrock AgentCore runtime.", "BatchEvaluationSummary": "Provides aggregated results from a completed batch evaluation.", + "CodeInterpreter": "Provides a client for the Amazon Bedrock AgentCore Code Interpreter sandbox service.", "ConfigBundleRef": "References a configuration bundle version parsed from OTEL baggage.", + "MemorySession": "Represents a single Amazon Bedrock AgentCore MemorySession resource.", + "RuntimeClient": "Generates WebSocket authentication for Amazon Bedrock AgentCore runtime.", "delete_all_long_term_memories_in_namespace": ("Deletes all long-term memory records in the specified namespace."), } DESCRIPTION_OVERRIDES = { - "delete_all_long_term_memories_in_namespace": "Retrieves all records and deletes them in batches.", + "delete_all_long_term_memories_in_namespace": "", } diff --git a/scripts/render_adoc.py b/scripts/render_adoc.py index bc6f5c3f..5144dc0b 100644 --- a/scripts/render_adoc.py +++ b/scripts/render_adoc.py @@ -62,7 +62,7 @@ def normalize_style(text): text = re.sub(r"\be\.g\.(?:,)?", "for example,", text, flags=re.IGNORECASE) text = re.sub( r"\bAWS (?:Bedrock(?: AgentCore)? )?Code\s*Interpreter\b", - "AgentCore Code Interpreter", + "Amazon Bedrock AgentCore Code Interpreter", text, flags=re.IGNORECASE, ) @@ -81,6 +81,16 @@ def normalize_style(text): "Amazon Bedrock AgentCore", text, ) + text = re.sub( + r"(? Date: Mon, 27 Jul 2026 17:32:53 -0400 Subject: [PATCH 8/8] fix: normalize generated product names --- scripts/render_adoc.py | 6 ++++++ tests/unit/scripts/test_render_adoc.py | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/scripts/render_adoc.py b/scripts/render_adoc.py index 5144dc0b..c47403c8 100644 --- a/scripts/render_adoc.py +++ b/scripts/render_adoc.py @@ -91,6 +91,12 @@ def normalize_style(text): "Amazon Bedrock AgentCore runtime", text, ) + text = re.sub( + r"(?