import * as Cause from "effect/Cause"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Ref from "effect/Ref"; import * as ServiceMap from "effect/Context"; import { type AppError } from "../app-error/index.js"; import type { PromptCancelled } from "../cli-prompt/prompt-cancelled.js"; import { TelemetryClient } from "../telemetry/index.js"; import type { TelemetryProperties } from "../telemetry/client.js"; export interface CliCommandTelemetryOptions { readonly command: string; readonly event?: string; readonly properties?: TelemetryProperties; } export declare const trackCliCommand: ({ command, event, properties, }: CliCommandTelemetryOptions) => Effect.Effect; export interface CliCommandCompletedOptions { readonly command: string; readonly result: "success" | "error" | "cancelled" | "defect"; readonly durationMs: number; readonly errorCode?: string; readonly errorCategory?: string; readonly semanticProperties?: TelemetryProperties; } export declare const trackCliCommandCompleted: (options: CliCommandCompletedOptions) => Effect.Effect; export declare const readGlobalFlagProperties: Effect.Effect<{ "cli.global.non_interactive": string; "cli.global.json": string; "cli.global.verbose": string; "cli.global.debug": string; "cli.global.quiet": string; }, never, "effect/unstable/cli/GlobalFlag/axm-non-interactive" | "effect/unstable/cli/GlobalFlag/axm-json" | "effect/unstable/cli/GlobalFlag/axm-quiet" | "effect/unstable/cli/GlobalFlag/axm-verbose" | "effect/unstable/cli/GlobalFlag/axm-debug">; export declare const reportCliError: (error: AppError | PromptCancelled, command: string) => Effect.Effect; declare const CommandSemanticProperties_base: ServiceMap.ServiceClass; }>; export declare class CommandSemanticProperties extends CommandSemanticProperties_base { } /** * Set semantic telemetry properties from within a command handler. * These properties are read by the runtime envelope and merged into * the `command_completed` event. Safe to call when the service is * absent (e.g., in tests that bypass the runtime envelope). */ export declare const setCommandSemanticProperties: (properties: TelemetryProperties) => Effect.Effect; export declare const getCommandSemanticProperties: Effect.Effect; /** * Create a Layer that provides CommandSemanticProperties backed by a fresh Ref. */ export declare const CommandSemanticPropertiesLive: Layer.Layer; export declare const reportCliDefect: (cause: Cause.Cause, command: string) => Effect.Effect; export {}; //# sourceMappingURL=telemetry.d.ts.map