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.

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