Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@

## Unreleased

## 0.1.0-alpha.3 - 2026-09-07

### Fixed

- The Python `EvidenceAccumulator` deadlocked forever if `append` or `seal` was
called reentrantly on the same thread, for example from inside a
`durable_append` callback. Both now raise `EvidenceError`, matching the
TypeScript SDK's existing protection. `snapshot` remains safely callable
reentrantly.
- Patch four `fast-uri` advisories in the TypeScript lockfile and stop tag
interpolation in `release.yml`.
- `test_trace_adapter_refusals` used a duck-typed signer double, which
`agentrust-trace` 0.10.0 rejects. It now builds a real `Ed25519PrivateKey`, so
a clean install of this release runs the full suite against either 0.9 or
0.10.

### Changed

- Install CI dependencies from hash-pinned lock files, and add `actionlint`
plus a test-environment guard to the workflow gates.

## 0.1.0-alpha.2 - 2026-09-02

- Align the wire `spec_version` with `spec/VERSION`; the schema previously
Expand Down Expand Up @@ -32,9 +53,5 @@
cross-language JSON behavior.
- Add the pre-alpha TypeScript reference SDK and shared conformance gates.

- Initial `0.1.0-alpha.2` event contract and conformance fixtures.
- Initial `0.1.0-alpha.1` event contract and conformance fixtures.
- Initial Python reference SDK with schema/privacy validation and OTel span-event projection.

### Fixed

- the Python `EvidenceAccumulator` deadlocked forever if `append` or`seal` was called reentrantly on the same thread (for example, from inside a `durable_append` callback). It now raises `EvidenceError` instead, matching the TypeScript SDK's existing reentrancy protection. `snapshot` remains safely callable reentrantly.
2 changes: 1 addition & 1 deletion LIMITATIONS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Limitations

Current `0.1.0-alpha.2` limitations:
Current `0.1.0-alpha.3` limitations:

- The contract and SDK are experimental and may change incompatibly.
- A Python reference SDK and a TypeScript reference SDK (`packages/typescript/`)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Portable governance telemetry and verifiable evidence for AI-agent runtimes.

This repository defines a backend-neutral contract for policy decisions, approval lifecycles, usage, classified data flows, and evidence lifecycle events. It composes with OpenTelemetry; it is not a tracing backend, policy engine, agent framework, or dashboard.

> **Status:** alpha contract `0.1.0-alpha.2`. No stable SDK API or compatibility guarantee exists yet.
> **Status:** alpha contract `0.1.0-alpha.3`. No stable SDK API or compatibility guarantee exists yet.

## Why

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Include the affected contract/SDK version, an executable reproducer where safe,

## Supported versions

No stable release exists. Only the latest `0.1.0-alpha.2` revision will receive fixes until the first published release.
No stable release exists. Only the latest `0.1.0-alpha.3` revision will receive fixes until the first published release.

## Runtime boundary

Expand Down
6 changes: 3 additions & 3 deletions VERSIONING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ The telemetry contract uses semantic versioning independently from SDK versions,
- Minor: backward-compatible optional field, event, or enum addition with defined older-consumer behavior.
- Major: removal, changed meaning, new required field, or incompatible canonicalization.

The current contract version is `0.1.0-alpha.2`. Python publishes the equivalent
PEP 440 version `0.1.0a2`; npm and the Git tag use `0.1.0-alpha.2` and
`v0.1.0-alpha.2`. Pre-1.0 changes may be incompatible and must be called out
The current contract version is `0.1.0-alpha.3`. Python publishes the equivalent
PEP 440 version `0.1.0a3`; npm and the Git tag use `0.1.0-alpha.3` and
`v0.1.0-alpha.3`. Pre-1.0 changes may be incompatible and must be called out
explicitly.

