openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
11 lines (10 loc) • 683 B
JavaScript
import { r as SessionParticipantIdentitySchema } from "./session-participant-Bbap4dZh.js";
import { Value } from "typebox/value";
//#region src/chat/sender-identity.ts
/** Transcript attribution uses the closed product vocabulary, never raw-id inference. */
function readTranscriptSenderIdentity(value) {
if (typeof value !== "object" || value === null || !Value.Check(SessionParticipantIdentitySchema, value) || value.type !== "profile" && value.type !== "remote" && value.type !== "observation" || Object.values(value).some((part) => part !== null && (!part.trim() || part.length > 512))) return;
return { ...value };
}
//#endregion
export { readTranscriptSenderIdentity as t };