{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://ursy.news/under-the-hood/machine-attention/schema.json","title":"URSY Machine Attention 1.0 contracts","description":"VME candidates require central acceptance; cached responses without edge proof do not qualify. Runtime 1.0 emits application proof only.","oneOf":[{"$ref":"#/$defs/Summary"},{"$ref":"#/$defs/VMEEvent"},{"$ref":"#/$defs/MetricBucket"}],"$defs":{"Summary":{"type":"object","properties":{"schema_version":{"const":"ursy-machine-attention/1.0"},"property_id":{"type":"string"},"generated_at":{"type":["string","null"],"format":"date-time"},"last_updated_at":{"type":["string","null"],"format":"date-time"},"period":{"const":"today_utc"},"traffic":{"type":"object","properties":{"machine_requests":{"type":"integer","minimum":0},"machine_requests_today":{"type":"integer","minimum":0},"machine_requests_7d":{"type":"integer","minimum":0},"machine_requests_30d":{"type":"integer","minimum":0},"human_requests_today":{"type":"integer","minimum":0},"internal_requests_today":{"type":"integer","minimum":0},"unknown_machine_like_today":{"type":"integer","minimum":0},"classifications":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"families":{"type":"object","additionalProperties":{"type":"integer","minimum":0}},"surfaces":{"type":"object","additionalProperties":{"type":"integer","minimum":0}}},"required":["machine_requests","machine_requests_today","machine_requests_7d","machine_requests_30d","human_requests_today","internal_requests_today","unknown_machine_like_today","classifications","families","surfaces"],"additionalProperties":false},"sponsor_funnel":{"type":"object","properties":{"eligible":{"type":"integer","minimum":0},"selected":{"type":"integer","minimum":0},"injection_attempted":{"type":"integer","minimum":0},"emitted_local":{"type":"integer","minimum":0},"vme_candidates":{"type":"integer","minimum":0},"vme_pending":{"type":"integer","minimum":0},"excluded":{"type":"integer","minimum":0},"vme_accepted":{"type":["integer","null"],"minimum":0}},"required":["eligible","selected","injection_attempted","emitted_local","vme_candidates","vme_pending","excluded","vme_accepted"],"additionalProperties":false},"campaign":{"anyOf":[{"type":"null"},{"type":"object","properties":{"campaign_id":{"type":"string"},"creative_id":{"type":"string"},"advertiser":{"type":"string"},"config_version":{"type":"string"},"ruleset_version":{"type":"string"},"active_placements":{"type":"array","items":{"type":"string"}}},"required":["campaign_id","creative_id","advertiser","config_version","ruleset_version","active_placements"],"additionalProperties":false}]},"health":{"type":"object","properties":{"runtime_version":{"type":"string"},"classifier_version":{"type":"string"},"metric_schema_version":{"type":"string"},"vme_schema_version":{"type":"string"},"collector_status":{"type":"string"},"outbox_pending":{"type":"integer","minimum":0},"dead_letter":{"type":"integer","minimum":0},"runtime_errors_today":{"type":"integer","minimum":0},"last_successful_ingest_at":{"type":["string","null"],"format":"date-time"},"last_collector_success_at":{"type":["string","null"],"format":"date-time"},"last_metrics_snapshot_at":{"type":["string","null"],"format":"date-time"},"last_worker_at":{"type":["string","null"],"format":"date-time"},"last_central_reconciliation_at":{"type":["string","null"],"format":"date-time"},"verification_lag_seconds":{"type":["integer","null"],"minimum":0},"test_mode":{"type":"boolean"},"edge_proof_enabled":{"type":"boolean"}},"required":["runtime_version","classifier_version","metric_schema_version","vme_schema_version","collector_status","outbox_pending","dead_letter","runtime_errors_today","last_successful_ingest_at","last_collector_success_at","last_metrics_snapshot_at","last_worker_at","last_central_reconciliation_at","verification_lag_seconds","test_mode","edge_proof_enabled"],"additionalProperties":false},"reconciliation":{"type":"object","properties":{"pending":{"type":"integer","minimum":0},"dead_letter":{"type":"integer","minimum":0},"delivered":{"type":"integer","minimum":0},"central_receipts":{"type":"object","properties":{"accepted":{"type":"integer","minimum":0},"duplicates":{"type":"integer","minimum":0},"rejected":{"type":"integer","minimum":0}},"required":["accepted","duplicates","rejected"],"additionalProperties":false},"central_today":{"type":["integer","null"],"minimum":0}},"required":["pending","dead_letter","delivered","central_receipts","central_today"],"additionalProperties":false},"timeline":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"machine_requests":{"type":"integer","minimum":0},"sponsor_emitted":{"type":"integer","minimum":0},"vme_candidates":{"type":"integer","minimum":0}},"required":["date","machine_requests","sponsor_emitted","vme_candidates"],"additionalProperties":false}},"exclusions":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["reason","count"],"additionalProperties":false}},"methodology":{"type":"string"},"local_methodology":{"type":"string"},"measurement_started_at":{"type":["string","null"],"format":"date-time"},"current_minute":{"type":"object","properties":{"mutable":{"type":"boolean"},"included_in_local_today":{"type":"boolean"},"central_push":{"type":"string"}},"required":["mutable","included_in_local_today","central_push"],"additionalProperties":false},"limitations":{"type":"array","items":{"type":"string"}}},"required":["schema_version","property_id","generated_at","last_updated_at","period","traffic","sponsor_funnel","campaign","health","reconciliation","timeline","exclusions","methodology","local_methodology","measurement_started_at","current_minute","limitations"],"additionalProperties":false},"VMEEvent":{"type":"object","additionalProperties":false,"properties":{"schema_version":{"const":"vme/1.0"},"event_id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-7[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"},"occurred_at":{"type":"string","format":"date-time"},"property":{"type":"object","additionalProperties":false,"properties":{"property_id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:-]+$"},"hostname":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:-]+$"},"environment":{"enum":["production","test"]}},"required":["property_id","hostname","environment"]},"request":{"type":"object","additionalProperties":false,"properties":{"request_id":{"type":"string","pattern":"^[a-f0-9]{8}-[a-f0-9]{4}-7[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"},"method":{"enum":["GET","POST","PUT","PATCH","DELETE"]},"route_id":{"enum":["stations","rights","search","playback_handoff","metadata","mcp","manifests","developer","catalogue","nicola","other","evidence","admin","health","human"]},"path_template":{"type":"string","pattern":"^\\{[a-z_]+\\}$"},"surface":{"enum":["rest_json","rest_text","mcp_tool","mcp_resource","llms_txt","agents_json","openapi","machine_manifest","nicola","machine_html","other_machine"]},"response_status":{"type":"integer","minimum":200,"maximum":299},"content_type":{"enum":["application/json","text/plain"]}},"required":["request_id","method","route_id","path_template","surface","response_status","content_type"]},"machine":{"type":"object","additionalProperties":false,"properties":{"is_machine":{"const":true},"classification":{"enum":["named_ai","search_crawler","agent_runtime","developer_tool","automation","unknown_machine_like"]},"family":{"enum":["openai","anthropic","google","microsoft","perplexity","meta","apple","generic","unknown"]},"classifier_version":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"required":["is_machine","classification","family","classifier_version"]},"sponsor":{"type":"object","additionalProperties":false,"properties":{"campaign_id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:-]+$"},"placement_id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:-]+$"},"creative_id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:-]+$"},"sponsor_name":{"type":"string","maxLength":256},"disclosure":{"const":"paid_placement"},"config_version":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:/-]+$"},"ruleset_version":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:/-]+$"}},"required":["campaign_id","placement_id","creative_id","sponsor_name","disclosure","config_version","ruleset_version"]},"emission":{"type":"object","additionalProperties":false,"properties":{"eligible":{"const":true},"sponsor_emitted":{"const":true},"format":{"enum":["json_object","text_block"]},"sponsor_fragment_sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"sponsor_bytes":{"type":"integer","minimum":1,"maximum":16384},"proof_layer":{"const":"application"}},"required":["eligible","sponsor_emitted","format","sponsor_fragment_sha256","sponsor_bytes","proof_layer"]},"runtime":{"type":"object","additionalProperties":false,"properties":{"sponsor_runtime_version":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:-]+$"},"vme_emitter_version":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[A-Za-z0-9_.:-]+$"}},"required":["sponsor_runtime_version","vme_emitter_version"]},"billable":{"type":"boolean"}},"required":["schema_version","event_id","occurred_at","property","request","machine","sponsor","emission","runtime","billable"]},"MetricBucket":{"type":"object","additionalProperties":false,"properties":{"bucket_id":{"type":"string","pattern":"^[a-f0-9]{64}$"},"bucket_start":{"type":"string","format":"date-time"},"bucket_seconds":{"const":60},"revision":{"type":"integer","minimum":1},"finalized":{"type":"boolean"},"schema_version":{"const":"machine-metrics/1.0"},"property_id":{"type":"string","maxLength":160,"pattern":"^[A-Za-z0-9_.:-]*$"},"environment":{"enum":["production","test"]},"runtime_version":{"type":"string","maxLength":160,"pattern":"^[A-Za-z0-9_.:-]*$"},"surface":{"enum":["rest_json","rest_text","mcp_tool","mcp_resource","llms_txt","agents_json","openapi","machine_manifest","nicola","machine_html","other_machine"]},"route_group":{"enum":["stations","rights","search","playback_handoff","metadata","mcp","manifests","developer","catalogue","nicola","other","evidence","admin","health","human"]},"machine_classification":{"enum":["named_ai","search_crawler","agent_runtime","developer_tool","automation","unknown_machine_like","human","internal"]},"machine_family":{"enum":["openai","anthropic","google","microsoft","perplexity","meta","apple","generic","unknown"]},"campaign_id":{"type":"string","maxLength":160,"pattern":"^[A-Za-z0-9_.:-]*$"},"placement_id":{"type":"string","maxLength":160,"pattern":"^[A-Za-z0-9_.:-]*$"},"counters":{"type":"object","additionalProperties":false,"properties":{"machine_requests":{"type":"integer","minimum":0,"maximum":1000000000},"sponsor_eligible":{"type":"integer","minimum":0,"maximum":1000000000},"sponsor_selected":{"type":"integer","minimum":0,"maximum":1000000000},"injection_attempted":{"type":"integer","minimum":0,"maximum":1000000000},"sponsor_emitted":{"type":"integer","minimum":0,"maximum":1000000000},"vme_candidates":{"type":"integer","minimum":0,"maximum":1000000000},"vme_excluded":{"type":"integer","minimum":0,"maximum":1000000000},"runtime_errors":{"type":"integer","minimum":0,"maximum":1000000000},"internal_excluded":{"type":"integer","minimum":0,"maximum":1000000000},"human_requests":{"type":"integer","minimum":0,"maximum":1000000000},"unknown_machine_like":{"type":"integer","minimum":0,"maximum":1000000000}},"required":["machine_requests","sponsor_eligible","sponsor_selected","injection_attempted","sponsor_emitted","vme_candidates","vme_excluded","runtime_errors","internal_excluded","human_requests","unknown_machine_like"]}},"required":["bucket_id","bucket_start","bucket_seconds","revision","finalized","schema_version","property_id","environment","runtime_version","surface","route_group","machine_classification","machine_family","campaign_id","placement_id","counters"]}}}