Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
528c11a
made webrtc route helpers
potofpie Dec 21, 2025
26f854e
fix: remove undefined eslint rule reference
potofpie Dec 21, 2025
719fa43
feat(webrtc): add state machine and SDK callbacks
potofpie Dec 21, 2025
1029e9c
Merge main into webrtc: migrate router.webrtc() to webrtc() middleware
potofpie Jan 16, 2026
b9fefa7
generated changes
potofpie Jan 16, 2026
56a87b6
template working
potofpie Jan 16, 2026
79c5f30
template working
potofpie Jan 16, 2026
ebd53d1
added comments for agent feedback while on plane
potofpie Jan 19, 2026
d31fc4a
added a bunch of updates
potofpie Jan 26, 2026
b4fc6b3
Merge remote-tracking branch 'origin/main' into webrtc
jhaynie Feb 6, 2026
ea57ad7
fix: address CodeRabbit review issues
jhaynie Feb 6, 2026
ab3f037
fix: resolve lint and typecheck issues
jhaynie Feb 6, 2026
195e65e
feat(webrtc): add auto-reconnection, timeouts, and comprehensive tests
jhaynie Feb 6, 2026
5728da6
fix(webrtc): address code review issues
jhaynie Feb 6, 2026
1bfc161
fix(ci): remove agentuity.json from e2e-web test app
jhaynie Feb 6, 2026
fae9fde
fix(webrtc): fix flaky reconnection test by using invalid signal URL
jhaynie Feb 6, 2026
e0ec557
Merge branch 'main' into webrtc
jhaynie Feb 6, 2026
041af70
docs: add WebRTC documentation and remove unreleased deprecations
jhaynie Feb 6, 2026
fe85a90
fix(webrtc): handle recording stop errors and fix interval leak
jhaynie Feb 6, 2026
b65b45e
test(webrtc): add comprehensive e2e test coverage and fix flaky mesh …
jhaynie Feb 6, 2026
33eb8b0
fix(ci): optimize e2e test workflow to avoid timeout
jhaynie Feb 6, 2026
d5e9278
fix: remove unused variable and add workflow clarification
jhaynie Feb 6, 2026
04c8c32
fix(e2e): improve test robustness and fix misleading comments
jhaynie Feb 6, 2026
228d79d
Merge branch 'main' into webrtc
jhaynie Feb 6, 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
7 changes: 5 additions & 2 deletions .github/workflows/package-smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ jobs:

playwright-e2e-test:
runs-on: blacksmith-4vcpu-ubuntu-2204
timeout-minutes: 10
timeout-minutes: 15
name: Playwright E2E Smoke Test
steps:
- uses: actions/checkout@v4
Expand All @@ -346,8 +346,11 @@ jobs:
- name: Install SDK in e2e-web
run: bash scripts/install-sdk-tarballs.sh apps/testing/e2e-web

# No explicit build step needed: playwright.config.ts webServer starts
# "bun run dev" which compiles on-the-fly via Vite. A production build
# would be redundant since e2e tests run against the dev server.
- name: Run Playwright E2E tests
run: bash scripts/test-e2e.sh
run: bun run test:e2e

# TODO: Re-enable after artifact storage quota resets (disabled 2026-02-01)
# - name: Upload Playwright report
Expand Down
28 changes: 17 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,23 @@

Bun workspaces monorepo with packages in `packages/`:

| Package | Runtime | Description |
| ------------ | -------- | -------------------------------------------- |
| `core` | Node/Bun | Shared types and utilities (publish first) |
| `schema` | Any | Schema validation (StandardSchema v1) |
| `server` | Node/Bun | Runtime-agnostic server utilities |
| `runtime` | Bun | Hono-based server runtime with OpenTelemetry |
| `react` | Browser | React hooks for agents |
| `frontend` | Browser | Framework-agnostic web utilities |
| `auth` | Both | Authentication providers (Clerk, etc.) |
| `cli` | Bun | CLI framework with commander.js |
| `test-utils` | Test | Private test helpers (never published) |
| Package | Runtime | Description |
| ------------ | -------- | ----------------------------------------------------- |
| `core` | Node/Bun | Shared types and utilities (publish first) |
| `schema` | Any | Schema validation (StandardSchema v1) |
| `server` | Node/Bun | Runtime-agnostic server utilities |
| `runtime` | Bun | Hono-based server runtime with WebRTC signaling |
| `react` | Browser | React hooks for agents and WebRTC |
| `frontend` | Browser | Framework-agnostic web utilities with WebRTC manager |
| `auth` | Both | Authentication providers (Clerk, etc.) |
| `cli` | Bun | CLI framework with commander.js |
| `postgres` | Node/Bun | Resilient PostgreSQL client with auto-reconnection |
| `drizzle` | Node/Bun | Drizzle ORM integration with resilient connections |
| `evals` | Any | Reusable evaluation presets |
| `opencode` | Bun | Opencoder agent plugins for Agentuity |
| `workbench` | Browser | Workbench UI component for agent testing |
| `vscode` | Node | VS Code extension for Agentuity |
| `test-utils` | Test | Private test helpers (never published) |

