Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

28 lines · 1.2 KBRaw History
1import type { DiffineryEvent } from "@diffinery/shared";
2import type { Env } from "./env.js";
3import type { MailJob } from "./mail/types.js";
4import { app, queue, scheduled } from "./app.js";
5import { apiNotFound } from "./http/common.js";
6import { web } from "./web/routes.js";
7
8export { RepoDO } from "./repo/RepoDO.js";
9export { SchedulerDO } from "./scheduler.js";
10export { RunnerContainer, SandboxContainer, SandboxPoolDO } from "./runner/containers.js";
11export { RunWorkflow } from "./runner/workflow.js";
12export { ImportWorkflow } from "./imports/workflow.js";
13export { AccountWorkflow } from "./accounts/workflow.js";
14export { ImportContainer } from "./imports/container.js";
15export { ProjectDO } from "./agentic/ProjectDO.js";
16// Carries hosted containers' HTTP and HTTPS out under EGRESS=web (lib/egress.ts).
17export { ContainerProxy } from "@cloudflare/containers";
18
19// The web UI is mounted last so API, git and runner routes take precedence;
20// unknown API paths answer in JSON rather than falling through to its HTML 404.
21app.all("/api/*", () => apiNotFound());
22app.route("/", web);
23
24export default {
25 fetch: app.fetch,
26 queue,
27 scheduled,
28} satisfies ExportedHandler<Env, DiffineryEvent | MailJob>;