Files
Claude e6043b5d4d Add a C++ (libcurl) example and a curl request; state the exact host
A tester's Copilot wrote a C++ client against "ai.oathbreaker", which is the
MCP Registry name of the MCP server, not a host. Languages without an SDK had
no example to copy the URL from.

- cpp/hello.cpp: one Chat Completions request with libcurl and nlohmann/json,
  same behaviour as the JavaScript and Python examples (no redirects, no
  retries, incomplete answers are errors, key never printed).
- tests/cpp: builds the example with -Wall -Wextra -Werror and runs it against
  a local fixture server; a separate CI job installs the libraries.
- README: curl request and C++ section; the Base URL row says the host is
  oathbreaker.ai, with no api. subdomain, and that ai.oathbreaker/oathbreaker
  is a registry name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CfDjYxQRJkxzA91xGFyjpJ
2026-11-27 16:16:27 -03:00

44 lines
1.6 KiB
YAML

name: Check examples
on: [push, pull_request]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
- run: node --test tests/*.test.mjs
cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
- run: sudo apt-get update && sudo apt-get install -y g++ libcurl4-openssl-dev nlohmann-json3-dev
- run: node --test tests/cpp/*.test.mjs
frameworks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
framework: [openai-sdk, langchain, llamaindex, crewai]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 22
# CrewAI does not install on the runner's own Python 3.14.
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: '3.12'
- run: python -m venv .venv && .venv/bin/pip install -r ${{ matrix.framework }}/requirements.txt
- if: matrix.framework == 'openai-sdk'
run: npm ci --prefix openai-sdk
- run: node --test tests/frameworks/${{ matrix.framework }}.test.mjs
env:
PYTHON: .venv/bin/python