From a56ef0b89703e2d2fff58c816fd799d7d6af3659 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Thu, 13 Mar 2025 09:10:37 +0100 Subject: [PATCH] Add system.serverSyscall syscall --- common/syscalls/system.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/syscalls/system.ts b/common/syscalls/system.ts index a24c8566..5c02f110 100644 --- a/common/syscalls/system.ts +++ b/common/syscalls/system.ts @@ -75,6 +75,13 @@ export function systemSyscalls( [fullName, ...args], ); }, + "system.serverSyscall": (_ctx, name: string, ...args: any[]) => { + if (!client) { + return system.localSyscall(name, args); + } else { + return proxySyscall({}, client!.httpSpacePrimitives, name, args); + } + }, "system.invokeCommand": (_ctx, name: string, args?: string[]) => { if (!client) { throw new Error("Not supported");