import { z } from 'zod'; /** * The signals dimension vocabulary (#1231) — the one set of names every * observability-facing fact is stamped with, defined once so that every chart, * list, graph node and failure record means the same thing by `version`, and an * aggregate anywhere can click through to its exemplars with filters intact. * * What each dimension names, precisely: * * - `tenant` / `scope` — the branded directory ids, exactly as the spine stamps * them on every event. * - `vertical` — the vertical's package name (`@substrat-run/demo-ticket0`), * the registry's identity for it. * - `version` — the version REGISTRY id (ULID) of the vertical version the fact * was recorded under. The id, not the human version label: the label is one * `getVersion` away, while the id survives channels, previews and re-releases * of the same label. For a record written outside any deploy the stamp is the * version bound to the scope at write time — stated here because it is an * approximation everywhere the writer is not the deploy itself. * - `operation` — the operation on whose behalf the work ran: a vertical's * operation name (`ticket0/answer`) for scope-side facts, the platform * operation string (`preview.create`, `intent.connector:scrive`) for * control-plane facts. * - `eventType` — a DOMAIN event type (`receipt.landed`), never the Workers * invocation shape (fetch/rpc/scheduled/alarm); the observability seam names * that `invocation` so the two can never be confused in a filter. * - `connection` — the connection id (ULID), not the provider slug: a tenant can * hold two connections to one provider, and the slug cannot tell them apart. * * `modelAttribution` (model-usage.ts) predates this vocabulary and stays its own * frozen five-key shape — the smallest per-request metadata limit among model * providers fixes it at five, so it is deliberately NOT widened to this schema; * a signals reader reconciles it at read time. */ export declare const SIGNAL_DIMENSIONS: readonly ['tenant', 'scope', 'vertical', 'version', 'operation', 'eventType', 'connection']; export type SignalDimension = (typeof SIGNAL_DIMENSIONS)[number]; /** * A partial stamp: the dimensions one durable record carries. Every key is * optional — a record states what it knows and nothing else — but `.strict()`, * so an eighth dimension cannot drift in through a stamp; widening the * vocabulary is an edit HERE, read in a PR diff, or nowhere. */ export declare const signalStamp: z.ZodObject<{ tenant: z.ZodOptional>; scope: z.ZodOptional>; vertical: z.ZodOptional; version: z.ZodOptional; operation: z.ZodOptional; eventType: z.ZodOptional; connection: z.ZodOptional>; }, z.core.$strict>; export type SignalStamp = z.infer; /** * What one deployed SERVICE (a Cloudflare script ref) means in signal dimensions — * the service→(vertical, version) join, answered by the control plane's * `GET /service-refs` so every consumer (dashboard, console, CLI, the signals * views) gets the same answer instead of each re-deriving it (#1231's last item). * * `stamp.version` is the registry ULID, per this file's rule; the HUMAN label * rides beside the stamp rather than inside it — `signalStamp` is `.strict()` * precisely so a display concern cannot drift into the dimension vocabulary. * `versionLabel` is null where the directory cannot name one (a serving ref * bound to a scope whose version the registry no longer lists). * * `role` names which ref scheme this service is — the per-version archive * script or the stable serving script — because conflating the two is the * mistake that made the dashboard's per-version view read empty once already. */ export declare const serviceDimensions: z.ZodObject<{ service: z.ZodString; role: z.ZodEnum<{ archive: "archive"; serving: "serving"; }>; stamp: z.ZodObject<{ tenant: z.ZodOptional>; scope: z.ZodOptional>; vertical: z.ZodOptional; version: z.ZodOptional; operation: z.ZodOptional; eventType: z.ZodOptional; connection: z.ZodOptional>; }, z.core.$strict>; versionLabel: z.ZodNullable; }, z.core.$strip>; export type ServiceDimensions = z.infer; //# sourceMappingURL=signals.d.ts.map