@pome-sh/checks 0.3.3 → 0.3.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @pome-sh/checks
2
2
 
3
+ ## 0.3.4 — 2026-08-23
4
+
5
+ **No consumer-visible change.** Internal tracker ids were removed from comments
6
+ in the shared declaration bundler (`scripts/bundle-declarations.mjs`) and the CI
7
+ gates around it. Comment text only: the bundle's inputs, outputs and export
8
+ surface are unchanged. Listed only because that script sits on a path the next
9
+ release carries.
10
+
3
11
  ## 0.3.3 — 2026-08-22
4
12
 
5
13
  **No consumer-visible change.** The repo's top-level `examples/` directory is now
@@ -8,7 +8,7 @@
8
8
  * "pome-cloud mirrors this directory verbatim" claim, which no longer held):
9
9
  * - FORMAT schemas are canonical HERE, in `pome-sh/pome-twins`
10
10
  * `@pome-sh/shared-types` v0.5.0+ (now `@pome-sh/wire`): `span-event`, `event-schema`,
11
- * `semconv`, `nano`, `project`, `map-span`, `legacy-shim`, and the
11
+ * `semconv`, `nano`, `project`, `map-span`, and the
12
12
  * `fixtures/` corpus. pome-cloud CONSUMES this surface (FDRS-654 swaps it
13
13
  * onto the published package); it does not fork it.
14
14
  * - INGEST-side utilities are cloud-owned consumers and intentionally do NOT
@@ -21,5 +21,4 @@ export * from "./nano.js";
21
21
  export * from "./project.js";
22
22
  export * from "./span-event.js";
23
23
  export * from "./map-span.js";
24
- export * from "./legacy-shim.js";
25
24
  export * from "./event-schema.js";
@@ -5,8 +5,7 @@
5
5
  * on an `OtelSpanEvent` are PROJECTIONS of the verbatim `attributes` bag, never
6
6
  * an independent source of truth. This module is the ONE place that derivation
7
7
  * lives, so:
8
- * - the span mapper (`map-span.ts`) builds projections from `attributes`,
9
- * - the legacy shim (`legacy-shim.ts`) builds them the same way, and
8
+ * - the span mapper (`map-span.ts`) builds projections from `attributes`, and
10
9
  * - the schema (`span-event.ts`) re-derives them in a `superRefine` and
11
10
  * rejects any event whose typed fields drift from `attributes`
