forked from molecule-ai/molecule-core
IMPACT WITHOUT THIS FIX: deploying PR #31 (WorkspaceAuth middleware on /workspaces/*) without this patch causes EVERY delegation cycle to silently break — the heartbeat poll returns 401, the self-message A2A POST returns 401, agents never wake up after task completion, and memory consolidation stops. The entire multi-agent coordination system degrades to single-shot interactions with no result delivery. Changes (all using the existing platform_auth.auth_headers() pattern already used for POST /registry/heartbeat): heartbeat.py — 5 calls fixed: - GET /workspaces/:id/delegations (delegation poll) - GET /workspaces/:id (self workspace info for parent lookup) - GET /workspaces/{parent_id} (parent workspace name lookup) - POST /workspaces/:id/a2a (self-message to wake agent on results) - POST /workspaces/:id/notify (canvas delegation result notification) Also moved `from platform_auth import auth_headers` from inline (per-call) to module-level import so _check_delegations() can use it without re-importing. consolidation.py — 4 calls fixed: - GET /workspaces/:id/memories (fetch memories for consolidation) - POST /workspaces/:id/memories (write consolidated summary — agent path) - DELETE /workspaces/:id/memories/:id (delete original memories post-consolidation) - POST /workspaces/:id/memories (write consolidated summary — fallback path) a2a_client.py — 1 call fixed: - GET /workspaces/:id (get_workspace_info()) ⚠️ DEPLOYMENT NOTE: This PR MUST be merged and deployed at the same time as PR #31 (WorkspaceAuth middleware). Deploying #31 without this fix will immediately break all delegation result delivery. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| adapters | ||
| builtin_tools | ||
| plugins_registry | ||
| policies | ||
| skill_loader | ||
| tests | ||
| a2a_cli.py | ||
| a2a_client.py | ||
| a2a_executor.py | ||
| a2a_mcp_server.py | ||
| a2a_tools.py | ||
| agent.py | ||
| build-all.sh | ||
| claude_sdk_executor.py | ||
| cli_executor.py | ||
| config.py | ||
| consolidation.py | ||
| coordinator.py | ||
| Dockerfile | ||
| entrypoint.sh | ||
| events.py | ||
| executor_helpers.py | ||
| heartbeat.py | ||
| initial_prompt.py | ||
| main.py | ||
| molecule_ai_status.py | ||
| platform_auth.py | ||
| plugins.py | ||
| preflight.py | ||
| prompt.py | ||
| pytest.ini | ||
| requirements.txt | ||
| watcher.py | ||