/** * Artifact embedded in another response (version rows, session open). * * The bytes live once and are fetched from the artifact detail endpoint (or * carried by the current version's own `binary_content`); repeating them on * every embedding would put a copy — and a storage read — on each row. */ export type NestedArtifact = { readonly id: number; /** * Title or identifier for the artifact */ title: string; /** * Text content of the artifact; empty for binary artifacts */ readonly content: string; /** * Always null on an embedded artifact; fetch the artifact (or the current version) for the bytes. */ readonly binary_content: string; /** * True when the artifact carries `binary_content` instead of `content` */ readonly is_binary: boolean; /** * MIME type of a binary artifact, e.g. application/pdf. */ readonly mime_type: string; /** * The extension of the file for the artifact. eg. `py`, `md`, `html`, `json`, `csv`, etc */ readonly file_extension: string; readonly llm_name: string; readonly llm_provider: string; readonly date_created: string; readonly date_updated: string; /** * Additional metadata for the artifact */ metadata?: any; /** * Username of the student who owns this artifact */ readonly username: string; readonly session_id: string | null; /** * Version number of the current version */ readonly current_version_number: number; /** * Total number of versions for this artifact */ readonly version_count: number; };