Skip to content

refactor: separate world records from agent registries#159

Merged
Jing-yilin merged 4 commits into
feat/awn-rust-clifrom
fix/ts-peer-rename
Mar 24, 2026
Merged

refactor: separate world records from agent registries#159
Jing-yilin merged 4 commits into
feat/awn-rust-clifrom
fix/ts-peer-rename

Conversation

@Jing-yilin
Copy link
Copy Markdown
Contributor

Summary

  • rename peer-facing TypeScript modules and APIs to agent/world terminology
  • add dedicated world db/registry storage in the plugin, SDK, and gateway
  • update gateway world discovery, heartbeats, and tests for worldId-as-identity plus slug support

Validation

  • npm run build
  • npm --prefix packages/agent-world-sdk run build
  • node --test test/*.test.mjs

Jing-yilin and others added 4 commits March 24, 2026 17:41
Unified naming: replace all 'peer' references with 'agent' / 'world'
terminology as the canonical vocabulary for AWN participants.

File renames:
  src/peer-db.ts → agent-db.ts
  src/peer-server.ts → agent-server.ts
  src/peer-client.ts → agent-client.ts
  packages/agent-world-sdk/src/peer-db.ts → agent-db.ts
  packages/agent-world-sdk/src/peer-protocol.ts → agent-protocol.ts
  test/agentid-peer-db.test.mjs → agentid-agent-db.test.mjs

Type/class renames:
  PeerRecord → AgentRecord, PeerDb → AgentDb,
  PeerAnnouncement → AgentAnnouncement,
  PeerServerOptions → AgentServerOptions,
  PeerProtocolOpts → AgentProtocolOpts,
  PeerStore → AgentStore, PeerRecordSchema → AgentRecordSchema

Function renames:
  listPeers → listAgents, getPeer → getAgent,
  upsertPeer → upsertAgent, removePeer → removeAgent,
  startPeerServer → startAgentServer, stopPeerServer → stopAgentServer,
  registerPeerRoutes → registerAgentRoutes,
  getPeerPingInfo → getAgentPingInfo, pingPeer → pingAgent,
  findPeersByCapability → findAgentsByCapability,
  getPeersForExchange → getAgentsForExchange

Other:
  - Tool: awn_list_peers → awn_list_agents
  - Slash command: awn-peers → awn-agents
  - Data file: peers.json → agents.json (store version 2 → 3)
  - Response fields: { peers } → { agents }
  - Wire protocol paths (/peer/*) kept as-is (§8)
  - packages/awn-cli/ excluded (handled separately)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Use worldId as the protocol identity while storing world metadata separately from agent records across the plugin, SDK, gateway, and tests.

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>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@Jing-yilin Jing-yilin merged commit ab3d8a0 into feat/awn-rust-cli Mar 24, 2026
@Jing-yilin Jing-yilin deleted the fix/ts-peer-rename branch March 24, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant