chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:58:18 +08:00
commit 6d5d58c1a9
18293 changed files with 3502153 additions and 0 deletions
@@ -0,0 +1 @@
OPENAI_API_KEY=your-openai-api-key
@@ -0,0 +1,17 @@
{
"name": "@copilotkit/example-runtime-cf-workers",
"version": "0.0.1",
"private": true,
"scripts": {
"example-dev": "wrangler dev",
"example-deploy": "wrangler deploy"
},
"dependencies": {
"@copilotkit/runtime": "workspace:^"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20250214.0",
"typescript": "^5.8.2",
"wrangler": "^4.6.0"
}
}
@@ -0,0 +1,27 @@
import {
CopilotRuntime,
createCopilotRuntimeHandler,
BuiltInAgent,
} from "@copilotkit/runtime/v2";
export interface Env {
OPENAI_API_KEY: string;
}
export default {
async fetch(request: Request, env: Env): Promise<Response> {
const runtime = new CopilotRuntime({
agents: {
default: new BuiltInAgent({ model: "openai/gpt-5-mini" }),
},
});
const handler = createCopilotRuntimeHandler({
runtime,
basePath: "/api/copilotkit",
cors: true,
});
return handler(request);
},
};
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"types": ["@cloudflare/workers-types"],
"strict": true,
"skipLibCheck": true,
"esModuleInterop": true,
"outDir": "dist",
"rootDir": "src"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
@@ -0,0 +1,6 @@
name = "copilotkit-runtime"
main = "src/index.ts"
compatibility_date = "2025-02-01"
[vars]
PORT = "4006"