Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import z from "zod";
/**
* Telemetry-instrument declarations. The host pre-registers each named
* counter/histogram/gauge so plugin code can emit without first
* round-tripping through a registration call.
*/
const instrumentSchema = z.object({
name: z.string().min(1),
labels: z.array(z.string().min(1)).readonly().optional(),
});
export const telemetrySchema = z.object({
metricPrefix: z.string().min(1).optional(),
spanPrefix: z.string().min(1).optional(),
counters: z.array(instrumentSchema).readonly().optional(),
histograms: z.array(instrumentSchema).readonly().optional(),
gauges: z.array(instrumentSchema).readonly().optional(),
});
export type Telemetry = z.infer<typeof telemetrySchema>;