MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / outbound

Function outbound

src/entrypoints/agent_server_cli.py:140–147  ·  view source on GitHub ↗

Agent → stdout: one JSON object per line, flushed.

()

Source from the content-addressed store, hash-verified

138 out = sys.stdout
139
140 async def outbound() -> None:
141 """Agent → stdout: one JSON object per line, flushed."""
142 async for msg in agent.messages_from_agent():
143 try:
144 out.write(json.dumps(msg) + "\n")
145 out.flush()
146 except (BrokenPipeError, OSError):
147 return
148
149 # Inbound: a daemon thread reads stdin lines and dispatches them onto the
150 # loop (mirrors the existing threaded pattern). stdin EOF resolves `closed`.

Callers 2

_serve_stdioFunction · 0.85
_run_ws_sessionMethod · 0.85

Calls 2

writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected