refactor: resource-oriented gateway API + symmetric agent/world lifecycle#156
Merged
Conversation
- /peer/ping → /ping - /peer/peers removed (redundant with GET /agents) - /peer/announce → POST /agents (agent online/re-announce) - /peer/heartbeat → POST /agents/:agentId/heartbeat - /peer/message → POST /messages - /world/:worldId → /worlds/:worldId (fix singular/plural) - DELETE /world/:worldId → DELETE /worlds/:worldId - Add GET /agents/:agentId, DELETE /agents/:agentId, POST /worlds/:worldId/heartbeat Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
…t endpoints - announceToGateway: /peer/announce → /agents - sendHeartbeat: /peer/heartbeat → /agents/:agentId/heartbeat for regular agents and /worlds/:worldId/heartbeat for world servers (detected via capabilities) - heartbeat body no longer includes agentId/worldId (moved to path) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
- gateway-world-record: /world/ → /worlds/, /peer/announce → /agents - gateway-heartbeat: new /agents/:agentId/heartbeat and /worlds/:worldId/heartbeat tests - gateway-worlds: update OpenAPI path assertions - gateway-announce-default: update expected announce URL - index-lifecycle: update /world/arena → /worlds/arena mock URL Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
- DELETE /worlds/:worldId and DELETE /agents/:agentId now call flushRegistry() so deregistrations survive restarts - web/client.js: /world/ → /worlds/ (viewWorldInfo was hitting removed route) - docs/index.html: /world/ → /worlds/ (API docs text) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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
Renames all gateway HTTP endpoints to follow consistent REST conventions and adds missing CRUD endpoints for full agent/world lifecycle symmetry.
Endpoint Changes
GET /peer/pingGET /pingGET /peer/peersPOST /peer/announcePOST /agentsPOST /peer/heartbeatPOST /agents/:agentId/heartbeatPOST /peer/messagePOST /messagesGET /world/:worldIdGET /worlds/:worldIdDELETE /world/:worldIdDELETE /worlds/:worldIdGET /agents/:agentIdDELETE /agents/:agentIdPOST /worlds/:worldId/heartbeatSymmetric Lifecycle
POST /agents(online) →POST /agents/:agentId/heartbeat→DELETE /agents/:agentId(offline)POST /agentswithworld:capability (online) →POST /worlds/:worldId/heartbeat→DELETE /worlds/:worldId(offline)Commits
Atomic commits per change type: gateway core, SDK, plugin caller, tests, changeset.
Tests