mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-17 10:06:42 +02:00
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>
11 lines
480 B
TypeScript
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>;
|