Skip to content

Commit 9a6ee39

Browse files
committed
chore(runtime): update package config, CI workflows, and docs
- Add package.json exports for v2/{express,hono,node} subpaths - Add elysia devDependency and tsdown entry points - Exclude bun integration tests from vitest config - Update CI workflows to include runtime-servers test job - Add runtime-server-adapter docs page - Add changeset for the fetch-based runtime feature
1 parent 7355c9b commit 9a6ee39

18 files changed

Lines changed: 1197 additions & 8 deletions

.changeset/funny-pears-yawn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@copilotkit/runtime": minor
3+
---
4+
5+
Add support for fetch based handler and add consistency in function naming

.github/workflows/e2e_dojo.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,14 @@ jobs:
221221
working-directory: CopilotKit
222222
run: pnpm install --frozen-lockfile
223223

224+
- name: Configure Nx Cloud environment
225+
if: steps.should-run.outputs.skip != 'true'
226+
run: |
227+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-e2e-dojo-${{ matrix.suite }}" >> $GITHUB_ENV
228+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
229+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
230+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
231+
224232
- name: Build cpk packages
225233
if: steps.should-run.outputs.skip != 'true'
226234
working-directory: CopilotKit

.github/workflows/e2e_examples.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ jobs:
7272
- name: Install dependencies
7373
run: pnpm install --frozen-lockfile
7474

75+
- name: Configure Nx Cloud environment
76+
run: |
77+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-e2e-examples-${{ matrix.example }}" >> $GITHUB_ENV
78+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
79+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
80+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
81+
7582
- name: Build CopilotKit
7683
id: build-cpk
7784
run: pnpm build

.github/workflows/publish-commit.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16+
timeout-minutes: 15
1617

1718
steps:
1819
- name: Checkout code
@@ -29,6 +30,13 @@ jobs:
2930
- name: Install dependencies
3031
run: pnpm install
3132

33+
- name: Configure Nx Cloud environment
34+
run: |
35+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-pkg-pr-new" >> $GITHUB_ENV
36+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
37+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
38+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
39+
3240
- name: Build
3341
run: pnpm run build
3442

.github/workflows/publish_custom-pre.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ jobs:
3232
- name: Install Dependencies
3333
run: pnpm i
3434

35+
- name: Configure Nx Cloud environment
36+
run: |
37+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-publish-custom" >> $GITHUB_ENV
38+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
39+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
40+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
41+
3542
- name: Build
3643
run: pnpm run build
3744

.github/workflows/publish_release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ jobs:
3535
- name: Install Dependencies
3636
run: pnpm i
3737

38+
- name: Configure Nx Cloud environment
39+
run: |
40+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-publish-release" >> $GITHUB_ENV
41+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
42+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
43+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
44+
3845
- name: Is in prerelease mode
3946
id: is-in-prerelease-mode
4047
run: |

.github/workflows/static_quality.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ env:
2929
jobs:
3030
format:
3131
runs-on: ubuntu-latest
32+
timeout-minutes: 10
3233

3334
steps:
3435
- name: Checkout
@@ -54,6 +55,7 @@ jobs:
5455

5556
oxlint:
5657
runs-on: ubuntu-latest
58+
timeout-minutes: 10
5759
steps:
5860
- name: Checkout
5961
uses: actions/checkout@v3
@@ -78,6 +80,7 @@ jobs:
7880

7981
package-quality:
8082
runs-on: ubuntu-latest
83+
timeout-minutes: 10
8184
steps:
8285
- name: Checkout
8386
uses: actions/checkout@v3
@@ -97,5 +100,12 @@ jobs:
97100
- name: Install dependencies
98101
run: pnpm install --frozen-lockfile
99102

