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
98 changes: 96 additions & 2 deletions SPECIFICATION.md

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@
"format": "uri",
"pattern": "^https://",
"description": "HTTPS URL of the click-token resolution endpoint operated by or for this participant. Valid on agent and platform manifests. Destinations resolve ctx_iss to this manifest and present the token here. (Section 7.4)"
},
"coverage": {
"type": "object",
"description": "Per-event-type coverage declaration, a map from event type to a mode object. A claim subject to the rules of section 5.7.6: complete asserts every qualifying occurrence within the declared relationship scope is emitted. (Sections 8.5, 5.7.6)",
"additionalProperties": {
"type": "object",
"required": ["mode"],
"properties": {
"mode": {
"type": "string",
"enum": ["complete", "sampled", "aggregated", "selected"],
"description": "Coverage mode (section 5.7.6)"
},
"terms_ref": {
"type": ["string", "null"],
"description": "Reference to the terms stating the sampling, aggregation or selection rule and the relationship scope (section 5.2.4)"
}
}
}
}
},
"description": "Telemetry endpoint declaration. (Section 8.5)"
Expand Down
4 changes: 4 additions & 0 deletions telemetry-event-batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"format": "date-time",
"description": "Session start timestamp (UTC). Mirrors the session-level started_at field. REQUIRED for emitters at Grounding conformance or above when using event batch delivery."
},
"manifest_ref": {
"type": ["string", "null"],
"description": "Manifest reference - the URL of a manifest at /.well-known/content-telemetry.json identifying the emitter. Applies to every event in the batch and mirrors the session-level manifest_ref field. See sections 7.1 and 8."
},
"events": {
"type": "array",
"minItems": 1,
Expand Down
4 changes: 4 additions & 0 deletions telemetry-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
"format": "date-time",
"description": "Session start timestamp (UTC). Mirrors the session-level started_at field. REQUIRED for emitters at Grounding conformance or above when using standalone event delivery."
},
"manifest_ref": {
"type": ["string", "null"],
"description": "Manifest reference - the URL of a manifest at /.well-known/content-telemetry.json identifying the emitter. Mirrors the session-level manifest_ref field. RECOMMENDED on standalone events supporting settlement or audit obligations under governing terms. See sections 7.1 and 8."
},
"event": {
"$ref": "telemetry-session.json#/$defs/TelemetryEvent",
"description": "The telemetry event"
Expand Down
36 changes: 36 additions & 0 deletions telemetry-session.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,38 @@
"format": "date-time",
"description": "Session end timestamp (UTC)"
},
"data": {
"type": ["object", "null"],
"additionalProperties": true,
"description": "Session-level extension container mirroring the event-level data field (section 5.1.3). Custom fields SHOULD be namespaced; consumers MUST tolerate unknown fields.",
"properties": {
"access_context": {
"type": "object",
"additionalProperties": true,
"description": "Context from which the session's access rights derive - an institution, never an individual. Populated only where the governing terms of the relationship require it. See section 5.1.3.",
"properties": {
"identifiers": {
"type": "array",
"description": "Typed institutional identifiers. Access rights can derive through consortia, federated identity and proxies at once.",
"items": {
"type": "object",
"required": ["scheme", "value"],
"properties": {
"scheme": {
"type": "string",
"description": "Identifier scheme. Core values: ror, saml_entity_id, isni. Consumers MUST tolerate unknown schemes."
},
"value": {
"type": "string",
"description": "Identifier value in the scheme's own format"
}
}
}
}
}
}
}
},
"events": {
"type": "array",
"items": {
Expand Down Expand Up @@ -141,6 +173,10 @@
"type": ["string", "null"],
"description": "Reference to a licence or grant the emitter associates with this event (JWT jti, CoMP package ID, or opaque identifier). Core does not resolve or interpret it. See section 5.2.3."
},
"terms_ref": {
"type": ["string", "null"],
"description": "Reference to the governing terms the emitter associates with this event (public URL or opaque identifier both parties can resolve). Distinct from license_ref, which records the grant that applied. Core does not resolve or interpret it, and it does not redefine core event semantics. See section 5.2.4."
},
"turn": {
"oneOf": [{ "$ref": "#/$defs/ConversationTurn" }, { "type": "null" }],
"description": "Conversation turn data (for turn_started/turn_completed)"
Expand Down
15 changes: 15 additions & 0 deletions tests/invalid/access-context-identifier-missing-value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"_test_description": "Session access_context identifier missing its value. The schema requires both scheme and value on every identifier (5.1.3).",
"document_type": "session",
"schema_version": "0.1",
"session_id": "880e8400-e29b-41d4-a716-446655440090",
"started_at": "2026-08-13T14:02:10Z",
"data": {
"access_context": {
"identifiers": [
{ "scheme": "ror" }
]
}
},
"events": []
}
13 changes: 13 additions & 0 deletions tests/invalid/access-context-identifiers-not-array.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"_test_description": "Session access_context.identifiers as a bare string. The schema requires an array of {scheme, value} objects (5.1.3).",
"document_type": "session",
"schema_version": "0.1",
"session_id": "880e8400-e29b-41d4-a716-446655440091",
"started_at": "2026-08-13T14:02:10Z",
"data": {
"access_context": {
"identifiers": "https://ror.org/013meh722"
}
},
"events": []
}
13 changes: 13 additions & 0 deletions tests/invalid/manifest-coverage-bad-mode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"_test_description": "Manifest coverage entry with a mode outside the enum. The schema requires one of complete, sampled, aggregated, selected (8.5, 5.7.6).",
"schema_version": "0.1",
"id": "https://assistant.example.com/.well-known/content-telemetry.json",
"roles": ["agent"],
"operator": { "name": "Assistant Example" },
"telemetry": {
"endpoint": "https://telemetry.assistant.example.com/v1/events",
"coverage": {
"content_grounded": { "mode": "partial" }
}
}
}
15 changes: 15 additions & 0 deletions tests/valid/event-standalone-terms-ref.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"_test_description": "Standalone retrieval event reported under governing terms with no grant: terms_ref names the terms (5.2.4), license_ref is absent, and the envelope carries manifest_ref (7.1) to tie the emitter to a domain without a session document.",
"document_type": "event",
"schema_version": "0.1",
"agent_id": "assistant.example.com",
"manifest_ref": "https://assistant.example.com/.well-known/content-telemetry.json",
"event": {
"type": "content_retrieved",
"timestamp": "2026-08-13T15:00:04Z",
"source_role": "agent",
"content_telemetry_id": "990e8400-e29b-41d4-a716-446655440071",
"content_url": "https://example.com/2026/08/13/markets-live",
"terms_ref": "https://terms.example.com/search-only/v2"
}
}
18 changes: 18 additions & 0 deletions tests/valid/manifest-coverage-declaration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"_test_description": "Agent manifest declaring per-event-type coverage in telemetry.coverage (8.5, 5.7.6): content_grounded reported complete, content_retrieved sampled under a rule stated in the referenced terms.",
"schema_version": "0.1",
"id": "https://assistant.example.com/.well-known/content-telemetry.json",
"roles": ["agent"],
"operator": { "name": "Assistant Example" },
"telemetry": {
"endpoint": "https://telemetry.assistant.example.com/v1/events",
"conformance_level": "grounding",
"coverage": {
"content_grounded": { "mode": "complete" },
"content_retrieved": {
"mode": "sampled",
"terms_ref": "https://terms.example.com/reporting/v1"
}
}
}
}
64 changes: 64 additions & 0 deletions tests/valid/session-access-context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"_test_description": "Session-level data container (5.1.3): access_context identifies the institution whose entitlement the agent used, required by the governing terms, with turn data at intent level per 5.5. The retrieval event carries content_depth: full (6.1).",
"document_type": "session",
"schema_version": "0.1",
"session_id": "880e8400-e29b-41d4-a716-446655440080",
"agent_id": "scholar-assistant.example.com",
"content_scope": "consortium-agreement-4471",
"started_at": "2026-08-13T14:02:10Z",
"ended_at": "2026-08-13T14:03:44Z",
"data": {
"access_context": {
"identifiers": [
{ "scheme": "ror", "value": "https://ror.org/013meh722" },
{ "scheme": "saml_entity_id", "value": "https://idp.example.ac.uk/shibboleth" }
]
}
},
"events": [
{
"type": "turn_started",
"timestamp": "2026-08-13T14:02:11Z",
"turn_id": "1",
"turn": {
"privacy_level": "intent",
"query_intent": "question",
"topics": ["materials science"]
}
},
{
"type": "content_retrieved",
"timestamp": "2026-08-13T14:02:14Z",
"source_role": "agent",
"content_telemetry_id": "990e8400-e29b-41d4-a716-446655440081",
"content_url": "https://journals.example.com/article/10.1000/xyz123",
"content_id": "doi:10.1000/xyz123",
"license_ref": "grant-4471-2026",
"data": {
"media_type": "text",
"content_depth": "full"
}
},
{
"type": "content_grounded",
"timestamp": "2026-08-13T14:02:16Z",
"source_role": "agent",
"turn_id": "1",
"content_id": "doi:10.1000/xyz123",
"data": {
"scope": "turn",
"chars_ingested": 18400
}
},
{
"type": "turn_completed",
"timestamp": "2026-08-13T14:03:40Z",
"turn_id": "1",
"turn": {
"privacy_level": "intent",
"query_intent": "question",
"topics": ["materials science"]
}
}
]
}
Loading