Diffinery

homeflare/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.

31 lines · 1.4 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 { ComposeDO } from "./compose.js";
11export { RateLimiterDO } from "./rate-limiter.js";
12export { RunnerContainer, RunnerContainerMedium, RunnerContainerSmall, RunnerContainerTiny, SandboxContainer, SandboxPoolDO } from "./runner/containers.js";
13export { RunWorkflow } from "./runner/workflow.js";
14export { ImportWorkflow } from "./imports/workflow.js";
15export { AccountWorkflow } from "./accounts/workflow.js";
16export { ImportContainer } from "./imports/container.js";
17export { ProjectDO } from "./agentic/ProjectDO.js";
18export { GitHubRunnersDO } from "./github-runners/GitHubRunnersDO.js";
19// Carries hosted containers' HTTP and HTTPS out under EGRESS=web (lib/egress.ts).
20export { ContainerProxy } from "@cloudflare/containers";
21
22// The web UI is mounted last so API, git and runner routes take precedence;
23// unknown API paths answer in JSON rather than falling through to its HTML 404.
24app.all("/api/*", () => apiNotFound());
25app.route("/", web);
26
27export default {
28 fetch: app.fetch,
29 queue,
30 scheduled,
31} satisfies ExportedHandler<Env, DiffineryEvent | MailJob>;