Fremde Laufzeiten: Claude Code und Befehl in der Sandbox, Egress-Proxy, Vorschlag statt Einsatz (#712)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7d6c2c9495
commit
367ea387f6
@@ -598,6 +598,23 @@ public sealed class AppHost : IAsyncDisposable
|
||||
foreach (var user in tools.GetAll().OfType<Core.Sandbox.ISandboxUser>())
|
||||
user.Sandbox = sandbox;
|
||||
|
||||
// #712: Foreign runtimes. The application itself is the launcher inside the sandbox
|
||||
// (network through the proxy, secrets from a file) and the MCP bridge back to us.
|
||||
var mcpGrants = new Core.Mcp.McpGrants(storage);
|
||||
var helper = Core.Sandbox.SandboxHelper.ForThisProcess();
|
||||
if (sandbox is Core.Sandbox.BwrapSandbox bwrap)
|
||||
{
|
||||
bwrap.Helper = helper;
|
||||
bwrap.LoggerFactory = loggerFactory;
|
||||
}
|
||||
engine.ForeignRunner = new Core.Runtimes.ForeignRunner(
|
||||
sandbox,
|
||||
[new Core.Runtimes.ClaudeCodeRuntime(() => instance.ClaudeCode), new Core.Runtimes.CommandRuntime()],
|
||||
mcpGrants,
|
||||
OperatingSystem.IsWindows() ? null : Core.Instances.InstanceEndpoint.McpSocketPath(instancePath),
|
||||
helper,
|
||||
loggerFactory.CreateLogger("ClawdDotNet.Core.Runtimes"));
|
||||
|
||||
engine.SetAgentConfigProvider(
|
||||
() => instance.Agents,
|
||||
instance.InstanceId,
|
||||
@@ -638,7 +655,7 @@ public sealed class AppHost : IAsyncDisposable
|
||||
Transcripts = transcripts,
|
||||
Cases = cases,
|
||||
SpecialBudgets = specialBudgets,
|
||||
Mcp = new Core.Mcp.McpGrants(storage),
|
||||
Mcp = mcpGrants,
|
||||
Insights = new RunInsights(audit, transcripts, board, staging,
|
||||
agentId => instance.Agents.FirstOrDefault(a => a.AgentId == agentId) is { } agent
|
||||
? engine.TranscriptRetentionFor(agent)
|
||||
|
||||
Reference in New Issue
Block a user