feat: Add ACP, Spaces, and Agent Registry for Devin Desktop integration#11
Draft
Keramikus-97 wants to merge 3 commits into
Draft
feat: Add ACP, Spaces, and Agent Registry for Devin Desktop integration#11Keramikus-97 wants to merge 3 commits into
Keramikus-97 wants to merge 3 commits into
Conversation
- acp.py: Agent Client Protocol with message types, registration, heartbeat, version negotiation, and OpenCode-specific registration - spaces.py: Shared context containers for multi-agent collaboration with context items, search, merge, and filtering - agent_registry.py: Agent lifecycle management with health tracking, Kanban board view, capability-based lookup, and space associations - 105 new tests across 3 test files, overall 99% coverage (220 total)
- Export all public functions in __init__.py (Devin Review finding) - Remove redundant timestamp from heartbeat payload - Fix remove_from_space: return False when space_id not in agent's list - Fix LearnerProfile.add_xp O(n^2) recalculation with running total - Validate correlation_id type in validate_message - Add test for invalid correlation_id type validation
- RegisteredAgent.to_dict() now includes capability parameters (was silently dropped) - negotiate_version uses numeric version comparison instead of lexicographic sort - validate_message rejects non-string message_id, sender_id, recipient_id, protocol_version - LearnerProfile.xp_progress uses O(1) closed-form formula instead of O(n) sum - merge_spaces now merges tags from source into target (deduped) - assign_task rejects agents in ERROR/OFFLINE/SHUTTING_DOWN states 232 tests pass, 99% coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements three modules enabling this integration to work with Devin Desktop and the Agent Client Protocol (ACP) ecosystem. Agents like OpenCode, Codex, and Claude can now register, share context via Spaces, and be managed through a Kanban-style command center.
New modules:
acp.py— Agent Client Protocolspaces.py— Shared Context Containersagent_registry.py— Multi-Agent Lifecycle ManagementReview fixes (commit 2 — round 1)
__init__.pynow exports all public functions, not just data typestimestampfrom heartbeat payloadremove_from_spacereturnsFalsewhen space_id wasn't in agent's listLearnerProfile.add_xpuses running total instead of O(n²) re-summingvalidate_messagerejects non-stringcorrelation_idvaluesReview fixes (commit 3 — round 2)
RegisteredAgent.to_dict()now includes capabilityparameters(was silently dropped —ACPRegistration.to_dict()included them butRegisteredAgent.to_dict()didn't)negotiate_versionuses numeric version comparison instead of lexicographic sort ("9.0"no longer sorts above"10.0")validate_messagerejects non-stringmessage_id,sender_id,recipient_id,protocol_version(previouslystr(None)→"None"was silently accepted)LearnerProfile.xp_progressuses O(1) closed-form100 * level * (level-1) // 2instead of O(n)sum()merge_spacesnow merges tags from source into target (was only copying items and members)assign_taskrejects agents inERROR/OFFLINE/SHUTTING_DOWNstates (previously overwrote status to BUSY)232 tests, 99% coverage.
Link to Devin session: https://app.devin.ai/sessions/e783b2864bf3411f8832faec6c5f93bf
Requested by: @Keramikus-97