Skip to content

Commit cf5e272

Browse files
authored
Merge pull request #19 from ag-ui-protocol/main
upfsyr
2 parents e5c7369 + a65bd9a commit cf5e272

File tree

1,241 files changed

+111328
-15579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,241 files changed

+111328
-15579
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
* @mme @ranst91 @ataibarkai @maxkorp @tylerslaton @NathanTarbert
2+
3+
sdks/community/java @pascalwilbrink
4+
sdks/community/kotlin @contextablemark
5+
sdks/community/go @mattsp1290

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
<!--
3+
4+
**Please PLEASE reach out to us first before starting any significant work on new or existing features.**
5+
6+
By the time you've gotten here, you're looking at creating a pull request so hopefully we're not too late.
7+
8+
We love community contributions! That said, we want to make sure we're all on the same page before you start.
9+
Investing a lot of time and effort just to find out it doesn't align with the upstream project feels awful, and we don't want that to happen.
10+
It also helps to make sure the work you're planning isn't already in progress.
11+
12+
As described in our contributing guide, please file an issue first: https://github.com/ag-ui-protocol/ag-ui/issues
13+
Or, reach out to us on Discord: https://discord.gg/Jd3FzfdJa8
14+
15+
Take a look at the contributing guide:
16+
https://github.com/ag-ui-protocol/ag-ui/blob/main/CONTRIBUTING.md
17+
18+
-->

.github/workflows/check-generated-files.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,33 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v4
1616

17+
- name: Set up Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 10.13.1
26+
1727
- name: Regenerate files.json
18-
working-directory: typescript-sdk/apps/dojo
19-
run: npm run generate-content-json
28+
working-directory: apps/dojo
29+
run: pnpm generate-content-json
2030

2131
- name: Check files.json
22-
working-directory: typescript-sdk/apps/dojo
32+
working-directory: apps/dojo
2333
run: |
2434
if git diff --exit-code src/files.json > /dev/null; then
2535
echo "✅ No changes detected in dojo/src/files.json. Everything is up to date."
2636
else
2737
echo "❌ Detected changes in dojo/src/files.json."
2838
echo ""
29-
echo "Please run \`(p)npm run generate-content-json\` in the typescript-sdk/apps/dojo folder and commit the changes."
39+
echo "Please run \`(p)npm run generate-content-json\` in the apps/dojo folder and commit the changes."
3040
echo ""
3141
echo "The detected diff was as follows:"
3242
echo "::group::Diff for dojo/src/files.json"
3343
git diff src/files.json
3444
echo "::endgroup::"
3545
exit 1
3646
fi
37-
38-

.github/workflows/dojo-e2e.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
include:
17+
- suite: a2a-middleware
18+
test_path: tests/a2aMiddlewareTests
19+
services: ["dojo","a2a-middleware"]
20+
wait_on: http://localhost:9999,tcp:localhost:8011,tcp:localhost:8012,tcp:localhost:8013,tcp:localhost:8014
1721
- suite: adk-middleware
1822
test_path: tests/adkMiddlewareTests
1923
services: ["dojo","adk-middleware"]
@@ -66,10 +70,10 @@ jobs:
6670
test_path: tests/serverStarterAllFeaturesTests
6771
services: ["dojo","server-starter-all"]
6872
wait_on: http://localhost:9999,tcp:localhost:8001
69-
- suite: vercel-ai-sdk
70-
test_path: tests/vercelAISdkTests
71-
services: ["dojo"]
72-
wait_on: http://localhost:9999
73+
# - suite: vercel-ai-sdk
74+
# test_path: tests/vercelAISdkTests
75+
# services: ["dojo"]
76+
# wait_on: http://localhost:9999
7377

7478
steps:
7579
- name: Checkout code
@@ -123,32 +127,29 @@ jobs:
123127
uses: astral-sh/setup-uv@v6
124128

125129
- name: Install dependencies
126-
working-directory: typescript-sdk
127130
run: pnpm install --frozen-lockfile
128131

129132
- name: Prepare dojo for e2e
130-
working-directory: typescript-sdk/apps/dojo
133+
working-directory: apps/dojo
131134
if: ${{ join(matrix.services, ',') != '' }}
132135
run: node ./scripts/prep-dojo-everything.js --only ${{ join(matrix.services, ',') }}
133136

