@bli-cockpit/telemetry-core 0.1.93 → 0.1.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,16 @@ export declare const MEMORY_HOOK_CACHE_OUTCOMES: readonly ["hit", "miss", "share
14
14
  export type MemoryHookCacheOutcome = (typeof MEMORY_HOOK_CACHE_OUTCOMES)[number];
15
15
  export declare const MEMORY_HOOK_SAMPLE_OUTCOMES: readonly ["printed", "empty", "timeouts", "failed", "skipped"];
16
16
  export type MemoryHookSampleOutcome = (typeof MEMORY_HOOK_SAMPLE_OUTCOMES)[number];
17
+ export declare const MemoryHookServerTimingsSchema: z.ZodObject<{
18
+ gate_ms: z.ZodOptional<z.ZodNumber>;
19
+ alias_ms: z.ZodOptional<z.ZodNumber>;
20
+ embed_ms: z.ZodOptional<z.ZodNumber>;
21
+ memory_ms: z.ZodOptional<z.ZodNumber>;
22
+ tower_ms: z.ZodOptional<z.ZodNumber>;
23
+ person_ms: z.ZodOptional<z.ZodNumber>;
24
+ total_ms: z.ZodOptional<z.ZodNumber>;
25
+ }, z.core.$strict>;
26
+ export type MemoryHookServerTimings = z.infer<typeof MemoryHookServerTimingsSchema>;
17
27
  export declare const MemoryHookSampleSchema: z.ZodObject<{
18
28
  schema_version: z.ZodLiteral<"memory-hook-sample.v1">;
19
29
  recorded_at: z.ZodString;
@@ -32,6 +42,15 @@ export declare const MemoryHookSampleSchema: z.ZodObject<{
32
42
  shared: "shared";
33
43
  }>;
34
44
  producer_version: z.ZodString;
45
+ server_timings: z.ZodOptional<z.ZodObject<{
46
+ gate_ms: z.ZodOptional<z.ZodNumber>;
47
+ alias_ms: z.ZodOptional<z.ZodNumber>;
48
+ embed_ms: z.ZodOptional<z.ZodNumber>;
49
+ memory_ms: z.ZodOptional<z.ZodNumber>;
50
+ tower_ms: z.ZodOptional<z.ZodNumber>;
51
+ person_ms: z.ZodOptional<z.ZodNumber>;
52
+ total_ms: z.ZodOptional<z.ZodNumber>;
53
+ }, z.core.$strict>>;
35
54
  }, z.core.$strict>;
36
55
  export type MemoryHookSample = z.infer<typeof MemoryHookSampleSchema>;
37
56
  export declare const MemoryHookSamplingLeaseSchema: z.ZodObject<{
@@ -33,6 +33,24 @@ const SemverSchema = z
33
33
  .min(1)
34
34
  .max(40)
35
35
  .regex(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:0|[1-9A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9A-Za-z-][0-9A-Za-z-]*))*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u);
36
+ /**
37
+ * BLI-23554: the door's own phase times for one answered call (its `timings`
38
+ * object), so a slow call's phase is recorded rather than inferred. Durations
39
+ * only, closed keys; a call that timed out never got an answer and has none.
40
+ */
41
+ const PhaseMsSchema = z.number().finite().int().nonnegative().max(60_000);
42
+ export const MemoryHookServerTimingsSchema = z
43
+ .object({
44
+ gate_ms: PhaseMsSchema,
45
+ alias_ms: PhaseMsSchema,
46
+ embed_ms: PhaseMsSchema,
47
+ memory_ms: PhaseMsSchema,
48
+ tower_ms: PhaseMsSchema,
49
+ person_ms: PhaseMsSchema,
50
+ total_ms: PhaseMsSchema,
51
+ })
52
+ .partial()
53
+ .strict();
36
54
  export const MemoryHookSampleSchema = z
37
55
  .object({
38
56
  schema_version: z.literal(MEMORY_HOOK_SAMPLE_SCHEMA_VERSION),
@@ -41,6 +59,8 @@ export const MemoryHookSampleSchema = z
41
59
  outcome: SampleOutcomeSchema,
42
60
  embed_cache: CacheOutcomeSchema,
43
61
  producer_version: SemverSchema,
62
+ /** Optional so samples written before BLI-23554 still parse. */
63
+ server_timings: MemoryHookServerTimingsSchema.optional(),
44
64
  })
45
65
  .strict();
46
66
  export const MemoryHookSamplingLeaseSchema = z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/telemetry-core",
3
- "version": "0.1.93",
3
+ "version": "0.1.94",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",