Commit Graph

7 Commits

Author SHA1 Message Date
sylvain 8a6432e5f8 fix: dispatch XMPP message callback in thread to avoid blocking asyncio loop
The LLM call (up to 300s) was blocking the slixmpp asyncio event loop,
preventing keepalive pings and causing the server to close the connection.
All XMPP message handling now runs in a daemon thread.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 16:44:59 +00:00
sylvain 654e238d7e Increase LLM timeout from 120s to 300s
qwen3:8b can take over 120s on complex tasks causing silent failures
and queue buildup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 16:27:15 +00:00
sylvain 813c77651c Add XMPP auto-reconnect loop
XMPPClient.connect_async() now runs a persistent reconnect loop in a
daemon thread. On connection loss, it reconnects after 5s with
exponential backoff up to 60s. The on_ready callback is only called
on the first successful connection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 14:36:31 +00:00
sylvain a6c3bfc3d6 Add build/ to .gitignore
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:05:44 +00:00
sylvain d390d8a07a Fix real-time agent status tracking and add status hooks
- Fix root cause: Message.from_json was parsing status/capabilities
  payloads (plain JSON dicts) as Message objects with empty payload,
  causing _on_status_update to silently fail. Now plain JSON payloads
  (no 'type'/'sender' keys) are passed as raw strings to callbacks.
- _on_status_update: ignore own status, call on_agent_status_change
  hook only when status actually changes (was_online != is_online)
- Add on_agent_status_change(agent_id, status) hook in BaseAgent
- Add on_xmpp_connected() hook in BaseAgent
- XMPPClient.connect_async() accepts on_ready callback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:03:30 +00:00
sylvain 7ab395037d Fix slixmpp 1.13 compatibility and empty capabilities handling
- Replace process(forever=True) with asyncio event loop in _SlixClient.start()
- Make send_xmpp_message() thread-safe via loop.call_soon_threadsafe()
- Remove wait=True from join_muc() (no longer supported in slixmpp 1.13)
- Silence empty retained MQTT capability messages in CapabilitiesRegistry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 10:28:28 +00:00
sylvain c1666db5aa Initial commit — agents_core v2.0 2026-03-09 09:01:32 +00:00