feat: Remote-Execute für Linux/Bash – OS-basierte Tool-Descriptions und remote.sh Script
Remote-Verbindungen erkennen jetzt das OS des Clients und passen die Tool-Description dynamisch an (PowerShell für Windows, Bash für Linux). Neues remote.sh Script für Linux/macOS-Clients mit embedded Python WebSocket-Client. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1035066a39
commit
53cee67bef
11 files changed
+381
-27
No files matched your search
@@ -29,9 +29,9 @@ public static class RemoteEndpoint
|
||||
app.MapPost("/api/remote/assign", AssignConnection);
|
||||
app.MapPost("/api/remote/unassign", UnassignConnection);
|
||||
|
||||
// PowerShell-Script ausliefern
|
||||
app.MapGet("/remote.ps1", (Delegate)ServeScript);
|
||||
app.MapGet("/remote", (Delegate)ServeScript);
|
||||
// Scripts ausliefern
|
||||
app.MapGet("/remote.ps1", (Delegate)((HttpContext ctx) => ServeScript(ctx, "remote.ps1")));
|
||||
app.MapGet("/remote.sh", (Delegate)((HttpContext ctx) => ServeScript(ctx, "remote.sh")));
|
||||
}
|
||||
|
||||
private static async Task HandleWebSocket(HttpContext ctx, RemoteConnectionManager mgr)
|
||||
@@ -239,9 +239,9 @@ public static class RemoteEndpoint
|
||||
return Results.Ok(new { ok = true });
|
||||
}
|
||||
|
||||
private static async Task<IResult> ServeScript(HttpContext ctx)
|
||||
private static async Task<IResult> ServeScript(HttpContext ctx, string filename)
|
||||
{
|
||||
var scriptPath = Path.Combine(AppPaths.WwwRoot, "remote.ps1");
|
||||
var scriptPath = Path.Combine(AppPaths.WwwRoot, filename);
|
||||
if (!File.Exists(scriptPath))
|
||||
return Results.NotFound("Script nicht gefunden");
|
||||
|
||||
|
||||
Reference in new issue
Block a user