@company-semantics/contracts 0.137.0 → 0.138.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.137.0",
3
+ "version": "0.138.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -612,3 +612,7 @@ export type {
612
612
  RequestDescriptor,
613
613
  SchedulerEvent,
614
614
  } from './requests'
615
+
616
+ // Observability envelope types (shared metric shape)
617
+ export { REQUEST_ID_HEADER } from './observability'
618
+ export type { Labels, MetricEnvelope, SchedulerMetricName } from './observability'
@@ -0,0 +1,16 @@
1
+ export const REQUEST_ID_HEADER = 'x-request-id';
2
+
3
+ export type Labels = Record<string, string>;
4
+ export type MetricEnvelope =
5
+ | { kind: 'counter'; name: string; value: number; labels?: Labels; ts: number }
6
+ | { kind: 'gauge'; name: string; value: number; labels?: Labels; ts: number }
7
+ | { kind: 'histogram'; name: string; value: number; labels?: Labels; ts: number };
8
+
9
+ export type SchedulerMetricName =
10
+ | 'scheduler.inflight_requests'
11
+ | 'scheduler.queue_depth'
12
+ | 'scheduler.queue_wait_ms'
13
+ | 'scheduler.dedupe_hits'
14
+ | 'scheduler.heap_used_bytes'
15
+ | 'scheduler.rss_bytes'
16
+ | 'scheduler.fetch_latency_ms';