{
"id": "nyc.noirot.cad.source",
"defs": {
"main": {
"key": "any",
"type": "record",
"record": {
"type": "object",
"required": [
"subject",
"path",
"sha256",
"createdAt"
],
"properties": {
"cid": {
"type": "string",
"format": "cid",
"description": "CID for this source file, if content-addressed."
},
"path": {
"type": "string",
"maxLength": 2048,
"description": "Path within the project archive or source tree."
},
"role": {
"type": "string",
"maxLength": 64,
"description": "Role this source file plays in the project.",
"knownValues": [
"entrypoint",
"source",
"import",
"asset",
"library",
"derived"
]
},
"format": {
"type": "string",
"maxLength": 128,
"description": "CAD source or artifact format.",
"knownValues": [
"kcl",
"solidworks-part",
"solidworks-assembly",
"step",
"stl",
"parasolid",
"obj",
"gltf",
"archive",
"unknown"
]
},
"sha256": {
"type": "string",
"maxLength": 64,
"minLength": 64,
"description": "Lowercase hex SHA-256 digest of the source file bytes."
},
"subject": {
"ref": "nyc.noirot.cad.defs#projectRef",
"type": "ref",
"description": "Project or release record this source file belongs to."
},
"mimeType": {
"type": "string",
"maxLength": 256
},
"createdAt": {
"type": "string",
"format": "datetime"
},
"lineCount": {
"type": "integer",
"minimum": 0,
"description": "Line count for text-native source files."
},
"sizeBytes": {
"type": "integer",
"minimum": 0,
"description": "Size of this source file in bytes."
},
"updatedAt": {
"type": "string",
"format": "datetime"
},
"sourceBlob": {
"type": "blob",
"accept": [
"text/*",
"model/*",
"application/octet-stream",
"application/zip"
],
"maxSize": 10000000,
"description": "Blob reference for source bytes, especially large text files and binary CAD artifacts."
},
"sourceText": {
"type": "string",
"maxLength": 200000,
"description": "Inline UTF-8 source text for compact text-native CAD files such as KCL."
},
"externalUri": {
"type": "string",
"format": "uri",
"description": "External content URL, such as a Zoo project file or archive download URL."
},
"textEncoding": {
"type": "string",
"maxLength": 64,
"description": "Text encoding for sourceText, when present.",
"knownValues": [
"utf-8"
]
}
}
},
"description": "Source file content or content references for a CAD project or release."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"description": "A sidecar record for one CAD source file or artifact."
}