Back to Body Journal
SOURCE / PINNED RELEASE

Made of little things.

Body Journal

Release
e8049f8da4e2…
Author-recorded commit
61c04bf0e8aa…
License
LICENSE
Author’s source reference
nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-6c4554844c7

Archive hash verified: 4369d778da046a8b…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

src/vision-contract.ts
// Application-level MCP payload limits; no new NAP protocol surface.
export const IMAGE_CHUNK_CHARS = 24_000;
export const MAX_IMAGE_CHARS = 500_000;
export const MAX_IMAGE_TOTAL = 8_000_000;
export const MAX_IMAGES = 50;
export type VisionState = 'verified' | 'unsupported' | 'unconfirmed';
export interface VisionCheck { state: VisionState; model: string }
export interface BodyImage { concernId: number | null; kind?: 'body-map' | 'patient-photo'; attachmentId?: string; caption: string; dataUrl: string }
export interface VisualEvidence { images: BodyImage[]; notes: string[] }
export function validImage(value:unknown):value is string {
  return typeof value==='string' && value.length<=MAX_IMAGE_CHARS && /^data:image\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$/.test(value);
}