The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { createAgentRouter } from "@flue/runtime/routing"; |
| 2 | import { Hono } from "hono"; |
| 3 | import { Assistant } from "./agents/assistant.ts"; |
| 4 | |
| 5 | const app = new Hono(); |
| 6 | |
| 7 | // Runs in the Worker isolate, outside any agent's Durable Object. |
| 8 | app.get("/api/ping", (c) => c.json({ pong: true })); |
| 9 | |
| 10 | // The agent's conversations: `POST /agents/assistant/:id` prompts it, |
| 11 | // `GET /agents/assistant/:id` streams the conversation. |
| 12 | app.route("/agents/assistant", createAgentRouter(Assistant)); |
| 13 | |
| 14 | export default app; |