The best way to control Claude Code, Codex and more from any computer or phone

main
ts 38 lines 1.27 KB
Raw
1 import type * as sfn from "@distilled.cloud/aws/sfn";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { StateMachine } from "./StateMachine.ts";
5
6 export interface DescribeExecutionRequest extends sfn.DescribeExecutionInput {}
7
8 /**
9 * Runtime binding for `states:DescribeExecution`.
10 *
11 * Bind this operation to a {@link StateMachine} inside a function runtime to
12 * poll the status and output of that machine's executions. IAM access is
13 * scoped to executions of the bound state machine.
14 * ### Polling Executions
15 * **Example:** Check an execution's status
16 * ```typescript
17 * const describeExecution = yield* StepFunctions.DescribeExecution(machine);
18 *
19 * const execution = yield* describeExecution({ executionArn });
20 * // execution.status: "RUNNING" | "SUCCEEDED" | "FAILED" | ...
21 * ```
22 *
23 * @binding
24 */
25 export interface DescribeExecution extends Binding.Service<
26 DescribeExecution,
27 "AWS.StepFunctions.DescribeExecution",
28 (
29 stateMachine: StateMachine,
30 ) => Effect.Effect<
31 (
32 request: DescribeExecutionRequest,
33 ) => Effect.Effect<sfn.DescribeExecutionOutput, sfn.DescribeExecutionError>
34 >
35 > {}
36 export const DescribeExecution = Binding.Service<DescribeExecution>(
37 "AWS.StepFunctions.DescribeExecution",
38 );