MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / parseAgentId

Function parseAgentId

src/utils/agentId.ts:46–57  ·  view source on GitHub ↗
(
  agentId: string,
)

Source from the content-addressed store, hash-verified

44 * Returns null if the ID doesn't contain the @ separator.
45 */
46export function parseAgentId(
47 agentId: string,
48): { agentName: string; teamName: string } | null {
49 const atIndex = agentId.indexOf('@')
50 if (atIndex === -1) {
51 return null
52 }
53 return {
54 agentName: agentId.slice(0, atIndex),
55 teamName: agentId.slice(atIndex + 1),
56 }
57}
58
59/**
60 * Formats a request ID in the format `{requestType}-{timestamp}@{agentId}`.

Callers 3

sendMessageMethod · 0.85
sendMessageMethod · 0.85
terminateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected