MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / parseAgentId

Function parseAgentId

source code/utils/agentId.ts:48–59  ·  view source on GitHub ↗
(
  agentId: string,
)

Source from the content-addressed store, hash-verified

46 * Returns null if the ID doesn't contain the @ separator.
47 */
48export function parseAgentId(
49 agentId: string,
50): { agentName: string; teamName: string } | null {
51 const atIndex = agentId.indexOf('@')
52 if (atIndex === -1) {
53 return null
54 }
55 return {
56 agentName: agentId.slice(0, atIndex),
57 teamName: agentId.slice(atIndex + 1),
58 }
59}
60
61/**
62 * 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