Compare commits

..

1 Commits

Author SHA1 Message Date
sdk-dev 56e963bb87 fix(docs): update stale docstring to reflect shipped inbound delivery paths
[Do] Manual ack
Test / test (3.12) (pull_request) Successful in 2m1s
Test / test (3.11) (pull_request) Successful in 2m8s
Test / test (3.13) (pull_request) Successful in 2m16s
sop-checklist / all-items-acked All items acknowledged
sop-checklist / [Do] Done
The module docstring claimed "No inbound A2A server is bundled here yet"
but A2AServer (push) and PollDelivery (poll) have been implemented and
documented since Phase 30.8b/30.8c. Replaced the outdated claim with a
concise description of both delivery modes and how run_agent_loop uses them.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 20:19:09 +00:00
+13 -4
View File
@@ -11,10 +11,19 @@ a Phase 30 endpoint:
* :py:meth:`run_heartbeat_loop` — drives heartbeat + state-poll on a timer,
returns when the platform reports the workspace paused or deleted.
No inbound A2A server is bundled here yet — that requires hosting an HTTP
endpoint the platform's proxy can reach, which is network-dependent.
Use :class:`molecule_agent.a2a_server.A2AServer` to add inbound A2A support.
See that module for usage and the Phase 30.8b contract.
The client also exposes two inbound delivery paths for handling platform-initiated
A2A messages:
* **Push mode** — :class:`molecule_agent.a2a_server.A2AServer` hosts an HTTP server
in a background thread; platform pushes inbound A2A as HTTP requests. Use when the
agent has a publicly reachable URL (cloud VM, ngrok tunnel, etc.).
* **Poll mode** — :class:`molecule_agent.inbound.PollDelivery` polls
``GET /workspaces/:id/activity`` on a configurable interval; no public URL required.
The default when no explicit delivery is passed to :py:meth:`run_agent_loop`.
Both feed the same :py:class:`molecule_agent.inbound.MessageHandler` callback.
Reply routing (``/notify`` for canvas users, ``/a2a`` for peer agents) is handled
automatically by :py:meth:`reply`.
"""
from __future__ import annotations