103+
- name: Configure Nx Cloud environment
104+
run: |
105+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-quality-packages" >> $GITHUB_ENV
106+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
107+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
108+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
109+
100110
- name: Run publint and attw
101111
run: pnpm run check:packages
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: test / integration
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "packages/runtime/**"
8+
- ".github/workflows/test_runtime-servers.yml"
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- "packages/runtime/**"
13+
- ".github/workflows/test_runtime-servers.yml"
14+
workflow_dispatch:
15+
inputs:
16+
branch:
17+
description: "Branch to run the workflow on"
18+
required: true
19+
default: "main"
20+
type: string
21+
22+
jobs:
23+
node:
24+
name: "runtime / node"
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 15
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
ref: ${{ github.event.inputs.branch || github.ref }}
32+
33+
- name: Setup pnpm
34+
uses: pnpm/action-setup@v4
35+
with:
36+
version: "10.13.1"
37+
38+
- name: Use Node.js 22.x
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: "22.x"
42+
43+
- name: Install dependencies
44+
run: pnpm install --frozen-lockfile
45+
46+
- name: Configure Nx Cloud environment
47+
run: |
48+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-integration-node" >> $GITHUB_ENV
49+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
50+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
51+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
52+
53+
- name: Build runtime
54+
run: pnpm nx run @copilotkit/runtime:build
55+
56+
- name: Run Node.js server integration tests
57+
working-directory: packages/runtime
58+
run: pnpm exec vitest run src/v2/runtime/__tests__/integration/node-servers.integration.test.ts
59+
60+
bun:
61+
name: "runtime / bun"
62+
runs-on: ubuntu-latest
63+
timeout-minutes: 15
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v4
67+
with:
68+
ref: ${{ github.event.inputs.branch || github.ref }}
69+
70+
- name: Setup pnpm
71+
uses: pnpm/action-setup@v4
72+
with:
73+
version: "10.13.1"
74+
75+
- name: Use Node.js 22.x
76+
uses: actions/setup-node@v4
77+
with:
78+
node-version: "22.x"
79+
80+
- name: Setup Bun
81+
uses: oven-sh/setup-bun@v2
82+
with:
83+
bun-version: latest
84+
85+
- name: Install dependencies
86+
run: pnpm install --frozen-lockfile
87+
88+
- name: Configure Nx Cloud environment
89+
run: |
90+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-integration-bun" >> $GITHUB_ENV
91+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
92+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
93+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
94+
95+
- name: Build runtime
96+
run: pnpm nx run @copilotkit/runtime:build
97+
98+
- name: Run Bun server integration tests
99+
working-directory: packages/runtime
100+
run: bun test src/v2/runtime/__tests__/integration/bun/bun-servers.integration.test.ts

.github/workflows/test_unit.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
unit:
3636
name: "unit"
3737
runs-on: ubuntu-latest
38+
timeout-minutes: 15
3839
strategy:
3940
fail-fast: false
4041
matrix:
@@ -58,6 +59,13 @@ jobs:
5859
- name: Install dependencies
5960
run: pnpm install --frozen-lockfile
6061

62+
- name: Configure Nx Cloud environment
63+
run: |
64+
echo "NX_CI_EXECUTION_ID=${{ github.run_id }}-${{ github.run_attempt }}-unit-v1-${{ matrix.node-version }}" >> $GITHUB_ENV
65+
echo "NX_CLOUD_NO_TIMEOUTS=true" >> $GITHUB_ENV
66+
echo "NX_CLOUD_DISTRIBUTED_EXECUTION=false" >> $GITHUB_ENV
67+
echo "NX_NO_CLOUD=true" >> $GITHUB_ENV
68+
6169
- name: Generate GraphQL codegen files
6270
run: npx nx run @copilotkit/runtime-client-gql:graphql-codegen
6371

docs/components/react/quickstart-dropdown.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,19 @@ export function QuickstartDropdown() {
3636
<select
3737
onChange={handleSelectChange}
3838
className="
39-
text-[#010507] font-medium dark:text-white text-sm p-3 pl-4 pr-10 transition-all duration-100 rounded-lg cursor-pointer w-full bg-[#0105070D] dark:bg-[#FFFFFF1A] font-spline appearance-none"
39+
text-[#010507] font-medium dark:text-white dark:color-scheme-dark text-sm p-3 pl-4 pr-10 transition-all duration-100 rounded-lg cursor-pointer w-full bg-[#0105070D] dark:bg-[#FFFFFF1A] font-spline appearance-none"
40+
style={{ colorScheme: "auto" }}
4041
defaultValue=""
4142
>
4243
<option value="" disabled>
4344
CHOOSE INTEGRATION
4445
</option>
4546
{options.map((option) => (
46-
<option key={option.url} value={option.url}>
47+
<option
48+
key={option.url}
49+
value={option.url}
50+
className="text-black dark:text-white bg-white dark:bg-neutral-800"
51+
>
4752
{option.label}
4853
</option>
4954
))}

0 commit comments

Comments
 (0)