{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:ioc:l9:schema:v1", "version": "0.0.6", "title": "L9Schema", "description": "Combined JSON Schema for all ioc_l9 Pydantic models.", "$defs": { "Actor": { "description": "A participant in a protocol exchange - can be a human, an AI agent, or a system.\nMultiple actors are listed in L9Header.actors to identify sender(s) and receiver(s).", "properties": { "id": { "title": "Id", "type": "string" }, "role": { "title": "Role", "type": "string" }, "attestation": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Attestation" } }, "required": [ "id", "role" ], "type": "object" }, "Epistemic": { "description": "Participant epistemic (belief/knowledge) state at the time the message was sent.\nCurrently a placeholder \u2014 fields will be added as the model is defined.", "properties": {}, "type": "object" }, "Provenance": { "description": "Tracks the origin and lineage of a message - who created it, from what source,\nand through which transformations. Fields TBD.", "properties": {}, "type": "object" }, "Semantic": { "description": "Describes the semantic/ontological framework needed to correctly interpret the payload.\nThe CFN routing layer uses this to select appropriate cognitive engines (CEs).", "properties": { "schema_id": { "title": "Schema Id", "type": "string" }, "ontology_ref": { "title": "Ontology Ref", "type": "string" }, "provenance": { "anyOf": [ { "$ref": "#/$defs/Provenance" }, { "type": "null" } ], "default": null } }, "required": [ "schema_id", "ontology_ref" ], "type": "object" }, "Context": { "properties": { "topic": { "title": "Topic", "type": "string" }, "epistemic": { "anyOf": [ { "$ref": "#/$defs/Epistemic" }, { "type": "null" } ], "default": null }, "semantic": { "anyOf": [ { "$ref": "#/$defs/Semantic" }, { "type": "null" } ], "default": null } }, "required": [ "topic" ], "type": "object" }, "Message": { "description": "Represents a message in the protocol.", "properties": { "id": { "title": "Id", "type": "string" }, "parents": { "items": { "type": "string" }, "title": "Parents", "type": "array" }, "episode": { "title": "Episode", "type": "string" } }, "required": [ "id", "parents", "episode" ], "type": "object" }, "Episode": { "description": "A discrete conversation or interaction sequence tied to a task.\nAn episode groups the messages exchanged during one focused interaction\n(e.g. one round of clarification, one tool invocation cycle).", "properties": { "id": { "title": "Id", "type": "string" }, "messages": { "items": { "$ref": "#/$defs/Message" }, "title": "Messages", "type": "array" } }, "required": [ "id", "messages" ], "type": "object" }, "ParticipantSet": { "properties": { "actors": { "items": { "$ref": "#/$defs/Actor" }, "title": "Actors", "type": "array" }, "groups": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Groups" } }, "required": [ "actors", "groups" ], "type": "object" }, "PolicyLabel": { "description": "Data governance and access-control labels applied to the message.", "properties": { "sensitivity": { "title": "Sensitivity", "type": "string" }, "propagation": { "title": "Propagation", "type": "string" }, "retention_policy": { "title": "Retention Policy", "type": "string" } }, "required": [ "sensitivity", "propagation", "retention_policy" ], "type": "object" }, "TaskWork": { "description": "A unit of work assigned to a team member, tracked through one or more episodes.\nStatus lifecycle example: \"pending\" \u2192 \"in_progress\" \u2192 \"completed\" | \"blocked\"", "properties": { "id": { "title": "Id", "type": "string" }, "assigned_to": { "title": "Assigned To", "type": "string" }, "task_description": { "title": "Task Description", "type": "string" }, "status": { "title": "Status", "type": "string" }, "episodes": { "items": { "$ref": "#/$defs/Episode" }, "title": "Episodes", "type": "array" } }, "required": [ "id", "assigned_to", "task_description", "status", "episodes" ], "type": "object" }, "Team": { "description": "A group of agents and/or humans collaborating on a shared set of tasks.", "properties": { "id": { "title": "Id", "type": "string" }, "team_members": { "items": { "type": "string" }, "title": "Team Members", "type": "array" }, "tasks": { "items": { "$ref": "#/$defs/TaskWork" }, "title": "Tasks", "type": "array" } }, "required": [ "id", "team_members", "tasks" ], "type": "object" }, "Kind": { "enum": [ "intent", "contingency", "exchange", "commit", "knowledge" ], "title": "Kind", "type": "string" }, "L9Header": { "description": "Routing and metadata envelope for every L9 message.\nThe routing layer reads the header \u2014 especially `kind` and `subkind` \u2014\nto decide which handler should process the message.", "properties": { "protocol": { "title": "Protocol", "type": "string" }, "subprotocol": { "title": "Subprotocol", "type": "string" }, "version": { "title": "Version", "type": "string" }, "kind": { "$ref": "#/$defs/Kind" }, "subkind": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Subkind" }, "participants": { "$ref": "#/$defs/ParticipantSet" }, "message": { "$ref": "#/$defs/Message" }, "policy": { "anyOf": [ { "$ref": "#/$defs/PolicyLabel" }, { "type": "null" } ], "default": null }, "attributes": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Attributes" }, "context": { "anyOf": [ { "$ref": "#/$defs/Context" }, { "type": "null" } ], "default": null } }, "required": [ "protocol", "subprotocol", "version", "kind", "participants", "message" ], "type": "object" }, "L9Payload": { "description": "The actual content being carried by an L9 message.\nThe `type` field describes the payload format; `data` holds the content.", "properties": { "type": { "title": "Type", "type": "string" }, "data": { "additionalProperties": true, "title": "Data", "type": "object" } }, "required": [ "type", "data" ], "type": "object" }, "L9": { "description": "A complete L9 message: header (routing/metadata) + payload (content).\nThis is the top-level structure passed between participants in the IoC protocol.", "properties": { "header": { "$ref": "#/$defs/L9Header" }, "payload": { "$ref": "#/$defs/L9Payload" } }, "required": [ "header", "payload" ], "type": "object" } } }