@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, 06:00 UTC

main
ts 36 lines 1.18 KB
Raw
1 import type * as deadline from "@distilled.cloud/aws/deadline";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Queue } from "./Queue.ts";
5
6 /**
7 * Runtime binding for `deadline:GetSession`.
8 *
9 * Reads a worker session's detail for a job in the bound {@link Queue} —
10 * lifecycle status, host properties, worker log configuration. The queue's
11 * `farmId`/`queueId` are injected from the binding. Provide the
12 * implementation with `Effect.provide(AWS.Deadline.GetSessionHttp)`.
13 * ### Monitoring Sessions
14 * **Example:** Inspect A Session
15 * ```typescript
16 * // init — bind the operation to the queue
17 * const getSession = yield* AWS.Deadline.GetSession(queue);
18 *
19 * // runtime
20 * const session = yield* getSession({ jobId, sessionId });
21 * ```
22 *
23 * @binding
24 */
25 export interface GetSession extends Binding.Service<
26 GetSession,
27 "AWS.Deadline.GetSession",
28 (
29 queue: Queue,
30 ) => Effect.Effect<
31 (
32 request: Omit<deadline.GetSessionRequest, "farmId" | "queueId">,
33 ) => Effect.Effect<deadline.GetSessionResponse, deadline.GetSessionError>
34 >
35 > {}
36 export const GetSession = Binding.Service<GetSession>("AWS.Deadline.GetSession");