- MCP
- code on this site's /mcp
- CLI
- none: the JSON below is the answer
- JSON
- /christopher/abso-core/files/server/src/issues-entry.ts?version=150&format=json
27 linesspeed 100%Last change speed in version 150, 1 version changed it
You're reading version 150. The newest is 318, and 1 version since then changed this file.
1// Where the router meets issues, asks and news (server/src/issues/, built alongside this file). Until that folder
2// lands, this is a stand-in with the same exports, so the Worker builds and its tests run. When it lands, this file
3// becomes one line:
4//
5// export { IssueProject, issuesFetch } from "./issues/index.ts";
6//
7// The agreed interface: issuesFetch(request, env, ctx, {project, rest, auth}), where rest is the path after
8// /issues/p/<project> and auth is {kind: "token"} or {kind: "key", agent, role}. The router has checked auth before it
9// calls. The issues code reaches the project through env.PROJECT and its RPC methods agents(project) and
10// news(project, items) on ProjectObject.
12import { DurableObject } from "cloudflare:workers";
13import type { Env } from "./env.ts";
14import type { KeyRole } from "./keys.ts";
16export type IssuesAuth = { kind: "token" } | { kind: "key"; agent: string; role: KeyRole };
18export class IssueProject extends DurableObject<Env> {}
20export async function issuesFetch(
21 _request: Request,
22 _env: Env,
23 _ctx: ExecutionContext,
24 _where: { project: string; rest: string; auth: IssuesAuth },
25): Promise<Response> {
26 return Response.json({ error: "issues aren't on this server yet" }, { status: 404 });
27}