134137
- name: Install e2e dependencies
135-
working-directory: typescript-sdk/apps/dojo/e2e
138+
working-directory: apps/dojo/e2e
136139
run: |
137140
pnpm install
138141
139142
- name: write langgraph env files
140-
working-directory: typescript-sdk/integrations/langgraph
143+
working-directory: integrations/langgraph
141144
env:
142145
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
143146
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
144147
if: ${{ contains(join(matrix.services, ','), 'langgraph-fastapi') || contains(join(matrix.services, ','), 'langgraph-platform-python') || contains(join(matrix.services, ','), 'langgraph-platform-typescript') }}
145148
run: |
146-
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > examples/python/.env
147-
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> examples/python/.env
148-
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > examples/typescript/.env
149-
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> examples/typescript/.env
150-
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > python/ag_ui_langgraph/.env
151-
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> python/ag_ui_langgraph/.env
149+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > python/examples/.env
150+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> python/examples/.env
151+
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" > typescript/examples/.env
152+
echo "LANGSMITH_API_KEY=${LANGSMITH_API_KEY}" >> typescript/examples/.env
152153
153154
- name: Run dojo+agents
154155
uses: JarvusInnovations/background-action@v1
@@ -160,12 +161,12 @@ jobs:
160161
with:
161162
run: |
162163
node ../scripts/run-dojo-everything.js --only ${{ join(matrix.services, ',') }}
163-
working-directory: typescript-sdk/apps/dojo/e2e
164+
working-directory: apps/dojo/e2e
164165
wait-on: ${{ matrix.wait_on }}
165166
wait-for: 300000
166167

167168
- name: Run tests – ${{ matrix.suite }}
168-
working-directory: typescript-sdk/apps/dojo/e2e
169+
working-directory: apps/dojo/e2e
169170
env:
170171
BASE_URL: http://localhost:9999
171172
PLAYWRIGHT_SUITE: ${{ matrix.suite }}
@@ -178,6 +179,6 @@ jobs:
178179
with:
179180
name: ${{ matrix.suite }}-playwright-traces
180181
path: |
181-
typescript-sdk/apps/dojo/e2e/test-results/${{ matrix.suite }}/**/*
182-
typescript-sdk/apps/dojo/e2e/playwright-report/**/*
182+
apps/dojo/e2e/test-results/${{ matrix.suite }}/**/*
183+
apps/dojo/e2e/playwright-report/**/*
183184
retention-days: 7

.github/workflows/test.yml

Lines changed: 127 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ jobs:
3636

3737
- name: Install dependencies
3838
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
39-
working-directory: python-sdk
39+
working-directory: sdks/python
4040
run: poetry install --no-interaction --no-root
4141

4242
- name: Install project
43-
working-directory: python-sdk
43+
working-directory: sdks/python
4444
run: poetry install --no-interaction
4545

4646
- name: Run tests
47-
working-directory: python-sdk
47+
working-directory: sdks/python
4848
run: poetry run python -m unittest discover tests -v
4949

5050
typescript:
@@ -58,7 +58,7 @@ jobs:
5858
- name: Set up Node.js
5959
uses: actions/setup-node@v4
6060
with:
61-
node-version: '18'
61+
node-version: '22'
6262

6363
- name: Install protoc
6464
uses: arduino/setup-protoc@v3
@@ -80,13 +80,132 @@ jobs:
8080
${{ runner.os }}-pnpm-store-
8181
8282
- name: Install dependencies
83-
working-directory: typescript-sdk
8483
run: pnpm install --frozen-lockfile
8584

8685
- name: Test Build
87-
working-directory: typescript-sdk
8886
run: pnpm run build
8987

