Expand description
AFDATA protocol adapter.
Every afhttp command emits one AFDATA protocol-v1 event per invocation:
a single-line {"kind":"result","result":...} or {"kind":"error", "error":...} JSON value followed by a newline.
Functions§
- decode_
error - decode_
result - emit
- Emit a typed result event to
writerand write it as one line of JSON followed by a newline. The command-specificcoderemains insideresult. - emit_
error - Convenience: emit an SDK-built AFDATA error event.
- emit_
error_ with - Emit an error event with caller-owned extension fields and trace.
- emit_
process - Emit a result through the process-wide
--output-toroute. - emit_
process_ error - Emit an SDK-built AFDATA error event through
--output-to. - emit_
process_ error_ with - Emit an error with extension fields and trace through
--output-to. - emit_
process_ revealing_ takeover - Emit an otherwise-redacted result while intentionally revealing only the
short-lived takeover capability field. The explicit
panelandfetch --takeoveroperations are the only callers. - emit_
process_ unredacted - Emit a result with redaction disabled through the process-wide route.
- emit_
unredacted - Emit a payload without AFDATA redaction. Use only for commands that require an explicit reveal flag and whose payload contains no unrelated secrets.
- error_
value - Build a strict AFDATA error event for HTTP response bodies.
- install_
output_ to - Resolve and install the process-wide AFDATA stream selector before command
dispatch. The default is finite one-shot
splitrouting. - output_
to - result_
value - Build a strict AFDATA result event for HTTP response bodies.
- result_
value_ revealing_ takeover - Build a strict HTTP result while intentionally revealing only
takeover_url_secret. Used by the authenticated handoff-minting endpoint. - write_
process_ result - Write an already-rendered discovery result (
--help/--version) to the result side of the selected route.