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 type * as appsignals from "@distilled.cloud/aws/application-signals"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { InstrumentationConfiguration } from "./InstrumentationConfiguration.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `GetInstrumentationConfigurationStatus` request with the configuration's |
| 8 | * identity (`InstrumentationType`/`Service`/`Environment`/`SignalType`/ |
| 9 | * `LocationIdentifier`) injected from the bound |
| 10 | * {@link InstrumentationConfiguration}. |
| 11 | */ |
| 12 | export interface GetInstrumentationConfigurationStatusRequest extends Omit< |
| 13 | appsignals.GetInstrumentationConfigurationStatusRequest, |
| 14 | "InstrumentationType" | "Service" | "Environment" | "SignalType" | "LocationIdentifier" |
| 15 | > {} |
| 16 | |
| 17 | /** |
| 18 | * Runtime binding for |
| 19 | * `application-signals:GetInstrumentationConfigurationStatus`, scoped to |
| 20 | * one {@link InstrumentationConfiguration}. |
| 21 | * |
| 22 | * Returns the status history (`READY`/`ERROR`/`ACTIVE`/`DISABLED`) that |
| 23 | * instrumented SDK agents reported for the bound configuration during a |
| 24 | * time range. Provide the implementation with |
| 25 | * `Effect.provide(AWS.ApplicationSignals.GetInstrumentationConfigurationStatusHttp)`. |
| 26 | * ### Monitoring Instrumentation |
| 27 | * **Example:** Check Whether the Probe Applied |
| 28 | * ```typescript |
| 29 | * // init — bind the operation to the configuration |
| 30 | * const getStatus = |
| 31 | * yield* AWS.ApplicationSignals.GetInstrumentationConfigurationStatus(probe); |
| 32 | * |
| 33 | * // runtime — the configuration's identity is injected automatically |
| 34 | * const result = yield* getStatus({ Status: "ACTIVE" }); |
| 35 | * yield* Effect.log(`${result.Events.length} ACTIVE events`); |
| 36 | * ``` |
| 37 | * |
| 38 | * @binding |
| 39 | */ |
| 40 | export interface GetInstrumentationConfigurationStatus extends Binding.Service< |
| 41 | GetInstrumentationConfigurationStatus, |
| 42 | "AWS.ApplicationSignals.GetInstrumentationConfigurationStatus", |
| 43 | ( |
| 44 | configuration: InstrumentationConfiguration, |
| 45 | ) => Effect.Effect< |
| 46 | ( |
| 47 | request?: GetInstrumentationConfigurationStatusRequest, |
| 48 | ) => Effect.Effect< |
| 49 | appsignals.GetInstrumentationConfigurationStatusResponse, |
| 50 | appsignals.GetInstrumentationConfigurationStatusError |
| 51 | > |
| 52 | > |
| 53 | > {} |
| 54 | |
| 55 | export const GetInstrumentationConfigurationStatus = |
| 56 | Binding.Service<GetInstrumentationConfigurationStatus>( |
| 57 | "AWS.ApplicationSignals.GetInstrumentationConfigurationStatus", |
| 58 | ); |