Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b4f68ab
feat(cpp): M1 framework upgrades — ProcessRunner, FileIOTools, GitToo…
May 6, 2026
6bcb64f
feat(cpp): gaia-bash agent — BashAgent, API server, MCP server, eval …
May 6, 2026
ca712fe
fix(cpp): ProcessRunner NOMINMAX + threaded pipe reading + FTXUI test…
May 7, 2026
14c8800
feat(cpp): wire API server + MCP server into gaia-bash CLI
May 7, 2026
0abd958
fix(cpp): set bash agent context size to 32K + add bash agent profile
May 9, 2026
f0b8fe1
Merge remote-tracking branch 'origin/main' into kalin/gaia-bash-agent
May 20, 2026
bf728da
fix(cpp): truncation overflow + eval adapter validation gaps
May 20, 2026
92cebb7
fix(cpp): fix WiFi tool tests + FTXUI shared lib build
May 20, 2026
fb99861
feat(cpp): add --json-events mode + JsonEventOutputHandler for TUI/We…
May 20, 2026
9567995
feat(cpp): add LLM usage stats to JSONL event output (#1206)
kovtcharov-amd May 28, 2026
f8c7cf9
Merge main into kalin/gaia-bash-agent
kovtcharov-amd May 29, 2026
7495cb5
fix(cpp): address gaia-bash review — bind localhost, escape fix, file…
May 29, 2026
a177c63
fix(cpp): fix CI failures — MinGW linker, shared lib vtable, unimplem…
May 29, 2026
9b732e6
Skip unreadable agent dirs during export (#1221)
kiwigitops May 29, 2026
0f09b12
fix(logging): suppress faiss AVX2/AVX-512 fallback noise (#1222)
kovtcharov-amd May 29, 2026
36fb3d5
fix(cpp): remove GAIA_API from agent-binary classes (shared lib linke…
May 29, 2026
d832d1a
fix(cpp): use correct Lemonade model ID (Gemma-4-E4B-it-GGUF)
May 29, 2026
7090acf
fix(cpp): auto-allow tools in pipe mode, fix isError detection, norma…
May 29, 2026
fdf11d6
Merge remote-tracking branch 'origin/main' into kalin/gaia-bash-agent
May 29, 2026
6a2c7ef
fix(cpp): remove duplicate answer output in single-query mode
May 29, 2026
fdd7282
fix(cpp): auto-allow tools in API server mode (no stdin for confirmat…
May 29, 2026
d1ff387
fix(cpp): eval adapter — remove unreliable tool-name-in-response checks
May 29, 2026
a381b8d
fix(cpp): relax eval ground truth for LLM output variability
May 29, 2026
410fcee
fix(cpp): /env slash command now displays shell, OS, and tools
May 29, 2026
481e128
Merge remote-tracking branch 'origin/main' into kalin/gaia-bash-agent
Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ jobs:
cmake -B cpp/build -S cpp -DCMAKE_BUILD_TYPE=Release \
-DGAIA_BUILD_TESTS=OFF -DGAIA_BUILD_EXAMPLES=OFF \
-DGAIA_BUILD_INTEGRATION_TESTS=OFF \
-DGAIA_BUILD_TUI=OFF \
-DCMAKE_INSTALL_PREFIX="${{ runner.temp }}/gaia_install"
cmake --build cpp/build --config Release --parallel
cmake --install cpp/build --config Release
Expand Down
91 changes: 91 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,27 @@ if(NOT httplib_FOUND)
FetchContent_MakeAvailable(httplib)
endif()

# FTXUI — reactive TUI framework (optional, gated behind GAIA_BUILD_TUI)
# FTXUI must always be built static — it doesn't export symbols for DLL builds,
# so BUILD_SHARED_LIBS=ON causes LNK1181 on Windows.
option(GAIA_BUILD_TUI "Build FTXUI-based TUI console" ON)
if(GAIA_BUILD_TUI)
find_package(ftxui QUIET)
if(NOT ftxui_FOUND)
message(STATUS "FTXUI not found -- fetching via FetchContent")
# Save and override BUILD_SHARED_LIBS so FTXUI always builds static
set(_GAIA_SAVE_BSL ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)
FetchContent_Declare(
ftxui
GIT_REPOSITORY https://github.com/ArthurSonzogni/FTXUI
GIT_TAG v6.1.9
)
FetchContent_MakeAvailable(ftxui)
set(BUILD_SHARED_LIBS ${_GAIA_SAVE_BSL})
endif()
endif()

# Google Test (unit tests and/or integration tests)
if(GAIA_BUILD_TESTS OR GAIA_BUILD_INTEGRATION_TESTS)
find_package(GTest QUIET)
Expand Down Expand Up @@ -103,8 +124,23 @@ add_library(gaia_core
src/mcp_client.cpp
src/security.cpp
src/sse_parser.cpp
src/process.cpp
src/file_tools.cpp
src/git_tools.cpp
src/session.cpp
src/repl.cpp
src/json_event_handler.cpp
)

# TUI sources (conditional on FTXUI availability)
if(GAIA_BUILD_TUI)
target_sources(gaia_core PRIVATE
src/tui_console.cpp
src/tui_markdown.cpp
)
target_compile_definitions(gaia_core PUBLIC GAIA_HAS_TUI=1)
endif()

add_library(gaia::gaia_core ALIAS gaia_core)

include(GenerateExportHeader)
Expand Down Expand Up @@ -163,6 +199,16 @@ if(WIN32)
target_link_libraries(gaia_core PRIVATE ws2_32)
endif()

# FTXUI (TUI console — optional)
if(GAIA_BUILD_TUI)
target_link_libraries(gaia_core PRIVATE
ftxui::component ftxui::dom ftxui::screen
)
message(STATUS "GAIA TUI: enabled (FTXUI)")
else()
message(STATUS "GAIA TUI: disabled")
endif()

# HTTPS support — auto-detected. No flags required; OpenSSL is used when available.
find_package(OpenSSL QUIET)
if(OpenSSL_FOUND)
Expand All @@ -175,6 +221,36 @@ else()
message(STATUS "GAIA SSL: not available (HTTP only)")
endif()

# ---------------------------------------------------------------------------
# gaia-bash agent binary
# ---------------------------------------------------------------------------
option(GAIA_BUILD_BASH_AGENT "Build the gaia-bash coding agent" ON)
if(GAIA_BUILD_BASH_AGENT)
add_executable(gaia-bash
agents/bash/main.cpp
agents/bash/bash_agent.cpp
agents/bash/bash_tools.cpp
agents/bash/api_server.cpp
agents/bash/mcp_server.cpp
)
target_include_directories(gaia-bash PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/agents/bash
)
target_link_libraries(gaia-bash PRIVATE gaia::gaia_core)

# API server needs httplib (already a dependency of gaia_core but PRIVATE)
if(httplib_FOUND)
target_link_libraries(gaia-bash PRIVATE httplib::httplib)
else()
target_include_directories(gaia-bash SYSTEM PRIVATE
$<TARGET_PROPERTY:httplib::httplib,INTERFACE_INCLUDE_DIRECTORIES>)
endif()
if(OpenSSL_FOUND)
target_compile_definitions(gaia-bash PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT)
target_link_libraries(gaia-bash PRIVATE OpenSSL::SSL OpenSSL::Crypto)
endif()
endif()

# ---------------------------------------------------------------------------
# Examples
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -218,11 +294,18 @@ if(GAIA_BUILD_TESTS)
tests/test_decision.cpp
tests/test_security.cpp
tests/test_sse_parser.cpp
tests/test_process.cpp
tests/test_file_tools.cpp
tests/test_git_tools.cpp
tests/test_session.cpp
tests/test_repl.cpp
tests/test_json_event_handler.cpp
)

target_link_libraries(tests_mock PRIVATE
gaia::gaia_core
GTest::gtest_main
GTest::gmock
)

# VLM tests need httplib (mock LLM server) and the fixtures directory.
Expand All @@ -242,6 +325,14 @@ if(GAIA_BUILD_TESTS)
)
target_include_directories(tests_mock PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)

# TUI tests (conditional -- requires FTXUI)
if(GAIA_BUILD_TUI)
target_sources(tests_mock PRIVATE tests/test_tui_console.cpp)
target_link_libraries(tests_mock PRIVATE
ftxui::component ftxui::dom ftxui::screen
)
endif()

include(GoogleTest)
gtest_discover_tests(tests_mock)
endif()
Expand Down
Loading
Loading