Connection
Base URL, credentials and a reachable server.
Migrate version-one game saves by adding an inventory field without resetting progress. Test an empty inventory, a damaged save and an unsupported newer version while preserving the original file on failure.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
function migrate(save: SaveV1): SaveV2 {
if (save.version !== 1) throw new Error("version");
return { ...save, version: 2, inventory: [] };
}