chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@apps/node",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/index.ts",
|
||||
"build": "tsc",
|
||||
"start": "node dist/index.js",
|
||||
"check-types": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@copilotkit/runtime": "workspace:^",
|
||||
"@hono/node-server": "^1.13.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@copilotkit/typescript-config": "workspace:^",
|
||||
"@types/node": "^22.10.7",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.8.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
CopilotRuntime,
|
||||
createCopilotEndpoint,
|
||||
VERSION,
|
||||
BasicAgent,
|
||||
} from "@copilotkit/runtime/v2";
|
||||
import { serve } from "@hono/node-server";
|
||||
|
||||
// Example: Creating a runtime instance
|
||||
// Note: BasicAgent is used here to verify the import works
|
||||
// In practice, agents would be passed with proper AbstractAgent interface
|
||||
const runtime = new CopilotRuntime({
|
||||
agents: {
|
||||
default: new BasicAgent({
|
||||
model: "openai/gpt-4o-mini",
|
||||
maxSteps: 5,
|
||||
temperature: 0.7,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
const endpoint = createCopilotEndpoint({
|
||||
basePath: "/api/copilotkit",
|
||||
runtime,
|
||||
});
|
||||
|
||||
serve({
|
||||
fetch: endpoint.fetch,
|
||||
port: 8787,
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"extends": "@copilotkit/typescript-config/base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "dist",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022"],
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
Reference in New Issue
Block a user