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
@@ -134,6 +134,30 @@ internal static class ApiEndpoints
|
||||
agents.MapDelete("/{agentId}", (AppHost host, string agentId) =>
|
||||
host.AgentAdmin.Remove(agentId).ToResponse());
|
||||
|
||||
// #712: the runtime — native, or foreign in the sandbox.
|
||||
agents.MapPut("/{agentId}/runtime", (AppHost host, string agentId, AgentRuntimeDto input) =>
|
||||
host.AgentAdmin.SetRuntime(agentId, input.ToConfig()).ToResponse());
|
||||
|
||||
var runtimes = api.MapGroup("/runtimes");
|
||||
runtimes.MapGet("/", (AppHost host) =>
|
||||
{
|
||||
var sandbox = host.Engine?.Sandbox;
|
||||
var claude = host.Instance.ClaudeCode;
|
||||
return new RuntimesDto(
|
||||
sandbox?.IsAvailable ?? false,
|
||||
sandbox?.UnavailableReason ?? (sandbox is null ? "no engine" : null),
|
||||
Core.Runtimes.RuntimeKinds.All,
|
||||
Core.Runtimes.ClaudeCodeRuntime.DefaultAllowedTools,
|
||||
new ClaudeCodeDto(
|
||||
claude.Executable,
|
||||
Core.Runtimes.ClaudeCodeRuntime.Locate(claude),
|
||||
claude.Auth,
|
||||
!string.IsNullOrWhiteSpace(claude.ApiKey),
|
||||
!string.IsNullOrWhiteSpace(claude.OAuthToken)));
|
||||
});
|
||||
runtimes.MapPut("/claude-code", (AppHost host, ClaudeCodeInputDto input) =>
|
||||
host.AgentAdmin.SetClaudeCode(input.Executable, input.Auth, input.ApiKey, input.OAuthToken).ToResponse());
|
||||
|
||||
// #715: Can only tighten — the tools decide the tier, this adds to it.
|
||||
agents.MapPut("/{agentId}/foreign-reader", (AppHost host, string agentId, bool value) =>
|
||||
host.AgentAdmin.SetTreatAsForeignReader(agentId, value).ToResponse());
|
||||
|
||||
Reference in New Issue
Block a user