Skip to content

The open-source app everyone uses to manage agents at work

340 B
Raw Blame
import type { ActorInfo } from "./types.js";

export function actorBinding(actor: ActorInfo | undefined) {
  return {
    actorType: actor?.actorType ?? null,
    actorId: actor?.actorId ?? null,
    sessionId:
      typeof actor?.sessionId === "string" && actor.sessionId.trim().length > 0
        ? actor.sessionId
        : null,
  };
}