Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
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"
}
]
}
14 changes: 14 additions & 0 deletions apps/testing/e2e-web/agentuity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://agentuity.dev/schema/cli/v1/agentuity.json",
"projectId": "proj_796602fdc85ccde2da7530a809b8a440",
"orgId": "org_38GAeCRXBdW3KqNPi4WRm957Xia",
"region": "local",
"deployment": {
"resources": {
"memory": "500Mi",
"cpu": "500m",
"disk": "500Mi"
},
"domains": []
}
}
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