From 50c53ec10d9acb609004a20920c8adbffb0ef47a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 19:32:44 +0000 Subject: [PATCH 1/6] Initial plan From 302f2233dfb0ad8828ecfbe99bde65d57972aa3e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 19:36:41 +0000 Subject: [PATCH 2/6] Update README with dotnet add package install instructions and AddPythonModule extension method Agent-Logs-Url: https://github.com/jsturtevant/hyperlight-sandbox/sessions/7d8bbc3f-4434-436f-a037-9e5f7ce71274 Co-authored-by: jsturtevant <648372+jsturtevant@users.noreply.github.com> --- README.md | 9 +++++---- src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 321449b..02da4c6 100644 --- a/README.md +++ b/README.md @@ -81,16 +81,17 @@ print(result.stdout) .NET SDK: -```bash -just wasm guest-build # build the guest module -just dotnet build # build the .NET SDK +```shell +dotnet add package Hyperlight.HyperlightSandbox.Api --version +dotnet add package Hyperlight.HyperlightSandbox.Guest.Python --version ``` ```csharp using HyperlightSandbox.Api; +using HyperlightSandbox.Guest.Python; using var sandbox = new SandboxBuilder() - .WithModulePath("python-sandbox.aot") + .AddPythonModule() .Build(); sandbox.RegisterTool("add", args => args.a + args.b); diff --git a/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs b/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs index dae0a9c..421cded 100644 --- a/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs +++ b/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs @@ -30,6 +30,14 @@ public static SandboxBuilder WithPythonModule(this SandboxBuilder builder) .WithModulePath(GetModulePath()); } + /// + /// Configures the builder to use the bundled Python guest module with the Wasm backend. + /// + /// The sandbox builder to configure. + /// The same builder for chaining. + public static SandboxBuilder AddPythonModule(this SandboxBuilder builder) => + WithPythonModule(builder); + private static string FindGuestFile(string fileName) { string assemblyDir = Path.GetDirectoryName( From 7924365aa3e70f6af527413143c24cca8013b35f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 19:37:58 +0000 Subject: [PATCH 3/6] Use existing WithPythonModule() extension method; remove AddPythonModule Agent-Logs-Url: https://github.com/jsturtevant/hyperlight-sandbox/sessions/414b7ca5-cc3f-48f9-805b-460358b61bca Co-authored-by: jsturtevant <648372+jsturtevant@users.noreply.github.com> --- README.md | 2 +- src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 02da4c6..04c46d9 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ using HyperlightSandbox.Api; using HyperlightSandbox.Guest.Python; using var sandbox = new SandboxBuilder() - .AddPythonModule() + .WithPythonModule() .Build(); sandbox.RegisterTool("add", args => args.a + args.b); diff --git a/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs b/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs index 421cded..dae0a9c 100644 --- a/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs +++ b/src/sdk/dotnet/core/Guest.Python/PythonGuestModule.cs @@ -30,14 +30,6 @@ public static SandboxBuilder WithPythonModule(this SandboxBuilder builder) .WithModulePath(GetModulePath()); } - /// - /// Configures the builder to use the bundled Python guest module with the Wasm backend. - /// - /// The sandbox builder to configure. - /// The same builder for chaining. - public static SandboxBuilder AddPythonModule(this SandboxBuilder builder) => - WithPythonModule(builder); - private static string FindGuestFile(string fileName) { string assemblyDir = Path.GetDirectoryName( From 0a88226a1f8b40b8b89cbe9e6f4a3819a5be4342 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 19:40:55 +0000 Subject: [PATCH 4/6] Drop redundant module= argument from README Python Quick Start Agent-Logs-Url: https://github.com/jsturtevant/hyperlight-sandbox/sessions/48e0d6cc-1d03-4b6d-94be-403234a74612 Co-authored-by: jsturtevant <648372+jsturtevant@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 04c46d9..4d4ca2f 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ And to use it: ```python from hyperlight_sandbox import Sandbox -sandbox = Sandbox(backend="wasm", module="python_guest.path") +sandbox = Sandbox(backend="wasm") sandbox.register_tool("add", lambda a=0, b=0: a + b) sandbox.allow_domain("https://httpbin.org") From 20e827d244813b463aa171ff8b7715aab76cfa50 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 19:42:48 +0000 Subject: [PATCH 5/6] Remove --version from .NET install commands in README Agent-Logs-Url: https://github.com/jsturtevant/hyperlight-sandbox/sessions/1e9db34f-1ece-4882-ba25-a5b572070086 Co-authored-by: jsturtevant <648372+jsturtevant@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4d4ca2f..c1822da 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,8 @@ print(result.stdout) .NET SDK: ```shell -dotnet add package Hyperlight.HyperlightSandbox.Api --version -dotnet add package Hyperlight.HyperlightSandbox.Guest.Python --version +dotnet add package Hyperlight.HyperlightSandbox.Api +dotnet add package Hyperlight.HyperlightSandbox.Guest.Python ``` ```csharp From 2f9c0dcafe6667111aca26fe5132a698be12c12c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 2 May 2026 19:45:44 +0000 Subject: [PATCH 6/6] Restore module= argument in README Python Quick Start Agent-Logs-Url: https://github.com/jsturtevant/hyperlight-sandbox/sessions/d56c2589-f9f1-409a-a911-7bb698bc7c52 Co-authored-by: jsturtevant <648372+jsturtevant@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1822da..6086d95 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ And to use it: ```python from hyperlight_sandbox import Sandbox -sandbox = Sandbox(backend="wasm") +sandbox = Sandbox(backend="wasm", module="python_guest.path") sandbox.register_tool("add", lambda a=0, b=0: a + b) sandbox.allow_domain("https://httpbin.org")