1.6 KiB
Session Summary: Upload Pipeline & Filesystem Consolidation
Date: 2026-03-01
Summary
This session consolidated the file system architecture and resolved issues in the upload pipeline from browser to agent.
Filesystem Architecture
Game server filesystem operations are handled exclusively by the agent. The API proxies all requests — it never touches the filesystem directly.
Capabilities documented:
- Read (list, stat, read, download)
- Write (server.properties, config/.toml, config/.json, config/*.properties)
- Delete (constrained to mods-removed/, mods-uploaded/, logs/)
- Upload (mods/.jar, world/datapacks/.zip)
- Revert (shadow backup restore)
Shadow backups created on first write. 7-day retention, 6h cleanup cycle.
Provenance Tracking
.zlh_metadata.json written after every upload:
{
"mods/sodium.jar": {
"source": "user",
"uploaded_at": "2026-03-01T22:37:01Z"
}
}
stat responses include source: "user" | null. No curated inference implemented.
Upload Transport Fix (API Layer)
Uploads initially failed with 502 errors when proxied from the API to the agent.
Root cause:
The Node API upload proxy was forwarding Content-Length incorrectly while streaming the request body.
Resolution:
The upload route now uses a raw Node http.request stream:
req.pipe(proxyReq)proxyRes.pipe(res)Content-TypepreservedContent-Lengthnot forwarded- Upload timeout extended to 5 minutes
This allows large multipart uploads to stream directly from the client → API → agent without buffering.