import { PersonalAgent, Conversation, Sandbox, } from "../../dist/release/worker/index.js"; import { getAgentByName } from "agents"; export { PersonalAgent, Conversation, Sandbox }; // Test-only internal RPC entry, compiled against the actual packaged class. export default { async fetch(request, env) { const agent = await getAgentByName(env.PersonalAgent, "personal"); if (new URL(request.url).pathname === "/conversation") { const { id } = await agent.createConversation(); return Response.json({ id, ready: await agent.prepareConversation(id) }); } return Response.json(await agent.getStatus()); }, };