The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as GCP from "@alchemy.run/gcp"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as HttpServerResponse from "effect/http/HttpServerResponse"; |
| 4 | |
| 5 | /** |
| 6 | * A public service that returns RPC methods. Its deploy must fail with |
| 7 | * `GCP.Run.ServiceRpcPublic`. Deployed from {@link ../InvokeService.test.ts}. |
| 8 | */ |
| 9 | export default class PublicRpc extends GCP.Run.Service<PublicRpc>()( |
| 10 | "PublicRpc", |
| 11 | { |
| 12 | main: import.meta.url, |
| 13 | location: "us-central1", |
| 14 | invokerIamDisabled: true, |
| 15 | }, |
| 16 | Effect.gen(function* () { |
| 17 | return { |
| 18 | secret: () => Effect.succeed("should never be public"), |
| 19 | fetch: Effect.succeed(HttpServerResponse.text("ok")), |
| 20 | }; |
| 21 | }), |
| 22 | ) {} |