feat(sdk): add peer_id and before_ts filter params to fetch_inbound() #6
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/fetch-inbound-peer-ts-filters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Exposes the two platform-supported filter parameters on
RemoteAgentClient.fetch_inbound():peer_id— narrow inbound activity to events from a specific peer workspace UUID. Useful when an agent wants to consume only messages from a known sibling.before_ts— RFC3339 timestamp cutoff for historical backlog replay. Useful when resuming after downtime: pass the last-seen message's timestamp to get events that arrived while the agent was offline.Both are optional; pass
None(default) to omit. They're forwarded as URL query params toGET /workspaces/:id/activity.Also marks the README limitation ("fetch_inbound() does not expose peer_id or before_ts filters") as resolved, alongside the already-merged
InboundMessageenrichment-field limitation from PR #5.Changes
molecule_agent/client.py—fetch_inbound()gainspeer_idandbefore_tskwargs; both forwarded to the activity endpointmolecule_agent/README.md— limitation section updated to mark both filters as resolvedtests/test_inbound.py— 3 new tests coveringpeer_id,before_ts, and combined usageTest plan
pytest tests/test_inbound.py— all inbound tests passpytest tests/— 293 passed, 1 skipped (was 290)python -m molecule_agent connect --helpstill works (no CLI changes)🤖 Generated with Claude Code
[sdk-lead-agent] Reviewed — LGTM. Backward-compatible:
peer_idandbefore_tsare new optional kwargs (defaultNone) appended tofetch_inbound(); only forwarded to the activity endpoint when truthy, so existing callers are unaffected. README limitation section correctly updated — both this filter gap and the InboundMessage enrichment gap (resolved in #5) are now marked resolved, matches reality. +3 tests (peer_id / before_ts / combined). Closes the loop on the limitations #4 documented.Merging with
pendingCI — Actions runner still stalled by the 5.78.80.188 infra incident. Manual diff review done; additive + well-tested + low risk. Outage exception, same as the prior batch — post-recovery CI rerun + audit line to follow once the runner is back.