## Code Style

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ The structure of this mono repository:
- `packages/core` - Shared utilities used by most packages
- `packages/drizzle` - Drizzle ORM integration with resilient PostgreSQL connections
- `packages/evals` - Reusable Evaluation Presets
- `packages/frontend` - Reusable code for web frontends
- `packages/frontend` - Reusable code for web frontends including WebRTC peer connections
- `packages/opencode` - Opencoder agent plugins for Agentuity
- `packages/postgres` - Resilient PostgreSQL client with automatic reconnection
- `packages/react` - React package for the Browser
- `packages/runtime` - Server-side package for the Agent runtime
- `packages/react` - React package for the Browser including WebRTC hooks
- `packages/runtime` - Server-side package for the Agent runtime with WebRTC signaling
- `packages/schema` - Schema validation library similar to zod and arktype
- `packages/server` - Runtime-agnostic server-side SDK (Node.js & Bun)
- `packages/test-utils` - Internal test utilities that can be used by packages
Expand Down
16 changes: 16 additions & 0 deletions apps/testing/e2e-web/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"search.exclude": {
"**/.git/**": true,
"**/node_modules/**": true,
"**/bun.lock": true,
"**/.agentuity/**": true
},
"json.schemas": [
{
"fileMatch": [
"agentuity.json"
],
"url": "https://agentuity.dev/schema/cli/v1/agentuity.json"
}
]
}
5 changes: 4 additions & 1 deletion apps/testing/e2e-web/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { createRouter } from '@agentuity/runtime';
import { createRouter, webrtc } from '@agentuity/runtime';
import hello from '../agent/hello/agent';

const api = createRouter();

// WebRTC signaling endpoint for E2E tests
api.get('/webrtc/signal', webrtc({ maxPeers: 10 }));

api.post('/hello', hello.validator(), async (c) => {
const data = c.req.valid('json');
const result = await hello.run(data);
Expand Down
36 changes: 36 additions & 0 deletions apps/testing/e2e-web/src/generated/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ declare module '@agentuity/frontend' {
stream: false;
params: { userId: string };
};
'GET /api/webrtc/signal': {
inputSchema: never;
outputSchema: never;
stream: false;
params: never;
};
}

/**
Expand Down Expand Up @@ -200,6 +206,14 @@ declare module '@agentuity/frontend' {
get: { input: never; output: never; type: 'api'; params: { userId: string }; paramsTuple: [string] };
};
};
webrtc: {
signal: {
/**
* Route: GET /api/webrtc/signal
*/
get: { input: never; output: never; type: 'api'; params: never; paramsTuple: [] };
};
};
}
}

Expand Down Expand Up @@ -231,6 +245,12 @@ declare module '@agentuity/react' {
stream: false;
params: { userId: string };
};
'GET /api/webrtc/signal': {
inputSchema: never;
outputSchema: never;
stream: false;
params: never;
};
}
export interface WebSocketRouteRegistry {
'/api/echo': {
Expand Down Expand Up @@ -293,6 +313,14 @@ declare module '@agentuity/react' {
get: { input: never; output: never; type: 'api'; params: { userId: string }; paramsTuple: [string] };
};
};
webrtc: {
signal: {
/**
* Route: GET /api/webrtc/signal
*/
get: { input: never; output: never; type: 'api'; params: never; paramsTuple: [] };
};
};
}
}

Expand Down Expand Up @@ -352,6 +380,14 @@ const _rpcRouteMetadata = {
]
}
}
},
"webrtc": {
"signal": {
"get": {
"type": "api",
"path": "/api/webrtc/signal"
}
}
}
} as const;

Expand Down
5 changes: 5 additions & 0 deletions apps/testing/e2e-web/src/web/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RpcPage } from './RpcPage';
import { RpcTestPage } from './RpcTestPage';
import { PathParamsPage } from './PathParamsPage';
import { AnalyticsTestPage } from './AnalyticsTestPage';
import { WebRTCTestPage } from './WebRTCTestPage';

const WORKBENCH_PATH = process.env.AGENTUITY_PUBLIC_WORKBENCH_PATH;

Expand Down Expand Up @@ -32,6 +33,10 @@ export function App() {
return <AnalyticsTestPage />;
}

if (path === '/webrtc') {
return <WebRTCTestPage />;
}

const [name, setName] = useState('World');
const { data: greeting, invoke, isLoading: running } = useAPI('POST /api/hello');

Expand Down
Loading