/**
 * Perfetto agent tracing — stub.
 *
 * The upstream module emitted Perfetto-format trace events for in-process
 * agent (swarm teammate) lifetimes so they could be visualized in the
 * Perfetto UI. Sandcode has no first-party Perfetto pipeline; this stub
 * keeps the swarm + AgentTool call sites compiling.
 */

/** Build-time gate — callers branch on this to skip Perfetto event emit. */
export function isPerfettoTracingEnabled(): boolean {
  return false
}

/**
 * Register an agent's start in the Perfetto trace. Returns the agent
 * identifier (or whatever opaque handle the trace expects). No-op stub
 * returns the input agent id so callers can keep their token shape.
 */
export function registerAgent(agentId: string, _attrs?: Record<string, unknown>): string {
  return agentId
}

/** Mark an agent as terminated. No-op. */
export function unregisterAgent(_agentId: string, _attrs?: Record<string, unknown>): void {
  /* no-op */
}
