import { Hono } from "hono" const page = ` Session sharing has been discontinued | opencode

Session sharing has been discontinued

opencode no longer hosts shared sessions. This link and its content are no longer available.

` // V1 clients still create, sync, and remove shares on this host, and the V1 GitHub Action fails its run when share // creation fails. Accept those requests without storing anything so existing clients keep working. export default new Hono() .post("/api/share", async (c) => { const body = await c.req.json<{ sessionID: string }>() const id = body.sessionID.slice(-8) return c.json({ id, secret: "discontinued", url: new URL(`/share/${id}`, c.req.url).toString() }) }) .post("/api/share/:shareID/sync", (c) => c.json({})) .delete("/api/share/:shareID", (c) => c.json({})) .all("*", (c) => c.html(page, 410))