@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 42 lines 1.36 KB
Raw
1 import type * as microvms from "@distilled.cloud/aws/lambda-microvms";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { MicrovmImage } from "./MicrovmImage.ts";
5
6 export interface CreateShellAuthTokenRequest extends microvms.CreateMicrovmShellAuthTokenRequest {}
7
8 /**
9 * Runtime binding for `CreateMicrovmShellAuthToken`.
10 *
11 * Bind it to a {@link MicrovmImage} to get a callable that mints a short-lived
12 * token for interactive shell access to a running MicroVM (the MicroVM must
13 * have been run with the shell ingress connector attached).
14 * ### Auth Tokens
15 * **Example:** Mint a shell auth token
16 * ```typescript
17 * const createShellAuthToken = yield* AWS.Lambda.CreateShellAuthToken(Sandbox);
18 * const { authToken } = yield* createShellAuthToken({
19 * microvmIdentifier: vm.microvmId,
20 * expirationInMinutes: 5,
21 * });
22 * ```
23 *
24 * @binding
25 */
26 export interface CreateShellAuthToken extends Binding.Service<
27 CreateShellAuthToken,
28 "AWS.Lambda.CreateShellAuthToken",
29 (
30 image: MicrovmImage,
31 ) => Effect.Effect<
32 (
33 request: CreateShellAuthTokenRequest,
34 ) => Effect.Effect<
35 microvms.CreateMicrovmShellAuthTokenResponse,
36 microvms.CreateMicrovmShellAuthTokenError
37 >
38 >
39 > {}
40 export const CreateShellAuthToken = Binding.Service<CreateShellAuthToken>(
41 "AWS.Lambda.CreateShellAuthToken",
42 );