{
"lexicon": 1,
"id": "place.wisp.subfs",
"defs": {
"main": {
"type": "record",
"description": "Virtual filesystem subtree referenced by place.wisp.fs records. When a subfs entry is expanded, its root entries are merged (flattened) into the parent directory, allowing large directories to be split across multiple records while maintaining a flat structure.",
"record": {
"type": "object",
"required": ["root", "createdAt"],
"properties": {
"root": { "type": "ref", "ref": "#directory" },
"fileCount": { "type": "integer", "minimum": 0, "maximum": 1000 },
"createdAt": { "type": "string", "format": "datetime" }
}
}
},
"file": {
"type": "object",
"required": ["type", "blob"],
"properties": {
"type": { "type": "string", "const": "file" },
"blob": { "type": "blob", "accept": ["*/*"], "maxSize": 1000000000, "description": "Content blob ref" },
"encoding": { "type": "string", "enum": ["gzip"], "description": "Content encoding (e.g., gzip for compressed files)" },
"mimeType": { "type": "string", "description": "Original MIME type before compression" },
"base64": { "type": "boolean", "description": "True if blob content is base64-encoded (used to bypass PDS content sniffing)" }
}
},
"directory": {
"type": "object",
"required": ["type", "entries"],
"properties": {
"type": { "type": "string", "const": "directory" },
"entries": {
"type": "array",
"maxLength": 500,
"items": { "type": "ref", "ref": "#entry" }
}
}
},
"entry": {
"type": "object",
"required": ["name", "node"],
"properties": {
"name": { "type": "string", "maxLength": 255 },
"node": { "type": "union", "refs": ["#file", "#directory", "#subfs"] }
}
},
"subfs": {
"type": "object",
"required": ["type", "subject"],
"properties": {
"type": { "type": "string", "const": "subfs" },
"subject": { "type": "string", "format": "at-uri", "description": "AT-URI pointing to another place.wisp.subfs record for nested subtrees. When expanded, the referenced record's root entries are merged (flattened) into the parent directory, allowing recursive splitting of large directory structures." }
}
}
}
}