9088
- name: Run tests
91-
working-directory: typescript-sdk
92-
run: pnpm run test
89+
run: pnpm run test
90+
91+
go:
92+
name: Go SDK Tests
93+
runs-on: ubuntu-latest
94+
95+
steps:
96+
- name: Checkout code
97+
uses: actions/checkout@v4
98+
99+
- name: Set up Go
100+
uses: actions/setup-go@v5
101+
with:
102+
go-version: '1.24.4'
103+
104+
- name: Setup Go module cache
105+
uses: actions/cache@v4
106+
with:
107+
path: |
108+
~/go/pkg/mod
109+
~/.cache/go-build
110+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
111+
restore-keys: |
112+
${{ runner.os }}-go-
113+
114+
- name: Download dependencies
115+
working-directory: sdks/community/go
116+
run: go mod download
117+
118+
- name: Run tests
119+
working-directory: sdks/community/go
120+
run: go test ./... -v
121+
122+
kotlin:
123+
name: Kotlin SDK Tests
124+
runs-on: ubuntu-latest
125+
126+
steps:
127+
- name: Checkout code
128+
uses: actions/checkout@v4
129+
130+
- name: Set up JDK 21
131+
uses: actions/setup-java@v4
132+
with:
133+
java-version: '21'
134+
distribution: 'temurin'
135+
136+
- name: Setup Gradle
137+
uses: gradle/gradle-build-action@v3
138+
139+
- name: Run JVM tests
140+
working-directory: sdks/community/kotlin/library
141+
run: ./gradlew jvmTest --no-daemon --stacktrace
142+
143+
- name: Parse test results
144+
if: always()
145+
working-directory: sdks/community/kotlin/library
146+
run: |
147+
echo "## Kotlin SDK Test Results Summary"
148+
echo ""
149+
150+
total_tests=0
151+
total_failures=0
152+
total_errors=0
153+
154+
for module in core client tools; do
155+
xml_dir="$module/build/test-results/jvmTest"
156+
157+
if [ -d "$xml_dir" ]; then
158+
# Sum up test counts from all XML files in the directory
159+
module_tests=$(find "$xml_dir" -name "*.xml" -exec grep -h '<testsuite' {} \; | grep -o 'tests="[0-9]*"' | sed 's/tests="\([0-9]*\)"/\1/' | awk '{sum += $1} END {print sum}')
160+
module_failures=$(find "$xml_dir" -name "*.xml" -exec grep -h '<testsuite' {} \; | grep -o 'failures="[0-9]*"' | sed 's/failures="\([0-9]*\)"/\1/' | awk '{sum += $1} END {print sum}')
161+
module_errors=$(find "$xml_dir" -name "*.xml" -exec grep -h '<testsuite' {} \; | grep -o 'errors="[0-9]*"' | sed 's/errors="\([0-9]*\)"/\1/' | awk '{sum += $1} END {print sum}')
162+
163+
# Default to 0 if empty
164+
module_tests=${module_tests:-0}
165+
module_failures=${module_failures:-0}
166+
module_errors=${module_errors:-0}
167+
168+
if [ "$module_tests" -gt 0 ]; then
169+
echo "✅ kotlin-$module: $module_tests tests, $module_failures failures, $module_errors errors"
170+
total_tests=$((total_tests + module_tests))
171+
total_failures=$((total_failures + module_failures))
172+
total_errors=$((total_errors + module_errors))
173+
fi
174+
fi
175+
done
176+
177+
echo ""
178+
echo "---"
179+
echo "### Overall Results: $total_tests tests, $total_failures failures, $total_errors errors"
180+
181+
if [ $total_failures -gt 0 ] || [ $total_errors -gt 0 ]; then
182+
echo "❌ Some tests failed"
183+
exit 1
184+
elif [ $total_tests -eq 0 ]; then
185+
echo "⚠️ No tests were found or executed"
186+
exit 1
187+
else
188+
echo "✅ All $total_tests tests passed!"
189+
fi
190+
191+
java:
192+
name: Java SDK Tests
193+
runs-on: ubuntu-latest
194+
195+
defaults:
196+
run:
197+
working-directory: sdks/community/java
198+
199+
steps:
200+
- name: Checkout code
201+
uses: actions/checkout@v4
202+
203+
- name: Set up Java
204+
uses: actions/setup-java@v4
205+
with:
206+
distribution: 'temurin'
207+
java-version: '17'
208+
cache: 'maven'
209+
210+
- name: Run tests
211+
run: mvn -B -ntp test

0 commit comments

Comments
 (0)