The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import * as Cloudflare from "@alchemy.run/cloudflare"; |
| 2 | import { PkgRegistry } from "@alchemy.run/pkg/Registry"; |
| 3 | import * as Alchemy from "alchemy"; |
| 4 | import * as ByteSize from "effect/ByteSize"; |
| 5 | import * as Config from "effect/Config"; |
| 6 | import * as Duration from "effect/Duration"; |
| 7 | import * as Effect from "effect/Effect"; |
| 8 | |
| 9 | export default Alchemy.Stack( |
| 10 | "AlchemyPkg", |
| 11 | { |
| 12 | providers: Cloudflare.providers(), |
| 13 | state: Cloudflare.state(), |
| 14 | }, |
| 15 | Effect.gen(function* () { |
| 16 | const registry = yield* PkgRegistry("Registry", { |
| 17 | worker: { |
| 18 | domain: { |
| 19 | name: "pkg.alchemy.run", |
| 20 | aliases: ["pkg.distilled.cloud", "📦.alchemy.run", "📦.distilled.cloud"], |
| 21 | }, |
| 22 | }, |
| 23 | github: { |
| 24 | appId: Config.String("GH_APP_ID"), |
| 25 | privateKey: Config.Redacted("GH_APP_PRIVATE_KEY"), |
| 26 | }, |
| 27 | policy: { |
| 28 | repos: ["alchemy-run/alchemy", "alchemy-run/distilled"], |
| 29 | ttl: Duration.weeks(1), |
| 30 | maxPackageSize: ByteSize.megabytes(100), |
| 31 | }, |
| 32 | }); |
| 33 | |
| 34 | return { |
| 35 | url: registry.url.as<string>(), |
| 36 | }; |
| 37 | }), |
| 38 | ); |