Topwater.Containers
0.1.0-preview.9
dotnet add package Topwater.Containers --version 0.1.0-preview.9
NuGet\Install-Package Topwater.Containers -Version 0.1.0-preview.9
<PackageReference Include="Topwater.Containers" Version="0.1.0-preview.9" />
<PackageVersion Include="Topwater.Containers" Version="0.1.0-preview.9" />
<PackageReference Include="Topwater.Containers" />
paket add Topwater.Containers --version 0.1.0-preview.9
#r "nuget: Topwater.Containers, 0.1.0-preview.9"
#:package Topwater.Containers@0.1.0-preview.9
#addin nuget:?package=Topwater.Containers&version=0.1.0-preview.9&prerelease
#tool nuget:?package=Topwater.Containers&version=0.1.0-preview.9&prerelease
Topwater.Containers
Move a Topwater machine into a real Docker container and back. Build an image from a snapshot to give an agent real programs (python, git, compilers) on the same files, user, working directory and environment. Or import a container as a snapshot, so an agent can investigate a copy of a real machine in the simulation, where it can be forked and rewound.
dotnet add package Topwater.Containers --prerelease
Snapshot to container:
using Topwater;
using Topwater.Containers;
var context = await shell.Snapshot().BuildImageAsync("my-agent");
Console.WriteLine(context.Report); // what didn't carry over
docker run -it my-agent
Container to snapshot:
var result = await ContainerImport.FromContainerAsync("web-1", new ContainerImportOptions { Paths = ["/var/log", "/etc"] });
var shell = new Shell(new ShellOptions { User = result.Snapshot.User });
shell.Restore(result.Snapshot);
Files (content, mode, owner, modification time to the second), the user, the working directory, exported variables
and history carry over. Other variables, functions, aliases and options go into an image, and come back from images
Topwater made. Left behind, and listed in the Report: registered commands, the host name, per-process state,
Topwater's limits, groups, and for an import, real processes, volumes and (unless you name them in Paths) the image's
unchanged files.
These are host APIs. Nothing here registers a command, so the agent can never trigger an export, a build or an import.
Container content is untrusted: paths must be canonical, the import is bounded by MaxFileSystemBytes,
MaxStringBytes and MaxExtractEntries, nothing is written to disk, and the result goes through the same checks as
ShellSnapshot.Load.
An exported image holds what the agent wrote: its files and scripts, its ~/.bashrc and the session script that
~/.bashrc sources, file modes and owners. Starting a shell in it runs that content. Treat the image as untrusted,
and run it with the same care, limits and isolation you would give the agent itself. See
Containers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.9 | 0 | 11/30/2026 |
| 0.1.0-preview.8 | 46 | 11/29/2026 |
| 0.1.0-preview.7 | 70 | 11/28/2026 |
| 0.1.0-preview.6 | 62 | 11/28/2026 |
| 0.1.0-preview.5 | 80 | 11/27/2026 |
| 0.1.0-preview.4 | 51 | 11/26/2026 |
| 0.1.0-preview.3 | 53 | 11/26/2026 |
| 0.1.0-preview.2 | 52 | 11/25/2026 |