Skip to content
Closed
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
56 changes: 56 additions & 0 deletions schemas/aep/_base.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:wasmagent:aep:base",
"title": "AEPEnvelopeBase",
"description": "Shared base properties for all AEP evidence envelope schemas. Not registered in the schema index — intended to be composed via $ref / allOf.",
"type": "object",
"required": [
"schema_version",
"created_at_ms"
],
"properties": {
"schema_version": {
"type": "string",
"description": "Semver-like schema identifier, e.g. aep/v0.1"
},
"trace_id": {
"type": "string",
"description": "Optional correlation ID linking related evidence records"
},
"created_at_ms": {
"type": "number",
"description": "UTC epoch milliseconds when the record was created (envelope timestamp)"
},
"metadata": {
"type": "object",
"description": "Optional key-value metadata about the evidence record",
"additionalProperties": {
"type": ["string", "number", "boolean", "null", "array", "object"]
}
},
"signature": {
"type": "object",
"description": "Optional tamper-evident signature over the record content",
"required": [
"alg",
"key_id",
"sig"
],
"properties": {
"alg": {
"type": "string",
"description": "Signature algorithm, e.g. ed25519"
},
"key_id": {
"type": "string",
"description": "Identifier of the signing key"
},
"sig": {
"type": "string",
"description": "Base64-encoded signature bytes"
}
},
"additionalProperties": false
}
}
}
55 changes: 20 additions & 35 deletions schemas/aep/evidence-envelope.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,33 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://wasmagent.dev/schemas/aep/evidence-envelope.schema.json",
"title": "EvidenceEnvelope",
"description": "Shared base fields for all AEP evidence records \u2014 schema_version, trace_id, created_at_ms, and optional signature. Every evidence type $refs this schema for its envelope fields.",
"type": "object",
"required": [
"schema_version",
"created_at_ms"
],
"properties": {
"schema_version": {
"type": "string",
"description": "Semver-like schema identifier, e.g. aep/v0.1"
"description": "Shared envelope base for all AEP evidence records. Every evidence type wraps its payload in this envelope, which carries schema_version, trace_id, created_at_ms, evidence_type, payload, metadata, and an optional signature.",
"allOf": [
{
"$ref": "_base.schema.json"
},
"trace_id": {
"type": "string",
"description": "Optional correlation ID linking related evidence records"
},
"created_at_ms": {
"type": "number",
"description": "UTC epoch milliseconds when the record was created"
},
"signature": {
{
"type": "object",
"description": "Optional tamper-evident signature over the record content",
"required": [
"alg",
"key_id",
"sig"
"evidence_type",
"payload"
],
"properties": {
"alg": {
"evidence_type": {
"type": "string",
"description": "Signature algorithm, e.g. ed25519"
"description": "Discriminator for the kind of evidence enclosed, e.g. 'execution', 'artifact', 'checkpoint', 'replay', 'memory'"
},
"key_id": {
"type": "string",
"description": "Identifier of the signing key"
},
"sig": {
"type": "string",
"description": "Base64-encoded signature bytes"
"payload": {
"description": "The evidence content — structure depends on evidence_type",
"type": "object",
"properties": {
"contents": {
"description": "The primary evidence payload (opaque per evidence_type)"
}
},
"additionalProperties": true
}
},
"additionalProperties": false
}
}
}
]
}
8 changes: 8 additions & 0 deletions tests/fixtures/valid/evidence-envelope/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"schema_version": "aep/v0.1",
"trace_id": "trace-abc123",
"created_at_ms": 1737600000000,
"evidence_type": "artifact",
"payload": {
"contents": "artifact-evidence-data"
},
"metadata": {
"source": "wasmagent-js",
"correlation_tag": "run-42"
},
"signature": {
"alg": "ed25519",
"key_id": "key-001",
Expand Down
Loading