Skip to content

Commit 90a8951

Browse files
committed
refactor: move implementation details to source files and finalize recursion depth constants in validator
1 parent 6b37446 commit 90a8951

11 files changed

Lines changed: 1220 additions & 1108 deletions

File tree

agent_sdks/cpp/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ set(CMAKE_CXX_STANDARD 17)
1919
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2020

2121
include(FetchContent)
22+
find_package(Python3 REQUIRED COMPONENTS Interpreter)
2223

2324
# Fetch nlohmann/json
2425
FetchContent_Declare(
@@ -68,7 +69,7 @@ set(GENERATED_SCHEMAS_FILE "${CMAKE_CURRENT_BINARY_DIR}/generated/embedded_schem
6869
# Custom command to run Python script
6970
add_custom_command(
7071
OUTPUT "${GENERATED_SCHEMAS_FILE}"
71-
COMMAND python3 "${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_embedded_schemas.py" "${REPO_ROOT}" "${GENERATED_SCHEMAS_FILE}"
72+
COMMAND Python3::Interpreter "${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_embedded_schemas.py" "${REPO_ROOT}" "${GENERATED_SCHEMAS_FILE}"
7273
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_embedded_schemas.py"
7374
"${REPO_ROOT}/specification/v0_8/json/server_to_client.json"
7475
"${REPO_ROOT}/specification/v0_9/json/server_to_client.json"
@@ -85,6 +86,9 @@ add_library(a2ui_sdk
8586
src/schema/utils.cc
8687
src/parser/parser.cc
8788
src/parser/streaming.cc
89+
src/parser/streaming_impl.cc
90+
src/parser/streaming_v08.cc
91+
src/parser/streaming_v09.cc
8892
src/parser/payload_fixer.cc
8993
src/template/manager.cc
9094
src/basic_catalog/provider.cc

agent_sdks/cpp/include/a2ui/basic_catalog/constants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
#pragma once
1818

19-
#include <string>
19+
#include <string_view>
2020

2121
namespace a2ui {
2222
namespace basic_catalog {
2323

24-
const std::string BASIC_CATALOG_NAME = "basic";
24+
inline constexpr std::string_view BASIC_CATALOG_NAME = "basic";
2525

2626
} // namespace basic_catalog
2727
} // namespace a2ui

agent_sdks/cpp/src/basic_catalog/provider.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ nlohmann::json BundledCatalogProvider::load() {
5151

5252
CatalogConfig BasicCatalog::get_config(const std::string& version, const std::optional<std::string>& examples_path) {
5353
return CatalogConfig{
54-
BASIC_CATALOG_NAME,
54+
std::string(BASIC_CATALOG_NAME),
5555
std::make_shared<BundledCatalogProvider>(version),
5656
examples_path
5757
};

0 commit comments

Comments
 (0)