Remove outdated edge gateway object classes, add new agent implementation

Transitioned from obsolete gateway object classes (`edge_gateway_shell_action_jobs_o`, `edge_gateway_shell_events_o`, `edge_gateway_shell_sessions_o`, `edge_gateway_update_jobs_o`) to the new agent implementation (`edge-gateway-agent/agent.php`).
This commit is contained in:
Jeppe Bundgaard
2026-04-21 14:13:17 +02:00
parent d30a006457
commit 7d450e285e
90 changed files with 11811 additions and 2760 deletions
@@ -1,36 +1,15 @@
<?php
it('rewrites edge gateway shell transport to API polling queues', function (): void {
$managerSource = file_get_contents(app_path('classes/edge_gateway_manager.php'));
it('removes shell access from the edge gateway HTTP contracts', function (): void {
$routeSource = file_get_contents(app_path('routes/edgeGatewaysRoute.php'));
expect($managerSource)->not->toBeFalse();
expect($routeSource)->not->toBeFalse();
expect($managerSource)->toContain("'transport' => self::DELIVERY_CHANNEL_API");
expect($managerSource)->toContain("'transport_path' => self::DELIVERY_CHANNEL_API");
expect($managerSource)->toContain("'reconnect_state' => 'PENDING'");
expect($managerSource)->toContain("'preferred_channel' => self::DELIVERY_CHANNEL_API");
expect($managerSource)->toContain('private function createShellActionJob');
expect($managerSource)->toContain('private function claimNextShellActionJob');
expect($managerSource)->toContain('private function appendShellEvent');
expect($managerSource)->toContain('private function listShellEvents');
expect($managerSource)->toContain('public function pollShellAction');
expect($managerSource)->toContain('public function submitShellActionResult');
expect($managerSource)->toContain('public function recordShellSessionEvents');
expect($managerSource)->not->toContain('buildBrowserShellWsUrl');
expect($managerSource)->not->toContain('edge_broker_client');
expect($routeSource)->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/events'");
expect($routeSource)->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/input'");
expect($routeSource)->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/resize'");
expect($routeSource)->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/close'");
expect($routeSource)->toContain("'/edge-agent/gateways/{id}/shell-actions/poll'");
expect($routeSource)->toContain("'/edge-agent/gateways/{id}/shell-actions/{actionId}/result'");
expect($routeSource)->toContain("'/edge-agent/gateways/{id}/shell-sessions/{sessionId}/events'");
expect($routeSource)->toContain("'/edge-agent/internal/gateways/{id}/validate'");
expect($routeSource)->toContain("'/edge-agent/internal/shell-sessions/validate'");
expect($routeSource)->toContain("'/edge-agent/internal/gateways/{id}/presence'");
expect($routeSource)->toContain("'/edge-agent/internal/shell-sessions/close'");
expect($routeSource)->toContain('requireBrokerSharedSecret');
expect($routeSource)->not->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/events'");
expect($routeSource)->not->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/input'");
expect($routeSource)->not->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/resize'");
expect($routeSource)->not->toContain("'/edge-gateways/{id}/shell-sessions/{sessionId}/close'");
expect($routeSource)->not->toContain("'/edge-agent/gateways/{id}/shell-actions/poll'");
expect($routeSource)->not->toContain("'/edge-agent/gateways/{id}/shell-actions/{actionId}/result'");
expect($routeSource)->not->toContain("'/edge-agent/gateways/{id}/shell-sessions/{sessionId}/events'");
});