Files
PaperClipAI/packages/shared/src/agent-avatar-upload.ts
T
DottaandPaperclip 2b4a1d7073 feat(dot): add guided invitations and persistent agent connections (#15581)
Add guided external-agent invitations with live Dot connection checks and ongoing access until revoked. Keep expired credentials invalid and enforce permissions for private avatar uploads. Preserve Runner recovery and remote launch boundaries.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-08 16:26:41 -05:00

11 lines
480 B
TypeScript

import { z } from "zod";
export const MAX_AGENT_AVATAR_BYTES = 512 * 1024;
/** Raw PNG/JPEG/WebP bytes, not a URL or a data URL. Null restores the Paperclip character. */
export const setAgentAvatarSchema = z.object({
imageBase64: z.string().min(4).max(4 * Math.ceil(MAX_AGENT_AVATAR_BYTES / 3))
.regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/)
.nullable(),
}).strict();
export type SetAgentAvatarInput = z.infer<typeof setAgentAvatarSchema>;