Documentation
¶
Overview ¶
Command semantics-json exposes internal/jsbridge as a long-running newline-delimited-JSON server on stdin/stdout, so non-Go hosts (the js/semantics package) can call pkg/semantics without linking CGO themselves. One protocol Request JSON object per input line; one Response JSON object per output line, matched by id. stdout carries protocol JSON only; diagnostics go to stderr. The process exits 0 on stdin EOF.
The --once flag reads exactly one request, responds, and exits, which makes manual debugging trivial:
echo '{"id":1,"op":"analyze","language":"go","content_b64":"cGFja2FnZSBtYWluCg=="}' | semantics-json --once
Click to show internal directories.
Click to hide internal directories.