> Status: draft. Part of the AEP 0.1 protocol specification.
Define how AEP runs over standard input / standard output, supporting local process integration with no network dependency.
AEP over stdio uses newline-delimited JSON (NDJSON):
\n (LF).Example stream:
{"aep_version":"0.1","id":"evt_01","type":"session.opened",...}
{"aep_version":"0.1","id":"evt_02","type":"session.ready",...}
{"aep_version":"0.1","id":"evt_03","type":"session.closed",...}
| Stream | Direction | Purpose |
|---|---|---|
stdin | Transport → Process | Inbound events (consumer receives) |
stdout | Process → Transport | Outbound events (producer sends) |
stderr | Process → Transport | Diagnostic output and error events |
stderr may carry:
event.rejected or session.error events that could not be sent on stdoutThe process lifecycle maps directly to session lifecycle:
| Process State | Session State | Notes |
|---|---|---|
| Start | CREATED | |
First session.opened on stdin | OPENED | |
session.ready sent on stdout | READY | |
| Process exit (0) | CLOSED | Graceful shutdown |
| Process exit (non-0) | ERROR | Unexpected termination |
| stdin closed | CLOSED | Remote peer disconnected |
| Broken pipe on stdout | CLOSED | Remote peer disconnected |
event.rejected on stderr.session.closed on stdout if still open, then exit.\r\n gracefully (the reader should accept \r\n as a line terminator).max_payload_size in capability negotiation.