mas-modes-v0.1-spec/ (contract, message + gateway-event schemas, transition table, message fixtures, statute) vendored into mas_modes. EmailMode implements the master role over the reference ticket service (MasterStore): handoff, negotiation by email, statuses in the thread, timeouts, resume by email, principle 10 shared via mas_modes.mailer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 5787@bnt-lap001 Assistant-Session: 5db26b82-138b-40cc-9856-4d5eb0f752fd
281 lines
6.2 KiB
JSON
281 lines
6.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://mas.coulomb.social/schema/mas-event-v0.1.schema.json",
|
|
"title": "Normalized MAS gateway event v0.1",
|
|
"description": "What mas-gateway posts to the application for each recipient (pipe or webhook). 'authentication' is only from the receiving MTA's trusted Authentication-Results, or from the inbound provider.",
|
|
"type": "object",
|
|
"required": [
|
|
"mas_event_version",
|
|
"recipient",
|
|
"mas",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"mas_event_version": {
|
|
"const": "0.1"
|
|
},
|
|
"recipient": {
|
|
"type": "string"
|
|
},
|
|
"mas": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"valid",
|
|
"domain",
|
|
"local_part",
|
|
"base",
|
|
"target",
|
|
"target_syntax",
|
|
"discovery",
|
|
"namespace_confirmed",
|
|
"kind",
|
|
"kind_source",
|
|
"profile",
|
|
"equivalence_key",
|
|
"canonical_local_part",
|
|
"stand_ins",
|
|
"failures",
|
|
"unknowns"
|
|
],
|
|
"properties": {
|
|
"valid": {
|
|
"const": true
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"local_part": {
|
|
"type": "string"
|
|
},
|
|
"base": {
|
|
"type": "string"
|
|
},
|
|
"target": {
|
|
"type": "string"
|
|
},
|
|
"target_syntax": {
|
|
"type": "string"
|
|
},
|
|
"discovery": {
|
|
"type": "object",
|
|
"required": [
|
|
"ok"
|
|
],
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"failure": {
|
|
"type": "string"
|
|
},
|
|
"detail": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"namespace_confirmed": {
|
|
"type": "boolean"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"kind_source": {
|
|
"type": "string"
|
|
},
|
|
"registry_key": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"intake_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"resource_type": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"resource_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"facet": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"interaction": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"profile": {
|
|
"enum": [
|
|
"P1",
|
|
"P2"
|
|
]
|
|
},
|
|
"equivalence_key": {
|
|
"type": "string"
|
|
},
|
|
"canonical_local_part": {
|
|
"type": "string"
|
|
},
|
|
"stand_ins": {
|
|
"type": "array",
|
|
"items": {
|
|
"enum": [
|
|
"resource",
|
|
"interaction"
|
|
]
|
|
}
|
|
},
|
|
"failures": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"unknowns": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"valid",
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"valid": {
|
|
"const": false
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"detail": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "object",
|
|
"required": [
|
|
"from",
|
|
"subject",
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"message_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"in_reply_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"references": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"date": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"auto_submitted": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"precedence": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"authentication": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"properties": {
|
|
"dmarc": {
|
|
"type": "string"
|
|
},
|
|
"spf": {
|
|
"type": "string"
|
|
},
|
|
"dkim": {
|
|
"type": "string"
|
|
},
|
|
"header_from": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|