The best way to control Claude Code, Codex and more from any computer or phone
| 1 | /** |
| 2 | * The Cursor Origin driver: repository operations, discovery, and pull requests through Origin's |
| 3 | * REST API, signed in with the `origin` CLI's session. |
| 4 | * |
| 5 | * @module source-control-cursor-origin/server/driver |
| 6 | */ |
| 7 | import { |
| 8 | defineSourceControlDriver, |
| 9 | withOwnServices, |
| 10 | } from "@t3tools/source-control-core/server/driver"; |
| 11 | import * as Effect from "effect/Effect"; |
| 12 | |
| 13 | import { definition } from "../shared/definition.ts"; |
| 14 | |
| 15 | import * as OriginCli from "./OriginCli.ts"; |
| 16 | import * as OriginPullRequestProvider from "./OriginPullRequestProvider.ts"; |
| 17 | import * as OriginSourceControlProvider from "./OriginSourceControlProvider.ts"; |
| 18 | |
| 19 | const makeInstance = Effect.all({ |
| 20 | sourceControl: OriginSourceControlProvider.make, |
| 21 | discovery: OriginSourceControlProvider.makeDiscovery, |
| 22 | pullRequests: OriginPullRequestProvider.make, |
| 23 | }); |
| 24 | |
| 25 | export const driver = defineSourceControlDriver({ |
| 26 | kind: definition.kind, |
| 27 | definition, |
| 28 | make: withOwnServices(makeInstance, OriginCli.layer), |
| 29 | }); |