Published GitHub releases are the sole release trigger. The release tag must
Expand Down
2 changes: 1 addition & 1 deletion compatibility/golden/event-factory.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"agent-1","event_id":"018f0f7d-7a13-7cc2-8000-000000000042","event_type":"usage.recorded","input_tokens":7,"operation":"chat","producer":{"name":"parity-test","version":"1.0.0"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.2","time_unix_nano":"1787079000000000000","workflow_id":"workflow-1"}
{"agent_id":"agent-1","event_id":"018f0f7d-7a13-7cc2-8000-000000000042","event_type":"usage.recorded","input_tokens":7,"operation":"chat","producer":{"name":"parity-test","version":"1.0.0"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.3","time_unix_nano":"1787079000000000000","workflow_id":"workflow-1"}
6 changes: 3 additions & 3 deletions compatibility/golden/evidence-chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"fixture": "policy-decision.json",
"sequence": 0,
"previous_digest": null,
"digest": "0945b180ca030d80fdb4d2b9079705da41aa374335e8b9de87bcd754ef5344a4"
"digest": "9d93daf8fcfb51b24a68dc108afb474fc4c89a9c3f3716bd13172e2799f099a2"
},
{
"fixture": "usage.json",
"sequence": 1,
"previous_digest": "0945b180ca030d80fdb4d2b9079705da41aa374335e8b9de87bcd754ef5344a4",
"digest": "f5e87ab1b72a6b677dd91870bb15cc9248f7a8a3bc95d8c7867abc9df32c030f"
"previous_digest": "9d93daf8fcfb51b24a68dc108afb474fc4c89a9c3f3716bd13172e2799f099a2",
"digest": "62bdbda86c79281c0cae240abf2fa901b70d9bb407da9021e713e80358d6c7b5"
}
]
}
2 changes: 1 addition & 1 deletion conformance/fixtures/invalid/action-without-digest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"spec_version": "0.1.0-alpha.2",
"spec_version": "0.1.0-alpha.3",
"event_id": "018f0f7d-7a13-7cc2-8000-000000000096",
"event_type": "action.executed",
"time_unix_nano": "1787079650000000000",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"agent-1","cost":{"amount":1,"currency":"USD","source":"aggregate"},"event_id":"018f0f7d-7a13-7cc2-8000-000000000009","event_type":"usage.recorded","operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.2","time_unix_nano":"1"}
{"agent_id":"agent-1","cost":{"amount":1,"currency":"USD","source":"aggregate"},"event_id":"018f0f7d-7a13-7cc2-8000-000000000009","event_type":"usage.recorded","operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.3","time_unix_nano":"1"}
2 changes: 1 addition & 1 deletion conformance/fixtures/invalid/model-call-with-rollup.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"agent-1","aggregation":{"cost_coverage":0,"cost_sources":[],"event_count":1,"method":"sum","token_coverage":{"input_tokens":1}},"event_id":"018f0f7d-7a13-7cc2-8000-000000000010","event_type":"usage.recorded","input_tokens":1,"operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.2","time_unix_nano":"1"}
{"agent_id":"agent-1","aggregation":{"cost_coverage":0,"cost_sources":[],"event_count":1,"method":"sum","token_coverage":{"input_tokens":1}},"event_id":"018f0f7d-7a13-7cc2-8000-000000000010","event_type":"usage.recorded","input_tokens":1,"operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.3","time_unix_nano":"1"}
2 changes: 1 addition & 1 deletion conformance/fixtures/invalid/numeric-timestamp.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"agent-1","event_id":"018f0f7d-7a13-7cc2-8000-000000000011","event_type":"usage.recorded","input_tokens":1,"operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.2","time_unix_nano":1787079700000000000}
{"agent_id":"agent-1","event_id":"018f0f7d-7a13-7cc2-8000-000000000011","event_type":"usage.recorded","input_tokens":1,"operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.3","time_unix_nano":1787079700000000000}
2 changes: 1 addition & 1 deletion conformance/fixtures/invalid/raw-content.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"spiffe://example.test/agent/coder","event_id":"018f0f7d-7a13-7cc2-8000-000000000006","event_type":"usage.recorded","input_tokens":10,"operation":"chat","producer":{"name":"bad-adapter","version":"0.1.0"},"prompt":"copy the production credential","run_id":"run-unsafe","scope":"model_call","spec_version":"0.1.0-alpha.2","time_unix_nano":"1787079700000000000"}
{"agent_id":"spiffe://example.test/agent/coder","event_id":"018f0f7d-7a13-7cc2-8000-000000000006","event_type":"usage.recorded","input_tokens":10,"operation":"chat","producer":{"name":"bad-adapter","version":"0.1.0"},"prompt":"copy the production credential","run_id":"run-unsafe","scope":"model_call","spec_version":"0.1.0-alpha.3","time_unix_nano":"1787079700000000000"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"agent-1","event_id":"018f0f7d-7a13-7cc2-8000-000000000008","event_type":"usage.recorded","operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.2","time_unix_nano":"1"}
{"agent_id":"agent-1","event_id":"018f0f7d-7a13-7cc2-8000-000000000008","event_type":"usage.recorded","operation":"chat","producer":{"name":"test","version":"1"},"run_id":"run-1","scope":"model_call","spec_version":"0.1.0-alpha.3","time_unix_nano":"1"}
2 changes: 1 addition & 1 deletion conformance/fixtures/invalid/zero-trace-id.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"action_type":"repository.read","agent_id":"agent-1","decision":"allow","enforcement_mode":"enforce","evaluation_duration_ns":1,"event_id":"018f0f7d-7a13-7cc2-8000-000000000007","event_type":"policy.decision","policy":{"engine":"opa","engine_version":"1.0"},"producer":{"name":"test","version":"1"},"resource_type":"repository","run_id":"run-1","spec_version":"0.1.0-alpha.2","time_unix_nano":"1","trace_id":"00000000000000000000000000000000"}
{"action_type":"repository.read","agent_id":"agent-1","decision":"allow","enforcement_mode":"enforce","evaluation_duration_ns":1,"event_id":"018f0f7d-7a13-7cc2-8000-000000000007","event_type":"policy.decision","policy":{"engine":"opa","engine_version":"1.0"},"producer":{"name":"test","version":"1"},"resource_type":"repository","run_id":"run-1","spec_version":"0.1.0-alpha.3","time_unix_nano":"1","trace_id":"00000000000000000000000000000000"}
2 changes: 1 addition & 1 deletion conformance/fixtures/valid/action.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"spec_version": "0.1.0-alpha.2",
"spec_version": "0.1.0-alpha.3",
"event_id": "018f0f7d-7a13-7cc2-8000-000000000006",
"event_type": "action.executed",
"time_unix_nano": "1787079650000000000",
Expand Down
2 changes: 1 addition & 1 deletion conformance/fixtures/valid/approval.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"action_digest":{"algorithm":"sha256","value":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"},"actor_id":"reviewer-7d91","actor_type":"human","agent_id":"spiffe://example.test/agent/coder","approval_id":"approval-001","event_id":"018f0f7d-7a13-7cc2-8000-000000000002","event_type":"approval.approved","producer":{"name":"example-approval-adapter","version":"0.1.0"},"requested_at_unix_nano":"1787079500000000000","run_id":"run-governed-sdlc-001","span_id":"00f067aa0ba902b7","spec_version":"0.1.0-alpha.2","time_unix_nano":"1787079580000000000","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736"}
{"action_digest":{"algorithm":"sha256","value":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"},"actor_id":"reviewer-7d91","actor_type":"human","agent_id":"spiffe://example.test/agent/coder","approval_id":"approval-001","event_id":"018f0f7d-7a13-7cc2-8000-000000000002","event_type":"approval.approved","producer":{"name":"example-approval-adapter","version":"0.1.0"},"requested_at_unix_nano":"1787079500000000000","run_id":"run-governed-sdlc-001","span_id":"00f067aa0ba902b7","spec_version":"0.1.0-alpha.3","time_unix_nano":"1787079580000000000","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736"}
2 changes: 1 addition & 1 deletion conformance/fixtures/valid/data-flow.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"spiffe://example.test/agent/architect","classification":{"producer":"example-dlp","taxonomy":"example.enterprise.v1","value":"confidential"},"content_digest":{"algorithm":"sha256","value":"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"},"destination":{"id":"architecture-agent","kind":"agent"},"direction":"read","event_id":"018f0f7d-7a13-7cc2-8000-000000000004","event_type":"data_flow.observed","policy_decision":"allow","producer":{"name":"example-dataflow-adapter","version":"0.1.0"},"purpose":"generate_architecture","run_id":"run-governed-sdlc-001","size_bytes":18342,"source":{"id":"requirements-graph","kind":"knowledge_graph"},"spec_version":"0.1.0-alpha.2","time_unix_nano":"1787079400000000000","transformation":"metadata_only"}
{"agent_id":"spiffe://example.test/agent/architect","classification":{"producer":"example-dlp","taxonomy":"example.enterprise.v1","value":"confidential"},"content_digest":{"algorithm":"sha256","value":"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"},"destination":{"id":"architecture-agent","kind":"agent"},"direction":"read","event_id":"018f0f7d-7a13-7cc2-8000-000000000004","event_type":"data_flow.observed","policy_decision":"allow","producer":{"name":"example-dataflow-adapter","version":"0.1.0"},"purpose":"generate_architecture","run_id":"run-governed-sdlc-001","size_bytes":18342,"source":{"id":"requirements-graph","kind":"knowledge_graph"},"spec_version":"0.1.0-alpha.3","time_unix_nano":"1787079400000000000","transformation":"metadata_only"}
2 changes: 1 addition & 1 deletion conformance/fixtures/valid/evidence.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"capture_profile":"metadata_only","chain_digest":{"algorithm":"sha256","value":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"},"completeness":"complete","event_id":"018f0f7d-7a13-7cc2-8000-000000000005","event_type":"evidence.run_closed","producer":{"name":"agentrust-telemetry","version":"0.1.0-alpha.2"},"run_id":"run-governed-sdlc-001","sequence":14,"spec_version":"0.1.0-alpha.2","time_unix_nano":"1787079700000000000"}
{"capture_profile":"metadata_only","chain_digest":{"algorithm":"sha256","value":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"},"completeness":"complete","event_id":"018f0f7d-7a13-7cc2-8000-000000000005","event_type":"evidence.run_closed","producer":{"name":"agentrust-telemetry","version":"0.1.0-alpha.3"},"run_id":"run-governed-sdlc-001","sequence":14,"spec_version":"0.1.0-alpha.3","time_unix_nano":"1787079700000000000"}
2 changes: 1 addition & 1 deletion conformance/fixtures/valid/policy-decision.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"action_type":"repository.write","agent_id":"spiffe://example.test/agent/coder","decision":"deny","enforcement_mode":"enforce","evaluation_duration_ns":182000,"event_id":"018f0f7d-7a13-7cc2-8000-000000000001","event_type":"policy.decision","policy":{"bundle_digest":{"algorithm":"sha256","value":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"engine":"cedar","engine_version":"4.3.0","policy_id":"repo-write"},"producer":{"name":"example-policy-adapter","version":"0.1.0"},"reason_codes":["BRANCH_PROTECTED"],"resource_type":"git.repository","run_id":"run-governed-sdlc-001","span_id":"00f067aa0ba902b7","spec_version":"0.1.0-alpha.2","time_unix_nano":"1787079600000000000","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","workflow_id":"workflow-build-feature"}
{"action_type":"repository.write","agent_id":"spiffe://example.test/agent/coder","decision":"deny","enforcement_mode":"enforce","evaluation_duration_ns":182000,"event_id":"018f0f7d-7a13-7cc2-8000-000000000001","event_type":"policy.decision","policy":{"bundle_digest":{"algorithm":"sha256","value":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},"engine":"cedar","engine_version":"4.3.0","policy_id":"repo-write"},"producer":{"name":"example-policy-adapter","version":"0.1.0"},"reason_codes":["BRANCH_PROTECTED"],"resource_type":"git.repository","run_id":"run-governed-sdlc-001","span_id":"00f067aa0ba902b7","spec_version":"0.1.0-alpha.3","time_unix_nano":"1787079600000000000","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","workflow_id":"workflow-build-feature"}
2 changes: 1 addition & 1 deletion conformance/fixtures/valid/usage.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"agent_id":"spiffe://example.test/agent/coder","cost":{"amount":0.0124,"currency":"USD","pricing_version":"provider-2026-08-01","source":"provider"},"event_id":"018f0f7d-7a13-7cc2-8000-000000000003","event_type":"usage.recorded","input_tokens":4200,"operation":"chat","output_tokens":812,"producer":{"name":"example-usage-adapter","version":"0.1.0"},"provider":"example-ai","request_model":"example-model-2","run_id":"run-governed-sdlc-001","scope":"model_call","spec_version":"0.1.0-alpha.2","time_unix_nano":"1787079590000000000","workflow_id":"workflow-build-feature"}
{"agent_id":"spiffe://example.test/agent/coder","cost":{"amount":0.0124,"currency":"USD","pricing_version":"provider-2026-08-01","source":"provider"},"event_id":"018f0f7d-7a13-7cc2-8000-000000000003","event_type":"usage.recorded","input_tokens":4200,"operation":"chat","output_tokens":812,"producer":{"name":"example-usage-adapter","version":"0.1.0"},"provider":"example-ai","request_model":"example-model-2","run_id":"run-governed-sdlc-001","scope":"model_call","spec_version":"0.1.0-alpha.3","time_unix_nano":"1787079590000000000","workflow_id":"workflow-build-feature"}
2 changes: 1 addition & 1 deletion docs/evidence-chain.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Evidence chain profile

Status: experimental `rfc8785-jcs-v1` for contract `0.1.0-alpha.2`.
Status: experimental `rfc8785-jcs-v1` for contract `0.1.0-alpha.3`.

Each accepted event is validated and privacy-checked before entering the chain.
Sequence numbers start at zero and represent acceptance order, not event time.
Expand Down
2 changes: 1 addition & 1 deletion docs/otel-genai-compatibility.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenTelemetry GenAI compatibility

Status: pinned compatibility assessment for AgentTrust contract `0.1.0-alpha.2`.
Status: pinned compatibility assessment for AgentTrust contract `0.1.0-alpha.3`.

The machine-readable matrix is [`compatibility/otel-genai.json`](../compatibility/otel-genai.json).
It is pinned to OpenTelemetry's dedicated GenAI semantic-conventions repository
Expand Down
2 changes: 1 addition & 1 deletion docs/otel-projection.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenTelemetry projection profile

Status: experimental for contract `0.1.0-alpha.2`.
Status: experimental for contract `0.1.0-alpha.3`.

The normalized JSON event is the source contract. OpenTelemetry is a projection, not an alternative event model.

Expand Down
2 changes: 1 addition & 1 deletion examples/manual_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def emit(self, record):


event = {
"spec_version": "0.1.0-alpha.2",
"spec_version": "0.1.0-alpha.3",
"event_id": str(uuid.uuid4()),
"event_type": "policy.decision",
"time_unix_nano": str(time.time_ns()),
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `@agentrust-io/telemetry`

TypeScript reference SDK for the AgentTrust Telemetry `0.1.0-alpha.2` contract.
TypeScript reference SDK for the AgentTrust Telemetry `0.1.0-alpha.3` contract.

This alpha Node package validates the same closed schemas and metadata-only
privacy profile as the Python SDK. It supplies event construction, caller-owned
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agentrust-io/telemetry",
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"description": "TypeScript reference SDK for AgentTrust governance telemetry",
"keywords": ["ai-agents", "governance", "opentelemetry", "observability", "telemetry"],
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/schemas/envelope.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "object",
"required": ["spec_version", "event_id", "event_type", "time_unix_nano", "run_id", "producer"],
"properties": {
"spec_version": {"const": "0.1.0-alpha.2"},
"spec_version": {"const": "0.1.0-alpha.3"},
"event_id": {"$ref": "common.schema.json#/$defs/event_id"},
"event_type": {"type": "string", "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$", "maxLength": 128},
"time_unix_nano": {"$ref": "common.schema.json#/$defs/time_unix_nano"},
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class EventFactory {
if (collisions.length) throw new Error(`payload cannot override envelope fields: ${collisions.join(", ")}`);
const normalizedPayload = Object.fromEntries(Object.entries(payload).map(([key, value]) => [key, key.endsWith("_at_unix_nano") ? unixNano(value) : value]));
const event = {
spec_version: "0.1.0-alpha.2" as const,
spec_version: "0.1.0-alpha.3" as const,
event_id: fields.eventId ?? this.eventIdFactory(), event_type: eventType,
time_unix_nano: unixNano(fields.timeUnixNano ?? this.clockNs()),
run_id: fields.runId, producer: structuredClone(this.#producer), ...normalizedPayload,
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export type Scalar = string | number | boolean;
export type NormalizedEvent = Record<string, unknown> & {
spec_version: "0.1.0-alpha.2";
spec_version: "0.1.0-alpha.3";
event_id: string;
event_type: string;
time_unix_nano: string;
Expand Down
Loading