12
11
  * (review finding #4 — projection drift; finding #7 — centralize).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pome-sh/checks",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Pome's grading vocabulary — the check declarations, seed schemas and default seeds of all five digital twins, plus the check DSL they are written in. Declarations only: no twin server, no database, no routes, no tools.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1,105 +0,0 @@
1
- /**
2
- * otel/legacy-shim — legacy event → `OtelSpanEvent` translation (M1.2 / FDRS-481).
3
- *
4
- * The compatibility layer for the transition window: the CLI keeps uploading its
5
- * current JSONL (no flag day), and OTel-aware downstream (M3 correlation, the
6
- * native waterfall) reads `OtelSpanEvent`. This shim translates the three legacy
7
- * variants — `TwinHttpEvent`, `LlmCallEvent`, `ToolUseEvent` — up into spans so
8
- * legacy and new data share one path.
9
- *
10
- * Guarantees:
11
- * - **Lossless.** The ENTIRE original record is preserved verbatim as a JSON
12
- * string under `attributes["pome.legacy.record_json"]` — serialized from the
13
- * raw input BEFORE Zod strips any additive fields (review finding #3). The
14
- * mapped fields are ALSO written as canonical OTel attributes, from which
15
- * the typed projections are derived by the SAME projector the schema checks.
16
- * - **Deterministic.** No clock, no randomness. Same record (+ same `run_id`
17
- * option) → byte-identical span, every run.
18
- * - **OTel-correct status** (review findings #5/#9). HTTP client spans: 1xx–3xx
19
- * leave status UNSET; 4xx/5xx and transport errors are ERROR. (OTel does not
20
- * set OK on a merely-successful span.)
21
- *
22
- * IDs are namespaced `legacy:<source-id>` so a stored span always declares it
23
- * originated from a pre-OTel record (the canonical schema accepts either real
24
- * W3C ids or `legacy:` ids).
25
- *
26
- * Pinned convention: the shim targets `OTEL_GENAI_SCHEMA_VERSION` (see `./semconv`).
27
- */
28
- import { z } from "zod";
29
- import { type OtelSpanEvent } from "./span-event.js";
30
- export declare const LEGACY_SHIM_SEMCONV_VERSION: "1.42.0";
31
- export declare const LEGACY_ATTR_NAMESPACE: "pome.legacy";
32
- export declare const LEGACY_ID_PREFIX: "legacy:";
33
- export declare const shimmableLegacyEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
34
- ts: z.ZodString;
35
- run_id: z.ZodString;
36
- twin: z.ZodString;
37
- request_id: z.ZodString;
38
- correlation_id: z.ZodOptional<z.ZodString>;
39
- task_step_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
- scenario_step_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
- step_id: z.ZodNullable<z.ZodString>;
42
- tool_call_id: z.ZodNullable<z.ZodString>;
43
- method: z.ZodString;
44
- path: z.ZodString;
45
- request_body: z.ZodUnknown;
46
- request_headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
47
- tool: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
- status: z.ZodNumber;
49
- response_body: z.ZodUnknown;
50
- latency_ms: z.ZodNumber;
51
- fidelity: z.ZodEnum<{
52
- semantic: "semantic";
53
- unsupported: "unsupported";
54
- }>;
55
- state_mutation: z.ZodBoolean;
56
- state_delta: z.ZodNullable<z.ZodObject<{
57
- before: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
58
- after: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
59
- }, z.core.$strip>>;
60
- idempotency_dedupe: z.ZodOptional<z.ZodBoolean>;
61
- error: z.ZodNullable<z.ZodString>;
62
- kind: z.ZodLiteral<"TwinHttpEvent">;
63
- event_id: z.ZodString;
64
- parent_event_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
- parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
- }, z.core.$strip>, z.ZodObject<{
67
- kind: z.ZodLiteral<"LlmCallEvent">;
68
- host: z.ZodString;
69
- port: z.ZodNumber;
70
- latency_ms: z.ZodNumber;
71
- bytes_in: z.ZodNumber;
72
- bytes_out: z.ZodNumber;
73
- url: z.ZodNullable<z.ZodString>;
74
- method: z.ZodNullable<z.ZodString>;
75
- status: z.ZodNullable<z.ZodNumber>;
76
- model: z.ZodNullable<z.ZodString>;
77
- prompt_tokens: z.ZodNullable<z.ZodNumber>;
78
- completion_tokens: z.ZodNullable<z.ZodNumber>;
79
- cost_usd: z.ZodNullable<z.ZodNumber>;
80
- ts: z.ZodString;
81
- event_id: z.ZodString;
82
- parent_event_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
- parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
- }, z.core.$strip>, z.ZodObject<{
85
- kind: z.ZodLiteral<"ToolUseEvent">;
86
- tool_use_id: z.ZodString;
87
- tool_name: z.ZodString;
88
- input: z.ZodUnknown;
89
- ts: z.ZodString;
90
- event_id: z.ZodString;
91
- parent_event_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
- parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
- }, z.core.$strip>], "kind">;
94
- export type ShimmableLegacyEvent = z.infer<typeof shimmableLegacyEventSchema>;
95
- export interface LegacyShimOptions {
96
- run_id?: string;
97
- }
98
- /**
99
- * Translate a single legacy `TwinHttpEvent` / `LlmCallEvent` / `ToolUseEvent`
100
- * into a validated `OtelSpanEvent`.
101
- *
102
- * Throws a typed `ZodError` if `rawRecord` is not one of those three shapes,
103
- * or a plain `Error` if an LLM/tool record is missing the required `run_id`.
104
- */
105
- export declare function shimLegacyEventToSpan(rawRecord: unknown, options?: LegacyShimOptions): OtelSpanEvent;